WebKit-https.git
2 years agoAllow PAL to log messages
mmaxfield@apple.com [Wed, 11 Oct 2017 20:30:16 +0000 (20:30 +0000)]
Allow PAL to log messages
https://bugs.webkit.org/show_bug.cgi?id=171523

Reviewed by Alex Christensen.

Source/WebCore:

Make the model of WebCore/PAL match the model of WebKit/WebCore. This is because PAL will
need to log things (because existing files in WebCore/platform need to log things).

No new tests because there is no behavior change.

* WebCore.xcodeproj/project.pbxproj:
* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
* platform/Logging.cpp:
(WebCore::registerNotifyCallback): Deleted.
* platform/Logging.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/CMakeLists.txt:
* pal/LogInitialization.h: Copied from Source/WebCore/platform/LogMacros.h.
* pal/LogMacros.h: Copied from Source/WebCore/platform/LogMacros.h.
* pal/Logging.cpp: Copied from Source/WebCore/platform/Logging.cpp.
(PAL::isLogChannelEnabled):
(PAL::setLogChannelToAccumulate):
(PAL::initializeLogChannelsIfNecessary):
(PAL::registerNotifyCallback):
* pal/Logging.h: Copied from Source/WebCore/platform/LogMacros.h.
* pal/PlatformMac.cmake:
* pal/cocoa/LoggingCocoa.mm: Renamed from Source/WebCore/platform/LogMacros.h.
(PAL::logLevelString):

Source/WebKit:

* Platform/Logging.h:
* Scripts/generate-forwarding-headers.pl:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223206 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix build with some SDKs.
cdumez@apple.com [Wed, 11 Oct 2017 20:16:37 +0000 (20:16 +0000)]
Unreviewed, fix build with some SDKs.

Stop capturing |this| unnecessarily in lambda.

* Modules/entriesapi/FileSystemDirectoryEntry.cpp:
(WebCore::FileSystemDirectoryEntry::getEntry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223205 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix build with some SDKs.
cdumez@apple.com [Wed, 11 Oct 2017 19:51:29 +0000 (19:51 +0000)]
Unreviewed, fix build with some SDKs.

Stop capturing |this| unnecessarily in lambda.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::getFile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223204 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRe-sync XMLHttpRequests Web-Platform-Tests
cdumez@apple.com [Wed, 11 Oct 2017 19:40:31 +0000 (19:40 +0000)]
Re-sync XMLHttpRequests Web-Platform-Tests
https://bugs.webkit.org/show_bug.cgi?id=178172

Reviewed by Youenn Fablet.

Re-sync XMLHttpRequests Web-Platform-Tests from upstream 2f76ef2c1d.

* resources/import-expectations.json:
* web-platform-tests/XMLHttpRequest/abort-after-stop-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/abort-after-stop.htm: Added.
* web-platform-tests/XMLHttpRequest/event-error-order.sub-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-error-order.sub.html: Added.
* web-platform-tests/XMLHttpRequest/event-timeout-order-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-timeout-order.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-worker-origin-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-worker-origin.htm: Added.
* web-platform-tests/XMLHttpRequest/preserve-ua-header-on-redirect-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/preserve-ua-header-on-redirect.htm: Added.
* web-platform-tests/XMLHttpRequest/responsedocument-decoding-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/responsedocument-decoding.htm: Added.
* web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt:
* web-platform-tests/XMLHttpRequest/responsetext-decoding.htm:
* web-platform-tests/XMLHttpRequest/send-after-setting-document-domain-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-after-setting-document-domain.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords.htm: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-basic-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-entity-body-basic.htm: Added.
* web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub.htm: Added.
* web-platform-tests/XMLHttpRequest/w3c-import.log:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223203 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223113 and r223121.
commit-queue@webkit.org [Wed, 11 Oct 2017 19:33:48 +0000 (19:33 +0000)]
Unreviewed, rolling out r223113 and r223121.
https://bugs.webkit.org/show_bug.cgi?id=178182

Reintroduced 20% regression on Kraken (Requested by rniwa on
#webkit).

Reverted changesets:

"Enable gigacage on iOS"
https://bugs.webkit.org/show_bug.cgi?id=177586
https://trac.webkit.org/changeset/223113

"Use one virtual allocation for all gigacages and their
runways"
https://bugs.webkit.org/show_bug.cgi?id=178050
https://trac.webkit.org/changeset/223121

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223202 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDisable test262 named capture group tests with direct unicode names and with referenc...
msaboff@apple.com [Wed, 11 Oct 2017 19:24:40 +0000 (19:24 +0000)]
Disable test262 named capture group tests with direct unicode names and with references before definitions
https://bugs.webkit.org/show_bug.cgi?id=178177

Reviewed by Keith Miller.

Bugs to track fixing these test are:
https://bugs.webkit.org/show_bug.cgi?id=178174 -
    "Add support in named capture group identifiers for direct surrogate pairs"
https://bugs.webkit.org/show_bug.cgi?id=178175 -
    "Test262 failure with Named Capture Groups - using a reference before the group is defined"

* test262.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223201 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExtract logic to paint composition underlines to its own function
dbates@webkit.org [Wed, 11 Oct 2017 19:18:09 +0000 (19:18 +0000)]
Extract logic to paint composition underlines to its own function
https://bugs.webkit.org/show_bug.cgi?id=178038

Reviewed by Zalan Bujtas.

No functionality changed. So, no new tests.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Modified to call paintCompositionUnderlines().
(WebCore::InlineTextBox::paintCompositionUnderlines const): Added; extract code
from InlineTextBox::paint() and modernized it.
(WebCore::InlineTextBox::paintCompositionUnderline const): Added.
(WebCore::InlineTextBox::paintCompositionUnderline): Deleted; made const.
* rendering/InlineTextBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223198 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate JavaScriptCore/ucd/CaseFolding.txt to Unicode database 10.0
msaboff@apple.com [Wed, 11 Oct 2017 19:13:59 +0000 (19:13 +0000)]
Update JavaScriptCore/ucd/CaseFolding.txt to Unicode database 10.0
https://bugs.webkit.org/show_bug.cgi?id=178106

Reviewed by Keith Miller.

* ucd/CaseFolding.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223197 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoInlineTextBox::isSelected() should only return true for a non-empty selection
dbates@webkit.org [Wed, 11 Oct 2017 19:13:07 +0000 (19:13 +0000)]
InlineTextBox::isSelected() should only return true for a non-empty selection
and remove incorrect FIXME from InlineTextBox::localSelectionRect()
https://bugs.webkit.org/show_bug.cgi?id=160786

Reviewed by Zalan Bujtas.

Partial revert of r204400 in InlineTextBox::{isSelected, localSelectionRect}().

The function InlineTextBox::isSelected() should only return true for a non-empty selection.
Also remove an incorrect FIXME added to InlineTextBox::localSelectionRect() that questioned
whether it was correct for it to return an empty rectangle. It is correct for it to return
such a rectangle because this function is used to implement Element.getClientRects(). And
Element.getClientRects() can return a rectangle with zero width or zero height by step 3
of algorithm getClientRects() of section Extensions to the Element interface of the
CSSOM View Module spec., <https://drafts.csswg.org/cssom-view/> (Editor's Draft, 15 September 2017).

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::isSelected const): Only return true for a non-empty selection
and remove unnecessary FIXME. Also rename variables to improve readability.
(WebCore::InlineTextBox::localSelectionRect const): Remove inaccurate FIXME comment.
* rendering/InlineTextBox.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223196 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSanitize URL in pasteboard for other applications and cross origin content
rniwa@webkit.org [Wed, 11 Oct 2017 19:01:10 +0000 (19:01 +0000)]
Sanitize URL in pasteboard for other applications and cross origin content
https://bugs.webkit.org/show_bug.cgi?id=178060
<rdar://problem/34874518>

Reviewed by Wenson Hsieh.

Source/WebCore:

This patch introduces the sanitization of URL when written from a web content to prevent web content from
exploiting the URL parser of other applications in the system particularly of those that actively monitor
system pasteboard (a.k.a. clipboard on non-Cocoa platforms) and decode or otherwise process URLs.

Because the Web compatibility requires that DataTransfer exposes the original URL to any document in the
same origin as the one which wrote the URL into the pasteboard, we store a string which uniquely identifies
the origin of an originating document into our custom pasteboard data. Note that we expose any URL which
didn't come from WebKit since we don't expect URLs to reveal privacy sensitive information. We use UUID for
the origin identifier of a null origin document.

An alternative approach is to store the pasteboard data from the same origin into the document and invalidate
it when the system pasteboard changes. However, Pasteboard object cannot know about Document (as Pasteboard
is a platform object and Document is a WebCore object), this turns out be quite tricky as there are multiple
places where we create Pasteboard objects, and they all need to be aware of this special same origin
Pasteboard object that hangs off of Document. Also, this approach would result in the same origin code paths
to diverge between null origin and non-null origin documents.

Tests: editing/pasteboard/data-transfer-get-data-on-copying-pasting-malformed-url-in-same-document.html
       editing/pasteboard/data-transfer-set-data-ignore-copied-walformed-url-in-null-origin.html
       editing/pasteboard/data-transfer-set-data-sanitlize-url-when-copying-in-null-origin.html
       editing/pasteboard/data-transfer-set-data-sanitlize-url-when-dragging-in-null-origin.html
       http/tests/security/clipboard/copy-paste-url-across-origin-sanitizes-url.html
       CopyURL.ValidURL
       CopyURL.UnescapedURL
       CopyURL.MalformedURL
       DataInteractionTests.DataTransferSetDataValidURL
       DataInteractionTests.DataTransferSetDataUnescapedURL
       DataInteractionTests.DataTransferSetDataInvalidURL

* dom/DataTransfer.cpp:
(WebCore::originForDocument): Extracted from createForCopyAndPaste.
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::getDataForItem const): Read the URL from the custom data when the originating content
is of the same origin. When the originating content is cross origin, or there is no custom data (e.g. written
by another native application; or sanitization didn't result in any difference), then callback to native value.
(WebCore::DataTransfer::setDataFromItemList): Sanitize the URL before writing it to the native pasteboard.
Store the original value if the sanitization resulted in any difference.
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::commitToPasteboard): Moved the code to write custom data to Pasteboard since we need
to write the origin string with it.
(WebCore::DataTransfer::createForDragStartEvent): Added Document as an argument to compute the origin string.
(WebCore::DataTransfer::createForDrop): Ditto.
(WebCore::DataTransfer::createForUpdatingDropTarget):
(WebCore::DataTransfer::moveDragState):
* dom/DataTransfer.h:
* dom/Document.cpp:
(WebCore::Document::uniqueIdentifier): Added. See above.
* dom/Document.h:
* editing/Editor.cpp:
(WebCore::createDataTransferForClipboardEvent):
(WebCore::dispatchClipboardEvent):
* page/DragController.cpp:
(WebCore::DragController::dispatchTextInputEventFor):
* page/EventHandler.cpp:
(WebCore::EventHandler::performDragAndDrop):
(WebCore::EventHandler::handleDrag):
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/StaticPasteboard.cpp:
(WebCore::StaticPasteboard::takeCustomData): Moved the logic to write to native pasteboard to DataTransfer.
* platform/StaticPasteboard.h:
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::typesSafeForBindings):
(WebCore::Pasteboard::readStringInCustomData): Rewritten using readCustomData. See below.
(WebCore::Pasteboard::readOrigin): Added.
(WebCore::Pasteboard::readCustomData): Added. Populates the cache. Because a single Pasteboard object is never
allowed to read values once its content is updated by other applications, we can permanently cache the result.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::typesSafeForBindings): Now takes the unused origin string.
(WebCore::Pasteboard::readOrigin): Added.
* platform/gtk/PlatformPasteboardGtk.cpp:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Now takes the unused origin string.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::originKeyKeyForTeamData): Added.
(WebCore::customTypesKeyForTeamData): Added. Replaces the use of PasteboardCustomData::cocoaType() in the team
data for clarity since the team data key isn't same as the pasteboard type. We don't have to worry about the
backwards compatibility since drag & drop session doesn't persist across iOS upgrades, and there is no publicly
released iOS with this team data support.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Read the origin string and the custom data
off the team data. Don't expose custom types that are written by cross origin documents.
(WebCore::PlatformPasteboard::write): Add the orign string with custom pasteboard types in the team data.
(WebCore::PlatformPasteboard::readURL): Fixed a bug that this function was not reading NSURL when UIPasteboard
serializes NSURL as a plist. This code is exercised by CopyURL.ValidURL.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Don't add custom pasteboard types that are
added by cross origin documents.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::typesSafeForBindings): Now takes the unused origin string.
(WebCore::Pasteboard::readOrigin): Added.
* platform/wpe/PasteboardWPE.cpp:
(WebCore::Pasteboard::typesSafeForBindings): Now takes the unused origin string.
(WebCore::Pasteboard::readOrigin): Added.
* platform/wpe/PlatformPasteboardWPE.cpp:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Now takes the unused origin string.

Source/WebKit:

Plubmed the origin identifier through IPC from Pasteboard in WebContent process to PlatformPasteboard in UIProcess.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
* UIProcess/WebPasteboardProxy.cpp:
(WebKit::WebPasteboardProxy::typesSafeForDOMToReadAndWrite):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::typesSafeForDOMToReadAndWrite):

Tools:

Added API tests for sanitizing URLs copied from web content, and that the original URL is exposed to the web content.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm: Added.
(readURLFromPasteboard): A helper function.
* TestWebKitAPI/Tests/WebKitCocoa/copy-url.html: Added.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(DataInteractionTests.DataTransferGetDataWhenDroppingCustomData): Rebaselined. https://www.apple.com is no longer
normalized to https://www.apple.com/ by NSURL / UIPasteboard as expected.
(DataInteractionTests.DataTransferSetDataValidURL): Added.
(DataInteractionTests.DataTransferSetDataUnescapedURL): Added.
(DataInteractionTests.qDataTransferSetDataInvalidURL): Added.

LayoutTests:

Added tests for copying & pasting URLs. URLs should be %-escaped and any invalid URL should be stripped away and
invisible to a cross-origin content or a null origin document but the same origin content should have access to
its original form.

* TestExpectations:
* editing/pasteboard/data-transfer-get-data-on-copying-pasting-malformed-url-in-same-document-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-copying-pasting-malformed-url-in-same-document.html: Added.
* editing/pasteboard/data-transfer-get-data-on-drop-custom-expected.txt: Rebaselined. We no longer normalize
"https://www.apple.com" into "https://www.apple.com/" by NSURL / UIPasteboard within the same origin content.
* editing/pasteboard/data-transfer-get-data-on-paste-custom-expected.txt: Ditto.
* editing/pasteboard/data-transfer-set-data-ignore-copied-walformed-url-in-null-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-ignore-copied-walformed-url-in-null-origin-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-ignore-copied-walformed-url-in-null-origin.html: Added.
* editing/pasteboard/data-transfer-set-data-sanitlize-url-when-copying-in-null-origin-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-sanitlize-url-when-copying-in-null-origin.html: Added.
* editing/pasteboard/data-transfer-set-data-sanitlize-url-when-dragging-in-null-origin-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-sanitlize-url-when-dragging-in-null-origin.html: Added.
* editing/pasteboard/dataTransfer-setData-getData-expected.txt: Rebaselined. More test cases are passing.
* editing/pasteboard/dataTransfer-setData-getData.html: Updated expectations as the original URL is now preserved.
* http/tests/security/clipboard/copy-paste-url-across-origin-sanitizes-url-expected.txt: Added.
* http/tests/security/clipboard/copy-paste-url-across-origin-sanitizes-url.html: Added.
* http/tests/security/clipboard/resources/copy.html: Added.
* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223195 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove some obsolete layout assertions
antti@apple.com [Wed, 11 Oct 2017 18:32:58 +0000 (18:32 +0000)]
Remove some obsolete layout assertions
https://bugs.webkit.org/show_bug.cgi?id=178170

Reviewed by Zalan Bujtas.

We have strong assertions against render tree mutation functions being called in layout. These are unnecessary.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildTo):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::takeChildInternal):
* rendering/RenderElement.h:
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::layout):
* rendering/RenderListItem.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223194 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Payment Request] Implement Apple Pay merchant validation
aestes@apple.com [Wed, 11 Oct 2017 17:48:26 +0000 (17:48 +0000)]
[Payment Request] Implement Apple Pay merchant validation
https://bugs.webkit.org/show_bug.cgi?id=178159

Reviewed by Brady Eidson.

Source/WebCore:

When ApplePayPaymentHandler::validateMerchant() is called, dispatch the
applepayvalidatemerchant event to the PaymentRequest object.

The event object is an ApplePayMerchantValidationEvent, on which the client calls complete()
with a merchant session.

Test: http/tests/ssl/applepay/ApplePayMerchantValidationEvent.https.html

* DerivedSources.make:
* Modules/applepay/ApplePayValidateMerchantEvent.h:
* Modules/applepay/paymentrequest/ApplePayMerchantValidationEvent.cpp: Added.
(WebCore::ApplePayMerchantValidationEvent::create):
(WebCore::ApplePayMerchantValidationEvent::ApplePayMerchantValidationEvent):
(WebCore::ApplePayMerchantValidationEvent::complete):
(WebCore::ApplePayMerchantValidationEvent::eventInterface const):
* Modules/applepay/paymentrequest/ApplePayMerchantValidationEvent.h: Added.
* Modules/applepay/paymentrequest/ApplePayMerchantValidationEvent.idl: Added.
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::validateMerchant):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
* Modules/paymentrequest/PaymentRequest.idl:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.h:
* dom/EventNames.in:
* testing/Internals.cpp:
(WebCore::Internals::Internals):
* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::MockPaymentCoordinator):
(WebCore::MockPaymentCoordinator::showPaymentUI):
* testing/MockPaymentCoordinator.h:

LayoutTests:

* http/tests/ssl/applepay/ApplePayMerchantValidationEvent.https-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayMerchantValidationEvent.https.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223193 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoModernize Geolocation code
cdumez@apple.com [Wed, 11 Oct 2017 17:41:59 +0000 (17:41 +0000)]
Modernize Geolocation code
https://bugs.webkit.org/show_bug.cgi?id=178148

Reviewed by Ryosuke Niwa.

Source/WebCore:

Modernize Geolocation code:
- Use std::optional<> instead of separate boolean members
- Make GeolocationPosition a simple struct that can be passed via IPC
- Replace WebGeolocationPosition::Data with GeolocationPosition
- Move logic to construct a GeolocationPosition from a CLLocation on iOS
  in one place to avoid code duplication.

* Modules/geolocation/Coordinates.cpp:
(WebCore::Coordinates::Coordinates):
* Modules/geolocation/Coordinates.h:
(WebCore::Coordinates::create):
(WebCore::Coordinates::isolatedCopy const):
(WebCore::Coordinates::latitude const):
(WebCore::Coordinates::longitude const):
(WebCore::Coordinates::altitude const):
(WebCore::Coordinates::accuracy const):
(WebCore::Coordinates::altitudeAccuracy const):
(WebCore::Coordinates::heading const):
(WebCore::Coordinates::speed const):
* Modules/geolocation/Geolocation.cpp:
(WebCore::createGeoposition):
(WebCore::Geolocation::lastPosition):
* Modules/geolocation/GeolocationClient.h:
* Modules/geolocation/GeolocationController.cpp:
(WebCore::GeolocationController::positionChanged):
(WebCore::GeolocationController::lastPosition):
* Modules/geolocation/GeolocationController.h:
* Modules/geolocation/GeolocationPosition.h:
(WebCore::GeolocationPosition::GeolocationPosition):
The default constructor is only needed by our IPC decoding code.

(WebCore::GeolocationPosition::encode const):
(WebCore::GeolocationPosition::decode):
* Modules/geolocation/ios/GeolocationPositionIOS.mm: Copied from Source/WebCore/Modules/geolocation/Coordinates.cpp.
(WebCore::GeolocationPosition::GeolocationPosition):
* WebCore.xcodeproj/project.pbxproj:
* platform/mock/GeolocationClientMock.cpp:
(WebCore::GeolocationClientMock::lastPosition):
(WebCore::GeolocationClientMock::controllerTimerFired):
* platform/mock/GeolocationClientMock.h:

Source/WebKit:

* Shared/WebGeolocationPosition.cpp:
(WebKit::WebGeolocationPosition::create):
(WebKit::WebGeolocationPosition::~WebGeolocationPosition):
* Shared/WebGeolocationPosition.h:
(WebKit::WebGeolocationPosition::timestamp const):
(WebKit::WebGeolocationPosition::latitude const):
(WebKit::WebGeolocationPosition::longitude const):
(WebKit::WebGeolocationPosition::accuracy const):
(WebKit::WebGeolocationPosition::altitude const):
(WebKit::WebGeolocationPosition::altitudeAccuracy const):
(WebKit::WebGeolocationPosition::heading const):
(WebKit::WebGeolocationPosition::speed const):
(WebKit::WebGeolocationPosition::corePosition const):
(WebKit::WebGeolocationPosition::WebGeolocationPosition):
* UIProcess/API/C/WKGeolocationPosition.cpp:
(WKGeolocationPositionCreate_b):
* UIProcess/API/Cocoa/_WKGeolocationPosition.mm:
(WebKit::wrapper):
* UIProcess/API/glib/WebKitGeolocationProvider.cpp:
(WebKit::WebKitGeolocationProvider::notifyPositionChanged):
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKLegacyCoreLocationProvider positionChanged:]):
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::didChangePosition):
* WebProcess/Geolocation/WebGeolocationManager.h:
* WebProcess/Geolocation/WebGeolocationManager.messages.in:
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
(WebKit::WebGeolocationClient::lastPosition):
* WebProcess/WebCoreSupport/WebGeolocationClient.h:

Source/WebKitLegacy/ios:

* Misc/WebGeolocationCoreLocationProvider.h:
* Misc/WebGeolocationCoreLocationProvider.mm:
(-[WebGeolocationCoreLocationProvider sendLocation:]):
* Misc/WebGeolocationProviderIOS.mm:
(-[_WebCoreLocationUpdateThreadingProxy positionChanged:]):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebGeolocationClient.h:
* WebCoreSupport/WebGeolocationClient.mm:
(WebGeolocationClient::lastPosition):
* WebView/WebGeolocationPosition.mm:
(-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
(core):
(-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
(-[WebGeolocationPosition initWithGeolocationPosition:]):
* WebView/WebGeolocationPositionInternal.h:

Source/WebKitLegacy/win:

* WebCoreSupport/WebGeolocationClient.cpp:
(WebGeolocationClient::lastPosition):
* WebCoreSupport/WebGeolocationClient.h:
* WebGeolocationPosition.cpp:
(WebGeolocationPosition::initWithTimestamp):
(core):
* WebGeolocationPosition.h:
(WebGeolocationPosition::impl const):

Tools:

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setMockGeolocationPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223192 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd a SW context process (where SW scripts will actually execute).
beidson@apple.com [Wed, 11 Oct 2017 17:27:08 +0000 (17:27 +0000)]
Add a SW context process (where SW scripts will actually execute).
https://bugs.webkit.org/show_bug.cgi?id=178156
Source/WebCore:

Reviewed by Andy Estes.

No new tests (Covered by changes to existing tests).

This patch adds an auxiliary "ServiceWorker context" WebProcess to a WebProcessPool.

This process is where ServiceWorker scripts will execute, separate from the client WebProcess
hosting the page(s) they are serving.

This patch also adds all of the plumbing to pass along a fetched service worker script to this
context WebProcess, as well as message back failure to actually start the script so we can test.

Touches lots of code sites but is basically just a lot of plumbing.

* WebCore.xcodeproj/project.pbxproj:

* workers/service/ServiceWorkerContextData.h: Copied from Source/WebCore/workers/service/server/SWServerWorker.h.
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::Connection::finishFetchingScriptInServer):
(WebCore::SWServer::Connection::scriptContextFailedToStart):
(WebCore::SWServer::scriptFetchFinished):
(WebCore::SWServer::scriptContextFailedToStart):
(WebCore::SWServer::createWorker):
* workers/service/server/SWServer.h:

* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::scriptFetchFinished):
(WebCore::SWServerRegistration::scriptContextFailedToStart):
* workers/service/server/SWServerRegistration.h:

* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::SWServerWorker):
(WebCore::SWServerWorker::~SWServerWorker):
* workers/service/server/SWServerWorker.h:
(WebCore::SWServerWorker::create):
(WebCore::SWServerWorker::scriptURL const):
(WebCore::SWServerWorker::script const):
(WebCore::SWServerWorker::type const):
(WebCore::SWServerWorker::workerID const):

Source/WebKit:

Reviewed by Andy Estes.

This patch adds an auxiliary "ServiceWorker context" WebProcess to a WebProcessPool.

This process is where ServiceWorker scripts will execute, separate from the client WebProcess
hosting the page(s) they are serving.

This patch also adds all of the plumbing to pass along a fetched service worker script to this
context WebProcess, as well as message back failure to actually start the script so we can test.

Touches lots of code sites but is basically just a lot of plumbing.

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::startServiceWorkerContext):
(WebKit::WebSWServerConnection::sendToContextProcess):
(WebKit::WebSWServerConnection::setContextConnection):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::workerContextProcessConnection):
(WebKit::StorageProcess::createWorkerContextProcessConnection):
(WebKit::StorageProcess::didGetWorkerContextProcessConnection):
(WebKit::StorageProcess::serviceWorkerContextFailedToStart):
(WebKit::StorageProcess::registerSWServerConnection):
(WebKit::StorageProcess::unregisterSWServerConnection):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:

* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection):
(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
(WebKit::StorageToWebProcessConnection::removeSWServerConnection):
(WebKit::StorageToWebProcessConnection::workerContextProcessConnectionCreated):
* StorageProcess/StorageToWebProcessConnection.h:

* UIProcess/Storage/StorageProcessProxy.cpp:
(WebKit::StorageProcessProxy::create):
(WebKit::StorageProcessProxy::StorageProcessProxy):
(WebKit::StorageProcessProxy::didClose):
(WebKit::StorageProcessProxy::getWorkerContextProcessConnection):
(WebKit::StorageProcessProxy::didGetWorkerContextProcessConnection):
* UIProcess/Storage/StorageProcessProxy.h:
* UIProcess/Storage/StorageProcessProxy.messages.in:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
(WebKit::WebProcessPool::getWorkerContextProcessConnection):
(WebKit::WebProcessPool::didGetWorkerContextProcessConnection):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didGetWorkerContextConnection):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

LayoutTests:

Reviewed by Andy Estes.

* http/tests/workers/service/basic-register-exceptions-expected.txt:
* http/tests/workers/service/basic-register-expected.txt:
* http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223191 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[ATK] Expose value of aria-keyshortcuts as object attribute
jdiggs@igalia.com [Wed, 11 Oct 2017 17:04:42 +0000 (17:04 +0000)]
[ATK] Expose value of aria-keyshortcuts as object attribute
https://bugs.webkit.org/show_bug.cgi?id=171175

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the author-provided string through the "keyshortcuts" object attribute.

Test: accessibility/gtk/aria-keyshortcuts.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaKeyShortcutsValue const):
* accessibility/AccessibilityObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
* html/HTMLAttributeNames.in:

LayoutTests:

* accessibility/gtk/aria-keyshortcuts-expected.txt: Added.
* accessibility/gtk/aria-keyshortcuts.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223190 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoImport media capture WPT tests
commit-queue@webkit.org [Wed, 11 Oct 2017 16:27:09 +0000 (16:27 +0000)]
Import media capture WPT tests
https://bugs.webkit.org/show_bug.cgi?id=178138

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-11
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/feature-policy/resources/feature-policy-payment.html: Added.
* web-platform-tests/feature-policy/resources/feature-policy-usb.html: Added.
* web-platform-tests/feature-policy/resources/feature-policy-webvr.html: Added.
* web-platform-tests/feature-policy/resources/featurepolicy.js: Added.
(test_feature_availability):
(expect_feature_available_default):
(expect_feature_unavailable_default):
(test_result):
(test_feature_availability_with_post_message_result):
(run_all_fp_tests_allow_self):
* web-platform-tests/feature-policy/resources/redirect-on-load.html: Added.
* web-platform-tests/feature-policy/resources/w3c-import.log: Added.
* web-platform-tests/mediacapture-streams/GUM-api.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-api.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-deny.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-deny.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-empty-option-param.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-empty-option-param.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-impossible-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-optional-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-optional-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-trivial-constraint.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-trivial-constraint.https.html: Added.
* web-platform-tests/mediacapture-streams/GUM-unknownkey-option-param.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/GUM-unknownkey-option-param.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-all.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-enumerateDevices.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaDevices-getUserMedia.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-MediaElement-srcObject.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-add-audio-track.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-add-audio-track.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-audio-only.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-audio-only.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-finished-add.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-finished-add.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-gettrackid.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-gettrackid.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-id-manual.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-id-manual.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-idl.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-idl.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-removetrack.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-removetrack.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStream-video-only.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStream-video-only.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-video-is-black.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-end-manual.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-getSettings.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-id.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-id.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-init.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrack-init.https.html: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrackEvent-constructor.https-expected.txt: Added.
* web-platform-tests/mediacapture-streams/MediaStreamTrackEvent-constructor.https.html: Added.
* web-platform-tests/mediacapture-streams/OWNERS: Added.
* web-platform-tests/mediacapture-streams/historical-expected.txt: Added.
* web-platform-tests/mediacapture-streams/historical.html: Added.
* web-platform-tests/mediacapture-streams/w3c-import.log: Added.

LayoutTests:

Skipping tests for ports not supporting getUserMedia.

* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
* platform/wpe/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223189 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoTry to fix the Sierra build after r223163.
aestes@apple.com [Wed, 11 Oct 2017 16:12:07 +0000 (16:12 +0000)]
Try to fix the Sierra build after r223163.

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::convertAndValidate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove ENABLE_NETWORK_CACHE
don.olmstead@sony.com [Wed, 11 Oct 2017 15:53:21 +0000 (15:53 +0000)]
Remove ENABLE_NETWORK_CACHE
https://bugs.webkit.org/show_bug.cgi?id=177424

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
(WebKit::clearDiskCacheEntries):
(WebKit::NetworkProcess::setCacheModel):
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::cache):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::canUseCachedRedirect const):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cache/NetworkCache.cpp:
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
* NetworkProcess/cache/NetworkCacheBlobStorage.h:
* NetworkProcess/cache/NetworkCacheCoders.cpp:
* NetworkProcess/cache/NetworkCacheCoders.h:
* NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:
* NetworkProcess/cache/NetworkCacheCodersSoup.cpp:
* NetworkProcess/cache/NetworkCacheData.cpp:
* NetworkProcess/cache/NetworkCacheData.h:
* NetworkProcess/cache/NetworkCacheDataCocoa.mm:
* NetworkProcess/cache/NetworkCacheDataSoup.cpp:
* NetworkProcess/cache/NetworkCacheEntry.cpp:
* NetworkProcess/cache/NetworkCacheEntry.h:
* NetworkProcess/cache/NetworkCacheFileSystem.cpp:
* NetworkProcess/cache/NetworkCacheFileSystem.h:
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
* NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
* NetworkProcess/cache/NetworkCacheKey.cpp:
* NetworkProcess/cache/NetworkCacheKey.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
(WebKit::NetworkProcess::clearDiskCache):
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::clearCacheForAllOrigins):
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
(WebKit::NetworkProcess::clearDiskCache):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
(WebKit::WebProcessPool::isNetworkCacheEnabled):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::storeDerivedDataToCache):
* config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223179 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GStreamer] Many media source tests crashing with GStreamer-CRITICAL **: _gst_util_ui...
nael.ouedraogo@crf.canon.fr [Wed, 11 Oct 2017 14:51:29 +0000 (14:51 +0000)]
[GStreamer] Many media source tests crashing with GStreamer-CRITICAL **: _gst_util_uint64_scale: assertion 'denom != 0' failed in gst_qtdemux_configure_stream()
https://bugs.webkit.org/show_bug.cgi?id=176804

Reviewed by Michael Catanzaro.

Tools:

Add patch to fix assert in qtdemux.

* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch: Added.

LayoutTests:

Update expectations for fixed tests.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223178 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUse https for trac changeset and browser links
tpopela@redhat.com [Wed, 11 Oct 2017 13:59:44 +0000 (13:59 +0000)]
Use https for trac changeset and browser links
https://bugs.webkit.org/show_bug.cgi?id=178167

Reviewed by Alexey Proskuryakov.

Switch the http://trac.webkit.org/changeset and
http://trac.webkit.org/browser links that are printed by webkitpy to
https. Also update the test expectations.

* Scripts/webkitpy/common/checkout/checkout_unittest.py:
* Scripts/webkitpy/common/config/committervalidator_unittest.py:
(CommitterValidatorTest.test_flag_permission_rejection_message):
* Scripts/webkitpy/common/config/urls.py:
(view_source_url):
(view_revision_url):
* Scripts/webkitpy/common/net/bugzilla/bug_unittest.py:
(BugTest.test_commit_revision):
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
* Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
* Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
(MainTest):
(MainTest.test_run_with_upload_json_should_generate_perf_webkit_json):
* Scripts/webkitpy/style/checkers/changelog_unittest.py:
(ChangeLogCheckerTest.test_missing_bug_number):
* Scripts/webkitpy/tool/bot/feeders_unittest.py:
* Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
* Scripts/webkitpy/tool/bot/ircbot_unittest.py:
(IRCBotTest.test_rollout):
(IRCBotTest.test_revert):
(IRCBotTest.test_multi_rollout):
(IRCBotTest.test_rollout_with_r_in_svn_revision):
(IRCBotTest.test_multi_rollout_with_r_in_svn_revision):
(IRCBotTest.test_rollout_invalidate_reason):
(test_multi_rollout_invalidate_reason):
* Scripts/webkitpy/tool/bot/sheriff_unittest.py:
* Scripts/webkitpy/tool/commands/download_unittest.py:
* Scripts/webkitpy/tool/commands/newcommitbot_unittest.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
* Scripts/webkitpy/tool/commands/suggestnominations.py:
(SuggestNominations._count_commit):
* Scripts/webkitpy/tool/commands/upload_unittest.py:
* Scripts/webkitpy/tool/servers/data/rebaselineserver/util.js:
(getTracUrl):
(getSortedKeys):
* Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
(CloseBugForLandDiffTest.test_empty_state):
* Scripts/webkitpy/tool/steps/commit_unittest.py:
(CommitTest._test_check_test_expectations):
* Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
(UpdateChangeLogsForRevertTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223177 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRebaseline tests at media/modern-media-controls/media-controller
commit-queue@webkit.org [Wed, 11 Oct 2017 13:51:58 +0000 (13:51 +0000)]
Rebaseline tests at media/modern-media-controls/media-controller
https://bugs.webkit.org/show_bug.cgi?id=178129

Patch by Antoine Quint <graouts@apple.com> on 2017-10-11
Reviewed by Sam Weinig.

Rebaseline a series of tests to work with the current modern-media-controls codebase. For the most part, this is accounting
for metrics changes and the refactoring of the auto-hide controller code.

* media/modern-media-controls/media-controller/media-controller-auto-hide-expected.txt:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave-expected.txt:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar-expected.txt:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play-expected.txt:
* media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-pause-expected.txt:
* media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter-expected.txt:
* media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html:
* media/modern-media-controls/media-controller/media-controller-auto-hide.html:
* media/modern-media-controls/media-controller/media-controller-click-on-video-controls-should-not-pause.html:
* media/modern-media-controls/media-controller/media-controller-compact-expected.txt: Removed.
* media/modern-media-controls/media-controller/media-controller-compact.html: Removed.
* media/modern-media-controls/media-controller/media-controller-fullscreen-change-expected.txt:
* media/modern-media-controls/media-controller/media-controller-fullscreen-change.html:
* media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button-expected.txt:
* media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button.html:
* media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle-expected.txt:
* media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html:
* media/modern-media-controls/media-controller/media-controller-scale-factor-audio-expected.txt:
* media/modern-media-controls/media-controller/media-controller-scale-factor-audio.html:
* media/modern-media-controls/media-controller/media-controller-scale-factor-expected.txt:
* media/modern-media-controls/media-controller/media-controller-scale-factor.html:
* media/modern-media-controls/media-controller/media-controller-tight-padding-expected.txt: Removed.
* media/modern-media-controls/media-controller/media-controller-tight-padding.html: Removed.
* platform/ios-simulator/TestExpectations:
* platform/mac-elcapitan/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223176 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoObject properties are undefined in super.call() but not in this.call()
ticaiolima@gmail.com [Wed, 11 Oct 2017 12:59:36 +0000 (12:59 +0000)]
Object properties are undefined in super.call() but not in this.call()
https://bugs.webkit.org/show_bug.cgi?id=177230

Reviewed by Saam Barati.

JSTests:

* stress/super-call-function-subclass.js: Added.
(assert):
(A.prototype.t):
(A):
* stress/super-dot-call-and-apply.js: Added.
(assert):
(A):
(A.prototype.call):
(A.prototype.apply):
(B.prototype.testSuper):
(B):
(const.obj.new.B.string_appeared_here.obj.testSuper.C):
(D.prototype.testSuper):
(D):

Source/JavaScriptCore:

Bytecode generation for "super.call(...)" or "super.apply(...)"
shouldn't be considered as CallFunctionCallDotNode or
ApplyFunctionCallDotNode because they should be considered as common
super property access as any other function. According to spec[1],
"super" is not refering to parent constructor.

[1] - https://tc39.github.io/ecma262/#sec-super-keyword-runtime-semantics-evaluation

* parser/ASTBuilder.h:
(JSC::ASTBuilder::makeFunctionCallNode):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::makeFunctionCallNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223175 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223146.
mcatanzaro@igalia.com [Wed, 11 Oct 2017 12:42:03 +0000 (12:42 +0000)]
Unreviewed, rolling out r223146.

Better to not expose cairo in the WPE API

Reverted changeset:

"[WPE] Header cairo.h is used in GLib API headers but cannot
be found"
https://bugs.webkit.org/show_bug.cgi?id=178100
http://trac.webkit.org/changeset/223146

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[JSC] Drop Instantiate hook in ES6 module loader
utatane.tea@gmail.com [Wed, 11 Oct 2017 12:30:37 +0000 (12:30 +0000)]
[JSC] Drop Instantiate hook in ES6 module loader
https://bugs.webkit.org/show_bug.cgi?id=178162

Reviewed by Sam Weinig.

Source/JavaScriptCore:

This patch is a part of patch series for module loader refactoring to adopt
integrity="" parameters and introduce new whatwg module import mechanism.

In this patch, we drop instantiate hook in module loader. This hook is originally
introduced because it is defined in whatwg/loader spec. But this hook is not
used in our implementation, and this hook won't be used since (1) whatwg/loader
spec is abandoned, and (2) this type of hooks should be done in Service Workers.

In addition, this patch applies some cleaning up of our module loader JS code
to simplify things. This change paves the way to more efficient loader implementation
with great flexibility to adopt integrity="" parameters.

* builtins/ModuleLoaderPrototype.js:
(requestInstantiate):
(provideFetch):
provide is changed to provideFetch since we only used this function with Fetch stage parameter.

(fulfillInstantiate): Deleted.
(commitInstantiated): Deleted.
(instantiation): Deleted.
They are merged into requestInstantiate code. This is simpler.

(provide): Deleted.
* jsc.cpp:
* runtime/Completion.cpp:
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::provideFetch):
(JSC::JSModuleLoader::provide): Deleted.
Changed to provideFetch.

(JSC::JSModuleLoader::instantiate): Deleted.
Drop this hook.

* runtime/JSModuleLoader.h:
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeInstantiate): Deleted.
Drop this hook.

Source/WebCore:

Drop instantiate hooks.
No behavior change.

* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223173 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[MSE][GStreamer] Add dump of append pipeline
commit-queue@webkit.org [Wed, 11 Oct 2017 09:33:46 +0000 (09:33 +0000)]
[MSE][GStreamer] Add dump of append pipeline
https://bugs.webkit.org/show_bug.cgi?id=178074

Patch by Alicia Boya García <aboya@igalia.com> on 2017-10-11
Reviewed by Xabier Rodriguez-Calvar.

Enable dump of AppendPipeline.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::appendPipelineStateChangeMessageCallback):
(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::handleStateChangeMessage):
* platform/graphics/gstreamer/mse/AppendPipeline.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223172 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Avoid "100.00ms" vs "100.0ms" jitter in TimelineRuler labels
joepeck@webkit.org [Wed, 11 Oct 2017 07:59:43 +0000 (07:59 +0000)]
Web Inspector: Avoid "100.00ms" vs "100.0ms" jitter in TimelineRuler labels
https://bugs.webkit.org/show_bug.cgi?id=178143

Reviewed by Brian Burg.

* UserInterface/Base/Utilities.js:
Allow a small slop factor that wouldn't have changed the display value's
significant figures anyways. This addresses cases where 100.0000000000001
were being treated slightly differently from 100.0.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223171 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Network Tab - Show initially loaded resources even if network info...
joepeck@webkit.org [Wed, 11 Oct 2017 07:55:24 +0000 (07:55 +0000)]
Web Inspector: Network Tab - Show initially loaded resources even if network info not logged
https://bugs.webkit.org/show_bug.cgi?id=178098
<rdar://problem/34073529>

Reviewed by Devin Rousso.

* UserInterface/Models/Resource.js:
(WI.Resource.prototype.hasResponse):
Resources loaded by Page.getFrameTree have a response but no status code data.
So include finished resources as having a resource.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.closed):
(WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
(WI.NetworkTableContentView.prototype._mainFrameDidChange):
Listen for the first main frame change to perform an initial population.

(WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
This path is not currently taken when table is null, but change the code so
that if it is reached without the table it would behave gracefully.

* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._refreshSummarySection):
On first open none of the resources have a statusCode. Show an emDash.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223170 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[iOS] Do not flatten frames when async frame scrolling is enabled
fred.wang@free.fr [Wed, 11 Oct 2017 07:54:37 +0000 (07:54 +0000)]
[iOS] Do not flatten frames when async frame scrolling is enabled
https://bugs.webkit.org/show_bug.cgi?id=173704

Patch by Frederic Wang <fwang@igalia.com> on 2017-09-27
Reviewed by Simon Fraser.

Source/WebCore:

This patch disables frame flattening when async frame scrolling is enabled on iOS, as
otherwise you can not scroll them. Once iframe scrolling is implemented in iOS (bug 149264),
developers and beta testers will be able to check it by enabling "Async Frame Scrolling"
in the "Experimental WebKit Features" menu of Safari iOS.

Test: platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html

* page/FrameView.cpp:
(WebCore::FrameView::frameFlatteningEnabled): Use effectiveFrameFlattening()
* page/Settings.cpp:
(WebCore::Settings::effectiveFrameFlattening): New function to return frameFlattening() or do
some exceptions on iOS.
* page/Settings.h: Declare effectiveFrameFlattening.
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::flattenFrameSet): Use effectiveFrameFlattening()
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::flattenFrame): Ditto.
* rendering/RenderView.cpp:
(WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower): Ditto.

Source/WebKit:

This patch disables frame flattening when async frame scrolling is enabled on iOS, as
otherwise you can not scroll them. Once iframe scrolling is implemented in iOS (bug 149264),
developers and beta testers will be able to check it by enabling "Async Frame Scrolling"
in the "Experimental WebKit Features" menu of Safari iOS.

Test: platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged): Use effectiveFrameFlattening() introduced in
Source/WebCore.

LayoutTests:

Add an iOS test to verify that frame flattening is disabled when async frame scrolling is enabled.

* platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling-expected.txt: Added.
* platform/ios/fast/frames/flattening/iframe-flattening-with-async-frame-scrolling.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223169 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GStreamer] Fix double seek requested by downloadbuffer GStreamer element in webkibwebsrc
calvaris@igalia.com [Wed, 11 Oct 2017 05:48:47 +0000 (05:48 +0000)]
[GStreamer] Fix double seek requested by downloadbuffer GStreamer element in webkibwebsrc
https://bugs.webkit.org/show_bug.cgi?id=178079

Reviewed by Žan Doberšek.

When the downloadbuffer GStreamer element requests two seeks too
close to each other there's some rare race condition where our
source answers that it is not seekable and ends up with
downloadbuffer element to seek beyond the file size, which causes
the server to issue a 416 HTTP error code eventually, causing our
MediaPlayer to stop.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStop): We only unset he seekable attribute if we are
not seeking.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223168 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoEnable custom pasteboard data in DumpRenderTree and WebKitTestRunner
rniwa@webkit.org [Wed, 11 Oct 2017 04:12:30 +0000 (04:12 +0000)]
Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=178154

Reviewed by Wenson Hsieh.

Source/WebCore:

Extracted the logic to compute the default enabled-ness of custom pasteboard data as
Settings::defaultCustomPasteboardDataEnabled() to be called by WebKit1 and WebKit2 layers.

* page/Settings.cpp:
(WebCore::Settings::defaultCustomPasteboardDataEnabled): Extracted from customPasteboardDataEnabled.
(WebCore::Settings::customPasteboardDataEnabled): Deleted. Now inlined in the header file.
* page/Settings.h:
(WebCore::Settings::customPasteboardDataEnabled):
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::read): Fixed a bug that we were adding MIME type to the map before checking that
we could actually read the buffer. We shouldn't skip a type (NSTIFFPboardType and kUTTypeTIFF for now)
if an equivalent type had failed to read.

Source/WebKit:

Plumbed customPasteboardDataEnabled flag to be used in WebKitTestRunner.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCustomPasteboardDataEnabled):
(WKPreferencesGetCustomPasteboardDataEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

Enable custom pasteboard data by default.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences customPasteboardDataEnabled]): Added.
(-[WebPreferences setCustomPasteboardDataEnabled:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

Fixed the bug that LocalPasteboard would fail to load the promise type if data is set after declaring types
by delaying the call to provideDataForType until when dataForType is called.

Without this fix, fast/events/dropzone-002.html would start failing after enabling custom pasteboard data.
With this fix, fast/events/dropzone-005.html also starts passing.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[LocalPasteboard addTypes:owner:]):
(-[LocalPasteboard dataForType:]):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* editing/pasteboard/dataTransfer-setData-getData-expected.txt: Rebaselined. One more test case is passing now.
* fast/events/dropzone-002.html: Fixed the test to accept an image since we no longer drop URLs when dropping
an image avoid leaking local file paths.
* platform/mac/TestExpectations: Enabled dropzone-005.html since it started passing after fixing LocalPasteboard.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223167 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Quick Open: source mapped files are not shown as search results
bburg@apple.com [Wed, 11 Oct 2017 03:16:39 +0000 (03:16 +0000)]
Web Inspector: Quick Open: source mapped files are not shown as search results
https://bugs.webkit.org/show_bug.cgi?id=178151
<rdar://problem/31561718>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._addResource):
Also consider matching the query string against SourceMapResources
attached to a resource's source maps.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223164 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Payment Request] Validate that all PaymentCurrencyAmounts use the same currency...
aestes@apple.com [Wed, 11 Oct 2017 02:57:12 +0000 (02:57 +0000)]
[Payment Request] Validate that all PaymentCurrencyAmounts use the same currency code when using Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=178150

Reviewed by Tim Horton.

Source/WebCore:

Apple Pay requires a single currency code, but the Payment Request API allows the client to
specify a currency code for each PaymentCurrencyAmount.

Instead of having a required currencyCode property on ApplePayRequest and ignoring the
currency property on PaymentCurrencyAmount, validate that all PaymentCurrencyAmounts use the
same currency code and use that as ApplePaySessionPaymentRequest's currencyCode.

Added test cases to http/tests/ssl/applepay/PaymentRequest.https.html.

* Modules/applepay/ApplePayPaymentRequest.h:
* Modules/applepay/ApplePayPaymentRequest.idl:
* Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::convertAndValidate):
* Modules/applepay/ApplePayRequestBase.h:
* Modules/applepay/ApplePayRequestBase.idl:
* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::validate):
(WebCore::convertAndValidate):
(WebCore::ApplePayPaymentHandler::show):
* Modules/applepay/paymentrequest/ApplePayRequest.idl:

LayoutTests:

* http/tests/paymentrequest/payment-request-abort-method.https.html:
* http/tests/paymentrequest/payment-request-canmakepayment-method.https.html:
* http/tests/paymentrequest/payment-request-show-method.https.html:
* http/tests/ssl/applepay/PaymentRequest.https-expected.txt:
* http/tests/ssl/applepay/PaymentRequest.https.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223163 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] Remove the possibility of installing the old WebKit2 C API
aperez@igalia.com [Wed, 11 Oct 2017 01:01:53 +0000 (01:01 +0000)]
[WPE] Remove the possibility of installing the old WebKit2 C API
https://bugs.webkit.org/show_bug.cgi?id=178125

Reviewed by Michael Catanzaro.

.:

* Source/cmake/OptionsWPE.cmake: Remove definition of the EXPORT_DEPRECATED_WEBKIT2_C_API
build option.

Source/WebKit:

* PlatformWPE.cmake: Remove support for installing the deprecated C API.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223162 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoPrototype structure transition should be a deferred transition
sbarati@apple.com [Wed, 11 Oct 2017 00:53:59 +0000 (00:53 +0000)]
Prototype structure transition should be a deferred transition
https://bugs.webkit.org/show_bug.cgi?id=177734

Reviewed by Keith Miller.

Absence ObjectPropertyConditions work by verifying both that the Structure
does not have a particular property and that its prototype has
remained constant. However, the prototype transition was firing
the transition watchpoint before setting the object's structure.
This meant that isValid for Absence would never return false because
the prototype changed. Clearly this is wrong. The reason this didn't
break OPCs in general is that we'd also check if we could still watch
the OPC. In this case, we can't still watch it because we're inspecting
a structure with an invalidated transition watchpoint. To fix
this weird quirk of the code, I'm making it so that doing a prototype
transition uses the DeferredStructureTransitionWatchpointFire machinery.

This patch also fixes some dead code that I left in regarding
poly proto in OPC.

* bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeDirect):
* runtime/Structure.cpp:
(JSC::Structure::changePrototypeTransition):
* runtime/Structure.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223161 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Payment Request] Implement PaymentRequest.canMakePayment()
aestes@apple.com [Wed, 11 Oct 2017 00:37:49 +0000 (00:37 +0000)]
[Payment Request] Implement PaymentRequest.canMakePayment()
https://bugs.webkit.org/show_bug.cgi?id=178048

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/payment-request/payment-request-canmakepayment-method.https-expected.txt: Removed.

Source/WebCore:

Test: http/tests/paymentrequest/payment-request-canmakepayment-method.https.html

* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::convertData): Moved
ApplePayRequest-to-ApplePaySessionPaymentRequest conversion from here to show().
(WebCore::ApplePayPaymentHandler::show): Returned an exception if
ApplePaySessionPaymentRequest conversion fails.
(WebCore::shouldDiscloseApplePayCapability): Checked if we are in an ephimeral session or if
Settings::applePayCapabilityDisclosureAllowed() is false.
(WebCore::ApplePayPaymentHandler::canMakePayment): Called
PaymentCoordinator::canMakePayments() or PaymentCoordinator::canMakePaymentsWithActiveCard()
depending on shouldDiscloseApplePayCapability().
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
* Modules/applepay/paymentrequest/ApplePayRequest.h:
* Modules/applepay/paymentrequest/ApplePayRequest.idl: Defined merchantIdentifier.
* Modules/paymentrequest/PaymentHandler.h:
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::parse): Moved JSON-parsing to here from show().
(WebCore::PaymentRequest::show): Returned the exception from PaymentHandler::show().
(WebCore::PaymentRequest::canMakePayment): For each payment method, try to create a
PaymentHandler.
For the first valid PaymentHandler, call canMakePayment() and pass a lambda that resolves
the promise.
* Modules/paymentrequest/PaymentRequest.h:
* Modules/paymentrequest/PaymentRequest.idl: Added CallWith=Document annotations to show()
and canMakePayment().

LayoutTests:

* http/tests/paymentrequest/payment-request-canmakepayment-method.https-expected.txt: Added.
* http/tests/paymentrequest/payment-request-canmakepayment-method.https.html: Added.
* http/tests/ssl/applepay/PaymentRequest.https.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223160 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAvoid allocating useless landingBlocks in DFGByteCodeParser::handleInlining()
rmorisset@apple.com [Wed, 11 Oct 2017 00:09:20 +0000 (00:09 +0000)]
Avoid allocating useless landingBlocks in DFGByteCodeParser::handleInlining()
https://bugs.webkit.org/show_bug.cgi?id=177926

Reviewed by Saam Barati.

When doing polyvariant inlining, there used to be a landing block for each callee, each of which was then linked to a continuation block.
With this change, we allocate the continuation block first, and pass it to the inlining routine so that op_ret in the callee link directly to it.
The only subtlety is that when inlining an intrinsic we must do the jump by hand, and also remember to call processSetLocalQueue with nextOffset before it.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223159 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WK2] Add API to clear service worker registrations
cdumez@apple.com [Wed, 11 Oct 2017 00:01:28 +0000 (00:01 +0000)]
[WK2] Add API to clear service worker registrations
https://bugs.webkit.org/show_bug.cgi?id=178085
<rdar://problem/34866025>

Reviewed by Ryosuke Niwa.

Add API to clear service worker registrations. Although the request to
clear the registration is passed on to the StorageProcess, it is currently
a no-op on StorageProcess side until we actually persist service worker
registrations on disk.

* Shared/WebsiteData/WebsiteDataType.h:
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::fetchWebsiteData):
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataType):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore allWebsiteDataTypes]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223158 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, really fix the build with certain SDKs.
cdumez@apple.com [Tue, 10 Oct 2017 23:40:39 +0000 (23:40 +0000)]
Unreviewed, really fix the build with certain SDKs.

Follow-up to r223154, which fixed the wrong lambda.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::getEntry):
(WebCore::DOMFileSystem::getFile):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223156 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix compilation when MASM_PROBE (and therefore DFG) are disabled
guijemont@igalia.com [Tue, 10 Oct 2017 23:14:12 +0000 (23:14 +0000)]
Fix compilation when MASM_PROBE (and therefore DFG) are disabled
https://bugs.webkit.org/show_bug.cgi?id=178134

Reviewed by Saam Barati.

* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
Disable some code when building without DFG_JIT.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223155 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, fix build with certain SDKs.
cdumez@apple.com [Tue, 10 Oct 2017 23:09:43 +0000 (23:09 +0000)]
Unreviewed, fix build with certain SDKs.

Stop capturing |this| unnecessarily in lambda.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::getEntry):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223154 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223148.
jlewis3@apple.com [Tue, 10 Oct 2017 22:59:39 +0000 (22:59 +0000)]
Unreviewed, rolling out r223148.

This caused build failures.

Reverted changeset:

"Fix MSVC build with ENCRYPTED_MEDIA enabled"
https://bugs.webkit.org/show_bug.cgi?id=177803
http://trac.webkit.org/changeset/223148

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223153 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] Expose ENABLE_XSLT option
mcatanzaro@igalia.com [Tue, 10 Oct 2017 22:59:08 +0000 (22:59 +0000)]
[WPE] Expose ENABLE_XSLT option
https://bugs.webkit.org/show_bug.cgi?id=177857

Reviewed by Carlos Alberto Lopez Perez.

* Source/cmake/OptionsWPE.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223152 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAccessibilityRenderObject should not hold a raw pointer to RenderObject
zalan@apple.com [Tue, 10 Oct 2017 22:47:30 +0000 (22:47 +0000)]
AccessibilityRenderObject should not hold a raw pointer to RenderObject
https://bugs.webkit.org/show_bug.cgi?id=178144
<rdar://problem/34919287>

Reviewed by Chris Fleizach.

m_renderer's lifetime is not directly tied to the AX wrapper object's lifetime.

Covered by existing tests.

* accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::elementAccessibilityHitTest const):
* accessibility/AccessibilityMathMLElement.cpp:
(WebCore::AccessibilityMathMLElement::isMathFenceOperator const):
(WebCore::AccessibilityMathMLElement::isMathSeparatorOperator const):
(WebCore::AccessibilityMathMLElement::mathLineThickness const):
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::press):
(WebCore::AccessibilityMenuList::isCollapsed const):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
(WebCore::AccessibilityRenderObject::renderBoxModelObject const):
(WebCore::AccessibilityRenderObject::setRenderer):
(WebCore::AccessibilityRenderObject::previousSibling const):
(WebCore::AccessibilityRenderObject::anchorElement const):
(WebCore::AccessibilityRenderObject::helpText const):
(WebCore::AccessibilityRenderObject::boundingBoxRect const):
(WebCore::AccessibilityRenderObject::supportsPath const):
(WebCore::AccessibilityRenderObject::elementPath const):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityRenderObject::index const):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::observableObject const):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::textChanged):
(WebCore::AccessibilityRenderObject::remoteSVGRootElement const):
(WebCore::AccessibilityRenderObject::roleValueForMSAA const):
(WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):
(WebCore::AccessibilityRenderObject::scrollTo const):
* accessibility/AccessibilityRenderObject.h:
(WebCore::AccessibilityRenderObject::setRenderObject):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::elementAccessibilityHitTest const):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityTableCell::parentTable const):
(WebCore::AccessibilityTableCell::rowIndexRange const):
(WebCore::AccessibilityTableCell::columnIndexRange const):
(WebCore::AccessibilityTableCell::titleUIElement const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223151 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223130.
commit-queue@webkit.org [Tue, 10 Oct 2017 22:37:41 +0000 (22:37 +0000)]
Unreviewed, rolling out r223130.
https://bugs.webkit.org/show_bug.cgi?id=178147

Breaks the build when EGLNativeWindowType is a pointer
(Requested by aperezdc on #webkit).

Reverted changeset:

"[WPE] Build failure due to invalid cast of
EGLNativeWindowType when targetting 64-bit ARM"
https://bugs.webkit.org/show_bug.cgi?id=178090
http://trac.webkit.org/changeset/223130

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223150 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoReplace copyKeysToVector/copyValuesToVector with copyToVector(map.keys())/copyToVecto...
commit-queue@webkit.org [Tue, 10 Oct 2017 22:13:07 +0000 (22:13 +0000)]
Replace copyKeysToVector/copyValuesToVector with copyToVector(map.keys())/copyToVector(map.values())
https://bugs.webkit.org/show_bug.cgi?id=178102

Patch by Sam Weinig <sam@webkit.org> on 2017-10-10
Reviewed by Tim Horton.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::clearInspectorBreakpointState):

Source/WebCore:

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Watchers::getNotifiersVector const):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::connectionClosedFromServer):
* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::connectionToServerLost):
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::getTracks const):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::windowProxies):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::item const):
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::removeMarkers):
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::disconnectFromAllWorkerInspectorProxies):
* inspector/NetworkResourcesData.cpp:
* loader/DocumentLoader.cpp:
(WebCore::cancelAll):
(WebCore::setAllDefersLoading):
(WebCore::areAllLoadersPageCacheAcceptable):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::forEachSessionResource):
* loader/mac/DocumentLoaderMac.cpp:
(WebCore::scheduleAll):
(WebCore::unscheduleAll):
* page/ResourceUsageThread.cpp:
(WebCore::ResourceUsageThread::notifyObservers):
* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::tracks const):

    Replace copyKeysToVector / copyValuesToVector with copyToVector(map.keys()) / copyToVector(map.values())

