diff options
author | bors-servo <release+servo@mozilla.com> | 2014-02-14 20:47:01 -0500 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-02-14 20:47:01 -0500 |
commit | 425210b9b404ca769037879f9c2a01c63a0375c8 (patch) | |
tree | b6c729586d4a2f9392f203b8bac91448e7d763fd /src/components/main/layout/inline.rs | |
parent | 6b89cbf3c508a9a19469e9b95d72026fc837661c (diff) | |
parent | d3e56fa9cc479b242e8c322cc6e1bbd8e7cb1070 (diff) | |
download | servo-425210b9b404ca769037879f9c2a01c63a0375c8.tar.gz servo-425210b9b404ca769037879f9c2a01c63a0375c8.zip |
auto merge of #1644 : pcwalton/servo/style-sharing, r=larsbergstrom
This series of patches implements style struct sharing as found in existing browser engines, as well as a bunch of related important optimizations. With them, we are faster than Blink, WebKit, and Gecko on the rainbow page for style recalc in sequential mode by at least 15%. Parallel gains are mixed—the rainbow page turns out to be a degenerate sequential case for the LRU cache used to track candidates for style sharing and so there is no improvement. For cases in which the cache is not hit, such as `perf-rainbow-hard.html`, we are around 25% slower than Blink sequentially, but have very large parallel wins so that we are around 2x faster at style recalc. (Note that parallel flow tree construction will improve this further.)
This patch series also fixes, as near as I can tell, some bugs related to ordering of properties that other properties depend on in selector matching.
r? @larsbergstrom
feedback? @SimonSapin (for selector matching changes)
feedback? @bzbarsky (for style sharing heuristics)
Diffstat (limited to 'src/components/main/layout/inline.rs')
-rw-r--r-- | src/components/main/layout/inline.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs index b14c3dc6be6..ee718001f43 100644 --- a/src/components/main/layout/inline.rs +++ b/src/components/main/layout/inline.rs @@ -794,7 +794,7 @@ impl Flow for InlineFlow { // // The spec does not state which font to use. Previous versions of the code used // the parent's font; this code uses the current font. - let parent_text_top = cur_box.style().Font.font_size; + let parent_text_top = cur_box.style().Font.get().font_size; // We should calculate the distance from baseline to the bottom of the parent's // content area. But for now we assume it's zero. |