<!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&.
(WebCore::Internals::create): Take a Document&.
(WebCore::Internals::resetToConsistentState): Take a Page&.
(WebCore::Internals::Internals): Take a Document&.
(WebCore::Internals::settings): Use nullptr instead of 0.
(WebCore::Internals::address): Take a Node&.
(WebCore::Internals::nodeNeedsStyleRecalc): Take a Node& and no ExceptionCode&.
(WebCore::Internals::styleChangeType): Ditto.
(WebCore::Internals::xhrResponseSource): Take an XMLHttpRequest&.
(WebCore::Internals::isSharingStyleSheetContents): Take two
HTMLLinkElement&.
(WebCore::Internals::isStyleSheetLoadingSubresources): Take an HTMLLinkElement&.
(WebCore::Internals::imageFrameIndex): Take an HTMLImageElement& and no
ExceptionCode&. 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& and no ExceptionCode&.
(WebCore::Internals::parentTreeScope): Ditto.
(WebCore::Internals::pauseAnimationAtTimeOnElement): Take an Element&.
(WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
(WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
(WebCore::Internals::attached): Deleted.
(WebCore::Internals::elementRenderTreeAsText): Take an Element&.
(WebCore::Internals::hasPausedImageAnimations): Take an Element& and no
ExceptionCode&.
(WebCore::Internals::computedStyleIncludingVisitedInfo): Take a Node& and no
ExceptionCode&.
(WebCore::Internals::ensureShadowRoot): Take an Element&.
(WebCore::Internals::ensureUserAgentShadowRoot): Take an Element& and no
ExceptionCode&.
(WebCore::Internals::createShadowRoot): Take an Element&.
(WebCore::Internals::shadowRoot): Take an Element& and no ExceptionCode&.
(WebCore::Internals::shadowRootType): Take a Node&.
(WebCore::Internals::includerFor): Deleted.
(WebCore::Internals::shadowPseudoId): Take an Element& and no ExceptionCode&.
(WebCore::Internals::setShadowPseudoId): Ditto.
(WebCore::Internals::visiblePlaceholder): Take an Element&.
(WebCore::Internals::selectColorInColorChooser): Take an HTMLInputElement&.
(WebCore::Internals::boundingBox): Take an Element& and no ExceptionCode&.
(WebCore::Internals::markerCountForNode): Take a Node&.
(WebCore::Internals::markerAt): Ditto.
(WebCore::Internals::markerRangeForNode): Ditto.
(WebCore::Internals::markerDescriptionForNode): Ditto.
(WebCore::Internals::addTextMatchMarker): Take a const Range&.
(WebCore::Internals::setScrollViewPosition): Take int instead of long; long in
IDL means int in C++ code.
(WebCore::Internals::wasLastChangeUserEdit): Take an Element&.
(WebCore::Internals::elementShouldAutoComplete): Take an HTMLInputElement&.
(WebCore::Internals::setEditingValue): Take an HTMLInputElement& and no
ExceptionCode&.
(WebCore::Internals::setAutofilled): Ditto.
(WebCore::Internals::setShowAutoFillButton): Ditto.
(WebCore::Internals::scrollElementToRect): Take an Element& and int instead of long.
(WebCore::Internals::autofillFieldName): Take an Element&.
(WebCore::Internals::rangeFromLocationAndLength): Take an Element& and no ExceptionCode&.
(WebCore::Internals::locationFromRange): Ditto.
(WebCore::Internals::lengthFromRange): Take an Element& and const Range& and no
ExceptionCode&.
(WebCore::Internals::rangeAsText): Take const Range& an no ExceptionCode&.
(WebCore::Internals::subrange): Take Range& an no ExceptionCode&.
(WebCore::Internals::nodesFromRect): Take a Document&.
(WebCore::Internals::openDummyInspectorFrontend): Ditto.
(WebCore::Internals::layerTreeAsText): Take an Element&.
(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&.
(WebCore::Internals::markerTextForListItem): Take an Element& and no ExceptionCode&.
(WebCore::Internals::toolTipFromElement): Ditto.
(WebCore::Internals::getImageSourceURL): Ditto.
(WebCore::Internals::simulateAudioInterruption): Take an HTMLMediaElement&.
(WebCore::Internals::mediaElementHasCharacteristic): Ditto.
(WebCore::Internals::isSelectPopupVisible): Take an HTMLSelectElement&.
(WebCore::Internals::closestTimeToTimeRanges): Take a TimeRange&.
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Take an Element&.
(WebCore::Internals::isPluginSnapshotted): Take an Element& and no ExceptionCode&.
(WebCore::Internals::bufferedSamplesForTrackID): Take a SourceBuffer&.
(WebCore::Internals::setShouldGenerateTimestamps): Ditto.
(WebCore::Internals::setMediaElementRestrictions): Take an HTMLMediaElement&.
(WebCore::Internals::elementIsBlockingDisplaySleep): Take an HTMLMediaElement&.
(WebCore::Internals::setAudioContextRestrictions): Take an AudioContext&.
(WebCore::Internals::scrollSnapOffsets): Take an Element&.
(WebCore::Internals::getCurrentMediaControlsStatusForElement): Take an HTMLMediaElement&.
(WebCore::Internals::userVisibleString): Take a const DOMURL&.
(WebCore::Internals::composedTreeAsText): Take a Node&.
* 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&.
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject): Pass a Document& rather than a Document*.
(WebCoreTestSupport::resetInternalsObject): Pass a Page& 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 <darin@apple.com>
+
+ 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 <dabates@apple.com>
</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("internals.selectColorInColorChooser({}, '#ff0000');");
-evalAndLog("internals.selectColorInColorChooser(document, '#ff0000');");
-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 <darin@apple.com>
+
+ 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&.
+ (WebCore::Internals::create): Take a Document&.
+ (WebCore::Internals::resetToConsistentState): Take a Page&.
+ (WebCore::Internals::Internals): Take a Document&.
+ (WebCore::Internals::settings): Use nullptr instead of 0.
+ (WebCore::Internals::address): Take a Node&.
+ (WebCore::Internals::nodeNeedsStyleRecalc): Take a Node& and no ExceptionCode&.
+ (WebCore::Internals::styleChangeType): Ditto.
+ (WebCore::Internals::xhrResponseSource): Take an XMLHttpRequest&.
+ (WebCore::Internals::isSharingStyleSheetContents): Take two
+ HTMLLinkElement&.
+ (WebCore::Internals::isStyleSheetLoadingSubresources): Take an HTMLLinkElement&.
+ (WebCore::Internals::imageFrameIndex): Take an HTMLImageElement& and no
+ ExceptionCode&. 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& and no ExceptionCode&.
+ (WebCore::Internals::parentTreeScope): Ditto.
+ (WebCore::Internals::pauseAnimationAtTimeOnElement): Take an Element&.
+ (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
+ (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
+ (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
+ (WebCore::Internals::attached): Deleted.
+ (WebCore::Internals::elementRenderTreeAsText): Take an Element&.
+ (WebCore::Internals::hasPausedImageAnimations): Take an Element& and no
+ ExceptionCode&.
+ (WebCore::Internals::computedStyleIncludingVisitedInfo): Take a Node& and no
+ ExceptionCode&.
+ (WebCore::Internals::ensureShadowRoot): Take an Element&.
+ (WebCore::Internals::ensureUserAgentShadowRoot): Take an Element& and no
+ ExceptionCode&.
+ (WebCore::Internals::createShadowRoot): Take an Element&.
+ (WebCore::Internals::shadowRoot): Take an Element& and no ExceptionCode&.
+ (WebCore::Internals::shadowRootType): Take a Node&.
+ (WebCore::Internals::includerFor): Deleted.
+ (WebCore::Internals::shadowPseudoId): Take an Element& and no ExceptionCode&.
+ (WebCore::Internals::setShadowPseudoId): Ditto.
+ (WebCore::Internals::visiblePlaceholder): Take an Element&.
+ (WebCore::Internals::selectColorInColorChooser): Take an HTMLInputElement&.
+ (WebCore::Internals::boundingBox): Take an Element& and no ExceptionCode&.
+ (WebCore::Internals::markerCountForNode): Take a Node&.
+ (WebCore::Internals::markerAt): Ditto.
+ (WebCore::Internals::markerRangeForNode): Ditto.
+ (WebCore::Internals::markerDescriptionForNode): Ditto.
+ (WebCore::Internals::addTextMatchMarker): Take a const Range&.
+ (WebCore::Internals::setScrollViewPosition): Take int instead of long; long in
+ IDL means int in C++ code.
+ (WebCore::Internals::wasLastChangeUserEdit): Take an Element&.
+ (WebCore::Internals::elementShouldAutoComplete): Take an HTMLInputElement&.
+ (WebCore::Internals::setEditingValue): Take an HTMLInputElement& and no
+ ExceptionCode&.
+ (WebCore::Internals::setAutofilled): Ditto.
+ (WebCore::Internals::setShowAutoFillButton): Ditto.
+ (WebCore::Internals::scrollElementToRect): Take an Element& and int instead of long.
+ (WebCore::Internals::autofillFieldName): Take an Element&.
+ (WebCore::Internals::rangeFromLocationAndLength): Take an Element& and no ExceptionCode&.
+ (WebCore::Internals::locationFromRange): Ditto.
+ (WebCore::Internals::lengthFromRange): Take an Element& and const Range& and no
+ ExceptionCode&.
+ (WebCore::Internals::rangeAsText): Take const Range& an no ExceptionCode&.
+ (WebCore::Internals::subrange): Take Range& an no ExceptionCode&.
+ (WebCore::Internals::nodesFromRect): Take a Document&.
+ (WebCore::Internals::openDummyInspectorFrontend): Ditto.
+ (WebCore::Internals::layerTreeAsText): Take an Element&.
+ (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&.
+ (WebCore::Internals::markerTextForListItem): Take an Element& and no ExceptionCode&.
+ (WebCore::Internals::toolTipFromElement): Ditto.
+ (WebCore::Internals::getImageSourceURL): Ditto.
+ (WebCore::Internals::simulateAudioInterruption): Take an HTMLMediaElement&.
+ (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
+ (WebCore::Internals::isSelectPopupVisible): Take an HTMLSelectElement&.
+ (WebCore::Internals::closestTimeToTimeRanges): Take a TimeRange&.
+ (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Take an Element&.
+ (WebCore::Internals::isPluginSnapshotted): Take an Element& and no ExceptionCode&.
+ (WebCore::Internals::bufferedSamplesForTrackID): Take a SourceBuffer&.
+ (WebCore::Internals::setShouldGenerateTimestamps): Ditto.
+ (WebCore::Internals::setMediaElementRestrictions): Take an HTMLMediaElement&.
+ (WebCore::Internals::elementIsBlockingDisplaySleep): Take an HTMLMediaElement&.
+ (WebCore::Internals::setAudioContextRestrictions): Take an AudioContext&.
+ (WebCore::Internals::scrollSnapOffsets): Take an Element&.
+ (WebCore::Internals::getCurrentMediaControlsStatusForElement): Take an HTMLMediaElement&.
+ (WebCore::Internals::userVisibleString): Take a const DOMURL&.
+ (WebCore::Internals::composedTreeAsText): Take a Node&.
+
+ * 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&.
+
+ * testing/js/WebCoreTestSupport.cpp:
+ (WebCoreTestSupport::injectInternalsObject): Pass a Document& rather than a Document*.
+ (WebCoreTestSupport::resetInternalsObject): Pass a Page& rather than a Page*.
+
</ins><span class="cx"> 2016-04-14 Daniel Bates <dabates@apple.com>
</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<DOMWindow>&& frontendWindow);
</del><ins>+ InspectorStubFrontend(Page& inspectedPage, RefPtr<DOMWindow>&& 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& m_frontendController;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-InspectorStubFrontend::InspectorStubFrontend(Page* inspectedPage, RefPtr<DOMWindow>&& frontendWindow)
- : InspectorFrontendClientLocal(&inspectedPage->inspectorController(), frontendWindow->document()->page(), std::make_unique<InspectorFrontendClientLocal::Settings>())
</del><ins>+InspectorStubFrontend::InspectorStubFrontend(Page& inspectedPage, RefPtr<DOMWindow>&& frontendWindow)
+ : InspectorFrontendClientLocal(&inspectedPage.inspectorController(), frontendWindow->document()->page(), std::make_unique<InspectorFrontendClientLocal::Settings>())
</ins><span class="cx"> , m_frontendWindow(frontendWindow.copyRef())
</span><span class="cx"> , m_frontendController(frontendPage()->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->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 = "internals";
</span><span class="cx">
</span><del>-Ref<Internals> Internals::create(Document* document)
</del><ins>+Ref<Internals> Internals::create(Document& 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& 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->setPageScaleFactor(1, IntPoint(0, 0));
- page->setPagination(Pagination());
- page->setPaginationLineGridEnabled(false);
-
- page->setDefersLoading(false);
</del><ins>+ page.setDefersLoading(false);
</ins><span class="cx">
</span><del>- page->mainFrame().setTextZoomFactor(1.0f);
</del><ins>+ page.mainFrame().setTextZoomFactor(1.0f);
</ins><span class="cx">
</span><del>- FrameView* mainFrameView = page->mainFrame().view();
</del><ins>+ FrameView* mainFrameView = page.mainFrame().view();
</ins><span class="cx"> if (mainFrameView) {
</span><span class="cx"> mainFrameView->setHeaderHeight(0);
</span><span class="cx"> mainFrameView->setFooterHeight(0);
</span><del>- page->setTopContentInset(0);
</del><ins>+ page.setTopContentInset(0);
</ins><span class="cx"> mainFrameView->setUseFixedLayout(false);
</span><span class="cx"> mainFrameView->setFixedLayoutSize(IntSize());
</span><span class="cx"> }
</span><span class="lines">@@ -391,16 +388,16 @@
</span><span class="cx"> WebCore::overrideUserPreferredLanguages(Vector<String>());
</span><span class="cx"> WebCore::Settings::setUsesOverlayScrollbars(false);
</span><span class="cx"> WebCore::Settings::setUsesMockScrollAnimator(false);
</span><del>- page->inspectorController().setLegacyProfilerEnabled(false);
</del><ins>+ page.inspectorController().setLegacyProfilerEnabled(false);
</ins><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>- page->group().captionPreferences().setCaptionsStyleSheetOverride(emptyString());
- page->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->mainFrame().editor().isContinuousSpellCheckingEnabled())
- page->mainFrame().editor().toggleContinuousSpellChecking();
- if (page->mainFrame().editor().isOverwriteModeEnabled())
- page->mainFrame().editor().toggleOverwriteModeEnabled();
- page->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->setShowAllPlugins(false);
</del><ins>+ page.setShowAllPlugins(false);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 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& document)
+ : ContextDestructionObserver(&document)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(VIDEO_TRACK)
</span><del>- if (document && document->page())
- document->page()->group().captionPreferences().setTestingMode(true);
</del><ins>+ if (document.page())
+ document.page()->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 && document->page())
- document->page()->setMockMediaPlaybackTargetPickerEnabled(true);
</del><ins>+ if (document.page())
+ document.page()->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->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& node)
</ins><span class="cx"> {
</span><del>- return String::format("%p", node);
</del><ins>+ return String::format("%p", &node);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::nodeNeedsStyleRecalc(Node* node, ExceptionCode& exception)
</del><ins>+bool Internals::nodeNeedsStyleRecalc(Node& node)
</ins><span class="cx"> {
</span><del>- if (!node) {
- exception = INVALID_ACCESS_ERR;
- return false;
- }
-
- return node->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 "";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::styleChangeType(Node* node, ExceptionCode& exception)
</del><ins>+String Internals::styleChangeType(Node& node)
</ins><span class="cx"> {
</span><del>- if (!node) {
- exception = INVALID_ACCESS_ERR;
- return { };
- }
-
- return styleChangeTypeToString(node->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 && resource->status() == CachedResource::Cached;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::xhrResponseSource(XMLHttpRequest* xhr)
</del><ins>+String Internals::xhrResponseSource(XMLHttpRequest& request)
</ins><span class="cx"> {
</span><del>- if (!xhr)
- return "Null xhr";
- if (xhr->resourceResponse().isNull())
</del><ins>+ if (request.resourceResponse().isNull())
</ins><span class="cx"> return "Null response";
</span><del>- switch (xhr->resourceResponse().source()) {
</del><ins>+ switch (request.resourceResponse().source()) {
</ins><span class="cx"> case ResourceResponse::Source::Unknown:
</span><span class="cx"> return "Unknown";
</span><span class="cx"> case ResourceResponse::Source::Network:
</span><span class="lines">@@ -566,23 +551,16 @@
</span><span class="cx"> return "Error";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::isSharingStyleSheetContents(Element* a, Element* b)
</del><ins>+bool Internals::isSharingStyleSheetContents(HTMLLinkElement& a, HTMLLinkElement& b)
</ins><span class="cx"> {
</span><del>- if (!is<HTMLLinkElement>(a) || !is<HTMLLinkElement>(b))
</del><ins>+ if (!a.sheet() || !b.sheet())
</ins><span class="cx"> return false;
</span><del>- auto& aLink = downcast<HTMLLinkElement>(*a);
- auto& bLink = downcast<HTMLLinkElement>(*b);
- if (!aLink.sheet() || !bLink.sheet())
- return false;
- return &aLink.sheet()->contents() == &bLink.sheet()->contents();
</del><ins>+ return &a.sheet()->contents() == &b.sheet()->contents();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::isStyleSheetLoadingSubresources(Element* link)
</del><ins>+bool Internals::isStyleSheetLoadingSubresources(HTMLLinkElement& link)
</ins><span class="cx"> {
</span><del>- if (!is<HTMLLinkElement>(link))
- return false;
- auto& linkElement = downcast<HTMLLinkElement>(*link);
- return linkElement.sheet() && linkElement.sheet()->contents().isLoadingSubresources();
</del><ins>+ return link.sheet() && link.sheet()->contents().isLoadingSubresources();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static ResourceRequestCachePolicy stringToResourceRequestCachePolicy(const String& 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& ec)
</del><ins>+unsigned Internals::imageFrameIndex(HTMLImageElement& element)
</ins><span class="cx"> {
</span><del>- if (!is<HTMLImageElement>(element)) {
- ec = TypeError;
- return 0;
- }
-
- auto* cachedImage = downcast<HTMLImageElement>(*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& ec)
</del><ins>+Node* Internals::treeScopeRootNode(Node& node)
</ins><span class="cx"> {
</span><del>- if (!node) {
- ec = INVALID_ACCESS_ERR;
- return nullptr;
- }
-
- return &node->treeScope().rootNode();
</del><ins>+ return &node.treeScope().rootNode();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Node* Internals::parentTreeScope(Node* node, ExceptionCode& ec)
</del><ins>+Node* Internals::parentTreeScope(Node& node)
</ins><span class="cx"> {
</span><del>- if (!node) {
- ec = INVALID_ACCESS_ERR;
- return nullptr;
- }
- const TreeScope* parentTreeScope = node->treeScope().parentTreeScope();
</del><ins>+ const TreeScope* parentTreeScope = node.treeScope().parentTreeScope();
</ins><span class="cx"> return parentTreeScope ? &parentTreeScope->rootNode() : nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -749,18 +713,18 @@
</span><span class="cx"> document->frame()->animation().resumeAnimations();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element* element, ExceptionCode& ec)
</del><ins>+bool Internals::pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element& element, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element || pauseTime < 0) {
</del><ins>+ if (pauseTime < 0) {
</ins><span class="cx"> ec = INVALID_ACCESS_ERR;
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><del>- return frame()->animation().pauseAnimationAtTime(element->renderer(), AtomicString(animationName), pauseTime);
</del><ins>+ return frame()->animation().pauseAnimationAtTime(element.renderer(), AtomicString(animationName), pauseTime);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec)
</del><ins>+bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element& element, const String& pseudoId, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element || pauseTime < 0) {
</del><ins>+ if (pauseTime < 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 == "before" ? element->beforePseudoElement() : element->afterPseudoElement();
</del><ins>+ PseudoElement* pseudoElement = pseudoId == "before" ? 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()->animation().pauseAnimationAtTime(pseudoElement->renderer(), AtomicString(animationName), pauseTime);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element* element, ExceptionCode& ec)
</del><ins>+bool Internals::pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element& element, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element || pauseTime < 0) {
</del><ins>+ if (pauseTime < 0) {
</ins><span class="cx"> ec = INVALID_ACCESS_ERR;
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><del>- return frame()->animation().pauseTransitionAtTime(element->renderer(), propertyName, pauseTime);
</del><ins>+ return frame()->animation().pauseTransitionAtTime(element.renderer(), propertyName, pauseTime);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec)
</del><ins>+bool Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element& element, const String& pseudoId, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element || pauseTime < 0) {
</del><ins>+ if (pauseTime < 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 == "before" ? element->beforePseudoElement() : element->afterPseudoElement();
</del><ins>+ PseudoElement* pseudoElement = pseudoId == "before" ? 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()->animation().pauseTransitionAtTime(pseudoElement->renderer(), property, pauseTime);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// FIXME: Remove.
-bool Internals::attached(Node* node, ExceptionCode& ec)
</del><ins>+String Internals::elementRenderTreeAsText(Element& element, ExceptionCode& 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& ec)
-{
- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return String();
- }
-
- element->document().updateStyleIfNeeded();
-
- String representation = externalRepresentation(element);
</del><ins>+ String representation = externalRepresentation(&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& ec)
</del><ins>+bool Internals::hasPausedImageAnimations(Element& element)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return false;
- }
- return element->renderer() && element->renderer()->hasPausedImageAnimations();
</del><ins>+ return element.renderer() && element.renderer()->hasPausedImageAnimations();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node* node, ExceptionCode& ec) const
</del><ins>+RefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node& 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(&node, allowVisitedStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Node* Internals::ensureShadowRoot(Element* host, ExceptionCode& ec)
</del><ins>+Node* Internals::ensureShadowRoot(Element& host, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!host) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
-
- if (ShadowRoot* shadowRoot = host->shadowRoot())
</del><ins>+ if (ShadowRoot* shadowRoot = host.shadowRoot())
</ins><span class="cx"> return shadowRoot;
</span><span class="cx">
</span><del>- return host->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& ec)
</del><ins>+Node* Internals::ensureUserAgentShadowRoot(Element& host)
</ins><span class="cx"> {
</span><del>- if (!host) {
- ec = INVALID_ACCESS_ERR;
- return nullptr;
- }
- return &host->ensureUserAgentShadowRoot();
</del><ins>+ return &host.ensureUserAgentShadowRoot();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-Node* Internals::createShadowRoot(Element* host, ExceptionCode& ec)
</del><ins>+Node* Internals::createShadowRoot(Element& host, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!host) {
- ec = INVALID_ACCESS_ERR;
- return 0;
- }
- return host->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& ec)
</del><ins>+Node* Internals::shadowRoot(Element& host)
</ins><span class="cx"> {
</span><del>- if (!host) {
- ec = INVALID_ACCESS_ERR;
- return nullptr;
- }
- return host->shadowRoot();
</del><ins>+ return host.shadowRoot();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::shadowRootType(const Node* root, ExceptionCode& ec) const
</del><ins>+String Internals::shadowRootType(const Node& root, ExceptionCode& ec) const
</ins><span class="cx"> {
</span><span class="cx"> if (!is<ShadowRoot>(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<ShadowRoot>(*root).type()) {
</del><ins>+ switch (downcast<ShadowRoot>(root).type()) {
</ins><span class="cx"> case ShadowRoot::Type::UserAgent:
</span><span class="cx"> return String("UserAgentShadowRoot");
</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& ec)
</del><ins>+String Internals::shadowPseudoId(Element& 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& ec)
</del><ins>+void Internals::setShadowPseudoId(Element& element, const String& id)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return String();
- }
-
- return element->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& id, ExceptionCode& ec)
-{
- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return;
- }
-
- return element->setPseudo(id);
-}
-
</del><span class="cx"> bool Internals::isTimerThrottled(int timeoutId, ExceptionCode& ec)
</span><span class="cx"> {
</span><span class="cx"> DOMTimer* timer = scriptExecutionContext()->findTimeout(timeoutId);
</span><span class="lines">@@ -971,10 +877,10 @@
</span><span class="cx"> return contextDocument()->isTimerThrottlingEnabled();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::visiblePlaceholder(Element* element)
</del><ins>+String Internals::visiblePlaceholder(Element& element)
</ins><span class="cx"> {
</span><span class="cx"> if (is<HTMLTextFormControlElement>(element)) {
</span><del>- const HTMLTextFormControlElement& textFormControlElement = downcast<HTMLTextFormControlElement>(*element);
</del><ins>+ const HTMLTextFormControlElement& textFormControlElement = downcast<HTMLTextFormControlElement>(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& colorValue)
</del><ins>+void Internals::selectColorInColorChooser(HTMLInputElement& element, const String& colorValue)
</ins><span class="cx"> {
</span><del>- if (!is<HTMLInputElement>(element))
- return;
- auto& inputElement = downcast<HTMLInputElement>(*element);
- inputElement.selectColor(Color(colorValue));
</del><ins>+ element.selectColor(Color(colorValue));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Vector<String> Internals::formControlStateOfPreviousHistoryItem(ExceptionCode& ec)
</span><span class="lines">@@ -1067,15 +970,10 @@
</span><span class="cx"> return ClientRect::create(document->frame()->selection().absoluteCaretBounds());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<ClientRect> Internals::boundingBox(Element* element, ExceptionCode& ec)
</del><ins>+Ref<ClientRect> Internals::boundingBox(Element& element)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return ClientRect::create();
- }
-
- element->document().updateLayoutIgnorePendingStylesheets();
- auto renderer = element->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->absoluteBoundingBoxRectIgnoringTransforms());
</span><span class="lines">@@ -1105,31 +1003,21 @@
</span><span class="cx"> return document->page()->inspectorController().buildObjectForHighlightedNodes()->toJSONString();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned Internals::markerCountForNode(Node* node, const String& markerType, ExceptionCode& ec)
</del><ins>+unsigned Internals::markerCountForNode(Node& node, const String& markerType, ExceptionCode& 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->document().frame()->editor().updateEditorUINowIfScheduled();
-
- return node->document().markers().markersFor(node, markerTypes).size();
</del><ins>+ node.document().frame()->editor().updateEditorUINowIfScheduled();
+ return node.document().markers().markersFor(&node, markerTypes).size();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RenderedDocumentMarker* Internals::markerAt(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)
</del><ins>+RenderedDocumentMarker* Internals::markerAt(Node& node, const String& markerType, unsigned index, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- node->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->document().frame()->editor().updateEditorUINowIfScheduled();
</del><ins>+ node.document().frame()->editor().updateEditorUINowIfScheduled();
</ins><span class="cx">
</span><del>- Vector<RenderedDocumentMarker*> markers = node->document().markers().markersFor(node, markerTypes);
</del><ins>+ Vector<RenderedDocumentMarker*> markers = node.document().markers().markersFor(&node, markerTypes);
</ins><span class="cx"> if (markers.size() <= 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<Range> Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)
</del><ins>+RefPtr<Range> Internals::markerRangeForNode(Node& node, const String& markerType, unsigned index, ExceptionCode& 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->document(), node, marker->startOffset(), node, marker->endOffset());
</del><ins>+ return Range::create(node.document(), &node, marker->startOffset(), &node, marker->endOffset());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::markerDescriptionForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)
</del><ins>+String Internals::markerDescriptionForNode(Node& node, const String& markerType, unsigned index, ExceptionCode& 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& range, bool isActive)
</ins><span class="cx"> {
</span><del>- range->ownerDocument().updateLayoutIgnorePendingStylesheets();
- range->ownerDocument().markers().addTextMatchMarker(range, isActive);
</del><ins>+ range.ownerDocument().updateLayoutIgnorePendingStylesheets();
+ range.ownerDocument().markers().addTextMatchMarker(&range, isActive);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Internals::setMarkedTextMatchesAreHighlighted(bool flag, ExceptionCode& 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& ec)
</del><ins>+void Internals::setScrollViewPosition(int x, int y, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->view()) {
</span><span class="lines">@@ -1223,7 +1111,7 @@
</span><span class="cx">
</span><span class="cx"> frameView->setConstrainsScrollingToContentEdge(false);
</span><span class="cx"> frameView->setScrollbarsSuppressed(false);
</span><del>- frameView->setScrollOffsetFromInternals(IntPoint(x, y));
</del><ins>+ frameView->setScrollOffsetFromInternals({ x, y });
</ins><span class="cx"> frameView->setScrollbarsSuppressed(scrollbarsSuppressedOldValue);
</span><span class="cx"> frameView->setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdgeOldValue);
</span><span class="cx"> }
</span><span class="lines">@@ -1299,66 +1187,31 @@
</span><span class="cx"> return "viewport size " + String::number(attributes.layoutSize.width()) + "x" + String::number(attributes.layoutSize.height()) + " scale " + String::number(attributes.initialScale) + " with limits [" + String::number(attributes.minimumScale) + ", " + String::number(attributes.maximumScale) + "] and userScalable " + (attributes.userScalable ? "true" : "false");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::wasLastChangeUserEdit(Element* textField, ExceptionCode& ec)
</del><ins>+bool Internals::wasLastChangeUserEdit(Element& textField, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!textField) {
- ec = INVALID_ACCESS_ERR;
- return false;
- }
</del><ins>+ if (is<HTMLInputElement>(textField))
+ return downcast<HTMLInputElement>(textField).lastChangeWasUserEdit();
</ins><span class="cx">
</span><del>- if (is<HTMLInputElement>(*textField))
- return downcast<HTMLInputElement>(*textField).lastChangeWasUserEdit();
</del><ins>+ if (is<HTMLTextAreaElement>(textField))
+ return downcast<HTMLTextAreaElement>(textField).lastChangeWasUserEdit();
</ins><span class="cx">
</span><del>- if (is<HTMLTextAreaElement>(*textField))
- return downcast<HTMLTextAreaElement>(*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& ec)
</del><ins>+bool Internals::elementShouldAutoComplete(HTMLInputElement& element)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return false;
- }
-
- if (!is<HTMLInputElement>(*element)) {
- ec = INVALID_NODE_TYPE_ERR;
- return false;
- }
-
- return downcast<HTMLInputElement>(*element).shouldAutocomplete();
</del><ins>+ return element.shouldAutocomplete();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Internals::setEditingValue(Element* element, const String& value, ExceptionCode& ec)
</del><ins>+void Internals::setEditingValue(HTMLInputElement& element, const String& value)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return;
- }
-
- if (!is<HTMLInputElement>(*element)) {
- ec = INVALID_NODE_TYPE_ERR;
- return;
- }
-
- downcast<HTMLInputElement>(*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& ec)
</del><ins>+void Internals::setAutofilled(HTMLInputElement& element, bool enabled)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return;
- }
-
- if (!is<HTMLInputElement>(*element)) {
- ec = INVALID_NODE_TYPE_ERR;
- return;
- }
-
- downcast<HTMLInputElement>(*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& 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& autoFillButtonType, ExceptionCode& ec)
</del><ins>+void Internals::setShowAutoFillButton(HTMLInputElement& element, const String& autoFillButtonType)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return;
- }
-
- if (!is<HTMLInputElement>(*element)) {
- ec = INVALID_NODE_TYPE_ERR;
- return;
- }
-
- downcast<HTMLInputElement>(*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& ec)
</del><ins>+void Internals::scrollElementToRect(Element& element, int x, int y, int w, int h, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element || !element->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->document().view();
- frameView->scrollElementToRect(*element, IntRect(x, y, w, h));
</del><ins>+ frameView->scrollElementToRect(element, { x, y, w, h });
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::autofillFieldName(Element* element, ExceptionCode& ec)
</del><ins>+String Internals::autofillFieldName(Element& element, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return { };
- }
-
- if (!is<HTMLFormControlElement>(*element)) {
</del><ins>+ if (!is<HTMLFormControlElement>(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<HTMLFormControlElement>(*element).autofillData().fieldName;
</del><ins>+ return downcast<HTMLFormControlElement>(element).autofillData().fieldName;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Internals::paintControlTints(ExceptionCode& ec)
</span><span class="lines">@@ -1426,60 +1264,35 @@
</span><span class="cx"> frameView->paintControlTints();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<Range> Internals::rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode& ec)
</del><ins>+RefPtr<Range> Internals::rangeFromLocationAndLength(Element& 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(&scope, rangeLocation, rangeLength);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned Internals::locationFromRange(Element* scope, const Range* range, ExceptionCode& ec)
</del><ins>+unsigned Internals::locationFromRange(Element& scope, const Range& 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(&scope, &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& ec)
</del><ins>+unsigned Internals::lengthFromRange(Element& scope, const Range& 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(&scope, &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& ec)
</del><ins>+String Internals::rangeAsText(const Range& range)
</ins><span class="cx"> {
</span><del>- if (!range) {
- ec = INVALID_ACCESS_ERR;
- return String();
- }
-
- return range->text();
</del><ins>+ return range.text();
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<Range> Internals::subrange(Range* range, int rangeLocation, int rangeLength, ExceptionCode& ec)
</del><ins>+RefPtr<Range> Internals::subrange(Range& 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(&range, rangeLocation, rangeLength);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<Range> Internals::rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode& 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<NodeList> Internals::nodesFromRect(Document* document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
</del><ins>+RefPtr<NodeList> Internals::nodesFromRect(Document& document, int centerX, int centerY, unsigned topPadding, unsigned rightPadding,
</ins><span class="cx"> unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const
</span><span class="cx"> {
</span><del>- if (!document || !document->frame() || !document->frame()->view()) {
</del><ins>+ if (!document.frame() || !document.frame()->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->frame();
- FrameView* frameView = document->view();
- RenderView* renderView = document->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->updateLayoutIgnorePendingStylesheets();
</del><ins>+ document.updateLayoutIgnorePendingStylesheets();
</ins><span class="cx">
</span><span class="cx"> float zoomFactor = frame->pageZoomFactor();
</span><span class="cx"> LayoutPoint point(centerX * zoomFactor + frameView->scrollX(), centerY * zoomFactor + frameView->scrollY());
</span><span class="lines">@@ -1939,7 +1752,7 @@
</span><span class="cx"> Page* inspectedPage = contextDocument()->frame()->page();
</span><span class="cx"> RefPtr<DOMWindow> window = inspectedPage->mainFrame().document()->domWindow();
</span><span class="cx"> RefPtr<DOMWindow> frontendWindow = window->open(url, "", "", *window, *window);
</span><del>- m_inspectorFrontend = std::make_unique<InspectorStubFrontend>(inspectedPage, frontendWindow.copyRef());
</del><ins>+ m_inspectorFrontend = std::make_unique<InspectorStubFrontend>(*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& ec) const
</del><ins>+String Internals::layerTreeAsText(Document& document, ExceptionCode& 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& ec) const
</del><ins>+String Internals::layerTreeAsText(Document& document, unsigned flags, ExceptionCode& ec) const
</ins><span class="cx"> {
</span><del>- if (!document || !document->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 & LAYER_TREE_INCLUDES_CONTENT_LAYERS)
</span><span class="cx"> layerTreeFlags |= LayerTreeFlagsIncludeContentLayers;
</span><span class="cx">
</span><del>- return document->frame()->layerTreeAsText(layerTreeFlags);
</del><ins>+ return document.frame()->layerTreeAsText(layerTreeFlags);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String Internals::repaintRectsAsText(ExceptionCode& ec) const
</span><span class="lines">@@ -2097,7 +1910,7 @@
</span><span class="cx"> return page->nonFastScrollableRects();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Internals::setElementUsesDisplayListDrawing(Element* element, bool usesDisplayListDrawing, ExceptionCode& ec)
</del><ins>+void Internals::setElementUsesDisplayListDrawing(Element& element, bool usesDisplayListDrawing, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->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->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<HTMLCanvasElement>(*element)) {
- downcast<HTMLCanvasElement>(*element).setUsesDisplayListDrawing(usesDisplayListDrawing);
</del><ins>+ if (is<HTMLCanvasElement>(element)) {
+ downcast<HTMLCanvasElement>(element).setUsesDisplayListDrawing(usesDisplayListDrawing);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!element->renderer()->hasLayer()) {
</del><ins>+ if (!element.renderer()->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<RenderLayerModelObject>(element->renderer())->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(element.renderer())->layer();
</ins><span class="cx"> if (!layer->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->backing()->setUsesDisplayListDrawing(usesDisplayListDrawing);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Internals::setElementTracksDisplayListReplay(Element* element, bool isTrackingReplay, ExceptionCode& ec)
</del><ins>+void Internals::setElementTracksDisplayListReplay(Element& element, bool isTrackingReplay, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->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->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<HTMLCanvasElement>(*element)) {
- downcast<HTMLCanvasElement>(*element).setTracksDisplayListReplay(isTrackingReplay);
</del><ins>+ if (is<HTMLCanvasElement>(element)) {
+ downcast<HTMLCanvasElement>(element).setTracksDisplayListReplay(isTrackingReplay);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (!element->renderer()->hasLayer()) {
</del><ins>+ if (!element.renderer()->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<RenderLayerModelObject>(element->renderer())->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(element.renderer())->layer();
</ins><span class="cx"> if (!layer->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->backing()->setIsTrackingDisplayListReplay(isTrackingReplay);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::displayListForElement(Element* element, ExceptionCode& ec)
</del><ins>+String Internals::displayListForElement(Element& element, ExceptionCode& 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& ec)
</del><ins>+String Internals::displayListForElement(Element& element, unsigned flags, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->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->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 & DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS)
</span><span class="cx"> displayListFlags |= DisplayList::AsTextFlag::IncludesPlatformOperations;
</span><span class="cx">
</span><del>- if (is<HTMLCanvasElement>(*element))
- return downcast<HTMLCanvasElement>(*element).displayListAsText(displayListFlags);
</del><ins>+ if (is<HTMLCanvasElement>(element))
+ return downcast<HTMLCanvasElement>(element).displayListAsText(displayListFlags);
</ins><span class="cx">
</span><del>- if (!element->renderer()->hasLayer()) {
</del><ins>+ if (!element.renderer()->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<RenderLayerModelObject>(element->renderer())->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(element.renderer())->layer();
</ins><span class="cx"> if (!layer->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->backing()->displayListAsText(displayListFlags);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::replayDisplayListForElement(Element* element, ExceptionCode& ec)
</del><ins>+String Internals::replayDisplayListForElement(Element& element, ExceptionCode& 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& ec)
</del><ins>+String Internals::replayDisplayListForElement(Element& element, unsigned flags, ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->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->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 & DISPLAY_LIST_INCLUDES_PLATFORM_OPERATIONS)
</span><span class="cx"> displayListFlags |= DisplayList::AsTextFlag::IncludesPlatformOperations;
</span><span class="cx">
</span><del>- if (is<HTMLCanvasElement>(*element))
- return downcast<HTMLCanvasElement>(*element).replayDisplayListAsText(displayListFlags);
</del><ins>+ if (is<HTMLCanvasElement>(element))
+ return downcast<HTMLCanvasElement>(element).replayDisplayListAsText(displayListFlags);
</ins><span class="cx">
</span><del>- if (!element->renderer()->hasLayer()) {
</del><ins>+ if (!element.renderer()->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<RenderLayerModelObject>(element->renderer())->layer();
</del><ins>+ RenderLayer* layer = downcast<RenderLayerModelObject>(element.renderer())->layer();
</ins><span class="cx"> if (!layer->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->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& element)
</ins><span class="cx"> {
</span><del>- if (!element)
- return String();
-
- return counterValueForElement(element);
</del><ins>+ return counterValueForElement(&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& 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(&element, { pageWidth, pageHeight });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Vector<String> 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& 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->webkitWillEnterFullScreenForElement(element);
</del><ins>+ document->webkitWillEnterFullScreenForElement(&element);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Internals::webkitDidEnterFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitDidEnterFullScreenForElement(Element& 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->webkitDidEnterFullScreenForElement(element);
</del><ins>+ document->webkitDidEnterFullScreenForElement(&element);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Internals::webkitWillExitFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitWillExitFullScreenForElement(Element& 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->webkitWillExitFullScreenForElement(element);
</del><ins>+ document->webkitWillExitFullScreenForElement(&element);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Internals::webkitDidExitFullScreenForElement(Element* element)
</del><ins>+void Internals::webkitDidExitFullScreenForElement(Element& 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->webkitDidExitFullScreenForElement(element);
</del><ins>+ document->webkitDidExitFullScreenForElement(&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->renderView()->compositor().startTrackingLayerFlushes();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned long Internals::layerFlushCount(ExceptionCode& ec)
</del><ins>+unsigned Internals::layerFlushCount(ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->renderView()) {
</span><span class="lines">@@ -2560,7 +2367,7 @@
</span><span class="cx"> document->startTrackingStyleRecalcs();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned long Internals::styleRecalcCount(ExceptionCode& ec)
</del><ins>+unsigned Internals::styleRecalcCount(ExceptionCode& 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->renderView()->compositor().startTrackingCompositingUpdates();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-unsigned long Internals::compositingUpdateCount(ExceptionCode& ec)
</del><ins>+unsigned Internals::compositingUpdateCount(ExceptionCode& ec)
</ins><span class="cx"> {
</span><span class="cx"> Document* document = contextDocument();
</span><span class="cx"> if (!document || !document->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<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<ArrayBuffer> buffer) const
</del><ins>+RefPtr<SerializedScriptValue> Internals::deserializeBuffer(ArrayBuffer& buffer) const
</ins><span class="cx"> {
</span><span class="cx"> Vector<uint8_t> bytes;
</span><del>- bytes.append(static_cast<const uint8_t*>(buffer->data()), buffer->byteLength());
</del><ins>+ bytes.append(static_cast<const uint8_t*>(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& ec)
</del><ins>+String Internals::markerTextForListItem(Element& element)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return String();
- }
- return WebCore::markerTextForListItem(element);
</del><ins>+ return WebCore::markerTextForListItem(&element);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::toolTipFromElement(Element* element, ExceptionCode& ec) const
</del><ins>+String Internals::toolTipFromElement(Element& 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(&element);
+ TextDirection direction;
+ return result.title(direction);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::getImageSourceURL(Element* element, ExceptionCode& ec)
</del><ins>+String Internals::getImageSourceURL(Element& element)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return String();
- }
- return element->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& element)
</ins><span class="cx"> {
</span><span class="cx"> #if USE(GSTREAMER)
</span><del>- HTMLMediaElement* element = downcast<HTMLMediaElement>(node);
- element->player()->simulateAudioInterruption();
</del><ins>+ element.player()->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& characteristic, ExceptionCode& ec)
</del><ins>+bool Internals::mediaElementHasCharacteristic(HTMLMediaElement& element, const String& characteristic, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!is<HTMLMediaElement>(*node))
- return false;
-
- HTMLMediaElement* element = downcast<HTMLMediaElement>(node);
-
</del><span class="cx"> if (equalLettersIgnoringASCIICase(characteristic, "audible"))
</span><del>- return element->hasAudio();
</del><ins>+ return element.hasAudio();
</ins><span class="cx"> if (equalLettersIgnoringASCIICase(characteristic, "visual"))
</span><del>- return element->hasVideo();
</del><ins>+ return element.hasVideo();
</ins><span class="cx"> if (equalLettersIgnoringASCIICase(characteristic, "legible"))
</span><del>- return element->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& element)
</ins><span class="cx"> {
</span><del>- if (!is<HTMLSelectElement>(*node))
- return false;
-
- HTMLSelectElement& select = downcast<HTMLSelectElement>(*node);
-
- auto* renderer = select.renderer();
</del><ins>+ auto* renderer = element.renderer();
</ins><span class="cx"> ASSERT(renderer);
</span><span class="cx"> if (!is<RenderMenuList>(*renderer))
</span><span class="cx"> return false;
</span><span class="lines">@@ -2846,7 +2631,7 @@
</span><span class="cx"> return downcast<RenderMenuList>(*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& 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& ranges)
</ins><span class="cx"> {
</span><del>- return ranges->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& ec)
</del><ins>+bool Internals::isPluginUnavailabilityIndicatorObscured(Element& element, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return false;
- }
-
- auto* renderer = element->renderer();
</del><ins>+ auto* renderer = element.renderer();
</ins><span class="cx"> if (!is<RenderEmbeddedObject>(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<RenderEmbeddedObject>(*renderer).isReplacementObscured();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::isPluginSnapshotted(Element* element, ExceptionCode& ec)
</del><ins>+bool Internals::isPluginSnapshotted(Element& element)
</ins><span class="cx"> {
</span><del>- if (!element) {
- ec = INVALID_ACCESS_ERR;
- return false;
- }
- HTMLPlugInElement* pluginElement = downcast<HTMLPlugInElement>(element);
- return pluginElement->displayState() <= HTMLPlugInElement::DisplayingSnapshot;
</del><ins>+ return is<HTMLPlugInElement>(element) && downcast<HTMLPlugInElement>(element).displayState() <= 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<String> Internals::bufferedSamplesForTrackID(SourceBuffer* buffer, const AtomicString& trackID)
</del><ins>+Vector<String> Internals::bufferedSamplesForTrackID(SourceBuffer& buffer, const AtomicString& trackID)
</ins><span class="cx"> {
</span><del>- if (!buffer)
- return Vector<String>();
-
- return buffer->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& buffer, bool flag)
</ins><span class="cx"> {
</span><del>- if (buffer)
- buffer->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& interruptionString, ExceptionCode& 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& restrictionsString, ExceptionCode& ec)
</del><ins>+void Internals::setMediaElementRestrictions(HTMLMediaElement& element, const String& 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->mediaSession().behaviorRestrictions();
- element->mediaSession().removeBehaviorRestriction(restrictions);
-
</del><span class="cx"> restrictions = MediaElementSession::NoRestrictions;
</span><span class="cx">
</span><span class="cx"> Vector<String> restrictionsArray;
</span><span class="lines">@@ -3127,7 +2896,7 @@
</span><span class="cx"> if (equalLettersIgnoringASCIICase(restrictionString, "overrideusergesturerequirementformaincontent"))
</span><span class="cx"> restrictions |= MediaElementSession::OverrideUserGestureRequirementForMainContent;
</span><span class="cx"> }
</span><del>- element->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& commandString, ExceptionCode& 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& element) const
</ins><span class="cx"> {
</span><del>- HTMLMediaElement* mediaElement = downcast<HTMLMediaElement>(element);
- return mediaElement ? mediaElement->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& interruptingCategoryString)
</span><span class="cx"> {
</span><span class="cx"> if (interruptingCategoryString == "content")
</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 &restrictionsString, ExceptionCode &ec)
</del><ins>+
+void Internals::setAudioContextRestrictions(AudioContext& context, const String& 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->behaviorRestrictions();
- context->removeBehaviorRestriction(restrictions);
-
</del><span class="cx"> restrictions = AudioContext::NoRestrictions;
</span><span class="cx">
</span><span class="cx"> Vector<String> restrictionsArray;
</span><span class="lines">@@ -3243,8 +3009,9 @@
</span><span class="cx"> if (equalLettersIgnoringASCIICase(restrictionString, "requirepageconsentforaudiostart"))
</span><span class="cx"> restrictions |= AudioContext::RequirePageConsentForAudioStartRestriction;
</span><span class="cx"> }
</span><del>- context->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()->frame()->page();
</span><span class="lines">@@ -3290,6 +3058,7 @@
</span><span class="cx">
</span><span class="cx"> page->setMockMediaPlaybackTargetPickerState(deviceName, state);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> RefPtr<MockPageOverlay> Internals::installMockPageOverlay(const String& overlayType, ExceptionCode& 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& 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& builder, const Vector<LayoutUnit>& 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(" }");
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String Internals::scrollSnapOffsets(Element* element, ExceptionCode& ec)
</del><ins>+String Internals::scrollSnapOffsets(Element& element, ExceptionCode& 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->renderBox())
- return String();
-
- RenderBox& box = *element->renderBox();
</del><ins>+ RenderBox& 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->horizontalSnapOffsets()) {
</span><del>- result.append("horizontal = ");
</del><ins>+ result.appendLiteral("horizontal = ");
</ins><span class="cx"> appendOffsets(result, *scrollableArea->horizontalSnapOffsets());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (scrollableArea->verticalSnapOffsets()) {
</span><span class="cx"> if (result.length())
</span><del>- result.append(", ");
</del><ins>+ result.appendLiteral(", ");
</ins><span class="cx">
</span><del>- result.append("vertical = ");
</del><ins>+ result.appendLiteral("vertical = ");
</ins><span class="cx"> appendOffsets(result, *scrollableArea->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& 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->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&)
</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& 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& node)
</ins><span class="cx"> {
</span><span class="cx"> if (!is<ContainerNode>(node))
</span><del>- return "";
- return WebCore::composedTreeAsText(downcast<ContainerNode>(*node));
</del><ins>+ return emptyString();
+ return WebCore::composedTreeAsText(downcast<ContainerNode>(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<Internals>
- , public ContextDestructionObserver {
</del><ins>+class Internals : public RefCounted<Internals>, public ContextDestructionObserver {
</ins><span class="cx"> public:
</span><del>- static Ref<Internals> create(Document*);
</del><ins>+ static Ref<Internals> create(Document&);
</ins><span class="cx"> virtual ~Internals();
</span><span class="cx">
</span><del>- static void resetToConsistentState(Page*);
</del><ins>+ static void resetToConsistentState(Page&);
</ins><span class="cx">
</span><del>- String elementRenderTreeAsText(Element*, ExceptionCode&);
- bool hasPausedImageAnimations(Element*, ExceptionCode&);
</del><ins>+ String elementRenderTreeAsText(Element&, ExceptionCode&);
+ bool hasPausedImageAnimations(Element&);
</ins><span class="cx">
</span><del>- String address(Node*);
- bool nodeNeedsStyleRecalc(Node*, ExceptionCode&);
- String styleChangeType(Node*, ExceptionCode&);
</del><ins>+ String address(Node&);
+ bool nodeNeedsStyleRecalc(Node&);
+ String styleChangeType(Node&);
</ins><span class="cx"> String description(Deprecated::ScriptValue);
</span><span class="cx">
</span><span class="cx"> bool isPreloaded(const String& url);
</span><span class="cx"> bool isLoadingFromMemoryCache(const String& url);
</span><del>- String xhrResponseSource(XMLHttpRequest*);
- bool isSharingStyleSheetContents(Element* linkA, Element* linkB);
- bool isStyleSheetLoadingSubresources(Element* link);
</del><ins>+ String xhrResponseSource(XMLHttpRequest&);
+ bool isSharingStyleSheetContents(HTMLLinkElement& a, HTMLLinkElement& b);
+ bool isStyleSheetLoadingSubresources(HTMLLinkElement&);
</ins><span class="cx"> void setOverrideCachePolicy(const String&);
</span><span class="cx"> void setCanShowModalDialogOverride(bool allow, ExceptionCode&);
</span><span class="cx"> void setOverrideResourceLoadPriority(const String&);
</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&);
</del><ins>+ unsigned imageFrameIndex(HTMLImageElement&);
</ins><span class="cx">
</span><span class="cx"> void clearPageCache();
</span><span class="cx"> unsigned pageCacheSize() const;
</span><span class="cx">
</span><del>- RefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Node*, ExceptionCode&) const;
</del><ins>+ RefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Node&) const;
</ins><span class="cx">
</span><del>- Node* ensureShadowRoot(Element* host, ExceptionCode&);
- Node* ensureUserAgentShadowRoot(Element* host, ExceptionCode&);
- Node* createShadowRoot(Element* host, ExceptionCode&);
- Node* shadowRoot(Element* host, ExceptionCode&);
- String shadowRootType(const Node*, ExceptionCode&) const;
- Element* includerFor(Node*, ExceptionCode&);
- String shadowPseudoId(Element*, ExceptionCode&);
- void setShadowPseudoId(Element*, const String&, ExceptionCode&);
</del><ins>+ Node* ensureShadowRoot(Element& host, ExceptionCode&);
+ Node* ensureUserAgentShadowRoot(Element& host);
+ Node* createShadowRoot(Element& host, ExceptionCode&);
+ Node* shadowRoot(Element& host);
+ String shadowRootType(const Node&, ExceptionCode&) const;
+ String shadowPseudoId(Element&);
+ void setShadowPseudoId(Element&, const String&);
</ins><span class="cx">
</span><span class="cx"> // DOMTimers throttling testing.
</span><span class="cx"> bool isTimerThrottled(int timeoutId, ExceptionCode&);
</span><span class="lines">@@ -135,40 +134,38 @@
</span><span class="cx"> bool animationsAreSuspended(ExceptionCode&) const;
</span><span class="cx"> void suspendAnimations(ExceptionCode&) const;
</span><span class="cx"> void resumeAnimations(ExceptionCode&) const;
</span><del>- bool pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element*, ExceptionCode&);
- bool pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element*, const String& pseudoId, ExceptionCode&);
</del><ins>+ bool pauseAnimationAtTimeOnElement(const String& animationName, double pauseTime, Element&, ExceptionCode&);
+ bool pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element&, const String& pseudoId, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> // CSS Transition testing.
</span><del>- bool pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element*, ExceptionCode&);
- bool pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element*, const String& pseudoId, ExceptionCode&);
</del><ins>+ bool pauseTransitionAtTimeOnElement(const String& propertyName, double pauseTime, Element&, ExceptionCode&);
+ bool pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element&, const String& pseudoId, ExceptionCode&);
</ins><span class="cx">
</span><del>- Node* treeScopeRootNode(Node*, ExceptionCode&);
- Node* parentTreeScope(Node*, ExceptionCode&);
</del><ins>+ Node* treeScopeRootNode(Node&);
+ Node* parentTreeScope(Node&);
</ins><span class="cx">
</span><del>- bool attached(Node*, ExceptionCode&);
-
- String visiblePlaceholder(Element*);
- void selectColorInColorChooser(Element*, const String& colorValue);
</del><ins>+ String visiblePlaceholder(Element&);
+ void selectColorInColorChooser(HTMLInputElement&, const String& colorValue);
</ins><span class="cx"> Vector<String> formControlStateOfPreviousHistoryItem(ExceptionCode&);
</span><span class="cx"> void setFormControlStateOfPreviousHistoryItem(const Vector<String>&, ExceptionCode&);
</span><span class="cx">
</span><span class="cx"> Ref<ClientRect> absoluteCaretBounds(ExceptionCode&);
</span><span class="cx">
</span><del>- Ref<ClientRect> boundingBox(Element*, ExceptionCode&);
</del><ins>+ Ref<ClientRect> boundingBox(Element&);
</ins><span class="cx">
</span><span class="cx"> Ref<ClientRectList> inspectorHighlightRects(ExceptionCode&);
</span><span class="cx"> String inspectorHighlightObject(ExceptionCode&);
</span><span class="cx">
</span><del>- unsigned markerCountForNode(Node*, const String&, ExceptionCode&);
- RefPtr<Range> markerRangeForNode(Node*, const String& markerType, unsigned index, ExceptionCode&);
- String markerDescriptionForNode(Node*, const String& markerType, unsigned index, ExceptionCode&);
</del><ins>+ unsigned markerCountForNode(Node&, const String&, ExceptionCode&);
+ RefPtr<Range> markerRangeForNode(Node&, const String& markerType, unsigned index, ExceptionCode&);
+ String markerDescriptionForNode(Node&, const String& markerType, unsigned index, ExceptionCode&);
</ins><span class="cx"> String dumpMarkerRects(const String& markerType, ExceptionCode&);
</span><del>- void addTextMatchMarker(const Range*, bool isActive);
</del><ins>+ void addTextMatchMarker(const Range&, bool isActive);
</ins><span class="cx"> void setMarkedTextMatchesAreHighlighted(bool, ExceptionCode&);
</span><span class="cx">
</span><span class="cx"> void invalidateFontCache();
</span><span class="cx">
</span><del>- void setScrollViewPosition(long x, long y, ExceptionCode&);
</del><ins>+ void setScrollViewPosition(int x, int y, ExceptionCode&);
</ins><span class="cx"> void setViewBaseBackgroundColor(const String& colorValue, ExceptionCode&);
</span><span class="cx">
</span><span class="cx"> void setPagination(const String& mode, int gap, ExceptionCode& ec) { setPagination(mode, gap, 0, ec); }
</span><span class="lines">@@ -176,22 +173,22 @@
</span><span class="cx"> void setPaginationLineGridEnabled(bool, ExceptionCode&);
</span><span class="cx"> String configurationForViewport(float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode&);
</span><span class="cx">
</span><del>- bool wasLastChangeUserEdit(Element* textField, ExceptionCode&);
- bool elementShouldAutoComplete(Element* inputElement, ExceptionCode&);
- void setEditingValue(Element* inputElement, const String&, ExceptionCode&);
- void setAutofilled(Element*, bool enabled, ExceptionCode&);
- void setShowAutoFillButton(Element*, const String& autoFillButtonType, ExceptionCode&);
- void scrollElementToRect(Element*, long x, long y, long w, long h, ExceptionCode&);
</del><ins>+ bool wasLastChangeUserEdit(Element& textField, ExceptionCode&);
+ bool elementShouldAutoComplete(HTMLInputElement&);
+ void setEditingValue(HTMLInputElement&, const String&);
+ void setAutofilled(HTMLInputElement&, bool enabled);
+ void setShowAutoFillButton(HTMLInputElement&, const String& autoFillButtonType);
+ void scrollElementToRect(Element&, int x, int y, int w, int h, ExceptionCode&);
</ins><span class="cx">
</span><del>- String autofillFieldName(Element*, ExceptionCode&);
</del><ins>+ String autofillFieldName(Element&, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> void paintControlTints(ExceptionCode&);
</span><span class="cx">
</span><del>- RefPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&);
- unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&);
- unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
- String rangeAsText(const Range*, ExceptionCode&);
- RefPtr<Range> subrange(Range*, int rangeLocation, int rangeLength, ExceptionCode&);
</del><ins>+ RefPtr<Range> rangeFromLocationAndLength(Element& scope, int rangeLocation, int rangeLength);
+ unsigned locationFromRange(Element& scope, const Range&);
+ unsigned lengthFromRange(Element& scope, const Range&);
+ String rangeAsText(const Range&);
+ RefPtr<Range> subrange(Range&, int rangeLocation, int rangeLength);
</ins><span class="cx"> RefPtr<Range> rangeForDictionaryLookupAtLocation(int x, int y, ExceptionCode&);
</span><span class="cx">
</span><span class="cx"> void setDelegatesScrolling(bool enabled, ExceptionCode&);
</span><span class="lines">@@ -208,7 +205,7 @@
</span><span class="cx"> unsigned wheelEventHandlerCount(ExceptionCode&);
</span><span class="cx"> unsigned touchEventHandlerCount(ExceptionCode&);
</span><span class="cx">
</span><del>- RefPtr<NodeList> nodesFromRect(Document*, int x, int y, unsigned topPadding, unsigned rightPadding,
</del><ins>+ RefPtr<NodeList> nodesFromRect(Document&, int x, int y, unsigned topPadding, unsigned rightPadding,
</ins><span class="cx"> unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&) 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&) const;
- String layerTreeAsText(Document*, ExceptionCode&) const;
</del><ins>+ String layerTreeAsText(Document&, unsigned flags, ExceptionCode&) const;
+ String layerTreeAsText(Document&, ExceptionCode&) const;
</ins><span class="cx"> String repaintRectsAsText(ExceptionCode&) const;
</span><span class="cx"> String scrollingStateTreeAsText(ExceptionCode&) const;
</span><span class="cx"> String mainThreadScrollingReasons(ExceptionCode&) const;
</span><span class="cx"> RefPtr<ClientRectList> nonFastScrollableRects(ExceptionCode&) const;
</span><span class="cx">
</span><del>- void setElementUsesDisplayListDrawing(Element*, bool usesDisplayListDrawing, ExceptionCode&);
- void setElementTracksDisplayListReplay(Element*, bool isTrackingReplay, ExceptionCode&);
</del><ins>+ void setElementUsesDisplayListDrawing(Element&, bool usesDisplayListDrawing, ExceptionCode&);
+ void setElementTracksDisplayListReplay(Element&, bool isTrackingReplay, ExceptionCode&);
</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&);
- String displayListForElement(Element*, ExceptionCode&);
</del><ins>+ String displayListForElement(Element&, unsigned flags, ExceptionCode&);
+ String displayListForElement(Element&, ExceptionCode&);
</ins><span class="cx">
</span><del>- String replayDisplayListForElement(Element*, unsigned flags, ExceptionCode&);
- String replayDisplayListForElement(Element*, ExceptionCode&);
</del><ins>+ String replayDisplayListForElement(Element&, unsigned flags, ExceptionCode&);
+ String replayDisplayListForElement(Element&, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> void garbageCollectDocumentResources(ExceptionCode&) const;
</span><span class="cx">
</span><span class="lines">@@ -288,9 +285,9 @@
</span><span class="cx"> void setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
</span><span class="cx"> void setInspectorIsUnderTest(bool isUnderTest, ExceptionCode&);
</span><span class="cx">
</span><del>- String counterValue(Element*);
</del><ins>+ String counterValue(Element&);
</ins><span class="cx">
</span><del>- int pageNumber(Element*, float pageWidth = 800, float pageHeight = 600);
</del><ins>+ int pageNumber(Element&, float pageWidth = 800, float pageHeight = 600);
</ins><span class="cx"> Vector<String> 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&);
+ void webkitDidEnterFullScreenForElement(Element&);
+ void webkitWillExitFullScreenForElement(Element&);
+ void webkitDidExitFullScreenForElement(Element&);
</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&);
</span><span class="cx">
</span><span class="cx"> void startTrackingLayerFlushes(ExceptionCode&);
</span><del>- unsigned long layerFlushCount(ExceptionCode&);
</del><ins>+ unsigned layerFlushCount(ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> void startTrackingStyleRecalcs(ExceptionCode&);
</span><del>- unsigned long styleRecalcCount(ExceptionCode&);
</del><ins>+ unsigned styleRecalcCount(ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> void startTrackingCompositingUpdates(ExceptionCode&);
</span><del>- unsigned long compositingUpdateCount(ExceptionCode&);
</del><ins>+ unsigned compositingUpdateCount(ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&);
</span><span class="cx"> void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionCode&);
</span><span class="cx"> unsigned layoutCount() const;
</span><span class="cx">
</span><span class="cx"> RefPtr<ArrayBuffer> serializeObject(PassRefPtr<SerializedScriptValue>) const;
</span><del>- RefPtr<SerializedScriptValue> deserializeBuffer(PassRefPtr<ArrayBuffer>) const;
</del><ins>+ RefPtr<SerializedScriptValue> deserializeBuffer(ArrayBuffer&) 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&);
</span><span class="cx">
</span><del>- String markerTextForListItem(Element*, ExceptionCode&);
</del><ins>+ String markerTextForListItem(Element&);
</ins><span class="cx">
</span><del>- String toolTipFromElement(Element*, ExceptionCode&) const;
</del><ins>+ String toolTipFromElement(Element&) 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&);
</del><ins>+ String getImageSourceURL(Element&);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(VIDEO)
</span><del>- void simulateAudioInterruption(Node*);
- bool mediaElementHasCharacteristic(Node*, const String&, ExceptionCode&);
</del><ins>+ void simulateAudioInterruption(HTMLMediaElement&);
+ bool mediaElementHasCharacteristic(HTMLMediaElement&, const String&, ExceptionCode&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- bool isSelectPopupVisible(Node*);
</del><ins>+ bool isSelectPopupVisible(HTMLSelectElement&);
</ins><span class="cx">
</span><span class="cx"> String captionsStyleSheetOverride(ExceptionCode&);
</span><span class="cx"> void setCaptionsStyleSheetOverride(const String&, ExceptionCode&);
</span><span class="lines">@@ -395,7 +392,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx"> Ref<TimeRanges> createTimeRanges(Float32Array* startTimes, Float32Array* endTimes);
</span><del>- double closestTimeToTimeRanges(double time, TimeRanges*);
</del><ins>+ double closestTimeToTimeRanges(double time, TimeRanges&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> Ref<ClientRect> selectionBounds(ExceptionCode&);
</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&);
- bool isPluginSnapshotted(Element*, ExceptionCode&);
</del><ins>+ bool isPluginUnavailabilityIndicatorObscured(Element&, ExceptionCode&);
+ bool isPluginSnapshotted(Element&);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE)
</span><span class="cx"> WEBCORE_TESTSUPPORT_EXPORT void initializeMockMediaSource();
</span><del>- Vector<String> bufferedSamplesForTrackID(SourceBuffer*, const AtomicString&);
- void setShouldGenerateTimestamps(SourceBuffer*, bool);
</del><ins>+ Vector<String> bufferedSamplesForTrackID(SourceBuffer&, const AtomicString&);
+ void setShouldGenerateTimestamps(SourceBuffer&, 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& mediaType, const String& restrictions, ExceptionCode&);
</span><del>- void setMediaElementRestrictions(HTMLMediaElement*, const String& restrictions, ExceptionCode&);
</del><ins>+ void setMediaElementRestrictions(HTMLMediaElement&, const String& restrictions);
</ins><span class="cx"> void postRemoteControlCommand(const String&, ExceptionCode&);
</span><del>- bool elementIsBlockingDisplaySleep(Element*) const;
</del><ins>+ bool elementIsBlockingDisplaySleep(HTMLMediaElement&) 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&);
</span><span class="cx"> void sendMediaSessionEndOfInterruptionNotification(const String&);
</span><del>- String mediaSessionCurrentState(MediaSession*) const;
- double mediaElementPlayerVolume(HTMLMediaElement*) const;
</del><ins>+ String mediaSessionCurrentState(MediaSession&) const;
+ double mediaElementPlayerVolume(HTMLMediaElement&) const;
</ins><span class="cx"> void sendMediaControlEvent(const String&);
</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& restrictions, ExceptionCode&);
</del><ins>+ void setAudioContextRestrictions(AudioContext&, const String& 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&);
</del><ins>+ String scrollSnapOffsets(Element&, ExceptionCode&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> String pathStringWithShrinkWrappedRects(Vector<double> rectComponents, double radius, ExceptionCode&);
</span><span class="cx">
</span><del>- String getCurrentMediaControlsStatusForElement(HTMLMediaElement*);
</del><ins>+ String getCurrentMediaControlsStatusForElement(HTMLMediaElement&);
</ins><span class="cx">
</span><del>- String userVisibleString(const DOMURL*);
</del><ins>+ String userVisibleString(const DOMURL&);
</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&, JSC::JSValue);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- String composedTreeAsText(Node*);
</del><ins>+ String composedTreeAsText(Node&);
</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&);
</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& markerType, unsigned index, ExceptionCode&);
</del><ins>+ RenderedDocumentMarker* markerAt(Node&, const String& markerType, unsigned index, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> std::unique_ptr<InspectorStubFrontend> 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>-"view",
-"document"
</del><ins>+ "view",
+ "document"
</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<DOMString> 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) && 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& url)
</ins><span class="cx"> {
</span><del>- return contextDocument()->frame()->editor().client()->userVisibleString(url->href());
</del><ins>+ return contextDocument()->frame()->editor().client()->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<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
</span><span class="cx"> ScriptExecutionContext* scriptContext = globalObject->scriptExecutionContext();
</span><span class="cx"> if (is<Document>(*scriptContext))
</span><del>- globalObject->putDirect(exec->vm(), Identifier::fromString(exec, Internals::internalsId), toJS(exec, globalObject, Internals::create(downcast<Document>(scriptContext))));
</del><ins>+ globalObject->putDirect(exec->vm(), Identifier::fromString(exec, Internals::internalsId), toJS(exec, globalObject, Internals::create(downcast<Document>(*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<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
</span><span class="cx"> ScriptExecutionContext* scriptContext = globalObject->scriptExecutionContext();
</span><span class="cx"> Page* page = downcast<Document>(scriptContext)->frame()->page();
</span><del>- Internals::resetToConsistentState(page);
</del><ins>+ Internals::resetToConsistentState(*page);
</ins><span class="cx"> InternalSettings::from(page)->resetToConsistentState();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>