<!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>[201318] 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/201318">201318</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-05-23 22:34:49 -0700 (Mon, 23 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modernize CSS code
https://bugs.webkit.org/show_bug.cgi?id=157875

Reviewed by Chris Dumez.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::construct):
(WebCore::setJSTestObjPutForwardsNullableAttribute):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
(WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::construct):
* css/CSSBasicShapes.cpp:
(WebCore::serializePositionOffset):
(WebCore::buildSerializablePositionOffset):
(WebCore::CSSBasicShapeCircle::cssText):
(WebCore::CSSBasicShapeEllipse::cssText):
* css/CSSCalculationValue.cpp:
(WebCore::determineCategory):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::media):
* css/CSSMediaRule.h:
* css/CSSOMUtils.h:
* css/CSSParser.cpp:
(WebCore::CSSParser::createImportRule):
(WebCore::CSSParser::createMediaRule):
* css/CSSReflectValue.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::setDisabled):
(WebCore::CSSStyleSheet::setMediaQueries):
(WebCore::CSSStyleSheet::insertRule):
(WebCore::CSSStyleSheet::deleteRule):
(WebCore::CSSStyleSheet::isLoading):
(WebCore::CSSStyleSheet::media):
(WebCore::CSSStyleSheet::parentStyleSheet):
(WebCore::CSSStyleSheet::ownerDocument):
(WebCore::CSSStyleSheet::clearChildRuleCSSOMWrappers):
(WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
* css/CSSStyleSheet.h:
* css/PropertySetCSSStyleDeclaration.cpp:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleGroup::wrapperRemoveRule):
(WebCore::StyleRuleMedia::StyleRuleMedia):
* css/StyleRule.h:
(WebCore::StyleRuleBase::deref):
(WebCore::StyleRuleBase::StyleRuleBase):
(WebCore::StyleRuleMedia::create):
(WebCore::StyleRuleMedia::mediaQueries):
(WebCore::StyleRuleMedia::copy):
(isType):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::create):
(WebCore::StyleRuleImport::StyleRuleImport):
* css/StyleRuleImport.h:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::isCacheable):
(WebCore::StyleSheetContents::parserAppendRule):
(WebCore::StyleSheetContents::ruleAt):
(WebCore::StyleSheetContents::parserSetEncodingFromCharsetRule):
(WebCore::StyleSheetContents::wrapperInsertRule):
* css/StyleSheetContents.h:
(WebCore::StyleSheetContents::hasSyntacticallyValidCSSHeader):
(WebCore::StyleSheetContents::parserSetUsesRemUnits):
(WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability):
(WebCore::StyleSheetContents::copy):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
* inspector/InspectorStyleSheet.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSBasicShapescpp">trunk/Source/WebCore/css/CSSBasicShapes.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSCalculationValuecpp">trunk/Source/WebCore/css/CSSCalculationValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSMediaRulecpp">trunk/Source/WebCore/css/CSSMediaRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSMediaRuleh">trunk/Source/WebCore/css/CSSMediaRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSOMUtilsh">trunk/Source/WebCore/css/CSSOMUtils.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSReflectValueh">trunk/Source/WebCore/css/CSSReflectValue.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheetcpp">trunk/Source/WebCore/css/CSSStyleSheet.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleSheeth">trunk/Source/WebCore/css/CSSStyleSheet.h</a></li>
<li><a href="#trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp">trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleRulecpp">trunk/Source/WebCore/css/StyleRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleRuleh">trunk/Source/WebCore/css/StyleRule.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleRuleImportcpp">trunk/Source/WebCore/css/StyleRuleImport.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleRuleImporth">trunk/Source/WebCore/css/StyleRuleImport.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetContentscpp">trunk/Source/WebCore/css/StyleSheetContents.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetContentsh">trunk/Source/WebCore/css/StyleSheetContents.h</a></li>
<li><a href="#trunkSourceWebCoredomInlineStyleSheetOwnercpp">trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorStyleSheetcpp">trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/ChangeLog        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -1,3 +1,86 @@
</span><ins>+2016-05-23  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Modernize CSS code
+        https://bugs.webkit.org/show_bug.cgi?id=157875
+
+        Reviewed by Chris Dumez.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        (GenerateParametersCheck):
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObjConstructor::construct):
+        (WebCore::setJSTestObjPutForwardsNullableAttribute):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
+        (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+        (WebCore::JSTestTypedefsConstructor::construct):
+        * css/CSSBasicShapes.cpp:
+        (WebCore::serializePositionOffset):
+        (WebCore::buildSerializablePositionOffset):
+        (WebCore::CSSBasicShapeCircle::cssText):
+        (WebCore::CSSBasicShapeEllipse::cssText):
+        * css/CSSCalculationValue.cpp:
+        (WebCore::determineCategory):
+        (WebCore::CSSCalcExpressionNodeParser::parseValue):
+        * css/CSSMediaRule.cpp:
+        (WebCore::CSSMediaRule::media):
+        * css/CSSMediaRule.h:
+        * css/CSSOMUtils.h:
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::createImportRule):
+        (WebCore::CSSParser::createMediaRule):
+        * css/CSSReflectValue.h:
+        * css/CSSStyleSheet.cpp:
+        (WebCore::CSSStyleSheet::setDisabled):
+        (WebCore::CSSStyleSheet::setMediaQueries):
+        (WebCore::CSSStyleSheet::insertRule):
+        (WebCore::CSSStyleSheet::deleteRule):
+        (WebCore::CSSStyleSheet::isLoading):
+        (WebCore::CSSStyleSheet::media):
+        (WebCore::CSSStyleSheet::parentStyleSheet):
+        (WebCore::CSSStyleSheet::ownerDocument):
+        (WebCore::CSSStyleSheet::clearChildRuleCSSOMWrappers):
+        (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
+        * css/CSSStyleSheet.h:
+        * css/PropertySetCSSStyleDeclaration.cpp:
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleBase::createCSSOMWrapper):
+        (WebCore::StyleRuleBase::destroy):
+        (WebCore::StyleRuleGroup::wrapperRemoveRule):
+        (WebCore::StyleRuleMedia::StyleRuleMedia):
+        * css/StyleRule.h:
+        (WebCore::StyleRuleBase::deref):
+        (WebCore::StyleRuleBase::StyleRuleBase):
+        (WebCore::StyleRuleMedia::create):
+        (WebCore::StyleRuleMedia::mediaQueries):
+        (WebCore::StyleRuleMedia::copy):
+        (isType):
+        * css/StyleRuleImport.cpp:
+        (WebCore::StyleRuleImport::create):
+        (WebCore::StyleRuleImport::StyleRuleImport):
+        * css/StyleRuleImport.h:
+        * css/StyleSheetContents.cpp:
+        (WebCore::StyleSheetContents::isCacheable):
+        (WebCore::StyleSheetContents::parserAppendRule):
+        (WebCore::StyleSheetContents::ruleAt):
+        (WebCore::StyleSheetContents::parserSetEncodingFromCharsetRule):
+        (WebCore::StyleSheetContents::wrapperInsertRule):
+        * css/StyleSheetContents.h:
+        (WebCore::StyleSheetContents::hasSyntacticallyValidCSSHeader):
+        (WebCore::StyleSheetContents::parserSetUsesRemUnits):
+        (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability):
+        (WebCore::StyleSheetContents::copy):
+        * dom/InlineStyleSheetOwner.cpp:
+        (WebCore::InlineStyleSheetOwner::createSheet):
+        * inspector/InspectorStyleSheet.cpp:
+
</ins><span class="cx"> 2016-05-23  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Changing border color and size simultaneously fails to repaint.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -2705,7 +2705,7 @@
</span><span class="cx">                     my $jsType = NativeToJSValue($attribute-&gt;signature, 0, $interface, &quot;${functionName}(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;castedThis&quot;);
</span><span class="cx">                     push(@implContent, &quot;    auto&amp; impl = castedThis-&gt;wrapped();\n&quot;) if !$attribute-&gt;isStatic;
</span><span class="cx">                     if ($codeGenerator-&gt;IsSVGAnimatedType($type)) {
</span><del>-                        push(@implContent, &quot;    RefPtr&lt;$type&gt; obj = $jsType;\n&quot;);
</del><ins>+                        push(@implContent, &quot;    auto obj = $jsType;\n&quot;);
</ins><span class="cx">                         push(@implContent, &quot;    JSValue result = toJS(state, castedThis-&gt;globalObject(), obj.get());\n&quot;);
</span><span class="cx">                     } else {
</span><span class="cx">                         push(@implContent, &quot;    JSValue result = $jsType;\n&quot;);
</span><span class="lines">@@ -2918,7 +2918,7 @@
</span><span class="cx">                     if ($putForwards) {
</span><span class="cx">                         my $implGetterFunctionName = $codeGenerator-&gt;WK_lcfirst($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;} || $name);
</span><span class="cx">                         if ($attribute-&gt;signature-&gt;isNullable) {
</span><del>-                            push(@implContent, &quot;    RefPtr&lt;${type}&gt; forwardedImpl = castedThis-&gt;wrapped().${implGetterFunctionName}();\n&quot;);
</del><ins>+                            push(@implContent, &quot;    auto forwardedImpl = castedThis-&gt;wrapped().${implGetterFunctionName}();\n&quot;);
</ins><span class="cx">                             push(@implContent, &quot;    if (!forwardedImpl)\n&quot;);
</span><span class="cx">                             push(@implContent, &quot;        return false;\n&quot;);
</span><span class="cx">                             push(@implContent, &quot;    auto&amp; impl = *forwardedImpl;\n&quot;);
</span><span class="lines">@@ -3659,9 +3659,9 @@
</span><span class="cx">                 push(@$outputArray, &quot;        return throwArgumentMustBeFunctionError(*state, $argumentIndex, \&quot;$name\&quot;, \&quot;$interfaceName\&quot;, $quotedFunctionName);\n&quot;);
</span><span class="cx">                 if ($function-&gt;isStatic) {
</span><span class="cx">                     AddToImplIncludes(&quot;CallbackFunction.h&quot;);
</span><del>-                    push(@$outputArray, &quot;    RefPtr&lt;$type&gt; $name = createFunctionOnlyCallback&lt;${callbackClassName}&gt;(state, jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject()), state-&gt;uncheckedArgument($argumentIndex));\n&quot;);
</del><ins>+                    push(@$outputArray, &quot;    auto $name = createFunctionOnlyCallback&lt;${callbackClassName}&gt;(state, jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject()), state-&gt;uncheckedArgument($argumentIndex));\n&quot;);
</ins><span class="cx">                 } else {
</span><del>-                    push(@$outputArray, &quot;    RefPtr&lt;$type&gt; $name = ${callbackClassName}::create(asObject(state-&gt;uncheckedArgument($argumentIndex)), castedThis-&gt;globalObject());\n&quot;);
</del><ins>+                    push(@$outputArray, &quot;    auto $name = ${callbackClassName}::create(asObject(state-&gt;uncheckedArgument($argumentIndex)), castedThis-&gt;globalObject());\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">             $value = &quot;WTFMove($name)&quot;;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestMediaQueryListListenercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 0, &quot;listener&quot;, &quot;TestMediaQueryListListener&quot;, &quot;method&quot;);
</span><del>-    RefPtr&lt;MediaQueryListListener&gt; listener = JSMediaQueryListListener::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</del><ins>+    auto listener = JSMediaQueryListListener::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</ins><span class="cx">     impl.method(WTFMove(listener));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -1015,10 +1015,10 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 0, &quot;testCallback&quot;, &quot;TestObj&quot;, nullptr);
</span><del>-    RefPtr&lt;TestCallback&gt; testCallback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</del><ins>+    auto testCallback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</ins><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;testCallbackFunction&quot;, &quot;TestObj&quot;, nullptr);
</span><del>-    RefPtr&lt;TestCallbackFunction&gt; testCallbackFunction = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</del><ins>+    auto testCallbackFunction = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</ins><span class="cx">     auto object = TestObj::create(*testCallback, *testCallbackFunction);
</span><span class="cx">     return JSValue::encode(asObject(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object))));
</span><span class="cx"> }
</span><span class="lines">@@ -3852,7 +3852,7 @@
</span><span class="cx">     if (UNLIKELY(!castedThis)) {
</span><span class="cx">         return throwSetterTypeError(*state, &quot;TestObj&quot;, &quot;putForwardsNullableAttribute&quot;);
</span><span class="cx">     }
</span><del>-    RefPtr&lt;TestNode&gt; forwardedImpl = castedThis-&gt;wrapped().putForwardsNullableAttribute();
</del><ins>+    auto forwardedImpl = castedThis-&gt;wrapped().putForwardsNullableAttribute();
</ins><span class="cx">     if (!forwardedImpl)
</span><span class="cx">         return false;
</span><span class="cx">     auto&amp; impl = *forwardedImpl;
</span><span class="lines">@@ -5021,7 +5021,7 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithCallbackArg&quot;);
</span><del>-    RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</del><ins>+    auto callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</ins><span class="cx">     impl.methodWithCallbackArg(WTFMove(callback));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5041,7 +5041,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackArg&quot;);
</span><del>-    RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</del><ins>+    auto callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</ins><span class="cx">     impl.methodWithNonCallbackArgAndCallbackArg(WTFMove(nonCallback), WTFMove(callback));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5076,7 +5076,7 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithCallbackFunctionArg&quot;);
</span><del>-    RefPtr&lt;TestCallbackFunction&gt; callback = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</del><ins>+    auto callback = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</ins><span class="cx">     impl.methodWithCallbackFunctionArg(WTFMove(callback));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5096,7 +5096,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;callback&quot;, &quot;TestObj&quot;, &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;);
</span><del>-    RefPtr&lt;TestCallbackFunction&gt; callback = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</del><ins>+    auto callback = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</ins><span class="cx">     impl.methodWithNonCallbackArgAndCallbackFunctionArg(WTFMove(nonCallback), WTFMove(callback));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5137,7 +5137,7 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;staticMethodWithCallbackArg&quot;);
</span><del>-    RefPtr&lt;TestCallback&gt; callback = createFunctionOnlyCallback&lt;JSTestCallback&gt;(state, jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject()), state-&gt;uncheckedArgument(0));
</del><ins>+    auto callback = createFunctionOnlyCallback&lt;JSTestCallback&gt;(state, jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject()), state-&gt;uncheckedArgument(0));
</ins><span class="cx">     TestObj::staticMethodWithCallbackArg(WTFMove(callback));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5269,7 +5269,7 @@
</span><span class="cx">         return throwVMError(state, createNotEnoughArgumentsError(state));
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(0).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 0, &quot;callback&quot;, &quot;TestObj&quot;, &quot;overloadedMethod&quot;);
</span><del>-    RefPtr&lt;TestCallback&gt; callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</del><ins>+    auto callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(0)), castedThis-&gt;globalObject());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(callback));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     if (UNLIKELY(!state-&gt;argument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, 1, &quot;testCallback&quot;, &quot;TestTypedefs&quot;, nullptr);
</span><del>-    RefPtr&lt;TestCallback&gt; testCallback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</del><ins>+    auto testCallback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</ins><span class="cx">     auto object = TestTypedefs::create(hello, *testCallback);
</span><span class="cx">     return JSValue::encode(asObject(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object))));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSBasicShapescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSBasicShapes.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSBasicShapes.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     return offset.cssText();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static Ref&lt;CSSPrimitiveValue&gt; buildSerializablePositionOffset(PassRefPtr&lt;CSSPrimitiveValue&gt; offset, CSSValueID defaultSide)
</del><ins>+static Ref&lt;CSSPrimitiveValue&gt; buildSerializablePositionOffset(CSSPrimitiveValue* offset, CSSValueID defaultSide)
</ins><span class="cx"> {
</span><span class="cx">     CSSValueID side = defaultSide;
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; amount;
</span><span class="lines">@@ -110,8 +110,8 @@
</span><span class="cx"> 
</span><span class="cx"> String CSSBasicShapeCircle::cssText() const
</span><span class="cx"> {
</span><del>-    Ref&lt;CSSPrimitiveValue&gt; normalizedCX = buildSerializablePositionOffset(m_centerX, CSSValueLeft);
-    Ref&lt;CSSPrimitiveValue&gt; normalizedCY = buildSerializablePositionOffset(m_centerY, CSSValueTop);
</del><ins>+    Ref&lt;CSSPrimitiveValue&gt; normalizedCX = buildSerializablePositionOffset(m_centerX.get(), CSSValueLeft);
+    Ref&lt;CSSPrimitiveValue&gt; normalizedCY = buildSerializablePositionOffset(m_centerY.get(), CSSValueTop);
</ins><span class="cx"> 
</span><span class="cx">     String radius;
</span><span class="cx">     if (m_radius &amp;&amp; m_radius-&gt;getValueID() != CSSValueClosestSide)
</span><span class="lines">@@ -167,8 +167,8 @@
</span><span class="cx"> 
</span><span class="cx"> String CSSBasicShapeEllipse::cssText() const
</span><span class="cx"> {
</span><del>-    Ref&lt;CSSPrimitiveValue&gt; normalizedCX = buildSerializablePositionOffset(m_centerX, CSSValueLeft);
-    Ref&lt;CSSPrimitiveValue&gt; normalizedCY = buildSerializablePositionOffset(m_centerY, CSSValueTop);
</del><ins>+    Ref&lt;CSSPrimitiveValue&gt; normalizedCX = buildSerializablePositionOffset(m_centerX.get(), CSSValueLeft);
+    Ref&lt;CSSPrimitiveValue&gt; normalizedCY = buildSerializablePositionOffset(m_centerY.get(), CSSValueTop);
</ins><span class="cx"> 
</span><span class="cx">     String radiusX;
</span><span class="cx">     String radiusY;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSCalculationValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSCalculationValue.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSCalculationValue.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSCalculationValue.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -200,9 +200,9 @@
</span><span class="cx"> class CSSCalcPrimitiveValue final : public CSSCalcExpressionNode {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static Ref&lt;CSSCalcPrimitiveValue&gt; create(PassRefPtr&lt;CSSPrimitiveValue&gt; value, bool isInteger)
</del><ins>+    static Ref&lt;CSSCalcPrimitiveValue&gt; create(Ref&lt;CSSPrimitiveValue&gt;&amp;&amp; value, bool isInteger)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new CSSCalcPrimitiveValue(value, isInteger));
</del><ins>+        return adoptRef(*new CSSCalcPrimitiveValue(WTFMove(value), isInteger));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     static RefPtr&lt;CSSCalcPrimitiveValue&gt; create(double value, CSSPrimitiveValue::UnitTypes type, bool isInteger)
</span><span class="lines">@@ -232,9 +232,7 @@
</span><span class="cx">             return std::make_unique&lt;CalcExpressionLength&gt;(Length(m_value-&gt;computeLength&lt;float&gt;(conversionData), WebCore::Fixed));
</span><span class="cx">         case CalcPercent:
</span><span class="cx">         case CalcPercentLength: {
</span><del>-            CSSPrimitiveValue* primitiveValue = m_value.get();
-            return std::make_unique&lt;CalcExpressionLength&gt;(primitiveValue
-                ? primitiveValue-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion&gt;(conversionData) : Length(Undefined));
</del><ins>+            return std::make_unique&lt;CalcExpressionLength&gt;(m_value-&gt;convertToLength&lt;FixedFloatConversion | PercentConversion&gt;(conversionData));
</ins><span class="cx">         }
</span><span class="cx">         // Only types that could be part of a Length expression can be converted
</span><span class="cx">         // to a CalcExpressionNode. CalcPercentNumber makes no sense as a Length.
</span><span class="lines">@@ -283,7 +281,7 @@
</span><span class="cx">         if (type() != other.type())
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        return compareCSSValuePtr(m_value, static_cast&lt;const CSSCalcPrimitiveValue&amp;&gt;(other).m_value);
</del><ins>+        return compareCSSValue(m_value, static_cast&lt;const CSSCalcPrimitiveValue&amp;&gt;(other).m_value);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Type type() const override { return CssCalcPrimitiveValue; }
</span><span class="lines">@@ -293,13 +291,13 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit CSSCalcPrimitiveValue(PassRefPtr&lt;CSSPrimitiveValue&gt; value, bool isInteger)
</del><ins>+    explicit CSSCalcPrimitiveValue(Ref&lt;CSSPrimitiveValue&gt;&amp;&amp; value, bool isInteger)
</ins><span class="cx">         : CSSCalcExpressionNode(unitCategory((CSSPrimitiveValue::UnitTypes)value-&gt;primitiveType()), isInteger)
</span><del>-        , m_value(value)
</del><ins>+        , m_value(WTFMove(value))
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSPrimitiveValue&gt; m_value;
</del><ins>+    Ref&lt;CSSPrimitiveValue&gt; m_value;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> static const CalculationCategory addSubtractResult[CalcAngle][CalcAngle] = {
</span><span class="lines">@@ -610,8 +608,7 @@
</span><span class="cx">         if (!is&lt;CSSPrimitiveValue&gt;(value.get()))
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        CSSPrimitiveValue&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(*value);
-        result-&gt;value = CSSCalcPrimitiveValue::create(&amp;primitiveValue, parserValue-&gt;isInt);
</del><ins>+        result-&gt;value = CSSCalcPrimitiveValue::create(Ref&lt;CSSPrimitiveValue&gt;(downcast&lt;CSSPrimitiveValue&gt;(*value)), parserValue-&gt;isInt);
</ins><span class="cx"> 
</span><span class="cx">         ++*index;
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSMediaRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSMediaRule.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSMediaRule.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSMediaRule.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include &quot;CSSRuleList.h&quot;
</span><span class="cx"> #include &quot;CSSStyleSheet.h&quot;
</span><span class="cx"> #include &quot;ExceptionCode.h&quot;
</span><ins>+#include &quot;MediaList.h&quot;
</ins><span class="cx"> #include &quot;StyleRule.h&quot;
</span><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -65,7 +66,7 @@
</span><span class="cx"> MediaList* CSSMediaRule::media() const
</span><span class="cx"> {
</span><span class="cx">     if (!mediaQueries())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     if (!m_mediaCSSOMWrapper)
</span><span class="cx">         m_mediaCSSOMWrapper = MediaList::create(mediaQueries(), const_cast&lt;CSSMediaRule*&gt;(this));
</span><span class="cx">     return m_mediaCSSOMWrapper.get();
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSMediaRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSMediaRule.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSMediaRule.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSMediaRule.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -20,14 +20,13 @@
</span><span class="cx">  * Boston, MA 02110-1301, USA.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef CSSMediaRule_h
-#define CSSMediaRule_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;CSSGroupingRule.h&quot;
</span><del>-#include &quot;MediaList.h&quot;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class MediaList;
</ins><span class="cx"> class StyleRuleMedia;
</span><span class="cx"> 
</span><span class="cx"> class CSSMediaRule final : public CSSGroupingRule {
</span><span class="lines">@@ -54,5 +53,3 @@
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_CSS_RULE(CSSMediaRule, CSSRule::MEDIA_RULE)
</span><del>-
-#endif // CSSMediaRule_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSOMUtilsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSOMUtils.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSOMUtils.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSOMUtils.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -28,12 +28,10 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef CSSOMUtils_h
-#define CSSOMUtils_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><del>-#include &lt;unicode/utypes.h&gt;
</del><ins>+#include &lt;unicode/umachine.h&gt;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><del>-#include &lt;wtf/Vector.h&gt;
</del><span class="cx"> 
</span><span class="cx"> // Utilities for CSSOM http://dev.w3.org/csswg/cssom/
</span><span class="cx"> 
</span><span class="lines">@@ -46,5 +44,3 @@
</span><span class="cx"> void serializeString(const String&amp;, StringBuilder&amp;);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // CSSOMUtils_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -12805,7 +12805,7 @@
</span><span class="cx">         popRuleData();
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><del>-    auto rule = StyleRuleImport::create(url, media);
</del><ins>+    auto rule = StyleRuleImport::create(url, media.releaseNonNull());
</ins><span class="cx">     processAndAddNewRuleToSourceTreeIfNeeded();
</span><span class="cx">     return WTFMove(rule);
</span><span class="cx"> }
</span><span class="lines">@@ -12820,7 +12820,7 @@
</span><span class="cx">         // even when it is syntactically incorrect.
</span><span class="cx">         rule = StyleRuleMedia::create(MediaQuerySet::create(), emptyRules);
</span><span class="cx">     } else
</span><del>-        rule = StyleRuleMedia::create(media, rules ? *rules : emptyRules);
</del><ins>+        rule = StyleRuleMedia::create(media.releaseNonNull(), rules ? *rules : emptyRules);
</ins><span class="cx">     processAndAddNewRuleToSourceTreeIfNeeded();
</span><span class="cx">     return rule.releaseNonNull();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSReflectValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSReflectValue.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSReflectValue.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSReflectValue.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -23,12 +23,10 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef CSSReflectValue_h
-#define CSSReflectValue_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;CSSReflectionDirection.h&quot;
</span><span class="cx"> #include &quot;CSSValue.h&quot;
</span><del>-#include &lt;wtf/PassRefPtr.h&gt;
</del><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -71,5 +69,3 @@
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSReflectValue, isReflectValue())
</span><del>-
-#endif // CSSReflectValue_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSStyleSheet.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -222,9 +222,9 @@
</span><span class="cx">     didMutate();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CSSStyleSheet::setMediaQueries(PassRefPtr&lt;MediaQuerySet&gt; mediaQueries)
</del><ins>+void CSSStyleSheet::setMediaQueries(Ref&lt;MediaQuerySet&gt;&amp;&amp; mediaQueries)
</ins><span class="cx"> {
</span><del>-    m_mediaQueries = mediaQueries;
</del><ins>+    m_mediaQueries = WTFMove(mediaQueries);
</ins><span class="cx">     if (m_mediaCSSOMWrapper &amp;&amp; m_mediaQueries)
</span><span class="cx">         m_mediaCSSOMWrapper-&gt;reattach(m_mediaQueries.get());
</span><span class="cx"> 
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx"> 
</span><span class="cx">     RuleMutationScope mutationScope(this, RuleInsertion, is&lt;StyleRuleKeyframes&gt;(*rule) ? downcast&lt;StyleRuleKeyframes&gt;(rule.get()) : nullptr);
</span><span class="cx"> 
</span><del>-    bool success = m_contents.get().wrapperInsertRule(rule, index);
</del><ins>+    bool success = m_contents.get().wrapperInsertRule(rule.releaseNonNull(), index);
</ins><span class="cx">     if (!success) {
</span><span class="cx">         ec = HIERARCHY_REQUEST_ERR;
</span><span class="cx">         return 0;
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!m_childRuleCSSOMWrappers.isEmpty()) {
</span><span class="cx">         if (m_childRuleCSSOMWrappers[index])
</span><del>-            m_childRuleCSSOMWrappers[index]-&gt;setParentStyleSheet(0);
</del><ins>+            m_childRuleCSSOMWrappers[index]-&gt;setParentStyleSheet(nullptr);
</ins><span class="cx">         m_childRuleCSSOMWrappers.remove(index);
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -381,9 +381,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaList* CSSStyleSheet::media() const 
</span><del>-{ 
</del><ins>+{
</ins><span class="cx">     if (!m_mediaQueries)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><span class="cx">     if (!m_mediaCSSOMWrapper)
</span><span class="cx">         m_mediaCSSOMWrapper = MediaList::create(m_mediaQueries.get(), const_cast&lt;CSSStyleSheet*&gt;(this));
</span><span class="lines">@@ -392,7 +392,7 @@
</span><span class="cx"> 
</span><span class="cx"> CSSStyleSheet* CSSStyleSheet::parentStyleSheet() const 
</span><span class="cx"> { 
</span><del>-    return m_ownerRule ? m_ownerRule-&gt;parentStyleSheet() : 0; 
</del><ins>+    return m_ownerRule ? m_ownerRule-&gt;parentStyleSheet() : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Document* CSSStyleSheet::ownerDocument() const
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx">     const CSSStyleSheet* root = this;
</span><span class="cx">     while (root-&gt;parentStyleSheet())
</span><span class="cx">         root = root-&gt;parentStyleSheet();
</span><del>-    return root-&gt;ownerNode() ? &amp;root-&gt;ownerNode()-&gt;document() : 0;
</del><ins>+    return root-&gt;ownerNode() ? &amp;root-&gt;ownerNode()-&gt;document() : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CSSStyleSheet::clearChildRuleCSSOMWrappers()
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSRule* rule)
</span><del>-    : m_styleSheet(rule ? rule-&gt;parentStyleSheet() : 0)
</del><ins>+    : m_styleSheet(rule ? rule-&gt;parentStyleSheet() : nullptr)
</ins><span class="cx">     , m_mutationType(OtherMutation)
</span><span class="cx">     , m_contentsWereClonedForMutation(ContentsWereNotClonedForMutation)
</span><span class="cx">     , m_insertedKeyframesRule(nullptr)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleSheeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleSheet.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleSheet.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/CSSStyleSheet.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -22,7 +22,6 @@
</span><span class="cx"> #define CSSStyleSheet_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSParserMode.h&quot;
</span><del>-#include &quot;CSSRule.h&quot;
</del><span class="cx"> #include &quot;StyleSheet.h&quot;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="lines">@@ -85,7 +84,7 @@
</span><span class="cx">     void clearOwnerRule() { m_ownerRule = 0; }
</span><span class="cx">     Document* ownerDocument() const;
</span><span class="cx">     MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); }
</span><del>-    void setMediaQueries(PassRefPtr&lt;MediaQuerySet&gt;);
</del><ins>+    void setMediaQueries(Ref&lt;MediaQuerySet&gt;&amp;&amp;);
</ins><span class="cx">     void setTitle(const String&amp; title) { m_title = title; }
</span><span class="cx"> 
</span><span class="cx">     bool hadRulesMutation() const { return m_mutatedRules; }
</span></span></pre></div>
<a id="trunkSourceWebCorecssPropertySetCSSStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;CSSCustomPropertyValue.h&quot;
</span><span class="cx"> #include &quot;CSSParser.h&quot;
</span><ins>+#include &quot;CSSRule.h&quot;
</ins><span class="cx"> #include &quot;CSSStyleSheet.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;InspectorInstrumentation.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleRule.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleRule.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/StyleRule.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;CSSStyleRule.h&quot;
</span><span class="cx"> #include &quot;CSSSupportsRule.h&quot;
</span><span class="cx"> #include &quot;CSSUnknownRule.h&quot;
</span><ins>+#include &quot;MediaList.h&quot;
</ins><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StyleRuleImport.h&quot;
</span><span class="cx"> #include &quot;WebKitCSSRegionRule.h&quot;
</span><span class="lines">@@ -45,14 +46,14 @@
</span><span class="cx"> 
</span><span class="cx"> COMPILE_ASSERT(sizeof(StyleRuleBase) == sizeof(SameSizeAsStyleRuleBase), StyleRuleBase_should_stay_small);
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;CSSRule&gt; StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet) const
</del><ins>+RefPtr&lt;CSSRule&gt; StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet) const
</ins><span class="cx"> {
</span><del>-    return createCSSOMWrapper(parentSheet, 0);
</del><ins>+    return createCSSOMWrapper(parentSheet, nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;CSSRule&gt; StyleRuleBase::createCSSOMWrapper(CSSRule* parentRule) const
</del><ins>+RefPtr&lt;CSSRule&gt; StyleRuleBase::createCSSOMWrapper(CSSRule* parentRule) const
</ins><span class="cx"> { 
</span><del>-    return createCSSOMWrapper(0, parentRule);
</del><ins>+    return createCSSOMWrapper(nullptr, parentRule);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void StyleRuleBase::destroy()
</span><span class="lines">@@ -329,9 +330,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-StyleRuleMedia::StyleRuleMedia(PassRefPtr&lt;MediaQuerySet&gt; media, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules)
</del><ins>+StyleRuleMedia::StyleRuleMedia(Ref&lt;MediaQuerySet&gt;&amp;&amp; media, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules)
</ins><span class="cx">     : StyleRuleGroup(Media, adoptRules)
</span><del>-    , m_mediaQueries(media)
</del><ins>+    , m_mediaQueries(WTFMove(media))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleRule.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleRule.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/StyleRule.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -19,11 +19,9 @@
</span><span class="cx">  * Boston, MA 02110-1301, USA.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef StyleRule_h
-#define StyleRule_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;CSSSelectorList.h&quot;
</span><del>-#include &quot;MediaList.h&quot;
</del><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/TypeCasts.h&gt;
</span><span class="lines">@@ -33,6 +31,7 @@
</span><span class="cx"> class CSSRule;
</span><span class="cx"> class CSSStyleRule;
</span><span class="cx"> class CSSStyleSheet;
</span><ins>+class MediaQuerySet;
</ins><span class="cx"> class MutableStyleProperties;
</span><span class="cx"> class StyleProperties;
</span><span class="cx"> 
</span><span class="lines">@@ -82,8 +81,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // FIXME: There shouldn't be any need for the null parent version.
</span><del>-    PassRefPtr&lt;CSSRule&gt; createCSSOMWrapper(CSSStyleSheet* parentSheet = 0) const;
-    PassRefPtr&lt;CSSRule&gt; createCSSOMWrapper(CSSRule* parentRule) const;
</del><ins>+    RefPtr&lt;CSSRule&gt; createCSSOMWrapper(CSSStyleSheet* parentSheet = nullptr) const;
+    RefPtr&lt;CSSRule&gt; createCSSOMWrapper(CSSRule* parentRule) const;
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     StyleRuleBase(Type type, signed sourceLine = 0) : m_type(type), m_sourceLine(sourceLine) { }
</span><span class="lines">@@ -193,9 +192,9 @@
</span><span class="cx"> 
</span><span class="cx"> class StyleRuleMedia : public StyleRuleGroup {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;StyleRuleMedia&gt; create(PassRefPtr&lt;MediaQuerySet&gt; media, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules)
</del><ins>+    static Ref&lt;StyleRuleMedia&gt; create(Ref&lt;MediaQuerySet&gt;&amp;&amp; media, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new StyleRuleMedia(media, adoptRules));
</del><ins>+        return adoptRef(*new StyleRuleMedia(WTFMove(media), adoptRules));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     MediaQuerySet* mediaQueries() const { return m_mediaQueries.get(); }
</span><span class="lines">@@ -203,7 +202,7 @@
</span><span class="cx">     Ref&lt;StyleRuleMedia&gt; copy() const { return adoptRef(*new StyleRuleMedia(*this)); }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    StyleRuleMedia(PassRefPtr&lt;MediaQuerySet&gt;, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules);
</del><ins>+    StyleRuleMedia(Ref&lt;MediaQuerySet&gt;&amp;&amp;, Vector&lt;RefPtr&lt;StyleRuleBase&gt;&gt;&amp; adoptRules);
</ins><span class="cx">     StyleRuleMedia(const StyleRuleMedia&amp;);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;MediaQuerySet&gt; m_mediaQueries;
</span><span class="lines">@@ -297,5 +296,3 @@
</span><span class="cx">     static bool isType(const WebCore::StyleRuleBase&amp; rule) { return rule.isViewportRule(); }
</span><span class="cx"> SPECIALIZE_TYPE_TRAITS_END()
</span><span class="cx"> #endif // ENABLE(CSS_DEVICE_ADAPTATION)
</span><del>-
-#endif // StyleRule_h
</del></span></pre></div>
<a id="trunkSourceWebCorecssStyleRuleImportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleRuleImport.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleRuleImport.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/StyleRuleImport.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -28,23 +28,24 @@
</span><span class="cx"> #include &quot;CachedResourceRequest.h&quot;
</span><span class="cx"> #include &quot;CachedResourceRequestInitiators.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><ins>+#include &quot;MediaList.h&quot;
</ins><span class="cx"> #include &quot;SecurityOrigin.h&quot;
</span><span class="cx"> #include &quot;StyleSheetContents.h&quot;
</span><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref&lt;StyleRuleImport&gt; StyleRuleImport::create(const String&amp; href, PassRefPtr&lt;MediaQuerySet&gt; media)
</del><ins>+Ref&lt;StyleRuleImport&gt; StyleRuleImport::create(const String&amp; href, Ref&lt;MediaQuerySet&gt;&amp;&amp; media)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new StyleRuleImport(href, media));
</del><ins>+    return adoptRef(*new StyleRuleImport(href, WTFMove(media)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleRuleImport::StyleRuleImport(const String&amp; href, PassRefPtr&lt;MediaQuerySet&gt; media)
</del><ins>+StyleRuleImport::StyleRuleImport(const String&amp; href, Ref&lt;MediaQuerySet&gt;&amp;&amp; media)
</ins><span class="cx">     : StyleRuleBase(Import, 0)
</span><span class="cx">     , m_parentStyleSheet(0)
</span><span class="cx">     , m_styleSheetClient(this)
</span><span class="cx">     , m_strHref(href)
</span><del>-    , m_mediaQueries(media)
</del><ins>+    , m_mediaQueries(WTFMove(media))
</ins><span class="cx">     , m_cachedSheet(0)
</span><span class="cx">     , m_loading(false)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleRuleImporth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleRuleImport.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleRuleImport.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/StyleRuleImport.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> class StyleRuleImport : public StyleRuleBase {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static Ref&lt;StyleRuleImport&gt; create(const String&amp; href, PassRefPtr&lt;MediaQuerySet&gt;);
</del><ins>+    static Ref&lt;StyleRuleImport&gt; create(const String&amp; href, Ref&lt;MediaQuerySet&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     ~StyleRuleImport();
</span><span class="cx">     
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     void setCSSStyleSheet(const String&amp; href, const URL&amp; baseURL, const String&amp; charset, const CachedCSSStyleSheet*);
</span><span class="cx">     friend class ImportedStyleSheetClient;
</span><span class="cx"> 
</span><del>-    StyleRuleImport(const String&amp; href, PassRefPtr&lt;MediaQuerySet&gt;);
</del><ins>+    StyleRuleImport(const String&amp; href, Ref&lt;MediaQuerySet&gt;&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     StyleSheetContents* m_parentStyleSheet;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetContentscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetContents.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -129,13 +129,13 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void StyleSheetContents::parserAppendRule(PassRefPtr&lt;StyleRuleBase&gt; rule)
</del><ins>+void StyleSheetContents::parserAppendRule(Ref&lt;StyleRuleBase&gt;&amp;&amp; rule)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!rule-&gt;isCharsetRule());
</span><del>-    if (is&lt;StyleRuleImport&gt;(*rule)) {
</del><ins>+    if (is&lt;StyleRuleImport&gt;(rule)) {
</ins><span class="cx">         // Parser enforces that @import rules come before anything else except @charset.
</span><span class="cx">         ASSERT(m_childRules.isEmpty());
</span><del>-        m_importRules.append(downcast&lt;StyleRuleImport&gt;(rule.get()));
</del><ins>+        m_importRules.append(downcast&lt;StyleRuleImport&gt;(rule.ptr()));
</ins><span class="cx">         m_importRules.last()-&gt;setParentStyleSheet(this);
</span><span class="cx">         m_importRules.last()-&gt;requestStyleSheet();
</span><span class="cx">         return;
</span><span class="lines">@@ -143,19 +143,19 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(RESOLUTION_MEDIA_QUERY)
</span><span class="cx">     // Add warning message to inspector if dpi/dpcm values are used for screen media.
</span><del>-    if (is&lt;StyleRuleMedia&gt;(*rule))
-        reportMediaQueryWarningIfNeeded(singleOwnerDocument(), downcast&lt;StyleRuleMedia&gt;(*rule).mediaQueries());
</del><ins>+    if (is&lt;StyleRuleMedia&gt;(rule))
+        reportMediaQueryWarningIfNeeded(singleOwnerDocument(), downcast&lt;StyleRuleMedia&gt;(rule.get()).mediaQueries());
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // NOTE: The selector list has to fit into RuleData. &lt;http://webkit.org/b/118369&gt;
</span><span class="cx">     // If we're adding a rule with a huge number of selectors, split it up into multiple rules
</span><del>-    if (is&lt;StyleRule&gt;(*rule) &amp;&amp; downcast&lt;StyleRule&gt;(*rule).selectorList().componentCount() &gt; RuleData::maximumSelectorComponentCount) {
-        Vector&lt;RefPtr&lt;StyleRule&gt;&gt; rules = downcast&lt;StyleRule&gt;(*rule).splitIntoMultipleRulesWithMaximumSelectorComponentCount(RuleData::maximumSelectorComponentCount);
</del><ins>+    if (is&lt;StyleRule&gt;(rule) &amp;&amp; downcast&lt;StyleRule&gt;(rule.get()).selectorList().componentCount() &gt; RuleData::maximumSelectorComponentCount) {
+        Vector&lt;RefPtr&lt;StyleRule&gt;&gt; rules = downcast&lt;StyleRule&gt;(rule.get()).splitIntoMultipleRulesWithMaximumSelectorComponentCount(RuleData::maximumSelectorComponentCount);
</ins><span class="cx">         m_childRules.appendVector(rules);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_childRules.append(rule);
</del><ins>+    m_childRules.append(WTFMove(rule));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> StyleRuleBase* StyleSheetContents::ruleAt(unsigned index) const
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx">     m_encodingFromCharsetRule = encoding; 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool StyleSheetContents::wrapperInsertRule(PassRefPtr&lt;StyleRuleBase&gt; rule, unsigned index)
</del><ins>+bool StyleSheetContents::wrapperInsertRule(Ref&lt;StyleRuleBase&gt;&amp;&amp; rule, unsigned index)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_isMutable);
</span><span class="cx">     ASSERT_WITH_SECURITY_IMPLICATION(index &lt;= ruleCount());
</span><span class="lines">@@ -226,24 +226,24 @@
</span><span class="cx">     
</span><span class="cx">     if (childVectorIndex &lt; m_importRules.size() || (childVectorIndex == m_importRules.size() &amp;&amp; rule-&gt;isImportRule())) {
</span><span class="cx">         // Inserting non-import rule before @import is not allowed.
</span><del>-        if (!is&lt;StyleRuleImport&gt;(*rule))
</del><ins>+        if (!is&lt;StyleRuleImport&gt;(rule))
</ins><span class="cx">             return false;
</span><del>-        m_importRules.insert(childVectorIndex, downcast&lt;StyleRuleImport&gt;(rule.get()));
</del><ins>+        m_importRules.insert(childVectorIndex, downcast&lt;StyleRuleImport&gt;(rule.ptr()));
</ins><span class="cx">         m_importRules[childVectorIndex]-&gt;setParentStyleSheet(this);
</span><span class="cx">         m_importRules[childVectorIndex]-&gt;requestStyleSheet();
</span><span class="cx">         // FIXME: Stylesheet doesn't actually change meaningfully before the imported sheets are loaded.
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx">     // Inserting @import rule after a non-import rule is not allowed.
</span><del>-    if (is&lt;StyleRuleImport&gt;(*rule))
</del><ins>+    if (is&lt;StyleRuleImport&gt;(rule))
</ins><span class="cx">         return false;
</span><span class="cx">     childVectorIndex -= m_importRules.size();
</span><span class="cx"> 
</span><span class="cx">     // If the number of selectors would overflow RuleData, we drop the operation.
</span><del>-    if (is&lt;StyleRule&gt;(*rule) &amp;&amp; downcast&lt;StyleRule&gt;(*rule).selectorList().componentCount() &gt; RuleData::maximumSelectorComponentCount)
</del><ins>+    if (is&lt;StyleRule&gt;(rule) &amp;&amp; downcast&lt;StyleRule&gt;(rule.get()).selectorList().componentCount() &gt; RuleData::maximumSelectorComponentCount)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    m_childRules.insert(childVectorIndex, rule);
</del><ins>+    m_childRules.insert(childVectorIndex, WTFMove(rule));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetContentsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetContents.h (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetContents.h        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/css/StyleSheetContents.h        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx">     bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
</span><span class="cx"> 
</span><span class="cx">     void parserAddNamespace(const AtomicString&amp; prefix, const AtomicString&amp; uri);
</span><del>-    void parserAppendRule(PassRefPtr&lt;StyleRuleBase&gt;);
</del><ins>+    void parserAppendRule(Ref&lt;StyleRuleBase&gt;&amp;&amp;);
</ins><span class="cx">     void parserSetEncodingFromCharsetRule(const String&amp; encoding); 
</span><span class="cx">     void parserSetUsesRemUnits() { m_usesRemUnits = true; }
</span><span class="cx">     void parserSetUsesStyleBasedEditability() { m_usesStyleBasedEditability = true; }
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned estimatedSizeInBytes() const;
</span><span class="cx">     
</span><del>-    bool wrapperInsertRule(PassRefPtr&lt;StyleRuleBase&gt;, unsigned index);
</del><ins>+    bool wrapperInsertRule(Ref&lt;StyleRuleBase&gt;&amp;&amp;, unsigned index);
</ins><span class="cx">     void wrapperDeleteRule(unsigned index);
</span><span class="cx"> 
</span><span class="cx">     Ref&lt;StyleSheetContents&gt; copy() const { return adoptRef(*new StyleSheetContents(*this)); }
</span></span></pre></div>
<a id="trunkSourceWebCoredomInlineStyleSheetOwnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">     m_loading = true;
</span><span class="cx"> 
</span><span class="cx">     m_sheet = CSSStyleSheet::createInline(element, URL(), m_startTextPosition, document.encoding());
</span><del>-    m_sheet-&gt;setMediaQueries(mediaQueries.release());
</del><ins>+    m_sheet-&gt;setMediaQueries(mediaQueries.releaseNonNull());
</ins><span class="cx">     m_sheet-&gt;setTitle(element.title());
</span><span class="cx">     m_sheet-&gt;contents().parseStringAtPosition(text, m_startTextPosition, m_isParsingChildren);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (201317 => 201318)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2016-05-24 05:19:00 UTC (rev 201317)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2016-05-24 05:34:49 UTC (rev 201318)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #include &quot;HTMLStyleElement.h&quot;
</span><span class="cx"> #include &quot;InspectorCSSAgent.h&quot;
</span><span class="cx"> #include &quot;InspectorPageAgent.h&quot;
</span><ins>+#include &quot;MediaList.h&quot;
</ins><span class="cx"> #include &quot;Node.h&quot;
</span><span class="cx"> #include &quot;SVGElement.h&quot;
</span><span class="cx"> #include &quot;SVGNames.h&quot;
</span></span></pre>
</div>
</div>

</body>
</html>