Commit d6cc8b72 authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

Add null check to LayoutSliderContainer::HasVerticalAppearance

Bug: 769681
Change-Id: I28e9597aa2d1888f9890bb37d536b1e3b3886330
Reviewed-on: https://chromium-review.googlesource.com/692956Reviewed-by: default avatarStefan Zager <szager@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505897}
parent aa87453f
...@@ -53,8 +53,9 @@ inline static Decimal SliderPosition(HTMLInputElement* element) { ...@@ -53,8 +53,9 @@ inline static Decimal SliderPosition(HTMLInputElement* element) {
inline static bool HasVerticalAppearance(HTMLInputElement* input) { inline static bool HasVerticalAppearance(HTMLInputElement* input) {
DCHECK(input->GetLayoutObject()); DCHECK(input->GetLayoutObject());
if (!input->GetLayoutObject() || !input->GetLayoutObject()->Style())
return false;
const ComputedStyle& slider_style = input->GetLayoutObject()->StyleRef(); const ComputedStyle& slider_style = input->GetLayoutObject()->StyleRef();
return slider_style.Appearance() == kSliderVerticalPart; return slider_style.Appearance() == kSliderVerticalPart;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment