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

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

Issue 2534873004: Avoid unchecked casts in UA shadow DOM. (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/html/TextControlElement.cpp
diff --git a/third_party/WebKit/Source/core/html/TextControlElement.cpp b/third_party/WebKit/Source/core/html/TextControlElement.cpp
index 309427990f1212e56ab1413748eca60b3f9a0132..45ad336016f88854fadcafba42d86fab1b5a543f 100644
--- a/third_party/WebKit/Source/core/html/TextControlElement.cpp
+++ b/third_party/WebKit/Source/core/html/TextControlElement.cpp
@@ -163,7 +163,7 @@ bool TextControlElement::placeholderShouldBeVisible() const {
}
HTMLElement* TextControlElement::placeholderElement() const {
- return toHTMLElement(
+ return toHTMLElementOrDie(
userAgentShadowRoot()->getElementById(ShadowElementNames::placeholder()));
}
@@ -900,7 +900,7 @@ String TextControlElement::directionForFormData() const {
}
HTMLElement* TextControlElement::innerEditorElement() const {
- return toHTMLElement(
+ return toHTMLElementOrDie(
userAgentShadowRoot()->getElementById(ShadowElementNames::innerEditor()));
}

Powered by Google App Engine
This is Rietveld 408576698