<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[203623] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/203623">203623</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-07-22 15:56:15 -0700 (Fri, 22 Jul 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>First parameter to Window.getComputedStyle() should be mandatory and non-nullable
https://bugs.webkit.org/show_bug.cgi?id=160097
Reviewed by Ryosuke Niwa.
Source/WebCore:
First parameter to Window.getComputedStyle() should be mandatory and
non-nullable:
- https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
Firefox and Chrome agree with the specification.
Test: fast/dom/Window/getComputedStyle-missing-parameter.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
(WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::copyProperties):
(WebCore::CSSComputedStyleDeclaration::length):
(WebCore::CSSComputedStyleDeclaration::item):
(WebCore::CSSComputedStyleDeclaration::getPropertyValue):
* css/CSSComputedStyleDeclaration.h:
* dom/Document.idl:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getComputedStyle):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* testing/Internals.cpp:
(WebCore::Internals::computedStyleIncludingVisitedInfo):
* testing/Internals.h:
* testing/Internals.idl:
LayoutTests:
Add test coverage.
* fast/dom/Window/getComputedStyle-missing-parameter-expected.txt: Added.
* fast/dom/Window/getComputedStyle-missing-parameter.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationh">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentidl">trunk/Source/WebCore/dom/Document.idl</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorCSSAgentcpp">trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomWindowgetComputedStylemissingparameterexpectedtxt">trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowgetComputedStylemissingparameterhtml">trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/LayoutTests/ChangeLog        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-07-22 Chris Dumez <cdumez@apple.com>
+
+ First parameter to Window.getComputedStyle() should be mandatory and non-nullable
+ https://bugs.webkit.org/show_bug.cgi?id=160097
+
+ Reviewed by Ryosuke Niwa.
+
+ Add test coverage.
+
+ * fast/dom/Window/getComputedStyle-missing-parameter-expected.txt: Added.
+ * fast/dom/Window/getComputedStyle-missing-parameter.html: Added.
+
</ins><span class="cx"> 2016-07-22 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Marking webaudio/audionode-connect-order.html as a flaky crash on mac-wk1 debug
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetComputedStylemissingparameterexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt (0 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter-expected.txt        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Test that the first parameter to Window.getComputedStyle() is mandatory and not nullable.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS window.getComputedStyle() threw exception TypeError: Not enough arguments.
+PASS window.getComputedStyle(null) threw exception TypeError: Argument 1 ('element') to DOMWindow.getComputedStyle must be an instance of Element.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowgetComputedStylemissingparameterhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter.html (0 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/Window/getComputedStyle-missing-parameter.html        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../resources/js-test-pre.js"></script>
+<script>
+description("Test that the first parameter to Window.getComputedStyle() is mandatory and not nullable.");
+
+shouldThrow("window.getComputedStyle()", "'TypeError: Not enough arguments'");
+shouldThrow("window.getComputedStyle(null)", "'TypeError: Argument 1 (\\'element\\') to DOMWindow.getComputedStyle must be an instance of Element'");
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/ChangeLog        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2016-07-22 Chris Dumez <cdumez@apple.com>
+
+ First parameter to Window.getComputedStyle() should be mandatory and non-nullable
+ https://bugs.webkit.org/show_bug.cgi?id=160097
+
+ Reviewed by Ryosuke Niwa.
+
+ First parameter to Window.getComputedStyle() should be mandatory and
+ non-nullable:
+ - https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
+
+ Firefox and Chrome agree with the specification.
+
+ Test: fast/dom/Window/getComputedStyle-missing-parameter.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
+ (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ (WebCore::CSSComputedStyleDeclaration::copyProperties):
+ (WebCore::CSSComputedStyleDeclaration::length):
+ (WebCore::CSSComputedStyleDeclaration::item):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
+ * css/CSSComputedStyleDeclaration.h:
+ * dom/Document.idl:
+ * inspector/InspectorCSSAgent.cpp:
+ (WebCore::InspectorCSSAgent::getComputedStyleForNode):
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::getComputedStyle):
+ * page/DOMWindow.h:
+ * page/DOMWindow.idl:
+ * testing/Internals.cpp:
+ (WebCore::Internals::computedStyleIncludingVisitedInfo):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
</ins><span class="cx"> 2016-07-22 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> Removing IndexedDatabases that have stored blobs doesn't remove the blob files.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -1581,8 +1581,8 @@
</span><span class="cx"> return CSSLineBoxContainValue::create(lineBoxContain);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ComputedStyleExtractor::ComputedStyleExtractor(PassRefPtr<Node> node, bool allowVisitedStyle, PseudoId pseudoElementSpecifier)
- : m_node(node)
</del><ins>+ComputedStyleExtractor::ComputedStyleExtractor(RefPtr<Node>&& node, bool allowVisitedStyle, PseudoId pseudoElementSpecifier)
+ : m_node(WTFMove(node))
</ins><span class="cx"> , m_pseudoElementSpecifier(pseudoElementSpecifier)
</span><span class="cx"> , m_allowVisitedStyle(allowVisitedStyle)
</span><span class="cx"> {
</span><span class="lines">@@ -1589,8 +1589,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-CSSComputedStyleDeclaration::CSSComputedStyleDeclaration(PassRefPtr<Node> n, bool allowVisitedStyle, const String& pseudoElementName)
- : m_node(n)
</del><ins>+CSSComputedStyleDeclaration::CSSComputedStyleDeclaration(Element& element, bool allowVisitedStyle, const String& pseudoElementName)
+ : m_element(element)
</ins><span class="cx"> , m_allowVisitedStyle(allowVisitedStyle)
</span><span class="cx"> , m_refCount(1)
</span><span class="cx"> {
</span><span class="lines">@@ -2322,12 +2322,12 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID, EUpdateLayout updateLayout) const
</span><span class="cx"> {
</span><del>- return ComputedStyleExtractor(m_node, m_allowVisitedStyle, m_pseudoElementSpecifier).propertyValue(propertyID, updateLayout);
</del><ins>+ return ComputedStyleExtractor(m_element.copyRef(), m_allowVisitedStyle, m_pseudoElementSpecifier).propertyValue(propertyID, updateLayout);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Ref<MutableStyleProperties> CSSComputedStyleDeclaration::copyProperties() const
</span><span class="cx"> {
</span><del>- return ComputedStyleExtractor(m_node, m_allowVisitedStyle, m_pseudoElementSpecifier).copyProperties();
</del><ins>+ return ComputedStyleExtractor(m_element.copyRef(), m_allowVisitedStyle, m_pseudoElementSpecifier).copyProperties();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline bool nodeOrItsAncestorNeedsStyleRecalc(const Node& node)
</span><span class="lines">@@ -3944,13 +3944,10 @@
</span><span class="cx">
</span><span class="cx"> unsigned CSSComputedStyleDeclaration::length() const
</span><span class="cx"> {
</span><del>- Node* node = m_node.get();
- if (!node)
- return 0;
</del><ins>+ auto& element = m_element.get();
+ updateStyleIfNeededForNode(element);
</ins><span class="cx">
</span><del>- updateStyleIfNeededForNode(*node);
-
- auto* style = node->computedStyle(m_pseudoElementSpecifier);
</del><ins>+ auto* style = const_cast<Element&>(element).computedStyle(m_pseudoElementSpecifier);
</ins><span class="cx"> if (!style)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><span class="lines">@@ -3965,11 +3962,8 @@
</span><span class="cx"> if (i < numComputedProperties)
</span><span class="cx"> return getPropertyNameString(computedProperties[i]);
</span><span class="cx">
</span><del>- Node* node = m_node.get();
- if (!node)
- return String();
-
- auto* style = node->computedStyle(m_pseudoElementSpecifier);
</del><ins>+ auto& element = m_element.get();
+ auto* style = const_cast<Element&>(element).computedStyle(m_pseudoElementSpecifier);
</ins><span class="cx"> if (!style)
</span><span class="cx"> return String();
</span><span class="cx">
</span><span class="lines">@@ -4073,7 +4067,7 @@
</span><span class="cx"> RefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(const String& propertyName)
</span><span class="cx"> {
</span><span class="cx"> if (isCustomPropertyName(propertyName))
</span><del>- return ComputedStyleExtractor(m_node, m_allowVisitedStyle, m_pseudoElementSpecifier).customPropertyValue(propertyName);
</del><ins>+ return ComputedStyleExtractor(m_element.copyRef(), m_allowVisitedStyle, m_pseudoElementSpecifier).customPropertyValue(propertyName);
</ins><span class="cx">
</span><span class="cx"> CSSPropertyID propertyID = cssPropertyID(propertyName);
</span><span class="cx"> if (!propertyID)
</span><span class="lines">@@ -4085,7 +4079,7 @@
</span><span class="cx"> String CSSComputedStyleDeclaration::getPropertyValue(const String &propertyName)
</span><span class="cx"> {
</span><span class="cx"> if (isCustomPropertyName(propertyName))
</span><del>- return ComputedStyleExtractor(m_node, m_allowVisitedStyle, m_pseudoElementSpecifier).customPropertyText(propertyName);
</del><ins>+ return ComputedStyleExtractor(m_element.copyRef(), m_allowVisitedStyle, m_pseudoElementSpecifier).customPropertyText(propertyName);
</ins><span class="cx">
</span><span class="cx"> CSSPropertyID propertyID = cssPropertyID(propertyName);
</span><span class="cx"> if (!propertyID)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> class CSSPrimitiveValue;
</span><span class="cx"> class CSSValueList;
</span><span class="cx"> class Color;
</span><ins>+class Element;
</ins><span class="cx"> class FilterOperations;
</span><span class="cx"> class MutableStyleProperties;
</span><span class="cx"> class Node;
</span><span class="lines">@@ -47,7 +48,7 @@
</span><span class="cx">
</span><span class="cx"> class ComputedStyleExtractor {
</span><span class="cx"> public:
</span><del>- ComputedStyleExtractor(PassRefPtr<Node>, bool allowVisitedStyle = false, PseudoId = NOPSEUDO);
</del><ins>+ ComputedStyleExtractor(RefPtr<Node>&&, bool allowVisitedStyle = false, PseudoId = NOPSEUDO);
</ins><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> propertyValue(CSSPropertyID, EUpdateLayout = UpdateLayout) const;
</span><span class="cx"> String customPropertyText(const String& propertyName) const;
</span><span class="lines">@@ -87,9 +88,9 @@
</span><span class="cx">
</span><span class="cx"> class CSSComputedStyleDeclaration final : public CSSStyleDeclaration {
</span><span class="cx"> public:
</span><del>- static Ref<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node, bool allowVisitedStyle = false, const String& pseudoElementName = String())
</del><ins>+ static Ref<CSSComputedStyleDeclaration> create(Element& element, bool allowVisitedStyle = false, const String& pseudoElementName = String())
</ins><span class="cx"> {
</span><del>- return adoptRef(*new CSSComputedStyleDeclaration(node, allowVisitedStyle, pseudoElementName));
</del><ins>+ return adoptRef(*new CSSComputedStyleDeclaration(element, allowVisitedStyle, pseudoElementName));
</ins><span class="cx"> }
</span><span class="cx"> virtual ~CSSComputedStyleDeclaration();
</span><span class="cx">
</span><span class="lines">@@ -99,7 +100,7 @@
</span><span class="cx"> String getPropertyValue(CSSPropertyID) const;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WEBCORE_EXPORT CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const String&);
</del><ins>+ WEBCORE_EXPORT CSSComputedStyleDeclaration(Element&, bool allowVisitedStyle, const String&);
</ins><span class="cx">
</span><span class="cx"> // CSSOM functions. Don't make these public.
</span><span class="cx"> CSSRule* parentRule() const override;
</span><span class="lines">@@ -121,7 +122,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateLayout = UpdateLayout) const;
</span><span class="cx">
</span><del>- RefPtr<Node> m_node;
</del><ins>+ Ref<Element> m_element;
</ins><span class="cx"> PseudoId m_pseudoElementSpecifier;
</span><span class="cx"> bool m_allowVisitedStyle;
</span><span class="cx"> unsigned m_refCount;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.idl (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.idl        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/dom/Document.idl        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -219,8 +219,7 @@
</span><span class="cx">
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
</span><span class="cx"> // DOM Level 2 Style Interface
</span><del>- [ObjCLegacyUnnamedParameters, ObjCUseDefaultView] CSSStyleDeclaration getComputedStyle(Element? element,
- DOMString pseudoElement);
</del><ins>+ [ObjCLegacyUnnamedParameters, ObjCUseDefaultView] CSSStyleDeclaration getComputedStyle(Element element, DOMString pseudoElement);
</ins><span class="cx">
</span><span class="cx"> // WebKit extension
</span><span class="cx"> // FIXME: remove the first version once optional is implemented for Objective-C.
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -643,7 +643,7 @@
</span><span class="cx"> if (!element)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(element, true);
</del><ins>+ RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(*element, true);
</ins><span class="cx"> Ref<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), computedStyleInfo, nullptr);
</span><span class="cx"> style = inspectorStyle->buildArrayForComputedStyle();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/page/DOMWindow.cpp        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -1396,11 +1396,8 @@
</span><span class="cx"> return m_media;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSStyleDeclaration> DOMWindow::getComputedStyle(Element* element, const String& pseudoElt) const
</del><ins>+RefPtr<CSSStyleDeclaration> DOMWindow::getComputedStyle(Element& element, const String& pseudoElt) const
</ins><span class="cx"> {
</span><del>- if (!element)
- return nullptr;
-
</del><span class="cx"> return CSSComputedStyleDeclaration::create(element, false, pseudoElt);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/page/DOMWindow.h        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">
</span><span class="cx"> // DOM Level 2 Style Interface
</span><span class="cx">
</span><del>- RefPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String& pseudoElt) const;
</del><ins>+ RefPtr<CSSStyleDeclaration> getComputedStyle(Element&, const String& pseudoElt) const;
</ins><span class="cx">
</span><span class="cx"> // WebKit extensions
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> readonly attribute StyleMedia styleMedia;
</span><span class="cx">
</span><span class="cx"> // DOM Level 2 Style Interface
</span><del>- CSSStyleDeclaration getComputedStyle(optional Element? element = null, optional DOMString? pseudoElement = null);
</del><ins>+ [NewObject] CSSStyleDeclaration getComputedStyle(Element element, optional DOMString? pseudoElement = null);
</ins><span class="cx">
</span><span class="cx"> // WebKit extensions
</span><span class="cx"> #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -783,10 +783,10 @@
</span><span class="cx"> return element.renderer() && element.renderer()->hasPausedImageAnimations();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node& node) const
</del><ins>+RefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Element& element) const
</ins><span class="cx"> {
</span><span class="cx"> bool allowVisitedStyle = true;
</span><del>- return CSSComputedStyleDeclaration::create(&node, allowVisitedStyle);
</del><ins>+ return CSSComputedStyleDeclaration::create(element, allowVisitedStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Node* Internals::ensureShadowRoot(Element& host, ExceptionCode& ec)
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/testing/Internals.h        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> void clearPageCache();
</span><span class="cx"> unsigned pageCacheSize() const;
</span><span class="cx">
</span><del>- RefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Node&) const;
</del><ins>+ RefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Element&) const;
</ins><span class="cx">
</span><span class="cx"> Node* ensureShadowRoot(Element& host, ExceptionCode&);
</span><span class="cx"> Node* ensureUserAgentShadowRoot(Element& host);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (203622 => 203623)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-07-22 22:32:01 UTC (rev 203622)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-07-22 22:56:15 UTC (rev 203623)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> void clearPageCache();
</span><span class="cx"> unsigned long pageCacheSize();
</span><span class="cx">
</span><del>- CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
</del><ins>+ CSSStyleDeclaration computedStyleIncludingVisitedInfo(Element element);
</ins><span class="cx">
</span><span class="cx"> [RaisesException] Node ensureShadowRoot(Element host);
</span><span class="cx"> Node ensureUserAgentShadowRoot(Element host);
</span></span></pre>
</div>
</div>
</body>
</html>