Diff
Modified: trunk/LayoutTests/ChangeLog (261252 => 261253)
--- trunk/LayoutTests/ChangeLog 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/LayoutTests/ChangeLog 2020-05-06 22:43:00 UTC (rev 261253)
@@ -1,3 +1,17 @@
+2020-05-06 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, reverting r261239.
+
+ Caused fast/events/wheel-event-outside-body.html to assert on
+ macOS WK1
+
+ Reverted changeset:
+
+ "Add basic support for generating accurate wheel event
+ listener region"
+ https://bugs.webkit.org/show_bug.cgi?id=211512
+ https://trac.webkit.org/changeset/261239
+
2020-05-06 Tim Horton <timothy_hor...@apple.com>
Add a test for `REGRESSION (r260753): Frequent crashes under TextIndicator's estimatedTextColorsForRange`
Deleted: trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-basic-expected.txt (261252 => 261253)
--- trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-basic-expected.txt 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-basic-expected.txt 2020-05-06 22:43:00 UTC (rev 261253)
@@ -1,26 +0,0 @@
-(GraphicsLayer
- (anchor 0.00 0.00)
- (bounds 800.00 600.00)
- (children 1
- (GraphicsLayer
- (bounds 800.00 600.00)
- (contentsOpaque 1)
- (drawsContent 1)
- (backgroundColor #FFFFFF)
- (event region
- (rect (0,0) width=800 height=600)
- (wheel event listener region
- (rect (8,8) width=250 height=50)
- (rect (8,58) width=200 height=150)
- (rect (208,208) width=250 height=50)
- (rect (208,258) width=200 height=150)
- (non-passive
- (rect (8,8) width=250 height=50)
- (rect (8,58) width=200 height=150)
- )
- )
- )
- )
- )
-)
-
Deleted: trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-basic.html (261252 => 261253)
--- trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-basic.html 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/LayoutTests/fast/scrolling/mac/wheel-event-listener-region-basic.html 2020-05-06 22:43:00 UTC (rev 261253)
@@ -1,44 +0,0 @@
-<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
-<html>
-<style>
-.event {
- position:relative;
- background-color:blue;
- width:200px;
- height:200px;
-}
-.child {
- position:relative;
- background-color:blue;
- left:200px;
- width:50px;
- height:50px;
-}
-.offset {
- left: 200px;
-}
-
-</style>
-<script>
-window._onload_ = () => {
- if (window.testRunner)
- testRunner.dumpAsText();
-
- if (window.internals)
- results.innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION | internals.LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES);
-}
-</script>
-<body>
-<div class="event" _onwheel_="results.textContent += 'wheel\n'">
- <div class="child"></div>
-</div>
-<div class="event offset" id="passive">
- <div class="child"></div>
-</div>
-<script>
-passive.addEventListener('wheel', () => { results.textContent += 'passive wheel\n' }, { passive: true });
-</script>
-<pre id="results"></pre>
-</body>
-</html>
-
Modified: trunk/Source/WebCore/ChangeLog (261252 => 261253)
--- trunk/Source/WebCore/ChangeLog 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/ChangeLog 2020-05-06 22:43:00 UTC (rev 261253)
@@ -1,3 +1,17 @@
+2020-05-06 Ryan Haddad <ryanhad...@apple.com>
+
+ Unreviewed, reverting r261239.
+
+ Caused fast/events/wheel-event-outside-body.html to assert on
+ macOS WK1
+
+ Reverted changeset:
+
+ "Add basic support for generating accurate wheel event
+ listener region"
+ https://bugs.webkit.org/show_bug.cgi?id=211512
+ https://trac.webkit.org/changeset/261239
+
2020-05-06 Chris Dumez <cdu...@apple.com>
REGRESSION (r260684): Reader background is lost after multitasking
Modified: trunk/Source/WebCore/dom/Node.h (261252 => 261253)
--- trunk/Source/WebCore/dom/Node.h 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/dom/Node.h 2020-05-06 22:43:00 UTC (rev 261253)
@@ -482,7 +482,6 @@
bool m_adoptionIsRequired { true };
#endif
- using EventTarget::eventTargetData;
EventTargetData* eventTargetData() final;
EventTargetData* eventTargetDataConcurrently() final;
EventTargetData& ensureEventTargetData() final;
Modified: trunk/Source/WebCore/rendering/EventRegion.cpp (261252 => 261253)
--- trunk/Source/WebCore/rendering/EventRegion.cpp 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/EventRegion.cpp 2020-05-06 22:43:00 UTC (rev 261253)
@@ -112,7 +112,6 @@
m_region.unite(region);
uniteTouchActions(region, style.effectiveTouchActions());
- uniteEventListeners(region, style.eventListenerRegionTypes());
#if ENABLE(EDITABLE_REGION)
if (overrideUserModifyIsEditable || style.userModify() != UserModify::ReadOnly)
@@ -221,14 +220,6 @@
return actions;
}
-void EventRegion::uniteEventListeners(const Region& region, OptionSet<EventListenerRegionType> eventListenerRegionTypes)
-{
- if (eventListenerRegionTypes.contains(EventListenerRegionType::Wheel))
- m_wheelEventListenerRegion.unite(region);
- if (eventListenerRegionTypes.contains(EventListenerRegionType::NonPassiveWheel))
- m_nonPassiveWheelEventListenerRegion.unite(region);
-}
-
#if ENABLE(EDITABLE_REGION)
bool EventRegion::containsEditableElementsInRect(const IntRect& rect) const
@@ -256,16 +247,6 @@
ts << indent << ")\n";
}
- if (!m_wheelEventListenerRegion.isEmpty()) {
- ts << indent << "(wheel event listener region" << m_wheelEventListenerRegion;
- if (!m_nonPassiveWheelEventListenerRegion.isEmpty()) {
- TextStream::IndentScope indentScope(ts);
- ts << indent << "(non-passive" << m_nonPassiveWheelEventListenerRegion;
- ts << indent << ")\n";
- }
- ts << indent << ")\n";
- }
-
#if ENABLE(EDITABLE_REGION)
if (!m_editableRegion.isEmpty()) {
ts << indent << "(editable region" << m_editableRegion;
Modified: trunk/Source/WebCore/rendering/EventRegion.h (261252 => 261253)
--- trunk/Source/WebCore/rendering/EventRegion.h 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/EventRegion.h 2020-05-06 22:43:00 UTC (rev 261253)
@@ -27,7 +27,6 @@
#include "AffineTransform.h"
#include "Region.h"
-#include "RenderStyleConstants.h"
#include "TouchAction.h"
#include <wtf/OptionSet.h>
#include <wtf/Vector.h>
@@ -77,6 +76,7 @@
bool hasTouchActions() const { return !m_touchActionRegions.isEmpty(); }
WEBCORE_EXPORT OptionSet<TouchAction> touchActionsForPoint(const IntPoint&) const;
+
const Region* regionForTouchAction(TouchAction) const;
#if ENABLE(EDITABLE_REGION)
@@ -93,12 +93,9 @@
private:
void uniteTouchActions(const Region&, OptionSet<TouchAction>);
- void uniteEventListeners(const Region&, OptionSet<EventListenerRegionType>);
Region m_region;
Vector<Region> m_touchActionRegions;
- Region m_wheelEventListenerRegion;
- Region m_nonPassiveWheelEventListenerRegion;
#if ENABLE(EDITABLE_REGION)
Region m_editableRegion;
#endif
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (261252 => 261253)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2020-05-06 22:43:00 UTC (rev 261253)
@@ -1668,10 +1668,6 @@
if (renderer().document().mayHaveEditableElements())
return true;
#endif
-#if !PLATFORM(IOS_FAMILY)
- if (renderer().document().wheelEventTargets())
- return true;
-#endif
if (m_owningLayer.isRenderViewLayer())
return false;
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (261252 => 261253)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2020-05-06 22:43:00 UTC (rev 261253)
@@ -691,10 +691,9 @@
int initialLetterDrop() const { return initialLetter().width(); }
int initialLetterHeight() const { return initialLetter().height(); }
- OptionSet<TouchAction> touchActions() const { return m_rareNonInheritedData->touchActions; }
+ OptionSet<TouchAction> touchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareNonInheritedData->touchActions); }
// 'touch-action' behavior depends on values in ancestors. We use an additional inherited property to implement that.
- OptionSet<TouchAction> effectiveTouchActions() const { return m_rareInheritedData->effectiveTouchActions; }
- OptionSet<EventListenerRegionType> eventListenerRegionTypes() const { return m_rareInheritedData->eventListenerRegionTypes; }
+ OptionSet<TouchAction> effectiveTouchActions() const { return OptionSet<TouchAction>::fromRaw(m_rareInheritedData->effectiveTouchActions); }
#if ENABLE(CSS_SCROLL_SNAP)
// Scroll snap port style.
@@ -1227,9 +1226,8 @@
void setInitialLetter(const IntSize& size) { SET_VAR(m_rareNonInheritedData, initialLetter, size); }
- void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions); }
- void setEffectiveTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareInheritedData, effectiveTouchActions, touchActions); }
- void setEventListenerRegionTypes(OptionSet<EventListenerRegionType> eventListenerTypes) { SET_VAR(m_rareInheritedData, eventListenerRegionTypes, eventListenerTypes); }
+ void setTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareNonInheritedData, touchActions, touchActions.toRaw()); }
+ void setEffectiveTouchActions(OptionSet<TouchAction> touchActions) { SET_VAR(m_rareInheritedData, effectiveTouchActions, touchActions.toRaw()); }
#if ENABLE(CSS_SCROLL_SNAP)
void setScrollSnapType(const ScrollSnapType&);
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (261252 => 261253)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2020-05-06 22:43:00 UTC (rev 261253)
@@ -1180,11 +1180,6 @@
Optional
};
-enum class EventListenerRegionType : uint8_t {
- Wheel = 1 << 0,
- NonPassiveWheel = 1 << 1,
-};
-
extern const float defaultMiterLimit;
WTF::TextStream& operator<<(WTF::TextStream&, AnimationFillMode);
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (261252 => 261253)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2020-05-06 22:43:00 UTC (rev 261253)
@@ -133,7 +133,7 @@
, joinStyle(RenderStyle::initialJoinStyle())
, hasSetStrokeWidth(false)
, hasSetStrokeColor(false)
- , effectiveTouchActions(RenderStyle::initialTouchActions())
+ , effectiveTouchActions(static_cast<unsigned>(RenderStyle::initialTouchActions()))
, strokeWidth(RenderStyle::initialStrokeWidth())
, strokeColor(RenderStyle::initialStrokeColor())
, miterLimit(RenderStyle::initialStrokeMiterLimit())
@@ -228,7 +228,6 @@
, hasSetStrokeWidth(o.hasSetStrokeWidth)
, hasSetStrokeColor(o.hasSetStrokeColor)
, effectiveTouchActions(o.effectiveTouchActions)
- , eventListenerRegionTypes(o.eventListenerRegionTypes)
, strokeWidth(o.strokeWidth)
, strokeColor(o.strokeColor)
, visitedLinkStrokeColor(o.visitedLinkStrokeColor)
@@ -350,7 +349,6 @@
&& hasSetStrokeWidth == o.hasSetStrokeWidth
&& hasSetStrokeColor == o.hasSetStrokeColor
&& effectiveTouchActions == o.effectiveTouchActions
- && eventListenerRegionTypes == o.eventListenerRegionTypes
&& strokeWidth == o.strokeWidth
&& strokeColor == o.strokeColor
&& visitedLinkStrokeColor == o.visitedLinkStrokeColor
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (261252 => 261253)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h 2020-05-06 22:43:00 UTC (rev 261253)
@@ -30,7 +30,6 @@
#include "TabSize.h"
#include "TextDecorationThickness.h"
#include "TextUnderlineOffset.h"
-#include "TouchAction.h"
#include <wtf/DataRef.h>
#include <wtf/RefCounted.h>
#include <wtf/text/AtomString.h>
@@ -155,8 +154,7 @@
unsigned hasSetStrokeWidth : 1;
unsigned hasSetStrokeColor : 1;
- OptionSet<TouchAction> effectiveTouchActions;
- OptionSet<EventListenerRegionType> eventListenerRegionTypes;
+ unsigned effectiveTouchActions : 6; // OptionSet<TouchAction>
Length strokeWidth;
Color strokeColor;
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (261252 => 261253)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp 2020-05-06 22:43:00 UTC (rev 261253)
@@ -81,7 +81,7 @@
, justifyItems(RenderStyle::initialJustifyItems())
, justifySelf(RenderStyle::initialSelfAlignment())
, customProperties(StyleCustomPropertyData::create())
- , touchActions(RenderStyle::initialTouchActions())
+ , touchActions(static_cast<unsigned>(RenderStyle::initialTouchActions()))
, pageSizeType(PAGE_SIZE_AUTO)
, transformStyle3D(static_cast<unsigned>(RenderStyle::initialTransformStyle3D()))
, backfaceVisibility(static_cast<unsigned>(RenderStyle::initialBackfaceVisibility()))
Modified: trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h (261252 => 261253)
--- trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h 2020-05-06 22:43:00 UTC (rev 261253)
@@ -173,7 +173,7 @@
DataRef<StyleCustomPropertyData> customProperties;
std::unique_ptr<HashSet<String>> customPaintWatchedProperties;
- OptionSet<TouchAction> touchActions;
+ unsigned touchActions : 6; // TouchAction
unsigned pageSizeType : 2; // PageSizeType
unsigned transformStyle3D : 1; // TransformStyle3D
Modified: trunk/Source/WebCore/style/StyleAdjuster.cpp (261252 => 261253)
--- trunk/Source/WebCore/style/StyleAdjuster.cpp 2020-05-06 22:05:54 UTC (rev 261252)
+++ trunk/Source/WebCore/style/StyleAdjuster.cpp 2020-05-06 22:43:00 UTC (rev 261253)
@@ -33,7 +33,6 @@
#include "AnimationBase.h"
#include "CSSFontSelector.h"
#include "Element.h"
-#include "EventNames.h"
#include "FrameView.h"
#include "HTMLDivElement.h"
#include "HTMLInputElement.h"
@@ -193,44 +192,6 @@
return sharedTouchActions;
}
-static OptionSet<EventListenerRegionType> computeEventListenerRegionTypes(const Element& element, OptionSet<EventListenerRegionType> parentTypes)
-{
-#if !PLATFORM(IOS_FAMILY)
- if (!element.hasEventListeners())
- return parentTypes;
-
- auto types = parentTypes;
-
- auto findListeners = [&](auto& eventName, auto type, auto nonPassiveType) {
- auto* eventListenerVector = element.eventTargetData()->eventListenerMap.find(eventName);
- if (!eventListenerVector)
- return;
-
- types.add(type);
-
- auto isPassiveOnly = [&] {
- for (auto& listener : *eventListenerVector) {
- if (!listener->isPassive())
- return false;
- }
- return true;
- }();
-
- if (!isPassiveOnly)
- types.add(nonPassiveType);
- };
-
- findListeners(eventNames().wheelEvent, EventListenerRegionType::Wheel, EventListenerRegionType::NonPassiveWheel);
- findListeners(eventNames().mousewheelEvent, EventListenerRegionType::Wheel, EventListenerRegionType::NonPassiveWheel);
-
- return types;
-#else
- UNUSED_PARAM(element);
- UNUSED_PARAM(parentTypes);
- return { };
-#endif
-}
-
void Adjuster::adjust(RenderStyle& style, const RenderStyle* userAgentAppearanceStyle) const
{
// Cache our original display.
@@ -476,9 +437,6 @@
style.setEffectiveTouchActions(computeEffectiveTouchActions(style, m_parentStyle.effectiveTouchActions()));
- if (m_element)
- style.setEventListenerRegionTypes(computeEventListenerRegionTypes(*m_element, m_parentStyle.eventListenerRegionTypes()));
-
#if ENABLE(TEXT_AUTOSIZING)
if (m_element)
adjustForTextAutosizing(style, *m_element);