[webkit-changes] [218244] trunk/Source/WebKit2

2017-06-13 Thread carlosgc
Title: [218244] trunk/Source/WebKit2








Revision 218244
Author carlo...@webkit.org
Date 2017-06-13 23:31:11 -0700 (Tue, 13 Jun 2017)


Log Message
Do not mix C and C++ API error constants
https://bugs.webkit.org/show_bug.cgi?id=173311

Reviewed by Alex Christensen.

In r214934 I added error constants to API::Error, but not for all errors exposed in the C API. Because of this
we are mixing both constants in WebErrors and in GTk+ WebKitPrivate.

* Shared/API/APIError.h:
* Shared/WebErrors.cpp:
(WebKit::blockedError):
(WebKit::blockedByContentBlockerError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::blockedByContentFilterError):
(WebKit::cannotShowMIMETypeError):
(WebKit::pluginWillHandleLoadError):
(WebKit::internalError):
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toWebKitError):
(toWebCoreError):

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/Shared/API/APIError.h
trunk/Source/WebKit2/Shared/WebErrors.cpp
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp




Diff

Modified: trunk/Source/WebKit2/ChangeLog (218243 => 218244)

--- trunk/Source/WebKit2/ChangeLog	2017-06-14 04:55:04 UTC (rev 218243)
+++ trunk/Source/WebKit2/ChangeLog	2017-06-14 06:31:11 UTC (rev 218244)
@@ -1,3 +1,27 @@
+2017-06-13  Carlos Garcia Campos  
+
+Do not mix C and C++ API error constants
+https://bugs.webkit.org/show_bug.cgi?id=173311
+
+Reviewed by Alex Christensen.
+
+In r214934 I added error constants to API::Error, but not for all errors exposed in the C API. Because of this
+we are mixing both constants in WebErrors and in GTk+ WebKitPrivate.
+
+* Shared/API/APIError.h:
+* Shared/WebErrors.cpp:
+(WebKit::blockedError):
+(WebKit::blockedByContentBlockerError):
+(WebKit::cannotShowURLError):
+(WebKit::interruptedForPolicyChangeError):
+(WebKit::blockedByContentFilterError):
+(WebKit::cannotShowMIMETypeError):
+(WebKit::pluginWillHandleLoadError):
+(WebKit::internalError):
+* UIProcess/API/gtk/WebKitPrivate.cpp:
+(toWebKitError):
+(toWebCoreError):
+
 2017-06-13  Matt Rajca  
 
 WebsitePolicies: let clients select specific autoplay quirks


Modified: trunk/Source/WebKit2/Shared/API/APIError.h (218243 => 218244)

--- trunk/Source/WebKit2/Shared/API/APIError.h	2017-06-14 04:55:04 UTC (rev 218243)
+++ trunk/Source/WebKit2/Shared/API/APIError.h	2017-06-14 06:31:11 UTC (rev 218244)
@@ -48,21 +48,55 @@
 return adoptRef(*new Error(error));
 }
 
+enum General {
+Internal = 300
+};
 static const WTF::String& webKitErrorDomain();
-enum Network { Cancelled = 302, FileDoesNotExist = 303 };
+
+enum Network {
+Cancelled = 302,
+FileDoesNotExist = 303
+};
 static const WTF::String& webKitNetworkErrorDomain();
+
+enum Policy {
+CannotShowMIMEType = 100,
+CannotShowURL = 101,
+FrameLoadInterruptedByPolicyChange = 102,
+CannotUseRestrictedPort = 103,
+FrameLoadBlockedByContentBlocker = 104,
+FrameLoadBlockedByContentFilter = 105
+};
 static const WTF::String& webKitPolicyErrorDomain();
+
+enum Plugin {
+CannotFindPlugIn = 200,
+CannotLoadPlugIn = 201,
+JavaUnavailable = 202,
+PlugInCancelledConnection = 203,
+PlugInWillHandleLoad = 204,
+InsecurePlugInVersion = 205
+};
 static const WTF::String& webKitPluginErrorDomain();
