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

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, 2 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 | 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 , m_stateRestored(false) 120 , m_stateRestored(false)
121 , m_parsingInProgress(createdByParser) 121 , m_parsingInProgress(createdByParser)
122 , m_valueAttributeWasUpdatedAfterParsing(false) 122 , m_valueAttributeWasUpdatedAfterParsing(false)
123 , m_canReceiveDroppedFiles(false) 123 , m_canReceiveDroppedFiles(false)
124 , m_hasTouchEventHandler(false) 124 , m_hasTouchEventHandler(false)
125 , m_shouldRevealPassword(false) 125 , m_shouldRevealPassword(false)
126 , m_needsToUpdateViewValue(true) 126 , m_needsToUpdateViewValue(true)
127 , m_inputType(InputType::createText(*this)) 127 , m_inputType(InputType::createText(*this))
128 , m_inputTypeView(m_inputType) 128 , m_inputTypeView(m_inputType)
129 { 129 {
130 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
131 setHasCustomStyleCallbacks(); 130 setHasCustomStyleCallbacks();
132 #endif
133 } 131 }
134 132
135 PassRefPtrWillBeRawPtr<HTMLInputElement> HTMLInputElement::create(Document& docu ment, HTMLFormElement* form, bool createdByParser) 133 PassRefPtrWillBeRawPtr<HTMLInputElement> HTMLInputElement::create(Document& docu ment, HTMLFormElement* form, bool createdByParser)
136 { 134 {
137 RefPtrWillBeRawPtr<HTMLInputElement> inputElement = adoptRefWillBeNoop(new H TMLInputElement(document, form, createdByParser)); 135 RefPtrWillBeRawPtr<HTMLInputElement> inputElement = adoptRefWillBeNoop(new H TMLInputElement(document, form, createdByParser));
138 inputElement->ensureUserAgentShadowRoot(); 136 inputElement->ensureUserAgentShadowRoot();
139 return inputElement.release(); 137 return inputElement.release();
140 } 138 }
141 139
142 void HTMLInputElement::trace(Visitor* visitor) 140 void HTMLInputElement::trace(Visitor* visitor)
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 bool HTMLInputElement::isInteractiveContent() const 1779 bool HTMLInputElement::isInteractiveContent() const
1782 { 1780 {
1783 return m_inputType->isInteractiveContent(); 1781 return m_inputType->isInteractiveContent();
1784 } 1782 }
1785 1783
1786 bool HTMLInputElement::supportsAutofocus() const 1784 bool HTMLInputElement::supportsAutofocus() const
1787 { 1785 {
1788 return m_inputType->isInteractiveContent(); 1786 return m_inputType->isInteractiveContent();
1789 } 1787 }
1790 1788
1791 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1792 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1789 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1793 { 1790 {
1794 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1791 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1795 } 1792 }
1796 #endif
1797 1793
1798 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue) 1794 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue)
1799 { 1795 {
1800 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ; 1796 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ;
1801 } 1797 }
1802 1798
1803 void HTMLInputElement::didNotifySubtreeInsertionsToDocument() 1799 void HTMLInputElement::didNotifySubtreeInsertionsToDocument()
1804 { 1800 {
1805 listAttributeTargetChanged(); 1801 listAttributeTargetChanged();
1806 } 1802 }
1807 1803
1808 AXObject* HTMLInputElement::popupRootAXObject() 1804 AXObject* HTMLInputElement::popupRootAXObject()
1809 { 1805 {
1810 return m_inputTypeView->popupRootAXObject(); 1806 return m_inputTypeView->popupRootAXObject();
1811 } 1807 }
1812 1808
1809 void HTMLInputElement::ensureFallbackContent()
1810 {
1811 m_inputTypeView->ensureFallbackContent();
1812 }
1813
1814 void HTMLInputElement::ensurePrimaryContent()
1815 {
1816 m_inputTypeView->ensurePrimaryContent();
1817 }
1818
1813 } // namespace 1819 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698