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

Issue 5216392399814656: Clear StyleResolverState after each resolve. (Closed)

Created:
7 years, 5 months ago by Jeffrey Yasskin
Modified:
7 years, 5 months ago
Reviewers:
esprehn, dglazkov, eseidel
CC:
blink-reviews, apavlov+blink_chromium.org, dglazkov+blink, eae+blinkwatch, darktears, tasak (please_use_google.com)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Clear StyleResolverState after each resolve. This makes sure RenderStyles aren't kept alive unnecessarily by the two RefPtr<RenderStyles> inside there. However, it's not enough to make sure that *all* RenderStyles are destroyed eagerly. BUG=172011 R=eseidel@chromium.org, esprehn@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=154162

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use an RAII class to pair initForStyleResolve() with clear() #

Patch Set 3 : You people refactor too quickly. (Sync ;) #

Total comments: 6

Patch Set 4 : Fix Dimitri's comments #

Patch Set 5 : Sync #

Total comments: 8

Patch Set 6 : Now with WTF_ARRAY_LENGTH #

Total comments: 2

Patch Set 7 : s/ScopedStyleResolution/StyleResolveScope/ #

Patch Set 8 : Updated after levi's revert #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -62 lines) Patch
M Source/core/css/FontLoader.cpp View 1 2 3 4 5 2 chunks +9 lines, -17 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 3 4 3 chunks +12 lines, -4 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 10 chunks +35 lines, -26 lines 0 comments Download
M Source/core/css/resolver/StyleResolverState.h View 1 2 3 4 5 6 3 chunks +14 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleResolverState.cpp View 1 2 3 4 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 1 chunk +10 lines, -12 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
Jeffrey Yasskin
At https://codereview.chromium.org/18371008/diff/2001/Source/core/rendering/style/StyleRareNonInheritedData.cpp#newcode164, I'm using the destruction of a RenderStyle object to notify the Blink embedder ...
7 years, 5 months ago (2013-07-11 21:24:05 UTC) #1
esprehn
Can we just add a new method like finishStyleResolve() that does this? I don't particularly ...
7 years, 5 months ago (2013-07-11 21:30:35 UTC) #2
Jeffrey Yasskin
On 2013/07/11 21:30:35, esprehn wrote: > Can we just add a new method like finishStyleResolve() ...
7 years, 5 months ago (2013-07-11 21:52:29 UTC) #3
esprehn
On 2013/07/11 21:52:29, Jeffrey Yasskin wrote: > On 2013/07/11 21:30:35, esprehn wrote: > > Can ...
7 years, 5 months ago (2013-07-11 22:12:42 UTC) #4
Jeffrey Yasskin
To fix the failing tests, I've refactored applyPropertyToStyle and its two callers in FontLoader and ...
7 years, 5 months ago (2013-07-12 00:59:40 UTC) #5
dglazkov
This change is definitely net-positive! It's starting to get largish, but it incrementally helps in ...
7 years, 5 months ago (2013-07-12 16:45:47 UTC) #6
Jeffrey Yasskin
https://codereview.chromium.org/5216392399814656/diff/14001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/5216392399814656/diff/14001/Source/core/css/resolver/StyleResolver.cpp#newcode1079 Source/core/css/resolver/StyleResolver.cpp:1079: PassRefPtr<RenderStyle> StyleResolver::styleForKeyframe(Element* e, const RenderStyle* elementStyle, const StyleKeyframe* keyframe, ...
7 years, 5 months ago (2013-07-12 19:41:27 UTC) #7
Jeffrey Yasskin
https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/resolver/StyleResolverState.h File Source/core/css/resolver/StyleResolverState.h (right): https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/resolver/StyleResolverState.h#newcode86 Source/core/css/resolver/StyleResolverState.h:86: class ScopedStyleResolution { In a subsequent change, we could ...
7 years, 5 months ago (2013-07-12 19:58:27 UTC) #8
esprehn
LGTM. This is really pretty. Couple random comments https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/FontLoader.cpp File Source/core/css/FontLoader.cpp (right): https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/FontLoader.cpp#newcode351 Source/core/css/FontLoader.cpp:351: styleResolver->applyPropertiesToStyle(properties, ...
7 years, 5 months ago (2013-07-12 20:15:27 UTC) #9
Jeffrey Yasskin
Thanks for the review! https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/FontLoader.cpp File Source/core/css/FontLoader.cpp (right): https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/FontLoader.cpp#newcode351 Source/core/css/FontLoader.cpp:351: styleResolver->applyPropertiesToStyle(properties, arraysize(properties), style.get()); On 2013/07/12 ...
7 years, 5 months ago (2013-07-12 20:49:08 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/5216392399814656/36001
7 years, 5 months ago (2013-07-12 21:10:10 UTC) #11
Jeffrey Yasskin
https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/FontLoader.cpp File Source/core/css/FontLoader.cpp (right): https://codereview.chromium.org/5216392399814656/diff/25001/Source/core/css/FontLoader.cpp#newcode351 Source/core/css/FontLoader.cpp:351: styleResolver->applyPropertiesToStyle(properties, arraysize(properties), style.get()); On 2013/07/12 20:49:08, Jeffrey Yasskin wrote: ...
7 years, 5 months ago (2013-07-12 21:10:12 UTC) #12
eseidel
lgtm I really appreciate you making the extra effort to join the StyleResolver sanification process ...
7 years, 5 months ago (2013-07-12 22:04:18 UTC) #13
eseidel
https://codereview.chromium.org/5216392399814656/diff/36001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/5216392399814656/diff/36001/Source/core/css/resolver/StyleResolver.cpp#newcode1017 Source/core/css/resolver/StyleResolver.cpp:1017: ScopedStyleResolution resolution(&state, document(), element, defaultParent, regionForStyling); This seems somewhat ...
7 years, 5 months ago (2013-07-12 22:05:42 UTC) #14
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=12583
7 years, 5 months ago (2013-07-12 22:23:13 UTC) #15
Jeffrey Yasskin
https://codereview.chromium.org/5216392399814656/diff/36001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/5216392399814656/diff/36001/Source/core/css/resolver/StyleResolver.cpp#newcode1017 Source/core/css/resolver/StyleResolver.cpp:1017: ScopedStyleResolution resolution(&state, document(), element, defaultParent, regionForStyling); On 2013/07/12 22:05:42, ...
7 years, 5 months ago (2013-07-12 22:59:05 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/5216392399814656/47001
7 years, 5 months ago (2013-07-12 22:59:22 UTC) #17
commit-bot: I haz the power
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layout_rel&number=16630
7 years, 5 months ago (2013-07-12 23:18:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/5216392399814656/47001
7 years, 5 months ago (2013-07-12 23:46:16 UTC) #19
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=12625
7 years, 5 months ago (2013-07-13 00:58:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jyasskin@chromium.org/5216392399814656/47001
7 years, 5 months ago (2013-07-13 06:23:36 UTC) #21
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=12674
7 years, 5 months ago (2013-07-13 07:30:27 UTC) #22
eseidel
Going to update this after levi's change and see if I can land it to ...
7 years, 5 months ago (2013-07-13 07:57:56 UTC) #23
eseidel
Committed patchset #8 manually as r154162 (presubmit successful).
7 years, 5 months ago (2013-07-13 08:02:51 UTC) #24
eseidel
I updated the patch, built and ran the layout tests locally. Thanks again for the ...
7 years, 5 months ago (2013-07-13 08:03:15 UTC) #25
Jeffrey Yasskin
7 years, 5 months ago (2013-07-13 23:06:41 UTC) #26
Message was sent while issue was closed.
On 2013/07/13 07:57:56, eseidel wrote:
> Going to update this after levi's change and see if I can land it to unblock
> additional work on this file.

Sounds good; thanks for the commit!

Powered by Google App Engine
This is Rietveld 408576698