Source/WebDriver:

* SessionHost.cpp:
(WebDriver::SessionHost::inspectorDisconnected):

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
* Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextInvalidateCustomProtocolRequests):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerForall):
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
* UIProcess/GenericCallback.h:
(WebKit::invalidateCallbackMap):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::didClose):
(WebKit::WebProcessProxy::didBecomeUnresponsive):
(WebKit::WebProcessProxy::didBecomeResponsive):
(WebKit::WebProcessProxy::willChangeIsResponsive):
(WebKit::WebProcessProxy::didChangeIsResponsive):
(WebKit::WebProcessProxy::disconnectFramesFromPage):
(WebKit::WebProcessProxy::frameCountInPage const):
(WebKit::WebProcessProxy::requestTermination):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::invalidate):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::stopAllStreams):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::cancelAllStreams):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::servePendingRequests):

Source/WebKitLegacy/mac:

* History/WebHistory.mm:
(-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::stopAllStreams):
* WebCoreSupport/WebUserMediaClient.mm:
(WebUserMediaClient::pageDestroyed):

Source/WTF:

* wtf/HashMap.h:
(WTF::copyKeysToVector): Deleted.
(WTF::copyValuesToVector): Deleted.

    Remove copyKeysToVector and copyValuesToVector which are no longer used.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223149 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix MSVC build with ENCRYPTED_MEDIA enabled
commit-queue@webkit.org [Tue, 10 Oct 2017 21:51:47 +0000 (21:51 +0000)]
Fix MSVC build with ENCRYPTED_MEDIA enabled
https://bugs.webkit.org/show_bug.cgi?id=177803

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-10-10
Reviewed by Alex Christensen.

As a workaround for MSVC, a weak pointer of "this" is captured
at the outermost lambda expression.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::load):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::remove):
* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::CDMInstanceClearKey::updateLicense):
(WebCore::CDMInstanceClearKey::loadSession):
(WebCore::CDMInstanceClearKey::removeSessionData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223148 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Network Tab - Set column initial widths to try allow waterfall column...
commit-queue@webkit.org [Tue, 10 Oct 2017 21:40:31 +0000 (21:40 +0000)]
Web Inspector: Network Tab - Set column initial widths to try allow waterfall column to expand more by default
https://bugs.webkit.org/show_bug.cgi?id=178142
<rdar://problem/34918233>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-10
Reviewed by Brian Burg.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype.initialLayout):
Provide initial widths for many columns where the max could fit
but we'd prefer a smaller than max initial width in wide cases.

* UserInterface/Views/Table.js:
(WI.Table.prototype._resizeColumnsAndFiller):
When auto sizing all columns use the preferred initial widths.

* UserInterface/Views/TableColumn.js:
(WI.TableColumn.prototype.get preferredInitialWidth):
Save the initial width.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223147 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] Header cairo.h is used in GLib API headers but cannot be found
aperez@igalia.com [Tue, 10 Oct 2017 21:32:52 +0000 (21:32 +0000)]
[WPE] Header cairo.h is used in GLib API headers but cannot be found
https://bugs.webkit.org/show_bug.cgi?id=178100

Reviewed by Michael Catanzaro.

* wpe/wpe-webkit.pc.in: Add Cairo to the "Requires" field, so its flags get pulled
in and the "cairo.h", used in the WPE WebKit GLib API headers, can be found.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223146 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
jdiggs@igalia.com [Tue, 10 Oct 2017 21:29:24 +0000 (21:29 +0000)]
AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
https://bugs.webkit.org/show_bug.cgi?id=178137

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the ARIA form role as ATK_ROLE_LANDMARK; continue to expose the HTML form
element as ATK_ROLE_FORM.

No new tests needed due to existing coverage. Update expectations for roles-exposed.html.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):

Tools:

Add handling for ATK_ROLE_LANDMARK resulting from the ARIA form role.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

* platform/gtk/accessibility/roles-exposed-expected.txt: Updated expectations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223145 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRespect audio rate change restrictions in HTMLMediaElement::setVolume.
mrajca@apple.com [Tue, 10 Oct 2017 21:26:03 +0000 (21:26 +0000)]
Respect audio rate change restrictions in HTMLMediaElement::setVolume.
https://bugs.webkit.org/show_bug.cgi?id=178140

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/audio-playback-volume-changes-with-restrictions-and-user-gestures.html
       media/audio-playback-volume-changes-with-restrictions.html

It's currently possible for a website to start auto-playing media with a zero volume and then
programmatically set the volume to a non-zero value without a user gesture. This code path didn't
have to be considered previously because volume changes are not supported on iOS.

We currently pause media when an audio track comes in after an element has already started playing silently
in mediaPlayerDidAddAudioTrack. This patch does the same when a non-zero volume is set after a media
element already began playing silently and there is an audio rate change restriction.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setVolume):

LayoutTests:

* media/audio-playback-volume-changes-with-restrictions-and-user-gestures-expected.txt: Added.
* media/audio-playback-volume-changes-with-restrictions-and-user-gestures.html: Added.
* media/audio-playback-volume-changes-with-restrictions-expected.txt: Added.
* media/audio-playback-volume-changes-with-restrictions.html: Added.
* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223144 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoCSS constant properties should not be enabled by default
mcatanzaro@igalia.com [Tue, 10 Oct 2017 21:24:15 +0000 (21:24 +0000)]
CSS constant properties should not be enabled by default
https://bugs.webkit.org/show_bug.cgi?id=177416

Reviewed by Darin Adler.

* Shared/WebPreferencesDefinitions.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223143 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed build fix.
msaboff@apple.com [Tue, 10 Oct 2017 21:10:17 +0000 (21:10 +0000)]
Unreviewed build fix.

Removed unused lambda capture.

* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::appendInverted):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223142 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRandom StorageProcess and SWServer cleanup.
beidson@apple.com [Tue, 10 Oct 2017 21:03:04 +0000 (21:03 +0000)]
Random StorageProcess and SWServer cleanup.
https://bugs.webkit.org/show_bug.cgi?id=178141

Reviewed by Andy Estes.

-StorageProcess should own the set of SWServers
-Some renaming and cleanup

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::createStorageToWebProcessConnection):
(WebKit::StorageProcess::swServerForSession):
* StorageProcess/StorageProcess.h:
(WebKit::StorageProcess::queue):

* StorageProcess/StorageToWebProcessConnection.cpp:
(WebKit::StorageToWebProcessConnection::establishSWServerConnection):
* StorageProcess/StorageToWebProcessConnection.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223141 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoLoading should be disabled while constructing the fragment in WebContentReader::readW...
rniwa@webkit.org [Tue, 10 Oct 2017 20:50:20 +0000 (20:50 +0000)]
Loading should be disabled while constructing the fragment in WebContentReader::readWebArchive
https://bugs.webkit.org/show_bug.cgi?id=178118

Reviewed by Antti Koivisto.

Source/WebCore:

Disable image loading while constructing the document fragment in WebContentReader::readWebArchive
as we do in createFragmentAndAddResources for RTF/RTFD. This refactoring is needed to start using
blob URL in the pasted document fragment for webkit.org/b/124391.

Also modified WebContentReader::readWebArchive to take a reference to SharedBuffer instead of a pointer.

No new tests since existing tests have been updated to cover this behavior change.

* editing/WebContentReader.h:
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::WebContentReader::readWebArchive): Use DeferredLoadingScope to disable the loader and images
while constructing the document fragment.
* platform/Pasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::readPasteboardWebContentDataForType):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read):

LayoutTests:

Updated the existing tests to wait for images to load in each step explicitly instead of relying on
them being loaded synchronously or that it's loaded within 100-200ms.

* editing/pasteboard/4641033.html:
* editing/pasteboard/4947130.html:
* editing/pasteboard/4989774.html:
* editing/pasteboard/drag-selected-image-to-contenteditable.html:
* editing/selection/drag-to-contenteditable-iframe.html:
* platform/ios/TestExpectations: Skipped editing/selection/drag-to-contenteditable-iframe.html on iOS
since we don't support testing drag & drop on iOS. Also added [ Skip ] to other entires there.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223140 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoLayers should be destroyed by RenderLayerModelObject
antti@apple.com [Tue, 10 Oct 2017 20:36:48 +0000 (20:36 +0000)]
Layers should be destroyed by RenderLayerModelObject
https://bugs.webkit.org/show_bug.cgi?id=178139

Reviewed by Simon Fraser.

Clean up some FIXMEs.

* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::willBeDestroyed):
(WebCore::RenderLayerModelObject::destroyLayer):
* rendering/RenderLayerModelObject.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223139 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223136.
mcatanzaro@igalia.com [Tue, 10 Oct 2017 19:41:05 +0000 (19:41 +0000)]
Unreviewed, rolling out r223136.

Forgot to update GTK API header

Reverted changeset:

"[WPE] Header cairo.h is used in GLib API headers but cannot
be found"
https://bugs.webkit.org/show_bug.cgi?id=178100
http://trac.webkit.org/changeset/223136

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223138 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Views should explicitly remove event listeners from managers/Frame
commit-queue@webkit.org [Tue, 10 Oct 2017 19:24:03 +0000 (19:24 +0000)]
Web Inspector: Views should explicitly remove event listeners from managers/Frame
https://bugs.webkit.org/show_bug.cgi?id=175951

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-10-10
Reviewed by Brian Burg.

* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WI.ApplicationCacheDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/DebuggerDashboardView.js:
(WI.DebuggerDashboardView.prototype.closed):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.closed):
* UserInterface/Views/NetworkGridContentView.js:
(WI.NetworkGridContentView.prototype.closed):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WI.ProbeDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/QuickConsole.js:
(WI.QuickConsole.prototype.closed):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WI.ScopeChainDetailsSidebarPanel.prototype.closed):
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineOverview.prototype.closed):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] Header cairo.h is used in GLib API headers but cannot be found
aperez@igalia.com [Tue, 10 Oct 2017 19:09:51 +0000 (19:09 +0000)]
[WPE] Header cairo.h is used in GLib API headers but cannot be found
https://bugs.webkit.org/show_bug.cgi?id=178100

Reviewed by Žan Doberšek.

Instead of including <cairo.h>, it is better to forward-declare cairo_surface_t,
which is the one and only Cairo declaration needed by the WPE API header.

* UIProcess/API/glib/WebKitFaviconDatabase.cpp: Add inclusion of <cairo.h>.
* UIProcess/API/glib/WebKitWebView.cpp: Add inclusion of <cairo.h>.
* UIProcess/API/wpe/WebKitFaviconDatabase.h: Add forward declaration of cairo_surface_t.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223136 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoEntries API should recognize path starting with 2 slashes as valid absolute path
cdumez@apple.com [Tue, 10 Oct 2017 18:42:34 +0000 (18:42 +0000)]
Entries API should recognize path starting with 2 slashes as valid absolute path
https://bugs.webkit.org/show_bug.cgi?id=178135

Reviewed by Ryosuke Niwa.

Source/WebCore:

Entries API should recognize paths starting with 2 slashes as valid absolute paths to match Chrome's behavior.
See https://github.com/WICG/entries-api/commit/990454758005a6039655835503d551015e346d9d

This was causing us to fail some manual web-platform-tests.

No new tests, updated existing tests.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::isValidPathSegment):
(WebCore::isZeroOrMorePathSegmentsSeparatedBySlashes):
(WebCore::isValidRelativeVirtualPath):
(WebCore::isValidVirtualPath):

LayoutTests:

Add layout test coverage.

* editing/pasteboard/entries-api/datatransfer-items-drop-getDirectory-expected.txt:
* editing/pasteboard/entries-api/datatransfer-items-drop-getDirectory.html:
* editing/pasteboard/entries-api/datatransfer-items-drop-getFile-expected.txt:
* editing/pasteboard/entries-api/datatransfer-items-drop-getFile.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223135 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223110.
jlewis3@apple.com [Tue, 10 Oct 2017 17:58:53 +0000 (17:58 +0000)]
Unreviewed, rolling out r223110.

This caused consistent failures and timeouts on multiple
platforms.

Reverted changeset:

"Delete button doesn't fully delete certain emoji"
https://bugs.webkit.org/show_bug.cgi?id=178096
http://trac.webkit.org/changeset/223110

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223134 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] Cannot link against libWPEWebkit due to wrong contents of wpe-webkit.pc
aperez@igalia.com [Tue, 10 Oct 2017 17:44:57 +0000 (17:44 +0000)]
[WPE] Cannot link against libWPEWebkit due to wrong contents of wpe-webkit.pc
https://bugs.webkit.org/show_bug.cgi?id=178133

Reviewed by Žan Doberšek.

* wpe/wpe-webkit.pc.in: Remove "-lWPE" and replace "Requires.private" with a plain "Requires".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223133 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agorun-webkit-tests: upload test results to multiple servers
jbedard@apple.com [Tue, 10 Oct 2017 15:58:42 +0000 (15:58 +0000)]
run-webkit-tests: upload test results to multiple servers
https://bugs.webkit.org/show_bug.cgi?id=178012
<rdar://problem/34856501>

Reviewed by Lucas Forschler.

Allowing uploading of results to multiple servers makes developing new results
databases much easier, and does not complicate uploading logic.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.upload_results): Iterate through the list of results server hosts and
send results to each one.
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator.__init__): Accept a list of test results servers.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGenerator.__init__): Accept a list of test results servers.
(JSONResultsGenerator.get_json): Pick which server to download from by index.
(JSONResultsGenerator.upload_json_files): Upload the JSON to each results server.
(JSONResultsGenerator._get_archived_json_results): Pick which server to download from.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args): Allow multiple test-results-servers and results-server-hosts to be
passed to run-webkit-tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223132 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRenderObject::destroy() should only be invoked after renderer has been removed from...
antti@apple.com [Tue, 10 Oct 2017 13:02:47 +0000 (13:02 +0000)]
RenderObject::destroy() should only be invoked after renderer has been removed from the tree
https://bugs.webkit.org/show_bug.cgi?id=178075

Reviewed by Zalan Bujtas.

Source/WebCore:

This patch fixes the remaining cases where the renderer is still in the tree while destroy()
is called and adds the assert.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeLeftoverAnonymousBlock):
(WebCore::RenderBlock::takeChild):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer):

    Null the parent pointers for m_scrollCorner/m_resizer.

(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
(WebCore::RenderObject::destroy):

    Use RELEASE_ASSERT as these are cheap and important checks.
    Also turn isBeingDestroyed test into RELEASE_ASSERT.
    Remove AX call that no longer does anything.

(WebCore::RenderObject::destroyAndCleanupAnonymousWrappers): Deleted.
* rendering/RenderObject.h:
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::moveBlockChildren):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows):
(WebCore::RenderTableRow::destroyAndCollapseAnonymousSiblingRows): Deleted.

    Renamed and made this no longer destroy itself. The caller now takes care of that.
    Removed an unnecessary lambda.

