WebKit-https.git
20 months ago[Web Animations] Compute the progress and currentIteration properties on getComputedT...
graouts@webkit.org [Wed, 24 Jan 2018 19:29:53 +0000 (19:29 +0000)]
[Web Animations] Compute the progress and currentIteration properties on getComputedTiming()
https://bugs.webkit.org/show_bug.cgi?id=182039
<rdar://problem/36813568>

Reviewed by Dean Jackson.

Source/WebCore:

Compute the "progress" and "currentIteration" properties on the dictionary returned by getComputedTiming().
To support this we implement several procedures from the specification implemented separately with links
and steps copied from the specification. There is one last procedure we don't implement, which is to obtain
the transformed time following the application of the provided easing, which will be the next patch.

* animation/AnimationEffect.cpp:
(WebCore::AnimationEffect::phase const):
(WebCore::AnimationEffect::activeTime const):
(WebCore::AnimationEffect::overallProgress const):
(WebCore::AnimationEffect::simpleIterationProgress const):
(WebCore::AnimationEffect::currentIteration const):
(WebCore::AnimationEffect::currentDirection const):
(WebCore::AnimationEffect::directedProgress const):
(WebCore::AnimationEffect::iterationProgress const):
(WebCore::AnimationEffect::getComputedTiming):
* animation/AnimationEffect.h:

LayoutTests:

Update expectations with progressions as we expose more of the API.

* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:

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

20 months agoREGRESSION (r226138): Selecting a line that ends with zero-width joiner (ZWJ) may...
dbates@webkit.org [Wed, 24 Jan 2018 19:17:30 +0000 (19:17 +0000)]
REGRESSION (r226138): Selecting a line that ends with zero-width joiner (ZWJ) may cause text transformation
https://bugs.webkit.org/show_bug.cgi?id=181993
<rdar://problem/36421080>

Reviewed by David Hyatt.

Source/WebCore:

Re-implement paint optimization that was inadvertently removed in r226138. This optimization
works around an issue where selecting the last printable character in a line that is followed
followed by a zero-width joiner transforms the selected character.

We need to fix <https://bugs.webkit.org/show_bug.cgi?id=181964> to improve the interaction
of selection and zero-width joiner characters. For now, re-implement a paint optimization
to perform a single paint operation when the style of the non-selected text is identical
to the style of the selected text.

Test: fast/text/mac/select-character-before-zero-width-joiner.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::MarkerSubrangeStyle::areBackgroundMarkerSubrangeStylesEqual):
(WebCore::InlineTextBox::MarkerSubrangeStyle::areForegroundMarkerSubrangeStylesEqual):
(WebCore::InlineTextBox::MarkerSubrangeStyle::areDecorationMarkerSubrangeStylesEqual):
Add helper functions to determine when marker styles are identical. We make use of these
equality functions to coalesce adjacent subranges that have the same visual style and
hence reduce the number of drawing commands to paint all the subranges in a line.

(WebCore::InlineTextBox::paint): Coalesce subranges before painting.

(WebCore::InlineTextBox::subdivideAndResolveStyle): Split out the logic to coalesce
subranges with the same style into its own function InlineTextBox::coalesceAdjacentSubranges()
and kept this function focused on subdivision and style resolution. Manually compute
the frontmost subranges so that we can resolve style for each subrange with respect to
the correct base style. Formerly we always resolved style with respect the specified
base style. Now we resolve style with respect the previous frontmost subrange to ensure
styles cascade as expected. This change causes no visual difference now. Once we implement
<https://bugs.webkit.org/show_bug.cgi?id=175784> we will be able to test this change
with respect to selection of ::spelling-error/::grammar-error pseudo elements.

(WebCore::InlineTextBox::coalesceAdjacentSubranges): Extracted logic from InlineTextBox::subdivideAndResolveStyle().

(WebCore::InlineTextBox::MarkerSubrangeStyle::operator== const): Deleted.
(WebCore::InlineTextBox::MarkerSubrangeStyle::operator!= const): Deleted.
Comparing MarkerSubrangeStyle objects should be performed using the appropriate
are*MarkerSubrangeStylesEqual() non-member function.

* rendering/InlineTextBox.h:
* rendering/MarkerSubrange.cpp:
(WebCore::subdivide): Remove overlap strategy FrontmostWithLongestEffectiveRange
as this strategy is now implemented by InlineTextBox::subdivideAndResolveStyle() and
InlineTextBox::coalesceAdjacentSubranges() that compute the set of frontmost subranges and
coalesces adjacent subranges with the same style into the longest effective subrange,
respectively. Unlike WebCore::subdivide(), InlineTextBox knows what the base style should
be for the subranges and can more aggressively coalesce adjacent subranges of different
types that have the same visual style.
* rendering/MarkerSubrange.h:

Tools:

Remove unit test for overlap strategy FrontmostWithLongestEffectiveRange
as we no longer support this strategy.

* TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp:

LayoutTests:

Add a Mac-specific test to ensure that selecting the last visible character on a line
that ends with a zero-width joiner (ZWJ) does not cause a text transformation of the
selected character.

We need to fix <https://bugs.webkit.org/show_bug.cgi?id=181964> for this test to
pass on Mac.

* TestExpectations: Skip the test directory on non-Mac platforms.
* fast/text/mac/select-character-before-zero-width-joiner-expected.html: Added.
* fast/text/mac/select-character-before-zero-width-joiner.html: Added.
* platform/mac/TestExpectations: Mark the test directory as PASS on Mac so that we run
all containing tests. Mark the test as ImageOnlyFailure until we fix <https://bugs.webkit.org/show_bug.cgi?id=181964>.

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

20 months agocheck-webkit-style reports false-positive whitespace/braces warning about blocks...
ddkilzer@apple.com [Wed, 24 Jan 2018 18:11:13 +0000 (18:11 +0000)]
check-webkit-style reports false-positive whitespace/braces warning about blocks with return types as arguments in Objective-C
<https://webkit.org/b/182015>
<rdar://problem/36449728>

Reviewed by Tim Horton.

* Scripts/webkitpy/style/checkers/cpp.py:
(regex_for_lambdas_and_blocks): Update regex to include
optional return type for block argument in Objective-C.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_braces): Add test.

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

20 months agoFetch response should copy its url from the request if null
commit-queue@webkit.org [Wed, 24 Jan 2018 18:10:29 +0000 (18:10 +0000)]
Fetch response should copy its url from the request if null
https://bugs.webkit.org/show_bug.cgi?id=182048

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

Source/WebCore:

No change of behavior.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): Add assertion to check that the response URL is not null.

Source/WebKit:

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):

LayoutTests:

* http/tests/workers/service/basic-fetch.https-expected.txt:
* http/tests/workers/service/resources/basic-fetch.js:
(async.test):

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

20 months agoAccount for memory cache in DocumentThreadableLoader::didReceiveResponse assertion
commit-queue@webkit.org [Wed, 24 Jan 2018 18:08:02 +0000 (18:08 +0000)]
Account for memory cache in DocumentThreadableLoader::didReceiveResponse assertion
https://bugs.webkit.org/show_bug.cgi?id=182049

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

No change of behavior.
A response served from Service Worker may be cached in Memory Cache and reused later on.
Update DTL assertion to handle that case.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):

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

20 months agoREGRESSION(r227457): Release assert in updateLayout while destructing a media element
eric.carlson@apple.com [Wed, 24 Jan 2018 18:07:18 +0000 (18:07 +0000)]
REGRESSION(r227457): Release assert in updateLayout while destructing a media element
https://bugs.webkit.org/show_bug.cgi?id=182038
<rdar://problem/36812083>

Reviewed by Jer Noble.

* html/MediaElementSession.cpp:
(WebCore::isMainContentForPurposesOfAutoplay): Early return if element.isSuspended().
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::clientCharacteristicsChanged): Call scheduleUpdateNowPlayingInfo
instead of updateNowPlayingInfo.

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

20 months agoWPE-focused test gardening.
Ms2ger@igalia.com [Wed, 24 Jan 2018 18:04:53 +0000 (18:04 +0000)]
WPE-focused test gardening.
https://bugs.webkit.org/show_bug.cgi?id=182051

Unreviewed test gardening.

Tools:

* TestWebKitAPI/glib/TestExpectations.json: TestWebKitFindController failure was fixed in r227418.

LayoutTests:

* TestExpectations:
  - Remove expectation for css3/parse-alignment-of-root-elements.html (rebaselined in r227432).
* css3/flexbox/csswg/flexbox_flex-natural-mixed-basis-auto.html:
  Started failing in r226404; this applies the change from
  https://github.com/w3c/web-platform-tests/commit/b4fa639477ba204f175fd242a335be888ce91371
  to make it pass again.
* platform/gtk/TestExpectations:
  - Add expectation for http/wpt/fetch/response-opaque-clone.html (failing since the test change in r227339).
* platform/wpe/TestExpectations:
  - Remove expectation for fast/canvas/fallback-content.html (started passing in r226814-r226837, inclusive).
  - Override generic failure expectation for imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html
    (it has been passing for as long as it has run).
  - Update path for imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-sizing-alignment-001.html after r225561.
  - Remove expectation for fast/events/tabindex-focus-blur-all.html (started passing in r226814-r226837, inclusive).
  - Add expectation for http/wpt/fetch/response-opaque-clone.html (failing since the test change in r227339).
  - Add expectation for http/wpt/webrtc/third-party-frame-ice-candidate-filtering.html (failing since it was added).
  - Add expectation for fast/canvas/webgl/simulated-vertexAttrib0-invalid-indicies.html (failing since it was added).
  - Skip fast/text/user-installed-fonts/ (the feature is not supported).
  - Remove expectation for imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-unique-origin.html (rebaselined in r226965).
  - Remove expectation for imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input.html (rebaselined in r226965).
  - Mark perf/show-hide-table-rows.html as flaky (as was intended).

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

20 months agoUpdate Poisoned pointers to take a Poison class instead of a uintptr_t&.
mark.lam@apple.com [Wed, 24 Jan 2018 17:43:16 +0000 (17:43 +0000)]
Update Poisoned pointers to take a Poison class instead of a uintptr_t&.
https://bugs.webkit.org/show_bug.cgi?id=182017
<rdar://problem/36795513>

Reviewed by Filip Pizlo and JF Bastien.

Source/JavaScriptCore:

Removed the POISON() macro.  Now that we have Poison types, we can just use the
the Poison type instead and make the code a bit nicer to read.

* API/JSAPIWrapperObject.h:
* API/JSCallbackFunction.h:
* API/JSCallbackObject.h:
* b3/B3LowerMacros.cpp:
* b3/testb3.cpp:
(JSC::B3::testInterpreter):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::instructions):
(JSC::CodeBlock::instructions const):
* dfg/DFGOSRExitCompilerCommon.h:
(JSC::DFG::adjustFrameAndStackInOSRExitCompilerThunk):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckSubClass):
(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
* jit/JIT.h:
* jit/ThunkGenerators.cpp:
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):
* parser/UnlinkedSourceCode.h:
* runtime/ArrayPrototype.h:
* runtime/CustomGetterSetter.h:
* runtime/DateInstance.h:
* runtime/InternalFunction.h:
* runtime/JSArrayBuffer.h:
* runtime/JSCPoison.cpp:
(JSC::initializePoison):
* runtime/JSCPoison.h:
* runtime/JSGlobalObject.h:
* runtime/JSScriptFetchParameters.h:
* runtime/JSScriptFetcher.h:
* runtime/NativeExecutable.h:
* runtime/StructureTransitionTable.h:
* runtime/WriteBarrier.h:
(JSC::WriteBarrier::poison): Deleted.
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/JSWebAssemblyCodeBlock.cpp:
(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):
* wasm/js/JSWebAssemblyCodeBlock.h:
* wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::poison):
* wasm/js/JSWebAssemblyMemory.h:
* wasm/js/JSWebAssemblyModule.h:
* wasm/js/JSWebAssemblyTable.h:
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::wasmToJS):
* wasm/js/WebAssemblyFunctionBase.h:
* wasm/js/WebAssemblyModuleRecord.h:
* wasm/js/WebAssemblyToJSCallee.h:
* wasm/js/WebAssemblyWrapperFunction.h:

Source/WTF:

This paves the way for custom poison values which we'll need for use in
TypedArrays later.

* wtf/Bag.h:
* wtf/DumbPtrTraits.h:
(WTF::DumbPtrTraits::poison): Deleted.
* wtf/DumbValueTraits.h:
(WTF::DumbValueTraits::poison): Deleted.
* wtf/Poisoned.h:
(WTF::Poison::key):
(WTF::Poisoned::swap):
(WTF::Poisoned::poison const):
(WTF::Poisoned::unpoison const):
(WTF::Poisoned::poison):
(WTF::Poisoned::unpoison):
(WTF::PoisonedPtrTraits::swap):
(WTF::PoisonedValueTraits::swap):
(WTF::PoisonedPtrTraits::poison): Deleted.
(WTF::PoisonedValueTraits::poison): Deleted.
* wtf/PoisonedUniquePtr.h:
* wtf/Ref.h:
* wtf/RefCountedArray.h:
* wtf/RefPtr.h:
* wtf/WTFAssertions.cpp:

Tools:

* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedRef.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::passWithRef):
* TestWebKitAPI/Tests/WTF/PoisonedRefPtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::f1):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::poisonedPtrFoo):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):

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

20 months agoAX: Provide a way for VoiceOver to uniquely identify a web session
cfleizach@apple.com [Wed, 24 Jan 2018 17:37:24 +0000 (17:37 +0000)]
AX: Provide a way for VoiceOver to uniquely identify a web session
https://bugs.webkit.org/show_bug.cgi?id=181894

Reviewed by Joanmarie Diggs.

Source/WebCore:

Add a way for VoiceOver to uniquely track a web page session.

Test: accessibility/mac/session-id.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/mac/document-attributes-expected.txt:
* accessibility/mac/session-id-expected.txt: Added.
* accessibility/mac/session-id.html: Added.
* platform/mac/accessibility/parent-delete-expected.txt: Added.

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

20 months agoRenderBlockRareData::m_enclosingFragmentedFlow should be WeakPtr
antti@apple.com [Wed, 24 Jan 2018 17:28:54 +0000 (17:28 +0000)]
RenderBlockRareData::m_enclosingFragmentedFlow should be WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=182045
<rdar://problem/36334787>

Reviewed by Zalan Bujtas.

For safety.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::cachedEnclosingFragmentedFlow const):
(WebCore::RenderBlock::updateCachedEnclosingFragmentedFlow const):
(WebCore::RenderBlock::locateEnclosingFragmentedFlow const):

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

20 months agoREGRESSION (r222961?): sRGB images shown in WebGL are over-saturated on a wide gamut...
dino@apple.com [Wed, 24 Jan 2018 17:14:56 +0000 (17:14 +0000)]
REGRESSION (r222961?): sRGB images shown in WebGL are over-saturated on a wide gamut monitor
https://bugs.webkit.org/show_bug.cgi?id=182033
<rdar://problem/36377780>

Reviewed by Antoine Quint.

Source/WebCore:

My fix for YouTube360 changed the way we composite WebGL on macOS. Unfortunately it dropped
a flag telling the compositor the colorspace of the content should be sRGB. Reinstate this
by explicitly setting the colorspace on the IOSurface we use for WebGL back buffers.

This *should* be covered by the test in:
fast/canvas/webgl/match-page-color-space.html
... however, it shows a problem with our testing infrastructure. As long as it is not
testing on a Wide Gamut display, and explicitly setting the color profile, an automated
test won't pick up this regression. I could add an Internals helper to query the colorspace
of the WebGL content, but that doesn't actually verify the composited result, which is
all that matters.

* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):

Source/WebCore/PAL:

Expose an IOSurface colorspace property name, and a function to serialize a CGColorSpace.

* pal/spi/cg/CoreGraphicsSPI.h:
* pal/spi/cocoa/IOSurfaceSPI.h:

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

