[webkit-changes] [WebKit/WebKit] 339bce: Add support for importmap integrity

2024-05-21 Thread Yoav Weiss
  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 339bcec0f9ff29fbd56e7209f4a01f2b12b14ac3
  
https://github.com/WebKit/WebKit/commit/339bcec0f9ff29fbd56e7209f4a01f2b12b14ac3
  Author: Yoav Weiss 
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/imported/w3c/web-platform-tests/import-maps/WEB_FEATURES.yml
M 
LayoutTests/imported/w3c/web-platform-tests/import-maps/data-driven/resources/test-helper.js
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/dynamic-integrity-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/dynamic-integrity.html
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity-valid-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity-valid.html
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity.html
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/nonimport-integrity-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/nonimport-integrity.html
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/static-integrity-expected.txt
A 
LayoutTests/imported/w3c/web-platform-tests/import-maps/static-integrity.html
M LayoutTests/imported/w3c/web-platform-tests/import-maps/w3c-import.log
M 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt
M 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html
M 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-request-resources-iframe.https.html
M 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt
M Source/JavaScriptCore/runtime/ImportMap.cpp
M Source/JavaScriptCore/runtime/ImportMap.h
M Source/WebCore/bindings/js/ScriptModuleLoader.cpp
M Source/WebCore/dom/ScriptElement.cpp

  Log Message:
  ---
  Add support for importmap integrity
https://bugs.webkit.org/show_bug.cgi?id=272884

Reviewed by Ryosuke Niwa.

Imported ES modules can't currently have integrity checks, which means
they can't be used in sites where integrity checks are a necessity, for
security and privacy reasons.
This implements such support, by adding an "integrity" section to import
maps.

See https://github.com/whatwg/html/pull/10269

* LayoutTests/TestExpectations: Ignored console logs to avoid flakiness
* LayoutTests/imported/w3c/web-platform-tests/import-maps/WEB_FEATURES.yml: 
Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/data-driven/resources/test-helper.js:
(createTestIframe): Updated through import.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/dynamic-integrity-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/dynamic-integrity.html: 
Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity-valid-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity-valid.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/no-referencing-script-integrity.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/nonimport-integrity-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/nonimport-integrity.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/static-integrity-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/import-maps/static-integrity.html: 
Added.
* LayoutTests/imported/w3c/web-platform-tests/import-maps/w3c-import.log: 
Imports.
* 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt:
 Updated.
* 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https.html:
 Updated to cover Request.integrity.
* 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/fetch-request-resources-iframe.https.html:
 Updated to cover Request.integrity.
* 
LayoutTests/platform/glib/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt:
 Updated.
* Source/JavaScriptCore/runtime/ImportMap.cpp:
(JSC::ImportMap::resolveImportMatch): Typos and spec link.
(JSC::parseURLLikeModuleSpecifier): Typos and spec link.
(JSC::ImportMap::resolve const): Typos and spec link.
(JSC::normalizeSpecifierKey): Typos and spec 

[webkit-changes] [229563] trunk

2018-03-12 Thread yoav
/Configurations/FeatureDefines.xcconfig




Diff

Modified: trunk/ChangeLog (229562 => 229563)

--- trunk/ChangeLog	2018-03-12 23:21:32 UTC (rev 229562)
+++ trunk/ChangeLog	2018-03-12 23:28:45 UTC (rev 229563)
@@ -1,3 +1,17 @@
+2018-03-12  Yoav Weiss  <y...@yoav.ws>
+
+Runtime flag for link prefetch and remove link subresource.
+https://bugs.webkit.org/show_bug.cgi?id=183540
+
+Reviewed by Chris Dumez.
+
+Remove the LINK_PREFETCH build time flag.
+
+* Source/cmake/OptionsWin.cmake:
+* Source/cmake/WebKitFeatures.cmake:
+* Source/cmake/tools/vsprops/FeatureDefines.props:
+* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:
+
 2018-03-12  Zan Dobersek  <zdober...@igalia.com>
 
 Unreviewed. Unbreak the WPE layout testing that's been broken since


Modified: trunk/Source/_javascript_Core/ChangeLog (229562 => 229563)

--- trunk/Source/_javascript_Core/ChangeLog	2018-03-12 23:21:32 UTC (rev 229562)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-03-12 23:28:45 UTC (rev 229563)
@@ -1,3 +1,14 @@
+2018-03-12  Yoav Weiss  <y...@yoav.ws>
+
+Runtime flag for link prefetch and remove link subresource.
+https://bugs.webkit.org/show_bug.cgi?id=183540
+
+Reviewed by Chris Dumez.
+
+Remove the LINK_PREFETCH build time flag.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2018-03-12  Mark Lam  <mark@apple.com>
 
 Gardening: speculative build fix for Windows.


Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (229562 => 229563)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2018-03-12 23:21:32 UTC (rev 229562)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2018-03-12 23:28:45 UTC (rev 229563)
@@ -192,8 +192,6 @@
 
 ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
 
-ENABLE_LINK_PREFETCH = ;
-
 ENABLE_MAC_GESTURE_EVENTS = ;
 ENABLE_MAC_GESTURE_EVENTS[sdk=macosx*] = $(ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_$(USE_INTERNAL_SDK));
 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS;
@@ -320,4 +318,4 @@
 
 ENABLE_XSLT = ENABLE_XSLT;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_APPLE_PAY_SESSION_V3) $(ENABLE_APPLICATION_MANIFEST) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_INTERACTION) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DRAG_SUPPORT) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_EXTRA_ZOOM_MODE) $(ENABLE_FAST_JIT_PERMISSIONS) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FTL_JIT) $(ENABLE_FUL
 LSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(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_JS_ASYNC_ITERATION) $(ENABLE_KEYBOARD_CODE_ATTRIBUTE) $(ENABLE_KEYBOARD_KEY_ATTRIBUTE) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER) $(ENABLE_LEGACY_ENCRYPTED_MEDIA) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(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_E
 LEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_STANDALONE) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAYMENT_REQUEST) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SERVICE_WORKER) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_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_ELEME

[webkit-changes] [229308] trunk

2018-03-05 Thread yoav
Title: [229308] trunk








Revision 229308
Author y...@yoav.ws
Date 2018-03-05 22:59:34 -0800 (Mon, 05 Mar 2018)


