Opened 7 years ago

Closed 4 years ago

#16096 closed defect (wontfix)

dojox.data.CssRuleStore can't handle remote css and @media rules

Reported by: Wouter Hager Owned by: Kris Zyp
Priority: high Milestone: 1.11
Component: DojoX Data Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

if css are remote, css.js runs into an infinite loop.

if CssRuleStore?._handleRule runs into @media rule an error is thrown: 'selector is null'

line 263: var selector = ruleselectorText?; var s = selector.split(" ");

Both bugs can be fixed by adding checking if null.

Attachments (1)

try-rules-in-sheet-fails-for-remote.patch (2.9 KB) - added by Wouter Hager 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by Wouter Hager

In FireFox?, CSSImportRule causes a loop in dojox/data/css.js line 96-97:

if(rule.type && rule.type === 3){ CSSImportRule (firefox)

_processSS(rule.styleSheet);

}

If the stylesheet is already added, it should not resolve again.

comment:2 Changed 7 years ago by dylan

Milestone: tbd1.9
Owner: changed from Kris Zyp to Wouter Hager
Status: newpending

If you have a patch and cla, please post and I'll review and commit.

comment:3 Changed 7 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:4 Changed 6 years ago by Wouter Hager

I have a patch now, please reopen and review.

comment:5 Changed 6 years ago by Wouter Hager

The bug description should be expanded slightly, but it's related: if css are remote, css.js will fail.

Changed 6 years ago by Wouter Hager

comment:6 Changed 6 years ago by Wouter Hager

Related to #17535

comment:7 Changed 6 years ago by dylan

Milestone: 1.91.10
Priority: undecidedhigh
Resolution: invalid
Status: closedreopened

comment:8 Changed 6 years ago by dylan

Owner: changed from Wouter Hager to Kris Zyp
Status: reopenedassigned

comment:9 Changed 6 years ago by Wouter Hager

The best solution would be to rebuild this store in the new dojo/store API. Shouldn't be hard to do. I would go with xstyle, but it's too comprehensive.

comment:10 Changed 6 years ago by dylan

Milestone: 1.101.11

@wshager, it might be better to rebuild the store against dstore ( https://github.com/sitepen/dstore ), which is the 1.x compatible but 2.x replacement for dojo/store.

If that's something you want to do, I'd suggest a pull request against that project?

comment:11 Changed 5 years ago by Wouter Hager

I created a dojo css store module on https://github.com/wshager/dcssstore. It could be merged with dstore if so desired. Perhaps a repo for more exotic/experimental stores like currently in dojox would be better.

comment:12 Changed 4 years ago by dylan

Resolution: wontfix
Status: assignedclosed

Closing since you have dcssstore. Added https://github.com/SitePen/dstore/issues/157 to setup a listing of community dstore instances.

Note: See TracTickets for help on using tickets.