Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
index dc8ac7c79b0d98ee9c0ea2845c48c93daf9c35fd..85bfb8205062021275554bff6ea1b67f6d558e71 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp |
@@ -342,7 +342,7 @@ void HTMLInputElement::updateFocusAppearance(SelectionBehaviorOnFocus selectionB |
// TODO(tkent): scrollRectToVisible is a workaround of a bug of |
// FrameSelection::revealSelection(). It doesn't scroll correctly in a |
// case of RangeSelection. crbug.com/443061. |
- if (layoutObject()) |
+ if (hasLayoutObject()) |
layoutObject()->scrollRectToVisible(boundingBox()); |
if (document().frame()) |
document().frame()->selection().revealSelection(); |
@@ -893,7 +893,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB |
if (RadioButtonGroupScope* scope = radioButtonGroupScope()) |
scope->updateCheckedState(this); |
- if (layoutObject()) |
+ if (hasLayoutObject()) |
LayoutTheme::theme().controlStateChanged(*layoutObject(), CheckedControlState); |
setNeedsValidityCheck(); |
@@ -901,7 +901,7 @@ void HTMLInputElement::setChecked(bool nowChecked, TextFieldEventBehavior eventB |
// Ideally we'd do this from the layout tree (matching |
// LayoutTextView), but it's not possible to do it at the moment |
// because of the way the code is structured. |
- if (layoutObject()) { |
+ if (hasLayoutObject()) { |
if (AXObjectCache* cache = layoutObject()->document().existingAXObjectCache()) |
cache->checkedStateChanged(this); |
} |
@@ -929,7 +929,7 @@ void HTMLInputElement::setIndeterminate(bool newValue) |
pseudoStateChanged(CSSSelector::PseudoIndeterminate); |
- if (layoutObject()) |
+ if (hasLayoutObject()) |
LayoutTheme::theme().controlStateChanged(*layoutObject(), CheckedControlState); |
} |
@@ -1412,7 +1412,7 @@ void HTMLInputElement::setCanReceiveDroppedFiles(bool canReceiveDroppedFiles) |
if (!!m_canReceiveDroppedFiles == canReceiveDroppedFiles) |
return; |
m_canReceiveDroppedFiles = canReceiveDroppedFiles; |
- if (layoutObject()) |
+ if (hasLayoutObject()) |
layoutObject()->updateFromElement(); |
} |