20 months ago[GTK] Fix some test failures in ATK selection handling.
Ms2ger@igalia.com [Wed, 24 Jan 2018 16:09:52 +0000 (16:09 +0000)]
[GTK] Fix some test failures in ATK selection handling.
https://bugs.webkit.org/show_bug.cgi?id=168369
<rdar://problem/30534881>

Reviewed by Joanmarie Diggs.

Source/WebCore:

In r208479, selectionBelongsToObject was changed to return false if the
intersectsNode call returns an exception.

In particular, this caused accessibility/gtk/text-at-offset-textarea.html
to fail. In this test, the selection is situated in the shadow DOM of the
textarea, while the node that is checked for intersection is the textarea
itself. In line with the standard, intersectsNode returns an exception in
this case.

This caused webkitAccessibleText{Word, Line, Sentence}ForBoundary to stop
returning the expected text in the tested case. Removing this check fixes
the test, along with some others.

Tests: accessibility/gtk/text-at-offset-textarea.html
       accessibility/gtk/text-at-offset-textinput.html
       accessibility/selected-text-range-aria-elements.html
       accessibility/textarea-selected-text-range.html

* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getSelectionOffsetsForObject): Remove the selectionBelongsToObject() call.

LayoutTests:

Update test expectations for tests that pass again.

* platform/gtk/TestExpectations:

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

20 months agoUnreviewed build fix after r227518. I forgot to add the function declarations to...
svillar@igalia.com [Wed, 24 Jan 2018 15:57:58 +0000 (15:57 +0000)]
Unreviewed build fix after r227518. I forgot to add the function declarations to the WPE
header.

* UIProcess/API/wpe/WebKitSettings.h: Added webkit_settings_get/set_enable_webvr.

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

20 months agoUpdate paths of CSS tests from WPT
rego@igalia.com [Wed, 24 Jan 2018 15:53:46 +0000 (15:53 +0000)]
Update paths of CSS tests from WPT
https://bugs.webkit.org/show_bug.cgi?id=182043

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-display/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-display-3/.
* web-platform-tests/css/css-pseudo/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-pseudo-4/.
* web-platform-tests/css/css-scoping/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-scoping-1/.
* web-platform-tests/css/css-shapes/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-shapes-1/.
* web-platform-tests/css/css-ui/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-ui-3/.
* web-platform-tests/css/geometry/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/geometry-1/.
* web-platform-tests/css/selectors/: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/selectors4/.
* web-platform-tests/lint.whitelist:

LayoutTests:

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-wk2/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/wpe/TestExpectations:

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

20 months agoAdd Cache Storage engine assertion following on bug 181887
commit-queue@webkit.org [Wed, 24 Jan 2018 15:36:04 +0000 (15:36 +0000)]
Add Cache Storage engine assertion following on bug 181887
https://bugs.webkit.org/show_bug.cgi?id=181925

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-24
Reviewed by Alex Christensen.

In a normal environment, the folderPath should be the same as the path computed from the ClientOrigin.
Add assertion to verify this.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::clearCachesForOrigin):

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

20 months ago[GTK] Use GDK_EVENT_PROPAGATE and GDK_EVENT_STOP in WebKitWebViewBase.cpp
mcatanzaro@igalia.com [Wed, 24 Jan 2018 15:25:14 +0000 (15:25 +0000)]
[GTK] Use GDK_EVENT_PROPAGATE and GDK_EVENT_STOP in WebKitWebViewBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=182031

Reviewed by Carlos Garcia Campos.

No functional changes, this just replaces TRUE with GDK_EVENT_STOP and FALSE with
GDK_EVENT_PROPAGATE, to improve readability.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseButtonReleaseEvent):
(webkitWebViewBaseScrollEvent):
(webkitWebViewBaseMotionNotifyEvent):
(webkitWebViewBaseCrossingNotifyEvent):
(webkitWebViewBaseTouchEvent):

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

20 months ago[WebVR] Add OpenVR to the tree and to the build
svillar@igalia.com [Wed, 24 Jan 2018 15:04:34 +0000 (15:04 +0000)]
[WebVR] Add OpenVR to the tree and to the build
https://bugs.webkit.org/show_bug.cgi?id=177298

Reviewed by Žan Doberšek.

.:

* Source/CMakeLists.txt:
* Source/cmake/OptionsGTK.cmake: Enable USE_OPENVR.
* Source/cmake/OptionsWPE.cmake: Ditto.

Source/ThirdParty:

Adding the required parts of OpenVR library to the tree. This will be used as a backend for
the eventual WebVR implementation.

* openvr/CMakeLists.txt: Added.
* openvr/LICENSE: Added.
* openvr/README.md: Added.
* openvr/README.webkit: Added. Includes specifics changes made to the original library to
accommodate it to the WebKit build system.
* openvr/Toolchain-clang.cmake: Added.
* openvr/headers/openvr.h: Added.
(vr::ButtonMaskFromId):
(vr::NotificationBitmap_t::NotificationBitmap_t):
(vr::VRToken):
(vr::COpenVRContext::COpenVRContext):
(vr::COpenVRContext::CheckClear):
(vr::COpenVRContext::VRSystem):
(vr::COpenVRContext::VRChaperone):
(vr::COpenVRContext::VRChaperoneSetup):
(vr::COpenVRContext::VRCompositor):
(vr::COpenVRContext::VROverlay):
(vr::COpenVRContext::VRResources):
(vr::COpenVRContext::VRScreenshots):
(vr::COpenVRContext::VRRenderModels):
(vr::COpenVRContext::VRExtendedDisplay):
(vr::COpenVRContext::VRSettings):
(vr::COpenVRContext::VRApplications):
(vr::COpenVRContext::VRTrackedCamera):
(vr::COpenVRContext::VRDriverManager):
(vr::OpenVRInternal_ModuleContext):
(vr::VRSystem):
(vr::VRChaperone):
(vr::VRChaperoneSetup):
(vr::VRCompositor):
(vr::VROverlay):
(vr::VRScreenshots):
(vr::VRRenderModels):
(vr::VRApplications):
(vr::VRSettings):
(vr::VRResources):
(vr::VRExtendedDisplay):
(vr::VRTrackedCamera):
(vr::VRDriverManager):
(vr::COpenVRContext::Clear):
(vr::VR_Init):
(vr::VR_Shutdown):
* openvr/headers/openvr_api.cs: Added.
* openvr/headers/openvr_api.json: Added.
* openvr/headers/openvr_capi.h: Added.
* openvr/headers/openvr_driver.h: Added.
(vr::ButtonMaskFromId):
(vr::IVRDriverDirectModeComponent::CreateSwapTextureSet):
(vr::IVRDriverDirectModeComponent::DestroySwapTextureSet):
(vr::IVRDriverDirectModeComponent::DestroyAllSwapTextureSets):
(vr::IVRDriverDirectModeComponent::GetNextSwapTextureSetIndex):
(vr::IVRDriverDirectModeComponent::SubmitLayer):
(vr::IVRDriverDirectModeComponent::Present):
(vr::CVRPropertyHelpers::CVRPropertyHelpers):
(vr::CVRPropertyHelpers::TrackedDeviceToPropertyContainer):
(vr::CVRPropertyHelpers::GetProperty):
(vr::CVRPropertyHelpers::SetProperty):
(vr::CVRPropertyHelpers::GetStringProperty):
(vr::CVRPropertyHelpers::SetStringProperty):
(vr::CVRPropertyHelpers::GetPropertyHelper):
(vr::CVRPropertyHelpers::GetBoolProperty):
(vr::CVRPropertyHelpers::GetFloatProperty):
(vr::CVRPropertyHelpers::GetInt32Property):
(vr::CVRPropertyHelpers::GetUint64Property):
(vr::CVRPropertyHelpers::SetBoolProperty):
(vr::CVRPropertyHelpers::SetFloatProperty):
(vr::CVRPropertyHelpers::SetInt32Property):
(vr::CVRPropertyHelpers::SetUint64Property):
(vr::CVRPropertyHelpers::SetPropertyError):
(vr::CVRPropertyHelpers::EraseProperty):
(vr::CVRHiddenAreaHelpers::CVRHiddenAreaHelpers):
(vr::CVRHiddenAreaHelpers::GetPropertyEnum):
(vr::CVRHiddenAreaHelpers::SetHiddenArea):
(vr::CVRHiddenAreaHelpers::GetHiddenArea):
(vr::VRDriverContext):
(vr::COpenVRDriverContext::COpenVRDriverContext):
(vr::COpenVRDriverContext::VRSettings):
(vr::COpenVRDriverContext::VRPropertiesRaw):
(vr::COpenVRDriverContext::VRProperties):
(vr::COpenVRDriverContext::VRHiddenArea):
(vr::COpenVRDriverContext::VRServerDriverHost):
(vr::COpenVRDriverContext::VRWatchdogHost):
(vr::COpenVRDriverContext::VRDriverLog):
(vr::COpenVRDriverContext::VRDriverHandle):
(vr::OpenVRInternal_ModuleServerDriverContext):
(vr::VRSettings):
(vr::VRPropertiesRaw):
(vr::VRProperties):
(vr::VRHiddenArea):
(vr::VRDriverLog):
(vr::VRServerDriverHost):
(vr::VRWatchdogHost):
(vr::VRDriverHandle):
(vr::COpenVRDriverContext::Clear):
(vr::COpenVRDriverContext::InitServer):
(vr::COpenVRDriverContext::InitWatchdog):
(vr::InitServerDriverContext):
(vr::InitWatchdogDriverContext):
(vr::CleanupDriverContext):
* openvr/patches/cmake-build.patch: Added.
* openvr/src/CMakeLists.txt: Added.
* openvr/src/Info.plist: Added.
* openvr/src/README: Added.
* openvr/src/ivrclientcore.h: Added.
* openvr/src/json/json-forwards.h: Added.
* openvr/src/json/json.h: Added.
(std::swap):
* openvr/src/jsoncpp.cpp: Added.
(Json::codePointToUTF8):
(Json::isControlCharacter):
(Json::uintToString):
(Json::fixNumericLocale):
(Json::Features::Features):
(Json::Features::all):
(Json::Features::strictMode):
(Json::containsNewLine):
(Json::Reader::Reader):
(Json::Reader::parse):
(Json::Reader::readValue):
(Json::Reader::skipCommentTokens):
(Json::Reader::readToken):
(Json::Reader::skipSpaces):
(Json::Reader::match):
(Json::Reader::readComment):
(Json::normalizeEOL):
(Json::Reader::addComment):
(Json::Reader::readCStyleComment):
(Json::Reader::readCppStyleComment):
(Json::Reader::readNumber):
(Json::Reader::readString):
(Json::Reader::readObject):
(Json::Reader::readArray):
(Json::Reader::decodeNumber):
(Json::Reader::decodeDouble):
(Json::Reader::decodeString):
(Json::Reader::decodeUnicodeCodePoint):
(Json::Reader::decodeUnicodeEscapeSequence):
(Json::Reader::addError):
(Json::Reader::recoverFromError):
(Json::Reader::addErrorAndRecover):
(Json::Reader::currentValue):
(Json::Reader::getNextChar):
(Json::Reader::getLocationLineAndColumn const):
(Json::Reader::getLocationSnippet const):
(Json::Reader::getFormatedErrorMessages const):
(Json::Reader::getFormattedErrorMessages const):
(Json::Reader::getStructuredErrors const):
(Json::Reader::pushError):
(Json::Reader::good const):
(Json::OurFeatures::all):
(Json::OurReader::OurReader):
(Json::OurReader::parse):
(Json::OurReader::readValue):
(Json::OurReader::skipCommentTokens):
(Json::OurReader::readToken):
(Json::OurReader::skipSpaces):
(Json::OurReader::match):
(Json::OurReader::readComment):
(Json::OurReader::addComment):
(Json::OurReader::readCStyleComment):
(Json::OurReader::readCppStyleComment):
(Json::OurReader::readNumber):
(Json::OurReader::readString):
(Json::OurReader::readStringSingleQuote):
(Json::OurReader::readObject):
(Json::OurReader::readArray):
(Json::OurReader::decodeNumber):
(Json::OurReader::decodeDouble):
(Json::OurReader::decodeString):
(Json::OurReader::decodeUnicodeCodePoint):
(Json::OurReader::decodeUnicodeEscapeSequence):
(Json::OurReader::addError):
(Json::OurReader::recoverFromError):
(Json::OurReader::addErrorAndRecover):
(Json::OurReader::currentValue):
(Json::OurReader::getNextChar):
(Json::OurReader::getLocationLineAndColumn const):
(Json::OurReader::getFormattedErrorMessages const):
(Json::OurReader::getStructuredErrors const):
(Json::OurReader::pushError):
(Json::OurReader::good const):
(Json::OurCharReader::OurCharReader):
(Json::OurCharReader::parse):
(Json::CharReaderBuilder::CharReaderBuilder):
(Json::CharReaderBuilder::~CharReaderBuilder):
(Json::CharReaderBuilder::newCharReader const):
(Json::getValidReaderKeys):
(Json::CharReaderBuilder::validate const):
(Json::CharReaderBuilder::operator[]):
(Json::CharReaderBuilder::strictMode):
(Json::CharReaderBuilder::setDefaults):
(Json::parseFromStream):
(Json::operator>>):
(Json::ValueIteratorBase::ValueIteratorBase):
(Json::ValueIteratorBase::deref const):
(Json::ValueIteratorBase::increment):
(Json::ValueIteratorBase::decrement):
(Json::ValueIteratorBase::computeDistance const):
(Json::ValueIteratorBase::isEqual const):
(Json::ValueIteratorBase::copy):
(Json::ValueIteratorBase::key const):
(Json::ValueIteratorBase::index const):
(Json::ValueIteratorBase::name const):
(Json::ValueIteratorBase::memberName const):
(Json::ValueConstIterator::ValueConstIterator):
(Json::operator=):
(Json::ValueIterator::ValueIterator):
(Json::ValueIterator::operator=):
(Json::InRange):
(Json::integerToDouble):
(Json::duplicateStringValue):
(Json::duplicateAndPrefixStringValue):
(Json::decodePrefixedString):
(Json::releaseStringValue):
(Json::Exception::Exception):
(Json::throw):
(Json::RuntimeError::RuntimeError):
(Json::LogicError::LogicError):
(Json::throwRuntimeError):
(Json::throwLogicError):
(Json::Value::CommentInfo::CommentInfo):
(Json::Value::CommentInfo::~CommentInfo):
(Json::Value::CommentInfo::setComment):
(Json::Value::CZString::CZString):
(Json::Value::CZString::~CZString):
(Json::Value::CZString::swap):
(Json::Value::CZString::operator=):
(Json::Value::CZString::operator< const):
(Json::Value::CZString::operator== const):
(Json::Value::CZString::index const):
(Json::Value::CZString::data const):
(Json::Value::CZString::length const):
(Json::Value::CZString::isStaticString const):
(Json::Value::Value):
(Json::Value::~Value):
(Json::Value::operator=):
(Json::Value::swapPayload):
(Json::Value::swap):
(Json::Value::type const):
(Json::Value::compare const):
(Json::Value::operator< const):
(Json::Value::operator<= const):
(Json::Value::operator>= const):
(Json::Value::operator> const):
(Json::Value::operator== const):
(Json::Value::operator!= const):
(Json::Value::asCString const):
(Json::Value::getString const):
(Json::Value::asString const):
(Json::Value::asConstString const):
(Json::Value::asInt const):
(Json::Value::asUInt const):
(Json::Value::asInt64 const):
(Json::Value::asUInt64 const):
(Json::Value::asLargestInt const):
(Json::Value::asLargestUInt const):
(Json::Value::asDouble const):
(Json::Value::asFloat const):
(Json::Value::asBool const):
(Json::Value::isConvertibleTo const):
(Json::Value::size const):
(Json::Value::empty const):
(Json::Value::operator! const):
(Json::Value::clear):
(Json::Value::resize):
(Json::Value::operator[]):
(Json::Value::operator[] const):
(Json::Value::initBasic):
(Json::Value::resolveReference):
(Json::Value::get const):
(Json::Value::isValidIndex const):
(Json::Value::find const):
(Json::Value::append):
(Json::Value::removeMember):
(Json::Value::removeIndex):
(Json::Value::isMember const):
(Json::Value::getMemberNames const):
(Json::IsIntegral):
(Json::Value::isNull const):
(Json::Value::isBool const):
(Json::Value::isInt const):
(Json::Value::isUInt const):
(Json::Value::isInt64 const):
(Json::Value::isUInt64 const):
(Json::Value::isIntegral const):
(Json::Value::isDouble const):
(Json::Value::isNumeric const):
(Json::Value::isString const):
(Json::Value::isArray const):
(Json::Value::isObject const):
(Json::Value::setComment):
(Json::Value::hasComment const):
(Json::Value::getComment const):
(Json::Value::setOffsetStart):
(Json::Value::setOffsetLimit):
(Json::Value::getOffsetStart const):
(Json::Value::getOffsetLimit const):
(Json::Value::toStyledString const):
(Json::Value::begin const):
(Json::Value::end const):
(Json::Value::begin):
(Json::Value::end):
(Json::PathArgument::PathArgument):
(Json::Path::Path):
(Json::Path::makePath):
(Json::Path::addPathInArg):
(Json::Path::invalidPath):
(Json::Path::resolve const):
(Json::Path::make const):
(Json::containsControlCharacter):
(Json::containsControlCharacter0):
(Json::valueToString):
(Json::valueToQuotedString):
(Json::strnpbrk):
(Json::valueToQuotedStringN):
(Json::Writer::~Writer):
(Json::FastWriter::FastWriter):
(Json::FastWriter::enableYAMLCompatibility):
(Json::FastWriter::dropNullPlaceholders):
(Json::FastWriter::omitEndingLineFeed):
(Json::FastWriter::write):
(Json::FastWriter::writeValue):
(Json::StyledWriter::StyledWriter):
(Json::StyledWriter::write):
(Json::StyledWriter::writeValue):
(Json::StyledWriter::writeArrayValue):
(Json::StyledWriter::isMultineArray):
(Json::StyledWriter::pushValue):
(Json::StyledWriter::writeIndent):
(Json::StyledWriter::writeWithIndent):
(Json::StyledWriter::indent):
(Json::StyledWriter::unindent):
(Json::StyledWriter::writeCommentBeforeValue):
(Json::StyledWriter::writeCommentAfterValueOnSameLine):
(Json::StyledWriter::hasCommentForValue):
(Json::StyledStreamWriter::StyledStreamWriter):
(Json::StyledStreamWriter::write):
(Json::StyledStreamWriter::writeValue):
(Json::StyledStreamWriter::writeArrayValue):
(Json::StyledStreamWriter::isMultineArray):
(Json::StyledStreamWriter::pushValue):
(Json::StyledStreamWriter::writeIndent):
(Json::StyledStreamWriter::writeWithIndent):
(Json::StyledStreamWriter::indent):
(Json::StyledStreamWriter::unindent):
(Json::StyledStreamWriter::writeCommentBeforeValue):
(Json::StyledStreamWriter::writeCommentAfterValueOnSameLine):
(Json::StyledStreamWriter::hasCommentForValue):
(Json::BuiltStyledStreamWriter::BuiltStyledStreamWriter):
(Json::BuiltStyledStreamWriter::write):
(Json::BuiltStyledStreamWriter::writeValue):
(Json::BuiltStyledStreamWriter::writeArrayValue):
(Json::BuiltStyledStreamWriter::isMultineArray):
(Json::BuiltStyledStreamWriter::pushValue):
(Json::BuiltStyledStreamWriter::writeIndent):
(Json::BuiltStyledStreamWriter::writeWithIndent):
(Json::BuiltStyledStreamWriter::indent):
(Json::BuiltStyledStreamWriter::unindent):
(Json::BuiltStyledStreamWriter::writeCommentBeforeValue):
(Json::BuiltStyledStreamWriter::writeCommentAfterValueOnSameLine):
(Json::BuiltStyledStreamWriter::hasCommentForValue):
(Json::StreamWriter::StreamWriter):
(Json::StreamWriter::~StreamWriter):
(Json::StreamWriter::Factory::~Factory):
(Json::StreamWriterBuilder::StreamWriterBuilder):
(Json::StreamWriterBuilder::~StreamWriterBuilder):
(Json::StreamWriterBuilder::newStreamWriter const):
(Json::getValidWriterKeys):
(Json::StreamWriterBuilder::validate const):
(Json::StreamWriterBuilder::operator[]):
(Json::StreamWriterBuilder::setDefaults):
(Json::writeString):
(Json::operator<<):
* openvr/src/openvr_api_public.cpp: Added.
(vr::VR_GetInitToken):
(vr::VR_InitInternal2):
(vr::VR_InitInternal):
(vr::VR_ShutdownInternal):
(vr::VR_LoadHmdSystemInternal):
(vr::VR_GetGenericInterface):
(vr::VR_IsInterfaceVersionValid):
(vr::VR_IsHmdPresent):
(vr::VR_IsRuntimeInstalled):
(vr::VR_RuntimePath):
(vr::VR_GetVRInitErrorAsSymbol):
(vr::VR_GetVRInitErrorAsEnglishDescription):
(vr::VR_GetStringForHmdError):
* openvr/src/vrcommon/dirtools_public.cpp: Added.
(BCreateDirectoryRecursive):
(BCreateDirectory):
* openvr/src/vrcommon/dirtools_public.h: Added.
* openvr/src/vrcommon/envvartools_public.cpp: Added.
(GetEnvironmentVariable):
(SetEnvironmentVariable):
* openvr/src/vrcommon/envvartools_public.h: Added.
* openvr/src/vrcommon/hmderrors_public.cpp: Added.
(GetEnglishStringForHmdError):
(GetIDForVRInitError):
* openvr/src/vrcommon/hmderrors_public.h: Added.
* openvr/src/vrcommon/pathtools_public.cpp: Added.
(Path_GetExecutablePath):
(Path_GetWorkingDirectory):
(Path_SetWorkingDirectory):
(Path_StripFilename):
(Path_StripDirectory):
(Path_StripExtension):
(Path_GetExtension):
(Path_IsAbsolute):
(Path_MakeAbsolute):
(Path_FixSlashes):
(Path_GetSlash):
(Path_Join):
(Path_RemoveTrailingSlash):
(Path_Compact):
(Path_GetThisModulePath):
(Path_IsDirectory):
(Path_IsAppBundle):
(Path_Exists):
(Path_FindParentDirectoryRecursively):
(Path_FindParentSubDirectoryRecursively):
(Path_ReadBinaryFile):
(Path_WriteBinaryFile):
(Path_ReadTextFile):
(Path_WriteStringToTextFile):
(Path_WriteStringToTextFileAtomic):
(Path_FilePathToUrl):
(Path_UrlToFilePath):
(GetUserDocumentsPath):
* openvr/src/vrcommon/pathtools_public.h: Added.
* openvr/src/vrcommon/sharedlibtools_public.cpp: Added.
(SharedLib_Load):
(SharedLib_GetFunction):
(SharedLib_Unload):
* openvr/src/vrcommon/sharedlibtools_public.h: Added.
* openvr/src/vrcommon/strtools_public.cpp: Added.
(StringHasPrefix):
(StringHasPrefixCaseSensitive):
(StringHasSuffix):
(StringHasSuffixCaseSensitive):
(UTF16to8):
(UTF8to16):
(strcpy_safe):
(StringToUpper):
(StringToLower):
(ReturnStdString):
(BufferToStdString):
(Uint64ToString):
(StringToUint64):
(cIntToHexDigit):
(iHexCharToInt):
(V_URLEncodeInternal):
(V_URLDecodeInternal):
(V_URLEncode):
(V_URLDecode):
(V_StripExtension):
* openvr/src/vrcommon/strtools_public.h: Added.
(stricmp):
(strnicmp):
(wcsncpy_s):
(strncpy_s):
(strtoull):
* openvr/src/vrcommon/vrpathregistry_public.cpp: Added.
(GetAppSettingsPath):
(CVRPathRegistry_Public::CVRPathRegistry_Public):
(CVRPathRegistry_Public::GetOpenVRConfigPath):
(CVRPathRegistry_Public::GetVRPathRegistryFilename):
(ParseStringListFromJson):
(StringListToJson):
(CVRPathRegistry_Public::ToJsonString):
(CVRPathRegistry_Public::BLoadFromFile):
(CVRPathRegistry_Public::BSaveToFile const):
(CVRPathRegistry_Public::GetRuntimePath const):
(CVRPathRegistry_Public::GetConfigPath const):
(CVRPathRegistry_Public::GetLogPath const):
(CVRPathRegistry_Public::GetPaths):
* openvr/src/vrcommon/vrpathregistry_public.h: Added.

