WebKit-https.git
3 years agoUnreviewed test gardening
jiewen_tan@apple.com [Thu, 26 Apr 2018 00:42:20 +0000 (00:42 +0000)]
Unreviewed test gardening

Mark http/tests/misc/submit-post-keygen.html as 'Skip' in Win because of lacking corresponding
implementations.

* platform/win/TestExpectations:

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

3 years agoGardening: Speculative build fix for Windows 32-bit to compensate for MSVC's lack...
mark.lam@apple.com [Thu, 26 Apr 2018 00:13:35 +0000 (00:13 +0000)]
Gardening: Speculative build fix for Windows 32-bit to compensate for MSVC's lack of smarts.
https://bugs.webkit.org/show_bug.cgi?id=184976
<rdar://problem/39723901>

Not reviewed.

According to https://stackoverflow.com/questions/37658794/integer-constant-overflow-warning-in-constexpr,
disabling the warning around the definition of the function will not disable it
for all clients of the function.

* wtf/PtrTag.h:
(WTF::makePtrTagHash):

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

3 years agoIn FTLLowerDFGToB3.cpp::compileCreateRest, always use a contiguous array as the index...
rmorisset@apple.com [Wed, 25 Apr 2018 23:32:58 +0000 (23:32 +0000)]
In FTLLowerDFGToB3.cpp::compileCreateRest, always use a contiguous array as the indexing type when under isWatchingHavingABadTimeWatchpoint
https://bugs.webkit.org/show_bug.cgi?id=184773
<rdar://problem/37773612>

Reviewed by Filip Pizlo.

JSTests:

This bug requires a race between the thread doing FTL compilation and the main thread, but it triggers in 100% of cases (before the fix) on my machine
so I decided to add it to the stress tests nonetheless.

* stress/create-rest-while-having-a-bad-time.js: Added.
(f):
(g):
(h):

Source/JavaScriptCore:

We were calling restParameterStructure(), which returns arrayStructureForIndexingTypeDuringAllocation(ArrayWithContiguous).
arrayStructureForIndexingTypeDuringAllocation uses m_arrayStructureForIndexingShapeDuringAllocation, which is set to SlowPutArrayStorage when we are 'having a bad time'.
This is problematic, because the structure is then passed to allocateUninitializedContiguousJSArray, which ASSERTs that the indexing type is contiguous (or int32).
We solve the problem by using originalArrayStructureForIndexingType which always returns a structure with the right indexing type (contiguous), even if we are having a bad time.
This is safe, as we are under isWatchingHavingABadTimeWatchpoint, so if we have a bad time, the code we generate will never be installed.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCreateRest):

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

3 years agobrightness() filter should default to 1, and not allow negative values
simon.fraser@apple.com [Wed, 25 Apr 2018 23:24:47 +0000 (23:24 +0000)]
brightness() filter should default to 1, and not allow negative values
https://bugs.webkit.org/show_bug.cgi?id=184937

Reviewed by Dean Jackson.
Source/WebCore:

Remove the special-casing for brightness() in consumeFilterFunction(), so it now
follows the same logic as the other color-related filters in not allowing negative
values.

Removed the special-casing for brightness() in createFilterOperations() so its default
value is now 1.

Modified existing tests.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::allowsValuesGreaterThanOne):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):

LayoutTests:

Added negative value tests to filter-property-parsing.html and backdropfilter-property-parsing.html,
and made these tests more similar.

Fixed expected computed value for brightness() to be brightness(1) in the tests.

The effect-brightness* test results failed because elements with invalid brightness values now
no longer create a RenderLayer.

* css3/color-filters/color-filter-parsing-expected.txt:
* css3/color-filters/color-filter-parsing.html:
* css3/filters/backdrop/backdropfilter-property-computed-style-expected.txt:
* css3/filters/backdrop/backdropfilter-property-computed-style.html:
* css3/filters/backdrop/backdropfilter-property-parsing-expected.txt:
* css3/filters/backdrop/backdropfilter-property-parsing.html:
* css3/filters/effect-brightness-expected.txt:
* css3/filters/filter-property-computed-style-expected.txt:
* css3/filters/filter-property-computed-style.html:
* css3/filters/filter-property-parsing-expected.txt:
* css3/filters/filter-property-parsing.html:
* css3/filters/unprefixed-expected.txt:
* css3/filters/unprefixed.html:
* fast/filter-image/parse-filter-image-expected.txt:
* fast/filter-image/parse-filter-image.html:
* platform/mac/css3/filters/effect-brightness-clamping-expected.txt:

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

3 years agoMissing closing parenthesis when determining INSTALL_PATH build setting in WebCore...
wenson_hsieh@apple.com [Wed, 25 Apr 2018 23:23:00 +0000 (23:23 +0000)]
Missing closing parenthesis when determining INSTALL_PATH build setting in WebCore.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=184999

Reviewed by Tim Horton.

Tweaks a line in WebCore.xcconfig that computes INSTALL_PATH, so that it doesn't use WK_NOT or WK_EMPTY.

* Configurations/WebCore.xcconfig:

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

3 years agoPSON: Don't create a new process when navigating to a blob URL, data URL, and about...
rniwa@webkit.org [Wed, 25 Apr 2018 23:17:31 +0000 (23:17 +0000)]
PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank
https://bugs.webkit.org/show_bug.cgi?id=184962

Reviewed by Youenn Fablet.
<rdar://problem/39715044>

Build fix. Revert the change in r231019 to remove the empty URL and about:blank check here.
These checks are for the source / originating URL, not the target URL.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):

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

3 years ago[WPE][Debug] Test gardening of EME related tests.
clopez@igalia.com [Wed, 25 Apr 2018 23:13:13 +0000 (23:13 +0000)]
[WPE][Debug] Test gardening of EME related tests.

Report and mark the tests crashing on the Debug build.

* platform/wpe/TestExpectations:

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

3 years ago[LFC] Implement LayoutContexet::layout() and its dependencies.
zalan@apple.com [Wed, 25 Apr 2018 22:54:01 +0000 (22:54 +0000)]
[LFC] Implement LayoutContexet::layout() and its dependencies.
https://bugs.webkit.org/show_bug.cgi?id=184951

Reviewed by Antti Koivisto.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::FormattingContext):
(WebCore::Layout::FormattingContext::~FormattingContext):
(WebCore::Layout::FormattingContext::computeStaticPosition):
(WebCore::Layout::FormattingContext::computeInFlowPositionedPosition):
(WebCore::Layout::FormattingContext::computeOutOfFlowPosition):
(WebCore::Layout::FormattingContext::computeWidth):
(WebCore::Layout::FormattingContext::computeHeight):
(WebCore::Layout::FormattingContext::marginTop):
(WebCore::Layout::FormattingContext::marginLeft):
(WebCore::Layout::FormattingContext::marginBottom):
(WebCore::Layout::FormattingContext::marginRight):
* layout/FormattingContext.h:
* layout/FormattingState.cpp:
(WebCore::Layout::FormattingState::FormattingState):
* layout/FormattingState.h:
* layout/LayoutContext.cpp:
(WebCore::Layout::LayoutContext::LayoutContext):
(WebCore::Layout::LayoutContext::updateLayout):
(WebCore::Layout::LayoutContext::formattingState):
(WebCore::Layout::LayoutContext::formattingContext):
* layout/LayoutContext.h:
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
(WebCore::Layout::BlockFormattingContext::layout):
(WebCore::Layout::BlockFormattingContext::formattingState const):
(WebCore::Layout::BlockFormattingContext::computeStaticPosition):
(WebCore::Layout::BlockFormattingContext::computeWidth):
(WebCore::Layout::BlockFormattingContext::computeHeight):
(WebCore::Layout::BlockFormattingContext::marginTop):
(WebCore::Layout::BlockFormattingContext::marginBottom):
* layout/blockformatting/BlockFormattingContext.h:
* layout/blockformatting/BlockFormattingState.cpp:
(WebCore::Layout::BlockFormattingState::BlockFormattingState):
* layout/blockformatting/BlockFormattingState.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
(WebCore::Layout::InlineFormattingContext::layout):
(WebCore::Layout::InlineFormattingContext::formattingState const):
* layout/inlineformatting/InlineFormattingContext.h:
* layout/inlineformatting/InlineFormattingState.cpp:
(WebCore::Layout::InlineFormattingState::InlineFormattingState):
* layout/inlineformatting/InlineFormattingState.h:

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

3 years agoPush the definition of PtrTag down to the WTF layer.
mark.lam@apple.com [Wed, 25 Apr 2018 22:31:13 +0000 (22:31 +0000)]
Push the definition of PtrTag down to the WTF layer.
https://bugs.webkit.org/show_bug.cgi?id=184976
<rdar://problem/39723901>

Reviewed by Saam Barati.

Source/JavaScriptCore:

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/ARM64Assembler.h:
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssemblerCodeRef.cpp:
* assembler/MacroAssemblerCodeRef.h:
* b3/B3MathExtras.cpp:
* bytecode/LLIntCallLinkInfo.h:
* disassembler/Disassembler.h:
* ftl/FTLJITCode.cpp:
* interpreter/InterpreterInlines.h:
* jit/ExecutableAllocator.h:
* jit/JITOperations.cpp:
* jit/ThunkGenerator.h:
* jit/ThunkGenerators.h:
* llint/LLIntOffsetsExtractor.cpp:
* llint/LLIntPCRanges.h:
* runtime/JSCPtrTag.h: Added.
* runtime/NativeFunction.h:
* runtime/PtrTag.h: Removed.
* runtime/VMTraps.cpp:

Source/WebCore:

No new tests needed.  This is covered by existing tests.

* cssjit/CSSPtrTag.h:
* cssjit/SelectorCompiler.h:
(WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):

Source/WTF:

This is in preparation for doing pointer profiling at the WTF layer as well.
Also deleted an unused ptrTag() function.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/PtrTag.h: Copied from Source/JavaScriptCore/runtime/PtrTag.h.
(WTF::makePtrTagHash):
(JSC::ptrTagName): Deleted.
(JSC::tagForPtr): Deleted.
(JSC::ptrTag): Deleted.
(JSC::tagCodePtr): Deleted.
(JSC::untagCodePtr): Deleted.
(JSC::retagCodePtr): Deleted.
(JSC::removeCodePtrTag): Deleted.
(JSC::tagCFunctionPtr): Deleted.
(JSC::untagCFunctionPtr): Deleted.
(JSC::assertIsCFunctionPtr): Deleted.
(JSC::assertIsNullOrCFunctionPtr): Deleted.
(JSC::assertIsNotTagged): Deleted.
(JSC::assertIsTagged): Deleted.
(JSC::assertIsNullOrTagged): Deleted.
(JSC::assertIsTaggedWith): Deleted.
(JSC::assertIsNullOrTaggedWith): Deleted.

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

3 years agoWebLoaderStrategy::networkMetricsFromResourceLoadIdentifier should use DoNotProcessIn...
youenn@apple.com [Wed, 25 Apr 2018 22:27:49 +0000 (22:27 +0000)]
WebLoaderStrategy::networkMetricsFromResourceLoadIdentifier should use DoNotProcessIncomingMessagesWhenWaitingForSyncReply
https://bugs.webkit.org/show_bug.cgi?id=184978
<rdar://problem/39667094>

Reviewed by Simon Fraser.

Use DoNotProcessIncomingMessagesWhenWaitingForSyncReply to keep a consistent state after the sync IPC call.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::responseFromResourceLoadIdentifier):
(WebKit::WebLoaderStrategy::networkMetricsFromResourceLoadIdentifier):

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

3 years ago[iOS] remove media element parameter from MediaElementSession methods
eric.carlson@apple.com [Wed, 25 Apr 2018 22:25:13 +0000 (22:25 +0000)]
[iOS] remove media element parameter from MediaElementSession methods
https://bugs.webkit.org/show_bug.cgi?id=184992
<rdar://problem/39731624>

Reviewed by Jon Lee.

No new tests, no behavior change.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::allowsInlineMediaPlayback const):
(WebCore::MediaControlsHost::userGestureRequired const):
* accessibility/AccessibilityMediaObject.cpp:
(WebCore::AccessibilityMediaObject::isPlayingInline const):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay const):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::play):
(WebCore::HTMLMediaElement::pause):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::setVolume):
(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
(WebCore::HTMLMediaElement::sourceWasAdded):
(WebCore::HTMLMediaElement::mediaEngineWasUpdated):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::updatePlayState):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker):
(WebCore::HTMLMediaElement::addEventListener):
(WebCore::HTMLMediaElement::removeEventListener):
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::configureMediaControls):
(WebCore::HTMLMediaElement::createMediaPlayer):
(WebCore::HTMLMediaElement::mediaPlayerIsFullscreenPermitted const):
(WebCore::HTMLMediaElement::updateMediaState):
(WebCore::HTMLMediaElement::mediaState const):
(WebCore::HTMLMediaElement::allowsMediaDocumentInlinePlaybackChanged):
(WebCore::HTMLMediaElement::updateShouldPlay):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute):
(WebCore::HTMLVideoElement::supportsFullscreen const):
(WebCore::HTMLVideoElement::webkitEnterFullscreen):
(WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled const):
(WebCore::HTMLVideoElement::webkitSupportsPresentationMode const):
(WebCore::HTMLVideoElement::setFullscreenMode):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted const):
(WebCore::MediaElementSession::dataLoadingPermitted const):
(WebCore::MediaElementSession::fullscreenPermitted const):
(WebCore::MediaElementSession::pageAllowsDataLoading const):
(WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming const):
(WebCore::MediaElementSession::canShowControlsManager const):
(WebCore::MediaElementSession::showPlaybackTargetPicker):
(WebCore::MediaElementSession::hasWirelessPlaybackTargets const):
(WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
(WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
(WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
(WebCore::MediaElementSession::mediaStateDidChange):
(WebCore::MediaElementSession::effectivePreloadForElement const):
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
(WebCore::MediaElementSession::allowsAutomaticMediaDataLoading const):
(WebCore::MediaElementSession::mediaEngineUpdated):
(WebCore::MediaElementSession::allowsPictureInPicture const):
* html/MediaElementSession.h:
* platform/cocoa/PlaybackSessionModelMediaElement.mm:
(WebCore::PlaybackSessionModelMediaElement::wirelessVideoPlaybackDisabled const):

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

3 years agoRemove access to keychain from the WebContent process
jiewen_tan@apple.com [Wed, 25 Apr 2018 22:10:01 +0000 (22:10 +0000)]
Remove access to keychain from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=184428
<rdar://problem/13150903>

Reviewed by Brent Fulgham.

Source/WebCore:

Part 2.

This patch move the operation of HTMLKeygenElement from WebContent Process to UI Process.
Function signedPublicKeyAndChallengeString is therefore marked as WEBCORE_EXPORT. Also, a
localized string is marked WEBCORE_EXPORT as well to support the API test.

Covered by existing tests and api tests.

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::signedPublicKeyAndChallengeString):
* dom/Document.h:
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::appendFormData):
* page/ChromeClient.h:
* platform/LocalizedStrings.h:
* platform/SSLKeyGenerator.h:

Source/WebKit:

This patch does the followings:
1. Added necessary support to move HTMLKeygenElement's operation from WebContent Process to UI Process.
2. Craft new SPI copySignedPublicKeyAndChallengeString to supply HTMLKeygenElement with dummy data such
that WebKitTestRunner tests will not modify the underlying key store (e.g., the macOS Keychain).

* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::signedPublicKeyAndChallengeString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageNavigationClient):
* UIProcess/API/C/WKPageNavigationClient.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::signedPublicKeyAndChallengeString):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::signedPublicKeyAndChallengeString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::signedPublicKeyAndChallengeString const):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

This patch does the followings:
1. Added necessary support to move HTMLKeygenElement's operation from WebCore space to Client space.
2. Craft new SPI signedPublicKeyAndChallengeStringForWebView to supply HTMLKeygenElement with dummy data
such that DumpRenderTree tests will not modify the underlying key store (e.g., the macOS Keychain).

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::signedPublicKeyAndChallengeString const):
* WebView/WebUIDelegatePrivate.h:

Tools:

This patch does the followings:
1. Added an API test for this patch.
2. Instrument DumpRenderTree and WebKitTestRunner to take advantages of new SPIs.

* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate signedPublicKeyAndChallengeStringForWebView:]):
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm: Added.
(TestWebKitAPI::SSLKeyGeneratorTest::SetUp):
(TestWebKitAPI::SSLKeyGeneratorTest::TearDown):
(TestWebKitAPI::TEST_F):
* WebKitTestRunner/TestController.cpp:
(WTR::copySignedPublicKeyAndChallengeString):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

LayoutTests:

Alter the layout test to match dummy data supplied by the test runners.
Modify expectations as well.

* http/tests/misc/resources/check-keygen-post.php:
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

3 years ago[Extra zoom mode] The search field on www.bing.com is missing label text
wenson_hsieh@apple.com [Wed, 25 Apr 2018 21:23:27 +0000 (21:23 +0000)]
[Extra zoom mode] The search field on bing.com is missing label text
https://bugs.webkit.org/show_bug.cgi?id=184975
<rdar://problem/39723081>

Reviewed by Tim Horton.

Source/WebKit:

Adds support for displaying the "aria-label" attribute as the input view's label text in extra zoom mode. Also
adds support for grabbing the input label's text for testing.

Test: fast/forms/extrazoom/form-control-label-text.html

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode const):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView formInputLabel]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView formInputLabel]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):

Tools:

Adds UIScriptController.formInputLabel, which asynchronously requests the input label text for the currently
focused element in extra zoom mode.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::formInputLabel const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::formInputLabel const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::formInputLabel const):

LayoutTests:

Adds a layout test to check that the label text of the focused form control in the input view can be sourced
from (1) the "placeholder" attribute, (2) the "title" attribute, (3) the "aria-label" attribute, or (4) an
associated label element.

* fast/forms/extrazoom/form-control-label-text-expected.txt: Added.
* fast/forms/extrazoom/form-control-label-text.html: Added.
* resources/ui-helper.js:
(window.UIHelper.formInputLabel):
(window.UIHelper):

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

3 years ago[WPE] Should load injected bundle from builddir in developer builds
mcatanzaro@igalia.com [Wed, 25 Apr 2018 21:16:49 +0000 (21:16 +0000)]
[WPE] Should load injected bundle from builddir in developer builds
https://bugs.webkit.org/show_bug.cgi?id=184983

Reviewed by Carlos Alberto Lopez Perez.

Set WEBKIT_INJECTED_BUNDLE_PATH when running WPE MiniBrowser.

* Scripts/run-minibrowser:

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

3 years ago[WPE] libgstggtk.so broken in jhbuild environment
mcatanzaro@igalia.com [Wed, 25 Apr 2018 21:13:33 +0000 (21:13 +0000)]
[WPE] libgstggtk.so broken in jhbuild environment
https://bugs.webkit.org/show_bug.cgi?id=184984

Reviewed by Carlos Alberto Lopez Perez.

Don't pass --enable-glx=no when building libepoxy, to ensure it's compatible with
gst-plugins-good.

* wpe/jhbuild.modules:

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

3 years agoPSON: Don't create a new process when navigating to a blob URL, data URL, and about...
rniwa@webkit.org [Wed, 25 Apr 2018 20:48:03 +0000 (20:48 +0000)]
PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank
https://bugs.webkit.org/show_bug.cgi?id=184962

Reviewed by Youenn Fablet.

Source/WebCore:

Added NavigationAction::treatAsSameOriginNavigation, which signifies WebKit code to avoid creating
a new WebContent process when navigating to a blob URL, data URL, and about:blank.

Tests: ProcessSwap.SameOriginBlobNavigation
       ProcessSwap.CrossOriginBlobNavigation
       ProcessSwap.NavigateToAboutBlank
       ProcessSwap.NavigateToDataURL

* loader/NavigationAction.cpp:
(WebCore::treatAsSameOriginNavigation):
* loader/NavigationAction.h:
(WebCore::NavigationAction::treatAsSameOriginNavigation const):

Source/WebKit:

Don't create a new WebContent process when navigating to a blob object URL since doing so
can result in a race condition in which the blog URL is removed from the blob registry of
the network process by the time the navigation gets commited. This causes a failure in
fast/dom/HTMLAnchorElement/anchor-download-unset.html and oher layout tests.

In the future, the network process should verify that a given WebContent process has access
to a given blob URL. For now, we rely on WebContent process to tell us whether it can
navigate to a given blob URL or not.

* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode const): Encode newly added treatAsSameOriginNavigation.
(WebKit::NavigationActionData::decode): Ditto for decoding.
* Shared/NavigationActionData.h:
(WebKit::NavigationActionData::treatAsSameOriginNavigation): Added.
* UIProcess/API/APINavigation.h:
(API::Navigation::setTreatAsSameOriginNavigation): Added.
(API::Navigation::treatAsSameOriginNavigation const): Added.
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Use the current process when
treatAsSameOriginNavigation is set to true; i.e. when navigating to a blob URL the current
document has access.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Tools:

Added four test cases for navigating to a blob URL, data URL, and about:blank with process-swap-on-navigation turned on.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(ProcessSwap.SameOriginBlobNavigation): Added.
(ProcessSwap.CrossOriginBlobNavigation): Added.
(ProcessSwap.NavigateToAboutBlank): Added.
(ProcessSwap.NavigateToDataURL): Added.

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

3 years agogetUnlinkedGlobalFunctionExecutable should only save things to the code cache if...
keith_miller@apple.com [Wed, 25 Apr 2018 20:43:42 +0000 (20:43 +0000)]
getUnlinkedGlobalFunctionExecutable should only save things to the code cache if the option is set
https://bugs.webkit.org/show_bug.cgi?id=184998

Reviewed by Saam Barati.

* runtime/CodeCache.cpp:
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

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

3 years ago[LFC] Implement Layout::BlockContainer functions.
zalan@apple.com [Wed, 25 Apr 2018 20:35:39 +0000 (20:35 +0000)]
[LFC] Implement Layout::BlockContainer functions.
https://bugs.webkit.org/show_bug.cgi?id=184994

Reviewed by Antti Koivisto.

* layout/layouttree/LayoutBlockContainer.cpp:
(WebCore::Layout::BlockContainer::BlockContainer):
(WebCore::Layout::BlockContainer::establishesInlineFormattingContext const):

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

3 years agoDon't activate Selection Assistant unless it is actually needed.
megan_gardner@apple.com [Wed, 25 Apr 2018 20:34:40 +0000 (20:34 +0000)]
Don't activate Selection Assistant unless it is actually needed.
https://bugs.webkit.org/show_bug.cgi?id=184944
<rdar://problem/39469671>

Reviewed by Tim Horton.

Source/WebKit:

Don't activate the selection unless we need to. Activating on init is overeager and allowing Javascript to
activate selections without user input.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView useSelectionAssistantWithGranularity:]):

LayoutTests:

Turning on previously flakey tests that are fixed with this change.

* platform/ios-wk2/TestExpectations:

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

3 years agoAdd missing scope release to functionProtoFuncToString
keith_miller@apple.com [Wed, 25 Apr 2018 20:31:25 +0000 (20:31 +0000)]
Add missing scope release to functionProtoFuncToString
https://bugs.webkit.org/show_bug.cgi?id=184995

Reviewed by Saam Barati.

JSTests:

* stress/function-toString-arrow.js: Added.
(async):

Source/JavaScriptCore:

* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncToString):

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

3 years agoFix entitlements and sandbox configurations in WebKit after r230778
wenson_hsieh@apple.com [Wed, 25 Apr 2018 20:13:23 +0000 (20:13 +0000)]
Fix entitlements and sandbox configurations in WebKit after r230778
https://bugs.webkit.org/show_bug.cgi?id=184960
<rdar://problem/39662827>

Reviewed by Tim Horton.

Build fixes for watchOS and tvOS after r230778.

* Configurations/BaseXPCService.xcconfig:
* Configurations/NetworkService.xcconfig:
* Configurations/WebContentService.xcconfig:

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

3 years ago[LFC] Implement Layout::Container functions.
zalan@apple.com [Wed, 25 Apr 2018 20:09:37 +0000 (20:09 +0000)]
[LFC] Implement Layout::Container functions.
https://bugs.webkit.org/show_bug.cgi?id=184988

Reviewed by Antti Koivisto.

* layout/layouttree/LayoutContainer.cpp:
(WebCore::Layout::Container::Container):
(WebCore::Layout::Container::firstInFlowChild const):
(WebCore::Layout::Container::firstInFlowOrFloatingChild const):
(WebCore::Layout::Container::lastInFlowChild const):
(WebCore::Layout::Container::lastInFlowOrFloatingChild const):
(WebCore::Layout::Container::setFirstChild):
(WebCore::Layout::Container::setLastChild):
(WebCore::Layout::Container::setOutOfFlowDescendants):
* layout/layouttree/LayoutContainer.h:
(WebCore::Layout::Container::firstChild const):
(WebCore::Layout::Container::lastChild const):
(WebCore::Layout::Container::hasChild const):
(WebCore::Layout::Container::hasInFlowChild const):
(WebCore::Layout::Container::hasInFlowOrFloatingChild const):
(WebCore::Layout::Container::outOfFlowDescendants):

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

3 years ago[CMake] Some options should be marked as advanced
mcatanzaro@igalia.com [Wed, 25 Apr 2018 19:58:53 +0000 (19:58 +0000)]
[CMake] Some options should be marked as advanced
https://bugs.webkit.org/show_bug.cgi?id=184972

Reviewed by Konstantin Tokarev.

* Source/cmake/FindLibGcrypt.cmake:
* Source/cmake/FindWebP.cmake:

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

3 years agoREGRESSION(r230748) [GTK][ARM] no matching function for call to 'JSC::CCallHelpers...
utatane.tea@gmail.com [Wed, 25 Apr 2018 19:55:11 +0000 (19:55 +0000)]
REGRESSION(r230748) [GTK][ARM] no matching function for call to 'JSC::CCallHelpers::swap(JSC::ARMRegisters::FPRegisterID&, JSC::ARMRegisters::FPRegisterID&)'
https://bugs.webkit.org/show_bug.cgi?id=184730

Reviewed by Mark Lam.

Add swap(FPRegisterID, FPRegisterID) implementation using ARMRegisters::SD0 (temporary register in MacroAssemblerARM).
And we now use dataTempRegister, addressTempRegister, and fpTempRegister instead of using S0, S1, and SD0.

We also change swap(RegisterID, RegisterID) implementation to use moves and temporaries simply. This is aligned to
ARMv7 implementation.

* assembler/ARMAssembler.h:
* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::add32):
(JSC::MacroAssemblerARM::and32):
(JSC::MacroAssemblerARM::lshift32):
(JSC::MacroAssemblerARM::mul32):
(JSC::MacroAssemblerARM::or32):
(JSC::MacroAssemblerARM::rshift32):
(JSC::MacroAssemblerARM::urshift32):
(JSC::MacroAssemblerARM::sub32):
(JSC::MacroAssemblerARM::xor32):
(JSC::MacroAssemblerARM::load8):
(JSC::MacroAssemblerARM::abortWithReason):
(JSC::MacroAssemblerARM::load32WithAddressOffsetPatch):
(JSC::MacroAssemblerARM::store32WithAddressOffsetPatch):
(JSC::MacroAssemblerARM::store8):
(JSC::MacroAssemblerARM::store32):
(JSC::MacroAssemblerARM::push):
(JSC::MacroAssemblerARM::swap):
(JSC::MacroAssemblerARM::branch8):
(JSC::MacroAssemblerARM::branchPtr):
(JSC::MacroAssemblerARM::branch32):
(JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
(JSC::MacroAssemblerARM::branchTest8):
(JSC::MacroAssemblerARM::branchTest32):
(JSC::MacroAssemblerARM::jump):
(JSC::MacroAssemblerARM::branchAdd32):
(JSC::MacroAssemblerARM::mull32):
(JSC::MacroAssemblerARM::branchMul32):
(JSC::MacroAssemblerARM::patchableBranch32):
(JSC::MacroAssemblerARM::nearCall):
(JSC::MacroAssemblerARM::compare32):
(JSC::MacroAssemblerARM::compare8):
(JSC::MacroAssemblerARM::test32):
(JSC::MacroAssemblerARM::test8):
(JSC::MacroAssemblerARM::add64):
(JSC::MacroAssemblerARM::load32):
(JSC::MacroAssemblerARM::call):
(JSC::MacroAssemblerARM::branchPtrWithPatch):
(JSC::MacroAssemblerARM::branch32WithPatch):
(JSC::MacroAssemblerARM::storePtrWithPatch):
(JSC::MacroAssemblerARM::loadDouble):
(JSC::MacroAssemblerARM::storeDouble):
(JSC::MacroAssemblerARM::addDouble):
(JSC::MacroAssemblerARM::divDouble):
(JSC::MacroAssemblerARM::subDouble):
(JSC::MacroAssemblerARM::mulDouble):
(JSC::MacroAssemblerARM::convertInt32ToDouble):
(JSC::MacroAssemblerARM::branchDouble):
(JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
(JSC::MacroAssemblerARM::truncateDoubleToInt32):
(JSC::MacroAssemblerARM::truncateDoubleToUint32):
(JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
(JSC::MacroAssemblerARM::branchDoubleNonZero):
(JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
(JSC::MacroAssemblerARM::call32):
(JSC::MacroAssemblerARM::internalCompare32):

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

3 years agoUnreviewed build fix after r231008.
bfulgham@apple.com [Wed, 25 Apr 2018 19:48:03 +0000 (19:48 +0000)]
Unreviewed build fix after r231008.

* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::create): Forgot to remove an unneeded constructor argument.

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

3 years ago[WinCairo] Fix js/regexp-unicode.html crash.
ross.kirsling@sony.com [Wed, 25 Apr 2018 19:35:00 +0000 (19:35 +0000)]
[WinCairo] Fix js/regexp-unicode.html crash.
https://bugs.webkit.org/show_bug.cgi?id=184891

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

On Win64, register RDI is "considered nonvolatile and must be saved and restored by a function that uses [it]".
RDI is being used as a scratch register for JIT_UNICODE_EXPRESSIONS, not just YARR_JIT_ALL_PARENS_EXPRESSIONS.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):
Unconditionally save and restore RDI on 64-bit Windows.

LayoutTests:

* platform/wincairo/TestExpectations:

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

3 years agoDon't Block First Party Cookies on Redirects
bfulgham@apple.com [Wed, 25 Apr 2018 19:16:00 +0000 (19:16 +0000)]
Don't Block First Party Cookies on Redirects
https://bugs.webkit.org/show_bug.cgi?id=184948
<rdar://problem/39534099>

Reviewed by Youenn Fablet.

Source/WebCore:

The Navigation scheduler looses the 'requester' value when performing a ScheduledRedirect.

Test: http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html

* loader/NavigationScheduler.cpp:

Source/WebKit:

Top-level navigations should not be subject to cookie blocking behavior. When performing redirects for main frame
navigation we are blocking cookies, leading to site breakage.

We need to keep track of which NetworkDataTasks are due to a main frame navigation. When a redirect is performed
on the main frame, we should treat the new origin as the 'first party for cookies' and avoid blocking cookies for
that URL.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::preconnectTo): Use the correct parameter type. We actually serialize
NetworkResourceLoadParameters over IPC, so we should get access to all the members of this child class.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::create): Pass new 'loadIsForNavigation' flag to create methods.
(WebKit::NetworkDataTask::NetworkDataTask): Capture 'loadIsForNavigation' in constructor.
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::isTopLevelNavigation const): Added.
* NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob): Accept new constructor argument.
* NetworkProcess/NetworkDataTaskBlob.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::willPerformHTTPRedirection): Retain requester value from old request during redirect.
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(NetworkResourceLoadParameters::decode): Update to pass new flag.
(NetworkResourceLoadParameters::encode): Ditto.
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/capture/NetworkDataTaskReplay.cpp:
(WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay): Accept new constructor argument.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Accept new constructor argument.
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl): Accept new constructor argument.
* NetworkProcess/curl/NetworkDataTaskCurl.h:
* NetworkProcess/soup/NetworkDataTaskSoup.cpp:
(WebKit::NetworkDataTaskSoup::NetworkDataTaskSoup): Accept new constructor argument.
* NetworkProcess/soup/NetworkDataTaskSoup.h:

LayoutTests:

* http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-expected.txt: Added.
* http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html: Added.

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

3 years agoUnreviewed test gardening, rebaseline tests for iOS.
ryanhaddad@apple.com [Wed, 25 Apr 2018 18:57:11 +0000 (18:57 +0000)]
Unreviewed test gardening, rebaseline tests for iOS.

* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt: Added.
* platform/ios/media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt: Added.

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

3 years agoCachedRawResource is not handling incremental data computation correctly
youenn@apple.com [Wed, 25 Apr 2018 18:54:48 +0000 (18:54 +0000)]
CachedRawResource is not handling incremental data computation correctly
https://bugs.webkit.org/show_bug.cgi?id=184936

Reviewed by Chris Dumez.

Source/WebCore:

Covered by updated test.

The previous logic was handling the case of only one additional segment being added to the SharedBuffer.
In service worker case, a SharedBuffer may contain more than one segment.
This is fixed by iterating until all new data is sent to clients.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::updateBuffer):

LayoutTests:

* http/tests/workers/service/resources/service-worker-fetch-worker.js:
(stringToBuffer):
(event.event.request.url.endsWith):
* http/tests/workers/service/resources/service-worker-fetch.js:
(async.test):
* http/tests/workers/service/service-worker-fetch.https-expected.txt:

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

3 years agoEnsure DNT is set for redirections handled in NetworkProcess
youenn@apple.com [Wed, 25 Apr 2018 18:51:46 +0000 (18:51 +0000)]
Ensure DNT is set for redirections handled in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=184890

Reviewed by Ryosuke Niwa.

Source/WebKit:

Compute whether DNT header should be set on requests based on:
- request has a DNT header
- session is ephemeral (aka private browsing mode)
In both cases, we ensure a DNT header is added for any request triggered by a redirection.

Covered by http/wpt/fetch/dnt-header-after-redirection.html.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::check):
(WebKit::NetworkLoadChecker::prepareRedirectedRequest):
* NetworkProcess/NetworkLoadChecker.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::willSendRedirectedRequest):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::willPerformHTTPRedirection):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

LayoutTests:

* http/wpt/fetch/dnt-header-after-redirection-expected.txt: Added.
* http/wpt/fetch/dnt-header-after-redirection.html: Added.
* http/wpt/fetch/resources/dnt-status.py: Added.
* http/wpt/fetch/resources/redirect.py: Added.
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

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

3 years ago[WPE] Remove deprecated functions and properties from the API
mcatanzaro@igalia.com [Wed, 25 Apr 2018 18:41:13 +0000 (18:41 +0000)]
[WPE] Remove deprecated functions and properties from the API
https://bugs.webkit.org/show_bug.cgi?id=179295

Reviewed by Žan Doberšek.

Source/WebKit:

* UIProcess/API/glib/WebKitCookieManager.cpp:
* UIProcess/API/glib/WebKitFormSubmissionRequest.cpp:
* UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp:
(webkitNavigationPolicyDecisionGetProperty):
(webkit_navigation_policy_decision_class_init):
* UIProcess/API/glib/WebKitSettings.cpp:
(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
* UIProcess/API/glib/WebKitWebContext.cpp:
(webkitWebContextGetProperty):
(webkitWebContextSetProperty):
(webkit_web_context_class_init):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewHandleAuthenticationChallenge):
(webkitWebViewWebProcessTerminated):
* UIProcess/API/wpe/WebKitCookieManager.h:
* UIProcess/API/wpe/WebKitFormSubmissionRequest.h:
* UIProcess/API/wpe/WebKitNavigationPolicyDecision.h:
* UIProcess/API/wpe/WebKitSettings.h:
* UIProcess/API/wpe/WebKitWebContext.h:

Tools:

* TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
(testWebViewAuthenticationStorage): Disable this test for now. It will require some effort
to rewrite LoadTrackingTest to not require the web view at construction time.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings): Don't test private browsing setting, which is gone.
* TestWebKitAPI/glib/CMakeLists.txt: Disable TestCookieManager for now.

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

3 years ago[Mac] Number of drop items is always 0 when performing a DHTML drag
aestes@apple.com [Wed, 25 Apr 2018 18:35:43 +0000 (18:35 +0000)]
[Mac] Number of drop items is always 0 when performing a DHTML drag
https://bugs.webkit.org/show_bug.cgi?id=184943

Reviewed by Ryosuke Niwa.

Source/WebCore:

New API test: DragAndDropPasteboardTests.NumberOfValidItemsForDrop

DragController tracks the number of items to be accepted by a file input element, taking
into account whether the control is disabled or accepts multiple files. When this number
changes, WebKit informs the NSDraggingInfo-conforming object passed to -draggingUpdated by
calling -setNumberOfValidItemsForDrop:. This number is presented to the user in a badge
rendered next to the dragging item thumbnails.

When performing a DHTML drag, we don't know how many items the page will accept, so prior
to this patch we would render a "0" in the badge. This is misleading, because the page is
more likely to accept all the items (or at least one of them) rather than none of them.

Let's do the straightforward thing and set numberOfValidItemsForDrop to equal the number of
files in the drag operation when performing a DHTML file drag.

* page/DragController.cpp:
(WebCore::DragController::tryDocumentDrag):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:
(-[DragInfo numberOfValidItemsForDrop]):
(-[DragInfo setNumberOfValidItemsForDrop:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/full-page-dropzone.html: Added.

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

3 years ago[iOS] Set route sharing policy when setting audio session category
eric.carlson@apple.com [Wed, 25 Apr 2018 18:27:25 +0000 (18:27 +0000)]
[iOS] Set route sharing policy when setting audio session category
https://bugs.webkit.org/show_bug.cgi?id=184979
<rdar://problem/39709577>

Reviewed by Jer Noble.

* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::setCategory):

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

3 years ago[Curl] Fix wrong schema checking on r230973
commit-queue@webkit.org [Wed, 25 Apr 2018 18:05:50 +0000 (18:05 +0000)]
[Curl] Fix wrong schema checking on r230973
https://bugs.webkit.org/show_bug.cgi?id=184977

Did write a wrong condition when making a string.

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-04-25
Reviewed by Alex Christensen.

No new tests because test interface is not ready.

* platform/network/curl/CurlProxySettings.cpp:
(WebCore::createProxyUrl):

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

3 years agoMake DocumentThreadableLoader error logging more consistent
youenn@apple.com [Wed, 25 Apr 2018 17:57:56 +0000 (17:57 +0000)]
Make DocumentThreadableLoader error logging more consistent
https://bugs.webkit.org/show_bug.cgi?id=184853

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/XMLHttpRequest/access-control-basic-cors-safelisted-request-headers-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-basic-denied-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-basic-get-fail-non-simple-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-basic-non-cors-safelisted-content-type-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-basic-post-with-non-cors-safelisted-content-type-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-basic-preflight-denied-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-preflight-request-invalid-status-301-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-preflight-request-invalid-status-400-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-preflight-request-invalid-status-501-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-sandboxed-iframe-denied-expected.txt:
* web-platform-tests/XMLHttpRequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt:
* web-platform-tests/fetch/api/basic/mode-same-origin.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-others-expected.txt:
* web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt:
* web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
* web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-star.any-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-star.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight-status.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-preflight.any.worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-preflight.any.worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-schemes-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-to-dataurl-expected.txt:
* web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-fallback.https-expected.txt:

Source/WebCore:

Covered by rebased tests.
Make EventSource, XHR and Fetch log error messages consistently.
This patch also prepares consistent error logging between WK1 and WK2 as WK2 NetworkProcess
will issue more and more errors in places different from WK1.
This is the reason for SubresourceLoader changes in this patch and DTL/didFail/preflightFailure changes.

Update ImageLoader error message to be more general than CORS.

* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::doPreflight): Add some more logging for consistency between WK1 and WK2.
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse): Ditto.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::logErrorAndFail):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFail):
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::logError):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceRequestInitiators.cpp:
(WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
* loader/cache/CachedResourceRequestInitiators.h:
* page/EventSource.cpp:
(WebCore::EventSource::connect):
(WebCore::EventSource::didFail):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::didFail):

LayoutTests:

Removing JS console log output for some tests.
Updating tests according modified error logging.

* TestExpectations:
* http/tests/security/bypassing-cors-checks-for-extension-urls-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-eventsource-redirect-to-blocked-expected.txt:
* http/tests/security/contentSecurityPolicy/connect-src-xmlhttprequest-redirect-to-blocked-expected.txt:
* http/tests/security/cross-origin-cached-images-expected.txt:
* http/tests/security/cross-origin-cached-images-parallel-expected.txt:
* http/tests/security/img-with-failed-cors-check-fails-to-load-expected.txt:
* http/tests/security/load-image-after-redirection-2-expected.txt:
* http/tests/security/load-image-after-redirection-expected.txt:
* http/tests/security/mixedContent/insecure-xhr-in-main-frame-expected.txt:
* http/tests/security/video-poster-cross-origin-crash-expected.txt:
* http/tests/security/video-poster-cross-origin-crash2-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached-expected.txt:
* http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-async-header-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-async-method-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-async-not-supported-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-not-successful-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-sync-header-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-sync-method-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-preflight-sync-not-supported-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt:
* http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt:
* http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight-expected.txt:
* http/tests/xmlhttprequest/cross-origin-no-authorization-expected.txt:
* http/tests/xmlhttprequest/cross-site-denied-response-sync-2-expected.txt:
* http/tests/xmlhttprequest/cross-site-denied-response-sync-expected.txt:
* http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-https-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains-expected.txt:
* http/tests/xmlhttprequest/origin-whitelisting-removal-expected.txt:
* http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt:
* http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt:
* http/tests/xmlhttprequest/redirect-cross-origin-post-sync-expected.txt:
* http/tests/xmlhttprequest/redirect-cross-origin-sync-expected.txt:
* http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:
* http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt:
* http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync-expected.txt:
* http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync-expected.txt:
* http/tests/xmlhttprequest/simple-cross-origin-progress-events-expected.txt:
* http/tests/xmlhttprequest/upload-request-error-event-order-expected.txt:
* http/tests/xmlhttprequest/workers/access-control-basic-get-fail-non-simple-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt:
* http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt:
* platform/mac-wk1/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* platform/mac-wk1/http/tests/xmlhttprequest/access-control-preflight-not-successful-expected.txt:
* platform/mac-wk1/http/tests/xmlhttprequest/cross-origin-no-authorization-expected.txt:
* platform/mac-wk1/http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/access-control-and-redirects-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame-expected.txt:
* platform/wk2/http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe-expected.txt:
* platform/win/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt:
* platform/win/http/tests/xmlhttprequest/access-control-preflight-not-successful-expected.txt:
* platform/win/http/tests/xmlhttprequest/cross-origin-no-authorization-expected.txt:
* platform/win/http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt:

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

3 years ago[LFC] Implement Layout::Box functions.
zalan@apple.com [Wed, 25 Apr 2018 17:49:05 +0000 (17:49 +0000)]
[LFC] Implement Layout::Box functions.
https://bugs.webkit.org/show_bug.cgi?id=184974

Reviewed by Antti Koivisto.

* layout/layouttree/LayoutBlockContainer.h:
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::Box):
(WebCore::Layout::Box::~Box):
(WebCore::Layout::Box::establishesFormattingContext const):
(WebCore::Layout::Box::establishesBlockFormattingContext const):
(WebCore::Layout::Box::isRelativelyPositioned const):
(WebCore::Layout::Box::isStickyPositioned const):
(WebCore::Layout::Box::isAbsolutelyPositioned const):
(WebCore::Layout::Box::isFixedPositioned const):
(WebCore::Layout::Box::isFloatingPositioned const):
(WebCore::Layout::Box::containingBlock const):
(WebCore::Layout::Box::isDescendantOf const):
(WebCore::Layout::Box::isAnonymous const):
(WebCore::Layout::Box::isInlineBlockBox const):
(WebCore::Layout::Box::isBlockLevelBox const):
(WebCore::Layout::Box::isInlineLevelBox const):
(WebCore::Layout::Box::isBlockContainerBox const):
(WebCore::Layout::Box::isInitialContainingBlock const):
(WebCore::Layout::Box::nextInFlowSibling const):
(WebCore::Layout::Box::nextInFlowOrFloatingSibling const):
(WebCore::Layout::Box::previousInFlowSibling const):
(WebCore::Layout::Box::previousInFlowOrFloatingSibling const):
(WebCore::Layout::Box::setParent):
(WebCore::Layout::Box::setNextSibling):
(WebCore::Layout::Box::setPreviousSibling):
(WebCore::Layout::Box::isOverflowVisible const):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::establishesInlineFormattingContext const):
(WebCore::Layout::Box::isInFlow const):
(WebCore::Layout::Box::isPositioned const):
(WebCore::Layout::Box::isInFlowPositioned const):
(WebCore::Layout::Box::isOutOfFlowPositioned const):
(WebCore::Layout::Box::isFloatingOrOutOfFlowPositioned const):
(WebCore::Layout::Box::parent const):
(WebCore::Layout::Box::nextSibling const):
(WebCore::Layout::Box::previousSibling const):
(WebCore::Layout::Box::weakPtrFactory const):
* layout/layouttree/LayoutContainer.h:
* layout/layouttree/LayoutInlineBox.h:
* layout/layouttree/LayoutInlineContainer.h:

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

3 years agoAPI test harness should be Python
jbedard@apple.com [Wed, 25 Apr 2018 16:35:34 +0000 (16:35 +0000)]
API test harness should be Python
https://bugs.webkit.org/show_bug.cgi?id=181043
<rdar://problem/36164410>

Reviewed by David Kilzer.

Run API tests from a Python script rather than Perl. The Python API tests have
the same structure as the layout tests.

* Scripts/run-api-tests: Changed from Perl to Python.
* Scripts/webkitpy/api_tests: Added.
* Scripts/webkitpy/api_tests/__init__.py: Added.
* Scripts/webkitpy/api_tests/manager.py: Added.
(Manager):
(Manager.__init__):
(Manager._test_list_from_output): Construct a list of tests from the output of
TestWTF and TestWebKitAPI.
(Manager._find_test_subset): Given a list of all possible tests and command line
arguments, return a list of tests which match the provided arguments.
(Manager._collect_tests): Run TestWTF and TestWebKitAPI with --gtest_list_tests
to determine which tests will be run.
(Manager._print_test_result): Formatted print of a test with it's output.
(Manager._print_tests_result_with_status): Print all tests and output for tests
which ran with a specified exit status.
(Manager.run): Collect all tests, run them and then print results from the run.
* Scripts/webkitpy/api_tests/run_api_tests.py: Added.
(main): Parse arguments, construct a port, early exit for illegal ports and
then run tests.
(run): Setup logging and printing before using the Manager to run tests.
(parse_args): Use argparse to define all options used by run-api-tests.
* Scripts/webkitpy/api_tests/runner.py: Added.
(Runner):
(Runner.__init__):
(Runner._shard_tests): Split tests so that each suite runs together.
(Runner.command_for_port): Run a command on the device specified by the given
port object. Once <https://bugs.webkit.org/show_bug.cgi?id=175204> is completed,
this function would be entirely replaced by the server_process factory owned
by the port object.
(Runner.run): Run all shards in the message_pool.
(Runner.handle): Handle reports from child processes.
(Runner.result_map_by_status): Return a mapping of tests to output for tests
which exit with a specific status.
(_Worker):
(_Worker.__init__):
(_Worker._filter_noisy_output): Filter out objc warnings since these polite the log.
(_Worker._run_single_test): Runs a single test in a single child process.
(_Worker._run_shard_with_binary): Attempts to run a group of tests in the same
child process. If this technique fails, the remaining tests are run singly.
(_Worker.handle): Run the specified shard.
* Scripts/webkitpy/port/base.py:
(Port):
(Port.check_api_test_build): Check if TestWTF and TestWebKitAPI are built.
(Port.environment_for_api_tests): Return the environment needed to run
the TestWebKitAPI binary.
(Port. path_to_api_test_binaries): Return a list of the path to all binaries
used when running API tests.
(Port._build_api_tests): Build TestWTF and TestWebKitAPI if required.
* Scripts/webkitpy/port/mac.py:
(MacPort.environment_for_api_tests): Enable GuardMalloc for API tests.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.pop_all_buffered_stdout):

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

3 years agoUnreviewed, silence -Wreturn-type warning
mcatanzaro@igalia.com [Wed, 25 Apr 2018 16:26:16 +0000 (16:26 +0000)]
Unreviewed, silence -Wreturn-type warning
https://bugs.webkit.org/show_bug.cgi?id=184560

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::shouldCancelCrossOriginLoad):

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

3 years ago[GTK] Miscellaneous build cleanups
mcatanzaro@igalia.com [Wed, 25 Apr 2018 16:23:05 +0000 (16:23 +0000)]
[GTK] Miscellaneous build cleanups
https://bugs.webkit.org/show_bug.cgi?id=184399

Reviewed by Žan Doberšek.

.:

* Source/cmake/OptionsGTK.cmake:

Source/JavaScriptCore:

* PlatformGTK.cmake:

Source/WebKit:

* PlatformGTK.cmake:

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

3 years ago[Win] Crash under WebCore::SimpleLineLayout::generateLineBoxTree
pvollan@apple.com [Wed, 25 Apr 2018 15:46:53 +0000 (15:46 +0000)]
[Win] Crash under WebCore::SimpleLineLayout::generateLineBoxTree
https://bugs.webkit.org/show_bug.cgi?id=184953

This is possibly a MSVC compiler bug, since a simple rearrangement of the code fixes the crash.
The crash is only happening in release builds, which also is an indication of this being a
compiler issue.

Reviewed by Zalan Bujtas.

No new tests, covered by existing tests.

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::generateLineBoxTree):

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

3 years agoMake a better flag for system preview, and disable it where necessary
dino@apple.com [Wed, 25 Apr 2018 15:16:51 +0000 (15:16 +0000)]
Make a better flag for system preview, and disable it where necessary
https://bugs.webkit.org/show_bug.cgi?id=184968
<rdar://problem/39686506>

Reviewed by Eric Carlson.

Source/WebCore:

Use USE(SYSTEM_PREVIEW).

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isSystemPreviewLink const):
* html/HTMLAnchorElement.h:
* html/HTMLImageElement.cpp:
* html/HTMLImageElement.h:
* html/HTMLPictureElement.cpp:
* html/HTMLPictureElement.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderTheme.cpp:
* rendering/RenderTheme.h:
* testing/Internals.cpp:
(WebCore::Internals::systemPreviewRelType):
(WebCore::Internals::isSystemPreviewLink const):
(WebCore::Internals::isSystemPreviewImage const):

Source/WebKit:

Use USE(SYSTEM_PREVIEW).

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry init]):
* UIProcess/ios/WKSystemPreviewView.mm:

Source/WTF:

Add a new USE(SYSTEM_PREVIEW).

* wtf/Platform.h:

LayoutTests:

These tests have platform-specific results for the moment.

* TestExpectations:
* system-preview/badge-expected.html: Removed.
* system-preview/detection-expected.txt: Removed.

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

3 years agoIncorrect number of WebDriver test failures shown in the bots
commit-queue@webkit.org [Wed, 25 Apr 2018 14:19:02 +0000 (14:19 +0000)]
Incorrect number of WebDriver test failures shown in the bots
https://bugs.webkit.org/show_bug.cgi?id=184959

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-04-25
Reviewed by Michael Catanzaro.

The regular expression we are using to get the number of failures from the log is matching a particular test
error output. Improve the regular expression to avoid matching other strings in the log. Ensure that only
matches at the beginning of lines and add spaces after Unexpected and before the (<failures>).

* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebDriverTests.commandComplete):

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

3 years agoFix project file after r230931.
zalan@apple.com [Wed, 25 Apr 2018 13:18:26 +0000 (13:18 +0000)]
Fix project file after r230931.

* WebCore.xcodeproj/project.pbxproj:

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

3 years ago[GTK] fast/repaint/fixed-scale.html failing since r230479 "[TexMap] TextureMapperLaye...
magomez@igalia.com [Wed, 25 Apr 2018 13:08:51 +0000 (13:08 +0000)]
[GTK] fast/repaint/fixed-scale.html failing since r230479 "[TexMap] TextureMapperLayer unnecessarily duplicates state in GraphicsLayerTransform"
https://bugs.webkit.org/show_bug.cgi?id=184780

Reviewed by Žan Doberšek.

Source/WebCore:

Initialize the anchorPoint to (0.5, 0.5, 0) in TextureMapperLayer::State.

Covered by existent tests.

* platform/graphics/texmap/TextureMapperLayer.h:

LayoutTests:

* platform/gtk/TestExpectations:

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

3 years agoimported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-* LayoutTests...
Ms2ger@igalia.com [Wed, 25 Apr 2018 12:10:44 +0000 (12:10 +0000)]
imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-* LayoutTests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=182833

Reviewed by Carlos Alberto Lopez Perez.

LayoutTests/imported/w3c:

* web-platform-tests/2dcontext/imagebitmap/common.sub.js: ensure event handlers aren't garbage collected
* web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: update expectations

LayoutTests:

* TestExpectations: enable tests
* platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: update expectations
* platform/ios/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: update expectations
* platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub-expected.txt: update expectations

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

3 years agoUnreviewed gardening. Update expectations for new tests added in r230953.
carlosgc@webkit.org [Wed, 25 Apr 2018 11:06:07 +0000 (11:06 +0000)]
Unreviewed gardening. Update expectations for new tests added in r230953.

* TestExpectations.json:

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

3 years ago[GTK] Implement MouseEvent.buttons
carlosgc@webkit.org [Wed, 25 Apr 2018 10:16:59 +0000 (10:16 +0000)]
[GTK] Implement MouseEvent.buttons
https://bugs.webkit.org/show_bug.cgi?id=184913

Reviewed by Žan Doberšek.

Source/WebCore:

Add helper function to get the state modifier of a GDK button.

* platform/gtk/GtkUtilities.cpp:
(WebCore::stateModifierForGdkButton):
* platform/gtk/GtkUtilities.h:

Source/WebKit:

It's currently returning always 0.

* Shared/gtk/WebEventFactory.cpp:
(WebKit::pressedMouseButtons): Helper function to get the pressed mouse buttons.
(WebKit::WebEventFactory::createWebMouseEvent): Pass presssed mouse buttons to constructor instead of 0.
* UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp:
(WebKit::WebAutomationSession::platformSimulateMouseInteraction): Include the mouse buttons state in automation
synthesized events and update m_currentModifiers with the mouse buttons state.
(WebKit::keyCodeForVirtualKey): Do not set the state here.
(WebKit::modifiersForKeyCode): Helper to get the modifiers for a key code.
(WebKit::WebAutomationSession::platformSimulateKeyboardInteraction): Initialize the modifiers also when
virtualKey is std::nullopt;

Tools:

Include the mouse buttons state in WTR synthesized events.

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::EventSenderProxy::createMouseButtonEvent):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):

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

3 years agoAX: soft link libAccessibility.dylb
n_wang@apple.com [Wed, 25 Apr 2018 05:52:57 +0000 (05:52 +0000)]
AX: soft link libAccessibility.dylb
https://bugs.webkit.org/show_bug.cgi?id=184919

Reviewed by Dan Bernstein.

Weakly linked libAccessibility.dylib on macOS.

* Configurations/WebKit.xcconfig:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _updateAccessibilityEventsEnabled]):

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

3 years ago[GTK][WPE] Fix triggered bot name on the WPE Debug Build bot
commit-queue@webkit.org [Wed, 25 Apr 2018 05:33:48 +0000 (05:33 +0000)]
[GTK][WPE] Fix triggered bot name on the WPE Debug Build bot
https://bugs.webkit.org/show_bug.cgi?id=184954

Patch by Pablo Saavedra <psaavedra@igalia.com> on 2018-04-24
Reviewed by Michael Catanzaro.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

3 years agoRelease assert in ScriptController::canExecuteScripts via CachedSVGFont::ensureCustom...
rniwa@webkit.org [Wed, 25 Apr 2018 03:42:06 +0000 (03:42 +0000)]
Release assert in ScriptController::canExecuteScripts via CachedSVGFont::ensureCustomFontData during
Document::updateStyleIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=184950

Reviewed by Zalan Bujtas.

Convert an existing ScriptDisallowedScope::EventAllowedScope which only disables the debug assertions
by ScriptDisallowedScope::DisableAssertionsInScope which also disables the release assertion.

Because SVG font is loaded in a document isolated from the rest of the page (m_externalSVGDocument),
there is no security implication to execute scripts in this isolated document.

Unfortunately, no new tests. I could never make CachedSVGFont::ensureCustomFontData to get called inside
style resolution with m_externalSVGDocument set to nullptr after many attempts. Even EventAllowedScope
I added 13 months ago in r211965, which this patch replaces by DisableAssertionsInScope, is not utilized
by the existing layout tests since removing the assertion doesn't cause any layout test to hit an assertion.

* dom/ScriptDisallowedScope.h: Updated the comment.
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::ensureCustomFontData): Replaced the asssertion.

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

3 years ago[WinCairo] Add WKView and WKAPI
Hironori.Fujii@sony.com [Wed, 25 Apr 2018 03:36:06 +0000 (03:36 +0000)]
[WinCairo] Add WKView and WKAPI
https://bugs.webkit.org/show_bug.cgi?id=182869

Reviewed by Alex Christensen.

Resurrected source files for WebKit for Windows port which was
removed in r139003.

* PlatformWin.cmake: Renamed the output name of WebKit to WebKit2
not to conflict WebKitLegacy. Added source files and include paths.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/win/WKAPICastWin.h: Added.
* UIProcess/API/C/win/WKView.cpp: Added.
(WKViewCreate):
(WKViewGetWindow):
(WKViewGetPage):
(WKViewSetParentWindow):
(WKViewWindowAncestryDidChange):
(WKViewSetIsInWindow):
(WKViewSetScrollOffsetOnNextResize):
* UIProcess/API/C/win/WKView.h: Added.
* UIProcess/API/win/APIWebsiteDataStoreWin.cpp: Added.
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultCacheStorageDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/win/ProcessLauncherWin.cpp: Added.
(WebKit::processName):
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::terminateProcess):
(WebKit::ProcessLauncher::platformInvalidate):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::networkProcessFailedToLaunch):
(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
* UIProcess/WebsiteData/win/WebsiteDataStoreWin.cpp: Added.
(WebKit::WebsiteDataStore::platformInitialize):
(WebKit::WebsiteDataStore::platformDestroy):
(WebKit::WebsiteDataStore::platformRemoveRecentSearches):
* UIProcess/win/PageClientImpl.cpp: Added.
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::setViewNeedsDisplay):
(WebKit::PageClientImpl::requestScroll):
(WebKit::PageClientImpl::viewScrollPosition):
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewInWindow):
(WebKit::PageClientImpl::PageClientImpl::processDidExit):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::toolTipChanged):
(WebKit::PageClientImpl::setCursor):
(WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves):
(WebKit::PageClientImpl::didChangeViewportProperties):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):
(WebKit::PageClientImpl::convertToDeviceSpace):
(WebKit::PageClientImpl::convertToUserSpace):
(WebKit::PageClientImpl::screenToRootView):
(WebKit::PageClientImpl::rootViewToScreen):
(WebKit::PageClientImpl::doneWithKeyEvent):
(WebKit::PageClientImpl::createPopupMenuProxy):
(WebKit::PageClientImpl::createContextMenuProxy):
(WebKit::createColorPicker):
(WebKit::PageClientImpl::enterAcceleratedCompositingMode):
(WebKit::PageClientImpl::exitAcceleratedCompositingMode):
(WebKit::PageClientImpl::updateAcceleratedCompositingMode):
(WebKit::PageClientImpl::pageClosed):
(WebKit::PageClientImpl::preferencesDidChange):
(WebKit::PageClientImpl::didChangeContentSize):
(WebKit::PageClientImpl::handleDownloadRequest):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::fullScreenManagerProxyClient):
(WebKit::PageClientImpl::closeFullScreenManager):
(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
(WebKit::PageClientImpl::beganEnterFullScreen):
(WebKit::PageClientImpl::beganExitFullScreen):
(WebKit::PageClientImpl::doneWithTouchEvent):
(WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
(WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
(WebKit::PageClientImpl::navigationGestureDidBegin):
(WebKit::PageClientImpl::navigationGestureWillEnd):
(WebKit::PageClientImpl::navigationGestureDidEnd):
(WebKit::PageClientImpl::willRecordNavigationSnapshot):
(WebKit::PageClientImpl::didRemoveNavigationGestureSnapshot):
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
(WebKit::PageClientImpl::didChangeBackgroundColor):
(WebKit::PageClientImpl::isPlayingAudioWillChange):
(WebKit::PageClientImpl::isPlayingAudioDidChange):
(WebKit::PageClientImpl::refView):
(WebKit::PageClientImpl::derefView):
* UIProcess/win/PageClientImpl.h: Added.
* UIProcess/win/TextCheckerWin.cpp: Added.
(WebKit::checkerState):
(WebKit::TextChecker::state):
(WebKit::TextChecker::setTestingMode):
(WebKit::TextChecker::isTestingMode):
(WebKit::TextChecker::isContinuousSpellCheckingAllowed):
(WebKit::TextChecker::setContinuousSpellCheckingEnabled):
(WebKit::TextChecker::setGrammarCheckingEnabled):
(WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
(WebKit::TextChecker::grammarCheckingEnabledStateChanged):
(WebKit::TextChecker::uniqueSpellDocumentTag):
(WebKit::TextChecker::closeSpellDocumentWithTag):
(WebKit::TextChecker::checkSpellingOfString):
(WebKit::TextChecker::checkGrammarOfString):
(WebKit::TextChecker::spellingUIIsShowing):
(WebKit::TextChecker::toggleSpellingUIIsShowing):
(WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
(WebKit::TextChecker::updateSpellingUIWithGrammarString):
(WebKit::TextChecker::getGuessesForWord):
(WebKit::TextChecker::learnWord):
(WebKit::TextChecker::ignoreWord):
(WebKit::TextChecker::requestCheckingOfString):
(WebKit::TextChecker::checkTextOfParagraph):
* UIProcess/win/WebContextMenuProxyWin.cpp: Added.
(WebKit::WebContextMenuProxyWin::show):
(WebKit::WebContextMenuProxyWin::showContextMenuWithItems):
(WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin):
(WebKit::WebContextMenuProxyWin::~WebContextMenuProxyWin):
* UIProcess/win/WebContextMenuProxyWin.h: Added.
(WebKit::WebContextMenuProxyWin::create):
* UIProcess/win/WebInspectorProxyWin.cpp: Added.
(WebKit::WebInspectorProxy::platformCreateFrontendPage):
(WebKit::WebInspectorProxy::platformCreateFrontendWindow):
(WebKit::WebInspectorProxy::platformCloseFrontendPageAndWindow):
(WebKit::WebInspectorProxy::platformDidCloseForCrash):
(WebKit::WebInspectorProxy::platformInvalidate):
(WebKit::WebInspectorProxy::platformHide):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformBringInspectedPageToFront):
(WebKit::WebInspectorProxy::platformIsFront):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
(WebKit::WebInspectorProxy::platformInspectedWindowHeight):
(WebKit::WebInspectorProxy::platformInspectedWindowWidth):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
(WebKit::WebInspectorProxy::platformStartWindowDrag):
(WebKit::WebInspectorProxy::platformSave):
(WebKit::WebInspectorProxy::platformAppend):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
* UIProcess/win/WebPageProxyWin.cpp: Added.
(WebKit::WebPageProxy::platformInitialize):
(WebKit::WebPageProxy::standardUserAgent):
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/win/WebPreferencesWin.cpp: Added.
(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
(WebKit::WebPreferences::platformUpdateDoubleValueForKey):
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
(WebKit::WebPreferences::platformGetStringUserValueForKey):
(WebKit::WebPreferences::platformGetBoolUserValueForKey):
(WebKit::WebPreferences::platformGetUInt32UserValueForKey):
(WebKit::WebPreferences::platformGetDoubleUserValueForKey):
* UIProcess/win/WebProcessPoolWin.cpp: Added.
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
(WebKit::WebProcessPool::legacyPlatformDefaultApplicationCacheDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaCacheDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultWebSQLDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultLocalStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultMediaKeysStorageDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultNetworkCacheDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultJavaScriptConfigurationDirectory):
(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
* UIProcess/win/WebView.cpp: Added.
(WebKit::WebView::WebViewWndProc):
(WebKit::WebView::wndProc):
(WebKit::WebView::registerWebViewWindowClass):
(WebKit::WebView::WebView):
(WebKit::WebView::~WebView):
(WebKit::WebView::initialize):
(WebKit::WebView::setParentWindow):
(WebKit::findTopLevelParentWindow):
(WebKit::WebView::windowAncestryDidChange):
(WebKit::WebView::onMouseEvent):
(WebKit::WebView::onWheelEvent):
(WebKit::WebView::onHorizontalScroll):
(WebKit::WebView::onVerticalScroll):
(WebKit::WebView::onKeyEvent):
(WebKit::drawPageBackground):
(WebKit::WebView::paint):
(WebKit::WebView::onPaintEvent):
(WebKit::WebView::onPrintClientEvent):
(WebKit::WebView::onSizeEvent):
(WebKit::WebView::onWindowPositionChangedEvent):
(WebKit::WebView::onSetFocusEvent):
(WebKit::WebView::onKillFocusEvent):
(WebKit::WebView::onTimerEvent):
(WebKit::WebView::onShowWindowEvent):
(WebKit::WebView::onSetCursor):
(WebKit::WebView::updateActiveState):
(WebKit::WebView::updateActiveStateSoon):
(WebKit::initCommonControls):
(WebKit::WebView::initializeToolTipWindow):
(WebKit::WebView::startTrackingMouseLeave):
(WebKit::WebView::stopTrackingMouseLeave):
(WebKit::WebView::shouldInitializeTrackPointHack):
(WebKit::WebView::close):
(WebKit::WebView::cursorToShow const):
(WebKit::WebView::updateNativeCursor):
(WebKit::WebView::setOverrideCursor):
(WebKit::WebView::setIsInWindow):
(WebKit::WebView::setIsVisible):
(WebKit::WebView::isWindowActive):
(WebKit::WebView::isFocused):
(WebKit::WebView::isVisible):
(WebKit::WebView::isInWindow):
(WebKit::WebView::setScrollOffsetOnNextResize):
(WebKit::WebView::setViewNeedsDisplay):
(WebKit::WebView::createColorChooserProxy):
(WebKit::WebView::didCommitLoadForMainFrame):
(WebKit::WebView::customRepresentationZoomFactor):
(WebKit::WebView::setCustomRepresentationZoomFactor):
(WebKit::WebView::findStringInCustomRepresentation):
(WebKit::WebView::countStringMatchesInCustomRepresentation):
(WebKit::WebView::nativeWindow):
(WebKit::WebView::windowReceivedMessage):
* UIProcess/win/WebView.h: Added.
(WebKit::WebView::create):
(WebKit::WebView::window const):
(WebKit::WebView::page const):
(WebKit::WebView::drawingArea):
(WebKit::WebView::setWasActivatedByMouseEvent):

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

3 years agoImplement Same-Site cookies
Hironori.Fujii@sony.com [Wed, 25 Apr 2018 03:28:25 +0000 (03:28 +0000)]
Implement Same-Site cookies
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>

Unreviewed build fix.

WinCairo WebKit2 can't compile since r230921.

* NetworkProcess/curl/NetworkDataTaskCurl.cpp:
(WebKit::NetworkDataTaskCurl::appendCookieHeader):
CookieJarCurlDatabase::cookieRequestHeaderFieldValue needs
SameSiteInfo.

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

3 years agofromCharCode is missing some exception checks
keith_miller@apple.com [Wed, 25 Apr 2018 03:14:21 +0000 (03:14 +0000)]
fromCharCode is missing some exception checks
https://bugs.webkit.org/show_bug.cgi?id=184952

Reviewed by Saam Barati.

JSTests:

* stress/fromCharCode-exception-check.js: Added.
(get catch):

Source/JavaScriptCore:

I also removed the pointless slow path function and moved it into the
main function.

* runtime/StringConstructor.cpp:
(JSC::stringFromCharCode):
(JSC::stringFromCharCodeSlowCase): Deleted.

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

3 years agovisitedDependentColor() should take a CSSPropertyID
simon.fraser@apple.com [Wed, 25 Apr 2018 01:51:49 +0000 (01:51 +0000)]
visitedDependentColor() should take a CSSPropertyID
https://bugs.webkit.org/show_bug.cgi?id=184949

Reviewed by Sam Weinig.

Change RenderStyle::colorIncludingFallback(), RenderStyle::visitedDependentColor()
and RenderElement::selectionColor() to take CSSPropertyID rather than int.

No behavior change.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::selectionColor const):
* rendering/RenderElement.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeCollapsedStartBorder const):
(WebCore::RenderTableCell::computeCollapsedEndBorder const):
(WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
(WebCore::RenderTableCell::computeCollapsedAfterBorder const):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::colorIncludingFallback const):
(WebCore::RenderStyle::visitedDependentColor const):
* rendering/style/RenderStyle.h:

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

3 years agoAdd a new "color-filter" CSS property as an experimental feature
simon.fraser@apple.com [Wed, 25 Apr 2018 01:50:39 +0000 (01:50 +0000)]
Add a new "color-filter" CSS property as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=184940
Source/WebCore:

rdar://problem/39664904

Reviewed by Jon Lee.

Add a new CSS property called "color-filter" as an experimental feature (off by default).

This property specifies a list of filter functions (as specified in https://drafts.fxtf.org/filter-effects/#supported-filter-functions)
to CSS colors, allowing authors to modify the provided page colors, for example to improve accessibility.
Filters that move pixels (i.e. blur() and drop-shadow()) are invalid in this property.

Colors will be mapped through the filter functions just before paint time, and gradient stop colors will also be mapped.

This patch adds support for parsing color-filter.

Test: css3/color-filters/color-filter-parsing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
* css/CSSProperties.json:
* css/parser/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
* css/parser/CSSParserMode.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::isColorFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilter):
* css/parser/CSSPropertyParserHelpers.h:
* page/Settings.yaml:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaint const):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::mutableColorFilter):
(WebCore::RenderStyle::colorFilter const):
(WebCore::RenderStyle::hasColorFilter const):
(WebCore::RenderStyle::setColorFilter):
(WebCore::RenderStyle::initialColorFilter):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):
(WebCore::StyleRareInheritedData::hasColorFilters const):
* rendering/style/StyleRareInheritedData.h:

Source/WebKit:

Reviewed by Jon Lee.

Add the color-filter property as an experimental feature.

* Shared/WebPreferences.yaml:

LayoutTests:

Reviewed by Jon Lee.

* css3/color-filters/color-filter-parsing-expected.txt: Added.
* css3/color-filters/color-filter-parsing.html: Added.

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

3 years agoKeep around a pre-warmed process when doing process swap on navigation
sbarati@apple.com [Tue, 24 Apr 2018 23:19:25 +0000 (23:19 +0000)]
Keep around a pre-warmed process when doing process swap on navigation
https://bugs.webkit.org/show_bug.cgi?id=184765
<rdar://problem/39685099>

Reviewed by Ryosuke Niwa and Brady Eidson.

Source/WebKit:

This patch makes it so that WebProcessPool prewarms a process when process
swap on navigation is turned on. When we do a process swap on navigation,
we first try to grab a prewarmed process before creating a new one.

We try to be smart about when to create these processes. The initial heuristic
that this patch chooses is when we reach the DidFirstVisuallyNonEmptyLayout
layout milestone. We're going to try to improve on this heuristic in:
https://bugs.webkit.org/show_bug.cgi?id=184899

This is a 40% progression on PLT with process swap on navigation turned on.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _prewarmedWebProcessCount]):
(-[WKProcessPool _webProcessCountIgnoringPrewarmed]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::notifyProcessPoolToPrewarm):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
(WebKit::WebProcessPool::processForNavigation):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::m_isInPrewarmedPool):
(WebKit::m_userMediaCaptureManagerProxy): Deleted.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::isInPrewarmedPool const):
(WebKit::WebProcessProxy::setIsInPrewarmedPool):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

3 years agoshape-outside and filter styles occur twice in the result of getComputedStyle
simon.fraser@apple.com [Tue, 24 Apr 2018 23:06:26 +0000 (23:06 +0000)]
shape-outside and filter styles occur twice in the result of getComputedStyle
https://bugs.webkit.org/show_bug.cgi?id=184931

Reviewed by Antti Koivisto.

CSSPropertyShapeOutside and CSSPropertyFilter were duplicated in the list of computedProperties[]
used by getComputedStyle. Remove the duplication.
Source/WebCore:

Tested by existing tests.

* css/CSSComputedStyleDeclaration.cpp:

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac-sierra/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac-sierra/svg/css/getComputedStyle-basic-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

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

3 years agoMultiByOffset should emit one fewer branches in the case that the set of structures...
fpizlo@apple.com [Tue, 24 Apr 2018 22:29:39 +0000 (22:29 +0000)]
MultiByOffset should emit one fewer branches in the case that the set of structures is proved already
https://bugs.webkit.org/show_bug.cgi?id=184923

Reviewed by Saam Barati.

If we have a MultiGetByOffset or MultiPutByOffset over a structure set that we've already proved
(i.e. we know that the object has one of those structures), then previously we would still emit a
switch with a case per structure along with a default case. That would mean one extra redundant
branch to check that whatever structure we wound up with belongs to the set. In that case, we
were already making the default case be an Oops.

One possible solution would be to say that the default case being Oops means that B3 doesn't need
to emit the extra branch. But that would require having B3 exploit the fact that Oops is known to
be unreachable. Although B3 IR semantics (webkit.org/docs/b3/intermediate-representation.html)
seem to allow this, I don't particularly like that style of optimization. I like Oops to mean
trap.

So, this patch makes FTL lowering turn one of the cases into the default, explicitly removing the
extra branch.

This is not a speed-up. But it makes the B3 IR for MultiByOffset a lot simpler, which should make
it easier to implement B3-level optimizations for MultiByOffset. It also makes the IR easier to
read.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::emitSwitchForMultiByOffset):

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

3 years agoUnreviewed, rolling out r230971.
commit-queue@webkit.org [Tue, 24 Apr 2018 22:11:53 +0000 (22:11 +0000)]
Unreviewed, rolling out r230971.
https://bugs.webkit.org/show_bug.cgi?id=184939

This fix was not appropriate (Requested by n_wang on #webkit).

Reverted changeset:

"AX: soft link libAccessibility.dylb"
https://bugs.webkit.org/show_bug.cgi?id=184919
https://trac.webkit.org/changeset/230971

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

3 years ago[Curl] Extract proxy settings into a separate class to hold advanced information.
commit-queue@webkit.org [Tue, 24 Apr 2018 21:54:49 +0000 (21:54 +0000)]
[Curl] Extract proxy settings into a separate class to hold advanced information.
https://bugs.webkit.org/show_bug.cgi?id=184714

It was simplely structure to hold proxy setting. To support advanced feature of proxy
such as authentication, more inteligent object is required to store intermediate state
or errors. That's why we've introduced new class for that purpose.

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-04-24
Reviewed by Youenn Fablet.

No new tests because there's no new behavior.

* platform/Curl.cmake:
* platform/network/curl/CurlContext.cpp:
(WebCore::CurlHandle::enableProxyIfExists):
(WebCore::CurlContext::ProxyInfo::url const): Deleted.
(WebCore::CurlContext::setProxyInfo): Deleted.
* platform/network/curl/CurlContext.h:
(WebCore::CurlContext::proxySettings const):
(WebCore::CurlContext::setProxySettings):
(WebCore::CurlContext::setProxyUserPass):
(WebCore::CurlContext::proxyInfo const): Deleted.
(WebCore::CurlContext::setProxyInfo): Deleted.
* platform/network/curl/CurlProxySettings.cpp: Added.
(WebCore::CurlProxySettings::CurlProxySettings):
(WebCore::CurlProxySettings::rebuildUrl):
(WebCore::CurlProxySettings::setUserPass):
(WebCore::protocolIsInSocksFamily):
(WebCore::getProxyPort):
(WebCore::createProxyUrl):
* platform/network/curl/CurlProxySettings.h: Added.
(WebCore::CurlProxySettings::CurlProxySettings):
(WebCore::CurlProxySettings::isEmpty const):
(WebCore::CurlProxySettings::mode const):
(WebCore::CurlProxySettings::url const):
(WebCore::CurlProxySettings::ignoreHosts const):
(WebCore::CurlProxySettings::user const):
(WebCore::CurlProxySettings::password const):
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::didReceiveHeader):
* platform/network/curl/CurlResponse.h:
(WebCore::CurlResponse::isolatedCopy const):
* platform/network/curl/ResourceResponseCurl.cpp:
(WebCore::ResourceResponse::ResourceResponse):

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

3 years agoGardening: test fix after r230863.
mark.lam@apple.com [Tue, 24 Apr 2018 21:52:50 +0000 (21:52 +0000)]
Gardening: test fix after r230863.
https://bugs.webkit.org/show_bug.cgi?id=184846
<rdar://problem/39390672>

Not reviewed.

* stress/json-stringified-overflow-2.js:
(catch):
* stress/json-stringified-overflow.js:
(catch):

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

3 years agoAX: soft link libAccessibility.dylb
n_wang@apple.com [Tue, 24 Apr 2018 21:27:01 +0000 (21:27 +0000)]
AX: soft link libAccessibility.dylb
https://bugs.webkit.org/show_bug.cgi?id=184919

Reviewed by Chris Fleizach.

Source/WebKit:

Make sure we soft link the library so that it won't crash
if it's missing in the system.

* Configurations/WebKit.xcconfig:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _updateAccessibilityEventsEnabled]):

Source/WTF:

* wtf/cocoa/SoftLinking.h:

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

3 years agoThrow in case of PeerConnection created for detached documents
youenn@apple.com [Tue, 24 Apr 2018 20:22:51 +0000 (20:22 +0000)]
Throw in case of PeerConnection created for detached documents
https://bugs.webkit.org/show_bug.cgi?id=184921
<rdar://problem/39629216>

Reviewed by Eric Carlson.

Source/WebCore:

Add a check to ensure that page is not null when creating a peer connection backend.
In that case, the peer connection constructor will later on throw.
The same for setConfiguration is done.
Behavior is consistent with Chrome.

Test: webrtc/pc-detached-document.html

* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::createLibWebRTCPeerConnectionBackend):
(WebCore::LibWebRTCPeerConnectionBackend::LibWebRTCPeerConnectionBackend):
(WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
(WebCore::libWebRTCProvider): Deleted.
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:

LayoutTests:

* webrtc/pc-detached-document-expected.txt: Added.
* webrtc/pc-detached-document.html: Added.

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

3 years ago[build.webkit.org] unit-tests fail when passwords.json is missing
aakash_jain@apple.com [Tue, 24 Apr 2018 20:15:02 +0000 (20:15 +0000)]
[build.webkit.org] unit-tests fail when passwords.json is missing
https://bugs.webkit.org/show_bug.cgi?id=180390

Reviewed by Carlos Alberto Lopez Perez.

* BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
(loadBuilderConfig): Add support for test_mode. Load mock passwords in test_mode.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
(BuildBotConfigLoader._add_dependant_modules_to_sys_modules): Call _add_webkitpy_to_sys_path as well.
(BuildBotConfigLoader._mock_open): Deleted.
(BuildBotConfigLoader.load_config): Deleted.

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

3 years agoFrom-Origin: Support for 'same' and 'same-site' response header, nested frame origin...
wilander@apple.com [Tue, 24 Apr 2018 19:51:22 +0000 (19:51 +0000)]
From-Origin: Support for 'same' and 'same-site' response header, nested frame origin check
https://bugs.webkit.org/show_bug.cgi?id=184560
<rdar://problem/38901344>

Reviewed by Youenn Fablet and Daniel Bates.

LayoutTests/imported/w3c:

This patch implements significant parts of https://github.com/whatwg/fetch/issues/687.
We consume the From-Origin response header and only load the resource if:
- The header is non-existent, empty, or invalid.
- The header specifies 'same' and the resource's origin matches the originating
  document's origin and the origins up the frame tree.
- The header specifies 'same-site' and the resource's eTLD+1 matches the originating
  document's eTLD+1 and the eTLD+1 of the documents up the frame tree.

This feature is experimental and off by default.

* web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:
    Removed console message since they are now suppressed.

Source/WebCore:

Tests: http/tests/from-origin/document-from-origin-same-accepted.html
       http/tests/from-origin/document-from-origin-same-blocked.html
       http/tests/from-origin/document-from-origin-same-site-accepted.html
       http/tests/from-origin/document-from-origin-same-site-blocked.html
       http/tests/from-origin/document-nested-from-origin-same-accepted.html
       http/tests/from-origin/document-nested-from-origin-same-blocked.html
       http/tests/from-origin/fetch-data-iframe-from-origin-same-blocked.html
       http/tests/from-origin/fetch-from-origin-same-accepted.html
       http/tests/from-origin/fetch-from-origin-same-blocked.html
       http/tests/from-origin/fetch-from-origin-same-site-accepted.html
       http/tests/from-origin/fetch-from-origin-same-site-blocked.html
       http/tests/from-origin/fetch-iframe-from-origin-same-accepted.html
       http/tests/from-origin/fetch-iframe-from-origin-same-blocked.html
       http/tests/from-origin/image-about-blank-from-origin-same-blocked.html
       http/tests/from-origin/image-from-origin-same-accepted.html
       http/tests/from-origin/image-from-origin-same-blocked.html
       http/tests/from-origin/image-from-origin-same-site-accepted.html
       http/tests/from-origin/image-from-origin-same-site-blocked.html
       http/tests/from-origin/redirect-document-from-origin-same-blocked.html
       http/tests/from-origin/redirect-fetch-from-origin-same-blocked.html
       http/tests/from-origin/redirect-image-from-origin-same-blocked.html
       http/tests/from-origin/redirect-script-from-origin-same-blocked.html
       http/tests/from-origin/redirect-xhr-from-origin-same-blocked.html
       http/tests/from-origin/sandboxed-sub-frame-from-origin-same-blocked.html
       http/tests/from-origin/sandboxed-sub-frame-nested-cross-origin-from-origin-same-blocked.html
       http/tests/from-origin/sandboxed-sub-frame-nested-same-origin-from-origin-same-blocked.html
       http/tests/from-origin/script-from-origin-same-accepted.html
       http/tests/from-origin/script-from-origin-same-blocked.html
       http/tests/from-origin/script-from-origin-same-site-accepted.html
       http/tests/from-origin/script-from-origin-same-site-blocked.html
       http/tests/from-origin/top-frame-document-from-origin-same-accepted.php
       http/tests/from-origin/xhr-from-origin-same-accepted.html
       http/tests/from-origin/xhr-from-origin-same-blocked.html
       http/tests/from-origin/xhr-from-origin-same-site-accepted.html
       http/tests/from-origin/xhr-from-origin-same-site-blocked.html

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFail):
    Outputs the error's localized description in a console message except when the destination
    is FetchOptions::Destination::Serviceworker or FetchOptions::Destination::EmptyString.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setFromOriginResponseHeaderEnabled):
(WebCore::RuntimeEnabledFeatures::fromOriginResponseHeaderEnabled const):
    Added From-Origin support as an experimental feature.
* platform/network/HTTPHeaderNames.in:
    Added From-Origin.
* platform/network/HTTPParsers.cpp:
(WebCore::parseFromOriginHeader):
    Parses the From-Origin header, currently supporting 'Same' and 'Same-Site.'
* platform/network/HTTPParsers.h:

Source/WebKit:

This patch implements significant parts of https://github.com/whatwg/fetch/issues/687.
We consume the From-Origin response header and only load the resource if:
- The header is non-existent, empty, or invalid.
- The header specifies 'same' and the resource's origin matches the originating
  document's origin and the origins up the frame tree.
- The header specifies 'same-site' and the resource's eTLD+1 matches the originating
  document's eTLD+1 and the eTLD+1 of the documents up the frame tree.

This feature is experimental and off by default.

* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
    Support for the two new load parameters:
    - shouldEnableFromOriginResponseHeader
    - frameAncestorOrigins
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::areFrameAncestorsSameSite):
(WebKit::areFrameAncestorsSameOrigin):
(WebKit::shouldCancelCrossOriginLoad):
    The three functions above implement the new blocking logic.
(WebKit::fromOriginResourceError):
    Convenience function that returns an error with the From-Origin error message.
(WebKit::NetworkResourceLoader::didReceiveResponse):
    Now checks for a From-Origin response header.
(WebKit::NetworkResourceLoader::didFailLoading):
    Now checks for a From-Origin response header.
(WebKit::NetworkResourceLoader::continueWillSendRedirectedRequest):
    Now checks for a From-Origin response header.
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
    Now checks for a From-Origin response header.
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):
    Now checks for a From-Origin response header.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Vector<RefPtr<SecurityOrigin>>>::encode):
(IPC::ArgumentCoder<Vector<RefPtr<SecurityOrigin>>>::decode):
    Now encodes and decodes vectors of RefPtr<WebCore::SecurityOrigin>.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebPreferences.yaml:
    Added From-Origin support as an experimental feature.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetFromOriginResponseHeaderEnabled):
(WKPreferencesGetFromOriginResponseHeaderEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
    Sets the two new load parameters:
    - shouldEnableFromOriginResponseHeader
    - frameAncestorOrigins

Tools:

This patch implements significant parts of https://github.com/whatwg/fetch/issues/687.
We consume the From-Origin response header and only load the resource if:
- The header is non-existent, empty, or invalid.
- The header specifies 'same' and the resource's origin matches the originating
  document's origin and the origins up the frame tree.
- The header specifies 'same-site' and the resource's eTLD+1 matches the originating
  document's eTLD+1 and the eTLD+1 of the documents up the frame tree.

This feature is experimental and off by default.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: Added.
(TestWebKitAPI::TEST):
    Tests for From-Origin header parsing.

LayoutTests:

This patch implements significant parts of https://github.com/whatwg/fetch/issues/687.
We consume the From-Origin response header and only load the resource if:
- The header is non-existent, empty, or invalid.
- The header specifies 'same' and the resource's origin matches the originating
  document's origin and the origins up the frame tree.
- The header specifies 'same-site' and the resource's eTLD+1 matches the originating
  document's eTLD+1 and the eTLD+1 of the documents up the frame tree.

This feature is experimental and off by default.

* TestExpectations:
    The http/tests/from-origin/ directory marked as [ Skip ].
    Suppressed console output for imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html.
* http/tests/from-origin: Added.
* http/tests/from-origin/document-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/document-from-origin-same-accepted.html: Added.
* http/tests/from-origin/document-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/document-from-origin-same-blocked.html: Added.
* http/tests/from-origin/document-from-origin-same-site-accepted-expected.txt: Added.
* http/tests/from-origin/document-from-origin-same-site-accepted.html: Added.
* http/tests/from-origin/document-from-origin-same-site-blocked-expected.txt: Added.
* http/tests/from-origin/document-from-origin-same-site-blocked.html: Added.
* http/tests/from-origin/document-nested-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/document-nested-from-origin-same-accepted.html: Added.
* http/tests/from-origin/document-nested-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/document-nested-from-origin-same-blocked.html: Added.
* http/tests/from-origin/fetch-data-iframe-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/fetch-data-iframe-from-origin-same-blocked.html: Added.
* http/tests/from-origin/fetch-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/fetch-from-origin-same-accepted.html: Added.
* http/tests/from-origin/fetch-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/fetch-from-origin-same-blocked.html: Added.
* http/tests/from-origin/fetch-from-origin-same-site-accepted-expected.txt: Added.
* http/tests/from-origin/fetch-from-origin-same-site-accepted.html: Added.
* http/tests/from-origin/fetch-from-origin-same-site-blocked-expected.txt: Added.
* http/tests/from-origin/fetch-from-origin-same-site-blocked.html: Added.
* http/tests/from-origin/fetch-iframe-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/fetch-iframe-from-origin-same-accepted.html: Added.
* http/tests/from-origin/fetch-iframe-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/fetch-iframe-from-origin-same-blocked.html: Added.
* http/tests/from-origin/image-about-blank-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/image-about-blank-from-origin-same-blocked.html: Added.
* http/tests/from-origin/image-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/image-from-origin-same-accepted.html: Added.
* http/tests/from-origin/image-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/image-from-origin-same-blocked.html: Added.
* http/tests/from-origin/image-from-origin-same-site-accepted-expected.txt: Added.
* http/tests/from-origin/image-from-origin-same-site-accepted.html: Added.
* http/tests/from-origin/image-from-origin-same-site-blocked-expected.txt: Added.
* http/tests/from-origin/image-from-origin-same-site-blocked.html: Added.
* http/tests/from-origin/redirect-document-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/redirect-document-from-origin-same-blocked.html: Added.
* http/tests/from-origin/redirect-fetch-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/redirect-fetch-from-origin-same-blocked.html: Added.
* http/tests/from-origin/redirect-image-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/redirect-image-from-origin-same-blocked.html: Added.
* http/tests/from-origin/redirect-script-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/redirect-script-from-origin-same-blocked.html: Added.
* http/tests/from-origin/redirect-xhr-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/redirect-xhr-from-origin-same-blocked.html: Added.
* http/tests/from-origin/resources: Added.
* http/tests/from-origin/resources/fetch.php: Added.
* http/tests/from-origin/resources/iframe.php: Added.
* http/tests/from-origin/resources/iframeIPAddressFetch.html: Added.
* http/tests/from-origin/resources/iframeLocalhostFetch.html: Added.
* http/tests/from-origin/resources/image.php: Added.
* http/tests/from-origin/resources/nestedIPAddressIframe.html: Added.
* http/tests/from-origin/resources/nestedLocalhostIframe.html: Added.
* http/tests/from-origin/resources/redirect.php: Added.
* http/tests/from-origin/resources/script.php: Added.
* http/tests/from-origin/resources/xhr.php: Added.
* http/tests/from-origin/sandboxed-sub-frame-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/sandboxed-sub-frame-from-origin-same-blocked.html: Added.
* http/tests/from-origin/sandboxed-sub-frame-nested-cross-origin-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/sandboxed-sub-frame-nested-cross-origin-from-origin-same-blocked.html: Added.
* http/tests/from-origin/sandboxed-sub-frame-nested-same-origin-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/sandboxed-sub-frame-nested-same-origin-from-origin-same-blocked.html: Added.
* http/tests/from-origin/script-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/script-from-origin-same-accepted.html: Added.
* http/tests/from-origin/script-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/script-from-origin-same-blocked.html: Added.
* http/tests/from-origin/script-from-origin-same-site-accepted-expected.txt: Added.
* http/tests/from-origin/script-from-origin-same-site-accepted.html: Added.
* http/tests/from-origin/script-from-origin-same-site-blocked-expected.txt: Added.
* http/tests/from-origin/script-from-origin-same-site-blocked.html: Added.
* http/tests/from-origin/top-frame-document-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/top-frame-document-from-origin-same-accepted.php: Added.
* http/tests/from-origin/xhr-from-origin-same-accepted-expected.txt: Added.
* http/tests/from-origin/xhr-from-origin-same-accepted.html: Added.
* http/tests/from-origin/xhr-from-origin-same-blocked-expected.txt: Added.
* http/tests/from-origin/xhr-from-origin-same-blocked.html: Added.
* http/tests/from-origin/xhr-from-origin-same-site-accepted-expected.txt: Added.
* http/tests/from-origin/xhr-from-origin-same-site-accepted.html: Added.
* http/tests/from-origin/xhr-from-origin-same-site-blocked-expected.txt: Added.
* http/tests/from-origin/xhr-from-origin-same-site-blocked.html: Added.
* platform/mac-wk2/TestExpectations:
    Suppressed console output for imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-redirect.https.html.
* platform/wk2/TestExpectations:
    The http/tests/from-origin/ directory marked as [ Pass ].

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

3 years agoLand test262 test results associated with Test262 runner
commit-queue@webkit.org [Tue, 24 Apr 2018 19:48:58 +0000 (19:48 +0000)]
Land test262 test results associated with Test262 runner
https://bugs.webkit.org/show_bug.cgi?id=184667

Patch by Leo Balter <leonardo.balter@gmail.com> on 2018-04-24
Reviewed by Michael Saboff.

* .gitignore: Ignore test262 results file.

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

3 years agoRename LayoutCtx.h/cpp to LayoutContext.h/cpp
antti@apple.com [Tue, 24 Apr 2018 19:48:53 +0000 (19:48 +0000)]
Rename LayoutCtx.h/cpp to LayoutContext.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=184922

Reviewed by Zalan Bujtas.

To achieve this the existing LayoutContext class is renamed to FrameViewLayoutContext.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* layout/LayoutContext.cpp: Copied from Source/WebCore/layout/LayoutCtx.cpp.
* layout/LayoutContext.h: Copied from Source/WebCore/layout/LayoutCtx.h.
* layout/LayoutCtx.cpp: Removed.
* layout/LayoutCtx.h: Removed.
* page/FrameView.cpp:
(WebCore::FrameView::shouldDeferScrollUpdateAfterContentSizeChange):
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::availableContentSizeChanged):
* page/FrameView.h:
* page/FrameViewLayoutContext.cpp: Copied from Source/WebCore/page/LayoutContext.cpp.
(WebCore::LayoutScope::LayoutScope):
(WebCore::FrameViewLayoutContext::FrameViewLayoutContext):
(WebCore::FrameViewLayoutContext::~FrameViewLayoutContext):
(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::runOrScheduleAsynchronousTasks):
(WebCore::FrameViewLayoutContext::runAsynchronousTasks):
(WebCore::FrameViewLayoutContext::flushAsynchronousTasks):
(WebCore::FrameViewLayoutContext::reset):
(WebCore::FrameViewLayoutContext::needsLayout const):
(WebCore::FrameViewLayoutContext::setNeedsLayout):
(WebCore::FrameViewLayoutContext::enableSetNeedsLayout):
(WebCore::FrameViewLayoutContext::disableSetNeedsLayout):
(WebCore::FrameViewLayoutContext::scheduleLayout):
(WebCore::FrameViewLayoutContext::unscheduleLayout):
(WebCore::FrameViewLayoutContext::scheduleSubtreeLayout):
(WebCore::FrameViewLayoutContext::layoutTimerFired):
(WebCore::FrameViewLayoutContext::convertSubtreeLayoutToFullLayout):
(WebCore::FrameViewLayoutContext::setSubtreeLayoutRoot):
(WebCore::FrameViewLayoutContext::canPerformLayout const):
(WebCore::FrameViewLayoutContext::applyTextSizingIfNeeded):
(WebCore::FrameViewLayoutContext::updateStyleForLayout):
(WebCore::FrameViewLayoutContext::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameViewLayoutContext::startLayoutAtMainFrameViewIfNeeded):
(WebCore::FrameViewLayoutContext::layoutDelta const):
(WebCore::FrameViewLayoutContext::addLayoutDelta):
(WebCore::FrameViewLayoutContext::layoutDeltaMatches):
(WebCore::FrameViewLayoutContext::layoutState const):
(WebCore::FrameViewLayoutContext::pushLayoutState):
(WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
(WebCore::FrameViewLayoutContext::popLayoutState):
(WebCore::FrameViewLayoutContext::checkLayoutState):
(WebCore::FrameViewLayoutContext::frame const):
(WebCore::FrameViewLayoutContext::view const):
(WebCore::FrameViewLayoutContext::renderView const):
(WebCore::FrameViewLayoutContext::document const):
(WebCore::LayoutContext::LayoutContext): Deleted.
(WebCore::LayoutContext::~LayoutContext): Deleted.
(WebCore::LayoutContext::layout): Deleted.
(WebCore::LayoutContext::runOrScheduleAsynchronousTasks): Deleted.
(WebCore::LayoutContext::runAsynchronousTasks): Deleted.
(WebCore::LayoutContext::flushAsynchronousTasks): Deleted.
(WebCore::LayoutContext::reset): Deleted.
(WebCore::LayoutContext::needsLayout const): Deleted.
(WebCore::LayoutContext::setNeedsLayout): Deleted.
(WebCore::LayoutContext::enableSetNeedsLayout): Deleted.
(WebCore::LayoutContext::disableSetNeedsLayout): Deleted.
(WebCore::LayoutContext::scheduleLayout): Deleted.
(WebCore::LayoutContext::unscheduleLayout): Deleted.
(WebCore::LayoutContext::scheduleSubtreeLayout): Deleted.
(WebCore::LayoutContext::layoutTimerFired): Deleted.
(WebCore::LayoutContext::convertSubtreeLayoutToFullLayout): Deleted.
(WebCore::LayoutContext::setSubtreeLayoutRoot): Deleted.
(WebCore::LayoutContext::canPerformLayout const): Deleted.
(WebCore::LayoutContext::applyTextSizingIfNeeded): Deleted.
(WebCore::LayoutContext::updateStyleForLayout): Deleted.
(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded): Deleted.
(WebCore::LayoutContext::startLayoutAtMainFrameViewIfNeeded): Deleted.
(WebCore::LayoutContext::layoutDelta const): Deleted.
(WebCore::LayoutContext::addLayoutDelta): Deleted.
(WebCore::LayoutContext::layoutDeltaMatches): Deleted.
(WebCore::LayoutContext::layoutState const): Deleted.
(WebCore::LayoutContext::pushLayoutState): Deleted.
(WebCore::LayoutContext::pushLayoutStateForPaginationIfNeeded): Deleted.
(WebCore::LayoutContext::popLayoutState): Deleted.
(WebCore::LayoutContext::checkLayoutState): Deleted.
(WebCore::LayoutContext::frame const): Deleted.
(WebCore::LayoutContext::view const): Deleted.
(WebCore::LayoutContext::renderView const): Deleted.
(WebCore::LayoutContext::document const): Deleted.
* page/FrameViewLayoutContext.h: Copied from Source/WebCore/page/LayoutContext.h.
(WebCore::LayoutContext::startDisallowingLayout): Deleted.
(WebCore::LayoutContext::endDisallowingLayout): Deleted.
(WebCore::LayoutContext::layoutPhase const): Deleted.
(WebCore::LayoutContext::isLayoutNested const): Deleted.
(WebCore::LayoutContext::isLayoutPending const): Deleted.
(WebCore::LayoutContext::isInLayout const): Deleted.
(WebCore::LayoutContext::isInRenderTreeLayout const): Deleted.
(WebCore::LayoutContext::inPaintableState const): Deleted.
(WebCore::LayoutContext::layoutCount const): Deleted.
(WebCore::LayoutContext::subtreeLayoutRoot const): Deleted.
(WebCore::LayoutContext::clearSubtreeLayoutRoot): Deleted.
(WebCore::LayoutContext::resetFirstLayoutFlag): Deleted.
(WebCore::LayoutContext::didFirstLayout const): Deleted.
(WebCore::LayoutContext::setNeedsFullRepaint): Deleted.
(WebCore::LayoutContext::needsFullRepaint const): Deleted.
(WebCore::LayoutContext::isPaintOffsetCacheEnabled const): Deleted.
(WebCore::LayoutContext::layoutDisallowed const): Deleted.
(WebCore::LayoutContext::isLayoutSchedulingEnabled const): Deleted.
(WebCore::LayoutContext::inAsynchronousTasks const): Deleted.
(WebCore::LayoutContext::disablePaintOffsetCache): Deleted.
(WebCore::LayoutContext::enablePaintOffsetCache): Deleted.
* page/LayoutContext.cpp: Removed.
* page/LayoutContext.h: Removed.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::computePaginationInformation):
(WebCore::LayoutState::establishLineGrid):
(WebCore::LayoutStateDisabler::LayoutStateDisabler):
* rendering/LayoutState.h:

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

3 years agoNeed to acquire the VM lock before calling toNumber on a JSValue.
mark.lam@apple.com [Tue, 24 Apr 2018 19:19:47 +0000 (19:19 +0000)]
Need to acquire the VM lock before calling toNumber on a JSValue.
https://bugs.webkit.org/show_bug.cgi?id=184924
<rdar://problem/39690679>

Reviewed by Saam Barati.

* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):

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

3 years agoDFG CSE should know how to decay a MultiGetByOffset
fpizlo@apple.com [Tue, 24 Apr 2018 18:54:47 +0000 (18:54 +0000)]
DFG CSE should know how to decay a MultiGetByOffset
https://bugs.webkit.org/show_bug.cgi?id=159859

Reviewed by Keith Miller.

This teaches Node::remove() how to decay a MultiGetByOffset to a CheckStructure, so that
clobberize() can report a def() for MultiGetByOffset.

This is a slight improvement to codegen in splay because splay is a heavy user of
MultiGetByOffset. It uses it redundantly in one of its hot functions (the function called
"splay_"). I don't see a net speed-up in the benchmark. However, this is just a first step to
removing MultiXByOffset-related redundancies, which by my estimates account for 16% of
splay's time.

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::remove):
(JSC::DFG::Node::removeWithoutChecks):
(JSC::DFG::Node::replaceWith):
(JSC::DFG::Node::replaceWithWithoutChecks):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToMultiGetByOffset):
(JSC::DFG::Node::replaceWith): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:

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

3 years agoREGRESSION(r221839): Fix requests with FormData containing empty files
commit-queue@webkit.org [Tue, 24 Apr 2018 18:15:48 +0000 (18:15 +0000)]
REGRESSION(r221839): Fix requests with FormData containing empty files
https://bugs.webkit.org/show_bug.cgi?id=184490
<rdar://problem/39385169>

Patch by Tadeu Zagallo <tzagallo@apple.com> on 2018-04-24
Reviewed by Geoffrey Garen.

Source/WebCore:

We should not append the blob to the FormData when it is a file but has no path. It broke
the submission since the request was failing to read the file in FormDataStreamCFNet.h:156

Test: http/tests/local/formdata/send-form-data-with-empty-file.html

* platform/network/FormData.cpp:
(WebCore::FormData::appendMultiPartFileValue):

LayoutTests:

Verify that the final boundary is present in the request body when submitting FormData containing an empty file.

* http/tests/local/formdata/send-form-data-with-empty-file-expected.txt: Added.
* http/tests/local/formdata/send-form-data-with-empty-file.html: Added.

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

3 years agoFix project file after r230931.
zalan@apple.com [Tue, 24 Apr 2018 17:50:50 +0000 (17:50 +0000)]
Fix project file after r230931.

* WebCore.xcodeproj/project.pbxproj:

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

3 years agoUpdate API docs with information on which run loop the VM will use
keith_miller@apple.com [Tue, 24 Apr 2018 17:32:44 +0000 (17:32 +0000)]
Update API docs with information on which run loop the VM will use
https://bugs.webkit.org/show_bug.cgi?id=184900
<rdar://problem/39166054>

Reviewed by Mark Lam.

* API/JSContextRef.h:
* API/JSVirtualMachine.h:

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

3 years agoTool scripts should not use PrivilegedAPI from 'public/v3/privileged-api.js'.
dewei_zhu@apple.com [Tue, 24 Apr 2018 17:17:42 +0000 (17:17 +0000)]
Tool scripts should not use PrivilegedAPI from 'public/v3/privileged-api.js'.
https://bugs.webkit.org/show_bug.cgi?id=184766

Reviewed by Ryosuke Niwa.

For tools, we should not use PrivilegedAPI for tools as current PrivilegedAPI
is used by UI and it is unnecessary to generate CSRF token for tools.
Will post a followup patch that creates a PrivilegedAPI used by tools.
Make a change on TestServer.inject and MockRemoteAPI.inject to allow specifying
BrowserPrivilegedAPI or NodePrivilegedAPI in the test. Currently defaults to
BrowserPrivilegedAPI as this is the test behavior before this change.

* server-tests/resources/common-operations.js: Allow passing type of privileged api
information to TestServer.inject.
* server-tests/resources/test-server.js: Conditionally inject PrivilegedAPI based on
type of privileged api.
(TestServer.prototype.inject):
(TestServer):
* server-tests/tools-buildbot-triggerable-tests.js: Updated 'prepareServerTest' invocation.
* server-tests/tools-os-build-fetcher-tests.js: Updated 'prepareServerTest' invocation.
* server-tests/tools-sync-buildbot-integration-tests.js: Temporarily injecting
BrowserPrivilegedAPI for mocking UploadedFile. The actual script does not rely on
BrowserPrivilegedAPI at all.
(async.createTestGroupWihPatch):
(beforeEach):
* tools/js/privileged-api.js: Added NodePrivilegedAPI
(NodePrivilegedAPI.prototype.sendRequest):
(NodePrivilegedAPI.configure): Configure the slave name and password.
(NodePrivilegedAPI):
* tools/js/v3-models.js: Removed the import of PrivilegedAPI.
* unit-tests/privileged-api-tests.js:. Added unit tests for NodePrivilegedAPI.
* unit-tests/resources/mock-remote-api.js: Conditionally inject PrivilegedAPI based on
the type of privileged api.
(MockRemoteAPI.inject):

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

3 years agoDon't add system framework paths to FRAMEWORK_SEARCH_PATHS
jer.noble@apple.com [Tue, 24 Apr 2018 16:17:09 +0000 (16:17 +0000)]
Don't add system framework paths to FRAMEWORK_SEARCH_PATHS
https://bugs.webkit.org/show_bug.cgi?id=184786

Reviewed by Tim Horton.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

Source/WebCore/PAL:

* Configurations/PAL.xcconfig:

Source/WebKit:

* Configurations/BaseTarget.xcconfig:
* DerivedSources.make:

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:
* MigrateHeaders.make:

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

3 years agoUnreviewed, rolling out r230938.
ryanhaddad@apple.com [Tue, 24 Apr 2018 15:58:49 +0000 (15:58 +0000)]
Unreviewed, rolling out r230938.

Introduced two ProcessSwap API test failures.

Reverted changeset:

"Keep around a pre-warmed process when doing process swap on
navigation"
https://bugs.webkit.org/show_bug.cgi?id=184765
https://trac.webkit.org/changeset/230938

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

3 years ago$vm.totalGCTime() should be a thing
fpizlo@apple.com [Tue, 24 Apr 2018 15:53:15 +0000 (15:53 +0000)]
$vm.totalGCTime() should be a thing
https://bugs.webkit.org/show_bug.cgi?id=184916

Reviewed by Sam Weinig.

When debugging regressions in tests that are GC heavy, it's nice to be able to query the total
time spent in GC to determine if the regression is because the GC got slower.

This adds $vm.totalGCTime(), which tells you the total time spent in GC, in seconds.

* heap/Heap.cpp:
(JSC::Heap::runEndPhase):
* heap/Heap.h:
(JSC::Heap::totalGCTime const):
* tools/JSDollarVM.cpp:
(JSC::functionTotalGCTime):
(JSC::JSDollarVM::finishCreation):

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

3 years ago[CoordGraphics] Remove dead fixed layer code
zandobersek@gmail.com [Tue, 24 Apr 2018 15:27:46 +0000 (15:27 +0000)]
[CoordGraphics] Remove dead fixed layer code
https://bugs.webkit.org/show_bug.cgi?id=184912

Reviewed by Michael Catanzaro.

Source/WebCore:

Remove CoordinatedGraphicsLayer::setFixedToViewport() and the
corresponding attribute on the CoordinatedGraphicsLayerState struct.
The method is not called anywhere since r230952.

CoordinatedGraphicsState struct also loses the scrollPosition attribute
that also isn't used anymore.

Changes to GraphicsLayerTextureMapper class mirror those made to
CoordinatedGraphicsLayer, removing support for the fixed-to-viewport
attribute. This too was not called from anywhere.

All that enables us removing fixed-to-viewport handling in the
TextureMapperLayer class. Along with related changes in the
CoordinatedGraphicsScene class, we're able to remove a bunch of methods
and member variables that are not used or needed anymore.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::setFixedToViewport): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::setFixedToViewport): Deleted.
(WebCore::TextureMapperLayer::isAncestorFixedToViewport const): Deleted.
(WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded): Deleted.
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::setFixedToViewport): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):

Source/WebKit:

Drop the unused fixed layer handling  code in CoordinatedGraphicsScene.
The m_fixedLayers container can be removed, along with the
adjustPositionForFixedLayers() method that operated on that container.

This was the only method that operated with the m_scrollPosition member
variable and the contentsPosition argument that's passed to the
CoordinatedGraphicsScene::paintToCurrentGLContext() method. Both of
these are removed, along with the scrollPosition attribute on the
CoordinatedGraphicsState struct.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebKit::CoordinatedGraphicsScene::setLayerState):
(WebKit::CoordinatedGraphicsScene::deleteLayer):
(WebKit::CoordinatedGraphicsScene::commitSceneState):
(WebKit::CoordinatedGraphicsScene::purgeGLResources):
(WebKit::CoordinatedGraphicsScene::adjustPositionForFixedLayers): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::renderLayerTree):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::flushPendingLayerChanges):

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

3 years agoREGRESSION(r230950): Faulty commit sequencing in CoordinatedGraphicsScene
zandobersek@gmail.com [Tue, 24 Apr 2018 15:26:42 +0000 (15:26 +0000)]
REGRESSION(r230950): Faulty commit sequencing in CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=184917

Reviewed by Michael Catanzaro.

After r230950, current animation state for a given layer is also taken
into account when determining whether or not the layer requires a
backing store. For that to work properly, all the animation state has
to be updated before the backing store work. This patch changes the
order of helper method invocations in
CoordinatedGraphicsScene::setLayerState() to address that.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::setLayerState):

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

3 years agoUnreviewed. Update W3C WebDriver imported tests.
carlosgc@webkit.org [Tue, 24 Apr 2018 11:01:49 +0000 (11:01 +0000)]
Unreviewed. Update W3C WebDriver imported tests.

Tools:

* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.__init__):

WebDriverTests:

* imported/w3c/importer.json:
* imported/w3c/tools/webdriver/webdriver/client.py:
* imported/w3c/tools/webdriver/webdriver/transport.py:
* imported/w3c/tools/wptrunner/README.rst:
* imported/w3c/tools/wptrunner/requirements_chrome.txt:
* imported/w3c/tools/wptrunner/requirements_edge.txt:
* imported/w3c/tools/wptrunner/requirements_firefox.txt:
* imported/w3c/tools/wptrunner/requirements_ie.txt:
* imported/w3c/tools/wptrunner/requirements_opera.txt:
* imported/w3c/tools/wptrunner/requirements_safari.txt: Added.
* imported/w3c/tools/wptrunner/requirements_sauce.txt:
* imported/w3c/tools/wptrunner/requirements_webkit.txt: Added.
* imported/w3c/tools/wptrunner/tox.ini:
* imported/w3c/tools/wptrunner/wptrunner/browsers/__init__.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/chrome.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/chrome_android.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/edge.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/firefox.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/ie.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/opera.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/safari.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/browsers/sauce.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/sauce_setup/edge-prerun.bat:
* imported/w3c/tools/wptrunner/wptrunner/browsers/sauce_setup/safari-prerun.sh:
* imported/w3c/tools/wptrunner/wptrunner/browsers/servo.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/servodriver.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/webkit.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/environment.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/base.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executormarionette.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorservo.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorservodriver.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorwebkit.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/executors/protocol.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette.js:
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js: Added.
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js:
* imported/w3c/tools/wptrunner/wptrunner/testdriver-extra.js:
* imported/w3c/tools/wptrunner/wptrunner/testloader.py:
* imported/w3c/tools/wptrunner/wptrunner/testrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/base.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/tests/test_products.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/update/metadata.py:
* imported/w3c/tools/wptrunner/wptrunner/update/update.py:
* imported/w3c/tools/wptrunner/wptrunner/webdriver_server.py:
* imported/w3c/tools/wptrunner/wptrunner/wptcommandline.py:
* imported/w3c/tools/wptrunner/wptrunner/wptrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/wpttest.py:
* imported/w3c/webdriver/tests/actions/modifier_click.py:
* imported/w3c/webdriver/tests/actions/mouse_dblclick.py:
* imported/w3c/webdriver/tests/actions/mouse_pause_dblclick.py: Added.
* imported/w3c/webdriver/tests/actions/special_keys.py:
* imported/w3c/webdriver/tests/contexts/maximize_window.py:
* imported/w3c/webdriver/tests/cookies/add_cookie.py:
* imported/w3c/webdriver/tests/element_retrieval/find_element.py:
* imported/w3c/webdriver/tests/element_retrieval/find_element_from_element.py:
* imported/w3c/webdriver/tests/element_retrieval/find_elements.py:
* imported/w3c/webdriver/tests/element_retrieval/find_elements_from_element.py:
* imported/w3c/webdriver/tests/element_send_keys/form_controls.py:
* imported/w3c/webdriver/tests/execute_async_script/collections.py: Added.
* imported/w3c/webdriver/tests/execute_async_script/user_prompts.py:
* imported/w3c/webdriver/tests/execute_script/collections.py: Added.
* imported/w3c/webdriver/tests/execute_script/user_prompts.py:
* imported/w3c/webdriver/tests/fullscreen_window.py:
* imported/w3c/webdriver/tests/interaction/element_clear.py:
* imported/w3c/webdriver/tests/minimize_window.py:
* imported/w3c/webdriver/tests/set_window_rect.py:
* imported/w3c/webdriver/tests/support/fixtures.py:

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

3 years ago[CoordGraphics] Remove unused fixed layout functionality
zandobersek@gmail.com [Tue, 24 Apr 2018 09:24:55 +0000 (09:24 +0000)]
[CoordGraphics] Remove unused fixed layout functionality
https://bugs.webkit.org/show_bug.cgi?id=184908

Reviewed by Carlos Garcia Campos.

Ports using the CoordinatedGraphics subsystem don't expose fixed layout
support. As such, we're able to remove a lot of unused code and
unnecessary USE(COORDINATED_GRAPHICS) special cases in generic sections
in both WebCore and WebKit.

Source/WebCore:

With fixed layout not available for use to users of the GTK+ and WPE
ports, we can remove the ScrollingCoordinatorCoordinatedGraphics
implementation, making room for an implementation that inherits from
AsyncScrollingCoordinator in the future. For that purpose the
ScrollingCoordinator::create() function is moved into the
ScrollingCoordinatorCoordinatedGraphics.cpp file already.

This also enables removing delegatedScrollRequested() method from
HostWindow and the inheriting ChromeClient interface.

* loader/EmptyClients.h:
* page/Chrome.cpp:
(WebCore::Chrome::delegatedScrollRequested): Deleted.
* page/Chrome.h:
* page/ChromeClient.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinator::create):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::attachToStateTree): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::clearStateTree): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeLayer): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeViewportConstraints): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate): Deleted.
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Removed.
* platform/HostWindow.h:

Source/WebKit:

Remove USE(COORDINATED_GRAPHICS) special-casing from the
WebPage::setUseFixedLayout() method. This is not possible to enable for
the GTK+ and WPE ports that use the CoordinatedGraphics subsytem via
API. Removing all this unlocks removing considerable amounts of dead
code and complexities in CoordinatedGraphics.

WebChromeClient::delegatedScrollRequested() method is removed, along
with the WebPage::pageDidRequestScroll() method that was only called
from there.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::delegatedScrollRequested): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::pageDidRequestScroll): Deleted.
* WebProcess/WebPage/WebPage.h:

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

3 years agoAttempt to fix the Apple Internal build following r230922
dbates@webkit.org [Tue, 24 Apr 2018 08:31:19 +0000 (08:31 +0000)]
Attempt to fix the Apple Internal build following r230922
(https://bugs.webkit.org/show_bug.cgi?id=184737)

Cast the return value of std::map::size() to a size_t before logging it with format specifier
"%zu". std::map::size() returns a size_type. According to <http://en.cppreference.com/w/cpp/container/map>
size_type is "usually a size_t", but it may not be. An Apple Internal debug builder reports
that size_type = unsigned int != unsigned long = size_t.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::provideMediaData):

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

3 years ago[CoordGraphics] Avoid painting backing stores for zero-opacity layers
zandobersek@gmail.com [Tue, 24 Apr 2018 08:15:41 +0000 (08:15 +0000)]
[CoordGraphics] Avoid painting backing stores for zero-opacity layers
https://bugs.webkit.org/show_bug.cgi?id=184143

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Skip generating backing stores for layers that have zero opacity and do
not animate the opacity value. In the current CoordinatedGraphics system
this can end up saving loads of memory on Web content that deploys a
large number of such elements.

* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):

Source/WebKit:

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::layerShouldHaveBackingStore):
Mirror CoordinatedGraphicsLayer's backing store requirements.

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

3 years ago[WPE] Remove libgbm dependency
zandobersek@gmail.com [Tue, 24 Apr 2018 08:06:56 +0000 (08:06 +0000)]
[WPE] Remove libgbm dependency
https://bugs.webkit.org/show_bug.cgi?id=184906

Reviewed by Carlos Garcia Campos.

.:

Remove the libgbm CMake search module. It's not necessary anymore
after r230562.

* Source/cmake/FindLibGBM.cmake: Removed.

Tools:

Stop searching for libgbm, using its compiler flags for the
HeadlessViewBackend compilation and linking against the .so object.
This is not necessary anymore after r230562 switched to a different
backend implementation for testing.

* wpe/HeadlessViewBackend/CMakeLists.txt:
* wpe/install-dependencies:

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

3 years agoAttempt to fix the Apple Internal build following r230944
dbates@webkit.org [Tue, 24 Apr 2018 08:02:10 +0000 (08:02 +0000)]
Attempt to fix the Apple Internal build following r230944
(https://bugs.webkit.org/show_bug.cgi?id=159464)

* platform/network/mac/CookieJarMac.mm:

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

3 years agoAnother attempt to fix the Mac and iOS build following r230944
dbates@webkit.org [Tue, 24 Apr 2018 07:51:30 +0000 (07:51 +0000)]
Another attempt to fix the Mac and iOS build following r230944
(https://bugs.webkit.org/show_bug.cgi?id=159464)

* platform/network/mac/CookieJarMac.mm:
(WebCore::policyProperties):

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

3 years agoAttempt to fix the Mac and iOS build following r230944
dbates@webkit.org [Tue, 24 Apr 2018 07:47:14 +0000 (07:47 +0000)]
Attempt to fix the Mac and iOS build following r230944
(https://bugs.webkit.org/show_bug.cgi?id=159464)

* platform/network/mac/CookieJarMac.mm:
(WebCore::policyProperties):

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

3 years agoFix up order of ChangeLog entries following r230944.
dbates@webkit.org [Tue, 24 Apr 2018 07:44:06 +0000 (07:44 +0000)]
Fix up order of ChangeLog entries following r230944.

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

3 years agoSource/WebCore:
dbates@webkit.org [Tue, 24 Apr 2018 07:36:59 +0000 (07:36 +0000)]
Source/WebCore:
Make WebLoaderStrategy send to NetworkResourceLoader necessary parameters to handle full loads in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=184763

Patch by Youenn Fablet <youenn@apple.com> on 2018-04-23
Reviewed by Chris Dumez.

No change of behavior yet since we do not use these parameters in NetworkProcess yet.

Add PreflightPolicy and CSP response headers as ResourceLoaderOptions.
This allows passing them from DocumentThreadableLoader to WebLoaderStrategy.

Allow getting the original headers from a SubresourceLoader.
This allows passing them from DocumentThreadableLoader down to WebLoaderStrategy.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::startLoadingBlobURL):
(WebCore::FetchLoader::start):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
* loader/ResourceLoaderOptions.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::originalHeaders const):
* loader/SubresourceLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::isolatedCopy const):
* loader/ThreadableLoader.h:
* page/EventSource.cpp:
(WebCore::EventSource::connect):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

Source/WebCore/PAL:
Implement Same-Site cookies
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>

Reviewed by Brent Fulgham.

Forward declare some SPI.

* pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:
Make WebLoaderStrategy send to NetworkResourceLoader necessary parameters to handle full loads in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=184763

Patch by Youenn Fablet <youenn@apple.com> on 2018-04-23
Reviewed by Chris Dumez.

Set all required NetworkResourceLoadParameters for asynchronous loads.
This includes preflight policy, CSP response headers, SecurityOrigin and content blockers identifier.

Update NetworkLoadChecker to handle preflight policy.
This is not needed right now since sync XHR and ping loads are using the default ConsiderPreflight policy.
But this will be needed for XHR/fetch/EventSource loads.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::validateResponse):
(WebKit::NetworkLoadChecker::checkCORSRequest):
* NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::create):
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

Source/WebKitLegacy/mac:
Implement Same-Site cookies
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>

Reviewed by Brent Fulgham.

Pass the Same-Site info through the strategy.

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):

Source/WebKitLegacy/win:
Implement Same-Site cookies
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>

Reviewed by Brent Fulgham.

Pass the Same-Site info through the strategy.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
* WebCoreSupport/WebPlatformStrategies.h:

LayoutTests:
Implement Same-Site cookies
https://bugs.webkit.org/show_bug.cgi?id=159464
<rdar://problem/27196358>

Reviewed by Brent Fulgham.

Add tests. These tests are skipped on all ports for now, including Mac and iOS. We will
look to subsequently enable the tests for Mac and iOS once we have CFNetwork support for
Same-Site cookies.

The following tests and utilities were taken in whole or in part from Blink:
    http/tests/cookies/resources/echo-json.php
    http/tests/cookies/resources/post-cookies-onmessage.php
    http/tests/cookies/resources/post-cookies-to-opener.php
    http/tests/cookies/resources/testharness-helpers.js
    http/tests/cookies/same-site/popup-cross-site-post.html
    http/tests/cookies/same-site/popup-cross-site.html
    http/tests/cookies/same-site/popup-same-site-post.html
    http/tests/cookies/same-site/popup-same-site.html

The following files were derived from tests taken from Blink:
    http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html
    http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html

* TestExpectations: Skip on all ports for now.
* http/tests/cookies/resources/cookie-utilities.js: Added.
(createCookie):
(setBaseDocumentWhenFetchingDOMCookies):
(setDOMCookie):
* http/tests/cookies/resources/cookie-utility.php:
* http/tests/cookies/resources/echo-json.php: Added.
* http/tests/cookies/resources/post-cookies-onmessage.php: Added.
* http/tests/cookies/resources/post-cookies-to-opener.php: Added.
* http/tests/cookies/resources/testharness-helpers.js: Added.
(clearKnownCookies):
* http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page-expected.txt: Added.
* http/tests/cookies/same-site/fetch-after-navigating-iframe-in-cross-origin-page.html: Added.
* http/tests/cookies/same-site/fetch-after-top-level-navigation-from-cross-origin-page-expected.txt: Added.
* http/tests/cookies/same-site/fetch-after-top-level-navigation-from-cross-origin-page.html: Added.
* http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page-expected.txt: Added.
* http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html: Added.
* http/tests/cookies/same-site/fetch-cookies-set-in-about-blank-iframe-expected.txt: Added.
* http/tests/cookies/same-site/fetch-cookies-set-in-about-blank-iframe.html: Added.
* http/tests/cookies/same-site/fetch-in-about-blank-page-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-about-blank-page.html: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-iframe-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-iframe.html: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-page-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-page.html: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-service-worker-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-service-worker.html: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-worker-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-cross-origin-worker.html: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-page-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-page.html: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-service-worker-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-service-worker.html: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-srcdoc-iframe-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-srcdoc-iframe.html: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-worker-expected.txt: Added.
* http/tests/cookies/same-site/fetch-in-same-origin-worker.html: Added.
* http/tests/cookies/same-site/popup-cross-site-expected.txt: Added.
* http/tests/cookies/same-site/popup-cross-site-post-expected.txt: Added.
* http/tests/cookies/same-site/popup-cross-site-post.html: Added.
* http/tests/cookies/same-site/popup-cross-site.html: Added.
* http/tests/cookies/same-site/popup-same-site-expected.txt: Added.
* http/tests/cookies/same-site/popup-same-site-post-expected.txt: Added.
* http/tests/cookies/same-site/popup-same-site-post.html: Added.
* http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect-expected.txt: Added.
* http/tests/cookies/same-site/popup-same-site-via-cross-site-redirect.html: Added.
* http/tests/cookies/same-site/popup-same-site-via-same-site-redirect-expected.txt: Added.
* http/tests/cookies/same-site/popup-same-site-via-same-site-redirect.html: Added.
* http/tests/cookies/same-site/popup-same-site.html: Added.
* http/tests/cookies/same-site/resources/click-hyperlink.php: Added.
* http/tests/cookies/same-site/resources/echo-iframe-src.php: Added.
* http/tests/cookies/same-site/resources/fetch-after-navigating-iframe-in-cross-origin-page.php: Added.
* http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-from-cross-origin-page.php: Added.
* http/tests/cookies/same-site/resources/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.php: Added.
* http/tests/cookies/same-site/resources/fetch-in-cross-origin-iframe.html: Added.
* http/tests/cookies/same-site/resources/fetch-in-cross-origin-service-worker.html: Added.
* http/tests/cookies/same-site/resources/fetch-in-cross-origin-worker.js: Added.
(async.checkResult):
* http/tests/cookies/same-site/resources/fetch-in-same-origin-service-worker.php: Added.
* http/tests/cookies/same-site/resources/fetch-in-same-origin-worker.js: Added.
(async.checkResult):
* http/tests/cookies/same-site/resources/passthrough-service-worker.js: Added.
* platform/mac-wk1/TestExpectations: Skip the Service Worker tests as they are not supported in LegacyWebKit.

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

3 years ago[GLIB] Make it possible to use a different timeout for slow test cases in GLib tests
carlosgc@webkit.org [Tue, 24 Apr 2018 06:33:31 +0000 (06:33 +0000)]
[GLIB] Make it possible to use a different timeout for slow test cases in GLib tests
https://bugs.webkit.org/show_bug.cgi?id=184816

Reviewed by Michael Catanzaro.

Pass a function from api test runner to glib test runner to check if a test is slow and use the given slow
timeout.

* TestWebKitAPI/glib/TestExpectations.json:
* glib/api_test_runner.py:
(TestRunner._run_test_glib.is_slow_test):
(TestRunner._run_test_glib):
* glib/glib_test_runner.py:
(GLibTestRunner.__init__):
(GLibTestRunner._stop_timeout):
(GLibTestRunner._subtest_start):
(GLibTestRunner._subtest_end):

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

3 years agoMake WebLoaderStrategy send to NetworkResourceLoader necessary parameters to handle...
youenn@apple.com [Tue, 24 Apr 2018 03:22:53 +0000 (03:22 +0000)]
Make WebLoaderStrategy send to NetworkResourceLoader necessary parameters to handle full loads in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=184763

Reviewed by Chris Dumez.

Source/WebCore:

No change of behavior yet since we do not use these parameters in NetworkProcess yet.

Add PreflightPolicy and CSP response headers as ResourceLoaderOptions.
This allows passing them from DocumentThreadableLoader to WebLoaderStrategy.

Allow getting the original headers from a SubresourceLoader.
This allows passing them from DocumentThreadableLoader down to WebLoaderStrategy.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::startLoadingBlobURL):
(WebCore::FetchLoader::start):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
* loader/ResourceLoaderOptions.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::originalHeaders const):
* loader/SubresourceLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::isolatedCopy const):
* loader/ThreadableLoader.h:
* page/EventSource.cpp:
(WebCore::EventSource::connect):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

Source/WebKit:

Set all required NetworkResourceLoadParameters for asynchronous loads.
This includes preflight policy, CSP response headers, SecurityOrigin and content blockers identifier.

Update NetworkLoadChecker to handle preflight policy.
This is not needed right now since sync XHR and ping loads are using the default ConsiderPreflight policy.
But this will be needed for XHR/fetch/EventSource loads.

* NetworkProcess/NetworkLoadChecker.cpp:
(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::checkRedirection):
(WebKit::NetworkLoadChecker::validateResponse):
(WebKit::NetworkLoadChecker::checkCORSRequest):
* NetworkProcess/NetworkLoadChecker.h:
(WebKit::NetworkLoadChecker::create):
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/PingLoad.cpp:
(WebKit::PingLoad::PingLoad):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

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

3 years ago[Extra zoom mode] REGRESSION(230860) Unable to change time input values using UI
wenson_hsieh@apple.com [Tue, 24 Apr 2018 02:45:32 +0000 (02:45 +0000)]
[Extra zoom mode] REGRESSION(230860) Unable to change time input values using UI
https://bugs.webkit.org/show_bug.cgi?id=184901
<rdar://problem/39664797>

Reviewed by Tim Horton.

Source/WebKit:

Fixes the bug by falling back to setting the value of the focused input element in the case where the selection
is not editable. Also adds plumbing to make time pickers testable in extra zoom mode.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setTimePickerValueToHour:minute:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setTimePickerValueToHour:minute:]):

Add plumbing to make it possible for WebKitTestRunner to simulate picking a time from the given hours and
minutes. This is currently only implemented for extra zoom mode, but may be implemented for UIKit's time picker
as well in the future by adjusting -[WKContentView setTimePickerValueToHour:minute:].

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setTextAsync):

Tools:

Introduce a new UIScriptController method to set the value of a currently focused input of type time, by
interacting with the UI. See WebKit ChangeLogs for more detail.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setTimePickerValue):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setTimePickerValue):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setTimePickerValue):

LayoutTests:

Adds a basic test to verify that tapping on an input of type `time` and choosing a time actually changes the
value of the input. Also adds a new UIHelper function to set the value of the currently focused input of type
time to the given hours and minutes.

* fast/forms/extrazoom/time-picker-value-change-expected.txt: Added.
* fast/forms/extrazoom/time-picker-value-change.html: Added.
* resources/ui-helper.js:
(window.UIHelper.setTimePickerValue):
(window.UIHelper):

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

3 years agoRevision information returned by querying measurement set api with analysis task...
dewei_zhu@apple.com [Tue, 24 Apr 2018 02:34:11 +0000 (02:34 +0000)]
Revision information returned by querying measurement set api with analysis task id should contain commit order.
https://bugs.webkit.org/show_bug.cgi?id=184902

Reviewed by Ryosuke Niwa

This is a bug fix for r230719 which does not cover the case while querying `measurement-set.php?analysisTask=$task_id`

* public/api/measurement-set.php: AnalysisResultsFetcher.fetch_commits results should contains commit order.
* server-tests/api-measurement-set-tests.js: Added unit test for this change.

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

3 years agoUnreviewed, fix a few tests that became flaky after r230919.
cdumez@apple.com [Tue, 24 Apr 2018 02:30:20 +0000 (02:30 +0000)]
Unreviewed, fix a few tests that became flaky after r230919.

* fast/events/beforeunload-alert-handled-keydown.html:
* fast/events/beforeunload-alert-no-user-interaction.html:
* fast/events/beforeunload-alert-user-interaction.html:

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

3 years agoKeep around a pre-warmed process when doing process swap on navigation
sbarati@apple.com [Tue, 24 Apr 2018 02:03:27 +0000 (02:03 +0000)]
Keep around a pre-warmed process when doing process swap on navigation
https://bugs.webkit.org/show_bug.cgi?id=184765

Reviewed by Ryosuke Niwa.

This patch makes it so that WebProcessPool prewarms a process when process
swap on navigation is turned on. When we do a process swap on navigation,
we first try to grab a prewarmed process before creating a new one.

We try to be smart about when to create these processes. The initial heuristic
that this patch chooses is when we reach the DidFirstVisuallyNonEmptyLayout
layout milestone. We're going to try to improve on this heuristic in:
https://bugs.webkit.org/show_bug.cgi?id=184899

This is a 40% progression on PLT with process swap on navigation turned on.

* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::ServiceWorkerProcessProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::notifyProcessPoolToPrewarm):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::didReachGoodTimeToPrewarm):
(WebKit::WebProcessPool::processForNavigation):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::m_isInPrewarmedPool):
(WebKit::m_userMediaCaptureManagerProxy): Deleted.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::isInPrewarmedPool const):
(WebKit::WebProcessProxy::setIsInPrewarmedPool):

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

3 years ago[GTK] check target looks broken
mcatanzaro@igalia.com [Tue, 24 Apr 2018 01:07:57 +0000 (01:07 +0000)]
[GTK] check target looks broken
https://bugs.webkit.org/show_bug.cgi?id=184407

Reviewed by Carlos Garcia Campos.

It's pretty clear that nobody has been using check for a long time.

We got rid of check-for-webkitdom-api-breaks a long time ago, when we stopped autogenerating
the DOM API, but it's still used in the check target. Fix this.

Also, the check target for some reason runs itself from the Source subdirectory of the
builddir, but the test script expects to be run from the toplevel build directory. Fix this
too.

Add VERBATIM for good measure.

* Source/PlatformGTK.cmake:

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

3 years ago[WPE][GTK] Remove WlUniquePtr<wl_display> footgun
mcatanzaro@igalia.com [Tue, 24 Apr 2018 01:07:06 +0000 (01:07 +0000)]
[WPE][GTK] Remove WlUniquePtr<wl_display> footgun
https://bugs.webkit.org/show_bug.cgi?id=184405

Reviewed by Carlos Garcia Campos.

Source/WebCore:

WlUniquePtr<wl_display> is a pretty big footgun because there are two different destruction
functions -- wl_display_disconnect() and wl_display_destroy() -- and which one you need to
use depends on how the wl_display() was created, and WebKit uses both in different places.
So WlUniquePtr<wl_display> is pretty unsafe. See bug #176490 for an example of fun caused
by using it incorrectly.

Let's use std::unique_ptr with custom deleter functors instead.

* platform/graphics/wayland/WlUniquePtr.h:

Source/WebKit:

Switch to std::unique_ptr.

* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::WaylandCompositor):
* UIProcess/gtk/WaylandCompositor.h:
(WebKit::WaylandCompositor::DisplayDeleter::operator()):

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

3 years agoUnreviewed, rolling out r230921, r230923, r230924, r230932,
ryanhaddad@apple.com [Tue, 24 Apr 2018 00:37:42 +0000 (00:37 +0000)]
Unreviewed, rolling out r230921, r230923, r230924, r230932,
and r230934.
https://bugs.webkit.org/show_bug.cgi?id=184903

Builds still broken (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Implement Same-Site cookies"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230921

"Attempt to fix the build after r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230923

"Attempt to fix the Mac and iOS build after r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230924

"Another attempt to fix the Windows build following r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230932

"Attempt to fix the Apple Internal build following r230921"
https://bugs.webkit.org/show_bug.cgi?id=159464
https://trac.webkit.org/changeset/230934

Patch by Commit Queue <commit-queue@webkit.org> on 2018-04-23

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

3 years agoAttempt to fix the Apple Internal build following r230921
dbates@webkit.org [Tue, 24 Apr 2018 00:26:31 +0000 (00:26 +0000)]
Attempt to fix the Apple Internal build following r230921
(https://bugs.webkit.org/show_bug.cgi?id=159464)

Forward declare some SPI. Add availability guard.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

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

3 years agoREGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In...
antti@apple.com [Tue, 24 Apr 2018 00:13:16 +0000 (00:13 +0000)]
REGRESSION (r220112): reCAPTCHA images render off screen on Twitch.tv app Log In or Sign Up
https://bugs.webkit.org/show_bug.cgi?id=182859
<rdar://problem/37595065>

Source/WebCore:

Reviewed by Zalan Bujtas.

Roll out this change from the trunk as the issue it fixed no longer occurs.

* css/MediaQueryEvaluator.cpp:
(WebCore::orientationEvaluate):
(WebCore::aspectRatioEvaluate):
(WebCore::heightEvaluate):
(WebCore::widthEvaluate):
* page/FrameView.cpp:
(WebCore::FrameView::layoutSizeForMediaQuery const): Deleted.
* page/FrameView.h:
* page/LayoutContext.cpp:
(WebCore::LayoutContext::handleLayoutWithFrameFlatteningIfNeeded):

LayoutTests:

Reviewed by Zalan Bujtas

* fast/frames/flattening/media-query-growing-content-expected.txt: Removed.
* fast/frames/flattening/media-query-growing-content.html: Removed.
* fast/frames/flattening/resources/media-query-min-height-with-flattening.html: Removed.

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

3 years agoAnother attempt to fix the Windows build following r230921
dbates@webkit.org [Mon, 23 Apr 2018 23:56:27 +0000 (23:56 +0000)]
Another attempt to fix the Windows build following r230921
(https://bugs.webkit.org/show_bug.cgi?id=159464)

Pass dictionary key name using a string instead of a constant and pass CFURL* to
siteForCookies().

* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):

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