Log Message
Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
(WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.
* loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
* http/tests/preconnect/resources/header-preconnect.php: Added.
* platform/win/TestExpectations: Skipped the preconnect test directory, rather than the individual files in it.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h


Added Paths

trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt
trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html
trunk/LayoutTests/http/tests/preconnect/resources/
trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php




Diff

Modified: trunk/LayoutTests/ChangeLog (229307 => 229308)

--- trunk/LayoutTests/ChangeLog	2018-03-06 05:59:08 UTC (rev 229307)
+++ trunk/LayoutTests/ChangeLog	2018-03-06 06:59:34 UTC (rev 229308)
@@ -1,3 +1,17 @@
+2018-03-05  Yoav Weiss  <y...@yoav.ws>
+
+Support for preconnect Link headers
+https://bugs.webkit.org/show_bug.cgi?id=181657
+
+Reviewed by Darin Adler.
+
+Add test to see Link preconnect headers trigger a connection.
+
+* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
+* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
+* http/tests/preconnect/resources/header-preconnect.php: Added.
+* platform/win/TestExpectations: Skipped the preconnect test directory, rather than the individual files in it.
+
 2018-03-05  Ryan Haddad  <ryanhad...@apple.com>
 
 Mark imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html as slow.


Added: trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt (0 => 229308)

--- trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt	2018-03-06 06:59:34 UTC (rev 229308)
@@ -0,0 +1,10 @@
+CONSOLE MESSAGE: Successfuly preconnected to http://localhost:8000/
+Tests that Link header's rel=preconnect works as expected over HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html (0 => 229308)

--- trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html	2018-03-06 06:59:34 UTC (rev 229308)
@@ -0,0 +1,23 @@
+
+
+
+
+<body>
+<script>
+description("Tests that Link header's rel=preconnect works as expected over HTTP.");
+jsTestIsAsync = true;
+
+// If the feature is not supported on this platform, fail without a timeout.
+if (!document.createElement("link").relList.supports("preconnect"))
+finishJSTest();
+
+internals.setConsoleMessageListener(function() {
+finishJSTest();
+});
+var script = document.createElement("script");
+script.src = ""
+document.body.appendChild(script);
+
+
+


Added: trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php (0 => 229308)

--- trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php	2018-03-06 06:59:34 UTC (rev 229308)
@@ -0,0 +1,3 @@
+; rel=preconnect');
+?>


Modified: trunk/LayoutTests/platform/win/TestExpectations (229307 => 229308)

--- trunk/LayoutTests/platform/win/TestExpectations	2018-03-06 05:59:08 UTC (rev 229307)
+++ trunk/LayoutTests/platform/win/TestExpectations	2018-03-06 06:59:34 UTC (rev 229308)
@@ -3795,8 +3795,7 @@
 
 # preconnect tests are failing on Windows.
 webkit.org/b/177626 fast/dom/HTMLLinkElement/preconnect-support.html  [ Skip ]
-

[webkit-changes] [229196] trunk

2018-03-03 Thread yoav
Title: [229196] trunk








Revision 229196
Author y...@yoav.ws
Date 2018-03-03 00:57:34 -0800 (Sat, 03 Mar 2018)


Log Message
Source/WebCore:
Link headers for subresources are not being processes
https://bugs.webkit.org/show_bug.cgi?id=181789

Reviewed by Youenn Fablet.

Triggers Link header processing when the Link headers arrive on a subresource.

Test: http/tests/preload/link-header-on-subresource.html

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Change the media check conditions.
* loader/LinkLoader.h: Add a third state for media checks.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Preload links from headers for subresources.

LayoutTests:
Link headers for subresources are not being processed
https://bugs.webkit.org/show_bug.cgi?id=181789

Reviewed by Youenn Fablet.

Adds tests to make sure Link headers on subresources are being processed.

* http/tests/preload/link-header-on-subresource-expected.txt: Added.
* http/tests/preload/link-header-on-subresource.html: Added.
* http/tests/preload/resources/dummy-preloads-subresource.css.php: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h
trunk/Source/WebCore/loader/SubresourceLoader.cpp


Added Paths

trunk/LayoutTests/http/tests/preload/link-header-on-subresource-expected.txt
trunk/LayoutTests/http/tests/preload/link-header-on-subresource.html
trunk/LayoutTests/http/tests/preload/resources/dummy-preloads-subresource.css.php




Diff

Modified: trunk/LayoutTests/ChangeLog (229195 => 229196)

--- trunk/LayoutTests/ChangeLog	2018-03-03 07:58:55 UTC (rev 229195)
+++ trunk/LayoutTests/ChangeLog	2018-03-03 08:57:34 UTC (rev 229196)
@@ -1,3 +1,16 @@
+2018-03-03  Yoav Weiss  <y...@yoav.ws>
+
+Link headers for subresources are not being processed
+https://bugs.webkit.org/show_bug.cgi?id=181789
+
+Reviewed by Youenn Fablet.
+
+Adds tests to make sure Link headers on subresources are being processed.
+
+* http/tests/preload/link-header-on-subresource-expected.txt: Added.
+* http/tests/preload/link-header-on-subresource.html: Added.
+* http/tests/preload/resources/dummy-preloads-subresource.css.php: Added.
+
 2018-03-02  Youenn Fablet  <you...@apple.com>
 
 Service worker test gardening


Added: trunk/LayoutTests/http/tests/preload/link-header-on-subresource-expected.txt (0 => 229196)

--- trunk/LayoutTests/http/tests/preload/link-header-on-subresource-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/link-header-on-subresource-expected.txt	2018-03-03 08:57:34 UTC (rev 229196)
@@ -0,0 +1,5 @@
+CONSOLE MESSAGE: Did not parse stylesheet at 'http://127.0.0.1:8000/preload/resources/dummy-preloads-subresource.css.php' because non CSS MIME types are not allowed in strict mode.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/http/tests/preload/link-header-on-subresource.html (0 => 229196)

--- trunk/LayoutTests/http/tests/preload/link-header-on-subresource.html	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/link-header-on-subresource.html	2018-03-03 08:57:34 UTC (rev 229196)
@@ -0,0 +1,16 @@
+
+
+if (window.testRunner) {
+testRunner.dumpAsText()
+testRunner.waitUntilDone();
+}
+
+
+setInterval(function() {
+if (internals.isPreloaded("../resources/dummy.js") && internals.isPreloaded("../resources/dummy.js?media"))
+testRunner.notifyDone();
+}, 100);
+
+


Added: trunk/LayoutTests/http/tests/preload/resources/dummy-preloads-subresource.css.php (0 => 229196)

--- trunk/LayoutTests/http/tests/preload/resources/dummy-preloads-subresource.css.php	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/resources/dummy-preloads-subresource.css.php	2018-03-03 08:57:34 UTC (rev 229196)
@@ -0,0 +1,6 @@
+; rel=preload; as=script", false);
+header("Link: <../resources/dummy.js?media>; rel=preload; as=script; media=all", false);
+?>
+/* This is just a dummy, empty CSS file */
+


Modified: trunk/Source/WebCore/ChangeLog (229195 => 229196)

--- trunk/Source/WebCore/ChangeLog	2018-03-03 07:58:55 UTC (rev 229195)
+++ trunk/Source/WebCore/ChangeLog	2018-03-03 08:57:34 UTC (rev 229196)
@@ -1,3 +1,20 @@
+2018-03-03  Yoav Weiss  <y...@yoav.ws>
+
+Link headers for subresources are not being processes
+https://bugs.webkit.org/show_bug.cgi?id=181789
+
+Reviewed by Youenn Fablet.
+
+Triggers Link header processing when the Link headers arrive on a subresource.
+
+Test: http/tests/preload/link-header-on-subresource.html
+
+* loader/LinkLoader.cpp:
+(WebCore::LinkLoader::loadLinksFromHeader): Change the media check conditions.
+* loader/Link

[webkit-changes] [227235] trunk

2018-01-19 Thread yoav
Title: [227235] trunk








Revision 227235
Author y...@yoav.ws
Date 2018-01-19 14:16:21 -0800 (Fri, 19 Jan 2018)


Log Message
Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
(WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.
* loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
* http/tests/preconnect/resources/header-preconnect.php: Added.
* platform/ios-simulator/TestExpectations: Skipped the test, as ios-simulator doesn't process Link headers for subresources.
* platform/win/TestExpectations: Skipped the preconnect test directory, as it doesn't work on Windows.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/LayoutTests/platform/win/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h


Added Paths

trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt
trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html
trunk/LayoutTests/http/tests/preconnect/resources/
trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php




Diff

Modified: trunk/LayoutTests/ChangeLog (227234 => 227235)

--- trunk/LayoutTests/ChangeLog	2018-01-19 22:12:23 UTC (rev 227234)
+++ trunk/LayoutTests/ChangeLog	2018-01-19 22:16:21 UTC (rev 227235)
@@ -1,3 +1,18 @@
+2018-01-19  Yoav Weiss  <y...@yoav.ws>
+
+Support for preconnect Link headers
+https://bugs.webkit.org/show_bug.cgi?id=181657
+
+Reviewed by Darin Adler.
+
+Add test to see Link preconnect headers trigger a connection.
+
+* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
+* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
+* http/tests/preconnect/resources/header-preconnect.php: Added.
+* platform/ios-simulator/TestExpectations: Skipped the test, as ios-simulator doesn't process Link headers for subresources.
+* platform/win/TestExpectations: Skipped the preconnect test directory, as it doesn't work on Windows.
+
 2018-01-19  Joseph Pecoraro  <pecor...@apple.com>
 
 AppCache: Log a Deprecation warning to the Console when AppCache is used


Added: trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt (0 => 227235)

--- trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt	2018-01-19 22:16:21 UTC (rev 227235)
@@ -0,0 +1,10 @@
+CONSOLE MESSAGE: Successfuly preconnected to http://localhost:8000/
+Tests that Link header's rel=preconnect works as expected over HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html (0 => 227235)

--- trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.html	2018-01-19 22:16:21 UTC (rev 227235)
@@ -0,0 +1,23 @@
+
+
+
+
+<body>
+<script>
+description("Tests that Link header's rel=preconnect works as expected over HTTP.");
+jsTestIsAsync = true;
+
+// If the feature is not supported on this platform, fail without a timeout.
+if (!document.createElement("link").relList.supports("preconnect"))
+finishJSTest();
+
+internals.setConsoleMessageListener(function() {
+finishJSTest();
+});
+var script = document.createElement("script");
+script.src = ""
+document.body.appendChild(script);
+
+
+


Added: trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php (0 => 227235)

--- trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/resources/header-preconnect.php	2018-01-19 22:16:21 UTC (rev 227235)
@@ -0,0 +1,3 @@
+; rel=preconnect');
+?>


Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (227234 => 227235)

--- trunk/LayoutTests/platform/ios-simulator/TestExpectatio

[webkit-changes] [226962] trunk

2018-01-15 Thread yoav
Title: [226962] trunk








Revision 226962
Author y...@yoav.ws
Date 2018-01-15 22:44:41 -0800 (Mon, 15 Jan 2018)


Log Message
Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Call preconnect.
(WebCore::LinkLoader::preconnect): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::preload): Renamed `preloadIfNeeded` to `preload`.
(WebCore::LinkLoader::loadLink): Call preconnect.
* loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-header-rel-preconnect-http.php: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h


Added Paths

trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt
trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.php




Diff

Modified: trunk/LayoutTests/ChangeLog (226961 => 226962)

--- trunk/LayoutTests/ChangeLog	2018-01-16 02:44:14 UTC (rev 226961)
+++ trunk/LayoutTests/ChangeLog	2018-01-16 06:44:41 UTC (rev 226962)
@@ -1,3 +1,15 @@
+2018-01-15  Yoav Weiss  <y...@yoav.ws>
+
+Support for preconnect Link headers
+https://bugs.webkit.org/show_bug.cgi?id=181657
+
+Reviewed by Darin Adler.
+
+Add test to see Link preconnect headers trigger a connection.
+
+* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
+* http/tests/preconnect/link-header-rel-preconnect-http.php: Added.
+
 2018-01-15  Michael Catanzaro  <mcatanz...@igalia.com>
 
 Unreviewed GTK layout test gardening


Added: trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt (0 => 226962)

--- trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http-expected.txt	2018-01-16 06:44:41 UTC (rev 226962)
@@ -0,0 +1,10 @@
+CONSOLE MESSAGE: Successfuly preconnected to http://localhost:8000/
+Tests that Link header's rel=preconnect works as expected over HTTP.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.php (0 => 226962)

--- trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.php	(rev 0)
+++ trunk/LayoutTests/http/tests/preconnect/link-header-rel-preconnect-http.php	2018-01-16 06:44:41 UTC (rev 226962)
@@ -0,0 +1,19 @@
+; rel=preconnect');
+?>
+
+
+
+
+<body>
+<script>
+description("Tests that Link header's rel=preconnect works as expected over HTTP.");
+jsTestIsAsync = true;
+
+internals.setConsoleMessageListener(function() {
+finishJSTest();
+});
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (226961 => 226962)

--- trunk/Source/WebCore/ChangeLog	2018-01-16 02:44:14 UTC (rev 226961)
+++ trunk/Source/WebCore/ChangeLog	2018-01-16 06:44:41 UTC (rev 226962)
@@ -1,3 +1,22 @@
+2018-01-15  Yoav Weiss  <y...@yoav.ws>
+
+Support for preconnect Link headers
+https://bugs.webkit.org/show_bug.cgi?id=181657
+
+Reviewed by Darin Adler.
+
+Move the preconnect functionality into its own function, and
+also call this function when Link headers are processed.
+
+Test: http/tests/preconnect/link-header-rel-preconnect-http.php
+
+* loader/LinkLoader.cpp:
+(WebCore::LinkLoader::loadLinksFromHeader): Call preconnect.
+(WebCore::LinkLoader::preconnect): Preconnect to a host functionality moved here.
+(WebCore::LinkLoader::preload): Renamed `preloadIfNeeded` to `preload`.
+(WebCore::LinkLoader::loadLink): Call preconnect.
+* loader/LinkLoader.h:
+
 2018-01-15  Michael Catanzaro  <mcatanz...@igalia.com>
 
 Improve use of ExportMacros


Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (226961 => 226962)

--- trunk/Source/WebCore/loader/LinkLoader.cpp	2018-01-16 02:44:14 UTC (rev 226961)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp	2018-01-16 06:44:41 UTC (rev 226962)
@@ -110,7 +110,8 @@
 // Sanity check to avoid re-entrancy here.
 if (equalIgnoringFragmentIdentifier(url, baseURL))
 continue;
-preloadIfNeeded(relAttribute, url, document, header.as(), header.media(), header.mimeType(), header.crossOri

[webkit-changes] [221604] trunk/LayoutTests

2017-09-04 Thread yoav
Title: [221604] trunk/LayoutTests








Revision 221604
Author y...@yoav.ws
Date 2017-09-04 20:31:20 -0700 (Mon, 04 Sep 2017)


Log Message
[iOS Simulator] http/tests/preload/viewport/meta-viewport-link-headers.php is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=172518

This unflakes the test by downloading a "timer" image and kicking off the timer that runs the
test only once that image was downloaded, while potentially waiting for the preloaded images to arrive,
up to 1 second.
That means that slow test environments would have a longer timer than today, avoiding flakiness.

Reviewed by Youenn Fablet.

* http/tests/preload/viewport/meta-viewport-link-headers.php: Add a "timer" image, which load event starts the test.
* platform/ios/TestExpectations: Unflake the test in expectations.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/preload/viewport/meta-viewport-link-headers.php
trunk/LayoutTests/platform/ios/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (221603 => 221604)

--- trunk/LayoutTests/ChangeLog	2017-09-05 03:29:46 UTC (rev 221603)
+++ trunk/LayoutTests/ChangeLog	2017-09-05 03:31:20 UTC (rev 221604)
@@ -1,3 +1,18 @@
+2017-09-04  Yoav Weiss  <y...@yoav.ws>
+
+[iOS Simulator] http/tests/preload/viewport/meta-viewport-link-headers.php is a flaky failure.
+https://bugs.webkit.org/show_bug.cgi?id=172518
+
+This unflakes the test by downloading a "timer" image and kicking off the timer that runs the
+test only once that image was downloaded, while potentially waiting for the preloaded images to arrive,
+up to 1 second.
+That means that slow test environments would have a longer timer than today, avoiding flakiness.
+
+Reviewed by Youenn Fablet.
+
+* http/tests/preload/viewport/meta-viewport-link-headers.php: Add a "timer" image, which load event starts the test.
+* platform/ios/TestExpectations: Unflake the test in expectations.
+
 2017-09-03  Darin Adler  <da...@apple.com>
 
 Fix a few minor problems found while working toward removing unneeded calls to updateStyle


Modified: trunk/LayoutTests/http/tests/preload/viewport/meta-viewport-link-headers.php (221603 => 221604)

--- trunk/LayoutTests/http/tests/preload/viewport/meta-viewport-link-headers.php	2017-09-05 03:29:46 UTC (rev 221603)
+++ trunk/LayoutTests/http/tests/preload/viewport/meta-viewport-link-headers.php	2017-09-05 03:31:20 UTC (rev 221604)
@@ -1,32 +1,45 @@
 +header("Link: ;rel=preload;as=image;\"", false);
 header("Link: ;rel=preload;as=image;\"", false);
 header("Link: ;rel=preload;as=image;media=\"(min-width: 300px)\"", false);
 header("Link: ;rel=preload;as=image;media=\"(max-width: 299px)\"", false);
 ?>
- 
+
 
 <span class="cx"> <script src=""
</span><span class="cx"> <script>
</span><span class="cx"> var t = async_test('Makes sure that Link headers support the media attribute and respond to <meta content=viewport>');
</span><del>-window.addEventListener("load", t.step_func(function() {
-var entries = performance.getEntriesByType("resource");
-var controlLoaded = false;
-var smallLoaded = false;
-var largeLoaded = false;
-for (var i = 0; i < entries.length; ++i) {
-if (entries[i].name.indexOf("control") != -1)
-controlLoaded = true;
-else if (entries[i].name.indexOf("large") != -1)
-largeLoaded = true;
-else if (entries[i].name.indexOf("small") != -1)
-smallLoaded = true;
-}
-assert_true(controlLoaded);
-assert_false(largeLoaded);
-assert_true(smallLoaded);
-t.done();
</del><ins>+var img = new Image();
+var counter = 20;
+var timeout = 50;
+img.addEventListener("load", t.step_func(function(){
+var test = function() {
+var entries = performance.getEntriesByType("resource");
+var controlLoaded = false;
+var smallLoaded = false;
+var largeLoaded = false;
+for (var i = 0; i < entries.length; ++i) {
+if (entries[i].name.indexOf("control") != -1)
+controlLoaded = true;
+else if (entries[i].name.indexOf("large") != -1)
+largeLoaded = true;
+else if (entries[i].name.indexOf("small") != -1)
+smallLoaded = true;
+}
+// It's possible that due to network variance, these resource downloads didn't yet finish.
+// If so, wait a bit longer (up to 1 second).
+if (!(co

[webkit-changes] [219234] trunk/Source/WebCore

2017-07-06 Thread yoav
Title: [219234] trunk/Source/WebCore








Revision 219234
Author y...@yoav.ws
Date 2017-07-06 20:37:17 -0700 (Thu, 06 Jul 2017)


Log Message
[preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
https://bugs.webkit.org/show_bug.cgi?id=174199

Reviewed by Youenn Fablet.

No new tests as video/audio is supported in tests. I tested this manually.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLLinkElement.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (219233 => 219234)

--- trunk/Source/WebCore/ChangeLog	2017-07-07 03:35:27 UTC (rev 219233)
+++ trunk/Source/WebCore/ChangeLog	2017-07-07 03:37:17 UTC (rev 219234)
@@ -1,3 +1,15 @@
+2017-07-06  Yoav Weiss  <y...@yoav.ws>
+
+[preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
+https://bugs.webkit.org/show_bug.cgi?id=174199
+
+Reviewed by Youenn Fablet.
+
+No new tests as video/audio is supported in tests. I tested this manually.
+
+* html/HTMLLinkElement.cpp:
+(WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.
+
 2017-07-06  Chris Dumez  <cdu...@apple.com>
 
 Drop unused ResourceLoadStatistics members


Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (219233 => 219234)

--- trunk/Source/WebCore/html/HTMLLinkElement.cpp	2017-07-07 03:35:27 UTC (rev 219233)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp	2017-07-07 03:37:17 UTC (rev 219234)
@@ -48,6 +48,7 @@
 #include "MediaQueryEvaluator.h"
 #include "MouseEvent.h"
 #include "RenderStyle.h"
+#include "RuntimeEnabledFeatures.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
 #include "StyleInheritedData.h"
@@ -231,8 +232,9 @@
 || equalLettersIgnoringASCIICase(as, "image")
 || equalLettersIgnoringASCIICase(as, "script")
 || equalLettersIgnoringASCIICase(as, "style")
-|| equalLettersIgnoringASCIICase(as, "video")
-|| equalLettersIgnoringASCIICase(as, "audio")
+|| (RuntimeEnabledFeatures::sharedFeatures().mediaPreloadingEnabled()
+&& (equalLettersIgnoringASCIICase(as, "video")
+|| equalLettersIgnoringASCIICase(as, "audio")))
 #if ENABLE(VIDEO_TRACK)
 || equalLettersIgnoringASCIICase(as, "track")
 #endif






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [215229] trunk

2017-04-11 Thread yoav
Title: [215229] trunk








Revision 215229
Author y...@yoav.ws
Date 2017-04-11 08:10:10 -0700 (Tue, 11 Apr 2017)


Log Message
[link preload] Double downloads of preloaded content when it's in MemoryCache
https://bugs.webkit.org/show_bug.cgi?id=170122

Reviewed by Antti Koivisto.

Source/WebCore:

No new tests, but unflaked http/tests/preload/single_download_preload_headers_charset.html.

The test was flaky because it appears as if MemoryCache is not being evicted between runs,
and running multiple iterations of the test resulted in preloaded being taken out of MemoryCache
and not having the unknown encoding flag. In those cases, the result was a double download and
a failed test.

* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::setEncoding): Set the m_encodingSet flag.
* loader/TextResourceDecoder.h: Added an m_encodingSet flag initialized to false.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::setEncoding): Assert that stylesheets don't maintain decoded text.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Remove initialization of hasUnknownEncoding flag.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::hasUnknownEncoding): Remove.
(WebCore::CachedResource::setHasUnknownEncoding): Remove.
(WebCore::CachedResource::CachedResource): Remove initialization of hasUnknownEncoding flag.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy): Set the encoding in case it changed.

LayoutTests:

* TestExpectations: Removed flakiness label from the header preload charset test.
* fast/loader/cache-encoding-expected.txt: Changed expectation.
* fast/loader/cache-encoding.html: Modified behavior to stick with the first decoded string.
* http/tests/preload/preload-encoding-expected.txt: Changed expectation.
* http/tests/preload/preload-encoding.html: Modified behavior to stick with the first decoded string.
* imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt: This test refers to the same file
twice and expects different decoding for it each time. This is the behavior that we modified, and therefore the test expectation is changed as well.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/fast/loader/cache-encoding-expected.txt
trunk/LayoutTests/fast/loader/cache-encoding.html
trunk/LayoutTests/http/tests/preload/preload-encoding-expected.txt
trunk/LayoutTests/http/tests/preload/preload-encoding.php
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/TextResourceDecoder.cpp
trunk/Source/WebCore/loader/TextResourceDecoder.h
trunk/Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (215228 => 215229)

--- trunk/LayoutTests/ChangeLog	2017-04-11 14:56:21 UTC (rev 215228)
+++ trunk/LayoutTests/ChangeLog	2017-04-11 15:10:10 UTC (rev 215229)
@@ -1,3 +1,18 @@
+2017-04-11  Yoav Weiss  <y...@yoav.ws>
+
+[link preload] Double downloads of preloaded content when it's in MemoryCache
+https://bugs.webkit.org/show_bug.cgi?id=170122
+
+Reviewed by Antti Koivisto.
+
+* TestExpectations: Removed flakiness label from the header preload charset test.
+* fast/loader/cache-encoding-expected.txt: Changed expectation.
+* fast/loader/cache-encoding.html: Modified behavior to stick with the first decoded string.
+* http/tests/preload/preload-encoding-expected.txt: Changed expectation.
+* http/tests/preload/preload-encoding.html: Modified behavior to stick with the first decoded string.
+* imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-charset-01-expected.txt: This test refers to the same file
+twice and expects different decoding for it each time. This is the behavior that we modified, and therefore the test expectation is changed as well.
+
 2017-04-11  Manuel Rego Casasnovas  <r...@igalia.com>
 
 [css-grid] Fix fast/css-grid-layout/grid-simplified-layout-positioned.html


Modified: trunk/LayoutTests/TestExpectations (215228 => 215229)

--- trunk/LayoutTests/TestExpectations	2017-04-11 14:56:21 UTC (rev 215228)
+++ trunk/LayoutTests/TestExpectations	2017-04-11 15:10:10 UTC (rev 215229)
@@ -1092,8 +1092,6 @@
 
 webkit.org/b/168238 imported/w3c/web-platform-tests/dom/events/EventListener-invoke-legacy.html [ Pass Failure ]
 
-webkit.org/b/170122 http/tests/preload/single_download_preload_headers_charset.php [ Pass Failure ]
-
 
 ### START OF -disabled tests
 


Modified: trunk/LayoutTests

[webkit-changes] [214682] trunk/Source/WebCore

2017-03-31 Thread yoav
Title: [214682] trunk/Source/WebCore








Revision 214682
Author y...@yoav.ws
Date 2017-03-31 12:42:07 -0700 (Fri, 31 Mar 2017)


Log Message
Remove PRELOAD_DEBUG related code.
https://bugs.webkit.org/show_bug.cgi?id=170352

Reviewed by Youenn Fablet.

As the PRELOAD_DEBUG related code stopped building and it seems like no one noticed,
it seems safe to assume that we can remove that code. This patch removes it.

No new tests as there's no functional change.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::preload):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (214681 => 214682)

--- trunk/Source/WebCore/ChangeLog	2017-03-31 19:40:15 UTC (rev 214681)
+++ trunk/Source/WebCore/ChangeLog	2017-03-31 19:42:07 UTC (rev 214682)
@@ -1,3 +1,20 @@
+2017-03-31  Yoav Weiss  <y...@yoav.ws>
+
+Remove PRELOAD_DEBUG related code.
+https://bugs.webkit.org/show_bug.cgi?id=170352
+
+Reviewed by Youenn Fablet.
+
+As the PRELOAD_DEBUG related code stopped building and it seems like no one noticed,
+it seems safe to assume that we can remove that code. This patch removes it.
+
+No new tests as there's no functional change.
+
+* loader/cache/CachedResourceLoader.cpp:
+(WebCore::CachedResourceLoader::preload):
+(WebCore::CachedResourceLoader::clearPreloads):
+(WebCore::CachedResourceLoader::printPreloadStats): Deleted.
+
 2017-03-31  Brady Eidson  <beid...@apple.com>
 
 Clean up the "StorageType" enum.


Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (214681 => 214682)

--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-03-31 19:40:15 UTC (rev 214681)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-03-31 19:42:07 UTC (rev 214682)
@@ -79,8 +79,6 @@
 #include "CachedTextTrack.h"
 #endif
 
-#define PRELOAD_DEBUG 0
-
 #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - CachedResourceLoader::" fmt, this, ##__VA_ARGS__)
 
 namespace WebCore {
@@ -1237,9 +1235,6 @@
 m_preloads = std::make_unique<ListHashSet<CachedResource*>>();
 m_preloads->add(resource.get());
 
-#if PRELOAD_DEBUG
-printf("PRELOADING %s\n",  resource->url().latin1().data());
-#endif
 return resource;
 }
 
@@ -1271,9 +1266,6 @@
 
 void CachedResourceLoader::clearPreloads(ClearPreloadsMode mode)
 {
-#if PRELOAD_DEBUG
-printPreloadStats();
-#endif
 if (!m_preloads)
 return;
 
@@ -1294,53 +1286,6 @@
 m_preloads = WTFMove(remainingLinkPreloads);
 }
 
-#if PRELOAD_DEBUG
-void CachedResourceLoader::printPreloadStats()
-{
-unsigned scripts = 0;
-unsigned scriptMisses = 0;
-unsigned stylesheets = 0;
-unsigned stylesheetMisses = 0;
-unsigned images = 0;
-unsigned imageMisses = 0;
-for (auto& resource : m_preloads) {
-if (resource->preloadResult() == CachedResource::PreloadNotReferenced)
-printf("!! UNREFERENCED PRELOAD %s\n", resource->url().latin1().data());
-else if (resource->preloadResult() == CachedResource::PreloadReferencedWhileComplete)
-printf("HIT COMPLETE PRELOAD %s\n", resource->url().latin1().data());
-else if (resource->preloadResult() == CachedResource::PreloadReferencedWhileLoading)
-printf("HIT LOADING PRELOAD %s\n", resource->url().latin1().data());
-
-if (resource->type() == CachedResource::Script) {
-scripts++;
-if (resource->preloadResult() < CachedResource::PreloadReferencedWhileLoading)
-scriptMisses++;
-} else if (resource->type() == CachedResource::CSSStyleSheet) {
-stylesheets++;
-if (resource->preloadResult() < CachedResource::PreloadReferencedWhileLoading)
-stylesheetMisses++;
-} else {
-images++;
-if (resource->preloadResult() < CachedResource::PreloadReferencedWhileLoading)
-imageMisses++;
-}
-
-if (resource->errorOccurred() && resource->preloadResult() == CachedResource::PreloadNotReferenced)
-MemoryCache::singleton().remove(resource);
-
-resource->decreasePreloadCount();
-}
-m_preloads = nullptr;
-
-if (scripts)
-printf("SCRIPTS: %d (%d hits, hit rate %d%%)\n", scripts, scripts - scriptMisses, (scripts - scriptMisses) * 100 / scripts);
-if (stylesheets)
-printf("STYLESHEETS: %d (%d hits, hit rate %d%%)\n", stylesheets, stylesheets - stylesheetMisses, (stylesheets - stylesheetMisse

[webkit-changes] [214472] trunk

2017-03-28 Thread yoav
Title: [214472] trunk








Revision 214472
Author y...@yoav.ws
Date 2017-03-28 04:56:52 -0700 (Tue, 28 Mar 2017)


Log Message
Add a warning for unused link preloads.
https://bugs.webkit.org/show_bug.cgi?id=165670

Reviewed by Youenn Fablet.

Source/WebCore:

Tests: http/tests/preload/single_download_preload_headers_charset.php
   http/tests/preload/unused_preload_warning.html

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Stop the timer once the document is destructed.
* loader/LinkPreloadResourceClients.h: Add shouldMarkAsReferenced overides for the LinkPreloadResourceClient classes.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addClientToSet): Make sure LinkPreloadResourceClients don't set resource to be referenced.
* loader/cache/CachedResourceClient.h:
(WebCore::CachedResourceClient::shouldMarkAsReferenced): Make sure that ResourceClients mark preloads as referenced by default.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader): Initialize timer.
(WebCore::CachedResourceLoader::~CachedResourceLoader): Stop timer.
(WebCore::CachedResourceLoader::documentDidFinishLoadEvent): Trigger a timer if preloads weren't cleared at load time.
(WebCore::CachedResourceLoader::stopUnusedPreloadsTimer): Stop the timer.
(WebCore::CachedResourceLoader::warnUnusedPreloads): Iterate over m_preloads and issue a warning for non-referenced preloads.
* loader/cache/CachedResourceLoader.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::willDetachDocumentFromFrame): Clear Resource Timing buffer when document detaches, to avoid test flakiness.

LayoutTests:

* TestExpectations: Added a "Failure Pass" for the flaky charset header test.
* http/tests/preload/download_resources-expected.txt:
* http/tests/preload/download_resources.html: Added references to preloaded resources.
* http/tests/preload/onerror_event-expected.txt:
* http/tests/preload/onerror_event.html: Added references to preloaded resources.
* http/tests/preload/onload_event-expected.txt:
* http/tests/preload/onload_event.html: Added references to preloaded resources.
* http/tests/preload/single_download_preload.html: Deflaked.
* http/tests/preload/single_download_preload_headers.php: Removed the charset to avoid double download bug.
* http/tests/preload/single_download_preload_headers_charset-expected.txt: Added.
* http/tests/preload/single_download_preload_headers_charset.php: Flaky test showing the double download bug when charset is declared.
* http/tests/preload/unused_preload_warning-expected.txt: Added.
* http/tests/preload/unused_preload_warning.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/http/tests/preload/download_resources-expected.txt
trunk/LayoutTests/http/tests/preload/download_resources.html
trunk/LayoutTests/http/tests/preload/onerror_event-expected.txt
trunk/LayoutTests/http/tests/preload/onerror_event.html
trunk/LayoutTests/http/tests/preload/onload_event-expected.txt
trunk/LayoutTests/http/tests/preload/onload_event.html
trunk/LayoutTests/http/tests/preload/single_download_preload.html
trunk/LayoutTests/http/tests/preload/single_download_preload_headers.php
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/loader/LinkPreloadResourceClients.h
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResourceClient.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
trunk/Source/WebCore/page/DOMWindow.cpp


Added Paths

trunk/LayoutTests/http/tests/preload/single_download_preload_headers_charset-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload_headers_charset.php
trunk/LayoutTests/http/tests/preload/unused_preload_warning-expected.txt
trunk/LayoutTests/http/tests/preload/unused_preload_warning.html




Diff

Modified: trunk/LayoutTests/ChangeLog (214471 => 214472)

--- trunk/LayoutTests/ChangeLog	2017-03-28 10:42:39 UTC (rev 214471)
+++ trunk/LayoutTests/ChangeLog	2017-03-28 11:56:52 UTC (rev 214472)
@@ -1,3 +1,24 @@
+2017-03-28  Yoav Weiss  <y...@yoav.ws>
+
+Add a warning for unused link preloads.
+https://bugs.webkit.org/show_bug.cgi?id=165670
+
+Reviewed by Youenn Fablet.
+
+* TestExpectations: Added a "Failure Pass" for the flaky charset header test.
+* http/tests/preload/download_resources-expected.txt:
+* http/tests/preload/download_resources.html: Added references to preloaded resources.
+* http/tests/preload/onerror_event-expected.txt:
+* http/tests/preload/onerror_event.html: Added references to preloaded resources.
+* http/tests/preload/onload_event-expected.txt:
+* http/tests/preload/onload_event.html: Added references to preloaded resources.
+* http/tests/preload/single_download_preload.html: Deflaked.

[webkit-changes] [214361] trunk

2017-03-24 Thread yoav
Title: [214361] trunk








Revision 214361
Author y...@yoav.ws
Date 2017-03-24 11:41:42 -0700 (Fri, 24 Mar 2017)


Log Message
Add a warning for unused link preloads.
https://bugs.webkit.org/show_bug.cgi?id=165670

Reviewed by Youenn Fablet.

Source/WebCore:

This patch adds a warning message, to warn developers that are using
link preloads in cases where the downloaded resource is likely to
remain unused.

Test: http/tests/preload/unused_preload_warning.html

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): Stop the timer once the document is destructed.
* loader/LinkPreloadResourceClients.h: Add shouldMarkAsReferenced overides for the LinkPreloadResourceClient classes.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addClientToSet): Make sure LinkPreloadResourceClients don't set resource to be referenced.
* loader/cache/CachedResourceClient.h:
(WebCore::CachedResourceClient::shouldMarkAsReferenced): Make sure that ResourceClients mark preloads as referenced by default.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::CachedResourceLoader): Initialize timer.
(WebCore::CachedResourceLoader::~CachedResourceLoader): Stop timer.
(WebCore::CachedResourceLoader::warnUnusedPreloads): Iterate over m_preloads and issue a warning for non-referenced preloads.
(WebCore::CachedResourceLoader::documentDidFinishLoadEvent): Trigger a timer if preloads weren't cleared at load time.
(WebCore::CachedResourceLoader::warnUnusedPreloads): Triggered by the timer, and called CachedResourceLoader::warnUnusedPreloads.
(WebCore::CachedResourceLoader::stopUnusedPreloadsTimer): Stop the timer.

LayoutTests:

This adds a test for the unused preload warning, and adapts some of the other preload tests,
to avoid warnings.

* http/tests/preload/download_resources-expected.txt: Changed.
* http/tests/preload/download_resources.html: Added references to preloaded resources.
* http/tests/preload/onerrer_event-expected.txt: Changed.
* http/tests/preload/onerror_event.html: Added references to preloaded resources.
* http/tests/preload/onload_event.html: Added references to preloaded resources.
* http/tests/preload/resources/single_download_preload.html: Deflaked.
* http/tests/preload/unused_preload_warning-expected.txt: Added.
* http/tests/preload/unused_preload_warning.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/preload/download_resources-expected.txt
trunk/LayoutTests/http/tests/preload/download_resources.html
trunk/LayoutTests/http/tests/preload/onerror_event-expected.txt
trunk/LayoutTests/http/tests/preload/onerror_event.html
trunk/LayoutTests/http/tests/preload/onload_event-expected.txt
trunk/LayoutTests/http/tests/preload/onload_event.html
trunk/LayoutTests/http/tests/preload/single_download_preload.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/loader/LinkPreloadResourceClients.h
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResourceClient.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h


Added Paths

trunk/LayoutTests/http/tests/preload/unused_preload_warning-expected.txt
trunk/LayoutTests/http/tests/preload/unused_preload_warning.html




Diff

Modified: trunk/LayoutTests/ChangeLog (214360 => 214361)

--- trunk/LayoutTests/ChangeLog	2017-03-24 18:39:28 UTC (rev 214360)
+++ trunk/LayoutTests/ChangeLog	2017-03-24 18:41:42 UTC (rev 214361)
@@ -1,3 +1,22 @@
+2017-03-24  Yoav Weiss  <y...@yoav.ws>
+
+Add a warning for unused link preloads.
+https://bugs.webkit.org/show_bug.cgi?id=165670
+
+Reviewed by Youenn Fablet.
+
+This adds a test for the unused preload warning, and adapts some of the other preload tests,
+to avoid warnings.
+
+* http/tests/preload/download_resources-expected.txt: Changed.
+* http/tests/preload/download_resources.html: Added references to preloaded resources.
+* http/tests/preload/onerrer_event-expected.txt: Changed.
+* http/tests/preload/onerror_event.html: Added references to preloaded resources.
+* http/tests/preload/onload_event.html: Added references to preloaded resources.
+* http/tests/preload/resources/single_download_preload.html: Deflaked.
+* http/tests/preload/unused_preload_warning-expected.txt: Added.
+* http/tests/preload/unused_preload_warning.html: Added.
+
 2017-03-24  Brent Fulgham  <bfulg...@apple.com>
 
 Handle recursive calls to ProcessingInstruction::checkStyleSheet


Modified: trunk/LayoutTests/http/tests/preload/download_resources-expected.txt (214360 => 214361)

--- trunk/LayoutTests/http/tests/preload/download_resources-expected.txt	2017-03-24 18:39:28 UTC (rev 214360)
+++ trunk/LayoutTests/http/tests/preload/download_resources-expected.txt	2017-03-24 18:41:42 UTC (rev 214361)
@@ -1,13 +1,5 @@
-CONSOL

[webkit-changes] [213672] trunk

2017-03-09 Thread yoav
Title: [213672] trunk








Revision 213672
Author y...@yoav.ws
Date 2017-03-09 14:29:39 -0800 (Thu, 09 Mar 2017)


Log Message
[link preload] Double downloads of preloaded CSS
https://bugs.webkit.org/show_bug.cgi?id=169274

Reviewed by Antti Koivisto.

Source/WebCore:

Avoid reloading link preloads in case of a charset mismatch.

Charset mismatch can happen for header based preloads, as they are requested before
the HTML's `` tag is processed. This change makes sure that in those
cases, we modify the resource's encoding setting instead of reloading it.

Test: http/tests/preload/single_download_preload_headers.php

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Initialize m_unknownCharset to be the same as the preload flag.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::hasUnknownEncoding):
(WebCore::CachedResource::setHasUnknownEncoding):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy): In case of a charset
mismatch, set the encoding of the Resource instead of reloading it if the charset is unknown.

LayoutTests:

Added tests making sure that header based preloads also trigger a single download,
and that we properly handle multiple charsets for the same preloaded resource.

* http/tests/preload/single_download_preload_headers-expected.txt: Added.
* http/tests/preload/single_download_preload_headers.php: Added.
* http/tests/preload/preload-encoding-expected.txt: Added.
* http/tests/preload/preload-encoding.php: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp


Added Paths

trunk/LayoutTests/http/tests/preload/preload-encoding-expected.txt
trunk/LayoutTests/http/tests/preload/preload-encoding.php
trunk/LayoutTests/http/tests/preload/resources/success.js
trunk/LayoutTests/http/tests/preload/single_download_preload_headers-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload_headers.php




Diff

Modified: trunk/LayoutTests/ChangeLog (213671 => 213672)

--- trunk/LayoutTests/ChangeLog	2017-03-09 22:24:26 UTC (rev 213671)
+++ trunk/LayoutTests/ChangeLog	2017-03-09 22:29:39 UTC (rev 213672)
@@ -1,3 +1,18 @@
+2017-03-09  Yoav Weiss  <y...@yoav.ws>
+
+[link preload] Double downloads of preloaded CSS
+https://bugs.webkit.org/show_bug.cgi?id=169274
+
+Reviewed by Antti Koivisto.
+
+Added tests making sure that header based preloads also trigger a single download,
+and that we properly handle multiple charsets for the same preloaded resource.
+
+* http/tests/preload/single_download_preload_headers-expected.txt: Added.
+* http/tests/preload/single_download_preload_headers.php: Added.
+* http/tests/preload/preload-encoding-expected.txt: Added.
+* http/tests/preload/preload-encoding.php: Added.
+
 2017-03-09  Jiewen Tan  <jiewen_...@apple.com>
 
 Implement PBKDF2 in WebCrypto


Added: trunk/LayoutTests/http/tests/preload/preload-encoding-expected.txt (0 => 213672)

--- trunk/LayoutTests/http/tests/preload/preload-encoding-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/preload-encoding-expected.txt	2017-03-09 22:29:39 UTC (rev 213672)
@@ -0,0 +1,11 @@
+CONSOLE MESSAGE: line 1: SyntaxError: Invalid character '\u8307'
+First load a script with a wrong charset then again with the right one. Second attempt should work and 'scriptSuccess' should be set to true. 'successfullyParsed' will be undefined.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS scriptSuccess is true
+FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined).
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/http/tests/preload/preload-encoding.php (0 => 213672)

--- trunk/LayoutTests/http/tests/preload/preload-encoding.php	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/preload-encoding.php	2017-03-09 22:29:39 UTC (rev 213672)
@@ -0,0 +1,31 @@
+; rel=preload; as=script", false);
+?>
+
+jsTestIsAsync = true;
+
+description("First load a script with a wrong charset then again with the right one. Second attempt should work and 'scriptSuccess' should be set to true. 'successfullyParsed' will be undefined.");
+
+function appendScriptWithCharset(charset, onload)
+{
+var script = document.createElement("script");
+script.src = ""
+script.setAttribute("charset", charset);
+script._onload_ = onload;
+script._onerror_ = onload;
+document.body.appendChild(script);
+}
+
+function test()
+{
+appendScriptWithCharset("utf-16", function () {
+appendScriptWithCharset("utf-8", function () {
+ 

[webkit-changes] [211755] trunk

2017-02-06 Thread yoav
Title: [211755] trunk








Revision 211755
Author y...@yoav.ws
Date 2017-02-06 15:47:51 -0800 (Mon, 06 Feb 2017)


Log Message
http/tests/preload/dynamic_removing_preload.html fails to test what it should
https://bugs.webkit.org/show_bug.cgi?id=167792

Reviewed by Ryosuke Niwa.

Source/WebCore:

Cancel the link preload resource load when the link element is removed from the DOM.

No new tests, but unskipping an existing test: http/tests/preload/dynamic_removing_preload.html

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFrom): Call m_linkLoader.cancelLoad().
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::cancelLoad): Clear m_preloadResourceClient.
* loader/LinkLoader.h:
* loader/LinkPreloadResourceClients.h:
(WebCore::LinkPreloadResourceClient::clearResource): Call m_resource->cancelLoad().
* loader/SubresourceLoader.cpp:
(WebCore::LinkPreloadResourceClient::didFinishLoading): Change ASSERT to exempt cancelled loads.

LayoutTests:

* TestExpectations: Unskip dynamic_removing_preload.html
* http/tests/preload/dynamic_removing_preload-expected.txt:
* http/tests/preload/dynamic_removing_preload.html: Switch test to use ResourceTiming.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt
trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLLinkElement.cpp
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h
trunk/Source/WebCore/loader/LinkPreloadResourceClients.h
trunk/Source/WebCore/loader/SubresourceLoader.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (211754 => 211755)

--- trunk/LayoutTests/ChangeLog	2017-02-06 23:47:26 UTC (rev 211754)
+++ trunk/LayoutTests/ChangeLog	2017-02-06 23:47:51 UTC (rev 211755)
@@ -1,3 +1,14 @@
+2017-02-06  Yoav Weiss  <y...@yoav.ws>
+
+http/tests/preload/dynamic_removing_preload.html fails to test what it should
+https://bugs.webkit.org/show_bug.cgi?id=167792
+
+Reviewed by Ryosuke Niwa.
+
+* TestExpectations: Unskip dynamic_removing_preload.html
+* http/tests/preload/dynamic_removing_preload-expected.txt:
+* http/tests/preload/dynamic_removing_preload.html: Switch test to use ResourceTiming.
+
 2017-02-06  Alex Christensen  <achristen...@webkit.org>
 
 credentials should be partitioned by main document domain


Modified: trunk/LayoutTests/TestExpectations (211754 => 211755)

--- trunk/LayoutTests/TestExpectations	2017-02-06 23:47:26 UTC (rev 211754)
+++ trunk/LayoutTests/TestExpectations	2017-02-06 23:47:51 UTC (rev 211755)
@@ -1045,7 +1045,6 @@
 webkit.org/b/81826 fast/table/double-height-table-no-tbody.html [ Skip ]
 webkit.org/b/56140 fast/text/large-text-composed-char-dos.html [ Skip ]
 webkit.org/b/63268 http/tests/multipart/win-boundary-crash.html [ Skip ]
-webkit.org/b/167792 http/tests/preload/dynamic_removing_preload.html [ Skip ]
 webkit.org/b/35700 java/lc3/ArrayMethods/object-001.html [ Skip ]
 webkit.org/b/35700 java/lc3/forin/array-001.html [ Skip ]
 webkit.org/b/56080 jquery/effects.html [ Skip ]


Modified: trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt (211754 => 211755)

--- trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt	2017-02-06 23:47:26 UTC (rev 211754)
+++ trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt	2017-02-06 23:47:51 UTC (rev 211755)
@@ -1,4 +1,4 @@
-PASS internals.isPreloaded('../resources/dummy.js'); is false
+PASS downloadedScript is false
 PASS successfullyParsed is true
 
 TEST COMPLETE


Modified: trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html (211754 => 211755)

--- trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html	2017-02-06 23:47:26 UTC (rev 211754)
+++ trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html	2017-02-06 23:47:51 UTC (rev 211755)
@@ -1,6 +1,10 @@
 
 
 
+
+if (window.internals)
+window.internals.settings.setResourceTimingEnabled(true);
+
 <span class="cx"> <body>
</span><span class="cx"> <script>
</span><span class="lines">@@ -7,12 +11,18 @@
</span><span class="cx"> var link = document.createElement("link");
</span><span class="cx"> link.as = "script";
</span><span class="cx"> link.rel = "preload";
</span><del>-link.href = ""
</del><ins>+link.href = ""
</ins><span class="cx"> document.body.appendChild(link);
</span><span class="cx"> document.body.removeChild(link);
</span><ins>+var downloadedScript = false;
</ins><span class="cx"> window.addEventLi

[webkit-changes] [211673] trunk/Source/WebCore

2017-02-04 Thread yoav
Title: [211673] trunk/Source/WebCore








Revision 211673
Author y...@yoav.ws
Date 2017-02-04 13:40:33 -0800 (Sat, 04 Feb 2017)


Log Message
Fix memory issues related to preload eviction.
https://bugs.webkit.org/show_bug.cgi?id=167838

Reviewed by Andreas Kling.

This avoids removing resources from m_preloads during the iteration
by creating a second HashSetList containing the remaining link preloads.

No new tests but this will fix crashes on the leak bots.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::clearPreloads):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (211672 => 211673)

--- trunk/Source/WebCore/ChangeLog	2017-02-04 19:34:14 UTC (rev 211672)
+++ trunk/Source/WebCore/ChangeLog	2017-02-04 21:40:33 UTC (rev 211673)
@@ -1,3 +1,18 @@
+2017-02-04  Yoav Weiss  <y...@yoav.ws>
+
+Fix memory issues related to preload eviction.
+https://bugs.webkit.org/show_bug.cgi?id=167838
+
+Reviewed by Andreas Kling.
+
+This avoids removing resources from m_preloads during the iteration
+by creating a second HashSetList containing the remaining link preloads.
+
+No new tests but this will fix crashes on the leak bots.
+
+* loader/cache/CachedResourceLoader.cpp:
+(WebCore::CachedResourceLoader::clearPreloads):
+
 2017-02-04  Zalan Bujtas  <za...@apple.com>
 
 Simple line layout: Skip 16bit specific checks on 8bit content.


Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (211672 => 211673)

--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-02-04 19:34:14 UTC (rev 211672)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2017-02-04 21:40:33 UTC (rev 211673)
@@ -1254,17 +1254,21 @@
 if (!m_preloads)
 return;
 
+std::unique_ptr<ListHashSet<CachedResource*>> remainingLinkPreloads;
 for (auto* resource : *m_preloads) {
-if (mode == ClearPreloadsMode::ClearSpeculativePreloads && resource->isLinkPreload())
+ASSERT(resource);
+if (mode == ClearPreloadsMode::ClearSpeculativePreloads && resource->isLinkPreload()) {
+if (!remainingLinkPreloads)
+remainingLinkPreloads = std::make_unique<ListHashSet<CachedResource*>>();
+remainingLinkPreloads->add(resource);
 continue;
+}
 resource->decreasePreloadCount();
 bool deleted = resource->deleteIfPossible();
 if (!deleted && resource->preloadResult() == CachedResource::PreloadNotReferenced)
 MemoryCache::singleton().remove(*resource);
-m_preloads->remove(resource);
 }
-if (!m_preloads->size())
-m_preloads = nullptr;
+m_preloads = WTFMove(remainingLinkPreloads);
 }
 
 #if PRELOAD_DEBUG






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [211649] trunk

2017-02-03 Thread yoav
Title: [211649] trunk








Revision 211649
Author y...@yoav.ws
Date 2017-02-03 13:52:50 -0800 (Fri, 03 Feb 2017)


Log Message
Avoid evicting link preload resources when parsing is done.
https://bugs.webkit.org/show_bug.cgi?id=167415

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently all preloads (speculative and link preload) are being cleared when the document has finished parsing.
When it comes to link preloads, it can result in resources being cleared before the page had a chance to use them. (e.g. resources
that are preloaded in order to be loaded through script after DOMContentLoaded)

This patch fixes that by marking link preload resources as such, so that they can be handled separately inside clearPreloads().
As this fix also exposed an issue with load cancelation with invalid hrefs (which tests were passing before due to the preloads
being cleared), said issue is also fixed by clearing previousely preloaded resources if an invalid link preload is later detected.

Test: http/tests/preload/not_evicting_preload_at_onload.html

* dom/Document.cpp:
(WebCore::Document::finishedParsing): Only clear speculative preloads when parsing is finished.
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded): Set request flag indicating link preload.
(WebCore::LinkLoader::loadLink): Clear previousely preloaded resource to cancel their load.
* loader/LinkPreloadResourceClients.h:
(WebCore::LinkPreloadResourceClient::clearResource): Call cancelLoad() when the client is cleared.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::isLinkPreload):
(WebCore::CachedResource::setLinkPreload):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Initialize m_isLinkPreload with the request's value.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::~CachedResourceLoader):
(WebCore::CachedResourceLoader::requestResource): Mirror the request link preload flag to the resource if it's fetched from cache.
(WebCore::CachedResourceLoader::clearPreloads): Add a "speculative only" mode, which doesn't clear link preloads.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::isLinkPreload):
(WebCore::CachedResourceRequest::setIsLinkPreload):

LayoutTests:

* http/tests/preload/dynamic_remove_preload_href.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
* http/tests/preload/not_delaying_window_onload_before_discovery.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
* http/tests/preload/not_evicting_preload_at_onload-expected.txt: Added.
* http/tests/preload/not_evicting_preload_at_onload.html: Added.
* platform/mac/TestExpectations: Skipping http/tests/preload/dynamic_removing_preload.html due to https://bugs.webkit.org/show_bug.cgi?id=167792

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html
trunk/LayoutTests/http/tests/preload/not_delaying_window_onload_before_discovery.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
trunk/Source/WebCore/loader/cache/CachedResourceRequest.h


Added Paths

trunk/LayoutTests/http/tests/preload/not_evicting_preload_at_onload-expected.txt
trunk/LayoutTests/http/tests/preload/not_evicting_preload_at_onload.html




Diff

Modified: trunk/LayoutTests/ChangeLog (211648 => 211649)

--- trunk/LayoutTests/ChangeLog	2017-02-03 21:48:23 UTC (rev 211648)
+++ trunk/LayoutTests/ChangeLog	2017-02-03 21:52:50 UTC (rev 211649)
@@ -1,3 +1,16 @@
+2017-02-03  Yoav Weiss  <y...@yoav.ws>
+
+Avoid evicting link preload resources when parsing is done.
+https://bugs.webkit.org/show_bug.cgi?id=167415
+
+Reviewed by Ryosuke Niwa.
+
+* http/tests/preload/dynamic_remove_preload_href.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
+* http/tests/preload/not_delaying_window_onload_before_discovery.html: Test passed before for the wrong reasons. Cache-busting in order for it to genuinely pass.
+* http/tests/preload/not_evicting_preload_at_onload-expected.txt: Added.
+* http/tests/preload/not_evicting_preload_at_onload.html: Added.
+* platform/mac/TestExpectations: Skipping http/tests/preload/dynamic_removing_preload.html due to https://bugs.webkit.org/show_bug.cgi?id=167792
+
 2017-02-03  Zalan Bujtas  <za...@apple.com&g

[webkit-changes] [211352] trunk/LayoutTests

2017-01-29 Thread yoav
Title: [211352] trunk/LayoutTests








Revision 211352
Author y...@yoav.ws
Date 2017-01-29 07:13:44 -0800 (Sun, 29 Jan 2017)


Log Message
Add invalid value tests to Link header handling.
https://bugs.webkit.org/show_bug.cgi?id=167366

Reviewed by Alex Christensen.

* http/tests/preload/download_resources_from_invalid_headers-expected.txt:
* http/tests/preload/resources/download_resources_from_header.php:
* http/tests/preload/resources/invalid_resources_from_header.php:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt
trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php
trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php




Diff

Modified: trunk/LayoutTests/ChangeLog (211351 => 211352)

--- trunk/LayoutTests/ChangeLog	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/ChangeLog	2017-01-29 15:13:44 UTC (rev 211352)
@@ -1,3 +1,14 @@
+2017-01-29  Yoav Weiss  <y...@yoav.ws>
+
+Add invalid value tests to Link header handling.
+https://bugs.webkit.org/show_bug.cgi?id=167366
+
+Reviewed by Alex Christensen.
+
+* http/tests/preload/download_resources_from_invalid_headers-expected.txt:
+* http/tests/preload/resources/download_resources_from_header.php:
+* http/tests/preload/resources/invalid_resources_from_header.php:
+
 2017-01-29  Gyuyoung Kim  <gyuyoung@webkit.org>
 
 [EFL] Gardening on 29th Jan.


Modified: trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt (211351 => 211352)

--- trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt	2017-01-29 15:13:44 UTC (rev 211352)
@@ -1,4 +1,5 @@
 CONSOLE MESSAGE: Refused to load http://localhost:8000/preload/resources/square.png because it does not appear in the img-src directive of the Content Security Policy.
+CONSOLE MESSAGE:  must have a valid `as` value
 
 
 
@@ -19,6 +20,7 @@
 PASS internals.isPreloaded('http://localhost:53/preload/resources/dummy.js'); is true
 PASS internals.isPreloaded('#foobar'); is false
 PASS internals.isPreloaded('../resources/Ahem.ttf'); is false
+PASS internals.isPreloaded('../resources/dummy.js?invalid'); is false
 PASS successfullyParsed is true
 
 TEST COMPLETE


Modified: trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php (211351 => 211352)

--- trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php	2017-01-29 15:13:44 UTC (rev 211352)
@@ -1,6 +1,6 @@
  header("Link: <../resources/dummy.js>; rel=preload; as=script", false);
-header("Link:<../resources/dummy.css>; rel=preload; as=style", false);
+header("LiNk:<../resources/dummy.css>; rel=preload; as=style", false);
 header("Link: <../resources/square.png>;rel=preload;as=image", false);
 header("Link: <../resources/Ahem.ttf>; rel=preload; as=font; crossorigin", false);
 header("Link: <../resources/test.mp4>; rel=preload; as=media", false);


Modified: trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php (211351 => 211352)

--- trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php	2017-01-29 14:30:46 UTC (rev 211351)
+++ trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php	2017-01-29 15:13:44 UTC (rev 211352)
@@ -18,6 +18,9 @@
 header("Link: ; rel=preload; as=style", false);
 header("Link <../resources/Ahem.ttf>; rel=preload; as=font; crossorigin", false);
 header("Link: <   ../resources/dummy.js?foobar >; rel=preload; as='", false);
+header("Link: <<../resources/dummy.js?invalid>>; rel=preload; as=script", false);
+header("Link: <../resources/dummy.js?invalid>>; rel=preload; as=script", false);
+header("Link: <<../resources/dummy.js?invalid>; rel=preload; as=script", false);
 ?>
 
 <span class="lines">@@ -39,4 +42,5 @@
</span><span class="cx"> shouldBeTrue("internals.isPreloaded('http://localhost:53/preload/resources/dummy.js');");
</span><span class="cx"> shouldBeFalse("internals.isPreloaded('#foobar');");
</span><span class="cx"> shouldBeFalse("internals.isPreloaded('../resources/Ahem.ttf');");
</span><ins>+shouldBeFalse("internals.isPreloaded('../resources/dummy.js?invalid');");
</ins><span class="cx"> 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [211341] trunk

2017-01-28 Thread yoav
/WebPreferenceKeysPrivate.h
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
trunk/Source/WebKit/mac/WebView/WebView.mm
trunk/Source/WebKit/win/ChangeLog
trunk/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h
trunk/Source/WebKit/win/WebPreferences.cpp
trunk/Source/WebKit/win/WebPreferences.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
trunk/Tools/ChangeLog
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
trunk/Websites/webkit.org/ChangeLog
trunk/Websites/webkit.org/experimental-features.html




Diff

Modified: trunk/LayoutTests/ChangeLog (211340 => 211341)

--- trunk/LayoutTests/ChangeLog	2017-01-28 22:35:17 UTC (rev 211340)
+++ trunk/LayoutTests/ChangeLog	2017-01-28 22:53:54 UTC (rev 211341)
@@ -1,3 +1,35 @@
+2017-01-28  Yoav Weiss  <y...@yoav.ws>
+
+Add Link Preload as an off-by-default experimental feature menu item.
+https://bugs.webkit.org/show_bug.cgi?id=167201
+
+Reviewed by Ryosuke Niwa.
+
+Removed code explicitly enabling Link preload from the tests, as it is now
+turned on by default for testing. Corrected expectation files accordingly.
+
+* http/tests/fetch/redirectmode-and-preload.html:
+* http/tests/preload/delaying_onload_link_preload_after_discovery.html:
+* http/tests/preload/delaying_onload_link_preload_after_discovery_image.html:
+* http/tests/preload/download_resources-expected.txt:
+* http/tests/preload/download_resources.html:
+* http/tests/preload/download_resources_from_header_iframe.html:
+* http/tests/preload/download_resources_from_invalid_headers.html:
+* http/tests/preload/dynamic_adding_preload.html:
+* http/tests/preload/dynamic_remove_preload_href-expected.txt:
+* http/tests/preload/dynamic_remove_preload_href.html:
+* http/tests/preload/not_delaying_window_onload_before_discovery.html:
+* http/tests/preload/onerror_event-expected.txt:
+* http/tests/preload/onerror_event.html:
+* http/tests/preload/onload_event-expected.txt:
+* http/tests/preload/onload_event.html:
+* http/tests/preload/resources/download_resources_from_header.php:
+* http/tests/preload/resources/invalid_resources_from_header.php:
+* http/tests/preload/single_download_preload-expected.txt:
+* http/tests/preload/single_download_preload.html:
+* http/tests/security/cached-cross-origin-preloaded-css-stylesheet.html:
+* http/tests/security/cached-cross-origin-preloading-css-stylesheet.html:
+
 2017-01-28  Antoine Quint  <grao...@apple.com>
 
 [Modern Media Controls] REGRESSION: Video stops playing after going into Full Screen in media documents


Modified: trunk/LayoutTests/http/tests/fetch/redirectmode-and-preload.html (211340 => 211341)

--- trunk/LayoutTests/http/tests/fetch/redirectmode-and-preload.html	2017-01-28 22:35:17 UTC (rev 211340)
+++ trunk/LayoutTests/http/tests/fetch/redirectmode-and-preload.html	2017-01-28 22:53:54 UTC (rev 211341)
@@ -8,10 +8,6 @@
  <span class="cx"> <script src=""
</span><del>-<script>
-if (window.internals)
-internals.settings.setLinkPreloadEnabled(true);
-

   


Modified: trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery.html (211340 => 211341)

--- trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery.html	2017-01-28 22:35:17 UTC (rev 211340)
+++ trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery.html	2017-01-28 22:53:54 UTC (rev 211341)
@@ -1,7 +1,5 @@
 
 
</span><del>-if (window.internals)
-window.internals.settings.setLinkPreloadEnabled(true);
</del><span class="cx"> if (window.testRunner) {
</span><span class="cx"> testRunner.dumpAsText()
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="lines">@@ -14,8 +12,6 @@
</span><span class="cx"> <script>
</span><span class="cx"> window.addEventListener("load", function() {
</span><span class="cx"> shouldBeTrue("finishedScript");
</span><del>-if (window.internals)
-window.internals.settings.setLinkPreloadEnabled(false);
</del><span class="cx"> setTimeout(function() { testRunner.notifyDone(); }, 0);
</span><span cla

[webkit-changes] [211169] trunk/LayoutTests

2017-01-25 Thread yoav
Title: [211169] trunk/LayoutTests








Revision 211169
Author y...@yoav.ws
Date 2017-01-25 14:51:54 -0800 (Wed, 25 Jan 2017)


Log Message
REGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner.html timing out
https://bugs.webkit.org/show_bug.cgi?id=159678

Move the single_download_preload test to be in a single document rather than a frame, as the frame based version was timing out.
I suspect that recent changes to handling of feature flags resulted in feature flags turned off for frames, which caused this test
to fail. As the frame doesn't seem required in this case, we can fold the entire test to a single document.
On top of that, I added per resource verification for the number of requests, which makes the test clearer, and avoided verifying
result for resource types that are currently failing/flaky.

Reviewed by Alex Christensen

* TestExpectations: Removed the timeout expectation for the test.
* http/tests/preload/single_download_preload-expected.txt: Renamed from LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt.
* http/tests/preload/single_download_preload.html: Renamed from LayoutTests/http/tests/preload/resources/single_download_preload.html as well as fixed.
* http/tests/preload/single_download_preload_runner.html: Removed.
* http/tests/resources/dummy.xml: Added.
* http/tests/resources/test.oga: Added.
* platform/mac/TestExpectations: Removed the timeout expectation for the test.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations


Added Paths

trunk/LayoutTests/http/tests/preload/single_download_preload-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload.html
trunk/LayoutTests/http/tests/resources/dummy.xml
trunk/LayoutTests/http/tests/resources/test.oga


Removed Paths

trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html
trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload_runner.html




Diff

Modified: trunk/LayoutTests/ChangeLog (211168 => 211169)

--- trunk/LayoutTests/ChangeLog	2017-01-25 22:44:15 UTC (rev 211168)
+++ trunk/LayoutTests/ChangeLog	2017-01-25 22:51:54 UTC (rev 211169)
@@ -1,3 +1,24 @@
+2017-01-25  Yoav Weiss  <y...@yoav.ws>
+
+REGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner.html timing out
+https://bugs.webkit.org/show_bug.cgi?id=159678
+
+Move the single_download_preload test to be in a single document rather than a frame, as the frame based version was timing out.
+I suspect that recent changes to handling of feature flags resulted in feature flags turned off for frames, which caused this test
+to fail. As the frame doesn't seem required in this case, we can fold the entire test to a single document.
+On top of that, I added per resource verification for the number of requests, which makes the test clearer, and avoided verifying
+result for resource types that are currently failing/flaky.
+
+Reviewed by Alex Christensen
+
+* TestExpectations: Removed the timeout expectation for the test.
+* http/tests/preload/single_download_preload-expected.txt: Renamed from LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt.
+* http/tests/preload/single_download_preload.html: Renamed from LayoutTests/http/tests/preload/resources/single_download_preload.html as well as fixed.
+* http/tests/preload/single_download_preload_runner.html: Removed.
+* http/tests/resources/dummy.xml: Added.
+* http/tests/resources/test.oga: Added.
+* platform/mac/TestExpectations: Removed the timeout expectation for the test.
+
 2017-01-25  Ryan Haddad  <ryanhad...@apple.com>
 
 Fix a typo in TestExpectations.


Modified: trunk/LayoutTests/TestExpectations (211168 => 211169)

--- trunk/LayoutTests/TestExpectations	2017-01-25 22:44:15 UTC (rev 211168)
+++ trunk/LayoutTests/TestExpectations	2017-01-25 22:51:54 UTC (rev 211169)
@@ -909,8 +909,6 @@
 
 webkit.org/b/159370 [ Debug ] fast/history/page-cache-destroy-document.html [ Skip ]
 
-webkit.org/b/159678 http/tests/preload/single_download_preload_runner.html [ Timeout ]
-
 # This test is way too slow for debug.
 [ Debug ] workers/bomb.html [ Skip ]
 # This test is just way too slow.


Deleted: trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html (211168 => 211169)

--- trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html	2017-01-25 22:44:15 UTC (rev 211168)
+++ trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html	2017-01-25 22:51:54 UTC (rev 211169)
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-#background {
-width: 200px;
-height: 200px;
-background-image: url(../../resources/square100.png?background);
-

[webkit-changes] [210914] trunk

2017-01-18 Thread yoav
Title: [210914] trunk








Revision 210914
Author y...@yoav.ws
Date 2017-01-18 23:13:54 -0800 (Wed, 18 Jan 2017)


Log Message
Add Link header support for preload.
https://bugs.webkit.org/show_bug.cgi?id=165521

Reviewed by Alex Christensen.

Source/WebCore:

This patch adds Link header support for preload, by adding a Link
header parser, and calling it from FrameLoader::receivedFirstData.

Test: http/tests/preload/download_resources_from_header.php

* CMakeLists.txt: Add LinkHeader files.
* WebCore.xcodeproj/project.pbxproj: Add LinkHeader files.
* loader/FrameLoader.cpp:
(WebCore::receivedFirstData): Trigger Link based preloading by calling loadLinksFromHeader.
* loader/LinkHeader.cpp: Added.
(WebCore::isWhitespace):
(WebCore::isValidURLChar):
(WebCore::isValidParameterNameChar):
(WebCore::isValidParameterValueEnd):
(WebCore::isValidParameterValueChar):
(WebCore::isExtensionParameter):
(WebCore::parseURL):
(WebCore::invalidParameterDelimiter):
(WebCore::validFieldEnd):
(WebCore::parseParameterDelimiter):
(WebCore::paramterNameFromString):
(WebCore::parseParameterName):
(WebCore::skipQuotesIfNeeded):
(WebCore::parseParameterValue):
(WebCore::LinkHeader::setValue):
(WebCore::findNextHeader):
(WebCore::LinkHeader::LinkHeader):
(WebCore::LinkHeaderSet::LinkHeaderSet):
(WebCore::LinkHeaderSet::init):
* loader/LinkHeader.h: Added.
(WebCore::LinkHeader::url):
(WebCore::LinkHeader::rel):
(WebCore::LinkHeader::as):
(WebCore::LinkHeader::mimeType):
(WebCore::LinkHeader::media):
(WebCore::LinkHeader::crossOrigin):
(WebCore::LinkHeader::valid):
(WebCore::LinkHeaderSet::begin):
(WebCore::LinkHeaderSet::end):
(WebCore::LinkHeaderSet::operator[]):
(WebCore::LinkHeaderSet::size):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Loads link preload directives that arrive from Link headers.
(WebCore::LinkLoader::preloadIfNeeded): Add return value.
* loader/LinkLoader.h:
* platform/network/HTTPHeaderNames.in: Add "Link" as a header name.

LayoutTests:

* http/tests/preload/download_resources_from_header_iframe-expected.txt: Added
* http/tests/preload/download_resources_from_header_iframe.html: Added
* http/tests/preload/download_resources_from_invalid_headers-expected: Added
* http/tests/preload/download_resources_from_invalid_headers.html: Added
* http/tests/preload/resources/download_resources_from_header.php: Added.
* http/tests/preload/resources/invalid_resources_from_header.php: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/loader/FrameLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h
trunk/Source/WebCore/platform/network/HTTPHeaderNames.in


Added Paths

trunk/LayoutTests/http/tests/preload/download_resources_from_header_iframe-expected.txt
trunk/LayoutTests/http/tests/preload/download_resources_from_header_iframe.html
trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers-expected.txt
trunk/LayoutTests/http/tests/preload/download_resources_from_invalid_headers.html
trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php
trunk/LayoutTests/http/tests/preload/resources/invalid_resources_from_header.php
trunk/Source/WebCore/loader/LinkHeader.cpp
trunk/Source/WebCore/loader/LinkHeader.h




Diff

Modified: trunk/LayoutTests/ChangeLog (210913 => 210914)

--- trunk/LayoutTests/ChangeLog	2017-01-19 05:26:49 UTC (rev 210913)
+++ trunk/LayoutTests/ChangeLog	2017-01-19 07:13:54 UTC (rev 210914)
@@ -1,3 +1,17 @@
+2017-01-18  Yoav Weiss  <y...@yoav.ws>
+
+Add Link header support for preload.
+https://bugs.webkit.org/show_bug.cgi?id=165521
+
+Reviewed by Alex Christensen.
+
+* http/tests/preload/download_resources_from_header_iframe-expected.txt: Added
+* http/tests/preload/download_resources_from_header_iframe.html: Added
+* http/tests/preload/download_resources_from_invalid_headers-expected: Added
+* http/tests/preload/download_resources_from_invalid_headers.html: Added
+* http/tests/preload/resources/download_resources_from_header.php: Added.
+* http/tests/preload/resources/invalid_resources_from_header.php: Added.
+
 2017-01-18  Joseph Pecoraro  <pecor...@apple.com>
 
 Web Inspector: console.table only works for the first 5 properties


Added: trunk/LayoutTests/http/tests/preload/download_resources_from_header_iframe-expected.txt (0 => 210914)

--- trunk/LayoutTests/http/tests/preload/download_resources_from_header_iframe-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/download_resources_from_header_iframe-expected.txt	2017-01-19 07:13:54 UTC (rev 210914)
@@ -0,0 +1,18 @@
+CONSOLE MESSAGE:  must have a valid `as` value
+
+
+
+Frame: '-->'
+
+PASS internals.isPreloaded('../resources/dummy.js'); is t

[webkit-changes] [210881] trunk/LayoutTests

2017-01-18 Thread yoav
Title: [210881] trunk/LayoutTests








Revision 210881
Author y...@yoav.ws
Date 2017-01-18 13:26:07 -0800 (Wed, 18 Jan 2017)


Log Message
REGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner.html timing out
https://bugs.webkit.org/show_bug.cgi?id=159678

Move the single_download_preload test to be in a single document rather than a frame, as the frame based version was timing out.
I suspect that recent changes to handling of feature flags resulted in feature flags turned off for frames, which caused this test
to fail. As the frame doesn't seem required in this case, we can fold the entire test to a single document.
On top of that, I added per resource verification for the number of requests, which makes the test clearer.

Reviewed by Alex Christensen.

* TestExpectations: Removed the timeout expectation for the test.
* http/tests/preload/single_download_preload-expected.txt: Renamed from LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt.
* http/tests/preload/single_download_preload.html: Renamed from LayoutTests/http/tests/preload/resources/single_download_preload.html as well as fixed.
* http/tests/preload/single_download_preload_runner.html: Removed.
* http/tests/resources/dummy.xml: Added.
* http/tests/resources/test.oga: Added.
* platform/mac/TestExpectations: Removed the timeout expectation for the test.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations


Added Paths

trunk/LayoutTests/http/tests/preload/single_download_preload-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload.html
trunk/LayoutTests/http/tests/resources/dummy.xml
trunk/LayoutTests/http/tests/resources/test.oga


Removed Paths

trunk/LayoutTests/http/tests/preload/resources/
trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload_runner.html




Diff

Modified: trunk/LayoutTests/ChangeLog (210880 => 210881)

--- trunk/LayoutTests/ChangeLog	2017-01-18 21:22:39 UTC (rev 210880)
+++ trunk/LayoutTests/ChangeLog	2017-01-18 21:26:07 UTC (rev 210881)
@@ -1,3 +1,23 @@
+2017-01-18  Yoav Weiss  <y...@yoav.ws>
+
+REGRESSION(r203110): LayoutTest http/tests/preload/single_download_preload_runner.html timing out
+https://bugs.webkit.org/show_bug.cgi?id=159678
+
+Move the single_download_preload test to be in a single document rather than a frame, as the frame based version was timing out.
+I suspect that recent changes to handling of feature flags resulted in feature flags turned off for frames, which caused this test
+to fail. As the frame doesn't seem required in this case, we can fold the entire test to a single document.
+On top of that, I added per resource verification for the number of requests, which makes the test clearer.
+
+Reviewed by Alex Christensen.
+
+* TestExpectations: Removed the timeout expectation for the test.
+* http/tests/preload/single_download_preload-expected.txt: Renamed from LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt.
+* http/tests/preload/single_download_preload.html: Renamed from LayoutTests/http/tests/preload/resources/single_download_preload.html as well as fixed.
+* http/tests/preload/single_download_preload_runner.html: Removed.
+* http/tests/resources/dummy.xml: Added.
+* http/tests/resources/test.oga: Added.
+* platform/mac/TestExpectations: Removed the timeout expectation for the test.
+
 2017-01-18  Andy Estes  <aes...@apple.com>
 
 [QuickLook] Support password-protected documents


Modified: trunk/LayoutTests/TestExpectations (210880 => 210881)

--- trunk/LayoutTests/TestExpectations	2017-01-18 21:22:39 UTC (rev 210880)
+++ trunk/LayoutTests/TestExpectations	2017-01-18 21:26:07 UTC (rev 210881)
@@ -908,8 +908,6 @@
 
 webkit.org/b/159370 [ Debug ] fast/history/page-cache-destroy-document.html [ Skip ]
 
-webkit.org/b/159678 http/tests/preload/single_download_preload_runner.html [ Timeout ]
-
 # This test is way too slow for debug.
 [ Debug ] workers/bomb.html [ Skip ]
 # This test is just way too slow.


Copied: trunk/LayoutTests/http/tests/preload/single_download_preload-expected.txt (from rev 210880, trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt) (0 => 210881)

--- trunk/LayoutTests/http/tests/preload/single_download_preload-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/single_download_preload-expected.txt	2017-01-18 21:26:07 UTC (rev 210881)
@@ -0,0 +1,5 @@
+CONSOLE MESSAGE: line 21:  must have a valid `as` value
+ 
+
+PASS Makes sure that preloaded resources are not downloaded again when used 
+


Added: trunk/LayoutTests/http/tests/preload/single_download_preload.html (0 => 210881)

--- trunk/Layout

[webkit-changes] [205269] trunk

2016-08-31 Thread yoav
.

Source/WebKit2:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::maximumBufferingTime): Removed LinkPreload.

LayoutTests:

Add tests that make sure that event handling with regarding to link preload
is working as it should.

* http/tests/misc/script_onload_delays_window_onload-expected.txt: Added.
* http/tests/misc/script_onload_delays_window_onload.html: Added.
* http/tests/preload/delaying_onload_link_preload_after_discovery-expected.txt: Added.
* http/tests/preload/delaying_onload_link_preload_after_discovery.html: Added.
* http/tests/preload/delaying_onload_link_preload_after_discovery_image-expected.txt: Added.
* http/tests/preload/delaying_onload_link_preload_after_discovery_image.html: Added.
* http/tests/preload/dynamic_remove_preload_href-expected.txt:
* http/tests/preload/dynamic_remove_preload_href.html:
* http/tests/preload/not_delaying_window_onload_before_discovery-expected.txt: Added.
* http/tests/preload/not_delaying_window_onload_before_discovery.html: Added.
* http/tests/preload/onerror_event-expected.txt: Added.
* http/tests/preload/onerror_event.html: Added.
* http/tests/preload/onload_event-expected.txt: Added.
* http/tests/preload/onload_event.html: Added.
* http/tests/preload/resources/single_download_preload.html:
* http/tests/resources/dummy.css: Added.
* http/tests/resources/dummy.js: Added.
* http/tests/resources/dummy.xml: Added.
* http/tests/resources/slow-image.php: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html
trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/html/HTMLLinkElement.cpp
trunk/Source/WebCore/html/HTMLLinkElement.h
trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h
trunk/Source/WebCore/loader/ResourceLoadInfo.cpp
trunk/Source/WebCore/loader/SubresourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
trunk/Source/WebCore/platform/network/ResourceRequestBase.h
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp


Added Paths

trunk/LayoutTests/http/tests/misc/script_onload_delays_window_onload-expected.txt
trunk/LayoutTests/http/tests/misc/script_onload_delays_window_onload.html
trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery-expected.txt
trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery.html
trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery_image-expected.txt
trunk/LayoutTests/http/tests/preload/delaying_onload_link_preload_after_discovery_image.html
trunk/LayoutTests/http/tests/preload/not_delaying_window_onload_before_discovery-expected.txt
trunk/LayoutTests/http/tests/preload/not_delaying_window_onload_before_discovery.html
trunk/LayoutTests/http/tests/preload/onerror_event-expected.txt
trunk/LayoutTests/http/tests/preload/onerror_event.html
trunk/LayoutTests/http/tests/preload/onload_event-expected.txt
trunk/LayoutTests/http/tests/preload/onload_event.html
trunk/LayoutTests/http/tests/resources/dummy.css
trunk/LayoutTests/http/tests/resources/dummy.js
trunk/LayoutTests/http/tests/resources/slow-image.php
trunk/Source/WebCore/loader/LinkPreloadResourceClients.cpp
trunk/Source/WebCore/loader/LinkPreloadResourceClients.h




Diff

Modified: trunk/LayoutTests/ChangeLog (205268 => 205269)

--- trunk/LayoutTests/ChangeLog	2016-08-31 22:16:23 UTC (rev 205268)
+++ trunk/LayoutTests/ChangeLog	2016-08-31 22:41:44 UTC (rev 205269)
@@ -1,3 +1,33 @@
+2016-08-31  Yoav Weiss  <y...@yoav.ws>
+
+Add event support for link preload.
+https://bugs.webkit.org/show_bug.cgi?id=158466
+
+Reviewed by Alex Christensen.
+
+Add tests that make sure that event handling with regarding to link preload
+is working as it should.
+
+* http/tests/misc/script_onload_delays_window_onload-expected.txt: Added.
+* http/tests/misc/script_onload_delays_window_onload.html: Added.
+* http/tests/preload/delaying_onload_link_preload_after_discovery-expected.txt: Added.
+* http/tests/preload/delaying_onload_link_preload_after_discovery.html: Added.
+* http/tests/preload/delaying_onload_link_preload_after_discovery_image-expected.txt: Added.
+* http/tests/preload/delaying_onload_link_preload_after_discovery_image.html: Added.
+* http/tests/preload/dynamic_remove_preload_href-expected.txt:
+* http/tests/preload/dynamic_remove_preload_href.html:
+* http/test

[webkit-changes] [203349] trunk/Source/WebCore

2016-07-18 Thread yoav
Title: [203349] trunk/Source/WebCore








Revision 203349
Author y...@yoav.ws
Date 2016-07-18 10:43:26 -0700 (Mon, 18 Jul 2016)


Log Message
Add preload to features.json
https://bugs.webkit.org/show_bug.cgi?id=159872

Reviewed by Darin Adler.

No new tests but no functional change.

* features.json:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/features.json




Diff

Modified: trunk/Source/WebCore/ChangeLog (203348 => 203349)

--- trunk/Source/WebCore/ChangeLog	2016-07-18 16:17:52 UTC (rev 203348)
+++ trunk/Source/WebCore/ChangeLog	2016-07-18 17:43:26 UTC (rev 203349)
@@ -1,3 +1,14 @@
+2016-07-18  Yoav Weiss  <y...@yoav.ws>
+
+Add preload to features.json
+https://bugs.webkit.org/show_bug.cgi?id=159872
+
+Reviewed by Darin Adler.
+
+No new tests but no functional change.
+
+* features.json:
+
 2016-07-18  Youenn Fablet  <you...@apple.com>
 
 [Streams API] ReadableStream should throw a RangeError in case of NaN highWaterMark


Modified: trunk/Source/WebCore/features.json (203348 => 203349)

--- trunk/Source/WebCore/features.json	2016-07-18 16:17:52 UTC (rev 203348)
+++ trunk/Source/WebCore/features.json	2016-07-18 17:43:26 UTC (rev 203349)
@@ -196,6 +196,22 @@
 }
 },
 {
+"name": "Preload",
+"status": {
+"status": "In Development",
+"enabled-by-default": false
+},
+"url": "http://w3c.github.io/preload/",
+"webkit-url": "https://webkit.org/b/158720",
+"keywords": ["preload"],
+"description": "Provides a declarative fetch primitive that initiates an early fetch and separates fetching from resource execution.",
+"contact": {
+"name": "Yoav Weiss",
+"email": "y...@yoav.ws",
+"twitter": "@yoavweiss"
+}
+},
+{
 "name": "Resource Timing",
 "status": {
 "status": "In Development",
@@ -638,6 +654,22 @@
 "comment": "The feature is prefixed with -webkit-. There are some remaining issues to resolve in the specification."
 },
 {
+"name": "Preload",
+"status": {
+"status": "In Development",
+"enabled-by-default": false
+},
+"url": "http://w3c.github.io/preload/",
+"webkit-url": "https://bugs.webkit.org/show_bug.cgi?id=158720",
+"specification": "Preload",
+"description": "Provides a declarative fetch primitive that initiates an early fetch and separates fetching from resource execution.",
+"contact": {
+"name": "Yoav Weiss",
+"twitter": "@yoavweiss",
+"email": "y...@yoav.ws"
+}
+},
+{
 "name": "Readable Streams",
 "status": {
 "status": "In Development",






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [203269] trunk

2016-07-14 Thread yoav
Title: [203269] trunk








Revision 203269
Author y...@yoav.ws
Date 2016-07-14 22:49:36 -0700 (Thu, 14 Jul 2016)


Log Message
Change CSSParser::sourceSize returning Optional
https://bugs.webkit.org/show_bug.cgi?id=159666

Reviewed by Michael Catanzaro.

Source/WebCore:

Tests:
fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html

* css/CSSGrammar.y.in: Avoid adding SourceSize to source_size_list when the value is a Nullopt.
* css/CSSParser.cpp:
(WebCore::CSSParser::sourceSize): Return a Nullopt when an invalid value is encountered.
* css/CSSParser.h:

LayoutTests:

Added a test to make sure that an invalid source-size value is skipped, but the next one is properly picked.

* fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt:
* fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt
trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/CSSGrammar.y.in
trunk/Source/WebCore/css/CSSParser.cpp
trunk/Source/WebCore/css/CSSParser.h




Diff

Modified: trunk/LayoutTests/ChangeLog (203268 => 203269)

--- trunk/LayoutTests/ChangeLog	2016-07-15 04:59:08 UTC (rev 203268)
+++ trunk/LayoutTests/ChangeLog	2016-07-15 05:49:36 UTC (rev 203269)
@@ -1,3 +1,15 @@
+2016-07-14  Yoav Weiss  <y...@yoav.ws>
+
+Change CSSParser::sourceSize returning Optional
+https://bugs.webkit.org/show_bug.cgi?id=159666
+
+Reviewed by Michael Catanzaro.
+
+Added a test to make sure that an invalid source-size value is skipped, but the next one is properly picked.
+
+* fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt:
+* fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html:
+
 2016-07-14  Antonio Gomes  <toniki...@igalia.com>
 
 [RTL Scrollbars] Frame scrollbars don't move to the right when text direction changes to RTL


Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt (203268 => 203269)

--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt	2016-07-15 04:59:08 UTC (rev 203268)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids-expected.txt	2016-07-15 05:49:36 UTC (rev 203269)
@@ -16,7 +16,9 @@
 PASS currentSrcFileName(elementId) is "image-set-2x.png"
 PASS document.getElementById(elementId).clientWidth is 800
 PASS currentSrcFileName(elementId) is "image-set-2x.png"
+PASS document.getElementById(elementId).clientWidth is 1600
+PASS currentSrcFileName(elementId) is "image-set-4x.png"
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+ 


Modified: trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html (203268 => 203269)

--- trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html	2016-07-15 04:59:08 UTC (rev 203268)
+++ trunk/LayoutTests/fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html	2016-07-15 05:49:36 UTC (rev 203269)
@@ -12,6 +12,9 @@
 shouldBe('document.getElementById(elementId).clientWidth', '800');
 shouldBe('currentSrcFileName(elementId)', '"image-set-2x.png"');
 }
+elementId = "crash10";
+shouldBe('document.getElementById(elementId).clientWidth', '1600');
+shouldBe('currentSrcFileName(elementId)', '"image-set-4x.png"');
 }, false);
 
 
@@ -24,3 +27,4 @@
 
 
 
+


Modified: trunk/Source/WebCore/ChangeLog (203268 => 203269)

--- trunk/Source/WebCore/ChangeLog	2016-07-15 04:59:08 UTC (rev 203268)
+++ trunk/Source/WebCore/ChangeLog	2016-07-15 05:49:36 UTC (rev 203269)
@@ -1,3 +1,18 @@
+2016-07-14  Yoav Weiss  <y...@yoav.ws>
+
+Change CSSParser::sourceSize returning Optional
+https://bugs.webkit.org/show_bug.cgi?id=159666
+
+Reviewed by Michael Catanzaro.
+
+Tests:
+fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
+
+* css/CSSGrammar.y.in: Avoid adding SourceSize to source_size_list when the value is a Nullopt.
+* css/CSSParser.cpp:
+(WebCore::CSSParser::sourceSize): Return a Nullopt when an invalid value is encountered.
+* css/CSSParser.h:
+
 2016-07-14  Antonio Gomes  <toniki...@igalia.com>
 
 [RTL Scrollbars] Frame scrollbars don't move to the right when text direction changes to RTL


Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (203268 => 203269)

--- trunk/Source/WebCore/css/CSSGrammar.y.in	2016-07-15 04:59:08 UTC (rev 203268)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in	2016-07-15 05:49:36 UTC (rev 203269)
@@ -576,12 +576,14 @@
 source_size_list:
 maybe_source_media_query_expression source_size_length {
 $$ = new Vector;
-$$->append(parser->sourceSize(WTFMove(*$1), $2));
+   

[webkit-changes] [203110] trunk/Source/WebCore

2016-07-12 Thread yoav
Title: [203110] trunk/Source/WebCore








Revision 203110
Author y...@yoav.ws
Date 2016-07-12 02:04:49 -0700 (Tue, 12 Jul 2016)


Log Message
js/dom/global-constructors-attributes.html is flaky: ResourceTiming runtime feature leaks between tests
https://bugs.webkit.org/show_bug.cgi?id=158902

Reviewed by Benjamin Poulain.

Adds a new reset() mechanism to RuntimeEnabledFeatures so that they could be brought back to the initial state.
This reset() is then called from DumpRenderTree and WebKitTestRunner.

No new tests but hopefully current tests will be less flaky.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::reset):
* bindings/generic/RuntimeEnabledFeatures.h:
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState): reset RuntimeEnabledFeatures.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
trunk/Source/WebCore/testing/Internals.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (203109 => 203110)

--- trunk/Source/WebCore/ChangeLog	2016-07-12 06:24:30 UTC (rev 203109)
+++ trunk/Source/WebCore/ChangeLog	2016-07-12 09:04:49 UTC (rev 203110)
@@ -1,3 +1,22 @@
+2016-07-12  Yoav Weiss  <y...@yoav.ws>
+
+js/dom/global-constructors-attributes.html is flaky: ResourceTiming runtime feature leaks between tests
+https://bugs.webkit.org/show_bug.cgi?id=158902
+
+Reviewed by Benjamin Poulain.
+
+Adds a new reset() mechanism to RuntimeEnabledFeatures so that they could be brought back to the initial state.
+This reset() is then called from DumpRenderTree and WebKitTestRunner.
+
+No new tests but hopefully current tests will be less flaky.
+
+* bindings/generic/RuntimeEnabledFeatures.cpp:
+(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
+(WebCore::RuntimeEnabledFeatures::reset):
+* bindings/generic/RuntimeEnabledFeatures.h:
+* testing/Internals.cpp:
+(WebCore::Internals::resetToConsistentState): reset RuntimeEnabledFeatures.
+
 2016-07-11  Gyuyoung Kim  <gyuyoung@webkit.org>
 
 Purge PassRefPtr in platform/efl and platform/mac 


Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (203109 => 203110)

--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2016-07-12 06:24:30 UTC (rev 203109)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2016-07-12 09:04:49 UTC (rev 203110)
@@ -40,78 +40,84 @@
 namespace WebCore {
 
 RuntimeEnabledFeatures::RuntimeEnabledFeatures()
-: m_isLocalStorageEnabled(true)
-, m_isSessionStorageEnabled(true)
-, m_isWebkitNotificationsEnabled(false)
-, m_isApplicationCacheEnabled(true)
-, m_isDataTransferItemsEnabled(true)
-, m_isGeolocationEnabled(true)
-, m_isTouchEnabled(true)
-, m_isDeviceMotionEnabled(true)
-, m_isDeviceOrientationEnabled(true)
-, m_isLinkPreloadEnabled(false)
-, m_isLangAttributeAwareFormControlUIEnabled(false)
+{
+reset();
+}
+
+void RuntimeEnabledFeatures::reset()
+{
+m_isLocalStorageEnabled = true;
+m_isSessionStorageEnabled = true;
+m_isWebkitNotificationsEnabled = false;
+m_isApplicationCacheEnabled = true;
+m_isDataTransferItemsEnabled = true;
+m_isGeolocationEnabled = true;
+m_isTouchEnabled = true;
+m_isDeviceMotionEnabled = true;
+m_isDeviceOrientationEnabled = true;
+m_isLinkPreloadEnabled = false;
+m_isLangAttributeAwareFormControlUIEnabled = false;
 #if PLATFORM(IOS)
-, m_isPluginReplacementEnabled(true)
+m_isPluginReplacementEnabled = true;
 #else
-, m_isPluginReplacementEnabled(false)
+m_isPluginReplacementEnabled = false;
 #endif
-, m_isResourceTimingEnabled(false)
+m_isResourceTimingEnabled = false;
 #if ENABLE(INDEXED_DATABASE)
-, m_isIndexedDBEnabled(false)
+m_isIndexedDBEnabled = true;
 #endif
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
-, m_isIndexedDBWorkersEnabled(true)
+m_isIndexedDBWorkersEnabled = true;
 #endif
 #if ENABLE(MEDIA_STREAM) && PLATFORM(COCOA)
-, m_isMediaStreamEnabled(false)
+m_isMediaStreamEnabled = false;
 #endif
 #if ENABLE(WEB_RTC)
-, m_isPeerConnectionEnabled(true)
+m_isPeerConnectionEnabled = true;
 #endif
 #if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
-, m_isLegacyCSSVendorPrefixesEnabled(false)
+m_isLegacyCSSVendorPrefixesEnabled = false;
 #endif
 #if ENABLE(_javascript__I18N_API)
-, m_isJavaScriptI18NAPIEnabled(false)
+m_isJavaScriptI18NAPIEnabled = false;
 #endif
 #if ENABLE(INPUT_TYPE_DATE)
-, m_isInputTypeDateEnabled(true)
+m_isInputTypeDateEnabled = true;
 #endif
 #if ENABLE(INPUT_TYPE_DATETIME_INCOMPLETE)
-, m_isInputTypeDateTimeEnabled(false)
+m_isInputTypeDateTimeEnabled = false;
 #endif
 #if ENABL

[webkit-changes] [201447] trunk

2016-05-26 Thread yoav
Title: [201447] trunk








Revision 201447
Author y...@yoav.ws
Date 2016-05-26 22:43:52 -0700 (Thu, 26 May 2016)


Log Message
Preload single download tests.
https://bugs.webkit.org/show_bug.cgi?id=157988

Reviewed by Alex Christensen.

Source/WebCore:

ResourceTiming entries for some subresource weren't registered as resource->response().isHTTP() was false, since
resource->response().url() was empty. I switched the check to use resource->resourceRequest().url() directly instead.

Test: http/tests/preload/single_download_preload_runner.html

* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):

LayoutTests:

Make sure preload is only downloading a single resource, which is properly reused.

* http/tests/preload/resources/single_download_preload.html: Added.
* http/tests/preload/single_download_preload_runner-expected.txt: Added.
* http/tests/preload/single_download_preload_runner.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceTimingInformation.cpp


Added Paths

trunk/LayoutTests/http/tests/preload/resources/
trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html
trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt
trunk/LayoutTests/http/tests/preload/single_download_preload_runner.html




Diff

Modified: trunk/LayoutTests/ChangeLog (201446 => 201447)

--- trunk/LayoutTests/ChangeLog	2016-05-27 05:40:15 UTC (rev 201446)
+++ trunk/LayoutTests/ChangeLog	2016-05-27 05:43:52 UTC (rev 201447)
@@ -1,3 +1,16 @@
+2016-05-26  Yoav Weiss  <y...@yoav.ws>
+
+Preload single download tests.
+https://bugs.webkit.org/show_bug.cgi?id=157988
+
+Reviewed by Alex Christensen.
+
+Make sure preload is only downloading a single resource, which is properly reused.
+
+* http/tests/preload/resources/single_download_preload.html: Added.
+* http/tests/preload/single_download_preload_runner-expected.txt: Added.
+* http/tests/preload/single_download_preload_runner.html: Added.
+
 2016-05-26  Gyuyoung Kim  <gyuyoung@webkit.org>
 
 Unreviewed EFL gardening.


Added: trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html (0 => 201447)

--- trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/resources/single_download_preload.html	2016-05-27 05:43:52 UTC (rev 201447)
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+#background {
+width: 200px;
+height: 200px;
+background-image: url(../../resources/square100.png?background);
+}
+@font-face {
+  font-family:ahem;
+  src: url(../../w3c/webperf/resources/Ahem.ttf);
+}
+span { font-family: ahem, Arial; }
+
+
+
+
+
+var xhr = new XMLHttpRequest();
+xhr.open("GET", "../../resources/dummy.xml");
+xhr.send();
+
+window.addEventListener("load", function() {
+var entries = performance.getEntriesByType("resource");
+message = performance.getEntriesByType("resource").length;
+parent.postMessage(message, "*");
+});
+
+this text is here just so that the browser will download the font.


Added: trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt (0 => 201447)

--- trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/single_download_preload_runner-expected.txt	2016-05-27 05:43:52 UTC (rev 201447)
@@ -0,0 +1,5 @@
+CONSOLE MESSAGE: line 10:  must have a valid `as` value
+
+
+PASS Makes sure that preloaded resources are not downloaded again when used 
+


Added: trunk/LayoutTests/http/tests/preload/single_download_preload_runner.html (0 => 201447)

--- trunk/LayoutTests/http/tests/preload/single_download_preload_runner.html	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/single_download_preload_runner.html	2016-05-27 05:43:52 UTC (rev 201447)
@@ -0,0 +1,21 @@
+
+
+if (window.internals) {
+internals.setLinkPreloadSupport(true);
+internals.setResourceTimingSupport(true);
+}
+var t = async_test('Makes sure that preloaded resources are not downloaded again when used');
+
+window.addEventListener("message", t.step_func(function(event) {
+var data = ""
+assert_equals(data, 10, "The number of resource downloads");
+if (window.internals) {
+internals.setLinkPreloadSupport(false);
+internals.setResourceTimingSupport(false);
+}
+t.done();
+}));
+
+


Modified: trunk/Source/WebCore/ChangeLog (201446 => 201447)

--- trunk/Source/WebCore/ChangeLog	2016-05-27 05:40:15 UTC (rev 201446)
+++ trunk/Source/WebC

[webkit-changes] [201415] trunk

2016-05-25 Thread yoav
Title: [201415] trunk








Revision 201415
Author y...@yoav.ws
Date 2016-05-25 22:34:27 -0700 (Wed, 25 May 2016)


Log Message
Fix ResourceTiming multiple entries per resource and test initiator
https://bugs.webkit.org/show_bug.cgi?id=158094

Reviewed by Alex Christensen.

Make sure that CachedResource that was needed by two different elements only adds one entry, with the right (first) initiatorType.

Source/WebCore:

Tests: http/tests/performance/performance-resource-timing-initiator-css.html
   http/tests/performance/performance-resource-timing-initiator-no-override.html

* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming): Don't remove CachedResource when entry is added, but
mark it as added. Only add new entries for non-added resources.
(WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation): Initialize initiator info as NotYetAdded.
* loader/ResourceTimingInformation.h:

LayoutTests:

* http/tests/performance/performance-resource-timing-initiator-css.html: Added. Makes sure css has the right initiator type.
* http/tests/performance/performance-resource-timing-initiator-css-expected.txt: Added.
* http/tests/performance/performance-resource-timing-initiator-no-override.html: Added. Makes sure that only one entry is added and
that its initiator info doesn't get overriden.
* http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceTimingInformation.cpp
trunk/Source/WebCore/loader/ResourceTimingInformation.h


Added Paths

trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html
trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html




Diff

Modified: trunk/LayoutTests/ChangeLog (201414 => 201415)

--- trunk/LayoutTests/ChangeLog	2016-05-26 05:33:58 UTC (rev 201414)
+++ trunk/LayoutTests/ChangeLog	2016-05-26 05:34:27 UTC (rev 201415)
@@ -1,5 +1,20 @@
 2016-05-25  Yoav Weiss  <y...@yoav.ws>
 
+Fix ResourceTiming multiple entries per resource and test initiator
+https://bugs.webkit.org/show_bug.cgi?id=158094
+
+Reviewed by Alex Christensen.
+
+Make sure that CachedResource that was needed by two different elements only adds one entry, with the right (first) initiatorType.
+
+* http/tests/performance/performance-resource-timing-initiator-css.html: Added. Makes sure css has the right initiator type.
+* http/tests/performance/performance-resource-timing-initiator-css-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-initiator-no-override.html: Added. Makes sure that only one entry is added and
+that its initiator info doesn't get overriden.
+* http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt: Added.
+
+2016-05-25  Yoav Weiss  <y...@yoav.ws>
+
 Fix ResourceTiming XHR flakiness
 https://bugs.webkit.org/show_bug.cgi?id=158019
 


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt (0 => 201415)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt	2016-05-26 05:34:27 UTC (rev 201415)
@@ -0,0 +1,2 @@
+PASS initiator is "css"
+


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html (0 => 201415)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html	2016-05-26 05:34:27 UTC (rev 201415)
@@ -0,0 +1,36 @@
+
+
+
+if (window.internals)
+internals.setResourceTimingSupport(true);
+if (window.testRunner) {
+testRunner.dumpAsText()
+testRunner.waitUntilDone();
+}
+
+
+<style>
+body { background: url("../../resources/square100.png"); }
+</style>
+<script>
+var initiator;
+var runTest = function() {
+var resources = performance.getEntriesByType('resource');
+for (var i = 0; i < resources.length; ++i) {
+if (resources[i].name.indexOf("square") != -1) {
+initiator = resources[i].initiatorType;
+shouldBeEqualToString("initiator", "css");
+}
+};
+if (window.internals)
+window.internals.setResourceTimingSupport(false);
+if (w

[webkit-changes] [201414] trunk

2016-05-25 Thread yoav
Title: [201414] trunk








Revision 201414
Author y...@yoav.ws
Date 2016-05-25 22:33:58 -0700 (Wed, 25 May 2016)


Log Message
Fix ResourceTiming XHR flakiness
https://bugs.webkit.org/show_bug.cgi?id=158019

Reviewed by Alex Christensen.

Source/WebCore:

Remove XHR specific ResourceTiming information store and addition as it is not needed.

Test: http/tests/performance/performance-resource-timing-xhr-single-entry.html

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest): Removed XHR-specific initiator info storage.
(WebCore::DocumentThreadableLoader::didFinishLoading): Removed XHR-specific RT entry addition.
* loader/DocumentThreadableLoader.h:

LayoutTests:

Test fixes and additions that make sure XHR tests are not run as part of XHR's onload event, as ResourceTiming entries are added
after it.

* TestExpectations:
* http/tests/performance/performance-resource-timing-cached-entries.html: Avoid running the tests as part of the XHR's load event.
* http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt: Added.
* http/tests/performance/performance-resource-timing-xhr-single-entry.html: Test that XHR fetch adds a single entry with correct initiatorType.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
trunk/Source/WebCore/loader/DocumentThreadableLoader.h


Added Paths

trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry.html




Diff

Modified: trunk/LayoutTests/ChangeLog (201413 => 201414)

--- trunk/LayoutTests/ChangeLog	2016-05-26 05:31:43 UTC (rev 201413)
+++ trunk/LayoutTests/ChangeLog	2016-05-26 05:33:58 UTC (rev 201414)
@@ -1,3 +1,18 @@
+2016-05-25  Yoav Weiss  <y...@yoav.ws>
+
+Fix ResourceTiming XHR flakiness
+https://bugs.webkit.org/show_bug.cgi?id=158019
+
+Reviewed by Alex Christensen.
+
+Test fixes and additions that make sure XHR tests are not run as part of XHR's onload event, as ResourceTiming entries are added
+after it.
+
+* TestExpectations:
+* http/tests/performance/performance-resource-timing-cached-entries.html: Avoid running the tests as part of the XHR's load event.
+* http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-xhr-single-entry.html: Test that XHR fetch adds a single entry with correct initiatorType.
+
 2016-05-25  Benjamin Poulain  <benja...@webkit.org>
 
 [JSC] RegExp with deeply nested subexpressions overflow the stack in Yarr


Modified: trunk/LayoutTests/TestExpectations (201413 => 201414)

--- trunk/LayoutTests/TestExpectations	2016-05-26 05:31:43 UTC (rev 201413)
+++ trunk/LayoutTests/TestExpectations	2016-05-26 05:33:58 UTC (rev 201414)
@@ -978,8 +978,6 @@
 
 webkit.org/b/156631 fast/text/font-face-_javascript_.html [ Pass Crash Failure ]
 
-webkit.org/b/157816 http/tests/performance/performance-resource-timing-cached-entries.html [ Pass Failure ]
-
 webkit.org/b/157849 fast/frames/crash-during-iframe-load-stop.html [ Pass Timeout ]
 
 webkit.org/b/158085 http/tests/css/shared-stylesheet-mutation.html [ Pass Failure ]


Modified: trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html (201413 => 201414)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html	2016-05-26 05:31:43 UTC (rev 201413)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html	2016-05-26 05:33:58 UTC (rev 201414)
@@ -32,7 +32,7 @@
 var xhr = new XMLHttpRequest();
 xhr.addEventListener("load", function() {
 if (windowLoaded)
-runTest();
+setTimeout(runTest, 0);
 xhrLoaded = true;
 });
 xhr.open("GET", "../../resources/square100.png");


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt (0 => 201414)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry-expected.txt	2016-05-26 05:33:58 UTC (rev 201414)
@@ -0,0 +1,3 @@
+PASS foundResource is 1
+PASS initiator is "xmlhttprequest"
+


Copied: trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-single-entry.html (from rev 201413, trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html) (0 => 201414)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-xhr-sing

[webkit-changes] [201323] trunk/LayoutTests

2016-05-24 Thread yoav
Title: [201323] trunk/LayoutTests








Revision 201323
Author y...@yoav.ws
Date 2016-05-23 23:29:58 -0700 (Mon, 23 May 2016)


Log Message
Add a few initiator tests to resource timing.
https://bugs.webkit.org/show_bug.cgi?id=157986

Reviewed by Darin Adler.

Adds tests that make sure that when a resource is requested multiple times by different
elements, its initiator type remain the first one that triggered the fetch.

* http/tests/performance/performance-resource-timing-initiator-css-expected.txt: Added.
* http/tests/performance/performance-resource-timing-initiator-css.html: Added.
* http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt: Added.
* http/tests/performance/performance-resource-timing-initiator-no-override.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog


Added Paths

trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html
trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html




Diff

Modified: trunk/LayoutTests/ChangeLog (201322 => 201323)

--- trunk/LayoutTests/ChangeLog	2016-05-24 06:24:44 UTC (rev 201322)
+++ trunk/LayoutTests/ChangeLog	2016-05-24 06:29:58 UTC (rev 201323)
@@ -1,3 +1,18 @@
+2016-05-23  Yoav Weiss  <y...@yoav.ws>
+
+Add a few initiator tests to resource timing.
+https://bugs.webkit.org/show_bug.cgi?id=157986
+
+Reviewed by Darin Adler.
+
+Adds tests that make sure that when a resource is requested multiple times by different
+elements, its initiator type remain the first one that triggered the fetch.
+
+* http/tests/performance/performance-resource-timing-initiator-css-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-initiator-css.html: Added.
+* http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-initiator-no-override.html: Added.
+
 2016-05-23  Zalan Bujtas  <za...@apple.com>
 
 Skip fast/table/neighboring-cells-when-collapsed-border-changes on WK1 for now.


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt (0 => 201323)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css-expected.txt	2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,2 @@
+PASS initiator is "css"
+


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html (0 => 201323)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-css.html	2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,36 @@
+
+
+
+if (window.internals)
+internals.setResourceTimingSupport(true);
+if (window.testRunner) {
+testRunner.dumpAsText()
+testRunner.waitUntilDone();
+}
+
+
+<style>
+body { background: url("../../resources/square100.png"); }
+</style>
+<script>
+var initiator;
+var runTest = function() {
+var resources = performance.getEntriesByType('resource');
+for (var i = 0; i < resources.length; ++i) {
+if (resources[i].name.indexOf("square") != -1) {
+initiator = resources[i].initiatorType;
+shouldBeEqualToString("initiator", "css");
+}
+};
+if (window.internals)
+window.internals.setResourceTimingSupport(false);
+if (window.testRunner)
+testRunner.notifyDone();
+};
+window.addEventListener("load", function() {
+runTest();
+});
+
+
+


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt (0 => 201323)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override-expected.txt	2016-05-24 06:29:58 UTC (rev 201323)
@@ -0,0 +1,2 @@
+PASS initiator is "img"
+


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html (0 => 201323)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-initiator-no-override.html	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-t

[webkit-changes] [201130] trunk/LayoutTests

2016-05-19 Thread yoav
Title: [201130] trunk/LayoutTests








Revision 201130
Author y...@yoav.ws
Date 2016-05-19 01:08:30 -0700 (Thu, 19 May 2016)


Log Message
REGRESSION (r200887): LayoutTest http/tests/performance/performance-resource-timing-cached-entries.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=157816

Reviewed by Alexey Proskuryakov.

Mark the test as flaky, and add console logs to try to figure out the cause for flakiness.

* TestExpectations: Mark the test as flaky.
* http/tests/performance/performance-resource-timing-cached-entries.html: Add prints to better identify the flakiness root cause.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html




Diff

Modified: trunk/LayoutTests/ChangeLog (201129 => 201130)

--- trunk/LayoutTests/ChangeLog	2016-05-19 07:32:48 UTC (rev 201129)
+++ trunk/LayoutTests/ChangeLog	2016-05-19 08:08:30 UTC (rev 201130)
@@ -1,3 +1,15 @@
+2016-05-19  Yoav Weiss  <y...@yoav.ws>
+
+REGRESSION (r200887): LayoutTest http/tests/performance/performance-resource-timing-cached-entries.html is flaky
+https://bugs.webkit.org/show_bug.cgi?id=157816
+
+Reviewed by Alexey Proskuryakov.
+
+Mark the test as flaky, and add console logs to try to figure out the cause for flakiness.
+
+* TestExpectations: Mark the test as flaky.
+* http/tests/performance/performance-resource-timing-cached-entries.html: Add prints to better identify the flakiness root cause.
+
 2016-05-18  Jer Noble  <jer.no...@apple.com>
 
 webkitEnterFullscreen() does not require a user gesture when RequireUserGestureForAudioRateChange is set.
@@ -2677,7 +2689,7 @@
 Unreviewed test gardening.
 
 Remove failure expectation for passing tests, move some to more specific ports, and remove expectations
-		for tests that are no longer in the tree.
+for tests that are no longer in the tree.
 
 * platform/ios-simulator-wk1/TestExpectations:
 * platform/ios-simulator-wk2/TestExpectations:
@@ -4215,9 +4227,9 @@
 
 Unreviewed test gardening.
 
-		I evaluated all of the unexpected passes from ios-simulator-wk2 and removed failure
-		expectations where appropriate. Some of the tests only pass on wk2, so some expectations
-		were moved to the ios-simulator-wk1 file.
+I evaluated all of the unexpected passes from ios-simulator-wk2 and removed failure
+expectations where appropriate. Some of the tests only pass on wk2, so some expectations
+were moved to the ios-simulator-wk1 file.
 
 * platform/ios-simulator-wk1/TestExpectations:
 * platform/ios-simulator-wk2/TestExpectations:


Modified: trunk/LayoutTests/TestExpectations (201129 => 201130)

--- trunk/LayoutTests/TestExpectations	2016-05-19 07:32:48 UTC (rev 201129)
+++ trunk/LayoutTests/TestExpectations	2016-05-19 08:08:30 UTC (rev 201130)
@@ -978,3 +978,6 @@
 webkit.org/b/156631 fast/text/font-face-_javascript_.html [ Pass Crash Failure ]
 
 webkit.org/b/157589 fast/text-autosizing/ios/text-autosizing-after-back.html [ Pass Timeout ]
+
+webkit.org/b/157816 http/tests/performance/performance-resource-timing-cached-entries.html [ Pass Failure ]
+


Modified: trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt (201129 => 201130)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt	2016-05-19 07:32:48 UTC (rev 201129)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt	2016-05-19 08:08:30 UTC (rev 201130)
@@ -1,2 +1,6 @@
+CONSOLE MESSAGE: line 11: current entries: 0
+CONSOLE MESSAGE: line 20: entry: http://127.0.0.1:8000/resources/js-test-pre.js
+CONSOLE MESSAGE: line 20: entry: http://127.0.0.1:8000/resources/square100.png
+CONSOLE MESSAGE: line 20: entry: http://127.0.0.1:8000/resources/square100.png
 PASS foundResource is 2
 


Modified: trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html (201129 => 201130)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html	2016-05-19 07:32:48 UTC (rev 201129)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html	2016-05-19 08:08:30 UTC (rev 201130)
@@ -7,6 +7,8 @@
 testRunner.dumpAsText()
 testRunner.waitUntilDone();
 }
+if (window.performance)
+console.log("current entries: " + performance.getEntriesByType('resource').length);
 
 

[webkit-changes] [200887] trunk

2016-05-13 Thread yoav
Title: [200887] trunk








Revision 200887
Author y...@yoav.ws
Date 2016-05-13 15:34:29 -0700 (Fri, 13 May 2016)


Log Message
ResourceTiming entries for cached resources and XHR
https://bugs.webkit.org/show_bug.cgi?id=157669

Reviewed by Alex Christensen.

Source/WebCore:

 - Moves the ResourceTiming storage and addition logic into its own class, so that it
   can be accessed by both CachedResourceLoader and DocumentThreadableLoader.
 - Using the above, adds ResourceTiming collection into DocumentThreadableLoader,
   in order to support ResourceTiming entries for XHR based requests.
 - Adds ResourceTiming entries for resources that are reused from the memory cache.

Test: http/tests/performance/performance-resource-timing-cached-entries.html

* CMakeLists.txt: Add ResourceTimingInformation.
* WebCore.xcodeproj/project.pbxproj: Add ResourceTimingInformation.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didFinishLoading): Add a call to addResourceTiming.
(WebCore::DocumentThreadableLoader::loadRequest): Store the initiator information.
* loader/DocumentThreadableLoader.h:
* loader/ResourceTimingInformation.cpp: Added.
(WebCore::ResourceTimingInformation::addResourceTiming): Moved addResourceTiming logic from CachedResourceLoader.
(WebCore::ResourceTimingInformation::storeResourceTimingInitiatorInformation): Moved addResourceTiming logic from
CachedResourceLoader. Removed reliance on the committingFirstRealLoad bool when storing initiator info, as I don't
see why it is required, and it made no sense in the context of DocumentThreadableLoader.
* loader/ResourceTimingInformation.h: Added.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource): Add a ResourceTiming entry when a resource is reused from MemoryCache.
(WebCore::CachedResourceLoader::revalidateResource): Use ResourceTimingInformation::storeResourceTimingInitiatorInformation.
(WebCore::CachedResourceLoader::loadResource): Use ResourceTimingInformation::storeResourceTimingInitiatorInformation.
(WebCore::CachedResourceLoader::loadDone): Use ResourceTimingInformation::addResourceTiming.
(WebCore::CachedResourceLoader::storeResourceTimingInitiatorInformation): Deleted.
* loader/cache/CachedResourceLoader.h:

LayoutTests:

These tests make sure that cacheable resources as well as XHR based resources
have ResourceTiming entries.

* http/tests/performance/performance-resource-timing-cached-entries-expected.txt: Added.
* http/tests/performance/performance-resource-timing-cached-entries.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp
trunk/Source/WebCore/loader/DocumentThreadableLoader.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h


Added Paths

trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html
trunk/Source/WebCore/loader/ResourceTimingInformation.cpp
trunk/Source/WebCore/loader/ResourceTimingInformation.h




Diff

Modified: trunk/LayoutTests/ChangeLog (200886 => 200887)

--- trunk/LayoutTests/ChangeLog	2016-05-13 22:22:45 UTC (rev 200886)
+++ trunk/LayoutTests/ChangeLog	2016-05-13 22:34:29 UTC (rev 200887)
@@ -1,3 +1,16 @@
+2016-05-13  Yoav Weiss  <y...@yoav.ws>
+
+ResourceTiming entries for cached resources and XHR
+https://bugs.webkit.org/show_bug.cgi?id=157669
+
+Reviewed by Alex Christensen.
+
+These tests make sure that cacheable resources as well as XHR based resources
+have ResourceTiming entries.
+
+* http/tests/performance/performance-resource-timing-cached-entries-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-cached-entries.html: Added.
+
 2016-05-13  Mark Lam  <mark@apple.com>
 
 We should have one calleeSaveRegistersBuffer per VMEntryFrame, not one per VM.


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt (0 => 200887)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries-expected.txt	2016-05-13 22:34:29 UTC (rev 200887)
@@ -0,0 +1,2 @@
+PASS foundResource is 2
+


Added: trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html (0 => 200887)

--- trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html	(rev 0)
+++ trunk/LayoutTests/http/tests/performance/performance-resource-timing-cached-entries.html	2016-05-13 22:34:29 UTC (rev 200887)
@@ -0,0 +1,44 @@
+
+
+
+   

[webkit-changes] [200863] trunk

2016-05-13 Thread yoav
Title: [200863] trunk








Revision 200863
Author y...@yoav.ws
Date 2016-05-13 11:06:43 -0700 (Fri, 13 May 2016)


Log Message
Turn on WEB_TIMING for all ports
https://bugs.webkit.org/show_bug.cgi?id=157673

Reviewed by Alex Christensen.

.:

Turn on WEB_TIMING by default on the cmake Mac port, to match it with all other ports,
and make sure that the flag will be on by default for all ports.

* Source/cmake/OptionsGTK.cmake: Remove the specific private flag for WEB_TIMING.
* Source/cmake/OptionsMac.cmake: Remove the specific private flag for WEB_TIMING.
* Source/cmake/WebKitFeatures.cmake: Turn on WEB_TIMING for all ports by default.

Tools:

* Scripts/webkitperl/FeatureList.pm: Make sure that WEB_TIMING is on by default.

Modified Paths

trunk/ChangeLog
trunk/Source/cmake/OptionsGTK.cmake
trunk/Source/cmake/OptionsMac.cmake
trunk/Source/cmake/WebKitFeatures.cmake
trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitperl/FeatureList.pm




Diff

Modified: trunk/ChangeLog (200862 => 200863)

--- trunk/ChangeLog	2016-05-13 17:42:18 UTC (rev 200862)
+++ trunk/ChangeLog	2016-05-13 18:06:43 UTC (rev 200863)
@@ -1,3 +1,17 @@
+2016-05-13  Yoav Weiss  <y...@yoav.ws>
+
+Turn on WEB_TIMING for all ports
+https://bugs.webkit.org/show_bug.cgi?id=157673
+
+Reviewed by Alex Christensen.
+
+Turn on WEB_TIMING by default on the cmake Mac port, to match it with all other ports,
+and make sure that the flag will be on by default for all ports.
+
+* Source/cmake/OptionsGTK.cmake: Remove the specific private flag for WEB_TIMING.
+* Source/cmake/OptionsMac.cmake: Remove the specific private flag for WEB_TIMING.
+* Source/cmake/WebKitFeatures.cmake: Turn on WEB_TIMING for all ports by default.
+
 2016-05-12  Csaba Osztrogonác  <o...@webkit.org>
 
 Remove ENABLE(ES6_ARROWFUNCTION_SYNTAX) guards


Modified: trunk/Source/cmake/OptionsGTK.cmake (200862 => 200863)

--- trunk/Source/cmake/OptionsGTK.cmake	2016-05-13 17:42:18 UTC (rev 200862)
+++ trunk/Source/cmake/OptionsGTK.cmake	2016-05-13 18:06:43 UTC (rev 200863)
@@ -172,7 +172,6 @@
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USERSELECT_ALL PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USER_MESSAGE_HANDLERS PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ON)
 
 # Finalize the value for all options. Do not attempt to use an option before


Modified: trunk/Source/cmake/OptionsMac.cmake (200862 => 200863)

--- trunk/Source/cmake/OptionsMac.cmake	2016-05-13 17:42:18 UTC (rev 200862)
+++ trunk/Source/cmake/OptionsMac.cmake	2016-05-13 18:06:43 UTC (rev 200863)
@@ -116,7 +116,6 @@
 
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DEVICE_ORIENTATION PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTL_JIT PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GAMEPAD PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_IOS_AIRPLAY PRIVATE OFF)
 


Modified: trunk/Source/cmake/WebKitFeatures.cmake (200862 => 200863)

--- trunk/Source/cmake/WebKitFeatures.cmake	2016-05-13 17:42:18 UTC (rev 200862)
+++ trunk/Source/cmake/WebKitFeatures.cmake	2016-05-13 18:06:43 UTC (rev 200863)
@@ -197,7 +197,7 @@
 WEBKIT_OPTION_DEFINE(ENABLE_WEB_REPLAY "Toggle Web Replay support" PRIVATE OFF)
 WEBKIT_OPTION_DEFINE(ENABLE_WEB_RTC "Toggle WebRTC API support" PRIVATE OFF)
 WEBKIT_OPTION_DEFINE(ENABLE_WEB_SOCKETS "Toggle Web Sockets support" PRIVATE ON)
-WEBKIT_OPTION_DEFINE(ENABLE_WEB_TIMING "Toggle Web Timing support" PRIVATE OFF)
+WEBKIT_OPTION_DEFINE(ENABLE_WEB_TIMING "Toggle Web Timing support" PRIVATE ON)
 WEBKIT_OPTION_DEFINE(ENABLE_XSLT "Toggle XSLT support" PRIVATE ON)
 WEBKIT_OPTION_DEFINE(USE_SYSTEM_MALLOC "Toggle system allocator instead of WebKit's custom allocator" PRIVATE OFF)
 


Modified: trunk/Tools/ChangeLog (200862 => 200863)

--- trunk/Tools/ChangeLog	2016-05-13 17:42:18 UTC (rev 200862)
+++ trunk/Tools/ChangeLog	2016-05-13 18:06:43 UTC (rev 200863)
@@ -1,3 +1,12 @@
+2016-05-13  Yoav Weiss  <y...@yoav.ws>
+
+Turn on WEB_TIMING for all ports
+https://bugs.webkit.org/show_bug.cgi?id=157673
+
+Reviewed by Alex Christensen.
+
+* Scripts/webkitperl/FeatureList.pm: Make sure that WEB_TIMING is on by default.
+
 2016-05-13  Brady Eidson  <beid...@apple.com>
 
 Protector Ref/RefPtrs should have a specified naming style.


Modified: trunk/Tools/Scripts/webkitperl/FeatureList.pm (200862 => 200863)

--- trunk/Tools/Scripts/webkitperl/FeatureList.pm	2016-05-13 17:42:18 UTC (rev 200862)
+++ trunk/Tools/Scripts/webkitperl/FeatureList.pm	2016-05-13 18:06:43 UTC (rev 200863)
@@ -445,7 +445,7 @@
   define => "ENABLE_WEB_SOC

[webkit-changes] [200324] trunk/Source/WebCore

2016-05-02 Thread yoav
Title: [200324] trunk/Source/WebCore








Revision 200324
Author y...@yoav.ws
Date 2016-05-02 09:21:33 -0700 (Mon, 02 May 2016)


Log Message
Speculatively fix the cmake build
https://bugs.webkit.org/show_bug.cgi?id=157262

Reviewed by Darin Adler.

This patch adds WEB_TIMING build flag guards around calls to DOMWindow()->performance(),
in order to make sure builds that have WEB_TIMING disabled (e.g. cmake on Mac) continue
to build.

No new tests as there's no functional change.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadDone):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (200323 => 200324)

--- trunk/Source/WebCore/ChangeLog	2016-05-02 16:15:57 UTC (rev 200323)
+++ trunk/Source/WebCore/ChangeLog	2016-05-02 16:21:33 UTC (rev 200324)
@@ -1,3 +1,19 @@
+2016-05-02  Yoav Weiss  <y...@yoav.ws>
+
+Speculatively fix the cmake build
+https://bugs.webkit.org/show_bug.cgi?id=157262
+
+Reviewed by Darin Adler.
+
+This patch adds WEB_TIMING build flag guards around calls to DOMWindow()->performance(),
+in order to make sure builds that have WEB_TIMING disabled (e.g. cmake on Mac) continue
+to build.
+
+No new tests as there's no functional change.
+
+* loader/cache/CachedResourceLoader.cpp:
+(WebCore::CachedResourceLoader::loadDone):
+
 2016-05-02  Daniel Bates  <daba...@apple.com>
 
 CSP: Add workaround for XtraMath


Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (200323 => 200324)

