DescriptionRevert of Don't apply style elements or PIs with loading imports. (patchset #2 id:20001 of https://codereview.chromium.org/1867513002/ )
Reason for revert:
This change is incompatible with what Gecko and Blink used to do when inserting an @import rule with insertRule() into a style element sheet.
Inserting a style element with script, immediately followed by an @import insertRule() behaves differently than inserting the style element containing that @import rule in the text because the <style> element is processed before the insertRule. Both Gecko and Blink (without this CL) applies the main stylesheet while the @import inserted with insertRule is loading, while they don't when @import is part of the text node child.
The behavior for inserting @import is not specified, and zcorpan reported [1].
[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=29566
Original issue's description:
> Don't apply style elements or PIs with loading imports.
>
> updateLayoutTreeIgnorePendingStylesheets may resolve styles when sheets
> are loading. For link elements, the main stylesheet is not applied if
> any of its @imports are still loading. For style elements and
> xml-stylesheets, we did apply the contents of the main stylesheet while
> its @imports were loading. That means we applied half-baked stylesheets
> and we had an inconsistency between link and style. Instead regard
> style elements and processing instructions as loading when @imports are
> loading.
>
> BUG=600733
>
> Committed: https://crrev.com/456c101025b6c470dce2a6af3b0d70cb2950a980
> Cr-Commit-Position: refs/heads/master@{#385564}
TBR=esprehn@chromium.org,timloh@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=600733
Committed: https://crrev.com/e0eec65f8c6f763775fbf7df75c52ea6c680ea90
Cr-Commit-Position: refs/heads/master@{#386081}
Patch Set 1 #Messages
Total messages: 8 (2 generated)
|