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

Issue 2472613004: Remove ShadowRoot::numberOfStyles(). (Closed)

Created:
4 years, 1 month ago by rune
Modified:
4 years, 1 month ago
Reviewers:
hayato, kochi
CC:
chromium-reviews, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, webcomponents-bugzilla_chromium.org, blink-reviews-css, sof, eae+blinkwatch, fs, blink-reviews-dom_chromium.org, dglazkov+blink, krit, apavlov+blink_chromium.org, darktears, blink-reviews, f(malita), gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, Stephen Chennney, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove ShadowRoot::numberOfStyles(). This probably used to be an optimization which made sense when we had <style scoped> implemented. Now, it should be equally cheap to just check the ScopedStyleResolver member. The ScopedStyleResolver is null when there are no active stylesheets in the tree-scope. This also caused issue 659596 because we only registered style elements and not link elements, which lead the code to believe there were no rules to match from the scope when there were only link stylesheets present. R=kochi@chromium.org,hayato@chromium.org BUG=659596 Committed: https://crrev.com/4215d863dcedd407dc69d31addc731a7bc80a7e8 Cr-Commit-Position: refs/heads/master@{#429824}

Patch Set 1 #

Patch Set 2 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -36 lines) Patch
A third_party/WebKit/LayoutTests/shadow-dom/host-link-style.html View 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 2 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleElement.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/StyleElement.cpp View 1 chunk +4 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h View 1 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp View 2 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLStyleElement.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGStyleElement.cpp View 1 chunk +0 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (12 generated)
rune
ptal
4 years, 1 month ago (2016-11-02 23:18:00 UTC) #3
kochi
LGTM Thanks for fixing the problem so quickly!
4 years, 1 month ago (2016-11-04 01:57:08 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2472613004/20001
4 years, 1 month ago (2016-11-04 07:20:46 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-04 07:25:56 UTC) #15
commit-bot: I haz the power
4 years, 1 month ago (2016-11-04 07:29:02 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/4215d863dcedd407dc69d31addc731a7bc80a7e8
Cr-Commit-Position: refs/heads/master@{#429824}

Powered by Google App Engine
This is Rietveld 408576698