--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2016-05-02 16:15:57 UTC (rev 200323)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2016-05-02 16:21:33 UTC (rev 200324)
@@ -969,6 +969,7 @@
 RefPtr protectDocumentLoader(m_documentLoader);
 RefPtr protectDocument(m_document);
 
+#if ENABLE(WEB_TIMING)
 if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled()
 && resource && resource->response().isHTTP()
 && ((!resource->errorOccurred() && !resource->wasCanceled()) || resource->response().httpStatusCode() == 304)) {
@@ -984,6 +985,7 @@
 m_initiatorMap.remove(initiatorIt);
 }
 }
+#endif
 
 if (frame())
 frame()->loader().loadDone();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [200320] trunk

2016-05-02 Thread yoav
ore/loader/ResourceLoadNotifier.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
trunk/Source/WebCore/page/Performance.cpp
trunk/Source/WebCore/page/Performance.h
trunk/Source/WebCore/page/Performance.idl
trunk/Source/WebCore/page/PerformanceEntry.cpp
trunk/Source/WebCore/page/PerformanceEntry.h
trunk/Source/WebCore/page/PerformanceEntry.idl
trunk/Source/WebCore/page/PerformanceEntryList.cpp
trunk/Source/WebCore/page/PerformanceEntryList.h
trunk/Source/WebCore/page/PerformanceEntryList.idl
trunk/Source/WebCore/page/PerformanceResourceTiming.cpp
trunk/Source/WebCore/page/PerformanceResourceTiming.h
trunk/Source/WebCore/page/PerformanceResourceTiming.idl
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/cmake/WebKitFeatures.cmake


