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

Issue 418833002: Remove all members in ScopedStyleTree for preparing class removal (Closed)

Created:
6 years, 5 months ago by kochi
Modified:
6 years, 4 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, hayato, rwlbuis, rune+blink
Project:
blink
Visibility:
Public.

Description

Remove all members in ScopedStyleTree for preparing class removal As a part of ScopedStyleTree removal (issue 392018), remove all private members in ScopedStyleTree. |m_cache| is no longer necessary as ScopedStyleResolver lookup from an element no longer require ascending the DOM tree up, thanks to <style scoped> removal. Unfortunately |m_authorStyles| cannot be removed completely - StyleResolver still has to clear ScopedStyleResolvers which are associated with TreeScopes, and thus moved from ScopedStyleTree to StyleResolver (and renamed |m_scopedStyleResolvers| to match what it contains). BUG=392018 TEST=no layout test failures Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179051

Patch Set 1 #

Patch Set 2 : rebase. #

Patch Set 3 : rebase. #

Patch Set 4 : Fix oilpan build. #

Patch Set 5 : rebase #

Patch Set 6 : resetAuthorStyle(TreeScope) #

Patch Set 7 : ifdef destructor #

Total comments: 2

Patch Set 8 : Fix destructor #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -187 lines) Patch
M Source/core/css/StyleSheetContents.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleTree.h View 1 1 chunk +1 line, -55 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleTree.cpp View 1 3 chunks +4 lines, -90 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 3 4 5 4 chunks +4 lines, -4 lines 1 comment Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 9 chunks +18 lines, -27 lines 0 comments Download
M Source/core/css/resolver/StyleResolverParentScope.h View 2 chunks +0 lines, -4 lines 0 comments Download
M Source/core/dom/DocumentStyleSheetCollection.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/ShadowTreeStyleSheetCollection.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/StyleEngine.cpp View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
kochi
Takashi, could you review?
6 years, 5 months ago (2014-07-25 04:55:37 UTC) #1
esprehn
https://codereview.chromium.org/418833002/diff/180001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/418833002/diff/180001/Source/core/css/resolver/StyleResolver.cpp#newcode379 Source/core/css/resolver/StyleResolver.cpp:379: const_cast<TreeScope&>((*it)->treeScope()).clearScopedStyleResolver(); This needs to be done for Oilpan builds ...
6 years, 5 months ago (2014-07-25 05:01:00 UTC) #2
kochi
(+cc haraken FYI) Takashi and I debugged the destructor, and found a path that should ...
6 years, 5 months ago (2014-07-25 06:02:15 UTC) #3
tasak
https://codereview.chromium.org/418833002/diff/180001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/418833002/diff/180001/Source/core/css/resolver/StyleResolver.cpp#newcode379 Source/core/css/resolver/StyleResolver.cpp:379: const_cast<TreeScope&>((*it)->treeScope()).clearScopedStyleResolver(); On 2014/07/25 05:00:59, esprehn wrote: > This needs ...
6 years, 5 months ago (2014-07-25 06:02:16 UTC) #4
kochi
+cc haraken FYI
6 years, 5 months ago (2014-07-25 06:03:50 UTC) #5
haraken
Thanks for fixing this! I'm hoping this will fix all the failures happening on oilpan ...
6 years, 5 months ago (2014-07-25 06:03:56 UTC) #6
haraken
6 years, 5 months ago (2014-07-25 06:04:07 UTC) #7
tasak
lgtm. https://codereview.chromium.org/418833002/diff/200001/Source/core/css/resolver/StyleResolver.h File Source/core/css/resolver/StyleResolver.h (right): https://codereview.chromium.org/418833002/diff/200001/Source/core/css/resolver/StyleResolver.h#newcode301 Source/core/css/resolver/StyleResolver.h:301: // FIXME: Probably this should move to StyleEngine ...
6 years, 5 months ago (2014-07-25 06:07:59 UTC) #8
esprehn
Removing the cache does mean we need to traverse up tree scopes for every element, ...
6 years, 4 months ago (2014-07-28 17:40:53 UTC) #9
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 4 months ago (2014-07-28 17:40:59 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kochi@chromium.org/418833002/200001
6 years, 4 months ago (2014-07-28 17:41:46 UTC) #11
commit-bot: I haz the power
Change committed as 179051
6 years, 4 months ago (2014-07-28 18:08:39 UTC) #12
kochi
6 years, 4 months ago (2014-07-29 02:00:17 UTC) #13
Message was sent while issue was closed.
Thanks for the review!

bug filed:
https://code.google.com/p/chromium/issues/detail?id=398283

for potential perf regression.

Powered by Google App Engine
This is Rietveld 408576698