Fix for bug 8705, readonly text fields should not get focus rings. Add a rule to that effect to
html4.css and then also add readonly as a special case for style sharing so that we can retain the
performance boost from sharing styles on inputs.
Reviewed by bdash
* css/cssstyleselector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithElement):
(WebCore::CSSStyleSelector::checkOneSelector):
* css/html4.css:
git-svn-id: svn://svn.chromium.org/blink/trunk@18798 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/WebCore/css/html4.css b/WebCore/css/html4.css
index ad0840a..6660eff 100644
--- a/WebCore/css/html4.css
+++ b/WebCore/css/html4.css
@@ -544,11 +544,8 @@
outline: auto 5px -webkit-focus-ring-color
}
-html:focus, body:focus {
- outline: none
-}
-
-html:focus, body:focus {
+/* Read-only text fields do not show a focus ring but do still receive focus */
+html:focus, body:focus, input[readonly]:focus {
outline: none
}
@@ -568,7 +565,7 @@
input[type="file"]::-webkit-file-upload-button:focus {
outline-offset: 0
}
-
+
a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;