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

Issue 85693009: Get rid of Reset and ResetStyleResolverAndFontSelector. (Closed)

Created:
7 years ago by ojan
Modified:
7 years ago
Reviewers:
esprehn, tasak, eseidel
CC:
blink-reviews, eae+blinkwatch, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears, adamk
Visibility:
Public.

Description

Get rid of Reset and ResetStyleResolverAndFontSelector. Now that we store RuleSets on StyleSheetContents, recreating the StyleResolver is much cheaper. By getting rid of the Reset codepaths we can simplify a lot of code and get rid of a lot of duplication. Also, this is generally less error prone since we don't have to worry about some random subset of StyleResolver's member variables not getting updated properly. If we find recreating the StyleResolver on profiles, we should look into moving the more expensive bits to better locations (e.g. maybe fontSelector shouldn't live on StyleResolver).

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -202 lines) Patch
M LayoutTests/fast/css/add-remove-stylesheets-minimal-recalc-style.html View 1 chunk +2 lines, -1 line 1 comment Download
M LayoutTests/fast/css/add-remove-stylesheets-minimal-recalc-style-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 2 chunks +0 lines, -4 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 3 chunks +0 lines, -44 lines 0 comments Download
M Source/core/dom/DocumentStyleSheetCollection.h View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/dom/DocumentStyleSheetCollection.cpp View 2 chunks +12 lines, -43 lines 0 comments Download
M Source/core/dom/ShadowTreeStyleSheetCollection.h View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/dom/ShadowTreeStyleSheetCollection.cpp View 1 chunk +0 lines, -32 lines 0 comments Download
M Source/core/dom/StyleEngine.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/dom/StyleSheetCollection.h View 4 chunks +5 lines, -4 lines 0 comments Download
M Source/core/dom/StyleSheetCollection.cpp View 5 chunks +29 lines, -59 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ojan
https://codereview.chromium.org/85693009/diff/1/LayoutTests/fast/css/add-remove-stylesheets-minimal-recalc-style.html File LayoutTests/fast/css/add-remove-stylesheets-minimal-recalc-style.html (right): https://codereview.chromium.org/85693009/diff/1/LayoutTests/fast/css/add-remove-stylesheets-minimal-recalc-style.html#newcode60 LayoutTests/fast/css/add-remove-stylesheets-minimal-recalc-style.html:60: // Recalc 3 elements + documentElement. Don't really understand ...
7 years ago (2013-11-26 01:54:50 UTC) #1
tasak
lgtm.
7 years ago (2013-11-26 04:19:52 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ojan@chromium.org/85693009/1
7 years ago (2013-11-26 17:07:28 UTC) #3
ojan
Since the RuleSet on StyleSheetContents patch got reverted, I'm going to wait until it relands ...
7 years ago (2013-11-28 00:41:13 UTC) #4
ojan
7 years ago (2013-12-03 20:36:09 UTC) #5
It looks like resetting the fontSelector is expensive still. So, until we
divorce fontSelector from StyleResolver and make it so that the Reconstruct
codepath doesn't reset the font selector, this patch will be a regression. See
https://code.google.com/p/chromium/issues/detail?id=324909 for an example.

Powered by Google App Engine
This is Rietveld 408576698