WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
204714
Move path implementation functions in LineLayoutTraversal to *Path classes
https://bugs.webkit.org/show_bug.cgi?id=204714
Summary
Move path implementation functions in LineLayoutTraversal to *Path classes
Antti Koivisto
Reported
2019-11-30 02:56:08 PST
Simplify the design and make it easier to extend.
Attachments
patch
(36.16 KB, patch)
2019-11-30 03:06 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(36.17 KB, patch)
2019-11-30 03:36 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(36.25 KB, patch)
2019-11-30 04:10 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(36.74 KB, patch)
2019-11-30 04:44 PST
,
Antti Koivisto
sam
: review+
Details
Formatted Diff
Diff
patch
(36.74 KB, patch)
2019-11-30 07:48 PST
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2019-11-30 03:06:56 PST
Created
attachment 384536
[details]
patch
Antti Koivisto
Comment 2
2019-11-30 03:36:30 PST
Created
attachment 384537
[details]
patch
Antti Koivisto
Comment 3
2019-11-30 04:10:11 PST
Created
attachment 384538
[details]
patch
Antti Koivisto
Comment 4
2019-11-30 04:44:05 PST
Created
attachment 384541
[details]
patch
Sam Weinig
Comment 5
2019-11-30 06:49:31 PST
Comment on
attachment 384541
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=384541&action=review
> Source/WebCore/rendering/line/LineLayoutTraversalComplexPath.h:39 > + , m_sortedInlineTextBoxes(WTFMove(sortedInlineTextBoxes))
We do this all over, so maybe there is a good reason for it, but I don't think this WTFMove() is necessary. sortedInlineTextBoxes is already an rvalue, so the move constructor of m_sortedInlineTextBoxes should be used regardless.
> Source/WebCore/rendering/line/LineLayoutTraversalSimplePath.h:69 > + // FIXME: SLL can contains <br> runs and this should skip over them.
I would spell out SimpleLineLayout here instead of using SSL, took me a minute to figure out what it meant.
Antti Koivisto
Comment 6
2019-11-30 07:28:55 PST
> > Source/WebCore/rendering/line/LineLayoutTraversalComplexPath.h:39 > > + , m_sortedInlineTextBoxes(WTFMove(sortedInlineTextBoxes)) > > We do this all over, so maybe there is a good reason for it, but I don't > think this WTFMove() is necessary. sortedInlineTextBoxes is already an > rvalue, so the move constructor of m_sortedInlineTextBoxes should be used > regardless.
This compiles: struct Bar { Bar(Bar&&) = default; Bar(const Bar&) = delete; }; struct Foo { Foo(Bar&& bar) : bar(WTFMove(bar)) { } Bar bar; }; This doesn't (Call to deleted constructor of 'Bar'): struct Foo { Foo(Bar&& bar) : bar(bar) { } Bar bar; }; If you leave WTFMove out you'll accidentally invoke copy constructor, if any.
https://en.cppreference.com/w/cpp/utility/move
says: "Names of rvalue reference variables are lvalues and have to be converted to xvalues to be bound to the function overloads that accept rvalue reference parameters"
Antti Koivisto
Comment 7
2019-11-30 07:48:20 PST
Created
attachment 384543
[details]
patch
Sam Weinig
Comment 8
2019-11-30 08:22:49 PST
🤘
WebKit Commit Bot
Comment 9
2019-11-30 08:31:03 PST
Comment on
attachment 384543
[details]
patch Clearing flags on attachment: 384543 Committed
r252959
: <
https://trac.webkit.org/changeset/252959
>
WebKit Commit Bot
Comment 10
2019-11-30 08:31:05 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2019-11-30 08:32:22 PST
<
rdar://problem/57540053
>
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