Source/WebCore:

Added build dependencies with the OpenVR library.

* CMakeLists.txt:

Tools:

* Scripts/webkitpy/style/checker.py: Added openvr to the list of third party libraries
with reduced style checks.

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

20 months agoUse basic-gestures.js for fixed-inside-overflow-inside-iframe.html
fred.wang@free.fr [Wed, 24 Jan 2018 14:18:31 +0000 (14:18 +0000)]
Use basic-gestures.js for fixed-inside-overflow-inside-iframe.html
https://bugs.webkit.org/show_bug.cgi?id=182041

Patch by Frederic Wang <fwang@igalia.com> on 2018-01-24
Reviewed by Antonio Gomes.

* fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html: Insert basic-gestures.js,
remove definition of getSwipeUIScript(), make runTest() async and use functions from
basic-gestures.js

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

20 months agoRemove unneeded -expected.txt files for reftest
rego@igalia.com [Wed, 24 Jan 2018 09:28:07 +0000 (09:28 +0000)]
Remove unneeded -expected.txt files for reftest

Unreviewed gardening.

The test fast/multicol/pagination/RightToLeft-max-width.html was converted
into a reftest in r217943, however expectations for GTK+ and Win port were not removed.

* platform/gtk/fast/multicol/pagination/RightToLeft-max-width-expected.txt: Removed.
* platform/win/fast/multicol/pagination/RightToLeft-max-width-expected.txt: Removed.

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

20 months agoAdd Chris Nardi to contributors list
antti@apple.com [Wed, 24 Jan 2018 09:20:43 +0000 (09:20 +0000)]
Add Chris Nardi to contributors list
https://bugs.webkit.org/show_bug.cgi?id=182029

Patch by Chris Nardi <cnardi@chromium.org> on 2018-01-24
Reviewed by Antti Koivisto.

* Scripts/webkitpy/common/config/contributors.json:

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

20 months agoUnreviewed, another attempt to fix the Windows build after r227479.
wenson_hsieh@apple.com [Wed, 24 Jan 2018 09:17:30 +0000 (09:17 +0000)]
Unreviewed, another attempt to fix the Windows build after r227479.

* WebFrame.cpp:
(WebFrame::elementWithName):

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

20 months agoUnreviewed, try to fix the Windows build after r227479.
wenson_hsieh@apple.com [Wed, 24 Jan 2018 09:01:00 +0000 (09:01 +0000)]
Unreviewed, try to fix the Windows build after r227479.

Tweak some Windows WebKitLegacy code to use updated HTMLFormElement methods.

* WebFrame.cpp:
(WebFrame::elementWithName):
(WebFrame::controlsInForm):

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

20 months agoHarden against layout passes triggered when iterating through HTMLFormElement::associ...
wenson_hsieh@apple.com [Wed, 24 Jan 2018 08:19:16 +0000 (08:19 +0000)]
Harden against layout passes triggered when iterating through HTMLFormElement::associatedElements
https://bugs.webkit.org/show_bug.cgi?id=182037
<rdar://problem/36747812>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Observe that HTMLFormElement::associatedElements returns a const reference to a Vector of raw
FormAssociatedElement pointers. In various call sites that iterate through these associated elements using this
function, some require synchronous layout updates per iteration, which can lead to a bad time when combined with
the first observation.

To address this, we introduce HTMLFormElement::copyAssociatedElementsVector. This returns a new vector
containing strong Refs to each associated element. From each call site that may trigger synchronous layout and
execute arbitrary script while iterating over associated form elements, we instead use iterate over protected
FormAssociatedElements.

From each call site that currently doesn't (and shouldn't) require a layout update, we use the old version that
returns a list of raw FormAssociatedElement pointers, but add ScriptDisallowedScopes to ensure that we never
execute script there in the future.

Test: fast/forms/form-data-associated-element-iteration.html

* html/DOMFormData.cpp:
(WebCore::DOMFormData::DOMFormData):

Change to use copyAssociatedElementsVector().

* html/FormController.cpp:
(WebCore::recordFormStructure):
(WebCore::FormController::restoreControlStateIn):

Change to use copyAssociatedElementsVector().

* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::copyAssociatedElementsVector const):
(WebCore:: const):
(WebCore::HTMLFieldSetElement::length const):

Refactor to use unsafeAssociatedElements().

* html/HTMLFieldSetElement.h:
* html/HTMLFormControlsCollection.cpp:
(WebCore:: const):
(WebCore::HTMLFormControlsCollection::copyFormControlElementsVector const):
(WebCore::HTMLFormControlsCollection::customElementAfter const):
(WebCore::HTMLFormControlsCollection::updateNamedElementCache const):

Refactor these to use unsafeAssociatedElements().

* html/HTMLFormControlsCollection.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::unsafeAssociatedElements const):
(WebCore::HTMLFormElement::copyAssociatedElementsVector const):
* html/HTMLFormElement.h:
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):

Refactor to use copyAssociatedElementsVector().

Source/WebKitLegacy/mac:

Rename associatedElements() to unsafeAssociatedElements(), and add ScriptDisallowedScopes. See WebCore ChangeLog
for more details.

* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation elementWithName:inForm:]):
(-[WebHTMLRepresentation controlsInForm:]):

LayoutTests:

Add a new layout test covering these hardening changes. See WebCore ChangeLog for more details.

* fast/forms/form-data-associated-element-iteration-expected.txt: Added.
* fast/forms/form-data-associated-element-iteration.html: Added.

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

20 months agoUnreviewed, suppress GCC warnings
utatane.tea@gmail.com [Wed, 24 Jan 2018 07:04:06 +0000 (07:04 +0000)]
Unreviewed, suppress GCC warnings
https://bugs.webkit.org/show_bug.cgi?id=181976

* runtime/TypedArrayType.h:

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

20 months agoImport WPT for modules
utatane.tea@gmail.com [Wed, 24 Jan 2018 04:59:24 +0000 (04:59 +0000)]
Import WPT for modules
https://bugs.webkit.org/show_bug.cgi?id=181981

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

This patch just imports WPT for modules mechanically.

* resources/import-expectations.json:
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/bad-module-specifier.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-01-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-01.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-02-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-02.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-03-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/charset-03.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/compilation-error-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/credentials.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-common.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-different.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-missingheader.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-same.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-import-wrongheader.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-different.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-missingheader.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-same.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-root-wrongheader.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin-scripterror.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/crossorigin.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentScript-null-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentScript-null.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/currentscript.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/custom-element-exception-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/custom-element-exception.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access-a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-tdz-access.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable-a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/cycle-unresolvable.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-fetch-error.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/inline-event-handler-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/inline-event-handler.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-classic-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-classic.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-module-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external-module.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-external.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-classic-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-classic.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-module-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-module.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-classic-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-classic.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-module-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-base-url-module.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-classic-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-classic.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-module-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/string-compilation-module.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/w3c-import.log: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/error-and-slow-dependency.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-common.js: Added.
(errorHandler):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependent.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-dependentmultiple.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-parseerror-root.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype-import.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling-wrongMimetype.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/errorhandling.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-3-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-3.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-4-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/evaluation-error-4.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered2.js: Added.
(test_dynamicOrdered.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered3.js: Added.
(test_dynamicOrdered.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicordered4.js: Added.
(test_dynamicOrdered.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered1.js: Added.
(test_dynamicUnordered1.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-dynamicunordered2.js: Added.
(test_dynamicUnordered2.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered2.js: Added.
(test_parsedOrdered.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedordered4.js: Added.
(test_parsedOrdered.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered1.js: Added.
(test_parsedUnordered1.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder-parsedunordered2.js: Added.
(test_parsedUnordered2.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/execorder.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something-nested.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/export-something.js: Added.
(export.set_foo):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/fetch-error-2.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-something-namespace.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-subgraph-404-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-subgraph-404.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle-b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-cycle.js: Added.
(test_importCycle.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-ab.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-inc-b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self-inner.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports-self.js: Added.
(test_importSelf.step):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/imports.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-1.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-3-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-3.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4c.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-4d.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5c.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5d.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-5e.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6c.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-6d.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7c.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7d.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7e.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-7f.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/instantiation-error-8.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches-inner.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-matches.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches-inner.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity-mismatches.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/integrity.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-namespace-request-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-namespace-request.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-star-export-request-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/late-star-export-request.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events-inline-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events-inline.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/load-error-events.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export-nested.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/missing-export.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-in-xhtml.xhtml: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/module-vs-script-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/nested-missing-export.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/nomodule-attribute-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/nomodule-attribute.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/404-but-js.asis: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/500-but-js.asis: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/check-cookie.py: Added.
(main):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/credentials-iframe.sub.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/delayed-modulescript.py: Added.
(main):
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8-with-charset-header.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-non-utf8.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8-with-charset-header.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/import-utf8.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-404-but-js.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-500-but-js.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/imports-b-cross-origin.sub.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/resources/w3c-import.log: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/script-for-event-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/script-for-event.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/set-currentScript-on-window.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/single-evaluation-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-cycle-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-cycle.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-a.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/slow-module-graph-b.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror-nested.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/syntaxerror.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/this-nested.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/this.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-error.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw-nested.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/throw.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/module/w3c-import.log: Added.

LayoutTests:

* TestExpectations:

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

20 months ago[YARR] Add diagnosis for YarrJIT failures
utatane.tea@gmail.com [Wed, 24 Jan 2018 04:51:08 +0000 (04:51 +0000)]
[YARR] Add diagnosis for YarrJIT failures
https://bugs.webkit.org/show_bug.cgi?id=181927

Reviewed by Sam Weinig.

It is nice if we can see the reason why YarrJIT fails to compile a given pattern.
This patch introduces Yarr::JITFailureReason and dumps messages if Options::dumpCompiledRegExpPatterns is specified.

* runtime/RegExp.cpp:
(JSC::RegExp::compile):
(JSC::RegExp::compileMatchOnly):
* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generateTerm):
(JSC::Yarr::YarrGenerator::backtrackTerm):
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
(JSC::Yarr::YarrGenerator::YarrGenerator):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::dumpCompileFailure):
(JSC::Yarr::jitCompile):
* yarr/YarrJIT.h:
(JSC::Yarr::YarrCodeBlock::setFallBack):
(JSC::Yarr::YarrCodeBlock::fallBack):
(JSC::Yarr::YarrCodeBlock::clear):
(JSC::Yarr::YarrCodeBlock::YarrCodeBlock): Deleted.
(JSC::Yarr::YarrCodeBlock::~YarrCodeBlock): Deleted.
(JSC::Yarr::YarrCodeBlock::isFallBack): Deleted.

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

20 months agoAdd more module scope related tests with code evaluation by string
utatane.tea@gmail.com [Wed, 24 Jan 2018 04:35:18 +0000 (04:35 +0000)]
Add more module scope related tests with code evaluation by string
https://bugs.webkit.org/show_bug.cgi?id=181983

Reviewed by Sam Weinig.

JSTests:

Add more module scope related tests. When the original tests are landed,
we do not have browser integration. This patch adds more module scope tests
with dynamically created script evaluation. We add tests with Function
constructor, direct eval, indirect eval, setTimeout, setInterval, and event handlers.

* modules/scopes-eval.js: Added.
(shouldBe):
* modules/scopes.js:
(shouldBe):

LayoutTests:

* js/dom/modules/module-scope-event-handler-expected.txt: Added.
* js/dom/modules/module-scope-event-handler.html: Added.
* js/dom/modules/module-scope-set-interval-expected.txt: Added.
* js/dom/modules/module-scope-set-interval.html: Added.
* js/dom/modules/module-scope-set-timeout-expected.txt: Added.
* js/dom/modules/module-scope-set-timeout.html: Added.

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

20 months agoRemove pre-Sierra-OS-specific code in WTF and JavaScriptCore
achristensen@apple.com [Wed, 24 Jan 2018 02:27:56 +0000 (02:27 +0000)]
Remove pre-Sierra-OS-specific code in WTF and JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=182028

Reviewed by Keith Miller.

Source/JavaScriptCore:

* inspector/remote/cocoa/RemoteInspectorXPCConnection.h:
* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::handleEvent):

Source/WTF:

* wtf/Platform.h:
* wtf/mac/AppKitCompatibilityDeclarations.h:
* wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
(WTF::MainThreadFunctionTracker::singleton): Deleted.
(WTF::MainThreadFunctionTracker::callOnMainThread): Deleted.
(WTF::MainThreadFunctionTracker::cancelCallOnMainThread): Deleted.
(WTF::MainThreadFunctionTracker::addFunction): Deleted.
(WTF::MainThreadFunctionTracker::removeIdentifier): Deleted.
(WTF::MainThreadFunctionTracker::removeFunctions): Deleted.
(WTF::callOnMainThread): Deleted.
(WTF::cancelCallOnMainThread): Deleted.
* wtf/spi/cocoa/SecuritySPI.h:
* wtf/spi/darwin/dyldSPI.h:
* wtf/text/icu/TextBreakIteratorICU.h:
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::caretRules): Deleted.

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

20 months ago[Curl] Fix wrong redirection with relative url when it happens from
commit-queue@webkit.org [Wed, 24 Jan 2018 01:08:29 +0000 (01:08 +0000)]
[Curl] Fix wrong redirection with relative url when it happens from
different host than original host.
https://bugs.webkit.org/show_bug.cgi?id=181873

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

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::willSendRequest):
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::willSendRequest):

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

20 months agoMarked http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies...
jlewis3@apple.com [Wed, 24 Jan 2018 01:07:31 +0000 (01:07 +0000)]
Marked http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181958

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

20 months agoWeb Inspector: Network's columns shake when scrolling at non-default zoom level
commit-queue@webkit.org [Wed, 24 Jan 2018 00:46:39 +0000 (00:46 +0000)]
Web Inspector: Network's columns shake when scrolling at non-default zoom level
https://bugs.webkit.org/show_bug.cgi?id=181998
<rdar://problem/36449808>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-23
Reviewed by Matt Baker.

* UserInterface/Views/Table.js:
When zoomed the bounding client rect values were fractional, which was
unexpected by this area of code. Floor the values to get a value we expect
to be able to evenly distribute.

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

20 months agoUse precise index masking for FTL GetByArgumentByVal
fpizlo@apple.com [Wed, 24 Jan 2018 00:40:12 +0000 (00:40 +0000)]
Use precise index masking for FTL GetByArgumentByVal
https://bugs.webkit.org/show_bug.cgi?id=182006

Reviewed by Keith Miller.

This protects speculative out-of-bounds on arguments[index].

Making this work right involved fixing a possible overflow situation with
numberOfArgumentsToSkip.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::findArgumentPositionForLocal):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasNumberOfArgumentsToSkip):
(JSC::DFG::Node::numberOfArgumentsToSkip):
* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetMyArgumentByVal):

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

20 months agoMarked fast/visual-viewport/ios/caret-after-focus-in-fixed.html as flaky
jlewis3@apple.com [Wed, 24 Jan 2018 00:31:03 +0000 (00:31 +0000)]
Marked fast/visual-viewport/ios/caret-after-focus-in-fixed.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=181821

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

20 months agoMac Sierra perf bots have been failing due to CG errors
rniwa@webkit.org [Wed, 24 Jan 2018 00:30:06 +0000 (00:30 +0000)]
Mac Sierra perf bots have been failing due to CG errors
https://bugs.webkit.org/show_bug.cgi?id=181955

Reviewed by Antti Koivisto.

Ignore the CoreGraphics error messages on macOS Sierra.

Also added tests for ignoring lines in stdout and stderr.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest.run_failed): Refactored for clarity.
(PerfTest):
(PerfTest.filter_ignored_lines): Added.
(PerfTest._lines_to_ignore): Renamed from _lines_to_ignore_in_parser_result since these regular expressions
are now used to ignore lines in other kinds of tests than parser tests.
(PerfTest._errors_to_ignore_in_sierra): Added.
(PerfTest._filter_output): Added the code to ignore errors only on macOS Sierra.
* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(test_parse_output_with_ignored_stdout): Added.
(test_parse_output_with_ignored_stderr): Added.
(test_parse_output_with_ignored_stderr.MockPortWithSierraName): Added.

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

20 months agoResign NowPlaying status when no media element is eligible
eric.carlson@apple.com [Tue, 23 Jan 2018 23:34:06 +0000 (23:34 +0000)]
Resign NowPlaying status when no media element is eligible
https://bugs.webkit.org/show_bug.cgi?id=181914
<rdar://problem/35294116>

Reviewed by Jer Noble.

Source/WebCore:

Updated API test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removedFromAncestor): Call mediaSession->clientCharacteristicsChanged
so NowPlaying status will be updated.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted const): Return early when the media
element has been suspended.
(WebCore::MediaElementSession::canShowControlsManager const): Return false when being queried
for NowPlaying status in an inactive document or when element has been suspended.
(WebCore::isMainContentForPurposesOfAutoplay): Return early if it isn't safe to update
style because HitTest can force a layout.
(WebCore::MediaElementSession::updateIsMainContent const): Ditto.

* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Implement in for all
ports.
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::registeredAsNowPlayingApplication const):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/mac/MediaSessionManagerMac.h:
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Call MRMediaRemoteSetCanBeNowPlayingApplication
whenever status changes.
(WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Deleted, implemented
in the base class.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _requestActiveNowPlayingSessionInfo:]): Return registeredAsNowPlayingApplication
status.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::nowPlayingInfoCallback): Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo): Ditto.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView hasActiveNowPlayingSession]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/large-video-test-now-playing.html:

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

20 months agoSkipped fast/events/message-port.html on macOS
jlewis3@apple.com [Tue, 23 Jan 2018 23:25:19 +0000 (23:25 +0000)]
Skipped fast/events/message-port.html on macOS
https://bugs.webkit.org/show_bug.cgi?id=181969

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

20 months agoUse CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
achristensen@apple.com [Tue, 23 Jan 2018 23:22:19 +0000 (23:22 +0000)]
Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
https://bugs.webkit.org/show_bug.cgi?id=181961

Reviewed by Michael Catanzaro.

Source/WebCore:

No change in behavior.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveResponseAsync):
* loader/ResourceLoader.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponseAsync):
* loader/appcache/ApplicationCacheGroup.h:
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
(WebCore::BlobResourceHandle::notifyResponseOnError):
(WebCore::BlobResourceHandle::continueDidReceiveResponse): Deleted.
* platform/network/BlobResourceHandle.h:
* platform/network/PingHandle.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::didReceiveResponse):
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.h:
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::didReceiveResponseAsync):
* platform/network/SynchronousLoaderClient.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueDidReceiveResponse): Deleted.
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::handleDataURL):
(WebCore::ResourceHandleCurlDelegate::continueDidReceiveResponse): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]): Deleted.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::nextMultipartResponsePartCallback):
(WebCore::sendRequestCallback):
(WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.

Source/WebKit:

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkResourceLoadParameters.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/WebProcess.cpp:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.cpp:

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:

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

20 months agoMarked media/W3C/audio/events/event_progress.html and media/W3C/video/events/event_or...
jlewis3@apple.com [Tue, 23 Jan 2018 23:21:32 +0000 (23:21 +0000)]
Marked media/W3C/audio/events/event_progress.html and media/W3C/video/events/event_order_loadstart_progress.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181966

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

20 months agoFollow-up for: oss-fuzz jsc build is broken: StringImpl.h:27:10: fatal error: 'unicod...
ddkilzer@apple.com [Tue, 23 Jan 2018 23:19:02 +0000 (23:19 +0000)]
Follow-up for: oss-fuzz jsc build is broken: StringImpl.h:27:10: fatal error: 'unicode/ustring.h' file not found
<https://webkit.org/b/181871>
<rdar://problem/36669691>

Address feedback for this change.

* CMakeLists.txt: Change "SYSTEM PUBLIC" to "SYSTEM PRIVATE" per
feedback from Konstantin Tokarev.

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

20 months agoUnreviewed, rollout r227216 as it seems to be causing deadlocks
cdumez@apple.com [Tue, 23 Jan 2018 23:15:39 +0000 (23:15 +0000)]
Unreviewed, rollout r227216 as it seems to be causing deadlocks
https://bugs.webkit.org/show_bug.cgi?id=182013

Source/WebCore:

* page/ChromeClient.h:
* testing/Internals.cpp:
(WebCore::Internals::testIncomingSyncIPCMessageWhileWaitingForSyncReply): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:
(IPC::Connection::setShouldProcessIncomingMessagesWhileWaitingForSyncReply): Deleted.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::testIncomingSyncIPCMessageWhileWaitingForSyncReply): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::NetworkProcessConnection):
* WebProcess/Storage/WebToStorageProcessConnection.cpp:
(WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::testIncomingSyncIPCMessageWhileWaitingForSyncReply): Deleted.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::undo):
(WebKit::WebEditorClient::redo):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::syncIPCMessageWhileWaitingForSyncReplyForTesting): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

LayoutTests:

* fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply-expected.txt: Removed.
* fast/misc/testIncomingSyncIPCMessageWhileWaitingForSyncReply.html: Removed.

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

20 months agoMarked http/tests/misc/resource-timing-resolution.html as flaky.
jlewis3@apple.com [Tue, 23 Jan 2018 23:14:20 +0000 (23:14 +0000)]
Marked http/tests/misc/resource-timing-resolution.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181957

Unreviewed test gardening.

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

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

20 months agoREGRESSION (r226622): ASSERTION FAILED: !m_frame in WebCore::DOMWindowProperty::willD...
commit-queue@webkit.org [Tue, 23 Jan 2018 23:14:15 +0000 (23:14 +0000)]
REGRESSION (r226622): ASSERTION FAILED: !m_frame in WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame()
https://bugs.webkit.org/show_bug.cgi?id=181756

Patch by Ali Juma <ajuma@chromium.org> on 2018-01-23
Reviewed by Simon Fraser.

Don't create a VisualViewport for a suspended DOMWindow. When a DOMWindow is suspended
for document suspension, all DOMWindowProperties are disconnected from their frame.
Creating a new VisualViewport while in this state means unexpectedly having a DOMWindowProperty
that's connected to a frame, and this leads to an assertion failure.

Test: http/tests/navigation/https-in-page-cache.html

* page/DOMWindow.cpp:
(WebCore::DOMWindow::visualViewport const):
Don't create a VisualViewport while suspended.
* page/FrameView.cpp:
(WebCore::FrameView::updateLayoutViewport):
Handle null DOMWindow::visualViewport.

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

20 months ago[Curl] CurlRequest must protect its client from disposal while it's on duty.
commit-queue@webkit.org [Tue, 23 Jan 2018 22:30:39 +0000 (22:30 +0000)]
[Curl] CurlRequest must protect its client from disposal while it's on duty.
https://bugs.webkit.org/show_bug.cgi?id=181875

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

