<!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>[199539] 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/199539">199539</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2016-04-14 10:10:14 -0700 (Thu, 14 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove UsePointersEvenForNonNullableObjectArguments from Internals
https://bugs.webkit.org/show_bug.cgi?id=156539

Reviewed by Alex Christensen.

Source/WebCore:

* html/HTMLImageElement.idl: Exported this so it can be used as the type for
a function argument in Internals.idl.
* html/HTMLInputElement.idl: Ditto.
* html/HTMLLinkElement.idl: Ditto.
* html/HTMLSelectElement.idl: Ditto.

* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::InspectorStubFrontend): Take a Page&amp;.
(WebCore::Internals::create): Take a Document&amp;.
(WebCore::Internals::resetToConsistentState): Take a Page&amp;.
(WebCore::Internals::Internals): Take a Document&amp;.
(WebCore::Internals::settings): Use nullptr instead of 0.
(WebCore::Internals::address): Take a Node&amp;.
(WebCore::Internals::nodeNeedsStyleRecalc): Take a Node&amp; and no ExceptionCode&amp;.
(WebCore::Internals::styleChangeType): Ditto.
(WebCore::Internals::xhrResponseSource): Take an XMLHttpRequest&amp;.
(WebCore::Internals::isSharingStyleSheetContents): Take two
HTMLLinkElement&amp;.
(WebCore::Internals::isStyleSheetLoadingSubresources): Take an HTMLLinkElement&amp;.
(WebCore::Internals::imageFrameIndex): Take an HTMLImageElement&amp; and no
ExceptionCode&amp;. Also return an unsigned rather than size_t, since the IDL expects
unsigned long, which means unsigned in C++ code.
(WebCore::Internals::treeScopeRootNode): Take a Node&amp; and no ExceptionCode&amp;.
(WebCore::Internals::parentTreeScope): Ditto.
(WebCore::Internals::pauseAnimationAtTimeOnElement): Take an Element&amp;.
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::attached): Deleted.
(WebCore::Internals::elementRenderTreeAsText): Take an Element&amp;.
(WebCore::Internals::hasPausedImageAnimations): Take an Element&amp; and no
ExceptionCode&amp;.
(WebCore::Internals::computedStyleIncludingVisitedInfo): Take a Node&amp; and no
ExceptionCode&amp;.
(WebCore::Internals::ensureShadowRoot): Take an Element&amp;.
(WebCore::Internals::ensureUserAgentShadowRoot): Take an Element&amp; and no
ExceptionCode&amp;.
(WebCore::Internals::createShadowRoot): Take an Element&amp;.
(WebCore::Internals::shadowRoot): Take an Element&amp; and no ExceptionCode&amp;.
(WebCore::Internals::shadowRootType): Take a Node&amp;.
(WebCore::Internals::includerFor): Deleted.
(WebCore::Internals::shadowPseudoId): Take an Element&amp; and no ExceptionCode&amp;.
(WebCore::Internals::setShadowPseudoId): Ditto.
(WebCore::Internals::visiblePlaceholder): Take an Element&amp;.
(WebCore::Internals::selectColorInColorChooser): Take an HTMLInputElement&amp;.
(WebCore::Internals::boundingBox): Take an Element&amp; and no ExceptionCode&amp;.
(WebCore::Internals::markerCountForNode): Take a Node&amp;.
(WebCore::Internals::markerAt): Ditto.
(WebCore::Internals::markerRangeForNode): Ditto.
(WebCore::Internals::markerDescriptionForNode): Ditto.
(WebCore::Internals::addTextMatchMarker): Take a const Range&amp;.
(WebCore::Internals::setScrollViewPosition): Take int instead of long; long in
IDL means int in C++ code.
(WebCore::Internals::wasLastChangeUserEdit): Take an Element&amp;.
(WebCore::Internals::elementShouldAutoComplete): Take an HTMLInputElement&amp;.
(WebCore::Internals::setEditingValue): Take an HTMLInputElement&amp; and no
ExceptionCode&amp;.
(WebCore::Internals::setAutofilled): Ditto.
(WebCore::Internals::setShowAutoFillButton): Ditto.
(WebCore::Internals::scrollElementToRect): Take an Element&amp; and int instead of long.
(WebCore::Internals::autofillFieldName): Take an Element&amp;.
(WebCore::Internals::rangeFromLocationAndLength): Take an Element&amp; and no ExceptionCode&amp;.
(WebCore::Internals::locationFromRange): Ditto.
(WebCore::Internals::lengthFromRange): Take an Element&amp; and const Range&amp; and no
ExceptionCode&amp;.
(WebCore::Internals::rangeAsText): Take const Range&amp; an no ExceptionCode&amp;.
(WebCore::Internals::subrange): Take Range&amp; an no ExceptionCode&amp;.
(WebCore::Internals::nodesFromRect): Take a Document&amp;.
(WebCore::Internals::openDummyInspectorFrontend): Ditto.
(WebCore::Internals::layerTreeAsText): Take an Element&amp;.
(WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
(WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
(WebCore::Internals::displayListForElement): Ditto.
(WebCore::Internals::replayDisplayListForElement): Ditto.
(WebCore::Internals::counterValue): Ditto.
(WebCore::Internals::pageNumber): Ditto.
(WebCore::Internals::webkitWillEnterFullScreenForElement): Ditto.
(WebCore::Internals::webkitDidEnterFullScreenForElement): Ditto.
(WebCore::Internals::webkitWillExitFullScreenForElement): Ditto.
(WebCore::Internals::webkitDidExitFullScreenForElement): Ditto.
(WebCore::Internals::layerFlushCount): Return unsigned instead of unsigned long.
IDL unsigned long means unsigned in C++ code.
(WebCore::Internals::styleRecalcCount): Ditto.
(WebCore::Internals::compositingUpdateCount): Ditto.
(WebCore::Internals::deserializeBuffer): Take an ArrayBuffer&amp;.
(WebCore::Internals::markerTextForListItem): Take an Element&amp; and no ExceptionCode&amp;.
(WebCore::Internals::toolTipFromElement): Ditto.
(WebCore::Internals::getImageSourceURL): Ditto.
(WebCore::Internals::simulateAudioInterruption): Take an HTMLMediaElement&amp;.
(WebCore::Internals::mediaElementHasCharacteristic): Ditto.
(WebCore::Internals::isSelectPopupVisible): Take an HTMLSelectElement&amp;.
(WebCore::Internals::closestTimeToTimeRanges): Take a TimeRange&amp;.
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Take an Element&amp;.
(WebCore::Internals::isPluginSnapshotted): Take an Element&amp; and no ExceptionCode&amp;.
(WebCore::Internals::bufferedSamplesForTrackID): Take a SourceBuffer&amp;.
(WebCore::Internals::setShouldGenerateTimestamps): Ditto.
(WebCore::Internals::setMediaElementRestrictions): Take an HTMLMediaElement&amp;.
(WebCore::Internals::elementIsBlockingDisplaySleep): Take an HTMLMediaElement&amp;.
(WebCore::Internals::setAudioContextRestrictions): Take an AudioContext&amp;.
(WebCore::Internals::scrollSnapOffsets): Take an Element&amp;.
(WebCore::Internals::getCurrentMediaControlsStatusForElement): Take an HTMLMediaElement&amp;.
(WebCore::Internals::userVisibleString): Take a const DOMURL&amp;.
(WebCore::Internals::composedTreeAsText): Take a Node&amp;.

* testing/Internals.h: Update for all the changes listed above.

* testing/Internals.idl: Removed UsePointersEvenForNonNullableObjectArguments. Removed
many unneeded [RaisesException]. Used more specific types for many arguments. Removed
unused, and unimplemented, attached and includedFor functions. Made the node argument to
updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks nullable as well as optional.

* testing/Internals.mm:
(WebCore::Internals::userVisibleString): Take a const DOMURL&amp;.

* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject): Pass a Document&amp; rather than a Document*.
(WebCoreTestSupport::resetInternalsObject): Pass a Page&amp; rather than a Page*.

LayoutTests:

* fast/forms/color/input-color-onchange-event-expected.txt: Updated.
* fast/forms/color/input-color-onchange-event.html: Removed unneeded test of how the
internals object handles incorrect values passed to the test function. This wasn't testing
actual WebKit code at all, it was just a test of the internals object implementation.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastformscolorinputcoloronchangeeventexpectedtxt">trunk/LayoutTests/fast/forms/color/input-color-onchange-event-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformscolorinputcoloronchangeeventhtml">trunk/LayoutTests/fast/forms/color/input-color-onchange-event.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementidl">trunk/Source/WebCore/html/HTMLImageElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementidl">trunk/Source/WebCore/html/HTMLInputElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementidl">trunk/Source/WebCore/html/HTMLLinkElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementidl">trunk/Source/WebCore/html/HTMLSelectElement.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>
<li><a href="#trunkSourceWebCoretestingInternalsmm">trunk/Source/WebCore/testing/Internals.mm</a></li>
<li><a href="#trunkSourceWebCoretestingjsWebCoreTestSupportcpp">trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/LayoutTests/ChangeLog        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-04-14  Darin Adler  &lt;darin@apple.com&gt;
+
+        Remove UsePointersEvenForNonNullableObjectArguments from Internals
+        https://bugs.webkit.org/show_bug.cgi?id=156539
+
+        Reviewed by Alex Christensen.
+
+        * fast/forms/color/input-color-onchange-event-expected.txt: Updated.
+        * fast/forms/color/input-color-onchange-event.html: Removed unneeded test of how the
+        internals object handles incorrect values passed to the test function. This wasn't testing
+        actual WebKit code at all, it was just a test of the internals object implementation.
+
</ins><span class="cx"> 2016-04-14  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSP: Ignore report-only policy delivered via meta element
</span></span></pre></div>
<a id="trunkLayoutTestsfastformscolorinputcoloronchangeeventexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/color/input-color-onchange-event-expected.txt (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/color/input-color-onchange-event-expected.txt        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/LayoutTests/fast/forms/color/input-color-onchange-event-expected.txt        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -5,9 +5,6 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS onChangeCount is 0
</span><del>-internals.selectColorInColorChooser({}, '#ff0000');
-internals.selectColorInColorChooser(document, '#ff0000');
-PASS onChangeCount is 0
</del><span class="cx"> input event dispatched - value is:  #ff0000
</span><span class="cx"> change event dispatched - value changed to #ff0000
</span><span class="cx"> PASS onChangeCount is 1
</span></span></pre></div>
<a id="trunkLayoutTestsfastformscolorinputcoloronchangeeventhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/color/input-color-onchange-event.html (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/color/input-color-onchange-event.html        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/LayoutTests/fast/forms/color/input-color-onchange-event.html        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -35,10 +35,6 @@
</span><span class="cx"> eventSender.mouseUp();
</span><span class="cx"> 
</span><span class="cx"> shouldBe('onChangeCount', '0');
</span><del>-// Test that incorrect element arguments are (not) handled.
-evalAndLog(&quot;internals.selectColorInColorChooser({}, '#ff0000');&quot;);
-evalAndLog(&quot;internals.selectColorInColorChooser(document, '#ff0000');&quot;);
-shouldBe('onChangeCount', '0');
</del><span class="cx"> 
</span><span class="cx"> // input.onchange should be called
</span><span class="cx"> internals.selectColorInColorChooser(input, '#ff0000');
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/ChangeLog        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -1,3 +1,128 @@
</span><ins>+2016-04-14  Darin Adler  &lt;darin@apple.com&gt;
+
+        Remove UsePointersEvenForNonNullableObjectArguments from Internals
+        https://bugs.webkit.org/show_bug.cgi?id=156539
+
+        Reviewed by Alex Christensen.
+
+        * html/HTMLImageElement.idl: Exported this so it can be used as the type for
+        a function argument in Internals.idl.
+        * html/HTMLInputElement.idl: Ditto.
+        * html/HTMLLinkElement.idl: Ditto.
+        * html/HTMLSelectElement.idl: Ditto.
+
+        * testing/Internals.cpp:
+        (WebCore::InspectorStubFrontend::InspectorStubFrontend): Take a Page&amp;.
+        (WebCore::Internals::create): Take a Document&amp;.
+        (WebCore::Internals::resetToConsistentState): Take a Page&amp;.
+        (WebCore::Internals::Internals): Take a Document&amp;.
+        (WebCore::Internals::settings): Use nullptr instead of 0.
+        (WebCore::Internals::address): Take a Node&amp;.
+        (WebCore::Internals::nodeNeedsStyleRecalc): Take a Node&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::styleChangeType): Ditto.
+        (WebCore::Internals::xhrResponseSource): Take an XMLHttpRequest&amp;.
+        (WebCore::Internals::isSharingStyleSheetContents): Take two
+        HTMLLinkElement&amp;.
+        (WebCore::Internals::isStyleSheetLoadingSubresources): Take an HTMLLinkElement&amp;.
+        (WebCore::Internals::imageFrameIndex): Take an HTMLImageElement&amp; and no
+        ExceptionCode&amp;. Also return an unsigned rather than size_t, since the IDL expects
+        unsigned long, which means unsigned in C++ code.
+        (WebCore::Internals::treeScopeRootNode): Take a Node&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::parentTreeScope): Ditto.
+        (WebCore::Internals::pauseAnimationAtTimeOnElement): Take an Element&amp;.
+        (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
+        (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
+        (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
+        (WebCore::Internals::attached): Deleted.
+        (WebCore::Internals::elementRenderTreeAsText): Take an Element&amp;.
+        (WebCore::Internals::hasPausedImageAnimations): Take an Element&amp; and no
+        ExceptionCode&amp;.
+        (WebCore::Internals::computedStyleIncludingVisitedInfo): Take a Node&amp; and no
+        ExceptionCode&amp;.
+        (WebCore::Internals::ensureShadowRoot): Take an Element&amp;.
+        (WebCore::Internals::ensureUserAgentShadowRoot): Take an Element&amp; and no
+        ExceptionCode&amp;.
+        (WebCore::Internals::createShadowRoot): Take an Element&amp;.
+        (WebCore::Internals::shadowRoot): Take an Element&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::shadowRootType): Take a Node&amp;.
+        (WebCore::Internals::includerFor): Deleted.
+        (WebCore::Internals::shadowPseudoId): Take an Element&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::setShadowPseudoId): Ditto.
+        (WebCore::Internals::visiblePlaceholder): Take an Element&amp;.
+        (WebCore::Internals::selectColorInColorChooser): Take an HTMLInputElement&amp;.
+        (WebCore::Internals::boundingBox): Take an Element&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::markerCountForNode): Take a Node&amp;.
+        (WebCore::Internals::markerAt): Ditto.
+        (WebCore::Internals::markerRangeForNode): Ditto.
+        (WebCore::Internals::markerDescriptionForNode): Ditto.
+        (WebCore::Internals::addTextMatchMarker): Take a const Range&amp;.
+        (WebCore::Internals::setScrollViewPosition): Take int instead of long; long in
+        IDL means int in C++ code.
+        (WebCore::Internals::wasLastChangeUserEdit): Take an Element&amp;.
+        (WebCore::Internals::elementShouldAutoComplete): Take an HTMLInputElement&amp;.
+        (WebCore::Internals::setEditingValue): Take an HTMLInputElement&amp; and no
+        ExceptionCode&amp;.
+        (WebCore::Internals::setAutofilled): Ditto.
+        (WebCore::Internals::setShowAutoFillButton): Ditto.
+        (WebCore::Internals::scrollElementToRect): Take an Element&amp; and int instead of long.
+        (WebCore::Internals::autofillFieldName): Take an Element&amp;.
+        (WebCore::Internals::rangeFromLocationAndLength): Take an Element&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::locationFromRange): Ditto.
+        (WebCore::Internals::lengthFromRange): Take an Element&amp; and const Range&amp; and no
+        ExceptionCode&amp;.
+        (WebCore::Internals::rangeAsText): Take const Range&amp; an no ExceptionCode&amp;.
+        (WebCore::Internals::subrange): Take Range&amp; an no ExceptionCode&amp;.
+        (WebCore::Internals::nodesFromRect): Take a Document&amp;.
+        (WebCore::Internals::openDummyInspectorFrontend): Ditto.
+        (WebCore::Internals::layerTreeAsText): Take an Element&amp;.
+        (WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
+        (WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
+        (WebCore::Internals::displayListForElement): Ditto.
+        (WebCore::Internals::replayDisplayListForElement): Ditto.
+        (WebCore::Internals::counterValue): Ditto.
+        (WebCore::Internals::pageNumber): Ditto.
+        (WebCore::Internals::webkitWillEnterFullScreenForElement): Ditto.
+        (WebCore::Internals::webkitDidEnterFullScreenForElement): Ditto.
+        (WebCore::Internals::webkitWillExitFullScreenForElement): Ditto.
+        (WebCore::Internals::webkitDidExitFullScreenForElement): Ditto.
+        (WebCore::Internals::layerFlushCount): Return unsigned instead of unsigned long.
+        IDL unsigned long means unsigned in C++ code.
+        (WebCore::Internals::styleRecalcCount): Ditto.
+        (WebCore::Internals::compositingUpdateCount): Ditto.
+        (WebCore::Internals::deserializeBuffer): Take an ArrayBuffer&amp;.
+        (WebCore::Internals::markerTextForListItem): Take an Element&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::toolTipFromElement): Ditto.
+        (WebCore::Internals::getImageSourceURL): Ditto.
+        (WebCore::Internals::simulateAudioInterruption): Take an HTMLMediaElement&amp;.
+        (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
+        (WebCore::Internals::isSelectPopupVisible): Take an HTMLSelectElement&amp;.
+        (WebCore::Internals::closestTimeToTimeRanges): Take a TimeRange&amp;.
+        (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Take an Element&amp;.
+        (WebCore::Internals::isPluginSnapshotted): Take an Element&amp; and no ExceptionCode&amp;.
+        (WebCore::Internals::bufferedSamplesForTrackID): Take a SourceBuffer&amp;.
+        (WebCore::Internals::setShouldGenerateTimestamps): Ditto.
+        (WebCore::Internals::setMediaElementRestrictions): Take an HTMLMediaElement&amp;.
+        (WebCore::Internals::elementIsBlockingDisplaySleep): Take an HTMLMediaElement&amp;.
+        (WebCore::Internals::setAudioContextRestrictions): Take an AudioContext&amp;.
+        (WebCore::Internals::scrollSnapOffsets): Take an Element&amp;.
+        (WebCore::Internals::getCurrentMediaControlsStatusForElement): Take an HTMLMediaElement&amp;.
+        (WebCore::Internals::userVisibleString): Take a const DOMURL&amp;.
+        (WebCore::Internals::composedTreeAsText): Take a Node&amp;.
+
+        * testing/Internals.h: Update for all the changes listed above.
+
+        * testing/Internals.idl: Removed UsePointersEvenForNonNullableObjectArguments. Removed
+        many unneeded [RaisesException]. Used more specific types for many arguments. Removed
+        unused, and unimplemented, attached and includedFor functions. Made the node argument to
+        updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks nullable as well as optional.
+
+        * testing/Internals.mm:
+        (WebCore::Internals::userVisibleString): Take a const DOMURL&amp;.
+
+        * testing/js/WebCoreTestSupport.cpp:
+        (WebCoreTestSupport::injectInternalsObject): Pass a Document&amp; rather than a Document*.
+        (WebCoreTestSupport::resetInternalsObject): Pass a Page&amp; rather than a Page*.
+
</ins><span class="cx"> 2016-04-14  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         CSP: Ignore report-only policy delivered via meta element
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.idl (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.idl        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/html/HTMLImageElement.idl        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -19,6 +19,7 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><ins>+    ExportMacro=WEBCORE_EXPORT,
</ins><span class="cx">     JSGenerateToNativeObject,
</span><span class="cx"> ] interface HTMLImageElement : HTMLElement {
</span><span class="cx">     [Reflect] attribute DOMString name;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.idl        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -19,7 +19,10 @@
</span><span class="cx">  * Boston, MA 02110-1301, USA.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-interface HTMLInputElement : HTMLElement {
</del><ins>+[
+    ExportMacro=WEBCORE_EXPORT,
+    JSGenerateToNativeObject,
+] interface HTMLInputElement : HTMLElement {
</ins><span class="cx">     [Reflect] attribute DOMString accept;
</span><span class="cx">     [Reflect] attribute DOMString alt;
</span><span class="cx">     attribute DOMString autocomplete;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.idl (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.idl        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/html/HTMLLinkElement.idl        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -19,7 +19,10 @@
</span><span class="cx">  * Boston, MA 02110-1301, USA.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-interface HTMLLinkElement : HTMLElement {
</del><ins>+[
+    ExportMacro=WEBCORE_EXPORT,
+    JSGenerateToNativeObject,
+] interface HTMLLinkElement : HTMLElement {
</ins><span class="cx">     [Reflect] attribute boolean disabled;
</span><span class="cx">     [Reflect] attribute DOMString charset;
</span><span class="cx">     [Reflect, URL] attribute DOMString href;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.idl        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -20,6 +20,8 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     CustomIndexedSetter,
</span><ins>+    ExportMacro=WEBCORE_EXPORT,
+    JSGenerateToNativeObject,
</ins><span class="cx"> ] interface HTMLSelectElement : HTMLElement {
</span><span class="cx">     [Reflect] attribute boolean autofocus;
</span><span class="cx">     [Reflect] attribute boolean disabled;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx"> 
</span><span class="cx"> class InspectorStubFrontend : public InspectorFrontendClientLocal, public FrontendChannel {
</span><span class="cx"> public:
</span><del>-    InspectorStubFrontend(Page* inspectedPage, RefPtr&lt;DOMWindow&gt;&amp;&amp; frontendWindow);
</del><ins>+    InspectorStubFrontend(Page&amp; inspectedPage, RefPtr&lt;DOMWindow&gt;&amp;&amp; frontendWindow);
</ins><span class="cx">     virtual ~InspectorStubFrontend();
</span><span class="cx"> 
</span><span class="cx">     // InspectorFrontendClient API
</span><span class="lines">@@ -274,16 +274,15 @@
</span><span class="cx">     InspectorController&amp; m_frontendController;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-InspectorStubFrontend::InspectorStubFrontend(Page* inspectedPage, RefPtr&lt;DOMWindow&gt;&amp;&amp; frontendWindow)
-    : InspectorFrontendClientLocal(&amp;inspectedPage-&gt;inspectorController(), frontendWindow-&gt;document()-&gt;page(), std::make_unique&lt;InspectorFrontendClientLocal::Settings&gt;())
</del><ins>+InspectorStubFrontend::InspectorStubFrontend(Page&amp; inspectedPage, RefPtr&lt;DOMWindow&gt;&amp;&amp; frontendWindow)
+    : InspectorFrontendClientLocal(&amp;inspectedPage.inspectorController(), frontendWindow-&gt;document()-&gt;page(), std::make_unique&lt;InspectorFrontendClientLocal::Settings&gt;())
</ins><span class="cx">     , m_frontendWindow(frontendWindow.copyRef())
</span><span class="cx">     , m_frontendController(frontendPage()-&gt;inspectorController())
</span><span class="cx"> {
</span><del>-    ASSERT_ARG(inspectedPage, inspectedPage);
</del><span class="cx">     ASSERT_ARG(frontendWindow, frontendWindow);
</span><span class="cx"> 
</span><span class="cx">     m_frontendController.setInspectorFrontendClient(this);
</span><del>-    inspectedPage-&gt;inspectorController().connectFrontend(this);
</del><ins>+    inspectedPage.inspectorController().connectFrontend(this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InspectorStubFrontend::~InspectorStubFrontend()
</span><span class="lines">@@ -358,7 +357,7 @@
</span><span class="cx"> 
</span><span class="cx"> const char* Internals::internalsId = &quot;internals&quot;;
</span><span class="cx"> 
</span><del>-Ref&lt;Internals&gt; Internals::create(Document* document)
</del><ins>+Ref&lt;Internals&gt; Internals::create(Document&amp; document)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new Internals(document));
</span><span class="cx"> }
</span><span class="lines">@@ -367,23 +366,21 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::resetToConsistentState(Page* page)
</del><ins>+void Internals::resetToConsistentState(Page&amp; page)
</ins><span class="cx"> {
</span><del>-    ASSERT(page);
</del><ins>+    page.setPageScaleFactor(1, IntPoint(0, 0));
+    page.setPagination(Pagination());
+    page.setPaginationLineGridEnabled(false);
</ins><span class="cx"> 
</span><del>-    page-&gt;setPageScaleFactor(1, IntPoint(0, 0));
-    page-&gt;setPagination(Pagination());
-    page-&gt;setPaginationLineGridEnabled(false);
-
-    page-&gt;setDefersLoading(false);
</del><ins>+    page.setDefersLoading(false);
</ins><span class="cx">     
</span><del>-    page-&gt;mainFrame().setTextZoomFactor(1.0f);
</del><ins>+    page.mainFrame().setTextZoomFactor(1.0f);
</ins><span class="cx">     
</span><del>-    FrameView* mainFrameView = page-&gt;mainFrame().view();
</del><ins>+    FrameView* mainFrameView = page.mainFrame().view();
</ins><span class="cx">     if (mainFrameView) {
</span><span class="cx">         mainFrameView-&gt;setHeaderHeight(0);
</span><span class="cx">         mainFrameView-&gt;setFooterHeight(0);
</span><del>-        page-&gt;setTopContentInset(0);
</del><ins>+        page.setTopContentInset(0);
</ins><span class="cx">         mainFrameView-&gt;setUseFixedLayout(false);
</span><span class="cx">         mainFrameView-&gt;setFixedLayoutSize(IntSize());
</span><span class="cx">     }
</span><span class="lines">@@ -391,16 +388,16 @@
</span><span class="cx">     WebCore::overrideUserPreferredLanguages(Vector&lt;String&gt;());
</span><span class="cx">     WebCore::Settings::setUsesOverlayScrollbars(false);
</span><span class="cx">     WebCore::Settings::setUsesMockScrollAnimator(false);
</span><del>-    page-&gt;inspectorController().setLegacyProfilerEnabled(false);
</del><ins>+    page.inspectorController().setLegacyProfilerEnabled(false);
</ins><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-    page-&gt;group().captionPreferences().setCaptionsStyleSheetOverride(emptyString());
-    page-&gt;group().captionPreferences().setTestingMode(false);
</del><ins>+    page.group().captionPreferences().setCaptionsStyleSheetOverride(emptyString());
+    page.group().captionPreferences().setTestingMode(false);
</ins><span class="cx"> #endif
</span><del>-    if (!page-&gt;mainFrame().editor().isContinuousSpellCheckingEnabled())
-        page-&gt;mainFrame().editor().toggleContinuousSpellChecking();
-    if (page-&gt;mainFrame().editor().isOverwriteModeEnabled())
-        page-&gt;mainFrame().editor().toggleOverwriteModeEnabled();
-    page-&gt;mainFrame().loader().clearTestingOverrides();
</del><ins>+    if (!page.mainFrame().editor().isContinuousSpellCheckingEnabled())
+        page.mainFrame().editor().toggleContinuousSpellChecking();
+    if (page.mainFrame().editor().isOverwriteModeEnabled())
+        page.mainFrame().editor().toggleOverwriteModeEnabled();
+    page.mainFrame().loader().clearTestingOverrides();
</ins><span class="cx">     ApplicationCacheStorage::singleton().setDefaultOriginQuota(ApplicationCacheStorage::noQuota());
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx">     PlatformMediaSessionManager::sharedManager().resetRestrictions();
</span><span class="lines">@@ -417,19 +414,19 @@
</span><span class="cx">     MockContentFilterSettings::reset();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    page-&gt;setShowAllPlugins(false);
</del><ins>+    page.setShowAllPlugins(false);
</ins><span class="cx">     
</span><span class="cx"> #if PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 100000
</span><span class="cx">     _AXSSetForceAllowWebScaling(false);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Internals::Internals(Document* document)
-    : ContextDestructionObserver(document)
</del><ins>+Internals::Internals(Document&amp; document)
+    : ContextDestructionObserver(&amp;document)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>-    if (document &amp;&amp; document-&gt;page())
-        document-&gt;page()-&gt;group().captionPreferences().setTestingMode(true);
</del><ins>+    if (document.page())
+        document.page()-&gt;group().captionPreferences().setTestingMode(true);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="lines">@@ -442,8 +439,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><del>-    if (document &amp;&amp; document-&gt;page())
-        document-&gt;page()-&gt;setMockMediaPlaybackTargetPickerEnabled(true);
</del><ins>+    if (document.page())
+        document.page()-&gt;setMockMediaPlaybackTargetPickerEnabled(true);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -463,10 +460,10 @@
</span><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     Page* page = document-&gt;page();
</span><span class="cx">     if (!page)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     return InternalSettings::from(page);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -475,19 +472,14 @@
</span><span class="cx">     return WorkerThread::workerThreadCount();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::address(Node* node)
</del><ins>+String Internals::address(Node&amp; node)
</ins><span class="cx"> {
</span><del>-    return String::format(&quot;%p&quot;, node);
</del><ins>+    return String::format(&quot;%p&quot;, &amp;node);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::nodeNeedsStyleRecalc(Node* node, ExceptionCode&amp; exception)
</del><ins>+bool Internals::nodeNeedsStyleRecalc(Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        exception = INVALID_ACCESS_ERR;
-        return false;
-    }
-
-    return node-&gt;needsStyleRecalc();
</del><ins>+    return node.needsStyleRecalc();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static String styleChangeTypeToString(StyleChangeType type)
</span><span class="lines">@@ -508,14 +500,9 @@
</span><span class="cx">     return &quot;&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::styleChangeType(Node* node, ExceptionCode&amp; exception)
</del><ins>+String Internals::styleChangeType(Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        exception = INVALID_ACCESS_ERR;
-        return { };
-    }
-
-    return styleChangeTypeToString(node-&gt;styleChangeType());
</del><ins>+    return styleChangeTypeToString(node.styleChangeType());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String Internals::description(Deprecated::ScriptValue value)
</span><span class="lines">@@ -542,13 +529,11 @@
</span><span class="cx">     return resource &amp;&amp; resource-&gt;status() == CachedResource::Cached;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::xhrResponseSource(XMLHttpRequest* xhr)
</del><ins>+String Internals::xhrResponseSource(XMLHttpRequest&amp; request)
</ins><span class="cx"> {
</span><del>-    if (!xhr)
-        return &quot;Null xhr&quot;;
-    if (xhr-&gt;resourceResponse().isNull())
</del><ins>+    if (request.resourceResponse().isNull())
</ins><span class="cx">         return &quot;Null response&quot;;
</span><del>-    switch (xhr-&gt;resourceResponse().source()) {
</del><ins>+    switch (request.resourceResponse().source()) {
</ins><span class="cx">     case ResourceResponse::Source::Unknown:
</span><span class="cx">         return &quot;Unknown&quot;;
</span><span class="cx">     case ResourceResponse::Source::Network:
</span><span class="lines">@@ -566,23 +551,16 @@
</span><span class="cx">     return &quot;Error&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::isSharingStyleSheetContents(Element* a, Element* b)
</del><ins>+bool Internals::isSharingStyleSheetContents(HTMLLinkElement&amp; a, HTMLLinkElement&amp; b)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLLinkElement&gt;(a) || !is&lt;HTMLLinkElement&gt;(b))
</del><ins>+    if (!a.sheet() || !b.sheet())
</ins><span class="cx">         return false;
</span><del>-    auto&amp; aLink = downcast&lt;HTMLLinkElement&gt;(*a);
-    auto&amp; bLink = downcast&lt;HTMLLinkElement&gt;(*b);
-    if (!aLink.sheet() || !bLink.sheet())
-        return false;
-    return &amp;aLink.sheet()-&gt;contents() == &amp;bLink.sheet()-&gt;contents();
</del><ins>+    return &amp;a.sheet()-&gt;contents() == &amp;b.sheet()-&gt;contents();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::isStyleSheetLoadingSubresources(Element* link)
</del><ins>+bool Internals::isStyleSheetLoadingSubresources(HTMLLinkElement&amp; link)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLLinkElement&gt;(link))
-        return false;
-    auto&amp; linkElement = downcast&lt;HTMLLinkElement&gt;(*link);
-    return linkElement.sheet() &amp;&amp; linkElement.sheet()-&gt;contents().isLoadingSubresources();
</del><ins>+    return link.sheet() &amp;&amp; link.sheet()-&gt;contents().isLoadingSubresources();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static ResourceRequestCachePolicy stringToResourceRequestCachePolicy(const String&amp; policy)
</span><span class="lines">@@ -656,14 +634,9 @@
</span><span class="cx">     return MemoryCache::singleton().size();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-size_t Internals::imageFrameIndex(Element* element, ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::imageFrameIndex(HTMLImageElement&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLImageElement&gt;(element)) {
-        ec = TypeError;
-        return 0;
-    }
-
-    auto* cachedImage = downcast&lt;HTMLImageElement&gt;(*element).cachedImage();
</del><ins>+    auto* cachedImage = element.cachedImage();
</ins><span class="cx">     if (!cachedImage)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="lines">@@ -681,23 +654,14 @@
</span><span class="cx">     return PageCache::singleton().pageCount();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* Internals::treeScopeRootNode(Node* node, ExceptionCode&amp; ec)
</del><ins>+Node* Internals::treeScopeRootNode(Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-
-    return &amp;node-&gt;treeScope().rootNode();
</del><ins>+    return &amp;node.treeScope().rootNode();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* Internals::parentTreeScope(Node* node, ExceptionCode&amp; ec)
</del><ins>+Node* Internals::parentTreeScope(Node&amp; node)
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-    const TreeScope* parentTreeScope = node-&gt;treeScope().parentTreeScope();
</del><ins>+    const TreeScope* parentTreeScope = node.treeScope().parentTreeScope();
</ins><span class="cx">     return parentTreeScope ? &amp;parentTreeScope-&gt;rootNode() : nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -749,18 +713,18 @@
</span><span class="cx">     document-&gt;frame()-&gt;animation().resumeAnimations();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::pauseAnimationAtTimeOnElement(const String&amp; animationName, double pauseTime, Element* element, ExceptionCode&amp; ec)
</del><ins>+bool Internals::pauseAnimationAtTimeOnElement(const String&amp; animationName, double pauseTime, Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element || pauseTime &lt; 0) {
</del><ins>+    if (pauseTime &lt; 0) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><del>-    return frame()-&gt;animation().pauseAnimationAtTime(element-&gt;renderer(), AtomicString(animationName), pauseTime);
</del><ins>+    return frame()-&gt;animation().pauseAnimationAtTime(element.renderer(), AtomicString(animationName), pauseTime);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::pauseAnimationAtTimeOnPseudoElement(const String&amp; animationName, double pauseTime, Element* element, const String&amp; pseudoId, ExceptionCode&amp; ec)
</del><ins>+bool Internals::pauseAnimationAtTimeOnPseudoElement(const String&amp; animationName, double pauseTime, Element&amp; element, const String&amp; pseudoId, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element || pauseTime &lt; 0) {
</del><ins>+    if (pauseTime &lt; 0) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="lines">@@ -770,7 +734,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    PseudoElement* pseudoElement = pseudoId == &quot;before&quot; ? element-&gt;beforePseudoElement() : element-&gt;afterPseudoElement();
</del><ins>+    PseudoElement* pseudoElement = pseudoId == &quot;before&quot; ? element.beforePseudoElement() : element.afterPseudoElement();
</ins><span class="cx">     if (!pseudoElement) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="lines">@@ -779,18 +743,18 @@
</span><span class="cx">     return frame()-&gt;animation().pauseAnimationAtTime(pseudoElement-&gt;renderer(), AtomicString(animationName), pauseTime);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::pauseTransitionAtTimeOnElement(const String&amp; propertyName, double pauseTime, Element* element, ExceptionCode&amp; ec)
</del><ins>+bool Internals::pauseTransitionAtTimeOnElement(const String&amp; propertyName, double pauseTime, Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element || pauseTime &lt; 0) {
</del><ins>+    if (pauseTime &lt; 0) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><del>-    return frame()-&gt;animation().pauseTransitionAtTime(element-&gt;renderer(), propertyName, pauseTime);
</del><ins>+    return frame()-&gt;animation().pauseTransitionAtTime(element.renderer(), propertyName, pauseTime);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::pauseTransitionAtTimeOnPseudoElement(const String&amp; property, double pauseTime, Element* element, const String&amp; pseudoId, ExceptionCode&amp; ec)
</del><ins>+bool Internals::pauseTransitionAtTimeOnPseudoElement(const String&amp; property, double pauseTime, Element&amp; element, const String&amp; pseudoId, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element || pauseTime &lt; 0) {
</del><ins>+    if (pauseTime &lt; 0) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="lines">@@ -800,7 +764,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    PseudoElement* pseudoElement = pseudoId == &quot;before&quot; ? element-&gt;beforePseudoElement() : element-&gt;afterPseudoElement();
</del><ins>+    PseudoElement* pseudoElement = pseudoId == &quot;before&quot; ? element.beforePseudoElement() : element.afterPseudoElement();
</ins><span class="cx">     if (!pseudoElement) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="lines">@@ -809,27 +773,11 @@
</span><span class="cx">     return frame()-&gt;animation().pauseTransitionAtTime(pseudoElement-&gt;renderer(), property, pauseTime);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// FIXME: Remove.
-bool Internals::attached(Node* node, ExceptionCode&amp; ec)
</del><ins>+String Internals::elementRenderTreeAsText(Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        ec = INVALID_ACCESS_ERR;
-        return false;
-    }
</del><ins>+    element.document().updateStyleIfNeeded();
</ins><span class="cx"> 
</span><del>-    return true;
-}
-
-String Internals::elementRenderTreeAsText(Element* element, ExceptionCode&amp; ec)
-{
-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return String();
-    }
-
-    element-&gt;document().updateStyleIfNeeded();
-
-    String representation = externalRepresentation(element);
</del><ins>+    String representation = externalRepresentation(&amp;element);
</ins><span class="cx">     if (representation.isEmpty()) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="lines">@@ -838,74 +786,48 @@
</span><span class="cx">     return representation;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::hasPausedImageAnimations(Element* element, ExceptionCode&amp; ec)
</del><ins>+bool Internals::hasPausedImageAnimations(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return false;
-    }
-    return element-&gt;renderer() &amp;&amp; element-&gt;renderer()-&gt;hasPausedImageAnimations();
</del><ins>+    return element.renderer() &amp;&amp; element.renderer()-&gt;hasPausedImageAnimations();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;CSSComputedStyleDeclaration&gt; Internals::computedStyleIncludingVisitedInfo(Node* node, ExceptionCode&amp; ec) const
</del><ins>+RefPtr&lt;CSSComputedStyleDeclaration&gt; Internals::computedStyleIncludingVisitedInfo(Node&amp; node) const
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-
</del><span class="cx">     bool allowVisitedStyle = true;
</span><del>-    return CSSComputedStyleDeclaration::create(node, allowVisitedStyle);
</del><ins>+    return CSSComputedStyleDeclaration::create(&amp;node, allowVisitedStyle);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* Internals::ensureShadowRoot(Element* host, ExceptionCode&amp; ec)
</del><ins>+Node* Internals::ensureShadowRoot(Element&amp; host, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!host) {
-        ec = INVALID_ACCESS_ERR;
-        return 0;
-    }
-
-    if (ShadowRoot* shadowRoot = host-&gt;shadowRoot())
</del><ins>+    if (ShadowRoot* shadowRoot = host.shadowRoot())
</ins><span class="cx">         return shadowRoot;
</span><span class="cx"> 
</span><del>-    return host-&gt;createShadowRoot(ec).get();
</del><ins>+    return host.createShadowRoot(ec).get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* Internals::ensureUserAgentShadowRoot(Element* host, ExceptionCode&amp; ec)
</del><ins>+Node* Internals::ensureUserAgentShadowRoot(Element&amp; host)
</ins><span class="cx"> {
</span><del>-    if (!host) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-    return &amp;host-&gt;ensureUserAgentShadowRoot();
</del><ins>+    return &amp;host.ensureUserAgentShadowRoot();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* Internals::createShadowRoot(Element* host, ExceptionCode&amp; ec)
</del><ins>+Node* Internals::createShadowRoot(Element&amp; host, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!host) {
-        ec = INVALID_ACCESS_ERR;
-        return 0;
-    }
-    return host-&gt;createShadowRoot(ec).get();
</del><ins>+    return host.createShadowRoot(ec).get();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Node* Internals::shadowRoot(Element* host, ExceptionCode&amp; ec)
</del><ins>+Node* Internals::shadowRoot(Element&amp; host)
</ins><span class="cx"> {
</span><del>-    if (!host) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-    return host-&gt;shadowRoot();
</del><ins>+    return host.shadowRoot();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::shadowRootType(const Node* root, ExceptionCode&amp; ec) const
</del><ins>+String Internals::shadowRootType(const Node&amp; root, ExceptionCode&amp; ec) const
</ins><span class="cx"> {
</span><span class="cx">     if (!is&lt;ShadowRoot&gt;(root)) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    switch (downcast&lt;ShadowRoot&gt;(*root).type()) {
</del><ins>+    switch (downcast&lt;ShadowRoot&gt;(root).type()) {
</ins><span class="cx">     case ShadowRoot::Type::UserAgent:
</span><span class="cx">         return String(&quot;UserAgentShadowRoot&quot;);
</span><span class="cx">     case ShadowRoot::Type::Closed:
</span><span class="lines">@@ -918,32 +840,16 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Element* Internals::includerFor(Node*, ExceptionCode&amp; ec)
</del><ins>+String Internals::shadowPseudoId(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    ec = INVALID_ACCESS_ERR;
-    return nullptr;
</del><ins>+    return element.shadowPseudoId().string();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::shadowPseudoId(Element* element, ExceptionCode&amp; ec)
</del><ins>+void Internals::setShadowPseudoId(Element&amp; element, const String&amp; id)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return String();
-    }
-
-    return element-&gt;shadowPseudoId().string();
</del><ins>+    return element.setPseudo(id);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setShadowPseudoId(Element* element, const String&amp; id, ExceptionCode&amp; ec)
-{
-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return;
-    }
-
-    return element-&gt;setPseudo(id);
-}
-
</del><span class="cx"> bool Internals::isTimerThrottled(int timeoutId, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     DOMTimer* timer = scriptExecutionContext()-&gt;findTimeout(timeoutId);
</span><span class="lines">@@ -971,10 +877,10 @@
</span><span class="cx">     return contextDocument()-&gt;isTimerThrottlingEnabled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::visiblePlaceholder(Element* element)
</del><ins>+String Internals::visiblePlaceholder(Element&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     if (is&lt;HTMLTextFormControlElement&gt;(element)) {
</span><del>-        const HTMLTextFormControlElement&amp; textFormControlElement = downcast&lt;HTMLTextFormControlElement&gt;(*element);
</del><ins>+        const HTMLTextFormControlElement&amp; textFormControlElement = downcast&lt;HTMLTextFormControlElement&gt;(element);
</ins><span class="cx">         if (!textFormControlElement.isPlaceholderVisible())
</span><span class="cx">             return String();
</span><span class="cx">         if (HTMLElement* placeholderElement = textFormControlElement.placeholderElement())
</span><span class="lines">@@ -984,12 +890,9 @@
</span><span class="cx">     return String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::selectColorInColorChooser(Element* element, const String&amp; colorValue)
</del><ins>+void Internals::selectColorInColorChooser(HTMLInputElement&amp; element, const String&amp; colorValue)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLInputElement&gt;(element))
-        return;
-    auto&amp; inputElement = downcast&lt;HTMLInputElement&gt;(*element);
-    inputElement.selectColor(Color(colorValue));
</del><ins>+    element.selectColor(Color(colorValue));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Vector&lt;String&gt; Internals::formControlStateOfPreviousHistoryItem(ExceptionCode&amp; ec)
</span><span class="lines">@@ -1067,15 +970,10 @@
</span><span class="cx">     return ClientRect::create(document-&gt;frame()-&gt;selection().absoluteCaretBounds());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;ClientRect&gt; Internals::boundingBox(Element* element, ExceptionCode&amp; ec)
</del><ins>+Ref&lt;ClientRect&gt; Internals::boundingBox(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return ClientRect::create();
-    }
-
-    element-&gt;document().updateLayoutIgnorePendingStylesheets();
-    auto renderer = element-&gt;renderer();
</del><ins>+    element.document().updateLayoutIgnorePendingStylesheets();
+    auto renderer = element.renderer();
</ins><span class="cx">     if (!renderer)
</span><span class="cx">         return ClientRect::create();
</span><span class="cx">     return ClientRect::create(renderer-&gt;absoluteBoundingBoxRectIgnoringTransforms());
</span><span class="lines">@@ -1105,31 +1003,21 @@
</span><span class="cx">     return document-&gt;page()-&gt;inspectorController().buildObjectForHighlightedNodes()-&gt;toJSONString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned Internals::markerCountForNode(Node* node, const String&amp; markerType, ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::markerCountForNode(Node&amp; node, const String&amp; markerType, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!node) {
-        ec = INVALID_ACCESS_ERR;
-        return 0;
-    }
-
</del><span class="cx">     DocumentMarker::MarkerTypes markerTypes = 0;
</span><span class="cx">     if (!markerTypesFrom(markerType, markerTypes)) {
</span><span class="cx">         ec = SYNTAX_ERR;
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    node-&gt;document().frame()-&gt;editor().updateEditorUINowIfScheduled();
-
-    return node-&gt;document().markers().markersFor(node, markerTypes).size();
</del><ins>+    node.document().frame()-&gt;editor().updateEditorUINowIfScheduled();
+    return node.document().markers().markersFor(&amp;node, markerTypes).size();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RenderedDocumentMarker* Internals::markerAt(Node* node, const String&amp; markerType, unsigned index, ExceptionCode&amp; ec)
</del><ins>+RenderedDocumentMarker* Internals::markerAt(Node&amp; node, const String&amp; markerType, unsigned index, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    node-&gt;document().updateLayoutIgnorePendingStylesheets();
-    if (!node) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
</del><ins>+    node.document().updateLayoutIgnorePendingStylesheets();
</ins><span class="cx"> 
</span><span class="cx">     DocumentMarker::MarkerTypes markerTypes = 0;
</span><span class="cx">     if (!markerTypesFrom(markerType, markerTypes)) {
</span><span class="lines">@@ -1137,23 +1025,23 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    node-&gt;document().frame()-&gt;editor().updateEditorUINowIfScheduled();
</del><ins>+    node.document().frame()-&gt;editor().updateEditorUINowIfScheduled();
</ins><span class="cx"> 
</span><del>-    Vector&lt;RenderedDocumentMarker*&gt; markers = node-&gt;document().markers().markersFor(node, markerTypes);
</del><ins>+    Vector&lt;RenderedDocumentMarker*&gt; markers = node.document().markers().markersFor(&amp;node, markerTypes);
</ins><span class="cx">     if (markers.size() &lt;= index)
</span><span class="cx">         return nullptr;
</span><span class="cx">     return markers[index];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;Range&gt; Internals::markerRangeForNode(Node* node, const String&amp; markerType, unsigned index, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;Range&gt; Internals::markerRangeForNode(Node&amp; node, const String&amp; markerType, unsigned index, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     RenderedDocumentMarker* marker = markerAt(node, markerType, index, ec);
</span><span class="cx">     if (!marker)
</span><span class="cx">         return nullptr;
</span><del>-    return Range::create(node-&gt;document(), node, marker-&gt;startOffset(), node, marker-&gt;endOffset());
</del><ins>+    return Range::create(node.document(), &amp;node, marker-&gt;startOffset(), &amp;node, marker-&gt;endOffset());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::markerDescriptionForNode(Node* node, const String&amp; markerType, unsigned index, ExceptionCode&amp; ec)
</del><ins>+String Internals::markerDescriptionForNode(Node&amp; node, const String&amp; markerType, unsigned index, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     RenderedDocumentMarker* marker = markerAt(node, markerType, index, ec);
</span><span class="cx">     if (!marker)
</span><span class="lines">@@ -1188,10 +1076,10 @@
</span><span class="cx">     return rectString.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::addTextMatchMarker(const Range* range, bool isActive)
</del><ins>+void Internals::addTextMatchMarker(const Range&amp; range, bool isActive)
</ins><span class="cx"> {
</span><del>-    range-&gt;ownerDocument().updateLayoutIgnorePendingStylesheets();
-    range-&gt;ownerDocument().markers().addTextMatchMarker(range, isActive);
</del><ins>+    range.ownerDocument().updateLayoutIgnorePendingStylesheets();
+    range.ownerDocument().markers().addTextMatchMarker(&amp;range, isActive);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Internals::setMarkedTextMatchesAreHighlighted(bool flag, ExceptionCode&amp; ec)
</span><span class="lines">@@ -1209,7 +1097,7 @@
</span><span class="cx">     FontCache::singleton().invalidate();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setScrollViewPosition(long x, long y, ExceptionCode&amp; ec)
</del><ins>+void Internals::setScrollViewPosition(int x, int y, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;view()) {
</span><span class="lines">@@ -1223,7 +1111,7 @@
</span><span class="cx"> 
</span><span class="cx">     frameView-&gt;setConstrainsScrollingToContentEdge(false);
</span><span class="cx">     frameView-&gt;setScrollbarsSuppressed(false);
</span><del>-    frameView-&gt;setScrollOffsetFromInternals(IntPoint(x, y));
</del><ins>+    frameView-&gt;setScrollOffsetFromInternals({ x, y });
</ins><span class="cx">     frameView-&gt;setScrollbarsSuppressed(scrollbarsSuppressedOldValue);
</span><span class="cx">     frameView-&gt;setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdgeOldValue);
</span><span class="cx"> }
</span><span class="lines">@@ -1299,66 +1187,31 @@
</span><span class="cx">     return &quot;viewport size &quot; + String::number(attributes.layoutSize.width()) + &quot;x&quot; + String::number(attributes.layoutSize.height()) + &quot; scale &quot; + String::number(attributes.initialScale) + &quot; with limits [&quot; + String::number(attributes.minimumScale) + &quot;, &quot; + String::number(attributes.maximumScale) + &quot;] and userScalable &quot; + (attributes.userScalable ? &quot;true&quot; : &quot;false&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::wasLastChangeUserEdit(Element* textField, ExceptionCode&amp; ec)
</del><ins>+bool Internals::wasLastChangeUserEdit(Element&amp; textField, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!textField) {
-        ec = INVALID_ACCESS_ERR;
-        return false;
-    }
</del><ins>+    if (is&lt;HTMLInputElement&gt;(textField))
+        return downcast&lt;HTMLInputElement&gt;(textField).lastChangeWasUserEdit();
</ins><span class="cx"> 
</span><del>-    if (is&lt;HTMLInputElement&gt;(*textField))
-        return downcast&lt;HTMLInputElement&gt;(*textField).lastChangeWasUserEdit();
</del><ins>+    if (is&lt;HTMLTextAreaElement&gt;(textField))
+        return downcast&lt;HTMLTextAreaElement&gt;(textField).lastChangeWasUserEdit();
</ins><span class="cx"> 
</span><del>-    if (is&lt;HTMLTextAreaElement&gt;(*textField))
-        return downcast&lt;HTMLTextAreaElement&gt;(*textField).lastChangeWasUserEdit();
-
</del><span class="cx">     ec = INVALID_NODE_TYPE_ERR;
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::elementShouldAutoComplete(Element* element, ExceptionCode&amp; ec)
</del><ins>+bool Internals::elementShouldAutoComplete(HTMLInputElement&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return false;
-    }
-
-    if (!is&lt;HTMLInputElement&gt;(*element)) {
-        ec = INVALID_NODE_TYPE_ERR;
-        return false;
-    }
-
-    return downcast&lt;HTMLInputElement&gt;(*element).shouldAutocomplete();
</del><ins>+    return element.shouldAutocomplete();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setEditingValue(Element* element, const String&amp; value, ExceptionCode&amp; ec)
</del><ins>+void Internals::setEditingValue(HTMLInputElement&amp; element, const String&amp; value)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return;
-    }
-
-    if (!is&lt;HTMLInputElement&gt;(*element)) {
-        ec = INVALID_NODE_TYPE_ERR;
-        return;
-    }
-
-    downcast&lt;HTMLInputElement&gt;(*element).setEditingValue(value);
</del><ins>+    element.setEditingValue(value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setAutofilled(Element* element, bool enabled, ExceptionCode&amp; ec)
</del><ins>+void Internals::setAutofilled(HTMLInputElement&amp; element, bool enabled)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return;
-    }
-
-    if (!is&lt;HTMLInputElement&gt;(*element)) {
-        ec = INVALID_NODE_TYPE_ERR;
-        return;
-    }
-
-    downcast&lt;HTMLInputElement&gt;(*element).setAutoFilled(enabled);
</del><ins>+    element.setAutoFilled(enabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static AutoFillButtonType stringToAutoFillButtonType(const String&amp; autoFillButtonType)
</span><span class="lines">@@ -1373,45 +1226,30 @@
</span><span class="cx">     return AutoFillButtonType::None;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setShowAutoFillButton(Element* element, const String&amp; autoFillButtonType, ExceptionCode&amp; ec)
</del><ins>+void Internals::setShowAutoFillButton(HTMLInputElement&amp; element, const String&amp; autoFillButtonType)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return;
-    }
-
-    if (!is&lt;HTMLInputElement&gt;(*element)) {
-        ec = INVALID_NODE_TYPE_ERR;
-        return;
-    }
-
-    downcast&lt;HTMLInputElement&gt;(*element).setShowAutoFillButton(stringToAutoFillButtonType(autoFillButtonType));
</del><ins>+    element.setShowAutoFillButton(stringToAutoFillButtonType(autoFillButtonType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void Internals::scrollElementToRect(Element* element, long x, long y, long w, long h, ExceptionCode&amp; ec)
</del><ins>+void Internals::scrollElementToRect(Element&amp; element, int x, int y, int w, int h, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element || !element-&gt;document().view()) {
</del><ins>+    FrameView* frameView = element.document().view();
+    if (!frameView) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    FrameView* frameView = element-&gt;document().view();
-    frameView-&gt;scrollElementToRect(*element, IntRect(x, y, w, h));
</del><ins>+    frameView-&gt;scrollElementToRect(element, { x, y, w, h });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::autofillFieldName(Element* element, ExceptionCode&amp; ec)
</del><ins>+String Internals::autofillFieldName(Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return { };
-    }
-
-    if (!is&lt;HTMLFormControlElement&gt;(*element)) {
</del><ins>+    if (!is&lt;HTMLFormControlElement&gt;(element)) {
</ins><span class="cx">         ec = INVALID_NODE_TYPE_ERR;
</span><span class="cx">         return { };
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return downcast&lt;HTMLFormControlElement&gt;(*element).autofillData().fieldName;
</del><ins>+    return downcast&lt;HTMLFormControlElement&gt;(element).autofillData().fieldName;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Internals::paintControlTints(ExceptionCode&amp; ec)
</span><span class="lines">@@ -1426,60 +1264,35 @@
</span><span class="cx">     frameView-&gt;paintControlTints();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;Range&gt; Internals::rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;Range&gt; Internals::rangeFromLocationAndLength(Element&amp; scope, int rangeLocation, int rangeLength)
</ins><span class="cx"> {
</span><del>-    if (!scope) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-
-    return TextIterator::rangeFromLocationAndLength(scope, rangeLocation, rangeLength);
</del><ins>+    return TextIterator::rangeFromLocationAndLength(&amp;scope, rangeLocation, rangeLength);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned Internals::locationFromRange(Element* scope, const Range* range, ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::locationFromRange(Element&amp; scope, const Range&amp; range)
</ins><span class="cx"> {
</span><del>-    if (!scope || !range) {
-        ec = INVALID_ACCESS_ERR;
-        return 0;
-    }
-
</del><span class="cx">     size_t location = 0;
</span><span class="cx">     size_t unusedLength = 0;
</span><del>-    TextIterator::getLocationAndLengthFromRange(scope, range, location, unusedLength);
</del><ins>+    TextIterator::getLocationAndLengthFromRange(&amp;scope, &amp;range, location, unusedLength);
</ins><span class="cx">     return location;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned Internals::lengthFromRange(Element* scope, const Range* range, ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::lengthFromRange(Element&amp; scope, const Range&amp; range)
</ins><span class="cx"> {
</span><del>-    if (!scope || !range) {
-        ec = INVALID_ACCESS_ERR;
-        return 0;
-    }
-
</del><span class="cx">     size_t unusedLocation = 0;
</span><span class="cx">     size_t length = 0;
</span><del>-    TextIterator::getLocationAndLengthFromRange(scope, range, unusedLocation, length);
</del><ins>+    TextIterator::getLocationAndLengthFromRange(&amp;scope, &amp;range, unusedLocation, length);
</ins><span class="cx">     return length;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::rangeAsText(const Range* range, ExceptionCode&amp; ec)
</del><ins>+String Internals::rangeAsText(const Range&amp; range)
</ins><span class="cx"> {
</span><del>-    if (!range) {
-        ec = INVALID_ACCESS_ERR;
-        return String();
-    }
-
-    return range-&gt;text();
</del><ins>+    return range.text();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;Range&gt; Internals::subrange(Range* range, int rangeLocation, int rangeLength, ExceptionCode&amp; ec)
</del><ins>+RefPtr&lt;Range&gt; Internals::subrange(Range&amp; range, int rangeLocation, int rangeLength)
</ins><span class="cx"> {
</span><del>-    if (!range) {
-        ec = INVALID_ACCESS_ERR;
-        return nullptr;
-    }
-
-    return TextIterator::subrange(range, rangeLocation, rangeLength);
</del><ins>+    return TextIterator::subrange(&amp;range, rangeLocation, rangeLength);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;Range&gt; Internals::rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode&amp; ec)
</span><span class="lines">@@ -1598,21 +1411,21 @@
</span><span class="cx"> // contextDocument(), with the exception of a few tests that pass a
</span><span class="cx"> // different document, and could just make the call through another Internals
</span><span class="cx"> // instance instead.
</span><del>-RefPtr&lt;NodeList&gt; Internals::nodesFromRect(Document* document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
</del><ins>+RefPtr&lt;NodeList&gt; Internals::nodesFromRect(Document&amp; document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
</ins><span class="cx">     unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&amp; ec) const
</span><span class="cx"> {
</span><del>-    if (!document || !document-&gt;frame() || !document-&gt;frame()-&gt;view()) {
</del><ins>+    if (!document.frame() || !document.frame()-&gt;view()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Frame* frame = document-&gt;frame();
-    FrameView* frameView = document-&gt;view();
-    RenderView* renderView = document-&gt;renderView();
</del><ins>+    Frame* frame = document.frame();
+    FrameView* frameView = document.view();
+    RenderView* renderView = document.renderView();
</ins><span class="cx">     if (!renderView)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    document-&gt;updateLayoutIgnorePendingStylesheets();
</del><ins>+    document.updateLayoutIgnorePendingStylesheets();
</ins><span class="cx"> 
</span><span class="cx">     float zoomFactor = frame-&gt;pageZoomFactor();
</span><span class="cx">     LayoutPoint point(centerX * zoomFactor + frameView-&gt;scrollX(), centerY * zoomFactor + frameView-&gt;scrollY());
</span><span class="lines">@@ -1939,7 +1752,7 @@
</span><span class="cx">     Page* inspectedPage = contextDocument()-&gt;frame()-&gt;page();
</span><span class="cx">     RefPtr&lt;DOMWindow&gt; window = inspectedPage-&gt;mainFrame().document()-&gt;domWindow();
</span><span class="cx">     RefPtr&lt;DOMWindow&gt; frontendWindow = window-&gt;open(url, &quot;&quot;, &quot;&quot;, *window, *window);
</span><del>-    m_inspectorFrontend = std::make_unique&lt;InspectorStubFrontend&gt;(inspectedPage, frontendWindow.copyRef());
</del><ins>+    m_inspectorFrontend = std::make_unique&lt;InspectorStubFrontend&gt;(*inspectedPage, frontendWindow.copyRef());
</ins><span class="cx"> 
</span><span class="cx">     return frontendWindow;
</span><span class="cx"> }
</span><span class="lines">@@ -2014,14 +1827,14 @@
</span><span class="cx"> // contextDocument(), with the exception of a few tests that pass a
</span><span class="cx"> // different document, and could just make the call through another Internals
</span><span class="cx"> // instance instead.
</span><del>-String Internals::layerTreeAsText(Document* document, ExceptionCode&amp; ec) const
</del><ins>+String Internals::layerTreeAsText(Document&amp; document, ExceptionCode&amp; ec) const
</ins><span class="cx"> {
</span><span class="cx">     return layerTreeAsText(document, 0, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode&amp; ec) const
</del><ins>+String Internals::layerTreeAsText(Document&amp; document, unsigned flags, ExceptionCode&amp; ec) const
</ins><span class="cx"> {
</span><del>-    if (!document || !document-&gt;frame()) {
</del><ins>+    if (!document.frame()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="lines">@@ -2038,7 +1851,7 @@
</span><span class="cx">     if (flags &amp; LAYER_TREE_INCLUDES_CONTENT_LAYERS)
</span><span class="cx">         layerTreeFlags |= LayerTreeFlagsIncludeContentLayers;
</span><span class="cx"> 
</span><del>-    return document-&gt;frame()-&gt;layerTreeAsText(layerTreeFlags);
</del><ins>+    return document.frame()-&gt;layerTreeAsText(layerTreeFlags);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String Internals::repaintRectsAsText(ExceptionCode&amp; ec) const
</span><span class="lines">@@ -2097,7 +1910,7 @@
</span><span class="cx">     return page-&gt;nonFastScrollableRects();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setElementUsesDisplayListDrawing(Element* element, bool usesDisplayListDrawing, ExceptionCode&amp; ec)
</del><ins>+void Internals::setElementUsesDisplayListDrawing(Element&amp; element, bool usesDisplayListDrawing, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;renderView()) {
</span><span class="lines">@@ -2105,22 +1918,22 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!element || !element-&gt;renderer()) {
</del><ins>+    if (!element.renderer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (is&lt;HTMLCanvasElement&gt;(*element)) {
-        downcast&lt;HTMLCanvasElement&gt;(*element).setUsesDisplayListDrawing(usesDisplayListDrawing);
</del><ins>+    if (is&lt;HTMLCanvasElement&gt;(element)) {
+        downcast&lt;HTMLCanvasElement&gt;(element).setUsesDisplayListDrawing(usesDisplayListDrawing);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!element-&gt;renderer()-&gt;hasLayer()) {
</del><ins>+    if (!element.renderer()-&gt;hasLayer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element-&gt;renderer())-&gt;layer();
</del><ins>+    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element.renderer())-&gt;layer();
</ins><span class="cx">     if (!layer-&gt;isComposited()) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="lines">@@ -2129,7 +1942,7 @@
</span><span class="cx">     layer-&gt;backing()-&gt;setUsesDisplayListDrawing(usesDisplayListDrawing);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setElementTracksDisplayListReplay(Element* element, bool isTrackingReplay, ExceptionCode&amp; ec)
</del><ins>+void Internals::setElementTracksDisplayListReplay(Element&amp; element, bool isTrackingReplay, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;renderView()) {
</span><span class="lines">@@ -2137,22 +1950,22 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!element || !element-&gt;renderer()) {
</del><ins>+    if (!element.renderer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (is&lt;HTMLCanvasElement&gt;(*element)) {
-        downcast&lt;HTMLCanvasElement&gt;(*element).setTracksDisplayListReplay(isTrackingReplay);
</del><ins>+    if (is&lt;HTMLCanvasElement&gt;(element)) {
+        downcast&lt;HTMLCanvasElement&gt;(element).setTracksDisplayListReplay(isTrackingReplay);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!element-&gt;renderer()-&gt;hasLayer()) {
</del><ins>+    if (!element.renderer()-&gt;hasLayer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element-&gt;renderer())-&gt;layer();
</del><ins>+    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element.renderer())-&gt;layer();
</ins><span class="cx">     if (!layer-&gt;isComposited()) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return;
</span><span class="lines">@@ -2161,12 +1974,12 @@
</span><span class="cx">     layer-&gt;backing()-&gt;setIsTrackingDisplayListReplay(isTrackingReplay);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::displayListForElement(Element* element, ExceptionCode&amp; ec)
</del><ins>+String Internals::displayListForElement(Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     return displayListForElement(element, 0, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::displayListForElement(Element* element, unsigned flags, ExceptionCode&amp; ec)
</del><ins>+String Internals::displayListForElement(Element&amp; element, unsigned flags, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;renderView()) {
</span><span class="lines">@@ -2174,7 +1987,7 @@
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!element || !element-&gt;renderer()) {
</del><ins>+    if (!element.renderer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="lines">@@ -2183,15 +1996,15 @@
</span><span class="cx">     if (flags &amp; DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS)
</span><span class="cx">         displayListFlags |= DisplayList::AsTextFlag::IncludesPlatformOperations;
</span><span class="cx"> 
</span><del>-    if (is&lt;HTMLCanvasElement&gt;(*element))
-        return downcast&lt;HTMLCanvasElement&gt;(*element).displayListAsText(displayListFlags);
</del><ins>+    if (is&lt;HTMLCanvasElement&gt;(element))
+        return downcast&lt;HTMLCanvasElement&gt;(element).displayListAsText(displayListFlags);
</ins><span class="cx"> 
</span><del>-    if (!element-&gt;renderer()-&gt;hasLayer()) {
</del><ins>+    if (!element.renderer()-&gt;hasLayer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element-&gt;renderer())-&gt;layer();
</del><ins>+    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element.renderer())-&gt;layer();
</ins><span class="cx">     if (!layer-&gt;isComposited()) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="lines">@@ -2200,12 +2013,12 @@
</span><span class="cx">     return layer-&gt;backing()-&gt;displayListAsText(displayListFlags);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::replayDisplayListForElement(Element* element, ExceptionCode&amp; ec)
</del><ins>+String Internals::replayDisplayListForElement(Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     return replayDisplayListForElement(element, 0, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::replayDisplayListForElement(Element* element, unsigned flags, ExceptionCode&amp; ec)
</del><ins>+String Internals::replayDisplayListForElement(Element&amp; element, unsigned flags, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;renderView()) {
</span><span class="lines">@@ -2213,7 +2026,7 @@
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!element || !element-&gt;renderer()) {
</del><ins>+    if (!element.renderer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="lines">@@ -2222,15 +2035,15 @@
</span><span class="cx">     if (flags &amp; DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS)
</span><span class="cx">         displayListFlags |= DisplayList::AsTextFlag::IncludesPlatformOperations;
</span><span class="cx"> 
</span><del>-    if (is&lt;HTMLCanvasElement&gt;(*element))
-        return downcast&lt;HTMLCanvasElement&gt;(*element).replayDisplayListAsText(displayListFlags);
</del><ins>+    if (is&lt;HTMLCanvasElement&gt;(element))
+        return downcast&lt;HTMLCanvasElement&gt;(element).replayDisplayListAsText(displayListFlags);
</ins><span class="cx"> 
</span><del>-    if (!element-&gt;renderer()-&gt;hasLayer()) {
</del><ins>+    if (!element.renderer()-&gt;hasLayer()) {
</ins><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element-&gt;renderer())-&gt;layer();
</del><ins>+    RenderLayer* layer = downcast&lt;RenderLayerModelObject&gt;(element.renderer())-&gt;layer();
</ins><span class="cx">     if (!layer-&gt;isComposited()) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return String();
</span><span class="lines">@@ -2277,20 +2090,14 @@
</span><span class="cx">     document-&gt;extensionStyleSheets().addUserStyleSheet(WTFMove(parsedSheet));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::counterValue(Element* element)
</del><ins>+String Internals::counterValue(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element)
-        return String();
-
-    return counterValueForElement(element);
</del><ins>+    return counterValueForElement(&amp;element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-int Internals::pageNumber(Element* element, float pageWidth, float pageHeight)
</del><ins>+int Internals::pageNumber(Element&amp; element, float pageWidth, float pageHeight)
</ins><span class="cx"> {
</span><del>-    if (!element)
-        return 0;
-
-    return PrintContext::pageNumberForElement(element, FloatSize(pageWidth, pageHeight));
</del><ins>+    return PrintContext::pageNumberForElement(&amp;element, { pageWidth, pageHeight });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Vector&lt;String&gt; Internals::shortcutIconURLs() const
</span><span class="lines">@@ -2432,36 +2239,36 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><del>-void Internals::webkitWillEnterFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitWillEnterFullScreenForElement(Element&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><del>-    document-&gt;webkitWillEnterFullScreenForElement(element);
</del><ins>+    document-&gt;webkitWillEnterFullScreenForElement(&amp;element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::webkitDidEnterFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitDidEnterFullScreenForElement(Element&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><del>-    document-&gt;webkitDidEnterFullScreenForElement(element);
</del><ins>+    document-&gt;webkitDidEnterFullScreenForElement(&amp;element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::webkitWillExitFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitWillExitFullScreenForElement(Element&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><del>-    document-&gt;webkitWillExitFullScreenForElement(element);
</del><ins>+    document-&gt;webkitWillExitFullScreenForElement(&amp;element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::webkitDidExitFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitDidExitFullScreenForElement(Element&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document)
</span><span class="cx">         return;
</span><del>-    document-&gt;webkitDidExitFullScreenForElement(element);
</del><ins>+    document-&gt;webkitDidExitFullScreenForElement(&amp;element);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2539,7 +2346,7 @@
</span><span class="cx">     document-&gt;renderView()-&gt;compositor().startTrackingLayerFlushes();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned long Internals::layerFlushCount(ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::layerFlushCount(ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;renderView()) {
</span><span class="lines">@@ -2560,7 +2367,7 @@
</span><span class="cx">     document-&gt;startTrackingStyleRecalcs();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned long Internals::styleRecalcCount(ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::styleRecalcCount(ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document) {
</span><span class="lines">@@ -2582,7 +2389,7 @@
</span><span class="cx">     document-&gt;renderView()-&gt;compositor().startTrackingCompositingUpdates();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-unsigned long Internals::compositingUpdateCount(ExceptionCode&amp; ec)
</del><ins>+unsigned Internals::compositingUpdateCount(ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     Document* document = contextDocument();
</span><span class="cx">     if (!document || !document-&gt;renderView()) {
</span><span class="lines">@@ -2722,10 +2529,10 @@
</span><span class="cx">     return ArrayBuffer::create(bytes.data(), bytes.size());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;SerializedScriptValue&gt; Internals::deserializeBuffer(PassRefPtr&lt;ArrayBuffer&gt; buffer) const
</del><ins>+RefPtr&lt;SerializedScriptValue&gt; Internals::deserializeBuffer(ArrayBuffer&amp; buffer) const
</ins><span class="cx"> {
</span><span class="cx">     Vector&lt;uint8_t&gt; bytes;
</span><del>-    bytes.append(static_cast&lt;const uint8_t*&gt;(buffer-&gt;data()), buffer-&gt;byteLength());
</del><ins>+    bytes.append(static_cast&lt;const uint8_t*&gt;(buffer.data()), buffer.byteLength());
</ins><span class="cx">     return SerializedScriptValue::adopt(WTFMove(bytes));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2770,74 +2577,52 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-String Internals::markerTextForListItem(Element* element, ExceptionCode&amp; ec)
</del><ins>+String Internals::markerTextForListItem(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return String();
-    }
-    return WebCore::markerTextForListItem(element);
</del><ins>+    return WebCore::markerTextForListItem(&amp;element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::toolTipFromElement(Element* element, ExceptionCode&amp; ec) const
</del><ins>+String Internals::toolTipFromElement(Element&amp; element) const
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return String();
-    }
</del><span class="cx">     HitTestResult result;
</span><del>-    result.setInnerNode(element);
-    TextDirection dir;
-    return result.title(dir);
</del><ins>+    result.setInnerNode(&amp;element);
+    TextDirection direction;
+    return result.title(direction);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::getImageSourceURL(Element* element, ExceptionCode&amp; ec)
</del><ins>+String Internals::getImageSourceURL(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return String();
-    }
-    return element-&gt;imageSourceURL();
</del><ins>+    return element.imageSourceURL();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>-void Internals::simulateAudioInterruption(Node* node)
</del><ins>+
+void Internals::simulateAudioInterruption(HTMLMediaElement&amp; element)
</ins><span class="cx"> {
</span><span class="cx"> #if USE(GSTREAMER)
</span><del>-    HTMLMediaElement* element = downcast&lt;HTMLMediaElement&gt;(node);
-    element-&gt;player()-&gt;simulateAudioInterruption();
</del><ins>+    element.player()-&gt;simulateAudioInterruption();
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(node);
</del><ins>+    UNUSED_PARAM(element);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::mediaElementHasCharacteristic(Node* node, const String&amp; characteristic, ExceptionCode&amp; ec)
</del><ins>+bool Internals::mediaElementHasCharacteristic(HTMLMediaElement&amp; element, const String&amp; characteristic, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLMediaElement&gt;(*node))
-        return false;
-
-    HTMLMediaElement* element = downcast&lt;HTMLMediaElement&gt;(node);
-
</del><span class="cx">     if (equalLettersIgnoringASCIICase(characteristic, &quot;audible&quot;))
</span><del>-        return element-&gt;hasAudio();
</del><ins>+        return element.hasAudio();
</ins><span class="cx">     if (equalLettersIgnoringASCIICase(characteristic, &quot;visual&quot;))
</span><del>-        return element-&gt;hasVideo();
</del><ins>+        return element.hasVideo();
</ins><span class="cx">     if (equalLettersIgnoringASCIICase(characteristic, &quot;legible&quot;))
</span><del>-        return element-&gt;hasClosedCaptions();
</del><ins>+        return element.hasClosedCaptions();
</ins><span class="cx"> 
</span><span class="cx">     ec = SYNTAX_ERR;
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool Internals::isSelectPopupVisible(Node* node)
</del><ins>+bool Internals::isSelectPopupVisible(HTMLSelectElement&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!is&lt;HTMLSelectElement&gt;(*node))
-        return false;
-
-    HTMLSelectElement&amp; select = downcast&lt;HTMLSelectElement&gt;(*node);
-
-    auto* renderer = select.renderer();
</del><ins>+    auto* renderer = element.renderer();
</ins><span class="cx">     ASSERT(renderer);
</span><span class="cx">     if (!is&lt;RenderMenuList&gt;(*renderer))
</span><span class="cx">         return false;
</span><span class="lines">@@ -2846,7 +2631,7 @@
</span><span class="cx">     return downcast&lt;RenderMenuList&gt;(*renderer).popupIsVisible();
</span><span class="cx"> #else
</span><span class="cx">     return false;
</span><del>-#endif // !PLATFORM(IOS)
</del><ins>+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String Internals::captionsStyleSheetOverride(ExceptionCode&amp; ec)
</span><span class="lines">@@ -2933,9 +2718,9 @@
</span><span class="cx">     return ranges;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-double Internals::closestTimeToTimeRanges(double time, TimeRanges* ranges)
</del><ins>+double Internals::closestTimeToTimeRanges(double time, TimeRanges&amp; ranges)
</ins><span class="cx"> {
</span><del>-    return ranges-&gt;nearest(time);
</del><ins>+    return ranges.nearest(time);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -2960,14 +2745,9 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool Internals::isPluginUnavailabilityIndicatorObscured(Element* element, ExceptionCode&amp; ec)
</del><ins>+bool Internals::isPluginUnavailabilityIndicatorObscured(Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return false;
-    }
-
-    auto* renderer = element-&gt;renderer();
</del><ins>+    auto* renderer = element.renderer();
</ins><span class="cx">     if (!is&lt;RenderEmbeddedObject&gt;(renderer)) {
</span><span class="cx">         ec = INVALID_ACCESS_ERR;
</span><span class="cx">         return false;
</span><span class="lines">@@ -2976,17 +2756,13 @@
</span><span class="cx">     return downcast&lt;RenderEmbeddedObject&gt;(*renderer).isReplacementObscured();
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-bool Internals::isPluginSnapshotted(Element* element, ExceptionCode&amp; ec)
</del><ins>+bool Internals::isPluginSnapshotted(Element&amp; element)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return false;
-    }
-    HTMLPlugInElement* pluginElement = downcast&lt;HTMLPlugInElement&gt;(element);
-    return pluginElement-&gt;displayState() &lt;= HTMLPlugInElement::DisplayingSnapshot;
</del><ins>+    return is&lt;HTMLPlugInElement&gt;(element) &amp;&amp; downcast&lt;HTMLPlugInElement&gt;(element).displayState() &lt;= HTMLPlugInElement::DisplayingSnapshot;
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><ins>+
</ins><span class="cx"> void Internals::initializeMockMediaSource()
</span><span class="cx"> {
</span><span class="cx"> #if USE(AVFOUNDATION)
</span><span class="lines">@@ -2995,22 +2771,20 @@
</span><span class="cx">     MediaPlayerFactorySupport::callRegisterMediaEngine(MockMediaPlayerMediaSource::registerMediaEngine);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector&lt;String&gt; Internals::bufferedSamplesForTrackID(SourceBuffer* buffer, const AtomicString&amp; trackID)
</del><ins>+Vector&lt;String&gt; Internals::bufferedSamplesForTrackID(SourceBuffer&amp; buffer, const AtomicString&amp; trackID)
</ins><span class="cx"> {
</span><del>-    if (!buffer)
-        return Vector&lt;String&gt;();
-
-    return buffer-&gt;bufferedSamplesForTrackID(trackID);
</del><ins>+    return buffer.bufferedSamplesForTrackID(trackID);
</ins><span class="cx"> }
</span><span class="cx">     
</span><del>-void Internals::setShouldGenerateTimestamps(SourceBuffer* buffer, bool flag)
</del><ins>+void Internals::setShouldGenerateTimestamps(SourceBuffer&amp; buffer, bool flag)
</ins><span class="cx"> {
</span><del>-    if (buffer)
-        buffer-&gt;setShouldGenerateTimestamps(flag);
</del><ins>+    buffer.setShouldGenerateTimestamps(flag);
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><ins>+
</ins><span class="cx"> void Internals::beginMediaSessionInterruption(const String&amp; interruptionString, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     PlatformMediaSession::InterruptionType interruption = PlatformMediaSession::SystemInterruption;
</span><span class="lines">@@ -3083,16 +2857,11 @@
</span><span class="cx">     PlatformMediaSessionManager::sharedManager().addRestriction(mediaType, restrictions);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::setMediaElementRestrictions(HTMLMediaElement* element, const String&amp; restrictionsString, ExceptionCode&amp; ec)
</del><ins>+void Internals::setMediaElementRestrictions(HTMLMediaElement&amp; element, const String&amp; restrictionsString)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
-        return;
-    }
</del><ins>+    MediaElementSession::BehaviorRestrictions restrictions = element.mediaSession().behaviorRestrictions();
+    element.mediaSession().removeBehaviorRestriction(restrictions);
</ins><span class="cx"> 
</span><del>-    MediaElementSession::BehaviorRestrictions restrictions = element-&gt;mediaSession().behaviorRestrictions();
-    element-&gt;mediaSession().removeBehaviorRestriction(restrictions);
-
</del><span class="cx">     restrictions = MediaElementSession::NoRestrictions;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; restrictionsArray;
</span><span class="lines">@@ -3127,7 +2896,7 @@
</span><span class="cx">         if (equalLettersIgnoringASCIICase(restrictionString, &quot;overrideusergesturerequirementformaincontent&quot;))
</span><span class="cx">             restrictions |= MediaElementSession::OverrideUserGestureRequirementForMainContent;
</span><span class="cx">     }
</span><del>-    element-&gt;mediaSession().addBehaviorRestriction(restrictions);
</del><ins>+    element.mediaSession().addBehaviorRestriction(restrictions);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Internals::postRemoteControlCommand(const String&amp; commandString, ExceptionCode&amp; ec)
</span><span class="lines">@@ -3158,15 +2927,15 @@
</span><span class="cx">     PlatformMediaSessionManager::sharedManager().didReceiveRemoteControlCommand(command);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Internals::elementIsBlockingDisplaySleep(Element* element) const
</del><ins>+bool Internals::elementIsBlockingDisplaySleep(HTMLMediaElement&amp; element) const
</ins><span class="cx"> {
</span><del>-    HTMLMediaElement* mediaElement = downcast&lt;HTMLMediaElement&gt;(element);
-    return mediaElement ? mediaElement-&gt;isDisablingSleep() : false;
</del><ins>+    return element.isDisablingSleep();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(VIDEO)
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><ins>+
</ins><span class="cx"> static MediaSessionInterruptingCategory interruptingCategoryFromString(const String&amp; interruptingCategoryString)
</span><span class="cx"> {
</span><span class="cx">     if (interruptingCategoryString == &quot;content&quot;)
</span><span class="lines">@@ -3218,19 +2987,16 @@
</span><span class="cx">     else
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif // ENABLE(MEDIA_SESSION)
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span><del>-void Internals::setAudioContextRestrictions(AudioContext* context, const String &amp;restrictionsString, ExceptionCode &amp;ec)
</del><ins>+
+void Internals::setAudioContextRestrictions(AudioContext&amp; context, const String&amp; restrictionsString)
</ins><span class="cx"> {
</span><del>-    if (!context) {
-        ec = INVALID_ACCESS_ERR;
-        return;
-    }
</del><ins>+    AudioContext::BehaviorRestrictions restrictions = context.behaviorRestrictions();
+    context.removeBehaviorRestriction(restrictions);
</ins><span class="cx"> 
</span><del>-    AudioContext::BehaviorRestrictions restrictions = context-&gt;behaviorRestrictions();
-    context-&gt;removeBehaviorRestriction(restrictions);
-
</del><span class="cx">     restrictions = AudioContext::NoRestrictions;
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; restrictionsArray;
</span><span class="lines">@@ -3243,8 +3009,9 @@
</span><span class="cx">         if (equalLettersIgnoringASCIICase(restrictionString, &quot;requirepageconsentforaudiostart&quot;))
</span><span class="cx">             restrictions |= AudioContext::RequirePageConsentForAudioStartRestriction;
</span><span class="cx">     }
</span><del>-    context-&gt;addBehaviorRestriction(restrictions);
</del><ins>+    context.addBehaviorRestriction(restrictions);
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void Internals::simulateSystemSleep() const
</span><span class="lines">@@ -3262,6 +3029,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET)
</span><ins>+
</ins><span class="cx"> void Internals::setMockMediaPlaybackTargetPickerEnabled(bool enabled)
</span><span class="cx"> {
</span><span class="cx">     Page* page = contextDocument()-&gt;frame()-&gt;page();
</span><span class="lines">@@ -3290,6 +3058,7 @@
</span><span class="cx"> 
</span><span class="cx">     page-&gt;setMockMediaPlaybackTargetPickerState(deviceName, state);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;MockPageOverlay&gt; Internals::installMockPageOverlay(const String&amp; overlayType, ExceptionCode&amp; ec)
</span><span class="lines">@@ -3371,13 +3140,16 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span><ins>+
</ins><span class="cx"> MockContentFilterSettings&amp; Internals::mockContentFilterSettings()
</span><span class="cx"> {
</span><span class="cx">     return MockContentFilterSettings::singleton();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><ins>+
</ins><span class="cx"> static void appendOffsets(StringBuilder&amp; builder, const Vector&lt;LayoutUnit&gt;&amp; snapOffsets)
</span><span class="cx"> {
</span><span class="cx">     bool justStarting = true;
</span><span class="lines">@@ -3394,17 +3166,12 @@
</span><span class="cx">     builder.append(&quot; }&quot;);
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-String Internals::scrollSnapOffsets(Element* element, ExceptionCode&amp; ec)
</del><ins>+String Internals::scrollSnapOffsets(Element&amp; element, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    if (!element) {
-        ec = INVALID_ACCESS_ERR;
</del><ins>+    if (!element.renderBox())
</ins><span class="cx">         return String();
</span><del>-    }
</del><span class="cx"> 
</span><del>-    if (!element-&gt;renderBox())
-        return String();
-
-    RenderBox&amp; box = *element-&gt;renderBox();
</del><ins>+    RenderBox&amp; box = *element.renderBox();
</ins><span class="cx">     ScrollableArea* scrollableArea;
</span><span class="cx">     
</span><span class="cx">     if (box.isBody()) {
</span><span class="lines">@@ -3429,20 +3196,21 @@
</span><span class="cx">     StringBuilder result;
</span><span class="cx"> 
</span><span class="cx">     if (scrollableArea-&gt;horizontalSnapOffsets()) {
</span><del>-        result.append(&quot;horizontal = &quot;);
</del><ins>+        result.appendLiteral(&quot;horizontal = &quot;);
</ins><span class="cx">         appendOffsets(result, *scrollableArea-&gt;horizontalSnapOffsets());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (scrollableArea-&gt;verticalSnapOffsets()) {
</span><span class="cx">         if (result.length())
</span><del>-            result.append(&quot;, &quot;);
</del><ins>+            result.appendLiteral(&quot;, &quot;);
</ins><span class="cx"> 
</span><del>-        result.append(&quot;vertical = &quot;);
</del><ins>+        result.appendLiteral(&quot;vertical = &quot;);
</ins><span class="cx">         appendOffsets(result, *scrollableArea-&gt;verticalSnapOffsets());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return result.toString();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> bool Internals::testPreloaderSettingViewport()
</span><span class="lines">@@ -3478,25 +3246,24 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-String Internals::getCurrentMediaControlsStatusForElement(HTMLMediaElement* mediaElement)
</del><ins>+String Internals::getCurrentMediaControlsStatusForElement(HTMLMediaElement&amp; mediaElement)
</ins><span class="cx"> {
</span><span class="cx"> #if !ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><span class="cx">     UNUSED_PARAM(mediaElement);
</span><span class="cx">     return String();
</span><span class="cx"> #else
</span><del>-    if (!mediaElement)
-        return String();
-
-    return mediaElement-&gt;getCurrentMediaControlsStatus();
</del><ins>+    return mediaElement.getCurrentMediaControlsStatus();
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><del>-String Internals::userVisibleString(const DOMURL*)
</del><ins>+
+String Internals::userVisibleString(const DOMURL&amp;)
</ins><span class="cx"> {
</span><del>-    // Not implemented in WebCore.
</del><ins>+    // Cocoa-specific function. Could ASSERT_NOT_REACHED, but that's probably overkill.
</ins><span class="cx">     return String();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void Internals::setShowAllPlugins(bool show)
</span><span class="lines">@@ -3513,6 +3280,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(STREAMS_API)
</span><ins>+
</ins><span class="cx"> bool Internals::isReadableStreamDisturbed(ScriptState&amp; state, JSValue stream)
</span><span class="cx"> {
</span><span class="cx">     JSGlobalObject* globalObject = state.vmEntryGlobalObject();
</span><span class="lines">@@ -3535,6 +3303,7 @@
</span><span class="cx"> 
</span><span class="cx">     return returnedValue.asBoolean();
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> String Internals::resourceLoadStatisticsForOrigin(String origin)
</span><span class="lines">@@ -3547,11 +3316,11 @@
</span><span class="cx">     Settings::setResourceLoadStatisticsEnabled(enable);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String Internals::composedTreeAsText(Node* node)
</del><ins>+String Internals::composedTreeAsText(Node&amp; node)
</ins><span class="cx"> {
</span><span class="cx">     if (!is&lt;ContainerNode&gt;(node))
</span><del>-        return &quot;&quot;;
-    return WebCore::composedTreeAsText(downcast&lt;ContainerNode&gt;(*node));
</del><ins>+        return emptyString();
+    return WebCore::composedTreeAsText(downcast&lt;ContainerNode&gt;(node));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Internals::setViewportForceAlwaysUserScalable(bool scalable)
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/testing/Internals.h        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -52,12 +52,17 @@
</span><span class="cx"> class Element;
</span><span class="cx"> class File;
</span><span class="cx"> class Frame;
</span><ins>+class HTMLImageElement;
+class HTMLInputElement;
+class HTMLLinkElement;
</ins><span class="cx"> class HTMLMediaElement;
</span><ins>+class HTMLSelectElement;
</ins><span class="cx"> class InspectorStubFrontend;
</span><span class="cx"> class InternalSettings;
</span><span class="cx"> class MallocStatistics;
</span><span class="cx"> class MediaSession;
</span><span class="cx"> class MemoryInfo;
</span><ins>+class MockContentFilterSettings;
</ins><span class="cx"> class MockPageOverlay;
</span><span class="cx"> class Node;
</span><span class="cx"> class Page;
</span><span class="lines">@@ -70,33 +75,28 @@
</span><span class="cx"> class TypeConversions;
</span><span class="cx"> class XMLHttpRequest;
</span><span class="cx"> 
</span><del>-#if ENABLE(CONTENT_FILTERING)
-class MockContentFilterSettings;
-#endif
-
</del><span class="cx"> typedef int ExceptionCode;
</span><span class="cx"> 
</span><del>-class Internals : public RefCounted&lt;Internals&gt;
-                , public ContextDestructionObserver {
</del><ins>+class Internals : public RefCounted&lt;Internals&gt;, public ContextDestructionObserver {
</ins><span class="cx"> public:
</span><del>-    static Ref&lt;Internals&gt; create(Document*);
</del><ins>+    static Ref&lt;Internals&gt; create(Document&amp;);
</ins><span class="cx">     virtual ~Internals();
</span><span class="cx"> 
</span><del>-    static void resetToConsistentState(Page*);
</del><ins>+    static void resetToConsistentState(Page&amp;);
</ins><span class="cx"> 
</span><del>-    String elementRenderTreeAsText(Element*, ExceptionCode&amp;);
-    bool hasPausedImageAnimations(Element*, ExceptionCode&amp;);
</del><ins>+    String elementRenderTreeAsText(Element&amp;, ExceptionCode&amp;);
+    bool hasPausedImageAnimations(Element&amp;);
</ins><span class="cx"> 
</span><del>-    String address(Node*);
-    bool nodeNeedsStyleRecalc(Node*, ExceptionCode&amp;);
-    String styleChangeType(Node*, ExceptionCode&amp;);
</del><ins>+    String address(Node&amp;);
+    bool nodeNeedsStyleRecalc(Node&amp;);
+    String styleChangeType(Node&amp;);
</ins><span class="cx">     String description(Deprecated::ScriptValue);
</span><span class="cx"> 
</span><span class="cx">     bool isPreloaded(const String&amp; url);
</span><span class="cx">     bool isLoadingFromMemoryCache(const String&amp; url);
</span><del>-    String xhrResponseSource(XMLHttpRequest*);
-    bool isSharingStyleSheetContents(Element* linkA, Element* linkB);
-    bool isStyleSheetLoadingSubresources(Element* link);
</del><ins>+    String xhrResponseSource(XMLHttpRequest&amp;);
+    bool isSharingStyleSheetContents(HTMLLinkElement&amp; a, HTMLLinkElement&amp; b);
+    bool isStyleSheetLoadingSubresources(HTMLLinkElement&amp;);
</ins><span class="cx">     void setOverrideCachePolicy(const String&amp;);
</span><span class="cx">     void setCanShowModalDialogOverride(bool allow, ExceptionCode&amp;);
</span><span class="cx">     void setOverrideResourceLoadPriority(const String&amp;);
</span><span class="lines">@@ -106,21 +106,20 @@
</span><span class="cx">     void pruneMemoryCacheToSize(unsigned size);
</span><span class="cx">     unsigned memoryCacheSize() const;
</span><span class="cx"> 
</span><del>-    size_t imageFrameIndex(Element*, ExceptionCode&amp;);
</del><ins>+    unsigned imageFrameIndex(HTMLImageElement&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void clearPageCache();
</span><span class="cx">     unsigned pageCacheSize() const;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSComputedStyleDeclaration&gt; computedStyleIncludingVisitedInfo(Node*, ExceptionCode&amp;) const;
</del><ins>+    RefPtr&lt;CSSComputedStyleDeclaration&gt; computedStyleIncludingVisitedInfo(Node&amp;) const;
</ins><span class="cx"> 
</span><del>-    Node* ensureShadowRoot(Element* host, ExceptionCode&amp;);
-    Node* ensureUserAgentShadowRoot(Element* host, ExceptionCode&amp;);
-    Node* createShadowRoot(Element* host, ExceptionCode&amp;);
-    Node* shadowRoot(Element* host, ExceptionCode&amp;);
-    String shadowRootType(const Node*, ExceptionCode&amp;) const;
-    Element* includerFor(Node*, ExceptionCode&amp;);
-    String shadowPseudoId(Element*, ExceptionCode&amp;);
-    void setShadowPseudoId(Element*, const String&amp;, ExceptionCode&amp;);
</del><ins>+    Node* ensureShadowRoot(Element&amp; host, ExceptionCode&amp;);
+    Node* ensureUserAgentShadowRoot(Element&amp; host);
+    Node* createShadowRoot(Element&amp; host, ExceptionCode&amp;);
+    Node* shadowRoot(Element&amp; host);
+    String shadowRootType(const Node&amp;, ExceptionCode&amp;) const;
+    String shadowPseudoId(Element&amp;);
+    void setShadowPseudoId(Element&amp;, const String&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // DOMTimers throttling testing.
</span><span class="cx">     bool isTimerThrottled(int timeoutId, ExceptionCode&amp;);
</span><span class="lines">@@ -135,40 +134,38 @@
</span><span class="cx">     bool animationsAreSuspended(ExceptionCode&amp;) const;
</span><span class="cx">     void suspendAnimations(ExceptionCode&amp;) const;
</span><span class="cx">     void resumeAnimations(ExceptionCode&amp;) const;
</span><del>-    bool pauseAnimationAtTimeOnElement(const String&amp; animationName, double pauseTime, Element*, ExceptionCode&amp;);
-    bool pauseAnimationAtTimeOnPseudoElement(const String&amp; animationName, double pauseTime, Element*, const String&amp; pseudoId, ExceptionCode&amp;);
</del><ins>+    bool pauseAnimationAtTimeOnElement(const String&amp; animationName, double pauseTime, Element&amp;, ExceptionCode&amp;);
+    bool pauseAnimationAtTimeOnPseudoElement(const String&amp; animationName, double pauseTime, Element&amp;, const String&amp; pseudoId, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // CSS Transition testing.
</span><del>-    bool pauseTransitionAtTimeOnElement(const String&amp; propertyName, double pauseTime, Element*, ExceptionCode&amp;);
-    bool pauseTransitionAtTimeOnPseudoElement(const String&amp; property, double pauseTime, Element*, const String&amp; pseudoId, ExceptionCode&amp;);
</del><ins>+    bool pauseTransitionAtTimeOnElement(const String&amp; propertyName, double pauseTime, Element&amp;, ExceptionCode&amp;);
+    bool pauseTransitionAtTimeOnPseudoElement(const String&amp; property, double pauseTime, Element&amp;, const String&amp; pseudoId, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    Node* treeScopeRootNode(Node*, ExceptionCode&amp;);
-    Node* parentTreeScope(Node*, ExceptionCode&amp;);
</del><ins>+    Node* treeScopeRootNode(Node&amp;);
+    Node* parentTreeScope(Node&amp;);
</ins><span class="cx"> 
</span><del>-    bool attached(Node*, ExceptionCode&amp;);
-
-    String visiblePlaceholder(Element*);
-    void selectColorInColorChooser(Element*, const String&amp; colorValue);
</del><ins>+    String visiblePlaceholder(Element&amp;);
+    void selectColorInColorChooser(HTMLInputElement&amp;, const String&amp; colorValue);
</ins><span class="cx">     Vector&lt;String&gt; formControlStateOfPreviousHistoryItem(ExceptionCode&amp;);
</span><span class="cx">     void setFormControlStateOfPreviousHistoryItem(const Vector&lt;String&gt;&amp;, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;ClientRect&gt; absoluteCaretBounds(ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    Ref&lt;ClientRect&gt; boundingBox(Element*, ExceptionCode&amp;);
</del><ins>+    Ref&lt;ClientRect&gt; boundingBox(Element&amp;);
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;ClientRectList&gt; inspectorHighlightRects(ExceptionCode&amp;);
</span><span class="cx">     String inspectorHighlightObject(ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    unsigned markerCountForNode(Node*, const String&amp;, ExceptionCode&amp;);
-    RefPtr&lt;Range&gt; markerRangeForNode(Node*, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
-    String markerDescriptionForNode(Node*, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
</del><ins>+    unsigned markerCountForNode(Node&amp;, const String&amp;, ExceptionCode&amp;);
+    RefPtr&lt;Range&gt; markerRangeForNode(Node&amp;, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
+    String markerDescriptionForNode(Node&amp;, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
</ins><span class="cx">     String dumpMarkerRects(const String&amp; markerType, ExceptionCode&amp;);
</span><del>-    void addTextMatchMarker(const Range*, bool isActive);
</del><ins>+    void addTextMatchMarker(const Range&amp;, bool isActive);
</ins><span class="cx">     void setMarkedTextMatchesAreHighlighted(bool, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     void invalidateFontCache();
</span><span class="cx"> 
</span><del>-    void setScrollViewPosition(long x, long y, ExceptionCode&amp;);
</del><ins>+    void setScrollViewPosition(int x, int y, ExceptionCode&amp;);
</ins><span class="cx">     void setViewBaseBackgroundColor(const String&amp; colorValue, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     void setPagination(const String&amp; mode, int gap, ExceptionCode&amp; ec) { setPagination(mode, gap, 0, ec); }
</span><span class="lines">@@ -176,22 +173,22 @@
</span><span class="cx">     void setPaginationLineGridEnabled(bool, ExceptionCode&amp;);
</span><span class="cx">     String configurationForViewport(float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    bool wasLastChangeUserEdit(Element* textField, ExceptionCode&amp;);
-    bool elementShouldAutoComplete(Element* inputElement, ExceptionCode&amp;);
-    void setEditingValue(Element* inputElement, const String&amp;, ExceptionCode&amp;);
-    void setAutofilled(Element*, bool enabled, ExceptionCode&amp;);
-    void setShowAutoFillButton(Element*, const String&amp; autoFillButtonType, ExceptionCode&amp;);
-    void scrollElementToRect(Element*, long x, long y, long w, long h, ExceptionCode&amp;);
</del><ins>+    bool wasLastChangeUserEdit(Element&amp; textField, ExceptionCode&amp;);
+    bool elementShouldAutoComplete(HTMLInputElement&amp;);
+    void setEditingValue(HTMLInputElement&amp;, const String&amp;);
+    void setAutofilled(HTMLInputElement&amp;, bool enabled);
+    void setShowAutoFillButton(HTMLInputElement&amp;, const String&amp; autoFillButtonType);
+    void scrollElementToRect(Element&amp;, int x, int y, int w, int h, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    String autofillFieldName(Element*, ExceptionCode&amp;);
</del><ins>+    String autofillFieldName(Element&amp;, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void paintControlTints(ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;Range&gt; rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&amp;);
-    unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&amp;);
-    unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&amp;);
-    String rangeAsText(const Range*, ExceptionCode&amp;);
-    RefPtr&lt;Range&gt; subrange(Range*, int rangeLocation, int rangeLength, ExceptionCode&amp;);
</del><ins>+    RefPtr&lt;Range&gt; rangeFromLocationAndLength(Element&amp; scope, int rangeLocation, int rangeLength);
+    unsigned locationFromRange(Element&amp; scope, const Range&amp;);
+    unsigned lengthFromRange(Element&amp; scope, const Range&amp;);
+    String rangeAsText(const Range&amp;);
+    RefPtr&lt;Range&gt; subrange(Range&amp;, int rangeLocation, int rangeLength);
</ins><span class="cx">     RefPtr&lt;Range&gt; rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     void setDelegatesScrolling(bool enabled, ExceptionCode&amp;);
</span><span class="lines">@@ -208,7 +205,7 @@
</span><span class="cx">     unsigned wheelEventHandlerCount(ExceptionCode&amp;);
</span><span class="cx">     unsigned touchEventHandlerCount(ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;NodeList&gt; nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding,
</del><ins>+    RefPtr&lt;NodeList&gt; nodesFromRect(Document&amp;, int x, int y, unsigned topPadding, unsigned rightPadding,
</ins><span class="cx">         unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&amp;) const;
</span><span class="cx"> 
</span><span class="cx">     String parserMetaData(Deprecated::ScriptValue = Deprecated::ScriptValue());
</span><span class="lines">@@ -253,25 +250,25 @@
</span><span class="cx">         LAYER_TREE_INCLUDES_PAINTING_PHASES = 8,
</span><span class="cx">         LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16
</span><span class="cx">     };
</span><del>-    String layerTreeAsText(Document*, unsigned flags, ExceptionCode&amp;) const;
-    String layerTreeAsText(Document*, ExceptionCode&amp;) const;
</del><ins>+    String layerTreeAsText(Document&amp;, unsigned flags, ExceptionCode&amp;) const;
+    String layerTreeAsText(Document&amp;, ExceptionCode&amp;) const;
</ins><span class="cx">     String repaintRectsAsText(ExceptionCode&amp;) const;
</span><span class="cx">     String scrollingStateTreeAsText(ExceptionCode&amp;) const;
</span><span class="cx">     String mainThreadScrollingReasons(ExceptionCode&amp;) const;
</span><span class="cx">     RefPtr&lt;ClientRectList&gt; nonFastScrollableRects(ExceptionCode&amp;) const;
</span><span class="cx"> 
</span><del>-    void setElementUsesDisplayListDrawing(Element*, bool usesDisplayListDrawing, ExceptionCode&amp;);
-    void setElementTracksDisplayListReplay(Element*, bool isTrackingReplay, ExceptionCode&amp;);
</del><ins>+    void setElementUsesDisplayListDrawing(Element&amp;, bool usesDisplayListDrawing, ExceptionCode&amp;);
+    void setElementTracksDisplayListReplay(Element&amp;, bool isTrackingReplay, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     enum {
</span><span class="cx">         // Values need to be kept in sync with Internals.idl.
</span><span class="cx">         DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS = 1,
</span><span class="cx">     };
</span><del>-    String displayListForElement(Element*, unsigned flags, ExceptionCode&amp;);
-    String displayListForElement(Element*, ExceptionCode&amp;);
</del><ins>+    String displayListForElement(Element&amp;, unsigned flags, ExceptionCode&amp;);
+    String displayListForElement(Element&amp;, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><del>-    String replayDisplayListForElement(Element*, unsigned flags, ExceptionCode&amp;);
-    String replayDisplayListForElement(Element*, ExceptionCode&amp;);
</del><ins>+    String replayDisplayListForElement(Element&amp;, unsigned flags, ExceptionCode&amp;);
+    String replayDisplayListForElement(Element&amp;, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void garbageCollectDocumentResources(ExceptionCode&amp;) const;
</span><span class="cx"> 
</span><span class="lines">@@ -288,9 +285,9 @@
</span><span class="cx">     void setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode&amp;);
</span><span class="cx">     void setInspectorIsUnderTest(bool isUnderTest, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    String counterValue(Element*);
</del><ins>+    String counterValue(Element&amp;);
</ins><span class="cx"> 
</span><del>-    int pageNumber(Element*, float pageWidth = 800, float pageHeight = 600);
</del><ins>+    int pageNumber(Element&amp;, float pageWidth = 800, float pageHeight = 600);
</ins><span class="cx">     Vector&lt;String&gt; shortcutIconURLs() const;
</span><span class="cx"> 
</span><span class="cx">     int numberOfPages(float pageWidthInPixels = 800, float pageHeightInPixels = 600);
</span><span class="lines">@@ -311,10 +308,10 @@
</span><span class="cx">     void setTopContentInset(float);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><del>-    void webkitWillEnterFullScreenForElement(Element*);
-    void webkitDidEnterFullScreenForElement(Element*);
-    void webkitWillExitFullScreenForElement(Element*);
-    void webkitDidExitFullScreenForElement(Element*);
</del><ins>+    void webkitWillEnterFullScreenForElement(Element&amp;);
+    void webkitDidEnterFullScreenForElement(Element&amp;);
+    void webkitWillExitFullScreenForElement(Element&amp;);
+    void webkitDidExitFullScreenForElement(Element&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_TESTSUPPORT_EXPORT void setApplicationCacheOriginQuota(unsigned long long);
</span><span class="lines">@@ -332,20 +329,20 @@
</span><span class="cx">     void stopTrackingRepaints(ExceptionCode&amp;);
</span><span class="cx"> 
</span><span class="cx">     void startTrackingLayerFlushes(ExceptionCode&amp;);
</span><del>-    unsigned long layerFlushCount(ExceptionCode&amp;);
</del><ins>+    unsigned layerFlushCount(ExceptionCode&amp;);
</ins><span class="cx">     
</span><span class="cx">     void startTrackingStyleRecalcs(ExceptionCode&amp;);
</span><del>-    unsigned long styleRecalcCount(ExceptionCode&amp;);
</del><ins>+    unsigned styleRecalcCount(ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void startTrackingCompositingUpdates(ExceptionCode&amp;);
</span><del>-    unsigned long compositingUpdateCount(ExceptionCode&amp;);
</del><ins>+    unsigned compositingUpdateCount(ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&amp;);
</span><span class="cx">     void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionCode&amp;);
</span><span class="cx">     unsigned layoutCount() const;
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;ArrayBuffer&gt; serializeObject(PassRefPtr&lt;SerializedScriptValue&gt;) const;
</span><del>-    RefPtr&lt;SerializedScriptValue&gt; deserializeBuffer(PassRefPtr&lt;ArrayBuffer&gt;) const;
</del><ins>+    RefPtr&lt;SerializedScriptValue&gt; deserializeBuffer(ArrayBuffer&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     bool isFromCurrentWorld(Deprecated::ScriptValue) const;
</span><span class="cx"> 
</span><span class="lines">@@ -354,9 +351,9 @@
</span><span class="cx"> 
</span><span class="cx">     String getCurrentCursorInfo(ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    String markerTextForListItem(Element*, ExceptionCode&amp;);
</del><ins>+    String markerTextForListItem(Element&amp;);
</ins><span class="cx"> 
</span><del>-    String toolTipFromElement(Element*, ExceptionCode&amp;) const;
</del><ins>+    String toolTipFromElement(Element&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     void forceReload(bool endToEnd);
</span><span class="cx"> 
</span><span class="lines">@@ -379,14 +376,14 @@
</span><span class="cx">     void enableMockRTCPeerConnectionHandler();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    String getImageSourceURL(Element*, ExceptionCode&amp;);
</del><ins>+    String getImageSourceURL(Element&amp;);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>-    void simulateAudioInterruption(Node*);
-    bool mediaElementHasCharacteristic(Node*, const String&amp;, ExceptionCode&amp;);
</del><ins>+    void simulateAudioInterruption(HTMLMediaElement&amp;);
+    bool mediaElementHasCharacteristic(HTMLMediaElement&amp;, const String&amp;, ExceptionCode&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool isSelectPopupVisible(Node*);
</del><ins>+    bool isSelectPopupVisible(HTMLSelectElement&amp;);
</ins><span class="cx"> 
</span><span class="cx">     String captionsStyleSheetOverride(ExceptionCode&amp;);
</span><span class="cx">     void setCaptionsStyleSheetOverride(const String&amp;, ExceptionCode&amp;);
</span><span class="lines">@@ -395,7 +392,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx">     Ref&lt;TimeRanges&gt; createTimeRanges(Float32Array* startTimes, Float32Array* endTimes);
</span><del>-    double closestTimeToTimeRanges(double time, TimeRanges*);
</del><ins>+    double closestTimeToTimeRanges(double time, TimeRanges&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;ClientRect&gt; selectionBounds(ExceptionCode&amp;);
</span><span class="lines">@@ -404,13 +401,13 @@
</span><span class="cx">     bool isVibrating();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool isPluginUnavailabilityIndicatorObscured(Element*, ExceptionCode&amp;);
-    bool isPluginSnapshotted(Element*, ExceptionCode&amp;);
</del><ins>+    bool isPluginUnavailabilityIndicatorObscured(Element&amp;, ExceptionCode&amp;);
+    bool isPluginSnapshotted(Element&amp;);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx">     WEBCORE_TESTSUPPORT_EXPORT void initializeMockMediaSource();
</span><del>-    Vector&lt;String&gt; bufferedSamplesForTrackID(SourceBuffer*, const AtomicString&amp;);
-    void setShouldGenerateTimestamps(SourceBuffer*, bool);
</del><ins>+    Vector&lt;String&gt; bufferedSamplesForTrackID(SourceBuffer&amp;, const AtomicString&amp;);
+    void setShouldGenerateTimestamps(SourceBuffer&amp;, bool);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="lines">@@ -419,16 +416,16 @@
</span><span class="cx">     void applicationDidEnterForeground() const;
</span><span class="cx">     void applicationWillEnterBackground() const;
</span><span class="cx">     void setMediaSessionRestrictions(const String&amp; mediaType, const String&amp; restrictions, ExceptionCode&amp;);
</span><del>-    void setMediaElementRestrictions(HTMLMediaElement*, const String&amp; restrictions, ExceptionCode&amp;);
</del><ins>+    void setMediaElementRestrictions(HTMLMediaElement&amp;, const String&amp; restrictions);
</ins><span class="cx">     void postRemoteControlCommand(const String&amp;, ExceptionCode&amp;);
</span><del>-    bool elementIsBlockingDisplaySleep(Element*) const;
</del><ins>+    bool elementIsBlockingDisplaySleep(HTMLMediaElement&amp;) const;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx">     void sendMediaSessionStartOfInterruptionNotification(const String&amp;);
</span><span class="cx">     void sendMediaSessionEndOfInterruptionNotification(const String&amp;);
</span><del>-    String mediaSessionCurrentState(MediaSession*) const;
-    double mediaElementPlayerVolume(HTMLMediaElement*) const;
</del><ins>+    String mediaSessionCurrentState(MediaSession&amp;) const;
+    double mediaElementPlayerVolume(HTMLMediaElement&amp;) const;
</ins><span class="cx">     void sendMediaControlEvent(const String&amp;);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -438,7 +435,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_AUDIO)
</span><del>-    void setAudioContextRestrictions(AudioContext*, const String&amp; restrictions, ExceptionCode&amp;);
</del><ins>+    void setAudioContextRestrictions(AudioContext&amp;, const String&amp; restrictions);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void simulateSystemSleep() const;
</span><span class="lines">@@ -461,14 +458,14 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><del>-    String scrollSnapOffsets(Element*, ExceptionCode&amp;);
</del><ins>+    String scrollSnapOffsets(Element&amp;, ExceptionCode&amp;);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     String pathStringWithShrinkWrappedRects(Vector&lt;double&gt; rectComponents, double radius, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    String getCurrentMediaControlsStatusForElement(HTMLMediaElement*);
</del><ins>+    String getCurrentMediaControlsStatusForElement(HTMLMediaElement&amp;);
</ins><span class="cx"> 
</span><del>-    String userVisibleString(const DOMURL*);
</del><ins>+    String userVisibleString(const DOMURL&amp;);
</ins><span class="cx">     void setShowAllPlugins(bool);
</span><span class="cx"> 
</span><span class="cx">     String resourceLoadStatisticsForOrigin(String origin);
</span><span class="lines">@@ -478,16 +475,16 @@
</span><span class="cx">     bool isReadableStreamDisturbed(ScriptState&amp;, JSC::JSValue);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    String composedTreeAsText(Node*);
</del><ins>+    String composedTreeAsText(Node&amp;);
</ins><span class="cx">     
</span><span class="cx">     void setViewportForceAlwaysUserScalable(bool);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit Internals(Document*);
</del><ins>+    explicit Internals(Document&amp;);
</ins><span class="cx">     Document* contextDocument() const;
</span><span class="cx">     Frame* frame() const;
</span><span class="cx"> 
</span><del>-    RenderedDocumentMarker* markerAt(Node*, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
</del><ins>+    RenderedDocumentMarker* markerAt(Node&amp;, const String&amp; markerType, unsigned index, ExceptionCode&amp;);
</ins><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;InspectorStubFrontend&gt; m_inspectorFrontend;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -25,8 +25,8 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> enum PageOverlayType {
</span><del>-&quot;view&quot;,
-&quot;document&quot;
</del><ins>+    &quot;view&quot;,
+    &quot;document&quot;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // These map to ResourceRequestCachePolicy.
</span><span class="lines">@@ -64,24 +64,23 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    UsePointersEvenForNonNullableObjectArguments,
-    NoInterfaceObject,
</del><span class="cx">     ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
</span><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface Internals {
</span><span class="cx">     DOMString address(Node node);
</span><del>-    [RaisesException] boolean nodeNeedsStyleRecalc(Node node);
-    [RaisesException] DOMString styleChangeType(Node node);
</del><ins>+    boolean nodeNeedsStyleRecalc(Node node);
+    DOMString styleChangeType(Node node);
</ins><span class="cx">     DOMString description(any value);
</span><span class="cx"> 
</span><span class="cx">     // Animated image pausing testing.
</span><del>-    [RaisesException] boolean hasPausedImageAnimations(Element element);
</del><ins>+    boolean hasPausedImageAnimations(Element element);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] DOMString elementRenderTreeAsText(Element element);
</span><span class="cx">     boolean isPreloaded(DOMString url);
</span><span class="cx">     boolean isLoadingFromMemoryCache(DOMString url);
</span><span class="cx">     DOMString xhrResponseSource(XMLHttpRequest xhr);
</span><del>-    boolean isSharingStyleSheetContents(Element linkA, Element linkB);
-    boolean isStyleSheetLoadingSubresources(Element link);
</del><ins>+    boolean isSharingStyleSheetContents(HTMLLinkElement a, HTMLLinkElement b);
+    boolean isStyleSheetLoadingSubresources(HTMLLinkElement link);
</ins><span class="cx">     void clearMemoryCache();
</span><span class="cx">     void pruneMemoryCacheToSize(long size);
</span><span class="cx">     long memoryCacheSize();
</span><span class="lines">@@ -90,21 +89,20 @@
</span><span class="cx">     void setStrictRawResourceValidationPolicyDisabled(boolean disabled);
</span><span class="cx"> 
</span><span class="cx">     void clearPageCache();
</span><del>-    unsigned int pageCacheSize();
</del><ins>+    unsigned long pageCacheSize();
</ins><span class="cx"> 
</span><del>-    [RaisesException] CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
</del><ins>+    CSSStyleDeclaration computedStyleIncludingVisitedInfo(Node node);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] Node ensureShadowRoot(Element host);
</span><del>-    [RaisesException] Node ensureUserAgentShadowRoot(Element host);
</del><ins>+    Node ensureUserAgentShadowRoot(Element host);
</ins><span class="cx">     [RaisesException] Node createShadowRoot(Element host);
</span><del>-    [RaisesException] Node shadowRoot(Element host);
</del><ins>+    Node shadowRoot(Element host);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] DOMString shadowRootType(Node root);
</span><del>-    [RaisesException] Element includerFor(Node node);
-    [RaisesException] DOMString shadowPseudoId(Element element);
-    [RaisesException] void setShadowPseudoId(Element element, DOMString id);
-    [RaisesException] Node treeScopeRootNode(Node node);
-    [RaisesException] Node parentTreeScope(Node node);
</del><ins>+    DOMString shadowPseudoId(Element element);
+    void setShadowPseudoId(Element element, DOMString id);
+    Node treeScopeRootNode(Node node);
+    Node parentTreeScope(Node node);
</ins><span class="cx"> 
</span><span class="cx">     // Spatial Navigation testing
</span><span class="cx">     [RaisesException] unsigned long lastSpatialNavigationCandidateCount();
</span><span class="lines">@@ -121,16 +119,14 @@
</span><span class="cx">     [RaisesException] boolean pauseTransitionAtTimeOnElement(DOMString propertyName, unrestricted double pauseTime, Element element);
</span><span class="cx">     [RaisesException] boolean pauseTransitionAtTimeOnPseudoElement(DOMString property, unrestricted double pauseTime, Element element, DOMString pseudoId);
</span><span class="cx"> 
</span><del>-    [RaisesException] boolean attached(Node node);
-
</del><span class="cx">     DOMString visiblePlaceholder(Element element);
</span><del>-    void selectColorInColorChooser(Element element, DOMString colorValue);
</del><ins>+    void selectColorInColorChooser(HTMLInputElement element, DOMString colorValue);
</ins><span class="cx">     [RaisesException] DOMString[] formControlStateOfPreviousHistoryItem();
</span><span class="cx">     [RaisesException] void setFormControlStateOfPreviousHistoryItem(sequence&lt;DOMString&gt; values);
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] ClientRect absoluteCaretBounds();
</span><span class="cx"> 
</span><del>-    [RaisesException] ClientRect boundingBox(Element element);
</del><ins>+    ClientRect boundingBox(Element element);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] ClientRectList inspectorHighlightRects();
</span><span class="cx">     [RaisesException] DOMString inspectorHighlightObject();
</span><span class="lines">@@ -158,10 +154,10 @@
</span><span class="cx">                                        long availableHeight);
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] boolean wasLastChangeUserEdit(Element textField);
</span><del>-    [RaisesException] boolean elementShouldAutoComplete(Element inputElement);
-    [RaisesException] void setEditingValue(Element inputElement, DOMString value);
-    [RaisesException] void setAutofilled(Element inputElement, boolean enabled);
-    [RaisesException] void setShowAutoFillButton(Element inputElement, AutoFillButtonType autoFillButtonType);
</del><ins>+    boolean elementShouldAutoComplete(HTMLInputElement inputElement);
+    void setEditingValue(HTMLInputElement inputElement, DOMString value);
+    void setAutofilled(HTMLInputElement inputElement, boolean enabled);
+    void setShowAutoFillButton(HTMLInputElement inputElement, AutoFillButtonType autoFillButtonType);
</ins><span class="cx">     [RaisesException] unsigned long countMatchesForText(DOMString text, unsigned long findOptions, DOMString markMatches);
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] DOMString autofillFieldName(Element formControlElement);
</span><span class="lines">@@ -170,11 +166,11 @@
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] void scrollElementToRect(Element element, long x, long y, long w, long h);
</span><span class="cx"> 
</span><del>-    [RaisesException] Range rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
-    [RaisesException] unsigned long locationFromRange(Element scope, Range range);
-    [RaisesException] unsigned long lengthFromRange(Element scope, Range range);
-    [RaisesException] DOMString rangeAsText(Range range);
-    [RaisesException] Range subrange(Range range, long rangeLocation, long rangeLength);
</del><ins>+    Range rangeFromLocationAndLength(Element scope, long rangeLocation, long rangeLength);
+    unsigned long locationFromRange(Element scope, Range range);
+    unsigned long lengthFromRange(Element scope, Range range);
+    DOMString rangeAsText(Range range);
+    Range subrange(Range range, long rangeLocation, long rangeLength);
</ins><span class="cx">     [RaisesException] Range rangeForDictionaryLookupAtLocation(long x, long y);
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] void setDelegatesScrolling(boolean enabled);
</span><span class="lines">@@ -219,7 +215,7 @@
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] boolean isPageBoxVisible(long pageNumber);
</span><span class="cx"> 
</span><del>-    [RaisesException] unsigned long imageFrameIndex(Element element);
</del><ins>+    unsigned long imageFrameIndex(HTMLImageElement element);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute InternalSettings settings;
</span><span class="cx">     readonly attribute unsigned long workerThreadCount;
</span><span class="lines">@@ -335,17 +331,17 @@
</span><span class="cx"> 
</span><span class="cx">     // |node| should be Document, HTMLIFrameElement, or unspecified.
</span><span class="cx">     // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
</span><del>-    // specified without security checks. Unspecified means this document.
-    [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node node);
</del><ins>+    // specified without security checks. Unspecified or null means this document.
+    [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute unsigned long layoutCount;
</span><span class="cx"> 
</span><span class="cx">     // Returns a string with information about the mouse cursor used at the specified client location.
</span><span class="cx">     [RaisesException] DOMString getCurrentCursorInfo();
</span><span class="cx"> 
</span><del>-    [RaisesException] DOMString markerTextForListItem(Element element);
</del><ins>+    DOMString markerTextForListItem(Element element);
</ins><span class="cx"> 
</span><del>-    [RaisesException] DOMString toolTipFromElement(Element element);
</del><ins>+    DOMString toolTipFromElement(Element element);
</ins><span class="cx"> 
</span><span class="cx">     SerializedScriptValue deserializeBuffer(ArrayBuffer buffer);
</span><span class="cx">     ArrayBuffer serializeObject(SerializedScriptValue obj);
</span><span class="lines">@@ -359,14 +355,14 @@
</span><span class="cx"> 
</span><span class="cx">     void enableAutoSizeMode(boolean enabled, long minimumWidth, long minimumHeight, long maximumWidth, long maximumHeight);
</span><span class="cx"> 
</span><del>-    [Conditional=VIDEO] void simulateAudioInterruption(Node node);
-    [Conditional=VIDEO, RaisesException] boolean mediaElementHasCharacteristic(Node node, DOMString characteristic);
</del><ins>+    [Conditional=VIDEO] void simulateAudioInterruption(HTMLMediaElement element);
+    [Conditional=VIDEO, RaisesException] boolean mediaElementHasCharacteristic(HTMLMediaElement element, DOMString characteristic);
</ins><span class="cx"> 
</span><span class="cx">     [Conditional=ENCRYPTED_MEDIA_V2] void initializeMockCDM();
</span><span class="cx"> 
</span><span class="cx">     [Conditional=SPEECH_SYNTHESIS] void enableMockSpeechSynthesizer();
</span><span class="cx"> 
</span><del>-    [RaisesException] DOMString getImageSourceURL(Element element);
</del><ins>+    DOMString getImageSourceURL(Element element);
</ins><span class="cx"> 
</span><span class="cx">     [Conditional=VIDEO_TRACK, RaisesException] DOMString captionsStyleSheetOverride();
</span><span class="cx">     [Conditional=VIDEO_TRACK, RaisesException] void setCaptionsStyleSheetOverride(DOMString override);
</span><span class="lines">@@ -377,14 +373,14 @@
</span><span class="cx">      endTimes);
</span><span class="cx">     [Conditional=VIDEO] unrestricted double closestTimeToTimeRanges(unrestricted double time, TimeRanges ranges);
</span><span class="cx"> 
</span><del>-    boolean isSelectPopupVisible(Node node);
</del><ins>+    boolean isSelectPopupVisible(HTMLSelectElement element);
</ins><span class="cx"> 
</span><span class="cx"> #if defined(ENABLE_VIBRATION) &amp;&amp; ENABLE_VIBRATION
</span><span class="cx">     boolean isVibrating();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     [RaisesException] boolean isPluginUnavailabilityIndicatorObscured(Element element);
</span><del>-    [RaisesException] boolean isPluginSnapshotted(Element element);
</del><ins>+    boolean isPluginSnapshotted(Element element);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] ClientRect selectionBounds();
</span><span class="cx"> 
</span><span class="lines">@@ -402,8 +398,8 @@
</span><span class="cx">     [Conditional=VIDEO] void applicationDidEnterForeground();
</span><span class="cx">     [Conditional=VIDEO] void applicationWillEnterBackground();
</span><span class="cx">     [Conditional=VIDEO, RaisesException] void setMediaSessionRestrictions(DOMString mediaType, DOMString restrictions);
</span><del>-    [Conditional=VIDEO, RaisesException] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
-    [Conditional=WEB_AUDIO, RaisesException] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
</del><ins>+    [Conditional=VIDEO] void setMediaElementRestrictions(HTMLMediaElement element, DOMString restrictions);
+    [Conditional=WEB_AUDIO] void setAudioContextRestrictions(AudioContext context, DOMString restrictions);
</ins><span class="cx">     [Conditional=VIDEO, RaisesException] void postRemoteControlCommand(DOMString command);
</span><span class="cx">     [Conditional=WIRELESS_PLAYBACK_TARGET] void setMockMediaPlaybackTargetPickerEnabled(boolean enabled);
</span><span class="cx">     [Conditional=WIRELESS_PLAYBACK_TARGET, RaisesException] void setMockMediaPlaybackTargetPickerState(DOMString deviceName, DOMString deviceState);
</span><span class="lines">@@ -411,7 +407,7 @@
</span><span class="cx"> 
</span><span class="cx">     [Conditional=VIDEO] void simulateSystemSleep();
</span><span class="cx">     [Conditional=VIDEO] void simulateSystemWake();
</span><del>-    [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(Element element);
</del><ins>+    [Conditional=VIDEO] boolean elementIsBlockingDisplaySleep(HTMLMediaElement element);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] MockPageOverlay installMockPageOverlay(PageOverlayType type);
</span><span class="cx">     [RaisesException] DOMString pageOverlayLayerTreeAsText();
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.mm (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.mm        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/testing/Internals.mm        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-String Internals::userVisibleString(const DOMURL* url)
</del><ins>+String Internals::userVisibleString(const DOMURL&amp; url)
</ins><span class="cx"> {
</span><del>-    return contextDocument()-&gt;frame()-&gt;editor().client()-&gt;userVisibleString(url-&gt;href());
</del><ins>+    return contextDocument()-&gt;frame()-&gt;editor().client()-&gt;userVisibleString(url.href());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoretestingjsWebCoreTestSupportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp (199538 => 199539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp        2016-04-14 16:48:05 UTC (rev 199538)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp        2016-04-14 17:10:14 UTC (rev 199539)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     JSDOMGlobalObject* globalObject = jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject());
</span><span class="cx">     ScriptExecutionContext* scriptContext = globalObject-&gt;scriptExecutionContext();
</span><span class="cx">     if (is&lt;Document&gt;(*scriptContext))
</span><del>-        globalObject-&gt;putDirect(exec-&gt;vm(), Identifier::fromString(exec, Internals::internalsId), toJS(exec, globalObject, Internals::create(downcast&lt;Document&gt;(scriptContext))));
</del><ins>+        globalObject-&gt;putDirect(exec-&gt;vm(), Identifier::fromString(exec, Internals::internalsId), toJS(exec, globalObject, Internals::create(downcast&lt;Document&gt;(*scriptContext))));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void resetInternalsObject(JSContextRef context)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     JSDOMGlobalObject* globalObject = jsCast&lt;JSDOMGlobalObject*&gt;(exec-&gt;lexicalGlobalObject());
</span><span class="cx">     ScriptExecutionContext* scriptContext = globalObject-&gt;scriptExecutionContext();
</span><span class="cx">     Page* page = downcast&lt;Document&gt;(scriptContext)-&gt;frame()-&gt;page();
</span><del>-    Internals::resetToConsistentState(page);
</del><ins>+    Internals::resetToConsistentState(*page);
</ins><span class="cx">     InternalSettings::from(page)-&gt;resetToConsistentState();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>