<!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>[208131] trunk/Source/WebCore</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/208131">208131</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2016-10-30 13:47:16 -0700 (Sun, 30 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Win][Direct2D] Correct bookkeeping for begin/end draw pairs
https://bugs.webkit.org/show_bug.cgi?id=163898

Reviewed by Darin Adler.

Simon pointed out that GraphicsContext objects are generally only created at
the time we intend to do drawing, so calling 'BeginDraw' as part of object
construction, and 'EndDraw' at time of destruction should be sufficient.

As usual, he was correct.
        
This patch gets rid of unneeded code and greatly simplifies the Direct2D
drawing path.
        
Tested by existing layout tests.

* platform/graphics/GraphicsContext.h:
* platform/graphics/win/GradientDirect2D.cpp:
(WebCore::Gradient::fill):Remove unneeded use
of 'RenderTargetScopedDrawing.h'.
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::releaseWindowsContext): Remove unneeded use
of RenderTargetScopedDrawing class.
(WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Enter
the 'BeginDraw' state at object creation.
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): End
draw state at object destruction.
(WebCore::GraphicsContextPlatformPrivate::clip): Remove unneeded call to 'beginDraw'.
(WebCore::GraphicsContextPlatformPrivate::beginDraw): Renamed from 'beginDrawIfNeeded'.
(WebCore::GraphicsContextPlatformPrivate::endDraw): Get rid of draw state flags.
(WebCore::GraphicsContext::beginDraw): Renamed from 'beginDrawIfNeeded'.
(WebCore::GraphicsContext::flush): Added.
(WebCore::GraphicsContext::drawWithoutShadow): Remove unneeded use of
RenderTargetScopedDrawing class.
(WebCore::GraphicsContext::drawWithShadow): Ditto.
(WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
(WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
(WebCore::GraphicsContext::didBeginDraw): Deleted.
(WebCore::GraphicsContextPlatformPrivate::beginDrawIfNeeded): Deleted.
(WebCore::GraphicsContext::beginDrawIfNeeded): Deleted.
* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
(WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Deleted.
* platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::getData): Remove unneeded use of RenderTargetScopedDrawing class.
(WebCore::ImageBufferData::putData):
* platform/graphics/win/ImageBufferDirect2D.cpp:
(WebCore::ImageBuffer::flushContext): Call new GraphicsContext 'flush' command.
(WebCore::ImageBuffer::draw): Remove unneeded use of RenderTargetScopedDrawing class.
* platform/graphics/win/NativeImageDirect2D.cpp: Ditto.
* platform/graphics/win/RenderTargetScopedDrawing.h: Removed.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImage): Remove unneeded use of RenderTargetScopedDrawing class.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsContexth">trunk/Source/WebCore/platform/graphics/GraphicsContext.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGradientDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContextDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinGraphicsContextPlatformPrivateDirect2Dh">trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinImageBufferDataDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinImageBufferDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicswinNativeImageDirect2Dcpp">trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsSVGImagecpp">trunk/Source/WebCore/svg/graphics/SVGImage.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicswinRenderTargetScopedDrawingh">trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/ChangeLog        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -1,1585 +1,58 @@
</span><del>-2016-10-30  Dave Hyatt  &lt;hyatt@apple.com&gt;
</del><ins>+2016-10-28  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</ins><span class="cx"> 
</span><del>-        [CSS Parser] Clean up the two types of descendant relations in CSSSelector
-        https://bugs.webkit.org/show_bug.cgi?id=164203
</del><ins>+        [Win][Direct2D] Correct bookkeeping for begin/end draw pairs
+        https://bugs.webkit.org/show_bug.cgi?id=163898
</ins><span class="cx"> 
</span><del>-        Reviewed by Zalan Bujtas.
-
-        This patch gets rid of the separate boolean for double child and allows it
-        to be a unique relation type. Rename Descendant to DescendantSpace and
-        name the new relation DescendantDoubleChild.
-
-        * css/CSSSelector.cpp:
-        (WebCore::CSSSelector::CSSSelector):
-        (WebCore::CSSSelector::selectorText):
-        * css/CSSSelector.h:
-        (WebCore::CSSSelector::hasDescendantRelation):
-        (WebCore::CSSSelector::hasDescendantOrChildRelation):
-        (WebCore::CSSSelector::CSSSelector):
-        (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax): Deleted.
-        * css/RuleFeature.cpp:
-        (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
-        * css/SelectorChecker.cpp:
-        (WebCore::SelectorChecker::matchRecursively):
-        (WebCore::SelectorChecker::determineLinkMatchType):
-        * css/SelectorFilter.cpp:
-        (WebCore::SelectorFilter::collectIdentifierHashes):
-        * css/parser/CSSParserValues.cpp:
-        (WebCore::CSSParserSelector::appendTagHistory):
-        * css/parser/CSSParserValues.h:
-        (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax): Deleted.
-        * css/parser/CSSSelectorParser.cpp:
-        (WebCore::isDescendantCombinator):
-        (WebCore::CSSSelectorParser::consumeComplexSelector):
-        (WebCore::CSSSelectorParser::consumeCombinator):
-        * cssjit/SelectorCompiler.cpp:
-        (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
-
-2016-10-30  Frederic Wang  &lt;fwang@igalia.com&gt;
-
-        Unreviewed gardening
-
-        Fix build error on WinCairo.
-
-        * platform/graphics/opentype/OpenTypeMathData.cpp:
-
-2016-10-30  Frederic Wang  &lt;fwang@igalia.com&gt;
-
-        Use HarfBuzz ot-math API to parse the OpenType MATH table
-        https://bugs.webkit.org/show_bug.cgi?id=162671
-
-        Reviewed by Michael Catanzaro.
-
-        No new tests, already covered by existing tests.
-
-        * platform/graphics/opentype/OpenTypeMathData.cpp: Add alternative implementation relying on
-        HarfBuzz's new OpenType MATH API.
-        * platform/graphics/opentype/OpenTypeMathData.h: Ditto.
-        (WebCore::OpenTypeMathData::hasMathData):
-        (WebCore::OpenTypeMathData::HbFontDeleter::operator()):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support unprefixed image-sets
-        https://bugs.webkit.org/show_bug.cgi?id=164198
-
-        Reviewed by Dean Jackson.
-
-        * css/CSSValueKeywords.in:
-        * css/parser/CSSPropertyParserHelpers.cpp:
-        (WebCore::CSSPropertyParserHelpers::consumeImage):
-
-2016-10-30  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
-
-        [DOM] Introduce WebCore::jsDynamicDowncast
-        https://bugs.webkit.org/show_bug.cgi?id=164137
-
</del><span class="cx">         Reviewed by Darin Adler.
</span><span class="cx"> 
</span><del>-        In WebCore, we have several extended JSTypes, like JSElementType.
-        For these types, WebCore offers the faster casting function compared
-        to JSC::jsDynamicCast. For example, for JSElementType, we have
-        jsElementCast.
</del><ins>+        Simon pointed out that GraphicsContext objects are generally only created at
+        the time we intend to do drawing, so calling 'BeginDraw' as part of object
+        construction, and 'EndDraw' at time of destruction should be sufficient.
</ins><span class="cx"> 
</span><del>-        The problem is that we may fall into the slow code if we choose
-        JSC::jsDynamicCast by accident. Selecting the appropriate function
-        requires special care in the IDL code generator when we would like
-        to use faster casting functions.
</del><ins>+        As usual, he was correct.
+        
+        This patch gets rid of unneeded code and greatly simplifies the Direct2D
+        drawing path.
+        
+        Tested by existing layout tests.
</ins><span class="cx"> 
</span><del>-        This patch implements a new casting function, WebCore::jsDynamicDowncast.
-        It is a thin wrapper to the JSC::jsDynamicCast. But it selects the
-        faster casting functions correctly by template specialization.
-
-        We do not choose the way specializing JSC::jsDynamicCast directly.
-        If we forget to include the header that specializes JSC::jsDyanmicCast,
-        it does not cause any compile errors, but it causes performance regression.
-        This bug is hard to figure out. To avoid this problem, we add a new function.
-
-        Outside JSC, only Tools' DumpRenderTree uses JSC::jsDynamicCast.
-        This code has FIXME that we should use JSC APIs instead of directly calling
-        JSC thingy. So this should be solved in the layer of JSC APIs and changing
-        this jsDynamicCast to WebCore's jsDynamicDowncast and exposing WebCore's thingy
-        are not good change. So we leave the code as is.
-
-        * WebCore.xcodeproj/project.pbxproj:
-        * bindings/js/JSApplePaySessionCustom.cpp:
-        (WebCore::JSApplePaySession::completeShippingMethodSelection):
-        (WebCore::JSApplePaySession::completeShippingContactSelection):
-        (WebCore::JSApplePaySession::completePaymentMethodSelection):
-        * bindings/js/JSDOMBinding.cpp:
-        (WebCore::reportException):
-        * bindings/js/JSDOMBinding.h:
-        (WebCore::castThisValue):
-        (WebCore::toArrayBufferView):
-        * bindings/js/JSDOMIterator.h:
-        (WebCore::IteratorTraits&gt;::next):
-        * bindings/js/JSDOMWindowShell.cpp:
-        (WebCore::JSDOMWindowShell::toWrapped):
-        * bindings/js/JSDictionary.cpp:
-        (WebCore::JSDictionary::convertValue):
-        * bindings/js/JSDocumentCustom.h:
-        (WebCore::jsDocumentCast):
-        * bindings/js/JSDynamicDowncast.h: Added.
-        (WebCore::JSDynamicCastTrait::cast):
-        (WebCore::JSDynamicCastTrait&lt;JSNode&gt;::cast):
-        (WebCore::JSDynamicCastTrait&lt;JSElement&gt;::cast):
-        (WebCore::JSDynamicCastTrait&lt;JSDocument&gt;::cast):
-        (WebCore::JSDynamicCastTrait&lt;JSEvent&gt;::cast):
-        (WebCore::jsDynamicDowncast):
-        * bindings/js/JSElementCustom.h:
-        (WebCore::jsElementCast):
-        * bindings/js/JSEventCustom.h:
-        (WebCore::jsEventCast):
-        * bindings/js/JSEventListener.cpp:
-        (WebCore::setDocumentEventHandlerAttribute):
-        * bindings/js/JSEventTargetCustom.cpp:
-        (WebCore::jsEventTargetCast):
-        * bindings/js/JSMediaStreamTrackCustom.cpp:
-        (WebCore::JSMediaStreamTrack::getSettings):
-        (WebCore::JSMediaStreamTrack::getCapabilities):
-        * bindings/js/JSNodeCustom.h:
-        (WebCore::jsNodeCast):
-        * bindings/js/JSPluginElementFunctions.cpp:
-        (WebCore::pluginElementPropertyGetter):
-        * bindings/js/JSReadableStreamPrivateConstructors.cpp:
-        (WebCore::constructJSReadableStreamDefaultReader):
-        * bindings/js/JSReadableStreamSourceCustom.cpp:
-        (WebCore::startReadableStream):
-        (WebCore::JSReadableStreamSource::start):
-        (WebCore::pullReadableStream):
-        * bindings/js/JSWorkerGlobalScopeBase.cpp:
-        (WebCore::toJSDedicatedWorkerGlobalScope):
-        * bindings/js/ScriptModuleLoader.cpp:
-        (WebCore::ScriptModuleLoader::evaluate):
-        * bindings/js/SerializedScriptValue.cpp:
-        (WebCore::CloneSerializer::serialize):
-        * bindings/js/StructuredClone.cpp:
-        (WebCore::structuredCloneArrayBufferView):
-        * bindings/scripts/CodeGeneratorJS.pm:
-        (GetCastingHelperForThisObject):
-        (GenerateImplementation):
-        * bindings/scripts/test/JS/JSInterfaceName.cpp:
-        (WebCore::jsInterfaceNameConstructor):
-        (WebCore::setJSInterfaceNameConstructor):
-        (WebCore::JSInterfaceName::toWrapped):
-        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
-        (WebCore::BindingCaller&lt;JSTestActiveDOMObject&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestActiveDOMObject&gt;::castForOperation):
-        (WebCore::jsTestActiveDOMObjectConstructor):
-        (WebCore::setJSTestActiveDOMObjectConstructor):
-        (WebCore::JSTestActiveDOMObject::toWrapped):
-        * bindings/scripts/test/JS/JSTestCEReactions.cpp:
-        (WebCore::BindingCaller&lt;JSTestCEReactions&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestCEReactions&gt;::castForOperation):
-        (WebCore::jsTestCEReactionsConstructor):
-        (WebCore::setJSTestCEReactionsConstructor):
-        (WebCore::JSTestCEReactions::toWrapped):
-        * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
-        (WebCore::BindingCaller&lt;JSTestCEReactionsStringifier&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestCEReactionsStringifier&gt;::castForOperation):
-        (WebCore::jsTestCEReactionsStringifierConstructor):
-        (WebCore::setJSTestCEReactionsStringifierConstructor):
-        (WebCore::JSTestCEReactionsStringifier::toWrapped):
-        * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
-        (WebCore::jsTestClassWithJSBuiltinConstructorConstructor):
-        (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
-        (WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped):
-        * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
-        (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
-        (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
-        (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
-        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
-        (WebCore::BindingCaller&lt;JSTestCustomNamedGetter&gt;::castForOperation):
-        (WebCore::jsTestCustomNamedGetterConstructor):
-        (WebCore::setJSTestCustomNamedGetterConstructor):
-        (WebCore::JSTestCustomNamedGetter::toWrapped):
-        * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
-        (WebCore::BindingCaller&lt;JSTestDOMJIT&gt;::castForAttribute):
-        (WebCore::jsTestDOMJITConstructor):
-        (WebCore::setJSTestDOMJITConstructor):
-        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
-        (WebCore::BindingCaller&lt;JSTestEventConstructor&gt;::castForAttribute):
-        (WebCore::jsTestEventConstructorConstructor):
-        (WebCore::setJSTestEventConstructorConstructor):
-        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
-        (WebCore::BindingCaller&lt;JSTestEventTarget&gt;::castForOperation):
-        (WebCore::jsTestEventTargetConstructor):
-        (WebCore::setJSTestEventTargetConstructor):
-        (WebCore::JSTestEventTarget::toWrapped):
-        * bindings/scripts/test/JS/JSTestException.cpp:
-        (WebCore::BindingCaller&lt;JSTestException&gt;::castForAttribute):
-        (WebCore::jsTestExceptionConstructor):
-        (WebCore::setJSTestExceptionConstructor):
-        (WebCore::JSTestException::toWrapped):
-        * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
-        (WebCore::jsTestGenerateIsReachableConstructor):
-        (WebCore::setJSTestGenerateIsReachableConstructor):
-        (WebCore::JSTestGenerateIsReachable::toWrapped):
-        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
-        (WebCore::BindingCaller&lt;JSTestGlobalObject&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestGlobalObject&gt;::castForOperation):
-        (WebCore::jsTestGlobalObjectConstructor):
-        (WebCore::setJSTestGlobalObjectConstructor):
-        (WebCore::JSTestGlobalObject::toWrapped):
-        * bindings/scripts/test/JS/JSTestInterface.cpp:
-        (WebCore::BindingCaller&lt;JSTestInterface&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestInterface&gt;::castForOperation):
-        (WebCore::jsTestInterfaceConstructor):
-        (WebCore::setJSTestInterfaceConstructor):
-        (WebCore::JSTestInterface::toWrapped):
-        * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
-        (WebCore::BindingCaller&lt;JSTestInterfaceLeadingUnderscore&gt;::castForAttribute):
-        (WebCore::jsTestInterfaceLeadingUnderscoreConstructor):
-        (WebCore::setJSTestInterfaceLeadingUnderscoreConstructor):
-        (WebCore::JSTestInterfaceLeadingUnderscore::toWrapped):
-        * bindings/scripts/test/JS/JSTestIterable.cpp:
-        (WebCore::BindingCaller&lt;JSTestIterable&gt;::castForOperation):
-        (WebCore::jsTestIterableConstructor):
-        (WebCore::setJSTestIterableConstructor):
-        (WebCore::JSTestIterable::toWrapped):
-        * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
-        (WebCore::BindingCaller&lt;JSTestJSBuiltinConstructor&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestJSBuiltinConstructor&gt;::castForOperation):
-        (WebCore::jsTestJSBuiltinConstructorConstructor):
-        (WebCore::setJSTestJSBuiltinConstructorConstructor):
-        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
-        (WebCore::BindingCaller&lt;JSTestMediaQueryListListener&gt;::castForOperation):
-        (WebCore::jsTestMediaQueryListListenerConstructor):
-        (WebCore::setJSTestMediaQueryListListenerConstructor):
-        (WebCore::JSTestMediaQueryListListener::toWrapped):
-        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
-        (WebCore::jsTestNamedConstructorConstructor):
-        (WebCore::setJSTestNamedConstructorConstructor):
-        (WebCore::JSTestNamedConstructor::toWrapped):
-        * bindings/scripts/test/JS/JSTestNode.cpp:
-        (WebCore::BindingCaller&lt;JSTestNode&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestNode&gt;::castForOperation):
-        (WebCore::jsTestNodeConstructor):
-        (WebCore::setJSTestNodeConstructor):
-        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
-        (WebCore::BindingCaller&lt;JSTestNondeterministic&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestNondeterministic&gt;::castForOperation):
-        (WebCore::jsTestNondeterministicConstructor):
-        (WebCore::setJSTestNondeterministicConstructor):
-        (WebCore::JSTestNondeterministic::toWrapped):
-        * bindings/scripts/test/JS/JSTestObj.cpp:
-        (WebCore::BindingCaller&lt;JSTestObj&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestObj&gt;::castForOperation):
-        (WebCore::jsTestObjConstructor):
-        (WebCore::setJSTestObjConstructor):
-        (WebCore::JSTestObj::toWrapped):
-        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
-        (WebCore::jsTestOverloadedConstructorsConstructor):
-        (WebCore::setJSTestOverloadedConstructorsConstructor):
-        (WebCore::JSTestOverloadedConstructors::toWrapped):
-        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
-        (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor):
-        (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor):
-        (WebCore::JSTestOverloadedConstructorsWithSequence::toWrapped):
-        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
-        (WebCore::BindingCaller&lt;JSTestOverrideBuiltins&gt;::castForOperation):
-        (WebCore::jsTestOverrideBuiltinsConstructor):
-        (WebCore::setJSTestOverrideBuiltinsConstructor):
-        (WebCore::JSTestOverrideBuiltins::toWrapped):
-        * bindings/scripts/test/JS/JSTestSerialization.cpp:
-        (WebCore::BindingCaller&lt;JSTestSerialization&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestSerialization&gt;::castForOperation):
-        (WebCore::jsTestSerializationConstructor):
-        (WebCore::setJSTestSerializationConstructor):
-        (WebCore::JSTestSerialization::toWrapped):
-        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
-        (WebCore::BindingCaller&lt;JSTestSerializedScriptValueInterface&gt;::castForAttribute):
-        (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
-        (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
-        (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
-        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
-        (WebCore::BindingCaller&lt;JSTestTypedefs&gt;::castForAttribute):
-        (WebCore::BindingCaller&lt;JSTestTypedefs&gt;::castForOperation):
-        (WebCore::jsTestTypedefsConstructor):
-        (WebCore::setJSTestTypedefsConstructor):
-        (WebCore::JSTestTypedefs::toWrapped):
-        * bridge/objc/WebScriptObject.mm:
-        (-[WebScriptObject setValue:forKey:]):
-        * bridge/runtime_array.cpp:
-        (JSC::RuntimeArray::lengthGetter):
-        * bridge/runtime_method.cpp:
-        (JSC::RuntimeMethod::lengthGetter):
-        * html/HTMLMediaElement.cpp:
-        (WebCore::controllerJSValue):
-        (WebCore::HTMLMediaElement::updateCaptionContainer):
-        (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
-        * inspector/InspectorDOMAgent.cpp:
-        (WebCore::InspectorDOMAgent::buildObjectForEventListener):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Add font-variant-* keyword property support
-        https://bugs.webkit.org/show_bug.cgi?id=164195
-
-        Reviewed by Zalan Bujtas.
-
-        * css/parser/CSSParserFastPaths.cpp:
-        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Fix text-emphasis-position parsing
-        https://bugs.webkit.org/show_bug.cgi?id=164197
-
-        Reviewed by Zalan Bujtas.
-
-        * css/parser/CSSParserFastPaths.cpp:
-        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
-        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeTextEmphasisPosition):
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
-2016-10-29  Darin Adler  &lt;darin@apple.com&gt;
-
-        Convert more of DOM from ExceptionCode to Exception
-        https://bugs.webkit.org/show_bug.cgi?id=164173
-
-        Reviewed by Ryosuke Niwa.
-
-        * Modules/mediastream/MediaDevices.cpp:
-        (WebCore::MediaDevices::getUserMedia): Use ExceptionOr.
-        (WebCore::MediaDevices::enumerateDevices): Ditto.
-        * Modules/mediastream/MediaDevices.h: Updated for above.
-        * Modules/mediastream/MediaDevices.idl: Use non-legacy exceptions.
-
-        * Modules/mediastream/MediaEndpointSessionDescription.cpp:
-        Added now-needed include of ExceptionCode.h.
-
-        * Modules/mediastream/RTCConfiguration.cpp:
-        (WebCore::parseIceServer): Use ExceptionOr.
-        (WebCore::RTCConfiguration::create): Ditto.
-        (WebCore::RTCConfiguration::initialize): Ditto.
-        * Modules/mediastream/RTCConfiguration.h: Updated for above.
-        * Modules/mediastream/RTCConfiguration.idl: Use non-legacy exceptions.
-
-        * Modules/mediastream/RTCDTMFSender.cpp:
-        (WebCore::RTCDTMFSender::create): Use ExceptionOr.
-        (WebCore::RTCDTMFSender::insertDTMF): Ditto.
-        * Modules/mediastream/RTCDTMFSender.h: Updated for above.
-        * Modules/mediastream/RTCDTMFSender.idl: Use non-legacy exceptions.
-
-        * Modules/mediastream/RTCDataChannel.cpp:
-        (WebCore::RTCDataChannel::create): Use ExceptionOr.
-        (WebCore::RTCDataChannel::setBinaryType): Ditto.
-        (WebCore::RTCDataChannel::send): Ditto.
-        (WebCore::RTCDataChannel::didReceiveRawData): Ditto.
-        * Modules/mediastream/RTCDataChannel.h: Updated for above.
-        Also fhcanged resturn values to use const AtomicString&amp; and
-        unsigned instead of unsigned long. Also made more private.
-        Also changed BinaryType into an enum class.
-        * Modules/mediastream/RTCDataChannel.idl: Use non-legacy exceptions.
-
-        * Modules/mediastream/RTCIceCandidate.cpp:
-        (WebCore::RTCIceCandidate::create): Use ExceptionOr.
-        * Modules/mediastream/RTCIceCandidate.h: Updated for above.
-        * Modules/mediastream/RTCIceCandidate.idl: Use non-legacy exception.
-
-        * Modules/mediastream/RTCOfferAnswerOptions.cpp:
-        (WebCore::RTCOfferOptions::create): Use ExceptionOr.
-        (WebCore::RTCAnswerOptions::create): Ditto.
-        * Modules/mediastream/RTCOfferAnswerOptions.h: Updated for above.
-        Also removed all virtual functions since nothing here is polymorphic
-        and initalized data members in the header.
-
-        * Modules/mediastream/RTCPeerConnection.cpp:
-        (WebCore::RTCPeerConnection::initializeWith): Use ExceptionOr.
-        (WebCore::RTCPeerConnection::addTrack): Ditto.
-        (WebCore::RTCPeerConnection::removeTrack): Ditto.
-        (WebCore::RTCPeerConnection::addTransceiver): Ditto.
-        (WebCore::RTCPeerConnection::completeAddTransceiver): Ditto.
-        (WebCore::RTCPeerConnection::queuedCreateOffer): Ditto.
-        (WebCore::RTCPeerConnection::queuedCreateAnswer): Ditto.
-        (WebCore::RTCPeerConnection::setConfiguration): Ditto.
-        (WebCore::RTCPeerConnection::createDataChannel): Ditto.
-        * Modules/mediastream/RTCPeerConnection.h: Updated for above.
-        * Modules/mediastream/RTCPeerConnection.idl: Use non-legacy exceptions.
-
-        * Modules/mediastream/RTCRtpSender.cpp:
-        (WebCore::RTCRtpSender::replaceTrack): Use ExceptionOr.
-        * Modules/mediastream/RTCRtpSender.h: Updated for above.
-        * Modules/mediastream/RTCRtpSender.idl: Use non-legacy exception.
-
-        * Modules/mediastream/RTCSessionDescription.cpp:
-        (WebCore::RTCSessionDescription::create): Use ExceptoinOr.
-        * Modules/mediastream/RTCSessionDescription.h: Updated for above.
-        (WebCore::RTCSessionDescription::~RTCSessionDescription):
-        * Modules/mediastream/RTCSessionDescription.idl: Use non-legacy exceptions.
-
-        * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
-        (WebCore::verifyCustomHandlerURL): Just return a boolean, no exception.
-        (WebCore::verifyProtocolHandlerScheme): Ditto.
-        (WebCore::NavigatorContentUtils::registerProtocolHandler): Use ExceptionOr.
-        (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered): Ditto.
-        (WebCore::NavigatorContentUtils::unregisterProtocolHandler): Ditto.
-        * Modules/navigatorcontentutils/NavigatorContentUtils.h: Updated for above.
-        * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Use non-legacy exceptions.
-
-        * bindings/js/JSMediaDevicesCustom.cpp:
-        (WebCore::JSMediaDevicesGetUserMediaPromiseFunction): Use propagateException.
-
-        * bindings/scripts/CodeGeneratorJS.pm:
-        (NeedsExplicitPropagateExceptionCall): Added. Helper function to decide whether
-        we need to call propagateException explicitly, if return value processing is not
-        going to propagate the exception for us.
-        (GenerateParametersCheck): Moved the code from GenerateReturnParameters inline
-        because it's almost as short as the function call. Use the newly created
-        NeedsExplicitPropagateExceptionCall function, which properly handles the case
-        where the return value is a promise.
-        (GenerateReturnParameters): Deleted.
-
-        * dom/CharacterData.cpp:
-        (WebCore::CharacterData::substringData): Use ExceptionOr.
-        (WebCore::CharacterData::insertData): Ditto.
-        (WebCore::CharacterData::deleteData): Ditto.
-        (WebCore::CharacterData::replaceData): Ditto.
-        * dom/CharacterData.h: Updated for above.
-        * dom/CharacterData.idl: Use non-legacy exceptions.
-
-        * dom/DataTransferItemList.h: Tried to use ExceptionOr, but this seems
-        like dead code that doesn't compile.
-        * dom/DataTransferItemList.idl: Use non-legacy exceptions.
-
-        * dom/MessagePort.idl: Use non-legacy exceptions, except this has
-        already been converted and was a custom binding.
-
-        * dom/MutationObserver.cpp:
-        (WebCore::MutationObserver::observe): Use ExceptionOr.
-        * dom/MutationObserver.h: Updated for above.
-        * dom/MutationObserver.idl: Use non-legacy exception.
-
-        * dom/Range.cpp:
-        (WebCore::deleteCharacterData): Updated use of calls that now use
-        ExceptionOr.
-        (WebCore::Range::processContentsBetweenOffsets): Ditto.
-        (WebCore::Range::insertNode): Ditto.
-
-        * dom/ShadowRoot.cpp:
-        (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr.
-        * dom/ShadowRoot.h: Updated for above.
-        * dom/ShadowRoot.idl: Use non-legacy exception.
-
-        * dom/Text.cpp:
-        (WebCore::Text::splitText): Use ExceptionOr.
-        (WebCore::Text::replaceWholeText): Removed unused ExceptionCode&amp;.
-        * dom/Text.h: Updated for above.
-        * dom/Text.idl: Use non-legacy exception.
-
-        * editing/ApplyBlockElementCommand.cpp:
-        (WebCore::isNewLineAtPosition): Rewrote to use data rather than
-        substringData; more efficient.
-
-        * editing/DeleteFromTextNodeCommand.cpp:
-        (WebCore::DeleteFromTextNodeCommand::doApply): Updated to work with
-        functions that return ExceptionOr.
-        (WebCore::DeleteFromTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION.
-
-        * editing/InsertIntoTextNodeCommand.cpp:
-        (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
-        Use WTFMove to avoid a little bit of reference count churn.
-        (WebCore::InsertIntoTextNodeCommand::doApply): Removed IGNORE_EXCEPTION.
-        (WebCore::InsertIntoTextNodeCommand::doReapply): Removed ExceptionCode.
-        (WebCore::InsertIntoTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION.
-
-        * editing/SplitTextNodeCommand.cpp:
-        (WebCore::SplitTextNodeCommand::doApply): Updated to work with functions
-        that return ExceptionCode.
-        (WebCore::SplitTextNodeCommand::doUnapply): Removed ASSERT_NO_EXCEPTION.
-        (WebCore::SplitTextNodeCommand::insertText1AndTrimText2): Updated to work
-        with functions that return ExceptionCode.
-
-        * html/HTMLTextFormControlElement.cpp:
-        Added now-needed include of ExceptionCode.h.
-
-        * inspector/DOMEditor.cpp: Removed ExceptionCode out argument from calls
-        to replaceWholeText, which never throws an exception.
-
-2016-10-29  Dean Jackson  &lt;dino@apple.com&gt;
-
-        Parse color() function
-        https://bugs.webkit.org/show_bug.cgi?id=164146
-        &lt;rdar://problems/29007218&gt;
-
-        Reviewed by Darin Adler.
-
-        Support the new CSS color() function:
-        https://drafts.csswg.org/css-color/#color-function
-
-        There are separate code paths for the old and new CSS parser.
-
-        Tests: css3/color/color-function-computed-style.html
-               css3/color/color-function-parsing.html
-
-        * css/CSSComputedStyleDeclaration.cpp: Use Color directly, not via rgb().
-        (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
-        (WebCore::ComputedStyleExtractor::valueForShadow):
-        (WebCore::ComputedStyleExtractor::propertyValue):
-
-        * css/CSSValueKeywords.in: Note that there is a color function, but the
-        keyword is already defined. Also add keywords for the color spaces.
-        * css/SVGCSSValueKeywords.in: sRGB is used outside of SVG now.
-
-        * css/parser/CSSParser.cpp: Old CSS parser code to handle color().
-        (WebCore::isPercent): Helper to tell if a ValueWithCalculation is a percentage or not.
-        (WebCore::CSSParser::parseColorInt): Renamed.
-        (WebCore::CSSParser::parseColorDouble): Helper to get a Number/Percentage into a double
-        (WebCore::CSSParser::parseRGBParameters):
-        (WebCore::CSSParser::parseColorFunctionParameters):
-        (WebCore::CSSParser::parseHSLParameters):
-        (WebCore::CSSParser::parseColorFromValue):
-        (WebCore::CSSParser::colorIntFromValue): Deleted.
-        * css/parser/CSSParser.h:
-
-        * css/parser/CSSPropertyParserHelpers.cpp: New CSS parser code to handle color().
-        (WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):
-        (WebCore::CSSPropertyParserHelpers::parseColorFunction):
-
-        * platform/graphics/Color.h:
-        (WebCore::Color::isValid): An extended color is valid.
-        (WebCore::Color::rgb): Move the code to a standalone inline
-        so that I could add a longer comment.
-
-        * platform/graphics/ExtendedColor.cpp:
-        (WebCore::ExtendedColor::cssText): Alpha output is only needed if != 1.
-
-        * platform/graphics/cg/ColorCG.cpp: Handle ExtendedColor -&gt; CGColor.
-        (WebCore::leakCGColor):
-        (WebCore::cachedCGColor):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Disable -webkit-text-size-adjust when the context says to.
-        https://bugs.webkit.org/show_bug.cgi?id=164191
-
-        Reviewed by Dean Jackson.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Match old parser's image-rendering values
-        https://bugs.webkit.org/show_bug.cgi?id=164190
-
-        Reviewed by Dean Jackson.
-
-        * css/parser/CSSParserFastPaths.cpp:
-        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support -webkit-text value for background-clip and -webkit-background-clip
-        https://bugs.webkit.org/show_bug.cgi?id=164189
-
-        Reviewed by Dean Jackson.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeBackgroundBox):
-        (WebCore::consumePrefixedBackgroundBox):
-
-2016-10-29  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
-
-        Remove some unnecessary includes
-        https://bugs.webkit.org/show_bug.cgi?id=164174
-
-        Reviewed by Darin Adler.
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support -webkit-aspect-ratio
-        https://bugs.webkit.org/show_bug.cgi?id=164187
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeWebkitAspectRatio):
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support the caps lock indicator appearance
-        https://bugs.webkit.org/show_bug.cgi?id=164186
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSParserFastPaths.cpp:
-        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support the alt property
-        https://bugs.webkit.org/show_bug.cgi?id=164184
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeAlt):
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Add support for -webkit-hyphenate-limit-* properties
-        https://bugs.webkit.org/show_bug.cgi?id=164183
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeHyphenateLimit):
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Fix transform-origin and perspective-origin to parse as shorthands
-        https://bugs.webkit.org/show_bug.cgi?id=164178
-
-        Reviewed by Zalan Bujtas.
-
-        * css/CSSPropertyNames.in:
-        Patch the transform-origin-x/y and perspective-origin-x/y properties
-        to use new converters that can handle keywords.
-
-        * css/StyleBuilderConverter.h:
-        (WebCore::StyleBuilderConverter::convertPositionComponentX):
-        (WebCore::StyleBuilderConverter::convertPositionComponentY):
-        Add the new converters. They just call convertPositionComponent method
-        that we already use for object-position and background-position.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::CSSPropertyParser::consumeTransformOrigin):
-        (WebCore::CSSPropertyParser::consumePerspectiveOrigin):
-        Changed to treat the properties as shorthands and add the longhand
-        properties once parsed.
-
-        (WebCore::CSSPropertyParser::parseSingleValue):
-        (WebCore::CSSPropertyParser::parseShorthand):
-        * css/parser/CSSPropertyParser.h:
-        Move the parsing into the shorthand method, since we're still treating
-        these properties as shorthands.
-
-2016-10-29  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support -webkit-background-composite
-        https://bugs.webkit.org/show_bug.cgi?id=164179
-
-        Reviewed by Zalan Bujtas.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeBackgroundComponent):
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
-2016-10-29  Youenn Fablet  &lt;youenn@apple.com&gt;
-
-        REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure
-        https://bugs.webkit.org/show_bug.cgi?id=163922
-
-        Reviewed by Alex Christensen.
-
-        Test: http/tests/security/cached-svg-image-with-css-cross-domain.html
-
-        Raw data was not copied in cloned CachedCSSStyleSheet while it is used by some of its clients.
-        Updated CachedCSSStyleSheet and CachedImage cloning to copy its raw data.
-
-        * loader/cache/CachedCSSStyleSheet.cpp:
-        (WebCore::CachedCSSStyleSheet::setBodyDataFrom):
-        * loader/cache/CachedImage.cpp:
-        (WebCore::CachedImage::setBodyDataFrom):
-        * loader/cache/CachedResource.h:
-        (WebCore::CachedResource::mayTryReplaceEncodedData):
-
-2016-10-29  Youenn Fablet  &lt;youenn@apple.com&gt;
-
-        REGRESSION (Safari 10 / r189445): WKWebView and WebView no longer allow async XMLHttpRequest timeout to exceed 60 seconds
-        https://bugs.webkit.org/show_bug.cgi?id=163814
-        &lt;rdar://problem/28917420&gt;
-
-        Reviewed by Darin Adler.
-
-        Tests: http/tests/xmlhttprequest/resetting-timeout-to-zero.html
-               http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html
-
-        * xml/XMLHttpRequest.cpp:
-        (WebCore::XMLHttpRequest::setTimeout): If the XHR timeout is active, resetting the timeout to zero should lead to using the default network timeout.
-        Since it is difficult to update the timeout once the request is sent, we mimic the default network timeout with a 60 seconds XHR timeout.
-        (WebCore::XMLHttpRequest::createRequest): Setting network timeout to infinity if the XHR timeout is active.
-
-2016-10-29  Youenn Fablet  &lt;youenn@apple.com&gt;
-
-        MediaEndpoint::generateDtlsInfo is not needed
-        https://bugs.webkit.org/show_bug.cgi?id=164130
-
-        Reviewed by Eric Carlson.
-
-        No change of behavior.
-
-        Removing MediaEndpoint::generateDtlsInfo as it can be called directly from createMediaEndpointOwr.
-
-        * Modules/mediastream/MediaEndpointPeerConnection.cpp:
-        (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
-        * platform/mediastream/MediaEndpoint.cpp:
-        * platform/mediastream/MediaEndpoint.h:
-        * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
-        (WebCore::createMediaEndpointOwr):
-        * platform/mediastream/openwebrtc/MediaEndpointOwr.h:
-        * platform/mock/MockMediaEndpoint.cpp:
-        (WebCore::MockMediaEndpoint::MockMediaEndpoint):
-        (WebCore::MockMediaEndpoint::generateDtlsInfo): Deleted.
-        * platform/mock/MockMediaEndpoint.h:
-
-2016-10-28  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
-
-        Unreviewed, add Input Events to the features list.
-
-        * features.json:
-
-2016-10-28  Darin Adler  &lt;darin@apple.com&gt;
-
-        Fix mismerge that broke a CEReactions test.
-
-        * html/HTMLOptionsCollection.idl: Add back CEReactions to the remove function.
-
-2016-10-28  Darin Adler  &lt;darin@apple.com&gt;
-
-        Move all classes in the HTML directory from ExceptionCode to Exception
-        https://bugs.webkit.org/show_bug.cgi?id=163876
-
-        Reviewed by Sam Weinig.
-
-        * bindings/js/JSDOMBinding.cpp:
-        (WebCore::shouldAllowAccessToNode): Deleted.
-        (WebCore::BindingSecurity::shouldAllowAccessToFrame): Moved function into the
-        BindingSecurity namespace. Also changed arguments to references.
-        (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow): Ditto.
-        (WebCore::BindingSecurity::shouldAllowAccessToNode): Changed argument type
-        from pointer to reference.
-
-        * bindings/js/JSDOMBinding.h: Removed top level shouldAllowAccessTo functions,
-        moving all of them into the BindingSecurity namespace. Changed BindingSecurity
-        from a class into a namespace. Added new checkSecurityForNode functions that
-        can be used directly to implement CheckSecurityForNode; they turn the node
-        into a null, which is no change in behavior from what bindings already did.
-
-        * bindings/js/JSDOMWindowCustom.cpp:
-        (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Changed argument
-        type for passed-in string to const String&amp; instead of String&amp;.
-        (WebCore::JSDOMWindow::getOwnPropertySlot): Updated for BindingSecurity changes.
-        (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto.
-        (WebCore::JSDOMWindow::put): Ditto.
-
-        * bindings/js/JSHTMLCanvasElementCustom.cpp:
-        (WebCore::attributesFor3DContext): Renamed from get3DContextAttributes and
-        changed to use a return value instead of an out argument.
-        (WebCore::JSHTMLCanvasElement::getContext): Updated for the above.
-        (WebCore::JSHTMLCanvasElement::toDataURL): Rewrote to handle ExceptionOr
-        and also to use Optional&lt;double&gt; instead of const double*.
-
-        * bindings/js/JSHTMLFrameElementCustom.cpp:
-        (WebCore::JSHTMLFrameElement::setLocation): Moved the logic from
-        allowSettingJavascriptURL in here and updated for BindingSecurity changes.
-
-        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
-        (WebCore::JSHTMLOptionsCollection::setLength): Use propagateException.
-        Also streamlined the code a bit.
-        (WebCore::JSHTMLOptionsCollection::indexSetter): Updated for new name and
-        argument types for selectElementIndexSetter.
-
-        * bindings/js/JSHTMLSelectElementCustom.cpp:
-        (WebCore::selectElementIndexSetter): Updated name and argument types and
-        to use propagateException.
-        (WebCore::JSHTMLSelectElement::indexSetter): Updated for above.
-        * bindings/js/JSHTMLSelectElementCustom.h: Ditto.
-
-        * bindings/js/JSLocationCustom.cpp:
-        (WebCore::JSLocation::getOwnPropertySlotDelegate): Updated for changes to
-        BindingSecurity.
-        (WebCore::JSLocation::putDelegate): Ditto. Also rearranged logic a bit.
-
-        * bindings/js/ScriptController.cpp:
-        (WebCore::ScriptController::canAccessFromCurrentOrigin): Updated for
-        changes to BindingSecurity.
-
-        * bindings/scripts/CodeGeneratorJS.pm:
-        (GenerateImplementation): Removed old support for CheckSecurityForNode.
-        (NativeToJSValue): Added new support for CheckSecurityForNode, which uses
-        the new checkSecurityForNode function, and works properly with ExceptionOr.
-
-        * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change below.
-
-        * dom/ChildNode.idl: Move the remove function to non-legacy exception.
-        Needed now because this needs to match the one in HTMLSelectElement.
-
-        * dom/Element.cpp:
-        (WebCore::Element::dispatchMouseForceWillBegin): Refactored a little bit.
-        (WebCore::Element::mergeWithNextTextNode): Support ExceptionOr for remove.
-        (WebCore::Element::setOuterHTML): Support ExceptionOr for
-        createFragmentForInnerOuterHTML.
-        (WebCore::Element::setInnerHTML): Ditto.
-        (WebCore::Element::insertAdjacentHTML): Ditto.
-
-        * dom/Node.cpp:
-        (WebCore::Node::remove): Use ExceptionOr.
-        (WebCore::Node::normalize): Remove use of IGNORE_EXCEPTION.
-        * dom/Node.h: Use ExceptionOr for remove.
-
-        * dom/Range.cpp:
-        (WebCore::Range::insertNode): Updated for change to remove.
-        (WebCore::Range::createContextualFragment): Updated for change
-        to WebCore::createContextualFragment.
-
-        * dom/ShadowRoot.cpp:
-        (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr for
-        createFragmentForInnerOuterHTML and replaceChildrenWithFragment.
-
-        * editing/AppendNodeCommand.cpp:
-        (WebCore::AppendNodeCommand::doUnapply): Remove IGNORE_EXCEPTION.
-        * editing/InsertNodeBeforeCommand.cpp:
-        (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
-        * editing/MergeIdenticalElementsCommand.cpp:
-        (WebCore::MergeIdenticalElementsCommand::doApply): Ditto.
-        * editing/RemoveNodeCommand.cpp:
-        (WebCore::RemoveNodeCommand::doApply): Ditto.
-        * editing/SplitElementCommand.cpp:
-        (WebCore::SplitElementCommand::doUnapply): Ditto.
-        * editing/SplitTextNodeCommand.cpp:
-        (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
-        * editing/WrapContentsInDummySpanCommand.cpp:
-        (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
-
-        * editing/Editor.cpp:
-        (WebCore::Editor::insertDictationPhrases): Deleted. Moved this
-        iOS-specific function to EditorIOS.mm.
-        (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto.
-        (WebCore::Editor::confirmMarkedText): Ditto.
-        (WebCore::Editor::setTextAsChildOfElement): Ditto.
-        (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto.
-
-        * editing/ios/EditorIOS.mm:
-        (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION.
-        (WebCore::Editor::fontAttributesForSelectionStart): Ditto.
-        (WebCore::Editor::insertDictationPhrases): Moved here from Editor.cpp.
-        (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. Also
-        updated code that used remove to not pass an ExceptionCode.
-        (WebCore::Editor::confirmMarkedText): Ditto.
-        (WebCore::Editor::setTextAsChildOfElement): Ditto.
-        (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto.
-
-        * editing/mac/EditorMac.mm:
-        (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION.
-        (WebCore::Editor::fontAttributesForSelectionStart): Ditto.
-
-        * editing/markup.cpp:
-        (WebCore::createFragmentForInnerOuterHTML): Use ExceptionOr.
-        (WebCore::createContextualFragment): Ditto.
-        (WebCore::replaceChildrenWithFragment): Ditto.
-        (WebCore::replaceChildrenWithText): Ditto.
-        * editing/markup.h: Updated for above changes.
-
-        * html/BaseChooserOnlyDateAndTimeInputType.cpp:
-        (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
-        Removed ASSERT_NO_EXCEPTION.
-
-        * html/BaseDateAndTimeInputType.cpp:
-        (WebCore::BaseDateAndTimeInputType::setValueAsDate): Use ExceptionOr.
-        (WebCore::BaseDateAndTimeInputType::setValueAsDecimal): Ditto.
-        * html/BaseDateAndTimeInputType.h: Updated for above changes.
-
-        * html/DateTimeLocalInputType.cpp:
-        (WebCore::DateTimeLocalInputType::setValueAsDate): Use ExceptionOr.
-        * html/DateTimeLocalInputType.h: Updated for above changes.
-
-        * html/DOMTokenList.cpp:
-        (WebCore::DOMTokenList::validateToken): Use ExceptionOr.
-        (WebCore::DOMTokenList::validateTokens): Ditto.
-        (WebCore::DOMTokenList::addInternal): Ditto.
-        (WebCore::DOMTokenList::add): Ditto.
-        (WebCore::DOMTokenList::removeInternal): Ditto.
-        (WebCore::DOMTokenList::remove): Ditto.
-        (WebCore::DOMTokenList::toggle): Ditto.
-        (WebCore::DOMTokenList::replace): Ditto.
-        (WebCore::DOMTokenList::supports): Ditto.
-        * html/DOMTokenList.h: Updated for above changes.
-        * html/DOMTokenList.idl: Use non-legacy exceptions.
-
-        * html/DOMURL.cpp:
-        (WebCore::DOMURL::DOMURL): Just take the two URL objects and let
-        the create functions do all the processing.
-        (WebCore::DOMURL::create): Use ExceptionOr, and move the processing
-        of the URLs here out of the constructors.
-        (WebCore::DOMURL::setHref): Use ExceptionOr.
-        * html/DOMURL.h: Updated for above changes.
-        * html/DOMURL.idl: Use non-legacy exceptions.
-
-        * html/FTPDirectoryDocument.cpp:
-        (WebCore::FTPDirectoryDocumentParser::appendEntry): Remove
-        IGNORE_EXCEPTION and use releaseReturnValue().
-
-        * html/HTMLCanvasElement.cpp:
-        (WebCore::HTMLCanvasElement::toDataURL): Use ExceptionOr.
-        * html/HTMLCanvasElement.h: Updated for above changes.
-        * html/HTMLCanvasElement.idl: Use non-legacy exception.
-
-        * html/HTMLElement.cpp:
-        (WebCore::HTMLElement::textToFragment): Use ExceptionOr.
-        (WebCore::HTMLElement::setInnerText): Ditto.
-        (WebCore::HTMLElement::setOuterText): Ditto.
-        (WebCore::HTMLElement::setContentEditable): Ditto.
-        (WebCore::HTMLElement::translateAttributeMode): Deleted.
-        (WebCore::HTMLElement::translate): Moved the logic from the
-        translateAttributeMode function in here.
-        * html/HTMLElement.h: Updated for above changes.
-        * html/HTMLElement.idl: Use non-legacy exceptions.
-
-        * html/HTMLEmbedElement.idl: Use non-legacy exception.
-        * html/HTMLFrameElement.idl: Ditto.
-
-        * html/HTMLFrameOwnerElement.cpp:
-        (WebCore::HTMLFrameOwnerElement::getSVGDocument): Use ExceptionOr.
-        * html/HTMLFrameOwnerElement.h: Updated for above.
-
-        * html/HTMLIFrameElement.idl: Use non-legacy exception.
-
-        * html/HTMLInputElement.cpp:
-        (WebCore::HTMLInputElement::stepUp): Use ExceptionOr.
-        (WebCore::HTMLInputElement::stepDown): Ditto.
-        (WebCore::HTMLInputElement::setValue): Ditto.
-        (WebCore::HTMLInputElement::setValueAsDate): Ditto.
-        (WebCore::HTMLInputElement::setValueAsNumber): Ditto.
-        (WebCore::HTMLInputElement::setSize): Ditto.
-        (WebCore::HTMLInputElement::maxLengthAttributeChanged): Use the
-        new internalSetMaxLength function; old code relied on a setMaxLength
-        that was different from the one exposed to bindings.
-        (WebCore::HTMLInputElement::minLengthAttributeChanged): Ditto.
-        (WebCore::HTMLInputElement::setRangeText): Use ExceptionOr.
-        * html/HTMLInputElement.h: Updated for above changes. Also use
-        data member initialization for InputElementClickState instead of
-        a constructor.
-        * html/HTMLInputElement.idl: Use non-legacy exception.
-
-        * html/HTMLMarqueeElement.cpp:
-        (WebCore::HTMLMarqueeElement::setLoop): Use ExceptionOr.
-        (WebCore::HTMLMarqueeElement::renderMarquee): Tweaked.
-        * html/HTMLMarqueeElement.h: Updated for above changes.
-        * html/HTMLMarqueeElement.idl: Ditto.
-
-        * html/HTMLMediaElement.cpp:
-        (WebCore::HTMLMediaElement::TrackGroup::TrackGroup):
-        Initialize most data members in class definition rather than
-        the constructor.
-        (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
-        (WebCore::HTMLMediaElement::~HTMLMediaElement): Updated since
-        removeMediaElement now takes a reference.
-        (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Use
-        a modern for loop to streamline code.
-        (WebCore::HTMLMediaElement::textTrackModeChanged): Updated since
-        track now returns a reference.
-        (WebCore::HTMLMediaElement::setCurrentTimeForBindings): Renamed
-        to prevent ambiguity with the other version that has slightly
-        different semantics and overloading and changed to use ExceptionOr.
-        (WebCore::HTMLMediaElement::playInternal): Updated to use reference.
-        (WebCore::HTMLMediaElement::setVolume): Use ExceptionOr.
-        (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Take a
-        reference instead of a PassRefPtr.
-        (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto.
-        (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Ditto.
-        (WebCore::HTMLMediaElement::mediaPlayerDidRemoveAudioTrack): Ditto.
-        (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Ditto.
-        (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack): Ditto.
-        (WebCore::HTMLMediaElement::addTextTrack): Use ExceptionOr.
-        (WebCore::HTMLMediaElement::didAddTextTrack): Use a reference.
-        (WebCore::HTMLMediaElement::didRemoveTextTrack): Ditto.
-        (WebCore::HTMLMediaElement::maxBufferedTime): Update to use different
-        interface to time ranges that does not need to deal with exceptions.
-        (WebCore::HTMLMediaElement::setController): Pass references.
-        (WebCore::HTMLMediaElement::outOfBandTrackSources): Use reference.
-        * html/HTMLMediaElement.h: Updated for above.
-        * html/HTMLMediaElement.idl: Use non-legacy exceptions.
-
-        * html/HTMLObjectElement.idl: Use non-legacy exception.
-
-        * html/HTMLOptionElement.cpp:
-        (WebCore::HTMLOptionElement::createForJSConstructor): Use ExceptionOr.
-        * html/HTMLOptionElement.h: Updated for above change.
-        * html/HTMLOptionElement.idl: Use non-legacy exception.
-
-        * html/HTMLOptionsCollection.cpp:
-        (WebCore::HTMLOptionsCollection::setLength): Use ExceptionOr.
-        * html/HTMLOptionsCollection.h: Updated for above change.
-        * html/HTMLOptionsCollection.idl: Use non-legacy exception.
-
-        * html/HTMLProgressElement.cpp:
-        (WebCore::HTMLProgressElement::setValue): Removed non-finite handling
-        because that is now handled by the bindings.
-        (WebCore::HTMLProgressElement::setMax): Ditto.
-        * html/HTMLProgressElement.h: Updated for above.
-        * html/HTMLProgressElement.idl: Changed attributes to be double instead
-        of unrestricted double, and this was able to remove exceptions.
-
-        * html/HTMLSelectElement.cpp:
-        (WebCore::HTMLSelectElement::removeByIndex): Drop IGNORE_EXCEPTION.
-        (WebCore::HTMLSelectElement::remove): Use ExceptionOr.
-        (WebCore::HTMLSelectElement::setOption): Ditto.
-        (WebCore::HTMLSelectElement::setLength): Ditto.
-        * html/HTMLSelectElement.h: Updated for above changes.
-        * html/HTMLSelectElement.idl: Use non-legacy exceptions.
-
-        * html/HTMLTableElement.cpp:
-        (WebCore::HTMLTableElement::setCaption): Use ExceptionOr.
-        (WebCore::HTMLTableElement::setTHead): Ditto.
-        (WebCore::HTMLTableElement::setTFoot): Ditto.
-        (WebCore::HTMLTableElement::createTHead): Streamline a bit.
-        (WebCore::HTMLTableElement::deleteTHead): Ditto.
-        (WebCore::HTMLTableElement::createTFoot): Ditto.
-        (WebCore::HTMLTableElement::deleteTFoot): Ditto.
-        (WebCore::HTMLTableElement::createTBody): Ditto.
-        (WebCore::HTMLTableElement::createCaption): Ditto.
-        (WebCore::HTMLTableElement::insertRow): Use ExceptionOr.
-        (WebCore::HTMLTableElement::deleteRow): Ditto.
-        * html/HTMLTableElement.h: Updated for above changes.
-        * html/HTMLTableElement.idl: Use non-legacy exceptions.
-
-        * html/HTMLTableRowElement.cpp:
-        (WebCore::findTable): Added.
-        (WebCore::HTMLTableRowElement::rowIndex): Streamline a bit using the
-        findTable function above.
-        (WebCore::findRows): Added.
-        (WebCore::HTMLTableRowElement::sectionRowIndex): Streamline a bit using
-        the findRows function above.
-        (WebCore::HTMLTableRowElement::insertCell): Use ExceptionOr.
-        (WebCore::HTMLTableRowElement::deleteCell): Ditto.
-        (WebCore::HTMLTableRowElement::setCells): Deleted.
-        * html/HTMLTableRowElement.h: Updated for the above. The setCells function
-        was dead code.
-        * html/HTMLTableRowElement.idl: Use non-legacy exceptions.
-
-        * html/HTMLTableSectionElement.cpp:
-        (WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle):
-        Tweaked a bit to use early return.
-        (WebCore::HTMLTableSectionElement::insertRow): Use ExceptionOr.
-        (WebCore::HTMLTableSectionElement::deleteRow): Ditto.
-        (WebCore::HTMLTableSectionElement::numRows): Use childrenOfType.
-        (WebCore::HTMLTableSectionElement::align): Deleted.
-        (WebCore::HTMLTableSectionElement::setAlign): Deleted.
-        (WebCore::HTMLTableSectionElement::ch): Deleted.
-        (WebCore::HTMLTableSectionElement::setCh): Deleted.
-        (WebCore::HTMLTableSectionElement::chOff): Deleted.
-        (WebCore::HTMLTableSectionElement::setChOff): Deleted.
-        (WebCore::HTMLTableSectionElement::vAlign): Deleted.
-        (WebCore::HTMLTableSectionElement::setVAlign): Deleted.
-        * html/HTMLTableSectionElement.h: Updated for the above.
-        * html/HTMLTableSectionElement.idl: Use non-legacy exception.
-
-        * html/HTMLTextAreaElement.cpp:
-        (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged): Use the new
-        internalSetMaxLength function; old code relied on a setMaxLength
-        that was different from the one exposed to bindings.
-        (WebCore::HTMLTextAreaElement::minLengthAttributeChanged): Ditto.
-        (WebCore::HTMLTextAreaElement::updatePlaceholderText): Removed
-        ASSERT_NO_EXCEPTION.
-        * html/HTMLTextAreaElement.idl: Use non-legacy exceptions.
-
-        * html/HTMLTextFormControlElement.cpp:
-        (WebCore::HTMLTextFormControlElement::setRangeText): Use ExceptionOr.
-        (WebCore::HTMLTextFormControlElement::setInnerTextValue): Ditto.
-        (WebCore::HTMLTextFormControlElement::setMaxLength): Ditto.
-        (WebCore::HTMLTextFormControlElement::setMinLength): Ditto.
-        * html/HTMLTextFormControlElement.h: Updated for above changes.
-        Also renamed the setMin/MaxLength function overloads for internal use
-        to internSetMin/MaxLength and made them protected.
-
-        * html/HTMLTrackElement.cpp:
-        (WebCore::HTMLTrackElement::~HTMLTrackElement): Call clearElement on the
-        track to break the connection. Before this was done as a side effect of
-        clearClient, but that is called in other cases where we do not want to
-        clear the link back to the track element.
-        (WebCore::HTMLTrackElement::insertedInto): Removed code that uses the
-        track function for its side effect of creating a track; no longer needed.
-        Rewrote this so it's more symmetric with removedFrom.
-        (WebCore::HTMLTrackElement::removedFrom): Pass reference. Also reordered
-        and removed an unnecessary check for null parent.
-        (WebCore::HTMLTrackElement::parseAttribute): Use track.
-        (WebCore::HTMLTrackElement::kind): Ditto.
-        (WebCore::HTMLTrackElement::track): Renamed ensureTrack to this. Also
-        removed the redundant code to call setTrackElement; we no longer change
-        the track element on a track until the track element is destroyed.
-        (WebCore::HTMLTrackElement::scheduleLoad): Use track.
-        (WebCore::HTMLTrackElement::loadTimerFired): Ditto.
-        (WebCore::HTMLTrackElement::setReadyState): Ditto.
-        (WebCore::HTMLTrackElement::readyState): Ditto.
-        (WebCore::HTMLTrackElement::mediaElement): Rearranged to use early return.
-        * html/HTMLTrackElement.h: Updated for above changes.
-
-        * html/HTMLVideoElement.cpp:
-        (WebCore::HTMLVideoElement::webkitEnterFullscreen): Use ExceptionOr.
-        * html/HTMLVideoElement.h: Removed the functions used just for
-        capitalization reasons; that's now handled in the bindings.
-        * html/HTMLVideoElement.idl: Use non-legacy bindings and ImplementedAs.
-
-        * html/ImageData.cpp:
-        (WebCore::ImageData::create): Return ExceptionOr.
-        * html/ImageData.h: Updated for above changes.
-        * html/ImageData.idl: Use non-legacy exceptions.
-
-        * html/InputType.cpp:
-        (WebCore::InputType::setValueAsDate): Use ExceptionOr.
-        (WebCore::InputType::setValueAsDouble): Ditto.
-        (WebCore::InputType::setValueAsDecimal): Ditto.
-        (WebCore::InputType::applyStep): Ditto.
-        (WebCore::InputType::stepUp): Ditto.
-        (WebCore::InputType::stepUpFromRenderer): Removed IGNORE_EXCEPTION.
-        * html/InputType.h: Updated for the above.
-
-        * html/MediaController.cpp:
-        (MediaController::addMediaElement): Take a reference instead of a pointer.
-        (MediaController::removeMediaElement): Ditto.
-        (MediaController::containsMediaElement): Ditto.
-        (MediaController::setVolume): Use ExceptionOr.
-        (MediaController::bringElementUpToSpeed): Take a reference.
-        * html/MediaController.h: Updated for above changes. Also made lots of
-        function overrides private.
-        * html/MediaController.idl: Use non-legacy exception.
-
-        * html/MediaControllerInterface.h: Use ExceptionOr for setVolume.
-
-        * html/NumberInputType.cpp:
-        (WebCore::RealNumberRenderSize::max): Use aggregate initialization instead
-        of a constructor.
-        (WebCore::calculateRenderSize): Ditto.
-        (WebCore::NumberInputType::setValueAsDouble): Use ExceptionOr.
-        (WebCore::NumberInputType::setValueAsDecimal): Ditto.
-        * html/NumberInputType.h: Updated for above changes.
-
-        * html/RangeInputType.cpp:
-        (WebCore::RangeInputType::RangeInputType): Initialize scalar data member
-        in class definition instead of here.
-        (WebCore::RangeInputType::setValueAsDecimal): Use ExceptionOr.
-        (WebCore::RangeInputType::handleKeydownEvent): Removed IGNORE_EXCEPTION.
-        * html/RangeInputType.h: Updated for above changes.
-
-        * html/TextFieldInputType.cpp:
-        (WebCore::TextFieldInputType::updatePlaceholderText): Removed
-        ASSERT_NO_EXCEPTION.
-
-        * html/TimeRanges.cpp:
-        (WebCore::TimeRanges::start): Use ExceptionOr.
-        (WebCore::TimeRanges::end): Ditto.
-        * html/TimeRanges.h: Updated for the above.
-        * html/TimeRanges.idl: Use non-legacy exceptions.
-
-        * html/URLUtils.idl: Use non-legacy exception.
-
-        * html/ValidationMessage.cpp:
-        (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Removed
-        ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, and other exception-ignoring idioms.
-        * html/parser/HTMLTreeBuilder.cpp:
-        (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto.
-        * html/shadow/MediaControlElementTypes.cpp:
-        (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto.
-        * html/shadow/MediaControlElements.cpp:
-        (WebCore::MediaControlPanelElement::setPosition): Ditto.
-        (WebCore::MediaControlPanelElement::resetPosition): Ditto.
-        (WebCore::MediaControlStatusDisplayElement::update): Ditto.
-        (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Ditto.
-        (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto.
-        (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto.
-        * html/shadow/MediaControls.cpp:
-        (WebCore::MediaControls::updateCurrentTimeDisplay): Ditto.
-        * html/shadow/MediaControlsApple.cpp:
-        (WebCore::MediaControlsApple::updateCurrentTimeDisplay): Ditto.
-
-
-        * html/track/LoadableTextTrack.cpp:
-        (WebCore::LoadableTextTrack::LoadableTextTrack): Take reference.
-        (WebCore::LoadableTextTrack::~LoadableTextTrack): Deleted.
-        (WebCore::LoadableTextTrack::clearClient): Deleted override. We no longer
-        want to clear m_trackElement when clearing the client.
-        (WebCore::LoadableTextTrack::setTrackElement): Deleted.
-        (WebCore::LoadableTextTrack::id): Changed to use
-        attributeWithoutSynchronization for better performance and idAttr instead
-        of a string constant.
-        * html/track/LoadableTextTrack.h: Updated for above changes. Added a new
-        clearElement function. Made the element and isDefault functions private.
-
-        * html/track/VTTCue.cpp:
-        (WebCore::VTTCue::~VTTCue): Removed ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION,
-        and other exception-ignoring idioms.
-        (WebCore::VTTCue::removeDisplayTree): Ditto.
-        * html/track/VTTRegion.cpp:
-        (WebCore::VTTRegion::displayLastTextTrackCueBox): Ditto.
-        (WebCore::VTTRegion::willRemoveTextTrackCueBox): Ditto.
-
-        * inspector/InspectorDOMAgent.cpp:
-        (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend):
-        Rewrote to avoid multiplehash table lookups and added a FIXME about
-        the peculiar code here.
-        (WebCore::InspectorDOMAgent::resolveNode): Streamlined.
-        (WebCore::InspectorDOMAgent::nodeAsScriptValue): Use the new
-        checkSecurityForNode instead of the old shouldAllowAccessToNode.
-
-        * platform/graphics/ImageBuffer.h: Take Optional&lt;double&gt; instead of
-        const double* in toDataURL. Renamed ImageDataToDataURL to just dataURL.
-
-        * platform/graphics/MediaPlayer.cpp:
-        (WebCore::MediaPlayer::addAudioTrack): Take a reference instead of PassRefPtr.
-        (WebCore::MediaPlayer::removeAudioTrack): Ditto.
-        (WebCore::MediaPlayer::addTextTrack): Ditto.
-        (WebCore::MediaPlayer::removeTextTrack): Ditto.
-        (WebCore::MediaPlayer::addVideoTrack): Ditto.
-        (WebCore::MediaPlayer::removeVideoTrack): Ditto.
-        * platform/graphics/MediaPlayer.h: Updated for the above.
-
-        * platform/graphics/PlatformTimeRanges.h: Exported a couple of functions
-        that are now used in WebKit.
-
-        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
-        (WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Use a modern for loop.
-        (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
-        Fixed a bug that would cause this function to fail to process half the tracks.
-        Also updated for the change from PassRefPtr to references.
-
-        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
-        (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass references.
-        (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): Ditto.
-        (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): Ditto.
-        (WebCore::assetMetadataKeyNames): Tweaked formatting.
-        (WebCore::itemKVOProperties): Ditto.
-        (WebCore::playerKVOProperties): Ditto.
-
-        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
-        (WebCore::updateTracksOfType): Pass references.
-
-        * platform/graphics/cairo/ImageBufferCairo.cpp:
-        (WebCore::ImageBuffer::toDataURL): Use Optional&lt;double&gt;
-
-        * platform/graphics/cg/ImageBufferCG.cpp:
-        (WebCore::createBitmapImageAfterScalingIfNeeded): Use auto.
-        (WebCore::encodeImage): Ditto. Also renamed from CGImageEncodeToData.
-        (WebCore::dataURL): Ditto. Also renamed from CGImageToDataURL and from
-        ImageDataToDataURL.
-        (WebCore::ImageBuffer::toDataURL): Ditto.
-
-        * platform/graphics/efl/ImageBufferEfl.cpp:
-        (WebCore::encodeImageJPEG): Use Optional&lt;double&gt;
-        (WebCore::ImageBuffer::toDataURL): Ditto.
-
-        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
-        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Pass
-        a reference instead of pointer.
-        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto.
-        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Ditto.
-        (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Ditto.
-        (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Ditto.
-
-        * platform/graphics/gtk/ImageBufferGtk.cpp:
-        (WebCore::encodeImage): Use Optional&lt;double&gt;
-        (WebCore::ImageBuffer::toDataURL): Ditto.
-
-        * platform/graphics/win/ImageBufferDirect2D.cpp:
-        (WebCore::ImageBuffer::toDataURL): Use Optional&lt;double&gt;
-
-        * platform/image-encoders/JPEGImageEncoder.cpp:
-        (WebCore::compressRGBABigEndianToJPEG): Use Optional&lt;double&gt;
-        * platform/image-encoders/JPEGImageEncoder.h: Ditto.
-
-        * platform/ios/WebPlaybackSessionInterfaceAVKit.mm:
-        (WebCore::WebPlaybackSessionInterfaceAVKit::seekableRangesChanged):
-        Updated for change to TimeRanges.
-
-        * platform/mac/WebVideoFullscreenHUDWindowController.mm:
-        (-[WebVideoFullscreenHUDWindowController setVolume:]): Removed IGNORE_EXCEPTION.
-        * xml/parser/XMLDocumentParserLibxml2.cpp:
-        (WebCore::XMLDocumentParser::endElementNs): Ditto.
-
-        * rendering/RenderThemeGtk.cpp:
-        (WebCore::RenderThemeGtk::paintMediaSliderTrack): Updated for changes to
-        the TimeRanges class.
-
-2016-10-28  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Allow @font-face src descriptor's format function to contain identifiers
-        https://bugs.webkit.org/show_bug.cgi?id=164169
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeFontFaceSrcURI):
-
-2016-10-28  Jer Noble  &lt;jer.noble@apple.com&gt;
-
-        WebAudio does not resume when moving from background to foreground tab.
-        https://bugs.webkit.org/show_bug.cgi?id=164043
-
-        Reviewed by Darin Adler.
-
-        Test: webaudio/page-canstartmedia.html
-
-        * Modules/webaudio/AudioContext.cpp:
-        (WebCore::AudioContext::mediaCanStart):
-
-2016-10-28  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
-
-        iOS autocorrection does not trigger an input event of inputType &quot;insertReplacementText&quot;
-        https://bugs.webkit.org/show_bug.cgi?id=164077
-        &lt;rdar://problem/28987810&gt;
-
-        Reviewed by Simon Fraser.
-
-        Fixes candidate insertion on iOS, so that it fires input events of type &quot;insertReplacementText&quot; and adds two
-        iOS unit tests covering this change as well as the test infrastructure needed to support these tests. See
-        comments below for more details.
-
-        Tests: fast/events/ios/before-input-events-prevent-candidate-insertion.html
-               fast/events/ios/input-events-insert-replacement-text.html
-
-        * dom/TextEvent.h:
-
-        Adds isAutocompletion() to TextEvent, as well as the TextEventInputAutocompletion text input type. When the
-        Editor handles this TextEvent, it will use this information when creating or modifying the corresponding typing
-        command.
-
-        * dom/TextEventInputType.h:
-        * editing/Editor.cpp:
-        (WebCore::Editor::insertText):
-        (WebCore::Editor::insertTextWithoutSendingTextEvent):
-        * editing/Editor.h:
-        * editing/TypingCommand.cpp:
-        (WebCore::editActionForTypingCommand):
-
-        Now takes whether the command is autocorrection into account. If so, the corresponding edit action should be
-        EditActionInsertReplacement rather than EditActionTypingInsertText.
-
-        (WebCore::TypingCommand::TypingCommand):
-        (WebCore::TypingCommand::deleteSelection):
-        (WebCore::TypingCommand::deleteKeyPressed):
-        (WebCore::TypingCommand::forwardDeleteKeyPressed):
-        (WebCore::TypingCommand::insertText):
-        (WebCore::TypingCommand::insertLineBreak):
-        (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
-        (WebCore::TypingCommand::insertParagraphSeparator):
-        (WebCore::TypingCommand::inputEventData):
-        (WebCore::TypingCommand::willAddTypingToOpenCommand):
-        * editing/TypingCommand.h:
-
-        Adds a new TypingCommand option, IsAutocompletion.
-
-2016-10-28  Commit Queue  &lt;commit-queue@webkit.org&gt;
-
-        Unreviewed, rolling out r207700.
-        https://bugs.webkit.org/show_bug.cgi?id=164168
-
-        We are ready after r208086 (Requested by alexchristensen on
-        #webkit).
-
-        Reverted changeset:
-
-        &quot;Unreviewed, rolling out r207582.&quot;
-        https://bugs.webkit.org/show_bug.cgi?id=163819
-        http://trac.webkit.org/changeset/207700
-
-2016-10-28  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Allow unknown properties in will-change
-        https://bugs.webkit.org/show_bug.cgi?id=164165
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeWillChange):
-
-2016-10-28  Alex Christensen  &lt;achristensen@webkit.org&gt;
-
-        Partially revert 207805 after resolution in URL spec issue 87
-        https://bugs.webkit.org/show_bug.cgi?id=164142
-
-        Reviewed by Andy Estes.
-
-        Covered by updated layout tests and API tests.
-
-        * platform/URLParser.cpp:
-        (WebCore::URLParser::isSingleDotPathSegment):
-        (WebCore::URLParser::isDoubleDotPathSegment):
-        (WebCore::URLParser::consumeSingleDotPathSegment):
-        (WebCore::URLParser::consumeDoubleDotPathSegment):
-        Treat %2e%2e as .. and %2e as . but only if it is entirety of the path segment.
-        There are tests for URLs like http://host/abc%2edef which have not changed because
-        the %2e is not the entirety of the path segment.
-
-2016-10-28  Alex Christensen  &lt;achristensen@webkit.org&gt;
-
-        URLParser should not try to interpret host of URLs with unrecognized schemes as IPv4 address
-        https://bugs.webkit.org/show_bug.cgi?id=164154
-
-        Reviewed by Andy Estes.
-
-        This is needed to match behavior of all browsers.
-        This is being discussed in the spec at https://github.com/whatwg/url/issues/148
-
-        Covered by new API tests.
-
-        * platform/URLParser.cpp:
-        (WebCore::URLParser::parseHostAndPort):
-        Only try to parse and canonicalize the host as an IPv4 address if the scheme is special (http, wss, etc.)
-
-2016-10-28  Chris Dumez  &lt;cdumez@apple.com&gt;
-
-        DOMStringMap reports properties as non-enumerable
-        https://bugs.webkit.org/show_bug.cgi?id=164114
-
-        Reviewed by Sam Weinig.
-
-        DOMStringMap's named properties should be configurable, enumerable
-        and writable as per:
-        - https://heycam.github.io/webidl/#getownproperty-guts (2.7-9)
-        - https://html.spec.whatwg.org/multipage/dom.html#domstringmap
-
-        Firefox and Chrome agree with the specification. However, WebKit
-        was doing the complete opposite.
-
-        No new tests, updated existing test.
-
-        * bindings/js/JSDOMStringMapCustom.cpp:
-        (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
-
-2016-10-28  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
-
-        Add CEReactions to the remaining HTML DOM APIs
-        https://bugs.webkit.org/show_bug.cgi?id=163969
-
-        Reviewed by Chris Dumez.
-
-        Added CEReactions to the remaining DOM and HTML APIs as needed.
-
-        Tests: fast/custom-elements/reactions-for-indieui.html
-               fast/custom-elements/reactions/Document.html
-               fast/custom-elements/reactions/HTMLAnchorElement.html
-               fast/custom-elements/reactions/HTMLOptionElement.html
-               fast/custom-elements/reactions/HTMLOptionsCollection.html
-               fast/custom-elements/reactions/HTMLOutputElement.html
-               fast/custom-elements/reactions/HTMLSelectElement.html
-               fast/custom-elements/reactions/HTMLTableElement.html
-               fast/custom-elements/reactions/HTMLTableRowElement.html
-               fast/custom-elements/reactions/HTMLTableSectionElement.html
-               fast/custom-elements/reactions/HTMLTitleElement.html
-               fast/custom-elements/reactions/ShadowRoot.html
-
-        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
-        (WebCore::JSHTMLOptionsCollection::setLength):
-        (WebCore::JSHTMLOptionsCollection::indexSetter):
-        * bindings/js/JSHTMLSelectElementCustom.cpp:
-        (WebCore::JSHTMLSelectElement::indexSetter):
-        * dom/CharacterData.idl:
-        * dom/Document.idl:
-        * dom/Element.idl:
-        * dom/ShadowRoot.idl:
-        * html/HTMLAnchorElement.idl:
-        * html/HTMLDocument.idl:
-        * html/HTMLOptionElement.idl:
-        * html/HTMLOptionsCollection.idl:
-        * html/HTMLOutputElement.idl:
-        * html/HTMLSelectElement.idl:
-        * html/HTMLTableElement.idl:
-        * html/HTMLTableRowElement.idl:
-        * html/HTMLTableSectionElement.idl:
-        * html/HTMLTitleElement.idl:
-
-2016-10-28  Antoine Quint  &lt;graouts@apple.com&gt;
-
-        [Modern Media Controls] Media Controller: volume control support
-        https://bugs.webkit.org/show_bug.cgi?id=163727
-
-        Reviewed by Dean Jackson.
-
-        We introduce the VolumeSupport class which brings support for modifying the media
-        volume by interacting with the mute volume slider in the media controls and correctly
-        reflecting the media's volume should it be changed via the media API.
-
-        Tests: media/modern-media-controls/volume-support/volume-support-click.html
-               media/modern-media-controls/volume-support/volume-support-drag.html
-               media/modern-media-controls/volume-support/volume-support-media-api-mute.html
-               media/modern-media-controls/volume-support/volume-support-media-api.html
-
-        * Modules/modern-media-controls/js-files:
-        * Modules/modern-media-controls/media/media-controller.js:
-        (MediaController):
-        * Modules/modern-media-controls/media/volume-support.js: Added.
-        (VolumeSupport.prototype.get control):
-        (VolumeSupport.prototype.get mediaEvents):
-        (VolumeSupport.prototype.controlValueWillStartChanging):
-        (VolumeSupport.prototype.controlValueDidChange):
-        (VolumeSupport.prototype.syncControl):
-        (VolumeSupport):
-        * WebCore.xcodeproj/project.pbxproj:
-
-2016-10-28  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
-
-        [DOMJIT] Rename CallDOM to CallDOMGetter
-        https://bugs.webkit.org/show_bug.cgi?id=164157
-
-        Reviewed by Keith Miller.
-
-        No behavior change.
-
-        * bindings/scripts/CodeGeneratorJS.pm:
-        (GenerateHeader):
-        * bindings/scripts/test/JS/JSTestDOMJIT.h:
-        * domjit/JSDocumentDOMJIT.cpp:
-        (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter):
-        (WebCore::DocumentDocumentElementDOMJIT::callDOM): Deleted.
-        * domjit/JSNodeDOMJIT.cpp:
-        (WebCore::createCallDOMGetterForOffsetAccess):
-        (WebCore::NodeFirstChildDOMJIT::callDOMGetter):
-        (WebCore::NodeLastChildDOMJIT::callDOMGetter):
-        (WebCore::NodeNextSiblingDOMJIT::callDOMGetter):
-        (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter):
-        (WebCore::NodeParentNodeDOMJIT::callDOMGetter):
-        (WebCore::NodeNodeTypeDOMJIT::callDOMGetter):
-        (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter):
-        (WebCore::createCallDOMForOffsetAccess): Deleted.
-        (WebCore::NodeFirstChildDOMJIT::callDOM): Deleted.
-        (WebCore::NodeLastChildDOMJIT::callDOM): Deleted.
-        (WebCore::NodeNextSiblingDOMJIT::callDOM): Deleted.
-        (WebCore::NodePreviousSiblingDOMJIT::callDOM): Deleted.
-        (WebCore::NodeParentNodeDOMJIT::callDOM): Deleted.
-        (WebCore::NodeNodeTypeDOMJIT::callDOM): Deleted.
-        (WebCore::NodeOwnerDocumentDOMJIT::callDOM): Deleted.
-
-2016-10-28  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Fix font-family parsing inside @font-face
-        https://bugs.webkit.org/show_bug.cgi?id=164155
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
-        Use the full font-family parsing that returns a CSSValueList,
-        since we can handle multiple families.
-
-2016-10-28  Per Arne Vollan  &lt;pvollan@apple.com&gt;
-
-        [Win][Direct2D] Implement ImageBufferData::putData.
-        https://bugs.webkit.org/show_bug.cgi?id=164151
-
-        Reviewed by Brent Fulgham.
-
</del><ins>+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/win/GradientDirect2D.cpp:
+        (WebCore::Gradient::fill):Remove unneeded use
+        of 'RenderTargetScopedDrawing.h'.
+        * platform/graphics/win/GraphicsContextDirect2D.cpp:
+        (WebCore::GraphicsContext::releaseWindowsContext): Remove unneeded use
+        of RenderTargetScopedDrawing class.
+        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Enter
+        the 'BeginDraw' state at object creation.
+        (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): End
+        draw state at object destruction.
+        (WebCore::GraphicsContextPlatformPrivate::clip): Remove unneeded call to 'beginDraw'.
+        (WebCore::GraphicsContextPlatformPrivate::beginDraw): Renamed from 'beginDrawIfNeeded'.
+        (WebCore::GraphicsContextPlatformPrivate::endDraw): Get rid of draw state flags.
+        (WebCore::GraphicsContext::beginDraw): Renamed from 'beginDrawIfNeeded'.
+        (WebCore::GraphicsContext::flush): Added.
+        (WebCore::GraphicsContext::drawWithoutShadow): Remove unneeded use of
+        RenderTargetScopedDrawing class.
+        (WebCore::GraphicsContext::drawWithShadow): Ditto.
+        (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
+        (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
+        (WebCore::GraphicsContext::didBeginDraw): Deleted.
+        (WebCore::GraphicsContextPlatformPrivate::beginDrawIfNeeded): Deleted.
+        (WebCore::GraphicsContext::beginDrawIfNeeded): Deleted.
+        * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
+        (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Deleted.
</ins><span class="cx">         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
</span><del>-        (WebCore::ImageBufferData::getData):
</del><ins>+        (WebCore::ImageBufferData::getData): Remove unneeded use of RenderTargetScopedDrawing class.
</ins><span class="cx">         (WebCore::ImageBufferData::putData):
</span><ins>+        * platform/graphics/win/ImageBufferDirect2D.cpp:
+        (WebCore::ImageBuffer::flushContext): Call new GraphicsContext 'flush' command.
+        (WebCore::ImageBuffer::draw): Remove unneeded use of RenderTargetScopedDrawing class.
+        * platform/graphics/win/NativeImageDirect2D.cpp: Ditto.
+        * platform/graphics/win/RenderTargetScopedDrawing.h: Removed.
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::nativeImage): Remove unneeded use of RenderTargetScopedDrawing class.
</ins><span class="cx"> 
</span><del>-2016-10-28  Dave Hyatt  &lt;hyatt@apple.com&gt;
-
-        [CSS Parser] Support hanging-punctuation
-        https://bugs.webkit.org/show_bug.cgi?id=164153
-
-        Reviewed by Simon Fraser.
-
-        * css/parser/CSSPropertyParser.cpp:
-        (WebCore::consumeHangingPunctuation):
-        (WebCore::CSSPropertyParser::parseSingleValue):
-
</del><span class="cx"> 2016-10-28  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [DOMJIT] Implement Document::documentElement
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -552,10 +552,10 @@
</span><span class="cx">     WEBCORE_EXPORT static ID2D1Factory* systemFactory();
</span><span class="cx">     WEBCORE_EXPORT static ID2D1RenderTarget* defaultRenderTarget();
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT bool beginDrawIfNeeded();
-    WEBCORE_EXPORT bool didBeginDraw() const;
</del><ins>+    WEBCORE_EXPORT void beginDraw();
</ins><span class="cx">     D2D1_COLOR_F colorWithGlobalAlpha(const Color&amp;) const;
</span><span class="cx">     WEBCORE_EXPORT void endDraw();
</span><ins>+    void flush();
</ins><span class="cx"> 
</span><span class="cx">     ID2D1Brush* solidStrokeBrush() const;
</span><span class="cx">     ID2D1Brush* solidFillBrush() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGradientDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/GradientDirect2D.cpp        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;FloatPoint.h&quot;
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><del>-#include &quot;RenderTargetScopedDrawing.h&quot;
</del><span class="cx"> #include &lt;d2d1.h&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -121,8 +120,6 @@
</span><span class="cx">     if (!m_cachedHash || !m_gradient)
</span><span class="cx">         generateGradient(d2dContext);
</span><span class="cx"> 
</span><del>-    RenderTargetScopedDrawing scopedDraw(*context);
-
</del><span class="cx">     d2dContext-&gt;SetTags(GRADIENT_DRAWING, __LINE__);
</span><span class="cx"> 
</span><span class="cx">     const D2D1_RECT_F d2dRect = rect;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsContextDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include &quot;ImageBuffer.h&quot;
</span><span class="cx"> #include &quot;Logging.h&quot;
</span><span class="cx"> #include &quot;NotImplemented.h&quot;
</span><del>-#include &quot;RenderTargetScopedDrawing.h&quot;
</del><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;d2d1.h&gt;
</span><span class="cx"> #include &lt;d2d1effects.h&gt;
</span><span class="lines">@@ -99,11 +98,6 @@
</span><span class="cx">     return defaultRenderTarget;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContext::didBeginDraw() const
-{
-    return m_data-&gt;didBeginDraw();
-}
-
</del><span class="cx"> void GraphicsContext::platformInit(HDC hdc, bool hasAlpha)
</span><span class="cx"> {
</span><span class="cx">     if (!hdc)
</span><span class="lines">@@ -246,6 +240,8 @@
</span><span class="cx">         renderTarget-&gt;DrawBitmap(image.get(), adjustedDestRect, 1.0f, D2D1_BITMAP_INTERPOLATION_MODE_LINEAR, static_cast&lt;D2D1_RECT_F&gt;(srcRect));
</span><span class="cx">     });
</span><span class="cx"> 
</span><ins>+    flush();
+
</ins><span class="cx">     if (!stateSaver.didSave())
</span><span class="cx">         context-&gt;SetTransform(ctm);
</span><span class="cx"> }
</span><span class="lines">@@ -272,7 +268,6 @@
</span><span class="cx">     HRESULT hr = platformContext()-&gt;CreateBitmap(pixelData.size(), pixelData.buffer(), pixelData.bytesPerRow(), &amp;bitmapProperties, &amp;bitmap);
</span><span class="cx">     ASSERT(SUCCEEDED(hr));
</span><span class="cx"> 
</span><del>-    RenderTargetScopedDrawing scopedDraw(*this);
</del><span class="cx">     platformContext()-&gt;DrawBitmap(bitmap.get(), dstRect);
</span><span class="cx"> 
</span><span class="cx">     ::DeleteDC(hdc);
</span><span class="lines">@@ -301,6 +296,10 @@
</span><span class="cx"> GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(ID2D1RenderTarget* renderTarget)
</span><span class="cx">     : m_renderTarget(renderTarget)
</span><span class="cx"> {
</span><ins>+    if (!m_renderTarget)
+        return;
+
+    beginDraw();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate()
</span><span class="lines">@@ -308,7 +307,7 @@
</span><span class="cx">     if (!m_renderTarget)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    ASSERT(!m_beginDrawCount.unsafeGet());
</del><ins>+    endDraw();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> COMPtr&lt;ID2D1SolidColorBrush&gt; GraphicsContextPlatformPrivate::brushWithColor(const D2D1_COLOR_F&amp; color)
</span><span class="lines">@@ -343,10 +342,6 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContextPlatformPrivate::clip(const FloatRect&amp; rect)
</span><span class="cx"> {
</span><del>-    // In D2D, we can only clip in the context of a 'BeginDraw', and the clip can
-    // only live as long as the draw is happening.
-    beginDrawIfNeeded();
-
</del><span class="cx">     if (m_renderStates.isEmpty())
</span><span class="cx">         save();
</span><span class="cx"> 
</span><span class="lines">@@ -361,10 +356,6 @@
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContextPlatformPrivate::clip(ID2D1Geometry* path)
</span><span class="cx"> {
</span><del>-    // In D2D, we can only clip in the context of a 'BeginDraw', and the clip can
-    // only live as long as the draw is happening.
-    beginDrawIfNeeded();
-
</del><span class="cx">     ASSERT(m_renderStates.size());
</span><span class="cx">     if (!m_renderStates.size())
</span><span class="cx">         return;
</span><span class="lines">@@ -400,15 +391,10 @@
</span><span class="cx">     RELEASE_ASSERT(SUCCEEDED(hr));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void GraphicsContextPlatformPrivate::beginDrawIfNeeded()
</del><ins>+void GraphicsContextPlatformPrivate::beginDraw()
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_renderTarget.get());
</span><del>-    if (didBeginDraw())
-        return;
-
</del><span class="cx">     m_renderTarget-&gt;BeginDraw();
</span><del>-
-    ++m_beginDrawCount;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContextPlatformPrivate::endDraw()
</span><span class="lines">@@ -419,8 +405,6 @@
</span><span class="cx"> 
</span><span class="cx">     if (!SUCCEEDED(hr))
</span><span class="cx">         WTFLogAlways(&quot;Failed in GraphicsContextPlatformPrivate::endDraw: hr=%ld, first=%ld, second=%ld&quot;, hr, first, second);
</span><del>-
-    --m_beginDrawCount;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContextPlatformPrivate::restore()
</span><span class="lines">@@ -517,12 +501,9 @@
</span><span class="cx">     return m_data-&gt;m_patternFillBrush.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool GraphicsContext::beginDrawIfNeeded()
</del><ins>+void GraphicsContext::beginDraw()
</ins><span class="cx"> {
</span><del>-    bool neededToBeginDraw = !m_data-&gt;didBeginDraw();
-
-    m_data-&gt;beginDrawIfNeeded();
-    return neededToBeginDraw;
</del><ins>+    m_data-&gt;beginDraw();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::endDraw()
</span><span class="lines">@@ -530,6 +511,11 @@
</span><span class="cx">     m_data-&gt;endDraw();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void GraphicsContext::flush()
+{
+    m_data-&gt;flush();
+}
+
</ins><span class="cx"> void GraphicsContext::drawPattern(Image&amp; image, const FloatRect&amp; destRect, const FloatRect&amp; tileRect, const AffineTransform&amp; patternTransform, const FloatPoint&amp; phase, const FloatSize&amp; spacing, CompositeOperator op, BlendMode blendMode)
</span><span class="cx"> {
</span><span class="cx">     if (paintingDisabled() || !patternTransform.isInvertible())
</span><span class="lines">@@ -910,18 +896,17 @@
</span><span class="cx">         auto brush = m_state.strokePattern ? patternStrokeBrush() : solidStrokeBrush();
</span><span class="cx">         renderTarget-&gt;DrawGeometry(path.platformPath(), brush, strokeThickness(), m_data-&gt;strokeStyle());
</span><span class="cx">     });
</span><ins>+
+    flush();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::drawWithoutShadow(const FloatRect&amp; /*boundingRect*/, const std::function&lt;void(ID2D1RenderTarget*)&gt;&amp; drawCommands)
</span><span class="cx"> {
</span><del>-    RenderTargetScopedDrawing scopedDraw(*this);
</del><span class="cx">     drawCommands(platformContext());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::drawWithShadow(const FloatRect&amp; boundingRect, const std::function&lt;void(ID2D1RenderTarget*)&gt;&amp; drawCommands)
</span><span class="cx"> {
</span><del>-    RenderTargetScopedDrawing scopedDraw(*this);
-
</del><span class="cx">     auto context = platformContext();
</span><span class="cx"> 
</span><span class="cx">     // Render the current geometry to a bitmap context
</span><span class="lines">@@ -1027,6 +1012,8 @@
</span><span class="cx">         auto brush = m_state.fillPattern ? patternFillBrush() : solidFillBrush();
</span><span class="cx">         renderTarget-&gt;FillGeometry(pathToFill.get(), brush);
</span><span class="cx">     });
</span><ins>+
+    flush();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::strokePath(const Path&amp; path)
</span><span class="lines">@@ -1070,6 +1057,8 @@
</span><span class="cx">         auto brush = m_state.strokePattern ? patternStrokeBrush() : solidStrokeBrush();
</span><span class="cx">         renderTarget-&gt;DrawGeometry(path.platformPath(), brush, strokeThickness(), m_data-&gt;strokeStyle());
</span><span class="cx">     });
</span><ins>+
+    flush();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsContext::fillRect(const FloatRect&amp; rect)
</span><span class="lines">@@ -1165,8 +1154,6 @@
</span><span class="cx">         notImplemented();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RenderTargetScopedDrawing scopedDraw(*this);
-
</del><span class="cx">     context-&gt;SetTags(1, __LINE__);
</span><span class="cx"> 
</span><span class="cx">     const FloatRect&amp; r = rect.rect();
</span><span class="lines">@@ -1202,8 +1189,6 @@
</span><span class="cx"> 
</span><span class="cx">     auto context = platformContext();
</span><span class="cx"> 
</span><del>-    RenderTargetScopedDrawing scopedDraw(*this);
-
</del><span class="cx">     context-&gt;SetTags(1, __LINE__);
</span><span class="cx"> 
</span><span class="cx">     Path path;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinGraphicsContextPlatformPrivateDirect2Dh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &lt;d2d1effects.h&gt;
</span><span class="cx"> #include &lt;d2d1helper.h&gt;
</span><span class="cx"> #include &lt;windows.h&gt;
</span><del>-#include &lt;wtf/CheckedArithmetic.h&gt;
</del><span class="cx"> #include &lt;wtf/TinyLRUCache.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -48,7 +47,8 @@
</span><span class="cx">     void clip(const FloatRect&amp;);
</span><span class="cx">     void clip(const Path&amp;);
</span><span class="cx">     void clip(ID2D1Geometry*);
</span><del>-    void beginDrawIfNeeded();
</del><ins>+
+    void beginDraw();
</ins><span class="cx">     void endDraw();
</span><span class="cx">     void flush();
</span><span class="cx">     void save();
</span><span class="lines">@@ -75,12 +75,9 @@
</span><span class="cx"> 
</span><span class="cx">     COMPtr&lt;ID2D1SolidColorBrush&gt; brushWithColor(const D2D1_COLOR_F&amp;);
</span><span class="cx"> 
</span><del>-    bool didBeginDraw() const { return m_beginDrawCount.unsafeGet(); }
-
</del><span class="cx">     HDC m_hdc { nullptr };
</span><span class="cx">     D2D1_BLEND_MODE m_blendMode { D2D1_BLEND_MODE_MULTIPLY };
</span><span class="cx">     D2D1_COMPOSITE_MODE m_compositeMode { D2D1_COMPOSITE_MODE_SOURCE_OVER };
</span><del>-    Checked&lt;unsigned&gt; m_beginDrawCount { 0 };
</del><span class="cx">     bool m_shouldIncludeChildWindows { false };
</span><span class="cx">     bool m_strokeSyleIsDirty { false };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinImageBufferDataDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/ImageBufferDataDirect2D.cpp        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include &quot;HWndDC.h&quot;
</span><span class="cx"> #include &quot;IntRect.h&quot;
</span><span class="cx"> #include &quot;NotImplemented.h&quot;
</span><del>-#include &quot;RenderTargetScopedDrawing.h&quot;
</del><span class="cx"> #include &lt;d2d1.h&gt;
</span><span class="cx"> #include &lt;runtime/JSCInlines.h&gt;
</span><span class="cx"> #include &lt;runtime/TypedArrayInlines.h&gt;
</span><span class="lines">@@ -64,25 +63,19 @@
</span><span class="cx">     auto bitmapDC = adoptGDIObject(::CreateCompatibleDC(windowDC));
</span><span class="cx">     HGDIOBJ oldBitmap = ::SelectObject(bitmapDC.get(), bitmap.get());
</span><span class="cx"> 
</span><del>-    BOOL ok = TRUE;
</del><ins>+    COMPtr&lt;ID2D1GdiInteropRenderTarget&gt; gdiRenderTarget;
+    HRESULT hr = platformContext-&gt;QueryInterface(__uuidof(ID2D1GdiInteropRenderTarget), (void**)&amp;gdiRenderTarget);
+    if (FAILED(hr))
+        return nullptr;
</ins><span class="cx"> 
</span><del>-    {
-        RenderTargetScopedDrawing scopedDraw(*context);
</del><ins>+    HDC hdc = nullptr;
+    hr = gdiRenderTarget-&gt;GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &amp;hdc);
</ins><span class="cx"> 
</span><del>-        COMPtr&lt;ID2D1GdiInteropRenderTarget&gt; gdiRenderTarget;
-        HRESULT hr = platformContext-&gt;QueryInterface(__uuidof(ID2D1GdiInteropRenderTarget), (void**)&amp;gdiRenderTarget);
-        if (FAILED(hr))
-            return nullptr;
</del><ins>+    BOOL ok = ::BitBlt(bitmapDC.get(), 0, 0, rect.width(), rect.height(), hdc, rect.x(), rect.y(), SRCCOPY);
</ins><span class="cx"> 
</span><del>-        HDC hdc = nullptr;
-        hr = gdiRenderTarget-&gt;GetDC(D2D1_DC_INITIALIZE_MODE_COPY, &amp;hdc);
</del><ins>+    RECT updateRect = { 0, 0, 0, 0 };
+    hr = gdiRenderTarget-&gt;ReleaseDC(&amp;updateRect);
</ins><span class="cx"> 
</span><del>-        ok = ::BitBlt(bitmapDC.get(), 0, 0, rect.width(), rect.height(), hdc, rect.x(), rect.y(), SRCCOPY);
-
-        RECT updateRect = { 0, 0, 0, 0 };
-        hr = gdiRenderTarget-&gt;ReleaseDC(&amp;updateRect);
-    }
-
</del><span class="cx">     if (!ok)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinImageBufferDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/ImageBufferDirect2D.cpp        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -44,11 +44,7 @@
</span><span class="cx"> #include &lt;wtf/text/Base64.h&gt;
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><del>-#if PLATFORM(COCOA)
-#include &quot;WebCoreSystemInterface.h&quot;
-#endif
</del><span class="cx"> 
</span><del>-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> static FloatSize scaleSizeToUserSpace(const FloatSize&amp; logicalSize, const IntSize&amp; backingStoreSize, const IntSize&amp; internalSize)
</span><span class="lines">@@ -140,11 +136,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::flushContext() const
</span><span class="cx"> {
</span><del>-    if (!context().didBeginDraw())
-        return;
-
-    HRESULT hr = context().platformContext()-&gt;Flush();
-    ASSERT(SUCCEEDED(hr));
</del><ins>+    context().flush();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;Image&gt; ImageBuffer::copyImage(BackingStoreCopy copyBehavior, ScaleBehavior scaleBehavior) const
</span><span class="lines">@@ -200,6 +192,8 @@
</span><span class="cx">     adjustedSrcRect.scale(m_resolutionScale, m_resolutionScale);
</span><span class="cx"> 
</span><span class="cx">     destContext.drawNativeImage(image, image-&gt;GetSize(), destRect, adjustedSrcRect, op, blendMode);
</span><ins>+
+    destContext.flush();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ImageBuffer::drawPattern(GraphicsContext&amp; destContext, const FloatRect&amp; destRect, const FloatRect&amp; srcRect, const AffineTransform&amp; patternTransform, const FloatPoint&amp; phase, const FloatSize&amp; spacing, CompositeOperator op, BlendMode blendMode)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinNativeImageDirect2Dcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/NativeImageDirect2D.cpp        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;GraphicsContext.h&quot;
</span><span class="cx"> #include &quot;IntSize.h&quot;
</span><span class="cx"> #include &quot;NotImplemented.h&quot;
</span><del>-#include &quot;RenderTargetScopedDrawing.h&quot;
</del><span class="cx"> #include &lt;d2d1.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -86,17 +85,8 @@
</span><span class="cx"> 
</span><span class="cx">     float opacity = 1.0f;
</span><span class="cx"> 
</span><del>-    bool temporaryDraw = context.beginDrawIfNeeded();
-
</del><span class="cx">     platformContext-&gt;DrawBitmap(image.get(), destRect, opacity, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, adjustedSrcRect);
</span><del>-
-    HRESULT hr = S_OK;
-    if (temporaryDraw)
-        context.endDraw();
-    else
-        hr = platformContext-&gt;Flush();
-
-    ASSERT(SUCCEEDED(hr));
</del><ins>+    context.flush();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void clearNativeImageSubimages(const NativeImagePtr&amp; image)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicswinRenderTargetScopedDrawingh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/platform/graphics/win/RenderTargetScopedDrawing.h        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -1,60 +0,0 @@
</span><del>-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include &quot;GraphicsContext.h&quot;
-
-namespace WebCore {
-
-class RenderTargetScopedDrawing {
-    WTF_MAKE_NONCOPYABLE(RenderTargetScopedDrawing);
-public:
-    RenderTargetScopedDrawing(GraphicsContext&amp; context)
-        : m_context(context)
-    {
-        m_drawIsScoped = context.beginDrawIfNeeded();
-    }
-
-    ~RenderTargetScopedDrawing()
-    {
-        endDraw();
-    }
-
-    void endDraw()
-    {
-        if (!m_drawIsScoped)
-            return;
-            
-        m_context.endDraw();
-        m_drawIsScoped = false;
-    }
-
-private:
-    GraphicsContext&amp; m_context;
-    bool m_drawIsScoped;
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsSVGImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (208130 => 208131)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-10-30 18:48:09 UTC (rev 208130)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp        2016-10-30 20:47:16 UTC (rev 208131)
</span><span class="lines">@@ -56,7 +56,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(DIRECT2D)
</span><span class="cx"> #include &quot;COMPtr.h&quot;
</span><del>-#include &quot;RenderTargetScopedDrawing.h&quot;
</del><span class="cx"> #include &lt;d2d1.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -227,10 +226,7 @@
</span><span class="cx"> 
</span><span class="cx">     GraphicsContext localContext(nativeImageTarget.get());
</span><span class="cx"> 
</span><del>-    {
-        RenderTargetScopedDrawing scopedDraw(localContext);
-        draw(localContext, rect(), rect(), CompositeSourceOver, BlendModeNormal, ImageOrientationDescription());
-    }
</del><ins>+    draw(localContext, rect(), rect(), CompositeSourceOver, BlendModeNormal, ImageOrientationDescription());
</ins><span class="cx"> 
</span><span class="cx">     COMPtr&lt;ID2D1Bitmap&gt; nativeImage;
</span><span class="cx">     hr = nativeImageTarget-&gt;GetBitmap(&amp;nativeImage);
</span></span></pre>
</div>
</div>

</body>
</html>