Changeset 282487 in webkit
- Timestamp:
- Sep 15, 2021, 9:39:52 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 29 edited
-
ChangeLog (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (modified) (1 diff)
-
Source/WTF/wtf/PlatformEnableCocoa.h (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Document.cpp (modified) (6 diffs)
-
Source/WebCore/dom/Document.h (modified) (4 diffs)
-
Source/WebCore/dom/Element.cpp (modified) (5 diffs)
-
Source/WebCore/dom/Element.h (modified) (3 diffs)
-
Source/WebCore/dom/ElementRareData.cpp (modified) (1 diff)
-
Source/WebCore/dom/ElementRareData.h (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserver.cpp (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserver.h (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserver.idl (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserverCallback.h (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserverCallback.idl (modified) (1 diff)
-
Source/WebCore/page/IntersectionObserverEntry.cpp (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserverEntry.h (modified) (2 diffs)
-
Source/WebCore/page/IntersectionObserverEntry.idl (modified) (2 diffs)
-
Source/WebCore/page/Page.cpp (modified) (2 diffs)
-
Source/WebCore/page/Page.h (modified) (2 diffs)
-
Source/WebCore/testing/Internals.cpp (modified) (1 diff)
-
Source/WebCore/testing/Internals.h (modified) (1 diff)
-
Source/WebCore/testing/Internals.idl (modified) (1 diff)
-
Source/cmake/OptionsFTW.cmake (modified) (1 diff)
-
Source/cmake/OptionsMac.cmake (modified) (1 diff)
-
Source/cmake/WebKitFeatures.cmake (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/Scripts/webkitperl/FeatureList.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r282429 r282487 1 2021-09-15 Philip Chimento <pchimento@igalia.com> 2 3 Fixes for build-webkit --minimal 4 https://bugs.webkit.org/show_bug.cgi?id=229780 5 6 Reviewed by Fujii Hironori. 7 8 Remove ENABLE_INTERSECTION_OBSERVER build-time option. This option is 9 quite broken if you try to disable it. 10 11 * Source/cmake/OptionsFTW.cmake: 12 * Source/cmake/OptionsMac.cmake: 13 * Source/cmake/WebKitFeatures.cmake: 14 1 15 2021-09-14 John Wilander <wilander@apple.com> 2 16 -
trunk/Source/WTF/ChangeLog
r282484 r282487 1 2021-09-15 Philip Chimento <pchimento@igalia.com> 2 3 Fixes for build-webkit --minimal 4 https://bugs.webkit.org/show_bug.cgi?id=229780 5 6 Reviewed by Fujii Hironori. 7 8 Remove ENABLE_INTERSECTION_OBSERVER build-time option. This option is 9 quite broken if you try to disable it. 10 11 * Scripts/Preferences/WebPreferencesExperimental.yaml: 12 * wtf/PlatformEnableCocoa.h: 13 1 14 2021-09-15 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml
r282484 r282487 588 588 humanReadableName: "Intersection Observer" 589 589 humanReadableDescription: "Enable Intersection Observer support" 590 condition: ENABLE(INTERSECTION_OBSERVER)591 590 defaultValue: 592 591 WebKitLegacy: -
trunk/Source/WTF/wtf/PlatformEnableCocoa.h
r282429 r282487 314 314 #endif 315 315 316 #if !defined(ENABLE_INTERSECTION_OBSERVER)317 #define ENABLE_INTERSECTION_OBSERVER 1318 #endif319 320 316 #if !defined(ENABLE_IOS_FORM_CONTROL_REFRESH) && PLATFORM(IOS_FAMILY) 321 317 #define ENABLE_IOS_FORM_CONTROL_REFRESH 1 -
trunk/Source/WebCore/ChangeLog
r282486 r282487 1 2021-09-15 Philip Chimento <pchimento@igalia.com> 2 3 Fixes for build-webkit --minimal 4 https://bugs.webkit.org/show_bug.cgi?id=229780 5 6 Reviewed by Fujii Hironori. 7 8 Covered by existing tests. 9 10 Remove ENABLE_INTERSECTION_OBSERVER build-time option. This option is 11 quite broken if you try to disable it. 12 13 * dom/Document.cpp: 14 (WebCore::Document::~Document): 15 (WebCore::Document::intersectionObserversInitialUpdateTimerFired): 16 (WebCore::Document::scheduleRenderingUpdate): 17 * dom/Document.h: 18 (WebCore::Document::intersectionObserverDataIfExists): 19 * dom/Element.cpp: 20 (WebCore::Element::~Element): 21 (WebCore::Element::didMoveToNewDocument): 22 * dom/Element.h: 23 * dom/ElementRareData.cpp: 24 * dom/ElementRareData.h: 25 (WebCore::ElementRareData::setIntersectionObserverData): 26 * page/IntersectionObserver.cpp: 27 * page/IntersectionObserver.h: 28 * page/IntersectionObserver.idl: 29 * page/IntersectionObserverCallback.h: 30 * page/IntersectionObserverCallback.idl: 31 * page/IntersectionObserverEntry.cpp: 32 * page/IntersectionObserverEntry.h: 33 * page/IntersectionObserverEntry.idl: 34 * page/Page.cpp: 35 (WebCore::Page::updateRendering): 36 (WebCore::operator<<): 37 * page/Page.h: 38 * testing/Internals.cpp: 39 (WebCore::Internals::numberOfIntersectionObservers const): 40 * testing/Internals.h: 41 * testing/Internals.idl: 42 1 43 2021-09-15 Myles C. Maxfield <mmaxfield@apple.com> 2 44 -
trunk/Source/WebCore/dom/Document.cpp
r282429 r282487 388 388 }; 389 389 390 #if ENABLE(INTERSECTION_OBSERVER)391 390 static const Seconds intersectionObserversInitialUpdateDelay { 2000_ms }; 392 #endif393 391 394 392 // DOM Level 2 says (letters added): … … 631 629 , m_fullscreenManager { makeUniqueRef<FullscreenManager>(*this) } 632 630 #endif 633 #if ENABLE(INTERSECTION_OBSERVER)634 631 , m_intersectionObserversInitialUpdateTimer(*this, &Document::intersectionObserversInitialUpdateTimerFired) 635 #endif636 632 , m_loadEventDelayTimer(*this, &Document::loadEventDelayTimerFired) 637 633 #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION) … … 705 701 m_logger->removeObserver(*this); 706 702 707 #if ENABLE(INTERSECTION_OBSERVER)708 703 if (m_intersectionObserverData) { 709 704 for (const auto& observer : m_intersectionObserverData->observers) { … … 715 710 ASSERT(m_intersectionObserverData->registrations.isEmpty()); 716 711 } 717 #endif718 712 719 713 removeFromDocumentsMap(); … … 7825 7819 } 7826 7820 7827 #if ENABLE(INTERSECTION_OBSERVER)7828 7821 void Document::intersectionObserversInitialUpdateTimerFired() 7829 7822 { 7830 7823 scheduleRenderingUpdate(RenderingUpdateStep::IntersectionObservations); 7831 7824 } 7832 #endif7833 7825 7834 7826 void Document::scheduleRenderingUpdate(OptionSet<RenderingUpdateStep> requestedSteps) 7835 7827 { 7836 #if ENABLE(INTERSECTION_OBSERVER)7837 7828 if (m_intersectionObserversInitialUpdateTimer.isActive()) { 7838 7829 m_intersectionObserversInitialUpdateTimer.stop(); 7839 7830 requestedSteps.add(RenderingUpdateStep::IntersectionObservations); 7840 7831 } 7841 #endif7842 7832 if (auto page = this->page()) 7843 7833 page->scheduleRenderingUpdate(requestedSteps); 7844 7834 } 7845 7846 #if ENABLE(INTERSECTION_OBSERVER)7847 7835 7848 7836 void Document::addIntersectionObserver(IntersectionObserver& observer) … … 8079 8067 } 8080 8068 8081 #endif8082 8083 8069 #if ENABLE(RESIZE_OBSERVER) 8084 8070 -
trunk/Source/WebCore/dom/Document.h
r282429 r282487 1429 1429 void scheduleRenderingUpdate(OptionSet<RenderingUpdateStep>); 1430 1430 1431 #if ENABLE(INTERSECTION_OBSERVER)1432 1431 void addIntersectionObserver(IntersectionObserver&); 1433 1432 void removeIntersectionObserver(IntersectionObserver&); … … 1437 1436 IntersectionObserverData& ensureIntersectionObserverData(); 1438 1437 IntersectionObserverData* intersectionObserverDataIfExists() { return m_intersectionObserverData.get(); } 1439 #endif1440 1438 1441 1439 #if ENABLE(RESIZE_OBSERVER) … … 1933 1931 WeakHashSet<HTMLImageElement> m_dynamicMediaQueryDependentImages; 1934 1932 1935 #if ENABLE(INTERSECTION_OBSERVER)1936 1933 Vector<WeakPtr<IntersectionObserver>> m_intersectionObservers; 1937 1934 Vector<WeakPtr<IntersectionObserver>> m_intersectionObserversWithPendingNotifications; … … 1939 1936 // This is only non-null when this document is an explicit root. 1940 1937 std::unique_ptr<IntersectionObserverData> m_intersectionObserverData; 1941 #endif1942 1938 1943 1939 #if ENABLE(RESIZE_OBSERVER) -
trunk/Source/WebCore/dom/Element.cpp
r282316 r282487 207 207 ASSERT(!afterPseudoElement()); 208 208 209 #if ENABLE(INTERSECTION_OBSERVER)210 209 disconnectFromIntersectionObservers(); 211 #endif212 210 213 211 #if ENABLE(RESIZE_OBSERVER) … … 2125 2123 CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded(*this, oldDocument, newDocument); 2126 2124 2127 #if ENABLE(INTERSECTION_OBSERVER)2128 2125 if (auto* observerData = intersectionObserverDataIfExists()) { 2129 2126 for (const auto& observer : observerData->observers) { … … 2134 2131 } 2135 2132 } 2136 #endif2137 2133 } 2138 2134 … … 3893 3889 #endif 3894 3890 3895 #if ENABLE(INTERSECTION_OBSERVER)3896 3897 3891 void Element::disconnectFromIntersectionObservers() 3898 3892 { … … 3926 3920 return hasRareData() ? elementRareData()->intersectionObserverData() : nullptr; 3927 3921 } 3928 3929 #endif3930 3922 3931 3923 ElementAnimationRareData* Element::animationRareData(PseudoId pseudoId) const -
trunk/Source/WebCore/dom/Element.h
r281793 r282487 70 70 71 71 struct GetAnimationsOptions; 72 struct IntersectionObserverData; 72 73 struct KeyframeAnimationOptions; 73 74 struct ScrollIntoViewOptions; 74 75 struct ScrollToOptions; 75 76 #if ENABLE(INTERSECTION_OBSERVER)77 struct IntersectionObserverData;78 #endif79 76 80 77 #if ENABLE(RESIZE_OBSERVER) … … 615 612 void setAttributeEventListener(const AtomString& eventType, const QualifiedName& attributeName, const AtomString& value); 616 613 617 #if ENABLE(INTERSECTION_OBSERVER)618 614 IntersectionObserverData& ensureIntersectionObserverData(); 619 615 IntersectionObserverData* intersectionObserverDataIfExists(); 620 #endif621 616 622 617 #if ENABLE(RESIZE_OBSERVER) … … 708 703 LayoutRect absoluteEventBoundsOfElementAndDescendants(bool& includesFixedPositionElements); 709 704 710 #if ENABLE(INTERSECTION_OBSERVER)711 705 void disconnectFromIntersectionObservers(); 712 #endif713 706 714 707 #if ENABLE(RESIZE_OBSERVER) -
trunk/Source/WebCore/dom/ElementRareData.cpp
r267571 r282487 39 39 Vector<std::unique_ptr<ElementAnimationRareData>> animationRareData; 40 40 void* pointers[10]; 41 #if ENABLE(INTERSECTION_OBSERVER)42 41 void* intersectionObserverData; 43 #endif44 42 #if ENABLE(CSS_TYPED_OM) 45 43 void* typedOMData; -
trunk/Source/WebCore/dom/ElementRareData.h
r275825 r282487 98 98 void setPartNames(SpaceSplitString&& partNames) { m_partNames = WTFMove(partNames); } 99 99 100 #if ENABLE(INTERSECTION_OBSERVER)101 100 IntersectionObserverData* intersectionObserverData() { return m_intersectionObserverData.get(); } 102 101 void setIntersectionObserverData(std::unique_ptr<IntersectionObserverData>&& data) { m_intersectionObserverData = WTFMove(data); } 103 #endif104 102 105 103 #if ENABLE(RESIZE_OBSERVER) … … 167 165 std::unique_ptr<CustomElementReactionQueue> m_customElementReactionQueue; 168 166 std::unique_ptr<NamedNodeMap> m_attributeMap; 169 #if ENABLE(INTERSECTION_OBSERVER) 167 170 168 std::unique_ptr<IntersectionObserverData> m_intersectionObserverData; 171 #endif172 169 173 170 #if ENABLE(RESIZE_OBSERVER) -
trunk/Source/WebCore/page/IntersectionObserver.cpp
r281188 r282487 26 26 #include "config.h" 27 27 28 #if ENABLE(INTERSECTION_OBSERVER)29 28 #include "IntersectionObserver.h" 30 29 … … 304 303 305 304 } // namespace WebCore 306 307 #endif // ENABLE(INTERSECTION_OBSERVER) -
trunk/Source/WebCore/page/IntersectionObserver.h
r279800 r282487 25 25 26 26 #pragma once 27 28 #if ENABLE(INTERSECTION_OBSERVER)29 27 30 28 #include "GCReachableRef.h" … … 127 125 128 126 } // namespace WebCore 129 130 #endif // ENABLE(INTERSECTION_OBSERVER) -
trunk/Source/WebCore/page/IntersectionObserver.idl
r279800 r282487 27 27 28 28 [ 29 Conditional=INTERSECTION_OBSERVER,30 29 EnabledBySetting=IntersectionObserver, 31 30 Exposed=Window, … … 47 46 48 47 [ 49 Conditional=INTERSECTION_OBSERVER,50 48 EnabledBySetting=IntersectionObserver 51 49 ] -
trunk/Source/WebCore/page/IntersectionObserverCallback.h
r281188 r282487 26 26 #pragma once 27 27 28 #if ENABLE(INTERSECTION_OBSERVER)29 30 28 #include "ActiveDOMCallback.h" 31 29 #include "CallbackResult.h" … … 48 46 49 47 } // namespace WebCore 50 51 #endif // ENABLE(INTERSECTION_OBSERVER) -
trunk/Source/WebCore/page/IntersectionObserverCallback.idl
r269141 r282487 27 27 28 28 [ 29 Conditional=INTERSECTION_OBSERVER,30 29 CallbackThisObject=IntersectionObserver, 31 30 IsWeakCallback, -
trunk/Source/WebCore/page/IntersectionObserverEntry.cpp
r234732 r282487 26 26 #include "config.h" 27 27 28 #if ENABLE(INTERSECTION_OBSERVER)29 28 #include "IntersectionObserverEntry.h" 30 29 … … 46 45 47 46 } // namespace WebCore 48 49 #endif // ENABLE(INTERSECTION_OBSERVER) -
trunk/Source/WebCore/page/IntersectionObserverEntry.h
r278253 r282487 25 25 26 26 #pragma once 27 28 #if ENABLE(INTERSECTION_OBSERVER)29 27 30 28 #include "DOMRectReadOnly.h" … … 80 78 81 79 } // namespace WebCore 82 83 #endif // ENABLE(INTERSECTION_OBSERVER) -
trunk/Source/WebCore/page/IntersectionObserverEntry.idl
r267813 r282487 29 29 30 30 [ 31 Conditional=INTERSECTION_OBSERVER,32 31 ImplementationLacksVTable, 33 32 EnabledBySetting=IntersectionObserver, … … 46 45 }; 47 46 48 [ 49 Conditional=INTERSECTION_OBSERVER, 50 ] dictionary IntersectionObserverEntryInit { 47 dictionary IntersectionObserverEntryInit { 51 48 required DOMHighResTimeStamp time; 52 49 required DOMRectInit? rootBounds; -
trunk/Source/WebCore/page/Page.cpp
r282305 r282487 1585 1585 layoutIfNeeded(); 1586 1586 1587 #if ENABLE(INTERSECTION_OBSERVER)1588 1587 runProcessingStep(RenderingUpdateStep::IntersectionObservations, [] (Document& document) { 1589 1588 document.updateIntersectionObservations(); 1590 1589 }); 1591 #endif1592 1590 1593 1591 #if ENABLE(RESIZE_OBSERVER) … … 3613 3611 case RenderingUpdateStep::Fullscreen: ts << "Fullscreen"; break; 3614 3612 case RenderingUpdateStep::AnimationFrameCallbacks: ts << "AnimationFrameCallbacks"; break; 3615 #if ENABLE(INTERSECTION_OBSERVER)3616 3613 case RenderingUpdateStep::IntersectionObservations: ts << "IntersectionObservations"; break; 3617 #endif3618 3614 #if ENABLE(RESIZE_OBSERVER) 3619 3615 case RenderingUpdateStep::ResizeObservations: ts << "ResizeObservations"; break; -
trunk/Source/WebCore/page/Page.h
r282419 r282487 196 196 Fullscreen = 1 << 4, 197 197 AnimationFrameCallbacks = 1 << 5, 198 #if ENABLE(INTERSECTION_OBSERVER)199 198 IntersectionObservations = 1 << 6, 200 #endif201 199 #if ENABLE(RESIZE_OBSERVER) 202 200 ResizeObservations = 1 << 7, … … 219 217 RenderingUpdateStep::Fullscreen, 220 218 RenderingUpdateStep::AnimationFrameCallbacks, 221 #if ENABLE(INTERSECTION_OBSERVER)222 219 RenderingUpdateStep::IntersectionObservations, 223 #endif224 220 #if ENABLE(RESIZE_OBSERVER) 225 221 RenderingUpdateStep::ResizeObservations, -
trunk/Source/WebCore/testing/Internals.cpp
r281980 r282487 2697 2697 #endif // ENABLE(WEB_AUDIO) 2698 2698 2699 #if ENABLE(INTERSECTION_OBSERVER)2700 2699 unsigned Internals::numberOfIntersectionObservers(const Document& document) const 2701 2700 { 2702 2701 return document.numberOfIntersectionObservers(); 2703 2702 } 2704 #endif2705 2703 2706 2704 #if ENABLE(RESIZE_OBSERVER) -
trunk/Source/WebCore/testing/Internals.h
r281980 r282487 475 475 #endif 476 476 477 #if ENABLE(INTERSECTION_OBSERVER)478 477 unsigned numberOfIntersectionObservers(const Document&) const; 479 #endif480 478 481 479 #if ENABLE(RESIZE_OBSERVER) -
trunk/Source/WebCore/testing/Internals.idl
r281980 r282487 571 571 unsigned long numberOfLiveDocuments(); 572 572 unsigned long referencingNodeCount(Document document); 573 [Conditional=INTERSECTION_OBSERVER]unsigned long numberOfIntersectionObservers(Document document);573 unsigned long numberOfIntersectionObservers(Document document); 574 574 [Conditional = RESIZE_OBSERVER] unsigned long numberOfResizeObservers(Document document); 575 575 WindowProxy? openDummyInspectorFrontend(DOMString url); -
trunk/Source/cmake/OptionsFTW.cmake
r282429 r282487 82 82 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API PRIVATE OFF) 83 83 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE ON) 84 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTERSECTION_OBSERVER PRIVATE ON)85 84 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MAC_GESTURE_EVENTS PRIVATE OFF) 86 85 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MATHML PRIVATE ON) -
trunk/Source/cmake/OptionsMac.cmake
r282429 r282487 52 52 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INSPECTOR_TELEMETRY PRIVATE ON) 53 53 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTELLIGENT_TRACKING_PREVENTION PRIVATE ON) 54 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTERSECTION_OBSERVER PRIVATE ON)55 54 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYOUT_FORMATTING_CONTEXT PRIVATE ON) 56 55 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER PRIVATE ON) -
trunk/Source/cmake/WebKitFeatures.cmake
r282429 r282487 159 159 WEBKIT_OPTION_DEFINE(ENABLE_INSPECTOR_TELEMETRY "Toggle inspector telemetry support" PRIVATE OFF) 160 160 WEBKIT_OPTION_DEFINE(ENABLE_INTELLIGENT_TRACKING_PREVENTION "Toggle resource load statistics support" PRIVATE OFF) 161 WEBKIT_OPTION_DEFINE(ENABLE_INTERSECTION_OBSERVER "Enable Intersection Observer support" PRIVATE ON)162 161 WEBKIT_OPTION_DEFINE(ENABLE_IOS_GESTURE_EVENTS "Toggle iOS gesture events support" PRIVATE OFF) 163 162 WEBKIT_OPTION_DEFINE(ENABLE_IOS_TOUCH_EVENTS "Toggle iOS touch events support" PRIVATE OFF) -
trunk/Tools/ChangeLog
r282485 r282487 1 2021-09-15 Philip Chimento <pchimento@igalia.com> 2 3 Fixes for build-webkit --minimal 4 https://bugs.webkit.org/show_bug.cgi?id=229780 5 6 Reviewed by Fujii Hironori. 7 8 Remove ENABLE_INTERSECTION_OBSERVER build-time option. This option is 9 quite broken if you try to disable it. 10 11 * Scripts/webkitperl/FeatureList.pm: Remove intersection-observer option 12 1 13 2021-09-15 Philip Chimento <pchimento@igalia.com> 2 14 -
trunk/Tools/Scripts/webkitperl/FeatureList.pm
r282485 r282487 104 104 $inspectorTelemetrySupport, 105 105 $intelligentTrackingPrevention, 106 $intersectionObserverSupport,107 106 $iosGestureEventsSupport, 108 107 $iosTouchEventsSupport, … … 344 343 define => "ENABLE_INTELLIGENT_TRACKING_PREVENTION", value => \$intelligentTrackingPrevention }, 345 344 346 { option => "intersection-observer", desc => "Enable Intersection Observer support",347 define => "ENABLE_INTERSECTION_OBSERVER", value => \$intersectionObserverSupport },348 349 345 { option => "ios-gesture-events", desc => "Toggle iOS gesture events support", 350 346 define => "ENABLE_IOS_GESTURE_EVENTS", value => \$iosGestureEventsSupport },
Note:
See TracChangeset
for help on using the changeset viewer.