Closed
Bug 569006
Opened 15 years ago
Closed 15 years ago
Fast-path checks for :before/:after if we're not reresolving style on kids
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
mozilla2.0b1
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
|
4.58 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
With the fix for bug 494117, he before/after probing becomes a bigger bottleneck in reresolve (esp. on pages that actually use them and have lots of rules around).
| Assignee | ||
Comment 1•15 years ago
|
||
Attachment #448160 -
Flags: review?(dbaron)
Comment on attachment 448160 [details] [diff] [review]
Like so
>+ // If changes to the "content" property ever stop triggering framechanges,
>+ // the optimization that skips ::before/::after probing in
>+ // ReResolveStyleContext will need to be adjusted for cases when we dropped
>+ // the pseudo due to empty content.
I don't think I understand this comment. Could you make it clearer?
Also, maybe put a blank line after it since it's related to the whole function and not just the code right below it.
Attachment #448160 -
Flags: review?(dbaron) → review+
| Assignee | ||
Comment 3•15 years ago
|
||
> I don't think I understand this comment. Could you make it clearer?
How is this:
// In ReResolveStyleContext we assume that if there's no existing ::before
// or ::after and we don't have to restyle children of the node then we
// can't end up with a ::before or ::after due to the restyle of the node
// itself. That's not quite true, but the only exception to the above is
// when the "content" property of the node changes. Since the code here
// triggers a frame change on the node in that case, the optimization in
// ReResolveStyleContext is ok. But if we ever change this code to not
// reconstruct frames on changes to the "content" property, then we will
// need to revisit the optimization in ReResolveStyleContext.
> Also, maybe put a blank line after it
Done.
Yeah, I understand the comment now.
But maybe you mean to say when the 'content' property of the *pseudo-element* changes, we reframe the element. Also, CSS properties generally have 'quotes' rather than "quotes".
| Assignee | ||
Comment 5•15 years ago
|
||
No, I meant what I said. If the 'content' property of the pseudo-element changes directly, that means that the selectors matching that pseudo-element have changed, and we will have the "restyle your kids" bit set in ReResolveStyleContext. The case that depends on the reframe behavior of 'content' is something like this:
div { content: "foo"; }
div::before { content: inherit; }
where things will work out because the _div_ gets reframed. Perhaps I should say:
That's not quite true, but the only exception to the above is
when the "content" property of the node changes and the pseudo-element
inherits the changed value.
or so?
> Also, CSS properties generally have 'quotes' rather than "quotes".
Will do.
ok, sounds good.
| Assignee | ||
Comment 7•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
| Assignee | ||
Updated•15 years ago
|
Target Milestone: --- → mozilla1.9.3a6
You need to log in
before you can comment on or make changes to this bug.
Description
•