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

Issue 220343006: Fix for ::selection pseudo element to work on input elements (Closed)

Created:
6 years, 8 months ago by deepak.sa
Modified:
6 years, 8 months ago
Reviewers:
tkent, esprehn, ojan
CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Fix for ::selection pseudo element to work on input elements When text is selected inside input element, it should change the color and background color according to the ::selection pseudo element. BUG=167676 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171467

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added Layout Test #

Total comments: 9

Patch Set 3 : Addressing comments #

Total comments: 1

Patch Set 4 : Adding RefTests #

Total comments: 1

Patch Set 5 : Addressing Comments #

Patch Set 6 : Adding another Layout Test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -2 lines) Patch
A LayoutTests/fast/selectors/input-with-selection-pseudo-element.html View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/selectors/input-with-selection-pseudo-element-expected.html View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/fast/selectors/shadow-host-div-with-span.html View 1 2 3 4 5 1 chunk +27 lines, -0 lines 0 comments Download
A LayoutTests/fast/selectors/shadow-host-div-with-span-expected.html View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 4 3 chunks +15 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
deepak.sa
Please have a look.
6 years, 8 months ago (2014-04-01 13:30:57 UTC) #1
tkent
This needs a test. I don't think Patch Set 1 is a right fix. Checking ...
6 years, 8 months ago (2014-04-02 00:32:04 UTC) #2
deepak.sa
GENTLE PING!
6 years, 8 months ago (2014-04-03 19:55:05 UTC) #3
esprehn
this needs tests, it also seems weird that you need special hacks for input. :/ ...
6 years, 8 months ago (2014-04-03 19:59:06 UTC) #4
deepak.sa
https://codereview.chromium.org/220343006/diff/1/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://codereview.chromium.org/220343006/diff/1/Source/core/rendering/RenderObject.cpp#newcode1787 Source/core/rendering/RenderObject.cpp:1787: RenderObject* shadowHostRenderer = node()->shadowHost()->renderer(); On 2014/04/03 19:59:07, esprehn wrote: ...
6 years, 8 months ago (2014-04-07 15:19:59 UTC) #5
ojan
https://codereview.chromium.org/220343006/diff/20001/LayoutTests/fast/selectors/input-with-selection-pseudo-element.html File LayoutTests/fast/selectors/input-with-selection-pseudo-element.html (right): https://codereview.chromium.org/220343006/diff/20001/LayoutTests/fast/selectors/input-with-selection-pseudo-element.html#newcode1 LayoutTests/fast/selectors/input-with-selection-pseudo-element.html:1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> We typically use ...
6 years, 8 months ago (2014-04-09 01:57:52 UTC) #6
deepak.sa
Thanks ojan for review. I have addressed Reftest comment in the .html file. https://codereview.chromium.org/220343006/diff/20001/LayoutTests/fast/selectors/input-with-selection-pseudo-element.html File ...
6 years, 8 months ago (2014-04-09 14:01:07 UTC) #7
ojan
On 2014/04/09 14:01:07, deepak.sa wrote: > Thanks ojan for review. I have addressed Reftest comment ...
6 years, 8 months ago (2014-04-09 17:48:48 UTC) #8
esprehn
https://codereview.chromium.org/220343006/diff/40001/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://codereview.chromium.org/220343006/diff/40001/Source/core/rendering/RenderObject.cpp#newcode1821 Source/core/rendering/RenderObject.cpp:1821: pseudoStyle = getUncachedPseudoStyle(PseudoStyleRequest(SELECTION)); Why isn't this in a method, ...
6 years, 8 months ago (2014-04-09 20:36:06 UTC) #9
tkent
Should |n = n->parentNode();| in RenderObject::getUncachedPseudoStyle be |n = n->parentOrShadowHostNode()|?
6 years, 8 months ago (2014-04-10 01:47:48 UTC) #10
deepak.sa
On 2014/04/10 01:47:48, tkent wrote: > Should |n = n->parentNode();| in RenderObject::getUncachedPseudoStyle be |n = ...
6 years, 8 months ago (2014-04-10 06:09:40 UTC) #11
esprehn
This breaks ::selection for elements in ShadowRoots. https://codereview.chromium.org/220343006/diff/60001/Source/core/rendering/RenderObject.cpp File Source/core/rendering/RenderObject.cpp (right): https://codereview.chromium.org/220343006/diff/60001/Source/core/rendering/RenderObject.cpp#newcode2989 Source/core/rendering/RenderObject.cpp:2989: return node()->shadowHost()->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(SELECTION)); ...
6 years, 8 months ago (2014-04-10 22:20:38 UTC) #12
esprehn
On 2014/04/10 22:20:38, esprehn wrote: > ... > Source/core/rendering/RenderObject.cpp:2989: return > node()->shadowHost()->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(SELECTION)); > I don't ...
6 years, 8 months ago (2014-04-11 17:40:43 UTC) #13
deepak.sa
The CQ bit was checked by deepak.sa@samsung.com
6 years, 8 months ago (2014-04-14 11:06:29 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/deepak.sa@samsung.com/220343006/100001
6 years, 8 months ago (2014-04-14 11:06:36 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-14 11:40:27 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 8 months ago (2014-04-14 11:40:27 UTC) #17
deepak.sa
The CQ bit was checked by deepak.sa@samsung.com
6 years, 8 months ago (2014-04-14 14:11:03 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/deepak.sa@samsung.com/220343006/100001
6 years, 8 months ago (2014-04-14 14:11:18 UTC) #19
commit-bot: I haz the power
Change committed as 171467
6 years, 8 months ago (2014-04-14 14:52:15 UTC) #20
redchenko
Please, take a look at http://jsfiddle.net/gtVmH/2/ This patch does not fix my test example. I'm ...
6 years, 8 months ago (2014-04-22 15:09:02 UTC) #21
ojan
6 years, 8 months ago (2014-04-22 18:49:12 UTC) #22
Message was sent while issue was closed.
On 2014/04/22 15:09:02, redchenko wrote:
> Please, take a look at http://jsfiddle.net/gtVmH/2/
> This patch does not fix my test example. I'm working on this issue, and I know
> how to fix this test. If you think this example is correct, I’ll create a code
> review.

Your test-case looks correct to me (i.e. the selection should be red), but I'm
not sure this is well-specified. I filed a bug and CC'ed some people who would
know...or at least would know who to ask.
https://code.google.com/p/chromium/issues/detail?id=365784

Powered by Google App Engine
This is Rietveld 408576698