Closed Bug 1371976 Opened 2 years ago Closed 2 years ago

stylo: Need to implement sane comparisons between old and new counter styles

Categories

(Core :: CSS Parsing and Computation, enhancement, P1)

53 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: bzbarsky, Assigned: xidorn)

References

Details

Attachments

(1 file)

Right now we always detect a difference for styles other than "none", because the equality comparison between resolved and unresolved counter styles always says "not equal", the old struct always has a resolved style, and the new struct always has an unresolved one.

See bug 1371955 comment 4 and bug 1371955 comment 5.  As Cameron says, we should be able to do a readonly lookup for the case when we know we want to compare to an already-resolved style.  If the lookup returns nothing, we're not equal.
See my comment in bug 1371955 comment 11, basically I don't think we want to do comparison between resolve and unresolved counter styles.
OK, let's retitle to the real problem we want to solve.
Summary: stylo: Need to implement sane comparisons between resolved and unresolved counter styles in nsStyleList::CalcDifference → stylo: Need to implement sane comparisons between old and new counter styles
I can take this. I actually pretty much like my idea that we do the hashtable lookup during parallel traversal and only leave counter style unresolved when lookup doesn't find any existing item.
Assignee: nobody → xidorn+moz
(ni? myself in case I forgot.)
Flags: needinfo?(xidorn+moz)
Depends on: 1372488
Depends on: 1372549
IIUC, this is causing spurious reflows after restyles, which can significantly hurt perf. P1.
Priority: -- → P1
This would work only with both bug 1372488 and bug 1372549 fixed, otherwise there could still be unnecessary reflows.
Flags: needinfo?(xidorn+moz)
Comment on attachment 8877429 [details]
Bug 1371976 - Resolve counter style during parallel traversal when possible.

https://reviewboard.mozilla.org/r/148844/#review153336
Attachment #8877429 - Flags: review?(cam) → review+
Pushed by xquan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eec8e0b192a8
Resolve counter style during parallel traversal when possible. r=heycam
https://hg.mozilla.org/mozilla-central/rev/eec8e0b192a8
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.