Added Paths

trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt
trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html
trunk/LayoutTests/http/tests/performance/
trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries.html




Diff

Modified: trunk/ChangeLog (200319 => 200320)

--- trunk/ChangeLog	2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/ChangeLog	2016-05-02 08:21:50 UTC (rev 200320)
@@ -1,3 +1,12 @@
+2016-05-02  Yoav Weiss  <y...@yoav.ws>
+
+Move ResourceTiming behind a runtime flag
+https://bugs.webkit.org/show_bug.cgi?id=157133
+
+Reviewed by Alex Christensen.
+
+* Source/cmake/WebKitFeatures.cmake: Remove the PERFORMANCE_TIMELINE build flag.
+
 2016-04-29  Commit Queue  <commit-qu...@webkit.org>
 
 Unreviewed, rolling out r200232.


Modified: trunk/LayoutTests/ChangeLog (200319 => 200320)

--- trunk/LayoutTests/ChangeLog	2016-05-02 08:09:21 UTC (rev 200319)
+++ trunk/LayoutTests/ChangeLog	2016-05-02 08:21:50 UTC (rev 200320)
@@ -1,3 +1,19 @@
+2016-05-02  Yoav Weiss  <y...@yoav.ws>
+
+Move ResourceTiming behind a runtime flag
+https://bugs.webkit.org/show_bug.cgi?id=157133
+
+Reviewed by Alex Christensen.
+
+Added tests that make sure ResourceTiming APIs are exposed and that resources
+show up as entries in the performance timeline.
+
+* fast/dom/Window/window-properties-performance-resource-timing-expected.txt: Added.
+* fast/dom/Window/window-properties-performance-resource-timing.html: Added.
+* fast/dom/Window/window-properties-performance.html: Removed "//;".
+* http/tests/performance/performance-resource-timing-entries-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-entries.html: Added.
+
 2016-05-01  Nan Wang  <n_w...@apple.com>
 
 AX: Crash at  WebCore::AccessibilityObject::getAttribute const + 9


Added: trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt (0 => 200320)

--- trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt	2016-05-02 08:21:50 UTC (rev 200320)
@@ -0,0 +1,46 @@
+This test dumps all of the properties that are reachable from the window.performance object, along with their types.
+
+window.performance [object Performance]
+window.performance.addEventListener [function]
+window.performance.clearResourceTimings [function]
+window.performance.dispatchEvent [function]
+window.performance.getEntries [function]
+window.performance.getEntriesByName [function]
+window.performance.getEntriesByType [function]
+window.performance.navigation [object PerformanceNavigation]
+window.performance.navigation.TYPE_BACK_FORWARD [number]
+window.performance.navigation.TYPE_NAVIGATE [number]
+window.performance.navigation.TYPE_RELOAD [number]
+window.performance.navigation.TYPE_RESERVED [number]
+window.performance.navigation.redirectCount [number]
+window.performance.navigation.type [number]
+window.performance.now [function]
+window.performance.onresourcetimingbufferfull [null]
+window.performance.removeEventListener [function]
+window.performance.setResourceTimingBufferSize [function]
+window.performance.timing [object PerformanceTiming]
+window.performance.timing.connectEnd [number]
+window.performance.timing.connectStart [number]
+window.performance.timing.domComplete [number]
+window.performance.timing.domContentLoadedEventEnd [number]
+window.performance.timing.domContentLoadedEventStart [number]
+window.performance.timing.domInteractive [number]
+window.performance.timing.domLoading [number]
+window.performance.timing.domainLookupEnd [number]
+window.performance.timing.domainLookupStart [number]
+window.performance.timing.fetchStart [nu

[webkit-changes] [200232] trunk

2016-04-29 Thread yoav
ader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResourceLoader.h
trunk/Source/WebCore/page/Performance.cpp
trunk/Source/WebCore/page/Performance.h
trunk/Source/WebCore/page/Performance.idl
trunk/Source/WebCore/page/PerformanceEntry.cpp
trunk/Source/WebCore/page/PerformanceEntry.h
trunk/Source/WebCore/page/PerformanceEntry.idl
trunk/Source/WebCore/page/PerformanceEntryList.cpp
trunk/Source/WebCore/page/PerformanceEntryList.h
trunk/Source/WebCore/page/PerformanceEntryList.idl
trunk/Source/WebCore/page/PerformanceResourceTiming.cpp
trunk/Source/WebCore/page/PerformanceResourceTiming.h
trunk/Source/WebCore/page/PerformanceResourceTiming.idl
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/cmake/WebKitFeatures.cmake


Added Paths

trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt
trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing.html
trunk/LayoutTests/http/tests/performance/
trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries-expected.txt
trunk/LayoutTests/http/tests/performance/performance-resource-timing-entries.html




Diff

Modified: trunk/ChangeLog (200231 => 200232)

--- trunk/ChangeLog	2016-04-29 07:18:30 UTC (rev 200231)
+++ trunk/ChangeLog	2016-04-29 07:33:02 UTC (rev 200232)
@@ -1,3 +1,12 @@
+2016-04-29  Yoav Weiss  <y...@yoav.ws>
+
+Move ResourceTiming behind a runtime flag
+https://bugs.webkit.org/show_bug.cgi?id=157133
+
+Reviewed by Alex Christensen.
+
+* Source/cmake/WebKitFeatures.cmake: Remove the PERFORMANCE_TIMELINE build flag.
+
 2016-04-28  Commit Queue  <commit-qu...@webkit.org>
 
 Unreviewed, rolling out r200185.


Modified: trunk/LayoutTests/ChangeLog (200231 => 200232)

--- trunk/LayoutTests/ChangeLog	2016-04-29 07:18:30 UTC (rev 200231)
+++ trunk/LayoutTests/ChangeLog	2016-04-29 07:33:02 UTC (rev 200232)
@@ -1,3 +1,19 @@
+2016-04-29  Yoav Weiss  <y...@yoav.ws>
+
+Move ResourceTiming behind a runtime flag
+https://bugs.webkit.org/show_bug.cgi?id=157133
+
+Reviewed by Alex Christensen.
+
+Added tests that make sure ResourceTiming APIs are exposed and that resources
+show up as entries in the performance timeline.
+
+* fast/dom/Window/window-properties-performance-resource-timing-expected.txt: Added.
+* fast/dom/Window/window-properties-performance-resource-timing.html: Added.
+* fast/dom/Window/window-properties-performance.html: Removed "//;".
+* http/tests/performance/performance-resource-timing-entries-expected.txt: Added.
+* http/tests/performance/performance-resource-timing-entries.html: Added.
+
 2016-04-29  Youenn Fablet  <youenn.fab...@crf.canon.fr>
 
 Drop [UsePointersEvenForNonNullableObjectArguments] from MediaStream interfaces


Added: trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt (0 => 200232)

--- trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt	2016-04-29 07:33:02 UTC (rev 200232)
@@ -0,0 +1,46 @@
+This test dumps all of the properties that are reachable from the window.performance object, along with their types.
+
+window.performance [object Performance]
+window.performance.addEventListener [function]
+window.performance.clearResourceTimings [function]
+window.performance.dispatchEvent [function]
+window.performance.getEntries [function]
+window.performance.getEntriesByName [function]
+window.performance.getEntriesByType [function]
+window.performance.navigation [object PerformanceNavigation]
+window.performance.navigation.TYPE_BACK_FORWARD [number]
+window.performance.navigation.TYPE_NAVIGATE [number]
+window.performance.navigation.TYPE_RELOAD [number]
+window.performance.navigation.TYPE_RESERVED [number]
+window.performance.navigation.redirectCount [number]
+window.performance.navigation.type [number]
+window.performance.now [function]
+window.performance.onresourcetimingbufferfull [null]
+window.performance.removeEventListener [function]
+window.performance.setResourceTimingBufferSize [function]
+window.performance.timing [object PerformanceTiming]
+window.performance.timing.connectEnd [number]
+window.performance.timing.connectStart [number]
+window.performance.timing.domComplete [number]
+window.performance.timing.domContentLoadedEventEnd [number]
+window.performance.timing.domContentLoadedEventStart [number]
+window.performance.timing.domInteractive [number]
+window.performance.timing.domLoading [number]
+window.performance.timing.domainLookupEnd [number]
+window.performance.timing.domainLookupStart [number]
+window.performance.timing.fetchStart [nu

[webkit-changes] [199786] trunk/LayoutTests

2016-04-20 Thread yoav
Title: [199786] trunk/LayoutTests








Revision 199786
Author y...@yoav.ws
Date 2016-04-20 14:25:11 -0700 (Wed, 20 Apr 2016)


Log Message
Speculative unflake of dynamic_remove_preload_href layout test
https://bugs.webkit.org/show_bug.cgi?id=156773

Reviewed by Alexey Proskuryakov.

* http/tests/preload/dynamic_remove_preload_href.html: Avoid using a blocking script based timeout.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html




Diff

Modified: trunk/LayoutTests/ChangeLog (199785 => 199786)

--- trunk/LayoutTests/ChangeLog	2016-04-20 21:07:37 UTC (rev 199785)
+++ trunk/LayoutTests/ChangeLog	2016-04-20 21:25:11 UTC (rev 199786)
@@ -1,3 +1,12 @@
+2016-04-20  Yoav Weiss  <y...@yoav.ws>
+
+Speculative unflake of dynamic_remove_preload_href layout test
+https://bugs.webkit.org/show_bug.cgi?id=156773
+
+Reviewed by Alexey Proskuryakov.
+
+* http/tests/preload/dynamic_remove_preload_href.html: Avoid using a blocking script based timeout.
+
 2016-04-20  Brady Eidson  <beid...@apple.com>
 
 Modern IDB (Workers): Enable INDEXED_DATABASE_IN_WORKERS compile time flag, but disabled in RuntimeEnabledFeatures.


Modified: trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html (199785 => 199786)

--- trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html	2016-04-20 21:07:37 UTC (rev 199785)
+++ trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html	2016-04-20 21:25:11 UTC (rev 199786)
@@ -16,11 +16,8 @@
 link.href = ""
 window.addEventListener("load", function() {
 shouldBeFalse("internals.isPreloaded('../resources/dummy.js');");
+if (window.internals)
+window.internals.setLinkPreloadSupport(false);
 });
 
-
-if (window.internals)
-window.internals.setLinkPreloadSupport(false);
-
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [199650] trunk

2016-04-18 Thread yoav
ce/WebCore/html/HTMLLinkElement.h
trunk/Source/WebCore/html/HTMLLinkElement.idl
trunk/Source/WebCore/html/LinkRelAttribute.cpp
trunk/Source/WebCore/html/LinkRelAttribute.h
trunk/Source/WebCore/loader/LinkLoader.cpp
trunk/Source/WebCore/loader/LinkLoader.h
trunk/Source/WebCore/loader/ResourceLoadInfo.cpp
trunk/Source/WebCore/loader/SubresourceLoader.cpp
trunk/Source/WebCore/loader/cache/CachedResource.cpp
trunk/Source/WebCore/loader/cache/CachedResource.h
trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp


Added Paths

trunk/LayoutTests/http/tests/preload/
trunk/LayoutTests/http/tests/preload/download_resources-expected.txt
trunk/LayoutTests/http/tests/preload/download_resources.html
trunk/LayoutTests/http/tests/preload/dynamic_adding_preload-expected.txt
trunk/LayoutTests/http/tests/preload/dynamic_adding_preload.html
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt
trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html
trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt
trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html




Diff

Modified: trunk/LayoutTests/ChangeLog (199649 => 199650)

--- trunk/LayoutTests/ChangeLog	2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/LayoutTests/ChangeLog	2016-04-18 06:06:42 UTC (rev 199650)
@@ -1,3 +1,25 @@
+2016-04-17  Yoav Weiss  <y...@yoav.ws>
+
+Initial Link preload support
+https://bugs.webkit.org/show_bug.cgi?id=156334
+
+Added tests that make sure that `` performs its basic
+tasks and preloads resources.
+
+Reviewed by Darin Adler.
+
+* http/tests/preload/download_resources-expected.txt: Added.
+* http/tests/preload/download_resources.html: Added.
+* http/tests/preload/dynamic_adding_preload-expected.txt: Added.
+* http/tests/preload/dynamic_adding_preload.html: Added.
+* http/tests/preload/dynamic_remove_preload_href-expected.txt: Added.
+* http/tests/preload/dynamic_remove_preload_href.html: Added.
+* http/tests/preload/dynamic_removing_preload-expected.txt: Added.
+* http/tests/preload/dynamic_removing_preload.html: Added.
+* imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions.
+* imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: Adjusted expected results to progressions.
+* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions.
+
 2016-04-17  Youenn Fablet  <youenn.fab...@crf.canon.fr>
 
 [Streams] Consume HTTP data as a ReadableStream


Added: trunk/LayoutTests/http/tests/preload/download_resources-expected.txt (0 => 199650)

--- trunk/LayoutTests/http/tests/preload/download_resources-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/download_resources-expected.txt	2016-04-18 06:06:42 UTC (rev 199650)
@@ -0,0 +1,13 @@
+CONSOLE MESSAGE: line 15:  must have a valid `as` value
+PASS internals.isPreloaded('../resources/dummy.js'); is true
+PASS internals.isPreloaded('../resources/dummy.css'); is true
+PASS internals.isPreloaded('../resources/square.png'); is true
+PASS internals.isPreloaded('../resources/Ahem.ttf'); is true
+PASS internals.isPreloaded('../resources/test.mp4'); is true
+PASS internals.isPreloaded('../security/resources/captions.vtt'); is true
+PASS internals.isPreloaded('../resources/dummy.xml?badvalue'); is false
+PASS internals.isPreloaded('../resources/dummy.xml'); is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/http/tests/preload/download_resources.html (0 => 199650)

--- trunk/LayoutTests/http/tests/preload/download_resources.html	(rev 0)
+++ trunk/LayoutTests/http/tests/preload/download_resources.html	2016-04-18 06:06:42 UTC (rev 199650)
@@ -0,0 +1,35 @@
+
+
+
+
+if (window.internals)
+window.internals.setLinkPreloadSupport(true);
+
+
+<link rel=preload href="" as=style>
+<link rel=preload href="" as=image>
+<link rel=preload href="" as=font crossorigin>
+<link rel=preload href="" as=media>
+<link rel=preload href="" as=track>
+<link rel=preload href="" as=foobarxmlthing>
+<link rel=preload href=""
+<script src=""
+</head>
+<body>
+<script>
+if (window.testRunner)
+testRunner.dumpAsText();
+shouldBeTrue("internals.isPreloaded('../resources/dummy.js');");
+shouldBeTrue("internals.isPreloaded('../resources/dummy.css');");
+shouldBeT

[webkit-changes] [198004] trunk

2016-03-11 Thread yoav
Title: [198004] trunk








Revision 198004
Author y...@yoav.ws
Date 2016-03-11 03:13:25 -0800 (Fri, 11 Mar 2016)


Log Message
Avoid applying link tags with an invalid media attribute
https://bugs.webkit.org/show_bug.cgi?id=143262

Reviewed by Brent Fulgham.

Source/WebCore:

In current HTML spec, unlike HTML4, the UA must not apply  based resources
when the media attribute does not match:
https://html.spec.whatwg.org/multipage/semantics.html#attr-link-media

An invalid media attribute parsing creates a non-empty MediaQuerySet
containing a single query with no expressions and no media type.
(and with its m_ignored flag off)

In order to ignore such MediaQueries, I added an extra check that makes sure
that the queries handled by MediaQueryEvaluator::eval have either expressions
or a media type, and if not, they are ignored.

Test: fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html

* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval):

LayoutTests:

These tests make sure that when  is present with an invalid
media attribute, the styles are not being applied.

* fast/dom/HTMLLinkElement/link-stylesheet-invalid-media-expected.txt: Added.
* fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html: Added.
* fast/dom/HTMLLinkElement/link-stylesheet-media-type-expected.txt: Added.
* fast/dom/HTMLLinkElement/link-stylesheet-media-type.html: Added.

These tests test the old HTML4 behavior and are no longer relevant.
* fast/media/media-descriptor-syntax-05.html: Removed.
* fast/media/media-descriptor-syntax-05-expected.html: Removed.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/MediaQueryEvaluator.cpp


Added Paths

trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media-expected.txt
trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html
trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-media-type-expected.txt
trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-media-type.html


Removed Paths

trunk/LayoutTests/fast/media/media-descriptor-syntax-05-expected.html
trunk/LayoutTests/fast/media/media-descriptor-syntax-05.html




Diff

Modified: trunk/LayoutTests/ChangeLog (198003 => 198004)

--- trunk/LayoutTests/ChangeLog	2016-03-11 10:04:35 UTC (rev 198003)
+++ trunk/LayoutTests/ChangeLog	2016-03-11 11:13:25 UTC (rev 198004)
@@ -1,3 +1,22 @@
+2016-03-11  Yoav Weiss  <y...@yoav.ws>
+
+Avoid applying link tags with an invalid media attribute
+https://bugs.webkit.org/show_bug.cgi?id=143262
+
+Reviewed by Brent Fulgham.
+
+These tests make sure that when  is present with an invalid
+media attribute, the styles are not being applied.
+
+* fast/dom/HTMLLinkElement/link-stylesheet-invalid-media-expected.txt: Added.
+* fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html: Added.
+* fast/dom/HTMLLinkElement/link-stylesheet-media-type-expected.txt: Added.
+* fast/dom/HTMLLinkElement/link-stylesheet-media-type.html: Added.
+
+These tests test the old HTML4 behavior and are no longer relevant.
+* fast/media/media-descriptor-syntax-05.html: Removed.
+* fast/media/media-descriptor-syntax-05-expected.html: Removed.
+
 2016-03-11  Frederic Wang  <fw...@igalia.com>
 
 Skip content-editable-as-textarea.html on GTK as it uses AX API.


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media-expected.txt (0 => 198004)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media-expected.txt	2016-03-11 11:13:25 UTC (rev 198004)
@@ -0,0 +1,2 @@
+SUCCESS
+


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html (0 => 198004)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-invalid-media.html	2016-03-11 11:13:25 UTC (rev 198004)
@@ -0,0 +1,14 @@
+
+
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+var test = document.getElementById("test");
+var result = document.getElementById("result");
+if (test.offsetWidth == 100)
+result.innerHTML = "FAILURE";
+else
+result.innerHTML = "SUCCESS";
+


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-media-type-expected.txt (0 => 198004)

--- trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-media-type-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-media-type-expected.txt	2016-03-11 11:13:25 UTC (rev 198004)
@@ -0,0 +1,2 @@
+SUCCESS
+


Added: trunk/LayoutTests/fast/dom/HTMLLinkElement/link-stylesheet-media-type.html (0 => 198004)

-

[webkit-changes] [192969] trunk

2015-12-02 Thread yoav
Title: [192969] trunk








Revision 192969
Author y...@yoav.ws
Date 2015-12-02 14:41:21 -0800 (Wed, 02 Dec 2015)


Log Message
Fix preloader issue with srcdoc documents.
https://bugs.webkit.org/show_bug.cgi?id=151744

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make sure that PreloadRequest is resolving URLs based on the document's
baseURL() rather than using url() as the base URL, which is not how URLs
are resolved by the parser, and fails when document->url() diverges from
the document's base URL (e.g. in the case of srcdoc based documents).

Test: fast/preloader/iframe-srcdoc.html

* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::completeURL):

LayoutTests:

Added a test that makes sure that srcdoc based subresources are properly preloaded.

* fast/preloader/iframe-srcdoc-expected.txt: Added.
* fast/preloader/iframe-srcdoc.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp


Added Paths

trunk/LayoutTests/fast/preloader/iframe-srcdoc-expected.txt
trunk/LayoutTests/fast/preloader/iframe-srcdoc.html




Diff

Modified: trunk/LayoutTests/ChangeLog (192968 => 192969)

--- trunk/LayoutTests/ChangeLog	2015-12-02 22:35:38 UTC (rev 192968)
+++ trunk/LayoutTests/ChangeLog	2015-12-02 22:41:21 UTC (rev 192969)
@@ -1,3 +1,15 @@
+2015-12-02  Yoav Weiss  <y...@yoav.ws>
+
+Fix preloader issue with srcdoc documents.
+https://bugs.webkit.org/show_bug.cgi?id=151744
+
+Reviewed by Ryosuke Niwa.
+
+Added a test that makes sure that srcdoc based subresources are properly preloaded.
+
+* fast/preloader/iframe-srcdoc-expected.txt: Added.
+* fast/preloader/iframe-srcdoc.html: Added.
+
 2015-12-02  Jer Noble  <jer.no...@apple.com>
 
 Add a setting and restriction which will pause invisible autoplaying video


Added: trunk/LayoutTests/fast/preloader/iframe-srcdoc-expected.txt (0 => 192969)

--- trunk/LayoutTests/fast/preloader/iframe-srcdoc-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/preloader/iframe-srcdoc-expected.txt	2015-12-02 22:41:21 UTC (rev 192969)
@@ -0,0 +1,7 @@
+CONSOLE MESSAGE: line 1: PASS
+This test has to be run as a layout test in order to see if resources were loaded and the test passed. 
+
+
+Frame: '-->'
+
+ </span></pre></div>
<a rel="nofollow" id="trunkLayoutTestsfastpreloaderiframesrcdochtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/preloader/iframe-srcdoc.html (0 => 192969)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/preloader/iframe-srcdoc.html	(rev 0)
+++ trunk/LayoutTests/fast/preloader/iframe-srcdoc.html	2015-12-02 22:41:21 UTC (rev 192969)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+<body>
+<script>
+if (window.testRunner) {
+testRunner.dumpChildFramesAsText();
+testRunner.dumpAsText();
+}
+
+
+This test has to be run as a layout test in order to see if resources were loaded and the test passed.
+


Modified: trunk/Source/WebCore/ChangeLog (192968 => 192969)

--- trunk/Source/WebCore/ChangeLog	2015-12-02 22:35:38 UTC (rev 192968)
+++ trunk/Source/WebCore/ChangeLog	2015-12-02 22:41:21 UTC (rev 192969)
@@ -1,3 +1,20 @@
+2015-12-02  Yoav Weiss  <y...@yoav.ws>
+
+Fix preloader issue with srcdoc documents.
+https://bugs.webkit.org/show_bug.cgi?id=151744
+
+Reviewed by Ryosuke Niwa.
+
+Make sure that PreloadRequest is resolving URLs based on the document's
+baseURL() rather than using url() as the base URL, which is not how URLs
+are resolved by the parser, and fails when document->url() diverges from
+the document's base URL (e.g. in the case of srcdoc based documents).
+
+Test: fast/preloader/iframe-srcdoc.html
+
+* html/parser/HTMLResourcePreloader.cpp:
+(WebCore::PreloadRequest::completeURL):
+
 2015-12-02  Jer Noble  <jer.no...@apple.com>
 
 Add a setting and restriction which will pause invisible autoplaying video


Modified: trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp (192968 => 192969)

--- trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp	2015-12-02 22:35:38 UTC (rev 192968)
+++ trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp	2015-12-02 22:41:21 UTC (rev 192969)
@@ -37,7 +37,7 @@
 
 URL PreloadRequest::completeURL(Document& document)
 {
-return document.completeURL(m_resourceURL, m_baseURL.isEmpty() ? document.url() : m_baseURL);
+return document.completeURL(m_resourceURL, m_baseURL.isEmpty() ? document.baseURL() : m_baseURL);
 }
 
 CachedResourceRequest PreloadRequest::resourceRequest(Document& document)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [192098] trunk

2015-11-06 Thread yoav
Title: [192098] trunk








Revision 192098
Author y...@yoav.ws
Date 2015-11-06 03:05:55 -0800 (Fri, 06 Nov 2015)


Log Message
Expose HTMLImageElement sizes attribute in IDL
https://bugs.webkit.org/show_bug.cgi?id=150230

Reviewed by Darin Adler.

No new tests, but fixed test expectations for exposed interfaces.

* html/HTMLImageElement.idl: Make sure that `sizes` is exposed as an IDL attribute, to ensure proper feature detection of sizes support.

Modified Paths

trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLImageElement.idl




Diff

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (192097 => 192098)

--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2015-11-06 11:00:23 UTC (rev 192097)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2015-11-06 11:05:55 UTC (rev 192098)
@@ -221,6 +221,7 @@
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'alt' on a non-HTMLImageElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'src' on a non-HTMLImageElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'srcset' on a non-HTMLImageElement object.
+CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'sizes' on a non-HTMLImageElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'crossOrigin' on a non-HTMLImageElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'useMap' on a non-HTMLImageElement object.
 CONSOLE MESSAGE: line 1152: Deprecated attempt to access property 'isMap' on a non-HTMLImageElement object.
@@ -2721,7 +2722,9 @@
 FAIL HTMLImageElement interface: attribute srcset assert_throws: getting property on prototype object must throw TypeError function "function () {
 [native code]
 }" did not throw
-FAIL HTMLImageElement interface: attribute sizes assert_true: The prototype object must have a property "sizes" expected true got false
+FAIL HTMLImageElement interface: attribute sizes assert_throws: getting property on prototype object must throw TypeError function "function () {
+[native code]
+}" did not throw
 FAIL HTMLImageElement interface: attribute crossOrigin assert_throws: getting property on prototype object must throw TypeError function "function () {
 [native code]
 }" did not throw
@@ -2773,7 +2776,7 @@
 PASS HTMLImageElement interface: document.createElement("img") must inherit property "alt" with the proper type (0) 
 PASS HTMLImageElement interface: document.createElement("img") must inherit property "src" with the proper type (1) 
 PASS HTMLImageElement interface: document.createElement("img") must inherit property "srcset" with the proper type (2) 
-FAIL HTMLImageElement interface: document.createElement("img") must inherit property "sizes" with the proper type (3) assert_inherits: property "sizes" not found in prototype chain
+PASS HTMLImageElement interface: document.createElement("img") must inherit property "sizes" with the proper type (3) 
 PASS HTMLImageElement interface: document.createElement("img") must inherit property "crossOrigin" with the proper type (4) 
 PASS HTMLImageElement interface: document.createElement("img") must inherit property "useMap" with the proper type (5) 
 PASS HTMLImageElement interface: document.createElement("img") must inherit property "isMap" with the proper type (6) 
@@ -2795,7 +2798,7 @@
 PASS HTMLImageElement interface: new Image() must inherit property "alt" with the proper type (0) 
 PASS HTMLImageElement interface: new Image() must inherit property "src" with the proper type (1) 
 PASS HTMLImageElement interface: new Image() must inherit property "srcset" with the proper type (2) 
-FAIL HTMLImageElement interface: new Image() must inherit property "sizes" with the proper type (3) assert_inherits: property "sizes" not found in prototype chain
+PASS HTMLImageElement interface: new Image() must inherit property "sizes" with the proper type (3) 
 PASS HTMLImageElement interface: new Image() must inherit property "crossOrigin" with the proper type (4) 
 PASS HTMLImageElement interface: new Image() must inherit property "useMap" with the proper type (5) 
 PASS HTMLImageElement interface: new Image() must inherit property "isMap" with the proper type (6) 


Modified: trunk/Source/WebCore/ChangeLog (192097 => 192098)

--- trunk/Source/WebCore/ChangeLog	2015-11-06 11:00:23 UTC (rev 192097)
+++ trunk/Source/WebCore/ChangeLog	2015-11-06 11:05:55 UTC (rev 192098)
@@ -1,3 +1,14 @@
+2015

[webkit-changes] [191334] trunk

2015-10-20 Thread yoav
Title: [191334] trunk








Revision 191334
Author y...@yoav.ws
Date 2015-10-20 02:49:46 -0700 (Tue, 20 Oct 2015)


Log Message
Rename the PICTURE_SIZES flag to CURRENTSRC
https://bugs.webkit.org/show_bug.cgi?id=150275

Reviewed by Dean Jackson.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/_javascript_Core:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests, since there is no functional change.

* Configurations/FeatureDefines.xcconfig:
* html/HTMLImageElement.cpp:
* html/HTMLImageElement.h:
* html/HTMLImageElement.idl:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

Modified Paths

trunk/ChangeLog
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/FeatureDefines.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
trunk/Source/WebCore/html/HTMLImageElement.cpp
trunk/Source/WebCore/html/HTMLImageElement.h
trunk/Source/WebCore/html/HTMLImageElement.idl
trunk/Source/WebKit/mac/ChangeLog
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig
trunk/Source/cmake/OptionsEfl.cmake
trunk/Source/cmake/OptionsGTK.cmake
trunk/Source/cmake/OptionsMac.cmake
trunk/Source/cmake/OptionsWin.cmake
trunk/Source/cmake/WebKitFeatures.cmake
trunk/Tools/ChangeLog
trunk/Tools/Scripts/webkitperl/FeatureList.pm
trunk/WebKitLibraries/ChangeLog
trunk/WebKitLibraries/win/tools/vsprops/FeatureDefines.props
trunk/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props




Diff

Modified: trunk/ChangeLog (191333 => 191334)

--- trunk/ChangeLog	2015-10-20 06:21:00 UTC (rev 191333)
+++ trunk/ChangeLog	2015-10-20 09:49:46 UTC (rev 191334)
@@ -1,3 +1,16 @@
+2015-10-20  Yoav Weiss  <y...@yoav.ws>
+
+Rename the PICTURE_SIZES flag to CURRENTSRC
+https://bugs.webkit.org/show_bug.cgi?id=150275
+
+Reviewed by Dean Jackson.
+
+* Source/cmake/OptionsEfl.cmake:
+* Source/cmake/OptionsGTK.cmake:
+* Source/cmake/OptionsMac.cmake:
+* Source/cmake/OptionsWin.cmake:
+* Source/cmake/WebKitFeatures.cmake:
+
 2015-10-14  Tomas Popela  <tpop...@redhat.com>
 
 [GTK][EFL] Fix build with cmake 3.4


Modified: trunk/Source/_javascript_Core/ChangeLog (191333 => 191334)

--- trunk/Source/_javascript_Core/ChangeLog	2015-10-20 06:21:00 UTC (rev 191333)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-10-20 09:49:46 UTC (rev 191334)
@@ -1,3 +1,12 @@
+2015-10-20  Yoav Weiss  <y...@yoav.ws>
+
+Rename the PICTURE_SIZES flag to CURRENTSRC
+https://bugs.webkit.org/show_bug.cgi?id=150275
+
+Reviewed by Dean Jackson.
+
+* Configurations/FeatureDefines.xcconfig:
+
 2015-10-19  Saam barati  <sbar...@apple.com>
 
 FTL should generate a unique OSR exit for each duplicated OSR exit stackmap intrinsic.


Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (191333 => 191334)

--- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2015-10-20 06:21:00 UTC (rev 191333)
+++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig	2015-10-20 09:49:46 UTC (rev 191334)
@@ -63,6 +63,7 @@
 ENABLE_CSS_SHAPES = ENABLE_CSS_SHAPES;
 ENABLE_CSS3_TEXT = ;
 ENABLE_CSS3_TEXT_LINE_BREAK = ;
+ENABLE_CURRENTSRC = ;
 ENABLE_CURSOR_VISIBILITY = ENABLE_CURSOR_VISIBILITY;
 ENABLE_CUSTOM_SCHEME_HANDLER = ;
 ENABLE_DASHBOARD_SUPPORT[sdk=macosx*] = ENABLE_DASHBOARD_SUPPORT;
@@ -158,7 +159,6 @@
 ENABLE_NOSNIFF = ;
 ENABLE_NOTIFICATIONS[sdk=macosx*] = ENABLE_NOTIFICATIONS;
 ENABLE_PDFKIT_PLUGIN[sdk=macosx*] = ENABLE_PDFKIT_PLUGIN;
-ENABLE_PICTURE_SIZES = ;
 ENABLE_POINTER_LOCK = ;
 ENABLE_PROXIMITY_EVENTS = ;
 ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
@@ -229,4 +229,4 @@
 
 ENABLE_SHADOW_DOM = ENABLE_SHADOW_DOM;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATI

[webkit-changes] [185501] trunk/Source/WebCore

2015-06-12 Thread yoav
Title: [185501] trunk/Source/WebCore








Revision 185501
Author y...@yoav.ws
Date 2015-06-12 06:17:09 -0700 (Fri, 12 Jun 2015)


Log Message
Fix the build when the PICTURE_SIZES flag is off
https://bugs.webkit.org/show_bug.cgi?id=145926

Reviewed by Csaba Osztrogonác.

No new tests since there's no functionality change.

* html/parser/HTMLPreloadScanner.cpp: Remove the guard around the definition of m_sizesAttribute.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (185500 => 185501)

--- trunk/Source/WebCore/ChangeLog	2015-06-12 12:58:36 UTC (rev 185500)
+++ trunk/Source/WebCore/ChangeLog	2015-06-12 13:17:09 UTC (rev 185501)
@@ -1,3 +1,14 @@
+2015-06-12  Yoav Weiss  y...@yoav.ws
+
+Fix the build when the PICTURE_SIZES flag is off
+https://bugs.webkit.org/show_bug.cgi?id=145926
+
+Reviewed by Csaba Osztrogonác.
+
+No new tests since there's no functionality change.
+
+* html/parser/HTMLPreloadScanner.cpp: Remove the guard around the definition of m_sizesAttribute.
+
 2015-06-12  Commit Queue  commit-qu...@webkit.org
 
 Unreviewed, rolling out r185492.


Modified: trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp (185500 => 185501)

--- trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp	2015-06-12 12:58:36 UTC (rev 185500)
+++ trunk/Source/WebCore/html/parser/HTMLPreloadScanner.cpp	2015-06-12 13:17:09 UTC (rev 185501)
@@ -235,9 +235,7 @@
 TagId m_tagId;
 String m_urlToLoad;
 String m_srcSetAttribute;
-#if ENABLE(PICTURE_SIZES)
 String m_sizesAttribute;
-#endif
 String m_charset;
 String m_crossOriginMode;
 bool m_linkIsStyleSheet;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes