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

Issue 2354773003: Make stylesheet owner node a reference instead of pointer. (Closed)

Created:
4 years, 3 months ago by rune
Modified:
4 years, 3 months ago
Reviewers:
sashab
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, dglazkov+blink, krit, eae+blinkwatch, f(malita), fs, gavinp+prerender_chromium.org, gyuyoung2, kouhei+svg_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pdr+svgwatchlist_chromium.org, pfeldman+blink_chromium.org, rwlbuis, Stephen Chennney, sof, Yoav Weiss
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make stylesheet owner node a reference instead of pointer. The CSSStyleSheet owner node is always non-null when passed in on sheet creation. Make it a reference in various APIs. The real change here that triggered this was the realization that StyleEngine::createSheet is always called with an owner node which belongs to the very same Document/StyleEngine. So we can turn: e->document().styleEngine().addPendingSheet(context); into: addPendingSheet(context); Also made parseSheet non-static as it needed the StyleEngine pointer anyway. R=sashab@chromium.org BUG=567021 Committed: https://crrev.com/3cf2f58b1be6065c5c8264e60d414ec9531a6449 Cr-Commit-Position: refs/heads/master@{#420018}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Added TODO #

Patch Set 3 : const #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -131 lines) Patch
M third_party/WebKit/Source/core/css/CSSStyleSheet.h View 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleSheet.cpp View 3 chunks +12 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp View 1 4 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSTestHelper.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp View 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleElement.h View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleElement.cpp View 1 2 6 chunks +30 lines, -34 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.h View 4 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 9 chunks +27 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngineTest.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLLinkElement.cpp View 6 chunks +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLStyleElement.cpp View 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorStyleSheet.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGStyleElement.cpp View 2 chunks +5 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (6 generated)
rune
ptal
4 years, 3 months ago (2016-09-20 15:23:40 UTC) #3
sashab
This looks great, thanks rune!! I love patches like these. Feel free to do any/all ...
4 years, 3 months ago (2016-09-21 01:33:29 UTC) #6
rune
https://codereview.chromium.org/2354773003/diff/1/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp File third_party/WebKit/Source/core/css/CSSStyleSheet.cpp (right): https://codereview.chromium.org/2354773003/diff/1/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp#newcode124 third_party/WebKit/Source/core/css/CSSStyleSheet.cpp:124: , m_ownerNode(&ownerNode) On 2016/09/21 at 01:33:29, sashab wrote: > ...
4 years, 3 months ago (2016-09-21 07:17:46 UTC) #7
rune
On 2016/09/21 at 01:33:29, sashab wrote: > This looks great, thanks rune!! > > I ...
4 years, 3 months ago (2016-09-21 07:31:15 UTC) #8
rune
On 2016/09/21 at 07:31:15, rune wrote: > On 2016/09/21 at 01:33:29, sashab wrote: > > ...
4 years, 3 months ago (2016-09-21 07:45:02 UTC) #9
sashab
Lgtm On 21 Sep 2016 5:45 PM, <rune@opera.com> wrote: > On 2016/09/21 at 07:31:15, rune ...
4 years, 3 months ago (2016-09-21 07:54:33 UTC) #10
sashab
Lgtm On 21 Sep 2016 5:45 PM, <rune@opera.com> wrote: > On 2016/09/21 at 07:31:15, rune ...
4 years, 3 months ago (2016-09-21 07:54:34 UTC) #11
sashab
lgtm
4 years, 3 months ago (2016-09-21 07:55:10 UTC) #12
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/2354773003/40001
4 years, 3 months ago (2016-09-21 08:00:21 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-21 09:23:11 UTC) #15
commit-bot: I haz the power
4 years, 3 months ago (2016-09-21 09:26:20 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/3cf2f58b1be6065c5c8264e60d414ec9531a6449
Cr-Commit-Position: refs/heads/master@{#420018}

Powered by Google App Engine
This is Rietveld 408576698