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

Issue 313233002: Adding backgroundColor to WebCompositionUnderline and using it for InlineTextBox drawing. (Closed)

Created:
6 years, 6 months ago by huangs
Modified:
6 years, 6 months ago
CC:
blink-reviews, jamesr, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, abarth-chromium, dglazkov+blink, jchaffraix+rendering, pdr., rune+blink, guohui, bcwhite
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Adding backgroundColor to WebCompositionUnderline and using it for InlineTextBox drawing. This CL enables custom background color to be specified for IME composition. Its Chrome counterpart is: https://codereview.chromium.org/313053007 . Details: - Adding backgroundColor to the following: WebCore::CompositionUnderline blink::WebCompositionUnderline for backward compabitility, we keep an old constructor, which will be deleted in another refactoring CL. Updated some tests to use the new constructor. - Refactored (now) repetative code to loop over WebCompositionUnderline that intersect with a range by adding class CompositionUnderlineVisitor. - Perhaps WebCompositionUnderline should be renamed to WebCompositionSpan, but this refactoring task can be done in a separate CL. We will need to split this CL when we commit. BUG=135900 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176387

Patch Set 1 : #

Total comments: 8

Patch Set 2 : Cleanup; renaming CompositionUnderlineVisitor to ...Iterator. #

Total comments: 4

Patch Set 3 : Renaming to CompositionUnderlineRangeFilter and using .begin(), .end(); adding unit test. #

Total comments: 16

Patch Set 4 : Fixing type, consts, comments; adding std:: for min() and max(). #

Total comments: 4

Patch Set 5 : Need to specify 'friend class', not just 'friend'. #

Patch Set 6 : Sync. #

Patch Set 7 : Sync (to fix try job update). #

Total comments: 14

Patch Set 8 : Removing over-eager cleanups; adding CompositionUnderlineRangeFilter::operator->(). #

Total comments: 18

Patch Set 9 : Style fixes; early exit for drawing transparent underlines. #

Total comments: 4

Patch Set 10 : Extracting paintCompositionBackgrounds() from paint(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+321 lines, -63 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/editing/CompositionUnderline.h View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -2 lines 0 comments Download
A Source/core/editing/CompositionUnderlineRangeFilter.h View 1 2 3 4 5 6 7 8 1 chunk +78 lines, -0 lines 0 comments Download
A Source/core/editing/CompositionUnderlineRangeFilter.cpp View 1 2 3 4 5 6 7 8 1 chunk +39 lines, -0 lines 0 comments Download
A Source/core/editing/CompositionUnderlineRangeFilterTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +90 lines, -0 lines 0 comments Download
M Source/core/rendering/InlineTextBox.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/rendering/InlineTextBox.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +57 lines, -54 lines 0 comments Download
M Source/core/rendering/RenderTheme.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M Source/web/CompositionUnderlineBuilder.h View 1 chunk +2 lines, -1 line 0 comments Download
M Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M public/web/WebCompositionUnderline.h View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -2 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
huangs
PTAL, noting the Chrome counterpart https://codereview.chromium.org/313233002/ .
6 years, 6 months ago (2014-06-04 22:30:19 UTC) #1
aurimas (slooooooooow)
On 2014/06/04 22:30:19, huangs1 wrote: > PTAL, noting the Chrome counterpart https://codereview.chromium.org/313233002/ . I was ...
6 years, 6 months ago (2014-06-05 01:02:52 UTC) #2
yosin_UTC9
How do you manage Blink and Chromium commits? Will you land Blink patch before Chromium? ...
6 years, 6 months ago (2014-06-05 01:18:59 UTC) #3
huangs
PTAL. aurumas@: I'm focusing on BackgroundColorSpan, passing the data through composition underline so we won't ...
6 years, 6 months ago (2014-06-05 15:40:33 UTC) #4
yosin_UTC9
On 2014/06/05 15:40:33, huangs1 wrote: > https://codereview.chromium.org/313233002/diff/20001/Source/core/rendering/InlineTextBox.cpp#newcode641 > Source/core/rendering/InlineTextBox.cpp:641: CompositionUnderlineVisitor > visitor(underlines, start(), end()); > ...
6 years, 6 months ago (2014-06-06 01:23:35 UTC) #5
yosin_UTC9
Thanks for explanation of plan about committing. Changing Blink/Chromium API is complicated. https://codereview.chromium.org/313233002/diff/40001/Source/core/editing/CompositionUnderlineIterator.cpp File Source/core/editing/CompositionUnderlineIterator.cpp ...
6 years, 6 months ago (2014-06-06 01:24:27 UTC) #6
huangs
Thanks for the detailed comments! I'm fine with adding more code to make this use ...
6 years, 6 months ago (2014-06-06 02:40:52 UTC) #7
yosin_UTC9
On 2014/06/06 02:40:52, huangs1 wrote: > Thanks for the detailed comments! I'm fine with adding ...
6 years, 6 months ago (2014-06-06 05:08:15 UTC) #8
huangs
To handle Spans in general, we should handle overlaps. For example, the Google Japanese Input ...
6 years, 6 months ago (2014-06-06 14:38:14 UTC) #9
huangs
Updated with unit test, PTAL. https://codereview.chromium.org/313233002/diff/40001/Source/core/editing/CompositionUnderlineIterator.cpp File Source/core/editing/CompositionUnderlineIterator.cpp (right): https://codereview.chromium.org/313233002/diff/40001/Source/core/editing/CompositionUnderlineIterator.cpp#newcode1 Source/core/editing/CompositionUnderlineIterator.cpp:1: /* On 2014/06/06 01:24:27, ...
6 years, 6 months ago (2014-06-06 20:42:28 UTC) #10
huangs
Added reminders for stuff I should fix once I have the chance. https://chromiumcodereview.appspot.com/313233002/diff/80001/Source/core/editing/CompositionUnderlineRangeFilter.cpp File Source/core/editing/CompositionUnderlineRangeFilter.cpp ...
6 years, 6 months ago (2014-06-06 23:38:32 UTC) #11
yosin_UTC9
https://codereview.chromium.org/313233002/diff/80001/Source/core/editing/CompositionUnderlineRangeFilter.h File Source/core/editing/CompositionUnderlineRangeFilter.h (right): https://codereview.chromium.org/313233002/diff/80001/Source/core/editing/CompositionUnderlineRangeFilter.h#newcode21 Source/core/editing/CompositionUnderlineRangeFilter.h:21: END = -0x7FFFFFFF nit: better to use kNotFound in ...
6 years, 6 months ago (2014-06-09 01:49:56 UTC) #12
huangs
PTAL. https://codereview.chromium.org/313233002/diff/80001/Source/core/editing/CompositionUnderlineRangeFilter.cpp File Source/core/editing/CompositionUnderlineRangeFilter.cpp (right): https://codereview.chromium.org/313233002/diff/80001/Source/core/editing/CompositionUnderlineRangeFilter.cpp#newcode20 Source/core/editing/CompositionUnderlineRangeFilter.cpp:20: // underline is completely before interval. This may ...
6 years, 6 months ago (2014-06-09 06:07:14 UTC) #13
huangs
https://chromiumcodereview.appspot.com/313233002/diff/100001/Source/core/editing/CompositionUnderlineRangeFilter.h File Source/core/editing/CompositionUnderlineRangeFilter.h (right): https://chromiumcodereview.appspot.com/313233002/diff/100001/Source/core/editing/CompositionUnderlineRangeFilter.h#newcode40 Source/core/editing/CompositionUnderlineRangeFilter.h:40: friend CompositionUnderlineRangeFilter; friend class CompositionUnderlineRangeFilter; https://chromiumcodereview.appspot.com/313233002/diff/100001/Source/core/editing/CompositionUnderlineRangeFilter.h#newcode59 Source/core/editing/CompositionUnderlineRangeFilter.h:59: friend ConstIterator; ...
6 years, 6 months ago (2014-06-09 06:33:25 UTC) #14
huangs
https://codereview.chromium.org/313233002/diff/100001/Source/core/editing/CompositionUnderlineRangeFilter.h File Source/core/editing/CompositionUnderlineRangeFilter.h (right): https://codereview.chromium.org/313233002/diff/100001/Source/core/editing/CompositionUnderlineRangeFilter.h#newcode40 Source/core/editing/CompositionUnderlineRangeFilter.h:40: friend CompositionUnderlineRangeFilter; On 2014/06/09 06:33:25, huangs1 wrote: > friend ...
6 years, 6 months ago (2014-06-09 20:27:22 UTC) #15
huangs
Ping.
6 years, 6 months ago (2014-06-10 04:40:47 UTC) #16
huangs
Ping yosin@. Please let me know if you have more comments. Thanks!
6 years, 6 months ago (2014-06-12 05:39:17 UTC) #17
yosin_UTC9
https://chromiumcodereview.appspot.com/313233002/diff/160001/Source/core/editing/CompositionUnderlineRangeFilter.h File Source/core/editing/CompositionUnderlineRangeFilter.h (right): https://chromiumcodereview.appspot.com/313233002/diff/160001/Source/core/editing/CompositionUnderlineRangeFilter.h#newcode24 Source/core/editing/CompositionUnderlineRangeFilter.h:24: ASSERT(m_index >= 0); nit: We don't need to have ...
6 years, 6 months ago (2014-06-12 06:23:18 UTC) #18
huangs
Updated, PTAL. https://codereview.chromium.org/313233002/diff/160001/Source/core/editing/CompositionUnderlineRangeFilter.h File Source/core/editing/CompositionUnderlineRangeFilter.h (right): https://codereview.chromium.org/313233002/diff/160001/Source/core/editing/CompositionUnderlineRangeFilter.h#newcode24 Source/core/editing/CompositionUnderlineRangeFilter.h:24: ASSERT(m_index >= 0); On 2014/06/12 06:23:17, yosi ...
6 years, 6 months ago (2014-06-12 23:22:10 UTC) #19
yosin_UTC9
LGTM Add tkent@ for OWNERE review. https://codereview.chromium.org/313233002/diff/180001/Source/core/rendering/InlineTextBox.cpp File Source/core/rendering/InlineTextBox.cpp (right): https://codereview.chromium.org/313233002/diff/180001/Source/core/rendering/InlineTextBox.cpp#newcode1157 Source/core/rendering/InlineTextBox.cpp:1157: int fontHeightInt = ...
6 years, 6 months ago (2014-06-13 04:08:27 UTC) #20
tkent
looks ok except rendering/. Add some rendering people. https://codereview.chromium.org/313233002/diff/180001/Source/core/editing/CompositionUnderline.h File Source/core/editing/CompositionUnderline.h (right): https://codereview.chromium.org/313233002/diff/180001/Source/core/editing/CompositionUnderline.h#newcode39 Source/core/editing/CompositionUnderline.h:39: , ...
6 years, 6 months ago (2014-06-13 04:31:43 UTC) #21
huangs
Updated. Note change in behavior: we skip drawing transparent underlines when iterating over them. Note ...
6 years, 6 months ago (2014-06-13 17:22:25 UTC) #22
tkent
lgtm
6 years, 6 months ago (2014-06-15 23:46:37 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/huangs@chromium.org/313233002/200001
6 years, 6 months ago (2014-06-15 23:46:43 UTC) #24
tkent
The CQ bit was unchecked by tkent@chromium.org
6 years, 6 months ago (2014-06-15 23:46:46 UTC) #25
tkent
Need review for rendering/.
6 years, 6 months ago (2014-06-15 23:47:42 UTC) #26
huangs
Ping leviw@ for OWNER review of Source/core/rendering/*
6 years, 6 months ago (2014-06-16 02:19:21 UTC) #27
leviw_travelin_and_unemployed
LGTM with 2 nits. https://codereview.chromium.org/313233002/diff/200001/Source/core/rendering/InlineTextBox.cpp File Source/core/rendering/InlineTextBox.cpp (right): https://codereview.chromium.org/313233002/diff/200001/Source/core/rendering/InlineTextBox.cpp#newcode645 Source/core/rendering/InlineTextBox.cpp:645: if (useCustomUnderlines) { How about ...
6 years, 6 months ago (2014-06-17 19:09:56 UTC) #28
huangs
Updated. Thanks! https://codereview.chromium.org/313233002/diff/200001/Source/core/rendering/InlineTextBox.cpp File Source/core/rendering/InlineTextBox.cpp (right): https://codereview.chromium.org/313233002/diff/200001/Source/core/rendering/InlineTextBox.cpp#newcode645 Source/core/rendering/InlineTextBox.cpp:645: if (useCustomUnderlines) { Done. The new function ...
6 years, 6 months ago (2014-06-17 21:23:27 UTC) #29
huangs
The CQ bit was checked by huangs@chromium.org
6 years, 6 months ago (2014-06-17 21:24:08 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/huangs@chromium.org/313233002/220001
6 years, 6 months ago (2014-06-17 21:24:15 UTC) #31
huangs
The CQ bit was unchecked by huangs@chromium.org
6 years, 6 months ago (2014-06-17 21:25:46 UTC) #32
huangs
The CQ bit was checked by huangs@chromium.org
6 years, 6 months ago (2014-06-18 04:08:30 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/huangs@chromium.org/313233002/220001
6 years, 6 months ago (2014-06-18 04:09:05 UTC) #34
commit-bot: I haz the power
6 years, 6 months ago (2014-06-18 04:41:22 UTC) #35
Message was sent while issue was closed.
Change committed as 176387

Powered by Google App Engine
This is Rietveld 408576698