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

Issue 570713002: Avoid calculating style for ::before/::after without content. (Closed)

Created:
6 years, 3 months ago by rune
Modified:
6 years, 3 months ago
Reviewers:
esprehn, eseidel
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, rwlbuis, rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Avoid calculating style for ::before/::after without content. A universal ::before or ::after rule without content triggers calculation of pseudo style for most elements on theverge.com just to find that most of them won't be rendered due to the missing content. Check if matching ::before or ::after rules actually contain a content value before marking the render style with setHasPseudoStyle. This change reduces the style recalc time by ~50% when expanding the comments section on theverge.com articles. R=esprehn@chromium.org,eseidel@chromium.org BUG=412558 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182308

Patch Set 1 #

Patch Set 2 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -2 lines) Patch
A LayoutTests/fast/css-generated-content/before-after-no-content.html View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/css-generated-content/before-after-no-content-expected.html View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/css/ElementRuleCollector.cpp View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (1 generated)
rune
6 years, 3 months ago (2014-09-12 21:52:52 UTC) #1
rune
The regression most likely due to https://code.google.com/p/chromium/issues/detail?id=414088
6 years, 3 months ago (2014-09-14 09:55:30 UTC) #2
esprehn
I think you're making us hit this branch: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/dom/Element.cpp&q=%22::computedStyle%22&sq=package:chromium&type=cs&l=2406 and you've made us not cache ...
6 years, 3 months ago (2014-09-14 19:36:13 UTC) #3
rune
On 2014/09/14 at 19:36:13, esprehn wrote: > I think you're making us hit this branch: ...
6 years, 3 months ago (2014-09-15 09:23:54 UTC) #4
esprehn
I don't think we can have this regression, this was a bug that was filed ...
6 years, 3 months ago (2014-09-15 14:33:37 UTC) #5
rune
On 2014/09/15 at 14:33:37, esprehn wrote: > I don't think we can have this regression, ...
6 years, 3 months ago (2014-09-15 15:09:40 UTC) #6
rune
On 2014/09/15 at 15:09:40, rune wrote: > On 2014/09/15 at 14:33:37, esprehn wrote: > > ...
6 years, 3 months ago (2014-09-15 21:12:35 UTC) #7
rune
On 2014/09/15 at 21:12:35, rune wrote: > On 2014/09/15 at 15:09:40, rune wrote: > > ...
6 years, 3 months ago (2014-09-18 07:46:08 UTC) #8
esprehn
lgtm, you rock: http://i.imgur.com/fg20Dvo.gif
6 years, 3 months ago (2014-09-19 04:00:36 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/570713002/20001
6 years, 3 months ago (2014-09-19 07:43:50 UTC) #11
rune
On 2014/09/19 04:00:36, esprehn wrote: > lgtm, you rock: > > http://i.imgur.com/fg20Dvo.gif I think I ...
6 years, 3 months ago (2014-09-19 07:43:56 UTC) #12
commit-bot: I haz the power
6 years, 3 months ago (2014-09-19 08:47:54 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 182308

Powered by Google App Engine
This is Rietveld 408576698