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

Issue 260713005: Use deferred style recalc for non-blocking stylesheets. (Closed)

Created:
6 years, 7 months ago by rune
Modified:
6 years, 7 months ago
Reviewers:
dglazkov, ojan
CC:
blink-reviews, dglazkov+blink, gavinp+prerender_chromium.org, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Use deferred style recalc for non-blocking stylesheets. Non-blocking stylesheets like alternate stylesheets cause a synchronous style recalc when finished loading. This is quite the opposite of what one would expect as these stylesheets should not contribute to the style at all. We use deferred style recalc to batch up the style recalcs instead. It might be possible to further improve this by not doing a style recalc at all, but that requires that we detect when a non-blocking stylesheet becomes relevant by another link element setting the preferred stylesheet set to the same name as that of an alternate stylesheet already added as non-blocking. R=dglazkov@chromium.org BUG=368659 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173012

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
A LayoutTests/fast/css/link-alternate-style-recalc.html View 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/link-alternate-style-recalc-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
rune
6 years, 7 months ago (2014-04-30 15:29:04 UTC) #1
ojan
lgtm I think nearly all our uses of RecalcStyleImmediately are wrong and are a leftover ...
6 years, 7 months ago (2014-04-30 18:27:11 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/260713005/1
6 years, 7 months ago (2014-04-30 18:28:23 UTC) #3
commit-bot: I haz the power
Change committed as 173012
6 years, 7 months ago (2014-04-30 18:36:21 UTC) #4
rune
On 2014/04/30 18:27:11, ojan wrote: > lgtm > > I think nearly all our uses ...
6 years, 7 months ago (2014-04-30 19:40:29 UTC) #5
ojan
6 years, 7 months ago (2014-04-30 19:41:25 UTC) #6
Message was sent while issue was closed.
> Yes, I think so too. I thought it would be good to understand/remove on a
> case-by-case basis, and then finally get rid of the enum.

Totally.

Powered by Google App Engine
This is Rietveld 408576698