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 9413e11c80503879e1f35e758ba316ad110329ec..71a4a4b1f4c73a1bc7050fd7ad583f651ab42692 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -2887,7 +2887,7 @@ const ComputedStyle* Element::ensureComputedStyle(PseudoId pseudoElementSpecifie |
if (PseudoElement* element = pseudoElement(pseudoElementSpecifier)) |
return element->ensureComputedStyle(); |
- if (!inActiveDocument()) { |
+ if (!inActiveDocument() && document().frame()) { |
esprehn
2016/09/26 22:23:37
This is not correct, it means we don't return null
|
// FIXME: Try to do better than this. Ensure that styleForElement() works for elements that are not in the |
// document tree and figure out when to destroy the computed style for such elements. |
return nullptr; |