Title: [151695] trunk
- Revision
- 151695
- Author
- [email protected]
- Date
- 2013-06-18 14:25:07 -0700 (Tue, 18 Jun 2013)
Log Message
REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
https://bugs.webkit.org/show_bug.cgi?id=117747
Reviewed by Kent Tamura.
.:
* ManualTests/search-select-all-with-focus-style.html: Added.
Source/WebCore:
Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28
r147612 added setNeedsLayout(true, MarkOnlyThis) for
TextControlInnerTextElement renderer. It's ok for input[type=text]
because RenderTextControlSingleLine also has needsLayout flag, and it
has only the inner text renderer as a child.
As for input[type=search], it doesn't work. Renderer structure for
input[type=search] is:
RenderTextControlSingleLine
└Renderer for TextControlInnerContainer
└Renderer for TextControlInnerElement
└Renderer for TextControlInnerTextElement
After r147612, there is a case that only RenderTextControlSingleLine
and TextControlInnerTextElement renderer have needsLayout flag, and
others don't. It won't trigger layout for
TextControlInnerTextElement renderer.
We should set needsLayout flags of TextControlInnerContainer renderer
and TextControlInnerElement renderer by MarkContainingBlockChain.
Manual Tests: search-select-all-with-focus-style.html
(I tried but couldn't make a test that works in DRT)
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (151694 => 151695)
--- trunk/ChangeLog 2013-06-18 20:40:09 UTC (rev 151694)
+++ trunk/ChangeLog 2013-06-18 21:25:07 UTC (rev 151695)
@@ -1,3 +1,12 @@
+2013-06-18 Ryosuke Niwa <[email protected]>
+
+ REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
+ https://bugs.webkit.org/show_bug.cgi?id=117747
+
+ Reviewed by Kent Tamura.
+
+ * ManualTests/search-select-all-with-focus-style.html: Added.
+
2013-06-18 Carlos Garcia Campos <[email protected]>
Unreviewed. Update NEWS and Versions.m4 for 2.1.2 release.
Added: trunk/ManualTests/search-select-all-with-focus-style.html (0 => 151695)
--- trunk/ManualTests/search-select-all-with-focus-style.html (rev 0)
+++ trunk/ManualTests/search-select-all-with-focus-style.html 2013-06-18 21:25:07 UTC (rev 151695)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<body>
+<style>
+input[type="search"]:focus {
+ border:1px solid #4d90fe;
+}
+
+input[type="search"] {
+ -webkit-appearance: textfield;
+}
+</style>
+<p>To test, focus the search text field below and select-all the content by pressing command/control and a.</p>
+<input value="foo bar " type="search">
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (151694 => 151695)
--- trunk/Source/WebCore/ChangeLog 2013-06-18 20:40:09 UTC (rev 151694)
+++ trunk/Source/WebCore/ChangeLog 2013-06-18 21:25:07 UTC (rev 151695)
@@ -1,3 +1,39 @@
+2013-06-18 Ryosuke Niwa <[email protected]>
+
+ REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
+ https://bugs.webkit.org/show_bug.cgi?id=117747
+
+ Reviewed by Kent Tamura.
+
+ Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28
+
+ r147612 added setNeedsLayout(true, MarkOnlyThis) for
+ TextControlInnerTextElement renderer. It's ok for input[type=text]
+ because RenderTextControlSingleLine also has needsLayout flag, and it
+ has only the inner text renderer as a child.
+
+ As for input[type=search], it doesn't work. Renderer structure for
+ input[type=search] is:
+
+ RenderTextControlSingleLine
+ └Renderer for TextControlInnerContainer
+ └Renderer for TextControlInnerElement
+ └Renderer for TextControlInnerTextElement
+
+ After r147612, there is a case that only RenderTextControlSingleLine
+ and TextControlInnerTextElement renderer have needsLayout flag, and
+ others don't. It won't trigger layout for
+ TextControlInnerTextElement renderer.
+
+ We should set needsLayout flags of TextControlInnerContainer renderer
+ and TextControlInnerElement renderer by MarkContainingBlockChain.
+
+ Manual Tests: search-select-all-with-focus-style.html
+ (I tried but couldn't make a test that works in DRT)
+
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::styleDidChange):
+
2013-06-18 Dean Jackson <[email protected]>
Attempted build fix for non-Mac.
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (151694 => 151695)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2013-06-18 20:40:09 UTC (rev 151694)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2013-06-18 21:25:07 UTC (rev 151695)
@@ -255,7 +255,7 @@
}
RenderObject* innerTextRenderer = innerTextElement()->renderer();
if (innerTextRenderer && diff == StyleDifferenceLayout)
- innerTextRenderer->setNeedsLayout(true, MarkOnlyThis);
+ innerTextRenderer->setNeedsLayout(true, MarkContainingBlockChain);
if (HTMLElement* placeholder = inputElement()->placeholderElement())
placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldBeTruncated() ? CSSValueEllipsis : CSSValueClip);
setHasOverflowClip(false);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes