<!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>[173905] 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/173905">173905</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-09-23 18:45:40 -0700 (Tue, 23 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Have CSS classes' methods return more references
https://bugs.webkit.org/show_bug.cgi?id=137036

Reviewed by Ryosuke Niwa.

Have CSS classes' methods return more references instead of pointers
when possible.

No new tests, no behavior change.

* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::style):
* css/CSSFontFaceRule.h:
* css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::cssRules):
* css/CSSGroupingRule.h:
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::media):
* css/CSSImportRule.h:
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::style):
* css/CSSPageRule.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::style):
* css/CSSStyleRule.h:
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::style):
* css/WebKitCSSKeyframeRule.h:
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::WebKitCSSKeyframesRule::cssRules):
* css/WebKitCSSKeyframesRule.h:
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::style):
* css/WebKitCSSViewportRule.h:
* inspector/InspectorStyleSheet.cpp:
(WebCore::asCSSRuleList):
(WebCore::fillMediaListChain):
(WebCore::InspectorStyleSheet::setRuleSelector):
(WebCore::InspectorStyleSheet::deleteRule):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::styleForId):
(WebCore::InspectorStyleSheet::ruleIndexByStyle):
(WebCore::InspectorStyleSheet::ruleId):
(WebCore::InspectorStyleSheet::revalidateStyle):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceRulecpp">trunk/Source/WebCore/css/CSSFontFaceRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFaceRuleh">trunk/Source/WebCore/css/CSSFontFaceRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSGroupingRulecpp">trunk/Source/WebCore/css/CSSGroupingRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSGroupingRuleh">trunk/Source/WebCore/css/CSSGroupingRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSImportRulecpp">trunk/Source/WebCore/css/CSSImportRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSImportRuleh">trunk/Source/WebCore/css/CSSImportRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPageRulecpp">trunk/Source/WebCore/css/CSSPageRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSPageRuleh">trunk/Source/WebCore/css/CSSPageRule.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleRulecpp">trunk/Source/WebCore/css/CSSStyleRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSStyleRuleh">trunk/Source/WebCore/css/CSSStyleRule.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSKeyframeRulecpp">trunk/Source/WebCore/css/WebKitCSSKeyframeRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSKeyframeRuleh">trunk/Source/WebCore/css/WebKitCSSKeyframeRule.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSKeyframesRulecpp">trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSKeyframesRuleh">trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSViewportRulecpp">trunk/Source/WebCore/css/WebKitCSSViewportRule.cpp</a></li>
<li><a href="#trunkSourceWebCorecssWebKitCSSViewportRuleh">trunk/Source/WebCore/css/WebKitCSSViewportRule.h</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 (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/ChangeLog        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2014-09-23  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Have CSS classes' methods return more references
+        https://bugs.webkit.org/show_bug.cgi?id=137036
+
+        Reviewed by Ryosuke Niwa.
+
+        Have CSS classes' methods return more references instead of pointers
+        when possible.
+
+        No new tests, no behavior change.
+
+        * css/CSSFontFaceRule.cpp:
+        (WebCore::CSSFontFaceRule::style):
+        * css/CSSFontFaceRule.h:
+        * css/CSSGroupingRule.cpp:
+        (WebCore::CSSGroupingRule::cssRules):
+        * css/CSSGroupingRule.h:
+        * css/CSSImportRule.cpp:
+        (WebCore::CSSImportRule::media):
+        * css/CSSImportRule.h:
+        * css/CSSPageRule.cpp:
+        (WebCore::CSSPageRule::style):
+        * css/CSSPageRule.h:
+        * css/CSSStyleRule.cpp:
+        (WebCore::CSSStyleRule::style):
+        * css/CSSStyleRule.h:
+        * css/WebKitCSSKeyframeRule.cpp:
+        (WebCore::WebKitCSSKeyframeRule::style):
+        * css/WebKitCSSKeyframeRule.h:
+        * css/WebKitCSSKeyframesRule.cpp:
+        (WebCore::WebKitCSSKeyframesRule::cssRules):
+        * css/WebKitCSSKeyframesRule.h:
+        * css/WebKitCSSViewportRule.cpp:
+        (WebCore::WebKitCSSViewportRule::style):
+        * css/WebKitCSSViewportRule.h:
+        * inspector/InspectorStyleSheet.cpp:
+        (WebCore::asCSSRuleList):
+        (WebCore::fillMediaListChain):
+        (WebCore::InspectorStyleSheet::setRuleSelector):
+        (WebCore::InspectorStyleSheet::deleteRule):
+        (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
+        (WebCore::InspectorStyleSheet::buildObjectForRule):
+        (WebCore::InspectorStyleSheet::styleForId):
+        (WebCore::InspectorStyleSheet::ruleIndexByStyle):
+        (WebCore::InspectorStyleSheet::ruleId):
+        (WebCore::InspectorStyleSheet::revalidateStyle):
+
</ins><span class="cx"> 2014-09-23  Roger Fong  &lt;roger_fong@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Windows] Enable CSS Supports Rule on Windows.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSFontFaceRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -41,11 +41,11 @@
</span><span class="cx">         m_propertiesCSSOMWrapper-&gt;clearParentRule();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSStyleDeclaration* CSSFontFaceRule::style()
</del><ins>+CSSStyleDeclaration&amp; CSSFontFaceRule::style()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_propertiesCSSOMWrapper)
</span><span class="cx">         m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_fontFaceRule-&gt;mutableProperties(), *this);
</span><del>-    return m_propertiesCSSOMWrapper.get();
</del><ins>+    return *m_propertiesCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String CSSFontFaceRule::cssText() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFaceRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFaceRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFaceRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSFontFaceRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     virtual String cssText() const override;
</span><span class="cx">     virtual void reattach(StyleRuleBase*) override;
</span><span class="cx"> 
</span><del>-    CSSStyleDeclaration* style();
</del><ins>+    CSSStyleDeclaration&amp; style();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     CSSFontFaceRule(StyleRuleFontFace*, CSSStyleSheet* parent);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGroupingRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGroupingRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGroupingRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSGroupingRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -141,11 +141,11 @@
</span><span class="cx">     return rule.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSRuleList* CSSGroupingRule::cssRules() const
</del><ins>+CSSRuleList&amp; CSSGroupingRule::cssRules() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_ruleListCSSOMWrapper)
</span><span class="cx">         m_ruleListCSSOMWrapper = std::make_unique&lt;LiveCSSRuleList&lt;CSSGroupingRule&gt;&gt;(const_cast&lt;CSSGroupingRule*&gt;(this));
</span><del>-    return m_ruleListCSSOMWrapper.get();
</del><ins>+    return *m_ruleListCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CSSGroupingRule::reattach(StyleRuleBase* rule)
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGroupingRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGroupingRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGroupingRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSGroupingRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void reattach(StyleRuleBase*) override;
</span><span class="cx"> 
</span><del>-    CSSRuleList* cssRules() const;
</del><ins>+    CSSRuleList&amp; cssRules() const;
</ins><span class="cx"> 
</span><span class="cx">     unsigned insertRule(const String&amp; rule, unsigned index, ExceptionCode&amp;);
</span><span class="cx">     void deleteRule(unsigned index, ExceptionCode&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImportRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImportRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImportRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSImportRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -53,11 +53,11 @@
</span><span class="cx">     return m_importRule-&gt;href();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-MediaList* CSSImportRule::media() const
</del><ins>+MediaList&amp; CSSImportRule::media() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_mediaCSSOMWrapper)
</span><span class="cx">         m_mediaCSSOMWrapper = MediaList::create(m_importRule-&gt;mediaQueries(), const_cast&lt;CSSImportRule*&gt;(this));
</span><del>-    return m_mediaCSSOMWrapper.get();
</del><ins>+    return *m_mediaCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String CSSImportRule::cssText() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSImportRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSImportRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSImportRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSImportRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">     virtual void reattach(StyleRuleBase*) override;
</span><span class="cx"> 
</span><span class="cx">     String href() const;
</span><del>-    MediaList* media() const;
</del><ins>+    MediaList&amp; media() const;
</ins><span class="cx">     CSSStyleSheet* styleSheet() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPageRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPageRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPageRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSPageRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -46,11 +46,11 @@
</span><span class="cx">         m_propertiesCSSOMWrapper-&gt;clearParentRule();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSStyleDeclaration* CSSPageRule::style()
</del><ins>+CSSStyleDeclaration&amp; CSSPageRule::style()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_propertiesCSSOMWrapper)
</span><span class="cx">         m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_pageRule-&gt;mutableProperties(), *this);
</span><del>-    return m_propertiesCSSOMWrapper.get();
</del><ins>+    return *m_propertiesCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String CSSPageRule::selectorText() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPageRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPageRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPageRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSPageRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     virtual String cssText() const override;
</span><span class="cx">     virtual void reattach(StyleRuleBase*) override;
</span><span class="cx"> 
</span><del>-    CSSStyleDeclaration* style();
</del><ins>+    CSSStyleDeclaration&amp; style();
</ins><span class="cx"> 
</span><span class="cx">     String selectorText() const;
</span><span class="cx">     void setSelectorText(const String&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSStyleRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -59,12 +59,11 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSStyleDeclaration* CSSStyleRule::style()
</del><ins>+CSSStyleDeclaration&amp; CSSStyleRule::style()
</ins><span class="cx"> {
</span><del>-    if (!m_propertiesCSSOMWrapper) {
</del><ins>+    if (!m_propertiesCSSOMWrapper)
</ins><span class="cx">         m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_styleRule-&gt;mutableProperties(), *this);
</span><del>-    }
-    return m_propertiesCSSOMWrapper.get();
</del><ins>+    return *m_propertiesCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String CSSStyleRule::generateSelectorText() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSStyleRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSStyleRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSStyleRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/CSSStyleRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     String selectorText() const;
</span><span class="cx">     void setSelectorText(const String&amp;);
</span><span class="cx"> 
</span><del>-    CSSStyleDeclaration* style();
</del><ins>+    CSSStyleDeclaration&amp; style();
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Not CSSOM. Remove.
</span><span class="cx">     StyleRule* styleRule() const { return m_styleRule.get(); }
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSKeyframeRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSKeyframeRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSKeyframeRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframeRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -105,11 +105,11 @@
</span><span class="cx">         m_propertiesCSSOMWrapper-&gt;clearParentRule();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSStyleDeclaration* WebKitCSSKeyframeRule::style()
</del><ins>+CSSStyleDeclaration&amp; WebKitCSSKeyframeRule::style()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_propertiesCSSOMWrapper)
</span><span class="cx">         m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_keyframe-&gt;mutableProperties(), *this);
</span><del>-    return m_propertiesCSSOMWrapper.get();
</del><ins>+    return *m_propertiesCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebKitCSSKeyframeRule::reattach(StyleRuleBase*)
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSKeyframeRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSKeyframeRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSKeyframeRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframeRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     String keyText() const { return m_keyframe-&gt;keyText(); }
</span><span class="cx">     void setKeyText(const String&amp; s) { m_keyframe-&gt;setKeyText(s); }
</span><span class="cx"> 
</span><del>-    CSSStyleDeclaration* style();
</del><ins>+    CSSStyleDeclaration&amp; style();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebKitCSSKeyframeRule(StyleKeyframe*, WebKitCSSKeyframesRule* parent);
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSKeyframesRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframesRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -185,11 +185,11 @@
</span><span class="cx">     return rule.get(); 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSRuleList* WebKitCSSKeyframesRule::cssRules()
</del><ins>+CSSRuleList&amp; WebKitCSSKeyframesRule::cssRules()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_ruleListCSSOMWrapper)
</span><span class="cx">         m_ruleListCSSOMWrapper = std::make_unique&lt;LiveCSSRuleList&lt;WebKitCSSKeyframesRule&gt;&gt;(this);
</span><del>-    return m_ruleListCSSOMWrapper.get();
</del><ins>+    return *m_ruleListCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebKitCSSKeyframesRule::reattach(StyleRuleBase* rule)
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSKeyframesRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/WebKitCSSKeyframesRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">     String name() const { return m_keyframesRule-&gt;name(); }
</span><span class="cx">     void setName(const String&amp;);
</span><span class="cx"> 
</span><del>-    CSSRuleList* cssRules();
</del><ins>+    CSSRuleList&amp; cssRules();
</ins><span class="cx"> 
</span><span class="cx">     void insertRule(const String&amp; rule);
</span><span class="cx">     void deleteRule(const String&amp; key);
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSViewportRulecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSViewportRule.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSViewportRule.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/WebKitCSSViewportRule.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -52,12 +52,12 @@
</span><span class="cx">         m_propertiesCSSOMWrapper-&gt;clearParentRule();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CSSStyleDeclaration* WebKitCSSViewportRule::style()
</del><ins>+CSSStyleDeclaration&amp; WebKitCSSViewportRule::style()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_propertiesCSSOMWrapper)
</span><span class="cx">         m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewportRule-&gt;mutableProperties(), *this);
</span><span class="cx"> 
</span><del>-    return m_propertiesCSSOMWrapper.get();
</del><ins>+    return *m_propertiesCSSOMWrapper;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String WebKitCSSViewportRule::cssText() const
</span></span></pre></div>
<a id="trunkSourceWebCorecssWebKitCSSViewportRuleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/WebKitCSSViewportRule.h (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/WebKitCSSViewportRule.h        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/css/WebKitCSSViewportRule.h        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     virtual String cssText() const override;
</span><span class="cx">     virtual void reattach(StyleRuleBase*) override;
</span><span class="cx"> 
</span><del>-    CSSStyleDeclaration* style();
</del><ins>+    CSSStyleDeclaration&amp; style();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     WebKitCSSViewportRule(StyleRuleViewport*, CSSStyleSheet*);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorStyleSheetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (173904 => 173905)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2014-09-24 00:52:37 UTC (rev 173904)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp        2014-09-24 01:45:40 UTC (rev 173905)
</span><span class="lines">@@ -215,14 +215,14 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (rule-&gt;type() == CSSRule::MEDIA_RULE)
</span><del>-        return toCSSMediaRule(rule)-&gt;cssRules();
</del><ins>+        return &amp;toCSSMediaRule(rule)-&gt;cssRules();
</ins><span class="cx"> 
</span><span class="cx">     if (rule-&gt;type() == CSSRule::WEBKIT_KEYFRAMES_RULE)
</span><del>-        return static_cast&lt;WebKitCSSKeyframesRule*&gt;(rule)-&gt;cssRules();
</del><ins>+        return &amp;static_cast&lt;WebKitCSSKeyframesRule*&gt;(rule)-&gt;cssRules();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS3_CONDITIONAL_RULES)
</span><span class="cx">     if (rule-&gt;type() == CSSRule::SUPPORTS_RULE)
</span><del>-        return toCSSSupportsRule(rule)-&gt;cssRules();
</del><ins>+        return &amp;toCSSSupportsRule(rule)-&gt;cssRules();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     return nullptr;
</span><span class="lines">@@ -242,7 +242,7 @@
</span><span class="cx">             parentStyleSheet = mediaRule-&gt;parentStyleSheet();
</span><span class="cx">         } else if (parentRule-&gt;type() == CSSRule::IMPORT_RULE) {
</span><span class="cx">             CSSImportRule* importRule = toCSSImportRule(parentRule);
</span><del>-            mediaList = importRule-&gt;media();
</del><ins>+            mediaList = &amp;importRule-&gt;media();
</ins><span class="cx">             parentStyleSheet = importRule-&gt;parentStyleSheet();
</span><span class="cx">             isMediaRule = false;
</span><span class="cx">         } else
</span><span class="lines">@@ -846,7 +846,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     rule-&gt;setSelectorText(selector);
</span><del>-    RefPtr&lt;CSSRuleSourceData&gt; sourceData = ruleSourceDataFor(rule-&gt;style());
</del><ins>+    RefPtr&lt;CSSRuleSourceData&gt; sourceData = ruleSourceDataFor(&amp;rule-&gt;style());
</ins><span class="cx">     if (!sourceData) {
</span><span class="cx">         ec = NOT_FOUND_ERR;
</span><span class="cx">         return false;
</span><span class="lines">@@ -929,7 +929,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;CSSRuleSourceData&gt; sourceData = ruleSourceDataFor(rule-&gt;style());
</del><ins>+    RefPtr&lt;CSSRuleSourceData&gt; sourceData = ruleSourceDataFor(&amp;rule-&gt;style());
</ins><span class="cx">     if (!sourceData) {
</span><span class="cx">         ec = NOT_FOUND_ERR;
</span><span class="cx">         return false;
</span><span class="lines">@@ -1018,7 +1018,7 @@
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;CSSRuleSourceData&gt; sourceData;
</span><span class="cx">     if (ensureParsedDataReady())
</span><del>-        sourceData = ruleSourceDataFor(rule-&gt;style());
</del><ins>+        sourceData = ruleSourceDataFor(&amp;rule-&gt;style());
</ins><span class="cx">     RefPtr&lt;Inspector::Protocol::Array&lt;String&gt;&gt; selectors;
</span><span class="cx"> 
</span><span class="cx">     // This intentionally does not rely on the source data to avoid catching the trailing comments (before the declaration starting '{').
</span><span class="lines">@@ -1051,7 +1051,7 @@
</span><span class="cx">         .setSelectorList(buildObjectForSelectorList(rule))
</span><span class="cx">         .setSourceLine(rule-&gt;styleRule()-&gt;sourceLine())
</span><span class="cx">         .setOrigin(m_origin)
</span><del>-        .setStyle(buildObjectForStyle(rule-&gt;style()));
</del><ins>+        .setStyle(buildObjectForStyle(&amp;rule-&gt;style()));
</ins><span class="cx"> 
</span><span class="cx">     // &quot;sourceURL&quot; is present only for regular rules, otherwise &quot;origin&quot; should be used in the frontend.
</span><span class="cx">     if (m_origin == Inspector::Protocol::CSS::StyleSheetOrigin::Regular)
</span><span class="lines">@@ -1165,7 +1165,7 @@
</span><span class="cx">     if (!rule)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return rule-&gt;style();
</del><ins>+    return &amp;rule-&gt;style();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorStyleSheet::fireStyleSheetChanged()
</span><span class="lines">@@ -1228,7 +1228,7 @@
</span><span class="cx">     ensureFlatRules();
</span><span class="cx">     unsigned index = 0;
</span><span class="cx">     for (unsigned i = 0, size = m_flatRules.size(); i &lt; size; ++i) {
</span><del>-        if (m_flatRules.at(i)-&gt;style() == pageStyle)
</del><ins>+        if (&amp;m_flatRules.at(i)-&gt;style() == pageStyle)
</ins><span class="cx">             return index;
</span><span class="cx"> 
</span><span class="cx">         ++index;
</span><span class="lines">@@ -1334,7 +1334,7 @@
</span><span class="cx"> 
</span><span class="cx"> InspectorCSSId InspectorStyleSheet::ruleId(CSSStyleRule* rule) const
</span><span class="cx"> {
</span><del>-    return ruleOrStyleId(rule-&gt;style());
</del><ins>+    return ruleOrStyleId(&amp;rule-&gt;style());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InspectorStyleSheet::revalidateStyle(CSSStyleDeclaration* pageStyle)
</span><span class="lines">@@ -1346,7 +1346,7 @@
</span><span class="cx">     ensureFlatRules();
</span><span class="cx">     for (unsigned i = 0, size = m_flatRules.size(); i &lt; size; ++i) {
</span><span class="cx">         CSSStyleRule* parsedRule = m_flatRules.at(i).get();
</span><del>-        if (parsedRule-&gt;style() == pageStyle) {
</del><ins>+        if (&amp;parsedRule-&gt;style() == pageStyle) {
</ins><span class="cx">             if (parsedRule-&gt;styleRule()-&gt;properties().asText() != pageStyle-&gt;cssText()) {
</span><span class="cx">                 // Clear the disabled properties for the invalid style here.
</span><span class="cx">                 m_inspectorStyles.remove(pageStyle);
</span></span></pre>
</div>
</div>

</body>
</html>