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

Issue 1292143003: Don't resume commits after every layout. (Closed)

Created:
5 years, 4 months ago by esprehn
Modified:
5 years, 4 months ago
Reviewers:
enne (OOO), dglazkov, trchen, bryauade, ojan
CC:
blink-reviews
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Don't resume commits after every layout. We were resuming tree commits after any layout on the main frame even if rendering was not ready and we had pending sheets or imports. This means causing layout through tasks or API calls (ex. offsetTOp) would start pumping BeginMainFrames and running the pipeline for no reason. FOUC is avoided in these cases by the system inside blink that uses placeholder styles which makes content display: none for updateLayout calls. Still we may compute the style because of an updateLayoutIgnorePendingStylesheets() call (ex. offsetTop) and in that case FOUC is avoided because of the painting code which paints white until sheets have loaded. This patch removes the call to resumeTreeViewCommits in layoutUpdated, since we'll already resume when all sheets load or if the body is inserted and there's no pending sheets. It then adds a new client callback for when the document finishes parsing so that we resume commits for SVG documents which will never have a body and may not have any sheets. I can't figure out how to write a test for this though since layout tests artificially pump frames and paint. This eager code for resuming commits dates back to: https://chromium.googlesource.com/chromium/blink/+/c7e01da17b036b054fc0acf2d86483f4cdcf5cc0 BUG=504126 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200515

Patch Set 1 #

Patch Set 2 : Always resume commits after the main document has finished parsing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -4 lines) Patch
M Source/web/FrameLoaderClientImpl.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/WebViewImpl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 22 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292143003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292143003/1
5 years, 4 months ago (2015-08-13 18:51:23 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-13 20:55:18 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292143003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292143003/20001
5 years, 4 months ago (2015-08-13 21:29:29 UTC) #7
esprehn
5 years, 4 months ago (2015-08-13 21:42:42 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-13 22:38:56 UTC) #12
esprehn
Ping. This should be a great improvement. :)
5 years, 4 months ago (2015-08-14 01:30:26 UTC) #13
dglazkov
lgtm
5 years, 4 months ago (2015-08-14 02:56:13 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292143003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292143003/20001
5 years, 4 months ago (2015-08-14 03:02:59 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1292143003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1292143003/20001
5 years, 4 months ago (2015-08-14 03:06:02 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=200515
5 years, 4 months ago (2015-08-14 03:09:02 UTC) #20
pdr.
On 2015/08/14 at 03:09:02, commit-bot wrote: > Committed patchset #2 (id:20001) as https://src.chromium.org/viewvc/blink?view=rev&revision=200515 Is it ...
5 years, 4 months ago (2015-08-15 01:04:07 UTC) #21
esprehn
5 years, 4 months ago (2015-08-15 01:05:14 UTC) #22
Message was sent while issue was closed.
On 2015/08/15 at 01:04:07, pdr wrote:
> On 2015/08/14 at 03:09:02, commit-bot wrote:
> > Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200515
> 
> Is it possible to test this so we don't regress again?

Probably with a unit test? I need to figure out how to control the return speed
of network resources inside a unit test. Any ideas?

Powered by Google App Engine
This is Rietveld 408576698