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

Issue 2913773002: [WIP][b:eae_mywip_paint] Paint Selection NG.

Created:
3 years, 6 months ago by yoichio
Modified:
3 years, 5 months ago
Reviewers:
kojii, yosin_UTC9, eae, Xiaocheng
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, lchoi+reviews_chromium.org, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Paint Selection NG. Design doc: https://goo.gl/xzbb6E This patch depends on Emil's inline painter patch: https://codereview.chromium.org/2842983002 and Xiaochengs's offset mapping: https://codereview.chromium.org/2943573002/ LayoutSelection::SelectionStartEnd() - It returns NG Offset if needs. NGTextFragmentPainter.cpp: SelectionStartEnd() returns offsets of NGInlineNodeData.text_content_ to be painted as selection. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 : Basic #

Patch Set 2 : + WhiteSpaceCollapsing #

Patch Set 3 : update #

Patch Set 4 : rebase #

Patch Set 5 : update #

Patch Set 6 : update #

Patch Set 7 : update #

Total comments: 23

Patch Set 8 : tmp #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -3 lines) Patch
M third_party/WebKit/Source/core/editing/LayoutSelection.h View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/editing/LayoutSelection.cpp View 1 2 3 4 5 6 7 3 chunks +95 lines, -1 line 4 comments Download
M third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp View 1 2 3 4 5 6 7 3 chunks +41 lines, -2 lines 3 comments Download

Messages

Total messages: 38 (25 generated)
yoichio
3 years, 6 months ago (2017-06-15 09:22:57 UTC) #20
yosin_UTC9
https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right): https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp#newcode358 third_party/WebKit/Source/core/editing/LayoutSelection.cpp:358: const Position& start = selection_in_dom.ComputeStartPosition(); Why don't you use ...
3 years, 6 months ago (2017-06-15 09:39:02 UTC) #21
yosin_UTC9
https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right): https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp#newcode350 third_party/WebKit/Source/core/editing/LayoutSelection.cpp:350: static SelectionPaintRange* CalcSelectionNG( If this function traverse flat tree ...
3 years, 6 months ago (2017-06-15 09:51:27 UTC) #22
yosin_UTC9
https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right): https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp#newcode297 third_party/WebKit/Source/core/editing/LayoutSelection.cpp:297: return offset; // Legay. Return DOM offset; nit: s/Legay/Legacy/ ...
3 years, 6 months ago (2017-06-16 02:04:20 UTC) #23
Xiaocheng
It seems memory inefficient to store the mapping value for every offset... I'll upload another ...
3 years, 6 months ago (2017-06-16 02:59:03 UTC) #24
kojii
https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right): https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp#newcode285 third_party/WebKit/Source/core/editing/LayoutSelection.cpp:285: runner = runner->ContainingBlock()) { why ContainingBlock(), not Parent()? https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/editing/LayoutSelection.cpp#newcode558 ...
3 years, 6 months ago (2017-06-16 11:25:58 UTC) #25
yoichio
Because it seems to me that NGTextPainter fails to paint partially and we don't have ...
3 years, 6 months ago (2017-06-21 08:16:43 UTC) #31
yoichio
FYI, I removed unrelated code.
3 years, 6 months ago (2017-06-21 08:17:15 UTC) #32
kojii
https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp File third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp (right): https://codereview.chromium.org/2913773002/diff/120001/third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp#newcode88 third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp:88: const std::pair<int, int> startend_in_ngblockflow = On 2017/06/21 at 08:16:43, ...
3 years, 6 months ago (2017-06-21 10:10:09 UTC) #33
kojii
In general, more comments are appreciated. Hard to know what functions are doing, or what ...
3 years, 6 months ago (2017-06-21 18:15:37 UTC) #34
yoichio
On 2017/06/21 18:15:37, kojii wrote: > In general, more comments are appreciated. Hard to know ...
3 years, 6 months ago (2017-06-22 09:28:47 UTC) #35
kojii
Would you mind setting up an offline doc/CL review mtg?
3 years, 6 months ago (2017-06-22 09:33:31 UTC) #37
yoichio
3 years, 5 months ago (2017-06-27 07:54:53 UTC) #38
Update mtg memo.

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right):

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/LayoutSelection.cpp:355: static
SelectionPaintRange CalcSelectionNG(
Its strange that we have 3 code pass for legacy, ng-ng, ng-legacy.
We should unify them to legacy and ng.

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/LayoutSelection.cpp:376: if
(runner->IsText() && runner->GetNode()->IsTextNode()) {
LayoutText will gone.

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/LayoutSelection.cpp:385: }
br is  LayouObject.isText().

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/editing/LayoutSelection.h (right):

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/LayoutSelection.h:81: int EndOffset()
const;
Having LayoutNGBlockFlow, textcontent offset and item_index.
Having item_index to get InlineItem and its Layoutobject in O(1).

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp (right):

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp:79: static
std::pair<int, int> SelectionStartEnd(
Much comment is appreciate

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp:86: return {0,
text_fragment->Text().length()};
Rerturn painting full;
define lewngth;

https://codereview.chromium.org/2913773002/diff/200001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/paint/NGTextFragmentPainter.cpp:93:
.LayoutSelectionStartEnd();
Describe much more.

Powered by Google App Engine
This is Rietveld 408576698