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

Side by Side Diff: Source/core/html/HTMLInputElement.cpp

Issue 481753002: Use Shadow DOM to display fallback content for images (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 1 month 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 | Annotate | Revision Log
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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 , m_stateRestored(false) 121 , m_stateRestored(false)
122 , m_parsingInProgress(createdByParser) 122 , m_parsingInProgress(createdByParser)
123 , m_valueAttributeWasUpdatedAfterParsing(false) 123 , m_valueAttributeWasUpdatedAfterParsing(false)
124 , m_canReceiveDroppedFiles(false) 124 , m_canReceiveDroppedFiles(false)
125 , m_hasTouchEventHandler(false) 125 , m_hasTouchEventHandler(false)
126 , m_shouldRevealPassword(false) 126 , m_shouldRevealPassword(false)
127 , m_needsToUpdateViewValue(true) 127 , m_needsToUpdateViewValue(true)
128 , m_inputType(InputType::createText(*this)) 128 , m_inputType(InputType::createText(*this))
129 , m_inputTypeView(m_inputType) 129 , m_inputTypeView(m_inputType)
130 { 130 {
131 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
132 setHasCustomStyleCallbacks(); 131 setHasCustomStyleCallbacks();
133 #endif
134 } 132 }
135 133
136 PassRefPtrWillBeRawPtr<HTMLInputElement> HTMLInputElement::create(Document& docu ment, HTMLFormElement* form, bool createdByParser) 134 PassRefPtrWillBeRawPtr<HTMLInputElement> HTMLInputElement::create(Document& docu ment, HTMLFormElement* form, bool createdByParser)
137 { 135 {
138 RefPtrWillBeRawPtr<HTMLInputElement> inputElement = adoptRefWillBeNoop(new H TMLInputElement(document, form, createdByParser)); 136 RefPtrWillBeRawPtr<HTMLInputElement> inputElement = adoptRefWillBeNoop(new H TMLInputElement(document, form, createdByParser));
139 inputElement->ensureUserAgentShadowRoot(); 137 inputElement->ensureUserAgentShadowRoot();
140 return inputElement.release(); 138 return inputElement.release();
141 } 139 }
142 140
143 void HTMLInputElement::trace(Visitor* visitor) 141 void HTMLInputElement::trace(Visitor* visitor)
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 bool HTMLInputElement::isInteractiveContent() const 1822 bool HTMLInputElement::isInteractiveContent() const
1825 { 1823 {
1826 return m_inputType->isInteractiveContent(); 1824 return m_inputType->isInteractiveContent();
1827 } 1825 }
1828 1826
1829 bool HTMLInputElement::supportsAutofocus() const 1827 bool HTMLInputElement::supportsAutofocus() const
1830 { 1828 {
1831 return m_inputType->isInteractiveContent(); 1829 return m_inputType->isInteractiveContent();
1832 } 1830 }
1833 1831
1834 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1835 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1832 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1836 { 1833 {
1837 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1834 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1838 } 1835 }
1839 #endif
1840 1836
1841 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue) 1837 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue)
1842 { 1838 {
1843 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ; 1839 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ;
1844 } 1840 }
1845 1841
1846 void HTMLInputElement::didNotifySubtreeInsertionsToDocument() 1842 void HTMLInputElement::didNotifySubtreeInsertionsToDocument()
1847 { 1843 {
1848 listAttributeTargetChanged(); 1844 listAttributeTargetChanged();
1849 } 1845 }
1850 1846
1851 AXObject* HTMLInputElement::popupRootAXObject() 1847 AXObject* HTMLInputElement::popupRootAXObject()
1852 { 1848 {
1853 return m_inputTypeView->popupRootAXObject(); 1849 return m_inputTypeView->popupRootAXObject();
1854 } 1850 }
1855 1851
1852 void HTMLInputElement::ensureFallbackContent()
1853 {
1854 m_inputTypeView->ensureFallbackContent();
1855 }
1856
1857 void HTMLInputElement::ensurePrimaryContent()
1858 {
1859 m_inputTypeView->ensurePrimaryContent();
1860 }
1861
1862 bool HTMLInputElement::hasFallbackContent() const
1863 {
1864 return m_inputTypeView->hasFallbackContent();
1865 }
1856 } // namespace 1866 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698