[webkit-reviews] review denied: [Bug 83719] document.styleSheets is not updated if the document has no renderer : [Attachment 136758] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 11 15:44:09 PDT 2012


Antti Koivisto <koivisto at iki.fi> has denied Erik Arvidsson <arv at chromium.org>'s
request for review:
Bug 83719: document.styleSheets is not updated if the document has no renderer
https://bugs.webkit.org/show_bug.cgi?id=83719

Attachment 136758: Patch
https://bugs.webkit.org/attachment.cgi?id=136758&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
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.


More information about the webkit-reviews mailing list