* rendering/RenderTableRow.h:
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):
(WebCore::RenderTreeUpdater::tearDownRenderer):
* style/RenderTreeUpdaterListItem.cpp:
(WebCore::RenderTreeUpdater::ListItem::updateMarker):

LayoutTests:

* accessibility/mac/textbox-role-reports-notifications.html:

This passed because spurious AXValueChanged notifications. Force layout to prevent coalescing between mutations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223131 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64...
aperez@igalia.com [Tue, 10 Oct 2017 12:47:00 +0000 (12:47 +0000)]
[WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
https://bugs.webkit.org/show_bug.cgi?id=178090

Reviewed by Žan Doberšek.

* WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
(WebKit::AcceleratedSurfaceWPE::window const): Use static_cast instead of reinterpret_cast,
this way extending values of EGLNativeWindowType to 64 bits is allowed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223130 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE] GLib API headers WebKitScriptDialog.h and WebKitFileChooserRequest.h are not...
aperez@igalia.com [Tue, 10 Oct 2017 12:02:27 +0000 (12:02 +0000)]
[WPE] GLib API headers WebKitScriptDialog.h and WebKitFileChooserRequest.h are not installed
https://bugs.webkit.org/show_bug.cgi?id=178104

Reviewed by Žan Doberšek.

* PlatformWPE.cmake: Add missing header paths to the WPE_API_INSTALLED_HEADERS variable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223129 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WPE][CMake] The “install” target should install all public API headers
aperez@igalia.com [Tue, 10 Oct 2017 11:27:40 +0000 (11:27 +0000)]
[WPE][CMake] The “install” target should install all public API headers
https://bugs.webkit.org/show_bug.cgi?id=176475

Reviewed by Žan Doberšek.

Install the WPE port GLib-based API headers. The deprecated C API is still available,
but disabled by default behind the "EXPORT_DEPRECATED_WEBKIT2_C_API" CMake option.

* PlatformWPE.cmake: Always install "wpe-webkit.pc" and the GLib C API for WPE.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd isContinuation bit
antti@apple.com [Tue, 10 Oct 2017 10:38:37 +0000 (10:38 +0000)]
Add isContinuation bit
https://bugs.webkit.org/show_bug.cgi?id=178084

Reviewed by Zalan Bujtas.

Currently continuations are identified indirectly by comparing renderer pointer with the element renderer pointer.
This is bug prone and fails to cover anonymous continuations.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::firstChildConsideringContinuation):
(WebCore::startOfContinuations):
(WebCore::firstChildIsInlineContinuation):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):

    Ignore first-letter fragment. This worked before because first-letter renderers
    were mistakenly considered inline element continuations (see below).

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::setContinuation):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
* rendering/RenderElement.h:
(WebCore::RenderElement::hasContinuation const):
(WebCore::RenderElement::isContinuation const):
(WebCore::RenderElement::setIsContinuation):

    The new bit.

(WebCore::RenderElement::isElementContinuation const):
(WebCore::RenderElement::isInlineElementContinuation const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::cloneAsContinuation const):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::childBecameNonInline):
(WebCore::RenderInline::clone const): Deleted.
* rendering/RenderInline.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isAnonymousBlock const):
(WebCore::RenderObject::isElementContinuation const): Deleted.

    The old continuation test was 'node() && node()->renderer() != this'
    This was fragile as nulling the renderer will make it fail.
    It was also wrong for first-letter renderers (isElementContinuation was true for them).

(WebCore::RenderObject::isInlineElementContinuation const): Deleted.

    Move to RenderElement.

(WebCore::RenderObject::isBlockElementContinuation const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223127 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAX: [ATK] STATE_CHECKABLE should be removed from radio buttons in radiogroups with...
jdiggs@igalia.com [Tue, 10 Oct 2017 08:55:18 +0000 (08:55 +0000)]
AX: [ATK] STATE_CHECKABLE should be removed from radio buttons in radiogroups with aria-readonly="true"
https://bugs.webkit.org/show_bug.cgi?id=177931

Reviewed by Chris Fleizach.

Source/WebCore:

Add a check in canSetValueAttribute() for readonly radiogroup ancestors of
radio buttons.

Test: accessibility/gtk/aria-readonly-radiogroup.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetValueAttribute const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::radioGroupAncestor const):
* accessibility/AccessibilityObject.h:

LayoutTests:

* accessibility/gtk/aria-readonly-radiogroup-expected.txt: Added.
* accessibility/gtk/aria-readonly-radiogroup.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223126 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoThe prototype cache should be aware of the Executable it generates a Structure for
sbarati@apple.com [Tue, 10 Oct 2017 07:58:27 +0000 (07:58 +0000)]
The prototype cache should be aware of the Executable it generates a Structure for
https://bugs.webkit.org/show_bug.cgi?id=177907

Reviewed by Filip Pizlo.

JSTests:

* microbenchmarks/dont-confuse-structures-from-different-executable-as-poly-proto.js: Added.
(assert):
(foo.C):
(foo):
(bar.C):
(bar):
(access):
(makeLongChain):
(accessY):

Source/JavaScriptCore:

This patch renames PrototypeMap to StructureCache because
it is no longer a map of the prototypes in the VM. It's
only used to cache Structures during object construction.

The main change of this patch is to guarantee that Structures generated
by the create_this originating from different two different Executables'
bytecode won't hash-cons to the same thing. Previously, we could hash-cons
them depending on the JSObject* prototype pointer. This would cause the last
thing that hash-consed to overwrite the Structure's poly proto watchpoint. This
happened because when we initialize a JSFunction's ObjectAllocationProfile,
we set the resulting Structure's poly proto watchpoint. This could cause a Structure
generating from some Executable e1 to end up with the poly proto watchpoint
for another Executable e2 simply because JSFunctions backed by e1 and e2
shared the same prototype. Then, based on profiling information, we may fire the
wrong Executable's poly proto watchpoint. This patch fixes this bug by
guaranteeing that Structures generating from create_this for different
Executables are unique even if they share the same prototype by adding
the FunctionExecutable* as another field in PrototypeKey.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
* bytecode/ObjectAllocationProfile.cpp:
(JSC::ObjectAllocationProfile::initializeProfile):
* dfg/DFGOperations.cpp:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructureSlow):
* runtime/IteratorOperations.cpp:
(JSC::createIteratorResultObjectStructure):
* runtime/JSBoundFunction.cpp:
(JSC::getBoundFunctionStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
* runtime/PrototypeKey.h:
(JSC::PrototypeKey::PrototypeKey):
(JSC::PrototypeKey::executable const):
(JSC::PrototypeKey::operator== const):
(JSC::PrototypeKey::hash const):
* runtime/PrototypeMap.cpp: Removed.
* runtime/PrototypeMap.h: Removed.
* runtime/StructureCache.cpp: Copied from Source/JavaScriptCore/runtime/PrototypeMap.cpp.
(JSC::StructureCache::createEmptyStructure):
(JSC::StructureCache::emptyStructureForPrototypeFromBaseStructure):
(JSC::StructureCache::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::createEmptyStructure): Deleted.
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure): Deleted.
(JSC::PrototypeMap::emptyObjectStructureForPrototype): Deleted.
* runtime/StructureCache.h: Copied from Source/JavaScriptCore/runtime/PrototypeMap.h.
(JSC::StructureCache::StructureCache):
(JSC::PrototypeMap::PrototypeMap): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223125 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago`async` should be able to be used as an imported binding name
utatane.tea@gmail.com [Tue, 10 Oct 2017 05:53:12 +0000 (05:53 +0000)]
`async` should be able to be used as an imported binding name
https://bugs.webkit.org/show_bug.cgi?id=176573

Reviewed by Saam Barati.

JSTests:

* modules/import-default-async.js: Added.
* modules/import-named-async-as.js: Added.
* modules/import-named-async.js: Added.
* modules/import-named-async/target.js: Added.
* modules/import-namespace-async.js: Added.
* test262.yaml:

Source/JavaScriptCore:

Previously, we have ASYNC keyword in the parser. This is introduced only for performance,
and ECMA262 spec does not categorize "async" to keyword. This makes parser code complicated,
since ASYNC should be handled as IDENT. If we missed this ASYNC keyword, we cause a bug.
For example, import declaration failed to bind imported binding to the name "async" because
the parser considered ASYNC as keyword.

This patch removes ASYNC keyword from the parser. By carefully handling ASYNC, we can keep
the current performance without using this ASYNC keyword.

We also add `escaped` field to token data since contextual keyword is valid only if it does
not contain any escape sequences. We fix bunch of contextual keyword use with this fix too
e.g. `of in for-of`. This improves test262 score.

* parser/Keywords.table:
* parser/Lexer.cpp:
(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::maybeParseAsyncFunctionDeclarationStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):
* parser/Parser.h:
(JSC::Parser::matchContextualKeyword):
* parser/ParserTokens.h:
* runtime/CommonIdentifiers.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWe don't need to clearEmptyObjectStructureForPrototype because JSGlobalObject* is...
sbarati@apple.com [Tue, 10 Oct 2017 05:11:27 +0000 (05:11 +0000)]
We don't need to clearEmptyObjectStructureForPrototype because JSGlobalObject* is part of the cache's key
https://bugs.webkit.org/show_bug.cgi?id=177987

Reviewed by Filip Pizlo.

* runtime/JSProxy.cpp:
(JSC::JSProxy::setTarget):
* runtime/PrototypeMap.cpp:
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype): Deleted.
* runtime/PrototypeMap.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223123 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoVector should be able to easily create from a list of movable only items
commit-queue@webkit.org [Tue, 10 Oct 2017 04:44:51 +0000 (04:44 +0000)]
Vector should be able to easily create from a list of movable only items
https://bugs.webkit.org/show_bug.cgi?id=176432

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-09
Reviewed by Darin Adler.

Source/WTF:

Adding static from method to construct a Vector from movable-only items.
This may also be used instead of initializer list constructor for types that would benefit of being moved.

* wtf/Vector.h:
(WTF::Vector::Vector):
(WTF::Vector::from):
(WTF::Vector::uncheckedInitialize): Introduced as an optimization to set the vector size once.
(WTF::Malloc>::reserveInitialCapacity):

Tools:

* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223122 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUse one virtual allocation for all gigacages and their runways
fpizlo@apple.com [Tue, 10 Oct 2017 04:28:18 +0000 (04:28 +0000)]
Use one virtual allocation for all gigacages and their runways
https://bugs.webkit.org/show_bug.cgi?id=178050

Reviewed by Saam Barati.

* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):
(Gigacage::runway): Deleted.
(Gigacage::totalSize): Deleted.
* bmalloc/Gigacage.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223121 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoCalling fileSystemDirectoryEntry.getDirectory() with empty path should not fail
cdumez@apple.com [Tue, 10 Oct 2017 04:10:02 +0000 (04:10 +0000)]
Calling fileSystemDirectoryEntry.getDirectory() with empty path should not fail
https://bugs.webkit.org/show_bug.cgi?id=178114

Reviewed by Ryosuke Niwa.

Source/WebCore:

Calling fileSystemDirectoryEntry.getDirectory() with empty/null/undefined path should not fail as per:
- https://wicg.github.io/entries-api/#dom-filesystemdirectoryentry-getdirectory

The empty string is a valid path as per:
- https://wicg.github.io/entries-api/#valid-path

This aligns out behavior with Chrome.

No new tests, updated existing test.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::isValidVirtualPath):
(WebCore::resolveRelativeVirtualPath):

LayoutTests:

Extend layout test coverage.

* editing/pasteboard/entries-api/datatransfer-items-drop-getDirectory-expected.txt:
* editing/pasteboard/entries-api/datatransfer-items-drop-getDirectory.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223118 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoIt should not be possible to submit a form that is disconnected
cdumez@apple.com [Tue, 10 Oct 2017 03:19:22 +0000 (03:19 +0000)]
It should not be possible to submit a form that is disconnected
https://bugs.webkit.org/show_bug.cgi?id=178099

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline several WPT tests now that more checks are passing.

* web-platform-tests/dom/events/Event-dispatch-click-expected.txt:
* web-platform-tests/html/semantics/forms/the-button-element/button-click-submits-expected.txt:

Source/WebCore:

It should not be possible to submit a form that is disconnected. Both Firefox and Chrome agree with the specification.

This is as per:
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm (step 1)
which refers to:
https://html.spec.whatwg.org/multipage/links.html#cannot-navigate

Form cannot navigate when it is disconnected.

No new tests, rebaselined existing tests.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::prepareForSubmission):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoJSCell::didBecomePrototype is racy
fpizlo@apple.com [Tue, 10 Oct 2017 02:48:39 +0000 (02:48 +0000)]
JSCell::didBecomePrototype is racy
https://bugs.webkit.org/show_bug.cgi?id=178110

Reviewed by Saam Barati.

The indexing type can be modified by any thread using CAS. So, we need to use atomics when
modifying it. We don't need to use atomics when reading it though (since it's just one field).

* runtime/JSCellInlines.h:
(JSC::JSCell::didBecomePrototype):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223116 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark http/tests/paymentrequest/payment-request-abort-method.https.html as flaky.
ryanhaddad@apple.com [Tue, 10 Oct 2017 02:14:52 +0000 (02:14 +0000)]
Mark http/tests/paymentrequest/payment-request-abort-method.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178107

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223115 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRebaseline imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent.html...
ryanhaddad@apple.com [Tue, 10 Oct 2017 02:05:50 +0000 (02:05 +0000)]
Rebaseline imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent.html for iOS.

Unreviewed test gardening.

* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Removed.
* platform/ios-wk2/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Removed.
* platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoEnable gigacage on iOS
fpizlo@apple.com [Tue, 10 Oct 2017 01:40:53 +0000 (01:40 +0000)]
Enable gigacage on iOS
https://bugs.webkit.org/show_bug.cgi?id=177586

Reviewed by JF Bastien.
JSTests:

Add tests for when Gigacage gets runtime disabled.

* stress/disable-gigacage-arrays.js: Added.
(foo):
* stress/disable-gigacage-strings.js: Added.
(foo):
* stress/disable-gigacage-typed-arrays.js: Added.
(foo):

Source/bmalloc:

Introduce the ability to disable gigacage at runtime if allocation fails. If any step of gigacage
allocation fails, we free all of the gigacages and turn off gigacage support.

