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

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, 3 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 , m_stateRestored(false) 119 , m_stateRestored(false)
120 , m_parsingInProgress(createdByParser) 120 , m_parsingInProgress(createdByParser)
121 , m_valueAttributeWasUpdatedAfterParsing(false) 121 , m_valueAttributeWasUpdatedAfterParsing(false)
122 , m_canReceiveDroppedFiles(false) 122 , m_canReceiveDroppedFiles(false)
123 , m_hasTouchEventHandler(false) 123 , m_hasTouchEventHandler(false)
124 , m_shouldRevealPassword(false) 124 , m_shouldRevealPassword(false)
125 , m_needsToUpdateViewValue(true) 125 , m_needsToUpdateViewValue(true)
126 , m_inputType(InputType::createText(*this)) 126 , m_inputType(InputType::createText(*this))
127 , m_inputTypeView(m_inputType) 127 , m_inputTypeView(m_inputType)
128 { 128 {
129 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
130 setHasCustomStyleCallbacks(); 129 setHasCustomStyleCallbacks();
131 #endif
132 ScriptWrappable::init(this); 130 ScriptWrappable::init(this);
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
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 bool HTMLInputElement::isInteractiveContent() const 1869 bool HTMLInputElement::isInteractiveContent() const
1872 { 1870 {
1873 return m_inputType->isInteractiveContent(); 1871 return m_inputType->isInteractiveContent();
1874 } 1872 }
1875 1873
1876 bool HTMLInputElement::supportsAutofocus() const 1874 bool HTMLInputElement::supportsAutofocus() const
1877 { 1875 {
1878 return m_inputType->isInteractiveContent(); 1876 return m_inputType->isInteractiveContent();
1879 } 1877 }
1880 1878
1881 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1882 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1879 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1883 { 1880 {
1884 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1881 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1885 } 1882 }
1886 #endif
1887 1883
1888 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue) 1884 bool HTMLInputElement::shouldDispatchFormControlChangeEvent(String& oldValue, St ring& newValue)
1889 { 1885 {
1890 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ; 1886 return m_inputType->shouldDispatchFormControlChangeEvent(oldValue, newValue) ;
1891 } 1887 }
1892 1888
1893 void HTMLInputElement::didNotifySubtreeInsertionsToDocument() 1889 void HTMLInputElement::didNotifySubtreeInsertionsToDocument()
1894 { 1890 {
1895 listAttributeTargetChanged(); 1891 listAttributeTargetChanged();
1896 } 1892 }
1897 1893
1898 AXObject* HTMLInputElement::popupRootAXObject() 1894 AXObject* HTMLInputElement::popupRootAXObject()
1899 { 1895 {
1900 return m_inputTypeView->popupRootAXObject(); 1896 return m_inputTypeView->popupRootAXObject();
1901 } 1897 }
1902 1898
1899 void HTMLInputElement::ensureFallbackContent()
1900 {
1901 m_inputTypeView->ensureFallbackContent();
1902 }
1903
1904 void HTMLInputElement::ensurePrimaryContent()
1905 {
1906 m_inputTypeView->ensurePrimaryContent();
1907 }
1908
1903 } // namespace 1909 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698