Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Input ::selection pseudo class does not work leading to hidden selection
https://bugs.webkit.org/show_bug.cgi?id=38943 Source/WebCore: Patch by Svetlana Redchenko <redchenko@yandex-team.ru> on 2014-05-18 Reviewed by Darin Adler. Test: fast/selectors/input-with-selection-pseudo-element.html When text is selected inside input element, it should change the color and background color according to the ::selection pseudo element. * rendering/RenderObject.cpp: (WebCore::RenderObject::selectionBackgroundColor): (WebCore::RenderObject::selectionColor): (WebCore::RenderObject::selectionPseudoStyle): * rendering/RenderObject.h: LayoutTests: Patch by Svetlana Redchenko <redchenko@yandex-team.ru> on 2014-05-18 Reviewed by Darin Adler. * fast/selectors/input-with-selection-pseudo-element-expected.html: Added. * fast/selectors/input-with-selection-pseudo-element.html: Added. Canonical link: https://commits.webkit.org/151083@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
af798bc
commit 2b21e0423a3f791ed0c1f667b027836e66ec39d3
Showing
6 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<!DOCTYPE html> | ||
<div style="border:5px solid; width:100px; font-size:16px; font-family:sans-serif;"> | ||
<span style="background-color:rgba(63, 128, 33, 0.95); color:yellow;">Hello</span> | ||
</div> | ||
<br>Fix for ::selection pseudo element to work on input elements. | ||
<br>The above selected text in the input box should have green background and yellow color. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
::selection { background-color: rgba(63, 128, 33, 0.95); color: yellow; } | ||
</style> | ||
<input id="inputText" type="text" value="Hello" style="border:5px solid; width:100px; font-size:16px; font-family:sans-serif; padding:0; margin:0; outline:none;"><br> | ||
<br>Fix for ::selection pseudo element to work on input elements. | ||
<br>The above selected text in the input box should have green background and yellow color. | ||
<script> | ||
document.getElementById('inputText').select(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters