Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Issue 2739683006: Use Opportunity Iterator to position text fragments in NGLineBuilder (Closed)

Created:
3 years, 9 months ago by Gleb Lanbin
Modified:
3 years, 9 months ago
Reviewers:
ikilpatrick, kojii
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, dgrogan+ng_chromium.org, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use Opportunity Iterator to position text fragments in NGLineBuilder This patch introduces NGLayoutOpportunityIterator to NGLineBuilder so it can use it to search the next available opportunity to position text fragments. With this patch NGLayout starts supporting a base text floating around floats that are positioned before an inline fragment. Example: <div id="container"> <div id="left-float1"></div> <div id="left-float2"></div> <div id="right-float"></div> The quick brown fox jumps over the lazy dog </div> BUG=635619 TEST=NGTextLayoutAlgorithmTest::TextFloatsAroundFloatsBefore Review-Url: https://codereview.chromium.org/2739683006 Cr-Commit-Position: refs/heads/master@{#456278} Committed: https://chromium.googlesource.com/chromium/src/+/207688fb45319568db61e59c4c8391517793bf47

Patch Set 1 #

Total comments: 15

Patch Set 2 : fix comments #

Patch Set 3 : add line_box_data.inline_size to logical_offset #

Patch Set 4 : add font-family #

Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -54 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h View 1 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc View 1 chunk +40 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 4 chunks +3 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h View 3 chunks +9 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc View 1 2 chunks +5 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_line_builder.h View 1 4 chunks +9 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc View 1 2 10 chunks +23 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm.cc View 1 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_text_layout_algorithm_test.cc View 1 2 3 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (18 generated)
Gleb Lanbin
3 years, 9 months ago (2017-03-08 20:56:14 UTC) #2
kojii
This looks great, thank you so much for working on this. Only for NGLineBuilder and ...
3 years, 9 months ago (2017-03-09 03:01:54 UTC) #3
ikilpatrick
https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc File third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc (right): https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc#newcode60 third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc:60: return std::tie(other.inline_offset, other.block_offset) != just "return !operator==(other);" ? https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h ...
3 years, 9 months ago (2017-03-09 22:00:51 UTC) #4
Gleb Lanbin
PTAL https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc File third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc (right): https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc#newcode60 third_party/WebKit/Source/core/layout/ng/geometry/ng_logical_offset.cc:60: return std::tie(other.inline_offset, other.block_offset) != On 2017/03/09 22:00:51, ikilpatrick ...
3 years, 9 months ago (2017-03-09 22:26:45 UTC) #6
kojii
lgtm for my part, but please check Ian. https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc (right): https://codereview.chromium.org/2739683006/diff/1/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc#newcode245 third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc:245: top); ...
3 years, 9 months ago (2017-03-10 03:12:43 UTC) #7
ikilpatrick
lgtm, thanks!
3 years, 9 months ago (2017-03-10 17:20:17 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2739683006/80001
3 years, 9 months ago (2017-03-11 02:41:51 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:80001) as https://chromium.googlesource.com/chromium/src/+/207688fb45319568db61e59c4c8391517793bf47
3 years, 9 months ago (2017-03-11 04:16:01 UTC) #26
yoichio
A revert of this CL (patchset #4 id:80001) has been created in https://codereview.chromium.org/2746823003/ by yoichio@chromium.org. ...
3 years, 9 months ago (2017-03-13 08:09:08 UTC) #27
kimberly.james628
3 years, 9 months ago (2017-03-13 13:25:24 UTC) #28
Message was sent while issue was closed.
On 2017/03/13 08:09:08, yoichio wrote:
> A revert of this CL (patchset #4 id:80001) has been created in
> https://codereview.chromium.org/2746823003/ by mailto:yoichio@chromium.org.
> 
> The reason for reverting is: Test failures on bot:
> NGTextLayoutAlgorithmTest.TextFloatsAroundFloatsBefore
> 
>
https://uberchromegw.corp.google.com/i/chromium.webkit/builders/WebKit%20Andr....

Stupid

Powered by Google App Engine
This is Rietveld 408576698