DescriptionMove inline stylesheet cache decision making from StyleSheetContents to StyleEngine
This separates the decisions about caching StyleSheetContents for <style> elements
from those related to <link> elements. This makes the code clearer as there are
fewer conditions that could cause uncacheability (for example, the StyleSheetContents
for <style> elements could never be for an @import rule).
And since the <style> cache is per-StyleEngine (and thus per-Document), the
<style> case can now safely cache stylesheets that include @media rules.
This speeds up the included performance test from ~90ms on my Z620 to ~50ms,
and improves the biggest block of chromestatus.com load performance by ~20%.
This patch also cleans up StyleSheetContents a bit, collapsing the maybeCacheable()
method into isCacheable() and making appropriate accessors const.
BUG=342507
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169610
Patch Set 1 #
Total comments: 2
Patch Set 2 : Renamed to isCachableForStyleElment #Patch Set 3 : Merged to trunk #
Messages
Total messages: 18 (0 generated)
|