+
 #if USE(SOUP)
-enum Download { Transport = 499, CancelledByUser = 400, Destination = 401 };
+enum Download {
+Transport = 499,
+CancelledByUser = 400,
+Destination = 401
+};
 static const WTF::String& webKitDownloadErrorDomain();
 #endif
+
 #if PLATFORM(GTK)
-enum Print { General = 599, PrinterNotFound = 500, InvalidPageRange = 501 };
+enum Print {
+General = 599,
+PrinterNotFound = 500,
+InvalidPageRange = 501
+};
 static const WTF::String& webKitPrintErrorDomain();
 #endif
 
-
 const WTF::String& domain() const { return m_platformError.domain(); }
 int errorCode() const { return m_platformError.errorCode(); }
 const WTF::String& failingURL() const { return m_platformError.failingURL(); }


Modified: trunk/Source/WebKit2/Shared/WebErrors.cpp (218243 => 218244)

--- trunk/Source/WebKit2/Shared/WebErrors.cpp	2017-06-14 04:55:04 UTC (rev 218243)
+++ trunk/Source/WebKit2/Shared/WebErrors.cpp	2017-06-14 06:31:11 UTC (rev 218244)
@@ -27,7 +27,6 @@
 #include "WebErrors.h"
 
 #include "APIError.h"
-#include "WKErrorRef.h"
 #include 
 #include 
 #include 
