Title: [243941] trunk/Source
Revision
243941
Author
mcatanz...@igalia.com
Date
2019-04-05 11:32:43 -0700 (Fri, 05 Apr 2019)

Log Message

Unreviewed manual rollout of r243929
https://bugs.webkit.org/show_bug.cgi?id=196626

Source/WebCore:

* 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): Deleted.
(WebCore::HTMLElement::asFormAssociatedElement): Deleted.
* html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem):
* html/HTMLFormControlElement.h:
* html/HTMLFormControlsCollection.cpp:
(WebCore:: const):
(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:

* wtf/WeakHashSet.h:
(WTF::WeakHashSet::remove):
(WTF::WeakHashSet::contains const):
(WTF::WeakHashSet::computesEmpty const): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (243940 => 243941)


--- trunk/Source/WTF/ChangeLog	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WTF/ChangeLog	2019-04-05 18:32:43 UTC (rev 243941)
@@ -1,3 +1,13 @@
+2019-04-05  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        Unreviewed manual rollout of r243929
+        https://bugs.webkit.org/show_bug.cgi?id=196626
+
+        * wtf/WeakHashSet.h:
+        (WTF::WeakHashSet::remove):
+        (WTF::WeakHashSet::contains const):
+        (WTF::WeakHashSet::computesEmpty const): Deleted.
+
 2019-04-05  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r243833.

Modified: trunk/Source/WTF/wtf/WeakHashSet.h (243940 => 243941)


--- trunk/Source/WTF/wtf/WeakHashSet.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WTF/wtf/WeakHashSet.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -91,19 +91,17 @@
         m_set.add(*makeWeakPtr(value).m_ref);
     }
 
-    template <typename U>
-    bool remove(const U& value)
+    void remove(const T& value)
     {
-        auto* weakReference = weak_reference_downcast<T>(value.weakPtrFactory().m_ref.get());
+        auto* weakReference = value.weakPtrFactory().m_ref.get();
         if (!weakReference)
-            return false;
-        return m_set.remove(weakReference);
+            return;
+        m_set.remove(weakReference);
     }
 
-    template <typename U>
-    bool contains(const U& value) const
+    bool contains(const T& value) const
     {
-        auto* weakReference = weak_reference_downcast<T>(value.weakPtrFactory().m_ref.get());
+        auto* weakReference = value.weakPtrFactory().m_ref.get();
         if (!weakReference)
             return false;
         return m_set.contains(weakReference);
@@ -111,17 +109,6 @@
 
     unsigned capacity() const { return m_set.capacity(); }
 
-    bool computesEmpty() const
-    {
-        if (m_set.isEmpty())
-            return true;
-        for (auto& value : m_set) {
-            if (value->get())
-                return false;
-        }
-        return true;
-    }
-
     unsigned computeSize() const
     {
         const_cast<WeakReferenceSet&>(m_set).removeIf([] (auto& value) { return !value->get(); });

Modified: trunk/Source/WebCore/ChangeLog (243940 => 243941)


--- trunk/Source/WebCore/ChangeLog	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/ChangeLog	2019-04-05 18:32:43 UTC (rev 243941)
@@ -1,3 +1,47 @@
+2019-04-05  Michael Catanzaro  <mcatanz...@igalia.com>
+
+        Unreviewed manual rollout of r243929
+        https://bugs.webkit.org/show_bug.cgi?id=196626
+
+        * 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): Deleted.
+        (WebCore::HTMLElement::asFormAssociatedElement): Deleted.
+        * html/HTMLElement.h:
+        (WebCore::HTMLElement::asFormNamedItem):
+        * html/HTMLFormControlElement.h:
+        * html/HTMLFormControlsCollection.cpp:
+        (WebCore:: const):
+        (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:
+
 2019-04-05  Sihui Liu  <sihui_...@apple.com>
 
         [iOS] Web process gets suspended while holding locked database files

Modified: trunk/Source/WebCore/dom/Element.h (243940 => 243941)


--- trunk/Source/WebCore/dom/Element.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/dom/Element.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -77,7 +77,7 @@
 enum class TouchAction : uint8_t;
 #endif
 
-class Element : public ContainerNode , public CanMakeWeakPtr<Element> {
+class Element : public ContainerNode {
     WTF_MAKE_ISO_ALLOCATED(Element);
 public:
     static Ref<Element> create(const QualifiedName&, Document&);

Modified: trunk/Source/WebCore/html/FormAssociatedElement.cpp (243940 => 243941)


--- trunk/Source/WebCore/html/FormAssociatedElement.cpp	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/FormAssociatedElement.cpp	2019-04-05 18:32:43 UTC (rev 243941)
@@ -52,7 +52,7 @@
 
 FormAssociatedElement::FormAssociatedElement(HTMLFormElement* form)
     : m_form(nullptr)
-    , m_formSetByParser(makeWeakPtr(form))
+    , m_formSetByParser(form)
 {
 }
 
@@ -74,7 +74,7 @@
     if (m_formSetByParser) {
         // The form could have been removed by a script during parsing.
         if (m_formSetByParser->isConnected())
-            setForm(m_formSetByParser.get());
+            setForm(m_formSetByParser);
         m_formSetByParser = nullptr;
     }
 
@@ -146,9 +146,9 @@
     willChangeForm();
     if (m_form)
         m_form->removeFormElement(this);
-    m_form = makeWeakPtr(newForm);
-    if (newForm)
-        newForm->registerFormElement(this);
+    m_form = newForm;
+    if (m_form)
+        m_form->registerFormElement(this);
     didChangeForm();
 }
 
@@ -172,11 +172,10 @@
 
 void FormAssociatedElement::resetFormOwner()
 {
-    RefPtr<HTMLFormElement> originalForm = m_form.get();
-    setForm(findAssociatedForm(&asHTMLElement(), originalForm.get()));
+    RefPtr<HTMLFormElement> originalForm = m_form;
+    setForm(findAssociatedForm(&asHTMLElement(), m_form));
     HTMLElement& element = asHTMLElement();
-    auto* newForm = m_form.get();
-    if (newForm && newForm != originalForm && newForm->isConnected())
+    if (m_form && m_form != originalForm && m_form->isConnected())
         element.document().didAssociateFormControl(element);
 }
 
@@ -185,11 +184,9 @@
     HTMLElement& element = asHTMLElement();
     if (!element.hasAttributeWithoutSynchronization(formAttr)) {
         // The form attribute removed. We need to reset form owner here.
-        RefPtr<HTMLFormElement> originalForm = m_form.get();
-        // FIXME: Why does this not pass originalForm to findClosestFormAncestor?
+        RefPtr<HTMLFormElement> originalForm = m_form;
         setForm(HTMLFormElement::findClosestFormAncestor(element));
-        auto* newForm = m_form.get();
-        if (newForm && newForm != originalForm && newForm->isConnected())
+        if (m_form && m_form != originalForm && m_form->isConnected())
             element.document().didAssociateFormControl(element);
         m_formAttributeTargetObserver = nullptr;
     } else {

Modified: trunk/Source/WebCore/html/FormAssociatedElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/FormAssociatedElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/FormAssociatedElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -25,7 +25,6 @@
 
 #include "FormNamedItem.h"
 #include "Node.h"
-#include <wtf/WeakPtr.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -48,7 +47,7 @@
     void deref() { derefFormAssociatedElement(); }
 
     static HTMLFormElement* findAssociatedForm(const HTMLElement*, HTMLFormElement*);
-    HTMLFormElement* form() const { return m_form.get(); }
+    HTMLFormElement* form() const { return m_form; }
     ValidityState* validity();
 
     virtual bool isFormControlElement() const = 0;
@@ -118,8 +117,8 @@
     bool isFormAssociatedElement() const final { return true; }
 
     std::unique_ptr<FormAttributeTargetObserver> m_formAttributeTargetObserver;
-    WeakPtr<HTMLFormElement> m_form;
-    WeakPtr<HTMLFormElement> m_formSetByParser;
+    HTMLFormElement* m_form;
+    HTMLFormElement* m_formSetByParser;
     String m_customValidationMessage;
 };
 

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2019-04-05 18:32:43 UTC (rev 243941)
@@ -762,16 +762,6 @@
     return HTMLFormElement::findClosestFormAncestor(*this);
 }
 
-FormNamedItem* HTMLElement::asFormNamedItem()
-{
-    return nullptr;
-}
-
-FormAssociatedElement* HTMLElement::asFormAssociatedElement()
-{
-    return nullptr;
-}
-
 static inline bool elementAffectsDirectionality(const Node& node)
 {
     if (!is<HTMLElement>(node))

Modified: trunk/Source/WebCore/html/HTMLElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -32,7 +32,6 @@
 namespace WebCore {
 
 class DocumentFragment;
-class FormAssociatedElement;
 class FormNamedItem;
 class HTMLCollection;
 class HTMLFormElement;
@@ -89,8 +88,7 @@
     bool willRespondToMouseClickEvents() override;
 
     virtual bool isLabelable() const { return false; }
-    virtual FormNamedItem* asFormNamedItem();
-    virtual FormAssociatedElement* asFormAssociatedElement();
+    virtual FormNamedItem* asFormNamedItem() { return 0; }
 
     bool hasTagName(const HTMLQualifiedName& name) const { return hasLocalName(name.localName()); }
 

Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLFormControlElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -175,8 +175,7 @@
 
     HTMLElement& asHTMLElement() final { return *this; }
     const HTMLFormControlElement& asHTMLElement() const final { return *this; }
-    FormNamedItem* asFormNamedItem() final { return this; }
-    FormAssociatedElement* asFormAssociatedElement() final { return this; }
+    HTMLFormControlElement* asFormNamedItem() final { return this; }
 
     bool needsMouseFocusableQuirk() const;
 

Modified: trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLFormControlsCollection.cpp	2019-04-05 18:32:43 UTC (rev 243941)
@@ -75,6 +75,11 @@
     return ownerNode().copyAssociatedElementsVector();
 }
 
+const Vector<HTMLImageElement*>& HTMLFormControlsCollection::formImageElements() const
+{
+    return ownerNode().imageElements();
+}
+
 static unsigned findFormAssociatedElement(const Vector<FormAssociatedElement*>& elements, const Element& element)
 {
     for (unsigned i = 0; i < elements.size(); ++i) {
@@ -140,9 +145,7 @@
         }
     }
 
-    for (auto& elementPtr : ownerNode().imageElements()) {
-        if (!elementPtr)
-            continue;
+    for (auto* elementPtr : formImageElements()) {
         HTMLImageElement& element = *elementPtr;
         const AtomicString& id = element.getIdAttribute();
         if (!id.isEmpty() && !foundInputElements.contains(id.impl()))

Modified: trunk/Source/WebCore/html/HTMLFormControlsCollection.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLFormControlsCollection.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLFormControlsCollection.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -56,6 +56,7 @@
 
     const Vector<FormAssociatedElement*>& unsafeFormControlElements() const;
     Vector<Ref<FormAssociatedElement>> copyFormControlElementsVector() const;
+    const Vector<HTMLImageElement*>& formImageElements() const;
 
     mutable Element* m_cachedElement;
     mutable unsigned m_cachedElementOffsetInArray;

Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLFormElement.cpp	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp	2019-04-05 18:32:43 UTC (rev 243941)
@@ -566,15 +566,15 @@
     ASSERT_WITH_MESSAGE(!is<HTMLFieldSetElement>(formControlElement), "FieldSet are never candidates for constraint validation.");
     ASSERT(static_cast<const Element&>(formControlElement).matchesInvalidPseudoClass());
 
-    if (m_invalidAssociatedFormControls.computesEmpty())
+    if (m_invalidAssociatedFormControls.isEmpty())
         invalidateStyleForSubtree();
-    m_invalidAssociatedFormControls.add(const_cast<HTMLFormControlElement&>(formControlElement));
+    m_invalidAssociatedFormControls.add(&formControlElement);
 }
 
 void HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded(const HTMLFormControlElement& formControlElement)
 {
-    if (m_invalidAssociatedFormControls.remove(formControlElement)) {
-        if (m_invalidAssociatedFormControls.computesEmpty())
+    if (m_invalidAssociatedFormControls.remove(&formControlElement)) {
+        if (m_invalidAssociatedFormControls.isEmpty())
             invalidateStyleForSubtree();
     }
 }
@@ -587,7 +587,7 @@
 void HTMLFormElement::registerImgElement(HTMLImageElement* e)
 {
     ASSERT(m_imageElements.find(e) == notFound);
-    m_imageElements.append(makeWeakPtr(e));
+    m_imageElements.append(e);
 }
 
 void HTMLFormElement::removeImgElement(HTMLImageElement* e)
@@ -681,18 +681,18 @@
 
 HTMLFormControlElement* HTMLFormElement::defaultButton() const
 {
-    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;
+    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;
+            }
         }
     }
-    return nullptr;
+    return m_defaultButton;
 }
 
 void HTMLFormElement::resetDefaultButton()
@@ -706,7 +706,8 @@
 
     ScriptDisallowedScope::InMainThread scriptDisallowedScope;
 
-    auto oldDefault = WTFMove(m_defaultButton);
+    auto* oldDefault = m_defaultButton;
+    m_defaultButton = nullptr;
     defaultButton();
     if (m_defaultButton != oldDefault) {
         if (oldDefault)
@@ -809,12 +810,12 @@
 
 bool HTMLFormElement::matchesValidPseudoClass() const
 {
-    return m_invalidAssociatedFormControls.computesEmpty();
+    return m_invalidAssociatedFormControls.isEmpty();
 }
 
 bool HTMLFormElement::matchesInvalidPseudoClass() const
 {
-    return !matchesValidPseudoClass();
+    return !m_invalidAssociatedFormControls.isEmpty();
 }
 
 // FIXME: Use Ref<HTMLElement> for the function result since there are no non-HTML elements returned here.

Modified: trunk/Source/WebCore/html/HTMLFormElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLFormElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLFormElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -29,7 +29,6 @@
 #include "RadioButtonGroups.h"
 #include <memory>
 #include <wtf/IsoMalloc.h>
-#include <wtf/WeakHashSet.h>
 
 #if ENABLE(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE)
 #include "Autocapitalize.h"
@@ -121,7 +120,7 @@
 
     WEBCORE_EXPORT const Vector<FormAssociatedElement*>& unsafeAssociatedElements() const;
     Vector<Ref<FormAssociatedElement>> copyAssociatedElementsVector() const;
-    const Vector<WeakPtr<HTMLImageElement>>& imageElements() const { return m_imageElements; }
+    const Vector<HTMLImageElement*>& imageElements() const { return m_imageElements; }
 
     StringPairVector textFieldValues() const;
 
@@ -174,13 +173,13 @@
     std::unique_ptr<PastNamesMap> m_pastNamesMap;
 
     RadioButtonGroups m_radioButtonGroups;
-    mutable WeakPtr<HTMLFormControlElement> m_defaultButton;
+    mutable HTMLFormControlElement* m_defaultButton { nullptr };
 
     unsigned m_associatedElementsBeforeIndex { 0 };
     unsigned m_associatedElementsAfterIndex { 0 };
     Vector<FormAssociatedElement*> m_associatedElements;
-    Vector<WeakPtr<HTMLImageElement>> m_imageElements;
-    WeakHashSet<HTMLFormControlElement> m_invalidAssociatedFormControls;
+    Vector<HTMLImageElement*> m_imageElements;
+    HashSet<const HTMLFormControlElement*> m_invalidAssociatedFormControls;
 
     bool m_wasUserSubmitted { false };
     bool m_isSubmittingOrPreparingForSubmission { false };

Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLImageElement.cpp	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp	2019-04-05 18:32:43 UTC (rev 243941)
@@ -71,7 +71,7 @@
     : HTMLElement(tagName, document)
     , m_imageLoader(*this)
     , m_form(nullptr)
-    , m_formSetByParser(makeWeakPtr(form))
+    , m_formSetByParser(form)
     , m_compositeOperator(CompositeSourceOver)
     , m_imageDevicePixelRatio(1.0f)
 #if ENABLE(SERVICE_CONTROLS)
@@ -330,7 +330,8 @@
 Node::InsertedIntoAncestorResult HTMLImageElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
 {
     if (m_formSetByParser) {
-        m_form = WTFMove(m_formSetByParser);
+        m_form = m_formSetByParser;
+        m_formSetByParser = nullptr;
         m_form->registerImgElement(this);
     }
 
@@ -340,10 +341,9 @@
     }
 
     if (!m_form) {
-        if (auto* newForm = HTMLFormElement::findClosestFormAncestor(*this)) {
-            m_form = makeWeakPtr(newForm);
-            newForm->registerImgElement(this);
-        }
+        m_form = HTMLFormElement::findClosestFormAncestor(*this);
+        if (m_form)
+            m_form->registerImgElement(this);
     }
 
     // Insert needs to complete first, before we start updating the loader. Loader dispatches events which could result

Modified: trunk/Source/WebCore/html/HTMLImageElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLImageElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLImageElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -173,8 +173,8 @@
 #endif
 
     HTMLImageLoader m_imageLoader;
-    WeakPtr<HTMLFormElement> m_form;
-    WeakPtr<HTMLFormElement> m_formSetByParser;
+    HTMLFormElement* m_form;
+    HTMLFormElement* m_formSetByParser;
 
     CompositeOperator m_compositeOperator;
     AtomicString m_bestFitImageURL;

Modified: trunk/Source/WebCore/html/HTMLInputElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLInputElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLInputElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -54,7 +54,7 @@
     RefPtr<HTMLInputElement> checkedRadioButton;
 };
 
-class HTMLInputElement : public HTMLTextFormControlElement {
+class HTMLInputElement : public HTMLTextFormControlElement, public CanMakeWeakPtr<HTMLInputElement> {
     WTF_MAKE_ISO_ALLOCATED(HTMLInputElement);
 public:
     static Ref<HTMLInputElement> create(const QualifiedName&, Document&, HTMLFormElement*, bool createdByParser);

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -126,6 +126,7 @@
     : public HTMLElement
     , public ActiveDOMObject
     , public MediaControllerInterface
+    , public CanMakeWeakPtr<HTMLMediaElement>
     , public PlatformMediaSessionClient
     , private MediaCanStartListener
     , private MediaPlayerClient

Modified: trunk/Source/WebCore/html/HTMLObjectElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLObjectElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLObjectElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -91,7 +91,6 @@
     void derefFormAssociatedElement() final { deref(); }
 
     FormNamedItem* asFormNamedItem() final { return this; }
-    FormAssociatedElement* asFormAssociatedElement() final { return this; }
     HTMLObjectElement& asHTMLElement() final { return *this; }
     const HTMLObjectElement& asHTMLElement() const final { return *this; }
 

Modified: trunk/Source/WebCore/html/HTMLPictureElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLPictureElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLPictureElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-class HTMLPictureElement final : public HTMLElement {
+class HTMLPictureElement final : public HTMLElement, public CanMakeWeakPtr<HTMLPictureElement> {
     WTF_MAKE_ISO_ALLOCATED(HTMLPictureElement);
 public:
     static Ref<HTMLPictureElement> create(const QualifiedName&, Document&);

Modified: trunk/Source/WebCore/html/HTMLSlotElement.h (243940 => 243941)


--- trunk/Source/WebCore/html/HTMLSlotElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/html/HTMLSlotElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-class HTMLSlotElement final : public HTMLElement {
+class HTMLSlotElement final : public HTMLElement, public CanMakeWeakPtr<HTMLSlotElement> {
     WTF_MAKE_ISO_ALLOCATED(HTMLSlotElement);
 public:
     static Ref<HTMLSlotElement> create(const QualifiedName&, Document&);

Modified: trunk/Source/WebCore/svg/SVGElement.h (243940 => 243941)


--- trunk/Source/WebCore/svg/SVGElement.h	2019-04-05 18:21:40 UTC (rev 243940)
+++ trunk/Source/WebCore/svg/SVGElement.h	2019-04-05 18:32:43 UTC (rev 243941)
@@ -47,7 +47,7 @@
 
 void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
 
-class SVGElement : public StyledElement, public SVGLangSpace, public SVGPropertyOwner {
+class SVGElement : public StyledElement, public SVGLangSpace, public SVGPropertyOwner, public CanMakeWeakPtr<SVGElement> {
     WTF_MAKE_ISO_ALLOCATED(SVGElement);
 public:
     bool isOutermostSVGSVGElement() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to