Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Issue 1867513002: Don't apply style elements or PIs with loading imports. (Closed)

Created:
4 years, 8 months ago by rune
Modified:
4 years, 8 months ago
Reviewers:
Timothy Loh, esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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}

Patch Set 1 #

Patch Set 2 : Do the same for processing instructions #

Total comments: 2

Messages

Total messages: 22 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1867513002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1867513002/1
4 years, 8 months ago (2016-04-06 09:25:08 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-06 10:44:30 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1867513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1867513002/20001
4 years, 8 months ago (2016-04-06 13:20:37 UTC) #6
rune
Added fix for processing instructions (xml-stylesheet) as well.
4 years, 8 months ago (2016-04-06 13:22:44 UTC) #8
rune
4 years, 8 months ago (2016-04-06 14:04:18 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-06 14:45:54 UTC) #13
esprehn
lgtm https://codereview.chromium.org/1867513002/diff/20001/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp File third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp (right): https://codereview.chromium.org/1867513002/diff/20001/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp#newcode85 third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp:85: StyleSheet* sheet = this->sheet(); hmm, can we not ...
4 years, 8 months ago (2016-04-06 21:03:17 UTC) #14
rune
https://codereview.chromium.org/1867513002/diff/20001/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp File third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp (right): https://codereview.chromium.org/1867513002/diff/20001/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp#newcode85 third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp:85: StyleSheet* sheet = this->sheet(); On 2016/04/06 21:03:17, esprehn wrote: ...
4 years, 8 months ago (2016-04-06 22:01:47 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1867513002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1867513002/20001
4 years, 8 months ago (2016-04-06 22:03:31 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-06 22:13:39 UTC) #19
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/456c101025b6c470dce2a6af3b0d70cb2950a980 Cr-Commit-Position: refs/heads/master@{#385564}
4 years, 8 months ago (2016-04-06 22:14:31 UTC) #21
rune
4 years, 8 months ago (2016-04-08 14:14:59 UTC) #22
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/1867753006/ by rune@opera.com.

The reason for reverting is: 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
.

Powered by Google App Engine
This is Rietveld 408576698