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

Issue 1468913002: Find In Page hides the text when text color matches text search hightlight color. (Closed)

Created:
5 years, 1 month ago by ramya.v
Modified:
5 years ago
Reviewers:
pdr., fs, rwlbuis
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Find In Page hides the text when text color matches text search hightlight color. Modifying both text color and text highlight color when text is matched. Similar approach is followed in other browsers like IE, Firefox, Safari for active matches. IE: text color-black, highlight color-yellow Firefox: text color-white, highlight color-green Safari: text color-black, highlight color-yellow for active match. BUG=512354 Committed: https://crrev.com/9fb75b70f133a81c3f4aa2b442cd06980cd3a7dc Cr-Commit-Position: refs/heads/master@{#366382}

Patch Set 1 #

Patch Set 2 : Painting highlight color in background phase and text color in foreground phase #

Patch Set 3 : Added testcase #

Total comments: 6

Patch Set 4 : Added descriptive variable name in function declarations #

Total comments: 20

Patch Set 5 : Updated as per review comments #

Patch Set 6 : Removed svg testcase expectations to regenerate as per latest behavior #

Patch Set 7 : Updated test case expectations as per modified behavior #

Patch Set 8 : Updating test case expectations #

Total comments: 10

Patch Set 9 : Updated as per review comments #

Patch Set 10 : Extracting duplicate code to a seperate function #

Patch Set 11 : Rebasing the patch #

Total comments: 7

Patch Set 12 : Updated as per review comments #

Patch Set 13 : Updated as per review comments #

Patch Set 14 : Update paintSelectionBackground to use new helper function #

Total comments: 39

Patch Set 15 : Updated as per review comments #

Patch Set 16 : #

Patch Set 17 : #

Total comments: 24

Patch Set 18 : Updated as per review comments #

Patch Set 19 : Updated stroke testcase #

Total comments: 4

Patch Set 20 : #

Patch Set 21 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -177 lines) Patch
A third_party/WebKit/LayoutTests/fast/repaint/text-match.html View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/repaint/text-match-expected.html View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/repaint/text-match-svg.html View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/repaint/text-match-svg-expected.html View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-match-highlight-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/svg/custom/text-match-highlight-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-match-highlight-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/svg/custom/text-match-highlight-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win-xp/svg/custom/text-match-highlight-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win-xp/svg/custom/text-match-highlight-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +44 lines, -43 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/svg/custom/text-match-highlight-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/svg/custom/text-match-highlight-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +16 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win7/svg/custom/text-match-highlight-expected.png View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win7/svg/custom/text-match-highlight-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/custom/text-match-highlight.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTheme.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTheme.cpp View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineTextBox.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +47 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +16 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +90 lines, -49 lines 0 comments Download

Messages

