Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index 1e9ac996a103133d46428a7536e41ccbf27841a7..797067e60f483a97f23dd6d03d0e9df8d97dac07 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -2477,6 +2477,11 @@ void Element::updateFocusAppearance(SelectionBehaviorOnFocus selectionBehavior) |
// Passing DoNotSetFocus as this function is called after FocusController::setFocusedElement() |
// and we don't want to change the focus to a new Element. |
frame->selection().setSelection(newSelection, FrameSelection::CloseTyping | FrameSelection::ClearTypingStyle | FrameSelection::DoNotSetFocus); |
+ |
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
+ // needs to be audited. See http://crbug.com/590369 for more details. |
+ document().updateStyleAndLayoutIgnorePendingStylesheets(); |
+ |
frame->selection().revealSelection(); |
} else if (layoutObject() && !layoutObject()->isLayoutPart()) { |
layoutObject()->scrollRectToVisible(boundingBox()); |