Title: [179796] trunk
- Revision
- 179796
- Author
- [email protected]
- Date
- 2015-02-08 00:02:48 -0800 (Sun, 08 Feb 2015)
Log Message
AX: The input element with type="search" has no default focus outline
https://bugs.webkit.org/show_bug.cgi?id=140326
Reviewed by Darin Adler.
Source/WebCore:
The platform RenderTheme takes care of the search field, and that code
was missing a check for whether the element was focused.
Test: fast/css/focus-ring-exists-for-search-field.html
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSearchField):
LayoutTests:
* fast/css/focus-ring-exists-for-search-field.html: Added.
* platform/mac/fast/css/focus-ring-exists-for-search-field-expected.png: Added.
* platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (179795 => 179796)
--- trunk/LayoutTests/ChangeLog 2015-02-08 07:54:20 UTC (rev 179795)
+++ trunk/LayoutTests/ChangeLog 2015-02-08 08:02:48 UTC (rev 179796)
@@ -1,3 +1,14 @@
+2015-02-07 Chris Fleizach <[email protected]>
+
+ AX: The input element with type="search" has no default focus outline
+ https://bugs.webkit.org/show_bug.cgi?id=140326
+
+ Reviewed by Darin Adler.
+
+ * fast/css/focus-ring-exists-for-search-field.html: Added.
+ * platform/mac/fast/css/focus-ring-exists-for-search-field-expected.png: Added.
+ * platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt: Added.
+
2015-02-07 Alexey Proskuryakov <[email protected]>
fullscreen/full-screen-plugin.html is very flaky on Yosemite WK2
Added: trunk/LayoutTests/fast/css/focus-ring-exists-for-search-field.html (0 => 179796)
--- trunk/LayoutTests/fast/css/focus-ring-exists-for-search-field.html (rev 0)
+++ trunk/LayoutTests/fast/css/focus-ring-exists-for-search-field.html 2015-02-08 08:02:48 UTC (rev 179796)
@@ -0,0 +1,14 @@
+<html>
+<head>
+<script>
+window._onload_ = function()
+{
+ document.getElementById("search").focus();
+}
+</script>
+</head>
+<body>
+<p>Assuming the port-specific theme draws focus rings, this test can be used to ensure that a focus ring is drawn around a search field.</p>
+<input type="search" id="search">
+</body>
+</html>
Added: trunk/LayoutTests/platform/mac/fast/css/focus-ring-exists-for-search-field-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/css/focus-ring-exists-for-search-field-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt (0 => 179796)
--- trunk/LayoutTests/platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt 2015-02-08 08:02:48 UTC (rev 179796)
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 757x36
+ text run at (0,0) width 757: "Assuming the port-specific theme draws focus rings, this test can be used to ensure that a focus ring is drawn around a"
+ text run at (0,18) width 78: "search field."
+ RenderBlock (anonymous) at (0,52) size 784x23
+ RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+ RenderFlexibleBox {DIV} at (3,3) size 152x13
+ RenderBlock {DIV} at (0,1) size 8x11
+ RenderBlock {DIV} at (8,0) size 131x13
+ RenderBlock {DIV} at (138,1) size 14x11
+ RenderText {#text} at (0,0) size 0x0
+layer at (21,65) size 130x13
+ RenderBlock {DIV} at (0,0) size 131x13
+caret: position 0 of child 0 {DIV} of child 1 {DIV} of child 0 {DIV} of {#document-fragment} of child 3 {INPUT} of body
Modified: trunk/Source/WebCore/ChangeLog (179795 => 179796)
--- trunk/Source/WebCore/ChangeLog 2015-02-08 07:54:20 UTC (rev 179795)
+++ trunk/Source/WebCore/ChangeLog 2015-02-08 08:02:48 UTC (rev 179796)
@@ -1,3 +1,18 @@
+2015-02-07 Chris Fleizach <[email protected]>
+
+ AX: The input element with type="search" has no default focus outline
+ https://bugs.webkit.org/show_bug.cgi?id=140326
+
+ Reviewed by Darin Adler.
+
+ The platform RenderTheme takes care of the search field, and that code
+ was missing a check for whether the element was focused.
+
+ Test: fast/css/focus-ring-exists-for-search-field.html
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintSearchField):
+
2015-02-07 Tim Horton <[email protected]>
Add some dictionary lookup tests
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (179795 => 179796)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2015-02-08 07:54:20 UTC (rev 179795)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2015-02-08 08:02:48 UTC (rev 179796)
@@ -1572,11 +1572,17 @@
// Set the search button to nil before drawing. Then reset it so we can draw it later.
[search setSearchButtonCell:nil];
- [search drawWithFrame:NSRect(unzoomedRect) inView:documentViewFor(o)];
+ NSView *documentView = documentViewFor(o);
+ [search drawWithFrame:NSRect(unzoomedRect) inView:documentView];
[search setControlView:nil];
[search resetSearchButtonCell];
+ if (isFocused(o) && o.style().outlineStyleIsAuto()) {
+ if (wkDrawCellFocusRingWithFrameAtTime(search, NSRect(unzoomedRect), documentView, std::numeric_limits<double>::max()))
+ o.document().page()->focusController().setFocusedElementNeedsRepaint();
+ }
+
return false;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes