Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1050)

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 752713002: Make getComputedStyle throw for incorrect first parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address issues Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 8f0526c6ef991b3ebcedfe68ac7414235c1be00a..c6e43ae7b0383c30f2ab81e5a0b8e8aa59865238 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -1384,9 +1384,7 @@ StyleMedia* LocalDOMWindow::styleMedia() const
PassRefPtrWillBeRawPtr<CSSStyleDeclaration> LocalDOMWindow::getComputedStyle(Element* elt, const String& pseudoElt) const
{
- if (!elt)
- return nullptr;
-
+ ASSERT(elt);
return CSSComputedStyleDeclaration::create(elt, false, pseudoElt);
}
« no previous file with comments | « LayoutTests/fast/css/getComputedStyle/computed-style-non-element-parameter-expected.txt ('k') | Source/core/frame/Window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698