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

Unified Diff: third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.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/forms/MultipleFieldsTemporalInputTypeView.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp b/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp
index daf8bad72a409ef8364d293ea19162fa7ca6ae0d..ce41b36c4c203d903a852cc4a1c04dc45e800aa4 100644
--- a/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp
+++ b/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp
@@ -133,25 +133,28 @@ bool DateTimeFormatValidator::validateFormat(
DateTimeEditElement* MultipleFieldsTemporalInputTypeView::dateTimeEditElement()
const {
- return toDateTimeEditElement(element().userAgentShadowRoot()->getElementById(
- ShadowElementNames::dateTimeEdit()));
+ return toDateTimeEditElementOrDie(
+ element().userAgentShadowRoot()->getElementById(
+ ShadowElementNames::dateTimeEdit()));
}
SpinButtonElement* MultipleFieldsTemporalInputTypeView::spinButtonElement()
const {
- return toSpinButtonElement(element().userAgentShadowRoot()->getElementById(
- ShadowElementNames::spinButton()));
+ return toSpinButtonElementOrDie(
+ element().userAgentShadowRoot()->getElementById(
+ ShadowElementNames::spinButton()));
}
ClearButtonElement* MultipleFieldsTemporalInputTypeView::clearButtonElement()
const {
- return toClearButtonElement(element().userAgentShadowRoot()->getElementById(
- ShadowElementNames::clearButton()));
+ return toClearButtonElementOrDie(
+ element().userAgentShadowRoot()->getElementById(
+ ShadowElementNames::clearButton()));
}
PickerIndicatorElement*
MultipleFieldsTemporalInputTypeView::pickerIndicatorElement() const {
- return toPickerIndicatorElement(
+ return toPickerIndicatorElementOrDie(
element().userAgentShadowRoot()->getElementById(
ShadowElementNames::pickerIndicator()));
}

Powered by Google App Engine
This is Rietveld 408576698