Closed
Bug 1359317
Opened 9 years ago
Closed 9 years ago
(intersection-observer) Initial intersectionRect should not include css transform
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla56
People
(Reporter: tschneider, Assigned: tschneider)
References
Details
Attachments
(1 file, 4 obsolete files)
|
5.77 KB,
patch
|
mstange
:
review+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
intersectionRect should be calculated without css transform to avoid it being applied twice in nsLayoutUtils::TransformFrameRectToAncestor.
| Assignee | ||
Updated•9 years ago
|
Blocks: intersection-observer-impl
| Assignee | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
This needs a test.
| Assignee | ||
Comment 3•9 years ago
|
||
| Assignee | ||
Comment 4•9 years ago
|
||
Don't block enabling web platform tests.
Attachment #8861499 -
Attachment is obsolete: true
Attachment #8868637 -
Flags: review?(dholbert)
| Assignee | ||
Updated•9 years ago
|
Updated•9 years ago
|
Assignee: nobody → tschneider
Status: NEW → ASSIGNED
Comment 5•9 years ago
|
||
Am I correct in understanding that attachment 8853597 [details] (from bug 1332922) is a testcase for this bug? (Asking because it's helpful for me to see an example of something that's broken when reviewing a patch. It helps me understand what's broken & how the patch might help.)
Flags: needinfo?(tschneider)
| Assignee | ||
Comment 6•9 years ago
|
||
Yes, others are https://bugzilla.mozilla.org/attachment.cgi?id=8868379&action=diff#a/testing/web-platform/meta/intersection-observer/edge-inclusive-intersection.html.ini_sec1 and https://bugzilla.mozilla.org/attachment.cgi?id=8868379&action=diff#a/testing/web-platform/meta/intersection-observer/unclipped-root.html.ini_sec1.
Flags: needinfo?(tschneider)
| Assignee | ||
Comment 7•9 years ago
|
||
Rebased patch.
Attachment #8868637 -
Attachment is obsolete: true
Attachment #8868637 -
Flags: review?(dholbert)
| Assignee | ||
Comment 8•9 years ago
|
||
Uses GetContentRectRelativeToSelf to make sure the initial intersection rect doesn't include any transformation.
Attachment #8878235 -
Attachment is obsolete: true
Attachment #8878705 -
Flags: review?(mstange)
| Assignee | ||
Comment 9•9 years ago
|
||
Problem here was that GetVisualOverflowRect applied the CSS transformation, which we have to avoid since it will taken into account later in the algorithm. Also, see https://bugzilla.mozilla.org/show_bug.cgi?id=1363650#c12.
Comment 10•9 years ago
|
||
Comment on attachment 8878705 [details] [diff] [review]
Don't include CSS transform in initial intersectionRect
Review of attachment 8878705 [details] [diff] [review]:
-----------------------------------------------------------------
Are there tests about what should happen with padding / border / box-shadow?
| Assignee | ||
Comment 11•9 years ago
|
||
No, they simply test if positioning via CSS translate() is taking into account.
Comment 12•9 years ago
|
||
Then please create a testcase and compare its behavior in Chrome and Firefox to see whether padding and border should be treated as part of the frame or not, so that you know whether to call GetContentRectRelativeToSelf or GetRectRelativeToSelf.
| Assignee | ||
Comment 13•9 years ago
|
||
Confirm mustang's concern to use GetRectRelativeToSelf instead. Added test to prove.
Attachment #8878705 -
Attachment is obsolete: true
Attachment #8878705 -
Flags: review?(mstange)
Attachment #8878930 -
Flags: review?(mstange)
| Assignee | ||
Comment 14•9 years ago
|
||
Comment 15•9 years ago
|
||
Comment on attachment 8878930 [details] [diff] [review]
Don't include CSS transform in initial intersectionRect
Review of attachment 8878930 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for adding the test.
Attachment #8878930 -
Flags: review?(mstange) → review+
Comment 16•9 years ago
|
||
Pushed by tschneider@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/197b644d2d4b
(intersection-observer) Use targetFrame->GetRectRelativeToSelf() as the initial intersection rect. r=mstange
Comment 17•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
| Assignee | ||
Comment 19•9 years ago
|
||
Comment on attachment 8878930 [details] [diff] [review]
Don't include CSS transform in initial intersectionRect
[Feature/Bug causing the regression]: 1321865
[User impact if declined]: Incompatibility with Chrome.
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Yes, this fix has been in Nightly for ~3 weeks.
[Is the change risky?]: No
Attachment #8878930 -
Flags: approval-mozilla-beta?
Comment 20•9 years ago
|
||
Comment on attachment 8878930 [details] [diff] [review]
Don't include CSS transform in initial intersectionRect
Needed for the Intersection Observer API, let's uplift for beta 9.
Attachment #8878930 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 22•9 years ago
|
||
| bugherder uplift | ||
status-firefox55:
--- → fixed
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•