Chromium Code Reviews| 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 2fde2c526802721659102806ad693fc66f3f70b6..285fd9e6c74aeb6ed02e9ba7f36a74cf571ce477 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -2644,6 +2644,10 @@ void Element::focus(const FocusParams& params) { |
| if (!document().isActive()) |
| return; |
| + if (isFrameOwnerElement() && |
| + toHTMLFrameOwnerElement(this)->contentDocument()->unloadStarted()) |
|
tkent
2017/02/17 07:34:00
contnetDocument() might return nullptr.
|
| + return; |
| + |
| document().updateStyleAndLayoutIgnorePendingStylesheetsForNode(this); |
| if (!isFocusable()) |
| return; |