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

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

Issue 569993002: <label> should support form association by parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLLabelElement.cpp ('k') | Source/core/html/HTMLTagNames.in » ('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 2180dd04e81bf0248d4e6f3d580f6d012440dae8..17cf05e3cd66fbcbaee37e986691a56e11807abd 100644
--- a/Source/core/html/HTMLObjectElement.h
+++ b/Source/core/html/HTMLObjectElement.h
@@ -127,6 +127,7 @@ template<typename T> inline const T* toElement(const FormAssociatedElement*);
template<> inline const HTMLObjectElement* toElement<HTMLObjectElement>(const FormAssociatedElement* element)
{
ASSERT_WITH_SECURITY_IMPLICATION(!element || !element->isFormControlElement());
+ ASSERT_WITH_SECURITY_IMPLICATION(!element || !element->isLabelElement());
const HTMLObjectElement* objectElement = static_cast<const HTMLObjectElement*>(element);
// We need to assert after the cast because FormAssociatedElement doesn't
// have hasTagName.
@@ -137,6 +138,7 @@ template<> inline const HTMLObjectElement* toElement<HTMLObjectElement>(const Fo
template<> inline const HTMLObjectElement& toElement<HTMLObjectElement>(const FormAssociatedElement& element)
{
ASSERT_WITH_SECURITY_IMPLICATION(!element.isFormControlElement());
+ ASSERT_WITH_SECURITY_IMPLICATION(!element.isLabelElement());
const HTMLObjectElement& objectElement = static_cast<const HTMLObjectElement&>(element);
// We need to assert after the cast because FormAssociatedElement doesn't
// have hasTagName.
« no previous file with comments | « Source/core/html/HTMLLabelElement.cpp ('k') | Source/core/html/HTMLTagNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698