<!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>[243954] trunk/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/243954">243954</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2019-04-05 17:03:46 -0700 (Fri, 05 Apr 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make WeakPtr<Element> possible and deploy it in form associated elements code
https://bugs.webkit.org/show_bug.cgi?id=196626

Reviewed by Antti Koivisto.

Source/WebCore:

Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.

No new tests sine there should be no behavioral change.

* dom/Element.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::FormAssociatedElement):
(WebCore::FormAssociatedElement::insertedIntoAncestor):
(WebCore::FormAssociatedElement::setForm):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):
* html/FormAssociatedElement.h:
(WebCore::FormAssociatedElement::form const):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::asFormNamedItem):
(WebCore::HTMLElement::asFormAssociatedElement):
* html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem): Deleted.
* html/HTMLFormControlElement.h:
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
* html/HTMLFormControlsCollection.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
(WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
(WebCore::HTMLFormElement::registerImgElement):
(WebCore::HTMLFormElement::defaultButton const):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::matchesValidPseudoClass const):
(WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::insertedIntoAncestor):
* html/HTMLImageElement.h:
* html/HTMLInputElement.h:
* html/HTMLMediaElement.h:
* html/HTMLObjectElement.h:
* html/HTMLPictureElement.h:
* html/HTMLSlotElement.h:
* svg/SVGElement.h:

Source/WTF:

Make it possible to call WeakHashSet::remove and WeakHashSet::contains with
a subclass type U of a type T used to define WeakReference<T>.

Also added computesEmpty, which is slightly more efficient than computeSize
when m_set is either empty or when there are non-released weak references in the set.