Total messages: 29 (6 generated)
ramya.v
PTAL! Thanks
5 years ago (2015-11-25 11:51:56 UTC) #2
rwlbuis
Some comments. https://codereview.chromium.org/1468913002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTheme.cpp File third_party/WebKit/Source/core/layout/LayoutTheme.cpp (right): https://codereview.chromium.org/1468913002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTheme.cpp#newcode830 third_party/WebKit/Source/core/layout/LayoutTheme.cpp:830: return Color(0, 0, 0); // Black. You ...
5 years ago (2015-11-30 15:39:53 UTC) #4
ramya.v
Hi Rob, Updated as per review comments. PTAL! Thanks https://codereview.chromium.org/1468913002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTheme.cpp File third_party/WebKit/Source/core/layout/LayoutTheme.cpp (right): https://codereview.chromium.org/1468913002/diff/40001/third_party/WebKit/Source/core/layout/LayoutTheme.cpp#newcode830 third_party/WebKit/Source/core/layout/LayoutTheme.cpp:830: ...
5 years ago (2015-12-01 03:52:41 UTC) #5
pdr.
https://codereview.chromium.org/1468913002/diff/60001/third_party/WebKit/LayoutTests/fast/repaint/text-match.html File third_party/WebKit/LayoutTests/fast/repaint/text-match.html (right): https://codereview.chromium.org/1468913002/diff/60001/third_party/WebKit/LayoutTests/fast/repaint/text-match.html#newcode4 third_party/WebKit/LayoutTests/fast/repaint/text-match.html:4: function highlightRange(id, start, end, active) { Indent 4, or ...
5 years ago (2015-12-01 23:58:48 UTC) #6
ramya.v
@pdr Modified as per review comments. PTAL! Thanks https://codereview.chromium.org/1468913002/diff/60001/third_party/WebKit/LayoutTests/fast/repaint/text-match.html File third_party/WebKit/LayoutTests/fast/repaint/text-match.html (right): https://codereview.chromium.org/1468913002/diff/60001/third_party/WebKit/LayoutTests/fast/repaint/text-match.html#newcode4 third_party/WebKit/LayoutTests/fast/repaint/text-match.html:4: function ...
5 years ago (2015-12-10 09:39:37 UTC) #7
pdr.
Getting very close! Just straightforward plumbing issues now. https://codereview.chromium.org/1468913002/diff/140001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/140001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp#newcode836 third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp:836: int ...
5 years ago (2015-12-14 22:53:26 UTC) #8
ramya.v
https://codereview.chromium.org/1468913002/diff/140001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/140001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp#newcode836 third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp:836: int sPos = std::max(marker->startOffset() - m_inlineTextBox.start(), (unsigned)0); On 2015/12/14 ...
5 years ago (2015-12-15 06:12:24 UTC) #9
pdr.
+cc fs@opera too. https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h (right): https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h#newcode25 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h:25: struct TextMatchInfo { Almost the same ...
5 years ago (2015-12-16 06:04:23 UTC) #11
fs
https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h (right): https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h#newcode25 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h:25: struct TextMatchInfo { On 2015/12/16 at 06:04:23, pdr wrote: ...
5 years ago (2015-12-16 12:15:01 UTC) #12
ramya.v
@pdr/fr Modified data structure as per review comments. PTAL! Thanks. https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h (right): https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h#newcode25 ...
5 years ago (2015-12-17 07:53:22 UTC) #13
fs
https://codereview.chromium.org/1468913002/diff/260001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/260001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp#newcode322 third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp:322: break; Nit: Maybe drop this too now that TextMatch ...
5 years ago (2015-12-17 10:10:55 UTC) #14
ramya.v
Updated as per review comments. PTAL! Thanks https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h (right): https://codereview.chromium.org/1468913002/diff/200001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h#newcode47 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.h:47: void paintTextMatchMarkerHelper(const ...
5 years ago (2015-12-18 03:43:33 UTC) #15
fs
https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp#newcode421 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp:421: Vector<SVGTextFragmentWithRange> SVGInlineTextBoxPainter::collectTextMatches(const PaintInfo& paintInfo, DocumentMarker* marker) |paintInfo| isn't used. ...
5 years ago (2015-12-18 11:35:17 UTC) #16
pdr.
Just a few small nits. With fs's comments addressed this will be in pretty good ...
5 years ago (2015-12-19 02:39:45 UTC) #17
ramya.v
PTAL! Thanks https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h File third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h (right): https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h#newcode31 third_party/WebKit/Source/core/paint/InlineTextBoxPainter.h:31: enum class DocumentMarkerPaintPhase { Foreground, Background }; ...
5 years ago (2015-12-21 08:13:50 UTC) #18
fs
Just a few more nits. https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp#newcode432 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp:432: int markerStartPosition = std::max<int>(marker->startOffset() ...
5 years ago (2015-12-21 12:00:02 UTC) #20
ramya.v
PTAL! Thanks https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp#newcode477 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp:477: if (setupTextPaint(paintInfo, style, ApplyToFillMode, paint)) { On ...
5 years ago (2015-12-21 13:01:56 UTC) #21
fs
lgtm https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp (right): https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp#newcode477 third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp:477: if (setupTextPaint(paintInfo, style, ApplyToFillMode, paint)) { On 2015/12/21 ...
5 years ago (2015-12-21 13:13:24 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1468913002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1468913002/420001
5 years ago (2015-12-21 13:18:32 UTC) #24
ramya.v
On 2015/12/21 13:13:24, fs wrote: > lgtm > > https://codereview.chromium.org/1468913002/diff/320001/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp > File third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp (right): > ...
5 years ago (2015-12-21 13:34:28 UTC) #25
commit-bot: I haz the power
Committed patchset #21 (id:420001)
5 years ago (2015-12-21 14:45:04 UTC) #26
commit-bot: I haz the power
Patchset 21 (id:??) landed as https://crrev.com/9fb75b70f133a81c3f4aa2b442cd06980cd3a7dc Cr-Commit-Position: refs/heads/master@{#366382}
5 years ago (2015-12-21 14:46:36 UTC) #28
dmurph
5 years ago (2015-12-21 22:06:15 UTC) #29
Message was sent while issue was closed.
On 2015/12/21 at 14:46:36, commit-bot wrote:
> Patchset 21 (id:??) landed as
https://crrev.com/9fb75b70f133a81c3f4aa2b442cd06980cd3a7dc
> Cr-Commit-Position: refs/heads/master@{#366382}

I think this incorrectly rebaselined for win10 and winxp.  I'll change test
expectations.

Powered by Google App Engine
This is Rietveld 408576698