WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
188148
[LFC][Floating] Add basic left/right floating positioning.
https://bugs.webkit.org/show_bug.cgi?id=188148
Summary
[LFC][Floating] Add basic left/right floating positioning.
zalan
Reported
2018-07-29 11:30:00 PDT
ssia
Attachments
Patch
(23.91 KB, patch)
2018-07-29 11:59 PDT
,
zalan
koivisto
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2018-07-29 11:59:30 PDT
Created
attachment 346035
[details]
Patch
Antti Koivisto
Comment 2
2018-07-31 06:12:04 PDT
Comment on
attachment 346035
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=346035&action=review
> Source/WebCore/layout/FloatingContext.cpp:92 > +class Iterator { > +public: > + Iterator(const LayoutContext&, const FloatingState&); > + > + void set(LayoutUnit verticalPosition); > + const FloatingPair& current() const { return m_current; } > + LayoutUnit verticalPosition() const { return m_verticalPosition; } > + Iterator& operator++(); > + > +private: > + const LayoutContext& m_layoutContext; > + const FloatingState& m_floatingState; > + FloatingPair m_current; > + LayoutUnit m_verticalPosition; > +};
It would be slightly nicer to give this the full iterator interface (basically add operator== and operator*) so it can be used in range-for loops etc.
> Source/WebCore/layout/FloatingContext.cpp:94 > + > +
Extra empty line.
> Source/WebCore/layout/FloatingContext.cpp:121 > + Iterator iterator(layoutContext(), m_floatingState); > + // Start with the inner-most floating pair for the initial vertical position. > + iterator.set(initialVerticalPosition);
These could be factored to a begin() style function that returns the iterator.
zalan
Comment 3
2018-07-31 08:02:26 PDT
Committed
r234423
: <
https://trac.webkit.org/changeset/234423
>
Radar WebKit Bug Importer
Comment 4
2018-07-31 08:03:26 PDT
<
rdar://problem/42772230
>
zalan
Comment 5
2018-07-31 08:05:02 PDT
(In reply to Antti Koivisto from
comment #2
)
> Comment on
attachment 346035
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=346035&action=review
> > > Source/WebCore/layout/FloatingContext.cpp:92 > > +class Iterator { > > +public: > > + Iterator(const LayoutContext&, const FloatingState&); > > + > > + void set(LayoutUnit verticalPosition); > > + const FloatingPair& current() const { return m_current; } > > + LayoutUnit verticalPosition() const { return m_verticalPosition; } > > + Iterator& operator++(); > > + > > +private: > > + const LayoutContext& m_layoutContext; > > + const FloatingState& m_floatingState; > > + FloatingPair m_current; > > + LayoutUnit m_verticalPosition; > > +}; > > It would be slightly nicer to give this the full iterator interface > (basically add operator== and operator*) so it can be used in range-for > loops etc. > > > Source/WebCore/layout/FloatingContext.cpp:94 > > + > > + > > Extra empty line. > > > Source/WebCore/layout/FloatingContext.cpp:121 > > + Iterator iterator(layoutContext(), m_floatingState); > > + // Start with the inner-most floating pair for the initial vertical position. > > + iterator.set(initialVerticalPosition); > > These could be factored to a begin() style function that returns the > iterator.
Good point. This might get a bit more involved when the iterator gets persistent (to take advantage of the fact that (most of the time)we can just resume it as new floatings are coming in..but for now the simple iterator interface works.
Radar WebKit Bug Importer
Comment 6
2018-07-31 08:05:22 PDT
<
rdar://problem/42772336
>
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