Summary: | [LFC] Add Rect interface to Display::Box | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bfulgham, commit-queue, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
zalan
2018-05-27 09:11:21 PDT
Created attachment 341423 [details]
Patch
Comment on attachment 341423 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=341423&action=review > Source/WebCore/layout/displaytree/DisplayBox.h:114 > + LayoutUnit top() const { return m_rect.top(); } > + LayoutUnit left() const { return m_rect.left(); } > + LayoutUnit bottom() const { return m_rect.bottom(); } > + LayoutUnit right() const { return m_rect.right(); } I guess these helpers are used a lot? box.top() is not that much more compact than box.rect().top(). (In reply to Antti Koivisto from comment #2) > Comment on attachment 341423 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=341423&action=review > > > Source/WebCore/layout/displaytree/DisplayBox.h:114 > > + LayoutUnit top() const { return m_rect.top(); } > > + LayoutUnit left() const { return m_rect.left(); } > > + LayoutUnit bottom() const { return m_rect.bottom(); } > > + LayoutUnit right() const { return m_rect.right(); } > > I guess these helpers are used a lot? box.top() is not that much more > compact than box.rect().top(). They are (or will be) used a lot and from layout logic correctness's point of view displayBox.rect().top() is rather different from displayBox.top() where rect().top() assumes a computed rect() (including width() and height()) even if you only access its top value. Comment on attachment 341423 [details] Patch Clearing flags on attachment: 341423 Committed r232250: <https://trac.webkit.org/changeset/232250> All reviewed patches have been landed. Closing bug. |