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

Unified Diff: third_party/WebKit/Source/core/html/HTMLImageElement.cpp

Issue 2557583003: Move Form Association Code to FormAssociated::associateWith (Closed)
Patch Set: Check for m_inputType before accessing it Created 4 years 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: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
index e5c5aaec361848087d4e54265076ad15ce5e47c9..5fb0fb85282aecaee2d4372c151e0708cd216c32 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
@@ -100,12 +100,6 @@ HTMLImageElement::HTMLImageElement(Document& document,
m_isFallbackImage(false),
m_referrerPolicy(ReferrerPolicyDefault) {
setHasCustomStyleCallbacks();
- if (form && form->isConnected()) {
- m_form = form;
- m_formWasSetByParser = true;
- m_form->associate(*this);
- m_form->didAssociateByParser();
- }
}
HTMLImageElement* HTMLImageElement::create(Document& document) {
@@ -892,6 +886,13 @@ IntSize HTMLImageElement::bitmapSourceSize() const {
return IntSize(lSize.width().toInt(), lSize.height().toInt());
}
-void HTMLImageElement::associateWith(HTMLFormElement*){};
+void HTMLImageElement::associateWith(HTMLFormElement* form) {
+ if (form && form->isConnected()) {
+ m_form = form;
+ m_formWasSetByParser = true;
+ m_form->associate(*this);
+ m_form->didAssociateByParser();
+ }
+};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698