WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
186019
[LFC] Add Rect interface to Display::Box
https://bugs.webkit.org/show_bug.cgi?id=186019
Summary
[LFC] Add Rect interface to Display::Box
alan
Reported
2018-05-27 09:11:21 PDT
so that we do contentBox().left() without having a fully computed contentBox() -also it makes more sense to use top/left/bottom/right in the context of layout.
Attachments
Patch
(18.97 KB, patch)
2018-05-27 09:21 PDT
,
alan
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
alan
Comment 1
2018-05-27 09:21:27 PDT
Created
attachment 341423
[details]
Patch
Antti Koivisto
Comment 2
2018-05-28 10:06:36 PDT
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().
alan
Comment 3
2018-05-28 13:12:27 PDT
(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.
WebKit Commit Bot
Comment 4
2018-05-28 13:39:20 PDT
Comment on
attachment 341423
[details]
Patch Clearing flags on attachment: 341423 Committed
r232250
: <
https://trac.webkit.org/changeset/232250
>
WebKit Commit Bot
Comment 5
2018-05-28 13:39:21 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2018-05-28 13:40:15 PDT
<
rdar://problem/40601769
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug