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

Side by Side Diff: Source/core/html/HTMLInputElement.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 6 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 bool supportsInputModeAttribute() const; 252 bool supportsInputModeAttribute() const;
253 253
254 void setShouldRevealPassword(bool value); 254 void setShouldRevealPassword(bool value);
255 bool shouldRevealPassword() const { return m_shouldRevealPassword; } 255 bool shouldRevealPassword() const { return m_shouldRevealPassword; }
256 AXObject* popupRootAXObject(); 256 AXObject* popupRootAXObject();
257 void didNotifySubtreeInsertionsToDocument() override; 257 void didNotifySubtreeInsertionsToDocument() override;
258 258
259 virtual void ensureFallbackContent(); 259 virtual void ensureFallbackContent();
260 virtual void ensurePrimaryContent(); 260 virtual void ensurePrimaryContent();
261 bool hasFallbackContent() const; 261 bool hasFallbackContent() const;
262
263 bool isPlaceholderVisible() const override { return m_isPlaceholderVisible; }
264 void setPlaceholderVisibility(bool) override;
265
262 protected: 266 protected:
263 HTMLInputElement(Document&, HTMLFormElement*, bool createdByParser); 267 HTMLInputElement(Document&, HTMLFormElement*, bool createdByParser);
264 268
265 void defaultEventHandler(Event*) override; 269 void defaultEventHandler(Event*) override;
266 270
267 private: 271 private:
268 enum AutoCompleteSetting { Uninitialized, On, Off }; 272 enum AutoCompleteSetting { Uninitialized, On, Off };
269 273
270 void didAddUserAgentShadowRoot(ShadowRoot&) final; 274 void didAddUserAgentShadowRoot(ShadowRoot&) final;
271 void willAddFirstAuthorShadowRoot() final; 275 void willAddFirstAuthorShadowRoot() final;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 unsigned m_isActivatedSubmit : 1; 381 unsigned m_isActivatedSubmit : 1;
378 unsigned m_autocomplete : 2; // AutoCompleteSetting 382 unsigned m_autocomplete : 2; // AutoCompleteSetting
379 unsigned m_hasNonEmptyList : 1; 383 unsigned m_hasNonEmptyList : 1;
380 unsigned m_stateRestored : 1; 384 unsigned m_stateRestored : 1;
381 unsigned m_parsingInProgress : 1; 385 unsigned m_parsingInProgress : 1;
382 unsigned m_valueAttributeWasUpdatedAfterParsing : 1; 386 unsigned m_valueAttributeWasUpdatedAfterParsing : 1;
383 unsigned m_canReceiveDroppedFiles : 1; 387 unsigned m_canReceiveDroppedFiles : 1;
384 unsigned m_hasTouchEventHandler : 1; 388 unsigned m_hasTouchEventHandler : 1;
385 unsigned m_shouldRevealPassword : 1; 389 unsigned m_shouldRevealPassword : 1;
386 unsigned m_needsToUpdateViewValue : 1; 390 unsigned m_needsToUpdateViewValue : 1;
391 unsigned m_isPlaceholderVisible : 1;
387 RefPtrWillBeMember<InputType> m_inputType; 392 RefPtrWillBeMember<InputType> m_inputType;
388 RefPtrWillBeMember<InputTypeView> m_inputTypeView; 393 RefPtrWillBeMember<InputTypeView> m_inputTypeView;
389 // The ImageLoader must be owned by this element because the loader code ass umes 394 // The ImageLoader must be owned by this element because the loader code ass umes
390 // that it lives as long as its owning element lives. If we move the loader into 395 // that it lives as long as its owning element lives. If we move the loader into
391 // the ImageInput object we may delete the loader while this element lives o n. 396 // the ImageInput object we may delete the loader while this element lives o n.
392 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; 397 OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader;
393 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve r; 398 OwnPtrWillBeMember<ListAttributeTargetObserver> m_listAttributeTargetObserve r;
394 }; 399 };
395 400
396 } // namespace blink 401 } // namespace blink
397 402
398 #endif // HTMLInputElement_h 403 #endif // HTMLInputElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698