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

Unified Diff: Source/core/html/HTMLObjectElement.h

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLNameCollection.cpp ('k') | Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLObjectElement.h
diff --git a/Source/core/html/HTMLObjectElement.h b/Source/core/html/HTMLObjectElement.h
index e0a00261fd4de2f8e40682a7cae30d03bf434419..b02d38fab2a57da38c4101fa22cf9a95413f7d85 100644
--- a/Source/core/html/HTMLObjectElement.h
+++ b/Source/core/html/HTMLObjectElement.h
@@ -122,6 +122,16 @@ inline const HTMLObjectElement* toHTMLObjectElement(const FormAssociatedElement*
return objectElement;
}
+inline const HTMLObjectElement& toHTMLObjectElement(const FormAssociatedElement& element)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!element.isFormControlElement());
+ const HTMLObjectElement& objectElement = static_cast<const HTMLObjectElement&>(element);
+ // We need to assert after the cast because FormAssociatedElement doesn't
+ // have hasTagName.
+ ASSERT_WITH_SECURITY_IMPLICATION(objectElement.hasTagName(HTMLNames::objectTag));
+ return objectElement;
+}
+
}
#endif
« no previous file with comments | « Source/core/html/HTMLNameCollection.cpp ('k') | Source/core/html/HTMLOptionElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698