RESOLVED FIXED 189525
[IntersectionObserver] Implement rootMargin expansion
https://bugs.webkit.org/show_bug.cgi?id=189525
Summary [IntersectionObserver] Implement rootMargin expansion
Ali Juma
Reported 2018-09-11 14:56:08 PDT
Expand the root intersection rectangle by the observer's rootMargin.
Attachments
Patch (5.50 KB, patch)
2018-09-11 14:59 PDT, Ali Juma
no flags
Patch for landing (6.35 KB, patch)
2018-09-12 08:26 PDT, Ali Juma
no flags
Ali Juma
Comment 1 2018-09-11 14:59:37 PDT
Simon Fraser (smfr)
Comment 2 2018-09-11 15:32:33 PDT
Comment on attachment 349467 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=349467&action=review > Source/WebCore/dom/Document.cpp:7498 > + localRootBounds.move(-rootMarginFloatBox.left(), -rootMarginFloatBox.top()); > + localRootBounds.expand(rootMarginFloatBox.left() + rootMarginFloatBox.right(), rootMarginFloatBox.top() + rootMarginFloatBox.bottom()); It feels like there should be a cleaner way to do this.
Ali Juma
Comment 3 2018-09-12 08:26:36 PDT
Created attachment 349548 [details] Patch for landing
Ali Juma
Comment 4 2018-09-12 08:30:10 PDT
(In reply to Simon Fraser (smfr) from comment #2) > Comment on attachment 349467 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=349467&action=review > > > Source/WebCore/dom/Document.cpp:7498 > > + localRootBounds.move(-rootMarginFloatBox.left(), -rootMarginFloatBox.top()); > > + localRootBounds.expand(rootMarginFloatBox.left() + rootMarginFloatBox.right(), rootMarginFloatBox.top() + rootMarginFloatBox.bottom()); > > It feels like there should be a cleaner way to do this. LayoutRect::expand has an overload that takes a LayoutBoxExtent, so I added a version of FloatRect::expand that takes a FloatBoxExtent.
WebKit Commit Bot
Comment 5 2018-09-12 10:03:22 PDT
Comment on attachment 349548 [details] Patch for landing Clearing flags on attachment: 349548 Committed r235943: <https://trac.webkit.org/changeset/235943>
WebKit Commit Bot
Comment 6 2018-09-12 10:03:24 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-09-12 10:04:21 PDT
Note You need to log in before you can comment on or make changes to this bug.