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

Side by Side 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 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 1377
1378 StyleMedia* LocalDOMWindow::styleMedia() const 1378 StyleMedia* LocalDOMWindow::styleMedia() const
1379 { 1379 {
1380 if (!m_media) 1380 if (!m_media)
1381 m_media = StyleMedia::create(frame()); 1381 m_media = StyleMedia::create(frame());
1382 return m_media.get(); 1382 return m_media.get();
1383 } 1383 }
1384 1384
1385 PassRefPtrWillBeRawPtr<CSSStyleDeclaration> LocalDOMWindow::getComputedStyle(Ele ment* elt, const String& pseudoElt) const 1385 PassRefPtrWillBeRawPtr<CSSStyleDeclaration> LocalDOMWindow::getComputedStyle(Ele ment* elt, const String& pseudoElt) const
1386 { 1386 {
1387 if (!elt) 1387 ASSERT(elt);
1388 return nullptr;
1389
1390 return CSSComputedStyleDeclaration::create(elt, false, pseudoElt); 1388 return CSSComputedStyleDeclaration::create(elt, false, pseudoElt);
1391 } 1389 }
1392 1390
1393 PassRefPtrWillBeRawPtr<CSSRuleList> LocalDOMWindow::getMatchedCSSRules(Element* element, const String& pseudoElement) const 1391 PassRefPtrWillBeRawPtr<CSSRuleList> LocalDOMWindow::getMatchedCSSRules(Element* element, const String& pseudoElement) const
1394 { 1392 {
1395 if (!element) 1393 if (!element)
1396 return nullptr; 1394 return nullptr;
1397 1395
1398 if (!isCurrentlyDisplayedInFrame()) 1396 if (!isCurrentlyDisplayedInFrame())
1399 return nullptr; 1397 return nullptr;
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 return m_frameObserver->frame(); 2015 return m_frameObserver->frame();
2018 } 2016 }
2019 2017
2020 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) 2018 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate)
2021 { 2019 {
2022 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. 2020 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8].
2023 return v8::Handle<v8::Object>(); 2021 return v8::Handle<v8::Object>();
2024 } 2022 }
2025 2023
2026 } // namespace blink 2024 } // namespace blink
OLDNEW
« 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