No new tests. It's covered by existing tests.

* platform/network/curl/CurlDownload.h:
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::callClient):
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::didReceiveDataFromMultipart):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::invokeDidReceiveResponse):
* platform/network/curl/CurlRequest.h:
* platform/network/curl/CurlRequestClient.h:
* platform/network/curl/ResourceHandleCurlDelegate.h:

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

20 months ago[WinCairo] Use 64-bit toolset
commit-queue@webkit.org [Tue, 23 Jan 2018 22:14:41 +0000 (22:14 +0000)]
[WinCairo] Use 64-bit toolset
https://bugs.webkit.org/show_bug.cgi?id=181979

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2018-01-23
Reviewed by Alex Christensen.

Use 64-bit toolset for 64-bit build in order to improve build time.

* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):

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

20 months agoUnreviewed, rolling out r227437.
commit-queue@webkit.org [Tue, 23 Jan 2018 21:42:51 +0000 (21:42 +0000)]
Unreviewed, rolling out r227437.
https://bugs.webkit.org/show_bug.cgi?id=182011

broke build (Requested by alexchristensen on #webkit).

Reverted changeset:

"Remove unused QTKit preference"
https://bugs.webkit.org/show_bug.cgi?id=181968
https://trac.webkit.org/changeset/227437

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

20 months ago[Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties
graouts@webkit.org [Tue, 23 Jan 2018 21:40:44 +0000 (21:40 +0000)]
[Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties
https://bugs.webkit.org/show_bug.cgi?id=181978

Not reviewed.

Fix failures for http/wpt/web-animations/interfaces/AnimationEffectTiming/easing.html introduced in the previous patch.
Those keyword values are not expected.

* platform/animation/TimingFunction.cpp:
(WebCore::TimingFunction::cssText const):

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

20 months agofeMorphology stops applying if either x or y radius is 0 but should not.
simon.fraser@apple.com [Tue, 23 Jan 2018 21:39:12 +0000 (21:39 +0000)]
feMorphology stops applying if either x or y radius is 0 but should not.
https://bugs.webkit.org/show_bug.cgi?id=181903

Reviewed by Dean Jackson.
Source/WebCore:

feMorphology should allow the radius on one axis to be zero but still apply the effect
(it's akin to a blur on just one axis). Also, any negative radius, or zero on both axes
should act like a pass-through, rather than outputting transparent blank (this is a spec
change from SVG 1.1 to SVG 2).

Tests: svg/filters/feMorphology-zero-radius-one-axis-expected.svg
       svg/filters/feMorphology-zero-radius-one-axis.svg

* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyDegenerate):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::createImageBufferResult):

LayoutTests:

* svg/filters/feMorphology-zero-radius-one-axis-expected.svg: Added.
* svg/filters/feMorphology-zero-radius-one-axis.svg: Added.

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

20 months agoRemove unused MediaPlayerSupportsTypeClient
achristensen@apple.com [Tue, 23 Jan 2018 21:33:35 +0000 (21:33 +0000)]
Remove unused MediaPlayerSupportsTypeClient
https://bugs.webkit.org/show_bug.cgi?id=182003

Reviewed by Sam Weinig.

This was used for a QTKit-specific hack I removed in r227372.

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::isTypeSupported):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
(WebCore::DOMImplementationSupportsTypeClient::DOMImplementationSupportsTypeClient): Deleted.
(): Deleted.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType const):
(WebCore::HTMLMediaElement::selectNextSourceChild):
(WebCore::HTMLMediaElement::mediaPlayerNeedsSiteSpecificHacks const): Deleted.
(WebCore::HTMLMediaElement::mediaPlayerDocumentHost const): Deleted.
* html/HTMLMediaElement.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::supportsType):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerSupportsTypeClient::mediaPlayerNeedsSiteSpecificHacks const): Deleted.
(WebCore::MediaPlayerSupportsTypeClient::mediaPlayerDocumentHost const): Deleted.

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

20 months agoRemove compile guard around beacon API
achristensen@apple.com [Tue, 23 Jan 2018 21:32:39 +0000 (21:32 +0000)]
Remove compile guard around beacon API
https://bugs.webkit.org/show_bug.cgi?id=182002

Reviewed by Sam Weinig.

It's enabled everywhere now.

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetBeaconAPIEnabled):
(WKPreferencesGetBeaconAPIEnabled):
* config.h:

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

20 months agoRemove unused QTKit preference
achristensen@apple.com [Tue, 23 Jan 2018 21:06:39 +0000 (21:06 +0000)]
Remove unused QTKit preference
https://bugs.webkit.org/show_bug.cgi?id=181968

Reviewed by Alexey Proskuryakov.

Source/WebCore:

They weren't used and didn't do anything.

* page/DeprecatedGlobalSettings.cpp:
(WebCore::DeprecatedGlobalSettings::setQTKitEnabled): Deleted.
* page/DeprecatedGlobalSettings.h:
(WebCore::DeprecatedGlobalSettings::isQTKitEnabled): Deleted.

Source/WebKit:

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetQTKitEnabled):
(WKPreferencesGetQTKitEnabled):
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetQTKitEnabled): Deleted.
(WKPreferencesGetQTKitEnabled): Deleted.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setQTKitEnabled:]): Deleted.
(-[WKPreferences _qtKitEnabled]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setQTKitEnabled:]): Deleted.
(-[WebPreferences isQTKitEnabled]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

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

20 months ago[macOS] WebProcess needs TCC entitlements for media capture
bfulgham@apple.com [Tue, 23 Jan 2018 20:50:50 +0000 (20:50 +0000)]
[macOS] WebProcess needs TCC entitlements for media capture
https://bugs.webkit.org/show_bug.cgi?id=181995
<rdar://problem/36674649>

Reviewed by Eric Carlson.

* Configurations/WebContent-OSX.entitlements: Add delegated services needed to support media
capture features.

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

20 months agoRollout r219636
rmorisset@apple.com [Tue, 23 Jan 2018 20:49:26 +0000 (20:49 +0000)]
Rollout r219636
https://bugs.webkit.org/show_bug.cgi?id=181997
<rdar://problem/35883022>

Unreviewed, as it is a rollout.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
* runtime/JSArray.cpp:
(JSC::JSArray::tryCreateUninitializedRestricted):
* runtime/JSArray.h:
(JSC::JSArray::tryCreate):
* runtime/JSObject.cpp:
(JSC::JSObject::ensureLengthSlow):

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

20 months agoRe-arrange TypedArray JSTypes to match the order of the TypedArrayType enum list.
mark.lam@apple.com [Tue, 23 Jan 2018 20:39:34 +0000 (20:39 +0000)]
Re-arrange TypedArray JSTypes to match the order of the TypedArrayType enum list.
https://bugs.webkit.org/show_bug.cgi?id=181976
<rdar://problem/36766936>

Reviewed by Filip Pizlo.

1. The order of TypedArray JSTypes now matches the order the TypedArrayType enum
   list.  I also added static asserts in TypedArrayType.h to enforce this.

   Also redefined FOR_EACH_TYPED_ARRAY_TYPE() in terms of

2. Define 4 new values:
   a. FirstTypedArrayType
   b. LastTypedArrayType
   c. NumberOfTypedArrayTypesExcludingDataView
   d. NumberOfTypedArrayTypes

   Use these everywhere where we iterate or bisect the TypedArray JSTypes.

3. Removed NUMBER_OF_TYPED_ARRAY_TYPES, and use NumberOfTypedArrayTypes instead.

4. Simplify the code that converts between TypedArrayType and JSType.

   Changed typedArrayTypeForType() to be the mirror image of typeForTypedArrayType().
   Previously, typedArrayTypeForType() converts DataViewType to NotTypedArray
   instead of TypeDataView.  Now, it converts to TypeDataView.

   This does not result in any change of behavior because typedArrayTypeForType()
   is only called in Structure::hasIndexingHeader(), and its result is passed to
   isTypedView(), which handles TypeDataView correctly.

5. Also fixed a bug in SpeculativeJIT::compileGetTypedArrayByteOffset().
   If the vector is null, we can skip the rest of the checks.  While the current
   code does not result in incorrect behavior, it is inefficient, and communicates
   wrong information to the reader i.e. implying that there's something in the
   dataGPR when there's not.  The dataGPR should also be null in this case.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileIsTypedArrayView):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::isTypedArrayView):
* ftl/FTLOSRExit.cpp:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildren):
* runtime/JSType.h:
* runtime/TypedArrayType.cpp:
(JSC::typeForTypedArrayType): Deleted.
* runtime/TypedArrayType.h:
(JSC::typedArrayTypeForType):
(JSC::typeForTypedArrayType):

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

20 months ago[Cocoa] Disable header postprocessing when building for macOS High Sierra
mitz@apple.com [Tue, 23 Jan 2018 20:32:18 +0000 (20:32 +0000)]
[Cocoa] Disable header postprocessing when building for macOS High Sierra
https://bugs.webkit.org/show_bug.cgi?id=181972

Reviewed by Anders Carlsson.

* Configurations/WebKit.xcconfig: Adopt macOSTargetConditionals.xcconfig helpers and disable postprocessing
  when building for macOS 10.13.

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

20 months ago[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
jfernandez@igalia.com [Tue, 23 Jan 2018 20:30:21 +0000 (20:30 +0000)]
[css-align] 'left' and 'right' should parse as invalid in block/cross-axis alignment
https://bugs.webkit.org/show_bug.cgi?id=181792

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Imported new Web Platform Tests for the css-align module.

* resources/import-expectations.json:
* web-platform-tests/css/css-align-3/content-distribution/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/default-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align-3/resources/alignment-parsing-utils.js: Removed.
* web-platform-tests/css/css-align-3/self-alignment/w3c-import.log: Removed.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005-expected.txt: Added.
* web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html: Added.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-001.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-002.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-003.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-004.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-005.html.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/content-distribution/place-content-shorthand-006.html.
* web-platform-tests/css/css-align/content-distribution/w3c-import.log: Added.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/justify-items-legacy-001.html.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006-expected.txt: Added.
* web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html: Added.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-001.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-002.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-003.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-004.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-005.html.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/default-alignment/place-items-shorthand-006.html.
* web-platform-tests/css/css-align/default-alignment/w3c-import.log: Added.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001-expected.xht: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001-expected.xht.
* web-platform-tests/css/css-align/distribution-values/space-evenly-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/space-evenly-001.html.
* web-platform-tests/css/css-align/distribution-values/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/distribution-values/w3c-import.log.
* web-platform-tests/css/css-align/resources/alignment-parsing-utils.js: Added.
(checkPlaceShorhand):
(checkPlaceShorhandLonghands):
(checkPlaceShorthandInvalidValues):
(checkValues):
(checkBadValues):
(checkInitialValues):
(checkInheritValues):
(checkLegacyValues):
(checkSupportedValues):
* web-platform-tests/css/css-align/resources/w3c-import.log: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/resources/w3c-import.log.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005-expected.txt: Added.
* web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html: Added.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-001.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-002.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-003.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-004.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-005.html.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006-expected.txt.
* web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-align-3/self-alignment/place-self-shorthand-006.html.
* web-platform-tests/css/css-align/self-alignment/w3c-import.log: Added.

Source/WebCore:

The CSS WG resolved to remove the 'left' and 'right' values from the
block/cross axis alignment properties.

https://github.com/w3c/csswg-drafts/issues/1403

This patch changes the CSS parsing logic of all the CSS Box Alignment
properties, both block-axis (align-{self, items, content} and
inline-axis (justify-{self, items, content}).

Additionally, the alignment shorthands (place-{self, items, content})
have been also changed to respect the new syntax.

Despite the number of layout tests changed, I don't think this
change will break any content in current sites. The CSS values
'left' and 'right' were introduced by the new CSS Box Alignment
spec and only implemented by the CSS Grid Layout feature, shipped
last year. Additionally, the removed values have no effect on the
layout result when they are applied to the block/cross-axis CSS
Alignment properties.

Tests: imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-001.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-002.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-003.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-004.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-align-content-005.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-001.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-002.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-003.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-004.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/parse-justify-content-005.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-001.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-002.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-003.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-004.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-005.html
       imported/w3c/web-platform-tests/css/css-align/content-distribution/place-content-shorthand-006.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/justify-items-legacy-001.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-001.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-002.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-003.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-004.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-align-items-005.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-001.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-002.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-003.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-004.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-005.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/parse-justify-items-006.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-001.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-002.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-003.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-004.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-005.html
       imported/w3c/web-platform-tests/css/css-align/default-alignment/place-items-shorthand-006.html
       imported/w3c/web-platform-tests/css/css-align/distribution-values/space-evenly-001.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-001.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-002.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-003.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-004.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-align-self-005.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-001.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-002.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-003.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-004.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/parse-justify-self-005.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-001.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-002.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-003.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-004.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-005.html
       imported/w3c/web-platform-tests/css/css-align/self-alignment/place-self-shorthand-006.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::isLeftOrRightKeyword):
(WebCore::isContentPositionKeyword):
(WebCore::isContentPositionOrLeftOrRightKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::isSelfPositionKeyword):
(WebCore::isSelfPositionOrLeftOrRightKeyword):
(WebCore::consumeSelfPositionOverflowPosition):
(WebCore::consumeAlignItems):
(WebCore::consumeJustifyItems):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeSimplifiedContentPosition):
(WebCore::CSSPropertyParser::consumePlaceContentShorthand):
(WebCore::consumeSimplifiedItemPosition):
(WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
(WebCore::CSSPropertyParser::consumePlaceSelfShorthand):

LayoutTests:

Rebaseline tests because of the removal of the 'left' and right' CSS values.

* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self-expected.txt:
* css3/parse-align-self.html:
* css3/parse-alignment-of-root-elements-expected.txt:

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

20 months agoDFG should always flush `this`
fpizlo@apple.com [Tue, 23 Jan 2018 20:16:56 +0000 (20:16 +0000)]
DFG should always flush `this`
https://bugs.webkit.org/show_bug.cgi?id=181999

Reviewed by Saam Barati and Mark Lam.

This is going to make it possible to use precise index masking for arguments-on-the-stack
accesses with an index adjusted so that 0 is this. Without this change, we would have no way
of masking when the argument count is 0, unless we padded the argument area so that there was
always an argument slot after `this` and it was always initialized.

This is neutral on all benchmarks.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::flushImpl):
(JSC::DFG::ByteCodeParser::flushForTerminalImpl):
(JSC::DFG::ByteCodeParser::flush):
(JSC::DFG::ByteCodeParser::flushForTerminal):
(JSC::DFG::ByteCodeParser::parse):
(JSC::DFG::flushImpl): Deleted.
(JSC::DFG::flushForTerminalImpl): Deleted.
* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

20 months agoElement with position:fixed stops scrolling at the bottom of the page, but is painted...
simon.fraser@apple.com [Tue, 23 Jan 2018 20:11:10 +0000 (20:11 +0000)]
Element with position:fixed stops scrolling at the bottom of the page, but is painted in the right place on Chacos.com.
https://bugs.webkit.org/show_bug.cgi?id=181741
rdar://problem/36593581

Reviewed by Tim Horton.
Source/WebCore:

The #ifdef for iOS was wrong; on iOS, visibleSize() is in content coordinates and matches
unscaledDocumentRect, so there's no need to scale it. Doing so computed the wrong unscaledMaximumScrollPosition
which broke hit-testing when the document minimum scale was > 1.

Test: fast/visual-viewport/ios/min-scale-greater-than-one.html

* page/FrameView.cpp:
(WebCore::FrameView::unscaledMaximumScrollPosition const):

Tools:

If zoomToScale:animated: is called with the current zoom level, call the callback
rather than doing nothing.

* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView zoomToScale:animated:completionHandler:]):

LayoutTests:

* fast/visual-viewport/ios/min-scale-greater-than-one-expected.txt: Added.
* fast/visual-viewport/ios/min-scale-greater-than-one.html: Added.

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

20 months agoWeb Inspector: Window resizing is broken after detaching to separate window
commit-queue@webkit.org [Tue, 23 Jan 2018 20:08:36 +0000 (20:08 +0000)]
Web Inspector: Window resizing is broken after detaching to separate window
https://bugs.webkit.org/show_bug.cgi?id=181992
<rdar://problem/36714840>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-23
Reviewed by Brian Burg.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformDetach):
Restore the inspector view's autoresizingMask to the initial value
that works with a detached window. This gets changed when the view
gets attached to bottom/side, so we need to revert it on detaching.

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

20 months ago[Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties
graouts@webkit.org [Tue, 23 Jan 2018 20:03:58 +0000 (20:03 +0000)]
[Web Animations] Expose getKeyframes() and parsing of remaining keyframe properties
https://bugs.webkit.org/show_bug.cgi?id=181978
<rdar://problem/36772586>

Reviewed by Dean Jackson.

Source/WebCore:

We finish our implementation of multiple keyframes by exposing the getKeyframes() method on KeyframeEffect and
parsing the remaining properties that can be exposed on keyframes: "easing" and "composite". And since we parse
those properties on keyframes, we also parse "easing" on AnimationEffectTiming and "composite" and "iterationComposite"
on KeyframeEffect.

To support this, we implement a new TimingFunction::createFromCSSText() method which takes in a string that is
a value provided directly via the JS API. As its converse, we expose a TimingFunction::cssText() method which
provides a string that can be sent back to JS to represent a timing function, using keywords when the timing
function matches one and ommitting default values.

We now also keep track of the original "offset" value provided through the JS API since that value is required
when calling getKeyframes() and distinct from the "computedOffset". These original offsets, composite operations
and timing functions are kept as separate Vectors from the KeyframeList since this type does not support exposing
those. We may consider improving that in a future patch.

Finally, we make some adjustments in the keyframe parsing to comply with the specification and correctly parse
all provided timing functions, regardless of the number of keyframes and timing functions provided.

Note that this patch is only about parsing, storing and returning provided easing and composite operations but
that such values will only be used for the resolution of animation effects in future patches.

* animation/AnimationEffect.cpp:
(WebCore::AnimationEffect::getComputedTiming): Set the "easing" property on the getComputedTiming() return value
now that we expose "easing" on AnimationEffectTiming.
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::AnimationEffectTiming): Create a linear TimingFunction by default.
(WebCore::AnimationEffectTiming::setEasing): Parse the "easing" value and propagate an exception for invalid values.
* animation/AnimationEffectTiming.h: Expose the new "easing" property and backing TimingFunction.
* animation/AnimationEffectTiming.idl: Expose the new "easing" property.
* animation/KeyframeEffect.cpp:
(WebCore::CSSPropertyIDToIDLAttributeName): Provide a way to convert the name of a CSS property to a string that can
be used to generate a JS property name for use by getKeyframes().
(WebCore::computeMissingKeyframeOffsets): Implement the full steps of the spec.
(WebCore::processIterableKeyframes): Fix a problematic declaration for the easing variable.
(WebCore::processPropertyIndexedKeyframes): Now that ProcessedKeyframe has both an offset and a computedOffset, use
computed offsets. We also fix a couple of loops to fix compliance issues revealed by WPT tests.
(WebCore::KeyframeEffect::create): Parse the provided "easing" property on the KeyframeEffectOptions object.
(WebCore::KeyframeEffect::getKeyframes): Implement the getKeyframes() method as mandated by the spec.
(WebCore::KeyframeEffect::processKeyframes): Keep a list of unused easings so these might be parsed as well, and
potentially throw exceptions, as mandated by the spec. For valid easings, store their matching TimingFunction in
m_timingFunctions, original offset values in m_offsets and CompositeOperation values in m_compositeOperations.
* animation/KeyframeEffect.h: Switch the order in which we specify some of the Variant types so that default values
are correctly used.
* animation/KeyframeEffect.idl: Switch the order in which we specify some of the Variant types so that default values
are correctly used.
* platform/animation/TimingFunction.cpp:
(WebCore::TimingFunction::createFromCSSText):
(WebCore::TimingFunction::cssText const):
* platform/animation/TimingFunction.h:

LayoutTests:

Update expectations with progressions and new failure points now we expose more of the API.

* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/composite-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002-expected.txt:
* http/wpt/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

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

20 months agoAdd ignore_errors keyword argument to Executive.run_command() for replacing the commo...
ddkilzer@apple.com [Tue, 23 Jan 2018 19:31:04 +0000 (19:31 +0000)]
Add ignore_errors keyword argument to Executive.run_command() for replacing the common pattern of error_handler usage
https://bugs.webkit.org/show_bug.cgi?id=180820

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-01-23
Reviewed by David Kilzer.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.in_working_directory):
(Git.clone):
(Git.read_git_config):
(Git.apply_reverse_diff):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.run):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVNRepository.has_authorization_for_realm):
* Scripts/webkitpy/common/net/credentials_unittest.py:
* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.run_command):
* Scripts/webkitpy/common/system/executive.py:
(Executive.kill_process.is):
(Executive.running_pids):
(Executive.kill_all):
(Executive.run_command):
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.run_command):
(MockExecutive2.run_command):
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_run_command_with_bad_command.run_bad_command):
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.xcode_sdk_version):
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._check_and_kill):
* Scripts/webkitpy/port/base.py:
(Port._symbols_string):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Scripts/webkitpy/port/win.py:
(WinPort._runtime_feature_list):
(WinPort.read_registry_value):
* Scripts/webkitpy/port/win_unittest.py:
(WinPortTest.test_runtime_feature_list):
* Scripts/webkitpy/tool/commands/analyzechangelog.py:
* Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py:

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

20 months agoMark inspector/unit-tests/throttle.html as flaky.
ryanhaddad@apple.com [Tue, 23 Jan 2018 19:29:48 +0000 (19:29 +0000)]
Mark inspector/unit-tests/throttle.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181832

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

20 months agoAllow passing MessagePorts across processes (e.g. ServiceWorkers).
beidson@apple.com [Tue, 23 Jan 2018 19:24:23 +0000 (19:24 +0000)]
Allow passing MessagePorts across processes (e.g. ServiceWorkers).
https://bugs.webkit.org/show_bug.cgi?id=181178

Reviewed by Andy Estes.

LayoutTests/imported/w3c:

Re-baseline for many new passes and a few new failure modes.

* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event.https-expected.txt:
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/postmessage.https-expected.txt:
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/registration-attribute.https-expected.txt:
* web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/unregister.https-expected.txt:
* web-platform-tests/service-workers/service-worker/claim-affect-other-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/claim-fetch.https-expected.txt:
* web-platform-tests/service-workers/service-worker/claim-not-using-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/claim-using-registration.https-expected.txt:
* web-platform-tests/service-workers/service-worker/claim-worker-fetch.https-expected.txt:
* web-platform-tests/service-workers/service-worker/client-id.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-get-cross-origin.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-get.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall-client-types.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall-exact-controller.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall-order.https-expected.txt:
* web-platform-tests/service-workers/service-worker/clients-matchall.https-expected.txt:
* web-platform-tests/service-workers/service-worker/extendable-event-async-waituntil.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-async-respond-with.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-respond-with-stops-propagation.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-throws-after-respond-with.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-css-base-url.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-css-images.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-fallback.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-no-freshness-headers.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-request-resources.https-expected.txt:
* web-platform-tests/service-workers/service-worker/immutable-prototype-serviceworker.https-expected.txt:
* web-platform-tests/service-workers/service-worker/registration-end-to-end.https-expected.txt:
* web-platform-tests/service-workers/service-worker/registration-events.https-expected.txt:
* web-platform-tests/service-workers/service-worker/skip-waiting-installed.https-expected.txt:

Source/WebCore:

Test: http/tests/workers/service/basic-messageport.html

* dom/MessagePort.cpp:
(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::~MessagePort):

* dom/messageports/MessagePortChannel.cpp:
(WebCore::MessagePortChannel::entanglePortWithProcess):
* dom/messageports/MessagePortChannel.h:

* workers/service/SWClientConnection.cpp:
(WebCore::SWClientConnection::postMessageToServiceWorkerClient):
* workers/service/SWClientConnection.h:

* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::postMessage):

* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::postMessage):

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::postMessageToServiceWorker):
* workers/service/context/SWContextManager.h:

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::postMessageToServiceWorker):
(WebKit::WebSWServerConnection::postMessageToServiceWorkerClient):
* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::postMessageToServiceWorkerClient):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::entangleLocalPortInThisProcessToRemote):
(WebKit::WebProcessProxy::postMessageToRemote):

* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::postMessageToServiceWorker):
(WebKit::WebSWClientConnection::postMessageToServiceWorkerClient):
* WebProcess/Storage/WebSWClientConnection.h:
* WebProcess/Storage/WebSWClientConnection.messages.in:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorker):
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/Storage/WebSWContextManagerConnection.messages.in:

LayoutTests:

* http/tests/workers/service/basic-messageport-expected.txt: Added.
* http/tests/workers/service/basic-messageport.html: Added.
* http/tests/workers/service/resources/basic-messageport.js: Added.
* http/tests/workers/service/resources/messageport-echo-worker.js: Added.

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

20 months agoJSC should use a speculation fence on VM entry/exit
fpizlo@apple.com [Tue, 23 Jan 2018 18:26:35 +0000 (18:26 +0000)]
JSC should use a speculation fence on VM entry/exit
https://bugs.webkit.org/show_bug.cgi?id=181991

Reviewed by JF Bastien and Mark Lam.

Source/JavaScriptCore:

This adds a WTF::speculationFence on VM entry and exit.

For a microbenchmark that just calls a native function (supplied via an Objective-C block) in a
tight loop from JS is a 0% regression on x86 and a 11% regression on ARM64.

* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
(JSC::JSLock::willReleaseLock):

Source/WTF:

Implement speculationFence as lfence on x86 and isb on ARM64. I'm not sure if isb is
appropriate for all ARM64's.

* wtf/Atomics.h:
(WTF::speculationFence):
(WTF::x86_lfence):

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

20 months agoUnskip http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html on Sierra.
ryanhaddad@apple.com [Tue, 23 Jan 2018 18:22:50 +0000 (18:22 +0000)]
Unskip http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=181833

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

20 months agoUnreviewed, rolling out r227279 and r227373.
commit-queue@webkit.org [Tue, 23 Jan 2018 17:52:53 +0000 (17:52 +0000)]
Unreviewed, rolling out r227279 and r227373.
https://bugs.webkit.org/show_bug.cgi?id=181988

The LayoutTest crash fix introduced an API test failure.
(Requested by ryanhaddad on #webkit).

Reverted changesets:

"Resign NowPlaying status when no media element is eligible"
https://bugs.webkit.org/show_bug.cgi?id=181914
https://trac.webkit.org/changeset/227279

"Resign NowPlaying status when no media element is eligible"
https://bugs.webkit.org/show_bug.cgi?id=181914
https://trac.webkit.org/changeset/227373

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

20 months agoFollow-up layout test fix after r227260.
aestes@apple.com [Tue, 23 Jan 2018 17:38:53 +0000 (17:38 +0000)]
Follow-up layout test fix after r227260.

I missed a few places that were still using version 3 API requests.

* http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html:

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

20 months agoUnreviewed, fix some format specifiers added in r227190
mcatanzaro@igalia.com [Tue, 23 Jan 2018 17:26:41 +0000 (17:26 +0000)]
Unreviewed, fix some format specifiers added in r227190
https://bugs.webkit.org/show_bug.cgi?id=181454

* dom/messageports/MessagePortChannel.cpp:
(WebCore::MessagePortChannel::takeAllMessagesForPort):

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

20 months agoREGRESSION (r227348): ASSERT_NOT_REACHED in WebKit::ServiceWorkerClientFetch::didFinish()
commit-queue@webkit.org [Tue, 23 Jan 2018 17:21:08 +0000 (17:21 +0000)]
REGRESSION (r227348): ASSERT_NOT_REACHED in WebKit::ServiceWorkerClientFetch::didFinish()
https://bugs.webkit.org/show_bug.cgi?id=181956
<rdar://problem/36755492>

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

Covered by test no longer crashing in Debug builds.
Reset m_redirectionStatus to None when starting an SW fetch.

* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::start):
(WebKit::ServiceWorkerClientFetch::didFinish):

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

20 months ago[WPE] TestWebKitFindController asserts
mcatanzaro@igalia.com [Tue, 23 Jan 2018 17:19:44 +0000 (17:19 +0000)]
[WPE] TestWebKitFindController asserts
https://bugs.webkit.org/show_bug.cgi?id=181472

Reviewed by Carlos Garcia Campos.

Let's fix this in two independent ways.

First, use a GRefPtr to hold ownership of the WebKitWebViewBackend. This way, we don't need
to change the order in which WebKitWebView destroys its priv struct members from what is
used in WebKitGTK+, which can lead to odd bugs.

Additionally, just for good measure, stop resetting the find client when disposing
WebKitFindController. This is unnecessary because it will never be destroyed before the
WebKitWebView.

* UIProcess/API/glib/WebKitFindController.cpp:
(webkit_find_controller_class_init):
(webkitFindControllerDispose): Deleted.
* UIProcess/API/glib/WebKitWebView.cpp:
(_WebKitWebViewPrivate::~_WebKitWebViewPrivate):
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkitWebViewCreatePage):
(webkit_web_view_get_backend):
* UIProcess/API/wpe/WebKitWebViewBackend.cpp:
(webkitWebViewBackendCreateDefault):
(WTF::refGPtr):
(WTF::derefGPtr):
* UIProcess/API/wpe/WebKitWebViewBackendPrivate.h:

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

20 months agoUnreviewed, retire some microbenchmarks that are proportionately very slow. Benchmark...
fpizlo@apple.com [Tue, 23 Jan 2018 17:11:40 +0000 (17:11 +0000)]
Unreviewed, retire some microbenchmarks that are proportionately very slow. Benchmark running time should be proportional to their value. Microbenchmarks have little value, so they should be very fast.

* microbenchmarks/array-push-3.js: Removed.
* microbenchmarks/bigswitch-indirect-symbol-or-undefined.js: Removed.
* microbenchmarks/double-to-int32.js: Removed.
* microbenchmarks/fake-iterators-that-throw-when-finished.js: Removed.
* microbenchmarks/ftl-polymorphic-bitand.js: Removed.
* microbenchmarks/ftl-polymorphic-bitor.js: Removed.
* microbenchmarks/ftl-polymorphic-bitxor.js: Removed.
* microbenchmarks/ftl-polymorphic-lshift.js: Removed.
* microbenchmarks/ftl-polymorphic-rshift.js: Removed.
* microbenchmarks/ftl-polymorphic-sub.js: Removed.
* microbenchmarks/ftl-polymorphic-urshift.js: Removed.
* microbenchmarks/map-constant-key.js: Removed.
* microbenchmarks/nested-function-parsing.js: Removed.
* microbenchmarks/rest-parameter-allocation-elimination.js: Removed.
* microbenchmarks/spread-large-array.js: Removed.
* microbenchmarks/string-add-constant-folding.js: Removed.
* microbenchmarks/to-lower-case.js: Removed.
* microbenchmarks/undefined-property-access.js: Removed.
* slowMicrobenchmarks/array-push-3.js: Copied from JSTests/microbenchmarks/array-push-3.js.
* slowMicrobenchmarks/bigswitch-indirect-symbol-or-undefined.js: Copied from JSTests/microbenchmarks/bigswitch-indirect-symbol-or-undefined.js.
* slowMicrobenchmarks/double-to-int32.js: Copied from JSTests/microbenchmarks/double-to-int32.js.
* slowMicrobenchmarks/fake-iterators-that-throw-when-finished.js: Copied from JSTests/microbenchmarks/fake-iterators-that-throw-when-finished.js.
* slowMicrobenchmarks/ftl-polymorphic-bitand.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-bitand.js.
* slowMicrobenchmarks/ftl-polymorphic-bitor.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-bitor.js.
* slowMicrobenchmarks/ftl-polymorphic-bitxor.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-bitxor.js.
* slowMicrobenchmarks/ftl-polymorphic-lshift.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-lshift.js.
* slowMicrobenchmarks/ftl-polymorphic-rshift.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-rshift.js.
* slowMicrobenchmarks/ftl-polymorphic-sub.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-sub.js.
* slowMicrobenchmarks/ftl-polymorphic-urshift.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-urshift.js.
* slowMicrobenchmarks/map-constant-key.js: Copied from JSTests/microbenchmarks/map-constant-key.js.
* slowMicrobenchmarks/nested-function-parsing.js: Copied from JSTests/microbenchmarks/nested-function-parsing.js.
* slowMicrobenchmarks/rest-parameter-allocation-elimination.js: Copied from JSTests/microbenchmarks/rest-parameter-allocation-elimination.js.
* slowMicrobenchmarks/spread-large-array.js: Copied from JSTests/microbenchmarks/spread-large-array.js.
* slowMicrobenchmarks/string-add-constant-folding.js: Copied from JSTests/microbenchmarks/string-add-constant-folding.js.
* slowMicrobenchmarks/to-lower-case.js: Copied from JSTests/microbenchmarks/to-lower-case.js.
* slowMicrobenchmarks/undefined-property-access.js: Copied from JSTests/microbenchmarks/undefined-property-access.js.

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

