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

Issue 846703003: Use a dirty bit in StyleSheetCollection::updateActiveStyleSheets. (Closed)

Created:
5 years, 11 months ago by esprehn
Modified:
5 years, 11 months ago
Reviewers:
ojan
CC:
ojan, abarth-chromium, mojo-reviews_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Use a dirty bit in StyleSheetCollection::updateActiveStyleSheets. The loop in StyleEngine::updateActiveStyleSheets calls this for every scope whenever any stylesheet is added or removed from the document, ex. appending a new SkyElement with a <style> in it. The method was crawling the scope and looking for all sheets and then marking the element as needing a SubtreeStyleRecalc, instead keep a dirty bit to avoid doing a full document recalc all the time. I made this slow previously when I removed all the dirty tree scope tracking logic and made us go down the reconstruct path in the resolver update all the time. We now keep a dirty bit and only do this work when the sheets for a scope have changed. R=ojan@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/1a2736821a99a68d65a9508d938a4967fe49ef40

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -0 lines) Patch
M sky/engine/core/dom/StyleSheetCollection.h View 1 chunk +2 lines, -0 lines 0 comments Download
M sky/engine/core/dom/StyleSheetCollection.cpp View 4 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
esprehn
5 years, 11 months ago (2015-01-10 04:25:57 UTC) #2
ojan
lgtm
5 years, 11 months ago (2015-01-10 04:32:49 UTC) #3
esprehn
5 years, 11 months ago (2015-01-10 04:33:34 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
1a2736821a99a68d65a9508d938a4967fe49ef40 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698