WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
83719
document.styleSheets is not updated if the document has no renderer
https://bugs.webkit.org/show_bug.cgi?id=83719
Summary
document.styleSheets is not updated if the document has no renderer
Erik Arvidsson
Reported
2012-04-11 14:40:33 PDT
document.styleSheets is not updated if the document has no renderer
Attachments
Patch
(6.97 KB, patch)
2012-04-11 14:41 PDT
,
Erik Arvidsson
koivisto
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2012-04-11 14:41:32 PDT
Created
attachment 136758
[details]
Patch
Erik Arvidsson
Comment 2
2012-04-11 14:44:11 PDT
Ryosuke: I ended up removing the helper function since this is only used in one place.
Antti Koivisto
Comment 3
2012-04-11 15:44:09 PDT
Comment on
attachment 136758
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=136758&action=review
> Source/WebCore/dom/Document.cpp:3097 > + if (m_styleSheetsDirty) { > + StyleSheetVector newStylesheets; > + collectActiveStylesheets(newStylesheets); > + m_styleSheets->swap(newStylesheets); > + m_styleSheetsDirty = false; > + } > return m_styleSheets.get();
This seems dangerous. If we have a style selector it won't get updated and will be computing wrong style. This might never happen in practice but it is completely non-obvious why not. It would be nice if we did not need to add new boolean as the logic is convoluted enough already.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug