Closed
Bug 1359303
Opened 8 years ago
Closed 7 years ago
stylo: should not skip parent display-based style fixups for NAC that is not a NAC root
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: heycam, Assigned: chenpighead)
References
Details
Attachments
(2 files)
From bug 1344914 comment 5, bz points out that Servo is currently skipping parent display-based style fixups for all NAC, whereas we probably only want to do this for NAC roots (and after bug 1358968, anonymous boxes marked as skipping this fixup).
Updated•8 years ago
|
Priority: -- → P2
Updated•8 years ago
|
Priority: P2 → --
Reporter | ||
Updated•8 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•7 years ago
|
||
I'll investigate this.
Assignee: nobody → jeremychen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•7 years ago
|
||
Before I dig deeper into the implementation, I'd like to know if there's a good way to verify if this has already been resolved or not.
Hi Boris, any idea about making an automatic/manual test to do the verification? I can't find one in our repo, I guess it is a bit tricky to test the NAC. The worst case might be writing some C++ codes to generate multi-level NACs and print some logs to verify....
Flags: needinfo?(bzbarsky)
Comment 3•7 years ago
|
||
This is not fixed, per:
#[inline]
fn skip_root_and_item_based_display_fixup(&self) -> bool {
// We don't want to fix up display values of native anonymous content.
// Additionally, we want to skip root-based display fixup for document
// level native anonymous content subtree roots, since they're not
// really roots from the style fixup perspective. Checking that we
// are NAC handles both cases.
self.is_native_anonymous()
}
Changing that line should be enough, I think.
Comment 4•7 years ago
|
||
That being said, NAC are under our control, so I'm not sure if we really need to fix this proper. Seems like an easy fix of course, but... :-)
Comment 5•7 years ago
|
||
Yeah, looking at this again I think it's probably not worth spending too much time on right now.
IIUC we should change the code in comment 3 to check:
self.is_native_anonymous() && (self.is_root_of_native_anonymous_subtree() || self.get_implement_pseudo_element().is_some())
So let's just write that patch (get review from bz or heycam), and not worry about testing it.
Flags: needinfo?(bzbarsky)
Updated•7 years ago
|
Priority: P2 → P3
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8902507 -
Flags: review?(cam)
Assignee | ||
Comment 7•7 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #3)
> This is not fixed, per:
>
> #[inline]
> fn skip_root_and_item_based_display_fixup(&self) -> bool {
> // We don't want to fix up display values of native anonymous
> content.
> // Additionally, we want to skip root-based display fixup for
> document
> // level native anonymous content subtree roots, since they're not
> // really roots from the style fixup perspective. Checking that we
> // are NAC handles both cases.
> self.is_native_anonymous()
> }
>
> Changing that line should be enough, I think.
Yes, that's the place I thought I should fix. Just don't know how to test the patch though...
(In reply to Bobby Holley (:bholley) (busy with Stylo) from comment #5)
> Yeah, looking at this again I think it's probably not worth spending too
> much time on right now.
>
> IIUC we should change the code in comment 3 to check:
>
> self.is_native_anonymous() && (self.is_root_of_native_anonymous_subtree() ||
> self.get_implement_pseudo_element().is_some())
>
> So let's just write that patch (get review from bz or heycam), and not worry
> about testing it.
Ok, then I'll just fix it and move on to other bugs.
Emilio and Bobby, thanks for the help. :)
![]() |
||
Comment 8•7 years ago
|
||
I wonder whether this bug would manifest with things in a <foreignObject> used via <use> that need display-based fixup... That's where I'd start trying to write a testcase, at least.
Reporter | ||
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8902507 [details]
Bug 1359303 - stylo: do not skip parent display-based style fixups for NAC that is not a NAC root.
https://reviewboard.mozilla.org/r/174082/#review179392
Attachment #8902507 -
Flags: review?(cam) → review+
Assignee | ||
Comment 10•7 years ago
|
||
Assignee | ||
Comment 11•7 years ago
|
||
(In reply to Boris Zbarsky [:bz] (still digging out from vacation mail) from comment #8)
> I wonder whether this bug would manifest with things in a <foreignObject>
> used via <use> that need display-based fixup... That's where I'd start
> trying to write a testcase, at least.
Thanks for the pointer. I'll try this today.
But if I can't easily make one, maybe we could leave the test as a followup bug.
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Jeremy Chen [:jeremychen] UTC+8 from comment #10)
> Created attachment 8903005 [details] [review]
> Servo PR, #18319
https://hg.mozilla.org/integration/autoland/rev/556f8f9a72c4
(In reply to Jeremy Chen [:jeremychen] UTC+8 from comment #11)
> Thanks for the pointer. I'll try this today.
> But if I can't easily make one, maybe we could leave the test as a followup
> bug.
I haven't managed to make one at the moment, so I'll resolve this bug once the patch is merged to m-c.
Assignee | ||
Comment 13•7 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
![]() |
||
Comment 14•7 years ago
|
||
OK. I just tried a testcase using <use> and it seems to work, so maybe use-cloned nodes are not marked native anonymous or something...
![]() |
||
Updated•7 years ago
|
status-firefox57:
--- → fixed
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•