WebKit Bugzilla
Attachment 361796 Details for
Bug 157743
: Implement ResizeObserver
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP-with-mainly-implement-except-svg-support
ro-003-213.diff (text/plain), 109.50 KB, created by
cathiechen
on 2019-02-12 08:47:18 PST
(
hide
)
Description:
WIP-with-mainly-implement-except-svg-support
Filename:
MIME Type:
Creator:
cathiechen
Created:
2019-02-12 08:47:18 PST
Size:
109.50 KB
patch
obsolete
>diff --git a/ChangeLog b/ChangeLog >index 031b5e2547..284e318609 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,12 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/WebKitFeatures.cmake: >+ > 2019-02-11 Adrian Perez de Castro <aperez@igalia.com> > > [GTK][WPE] Add content extensions support in WKTR and unskip layout tests >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop-expected.txt >index 7b23106640..6158cd4755 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop-expected.txt >@@ -1,7 +1,11 @@ >-CONSOLE MESSAGE: line 50: ReferenceError: Can't find variable: ResizeObserver >+CONSOLE MESSAGE: ResizeObserver loop completed with undelivered notifications. > ResizeObserver notification event loop tests > > t1 > >-FAIL ResizeObserver implemented assert_own_property: expected property "ResizeObserver" missing >+Harness Error (TIMEOUT), message = null >+ >+PASS ResizeObserver implemented >+NOTRUN guard >+FAIL test0: multiple notifications inside same event loop assert_equals: new loop expected 1 but got 0 > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop.html b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop.html >index 559f52ad2b..622d724a19 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/eventloop.html >@@ -1,4 +1,4 @@ >-<!doctype html> >+<!doctype html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > <script src="./resources/resizeTestHelper.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/idlharness.window.html b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/idlharness.window.html >index 2382913528..479d78c5ac 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/idlharness.window.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/idlharness.window.html >@@ -1 +1,2 @@ >-<!-- This file is required for WebKit test infrastructure to run the templated test --> >\ No newline at end of file >+<!-- This file is required for WebKit test infrastructure to run the templated test --> >+<!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify-expected.txt >index 95327841db..436a343cf0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify-expected.txt >@@ -1,11 +1,21 @@ >-CONSOLE MESSAGE: line 50: ReferenceError: Can't find variable: ResizeObserver > ResizeObserver tests > > t1 > t2 >-t3 inline >+t3 >+inline > >-Harness Error (FAIL), message = ReferenceError: Can't find variable: ResizeObserver >- >-FAIL ResizeObserver implemented assert_own_property: expected property "ResizeObserver" missing >+PASS ResizeObserver implemented >+PASS guard >+PASS test0: notification ordering >+PASS test1: display:none triggers notification >+PASS test2: remove/appendChild trigger notification >+PASS test3: dimensions match >+PASS test4: transform do not cause notifications >+PASS test5: moving an element does not trigger notifications >+PASS test6: inline element does not notify >+PASS test7: unobserve inside notify callback >+PASS test8: observe inside notify callback >+PASS test9: disconnect inside notify callback >+PASS test10: element notifies when parent removed > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify.html b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify.html >index d5888515d5..b1038a3cb6 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/notify.html >@@ -1,4 +1,4 @@ >-<!doctype html> >+<!doctype html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > <script src="./resources/resizeTestHelper.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe-expected.txt >index 75003e06d3..2211b21209 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe-expected.txt >@@ -1,9 +1,18 @@ >-CONSOLE MESSAGE: line 50: ReferenceError: Can't find variable: ResizeObserver >+CONSOLE MESSAGE: ResizeObserver loop completed with undelivered notifications. > ResizeObserver tests > > t1 > t2 > > >-FAIL ResizeObserver implemented assert_own_property: expected property "ResizeObserver" missing >+PASS ResizeObserver implemented >+PASS guard >+PASS test0: simple observation >+PASS test1: multiple observation on same element trigger only one >+PASS test2: throw exception when observing non-element >+PASS test3: disconnect stops all notifications >+PASS test4: unobserve target stops notifications, unobserve non-observed does nothing >+PASS test5: observe img >+PASS test6: iframe notifications >+FAIL test7: callback.this assert_equals: callback.this is ResizeObserver expected (object) object "[object ResizeObserver]" but got (undefined) undefined > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe.html b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe.html >index dc1f1958b3..fc4592d459 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/observe.html >@@ -1,4 +1,4 @@ >-<!doctype html> >+<!doctype html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > <script src="./resources/resizeTestHelper.js"></script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-expected.txt >index dcf836e5f2..c4483ea7ce 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg-expected.txt >@@ -1,9 +1,12 @@ >-CONSOLE MESSAGE: line 50: ReferenceError: Can't find variable: ResizeObserver > ResizeObserver svg tests > > Here is a paragraph that requires word wrap > > svg text tag > >-FAIL ResizeObserver implemented assert_own_property: expected property "ResizeObserver" missing >+Harness Error (TIMEOUT), message = null >+ >+PASS ResizeObserver implemented >+NOTRUN guard >+FAIL test0: observe svg:circle assert_unreached: Timed out waiting for notification. (100ms) Reached unreachable code > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg.html b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg.html >index e3a1ab6607..49e5c1953e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg.html >+++ b/LayoutTests/imported/w3c/web-platform-tests/resize-observer/svg.html >@@ -1,4 +1,4 @@ >-<!doctype html> >+<!doctype html><!-- webkit-test-runner [ experimental:ResizeObserverEnabled=true ] --> > <script src="/resources/testharness.js"></script> > <script src="/resources/testharnessreport.js"></script> > <script src="./resources/resizeTestHelper.js"></script> >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 608249f7f2..195a4e6600 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,12 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ > 2019-02-11 Mark Lam <mark.lam@apple.com> > > Randomize insertion of deallocated StructureIDs into the StructureIDTable's free list. >diff --git a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >index ac7c361ecb..e3a29928f1 100644 >--- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >+++ b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >@@ -314,6 +314,8 @@ ENABLE_QUOTA = ; > > ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR; > >+ENABLE_RESIZE_OBSERVER = ENABLE_RESIZE_OBSERVER; >+ > ENABLE_RESOLUTION_MEDIA_QUERY = ; > > ENABLE_RESOURCE_LOAD_STATISTICS = ENABLE_RESOURCE_LOAD_STATISTICS; >@@ -411,4 +413,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET; > > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 502974ba7f..91600e988a 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -931,6 +931,9 @@ set(WebCore_NON_SVG_IDL_FILES > page/PerformanceServerTiming.idl > page/PerformanceTiming.idl > page/RemoteDOMWindow.idl >+ page/ResizeObserver.idl >+ page/ResizeObserverCallback.idl >+ page/ResizeObserverEntry.idl > page/Screen.idl > page/ScrollIntoViewOptions.idl > page/ScrollLogicalPosition.idl >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 91aa7de11f..549e209722 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tests: imported/w3c/web-platform-tests/resize-observer/eventloop.html >+ imported/w3c/web-platform-tests/resize-observer/idlharness.window.html >+ imported/w3c/web-platform-tests/resize-observer/notify.html >+ imported/w3c/web-platform-tests/resize-observer/observe.html >+ imported/w3c/web-platform-tests/resize-observer/svg.html >+ >+ * Configurations/FeatureDefines.xcconfig: >+ * page/Settings.yaml: >+ > 2019-02-12 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Add intrinsic width support for float boxes. >diff --git a/Source/WebCore/Configurations/FeatureDefines.xcconfig b/Source/WebCore/Configurations/FeatureDefines.xcconfig >index ac7c361ecb..e3a29928f1 100644 >--- a/Source/WebCore/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebCore/Configurations/FeatureDefines.xcconfig >@@ -314,6 +314,8 @@ ENABLE_QUOTA = ; > > ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR; > >+ENABLE_RESIZE_OBSERVER = ENABLE_RESIZE_OBSERVER; >+ > ENABLE_RESOLUTION_MEDIA_QUERY = ; > > ENABLE_RESOURCE_LOAD_STATISTICS = ENABLE_RESOURCE_LOAD_STATISTICS; >@@ -411,4 +413,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET; > > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index 0547279a42..e662fc1584 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -879,6 +879,9 @@ JS_BINDING_IDLS = \ > $(WebCore)/page/PerformanceServerTiming.idl \ > $(WebCore)/page/PerformanceTiming.idl \ > $(WebCore)/page/RemoteDOMWindow.idl \ >+ $(WebCore)/page/ResizeObserver.idl \ >+ $(WebCore)/page/ResizeObserverCallback.idl \ >+ $(WebCore)/page/ResizeObserverEntry.idl \ > $(WebCore)/page/Screen.idl \ > $(WebCore)/page/ScrollIntoViewOptions.idl \ > $(WebCore)/page/ScrollLogicalPosition.idl \ >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index fc45920ed0..fabc6df515 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,10 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ > 2019-02-12 Michael Catanzaro <mcatanzaro@igalia.com> > > [WPE][GTK] Sleep disabler code should inhibit idle when a "System" sleep disabler is requested >diff --git a/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig b/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig >index ac7c361ecb..e3a29928f1 100644 >--- a/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig >@@ -314,6 +314,8 @@ ENABLE_QUOTA = ; > > ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR; > >+ENABLE_RESIZE_OBSERVER = ENABLE_RESIZE_OBSERVER; >+ > ENABLE_RESOLUTION_MEDIA_QUERY = ; > > ENABLE_RESOURCE_LOAD_STATISTICS = ENABLE_RESOURCE_LOAD_STATISTICS; >@@ -411,4 +413,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET; > > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 81cbc04ed3..b744a6ce13 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1534,6 +1534,8 @@ page/ProcessWarming.cpp > page/Quirks.cpp > page/RemoteDOMWindow.cpp > page/RemoteFrame.cpp >+page/ResizeObservation.cpp >+page/ResizeObserver.cpp > page/ResourceUsageOverlay.cpp > page/ResourceUsageThread.cpp > page/RuntimeEnabledFeatures.cpp >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index 7af865289e..1d11cc1fc1 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -146,6 +146,8 @@ namespace WebCore { > macro(PerformanceServerTiming) \ > macro(PointerEvent) \ > macro(PublicKeyCredential) \ >+ macro(ResizeObserver) \ >+ macro(ResizeObserverEntry) \ > macro(RTCCertificate) \ > macro(RTCDTMFSender) \ > macro(RTCDTMFToneChangeEvent) \ >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 050555ba94..f86f10cd66 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -161,6 +161,7 @@ > #include "RenderView.h" > #include "RenderWidget.h" > #include "RequestAnimationFrameCallback.h" >+#include "ResizeObserver.h" > #include "ResourceLoadObserver.h" > #include "RuntimeApplicationChecks.h" > #include "RuntimeEnabledFeatures.h" >@@ -6168,6 +6169,26 @@ void Document::parseDNSPrefetchControlHeader(const String& dnsPrefetchControl) > m_haveExplicitlyDisabledDNSPrefetch = true; > } > >+void Document::getParserLocation(String& completedURL, unsigned& line, unsigned& column) >+{ >+ // We definitely cannot associate the message with a location being parsed if we are not even parsing. >+ if (!parsing()) >+ return; >+ >+ ScriptableDocumentParser* parser = scriptableDocumentParser(); >+ if (!parser) >+ return; >+ >+ // When the parser waits for scripts, any messages must be coming from some other source, and are not related to the location of the script element that made the parser wait. >+ if (!parser->shouldAssociateConsoleMessagesWithTextPosition()) >+ return; >+ >+ completedURL = url().string(); >+ TextPosition position = parser->textPosition(); >+ line = position.m_line.oneBasedInt(); >+ column = position.m_column.oneBasedInt(); >+} >+ > void Document::addConsoleMessage(std::unique_ptr<Inspector::ConsoleMessage>&& consoleMessage) > { > if (!isContextThread()) { >@@ -8060,6 +8081,57 @@ void Document::notifyIntersectionObserversTimerFired() > } > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+void Document::addResizeObserver(ResizeObserver& observer) >+{ >+ ASSERT(m_resizeObservers.find(&observer) == notFound); >+ m_resizeObservers.append(makeWeakPtr(&observer)); >+} >+ >+void Document::removeResizeObserver(ResizeObserver& observer) >+{ >+ m_resizeObservers.removeFirst(&observer); >+} >+ >+size_t Document::gatherResizeObservations(size_t depth) >+{ >+ size_t minDepth = ResizeObserver::depthBottom(); >+ for (const auto& observer : m_resizeObservers) { >+ if (!observer->hasObservations()) >+ continue; >+ auto d = observer->gatherResizeObservations(depth); >+ if (d < minDepth) >+ minDepth = d; >+ } >+ return minDepth; >+} >+ >+void Document::deliverObservations() >+{ >+ for (const auto& observer : m_resizeObservers) { >+ if (!observer->hasActiveObservations()) >+ continue; >+ observer->deliverObservations(); >+ } >+} >+ >+bool Document::skippedObservations() >+{ >+ for (const auto& observer : m_resizeObservers) { >+ if (observer->skippedObservations()) >+ return true; >+ } >+ return false; >+} >+ >+void Document::scheduleResizeObserveIfNeeded() >+{ >+ if (!view()) >+ return; >+ view()->layoutContext().scheduleResizeObserveIfNeeded(); >+} >+#endif >+ > const AtomicString& Document::dir() const > { > auto* documentElement = this->documentElement(); >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 9bdf1b8d87..500a5bd81d 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -246,6 +246,10 @@ class HTMLAttachmentElement; > class IntersectionObserver; > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+class ResizeObserver; >+#endif >+ > namespace Style { > class Scope; > }; >@@ -1357,6 +1361,8 @@ public: > void addDisabledFieldsetElement() { m_disabledFieldsetElementsCount++; } > void removeDisabledFieldsetElement() { ASSERT(m_disabledFieldsetElementsCount); m_disabledFieldsetElementsCount--; } > >+ void getParserLocation(String& url, unsigned& line, unsigned& column); >+ > WEBCORE_EXPORT void addConsoleMessage(std::unique_ptr<Inspector::ConsoleMessage>&&) final; > > // The following addConsoleMessage function is deprecated. >@@ -1422,6 +1428,15 @@ public: > void updateIntersectionObservations(); > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ void addResizeObserver(ResizeObserver&); >+ void removeResizeObserver(ResizeObserver&); >+ size_t gatherResizeObservations(size_t); >+ void deliverObservations(); >+ bool skippedObservations(); >+ void scheduleResizeObserveIfNeeded(); >+#endif >+ > #if ENABLE(MEDIA_STREAM) > void setHasCaptureMediaStreamTrack() { m_hasHadCaptureMediaStreamTrack = true; } > bool hasHadCaptureMediaStreamTrack() const { return m_hasHadCaptureMediaStreamTrack; } >@@ -1868,6 +1883,10 @@ private: > Timer m_intersectionObserversNotifyTimer; > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ Vector<WeakPtr<ResizeObserver>> m_resizeObservers; >+#endif >+ > Timer m_loadEventDelayTimer; > > ViewportArguments m_viewportArguments; >diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp >index 9a9e4def69..be5154944d 100644 >--- a/Source/WebCore/dom/Element.cpp >+++ b/Source/WebCore/dom/Element.cpp >@@ -197,6 +197,10 @@ Element::~Element() > disconnectFromIntersectionObservers(); > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ disconnectFromResizeObservers(); >+#endif >+ > removeShadowRoot(); > > if (hasSyntheticAttrChildNodes()) >@@ -1840,6 +1844,10 @@ void Element::didMoveToNewDocument(Document& oldDocument, Document& newDocument) > } > } > #endif >+ >+#if ENABLE(RESIZE_OBSERVER) >+ disconnectFromResizeObservers(); >+#endif > } > > bool Element::hasAttributes() const >@@ -3498,6 +3506,32 @@ IntersectionObserverData* Element::intersectionObserverData() > } > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+void Element::disconnectFromResizeObservers() >+{ >+ auto* observerData = resizeObserverData(); >+ if (!observerData) >+ return; >+ >+ for (const auto& observer : observerData->observers) >+ observer->targetDestroyed(*this); >+ observerData->observers.clear(); >+} >+ >+ResizeObserverData& Element::ensureResizeObserverData() >+{ >+ auto& rareData = ensureElementRareData(); >+ if (!rareData.resizeObserverData()) >+ rareData.setResizeObserverData(std::make_unique<ResizeObserverData>()); >+ return *rareData.resizeObserverData(); >+} >+ >+ResizeObserverData* Element::resizeObserverData() >+{ >+ return hasRareData() ? elementRareData()->resizeObserverData() : nullptr; >+} >+#endif >+ > SpellcheckAttributeState Element::spellcheckAttributeState() const > { > const AtomicString& value = attributeWithoutSynchronization(HTMLNames::spellcheckAttr); >diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h >index a9928f7b6c..bb51f8999a 100644 >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -63,6 +63,10 @@ struct ScrollIntoViewOptions; > struct IntersectionObserverData; > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+struct ResizeObserverData; >+#endif >+ > enum SpellcheckAttributeState { > SpellcheckAttributeTrue, > SpellcheckAttributeFalse, >@@ -587,6 +591,11 @@ public: > IntersectionObserverData* intersectionObserverData(); > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ ResizeObserverData& ensureResizeObserverData(); >+ ResizeObserverData* resizeObserverData(); >+#endif >+ > Element* findAnchorElementForLink(String& outAnchorName); > > ExceptionOr<Ref<WebAnimation>> animate(JSC::ExecState&, JSC::Strong<JSC::JSObject>&&, Optional<Variant<double, KeyframeAnimationOptions>>&&); >@@ -680,6 +689,10 @@ private: > void disconnectFromIntersectionObservers(); > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ void disconnectFromResizeObservers(); >+#endif >+ > // The cloneNode function is private so that non-virtual cloneElementWith/WithoutChildren are used instead. > Ref<Node> cloneNodeInternal(Document&, CloningOperation) override; > virtual Ref<Element> cloneElementWithoutAttributesAndChildren(Document&); >diff --git a/Source/WebCore/dom/ElementRareData.cpp b/Source/WebCore/dom/ElementRareData.cpp >index 4dd60eb84f..140b898900 100644 >--- a/Source/WebCore/dom/ElementRareData.cpp >+++ b/Source/WebCore/dom/ElementRareData.cpp >@@ -50,6 +50,9 @@ struct SameSizeAsElementRareData : NodeRareData { > #if ENABLE(CSS_TYPED_OM) > void* typedOMData; > #endif >+#if ENABLE(RESIZE_OBSERVER) >+ void* resizeObserverData; >+#endif > > }; > >diff --git a/Source/WebCore/dom/ElementRareData.h b/Source/WebCore/dom/ElementRareData.h >index fe80e331d5..8e106fb8a5 100644 >--- a/Source/WebCore/dom/ElementRareData.h >+++ b/Source/WebCore/dom/ElementRareData.h >@@ -29,6 +29,7 @@ > #include "NodeRareData.h" > #include "PseudoElement.h" > #include "RenderElement.h" >+#include "ResizeObserver.h" > #include "ShadowRoot.h" > #include "StylePropertyMap.h" > >@@ -128,6 +129,11 @@ public: > void setIntersectionObserverData(std::unique_ptr<IntersectionObserverData>&& data) { m_intersectionObserverData = WTFMove(data); } > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ ResizeObserverData* resizeObserverData() { return m_resizeObserverData.get(); } >+ void setResizeObserverData(std::unique_ptr<ResizeObserverData>&& data) { m_resizeObserverData = WTFMove(data); } >+#endif >+ > #if ENABLE(CSS_TYPED_OM) > StylePropertyMap* attributeStyleMap() { return m_attributeStyleMap.get(); } > void setAttributeStyleMap(Ref<StylePropertyMap>&& map) { m_attributeStyleMap = WTFMove(map); } >@@ -162,6 +168,8 @@ public: > result.add(UseType::AttributeMap); > if (m_intersectionObserverData) > result.add(UseType::InteractionObserver); >+ if (m_resizeObserverData) >+ result.add(UseType::ResizeObserver); > if (m_beforePseudoElement || m_afterPseudoElement) > result.add(UseType::PseudoElements); > return result; >@@ -205,6 +213,10 @@ private: > std::unique_ptr<IntersectionObserverData> m_intersectionObserverData; > #endif > >+#if ENABLE(RESIZE_OBSERVER) >+ std::unique_ptr<ResizeObserverData> m_resizeObserverData; >+#endif >+ > RefPtr<PseudoElement> m_beforePseudoElement; > RefPtr<PseudoElement> m_afterPseudoElement; > >diff --git a/Source/WebCore/dom/ScriptedAnimationController.cpp b/Source/WebCore/dom/ScriptedAnimationController.cpp >index e88bb90cfb..b074504589 100644 >--- a/Source/WebCore/dom/ScriptedAnimationController.cpp >+++ b/Source/WebCore/dom/ScriptedAnimationController.cpp >@@ -293,6 +293,7 @@ void ScriptedAnimationController::animationTimerFired() > { > m_lastAnimationFrameTimestamp = m_document->domWindow()->nowTimestamp(); > serviceScriptedAnimations(m_lastAnimationFrameTimestamp); >+ // TODO(cathiechen): scheduleResizeObserveIfNeeded here. > } > > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >diff --git a/Source/WebCore/page/FrameViewLayoutContext.cpp b/Source/WebCore/page/FrameViewLayoutContext.cpp >index 32427e1403..30ef5a1c64 100644 >--- a/Source/WebCore/page/FrameViewLayoutContext.cpp >+++ b/Source/WebCore/page/FrameViewLayoutContext.cpp >@@ -36,6 +36,7 @@ > #include "RenderElement.h" > #include "RenderLayoutState.h" > #include "RenderView.h" >+#include "ResizeObserver.h" > #include "RuntimeEnabledFeatures.h" > #include "ScriptDisallowedScope.h" > #include "Settings.h" >@@ -47,6 +48,7 @@ > #include "LayoutTreeBuilder.h" > #endif > >+#include <JavaScriptCore/ScriptCallStack.h> > #include <wtf/SetForScope.h> > #include <wtf/SystemTracing.h> > #include <wtf/text/TextStream.h> >@@ -137,6 +139,7 @@ FrameViewLayoutContext::FrameViewLayoutContext(FrameView& frameView) > : m_frameView(frameView) > , m_layoutTimer(*this, &FrameViewLayoutContext::layoutTimerFired) > , m_asynchronousTasksTimer(*this, &FrameViewLayoutContext::runAsynchronousTasks) >+ , m_resizeObserverTimer(*this, &FrameViewLayoutContext::resizeObserverTimerFired) > { > } > >@@ -219,6 +222,11 @@ void FrameViewLayoutContext::layout() > #endif > clearSubtreeLayoutRoot(); > } >+ >+#if ENABLE(RESIZE_OBSERVER) >+ notifyResizeObservers(layoutRoot); >+#endif >+ > { > SetForScope<LayoutPhase> layoutPhase(m_layoutPhase, LayoutPhase::InViewSizeAdjust); > if (is<RenderView>(layoutRoot.get()) && !renderView()->printing()) { >@@ -299,6 +307,7 @@ void FrameViewLayoutContext::reset() > m_firstLayout = true; > m_asynchronousTasksTimer.stop(); > m_needsFullRepaint = true; >+ m_resizeObserverTimer.stop(); > } > > bool FrameViewLayoutContext::needsLayout() const >@@ -624,7 +633,46 @@ void FrameViewLayoutContext::popLayoutState() > { > m_layoutStateStack.removeLast(); > } >- >+ >+#if ENABLE(RESIZE_OBSERVER) >+void FrameViewLayoutContext::notifyResizeObservers(WeakPtr<RenderElement> layoutRoot) >+{ >+ m_asynchronousTasksTimer.stop(); >+ updateStyleForLayout(); >+ if (needsLayout()) >+ layoutRoot->layout(); >+ >+ // Start check resize obervers; >+ for (size_t depth = document()->gatherResizeObservations(0); depth != ResizeObserver::depthBottom(); depth = document()->gatherResizeObservations(depth)) { >+ document()->deliverObservations(); >+ updateStyleForLayout(); >+ if (needsLayout()) >+ layoutRoot->layout(); >+ } >+ if (document()->skippedObservations()) { >+ // TODO(cathiechen): scheduleAnimation here >+ String url; >+ unsigned line = 0; >+ unsigned column = 0; >+ document()->getParserLocation(url, line, column); >+ document()->reportException("ResizeObserver loop completed with undelivered notifications.", line, column, url, nullptr, 0); >+ scheduleResizeObserveIfNeeded(); >+ } >+} >+ >+void FrameViewLayoutContext::scheduleResizeObserveIfNeeded() >+{ >+ if (m_resizeObserverTimer.isActive()) >+ return; >+ m_resizeObserverTimer.startOneShot(0_s); >+} >+ >+void FrameViewLayoutContext::resizeObserverTimerFired() >+{ >+ notifyResizeObservers(makeWeakPtr(renderView())); >+} >+#endif >+ > #ifndef NDEBUG > void FrameViewLayoutContext::checkLayoutState() > { >diff --git a/Source/WebCore/page/FrameViewLayoutContext.h b/Source/WebCore/page/FrameViewLayoutContext.h >index d16f6c35cf..a256c419df 100644 >--- a/Source/WebCore/page/FrameViewLayoutContext.h >+++ b/Source/WebCore/page/FrameViewLayoutContext.h >@@ -109,6 +109,11 @@ public: > #if !ASSERT_DISABLED > bool layoutDeltaMatches(const LayoutSize& delta); > #endif >+ >+#if ENABLE(RESIZE_OBSERVER) >+ void scheduleResizeObserveIfNeeded(); >+#endif >+ > using LayoutStateStack = Vector<std::unique_ptr<RenderLayoutState>>; > > private: >@@ -152,6 +157,11 @@ private: > void disablePaintOffsetCache() { m_paintOffsetCacheDisableCount++; } > void enablePaintOffsetCache() { ASSERT(m_paintOffsetCacheDisableCount > 0); m_paintOffsetCacheDisableCount--; } > >+#if ENABLE(RESIZE_OBSERVER) >+ void notifyResizeObservers(WeakPtr<RenderElement>); >+ void resizeObserverTimerFired(); >+#endif >+ > Frame& frame() const; > FrameView& view() const; > RenderView* renderView() const; >@@ -162,6 +172,8 @@ private: > Timer m_asynchronousTasksTimer; > WeakPtr<RenderElement> m_subtreeLayoutRoot; > >+ Timer m_resizeObserverTimer; >+ > bool m_layoutSchedulingIsEnabled { true }; > bool m_delayedLayout { false }; > bool m_firstLayout { true }; >diff --git a/Source/WebCore/page/PageConsoleClient.cpp b/Source/WebCore/page/PageConsoleClient.cpp >index 9f65531480..fd5889c009 100644 >--- a/Source/WebCore/page/PageConsoleClient.cpp >+++ b/Source/WebCore/page/PageConsoleClient.cpp >@@ -94,29 +94,6 @@ void PageConsoleClient::unmute() > muteCount--; > } > >-static void getParserLocationForConsoleMessage(Document* document, String& url, unsigned& line, unsigned& column) >-{ >- if (!document) >- return; >- >- // We definitely cannot associate the message with a location being parsed if we are not even parsing. >- if (!document->parsing()) >- return; >- >- ScriptableDocumentParser* parser = document->scriptableDocumentParser(); >- if (!parser) >- return; >- >- // When the parser waits for scripts, any messages must be coming from some other source, and are not related to the location of the script element that made the parser wait. >- if (!parser->shouldAssociateConsoleMessagesWithTextPosition()) >- return; >- >- url = document->url().string(); >- TextPosition position = parser->textPosition(); >- line = position.m_line.oneBasedInt(); >- column = position.m_column.oneBasedInt(); >-} >- > void PageConsoleClient::addMessage(std::unique_ptr<Inspector::ConsoleMessage>&& consoleMessage) > { > if (consoleMessage->source() != MessageSource::CSS && !m_page.usesEphemeralSession()) { >@@ -134,7 +111,8 @@ void PageConsoleClient::addMessage(MessageSource source, MessageLevel level, con > String url; > unsigned line = 0; > unsigned column = 0; >- getParserLocationForConsoleMessage(document, url, line, column); >+ if (document) >+ document->getParserLocation(url, line, column); > > addMessage(source, level, message, url, line, column, 0, JSExecState::currentState(), requestIdentifier); > } >diff --git a/Source/WebCore/page/ResizeObservation.cpp b/Source/WebCore/page/ResizeObservation.cpp >new file mode 100644 >index 0000000000..f37c7e4350 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObservation.cpp >@@ -0,0 +1,93 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#if ENABLE(RESIZE_OBSERVER) >+#include "ResizeObservation.h" >+ >+namespace WebCore { >+ >+Ref<ResizeObservation> ResizeObservation::create(Element* target) >+{ >+ return WTF::adoptRef(*new ResizeObservation(target)); >+} >+ >+ResizeObservation::ResizeObservation(Element* element) >+ : m_target(element) >+ , m_observationSize(0, 0) >+ , m_elmentSizeChanged(true) >+{ >+} >+ >+ResizeObservation::~ResizeObservation() >+{ >+} >+ >+void ResizeObservation::setObservationSize(const LayoutSize& size) >+{ >+ m_observationSize = size; >+} >+ >+void ResizeObservation::updateObservationSize() >+{ >+ if (m_target->renderBox()) >+ setObservationSize(m_target->renderBox()->contentSize()); >+ else >+ setObservationSize(LayoutSize(0, 0)); >+ m_elmentSizeChanged = false; >+} >+ >+FloatRect ResizeObservation::contentRect() >+{ >+ auto box = m_target->renderBox(); >+ if (m_target->renderBox()) >+ return FloatRect(box->paddingLeft(), box->paddingTop(), m_observationSize.width(), m_observationSize.height()); >+ >+ return FloatRect(0, 0, m_observationSize.width(), m_observationSize.height()); >+} >+ >+bool ResizeObservation::elementSizeChanged() >+{ >+ if (!m_target->renderBox()) { >+ if (m_observationSize == LayoutSize(0, 0)) >+ return false; >+ >+ return true; >+ } >+ return m_elmentSizeChanged || m_observationSize != m_target->renderBox()->contentSize(); >+} >+ >+size_t ResizeObservation::targetDepth() >+{ >+ unsigned depth = 0; >+ for (Element* parent = m_target; parent; parent = parent->parentElement()) >+ ++depth; >+ return depth; >+} >+ >+} // namespace WebCore >+ >+#endif // ENABLE(RESIZE_OBSERVER) >diff --git a/Source/WebCore/page/ResizeObservation.h b/Source/WebCore/page/ResizeObservation.h >new file mode 100644 >index 0000000000..1fb8ba0bd1 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObservation.h >@@ -0,0 +1,65 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(RESIZE_OBSERVER) >+#include "FloatRect.h" >+#include "LayoutSize.h" >+ >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+class Element; >+ >+class ResizeObservation : public RefCounted<ResizeObservation> { >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ static Ref<ResizeObservation> create(Element* target); >+ >+ ~ResizeObservation(); >+ void setObservationSize(const LayoutSize&); >+ Element* target() { return m_target; } >+ LayoutSize observationSize() { return m_observationSize; } >+ FloatRect contentRect(); >+ bool elementSizeChanged(); >+ void setElementSizeChanged(bool changed) { m_elmentSizeChanged = changed; } >+ void updateObservationSize(); >+ size_t targetDepth(); >+ >+private: >+ ResizeObservation(Element* target); >+ >+ >+ Element* m_target; >+ // target size in last observation >+ LayoutSize m_observationSize; >+ bool m_elmentSizeChanged; >+}; >+ >+} // namespace WebCore >+ >+#endif // ENABLE(RESIZE_OBSERVER) >diff --git a/Source/WebCore/page/ResizeObserver.cpp b/Source/WebCore/page/ResizeObserver.cpp >new file mode 100644 >index 0000000000..fa751ddc41 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserver.cpp >@@ -0,0 +1,181 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+ >+#if ENABLE(RESIZE_OBSERVER) >+#include "ResizeObserver.h" >+ >+#include "Element.h" >+#include "ResizeObserverEntry.h" >+ >+namespace WebCore { >+ >+Ref<ResizeObserver> ResizeObserver::create(Document& document, Ref<ResizeObserverCallback>&& callback) >+{ >+ return WTF::adoptRef(*new ResizeObserver(document, WTFMove(callback))); >+} >+ >+ResizeObserver::ResizeObserver(Document& document, Ref<ResizeObserverCallback>&& callback) >+ : ActiveDOMObject(downcast<Document>(callback->scriptExecutionContext())) >+ , m_callback(WTFMove(callback)) >+ , m_skippedObservations(false) >+{ >+ m_document = makeWeakPtr(document); >+ suspendIfNeeded(); >+} >+ >+ResizeObserver::~ResizeObserver() >+{ >+ disconnect(); >+ m_document->removeResizeObserver(*this); >+} >+ >+void ResizeObserver::observe(Element& target) >+{ >+ if (!m_callback) >+ return; >+ >+ for (auto& observation : m_observations) { >+ if (observation->target() == &target) >+ return; >+ } >+ >+ auto& observerData = target.ensureResizeObserverData(); >+ observerData.observers.append(makeWeakPtr(this)); >+ if (!hasObservations()) >+ m_document->addResizeObserver(*this); >+ m_observations.append(ResizeObservation::create(&target)); >+ >+ // TODO(cathiechen): scheduleAnimation here >+ scheduleResizeObserveIfNeeded(); >+} >+ >+void ResizeObserver::scheduleResizeObserveIfNeeded() >+{ >+ m_document->scheduleResizeObserveIfNeeded(); >+} >+ >+void ResizeObserver::unobserve(Element& target) >+{ >+ if (!removeTarget(target)) >+ return; >+ >+ removeObservation(target); >+} >+ >+void ResizeObserver::disconnect() >+{ >+ removeAllTargets(); >+} >+ >+void ResizeObserver::removeAllTargets() >+{ >+ for (auto& observation : m_observations) { >+ bool removed = removeTarget(*observation->target()); >+ ASSERT_UNUSED(removed, removed); >+ } >+ m_observations.clear(); >+} >+ >+bool ResizeObserver::removeTarget(Element& target) >+{ >+ auto* observerData = target.resizeObserverData(); >+ if (!observerData) >+ return false; >+ >+ auto& observers = observerData->observers; >+ return observers.removeFirst(this); >+} >+ >+void ResizeObserver::targetDestroyed(Element& target) >+{ >+ removeObservation(target); >+} >+ >+size_t ResizeObserver::gatherResizeObservations(size_t deeperThan) >+{ >+ m_skippedObservations = false; >+ size_t minObservedDepth = depthBottom(); >+ for (const auto& observation : m_observations) { >+ if (observation->elementSizeChanged()) { >+ size_t depth = observation->targetDepth(); >+ if (depth > deeperThan) { >+ m_activeObservations.append(observation.get()); >+ observation->updateObservationSize(); >+ minObservedDepth = std::min(depth, minObservedDepth); >+ } else >+ m_skippedObservations = true; >+ } >+ } >+ return minObservedDepth; >+} >+ >+void ResizeObserver::deliverObservations() >+{ >+ Vector<Ref<ResizeObserverEntry>> entries; >+ for (const auto& observation : m_activeObservations) { >+ ASSERT(observation->target()); >+ entries.append(ResizeObserverEntry::create(observation->target(), observation->contentRect())); >+ } >+ m_activeObservations.clear(); >+ m_callback->handleEvent(entries, *this); >+} >+ >+bool ResizeObserver::removeObservation(Element& target) >+{ >+ return m_observations.removeFirstMatching([&target](auto& observation) { >+ return observation->target() == ⌖ >+ }); >+} >+ >+bool ResizeObserver::hasPendingActivity() const >+{ >+ // TODO: cc. Need add the conditions when ResizeObserver is complete. >+ bool ret = (hasObservations() && m_document) || !m_activeObservations.isEmpty(); >+ return ret; >+} >+ >+const char* ResizeObserver::activeDOMObjectName() const >+{ >+ return "ResizeObserver"; >+} >+ >+bool ResizeObserver::canSuspendForDocumentSuspension() const >+{ >+ return true; >+} >+ >+void ResizeObserver::stop() >+{ >+ disconnect(); >+ m_callback = nullptr; >+ m_observations.clear(); >+ m_activeObservations.clear(); >+} >+ >+} // namespace WebCore >+ >+#endif // ENABLE(RESIZE_OBSERVER) >diff --git a/Source/WebCore/page/ResizeObserver.h b/Source/WebCore/page/ResizeObserver.h >new file mode 100644 >index 0000000000..71685f9007 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserver.h >@@ -0,0 +1,91 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(RESIZE_OBSERVER) >+ >+#include "ActiveDOMObject.h" >+#include "ResizeObservation.h" >+#include "ResizeObserverCallback.h" >+#include <wtf/RefCounted.h> >+#include <wtf/WeakPtr.h> >+ >+namespace WebCore { >+ >+class Document; >+class Element; >+ >+struct ResizeObserverData { >+ Vector<WeakPtr<ResizeObserver>> observers; >+}; >+ >+class ResizeObserver : public RefCounted<ResizeObserver>, public ActiveDOMObject, public CanMakeWeakPtr<ResizeObserver> { >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ static Ref<ResizeObserver> create(Document&, Ref<ResizeObserverCallback>&&); >+ ~ResizeObserver(); >+ >+ bool hasObservations() const { return m_observations.size(); } >+ bool hasActiveObservations() const { return m_activeObservations.size(); } >+ >+ void observe(Element&); >+ void unobserve(Element&); >+ void disconnect(); >+ >+ void targetDestroyed(Element&); >+ >+ size_t gatherResizeObservations(size_t); >+ void deliverObservations(); >+ bool skippedObservations() { return m_skippedObservations; } >+ >+ static size_t depthBottom() { return 4096;} >+ >+ void scheduleResizeObserveIfNeeded(); >+ >+ // ActiveDOMObject. >+ bool hasPendingActivity() const override; >+ const char* activeDOMObjectName() const override; >+ bool canSuspendForDocumentSuspension() const override; >+ void stop() override; >+ >+private: >+ ResizeObserver(Document&, Ref<ResizeObserverCallback>&&); >+ >+ void removeAllTargets(); >+ bool removeTarget(Element&); >+ bool removeObservation(Element&); >+ >+ WeakPtr<Document> m_document; >+ RefPtr<ResizeObserverCallback> m_callback; >+ Vector<Ref<ResizeObservation>> m_observations; >+ >+ Vector<Ref<ResizeObservation>> m_activeObservations; >+ bool m_skippedObservations; >+}; >+ >+} // namespace WebCore >+ >+#endif // ENABLE(RESIZE_OBSERVER) >diff --git a/Source/WebCore/page/ResizeObserver.idl b/Source/WebCore/page/ResizeObserver.idl >new file mode 100644 >index 0000000000..87f80106ad >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserver.idl >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// https://wicg.github.io/ResizeObserver/ >+ >+[ >+ ActiveDOMObject, >+ Conditional=RESIZE_OBSERVER, >+ Constructor(ResizeObserverCallback callback), >+ ConstructorCallWith=Document, >+ EnabledBySetting=ResizeObserver >+] interface ResizeObserver { >+ void observe(Element target); >+ void unobserve(Element target); >+ void disconnect(); >+}; >diff --git a/Source/WebCore/page/ResizeObserverCallback.h b/Source/WebCore/page/ResizeObserverCallback.h >new file mode 100644 >index 0000000000..b39d7626f6 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserverCallback.h >@@ -0,0 +1,47 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(RESIZE_OBSERVER) >+ >+#include "ActiveDOMCallback.h" >+#include "CallbackResult.h" >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+class ResizeObserver; >+class ResizeObserverEntry; >+ >+class ResizeObserverCallback : public RefCounted<ResizeObserverCallback>, public ActiveDOMCallback { >+public: >+ using ActiveDOMCallback::ActiveDOMCallback; >+ virtual CallbackResult<void> handleEvent(const Vector<Ref<ResizeObserverEntry>>&, ResizeObserver&) = 0; >+}; >+ >+} // namespace WebCore >+ >+#endif // ENABLE(RESIZE_OBSERVER) >diff --git a/Source/WebCore/page/ResizeObserverCallback.idl b/Source/WebCore/page/ResizeObserverCallback.idl >new file mode 100644 >index 0000000000..6fc9039235 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserverCallback.idl >@@ -0,0 +1,30 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// https://wicg.github.io/ResizeObserver/ >+ >+[ >+ Conditional=RESIZE_OBSERVER >+] callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer); >diff --git a/Source/WebCore/page/ResizeObserverEntry.h b/Source/WebCore/page/ResizeObserverEntry.h >new file mode 100644 >index 0000000000..bd6041ce62 >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserverEntry.h >@@ -0,0 +1,62 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(RESIZE_OBSERVER) >+ >+#include "DOMRectReadOnly.h" >+#include "Element.h" >+#include "FloatRect.h" >+#include <wtf/RefCounted.h> >+ >+namespace WebCore { >+ >+class Element; >+ >+class ResizeObserverEntry : public RefCounted<ResizeObserverEntry> { >+ WTF_MAKE_FAST_ALLOCATED; >+public: >+ static Ref<ResizeObserverEntry> create(Element* target, const FloatRect& contentRect) >+ { >+ return WTF::adoptRef(*new ResizeObserverEntry(target, contentRect)); >+ } >+ >+ Element* target() { return m_target.get(); } >+ DOMRectReadOnly* contentRect() { return m_contentRect.get(); } >+ >+private: >+ ResizeObserverEntry(Element* target, const FloatRect& contentRect) >+ : m_target(target) >+ { >+ m_contentRect = DOMRectReadOnly::create(contentRect.x(), contentRect.y(), contentRect.width(), contentRect.height()); >+ } >+ >+ RefPtr<Element> m_target; >+ RefPtr<DOMRectReadOnly> m_contentRect; >+}; >+ >+} // namespace WebCore >+#endif // ENABLE(RESIZE_OBSERVER) >diff --git a/Source/WebCore/page/ResizeObserverEntry.idl b/Source/WebCore/page/ResizeObserverEntry.idl >new file mode 100644 >index 0000000000..b051bb57be >--- /dev/null >+++ b/Source/WebCore/page/ResizeObserverEntry.idl >@@ -0,0 +1,35 @@ >+/* >+ * Copyright (C) 2019 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// https://wicg.github.io/ResizeObserver/ >+ >+[ >+ Conditional=RESIZE_OBSERVER, >+ ImplementationLacksVTable, >+ EnabledBySetting=ResizeObserver >+] interface ResizeObserverEntry { >+ readonly attribute Element target; >+ readonly attribute DOMRectReadOnly contentRect; >+}; >\ No newline at end of file >diff --git a/Source/WebCore/page/Settings.yaml b/Source/WebCore/page/Settings.yaml >index 976c84c4a0..e941147770 100644 >--- a/Source/WebCore/page/Settings.yaml >+++ b/Source/WebCore/page/Settings.yaml >@@ -717,6 +717,10 @@ shouldAllowUserInstalledFonts: > initial: true > onChange: setNeedsRecalcStyleInAllFrames > >+resizeObserverEnabled: >+ initial: false >+ conditional: RESIZE_OBSERVER >+ > # Only set by Layout Tests. > mediaTypeOverride: > type: String >@@ -813,4 +817,4 @@ mockCaptureDevicesEnabled: > mediaCaptureRequiresSecureConnection: > initial: true > conditional: MEDIA_STREAM >- inspectorOverride: true >+ inspectorOverride: true >\ No newline at end of file >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 4d18124dfe..e07047bc5d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,13 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ * Shared/WebPreferences.yaml: >+ > 2019-02-11 Alex Christensen <achristensen@webkit.org> > > Remove noisy and unnecessary logs added in r241223 >diff --git a/Source/WebKit/Configurations/FeatureDefines.xcconfig b/Source/WebKit/Configurations/FeatureDefines.xcconfig >index ac7c361ecb..e3a29928f1 100644 >--- a/Source/WebKit/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebKit/Configurations/FeatureDefines.xcconfig >@@ -314,6 +314,8 @@ ENABLE_QUOTA = ; > > ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR; > >+ENABLE_RESIZE_OBSERVER = ENABLE_RESIZE_OBSERVER; >+ > ENABLE_RESOLUTION_MEDIA_QUERY = ; > > ENABLE_RESOURCE_LOAD_STATISTICS = ENABLE_RESOURCE_LOAD_STATISTICS; >@@ -411,4 +413,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET; > > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index cce4ace835..e242df9ee4 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1362,6 +1362,14 @@ ProcessSwapOnCrossSiteNavigationEnabled: > category: experimental > webcoreBinding: none > >+ResizeObserverEnabled: >+ type: bool >+ defaultValue: false >+ humanReadableName: "Resize Observer" >+ humanReadableDescription: "Enable Resize Observer support" >+ category: experimental >+ condition: ENABLE(RESIZE_OBSERVER) >+ > # For internal features: > # The type should be boolean. > # You must provide a humanReadableName and humanReadableDescription for all debug features. They >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 9a36586501..e3cbcffc50 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ * WebView/WebPreferenceKeysPrivate.h: >+ * WebView/WebPreferences.mm: >+ (+[WebPreferences initialize]): >+ (-[WebPreferences resizeObserverEnabled]): >+ (-[WebPreferences setResizeObserverEnabled:]): >+ > 2019-02-06 Andy Estes <aestes@apple.com> > > [Payment Request] It should be possible to require a phonetic name for shipping contacts >diff --git a/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig b/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig >index ac7c361ecb..e3a29928f1 100644 >--- a/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig >@@ -314,6 +314,8 @@ ENABLE_QUOTA = ; > > ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR; > >+ENABLE_RESIZE_OBSERVER = ENABLE_RESIZE_OBSERVER; >+ > ENABLE_RESOLUTION_MEDIA_QUERY = ; > > ENABLE_RESOURCE_LOAD_STATISTICS = ENABLE_RESOURCE_LOAD_STATISTICS; >@@ -411,4 +413,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET; > > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >index da4d627ce8..1875cfca8f 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h >@@ -266,3 +266,4 @@ > #define WebKitSelectionAcrossShadowBoundariesEnabledPreferenceKey @"WebKitSelectionAcrossShadowBoundariesEnabled" > #define WebKitCSSLogicalEnabledPreferenceKey @"WebKitCSSLogicalEnabled" > #define WebKitAdClickAttributionEnabledPreferenceKey @"WebKitAdClickAttributionEnabled" >+#define WebKitResizeObserverEnabledPreferenceKey @"WebKitResizeObserverEnabled" >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >index 261ff1758d..a5150671bc 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -693,6 +693,9 @@ public: > @NO, WebKitMediaCapabilitiesEnabledPreferenceKey, > @NO, WebKitFetchAPIKeepAliveEnabledPreferenceKey, > @NO, WebKitServerTimingEnabledPreferenceKey, >+#if ENABLE(RESIZE_OBSERVER) >+ @NO, WebKitResizeObserverEnabledPreferenceKey, >+#endif > nil]; > > #if !PLATFORM(IOS_FAMILY) >@@ -3441,6 +3444,15 @@ static NSString *classIBCreatorID = nil; > [self _setBoolValue:flag forKey:WebKitAdClickAttributionEnabledPreferenceKey]; > } > >+- (BOOL)resizeObserverEnabled >+{ >+ return [self _boolValueForKey:WebKitResizeObserverEnabledPreferenceKey]; >+} >+ >+- (void)setResizeObserverEnabled:(BOOL)flag >+{ >+ [self _setBoolValue:flag forKey:WebKitResizeObserverEnabledPreferenceKey]; >+} > @end > > @implementation WebPreferences (WebInternal) >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >index ffaf05a58c..57d795fb21 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h >@@ -619,6 +619,7 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification WEBKIT_DEPR > @property (nonatomic) BOOL mediaRecorderEnabled; > @property (nonatomic) BOOL allowCrossOriginSubresourcesToAskForCredentials; > @property (nonatomic) BOOL sourceBufferChangeTypeEnabled; >+@property (nonatomic) BOOL resizeObserverEnabled; > > #if TARGET_OS_IPHONE > @property (nonatomic) BOOL quickLookDocumentSavingEnabled; >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 480f88502c..16b419b264 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -3214,6 +3214,10 @@ static bool needsSelfRetainWhileLoadingQuirk() > RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled([preferences serverTimingEnabled]); > > settings.setSelectionAcrossShadowBoundariesEnabled(preferences.selectionAcrossShadowBoundariesEnabled); >+ >+#if ENABLE(RESIZE_OBSERVER) >+ settings.setResizeObserverEnabled([preferences resizeObserverEnabled]); >+#endif > } > > static inline IMP getMethod(id o, SEL s) >diff --git a/Source/WebKitLegacy/win/ChangeLog b/Source/WebKitLegacy/win/ChangeLog >index e90cf1ac20..f7778c295d 100644 >--- a/Source/WebKitLegacy/win/ChangeLog >+++ b/Source/WebKitLegacy/win/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Interfaces/IWebPreferencesPrivate.idl: >+ * WebPreferenceKeysPrivate.h: >+ * WebPreferences.cpp: >+ (WebPreferences::initializeDefaultSettings): >+ (WebPreferences::resizeObserverEnabled): >+ (WebPreferences::setResizeObserverEnabled): >+ * WebPreferences.h: >+ * WebView.cpp: >+ (WebView::notifyPreferencesChanged): >+ > 2019-02-06 Daniel Bates <dabates@apple.com> > > Standardize on ControlKey instead of CtrlKey >diff --git a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >index 19882cdd0f..ed8b1ccaa9 100644 >--- a/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >+++ b/Source/WebKitLegacy/win/Interfaces/IWebPreferencesPrivate.idl >@@ -238,4 +238,6 @@ interface IWebPreferencesPrivate7 : IWebPreferencesPrivate6 > { > HRESULT crossOriginWindowPolicySupportEnabled([out, retval] BOOL* enabled); > HRESULT setCrossOriginWindowPolicySupportEnabled([in] BOOL enabled); >+ HRESULT resizeObserverEnabled([out, retval] BOOL*); >+ HRESULT setResizeObserverEnabled([in] BOOL enabled); > } >diff --git a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >index 940d5cf55d..413a6fdf29 100644 >--- a/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >+++ b/Source/WebKitLegacy/win/WebPreferenceKeysPrivate.h >@@ -206,3 +206,4 @@ > > #define WebKitCSSOMViewScrollingAPIEnabledPreferenceKey "WebKitCSSOMViewScrollingAPIEnabled" > >+#define WebKitResizeObserverEnabledPreferenceKey "WebKitResizeObserverEnabled" >diff --git a/Source/WebKitLegacy/win/WebPreferences.cpp b/Source/WebKitLegacy/win/WebPreferences.cpp >index 025c20bea2..3de8541732 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.cpp >+++ b/Source/WebKitLegacy/win/WebPreferences.cpp >@@ -329,6 +329,8 @@ void WebPreferences::initializeDefaultSettings() > > CFDictionaryAddValue(defaults, CFSTR(WebKitCSSOMViewScrollingAPIEnabledPreferenceKey), kCFBooleanFalse); > >+ CFDictionaryAddValue(defaults, CFSTR(WebKitResizeObserverEnabledPreferenceKey), kCFBooleanFalse); >+ > defaultSettings = defaults; > } > >@@ -2260,3 +2262,25 @@ HRESULT WebPreferences::setServerTimingEnabled(BOOL enabled) > setBoolValue(WebKitServerTimingEnabledPreferenceKey, enabled); > return S_OK; > } >+ >+HRESULT WebPreferences::resizeObserverEnabled(_Out_ BOOL* enabled) >+{ >+#if ENABLE(RESIZE_OBSERVER) >+ if (!enabled) >+ return E_POINTER; >+ *enabled = boolValueForKey(WebKitResizeObserverEnabledPreferenceKey); >+ return S_OK; >+#else >+ return E_NOTIMPL; >+#endif >+} >+ >+HRESULT WebPreferences::setResizeObserverEnabled(BOOL enabled) >+{ >+#if ENABLE(RESIZE_OBSERVER) >+ setBoolValue(WebKitResizeObserverEnabledPreferenceKey, enabled); >+ return S_OK; >+#else >+ return E_NOTIMPL; >+#endif >+} >diff --git a/Source/WebKitLegacy/win/WebPreferences.h b/Source/WebKitLegacy/win/WebPreferences.h >index 2906b36b18..6eba17c3e8 100644 >--- a/Source/WebKitLegacy/win/WebPreferences.h >+++ b/Source/WebKitLegacy/win/WebPreferences.h >@@ -283,6 +283,8 @@ public: > // IWebPreferencesPrivate7 > virtual HRESULT STDMETHODCALLTYPE crossOriginWindowPolicySupportEnabled(_Out_ BOOL*); > virtual HRESULT STDMETHODCALLTYPE setCrossOriginWindowPolicySupportEnabled(BOOL); >+ virtual HRESULT STDMETHODCALLTYPE resizeObserverEnabled(_Out_ BOOL*); >+ virtual HRESULT STDMETHODCALLTYPE setResizeObserverEnabled(BOOL); > > // WebPreferences > >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index de39139a1f..2002e8dc75 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -5599,6 +5599,13 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) > return hr; > RuntimeEnabledFeatures::sharedFeatures().setServerTimingEnabled(!!enabled); > >+#if ENABLE(RESIZE_OBSERVER) >+ hr = prefsPrivate->resizeObserverEnabled(&enabled); >+ if (FAILED(hr)) >+ return hr; >+ settings.setResizeObserverEnabled(!!enabled); >+#endif >+ > return S_OK; > } > >diff --git a/Source/cmake/WebKitFeatures.cmake b/Source/cmake/WebKitFeatures.cmake >index a031de4001..34be85e243 100644 >--- a/Source/cmake/WebKitFeatures.cmake >+++ b/Source/cmake/WebKitFeatures.cmake >@@ -184,6 +184,7 @@ macro(WEBKIT_OPTION_BEGIN) > WEBKIT_OPTION_DEFINE(ENABLE_PUBLIC_SUFFIX_LIST "Toggle public suffix list support" PRIVATE ON) > WEBKIT_OPTION_DEFINE(ENABLE_QUOTA "Toggle Quota support" PRIVATE OFF) > WEBKIT_OPTION_DEFINE(ENABLE_REMOTE_INSPECTOR "Toggle remote inspector support" PRIVATE ON) >+ WEBKIT_OPTION_DEFINE(ENABLE_RESIZE_OBSERVER "Enable Resize Observer support" PRIVATE ON) > WEBKIT_OPTION_DEFINE(ENABLE_RESOLUTION_MEDIA_QUERY "Toggle resolution media query support" PRIVATE OFF) > WEBKIT_OPTION_DEFINE(ENABLE_RESOURCE_LOAD_STATISTICS "Toggle resource load statistics support" PRIVATE OFF) > WEBKIT_OPTION_DEFINE(ENABLE_RESOURCE_USAGE "Toggle resource usage support" PRIVATE OFF) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 712b0c9021..c16495904d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2019-02-12 cathie chen <cathiechen@igalia.com> >+ >+ Import Resize Observer test cases from WPTs >+ https://bugs.webkit.org/show_bug.cgi?id=157743 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/TestOptions.cpp: >+ (TestOptions::TestOptions): >+ * DumpRenderTree/TestOptions.h: >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (setWebPreferencesForTestOptions): >+ * Scripts/webkitperl/FeatureList.pm: >+ * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: >+ > 2019-02-12 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Add intrinsic width support for float boxes. >diff --git a/Tools/DumpRenderTree/TestOptions.cpp b/Tools/DumpRenderTree/TestOptions.cpp >index c926612b1b..8215417a92 100644 >--- a/Tools/DumpRenderTree/TestOptions.cpp >+++ b/Tools/DumpRenderTree/TestOptions.cpp >@@ -111,6 +111,8 @@ TestOptions::TestOptions(const std::string& pathOrURL, const std::string& absolu > enableCSSLogical = parseBooleanTestHeaderValue(value); > else if (key == "internal:AdClickAttributionEnabled") > adClickAttributionEnabled = parseBooleanTestHeaderValue(value); >+ else if (key == "enableResizeObserver") >+ enableResizeObserver = parseBooleanTestHeaderValue(value); > pairStart = pairEnd + 1; > } > } >diff --git a/Tools/DumpRenderTree/TestOptions.h b/Tools/DumpRenderTree/TestOptions.h >index c27e842a48..d885edbdeb 100644 >--- a/Tools/DumpRenderTree/TestOptions.h >+++ b/Tools/DumpRenderTree/TestOptions.h >@@ -46,6 +46,7 @@ struct TestOptions { > bool enableWebGPU { false }; > bool enableCSSLogical { false }; > bool adClickAttributionEnabled { false }; >+ bool enableResizeObserver { false }; > std::string jscOptions; > > TestOptions(const std::string& pathOrURL, const std::string& absolutePath); >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index b052412b0f..4de46ebf43 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -1018,6 +1018,7 @@ static void setWebPreferencesForTestOptions(const TestOptions& options) > preferences.webGPUEnabled = options.enableWebGPU; > preferences.CSSLogicalEnabled = options.enableCSSLogical; > preferences.adClickAttributionEnabled = options.adClickAttributionEnabled; >+ preferences.resizeObserverEnabled = options.enableResizeObserver; > } > > // Called once on DumpRenderTree startup. >diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm >index 809718f60e..d9539d8da5 100644 >--- a/Tools/Scripts/webkitperl/FeatureList.pm >+++ b/Tools/Scripts/webkitperl/FeatureList.pm >@@ -143,6 +143,7 @@ my ( > $quotaSupport, > $registerProtocolHandlerSupport, > $remoteInspectorSupport, >+ $resizeObserverSupport, > $resolutionMediaQuerySupport, > $resourceLoadStatisticsSupport, > $resourceUsageSupport, >@@ -468,6 +469,9 @@ my @features = ( > { option => "remote-inspector", desc => "Toggle remote inspector support", > define => "ENABLE_REMOTE_INSPECTOR", value => \$remoteInspectorSupport }, > >+ { option => "resize-observer", desc => "Enable Resize Observer support", >+ define => "ENABLE_RESIZE_OBSERVER", value => \$resizeObserverSupport }, >+ > { option => "resolution-media-query", desc => "Toggle resolution media query support", > define => "ENABLE_RESOLUTION_MEDIA_QUERY", value => \$resolutionMediaQuerySupport }, > >diff --git a/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig b/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig >index ac7c361ecb..e3a29928f1 100644 >--- a/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig >+++ b/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig >@@ -314,6 +314,8 @@ ENABLE_QUOTA = ; > > ENABLE_REMOTE_INSPECTOR = ENABLE_REMOTE_INSPECTOR; > >+ENABLE_RESIZE_OBSERVER = ENABLE_RESIZE_OBSERVER; >+ > ENABLE_RESOLUTION_MEDIA_QUERY = ; > > ENABLE_RESOURCE_LOAD_STATISTICS = ENABLE_RESOURCE_LOAD_STATISTICS; >@@ -411,4 +413,4 @@ ENABLE_WIRELESS_PLAYBACK_TARGET = ENABLE_WIRELESS_PLAYBACK_TARGET; > > ENABLE_XSLT = ENABLE_XSLT; > >-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT); >+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_ACCESSIBILITY_ISOLATED_TREE) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLE_PAY_SESSION_V4) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_C_LOOP) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_PAINTING_API) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS_TYPED_OM) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_CSS_CONIC_GRADIENTS) $(ENABLE_DARK_MODE_CSS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXPERIMENTAL_FEATURES) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTERSECTION_OBSERVER) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LAYOUT_FORMATTING_CONTEXT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MAC_VIDEO_TOOLBOX) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_EVENTS) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESIZE_OBSERVER) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_LOAD_STATISTICS) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_WEB_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_USER_MESSAGE_HANDLERS) $(ENABLE_USERSELECT_ALL) $(ENABLE_VARIATION_FONTS) $(ENABLE_VIDEO) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN) $(ENABLE_WEB_API_STATISTICS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_AUTHN) $(ENABLE_WEB_RTC) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBASSEMBLY_STREAMING_API) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEBGPU) $(ENABLE_WEBMETAL) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 157743
:
359876
|
360287
|
360290
|
360291
|
361796
|
361805
|
361897
|
361903
|
361999
|
362000
|
362001
|
363087
|
363219
|
363505
|
363506
|
365042
|
365051
|
365064
|
365112
|
365120
|
365126
|
365128
|
365133
|
365144
|
365145
|
365146
|
365148
|
365149
|
365171
|
365187
|
365191
|
365209
|
365285
|
365301
|
365315
|
365319
|
365349
|
365479
|
365487
|
365493
|
365494
|
365510
|
365518
|
365522
|
365702
|
365711
|
365717
|
365720
|
365737
|
365953
|
365954
|
365969
|
365972
|
366015
|
366064
|
366073