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

Unified Diff: Source/core/html/forms/SearchInputType.cpp

Issue 100823012: Show delete button in input[type=search] only if the field is editable and focused/hovered. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« Source/core/css/html.css ('K') | « Source/core/css/html.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/SearchInputType.cpp
diff --git a/Source/core/html/forms/SearchInputType.cpp b/Source/core/html/forms/SearchInputType.cpp
index 8b83268a971eaeb201a49f9c06fb54155ecf07af..07817df7c2fa0d7687b67f63202f50cdfdc35e77 100644
--- a/Source/core/html/forms/SearchInputType.cpp
+++ b/Source/core/html/forms/SearchInputType.cpp
@@ -171,9 +171,9 @@ void SearchInputType::updateCancelButtonVisibility()
if (!button)
return;
if (element().value().isEmpty())
- button->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHidden);
+ button->setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER);
else
- button->removeInlineStyleProperty(CSSPropertyVisibility);
+ button->removeInlineStyleProperty(CSSPropertyOpacity);
}
bool SearchInputType::supportsInputModeAttribute() const
« Source/core/css/html.css ('K') | « Source/core/css/html.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698