20 months ago[GTK] Add user agent quirk for Microsoft Outlook Web App
commit-queue@webkit.org [Tue, 23 Jan 2018 17:10:47 +0000 (17:10 +0000)]
[GTK] Add user agent quirk for Microsoft Outlook Web App
https://bugs.webkit.org/show_bug.cgi?id=181982

Patch by Ting-Wei Lan <lantw44@gmail.com> on 2018-01-23
Reviewed by Michael Catanzaro.

Microsoft Outlook Web App forces users to switch to the lite version on
the login page with our standard user agent on all non-macOS systems.
Since it is an application that can be installed by different companies,
schools and organizations, it is not possible to fix the issue unless
we keep a big list of host names that are known to run it. We check the
host name instead of the base domain name here because it is not
expected to run all sites under a base domain on this webmail and
calendar application.

https://mail.ntu.edu.tw is a site that is known to run Microsoft Outlook
Web App for several years, and it is not likely to change. When there
are other sites found to run it and having the same user agent problem,
we can expand the list to include them.

* platform/UserAgentQuirks.cpp:
(WebCore::urlRequiresMacintoshPlatform):

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

20 months ago[WPE][GTK] Sleep inhibitors do not work under Flatpak
mcatanzaro@igalia.com [Tue, 23 Jan 2018 16:51:22 +0000 (16:51 +0000)]
[WPE][GTK] Sleep inhibitors do not work under Flatpak
https://bugs.webkit.org/show_bug.cgi?id=180812

Reviewed by Carlos Garcia Campos.

Ensure SleepDisablerGLib works even when running inside a Flatpak sandbox by using the
Freedesktop inhibit portal D-Bus API.

Unfortunately this has to be tested manually.

* pal/system/glib/SleepDisablerGLib.cpp:
(PAL::SleepDisablerGLib::SleepDisablerGLib):
(PAL::SleepDisablerGLib::~SleepDisablerGLib):
(PAL::SleepDisablerGLib::acquireInhibitor):
(PAL::SleepDisablerGLib::acquireInhibitorViaScreenSaverProxy):
(PAL::SleepDisablerGLib::acquireInhibitorViaInhibitPortalProxy):
(PAL::SleepDisablerGLib::releaseInhibitor):
(PAL::SleepDisablerGLib::releaseInhibitorViaScreenSaverProxy):
(PAL::SleepDisablerGLib::releaseInhibitorViaInhibitPortalProxy):

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

20 months agoWebDriver: several tests in imported/w3c/webdriver/tests/sessions/new_session/merge...
carlosgc@webkit.org [Tue, 23 Jan 2018 16:22:55 +0000 (16:22 +0000)]
WebDriver: several tests in imported/w3c/webdriver/tests/sessions/new_session/merge.py are failing
https://bugs.webkit.org/show_bug.cgi?id=180407

Reviewed by Carlos Alberto Lopez Perez.

Source/WebDriver:

This is actually a bug in the spec, see https://github.com/w3c/webdriver/issues/1203. It seems the idea in any
case is that we should check all the firstMatch capabilities before matching them, and return if there's any
error.

* WebDriverService.cpp:
(WebDriver::WebDriverService::mergeCapabilities const):
(WebDriver::WebDriverService::processCapabilities const):

WebDriverTests:

Remove expectations for tests that are passing now and update the bug number of the other ones referencing
#180407.

* TestExpectations.json:

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

20 months agoWebDriver: test imported/w3c/webdriver/tests/sessions/new_session/response.py::test_t...
carlosgc@webkit.org [Tue, 23 Jan 2018 16:21:43 +0000 (16:21 +0000)]
WebDriver: test imported/w3c/webdriver/tests/sessions/new_session/response.py::test_timeouts fails
https://bugs.webkit.org/show_bug.cgi?id=180412

Reviewed by Carlos Alberto Lopez Perez.

Source/WebDriver:

Include all missing capabilities in the new session response message.

Fixes: imported/w3c/webdriver/tests/sessions/new_session/response.py::test_resp_capabilites
       imported/w3c/webdriver/tests/sessions/new_session/response.py::test_resp_data
       imported/w3c/webdriver/tests/sessions/new_session/response.py::test_timeouts

* Session.h:
(WebDriver::Session::scriptTimeout const):
(WebDriver::Session::pageLoadTimeout const):
(WebDriver::Session::implicitWaitTimeout const):
* WebDriverService.cpp:
(WebDriver::WebDriverService::newSession):

WebDriverTests:

Remove expectations for imported/w3c/webdriver/tests/sessions/new_session/response.py since all tests are
passing now.

* TestExpectations.json:

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

20 months agoWebDriver: matched capabilities should include setWindowRect
carlosgc@webkit.org [Tue, 23 Jan 2018 16:20:36 +0000 (16:20 +0000)]
WebDriver: matched capabilities should include setWindowRect
https://bugs.webkit.org/show_bug.cgi?id=180411

Reviewed by Carlos Alberto Lopez Perez.

Source/WebDriver:

Handle setWindowRect in capabilities. It's always true for GTK and false for WPE.

* Capabilities.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::parseCapabilities const):
(WebDriver::WebDriverService::matchCapabilities const):
(WebDriver::WebDriverService::newSession):
* gtk/WebDriverServiceGtk.cpp:
(WebDriver::WebDriverService::platformCapabilities):
* wpe/WebDriverServiceWPE.cpp:
(WebDriver::WebDriverService::platformCapabilities):

WebDriverTests:

Change the bug number of test imported/w3c/webdriver/tests/sessions/new_session/response.py::test_resp_data,
since now it's failing due to missing timeouts value.

* TestExpectations.json:

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

20 months ago[JSC] JIT requires sizeof(bool) == 1
utatane.tea@gmail.com [Tue, 23 Jan 2018 15:11:00 +0000 (15:11 +0000)]
[JSC] JIT requires sizeof(bool) == 1
https://bugs.webkit.org/show_bug.cgi?id=181150

Reviewed by Saam Barati.

LLInt and JIT assumes that sizeof(bool) == 1. But it is implementation-dependent in C++ spec.
Since this is a mandatory requirement in JSC, we add a static_assert to ensure this.

* runtime/InitializeThreading.cpp:

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

20 months agoUpdate the argument count in DFGByteCodeParser::handleRecursiveCall
rmorisset@apple.com [Tue, 23 Jan 2018 14:28:10 +0000 (14:28 +0000)]
Update the argument count in DFGByteCodeParser::handleRecursiveCall
https://bugs.webkit.org/show_bug.cgi?id=181739
<rdar://problem/36627662>

Reviewed by Saam Barati.

JSTests:

* stress/recursive-tail-call-with-different-argument-count.js: Added.
(foo):
(bar):

Source/JavaScriptCore:

When calling a function, its number of arguments is set on the stack. When we turn a recursive tail call
into a jump, we should update that stack slot as there is no guarantee that the function was originally
called with the same number of arguments. Forgetting to do this is observable through 'arguments.length'.

It required adding a new DFG node: 'SetArgumentCountIncludingThis', that takes an unsigned int
as its first OpInfo field, and stores it to the stack at the right place.

We must be a bit careful in where we put this new node, as it ClobbersExit.
We must also fix DFGArgumentsEliminationPhase and DFGPutStackSinkingPhase as they assumed that any node that writes to the stack must write to either an argument or a local.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGMayExit.cpp:
* dfg/DFGNode.h:
(JSC::DFG::Node::argumentCountIncludingThis):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileSetArgumentCountIncludingThis):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileSetArgumentCountIncludingThis):

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

20 months ago[EME] Add support of multi keys from different sessions in CDMinstanceClearKey
commit-queue@webkit.org [Tue, 23 Jan 2018 12:07:42 +0000 (12:07 +0000)]
[EME] Add support of multi keys from different sessions in CDMinstanceClearKey
https://bugs.webkit.org/show_bug.cgi?id=180083

Patch by Yacine Bandou <yacine.bandou_ext@softathome.com> on 2018-01-23
Reviewed by Xabier Rodriguez-Calvar.

Add support of multi keys from different MediaKeySession in CDMInstanceClearKey.

Currently the CDMInstanceClearKey manages two "m_keys", one is a WTF::Vector
where it stores the list of last added keys, an other which is defined in the
ClearKeyState::singleton it is a WTF::HashMap, in this last one, it stores the
keys lists of each created session.

The method "keys()" of CDMInstanceClearKey returns the first "m_keys" which
contains just the list of last keys.

The goal of this commit is to return all keys lists of all sessions, thus
we remove the "m_keys" which is WTF::Vector and we modify the method
"keys()" to return all keys lists, which is stored in "m_keys" WTF::HashMap,
in one Vector instead of return just the list of last keys.

* platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::CDMInstanceClearKey::keys const):
(WebCore::CDMInstanceClearKey::updateLicense):
* platform/encryptedmedia/clearkey/CDMClearKey.h:

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

20 months agoWebDriver: test imported/selenium/py/test/selenium/webdriver/common/api_example_tests...
carlosgc@webkit.org [Tue, 23 Jan 2018 09:43:46 +0000 (09:43 +0000)]
WebDriver: test imported/selenium/py/test/selenium/webdriver/common/api_example_tests.py::testChangeWindowSize fails
https://bugs.webkit.org/show_bug.cgi?id=181728

Reviewed by Sergio Villar Senin.

Source/WebDriver:

Due to a copy-paste error we are getting the window height using the width variable.

Fixes: imported/selenium/py/test/selenium/webdriver/common/api_example_tests.py::testChangeWindowSize
       imported/selenium/py/test/selenium/webdriver/common/position_and_size_tests.py::testShouldScrollPageAndGetCoordinatesOfAnElementThatIsOutOfViewPort
       imported/w3c/webdriver/tests/get_window_rect.py::test_payload
       imported/w3c/webdriver/tests/set_window_rect.py::test_width_height_floats
       imported/w3c/webdriver/tests/set_window_rect.py::test_height_width
       imported/w3c/webdriver/tests/set_window_rect.py::test_height_width_larger_than_max
       imported/w3c/webdriver/tests/contexts/resizing_and_positioning.py::test_window_resize

* Session.cpp:
(WebDriver::Session::getToplevelBrowsingContextRect):

WebDriverTests:

Remove expectations for tests that are now passing.

* TestExpectations.json:

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

20 months agoMark some service-worker fetch tests as DumpJSConsoleLogInStdErr
commit-queue@webkit.org [Tue, 23 Jan 2018 09:26:31 +0000 (09:26 +0000)]
Mark some service-worker fetch tests as DumpJSConsoleLogInStdErr
https://bugs.webkit.org/show_bug.cgi?id=181975

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-23

* TestExpectations:

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

20 months agoUnreviewed. Add test case for slow in test_expectations.py.
carlosgc@webkit.org [Tue, 23 Jan 2018 07:11:37 +0000 (07:11 +0000)]
Unreviewed. Add test case for slow in test_expectations.py.

I forgot to also check slow tests in test_expectations.py unit tests.

* Scripts/webkitpy/common/test_expectations_unittest.py:
(assert_slow):
(test_build_type):
(test_slow):

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

20 months agoUnreviewed. Mark test WTF_Lock.ManyContendedShortSections as slow.
carlosgc@webkit.org [Tue, 23 Jan 2018 06:50:39 +0000 (06:50 +0000)]
Unreviewed. Mark test WTF_Lock.ManyContendedShortSections as slow.

* TestWebKitAPI/glib/TestExpectations.json:

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

20 months agoOptimize building the non-fast scrollable region with multiple iframes
simon.fraser@apple.com [Tue, 23 Jan 2018 05:36:42 +0000 (05:36 +0000)]
Optimize building the non-fast scrollable region with multiple iframes
https://bugs.webkit.org/show_bug.cgi?id=181971

Reviewed by Zalan Bujtas.

Source/WebCore:

AsyncScrollingCoordinator::frameViewLayoutUpdated() is called every time a subframe lays out.
We don't need to eagerly update the non-fast scrollable region at this time; we can just mark
it dirty, and rely on the existing scrolling tree commit code to recompute it.

On my machine this makes fast/frames/lots-of-objects.html no longer a timeout.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):

LayoutTests:

* platform/mac-wk2/TestExpectations: fast/frames/lots-of-objects.html is no longer always a timeout.

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

20 months ago'run-test.py' script should make sure 'node_modules' directory exists before installi...
dewei_zhu@apple.com [Tue, 23 Jan 2018 04:39:10 +0000 (04:39 +0000)]
'run-test.py' script should make sure 'node_modules' directory exists before installing node packages.
https://bugs.webkit.org/show_bug.cgi?id=181808

Reviewed by Ryosuke Niwa.

'run-test.py' will fail if 'node_modules' does not exist before running this script.
Instead of calling 'os.chdir' to change directory, use 'cwd' in subprocess instead.

* tools/run-tests.py: Added the logic to ensure 'node_modules' exists.
Also use 'cwd' in subprocess.call instead of calling 'os.chdir' ahead.

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

20 months ago[WebAuthN] Implement PublicKeyCredential's [[Create]] with a dummy authenticator
jiewen_tan@apple.com [Tue, 23 Jan 2018 03:00:59 +0000 (03:00 +0000)]
[WebAuthN] Implement PublicKeyCredential's [[Create]] with a dummy authenticator
https://bugs.webkit.org/show_bug.cgi?id=181928
<rdar://problem/36459893>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch implements PublicKeyCredential's [[Create]] from https://www.w3.org/TR/webauthn/#createCredential
as of 5 December 2017. In order to do testing, a dummy authenticator is implemented to exercise a failure
and a pass path. A number of dependencies need to be resolved later in order to comply with the spec.
Also, the current architecture of handling async WebAuthN operations including dispatching, timeout, and aborting
might need a redesign once the underlying authenticator is clear. Since this is our first attempt to implement
a prototype, all those limitations, in my opinion, can be marked as non-blocking to accelerate the whole
process. Those limitations will then be addressed once the first prototype is finshed.

Tests: http/tests/webauthn/public-key-credential-create-with-invalid-parameters.https.html
       http/tests/webauthn/public-key-credential-same-origin-with-ancestors-2.https.html
       http/tests/webauthn/public-key-credential-same-origin-with-ancestors.https.html
       http/wpt/webauthn/idl.https.html
       http/wpt/webauthn/public-key-credential-create-failure.https.html
       http/wpt/webauthn/public-key-credential-create-success.https.html

