Closed
Bug 1422654
Opened 7 years ago
Closed 7 years ago
stylo: Avoid restyling the element if it has bindings without stylesheets.
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla59
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
No description provided.
| Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8934035 [details]
Bug 1422654: stylo: Avoid restyling XBL-bound element if the binding doesn't have stylesheets.
https://reviewboard.mozilla.org/r/204964/#review210436
::: dom/xbl/nsXBLService.cpp:450
(Diff revision 1)
> {
> if (mHadData) {
MOZ_ASSERT(aResolveStyle) in here?
::: layout/base/ServoRestyleManager.h:247
(Diff revision 1)
> ServoStyleSet& aStyleSet);
>
> public:
> /**
> + * Whether to clear all the style data (including the element itself), or just
> + * the descendant's data.
descendants'
::: layout/base/nsCSSFrameConstructor.cpp:5904
(Diff revision 1)
> - // See the comment in the similar-looking block in
> + if (resolveStyle) {
> - // ConstructDocElementFrame to see why we always re-fetch the style
> - // context in Servo.
> - if (styleContext->IsServo()) {
> + if (styleContext->IsServo()) {
> - styleContext =
> + styleContext =
> - mPresShell->StyleSet()->AsServo()->ResolveServoStyle(aContent->AsElement());
> + mPresShell->StyleSet()->AsServo()->ResolveServoStyle(aContent->AsElement());
> - } else if (resolveStyle) {
> + } else {
> - styleContext =
> + styleContext =
> - ResolveStyleContext(styleContext->AsGecko()->GetParent(),
> + ResolveStyleContext(styleContext->AsGecko()->GetParent(),
> - aContent, &aState);
> + aContent, &aState);
> - }
> + }
> + }
I'm not quite sure why we need to do different things in the two branches. Can you explain in a comment?
Attachment #8934035 -
Flags: review?(cam) → review+
| Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Cameron McCormack (:heycam) (away until Austin) from comment #2)
> Comment on attachment 8934035 [details]
> Bug 1422654: stylo: Avoid restyling XBL-bound element if the binding doesn't
> have stylesheets.
>
> https://reviewboard.mozilla.org/r/204964/#review210436
>
> ::: dom/xbl/nsXBLService.cpp:450
> (Diff revision 1)
> > {
> > if (mHadData) {
>
> MOZ_ASSERT(aResolveStyle) in here?
>
> ::: layout/base/ServoRestyleManager.h:247
> I'm not quite sure why we need to do different things in the two branches.
> Can you explain in a comment?
The TL;DR is: No GetParent() for Servo.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/50ccf635c731
stylo: Avoid restyling XBL-bound element if the binding doesn't have stylesheets. r=heycam
Updated•7 years ago
|
Priority: -- → P2
Comment 7•7 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•7 years ago
|
status-firefox57:
--- → wontfix
status-firefox58:
--- → wontfix
You need to log in
before you can comment on or make changes to this bug.
Description
•