Summary: | [IntersectionObserver] Implement rootMargin expansion | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ali Juma <ajuma> | ||||||
Component: | Layout and Rendering | Assignee: | Ali Juma <ajuma> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bfulgham, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, simon.fraser, webkit-bug-importer, zalan | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Local Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 159475 | ||||||||
Attachments: |
|
Description
Ali Juma
2018-09-11 14:56:08 PDT
Created attachment 349467 [details]
Patch
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. Created attachment 349548 [details]
Patch for landing
(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. Comment on attachment 349548 [details] Patch for landing Clearing flags on attachment: 349548 Committed r235943: <https://trac.webkit.org/changeset/235943> All reviewed patches have been landed. Closing bug. |