* Modules/credentialmanagement/BasicCredential.h:
* Modules/credentialmanagement/BasicCredential.idl:
* Modules/credentialmanagement/CredentialsContainer.cpp:
(WebCore::CredentialsContainer::PendingPromise::PendingPromise):
(WebCore::CredentialsContainer::dispatchTask):
(WebCore::CredentialsContainer::get):
(WebCore::CredentialsContainer::isCreate):
(WebCore::CredentialsContainer::preventSilentAccess const):
(WebCore::CredentialsContainer::preventSilentAccess): Deleted.
* Modules/credentialmanagement/CredentialsContainer.h:
(WebCore::CredentialsContainer::PendingPromise::create):
* Modules/webauthn/Authenticator.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp.
(WebCore::Authenticator::singleton):
(WebCore::Authenticator::makeCredential const):
* Modules/webauthn/Authenticator.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.h.
* Modules/webauthn/AuthenticatorAssertionResponse.cpp:
(WebCore::AuthenticatorAssertionResponse::authenticatorData const):
(WebCore::AuthenticatorAssertionResponse::signature const):
(WebCore::AuthenticatorAssertionResponse::userHandle const):
(WebCore::AuthenticatorAssertionResponse::~AuthenticatorAssertionResponse): Deleted.
(WebCore::AuthenticatorAssertionResponse::authenticatorData): Deleted.
(WebCore::AuthenticatorAssertionResponse::signature): Deleted.
(WebCore::AuthenticatorAssertionResponse::userHandle): Deleted.
* Modules/webauthn/AuthenticatorAssertionResponse.h:
(WebCore::AuthenticatorAssertionResponse::create):
* Modules/webauthn/AuthenticatorAttestationResponse.cpp:
(WebCore::AuthenticatorAttestationResponse::attestationObject const):
(WebCore::AuthenticatorAttestationResponse::~AuthenticatorAttestationResponse): Deleted.
(WebCore::AuthenticatorAttestationResponse::attestationObject): Deleted.
* Modules/webauthn/AuthenticatorAttestationResponse.h:
(WebCore::AuthenticatorAttestationResponse::create):
* Modules/webauthn/AuthenticatorResponse.cpp:
(WebCore::AuthenticatorResponse::clientDataJSON const):
(WebCore::AuthenticatorResponse::~AuthenticatorResponse): Deleted.
(WebCore::AuthenticatorResponse::clientDataJSON): Deleted.
* Modules/webauthn/AuthenticatorResponse.h:
* Modules/webauthn/AuthenticatorResponse.idl:
* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredentialInternal::produceClientDataJson):
(WebCore::PublicKeyCredentialInternal::produceClientDataJsonHash):
(WebCore::PublicKeyCredentialInternal::getIdFromAttestationObject):
(WebCore::PublicKeyCredential::PublicKeyCredential):
(WebCore::PublicKeyCredential::discoverFromExternalSource):
(WebCore::PublicKeyCredential::create):
(WebCore::PublicKeyCredential::rawId const):
(WebCore::PublicKeyCredential::response const):
(WebCore::PublicKeyCredential::getClientExtensionResults const):
(WebCore::PublicKeyCredential::rawId): Deleted.
(WebCore::PublicKeyCredential::response): Deleted.
(WebCore::PublicKeyCredential::getClientExtensionResults): Deleted.
* Modules/webauthn/PublicKeyCredential.h:
* Modules/webauthn/PublicKeyCredential.idl:
* Modules/webauthn/PublicKeyCredentialCreationOptions.h:
(): Deleted.
* Modules/webauthn/PublicKeyCredentialDescriptor.h:
* Modules/webauthn/PublicKeyCredentialDescriptor.idl:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSAuthenticatorResponseCustom.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp.
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSBasicCredentialCustom.cpp: Copied from Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp.
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/JSBindingsAllInOne.cpp:

LayoutTests:

Test cases are divided into two different folders. One follows wpt style. The other contains tests
that I don't know how to write them in wpt style.

* http/tests/webauthn/public-key-credential-create-with-invalid-parameters.https-expected.txt: Added.
* http/tests/webauthn/public-key-credential-create-with-invalid-parameters.https.html: Added.
* http/tests/webauthn/public-key-credential-same-origin-with-ancestors-2.https-expected.txt: Added.
* http/tests/webauthn/public-key-credential-same-origin-with-ancestors-2.https.html: Added.
* http/tests/webauthn/public-key-credential-same-origin-with-ancestors.https-expected.txt: Added.
* http/tests/webauthn/public-key-credential-same-origin-with-ancestors.https.html: Added.
* http/tests/webauthn/resources/last-layer-frame.https.html: Added.
* http/tests/webauthn/resources/second-layer-frame.https.html: Added.
* http/tests/webauthn/resources/util.js: Added.
It will be good to convert them into wpt style.
* http/wpt/webauthn/WebAuthN.idl: Added.
* http/wpt/webauthn/idl.https-expected.txt: Added.
* http/wpt/webauthn/idl.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-failure.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-failure.https.html: Added.
* http/wpt/webauthn/public-key-credential-create-success.https-expected.txt: Added.
* http/wpt/webauthn/public-key-credential-create-success.https.html: Added.
* http/wpt/webauthn/resources/util.js: Added.

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

20 months ago[Cocoa] Support font collections
mmaxfield@apple.com [Tue, 23 Jan 2018 02:09:22 +0000 (02:09 +0000)]
[Cocoa] Support font collections
https://bugs.webkit.org/show_bug.cgi?id=181826
<rdar://problem/36455137>

Reviewed by Dean Jackson.

Source/WebCore:

Use the CoreText call CTFontManagerCreateFontDescriptorsFromData() to get all the descriptors inside
the collection file. We select which one by using the fragment identifier at the end of the url linking
to the remote font. For example, to select the 4th font inside a TTC file, the @font-face block would
look like:

@font-face {
    font-family: "MyFont";
    src: url("path/to/font.ttc#4");
}

Note that these numbers are 1-indexed.

The CSS Fonts spec states:
> Fragment identifiers are used to indicate which font to load. If a container format lacks a defined
> fragment identifier scheme, implementations should use a simple 1-based indexing scheme (e.g.
> "font-collection#1" for the first font, "font-collection#2" for the second font).

Not only are TTC font collections supported, but WOFF2 font collections are also supported, which is
increasingly important web standard.

No new tests because I don't have a font collection file with the appropriate license for the
WebKit repository. I tested manually.

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::load):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::calculateIndex const):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::createCustomFontData):
* loader/cache/CachedFont.h:
* platform/graphics/cairo/FontCustomPlatformData.h:
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/win/FontCustomPlatformData.h:
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::createFontCustomPlatformData):

Source/WebCore/PAL:

* pal/spi/cocoa/CoreTextSPI.h:

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

20 months agoSkip http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html on Sierra.
ryanhaddad@apple.com [Tue, 23 Jan 2018 02:04:57 +0000 (02:04 +0000)]
Skip http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=181833

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

20 months agoREGRESSION (r227011): fast/frames/hidpi-position-iframe-on-device-pixel.html times out
simon.fraser@apple.com [Tue, 23 Jan 2018 02:00:13 +0000 (02:00 +0000)]
REGRESSION (r227011): fast/frames/hidpi-position-iframe-on-device-pixel.html times out
https://bugs.webkit.org/show_bug.cgi?id=181959

Reviewed by Zalan Bujtas.

This test creates 300 iframes, which became slow after r227011 because they all became part
of the non-fast scrollable region, slowing down ScrollingCoordinator::absoluteEventTrackingRegionsForFrame().

Fix by not adding non-scrollable iframes, and making FrameView::isScrollable() more efficient for frames
that have not done layout yet.

* page/FrameView.cpp:
(WebCore::FrameView::isScrollable):
(WebCore::FrameView::addChild):

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

20 months agoUpdate title label size
jonlee@apple.com [Tue, 23 Jan 2018 01:54:06 +0000 (01:54 +0000)]
Update title label size
https://bugs.webkit.org/show_bug.cgi?id=181962
rdar://problem/36754744

Reviewed by Simon Fraser.

* UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
(-[_WKFullScreenViewController setLocation:secure:trustedName:trustedSite:]): Move titleLabel properties into
createSubviews.
(-[_WKFullScreenViewController createSubviews]): Set the title label for both the cancel and location buttons.
Refer to a const CGFloat for the font size.

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

20 months agoTemporarily restore block selection code conditionally
megan_gardner@apple.com [Tue, 23 Jan 2018 01:45:27 +0000 (01:45 +0000)]
Temporarily restore block selection code conditionally
https://bugs.webkit.org/show_bug.cgi?id=181895
<rdar://problem/36567325>

Reviewed by Tim Horton.

We need to restore this code temporarily to avoid a crash.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):

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

20 months agoFixed building for macOS 10.12 with the macOS 10.13 SDK after r227156.
mitz@apple.com [Tue, 23 Jan 2018 01:37:14 +0000 (01:37 +0000)]
Fixed building for macOS 10.12 with the macOS 10.13 SDK after r227156.

* Configurations/WebCore.xcconfig:

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

20 months agoWe should not try to link against the Safe Browsing framework on watchOS and tvOS.
commit-queue@webkit.org [Tue, 23 Jan 2018 01:36:19 +0000 (01:36 +0000)]
We should not try to link against the Safe Browsing framework on watchOS and tvOS.
https://bugs.webkit.org/show_bug.cgi?id=181965.

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-22
Reviewed by Tim Horton.

* Configurations/WebKit.xcconfig:

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

20 months agoREGRESSION (r226981): ASSERTION FAILED: startY >= 0 && endY <= height && startY ...
simon.fraser@apple.com [Tue, 23 Jan 2018 01:34:33 +0000 (01:34 +0000)]
REGRESSION (r226981): ASSERTION FAILED: startY >= 0 && endY <= height && startY < endY in WebCore::FEMorphology::platformApplyGeneric
https://bugs.webkit.org/show_bug.cgi?id=181836

Reviewed by Tim Horton.
Source/WebCore:

All the filters that use ParallelJobs<> has the same type of bug where very wide but not tall
filter regions could result in computing an optimalThreadNumber that was greater than the
number of rows to process, which resulted in jobs with zero rows to process.

Since we split the work by rows, cap the maximum number of threads to height/8 so that each job
has at least 8 rows of pixels to process. Add some assertions to detect jobs with zero rows.

FEMorphology was also using implicit float -> int conversion to detect integer overflow of radius,
so change that to use explicit clamping.

Tests: svg/filters/feLighting-parallel-jobs.svg
       svg/filters/feTurbulence-parallel-jobs-wide.svg

* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGenericPaint):
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyGeneric):
(WebCore::FEMorphology::platformApply):
(WebCore::FEMorphology::platformApplyDegenerate):
(WebCore::FEMorphology::platformApplySoftware):
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegion const):
(WebCore::FETurbulence::platformApplySoftware):

LayoutTests:

* svg/filters/feLighting-parallel-jobs.svg: Added.
* svg/filters/feMorphology-invalid-radius.svg: Change the test to detect the bug on non-Retina too.
* svg/filters/feTurbulence-parallel-jobs-wide.svg: Added.

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

20 months agoResign NowPlaying status when no media element is eligible
ryanhaddad@apple.com [Tue, 23 Jan 2018 01:29:39 +0000 (01:29 +0000)]
Resign NowPlaying status when no media element is eligible
https://bugs.webkit.org/show_bug.cgi?id=181914
<rdar://problem/35294116>

Patch by Eric Carlson <eric.carlson@apple.com> on 2018-01-22
Reviewed by Jer Noble.

No new tests, these changes prevent existing tests from crashing.

* html/HTMLMediaElement.h:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted const): Return early when the media
element has been suspended.
(WebCore::MediaElementSession::canShowControlsManager const): Return false when the
media element has been suspended.
(WebCore::isMainContentForPurposesOfAutoplay): Return early if it isn't safe to update
style because HitTest can force a layout.
(WebCore::MediaElementSession::updateIsMainContent const): Ditto.

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

20 months agoBegin removing QTKit code
achristensen@apple.com [Tue, 23 Jan 2018 01:25:36 +0000 (01:25 +0000)]
Begin removing QTKit code
https://bugs.webkit.org/show_bug.cgi?id=181951

Reviewed by Jer Noble.

Source/WebCore:

QTKit was being used on El Capitan and before.

* Configurations/WebCore.xcconfig:
* SourcesMac.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector):
(WebCore::MediaPlayer::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h: Removed.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Removed.
* platform/graphics/mac/MediaTimeQTKit.h: Removed.
* platform/graphics/mac/MediaTimeQTKit.mm: Removed.
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setVideoElement:]):
(-[WebVideoFullscreenController updatePowerAssertions]):

Source/WTF:

* wtf/Platform.h:

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

20 months agoWebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElem...
wenson_hsieh@apple.com [Tue, 23 Jan 2018 01:09:45 +0000 (01:09 +0000)]
WebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElementEnabled state
https://bugs.webkit.org/show_bug.cgi?id=181960
<rdar://problem/36431678>

Reviewed by Tim Horton.

Mail's compose view is initialized via the -initSimpleHTMLDocumentWithStyle: codepath. This is intended to be
a fast path for initializing WebViews, which bypasses certain initialization steps present in the regular -init
path, such as calling -_preferencesChanged: to sync RuntimeEnabledFeatures with WebPreferences.

This means that even though we set -[WebPreferences attachmentElementEnabled] to YES for Mail, the value of the
RuntimeEnabledFeature isn't updated to match. To fix this, we explicitly invoke
RuntimeEnabledFeatures::setAttachmentElementEnabled here to make sure the value is in sync with WebPreferences.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

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

20 months agoWeb Inspector: Styles Redesign: data corruption when updating values quickly
nvasilyev@apple.com [Tue, 23 Jan 2018 00:52:32 +0000 (00:52 +0000)]
Web Inspector: Styles Redesign: data corruption when updating values quickly
https://bugs.webkit.org/show_bug.cgi?id=179461
<rdar://problem/35431882>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
update synchronously. Making two or more quick changes resulted in corrupted data.

Imagine we modify a CSS value 3 times:

Front-end:  (1)-(2)---(3)
Back-end:          (1)-----(2)-(3)

The first response from the backend could happen after the 2nd edit. In this patch,
CSSStyleDeclaration is locked when its view is being edited.

To correctly display invalid and overridden properties, the backend is allowed to update
CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
matches the model's text. This should happen when the backend is caught up with the
front-end changes.

* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.update):
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.get locked):
(WI.CSSStyleDeclaration.prototype.set locked):
(WI.CSSStyleDeclaration.prototype.set text):

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
Lock CSSStyleDeclaration when a CSS property name or value is focused or
an inline widget is active.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
When selector is focused, clicking on the white-space should not add a new blank property.

LayoutTests:

* inspector/css/modify-css-property-expected.txt: Added.
* inspector/css/modify-css-property.html: Added.

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

20 months agoMarked fast/forms/searchfield-heights.html as flaky on High Sierra.
jlewis3@apple.com [Tue, 23 Jan 2018 00:45:17 +0000 (00:45 +0000)]
Marked fast/forms/searchfield-heights.html as flaky on High Sierra.
https://bugs.webkit.org/show_bug.cgi?id=181914

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

20 months agoSkipped http/tests/resourceLoadStatistics/grandfathering.html.
jlewis3@apple.com [Tue, 23 Jan 2018 00:01:44 +0000 (00:01 +0000)]
Skipped http/tests/resourceLoadStatistics/grandfathering.html.
https://bugs.webkit.org/show_bug.cgi?id=181482

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

20 months agoMark inspector/debugger/tail-deleted-frames-from-vm-entry.html as slow on macOS Debug.
ryanhaddad@apple.com [Mon, 22 Jan 2018 22:38:55 +0000 (22:38 +0000)]
Mark inspector/debugger/tail-deleted-frames-from-vm-entry.html as slow on macOS Debug.
https://bugs.webkit.org/show_bug.cgi?id=181952

Unreviewed test gardening.

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

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