<!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>[175747] releases/WebKitGTK/webkit-2.6/Source</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/175747">175747</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2014-11-07 03:28:53 -0800 (Fri, 07 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/173765">r173765</a> - Allow DOM methods to return references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=136931

Source/WebCore:

Reviewed by Sam Weinig.

It is common practice in WebKit to have methods return a reference
instead of a pointer if the pointer can never be null. However, this
unfortunately did not work for DOM methods (functions called by JS
bindings). This prevented further refactoring.

This patch brings support for having DOM methods to return references
instead of pointers when the pointer cannot be null. The generated
bindings were calling WTF::getPtr() on the pointer type returned by
the implementation already (in case it was a smart pointer type).
This patch leverages this by having WTF::getPtr() convert reference
arguments into raw pointers.

This patch also updates a few DOM methods on Document and Element
classes to return a reference instead of a pointer, to test the change.
There are likely more DOM methods that can be updated though.

No new tests, no behavior change.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::classList):
* bindings/js/JSDOMBinding.h:
(WTF::getPtr): Deleted.
* dom/Document.cpp:
(WebCore::Document::implementation):
(WebCore::Document::webkitGetNamedFlows):
(WebCore::Document::namedFlows):
(WebCore::Document::setXMLVersion):
(WebCore::Document::setXMLStandalone):
(WebCore::Document::securityPolicy):
(WebCore::Document::styleSheets):
* dom/Document.h:
(WebCore::Document::timing):
* dom/Element.cpp:
(WebCore::Element::classList):
(WebCore::Element::dataset):
* dom/Element.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::setPosition):
(WebCore::MediaControlPanelElement::resetPosition):
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
* html/track/VTTRegion.cpp:
(WebCore::VTTRegion::displayLastTextTrackCueBox):
(WebCore::VTTRegion::willRemoveTextTrackCueBox):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getAllStyleSheets):
(WebCore::InspectorCSSAgent::getNamedFlowCollection):
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::documentTiming):
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::ensureRenderFlowThreadWithName):

Source/WTF:

Add support for having WTF::getPtr() transform reference arguments
into raw pointers so that DOM methods can now return references when
appropriate and so that the generated bindings code can handle this
via WTF::getPtr().

This patch had to alter the way getPtr() was overloaded for smart
pointer types so that we don't call &amp;p on smart pointers but p.get().
This was needed because the new WTF::getPtr(T&amp;) was being called for
RefPtr&lt;T&gt; arguments instead of the getPtr(const RefPtr&lt;T&gt;&amp;) overload.
This was addressed using traits and template specialization to
distinguish WTF smart pointers from other types.

Reviewed by Sam Weinig.

* wtf/GetPtr.h:
(WTF::getPtr):
* wtf/OwnPtr.h:
(WTF::getPtr): Deleted.
* wtf/PassOwnPtr.h:
(WTF::getPtr): Deleted.
* wtf/PassRefPtr.h:
(WTF::getPtr): Deleted.
* wtf/Ref.h:
* wtf/RefPtr.h:
(WTF::getPtr): Deleted.
* wtf/gobject/GRefPtr.h:
(WTF::getPtr): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFChangeLog">releases/WebKitGTK/webkit-2.6/Source/WTF/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfGetPtrh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/GetPtr.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfOwnPtrh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/OwnPtr.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfPassOwnPtrh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassOwnPtr.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfPassRefPtrh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassRefPtr.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfRefh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/Ref.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfRefPtrh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/RefPtr.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWTFwtfgobjectGRefPtrh">releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/gobject/GRefPtr.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoreaccessibilityAccessibilityObjectcpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCorebindingsjsJSDOMBindingh">releases/WebKitGTK/webkit-2.6/Source/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoredomDocumentcpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoredomDocumenth">releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoredomElementcpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoredomElementh">releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.h</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCorehtmlshadowMediaControlElementscpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/html/shadow/MediaControlElements.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCorehtmltrackVTTRegioncpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/html/track/VTTRegion.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCoreinspectorInspectorCSSAgentcpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCorepagePerformanceTimingcpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/page/PerformanceTiming.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit26SourceWebCorerenderingFlowThreadControllercpp">releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/FlowThreadController.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit26SourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/ChangeLog (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/ChangeLog        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/ChangeLog        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-09-19  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Allow DOM methods to return references instead of pointers
+        https://bugs.webkit.org/show_bug.cgi?id=136931
+
+        Add support for having WTF::getPtr() transform reference arguments
+        into raw pointers so that DOM methods can now return references when
+        appropriate and so that the generated bindings code can handle this
+        via WTF::getPtr().
+
+        This patch had to alter the way getPtr() was overloaded for smart
+        pointer types so that we don't call &amp;p on smart pointers but p.get().
+        This was needed because the new WTF::getPtr(T&amp;) was being called for
+        RefPtr&lt;T&gt; arguments instead of the getPtr(const RefPtr&lt;T&gt;&amp;) overload.
+        This was addressed using traits and template specialization to
+        distinguish WTF smart pointers from other types.
+
+        Reviewed by Sam Weinig.
+
+        * wtf/GetPtr.h:
+        (WTF::getPtr):
+        * wtf/OwnPtr.h:
+        (WTF::getPtr): Deleted.
+        * wtf/PassOwnPtr.h:
+        (WTF::getPtr): Deleted.
+        * wtf/PassRefPtr.h:
+        (WTF::getPtr): Deleted.
+        * wtf/Ref.h:
+        * wtf/RefPtr.h:
+        (WTF::getPtr): Deleted.
+        * wtf/gobject/GRefPtr.h:
+        (WTF::getPtr): Deleted.
+
</ins><span class="cx"> 2014-10-17  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfGetPtrh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/GetPtr.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/GetPtr.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/GetPtr.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -23,11 +23,39 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-    template &lt;typename T&gt; inline T* getPtr(T* p)
-    {
-        return p;
-    }
</del><ins>+template &lt;typename T&gt; inline T* getPtr(T* p) { return p; }
</ins><span class="cx"> 
</span><ins>+template &lt;typename T&gt; struct IsSmartPtr {
+    static const bool value = false;
+};
+
+template &lt;typename T, bool isSmartPtr&gt;
+struct GetPtrHelper;
+
+template &lt;typename T&gt;
+struct GetPtrHelper&lt;T, false /* isSmartPtr */&gt; {
+    typedef T* PtrType;
+    static T* getPtr(T&amp; p) { return &amp;p; }
+};
+
+template &lt;typename T&gt;
+struct GetPtrHelper&lt;T, true /* isSmartPtr */&gt; {
+    typedef typename T::PtrType PtrType;
+    static PtrType getPtr(const T&amp; p) { return p.get(); }
+};
+
+template &lt;typename T&gt;
+inline typename GetPtrHelper&lt;T, IsSmartPtr&lt;T&gt;::value&gt;::PtrType getPtr(T&amp; p)
+{
+    return GetPtrHelper&lt;T, IsSmartPtr&lt;T&gt;::value&gt;::getPtr(p);
+}
+
+template &lt;typename T&gt;
+inline typename GetPtrHelper&lt;T, IsSmartPtr&lt;T&gt;::value&gt;::PtrType getPtr(const T&amp; p)
+{
+    return GetPtrHelper&lt;T, IsSmartPtr&lt;T&gt;::value&gt;::getPtr(p);
+}
+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> #endif // WTF_GetPtr_h
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfOwnPtrh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/OwnPtr.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/OwnPtr.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/OwnPtr.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/Atomics.h&gt;
</span><ins>+#include &lt;wtf/GetPtr.h&gt;
</ins><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/OwnPtrCommon.h&gt;
</span><span class="cx"> #include &lt;algorithm&gt;
</span><span class="lines">@@ -193,10 +194,9 @@
</span><span class="cx">         return a != b.get(); 
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline typename OwnPtr&lt;T&gt;::PtrType getPtr(const OwnPtr&lt;T&gt;&amp; p)
-    {
-        return p.get();
-    }
</del><ins>+    template &lt;typename T&gt; struct IsSmartPtr&lt;OwnPtr&lt;T&gt;&gt; {
+        static const bool value = true;
+    };
</ins><span class="cx"> 
</span><span class="cx">     template&lt;typename T&gt; template&lt;typename... Args&gt; inline void OwnPtr&lt;T&gt;::createTransactionally(Args... args)
</span><span class="cx">     {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfPassOwnPtrh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassOwnPtr.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassOwnPtr.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassOwnPtr.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &lt;cstddef&gt;
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><ins>+#include &lt;wtf/GetPtr.h&gt;
</ins><span class="cx"> #include &lt;wtf/OwnPtrCommon.h&gt;
</span><span class="cx"> #include &lt;type_traits&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -156,10 +157,9 @@
</span><span class="cx">         return adoptPtr(static_cast&lt;T*&gt;(p.leakPtr()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline T* getPtr(const PassOwnPtr&lt;T&gt;&amp; p)
-    {
-        return p.get();
-    }
</del><ins>+    template &lt;typename T&gt; struct IsSmartPtr&lt;PassOwnPtr&lt;T&gt;&gt; {
+        static const bool value = true;
+    };
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfPassRefPtrh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassRefPtr.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassRefPtr.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/PassRefPtr.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -21,7 +21,8 @@
</span><span class="cx"> #ifndef WTF_PassRefPtr_h
</span><span class="cx"> #define WTF_PassRefPtr_h
</span><span class="cx"> 
</span><del>-#include &quot;PassRef.h&quot;
</del><ins>+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/PassRef.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><span class="lines">@@ -41,6 +42,9 @@
</span><span class="cx"> 
</span><span class="cx">     template&lt;typename T&gt; class PassRefPtr {
</span><span class="cx">     public:
</span><ins>+        typedef T ValueType;
+        typedef ValueType* PtrType;
+
</ins><span class="cx">         PassRefPtr() : m_ptr(nullptr) { }
</span><span class="cx">         PassRefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
</span><span class="cx">         // It somewhat breaks the type system to allow transfer of ownership out of
</span><span class="lines">@@ -153,10 +157,9 @@
</span><span class="cx">         return adoptRef(static_cast&lt;T*&gt;(p.leakRef())); 
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline T* getPtr(const PassRefPtr&lt;T&gt;&amp; p)
-    {
-        return p.get();
-    }
</del><ins>+    template &lt;typename T&gt; struct IsSmartPtr&lt;PassRefPtr&lt;T&gt;&gt; {
+        static const bool value = true;
+    };
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfRefh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/Ref.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/Ref.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/Ref.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -26,7 +26,8 @@
</span><span class="cx"> #ifndef WTF_Ref_h
</span><span class="cx"> #define WTF_Ref_h
</span><span class="cx"> 
</span><del>-#include &quot;Noncopyable.h&quot;
</del><ins>+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/Noncopyable.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><span class="lines">@@ -73,6 +74,12 @@
</span><span class="cx">     return oldReference;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+template &lt;typename T&gt;
+struct GetPtrHelper&lt;Ref&lt;T&gt;, false /* isSmartPtr */&gt; {
+    typedef T* PtrType;
+    static T* getPtr(const Ref&lt;T&gt;&amp; p) { return const_cast&lt;T*&gt;(&amp;p.get()); }
+};
+
</ins><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span><span class="cx"> using WTF::Ref;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfRefPtrh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/RefPtr.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/RefPtr.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/RefPtr.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -23,10 +23,11 @@
</span><span class="cx"> #ifndef WTF_RefPtr_h
</span><span class="cx"> #define WTF_RefPtr_h
</span><span class="cx"> 
</span><del>-#include &quot;FastMalloc.h&quot;
-#include &quot;PassRefPtr.h&quot;
</del><span class="cx"> #include &lt;algorithm&gt;
</span><span class="cx"> #include &lt;utility&gt;
</span><ins>+#include &lt;wtf/FastMalloc.h&gt;
+#include &lt;wtf/GetPtr.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><span class="lines">@@ -35,6 +36,9 @@
</span><span class="cx">     template&lt;typename T&gt; class RefPtr {
</span><span class="cx">         WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">     public:
</span><ins>+        typedef T ValueType;
+        typedef ValueType* PtrType;
+
</ins><span class="cx">         ALWAYS_INLINE RefPtr() : m_ptr(nullptr) { }
</span><span class="cx">         ALWAYS_INLINE RefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
</span><span class="cx">         ALWAYS_INLINE RefPtr(const RefPtr&amp; o) : m_ptr(o.m_ptr) { refIfNotNull(m_ptr); }
</span><span class="lines">@@ -204,10 +208,9 @@
</span><span class="cx">         return RefPtr&lt;T&gt;(static_cast&lt;T*&gt;(p.get())); 
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    template&lt;typename T&gt; inline T* getPtr(const RefPtr&lt;T&gt;&amp; p)
-    {
-        return p.get();
-    }
</del><ins>+    template &lt;typename T&gt; struct IsSmartPtr&lt;RefPtr&lt;T&gt;&gt; {
+        static const bool value = true;
+    };
</ins><span class="cx"> 
</span><span class="cx"> } // namespace WTF
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWTFwtfgobjectGRefPtrh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/gobject/GRefPtr.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/gobject/GRefPtr.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WTF/wtf/gobject/GRefPtr.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(GLIB)
</span><span class="cx"> 
</span><ins>+#include &lt;wtf/GetPtr.h&gt;
</ins><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> #include &lt;algorithm&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -41,6 +42,9 @@
</span><span class="cx"> 
</span><span class="cx"> template &lt;typename T&gt; class GRefPtr {
</span><span class="cx"> public:
</span><ins>+    typedef T ValueType;
+    typedef ValueType* PtrType;
+
</ins><span class="cx">     GRefPtr() : m_ptr(0) { }
</span><span class="cx"> 
</span><span class="cx">     GRefPtr(T* ptr)
</span><span class="lines">@@ -204,10 +208,9 @@
</span><span class="cx">     return GRefPtr&lt;T&gt;(const_cast&lt;T*&gt;(p.get()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template &lt;typename T&gt; inline T* getPtr(const GRefPtr&lt;T&gt;&amp; p)
-{
-    return p.get();
-}
</del><ins>+template &lt;typename T&gt; struct IsSmartPtr&lt;GRefPtr&lt;T&gt;&gt; {
+    static const bool value = true;
+};
</ins><span class="cx"> 
</span><span class="cx"> template &lt;typename T&gt; GRefPtr&lt;T&gt; adoptGRef(T* p)
</span><span class="cx"> {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -1,3 +1,61 @@
</span><ins>+2014-09-19  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Allow DOM methods to return references instead of pointers
+        https://bugs.webkit.org/show_bug.cgi?id=136931
+
+        Reviewed by Sam Weinig.
+
+        It is common practice in WebKit to have methods return a reference
+        instead of a pointer if the pointer can never be null. However, this
+        unfortunately did not work for DOM methods (functions called by JS
+        bindings). This prevented further refactoring.
+
+        This patch brings support for having DOM methods to return references
+        instead of pointers when the pointer cannot be null. The generated
+        bindings were calling WTF::getPtr() on the pointer type returned by
+        the implementation already (in case it was a smart pointer type).
+        This patch leverages this by having WTF::getPtr() convert reference
+        arguments into raw pointers.
+
+        This patch also updates a few DOM methods on Document and Element
+        classes to return a reference instead of a pointer, to test the change.
+        There are likely more DOM methods that can be updated though.
+
+        No new tests, no behavior change.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::classList):
+        * bindings/js/JSDOMBinding.h:
+        (WTF::getPtr): Deleted.
+        * dom/Document.cpp:
+        (WebCore::Document::implementation):
+        (WebCore::Document::webkitGetNamedFlows):
+        (WebCore::Document::namedFlows):
+        (WebCore::Document::setXMLVersion):
+        (WebCore::Document::setXMLStandalone):
+        (WebCore::Document::securityPolicy):
+        (WebCore::Document::styleSheets):
+        * dom/Document.h:
+        (WebCore::Document::timing):
+        * dom/Element.cpp:
+        (WebCore::Element::classList):
+        (WebCore::Element::dataset):
+        * dom/Element.h:
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlPanelElement::setPosition):
+        (WebCore::MediaControlPanelElement::resetPosition):
+        (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
+        * html/track/VTTRegion.cpp:
+        (WebCore::VTTRegion::displayLastTextTrackCueBox):
+        (WebCore::VTTRegion::willRemoveTextTrackCueBox):
+        * inspector/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::getAllStyleSheets):
+        (WebCore::InspectorCSSAgent::getNamedFlowCollection):
+        * page/PerformanceTiming.cpp:
+        (WebCore::PerformanceTiming::documentTiming):
+        * rendering/FlowThreadController.cpp:
+        (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
+
</ins><span class="cx"> 2014-10-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/accessibility/AccessibilityObject.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -2122,12 +2122,10 @@
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="cx">     Element* element = toElement(node);
</span><del>-    DOMTokenList* list = element-&gt;classList();
-    if (!list)
-        return;
-    unsigned length = list-&gt;length();
</del><ins>+    DOMTokenList&amp; list = element-&gt;classList();
+    unsigned length = list.length();
</ins><span class="cx">     for (unsigned k = 0; k &lt; length; k++)
</span><del>-        classList.append(list-&gt;item(k).string());
</del><ins>+        classList.append(list.item(k).string());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx">     
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/bindings/js/JSDOMBinding.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/bindings/js/JSDOMBinding.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/bindings/js/JSDOMBinding.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #include &lt;runtime/TypedArrayInlines.h&gt;
</span><span class="cx"> #include &lt;runtime/TypedArrays.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><ins>+#include &lt;wtf/GetPtr.h&gt;
</ins><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -52,17 +53,6 @@
</span><span class="cx"> class HashEntry;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(GAMEPAD)
-namespace WTF {
-
-template&lt;typename T&gt; inline T* getPtr(const Ref&lt;T&gt;&amp; p)
-{
-    return const_cast&lt;T*&gt;(&amp;p.get());
-}
-
-}
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class CachedScript;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -806,11 +806,11 @@
</span><span class="cx">     m_activeLinkColor.setNamedColor(&quot;red&quot;);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DOMImplementation* Document::implementation()
</del><ins>+DOMImplementation&amp; Document::implementation()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_implementation)
</span><span class="cx">         m_implementation = std::make_unique&lt;DOMImplementation&gt;(*this);
</span><del>-    return m_implementation.get();
</del><ins>+    return *m_implementation;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Document::hasManifest() const
</span><span class="lines">@@ -1123,17 +1123,17 @@
</span><span class="cx"> 
</span><span class="cx">     updateStyleIfNeeded();
</span><span class="cx"> 
</span><del>-    return namedFlows()-&gt;createCSSOMSnapshot();
</del><ins>+    return namedFlows().createCSSOMSnapshot();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-NamedFlowCollection* Document::namedFlows()
</del><ins>+NamedFlowCollection&amp; Document::namedFlows()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_namedFlows)
</span><span class="cx">         m_namedFlows = NamedFlowCollection::create(this);
</span><span class="cx"> 
</span><del>-    return m_namedFlows.get();
</del><ins>+    return *m_namedFlows;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;Element&gt; Document::createElementNS(const String&amp; namespaceURI, const String&amp; qualifiedName, ExceptionCode&amp; ec)
</span><span class="lines">@@ -1317,7 +1317,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Document::setXMLVersion(const String&amp; version, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    if (!implementation()-&gt;hasFeature(&quot;XML&quot;, String())) {
</del><ins>+    if (!implementation().hasFeature(&quot;XML&quot;, String())) {
</ins><span class="cx">         ec = NOT_SUPPORTED_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1332,7 +1332,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Document::setXMLStandalone(bool standalone, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><del>-    if (!implementation()-&gt;hasFeature(&quot;XML&quot;, String())) {
</del><ins>+    if (!implementation().hasFeature(&quot;XML&quot;, String())) {
</ins><span class="cx">         ec = NOT_SUPPORTED_ERR;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1582,11 +1582,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSP_NEXT)
</span><del>-DOMSecurityPolicy* Document::securityPolicy()
</del><ins>+DOMSecurityPolicy&amp; Document::securityPolicy()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_domSecurityPolicy)
</span><span class="cx">         m_domSecurityPolicy = DOMSecurityPolicy::create(this);
</span><del>-    return m_domSecurityPolicy.get();
</del><ins>+    return *m_domSecurityPolicy;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -3164,11 +3164,11 @@
</span><span class="cx">     setDecoder(other.decoder());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-StyleSheetList* Document::styleSheets()
</del><ins>+StyleSheetList&amp; Document::styleSheets()
</ins><span class="cx"> {
</span><span class="cx">     if (!m_styleSheetList)
</span><span class="cx">         m_styleSheetList = StyleSheetList::create(this);
</span><del>-    return m_styleSheetList.get();
</del><ins>+    return *m_styleSheetList;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String Document::preferredStylesheetSet() const
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Document.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -408,7 +408,7 @@
</span><span class="cx"> 
</span><span class="cx">     DocumentType* doctype() const;
</span><span class="cx"> 
</span><del>-    DOMImplementation* implementation();
</del><ins>+    DOMImplementation&amp; implementation();
</ins><span class="cx">     
</span><span class="cx">     Element* documentElement() const
</span><span class="cx">     {
</span><span class="lines">@@ -441,7 +441,7 @@
</span><span class="cx">     PassRefPtr&lt;DOMNamedFlowCollection&gt; webkitGetNamedFlows();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    NamedFlowCollection* namedFlows();
</del><ins>+    NamedFlowCollection&amp; namedFlows();
</ins><span class="cx"> 
</span><span class="cx">     Element* elementFromPoint(int x, int y) const;
</span><span class="cx">     PassRefPtr&lt;Range&gt; caretRangeFromPoint(int x, int y);
</span><span class="lines">@@ -492,7 +492,7 @@
</span><span class="cx">     bool hidden() const;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSP_NEXT)
</span><del>-    DOMSecurityPolicy* securityPolicy();
</del><ins>+    DOMSecurityPolicy&amp; securityPolicy();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     PassRefPtr&lt;Node&gt; adoptNode(PassRefPtr&lt;Node&gt; source, ExceptionCode&amp;);
</span><span class="lines">@@ -543,7 +543,7 @@
</span><span class="cx">     bool haveStylesheetsLoaded() const;
</span><span class="cx"> 
</span><span class="cx">     // This is a DOM function.
</span><del>-    StyleSheetList* styleSheets();
</del><ins>+    StyleSheetList&amp; styleSheets();
</ins><span class="cx"> 
</span><span class="cx">     DocumentStyleSheetCollection&amp; styleSheetCollection() { return m_styleSheetCollection; }
</span><span class="cx"> 
</span><span class="lines">@@ -1177,7 +1177,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_TIMING)
</span><del>-    const DocumentTiming* timing() const { return &amp;m_documentTiming; }
</del><ins>+    const DocumentTiming&amp; timing() const { return m_documentTiming; }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -2326,20 +2326,20 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DOMTokenList* Element::classList()
</del><ins>+DOMTokenList&amp; Element::classList()
</ins><span class="cx"> {
</span><span class="cx">     ElementRareData&amp; data = ensureElementRareData();
</span><span class="cx">     if (!data.classList())
</span><span class="cx">         data.setClassList(std::make_unique&lt;ClassList&gt;(*this));
</span><del>-    return data.classList();
</del><ins>+    return *data.classList();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-DatasetDOMStringMap* Element::dataset()
</del><ins>+DatasetDOMStringMap&amp; Element::dataset()
</ins><span class="cx"> {
</span><span class="cx">     ElementRareData&amp; data = ensureElementRareData();
</span><span class="cx">     if (!data.dataset())
</span><span class="cx">         data.setDataset(std::make_unique&lt;DatasetDOMStringMap&gt;(*this));
</span><del>-    return data.dataset();
</del><ins>+    return *data.dataset();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> URL Element::getURLAttribute(const QualifiedName&amp; name) const
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.h (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.h        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/dom/Element.h        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -454,9 +454,9 @@
</span><span class="cx">     bool matches(const String&amp; selectors, ExceptionCode&amp;);
</span><span class="cx">     virtual bool shouldAppearIndeterminate() const;
</span><span class="cx"> 
</span><del>-    DOMTokenList* classList();
</del><ins>+    DOMTokenList&amp; classList();
</ins><span class="cx"> 
</span><del>-    DatasetDOMStringMap* dataset();
</del><ins>+    DatasetDOMStringMap&amp; dataset();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx">     virtual bool isMediaElement() const { return false; }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCorehtmlshadowMediaControlElementscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/html/shadow/MediaControlElements.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/html/shadow/MediaControlElements.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/html/shadow/MediaControlElements.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">     setInlineStyleProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX);
</span><span class="cx">     setInlineStyleProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX);
</span><span class="cx"> 
</span><del>-    classList()-&gt;add(&quot;dragged&quot;, IGNORE_EXCEPTION);
</del><ins>+    classList().add(&quot;dragged&quot;, IGNORE_EXCEPTION);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaControlPanelElement::resetPosition()
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">     removeInlineStyleProperty(CSSPropertyMarginLeft);
</span><span class="cx">     removeInlineStyleProperty(CSSPropertyMarginTop);
</span><span class="cx"> 
</span><del>-    classList()-&gt;remove(&quot;dragged&quot;, IGNORE_EXCEPTION);
</del><ins>+    classList().remove(&quot;dragged&quot;, IGNORE_EXCEPTION);
</ins><span class="cx"> 
</span><span class="cx">     m_cumulativeDragOffset.setX(0);
</span><span class="cx">     m_cumulativeDragOffset.setY(0);
</span><span class="lines">@@ -764,24 +764,24 @@
</span><span class="cx"> 
</span><span class="cx">         if (textTrack == TextTrack::captionMenuAutomaticItem()) {
</span><span class="cx">             if (displayMode == CaptionUserPreferences::Automatic)
</span><del>-                trackItem-&gt;classList()-&gt;add(selectedClassValue, ASSERT_NO_EXCEPTION);
</del><ins>+                trackItem-&gt;classList().add(selectedClassValue, ASSERT_NO_EXCEPTION);
</ins><span class="cx">             else
</span><del>-                trackItem-&gt;classList()-&gt;remove(selectedClassValue, ASSERT_NO_EXCEPTION);
</del><ins>+                trackItem-&gt;classList().remove(selectedClassValue, ASSERT_NO_EXCEPTION);
</ins><span class="cx">             continue;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (displayMode != CaptionUserPreferences::Automatic &amp;&amp; textTrack-&gt;mode() == TextTrack::showingKeyword()) {
</span><span class="cx">             trackMenuItemSelected = true;
</span><del>-            trackItem-&gt;classList()-&gt;add(selectedClassValue, ASSERT_NO_EXCEPTION);
</del><ins>+            trackItem-&gt;classList().add(selectedClassValue, ASSERT_NO_EXCEPTION);
</ins><span class="cx">         } else
</span><del>-            trackItem-&gt;classList()-&gt;remove(selectedClassValue, ASSERT_NO_EXCEPTION);
</del><ins>+            trackItem-&gt;classList().remove(selectedClassValue, ASSERT_NO_EXCEPTION);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (offMenuItem) {
</span><span class="cx">         if (displayMode == CaptionUserPreferences::ForcedOnly &amp;&amp; !trackMenuItemSelected)
</span><del>-            offMenuItem-&gt;classList()-&gt;add(selectedClassValue, ASSERT_NO_EXCEPTION);
</del><ins>+            offMenuItem-&gt;classList().add(selectedClassValue, ASSERT_NO_EXCEPTION);
</ins><span class="cx">         else
</span><del>-            offMenuItem-&gt;classList()-&gt;remove(selectedClassValue, ASSERT_NO_EXCEPTION);
</del><ins>+            offMenuItem-&gt;classList().remove(selectedClassValue, ASSERT_NO_EXCEPTION);
</ins><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCorehtmltrackVTTRegioncpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/html/track/VTTRegion.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/html/track/VTTRegion.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/html/track/VTTRegion.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx"> 
</span><span class="cx">     // If it's a scrolling region, add the scrolling class.
</span><span class="cx">     if (isScrollingRegion())
</span><del>-        m_cueContainer-&gt;classList()-&gt;add(textTrackCueContainerScrollingClass(), IGNORE_EXCEPTION);
</del><ins>+        m_cueContainer-&gt;classList().add(textTrackCueContainerScrollingClass(), IGNORE_EXCEPTION);
</ins><span class="cx"> 
</span><span class="cx">     float regionBottom = m_regionDisplayTree-&gt;getBoundingClientRect()-&gt;bottom();
</span><span class="cx"> 
</span><span class="lines">@@ -398,7 +398,7 @@
</span><span class="cx"> 
</span><span class="cx">     double boxHeight = box-&gt;getBoundingClientRect()-&gt;bottom() - box-&gt;getBoundingClientRect()-&gt;top();
</span><span class="cx"> 
</span><del>-    m_cueContainer-&gt;classList()-&gt;remove(textTrackCueContainerScrollingClass(), IGNORE_EXCEPTION);
</del><ins>+    m_cueContainer-&gt;classList().remove(textTrackCueContainerScrollingClass(), IGNORE_EXCEPTION);
</ins><span class="cx"> 
</span><span class="cx">     m_currentTop += boxHeight;
</span><span class="cx">     m_cueContainer-&gt;setInlineStyleProperty(CSSPropertyTop, m_currentTop, CSSPrimitiveValue::CSS_PX);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/inspector/InspectorCSSAgent.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -681,9 +681,9 @@
</span><span class="cx">     styleInfos = Inspector::Protocol::Array&lt;Inspector::Protocol::CSS::CSSStyleSheetHeader&gt;::create();
</span><span class="cx">     Vector&lt;Document*&gt; documents = m_domAgent-&gt;documents();
</span><span class="cx">     for (Vector&lt;Document*&gt;::iterator it = documents.begin(); it != documents.end(); ++it) {
</span><del>-        StyleSheetList* list = (*it)-&gt;styleSheets();
-        for (unsigned i = 0; i &lt; list-&gt;length(); ++i) {
-            StyleSheet&amp; styleSheet = *list-&gt;item(i);
</del><ins>+        StyleSheetList&amp; list = (*it)-&gt;styleSheets();
+        for (unsigned i = 0; i &lt; list.length(); ++i) {
+            StyleSheet&amp; styleSheet = *list.item(i);
</ins><span class="cx">             if (styleSheet.isCSSStyleSheet())
</span><span class="cx">                 collectStyleSheets(&amp;toCSSStyleSheet(styleSheet), styleInfos.get());
</span><span class="cx">         }
</span><span class="lines">@@ -862,7 +862,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_namedFlowCollectionsRequested.add(documentNodeId);
</span><span class="cx"> 
</span><del>-    Vector&lt;RefPtr&lt;WebKitNamedFlow&gt;&gt; namedFlowsVector = document-&gt;namedFlows()-&gt;namedFlows();
</del><ins>+    Vector&lt;RefPtr&lt;WebKitNamedFlow&gt;&gt; namedFlowsVector = document-&gt;namedFlows().namedFlows();
</ins><span class="cx">     RefPtr&lt;Inspector::Protocol::Array&lt;Inspector::Protocol::CSS::NamedFlow&gt;&gt; namedFlows = Inspector::Protocol::Array&lt;Inspector::Protocol::CSS::NamedFlow&gt;::create();
</span><span class="cx"> 
</span><span class="cx">     for (Vector&lt;RefPtr&lt;WebKitNamedFlow&gt;&gt;::iterator it = namedFlowsVector.begin(); it != namedFlowsVector.end(); ++it)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCorepagePerformanceTimingcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/page/PerformanceTiming.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/page/PerformanceTiming.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/page/PerformanceTiming.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx">     if (!document)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    return document-&gt;timing();
</del><ins>+    return &amp;document-&gt;timing();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DocumentLoadTiming* PerformanceTiming::documentLoadTiming() const
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit26SourceWebCorerenderingFlowThreadControllercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/FlowThreadController.cpp (175746 => 175747)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/FlowThreadController.cpp        2014-11-07 10:07:13 UTC (rev 175746)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/rendering/FlowThreadController.cpp        2014-11-07 11:28:53 UTC (rev 175747)
</span><span class="lines">@@ -63,12 +63,12 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    NamedFlowCollection* namedFlows = m_view-&gt;document().namedFlows();
</del><ins>+    NamedFlowCollection&amp; namedFlows = m_view-&gt;document().namedFlows();
</ins><span class="cx"> 
</span><span class="cx">     // Sanity check for the absence of a named flow in the &quot;CREATED&quot; state with the same name.
</span><del>-    ASSERT(!namedFlows-&gt;flowByName(name));
</del><ins>+    ASSERT(!namedFlows.flowByName(name));
</ins><span class="cx"> 
</span><del>-    auto flowRenderer = new RenderNamedFlowThread(m_view-&gt;document(), RenderFlowThread::createFlowThreadStyle(&amp;m_view-&gt;style()), namedFlows-&gt;ensureFlowWithName(name));
</del><ins>+    auto flowRenderer = new RenderNamedFlowThread(m_view-&gt;document(), RenderFlowThread::createFlowThreadStyle(&amp;m_view-&gt;style()), namedFlows.ensureFlowWithName(name));
</ins><span class="cx">     flowRenderer-&gt;initializeStyle();
</span><span class="cx">     m_renderNamedFlowThreadList-&gt;add(flowRenderer);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>