New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 661914 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 659596



Sign in to add a comment

DCHECK: wrong treeScope used for link elements in shadow dom

Reported by r...@opera.com, Nov 3 2016

Issue description

StyleEngine assumes link element stylesheets are in the Document scope because link stylesheets used to be disallowed in shadow trees. This is no longer the case.

 
link-assert.html
325 bytes View Download

Comment 1 by r...@opera.com, Nov 3 2016

Labels: -Stabil
Labels: Hotlist-CodeHealth
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7187fe2ac3d98d0219268914aeddf4eb03c5f42b

commit 7187fe2ac3d98d0219268914aeddf4eb03c5f42b
Author: rune <rune@opera.com>
Date: Fri Nov 04 13:42:20 2016

Link stylesheets in shadow trees do not belong to document scope.

We have incorrectly kept DCHECKs checking that stylesheets in shadow
trees come from style elements. That is no longer true, and modifying
link elements in shadow trees would trigger some of these DCHECKs.

Also, we simply used Document as the TreeScope handling link elements.
Always use the treeScope() from the associated node instead. Using the
wrong TreeScope in these cases would cause missing updates of active
stylesheets in ShadowTreeStyleSheetCollections for AnalyzedStyleUpdate.
I have not been able to find a triggering test case for this.

R=hayato@chromium.org,kochi@chromium.org
BUG= 661914 

Review-Url: https://codereview.chromium.org/2472973002
Cr-Commit-Position: refs/heads/master@{#429877}

[add] https://crrev.com/7187fe2ac3d98d0219268914aeddf4eb03c5f42b/third_party/WebKit/LayoutTests/shadow-dom/crashes/link-style-change-href-assert.html
[modify] https://crrev.com/7187fe2ac3d98d0219268914aeddf4eb03c5f42b/third_party/WebKit/Source/core/dom/StyleEngine.cpp

Comment 5 by r...@opera.com, Nov 4 2016

Status: Fixed (was: Started)

Comment 6 by r...@opera.com, Nov 11 2016

Blocking: 659596
Labels: Merge-Request-55
Merge to 55 required for the merge of fix for  issue 659596  to 55 to have full effect.

Comment 7 by dimu@chromium.org, Nov 11 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 11 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0e5e70acdb5e1946af50c8565fdc9728529f84f1

commit 0e5e70acdb5e1946af50c8565fdc9728529f84f1
Author: Rune Lillesveen <rune@opera.com>
Date: Fri Nov 11 14:57:54 2016

Link stylesheets in shadow trees do not belong to document scope.

We have incorrectly kept DCHECKs checking that stylesheets in shadow
trees come from style elements. That is no longer true, and modifying
link elements in shadow trees would trigger some of these DCHECKs.

Also, we simply used Document as the TreeScope handling link elements.
Always use the treeScope() from the associated node instead. Using the
wrong TreeScope in these cases would cause missing updates of active
stylesheets in ShadowTreeStyleSheetCollections for AnalyzedStyleUpdate.
I have not been able to find a triggering test case for this.

R=hayato@chromium.org,kochi@chromium.org
BUG= 661914 

Review-Url: https://codereview.chromium.org/2472973002
Cr-Commit-Position: refs/heads/master@{#429877}
(cherry picked from commit 7187fe2ac3d98d0219268914aeddf4eb03c5f42b)

Review URL: https://codereview.chromium.org/2500513002 .

Cr-Commit-Position: refs/branch-heads/2883@{#538}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[add] https://crrev.com/0e5e70acdb5e1946af50c8565fdc9728529f84f1/third_party/WebKit/LayoutTests/shadow-dom/crashes/link-style-change-href-assert.html
[modify] https://crrev.com/0e5e70acdb5e1946af50c8565fdc9728529f84f1/third_party/WebKit/Source/core/dom/StyleEngine.cpp

Cc: kavvaru@chromium.org
Labels: TE-Verified-55.0.2883.52 TE-Verified-M55
Tested the issue on windows 7, Linux Ubuntu 14.04 and Mac 10.11.6 using chrome version 55.0.2883.52 with the link-assert.html.
Observed that the text is not red.Please find the attached screen shot for the same.

Hence adding TE-Verified label. 

Thanks,
661914.png
58.7 KB View Download

Sign in to add a comment