Reland this after confirming that the 20% Kraken regression was a one-bot fluke. Local testing on the
same kind of system did not show the regression. Saam and I both tried independently.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/Cache.cpp:
(bmalloc::Cache::scavenge):
* bmalloc/Cache.h:
(bmalloc::Cache::tryAllocate):
(bmalloc::Cache::allocate):
(bmalloc::Cache::deallocate):
(bmalloc::Cache::reallocate):
* bmalloc/Gigacage.cpp:
(Gigacage::ensureGigacage):
(Gigacage::runway):
(Gigacage::totalSize):
(Gigacage::shouldBeEnabled):
(): Deleted.
(Gigacage::Callback::Callback): Deleted.
(Gigacage::Callback::function): Deleted.
(Gigacage::PrimitiveDisableCallbacks::PrimitiveDisableCallbacks): Deleted.
* bmalloc/Gigacage.h:
(Gigacage::wasEnabled):
(Gigacage::isEnabled):
(Gigacage::runway): Deleted.
(Gigacage::totalSize): Deleted.
* bmalloc/HeapKind.cpp: Added.
(bmalloc::isActiveHeapKind):
(bmalloc::mapToActiveHeapKind):
* bmalloc/HeapKind.h:
(bmalloc::isActiveHeapKindAfterEnsuringGigacage):
(bmalloc::mapToActiveHeapKindAfterEnsuringGigacage):
* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::scavenge):
* bmalloc/bmalloc.h:
(bmalloc::api::tryLargeMemalignVirtual):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::isEnabled):

Source/JavaScriptCore:

The hardest part of enabling Gigacage on iOS is that it requires loading global variables while
executing JS, so the LLInt needs to know how to load from global variables on all platforms that
have Gigacage. So, this teaches ARM64 how to load from global variables.

Also, this makes the code handle disabling the gigacage a bit better.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::caged):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::cage):
(JSC::AssemblyHelpers::cageConditionally):
* offlineasm/arm64.rb:
* offlineasm/asm.rb:
* offlineasm/instructions.rb:

Tools:

Add a mode to test disabling Gigacage.

* Scripts/run-jsc-stress-tests:
* Scripts/webkitruby/jsc-stress-test-writer-default.rb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223113 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoEvaluate the benefit of skipping dead code in the DFGByteCodeParser when a function...
rmorisset@apple.com [Tue, 10 Oct 2017 01:30:02 +0000 (01:30 +0000)]
Evaluate the benefit of skipping dead code in the DFGByteCodeParser when a function returns in its first block
https://bugs.webkit.org/show_bug.cgi?id=177925

Reviewed by Saam Barati.

We used to do a rather weird "optimisation" in the bytecode parser: when a function would return in its first block,
the rest of the function was skipped. Since it has no actual impact on any benchmarks from what I could see, I removed
that code. It allows some changes to parseBlock(), since it now returns void and no-longer bool (it was returning a boolean that said whether that case happened or not).

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223112 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDisable INPUT_TYPE_COLOR in FeatureDefines.h
timothy_horton@apple.com [Tue, 10 Oct 2017 01:20:34 +0000 (01:20 +0000)]
Disable INPUT_TYPE_COLOR in FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=178103
<rdar://problem/34872127>

Reviewed by Simon Fraser.

* wtf/FeatureDefines.h:
Because FeatureDefines.h overrides features that are not enabled in
FeatureDefines.xcconfig, you currently have to turn INPUT_TYPE_COLOR
off in two places. Since we only ever want it on for Mac, it's OK
to depend on the xcconfig defining it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223111 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDelete button doesn't fully delete certain emoji
mmaxfield@apple.com [Tue, 10 Oct 2017 01:15:42 +0000 (01:15 +0000)]
Delete button doesn't fully delete certain emoji
https://bugs.webkit.org/show_bug.cgi?id=178096
<rdar://problem/34785106>

Reviewed by Simon Fraser.

Source/WebCore:

System infrastructure for handling emoji changes every year. Instead of having
custom code to specifically walk over codepoints, we should delegate to the
system handling.

Test: editing/deleting/delete-emoji.html

* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
(WebCore::isHangulLVT): Deleted.
(WebCore::isMark): Deleted.
(WebCore::isRegionalIndicator): Deleted.
(WebCore::isInArmenianToLimbuRange): Deleted.

LayoutTests:

* editing/deleting/delete-emoji-2.html:
* platform/mac/editing/deleting/delete-emoji-expected.txt:
* platform/mac/editing/deleting/delete-emoji-2-expected.txt:
* platform/ios/editing/deleting/delete-emoji-expected.txt:
* platform/ios/editing/deleting/delete-emoji-2-expected.txt:
* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223110 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix two test crashes caused by r223076.
aestes@apple.com [Tue, 10 Oct 2017 00:19:02 +0000 (00:19 +0000)]
Fix two test crashes caused by r223076.

* testing/Internals.cpp:
(WebCore::Internals::Internals):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223109 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoImage data should be coalesced if it comes in small chunks before updating the ImageS...
commit-queue@webkit.org [Tue, 10 Oct 2017 00:07:48 +0000 (00:07 +0000)]
Image data should be coalesced if it comes in small chunks before updating the ImageSource
https://bugs.webkit.org/show_bug.cgi?id=175890

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-10-09
Reviewed by Simon Fraser.

Coalesce the updates, which an Image makes when receiving encoded data in
small chunks, for all platforms. Ensure the clients of the CachedImage
won't be notified unless an update in the ImageSource happens.

I need to change some functions' names to better implement this patch.
The names of these functions have been confusing:
    CachedImage::addData(SharedBuffer&)
    CachedImage::addDataBuffer(const char* data, unsigned)
    CachedImage::addIncrementalDataBuffer(SharedBuffer&)

The image data is not buffered incrementally into the CachedImage. When
new data is received, SubresourceLoader calls CachedImage to "update" its
m_data with either a SharedBuffer or a data pointer. In either case the
SharedBuffer or the pointer contains all the loaded data. SubresourceLoader
calls CachedImage to update its m_data, to ensure its m_image is created
and to notify its clients with the new data.

The verb "add" in the functions' name is misleading. I am suggesting the
following names instead:
    CachedImage::updateBuffer(SharedBuffer&)
    CachedImage::updateData(const char*, unsigned)
    CachedImage::doUpdateBuffer(SharedBuffer&)

The first two are the virtual ones. They are called form SubresourceLoader.
The third one is the internal implementation to update the m_data member.
The same names will be used in the following classes:
    CachedResource which is the base class of CachedImage
    CachedRawResource which is derived from CachedResource
    CachedTextTrack which is derived from CachedResource

* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveDataOrBuffer):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::clearImage): Reset the update back off members.
(WebCore::CachedImage::doUpdateBuffer): Don't update CachedImage with
the new data if it comes in small chunks with fast rate.
(WebCore::CachedImage::shouldDeferUpdateImageData const): This code is moved
from ImageSource::dataChanged().
(WebCore::CachedImage::didUpdateImageData): Ditto.
(WebCore::CachedImage::updateImageData):
(WebCore::CachedImage::updateBuffer):
(WebCore::CachedImage::updateData):
(WebCore::CachedImage::finishLoading):
(WebCore::CachedImage::addIncrementalDataBuffer): Deleted.
(WebCore::CachedImage::setImageDataBuffer): Deleted.
(WebCore::CachedImage::addDataBuffer): Deleted.
(WebCore::CachedImage::addData): Deleted.
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::updateBuffer):
(WebCore::CachedRawResource::updateData):
(WebCore::CachedRawResource::addDataBuffer): Deleted.
(WebCore::CachedRawResource::addData): Deleted.
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::updateBuffer):
(WebCore::CachedResource::updateData):
(WebCore::CachedResource::addDataBuffer): Deleted.
(WebCore::CachedResource::addData): Deleted.
* loader/cache/CachedResource.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::doUpdateBuffer): Rename updateData() to doUpdateBuffer().
(WebCore::CachedTextTrack::updateBuffer): Rename addDataBuffer() to updateBuffer().
(WebCore::CachedTextTrack::finishLoading): Call the internal function doUpdateBuffer().
(WebCore::CachedTextTrack::updateData): Deleted.
(WebCore::CachedTextTrack::addDataBuffer): Deleted.
* loader/cache/CachedTextTrack.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::dataChanged): Move the update back off code to CachedImage::updateData().
* platform/graphics/ImageSource.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223091 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agousemap-casing.html test passes in browser, fails in LayoutTests because it is taller...
cdumez@apple.com [Tue, 10 Oct 2017 00:05:23 +0000 (00:05 +0000)]
usemap-casing.html test passes in browser, fails in LayoutTests because it is taller than 600px
https://bugs.webkit.org/show_bug.cgi?id=178053

Reviewed by Youenn Fablet.

Re-sync html/semantics/embedded-content/the-img-element/usemap-casing.html after:
- https://github.com/w3c/web-platform-tests/commit/881052cae58edb7a79157e99c80c5c70253ec976

* web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/usemap-casing.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRefactor the inliner to simplify block linking
rmorisset@apple.com [Mon, 9 Oct 2017 23:55:25 +0000 (23:55 +0000)]
Refactor the inliner to simplify block linking
https://bugs.webkit.org/show_bug.cgi?id=177922

Reviewed by Saam Barati.

The biggest refactor changes the way blocks are linked. In DFGByteCodeParser, most terminals (such as Jump or Branch) jump to nullptr initially, and have
some metadata indicating the bytecode index corresponding to their targets. They are later linked to the right basic block using two fields of InlineStackEntry:
- m_unlinkedBlocks is just a worklist of blocks with a terminal that needs to be linked
- m_linkingTargets is a dictionary from bytecode indices to BasicBlock*
Before refactoring, every block was automatically added to both of these fields, for the InlineStackEntry of whatever function allocated it.
This created a significant number of corner cases, such as blocks allocated in a caller, with a terminal written by an inlined callee and pointing to a block in the callee,
or blocks allocated in an inline callee, with a terminal written by the caller after it returns and pointing to a block in the caller, or blocks with a manually linked
terminal that needs to be taken off m_unlinkedBlocks.
I changed things so that blocks are only added to m_unlinkedBlocks when their terminal gets written (see the LAST_OPCODE macro) making it a lot easier to be in the "right" InlineStackEntry,
that is the one that holds their target in its m_linkingTargets field.

There are a few much smaller refactors in this patch:
- parse() is now of type void insted of bool (it was always returning true)
- The 7 and 8 arguments of handleCall were inlined in its 3 arguments version for readability
- The 9 argument version was cleaned up and simplified
- I made separate allocateBlock routines because the little dance with adoptRef(* new BasicBlock(...)) was being repeated in lots of places, and typos in that were a major source of bugs during other refactorings
- Jumps are now created with explicit addJumpTo() functions, providing some sanity checking through asserts and didLink()
- Blocks are only added to m_unlinkedBlocks if they end in a terminal that linkBlock works with (see LAST_OPCODE)

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::addToGraph):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::refineStatically):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
(JSC::DFG::ByteCodeParser::parse):
(JSC::DFG::parse):
(JSC::DFG::ByteCodeParser::cancelLinkingForBlock): Deleted.
* dfg/DFGByteCodeParser.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223086 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix typo of virtual keyword in PageClientImplIOS.h
commit-queue@webkit.org [Mon, 9 Oct 2017 23:27:54 +0000 (23:27 +0000)]
Fix typo of virtual keyword in PageClientImplIOS.h
https://bugs.webkit.org/show_bug.cgi?id=178088

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-10-09
Reviewed by Simon Fraser.

This compile error happens when FULLSCREEN_API is enabled for iOS.
Remove the redundant virtual keyword since function is marked override.

* UIProcess/ios/PageClientImplIOS.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223083 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a...
cdumez@apple.com [Mon, 9 Oct 2017 23:27:35 +0000 (23:27 +0000)]
[iOS][WK2] Tiles outsides the viewport are sometimes missing after relaunching a crashes WebProcess
https://bugs.webkit.org/show_bug.cgi?id=178095
<rdar://problem/34415016>

Reviewed by Simon Fraser.

Make sure we reset WKWebView._hasScheduledVisibleRectUpdate to NO in WKWebView._processDidExit.
_scheduleVisibleContentRectUpdateAfterScrollInView would otherwise return early because
WKWebView._hasScheduledVisibleRectUpdate is always YES. Normally,
_addUpdateVisibleContentRectPreCommitHandler sets a CATransaction commit handler that
resets _hasScheduledVisibleRectUpdate to NO, but it does not do so when ![webView _isValid]
(which is true when the WebProcess has crashed.

Also reset WKWebView._commitDidRestoreScrollPosition to NO in WKWebView._processDidExit even
though it does not seem to be the cause of this bug. It seems to make sense to reset this member
when the process crashes.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223082 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoImplement RegExp Unicode property escapes
msaboff@apple.com [Mon, 9 Oct 2017 23:14:46 +0000 (23:14 +0000)]
Implement RegExp Unicode property escapes
https://bugs.webkit.org/show_bug.cgi?id=172069

Reviewed by JF Bastien.

JSTests:

Enabled Unicode Property tests.

* test262.yaml:

Source/JavaScriptCore:

Added Unicode Properties by extending the existing CharacterClass processing.

Introduced a new Python script, generateYarrUnicodePropertyTables.py, that parses
Unicode Database files to create character class data.  The result is a set of functions
that return character classes, one for each of the required Unicode properties.
There are many cases where many properties are handled by one function, primarily due to
property aliases, but also due to Script_Extension properties that are the same as the
Script property for the same script value.

Extended the BuiltInCharacterClassID enum so it can be used also for Unicode property
character classes.  Unicode properties are the enum value BaseUnicodePropertyID plus a
zero based value, that value being the index to the corrensponding character class
function.  The generation script also creates static hashing tables similar to what we
use for the generated .lut.h lookup table files.  These hashing tables map property
names to the function index.  Using these hashing tables, we can lookup a property
name and if present convert it to a function index.  We add that index to
BaseUnicodePropertyID to create a BuiltInCharacterClassID.

When we do syntax parsing, we convert the property to its corresponding BuiltInCharacterClassID.
When doing real parsing we takes the returned BuiltInCharacterClassID and use it to get
the actual character class by calling the corresponding generated function.

Added a new CharacterClass constructor that can take literal arrays for ranges and matches
to make the creation of large static character classes more efficent.

Since the Unicode character classes typically have more matches and ranges, the character
class matching in the interpreter has been updated to use binary searching for matches and
ranges with more than 6 entries.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Scripts/generateYarrUnicodePropertyTables.py: Added.
(openOrExit):
(openUCDFileOrExit):
(verifyUCDFilesExist):
(ceilingToPowerOf2):
(Aliases):
(Aliases.__init__):
(Aliases.parsePropertyAliasesFile):
(Aliases.parsePropertyValueAliasesFile):
(Aliases.globalAliasesFor):
(Aliases.generalCategoryAliasesFor):
(Aliases.generalCategoryForAlias):
(Aliases.scriptAliasesFor):
(Aliases.scriptNameForAlias):
(PropertyData):
(PropertyData.__init__):
(PropertyData.setAliases):
(PropertyData.makeCopy):
(PropertyData.getIndex):
(PropertyData.getCreateFuncName):
(PropertyData.addMatch):
(PropertyData.addRange):
(PropertyData.addMatchUnorderedForMatchesAndRanges):
(PropertyData.addRangeUnorderedForMatchesAndRanges):
(PropertyData.addMatchUnordered):
(PropertyData.addRangeUnordered):
(PropertyData.removeMatchFromRanges):
(PropertyData.removeMatch):
(PropertyData.dumpMatchData):
(PropertyData.dump):
(PropertyData.dumpAll):
(PropertyData.dumpAll.std):
(PropertyData.createAndDumpHashTable):
(Scripts):
(Scripts.__init__):
(Scripts.parseScriptsFile):
(Scripts.parseScriptExtensionsFile):
(Scripts.dump):
(GeneralCategory):
(GeneralCategory.__init__):
(GeneralCategory.createSpecialPropertyData):
(GeneralCategory.findPropertyGroupFor):
(GeneralCategory.addNextCodePoints):
(GeneralCategory.parse):
(GeneralCategory.dump):
(BinaryProperty):
(BinaryProperty.__init__):
(BinaryProperty.parsePropertyFile):
(BinaryProperty.dump):
* Scripts/hasher.py: Added.
(stringHash):
* Sources.txt:
* ucd/DerivedBinaryProperties.txt: Added.
* ucd/DerivedCoreProperties.txt: Added.
* ucd/DerivedNormalizationProps.txt: Added.
* ucd/PropList.txt: Added.
* ucd/PropertyAliases.txt: Added.
* ucd/PropertyValueAliases.txt: Added.
* ucd/ScriptExtensions.txt: Added.
* ucd/Scripts.txt: Added.
* ucd/UnicodeData.txt: Added.
* ucd/emoji-data.txt: Added.
* yarr/Yarr.h:
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::testCharacterClass):
* yarr/YarrParser.h:
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parseTokens):
(JSC::Yarr::Parser::isUnicodePropertyValueExpressionChar):
(JSC::Yarr::Parser::tryConsumeUnicodePropertyExpression):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::appendInverted):
(JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
(JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
(JSC::Yarr::YarrPattern::errorMessage):
(JSC::Yarr::PatternTerm::dump):
* yarr/YarrPattern.h:
(JSC::Yarr::CharacterRange::CharacterRange):
(JSC::Yarr::CharacterClass::CharacterClass):
(JSC::Yarr::YarrPattern::reset):
(JSC::Yarr::YarrPattern::unicodeCharacterClassFor):
* yarr/YarrUnicodeProperties.cpp: Added.
(JSC::Yarr::HashTable::entry const):
(JSC::Yarr::unicodeMatchPropertyValue):
(JSC::Yarr::unicodeMatchProperty):
(JSC::Yarr::createUnicodeCharacterClassFor):
* yarr/YarrUnicodeProperties.h: Added.

Source/WebCore:

Refactoring change - Added BuiltInCharacterClassID:: prefix to uses of the enum.

* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::PatternParser::atomBuiltInCharacterClass):

LayoutTests:

New test.

* js/regexp-unicode-properties-expected.txt: Added.
* js/regexp-unicode-properties.html: Added.
* js/script-tests/regexp-unicode-properties.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223081 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoImageBitmap test gardening after https://bugs.webkit.org/show_bug.cgi?id=177963
dino@apple.com [Mon, 9 Oct 2017 22:49:43 +0000 (22:49 +0000)]
ImageBitmap test gardening after https://bugs.webkit.org/show_bug.cgi?id=177963

* web-platform-tests/imagebitmap-renderingcontext/bitmaprenderer-as-imagesource-expected.txt:
* web-platform-tests/imagebitmap-renderingcontext/context-creation-expected.txt:
* web-platform-tests/imagebitmap-renderingcontext/context-preserves-canvas-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223079 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Network Tab - Include remote address in the Headers view
commit-queue@webkit.org [Mon, 9 Oct 2017 22:47:58 +0000 (22:47 +0000)]
Web Inspector: Network Tab - Include remote address in the Headers view
https://bugs.webkit.org/show_bug.cgi?id=178094
<rdar://problem/34895221>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-10-09
Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._refreshSummarySection):
(WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223078 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Payment Request] Implement PaymentRequest.show() and PaymentRequest.hide()
aestes@apple.com [Mon, 9 Oct 2017 22:40:58 +0000 (22:40 +0000)]
[Payment Request] Implement PaymentRequest.show() and PaymentRequest.hide()
https://bugs.webkit.org/show_bug.cgi?id=178043
<rdar://problem/34076639>

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

* web-platform-tests/payment-request/payment-request-abort-method.https-expected.txt: Removed.
* web-platform-tests/payment-request/payment-request-show-method.https-expected.txt: Removed.

Source/WebCore:

Tests: http/tests/paymentrequest/payment-request-abort-method.https.html
       http/tests/paymentrequest/payment-request-show-method.https.html

* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentSession.h: Virtually inherited from PaymentSessionBase to
accommodate ApplePayPaymentHandler inheriting from both this and PaymentHandler.
(WebCore::PaymentSession::~PaymentSession): Deleted.
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::paymentCoordinator): Virtually inherited from PaymentSessionBase to accommodate
ApplePayPaymentHandler inheriting from both this and PaymentSession.
(WebCore::ApplePayPaymentHandler::hasActiveSession): Added. Calls PaymentCoordinator::hasActiveSession().
(WebCore::ApplePayPaymentHandler::show): Added. Calls PaymentCoordinator::beginPaymentSession().
(WebCore::ApplePayPaymentHandler::hide): Added. Calls PaymentCoordinator::abortPaymentSession().
* Modules/applepay/paymentrequest/ApplePayPaymentHandler.h: Inherited from PaymentSession in
addition to PaymentHandler so that this can be PaymentCoordinator active session.
* Modules/paymentrequest/PaymentHandler.cpp:
(WebCore::PaymentHandler::create):
(WebCore::PaymentHandler::hasActiveSession):
* Modules/paymentrequest/PaymentHandler.h:
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::~PaymentRequest):
(WebCore::PaymentRequest::show): Rejected the promise if PaymentCoordinator has an active session.
(WebCore::PaymentRequest::abort): Called stop().
(WebCore::PaymentRequest::canSuspendForDocumentSuspension const): Returned true if state is
Interactive and there is an active handler showing.
(WebCore::PaymentRequest::stop): Hid the active session if it's showing, then set state to
Closed and rejected the show promise.
* Modules/paymentrequest/PaymentRequest.h:
* Modules/paymentrequest/PaymentSessionBase.h: Added. Inherits from
RefCounted<PaymentSessionBase> and defines a virtual destructor. This allows subclasses to
virtually inherit a single ref-count to support multiple inheritance.
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType): Added ApplePaySession to the list of classes that need a vtable
offset of 3.
* page/MainFrame.cpp:
(WebCore::MainFrame::setPaymentCoordinator): Added a setter for m_paymentCoordinator.
* page/MainFrame.h:
* testing/Internals.cpp:
(WebCore::Internals::Internals): Set the main frame's payment coordinator to a new
PaymentCoordinator with MockPaymentCoordinator as its client.
* testing/MockPaymentCoordinator.cpp: Added a mock PaymentCoordinatorClient for testing.
(WebCore::MockPaymentCoordinator::supportsVersion):
(WebCore::MockPaymentCoordinator::canMakePayments):
(WebCore::MockPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::MockPaymentCoordinator::openPaymentSetup):
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::paymentCoordinatorDestroyed):
* testing/MockPaymentCoordinator.h: Added.

LayoutTests:

Copied payment-request-abort-method.https.html and payment-request-show-method.https.html
from web-platform-tests/payment-request/ and changed the payment method from basic-card to
Apple Pay. This needs to eventually be upstreamed back to WPT.

* TestExpectations:
* http/tests/paymentrequest/payment-request-abort-method.https-expected.txt: Added.
* http/tests/paymentrequest/payment-request-abort-method.https.html: Added.
* http/tests/paymentrequest/payment-request-show-method.https-expected.txt: Added.
* http/tests/paymentrequest/payment-request-show-method.https.html: Added.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223076 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd quota to cache API
commit-queue@webkit.org [Mon, 9 Oct 2017 22:17:05 +0000 (22:17 +0000)]
Add quota to cache API
https://bugs.webkit.org/show_bug.cgi?id=177552

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-09
Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/wpt/cache-storage/cache-quota.any.html

Storing padded opaque response body sizes within FetchResponse and CacheStorageConnection.
See https://github.com/whatwg/storage/issues/31 for the rationale about this padding.
Storing in CacheStorageConnection is needed for handling cloned network fetched created responses.
Storing in FetchResponse is needed for handling cloned cache-storage created opaque responses.

Adding internals to query and set the fuzzed size of a response.

* Modules/cache/CacheStorageConnection.cpp:
(WebCore::computeRealBodySize):
(WebCore::CacheStorageConnection::computeRecordBodySize):
(WebCore::CacheStorageConnection::setResponseBodySizeWithPadding):
(WebCore::CacheStorageConnection::responseBodySizeWithPadding const):
* Modules/cache/CacheStorageConnection.h:
* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::toConnectionRecord):
(WebCore::DOMCache::updateRecords):
* Modules/cache/DOMCache.h:
* Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::errorToException):
(WebCore::DOMCacheEngine::Record::copy const):
* Modules/cache/DOMCacheEngine.h:
* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::toCrossThreadRecordData):
(WebCore::fromCrossThreadRecordData):
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::clone):
(WebCore::FetchResponse::BodyLoader::didReceiveResponse):
* Modules/fetch/FetchResponse.h:
* Modules/fetch/FetchResponse.idl:
* testing/Internals.cpp:
(WebCore::Internals::setResponseSizeWithPadding):
(WebCore::Internals::responseSizeWithPadding const):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Adding support for quota checking in CacheStorage::Caches.
It is passed to NetworkProcess at creation time.
Default quota size is configured to 400Ko by origin per default.
This value is suitable for testing.
Future patch should raise this default value and allows configuring it.

Quota is computed based on the response body size.
This size is padded at WebCore for opaque responses.
Size is stored persistently as opaque response padded size should remain stable.
See https://github.com/whatwg/storage/issues/31 for the rationale about this padding.

In case of putting several records at the same time, the size of all records
is computed so that all records will be written or rejected together.

Sending QuotaExceeded error when quota is exceeded.
Future effort should allow asking UIProcess for quota extension.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::cacheStoragePerOriginQuota const):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::readCachesFromDisk):
* NetworkProcess/cache/CacheStorageEngineCache.cpp:
(WebKit::CacheStorage::Cache::toRecordInformation):
(WebKit::CacheStorage::isolatedCopy):
(WebKit::CacheStorage::Cache::open):
(WebKit::CacheStorage::Cache::storeRecords):
(WebKit::CacheStorage::Cache::put):
(WebKit::CacheStorage::Cache::writeRecordToDisk):
(WebKit::CacheStorage::Cache::updateRecordToDisk):
(WebKit::CacheStorage::Cache::removeRecordFromDisk):
(WebKit::CacheStorage::Cache::encode):
(WebKit::CacheStorage::Cache::decodeRecordHeader):
(WebKit::CacheStorage::Cache::decode):
* NetworkProcess/cache/CacheStorageEngineCache.h:
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::Caches):
(WebKit::CacheStorage::Caches::initialize):
(WebKit::CacheStorage::Caches::initializeSize):
(WebKit::CacheStorage::Caches::requestSpace):
(WebKit::CacheStorage::Caches::writeRecord):
(WebKit::CacheStorage::Caches::removeRecord):
(WebKit::CacheStorage::Caches::removeCacheEntry):
* NetworkProcess/cache/CacheStorageEngineCaches.h:
(WebKit::CacheStorage::Caches::create):
(WebKit::CacheStorage::Caches::hasEnoughSpace const):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::traverse):
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DOMCacheEngine::Record>::encode):
(IPC::ArgumentCoder<DOMCacheEngine::Record>::decode):
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):

LayoutTests:

* http/wpt/cache-storage/cache-quota.https.any-expected.txt: Added.
* http/wpt/cache-storage/cache-quota.https.any.html: Added.
* http/wpt/cache-storage/cache-quota.https.any.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223073 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove redundant RenderObject::virtualContinuation
zalan@apple.com [Mon, 9 Oct 2017 21:57:52 +0000 (21:57 +0000)]
Remove redundant RenderObject::virtualContinuation
https://bugs.webkit.org/show_bug.cgi?id=178091
<rdar://problem/34892906>

Reviewed by Antti Koivisto.

virtualContinuation sounds like a feature of continuation, while it's just a (not super useful)helper override.

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::canMergeContiguousAnonymousBlocks):
(WebCore::RenderBlock::takeChild):
* rendering/RenderBlock.h:
* rendering/RenderInline.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isBlockElementContinuation const):
(WebCore::RenderObject::virtualContinuation const): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnskipped http/tests/cache/disk-cache/disk-cache-validation-no-body.html
jlewis3@apple.com [Mon, 9 Oct 2017 21:49:01 +0000 (21:49 +0000)]
Unskipped http/tests/cache/disk-cache/disk-cache-validation-no-body.html
https://bugs.webkit.org/show_bug.cgi?id=178019

Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Win] Link error: cannot open input file 'WebKitLegacyGUID.lib'
pvollan@apple.com [Mon, 9 Oct 2017 21:17:25 +0000 (21:17 +0000)]
[Win] Link error: cannot open input file 'WebKitLegacyGUID.lib'
https://bugs.webkit.org/show_bug.cgi?id=178087

Reviewed by Alexey Proskuryakov.

For compatibility reasons, the library still has the name WebKitGUID.lib.

* PlatformWin.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223070 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r223015 and r223025.
commit-queue@webkit.org [Mon, 9 Oct 2017 21:17:14 +0000 (21:17 +0000)]
Unreviewed, rolling out r223015 and r223025.
https://bugs.webkit.org/show_bug.cgi?id=178093

Regressed Kraken on iOS by 20% (Requested by keith_mi_ on
#webkit).

Reverted changesets:

"Enable gigacage on iOS"
https://bugs.webkit.org/show_bug.cgi?id=177586
http://trac.webkit.org/changeset/223015

"Unreviewed, disable Gigacage on ARM64 Linux"
https://bugs.webkit.org/show_bug.cgi?id=177586
http://trac.webkit.org/changeset/223025

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, minified WebInspector opens blank.
joepeck@webkit.org [Mon, 9 Oct 2017 20:57:57 +0000 (20:57 +0000)]
Unreviewed, minified WebInspector opens blank.
<rdar://problem/34892307>

* UserInterface/Views/ResourceHeadersContentView.js:
(WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
Regression introduced in r223006. The minified build has a SyntaxError
causing WebInspector top open blank. Add the missing semicolon.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223068 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate expectations for test262 tests that pass after r223043.
ryanhaddad@apple.com [Mon, 9 Oct 2017 20:46:07 +0000 (20:46 +0000)]
Update expectations for test262 tests that pass after r223043.
https://bugs.webkit.org/show_bug.cgi?id=176685

Unreviewed test gardening.

* test262.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, sort unified sources again now that they are numbered numerically rather...
keith_miller@apple.com [Mon, 9 Oct 2017 20:45:04 +0000 (20:45 +0000)]
Unreviewed, sort unified sources again now that they are numbered numerically rather than lexicographically.

* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223066 268f45cc-cd09-0410-ab3c-d52691b4dbfc