Diff
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/ChangeLog (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/ChangeLog 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/ChangeLog 2022-05-17 05:22:51 UTC (rev 294288)
@@ -1,3 +1,170 @@
+2022-05-16 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r293993. rdar://problem/92993954
+
+ Const-ify Node::willRespondTo*Events()
+ https://bugs.webkit.org/show_bug.cgi?id=240246
+
+ Reviewed by Wenson Hsieh.
+
+ Constify these four methods, because there's no
+ reason for them not to be, and because it makes
+ them usable in a const context in a future patch.
+
+ * dom/EventNames.h:
+ (WebCore::EventNames::isTouchRelatedEventType const):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::eventTypes const):
+ * dom/EventTarget.h:
+ * dom/Node.cpp:
+ (WebCore::Node::willRespondToMouseMoveEvents const):
+ (WebCore::Node::willRespondToTouchEvents const):
+ (WebCore::Node::willRespondToMouseClickEvents const):
+ (WebCore::Node::willRespondToMouseWheelEvents const):
+ * dom/Node.h:
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents const):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLButtonElement.cpp:
+ (WebCore::HTMLButtonElement::willRespondToMouseClickEvents const):
+ * html/HTMLButtonElement.h:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::willRespondToMouseMoveEvents const):
+ (WebCore::HTMLElement::willRespondToMouseWheelEvents const):
+ (WebCore::HTMLElement::willRespondToMouseClickEvents const):
+ * html/HTMLElement.h:
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::willRespondToMouseClickEvents const):
+ * html/HTMLImageElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::willRespondToMouseClickEvents const):
+ * html/HTMLInputElement.h:
+ * html/HTMLLabelElement.cpp:
+ (WebCore::HTMLLabelElement::willRespondToMouseClickEvents const):
+ * html/HTMLLabelElement.h:
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents const):
+ * html/HTMLPlugInElement.h:
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::willRespondToMouseClickEvents const):
+ * html/HTMLSelectElement.h:
+ * html/HTMLSummaryElement.cpp:
+ (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents const):
+ * html/HTMLSummaryElement.h:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents const):
+ * html/HTMLTextAreaElement.h:
+ * html/TextFieldInputType.cpp:
+ (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents const):
+ (WebCore::TextFieldInputType::shouldSpinButtonRespondToWheelEvents const):
+ * html/TextFieldInputType.h:
+ * html/shadow/SliderThumbElement.cpp:
+ (WebCore::SliderThumbElement::willRespondToMouseMoveEvents const):
+ (WebCore::SliderThumbElement::willRespondToMouseClickEvents const):
+ * html/shadow/SliderThumbElement.h:
+ * html/shadow/SpinButtonElement.cpp:
+ (WebCore::SpinButtonElement::willRespondToMouseMoveEvents const):
+ (WebCore::SpinButtonElement::willRespondToMouseClickEvents const):
+ (WebCore::SpinButtonElement::shouldRespondToMouseEvents const):
+ * html/shadow/SpinButtonElement.h:
+ * html/shadow/TextControlInnerElements.cpp:
+ (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents const):
+ (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents const):
+ * html/shadow/TextControlInnerElements.h:
+ * mathml/MathMLElement.cpp:
+ (WebCore::MathMLElement::willRespondToMouseClickEvents const):
+ * mathml/MathMLElement.h:
+ * mathml/MathMLSelectElement.cpp:
+ (WebCore::MathMLSelectElement::willRespondToMouseClickEvents const):
+ * mathml/MathMLSelectElement.h:
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::willRespondToMouseClickEvents const):
+ * svg/SVGAElement.h:
+
+ Canonical link: https://commits.webkit.org/250430@main
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-05-09 Tim Horton <timothy_hor...@apple.com>
+
+ Const-ify Node::willRespondTo*Events()
+ https://bugs.webkit.org/show_bug.cgi?id=240246
+
+ Reviewed by Wenson Hsieh.
+
+ Constify these four methods, because there's no
+ reason for them not to be, and because it makes
+ them usable in a const context in a future patch.
+
+ * dom/EventNames.h:
+ (WebCore::EventNames::isTouchRelatedEventType const):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::eventTypes const):
+ * dom/EventTarget.h:
+ * dom/Node.cpp:
+ (WebCore::Node::willRespondToMouseMoveEvents const):
+ (WebCore::Node::willRespondToTouchEvents const):
+ (WebCore::Node::willRespondToMouseClickEvents const):
+ (WebCore::Node::willRespondToMouseWheelEvents const):
+ * dom/Node.h:
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents const):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLButtonElement.cpp:
+ (WebCore::HTMLButtonElement::willRespondToMouseClickEvents const):
+ * html/HTMLButtonElement.h:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::willRespondToMouseMoveEvents const):
+ (WebCore::HTMLElement::willRespondToMouseWheelEvents const):
+ (WebCore::HTMLElement::willRespondToMouseClickEvents const):
+ * html/HTMLElement.h:
+ * html/HTMLImageElement.cpp:
+ (WebCore::HTMLImageElement::willRespondToMouseClickEvents const):
+ * html/HTMLImageElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::willRespondToMouseClickEvents const):
+ * html/HTMLInputElement.h:
+ * html/HTMLLabelElement.cpp:
+ (WebCore::HTMLLabelElement::willRespondToMouseClickEvents const):
+ * html/HTMLLabelElement.h:
+ * html/HTMLPlugInElement.cpp:
+ (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents const):
+ * html/HTMLPlugInElement.h:
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::willRespondToMouseClickEvents const):
+ * html/HTMLSelectElement.h:
+ * html/HTMLSummaryElement.cpp:
+ (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents const):
+ * html/HTMLSummaryElement.h:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::willRespondToMouseClickEvents const):
+ * html/HTMLTextAreaElement.h:
+ * html/TextFieldInputType.cpp:
+ (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents const):
+ (WebCore::TextFieldInputType::shouldSpinButtonRespondToWheelEvents const):
+ * html/TextFieldInputType.h:
+ * html/shadow/SliderThumbElement.cpp:
+ (WebCore::SliderThumbElement::willRespondToMouseMoveEvents const):
+ (WebCore::SliderThumbElement::willRespondToMouseClickEvents const):
+ * html/shadow/SliderThumbElement.h:
+ * html/shadow/SpinButtonElement.cpp:
+ (WebCore::SpinButtonElement::willRespondToMouseMoveEvents const):
+ (WebCore::SpinButtonElement::willRespondToMouseClickEvents const):
+ (WebCore::SpinButtonElement::shouldRespondToMouseEvents const):
+ * html/shadow/SpinButtonElement.h:
+ * html/shadow/TextControlInnerElements.cpp:
+ (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents const):
+ (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents const):
+ * html/shadow/TextControlInnerElements.h:
+ * mathml/MathMLElement.cpp:
+ (WebCore::MathMLElement::willRespondToMouseClickEvents const):
+ * mathml/MathMLElement.h:
+ * mathml/MathMLSelectElement.cpp:
+ (WebCore::MathMLSelectElement::willRespondToMouseClickEvents const):
+ * mathml/MathMLSelectElement.h:
+ * svg/SVGAElement.cpp:
+ (WebCore::SVGAElement::willRespondToMouseClickEvents const):
+ * svg/SVGAElement.h:
+
2022-05-13 Russell Epstein <repst...@apple.com>
Cherry-pick r294135. rdar://problem/93201070
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventNames.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventNames.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventNames.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -365,7 +365,7 @@
// We should choose one term and stick to it.
bool isWheelEventType(const AtomString& eventType) const;
bool isGestureEventType(const AtomString& eventType) const;
- bool isTouchRelatedEventType(const AtomString& eventType, EventTarget&) const;
+ bool isTouchRelatedEventType(const AtomString& eventType, const EventTarget&) const;
bool isTouchScrollBlockingEventType(const AtomString& eventType) const;
#if ENABLE(GAMEPAD)
bool isGamepadEventType(const AtomString& eventType) const;
@@ -400,7 +400,7 @@
|| eventType == touchmoveEvent;
}
-inline bool EventNames::isTouchRelatedEventType(const AtomString& eventType, EventTarget& target) const
+inline bool EventNames::isTouchRelatedEventType(const AtomString& eventType, const EventTarget& target) const
{
#if ENABLE(TOUCH_EVENTS)
if (is<Node>(target) && downcast<Node>(target).document().quirks().shouldDispatchSimulatedMouseEvents(&target)) {
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventTarget.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventTarget.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventTarget.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -372,7 +372,7 @@
InspectorInstrumentation::didDispatchEvent(downcast<Document>(context), event);
}
-Vector<AtomString> EventTarget::eventTypes()
+Vector<AtomString> EventTarget::eventTypes() const
{
if (auto* data = ""
return data->eventListenerMap.eventTypes();
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventTarget.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventTarget.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/dom/EventTarget.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -98,7 +98,7 @@
bool hasCapturingEventListeners(const AtomString& eventType);
bool hasActiveEventListeners(const AtomString& eventType) const;
- Vector<AtomString> eventTypes();
+ Vector<AtomString> eventTypes() const;
const EventListenerVector& eventListeners(const AtomString& eventType);
enum class EventInvokePhase { Capturing, Bubbling };
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/dom/Node.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/dom/Node.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/dom/Node.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -2504,7 +2504,7 @@
}
}
-bool Node::willRespondToMouseMoveEvents()
+bool Node::willRespondToMouseMoveEvents() const
{
// FIXME: Why is the iOS code path different from the non-iOS code path?
#if !PLATFORM(IOS_FAMILY)
@@ -2517,7 +2517,7 @@
return hasEventListeners(eventNames.mousemoveEvent) || hasEventListeners(eventNames.mouseoverEvent) || hasEventListeners(eventNames.mouseoutEvent);
}
-bool Node::willRespondToTouchEvents()
+bool Node::willRespondToTouchEvents() const
{
auto& eventNames = WebCore::eventNames();
return eventTypes().containsIf([&](const auto& type) {
@@ -2525,7 +2525,7 @@
});
}
-bool Node::willRespondToMouseClickEvents()
+bool Node::willRespondToMouseClickEvents() const
{
// FIXME: Why is the iOS code path different from the non-iOS code path?
#if PLATFORM(IOS_FAMILY)
@@ -2545,7 +2545,7 @@
#endif
}
-bool Node::willRespondToMouseWheelEvents()
+bool Node::willRespondToMouseWheelEvents() const
{
return hasEventListeners(eventNames().mousewheelEvent);
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/dom/Node.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/dom/Node.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/dom/Node.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -455,10 +455,10 @@
NodeListsNodeData* nodeLists();
void clearNodeLists();
- virtual bool willRespondToMouseMoveEvents();
- virtual bool willRespondToMouseClickEvents();
- virtual bool willRespondToMouseWheelEvents();
- virtual bool willRespondToTouchEvents();
+ virtual bool willRespondToMouseMoveEvents() const;
+ virtual bool willRespondToMouseClickEvents() const;
+ virtual bool willRespondToMouseWheelEvents() const;
+ virtual bool willRespondToTouchEvents() const;
WEBCORE_EXPORT unsigned short compareDocumentPosition(Node&);
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLAnchorElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLAnchorElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLAnchorElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -676,7 +676,7 @@
return isInSVGImage(element);
}
-bool HTMLAnchorElement::willRespondToMouseClickEvents()
+bool HTMLAnchorElement::willRespondToMouseClickEvents() const
{
return isLink() || HTMLElement::willRespondToMouseClickEvents();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLAnchorElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLAnchorElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLAnchorElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -64,7 +64,7 @@
bool isLiveLink() const;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
bool hasRel(Relation) const;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLButtonElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLButtonElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLButtonElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -183,7 +183,7 @@
HTMLFormControlElement::defaultEventHandler(event);
}
-bool HTMLButtonElement::willRespondToMouseClickEvents()
+bool HTMLButtonElement::willRespondToMouseClickEvents() const
{
return !isDisabledFormControl();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLButtonElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLButtonElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLButtonElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -38,7 +38,7 @@
const AtomString& value() const;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
RenderButton* renderer() const;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -995,17 +995,17 @@
style.setProperty(propertyID, CSSValuePool::singleton().createColorValue(*color));
}
-bool HTMLElement::willRespondToMouseMoveEvents()
+bool HTMLElement::willRespondToMouseMoveEvents() const
{
return !isDisabledFormControl() && Element::willRespondToMouseMoveEvents();
}
-bool HTMLElement::willRespondToMouseWheelEvents()
+bool HTMLElement::willRespondToMouseWheelEvents() const
{
return !isDisabledFormControl() && Element::willRespondToMouseWheelEvents();
}
-bool HTMLElement::willRespondToMouseClickEvents()
+bool HTMLElement::willRespondToMouseClickEvents() const
{
return !isDisabledFormControl() && Element::willRespondToMouseClickEvents();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -94,9 +94,9 @@
virtual bool isTextControlInnerTextElement() const { return false; }
virtual bool isSearchFieldResultsButtonElement() const { return false; }
- bool willRespondToMouseMoveEvents() override;
- bool willRespondToMouseWheelEvents() override;
- bool willRespondToMouseClickEvents() override;
+ bool willRespondToMouseMoveEvents() const override;
+ bool willRespondToMouseWheelEvents() const override;
+ bool willRespondToMouseClickEvents() const override;
virtual bool isLabelable() const { return false; }
virtual FormNamedItem* asFormNamedItem();
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLImageElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLImageElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLImageElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -835,7 +835,7 @@
#if PLATFORM(IOS_FAMILY)
// FIXME: We should find a better place for the touch callout logic. See rdar://problem/48937767.
-bool HTMLImageElement::willRespondToMouseClickEvents()
+bool HTMLImageElement::willRespondToMouseClickEvents() const
{
auto renderer = this->renderer();
if (!renderer || renderer->style().touchCalloutEnabled())
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLImageElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLImageElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLImageElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -101,7 +101,7 @@
WEBCORE_EXPORT void decode(Ref<DeferredPromise>&&);
#if PLATFORM(IOS_FAMILY)
- bool willRespondToMouseClickEvents() override;
+ bool willRespondToMouseClickEvents() const override;
#endif
#if ENABLE(ATTACHMENT_ELEMENT)
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLInputElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLInputElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLInputElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -1278,7 +1278,7 @@
HTMLTextFormControlElement::defaultEventHandler(event);
}
-bool HTMLInputElement::willRespondToMouseClickEvents()
+bool HTMLInputElement::willRespondToMouseClickEvents() const
{
if (!isDisabledFormControl())
return true;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLInputElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLInputElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLInputElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -279,7 +279,7 @@
void addSearchResult();
void onSearch();
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
#if ENABLE(DATALIST_ELEMENT)
WEBCORE_EXPORT RefPtr<HTMLElement> list() const;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLLabelElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLLabelElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLLabelElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -167,7 +167,7 @@
HTMLElement::defaultEventHandler(event);
}
-bool HTMLLabelElement::willRespondToMouseClickEvents()
+bool HTMLLabelElement::willRespondToMouseClickEvents() const
{
auto element = control();
return (element && element->willRespondToMouseClickEvents()) || HTMLElement::willRespondToMouseClickEvents();
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLLabelElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLLabelElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLLabelElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -35,7 +35,7 @@
WEBCORE_EXPORT RefPtr<LabelableElement> control() const;
WEBCORE_EXPORT HTMLFormElement* form() const final;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
private:
HTMLLabelElement(const QualifiedName&, Document&);
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLPlugInElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLPlugInElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLPlugInElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -72,7 +72,7 @@
ASSERT(!m_instance); // cleared in detach()
}
-bool HTMLPlugInElement::willRespondToMouseClickEvents()
+bool HTMLPlugInElement::willRespondToMouseClickEvents() const
{
if (isDisabledFormControl())
return false;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLPlugInElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLPlugInElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLPlugInElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -63,9 +63,9 @@
void setIsCapturingMouseEvents(bool capturing) { m_isCapturingMouseEvents = capturing; }
#if PLATFORM(IOS_FAMILY)
- bool willRespondToMouseMoveEvents() final { return false; }
+ bool willRespondToMouseMoveEvents() const final { return false; }
#endif
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
virtual bool isPlugInImageElement() const = 0;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSelectElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSelectElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSelectElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -531,7 +531,7 @@
return isRequired();
}
-bool HTMLSelectElement::willRespondToMouseClickEvents()
+bool HTMLSelectElement::willRespondToMouseClickEvents() const
{
#if PLATFORM(IOS_FAMILY)
return !isDisabledFormControl();
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSelectElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSelectElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSelectElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -142,7 +142,7 @@
void reset() final;
void defaultEventHandler(Event&) final;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
void dispatchChangeEventForMenuList();
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSummaryElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSummaryElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSummaryElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -156,7 +156,7 @@
HTMLElement::defaultEventHandler(event);
}
-bool HTMLSummaryElement::willRespondToMouseClickEvents()
+bool HTMLSummaryElement::willRespondToMouseClickEvents() const
{
if (isActiveSummary() && renderer())
return true;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSummaryElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSummaryElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLSummaryElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -32,7 +32,7 @@
static Ref<HTMLSummaryElement> create(const QualifiedName&, Document&);
bool isActiveSummary() const;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
private:
HTMLSummaryElement(const QualifiedName&, Document&);
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLTextAreaElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLTextAreaElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLTextAreaElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -565,7 +565,7 @@
m_placeholder->setInnerText(String { placeholderText });
}
-bool HTMLTextAreaElement::willRespondToMouseClickEvents()
+bool HTMLTextAreaElement::willRespondToMouseClickEvents() const
{
return !isDisabledFormControl();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLTextAreaElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLTextAreaElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/HTMLTextAreaElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -66,7 +66,7 @@
WEBCORE_EXPORT void setCols(unsigned);
WEBCORE_EXPORT void setRows(unsigned);
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
RenderTextControlMultiLine* renderer() const;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/TextFieldInputType.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/TextFieldInputType.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/TextFieldInputType.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -752,13 +752,13 @@
input->select();
}
-bool TextFieldInputType::shouldSpinButtonRespondToMouseEvents()
+bool TextFieldInputType::shouldSpinButtonRespondToMouseEvents() const
{
ASSERT(element());
return !element()->isDisabledOrReadOnly();
}
-bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents()
+bool TextFieldInputType::shouldSpinButtonRespondToWheelEvents() const
{
ASSERT(element());
return shouldSpinButtonRespondToMouseEvents() && element()->focused();
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/TextFieldInputType.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/TextFieldInputType.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/TextFieldInputType.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -108,8 +108,8 @@
// SpinButtonElement::SpinButtonOwner functions.
void focusAndSelectSpinButtonOwner() final;
- bool shouldSpinButtonRespondToMouseEvents() final;
- bool shouldSpinButtonRespondToWheelEvents() final;
+ bool shouldSpinButtonRespondToMouseEvents() const final;
+ bool shouldSpinButtonRespondToWheelEvents() const final;
void spinButtonStepDown() final;
void spinButtonStepUp() final;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SliderThumbElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SliderThumbElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SliderThumbElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -377,7 +377,7 @@
HTMLDivElement::defaultEventHandler(mouseEvent);
}
-bool SliderThumbElement::willRespondToMouseMoveEvents()
+bool SliderThumbElement::willRespondToMouseMoveEvents() const
{
const auto input = hostInput();
if (input && !input->isDisabledFormControl() && m_inDragMode)
@@ -386,7 +386,7 @@
return HTMLDivElement::willRespondToMouseMoveEvents();
}
-bool SliderThumbElement::willRespondToMouseClickEvents()
+bool SliderThumbElement::willRespondToMouseClickEvents() const
{
const auto input = hostInput();
if (input && !input->isDisabledFormControl())
@@ -395,7 +395,6 @@
return HTMLDivElement::willRespondToMouseClickEvents();
}
-
void SliderThumbElement::willDetachRenderers()
{
if (m_inDragMode) {
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SliderThumbElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SliderThumbElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SliderThumbElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -67,8 +67,8 @@
RefPtr<Element> focusDelegate() final;
void defaultEventHandler(Event&) final;
- bool willRespondToMouseMoveEvents() final;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseMoveEvents() const final;
+ bool willRespondToMouseClickEvents() const final;
#if ENABLE(IOS_TOUCH_EVENTS)
void didAttachRenderers() final;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SpinButtonElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SpinButtonElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SpinButtonElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -172,7 +172,7 @@
event.setDefaultHandled();
}
-bool SpinButtonElement::willRespondToMouseMoveEvents()
+bool SpinButtonElement::willRespondToMouseMoveEvents() const
{
if (renderBox() && shouldRespondToMouseEvents())
return true;
@@ -180,7 +180,7 @@
return HTMLDivElement::willRespondToMouseMoveEvents();
}
-bool SpinButtonElement::willRespondToMouseClickEvents()
+bool SpinButtonElement::willRespondToMouseClickEvents() const
{
if (renderBox() && shouldRespondToMouseEvents())
return true;
@@ -256,7 +256,7 @@
HTMLDivElement::setHovered(flag, invalidationScope, request);
}
-bool SpinButtonElement::shouldRespondToMouseEvents()
+bool SpinButtonElement::shouldRespondToMouseEvents() const
{
return !m_spinButtonOwner || m_spinButtonOwner->shouldSpinButtonRespondToMouseEvents();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SpinButtonElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SpinButtonElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/SpinButtonElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -45,8 +45,8 @@
public:
virtual ~SpinButtonOwner() = default;
virtual void focusAndSelectSpinButtonOwner() = 0;
- virtual bool shouldSpinButtonRespondToMouseEvents() = 0;
- virtual bool shouldSpinButtonRespondToWheelEvents() = 0;
+ virtual bool shouldSpinButtonRespondToMouseEvents() const = 0;
+ virtual bool shouldSpinButtonRespondToWheelEvents() const = 0;
virtual void spinButtonStepDown() = 0;
virtual void spinButtonStepUp() = 0;
};
@@ -61,8 +61,8 @@
void step(int amount);
- bool willRespondToMouseMoveEvents() override;
- bool willRespondToMouseClickEvents() override;
+ bool willRespondToMouseMoveEvents() const override;
+ bool willRespondToMouseClickEvents() const override;
void forwardEvent(Event&);
@@ -80,7 +80,7 @@
void stopRepeatingTimer();
void repeatingTimerFired();
void setHovered(bool, Style::InvalidationScope, HitTestRequest) override;
- bool shouldRespondToMouseEvents();
+ bool shouldRespondToMouseEvents() const;
bool isMouseFocusable() const override { return false; }
SpinButtonOwner* m_spinButtonOwner;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/TextControlInnerElements.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -278,7 +278,7 @@
}
#if !PLATFORM(IOS_FAMILY)
-bool SearchFieldResultsButtonElement::willRespondToMouseClickEvents()
+bool SearchFieldResultsButtonElement::willRespondToMouseClickEvents() const
{
return true;
}
@@ -338,7 +338,7 @@
}
#if !PLATFORM(IOS_FAMILY)
-bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents()
+bool SearchFieldCancelButtonElement::willRespondToMouseClickEvents() const
{
const RefPtr<HTMLInputElement> input = downcast<HTMLInputElement>(shadowHost());
if (input && !input->isDisabledOrReadOnly())
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/TextControlInnerElements.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/TextControlInnerElements.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/html/shadow/TextControlInnerElements.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -98,7 +98,7 @@
void defaultEventHandler(Event&) override;
#if !PLATFORM(IOS_FAMILY)
- bool willRespondToMouseClickEvents() override;
+ bool willRespondToMouseClickEvents() const override;
#endif
bool canAdjustStyleForAppearance() const { return m_canAdjustStyleForAppearance; }
@@ -119,7 +119,7 @@
void defaultEventHandler(Event&) override;
#if !PLATFORM(IOS_FAMILY)
- bool willRespondToMouseClickEvents() override;
+ bool willRespondToMouseClickEvents() const override;
#endif
private:
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -180,7 +180,7 @@
return is<MathMLElement>(child);
}
-bool MathMLElement::willRespondToMouseClickEvents()
+bool MathMLElement::willRespondToMouseClickEvents() const
{
return isLink() || StyledElement::willRespondToMouseClickEvents();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -98,7 +98,7 @@
bool hasPresentationalHintsForAttribute(const QualifiedName&) const override;
void collectPresentationalHintsForAttribute(const QualifiedName&, const AtomString&, MutableStyleProperties&) override;
- bool willRespondToMouseClickEvents() override;
+ bool willRespondToMouseClickEvents() const override;
void defaultEventHandler(Event&) override;
private:
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLSelectElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLSelectElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLSelectElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -225,7 +225,7 @@
MathMLRowElement::defaultEventHandler(event);
}
-bool MathMLSelectElement::willRespondToMouseClickEvents()
+bool MathMLSelectElement::willRespondToMouseClickEvents() const
{
return attributeWithoutSynchronization(MathMLNames::actiontypeAttr) == "toggle" || MathMLRowElement::willRespondToMouseClickEvents();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLSelectElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLSelectElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/mathml/MathMLSelectElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -49,7 +49,7 @@
void childrenChanged(const ChildChange&) final;
void attributeChanged(const QualifiedName&, const AtomString& oldValue, const AtomString& newValue, AttributeModificationReason = ModifiedDirectly) final;
void defaultEventHandler(Event&) final;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
void toggle();
int getSelectedActionChildAndIndex(Element*& selectedChild);
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/page/Quirks.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/page/Quirks.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/page/Quirks.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -374,7 +374,7 @@
return topPrivatelyControlledDomain(url.host().toString()).startsWith("google.") && startsWithLettersIgnoringASCIICase(url.path(), "/maps/"_s);
}
-bool Quirks::shouldDispatchSimulatedMouseEvents(EventTarget* target) const
+bool Quirks::shouldDispatchSimulatedMouseEvents(const EventTarget* target) const
{
if (RuntimeEnabledFeatures::sharedFeatures().mouseEventsSimulationEnabled())
return true;
@@ -453,8 +453,8 @@
case ShouldDispatchSimulatedMouseEvents::DependingOnTargetFor_mybinder_org:
if (is<Node>(target)) {
- for (auto* node = downcast<Node>(target); node; node = node->parentNode()) {
- if (is<Element>(node) && downcast<Element>(*node).classList().contains("lm-DockPanel-tabBar"_s))
+ for (const auto* node = downcast<Node>(target); node; node = node->parentNode()) {
+ if (is<Element>(node) && const_cast<Element&>(downcast<Element>(*node)).classList().contains("lm-DockPanel-tabBar"_s))
return true;
}
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/page/Quirks.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/page/Quirks.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/page/Quirks.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -65,7 +65,7 @@
bool hasBrokenEncryptedMediaAPISupportQuirk() const;
bool shouldStripQuotationMarkInFontFaceSetFamily() const;
#if ENABLE(TOUCH_EVENTS)
- bool shouldDispatchSimulatedMouseEvents(EventTarget*) const;
+ bool shouldDispatchSimulatedMouseEvents(const EventTarget*) const;
bool shouldDispatchedSimulatedMouseEventsAssumeDefaultPrevented(EventTarget*) const;
std::optional<Event::IsCancelable> simulatedMouseEventTypeForTarget(EventTarget*) const;
bool shouldMakeTouchEventNonCancelableForTarget(EventTarget*) const;
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/svg/SVGAElement.cpp (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/svg/SVGAElement.cpp 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/svg/SVGAElement.cpp 2022-05-17 05:22:51 UTC (rev 294288)
@@ -210,7 +210,7 @@
return SVGElement::childShouldCreateRenderer(child);
}
-bool SVGAElement::willRespondToMouseClickEvents()
+bool SVGAElement::willRespondToMouseClickEvents() const
{
return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents();
}
Modified: branches/safari-7614.1.14.100-branch/Source/WebCore/svg/SVGAElement.h (294287 => 294288)
--- branches/safari-7614.1.14.100-branch/Source/WebCore/svg/SVGAElement.h 2022-05-17 05:21:53 UTC (rev 294287)
+++ branches/safari-7614.1.14.100-branch/Source/WebCore/svg/SVGAElement.h 2022-05-17 05:22:51 UTC (rev 294288)
@@ -65,7 +65,7 @@
bool canStartSelection() const final;
int defaultTabIndex() const final;
- bool willRespondToMouseClickEvents() final;
+ bool willRespondToMouseClickEvents() const final;
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGAnimatedString> m_target { SVGAnimatedString::create(this) };