@@ -38,44 +37,44 @@
 
 ResourceError blockedError(const ResourceRequest& request)
 {
-return ResourceError(API::Error::webKitPolicyErrorDomain(), kWKErrorCodeCannotUseRestrictedPort, request.url(), WEB_UI_STRING("Not allowed to use restricted network port", "WebKitErrorCannotUseRestrictedPort 

[webkit-changes] [218243] trunk/Source/WebInspectorUI

2017-06-13 Thread nvasilyev
Title: [218243] trunk/Source/WebInspectorUI








Revision 218243
Author nvasil...@apple.com
Date 2017-06-13 21:55:04 -0700 (Tue, 13 Jun 2017)


Log Message
Web Inspector: Console: Message icons overlay source location
https://bugs.webkit.org/show_bug.cgi?id=173291

Reviewed by Matt Baker.

* UserInterface/Views/ConsoleMessageView.css:
(.console-message-location.call-frame):
This should be a safe change since a method name and a source link already have
max-width set to 20vw and 30vw respectively.

Modified Paths

trunk/Source/WebInspectorUI/ChangeLog
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css




Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (218242 => 218243)

--- trunk/Source/WebInspectorUI/ChangeLog	2017-06-14 03:48:23 UTC (rev 218242)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-06-14 04:55:04 UTC (rev 218243)
@@ -1,5 +1,17 @@
 2017-06-13  Nikita Vasilyev  
 
+Web Inspector: Console: Message icons overlay source location
+https://bugs.webkit.org/show_bug.cgi?id=173291
+
+Reviewed by Matt Baker.
+
+* UserInterface/Views/ConsoleMessageView.css:
+(.console-message-location.call-frame):
+This should be a safe change since a method name and a source link already have
+max-width set to 20vw and 30vw respectively.
+
+2017-06-13  Nikita Vasilyev  
+
 Web Inspector: Don't use -webkit-user-modify CSS property
 https://bugs.webkit.org/show_bug.cgi?id=173232
 


Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css (218242 => 218243)

--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css	2017-06-14 03:48:23 UTC (rev 218242)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css	2017-06-14 04:55:04 UTC (rev 218243)
@@ -246,7 +246,7 @@
 
 .console-message-location.call-frame {
 display: inline-block;
-max-width: 50vw;
+max-width: 100%;
 max-height: 16px;
 overflow: hidden;
 text-overflow: ellipsis;






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


[webkit-changes] [218242] trunk

2017-06-13 Thread cdumez
Title: [218242] trunk








Revision 218242
Author cdu...@apple.com
Date 2017-06-13 20:48:23 -0700 (Tue, 13 Jun 2017)


Log Message
Event handlers should not be called in frameless documents
https://bugs.webkit.org/show_bug.cgi?id=173233

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that it is passing.

* web-platform-tests/html/webappapis/scripting/events/uncompiled_event_handler_with_scripting_disabled-expected.txt:

Source/WebCore:

As per the HTML specification [1], for event handlers on elements, we should use the
element's document to check if scripting is disabled [2]. Scripting is considered to
be disabled if the document has no browsing context (i.e. a frame in WebKit terms).

In JSLazyEventListener::initializeJSFunction(), instead of using the element's
document to do the checks, we would use the script execution context. In most cases,
a node's document and its script execution context are the same so this is not an
issue. However, if the node's document is a document created via JS, its nodes'
script execution context will be the document's context document (i.e the one that
created the document, see implementation of Node::scriptExecutionContext()). In those
cases, using the wrong document is an issue because the document's context document
(aka script execution context) may allow scripting but we still do not want to call
the event handler because its document is frameless.

This impacts documents created by JS, using the following APIs:
- DOMParser.parseFromHTML
- new Document()
- DOMImplementation.createDocument / createHTMLDocument
- XHRs whose responseType is Document.

[1] https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler (step 1.1.)
[2] https://html.spec.whatwg.org/multipage/webappapis.html#concept-n-noscript

Tests: fast/events/event-handler-detached-document-dispatchEvent.html
   fast/events/event-handler-detached-document.html

* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):

LayoutTests:

Extend layout test coverage.

* fast/events/event-handler-detached-document-dispatchEvent-expected.txt: Added.
* fast/events/event-handler-detached-document-dispatchEvent.html: Added.
* fast/events/event-handler-detached-document-expected.txt: Added.
* fast/events/event-handler-detached-document.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/uncompiled_event_handler_with_scripting_disabled-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp


Added Paths

trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent-expected.txt
trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent.html
trunk/LayoutTests/fast/events/event-handler-detached-document-expected.txt
trunk/LayoutTests/fast/events/event-handler-detached-document.html




Diff

Modified: trunk/LayoutTests/ChangeLog (218241 => 218242)

--- trunk/LayoutTests/ChangeLog	2017-06-14 02:44:08 UTC (rev 218241)
+++ trunk/LayoutTests/ChangeLog	2017-06-14 03:48:23 UTC (rev 218242)
@@ -1,3 +1,17 @@
+2017-06-13  Chris Dumez  
+
+Event handlers should not be called in frameless documents
+https://bugs.webkit.org/show_bug.cgi?id=173233
+
+Reviewed by Sam Weinig.
+
+Extend layout test coverage.
+
+* fast/events/event-handler-detached-document-dispatchEvent-expected.txt: Added.
+* fast/events/event-handler-detached-document-dispatchEvent.html: Added.
+* fast/events/event-handler-detached-document-expected.txt: Added.
+* fast/events/event-handler-detached-document.html: Added.
+
 2017-06-13  Antoine Quint  
 
 Rebaseline media/modern-media-controls/placard-support


Added: trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent-expected.txt (0 => 218242)

--- trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent-expected.txt	2017-06-14 03:48:23 UTC (rev 218242)
@@ -0,0 +1,13 @@
+ALERT: PASS
+Tests that event handlers are not called in detached documents, even if the event is dispatched by _javascript_. This test passes if you do not see a FAIL alert message.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS video.__proto__ is HTMLVideoElement.prototype
+PASS video.__proto__ is HTMLVideoElement.prototype
+Adopting node into a document that has a frame
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent.html (0 => 218242)

--- trunk/LayoutTests/fast/events/event-handler-detached-document-dispatchEvent.html	(rev 0)
+++ trunk/La

[webkit-changes] [218241] trunk

2017-06-13 Thread graouts
Title: [218241] trunk








Revision 218241
Author grao...@webkit.org
Date 2017-06-13 19:44:08 -0700 (Tue, 13 Jun 2017)


Log Message
Rebaseline media/modern-media-controls/placard-support
https://bugs.webkit.org/show_bug.cgi?id=173340

Reviewed by Dean Jackson.

Source/WebCore:

We make a source change to use a "placard" getter/setter to show or hide a placard, making it
more convenient to test whether a placard has been set.

* Modules/modern-media-controls/controls/inline-media-controls.js:
(InlineMediaControls.prototype.get placard):
(InlineMediaControls.prototype.set placard):
(InlineMediaControls.prototype.showPlacard): Deleted.
(InlineMediaControls.prototype.hidePlacard): Deleted.
* Modules/modern-media-controls/media/placard-support.js:
(PlacardSupport.prototype._updatePlacard):
(PlacardSupport):

LayoutTests:

We update tests to use the new "placard" property rather than "showsPlacard" which this patch removes.

* media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
* media/modern-media-controls/placard-support/placard-support-airplay.html:
* media/modern-media-controls/placard-support/placard-support-error-expected.txt:
* media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt:
* media/modern-media-controls/placard-support/placard-support-error-recover.html:
* media/modern-media-controls/placard-support/placard-support-error.html:
* media/modern-media-controls/placard-support/placard-support-pip-expected.txt:
* media/modern-media-controls/placard-support/placard-support-pip.html:
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html
trunk/LayoutTests/media/modern-media-controls/pip-placard/pip-placard-text-section.html
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay-expected.txt
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-airplay.html
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-expected.txt
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error-recover.html
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-error.html
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip-expected.txt
trunk/LayoutTests/media/modern-media-controls/placard-support/placard-support-pip.html
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/modern-media-controls/controls/inline-media-controls.js
trunk/Source/WebCore/Modules/modern-media-controls/media/placard-support.js




Diff

Modified: trunk/LayoutTests/ChangeLog (218240 => 218241)

--- trunk/LayoutTests/ChangeLog	2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/ChangeLog	2017-06-14 02:44:08 UTC (rev 218241)
@@ -1,5 +1,25 @@
 2017-06-13  Antoine Quint  
 
+Rebaseline media/modern-media-controls/placard-support
+https://bugs.webkit.org/show_bug.cgi?id=173340
+
+Reviewed by Dean Jackson.
+
+We update tests to use the new "placard" property rather than "showsPlacard" which this patch removes.
+
+* media/modern-media-controls/placard-support/placard-support-airplay-expected.txt:
+* media/modern-media-controls/placard-support/placard-support-airplay.html:
+* media/modern-media-controls/placard-support/placard-support-error-expected.txt:
+* media/modern-media-controls/placard-support/placard-support-error-recover-expected.txt:
+* media/modern-media-controls/placard-support/placard-support-error-recover.html:
+* media/modern-media-controls/placard-support/placard-support-error.html:
+* media/modern-media-controls/placard-support/placard-support-pip-expected.txt:
+* media/modern-media-controls/placard-support/placard-support-pip.html:
+* platform/ios-simulator/TestExpectations:
+* platform/mac/TestExpectations:
+
+2017-06-13  Antoine Quint  
+
 Rebaseline media/modern-media-controls/mute-support
 https://bugs.webkit.org/show_bug.cgi?id=173345
 


Modified: trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html (218240 => 218241)

--- trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html	2017-06-14 02:39:02 UTC (rev 218240)
+++ trunk/LayoutTests/media/modern-media-controls/airplay-placard/airplay-placard-text-section.html	2017-06-14 02:44:08 UTC (rev 218241)
@@ -9,7 +9,7 @@
 description("Testing that text selection is turned off for AirplayPlacard.");
 
 const mediaControls = new MacOSInlineMediaControls({ width: 600, height: 3

[webkit-changes] [218240] trunk/LayoutTests

2017-06-13 Thread graouts
Title: [218240] trunk/LayoutTests








Revision 218240
Author grao...@webkit.org
Date 2017-06-13 19:39:02 -0700 (Tue, 13 Jun 2017)


Log Message
Rebaseline media/modern-media-controls/mute-support
https://bugs.webkit.org/show_bug.cgi?id=173345

Reviewed by Dean Jackson.

* media/modern-media-controls/mute-support/mute-support-press-on-button-expected.txt: Renamed from LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt.
* media/modern-media-controls/mute-support/mute-support-press-on-button.html: Renamed from LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/ios-simulator/TestExpectations
trunk/LayoutTests/platform/mac/TestExpectations


Added Paths

trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-press-on-button-expected.txt
trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-press-on-button.html


Removed Paths

trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt
trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html




Diff

Modified: trunk/LayoutTests/ChangeLog (218239 => 218240)

--- trunk/LayoutTests/ChangeLog	2017-06-14 01:30:11 UTC (rev 218239)
+++ trunk/LayoutTests/ChangeLog	2017-06-14 02:39:02 UTC (rev 218240)
@@ -1,5 +1,17 @@
 2017-06-13  Antoine Quint  
 
+Rebaseline media/modern-media-controls/mute-support
+https://bugs.webkit.org/show_bug.cgi?id=173345
+
+Reviewed by Dean Jackson.
+
+* media/modern-media-controls/mute-support/mute-support-press-on-button-expected.txt: Renamed from LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt.
+* media/modern-media-controls/mute-support/mute-support-press-on-button.html: Renamed from LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html.
+* platform/ios-simulator/TestExpectations:
+* platform/mac/TestExpectations:
+
+2017-06-13  Antoine Quint  
+
 Rebaseline media/modern-media-controls/tracks-button
 https://bugs.webkit.org/show_bug.cgi?id=173220
 


Deleted: trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt (218239 => 218240)

--- trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt	2017-06-14 01:30:11 UTC (rev 218239)
+++ trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click-expected.txt	2017-06-14 02:39:02 UTC (rev 218240)
@@ -1,23 +0,0 @@
-Testing the MuteSupport behavior by clicking on the mute button.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS mediaController.controls.muteButton.muted is false
-
-Dispatching click event to the mute button
-
-volumechange event was dispatched
-PASS media.muted is true
-PASS mediaController.controls.muteButton.muted is true
-
-Dispatching click event to the mute button
-
-volumechange event was dispatched
-PASS media.muted is false
-PASS mediaController.controls.muteButton.muted is false
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-


Deleted: trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html (218239 => 218240)

--- trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html	2017-06-14 01:30:11 UTC (rev 218239)
+++ trunk/LayoutTests/media/modern-media-controls/mute-support/mute-support-button-click.html	2017-06-14 02:39:02 UTC (rev 218240)
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-window.jsTestIsAsync = true;
-
-description("Testing the MuteSupport behavior by clicking on the mute button.");
-
-const shadowRoot = document.querySelector("div#shadow").attachShadow({ mode: "open" });
-const media = document.querySelector("video");
-const mediaController = createControls(shadowRoot, media, null);
-
-shouldBeFalse("mediaController.controls.muteButton.muted");
-
-let numberOfEvents = 0;
-media.addEventListener("volumechange", function() {
-debug("");
-debug("volumechange event was dispatched");
-
-numberOfEvents++;
-
-if (numberOfEvents == 1) {
-shouldBeTrue("media.muted");
-shouldBeTrue("mediaController.controls.muteButton.muted");
-clickMuteButton();
-} else if (numberOfEvents == 2) {
-shouldBeFalse("media.muted");
-shouldBeFalse("mediaController.controls.muteButton.muted");
-debug("");
-shadowRoot.host.remove();
-media.remove();
-finishJSTest();
-}
-});
-
-function clickMuteButton()
-{
-debug("");
-debug("Dispatching click event to the mute button");
-mediaController.controls.muteButton.element.click();
-}
-
-clickMuteButton();
-
-
-