* wtf/WeakHashSet.h:
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Added.
* wtf/WeakPtr.h: Added an explicit forward declaration of WeakHashSet to avoid
build failures in GTK+ and WPE ports.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfWeakHashSeth">trunk/Source/WTF/wtf/WeakHashSet.h</a></li>
<li><a href="#trunkSourceWTFwtfWeakPtrh">trunk/Source/WTF/wtf/WeakPtr.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCorehtmlFormAssociatedElementcpp">trunk/Source/WebCore/html/FormAssociatedElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlFormAssociatedElementh">trunk/Source/WebCore/html/FormAssociatedElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementcpp">trunk/Source/WebCore/html/HTMLElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLElementh">trunk/Source/WebCore/html/HTMLElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlElementh">trunk/Source/WebCore/html/HTMLFormControlElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlsCollectioncpp">trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlsCollectionh">trunk/Source/WebCore/html/HTMLFormControlsCollection.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementcpp">trunk/Source/WebCore/html/HTMLFormElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementh">trunk/Source/WebCore/html/HTMLFormElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementcpp">trunk/Source/WebCore/html/HTMLImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementh">trunk/Source/WebCore/html/HTMLImageElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementh">trunk/Source/WebCore/html/HTMLObjectElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLPictureElementh">trunk/Source/WebCore/html/HTMLPictureElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSlotElementh">trunk/Source/WebCore/html/HTMLSlotElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WTF/ChangeLog  2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Make WeakPtr<Element> possible and deploy it in form associated elements code
+        https://bugs.webkit.org/show_bug.cgi?id=196626
+
+        Reviewed by Antti Koivisto.
+
+        Make it possible to call WeakHashSet::remove and WeakHashSet::contains with
+        a subclass type U of a type T used to define WeakReference<T>.
+
+        Also added computesEmpty, which is slightly more efficient than computeSize
+        when m_set is either empty or when there are non-released weak references in the set.
+
+        * wtf/WeakHashSet.h:
+        (WTF::WeakHashSet::remove):
+        (WTF::WeakHashSet::contains const):
+        (WTF::WeakHashSet::computesEmpty const): Added.
+        * wtf/WeakPtr.h: Added an explicit forward declaration of WeakHashSet to avoid
+        build failures in GTK+ and WPE ports.
+
</ins><span class="cx"> 2019-04-05  Eric Carlson  <eric.carlson@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Remove AUDIO_TOOLBOX_AUDIO_SESSION
</span></span></pre></div>
<a id="trunkSourceWTFwtfWeakHashSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/WeakHashSet.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/WeakHashSet.h       2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WTF/wtf/WeakHashSet.h  2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -91,17 +91,19 @@
</span><span class="cx">         m_set.add(*makeWeakPtr(value).m_ref);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void remove(const T& value)
</del><ins>+    template <typename U>
+    bool remove(const U& value)
</ins><span class="cx">     {
</span><del>-        auto* weakReference = value.weakPtrFactory().m_ref.get();
</del><ins>+        auto* weakReference = weak_reference_downcast<T>(value.weakPtrFactory().m_ref.get());
</ins><span class="cx">         if (!weakReference)
</span><del>-            return;
-        m_set.remove(weakReference);
</del><ins>+            return false;
+        return m_set.remove(weakReference);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool contains(const T& value) const
</del><ins>+    template <typename U>
+    bool contains(const U& value) const
</ins><span class="cx">     {
</span><del>-        auto* weakReference = value.weakPtrFactory().m_ref.get();
</del><ins>+        auto* weakReference = weak_reference_downcast<T>(value.weakPtrFactory().m_ref.get());
</ins><span class="cx">         if (!weakReference)
</span><span class="cx">             return false;
</span><span class="cx">         return m_set.contains(weakReference);
</span><span class="lines">@@ -109,6 +111,17 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned capacity() const { return m_set.capacity(); }
</span><span class="cx"> 
</span><ins>+    bool computesEmpty() const
+    {
+        if (m_set.isEmpty())
+            return true;
+        for (auto& value : m_set) {
+            if (value->get())
+                return false;
+        }
+        return true;
+    }
+
</ins><span class="cx">     unsigned computeSize() const
</span><span class="cx">     {
</span><span class="cx">         const_cast<WeakReferenceSet&>(m_set).removeIf([] (auto& value) { return !value->get(); });
</span></span></pre></div>
<a id="trunkSourceWTFwtfWeakPtrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/WeakPtr.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/WeakPtr.h   2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WTF/wtf/WeakPtr.h      2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><ins>+template<typename U> class WeakHashSet;
</ins><span class="cx"> template<typename T> class WeakPtr;
</span><span class="cx"> template<typename T> class WeakPtrFactory;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/ChangeLog      2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2019-04-05  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Make WeakPtr<Element> possible and deploy it in form associated elements code
+        https://bugs.webkit.org/show_bug.cgi?id=196626
+
+        Reviewed by Antti Koivisto.
+
+        Make Element inherit from CanMakeWeakPtr and deploy WeakPtr<*Element> in FormAssociatedElement and HTMLFormElement.
+
+        No new tests sine there should be no behavioral change.
+
+        * dom/Element.h:
+        * html/FormAssociatedElement.cpp:
+        (WebCore::FormAssociatedElement::FormAssociatedElement):
+        (WebCore::FormAssociatedElement::insertedIntoAncestor):
+        (WebCore::FormAssociatedElement::setForm):
+        (WebCore::FormAssociatedElement::resetFormOwner):
+        (WebCore::FormAssociatedElement::formAttributeChanged):
+        * html/FormAssociatedElement.h:
+        (WebCore::FormAssociatedElement::form const):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::asFormNamedItem):
+        (WebCore::HTMLElement::asFormAssociatedElement):
+        * html/HTMLElement.h:
+        (WebCore::HTMLElement::asFormNamedItem): Deleted.
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormControlsCollection.cpp:
+        (WebCore::HTMLFormControlsCollection::formImageElements const): Inlined into updateNamedElementCache.
+        (WebCore::HTMLFormControlsCollection::updateNamedElementCache const):
+        * html/HTMLFormControlsCollection.h:
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
+        (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
+        (WebCore::HTMLFormElement::registerImgElement):
+        (WebCore::HTMLFormElement::defaultButton const):
+        (WebCore::HTMLFormElement::resetDefaultButton):
+        (WebCore::HTMLFormElement::matchesValidPseudoClass const):
+        (WebCore::HTMLFormElement::matchesInvalidPseudoClass const):
+        * html/HTMLFormElement.h:
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::HTMLImageElement):
+        (WebCore::HTMLImageElement::insertedIntoAncestor):
+        * html/HTMLImageElement.h:
+        * html/HTMLInputElement.h:
+        * html/HTMLMediaElement.h:
+        * html/HTMLObjectElement.h:
+        * html/HTMLPictureElement.h:
+        * html/HTMLSlotElement.h:
+        * svg/SVGElement.h:
+
</ins><span class="cx"> 2019-04-05  Caitlin Potter  <caitp@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h       2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/dom/Element.h  2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> enum class TouchAction : uint8_t;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-class Element : public ContainerNode {
</del><ins>+class Element : public ContainerNode , public CanMakeWeakPtr<Element> {
</ins><span class="cx">     WTF_MAKE_ISO_ALLOCATED(Element);
</span><span class="cx"> public:
</span><span class="cx">     static Ref<Element> create(const QualifiedName&, Document&);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormAssociatedElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormAssociatedElement.cpp (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormAssociatedElement.cpp      2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/FormAssociatedElement.cpp 2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx"> FormAssociatedElement::FormAssociatedElement(HTMLFormElement* form)
</span><span class="cx">     : m_form(nullptr)
</span><del>-    , m_formSetByParser(form)
</del><ins>+    , m_formSetByParser(makeWeakPtr(form))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     if (m_formSetByParser) {
</span><span class="cx">         // The form could have been removed by a script during parsing.
</span><span class="cx">         if (m_formSetByParser->isConnected())
</span><del>-            setForm(m_formSetByParser);
</del><ins>+            setForm(m_formSetByParser.get());
</ins><span class="cx">         m_formSetByParser = nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -146,9 +146,9 @@
</span><span class="cx">     willChangeForm();
</span><span class="cx">     if (m_form)
</span><span class="cx">         m_form->removeFormElement(this);
</span><del>-    m_form = newForm;
-    if (m_form)
-        m_form->registerFormElement(this);
</del><ins>+    m_form = makeWeakPtr(newForm);
+    if (newForm)
+        newForm->registerFormElement(this);
</ins><span class="cx">     didChangeForm();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -172,10 +172,11 @@
</span><span class="cx"> 
</span><span class="cx"> void FormAssociatedElement::resetFormOwner()
</span><span class="cx"> {
</span><del>-    RefPtr<HTMLFormElement> originalForm = m_form;
-    setForm(findAssociatedForm(&asHTMLElement(), m_form));
</del><ins>+    RefPtr<HTMLFormElement> originalForm = m_form.get();
+    setForm(findAssociatedForm(&asHTMLElement(), originalForm.get()));
</ins><span class="cx">     HTMLElement& element = asHTMLElement();
</span><del>-    if (m_form && m_form != originalForm && m_form->isConnected())
</del><ins>+    auto* newForm = m_form.get();
+    if (newForm && newForm != originalForm && newForm->isConnected())
</ins><span class="cx">         element.document().didAssociateFormControl(element);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -184,9 +185,11 @@
</span><span class="cx">     HTMLElement& element = asHTMLElement();
</span><span class="cx">     if (!element.hasAttributeWithoutSynchronization(formAttr)) {
</span><span class="cx">         // The form attribute removed. We need to reset form owner here.
</span><del>-        RefPtr<HTMLFormElement> originalForm = m_form;
</del><ins>+        RefPtr<HTMLFormElement> originalForm = m_form.get();
+        // FIXME: Why does this not pass originalForm to findClosestFormAncestor?
</ins><span class="cx">         setForm(HTMLFormElement::findClosestFormAncestor(element));
</span><del>-        if (m_form && m_form != originalForm && m_form->isConnected())
</del><ins>+        auto* newForm = m_form.get();
+        if (newForm && newForm != originalForm && newForm->isConnected())
</ins><span class="cx">             element.document().didAssociateFormControl(element);
</span><span class="cx">         m_formAttributeTargetObserver = nullptr;
</span><span class="cx">     } else {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFormAssociatedElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormAssociatedElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormAssociatedElement.h        2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/FormAssociatedElement.h   2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include "FormNamedItem.h"
</span><span class="cx"> #include "Node.h"
</span><ins>+#include <wtf/WeakPtr.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -47,7 +48,7 @@
</span><span class="cx">     void deref() { derefFormAssociatedElement(); }
</span><span class="cx"> 
</span><span class="cx">     static HTMLFormElement* findAssociatedForm(const HTMLElement*, HTMLFormElement*);
</span><del>-    HTMLFormElement* form() const { return m_form; }
</del><ins>+    HTMLFormElement* form() const { return m_form.get(); }
</ins><span class="cx">     ValidityState* validity();
</span><span class="cx"> 
</span><span class="cx">     virtual bool isFormControlElement() const = 0;
</span><span class="lines">@@ -117,8 +118,8 @@
</span><span class="cx">     bool isFormAssociatedElement() const final { return true; }
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr<FormAttributeTargetObserver> m_formAttributeTargetObserver;
</span><del>-    HTMLFormElement* m_form;
-    HTMLFormElement* m_formSetByParser;
</del><ins>+    WeakPtr<HTMLFormElement> m_form;
+    WeakPtr<HTMLFormElement> m_formSetByParser;
</ins><span class="cx">     String m_customValidationMessage;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.cpp (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.cpp        2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLElement.cpp   2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -762,6 +762,16 @@
</span><span class="cx">     return HTMLFormElement::findClosestFormAncestor(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+FormNamedItem* HTMLElement::asFormNamedItem()
+{
+    return nullptr;
+}
+
+FormAssociatedElement* HTMLElement::asFormAssociatedElement()
+{
+    return nullptr;
+}
+
</ins><span class="cx"> static inline bool elementAffectsDirectionality(const Node& node)
</span><span class="cx"> {
</span><span class="cx">     if (!is<HTMLElement>(node))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLElement.h  2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLElement.h     2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class DocumentFragment;
</span><ins>+class FormAssociatedElement;
</ins><span class="cx"> class FormNamedItem;
</span><span class="cx"> class HTMLCollection;
</span><span class="cx"> class HTMLFormElement;
</span><span class="lines">@@ -88,7 +89,8 @@
</span><span class="cx">     bool willRespondToMouseClickEvents() override;
</span><span class="cx"> 
</span><span class="cx">     virtual bool isLabelable() const { return false; }
</span><del>-    virtual FormNamedItem* asFormNamedItem() { return 0; }
</del><ins>+    virtual FormNamedItem* asFormNamedItem();
+    virtual FormAssociatedElement* asFormAssociatedElement();
</ins><span class="cx"> 
</span><span class="cx">     bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(name.localName()); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlElement.h       2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h  2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -175,7 +175,8 @@
</span><span class="cx"> 
</span><span class="cx">     HTMLElement& asHTMLElement() final { return *this; }
</span><span class="cx">     const HTMLFormControlElement& asHTMLElement() const final { return *this; }
</span><del>-    HTMLFormControlElement* asFormNamedItem() final { return this; }
</del><ins>+    FormNamedItem* asFormNamedItem() final { return this; }
+    FormAssociatedElement* asFormAssociatedElement() final { return this; }
</ins><span class="cx"> 
</span><span class="cx">     bool needsMouseFocusableQuirk() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlsCollectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp 2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp    2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -75,11 +75,6 @@
</span><span class="cx">     return ownerNode().copyAssociatedElementsVector();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const Vector<HTMLImageElement*>& HTMLFormControlsCollection::formImageElements() const
-{
-    return ownerNode().imageElements();
-}
-
</del><span class="cx"> static unsigned findFormAssociatedElement(const Vector<FormAssociatedElement*>& elements, const Element& element)
</span><span class="cx"> {
</span><span class="cx">     for (unsigned i = 0; i < elements.size(); ++i) {
</span><span class="lines">@@ -145,7 +140,9 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    for (auto* elementPtr : formImageElements()) {
</del><ins>+    for (auto& elementPtr : ownerNode().imageElements()) {
+        if (!elementPtr)
+            continue;
</ins><span class="cx">         HTMLImageElement& element = *elementPtr;
</span><span class="cx">         const AtomicString& id = element.getIdAttribute();
</span><span class="cx">         if (!id.isEmpty() && !foundInputElements.contains(id.impl()))
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlsCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlsCollection.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlsCollection.h   2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLFormControlsCollection.h      2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -56,7 +56,6 @@
</span><span class="cx"> 
</span><span class="cx">     const Vector<FormAssociatedElement*>& unsafeFormControlElements() const;
</span><span class="cx">     Vector<Ref<FormAssociatedElement>> copyFormControlElementsVector() const;
</span><del>-    const Vector<HTMLImageElement*>& formImageElements() const;
</del><span class="cx"> 
</span><span class="cx">     mutable Element* m_cachedElement;
</span><span class="cx">     mutable unsigned m_cachedElementOffsetInArray;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.cpp    2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp       2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -566,15 +566,15 @@
</span><span class="cx">     ASSERT_WITH_MESSAGE(!is<HTMLFieldSetElement>(formControlElement), "FieldSet are never candidates for constraint validation.");
</span><span class="cx">     ASSERT(static_cast<const Element&>(formControlElement).matchesInvalidPseudoClass());
</span><span class="cx"> 
</span><del>-    if (m_invalidAssociatedFormControls.isEmpty())
</del><ins>+    if (m_invalidAssociatedFormControls.computesEmpty())
</ins><span class="cx">         invalidateStyleForSubtree();
</span><del>-    m_invalidAssociatedFormControls.add(&formControlElement);
</del><ins>+    m_invalidAssociatedFormControls.add(const_cast<HTMLFormControlElement&>(formControlElement));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded(const HTMLFormControlElement& formControlElement)
</span><span class="cx"> {
</span><del>-    if (m_invalidAssociatedFormControls.remove(&formControlElement)) {
-        if (m_invalidAssociatedFormControls.isEmpty())
</del><ins>+    if (m_invalidAssociatedFormControls.remove(formControlElement)) {
+        if (m_invalidAssociatedFormControls.computesEmpty())
</ins><span class="cx">             invalidateStyleForSubtree();
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -587,7 +587,7 @@
</span><span class="cx"> void HTMLFormElement::registerImgElement(HTMLImageElement* e)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_imageElements.find(e) == notFound);
</span><del>-    m_imageElements.append(e);
</del><ins>+    m_imageElements.append(makeWeakPtr(e));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLFormElement::removeImgElement(HTMLImageElement* e)
</span><span class="lines">@@ -681,18 +681,18 @@
</span><span class="cx"> 
</span><span class="cx"> HTMLFormControlElement* HTMLFormElement::defaultButton() const
</span><span class="cx"> {
</span><del>-    if (!m_defaultButton) {
-        for (auto& associatedElement : m_associatedElements) {
-            if (!is<HTMLFormControlElement>(*associatedElement))
-                continue;
-            HTMLFormControlElement& control = downcast<HTMLFormControlElement>(*associatedElement);
-            if (control.isSuccessfulSubmitButton()) {
-                m_defaultButton = &control;
-                break;
-            }
</del><ins>+    if (m_defaultButton)
+        return m_defaultButton.get();
+    for (auto& associatedElement : m_associatedElements) {
+        if (!is<HTMLFormControlElement>(*associatedElement))
+            continue;
+        HTMLFormControlElement& control = downcast<HTMLFormControlElement>(*associatedElement);
+        if (control.isSuccessfulSubmitButton()) {
+            m_defaultButton = makeWeakPtr(control);
+            return &control;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><del>-    return m_defaultButton;
</del><ins>+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLFormElement::resetDefaultButton()
</span><span class="lines">@@ -706,8 +706,7 @@
</span><span class="cx"> 
</span><span class="cx">     ScriptDisallowedScope::InMainThread scriptDisallowedScope;
</span><span class="cx"> 
</span><del>-    auto* oldDefault = m_defaultButton;
-    m_defaultButton = nullptr;
</del><ins>+    auto oldDefault = WTFMove(m_defaultButton);
</ins><span class="cx">     defaultButton();
</span><span class="cx">     if (m_defaultButton != oldDefault) {
</span><span class="cx">         if (oldDefault)
</span><span class="lines">@@ -810,12 +809,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool HTMLFormElement::matchesValidPseudoClass() const
</span><span class="cx"> {
</span><del>-    return m_invalidAssociatedFormControls.isEmpty();
</del><ins>+    return m_invalidAssociatedFormControls.computesEmpty();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool HTMLFormElement::matchesInvalidPseudoClass() const
</span><span class="cx"> {
</span><del>-    return !m_invalidAssociatedFormControls.isEmpty();
</del><ins>+    return !matchesValidPseudoClass();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Use Ref<HTMLElement> for the function result since there are no non-HTML elements returned here.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.h      2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLFormElement.h 2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "RadioButtonGroups.h"
</span><span class="cx"> #include <memory>
</span><span class="cx"> #include <wtf/IsoMalloc.h>
</span><ins>+#include <wtf/WeakHashSet.h>
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE)
</span><span class="cx"> #include "Autocapitalize.h"
</span><span class="lines">@@ -120,7 +121,7 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT const Vector<FormAssociatedElement*>& unsafeAssociatedElements() const;
</span><span class="cx">     Vector<Ref<FormAssociatedElement>> copyAssociatedElementsVector() const;
</span><del>-    const Vector<HTMLImageElement*>& imageElements() const { return m_imageElements; }
</del><ins>+    const Vector<WeakPtr<HTMLImageElement>>& imageElements() const { return m_imageElements; }
</ins><span class="cx"> 
</span><span class="cx">     StringPairVector textFieldValues() const;
</span><span class="cx"> 
</span><span class="lines">@@ -173,13 +174,13 @@
</span><span class="cx">     std::unique_ptr<PastNamesMap> m_pastNamesMap;
</span><span class="cx"> 
</span><span class="cx">     RadioButtonGroups m_radioButtonGroups;
</span><del>-    mutable HTMLFormControlElement* m_defaultButton { nullptr };
</del><ins>+    mutable WeakPtr<HTMLFormControlElement> m_defaultButton;
</ins><span class="cx"> 
</span><span class="cx">     unsigned m_associatedElementsBeforeIndex { 0 };
</span><span class="cx">     unsigned m_associatedElementsAfterIndex { 0 };
</span><span class="cx">     Vector<FormAssociatedElement*> m_associatedElements;
</span><del>-    Vector<HTMLImageElement*> m_imageElements;
-    HashSet<const HTMLFormControlElement*> m_invalidAssociatedFormControls;
</del><ins>+    Vector<WeakPtr<HTMLImageElement>> m_imageElements;
+    WeakHashSet<HTMLFormControlElement> m_invalidAssociatedFormControls;
</ins><span class="cx"> 
</span><span class="cx">     bool m_wasUserSubmitted { false };
</span><span class="cx">     bool m_isSubmittingOrPreparingForSubmission { false };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.cpp   2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp      2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     : HTMLElement(tagName, document)
</span><span class="cx">     , m_imageLoader(*this)
</span><span class="cx">     , m_form(nullptr)
</span><del>-    , m_formSetByParser(form)
</del><ins>+    , m_formSetByParser(makeWeakPtr(form))
</ins><span class="cx">     , m_compositeOperator(CompositeSourceOver)
</span><span class="cx">     , m_imageDevicePixelRatio(1.0f)
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="lines">@@ -330,8 +330,7 @@
</span><span class="cx"> Node::InsertedIntoAncestorResult HTMLImageElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
</span><span class="cx"> {
</span><span class="cx">     if (m_formSetByParser) {
</span><del>-        m_form = m_formSetByParser;
-        m_formSetByParser = nullptr;
</del><ins>+        m_form = WTFMove(m_formSetByParser);
</ins><span class="cx">         m_form->registerImgElement(this);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -341,9 +340,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!m_form) {
</span><del>-        m_form = HTMLFormElement::findClosestFormAncestor(*this);
-        if (m_form)
-            m_form->registerImgElement(this);
</del><ins>+        if (auto* newForm = HTMLFormElement::findClosestFormAncestor(*this)) {
+            m_form = makeWeakPtr(newForm);
+            newForm->registerImgElement(this);
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Insert needs to complete first, before we start updating the loader. Loader dispatches events which could result
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.h     2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLImageElement.h        2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -173,8 +173,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     HTMLImageLoader m_imageLoader;
</span><del>-    HTMLFormElement* m_form;
-    HTMLFormElement* m_formSetByParser;
</del><ins>+    WeakPtr<HTMLFormElement> m_form;
+    WeakPtr<HTMLFormElement> m_formSetByParser;
</ins><span class="cx"> 
</span><span class="cx">     CompositeOperator m_compositeOperator;
</span><span class="cx">     AtomicString m_bestFitImageURL;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h     2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     RefPtr<HTMLInputElement> checkedRadioButton;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-class HTMLInputElement : public HTMLTextFormControlElement, public CanMakeWeakPtr<HTMLInputElement> {
</del><ins>+class HTMLInputElement : public HTMLTextFormControlElement {
</ins><span class="cx">     WTF_MAKE_ISO_ALLOCATED(HTMLInputElement);
</span><span class="cx"> public:
</span><span class="cx">     static Ref<HTMLInputElement> create(const QualifiedName&, Document&, HTMLFormElement*, bool createdByParser);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h     2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -126,7 +126,6 @@
</span><span class="cx">     : public HTMLElement
</span><span class="cx">     , public ActiveDOMObject
</span><span class="cx">     , public MediaControllerInterface
</span><del>-    , public CanMakeWeakPtr<HTMLMediaElement>
</del><span class="cx">     , public PlatformMediaSessionClient
</span><span class="cx">     , private MediaCanStartListener
</span><span class="cx">     , private MediaPlayerClient
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLObjectElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLObjectElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.h    2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLObjectElement.h       2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx">     void derefFormAssociatedElement() final { deref(); }
</span><span class="cx"> 
</span><span class="cx">     FormNamedItem* asFormNamedItem() final { return this; }
</span><ins>+    FormAssociatedElement* asFormAssociatedElement() final { return this; }
</ins><span class="cx">     HTMLObjectElement& asHTMLElement() final { return *this; }
</span><span class="cx">     const HTMLObjectElement& asHTMLElement() const final { return *this; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLPictureElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLPictureElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLPictureElement.h   2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLPictureElement.h      2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class HTMLPictureElement final : public HTMLElement, public CanMakeWeakPtr<HTMLPictureElement> {
</del><ins>+class HTMLPictureElement final : public HTMLElement {
</ins><span class="cx">     WTF_MAKE_ISO_ALLOCATED(HTMLPictureElement);
</span><span class="cx"> public:
</span><span class="cx">     static Ref<HTMLPictureElement> create(const QualifiedName&, Document&);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSlotElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSlotElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSlotElement.h      2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/html/HTMLSlotElement.h 2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class HTMLSlotElement final : public HTMLElement, public CanMakeWeakPtr<HTMLSlotElement> {
</del><ins>+class HTMLSlotElement final : public HTMLElement {
</ins><span class="cx">     WTF_MAKE_ISO_ALLOCATED(HTMLSlotElement);
</span><span class="cx"> public:
</span><span class="cx">     static Ref<HTMLSlotElement> create(const QualifiedName&, Document&);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (243953 => 243954)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h    2019-04-05 23:39:16 UTC (rev 243953)
+++ trunk/Source/WebCore/svg/SVGElement.h       2019-04-06 00:03:46 UTC (rev 243954)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
</span><span class="cx"> 
</span><del>-class SVGElement : public StyledElement, public SVGLangSpace, public SVGPropertyOwner, public CanMakeWeakPtr<SVGElement> {
</del><ins>+class SVGElement : public StyledElement, public SVGLangSpace, public SVGPropertyOwner {
</ins><span class="cx">     WTF_MAKE_ISO_ALLOCATED(SVGElement);
</span><span class="cx"> public:
</span><span class="cx">     bool isOutermostSVGSVGElement() const;
</span></span></pre>
</div>
</div>

</body>
</html>