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

Unified Diff: Source/core/html/HTMLTextFormControlElement.h

Issue 1280423002: CSS4: Implement :placeholder-shown pseudo class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 4 months 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
Index: Source/core/html/HTMLTextFormControlElement.h
diff --git a/Source/core/html/HTMLTextFormControlElement.h b/Source/core/html/HTMLTextFormControlElement.h
index 12eb0d5918c41236a1dca144db257b7d60912e17..a61ab6abfe58620835092b40d16e5130319447be 100644
--- a/Source/core/html/HTMLTextFormControlElement.h
+++ b/Source/core/html/HTMLTextFormControlElement.h
@@ -59,11 +59,12 @@ public:
InsertionNotificationRequest insertedInto(ContainerNode*) override;
// The derived class should return true if placeholder processing is needed.
+ virtual bool isPlaceholderVisible() const = 0;
+ virtual void setPlaceholderVisibility(bool) = 0;
virtual bool supportsPlaceholder() const = 0;
String strippedPlaceholder() const;
- bool placeholderShouldBeVisible() const;
HTMLElement* placeholderElement() const;
- void updatePlaceholderVisibility(bool);
+ void updatePlaceholderVisibility();
VisiblePosition visiblePositionForIndex(int) const;
int indexForVisiblePosition(const VisiblePosition&) const;
@@ -153,6 +154,8 @@ private:
// Called in dispatchBlurEvent(), after placeholder process, before calling parent's dispatchBlurEvent().
virtual void handleBlurEvent() { }
+ bool placeholderShouldBeVisible() const;
+
String m_textAsOfLastFormControlChangeEvent;
bool m_lastChangeWasUserEdit;

Powered by Google App Engine
This is Rietveld 408576698