WebKit-https.git
7 months agoDon't include ScrollCoordinator.h from Element.h
antti@apple.com [Sun, 3 Feb 2019 21:02:54 +0000 (21:02 +0000)]
Don't include ScrollCoordinator.h from Element.h
https://bugs.webkit.org/show_bug.cgi?id=194206

Reviewed by Daniel Bates.

* dom/Element.h:

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

7 months agoUnable to move selection into editable roots with 0 height
wenson_hsieh@apple.com [Sun, 3 Feb 2019 20:52:58 +0000 (20:52 +0000)]
Unable to move selection into editable roots with 0 height
https://bugs.webkit.org/show_bug.cgi?id=194143
<rdar://problem/47767284>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently, positions inside editable elements of height 0 are not considered to be candidates when
canonicalizing a position to its visible counterpart. This prevents us from moving the selection into these
editable roots at all. To fix this, we relax this constraint by allowing positions anchored by root editable
elements to be candidates.

Test: editing/selection/insert-text-in-empty-content-editable.html

* dom/Position.cpp:
(WebCore::Position::isCandidate const):

LayoutTests:

Add a new layout test that executes editing commands in a contenteditable element of height 0, and adjust an
existing layout test that copies and pastes an image element to wait until the image has loaded.

* editing/pasteboard/styled-element-markup.html:
* editing/selection/insert-text-in-empty-content-editable-expected.txt: Added.
* editing/selection/insert-text-in-empty-content-editable.html: Added.

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

7 months agoTidyup of Pagination and FrameView m_mediaType initialization
simon.fraser@apple.com [Sun, 3 Feb 2019 19:46:31 +0000 (19:46 +0000)]
Tidyup of Pagination and FrameView m_mediaType initialization
https://bugs.webkit.org/show_bug.cgi?id=194203

Reviewed by Darin Adler.

Fix post-commit feedback on lines around code changed in r240901.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
* page/FrameView.h:
* rendering/Pagination.h:
(WebCore::Pagination::operator!= const):

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

7 months agoUnreviewed, rolling out r240896.
commit-queue@webkit.org [Sun, 3 Feb 2019 13:53:54 +0000 (13:53 +0000)]
Unreviewed, rolling out r240896.
https://bugs.webkit.org/show_bug.cgi?id=194202

"Fixes leaks, but is probably not the correct fix." (Requested
by ddkilzer on #webkit).

Reverted changeset:

"Leak of WTF::StringImpl under SymbolImpl::createNullSymbol()
(48 bytes) in com.apple.WebKit.WebContent running layout
tests"
https://bugs.webkit.org/show_bug.cgi?id=193291
https://trac.webkit.org/changeset/240896

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

7 months agoTurn on Smart Paste
megan_gardner@apple.com [Sun, 3 Feb 2019 09:05:21 +0000 (09:05 +0000)]
Turn on Smart Paste
https://bugs.webkit.org/show_bug.cgi?id=193786

Reviewed by Ryosuke Niwa.

Source/WebCore:

Turned on a modified tests:
LayoutTests/editing/pasteboard/smart-paste-001.html
LayoutTests/editing/pasteboard/smart-paste-002.html
LayoutTests/editing/pasteboard/smart-paste-003.html
LayoutTests/editing/pasteboard/smart-paste-004.html
LayoutTests/editing/pasteboard/smart-paste-005.html
LayoutTests/editing/pasteboard/smart-paste-006.html
LayoutTests/editing/pasteboard/smart-paste-007.html
LayoutTests/editing/pasteboard/smart-paste-008.html

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::canSmartReplace):
Turn on smart replace.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/TextCheckerIOS.mm:
(WebKit::TextChecker::isSmartInsertDeleteEnabled):
Use the flag from UIKit to determine if smart copy paste should be
turned on.

LayoutTests:

Rebaselined many tests and/or added iOS specific expectations to
correctly reflect smart copy paste behavior.

* editing/editing.js:
(runEditingTestWithCallbackLogging):
(runDumpAsTextEditingTest):
Added ability to handle async functions.
* editing/pasteboard/smart-paste-001.html:
* editing/pasteboard/smart-paste-002.html:
* editing/pasteboard/smart-paste-003.html:
* editing/pasteboard/smart-paste-004.html:
* editing/pasteboard/smart-paste-005.html:
* editing/pasteboard/smart-paste-006.html:
* editing/pasteboard/smart-paste-007.html:
* editing/pasteboard/smart-paste-008.html:
* platform/ios-wk2/editing/pasteboard/smart-paste-007-expected.txt:
* platform/ios-wk2/editing/pasteboard/smart-paste-008-expected.txt:
* platform/ios/TestExpectations:
* platform/ios/editing/pasteboard/smart-paste-001-expected.txt: Added.
* platform/ios/editing/pasteboard/smart-paste-002-expected.txt: Added.
* platform/ios/editing/pasteboard/smart-paste-003-expected.txt: Added.
* platform/ios/editing/pasteboard/smart-paste-004-expected.txt: Added.
* platform/ios/editing/pasteboard/smart-paste-005-expected.txt: Added.
* platform/ios/editing/pasteboard/smart-paste-006-expected.txt: Added.
* resources/ui-helper.js:
(window.UIHelper.doubleClickAt):
(window.UIHelper.async.selectWordByDoubleTapOrClick):
Added helper functions to allow for selecting a word by double tap or click.

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

7 months agoTidy up data memebers of FrameView and related classes to shrink class sizes
simon.fraser@apple.com [Sun, 3 Feb 2019 00:16:44 +0000 (00:16 +0000)]
Tidy up data memebers of FrameView and related classes to shrink class sizes
https://bugs.webkit.org/show_bug.cgi?id=194197

Reviewed by Zalan Bujtas.

Source/WebCore:

Make various enums 8-bit. Re-order data members of FrameView, FrameViewLayoutContext, Widget
and ScrollView to optimize padding.

Use more data member initializers.

This shrinks FrameView from 1168 (144 padding bytes) to 1096 (96 padding bytes).

* dom/Element.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
* page/FrameView.h:
* page/FrameViewLayoutContext.h:
* platform/ScrollTypes.h:
* platform/ScrollView.h: Data members should come after member functions.
* platform/Widget.h:
* rendering/Pagination.h:
(WebCore::Pagination::Pagination): Deleted.

Source/WebKit:

* UIProcess/PageClient.h: Declare enum size.

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

7 months agoLeak of NSArray (4.25 Kbytes) in com.apple.WebKit.WebContent running WebKit layout...
ddkilzer@apple.com [Sat, 2 Feb 2019 20:20:36 +0000 (20:20 +0000)]
Leak of NSArray (4.25 Kbytes) in com.apple.WebKit.WebContent running WebKit layout tests on iOS Simulator
<https://webkit.org/b/194178>
<rdar://problem/47753473>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::uninstallFakeHelvetica): Pass nullptr into
CTFontManagerUnregisterFontsForURLs() to ignore any errors.

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

7 months agoRename "scrollingLayer" in RenderLayerBacking to "scrollContainerLayer" for clarity
simon.fraser@apple.com [Sat, 2 Feb 2019 20:05:22 +0000 (20:05 +0000)]
Rename "scrollingLayer" in RenderLayerBacking to "scrollContainerLayer" for clarity
https://bugs.webkit.org/show_bug.cgi?id=194194

Rubber-stampted by Antti Koivisto.

Our desired terminology is "scrollContainerLayer" for the outer, clipping layer
for scrolling, and "scrolledContentsLayer" for the contents that move when you scroll.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDebugIndicators):
(WebCore::RenderLayerBacking::destroyGraphicsLayers):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::setLocationOfScrolledContents):
(WebCore::RenderLayerBacking::updateAfterDescendants):
(WebCore::RenderLayerBacking::updateInternalHierarchy):
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::updateScrollingLayers):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
(WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
(WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
(WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
(WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):

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

7 months agoSource/WebCore:
justin_fan@apple.com [Sat, 2 Feb 2019 19:53:55 +0000 (19:53 +0000)]
Source/WebCore:
[Web GPU] Fix GPURenderPassEncoder::setVertexBuffers and allow overlapping indices with GPUBindGroups
https://bugs.webkit.org/show_bug.cgi?id=194125

Reviewed by Myles C. Maxfield.

GPURenderPassEncoder::setVertexBuffers is now actually written to set all buffers provided. In addition,
shift vertex input buffer indices so that any resource bindings can bind vertex buffer resources to the same indices.

Existing tests cover setVertexBuffers. Updated buffer-resource-triangles to assign bind groups and vertex buffers to the same index.

* Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.cpp: Added.
(WebCore::WHLSL::Metal::calculateVertexBufferIndex): Simple shifting function for vertex input buffer indices.
* Modules/webgpu/WHLSL/Metal/WHLSLVertexBufferIndexCalculator.h: Added.
* Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
(WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Limit maximum bind group indices to 0 to 3.
* Modules/webgpu/WebGPURenderPassEncoder.cpp:
(WebCore::WebGPURenderPassEncoder::setVertexBuffers): Limit vertex input indices to 0 to 15.
* Modules/webgpu/WebGPURenderPassEncoder.h: Move IDL/bindings bug note to IDL file.
* Modules/webgpu/WebGPURenderPassEncoder.idl: Ditto.
* platform/graphics/gpu/GPULimits.h: Added. Home for Web GPU limits constants shared between files.
* platform/graphics/gpu/GPURenderPassEncoder.h: Change IDL/bindings bug workaround to unsigned long long to prevent narrowing compared to spec.
* platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
(WebCore::GPURenderPassEncoder::setVertexBuffers): Now properly calls Metal's setVertexBuffers.
* platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
(WebCore::setInputStateForPipelineDescriptor): Fix validation checks for vertex attribute numbers and vertex buffer indices.

Add symbols to project:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:
[WebGPU] Fix GPURenderPassEncoder::setVertexBuffers and allow overlapping indices with GPUBindGroups
https://bugs.webkit.org/show_bug.cgi?id=194125

Reviewed by Myles C. Maxfield.

Updated buffer-resource-triangles to assign bind groups and vertex buffers to the same index.

* webgpu/buffer-resource-triangles.html:

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

7 months agoAsync overflow scroll is jumpy on macOS if the main thread is busy
simon.fraser@apple.com [Sat, 2 Feb 2019 19:09:18 +0000 (19:09 +0000)]
Async overflow scroll is jumpy on macOS if the main thread is busy
https://bugs.webkit.org/show_bug.cgi?id=194184
<rdar://problem/47758655>

Reviewed by Antti Koivisto.

This change extends to macOS some existing overflow-scroll functionality for iOS.
When an async scroll is in process in the scroll thread (or UI process), we periodically
message back to the web process main thread with scroll position updates. These
can trigger post-scroll compositing updates, but we need to ensure that this update
doesn't clobber the scroll position of the native layers, which would trigger
stutters.

To do this we have the notion of a scroll position "sync" (ScrollingLayerPositionAction::Sync) which
pokes the new value into the GraphicsLayer (hence making visible rect computations work), but doesn't
propagate it to the platform layer. This patch wires up syncs for macOS during async overflow scrolling,
coming out of AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll().

In RenderLayerBacking, m_scrollingContentsLayer is renamed to m_scrolledContentsLayer, and I added
updateScrollOffset() and setLocationOfScrolledContents() to handle the set vs. sync, and to keep
the iOS vs macOS differences in one function. This allows for more code sharing in RenderLayerBacking::updateGeometry().

There's a confusing bit in the m_childClippingMaskLayer code (trac.webkit.org/178029) where the setOffsetFromRenderer()
just looks wrong; it should match m_scrollingLayer. This code is never hit for Cocoa, which never has m_childClippingMaskLayer.

* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPosition): Logging
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition): Logging
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::scrollTo):
* rendering/RenderLayer.h: Rename m_requiresScrollBoundsOriginUpdate to m_requiresScrollPositionReconciliation
and make it available on all platforms. Just reorder m_adjustForIOSCaretWhenScrolling to reduce #ifdef nesting confusion.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDebugIndicators):
(WebCore::RenderLayerBacking::destroyGraphicsLayers):
(WebCore::RenderLayerBacking::updateGeometry):
(WebCore::RenderLayerBacking::setLocationOfScrolledContents):
(WebCore::RenderLayerBacking::updateScrollOffset):
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::updateScrollingLayers):
(WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer const):
(WebCore::RenderLayerBacking::parentForSublayers const):
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::backingStoreMemoryEstimate const):
* rendering/RenderLayerBacking.h:

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

7 months agoLeak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple...
ddkilzer@apple.com [Sat, 2 Feb 2019 18:35:42 +0000 (18:35 +0000)]
Leak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple.WebKit.WebContent running layout tests
<https://webkit.org/b/193291>
<rdar://problem/46655953>

Reviewed by Keith Miller.

* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::~SymbolImpl): Fix the leak by implementing the
class destructor that calls StringImpl::deref() on `m_owner`.
Two of the three constructors leak the StringImpl when setting
`m_owner`, so we need to balance that by manually calling
deref().

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

7 months ago[LFC] Initialize ICB's style with fixed width/height.
zalan@apple.com [Sat, 2 Feb 2019 16:32:05 +0000 (16:32 +0000)]
[LFC] Initialize ICB's style with fixed width/height.
https://bugs.webkit.org/show_bug.cgi?id=194188

Reviewed by Antti Koivisto.

Source/WebCore:

Let's set ICB's logical width/height to Fixed so that it's available when we try to resolve a box's height
in FormattingContext::Geometry::computedHeightValue() by using the containing block's height (ICB in this case).

* layout/LayoutState.cpp:
(WebCore::Layout::LayoutState::LayoutState):
* layout/LayoutState.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createLayoutTree):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

7 months ago[LFC] Add missing case to out-of-flow non-replaced horizontal used margin value compu...
zalan@apple.com [Sat, 2 Feb 2019 16:26:42 +0000 (16:26 +0000)]
[LFC] Add missing case to out-of-flow non-replaced horizontal used margin value computation
https://bugs.webkit.org/show_bug.cgi?id=194185

Reviewed by Antti Koivisto.

Source/WebCore:

If none of horizontal values (left, right, width, margin-left/right) are auto, then usedHorizontalMarginValues = computedHorizontalMarginValues.

Test: fast/block/block-only/absolute-position-left-right-margin.html

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):

Tools:

* LayoutReloaded/misc/LFC-passing-tests.txt:

LayoutTests:

* fast/block/block-only/absolute-position-left-right-margin-expected.html: Added.
* fast/block/block-only/absolute-position-left-right-margin.html: Added.

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

7 months ago[JSC] Decouple JIT related data from CodeBlock
ysuzuki@apple.com [Sat, 2 Feb 2019 07:15:47 +0000 (07:15 +0000)]
[JSC] Decouple JIT related data from CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=194187

Patch by Yusuke Suzuki <ysuzuki@apple.com> on 2019-02-01
Reviewed by Saam Barati.

CodeBlock holds bunch of data which is only used after JIT starts compiling it.
We have three types of data in CodeBlock.

1. The data which is always used. CodeBlock needs to hold it.
2. The data which is touched even in LLInt, but it is only meaningful in JIT tiers. The example is profiling.
3. The data which is used after the JIT compiler starts running for the given CodeBlock.

This patch decouples (3) from CodeBlock as CodeBlock::JITData. Even if we have bunch of CodeBlocks, only small
number of them gets JIT compilation. Always allocating (3) data enlarges the size of CodeBlock, leading to the
memory waste. Potentially we can decouple (2) in another data structure, but we first do (3) since (3) is beneficial
in both non-JIT and *JIT* modes.

JITData is created only when JIT compiler wants to use it. So it can be concurrently created and used, so it is guarded
by the lock of CodeBlock.

The size of CodeBlock is reduced from 512 to 352.

This patch improves memory footprint and gets 1.1% improvement in RAMification.

    Footprint geomean: 36696503 (34.997 MB)
    Peak Footprint geomean: 38595988 (36.808 MB)
    Score: 37634263 (35.891 MB)

    Footprint geomean: 37172768 (35.451 MB)
    Peak Footprint geomean: 38978288 (37.173 MB)
    Score: 38064824 (36.301 MB)

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::ensureJITDataSlow):
(JSC::CodeBlock::finalizeBaselineJITInlineCaches):
(JSC::CodeBlock::getICStatusMap):
(JSC::CodeBlock::addStubInfo):
(JSC::CodeBlock::addJITAddIC):
(JSC::CodeBlock::addJITMulIC):
(JSC::CodeBlock::addJITSubIC):
(JSC::CodeBlock::addJITNegIC):
(JSC::CodeBlock::findStubInfo):
(JSC::CodeBlock::addByValInfo):
(JSC::CodeBlock::addCallLinkInfo):
(JSC::CodeBlock::getCallLinkInfoForBytecodeIndex):
(JSC::CodeBlock::addRareCaseProfile):
(JSC::CodeBlock::rareCaseProfileForBytecodeOffset):
(JSC::CodeBlock::rareCaseProfileCountForBytecodeOffset):
(JSC::CodeBlock::resetJITData):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::shrinkToFit):
(JSC::CodeBlock::linkIncomingCall):
(JSC::CodeBlock::linkIncomingPolymorphicCall):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
(JSC::CodeBlock::dumpValueProfiles):
(JSC::CodeBlock::setPCToCodeOriginMap):
(JSC::CodeBlock::findPC):
(JSC::CodeBlock::dumpMathICStats):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::ensureJITData):
(JSC::CodeBlock::setJITCodeMap):
(JSC::CodeBlock::jitCodeMap):
(JSC::CodeBlock::likelyToTakeSlowCase):
(JSC::CodeBlock::couldTakeSlowCase):
(JSC::CodeBlock::lazyOperandValueProfiles):
(JSC::CodeBlock::stubInfoBegin): Deleted.
(JSC::CodeBlock::stubInfoEnd): Deleted.
(JSC::CodeBlock::callLinkInfosBegin): Deleted.
(JSC::CodeBlock::callLinkInfosEnd): Deleted.
(JSC::CodeBlock::jitCodeMap const): Deleted.
(JSC::CodeBlock::numberOfRareCaseProfiles): Deleted.
* bytecode/MethodOfGettingAValueProfile.cpp:
(JSC::MethodOfGettingAValueProfile::emitReportValue const):
(JSC::MethodOfGettingAValueProfile::reportValue):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
* jit/JIT.h:
* jit/JITOperations.cpp:
(JSC::tryGetByValOptimize):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompilePutByVal):

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

7 months agoConvert additional String::format clients to alternative approaches
darin@apple.com [Sat, 2 Feb 2019 04:05:55 +0000 (04:05 +0000)]
Convert additional String::format clients to alternative approaches
https://bugs.webkit.org/show_bug.cgi?id=192746

Reviewed by Alexey Proskuryakov.

Source/JavaScriptCore:

* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::stopTiming): Use makeString
and FormattedNumber::fixedWidth.

Source/WebCore:

This round of conversions covers less-trivial cases such as floating
point numerals and hexadecimal. Not yet taking on pointer serialization
("%p") or padding with spaces of zero digits, so call sites using those
have been left untouched.

In some cases these new idioms are a bit clumsy, and we could follow up
with additional convenience functions to make them more elegant.

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString const): Use more ASCIILiteral and
more appendLiteral for efficiency. Use upperNibbleToLowercaseASCIIHexDigit,
lowerNibbleToLowercaseASCIIHexDigit, and also makeString and FormattedNumber.

* css/MediaQueryEvaluator.cpp:
(WebCore::aspectRatioValueAsString): Use makeString and FormattedNumber.
Doing it this way makes it a little clearer that we have an unpleasant
use of fixed 6-digit precision here.

* html/FTPDirectoryDocument.cpp:
(WebCore::processFilesizeString): Use makeString and FormattedNumber.
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties): Ditto.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const): Ditto.
* page/History.cpp:
(WebCore::History::stateObjectAdded): Ditto.
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::formatByteNumber): Ditto.
(WebCore::gcTimerString): Use String::number.
(WebCore::ResourceUsageOverlay::platformDraw): Use makeString and FormattedNumber.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::snapOffsetsToString): Removed some unnecessary copying in the for loop,
use appendLiteral, and use appendFixedWidthNumber.
(WebCore::snapOffsetRangesToString): Ditto.
(WebCore::snapPortOrAreaToString): Use makeString and FormattedNumber.

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

* platform/cocoa/KeyEventCocoa.mm:
(WebCore::keyIdentifierForCharCode): Use makeString and the ASCIIHexDigit
functions.
* platform/graphics/Color.cpp:
(WebCore::Color::nameForRenderTreeAsText const): Ditto.

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawText): Use makeString and FormattedNumber.

* platform/text/PlatformLocale.cpp:
(WebCore::DateTimeStringBuilder::visitField): Use String::numberToStringFixedWidth.

Source/WebCore/PAL:

* pal/FileSizeFormatter.cpp:
(fileSizeDescription): Use makeString and FormattedNumber.

Source/WebKit:

* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
Use makeString and FormattedNumber.

* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::getAssertion): Added a comment about an
incorrect format specifier and left this code as is for now.

Source/WTF:

* wtf/JSONValues.cpp:
(WTF::appendDoubleQuotedStringEscapedCharacter): Renamed from
escapeChar and reordered arguments to make sense as an append function.
(WTF::appendDoubleQuotedString): Renamed from doubleQuoteString,
reordered arguments to make sense as an append function, take a
StringView instead of a String, used early exit to make the code
a bit easier to read. Use the ASCIIHexDigit functions to construct
a hex number a nibble at a time rather than using String::format.
(WTF::JSONImpl::Value::writeJSON const): Update for name change.
(WTF::JSONImpl::ObjectBase::writeJSON const): Ditto.

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::originUserVisibleName): Use makeString and reduce the use of std::string
as an intermediate in code that ultimately constructs a WTF::String.
(WTR::userMediaOriginHash): Use makeString.
(WTR::TestController::didNavigateWithNavigationData): More of the same.
(WTR::TestController::didPerformClientRedirect): Ditto.
(WTR::TestController::didPerformServerRedirect): Ditto.
(WTR::TestController::didUpdateHistoryTitle): Ditto.

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

7 months agoRemove the unused layerForScrolling()
simon.fraser@apple.com [Sat, 2 Feb 2019 02:30:53 +0000 (02:30 +0000)]
Remove the unused layerForScrolling()
https://bugs.webkit.org/show_bug.cgi?id=194180

Reviewed by Zalan Bujtas.

Remove ScrollableArea::layerForScrolling() and derivations. This was unused.

* page/FrameView.cpp:
(WebCore::FrameView::layerForScrolling const): Deleted.
* page/FrameView.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::scrollLayerForScrollableArea): Deleted.
* page/scrolling/ScrollingCoordinator.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::layerForScrolling const): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:

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

7 months ago[ews-build] Add unit test to verify builder keys
aakash_jain@apple.com [Sat, 2 Feb 2019 02:19:43 +0000 (02:19 +0000)]
[ews-build] Add unit test to verify builder keys
https://bugs.webkit.org/show_bug.cgi?id=194152

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest.test_builder_keys): Added unit-test.

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

7 months agoMove soft-linking of TelephonyUtilities.framework out of TUCallSPI.h
ddkilzer@apple.com [Sat, 2 Feb 2019 00:45:51 +0000 (00:45 +0000)]
Move soft-linking of TelephonyUtilities.framework out of TUCallSPI.h
<https://webkit.org/b/193866>

Reviewed by Alex Christensen.

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/PlatformMac.cmake:
- Update for rename of TUCallSPI.h to TelephonyUtilitiesSPI.h.

* pal/spi/mac/TelephonyUtilitiesSPI.h: Rename from Source/WebCore/PAL/pal/spi/mac/TUCallSPI.h.
- Remove soft-linking code from header.

Source/WebKit:

* Platform/mac/MenuUtilities.mm:
- Update for rename of TUCallSPI.h to TelephonyUtilitiesSPI.h.
- Add soft-linking code formerly in TUCallSPI.h.

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

7 months ago[JSC] Remove some of IsoSubspaces for JSFunction subclasses
ysuzuki@apple.com [Sat, 2 Feb 2019 00:24:47 +0000 (00:24 +0000)]
[JSC] Remove some of IsoSubspaces for JSFunction subclasses
https://bugs.webkit.org/show_bug.cgi?id=194177

Reviewed by Saam Barati.

JSGeneratorFunction, JSAsyncFunction, and JSAsyncGeneratorFunction do not add any fields / classInfo methods.
We can share the IsoSubspace for JSFunction.

* runtime/JSAsyncFunction.h:
* runtime/JSAsyncGeneratorFunction.h:
* runtime/JSGeneratorFunction.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

7 months ago[LFC] Expand tests coverage (12 new tests -> 787)
zalan@apple.com [Fri, 1 Feb 2019 23:59:56 +0000 (23:59 +0000)]
[LFC] Expand tests coverage (12 new tests -> 787)

Unreviewed test gardening.

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

7 months ago[LFC] Fix statically positioned replaced out-of-flow horizontal geometry
zalan@apple.com [Fri, 1 Feb 2019 23:54:22 +0000 (23:54 +0000)]
[LFC] Fix statically positioned replaced out-of-flow horizontal geometry
https://bugs.webkit.org/show_bug.cgi?id=194163

Reviewed by Simon Fraser.

Source/WebCore:

Fix a typo.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):

Tools:

775

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

7 months agoMove XPCService entry points from mac directory to new Cocoa directory
achristensen@apple.com [Fri, 1 Feb 2019 23:32:42 +0000 (23:32 +0000)]
Move XPCService entry points from mac directory to new Cocoa directory
https://bugs.webkit.org/show_bug.cgi?id=194129

Reviewed by Chris Dumez.

* Configurations/NetworkService.xcconfig:
* Configurations/PluginService.64.xcconfig:
* Configurations/WebContentService.xcconfig:
* NetworkProcess/EntryPoint/Cocoa: Copied from Source/WebKit/NetworkProcess/EntryPoint/mac.
* NetworkProcess/EntryPoint/mac: Removed.
* PluginProcess/EntryPoint/Cocoa: Copied from Source/WebKit/PluginProcess/EntryPoint/mac.
* PluginProcess/EntryPoint/mac: Removed.
* Shared/EntryPointUtilities/Cocoa: Copied from Source/WebKit/Shared/EntryPointUtilities/mac.
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
* Shared/EntryPointUtilities/mac: Removed.
* SourcesCocoa.txt:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/EntryPoint/Cocoa: Copied from Source/WebKit/WebProcess/EntryPoint/mac.
* WebProcess/EntryPoint/mac: Removed.

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

7 months agoWeb Inspector: create icons for media event types instead of using a blue circle
drousso@apple.com [Fri, 1 Feb 2019 23:29:36 +0000 (23:29 +0000)]
Web Inspector: create icons for media event types instead of using a blue circle
https://bugs.webkit.org/show_bug.cgi?id=190381
<rdar://problem/45507995>

Reviewed by Brian Burg.

* UserInterface/Models/DOMNode.js:
(WI.DOMNode.isPlayEvent): Added.
(WI.DOMNode.isPauseEvent): Added.
(WI.DOMNode.isStopEvent): Added.

* UserInterface/Views/DOMEventsBreakdownView.js:
(WI.DOMEventsBreakdownView.prototype.layout):
* UserInterface/Views/DOMEventsBreakdownView.css:
(.dom-events-breakdown tr > :matches(th, td)):
(.dom-events-breakdown .graph):
(.dom-events-breakdown .graph > :matches(img, .area)): Added.
(.dom-events-breakdown .graph > img): Added.
(.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > img): Added.
(.dom-events-breakdown .graph > :matches(.point, .area)): Deleted.
(.dom-events-breakdown .graph > .point): Deleted.
(.dom-events-breakdown .inherited > .name, .dom-events-breakdown .inherited > .graph > .point): Deleted.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._populateWaterfallGraph.createDOMEventLine):

* UserInterface/Images/EventPause.svg: Added.
* UserInterface/Images/EventPlay.svg: Added.
* UserInterface/Images/EventProcessing.svg: Added.
* UserInterface/Images/EventStop.svg: Added.

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

7 months agoRewrite and rebaseline smart copy paste tests to work on iOS and MacOS
megan_gardner@apple.com [Fri, 1 Feb 2019 23:27:30 +0000 (23:27 +0000)]
Rewrite and rebaseline smart copy paste tests to work on iOS and MacOS
https://bugs.webkit.org/show_bug.cgi?id=194175

Reviewed by Megan Gardner.

Using the functions committed in 194070 Ryosuke wrote, make the
smart copy paste tests run on both iOS and MacOS.
These tests will be turned on in 193786.

* editing/editing.js:
(runEditingTestWithCallbackLogging):
(runDumpAsTextEditingTest):
* editing/pasteboard/smart-paste-001.html:
* editing/pasteboard/smart-paste-002-expected.txt:
* editing/pasteboard/smart-paste-002.html:
* editing/pasteboard/smart-paste-003.html:
* editing/pasteboard/smart-paste-004.html:
* editing/pasteboard/smart-paste-005-expected.txt:
* editing/pasteboard/smart-paste-005.html:
* editing/pasteboard/smart-paste-006-expected.txt:
* editing/pasteboard/smart-paste-006.html:
* editing/pasteboard/smart-paste-007.html:
* editing/pasteboard/smart-paste-008.html:
* platform/mac/editing/pasteboard/smart-paste-008-expected.txt:

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

7 months ago[iOS] Consistent 1 sec hang when triggering modal alerts while handling synchronous...
wenson_hsieh@apple.com [Fri, 1 Feb 2019 23:12:14 +0000 (23:12 +0000)]
[iOS] Consistent 1 sec hang when triggering modal alerts while handling synchronous touch events
https://bugs.webkit.org/show_bug.cgi?id=194140
<rdar://problem/47728098>

Reviewed by Tim Horton.

Source/WebKit:

Currently, the UI process hangs when attempting to synchronously present modal UI from the web process while the
UI process is waiting for sync IPC in the web process. While we have logic to generally mitigate IPC deadlock in
this scenario by dispatching the web process' sync IPC immediately with the intention of allowing the web
process to finish processing sync IPC (and consequently unblock the UI process), this fails in the case where
the sync IPC message from the web process to the UI process requires main thread execution for an arbitrary
amount of time (for instance, modal alert dialogs). In this case, we'll end up in a state where we've handled
the web process' sync IPC in the UI process, yet we can't resume execution since the web process is still
blocked.

By far the most egregious scenario in which this manifests is during synchronous gesture recognizer IPC, i.e.
grabbing position information from the UI process, and handling touch events synchronously. Luckily, these are
also cases where (1) we know sync IPC may safely time out, and (2) the presentation of modal UI from the web
process should cause the gesture recognizers to fail anyways. As such, we can mitigate these scenarios in the
web process by responding to the these pending sync IPC messages *before* sending our own sync IPC to the UI
process.

Test: fast/events/touch/ios/show-modal-alert-during-touch-start.html

* Shared/ios/InteractionInformationAtPosition.h:
(WebKit::InteractionInformationAtPosition::invalidInformation):
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add a new flag to indicate whether an interaction information response can be valid. Interaction information
cannot be valid in the case where the interaction information request was interrupted by certain sync IPC
messages from the web process.

* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationIgnoreSynchronousMessagingTimeoutsForTesting):
(WKContextConfigurationSetIgnoreSynchronousMessagingTimeoutsForTesting):

Add some testing SPI to ignore sync IPC timeouts, for the purposes of testing. Rather than use the existing
Objective-C SPI in WKWebProcessPoolConfiguration, I decided to add C API plumbing for this flag, so that other
non-Cocoa ports may also support the new layout test option to ignore sync IPC timeouts.

* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView ensurePositionInformationIsUpToDate:]):
(-[WKContentView _positionInformationDidChange:]):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):

Cancel any pending sync IPC replies prior to sending sync IPC messages to the UI process which may result in
sync IPC deadlock, by using the new helper method, sendSyncWithDelayedReply, instead of just sendSync.

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

Add a helper to cancel pending sync messages coming in from the UI process that are being called from within
gesture recognizer delegate hooks.

(WebKit::WebPage::touchEventSync):
* WebProcess/WebPage/WebPage.h:

Add a new helper, sendSyncWithDelayedReply, to be used when sending a sync IPC message to the UI process that
cannot be immediately completed upon arrival. Importantly, this cancels pending sync replies, and also passes
IPC::SendSyncOption::InformPlatformProcessWillSuspend.

* WebProcess/WebPage/WebPage.messages.in:

Change these from LegacySync to Delayed messages.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

Make this sync IPC handler (as well as WebPage::touchEventSync) store the IPC reply during the scope of the
method, and invoke the stored reply at the end of the method if it wasn't interrupted due to something calling
cancelGesturesBlockedOnSynchronousReplies().

(WebKit::WebPage::positionInformation):

Refactor getPositionInformation by pulling out the logic for building an InteractionInformationAtPosition into
a separate helper.

(WebKit::WebPage::requestPositionInformation):

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setShouldDismissJavaScriptAlertsAsynchronously):

Add a new TestRunner hook to make modal JavaScript alerts dismiss asynchronously. This is used by the new layout
test to induce an IPC deadlock when presenting a modal alert during touch start.

* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::runJavaScriptAlert):

Add a client callback function for running JavaScript alerts.

(WTR::TestController::createOtherPage):
(WTR::TestController::generateContextConfiguration const):

Add a test option to disable IPC timeouts for a layout test. This forces the test to reliably time out without
the fix in this patch.

(WTR::TestController::createWebViewWithOptions):

Plumb TestOptions to generateContextConfiguration.

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::TestController::resetStateToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
(WTR::TestController::setShouldDismissJavaScriptAlertsAsynchronously):
(WTR::TestController::handleJavaScriptAlert):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Add a test that induces sync IPC deadlock by presenting a modal alert while handling touch start. This test
forces sync IPC timeouts to be disabled, and passes if we do not time out while handling a touch.

* fast/events/touch/ios/show-modal-alert-during-touch-start-expected.txt: Added.
* fast/events/touch/ios/show-modal-alert-during-touch-start.html: Added.

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

7 months agoNetwork Process crash when resuming downloads: '-[__NSDictionaryI setObject:forKey...
david_quesada@apple.com [Fri, 1 Feb 2019 23:08:48 +0000 (23:08 +0000)]
Network Process crash when resuming downloads: '-[__NSDictionaryI setObject:forKey:]: unrecognized selector sent to instance %p'
https://bugs.webkit.org/show_bug.cgi?id=194144
rdar://problem/47553456

Reviewed by Geoffrey Garen.

* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::resume):
    Make a mutable copy of the root object decoded from the resume data.
    It might have been originally encoded as an immutable dictionary.

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

7 months agoREGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed...
cdumez@apple.com [Fri, 1 Feb 2019 22:52:58 +0000 (22:52 +0000)]
REGRESSION: Flaky ASSERTION FAILED: m_uncommittedState.state == State::Committed on http/tests/cookies/same-site/fetch-after-top-level-navigation-initiated-from-iframe-in-cross-origin-page.html
https://bugs.webkit.org/show_bug.cgi?id=193740
<rdar://problem/47527267>

Reviewed by Alex Christensen.

Source/WebCore:

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::continueAfterContentPolicy):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
* loader/FrameLoader.h:
* loader/FrameLoaderTypes.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
* loader/PolicyChecker.h:

Source/WebKit:

The issue was happening when the page is triggering a cross-site navigation while in the middle of parsing. This would cause us to
start a new provisional load in a new process before the previous process sends the DidFinishLoadForFrame() IPC to the UIProcess.
Getting such IPC after a provisional load has started would mess up our state machine and trip assertions.

This patch restores non-PSON behavior which is that the previous load in the old process now gets stopped so that no DidFinishLoadForFrame()
/ DidFailLoadForFrame() gets sent. To achieve this behavior, I introduced a new "StopAllLoads" PolicyAction that we now send the old
process when the load is continuing in a new process, instead of sending it "Ignore".

* NetworkProcess/NetworkDataTaskBlob.cpp:
(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(toNSURLSessionResponseDisposition):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

7 months agoUnreviewed build fix; Respect the 'condition:' field in the WebPreferences.yaml when...
jer.noble@apple.com [Fri, 1 Feb 2019 22:49:46 +0000 (22:49 +0000)]
Unreviewed build fix; Respect the 'condition:' field in the WebPreferences.yaml when generating
WebPreferencesStoreDefaultsMap.cpp.

* page/SettingsBase.h:

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

7 months agoRemove invalid assertion in DFG's compileDoubleRep().
mark.lam@apple.com [Fri, 1 Feb 2019 22:47:19 +0000 (22:47 +0000)]
Remove invalid assertion in DFG's compileDoubleRep().
https://bugs.webkit.org/show_bug.cgi?id=194130
<rdar://problem/47699474>

Reviewed by Saam Barati.

JSTests:

* stress/constant-fold-double-rep-into-double-constant.js: Added.

Source/JavaScriptCore:

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileDoubleRep):

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

7 months agoDispatch pointercancel events when content is panned or zoomed on iOS
graouts@webkit.org [Fri, 1 Feb 2019 21:53:40 +0000 (21:53 +0000)]
Dispatch pointercancel events when content is panned or zoomed on iOS
https://bugs.webkit.org/show_bug.cgi?id=193962
<rdar://problem/47629134>

Reviewed by Dean Jackson.

Source/WebCore:

Expose two new methods on PointerCaptureController so that, given a pointer id, it can be established whether this pointer
has been cancelled, which is important because a cancelled pointer should no longer dispatch any further pointer events, and
to cancel a pointer.

Tests: pointerevents/ios/touch-action-pointercancel-pan-x.html
       pointerevents/ios/touch-action-pointercancel-pan-y.html
       pointerevents/ios/touch-action-pointercancel-pinch-zoom.html

* WebCore.xcodeproj/project.pbxproj: Make PointerCaptureController.h Private so that it can be imported from WebKit.
* dom/PointerEvent.h: Remove an unnecessary #if ENABLE(POINTER_EVENTS) since the entire file is already contained in one.
Then we add a new create() method that takes an event type, a pointer id and a pointer type (touch vs. pen) that we use
to create pointercancel events in PointerCaptureController::cancelPointer().
* page/Page.cpp:
(WebCore::Page::Page): Pass the Page as a parameter when creating the PointerCaptureController.
* page/PointerCaptureController.cpp:
(WebCore::PointerCaptureController::PointerCaptureController): Add a Page reference to the constructor since we'll need
the page to access its main frame's EventHandler to perform hit testing in case we do not have a capture target override
in cancelPointer().
(WebCore::PointerCaptureController::releasePointerCapture): Drive-by, remove the the implicit parameter since on iOS we
don't need to differentiate. We'll bring this back for the macOS work.
(WebCore::PointerCaptureController::hasCancelledPointerEventForIdentifier): New method we'll use when dispatching pointer
events to identify whether a pointer id has already been cancelled which will allow for _not_ dispatching any further
pointer events for this pointer id.
(WebCore::PointerCaptureController::pointerEventWillBeDispatched): Keep track of the pointer type so we can preserve it
when dispatching pointercancel events for a given pointer id.
(WebCore::PointerCaptureController::cancelPointer): Dispatch a pointercancel for the provided pointer id, using the capture
target override as the event's target, if there is one, and otherwise hit-testing at the provided location to figure out
what the target should be.
* page/PointerCaptureController.h: Switch the target overrides from Element* to RefPtr<Element> to ensure it may not be
deleted while we still need them. Existing code already ensures these get set to nullptr.

Source/WebKit:

When a user-agent-provided interaction, such as panning or zooming on iOS, uses a set of touches, we should dispatch a pointercancel
event for the pointer ids of the touches involved. To facilitate this, we add a new method on WKContentView to cancel all the pointers
matching active touches for a provided UIGestureRecognizer through an async IPC call into the Web process using the new method
PointerCaptureController::cancelPointer().

* Platform/spi/ios/UIKitSPI.h: Add the necessary forward declaration for a necessary UIKit SPI allowing us to get the set of last-seen
UITouches by the identifier generated for the matching WebKit touch.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a pinch gesture on the
top-level UIScrollView.
(-[WKWebView _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]): Dispatch
touchcancel events for all pointers involved in a pan gesture on the top-level UIScrollView. We can infer this by looking at whether the
adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
* UIProcess/PageClient.h: Expose a new virtual cancelPointersForGestureRecognizer() method which will allow the iOS implementation to
forward the call to WKContentViewInteraction.
(WebKit::PageClient::cancelPointersForGestureRecognizer):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: Expose the WebPageProxy such that we may access it to cancel pointers for
a given gesture recognizer from within ScrollingTreeScrollingNodeDelegateIOS.
(WebKit::RemoteScrollingCoordinatorProxy::webPageProxy const):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(-[WKScrollingNodeScrollViewDelegate _scrollView:adjustedOffsetForOffset:translation:startPoint:locationInView:horizontalVelocity:verticalVelocity:]):
Dispatch touchcancel events for all pointers involved in a pan gesture on a nested UIScrollView. We can infer this by looking at
whether the adjusted content offset, after accounting for the permitted touch actions, is different from the original content offset.
(-[WKScrollingNodeScrollViewDelegate scrollViewWillBeginZooming:withView:]): Dispatch touchcancel events for all pointers involved in a
pinch gesture on a nested UIScrollView.
(-[WKScrollingNodeScrollViewDelegate cancelPointersForGestureRecognizer:]):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::cancelPointersForGestureRecognizer):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::cancelPointer):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::cancelPointersForGestureRecognizer):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cancelPointersForGestureRecognizer:]): Obtain all active UITouch objects for the view and dispatch a pointercancel event,
through the WebPageProxy, for all touches associated with the provided gesture recognizer.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::cancelPointer):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

LayoutTests:

Adding a few tests for "pointercancel" and adding "touch-action: none" on tests that would now be affected by canceling pointers. We also unflake a few tests.

* pointerevents/ios/pointer-events-implicit-capture.html:
* pointerevents/ios/pointer-events-is-primary.html:
* pointerevents/ios/touch-action-pan-x-pan-y.html:
* pointerevents/ios/touch-action-pan-x.html:
* pointerevents/ios/touch-action-pan-y-expected.txt:
* pointerevents/ios/touch-action-pan-y.html:
* pointerevents/ios/touch-action-pinch-zoom-allows-zooming.html:
* pointerevents/ios/touch-action-pointercancel-pan-x-expected.txt: Added.
* pointerevents/ios/touch-action-pointercancel-pan-x.html: Added.
* pointerevents/ios/touch-action-pointercancel-pan-y-expected.txt: Added.
* pointerevents/ios/touch-action-pointercancel-pan-y.html: Added.
* pointerevents/ios/touch-action-pointercancel-pinch-zoom-expected.txt: Added.
* pointerevents/ios/touch-action-pointercancel-pinch-zoom.html: Added.

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

7 months agoMake the WebKit default for media source based on the WebCore default.
jer.noble@apple.com [Fri, 1 Feb 2019 21:48:53 +0000 (21:48 +0000)]
Make the WebKit default for media source based on the WebCore default.
https://bugs.webkit.org/show_bug.cgi?id=194172

Reviewed by Eric Carlson.

Source/WebCore:

* page/SettingsBase.h:

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setMediaSourceEnabled:]):
(-[WKPreferences _mediaSourceEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

7 months agoWeb Inspector: Make WI.ColumnChart a WI.View subclass
joepeck@webkit.org [Fri, 1 Feb 2019 21:40:25 +0000 (21:40 +0000)]
Web Inspector: Make WI.ColumnChart a WI.View subclass
https://bugs.webkit.org/show_bug.cgi?id=194171

Rubber-stamped by Devin Rousso.

* UserInterface/Views/CPUTimelineOverviewGraph.js:
(WI.CPUTimelineOverviewGraph):
* UserInterface/Views/ColumnChart.js:
(WI.ColumnChart):
(WI.ColumnChart.prototype.set size):
(WI.ColumnChart.prototype.layout):
(WI.ColumnChart.prototype.get element): Deleted.
(WI.ColumnChart.prototype.needsLayout): Deleted.
(WI.ColumnChart.prototype.updateLayout): Deleted.

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

7 months agoWeb Inspector: Make WI.StackedLineChart a WI.View subclass
joepeck@webkit.org [Fri, 1 Feb 2019 21:24:20 +0000 (21:24 +0000)]
Web Inspector: Make WI.StackedLineChart a WI.View subclass
https://bugs.webkit.org/show_bug.cgi?id=194119

Rubber-stamped by Devin Rousso.

* UserInterface/Views/LineChart.js:
(WI.LineChart.prototype.layout):
(WI.LineChart):
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WI.MemoryTimelineOverviewGraph):
* UserInterface/Views/StackedLineChart.js:
(WI.StackedLineChart):
(WI.StackedLineChart.prototype.set size):
(WI.StackedLineChart.prototype.layout):
(WI.StackedLineChart.prototype.get element): Deleted.
(WI.StackedLineChart.prototype.get points): Deleted.
(WI.StackedLineChart.prototype.needsLayout): Deleted.
(WI.StackedLineChart.prototype.updateLayout): Deleted.

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

7 months agoWeb Inspector: Make WI.CircleChart a WI.View subclass
joepeck@webkit.org [Fri, 1 Feb 2019 21:24:18 +0000 (21:24 +0000)]
Web Inspector: Make WI.CircleChart a WI.View subclass
https://bugs.webkit.org/show_bug.cgi?id=194118

Reviewed by Matt Baker.

* UserInterface/Views/CircleChart.js:
(WI.CircleChart.prototype.get centerElement):
(WI.CircleChart.prototype.layout):
(WI.CircleChart.prototype.get element): Deleted.
(WI.CircleChart.prototype.needsLayout): Deleted.
(WI.CircleChart.prototype.updateLayout): Deleted.
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView):

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

7 months agoWeb Inspector: Timeline Detail Views do not reset properly when new time range select...
joepeck@webkit.org [Fri, 1 Feb 2019 21:24:16 +0000 (21:24 +0000)]
Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
https://bugs.webkit.org/show_bug.cgi?id=194115
<rdar://problem/47716693>

Rubber-stamped by Devin Rousso.

* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView.prototype.reset):
(WI.CPUTimelineView.prototype.clear):
(WI.CPUTimelineView.prototype.layout):
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView.prototype.reset):
(WI.MemoryTimelineView.prototype.clear):
(WI.MemoryTimelineView.prototype.layout):
When there are no visible records in the selected range clear our UI.
Introduce a `clear` method that clears the UI but keeps
non-range-specific values (e.g. maximums).

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

7 months agoWeb Inspector: Memory timeline starts from zero when both CPU and Memory timeline...
joepeck@webkit.org [Fri, 1 Feb 2019 21:24:14 +0000 (21:24 +0000)]
Web Inspector: Memory timeline starts from zero when both CPU and Memory timeline are enabled
https://bugs.webkit.org/show_bug.cgi?id=194111
<rdar://problem/47714555>

Rubber-stamped by Devin Rousso.

* page/ResourceUsageThread.cpp:
(WebCore::ResourceUsageThread::waitUntilObservers):
(WebCore::ResourceUsageThread::threadBody):
Wait a short period of time before the first listener registers
and we start sampling. This will allow multiple listeners to
register, each that wants different data.

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

7 months agoWeb Inspector: Timeline graphs have drawing issues with multiple discontinuities
joepeck@webkit.org [Fri, 1 Feb 2019 21:24:12 +0000 (21:24 +0000)]
Web Inspector: Timeline graphs have drawing issues with multiple discontinuities
https://bugs.webkit.org/show_bug.cgi?id=194110
<rdar://problem/47714356>

Reviewed by Devin Rousso.

* UserInterface/Views/CPUTimelineView.js:
(WI.CPUTimelineView):
(WI.CPUTimelineView.prototype.layout.xScale): Deleted.
* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WI.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
(WI.MemoryTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/MemoryTimelineView.js:
(WI.MemoryTimelineView.prototype.layout.xScale):
(WI.MemoryTimelineView.prototype.layout.yScale):
(WI.MemoryTimelineView.prototype.layout):
Handle if multiple discontinuities exist between records.

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

7 months agoWeb Inspector: Timeline time range selection should show duration alongside start...
joepeck@webkit.org [Fri, 1 Feb 2019 21:24:09 +0000 (21:24 +0000)]
Web Inspector: Timeline time range selection should show duration alongside start and end
https://bugs.webkit.org/show_bug.cgi?id=194109
<rdar://problem/47714279>

Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
Include the duration when not obvious.

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

7 months agoWeb Inspector: Improve API and documentation of ColumnChart
joepeck@webkit.org [Fri, 1 Feb 2019 21:23:51 +0000 (21:23 +0000)]
Web Inspector: Improve API and documentation of ColumnChart
https://bugs.webkit.org/show_bug.cgi?id=193982

Reviewed by Devin Rousso.

This used to be named "BarChart". Convert remaining instances
of "bar" to "column" and clean up related things.

* UserInterface/Views/CPUTimelineOverviewGraph.css:
(body[dir=rtl] .timeline-overview-graph.cpu > .column-chart):
(.timeline-overview-graph.cpu > .column-chart > svg > rect):
(body[dir=rtl] .timeline-overview-graph.cpu > .bar-chart): Deleted.
(.timeline-overview-graph.cpu > .bar-chart > svg > rect): Deleted.
* UserInterface/Views/CPUTimelineOverviewGraph.js:
(WI.CPUTimelineOverviewGraph.prototype.layout):
* UserInterface/Views/ColumnChart.js:
(WI.ColumnChart):
(WI.ColumnChart.prototype.get columns):
(WI.ColumnChart.prototype.addColumn):
(WI.ColumnChart.prototype.clear):
(WI.ColumnChart.prototype.updateLayout):
(WI.ColumnChart.prototype.get bars): Deleted.
(WI.ColumnChart.prototype.addBar): Deleted.
* UserInterface/Views/StackedLineChart.js:
(WI.StackedLineChart.prototype.get element):
(WI.StackedLineChart.prototype.get points):

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

7 months ago[JSC] Unify CodeBlock IsoSubspaces
ysuzuki@apple.com [Fri, 1 Feb 2019 21:14:19 +0000 (21:14 +0000)]
[JSC] Unify CodeBlock IsoSubspaces
https://bugs.webkit.org/show_bug.cgi?id=194167

Reviewed by Saam Barati.

When we move CodeBlock into its IsoSubspace, we create IsoSubspaces for each subclass of CodeBlock.
But this is not necessary since,

1. They do not override the classInfo methods.
2. sizeof(ProgramCodeBlock etc.) == sizeof(CodeBlock) since subclasses adds no additional fields.

Creating IsoSubspace for each subclass is costly in terms of memory. Especially, IsoSubspace for
ProgramCodeBlock is. We typically create only one ProgramCodeBlock, and it means the rest of the
MarkedBlock (16KB - sizeof(footer) - sizeof(ProgramCodeBlock)) is just wasted.

This patch unifies these IsoSubspaces into one.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::destroy):
* bytecode/CodeBlock.h:
* bytecode/EvalCodeBlock.cpp:
(JSC::EvalCodeBlock::destroy): Deleted.
* bytecode/EvalCodeBlock.h: We drop some utility functions in EvalCodeBlock and use UnlinkedEvalCodeBlock's one directly.
* bytecode/FunctionCodeBlock.cpp:
(JSC::FunctionCodeBlock::destroy): Deleted.
* bytecode/FunctionCodeBlock.h:
* bytecode/GlobalCodeBlock.h:
* bytecode/ModuleProgramCodeBlock.cpp:
(JSC::ModuleProgramCodeBlock::destroy): Deleted.
* bytecode/ModuleProgramCodeBlock.h:
* bytecode/ProgramCodeBlock.cpp:
(JSC::ProgramCodeBlock::destroy): Deleted.
* bytecode/ProgramCodeBlock.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
(JSC::VM::forEachCodeBlockSpace):

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

7 months ago[ews-app] Add display name field to BuilderMapping model
aakash_jain@apple.com [Fri, 1 Feb 2019 20:22:51 +0000 (20:22 +0000)]
[ews-app] Add display name field to BuilderMapping model
https://bugs.webkit.org/show_bug.cgi?id=194153

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/models/buildermapping.py:
(BuilderMapping):

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

7 months agoForce settings.acceleratedCompositingEnabled() to true for WebKit
simon.fraser@apple.com [Fri, 1 Feb 2019 20:20:26 +0000 (20:20 +0000)]
Force settings.acceleratedCompositingEnabled() to true for WebKit
https://bugs.webkit.org/show_bug.cgi?id=194166
rdar://problem/47694328

Reviewed by Tim Horton.

WebKit relies on accelerated compositing for its drawing areas to function correctly,
and sometimes clients (*cough* Safari *cough*) have bugs where they clobber the settings,
so force this setting to be always on (and release log if this happens).

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

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

7 months agoDon't use base layer() as the scroll layer in scrolling tree.
antti@apple.com [Fri, 1 Feb 2019 20:10:23 +0000 (20:10 +0000)]
Don't use base layer() as the scroll layer in scrolling tree.
https://bugs.webkit.org/show_bug.cgi?id=194160

Reviewed by Simon Fraser.

Source/WebCore:

Maintain scrollContainerLayer() and scrolledContentsLayer() separately in ScrollingTreeScrollingNode.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::setNodeLayers):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setNodeLayers):

Turn the long layer parameter list into a struct.

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::setAllPropertiesChanged):
(WebCore::ScrollingStateNode::setLayer):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged):
(WebCore::ScrollingStateScrollingNode::setScrollContainerLayer):
(WebCore::ScrollingStateScrollingNode::dumpProperties const):
* page/scrolling/ScrollingStateScrollingNode.h:
(WebCore::ScrollingStateScrollingNode::scrollContainerLayer const):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::scrollContainerLayer const):
(WebCore::ScrollingTreeScrollingNode::scrolledContentsLayer const):
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer const): Deleted.
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::exposedUnfilledArea const):
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeForViewportConstrainedRole):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
(WebCore::RenderLayerCompositor::updateScrollingNodeForFrameHostingRole):

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateNode>::encode):
(ArgumentCoder<ScrollingStateNode>::decode):
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::dump):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeFrameScrollingNodeRemoteIOS.mm:
(WebKit::ScrollingTreeFrameScrollingNodeRemoteIOS::commitStateBeforeChildren):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

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

7 months agoUnreviewed, follow-up after r240859
ysuzuki@apple.com [Fri, 1 Feb 2019 19:33:21 +0000 (19:33 +0000)]
Unreviewed, follow-up after r240859
https://bugs.webkit.org/show_bug.cgi?id=194145

Replace OOB HeapCellType with cellHeapCellType since they are completely the same.
And rename cellDangerousBitsSpace back to cellSpace.

* runtime/JSCellInlines.h:
(JSC::JSCell::subspaceFor):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

7 months ago[JSC] Remove cellJSValueOOBSpace
ysuzuki@apple.com [Fri, 1 Feb 2019 18:59:55 +0000 (18:59 +0000)]
[JSC] Remove cellJSValueOOBSpace
https://bugs.webkit.org/show_bug.cgi?id=194145

Reviewed by Mark Lam.

* runtime/JSObject.h:
(JSC::JSObject::subspaceFor): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

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

7 months ago[SOUP] Improve use of SoupCookiePersistentStorageType
mcatanzaro@igalia.com [Fri, 1 Feb 2019 17:49:10 +0000 (17:49 +0000)]
[SOUP] Improve use of SoupCookiePersistentStorageType
https://bugs.webkit.org/show_bug.cgi?id=194103

Reviewed by Carlos Garcia Campos.

Turn it into an enum class, and stop casting it to and from uint32_t.

* NetworkProcess/Cookies/WebCookieManager.h:
* NetworkProcess/Cookies/WebCookieManager.messages.in:
* NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::setCookiePersistentStorage):
* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::decode):
* NetworkProcess/NetworkSessionCreationParameters.h:
* Shared/soup/SoupCookiePersistentStorageType.h:
(): Deleted.
* UIProcess/API/glib/WebKitCookieManager.cpp:
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/soup/WebCookieManagerProxySoup.cpp:
(WebKit::WebCookieManagerProxy::setCookiePersistentStorage):
(WebKit::WebCookieManagerProxy::getCookiePersistentStorage const):

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

7 months ago[macOS] Revert parts of r240811, since it causes kernel panics.
pvollan@apple.com [Fri, 1 Feb 2019 17:47:10 +0000 (17:47 +0000)]
[macOS] Revert parts of r240811, since it causes kernel panics.
https://bugs.webkit.org/show_bug.cgi?id=194061

Unreviewed crash fix.

* WebProcess/com.apple.WebProcess.sb.in:

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

7 months agoAPI Test broken: TestWebKitAPI.WebKit2.GetUserMediaReprompt
youenn@apple.com [Fri, 1 Feb 2019 17:45:22 +0000 (17:45 +0000)]
API Test broken: TestWebKitAPI.WebKit2.GetUserMediaReprompt
https://bugs.webkit.org/show_bug.cgi?id=194155

Reviewed by Eric Carlson.

* TestWebKitAPI/Tests/WebKit/getUserMedia.html:
Revert use of async functions as it seems it cannot be evaluated from TestWebKitAPI.
Keep calling enumerateDevices to continue cover https://bugs.webkit.org/show_bug.cgi?id=194106.

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

7 months ago[SOUP] Improve use of PAL::SessionID in WebKitCookieManager
mcatanzaro@igalia.com [Fri, 1 Feb 2019 16:51:14 +0000 (16:51 +0000)]
[SOUP] Improve use of PAL::SessionID in WebKitCookieManager
https://bugs.webkit.org/show_bug.cgi?id=194092

Reviewed by Carlos Garcia Campos.

Always get it from the data store instead of assuming the default session ID, and add a
helper function for this.

* UIProcess/API/glib/WebKitCookieManager.cpp:
(_WebKitCookieManagerPrivate::sessionID const):
(_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate):
(webkitCookieManagerCreate):
(webkit_cookie_manager_set_persistent_storage):
(webkit_cookie_manager_set_accept_policy):
(webkit_cookie_manager_get_accept_policy):
(webkit_cookie_manager_add_cookie):
(webkit_cookie_manager_get_cookies):
(webkit_cookie_manager_delete_cookie):

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

7 months agoREGRESSION (r240698): fast/scrolling/sticky-to-fixed.html can cause a crash
simon.fraser@apple.com [Fri, 1 Feb 2019 16:45:15 +0000 (16:45 +0000)]
REGRESSION (r240698): fast/scrolling/sticky-to-fixed.html can cause a crash
https://bugs.webkit.org/show_bug.cgi?id=194134
rdar://problem/47721210

Reviewed by Daniel Bates.

fast/scrolling/sticky-to-fixed.html changes the scrolling node type, which causes
scrollingCoordinator->insertNode() to return a different ScrollingNodeID to the one
passed in. We have to handle this, removing the node for the nodeID and unregistering
the layer with the old nodeID.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachScrollingNode):

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

7 months agoREGRESSION(r239915): css3/font-feature-font-face-local.html failing on WPE
carlosgc@webkit.org [Fri, 1 Feb 2019 14:36:31 +0000 (14:36 +0000)]
REGRESSION(r239915): css3/font-feature-font-face-local.html failing on WPE
https://bugs.webkit.org/show_bug.cgi?id=194008

Reviewed by Žan Doberšek.

Source/WebCore:

We need to replace control characters with zero width space too.

* platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
(WebCore::GlyphPage::fill):
* platform/text/CharacterProperties.h:
(WebCore::isControlCharacter):

LayoutTests:

Remove test expectation.

* platform/wpe/TestExpectations:

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

7 months ago[WPE] Enable font variations
carlosgc@webkit.org [Fri, 1 Feb 2019 14:35:08 +0000 (14:35 +0000)]
[WPE] Enable font variations
https://bugs.webkit.org/show_bug.cgi?id=194148

Reviewed by Žan Doberšek.

.:

Enable variation fonts when required dependencies are available.

* Source/cmake/OptionsWPE.cmake:

LayoutTests:

* platform/wpe/TestExpectations:

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

7 months agoComplexText: Test fast/text/word-space-nbsp.html fails when using complex text path
carlosgc@webkit.org [Fri, 1 Feb 2019 14:33:15 +0000 (14:33 +0000)]
ComplexText: Test fast/text/word-space-nbsp.html fails when using complex text path
https://bugs.webkit.org/show_bug.cgi?id=193279

Reviewed by Michael Catanzaro.

Source/WebCore:

The fix applied in r135884 to WidthIterator should also be applied to ComplexTextController.

* platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

LayoutTests:

Remove test expectation.

* platform/gtk/TestExpectations:

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

7 months ago[LFC] Adjust replaced element's intrinsic ratio
zalan@apple.com [Fri, 1 Feb 2019 14:31:04 +0000 (14:31 +0000)]
[LFC] Adjust replaced element's intrinsic ratio
https://bugs.webkit.org/show_bug.cgi?id=194154

Reviewed by Antti Koivisto.

Source/WebCore:

Decouple image and iframe replaced types and set intrinsic ratio accordingly.

* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::Box):
* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::isReplaced const):
(WebCore::Layout::Box::isIFrame const):
(WebCore::Layout::Box::isImage const):
* layout/layouttree/LayoutReplaced.cpp:
(WebCore::Layout::Replaced::hasIntrinsicRatio const):
(WebCore::Layout::Replaced::intrinsicRatio const):
(WebCore::Layout::Replaced::hasAspectRatio const):
* layout/layouttree/LayoutReplaced.h:
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createSubTree):

Tools:

761

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

7 months ago[WPE] Show test results in minibrowser
carlosgc@webkit.org [Fri, 1 Feb 2019 14:28:57 +0000 (14:28 +0000)]
[WPE] Show test results in minibrowser
https://bugs.webkit.org/show_bug.cgi?id=194150

Reviewed by Žan Doberšek.

* Scripts/webkitpy/port/wpe.py:
(WPEPort.show_results_html_file):

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

7 months ago[WPE] MiniBrowser: add ky bindings for back/forward navigation
carlosgc@webkit.org [Fri, 1 Feb 2019 14:27:35 +0000 (14:27 +0000)]
[WPE] MiniBrowser: add ky bindings for back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=194151

Reviewed by Žan Doberšek.

ALT + <- go back
ALT + -> go forward

* MiniBrowser/wpe/main.cpp:
(main):

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

7 months ago[LFC] Set intrinsic size on Layout::Replaced
zalan@apple.com [Fri, 1 Feb 2019 14:15:09 +0000 (14:15 +0000)]
[LFC] Set intrinsic size on Layout::Replaced
https://bugs.webkit.org/show_bug.cgi?id=194139

Reviewed by Antti Koivisto.

Source/WebCore:

Eventually Layout::Replaced will track intrinsic size internally until then let's query the RenderReplaced.

* layout/layouttree/LayoutBox.h:
(WebCore::Layout::Box::replaced):
* layout/layouttree/LayoutReplaced.cpp:
(WebCore::Layout::Replaced::hasIntrinsicWidth const):
(WebCore::Layout::Replaced::hasIntrinsicHeight const):
(WebCore::Layout::Replaced::intrinsicWidth const):
(WebCore::Layout::Replaced::intrinsicHeight const):
* layout/layouttree/LayoutReplaced.h:
(WebCore::Layout::Replaced::setIntrinsicSize):
(WebCore::Layout::Replaced::setIntrinsicRatio):
* layout/layouttree/LayoutTreeBuilder.cpp:
(WebCore::Layout::TreeBuilder::createSubTree):
* rendering/RenderReplaced.h:

Tools:

744

* LayoutReloaded/misc/LFC-passing-tests.txt:

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

7 months agoRace-condition during scrolling thread creation
csaavedra@igalia.com [Fri, 1 Feb 2019 10:32:55 +0000 (10:32 +0000)]
Race-condition during scrolling thread creation
https://bugs.webkit.org/show_bug.cgi?id=194016

Reviewed by Saam Barati.

There is a threading issue during the initialization
of the scrolling thread caused by createThreadIfNeeded
locking only on the creation of the thread but not on
the initialization of the main loop, making it possible
for a thread to try to spin the main loop before it's
created.

Fix this by unconditionally waiting on the main loop
being created. This makes it necessary to always hold
the lock, even when the thread is already created.

* page/scrolling/ScrollingThread.cpp:
(WebCore::ScrollingThread::createThreadIfNeeded):

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

7 months ago[WPE] MiniBrowser: use g_file_new_for_commandline_arg
carlosgc@webkit.org [Fri, 1 Feb 2019 10:03:31 +0000 (10:03 +0000)]
[WPE] MiniBrowser: use g_file_new_for_commandline_arg
https://bugs.webkit.org/show_bug.cgi?id=194146

Reviewed by Xabier Rodriguez-Calvar.

It allows to open relative paths.

* MiniBrowser/wpe/main.cpp:
(main):

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

7 months agoUnreviewed WPE gardening. Remove duplicated expectations.
carlosgc@webkit.org [Fri, 1 Feb 2019 09:48:52 +0000 (09:48 +0000)]
Unreviewed WPE gardening. Remove duplicated expectations.

Remove the platform specific expectations that match the generic ones.

* platform/wpe/animations/lineheight-animation-expected.txt: Removed.
* platform/wpe/animations/simultaneous-start-transform-expected.txt: Removed.
* platform/wpe/animations/width-using-ems-expected.txt: Removed.
* platform/wpe/fast/events/mouseover-mouseout-expected.txt: Removed.
* platform/wpe/fast/events/nested-window-event-expected.txt: Removed.
* platform/wpe/fast/events/window-events-bubble-expected.txt: Removed.
* platform/wpe/fast/events/window-events-bubble2-expected.txt: Removed.
* platform/wpe/fast/replaced/008-expected.txt: Removed.
* platform/wpe/fast/tokenizer/script_extra_close-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-check-initdata-type.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysystemaccess.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input.https-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any.worker-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/fetch/security/dangling-markup-mitigation-data-url.tentative.sub-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-illegal-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/touch-events/historical-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/xhr/formdata-blob-expected.txt: Removed.
* platform/wpe/imported/w3c/web-platform-tests/xhr/formdata-expected.txt: Removed.
* platform/wpe/legacy-animation-engine/animations/lineheight-animation-expected.txt: Removed.
* platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt: Removed.
* platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt: Removed.
* platform/wpe/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt: Removed.
* platform/wpe/svg/custom/pan-direction-expected.txt: Removed.
* platform/wpe/tables/mozilla/bugs/bug149275-2-expected.txt: Removed.
* platform/wpe/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt: Removed.
* platform/wpe/webgl/2.0.0/conformance/context/context-hidden-alpha-expected.txt: Removed.

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

7 months agoUnreviewed WPE gardening. Rebaseline and update expectations after r240774.
carlosgc@webkit.org [Fri, 1 Feb 2019 09:44:07 +0000 (09:44 +0000)]
Unreviewed WPE gardening. Rebaseline and update expectations after r240774.

* platform/wpe/TestExpectations:
* platform/wpe/fast/css/font-weight-1-expected.txt:

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

7 months agoUse ScrollingNodeID in more places, and improve the name of a ScrollableArea function...
simon.fraser@apple.com [Fri, 1 Feb 2019 08:43:33 +0000 (08:43 +0000)]
Use ScrollingNodeID in more places, and improve the name of a ScrollableArea function that returns a ScrollingNodeID
https://bugs.webkit.org/show_bug.cgi?id=194126

Reviewed by Frédéric Wang.

Change uint64_t ScrollableArea::scrollLayerID() to ScrollingNodeID ScrollableArea::scrollingNodeID()
and fix callers.

* page/FrameView.cpp:
(WebCore::FrameView::scrollingNodeID const):
(WebCore::FrameView::scrollLayerID const): Deleted.
* page/FrameView.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView):
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
(WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):
(WebCore::AsyncScrollingCoordinator::updateScrollSnapPropertiesWithFrameView):
* page/scrolling/ScrollingCoordinatorTypes.h:
* platform/ScrollTypes.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollingNodeID const):
(WebCore::ScrollableArea::scrollLayerID const): Deleted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::detachRootLayer):

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

7 months ago[WHLSL] Expressions can't be copyable
mmaxfield@apple.com [Fri, 1 Feb 2019 07:09:22 +0000 (07:09 +0000)]
[WHLSL] Expressions can't be copyable
https://bugs.webkit.org/show_bug.cgi?id=194116

Reviewed by Keith Rollin.

Expressions have UniqueRef members, which can't be copied. Describe this constraint explicitly rather than implicitly.

No new tests because there is no behavior change.

* Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
* Modules/webgpu/WHLSL/AST/WHLSLExpression.h:

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

7 months ago[Curl] Remove unnecessary member from NetworkStorageSession.
commit-queue@webkit.org [Fri, 1 Feb 2019 05:53:06 +0000 (05:53 +0000)]
[Curl] Remove unnecessary member from NetworkStorageSession.
https://bugs.webkit.org/show_bug.cgi?id=194137

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-01-31
Reviewed by Don Olmstead.

Source/WebCore:

No new tests since there is no behavior change.

* platform/network/NetworkStorageSession.h:
* platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::context const): Deleted.

Source/WebKit:

* NetworkProcess/curl/NetworkProcessCurl.cpp:
(WebKit::NetworkProcess::platformCreateDefaultStorageSession const):

Source/WebKitLegacy:

* WebCoreSupport/NetworkStorageSessionMap.cpp:
(NetworkStorageSessionMap::defaultStorageSession):
(NetworkStorageSessionMap::ensureSession):

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

7 months agoNSInvalidArgumentException in [WebAVSampleBufferErrorListener observeValueForKeyPath...
jer.noble@apple.com [Fri, 1 Feb 2019 04:44:57 +0000 (04:44 +0000)]
NSInvalidArgumentException in [WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]
https://bugs.webkit.org/show_bug.cgi?id=194123
<rdar://problem/47721094>

Reviewed by Eric Carlson.

According to crash logs, AVSampleBufferDisplayLayer.error can go from an NSError* to nil; when such a change is KVO'd,
the NSKeyValueChangeNewKey is a NSNull. Detect this state and bail out early.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):

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

7 months ago[Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
jer.noble@apple.com [Fri, 1 Feb 2019 02:32:33 +0000 (02:32 +0000)]
[Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
https://bugs.webkit.org/show_bug.cgi?id=194114

Reviewed by Eric Carlson.

The AVAssetResourceLoaderDelegate must explicitly... delegate responsibility for FairPlay key
requests to the AVContentKeySession.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

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

7 months agoRemove poisoning from CodeBlock and LLInt code.
mark.lam@apple.com [Fri, 1 Feb 2019 01:37:36 +0000 (01:37 +0000)]
Remove poisoning from CodeBlock and LLInt code.
https://bugs.webkit.org/show_bug.cgi?id=194113

Reviewed by Yusuke Suzuki.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::predictedMachineCodeSize):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::vm const):
(JSC::CodeBlock::addConstant):
(JSC::CodeBlock::heap const):
(JSC::CodeBlock::replaceConstant):
* llint/LLIntOfflineAsmConfig.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::handleHostCall):
(JSC::LLInt::setUpCall):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

7 months agoUpdate flakiness dashboard configuration after recent queue changes
ryanhaddad@apple.com [Fri, 1 Feb 2019 01:18:49 +0000 (01:18 +0000)]
Update flakiness dashboard configuration after recent queue changes
https://bugs.webkit.org/show_bug.cgi?id=194127

Rubber-stamped by Aakash Jain.

Apple Windows queues were updated in r237755, and Sierra was removed in r239859.

* TestResultServer/static-dashboards/builders.jsonp:

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

7 months agoAdd an API test to cover UIClient checkUserMediaPermissionForOrigin being nullptr
youenn@apple.com [Fri, 1 Feb 2019 00:45:19 +0000 (00:45 +0000)]
Add an API test to cover UIClient checkUserMediaPermissionForOrigin being nullptr
https://bugs.webkit.org/show_bug.cgi?id=194106
<rdar://problem/47676333>

Reviewed by Ryosuke Niwa.

* TestWebKitAPI/Tests/WebKit/UserMedia.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/getUserMedia.html:

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

7 months agoDon't insert spaces at the beginning of a newline when using smart-copy-paste
megan_gardner@apple.com [Fri, 1 Feb 2019 00:38:55 +0000 (00:38 +0000)]
Don't insert spaces at the beginning of a newline when using smart-copy-paste
https://bugs.webkit.org/show_bug.cgi?id=194070

Source/WebCore:

Reviewed by Tim Horton.

If our inserted content end is at the beginning of a paragraph, do not insert a space.
Also, if our inserted content beginning is at the end of a paragraph, do not insert a space.

Test: editing/pasteboard/mac/copy-smartpaste-first-line-in-textarea.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):

LayoutTests:

Add test for smart copy paste around newlines.
Rebaseline a test that is dependant on a console log that changes lines.
Add additional helper functions to ui-helper.js.

Reviewed by Tim Horton.

* editing/pasteboard/mac/copy-smartpaste-first-line-in-textarea-expected.txt: Added.
* editing/pasteboard/mac/copy-smartpaste-first-line-in-textarea.html: Added.
* http/tests/security/anchor-download-block-crossorigin-expected.txt:
* platform/mac/TestExpectations:
* resources/ui-helper.js:
(window.UIHelper.doubleClickAt):
(window.UIHelper.doubleClickAtThenDragTo):
(window.UIHelper.async.selectWordByDoubleTapOrClick):

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

7 months agoUnreviewed, build fix after r240805
jiewen_tan@apple.com [Fri, 1 Feb 2019 00:34:58 +0000 (00:34 +0000)]
Unreviewed, build fix after r240805

This patch reverts the BlockPtr change since it breaks iOS builds.

* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryInterceptNavigation):

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

7 months ago[WebGPU] Build fix: disable MTLCopyAllDevices call on non-Mac platforms
ryanhaddad@apple.com [Fri, 1 Feb 2019 00:17:51 +0000 (00:17 +0000)]
[WebGPU] Build fix: disable MTLCopyAllDevices call on non-Mac platforms
https://bugs.webkit.org/show_bug.cgi?id=194120

Unreviewed build fix.

No new tests; no change in behavior.

Patch by Justin Fan <justin_fan@apple.com> on 2019-01-31

* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::create): Wrap problem code in #if PLATFORM(MAC).

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

7 months agoBasic scrollability for async overflow scrolling on macOS
simon.fraser@apple.com [Thu, 31 Jan 2019 23:58:25 +0000 (23:58 +0000)]
Basic scrollability for async overflow scrolling on macOS
https://bugs.webkit.org/show_bug.cgi?id=194093

Reviewed by Antti Koivisto.

Give a ScrollingTreeOverflowScrollingNodeMac a ScrollingTreeScrollingNodeDelegateMac and have it keep track
of its layers so basic scrolling works for async overflow scroll.

* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
(WebCore::ScrollingTreeOverflowScrollingNodeMac::create):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPosition):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateScrollingLayers):

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

7 months agoGeneralize ScrollingTreeScrollingNodeDelegate for use in macOS too, add a macOS subcl...
simon.fraser@apple.com [Thu, 31 Jan 2019 23:26:38 +0000 (23:26 +0000)]
Generalize ScrollingTreeScrollingNodeDelegate for use in macOS too, add a macOS subclass for frame/overflow scrolling
https://bugs.webkit.org/show_bug.cgi?id=194080

Reviewed by Antti Koivisto.

To share code between ScrollingTreeFrameScrollingNodeMac and ScrollingTreeOverflowScrollingNodeMac, build ScrollingTreeScrollingNodeDelegate
for macOS too, and add some helper functions to ScrollingTreeScrollingNodeDelegate.

Add a macOS subclass, ScrollingTreeScrollingNodeDelegateMac, which takes over the basic scrolling, rubber-banding
and scroll snapping functionality from ScrollingTreeFrameScrollingNodeMac. The delegate owns the ScrollController and
implements ScrollControllerClient.

ScrollingTreeFrameScrollingNodeMac now owns a ScrollingTreeScrollingNodeDelegateMac. A future patch
will add one to ScrollingTreeOverflowScrollingNodeMac.

No behavior change.

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::scrollBy): Deleted.
(WebCore::ScrollingTreeFrameScrollingNode::scrollByWithoutContentEdgeConstraints): Deleted.
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
(WebCore::ScrollingTreeFrameScrollingNode::frameScaleFactor const):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::isRootNode const):
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::scrollBy):
(WebCore::ScrollingTreeScrollingNode::scrollByWithoutContentEdgeConstraints):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::expectsWheelEventTestTrigger const):
* page/scrolling/ScrollingTreeScrollingNodeDelegate.cpp:
* page/scrolling/ScrollingTreeScrollingNodeDelegate.h:
(WebCore::ScrollingTreeScrollingNodeDelegate::scrollPosition const):
(WebCore::ScrollingTreeScrollingNodeDelegate::minimumScrollPosition const):
(WebCore::ScrollingTreeScrollingNodeDelegate::maximumScrollPosition const):
(WebCore::ScrollingTreeScrollingNodeDelegate::scrollableAreaSize const):
(WebCore::ScrollingTreeScrollingNodeDelegate::totalContentsSize const):
(WebCore::ScrollingTreeScrollingNodeDelegate::hasEnabledHorizontalScrollbar const):
(WebCore::ScrollingTreeScrollingNodeDelegate::hasEnabledVerticalScrollbar const):
(WebCore::ScrollingTreeScrollingNodeDelegate::horizontalScrollElasticity const):
(WebCore::ScrollingTreeScrollingNodeDelegate::verticalScrollElasticity const):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeFrameScrollingNodeMac::minimumScrollPosition const):
(WebCore::ScrollingTreeFrameScrollingNodeMac::maximumScrollPosition const):
(WebCore::newGestureIsStarting): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::isAlreadyPinnedInDirectionOfGesture): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::allowsHorizontalStretching): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::allowsVerticalStretching): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stretchAmount): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::pinnedInDirection): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollHorizontally): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::canScrollVertically): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::shouldRubberBandInDirection): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollBy): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffset const): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor const): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtent const): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::viewportSize const): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::deferTestsForReason const): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::removeTestDeferralForReason const): Deleted.
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h.
* page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: Added.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::ScrollingTreeScrollingNodeDelegateMac):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::updateScrollSnapPoints):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::setActiveScrollSnapIndexForAxis):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::activeScrollSnapIndexForAxis const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::activeScrollSnapIndexDidChange const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isScrollSnapInProgress const):
(WebCore::newGestureIsStarting):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isAlreadyPinnedInDirectionOfGesture):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::pinnedInDirection):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollVertically):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollBy):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollByWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stopSnapRubberbandTimer):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::adjustScrollPositionToBoundsIfNecessary):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::scrollOffset const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::immediateScrollOnAxis):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::pageScaleFactor const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::startScrollSnapTimer):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stopScrollSnapTimer):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::scrollExtent const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::viewportSize const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::deferTestsForReason const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::removeTestDeferralForReason const):

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

7 months agoWeb Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
commit-queue@webkit.org [Thu, 31 Jan 2019 23:26:29 +0000 (23:26 +0000)]
Web Inspector: Timeline time range selection sometimes shows 0.000, should be just 0
https://bugs.webkit.org/show_bug.cgi?id=194108
<rdar://problem/47714273>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2019-01-31
Reviewed by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Base/Utilities.js:
Check under epsilon for the zero case.

LayoutTests:

* inspector/unit-tests/number-utilities-expected.txt:
* inspector/unit-tests/number-utilities.html:

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

7 months ago[JSC] Remove finalizer in AsyncFromSyncIteratorPrototype
ysuzuki@apple.com [Thu, 31 Jan 2019 23:20:08 +0000 (23:20 +0000)]
[JSC] Remove finalizer in AsyncFromSyncIteratorPrototype
https://bugs.webkit.org/show_bug.cgi?id=194107

Reviewed by Saam Barati.

AsyncFromSyncIteratorPrototype uses the finalizer, but it is not necessary since it does not hold any objects which require destruction.
We drop this finalizer. And we also make methods of AsyncFromSyncIteratorPrototype lazily allocated.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/AsyncFromSyncIteratorPrototype.cpp:
(JSC::AsyncFromSyncIteratorPrototype::AsyncFromSyncIteratorPrototype):
(JSC::AsyncFromSyncIteratorPrototype::finishCreation):
(JSC::AsyncFromSyncIteratorPrototype::create):
* runtime/AsyncFromSyncIteratorPrototype.h:

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

7 months ago[Mac] Requesting PiP from two different WebViews gets PiP window "stuck"
jer.noble@apple.com [Thu, 31 Jan 2019 22:28:19 +0000 (22:28 +0000)]
[Mac] Requesting PiP from two different WebViews gets PiP window "stuck"
https://bugs.webkit.org/show_bug.cgi?id=194099
<rdar://problem/47271323>

Reviewed by Eric Carlson.

When a different client requests the PiP window, the PiP framework will call -pipDidClose: without
first calling -pipActionStop:. This leaves the internal fullscreen state in a confused state where
the WebView will attempt to re-enter PiP once it gets focus, and can lead to a state where the two
WebViews will constantly try to steal PiP from one another, ad infinitum.

When receiving a notification that the PiP window closed when our internal state tells us that the
close was not requested, notify the client that PiP mode was exited, allowing them to set their
expected state to a correct and sane value.

* platform/mac/VideoFullscreenInterfaceMac.mm:
(-[WebVideoFullscreenInterfaceMacObjC pipDidClose:]):

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

7 months agoFix `runJITThreadLimitTests` in testapi
tzagallo@apple.com [Thu, 31 Jan 2019 22:21:57 +0000 (22:21 +0000)]
Fix `runJITThreadLimitTests` in testapi
https://bugs.webkit.org/show_bug.cgi?id=194064
<rdar://problem/46139147>

Reviewed by Mark Lam.

Fix typo where `targetNumberOfThreads` was not being used.

* API/tests/testapi.mm:
(runJITThreadLimitTests):

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

7 months agotestapi fails RELEASE_ASSERT(codeBlock) in fetchFromDisk() of CodeCache.h
tzagallo@apple.com [Thu, 31 Jan 2019 22:19:52 +0000 (22:19 +0000)]
testapi fails RELEASE_ASSERT(codeBlock) in fetchFromDisk() of CodeCache.h
https://bugs.webkit.org/show_bug.cgi?id=194112

Reviewed by Mark Lam.

`testBytecodeCache` does not populate the bytecode cache for the global
CodeBlock, so it should only enable `forceDiskCache` after its execution.

* API/tests/testapi.mm:
(testBytecodeCache):

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

7 months agoREGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing...
mattbaker@apple.com [Thu, 31 Jan 2019 22:17:49 +0000 (22:17 +0000)]
REGRESSION(r?): Web Inspector: Clicking on text doesn't move text caret when editing innerHTML/tagName/attribute
https://bugs.webkit.org/show_bug.cgi?id=192652
<rdar://problem/46684612>

Reviewed by Devin Rousso.

* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.canSelectOnMouseDown):
Call to Event.preventDefault() should be made here instead of at the
TreeOutline level.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.selectOnMouseDown): Deleted.
Remove dead code.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline._handleMouseDown):
Do not prevent default event handling when the item cannot be selected.
This matches TreeOutline behavior prior to introducing SelectionController.

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

7 months agoPage zoom level is lost after a process swap or a crash
cdumez@apple.com [Thu, 31 Jan 2019 22:14:17 +0000 (22:14 +0000)]
Page zoom level is lost after a process swap or a crash
https://bugs.webkit.org/show_bug.cgi?id=194105
<rdar://problem/47610781>

Reviewed by Alex Christensen.

Source/WebKit:

Previously, when the client would call setPageAndTextZoomFactors() on the WebPageProxy,
we would update the WebPageProxy's corresponding data members and send an IPC to the
WebProcess to apply the zoom factors.

The issue is that on process crash or process-swap, we never communicate those zoom factors
to the new WebProcess. Even if the client were to call setPageAndTextZoomFactors() with
the same factors again, it would be a no-op since the WebPageProxy's data members already
reflect the expected values.

To address the issue, pass both the page zoom and the text zoom factors to the WebProcess
via WebPageCreationParameters. This way, there is no need to send an extra IPC and we're
sure the WebPageProxy's factors are properly applied to the WebPage on WebContent process
side upon creation (whether after a crash or a process swap).

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didCommitNavigation:]):

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

7 months ago[ MacOS ] Layout Test performance-api/performance-observer-callback-after-gc.html...
cdumez@apple.com [Thu, 31 Jan 2019 22:13:53 +0000 (22:13 +0000)]
[ MacOS ] Layout Test performance-api/performance-observer-callback-after-gc.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=191041
<rdar://problem/45649982>

Reviewed by Joseph Pecoraro.

Make the test print the same output no matter if the performance observer is notified once or
twice. What matters is that it is notified about 3 marks.

* performance-api/performance-observer-callback-after-gc-expected.txt:
* performance-api/performance-observer-callback-after-gc.html:

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

7 months agoWebCore::WHLSL::AST::Expression copy constructor needs to be be default, not delete
krollin@apple.com [Thu, 31 Jan 2019 22:11:32 +0000 (22:11 +0000)]
WebCore::WHLSL::AST::Expression copy constructor needs to be be default, not delete
https://bugs.webkit.org/show_bug.cgi?id=194055
<rdar://problem/47684570>

Reviewed by Myles C. Maxfield.

WebCore::WHLSL::AST::Expression has a deleted copy constructor.
EnumerationMemberLiteral, a subclass, has a default copy constructor.
Some compilers may complain that the latter's c'tor can't access the
former's, because it doesn't exist. Fix this by marking Expression's
c'tor as default.

No new tests since there should be no observable behavior difference.

* Modules/webgpu/WHLSL/AST/WHLSLExpression.h:

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

7 months ago[macOS] Disable permissive call logging in sandbox
pvollan@apple.com [Thu, 31 Jan 2019 21:43:01 +0000 (21:43 +0000)]
[macOS] Disable permissive call logging in sandbox
https://bugs.webkit.org/show_bug.cgi?id=194061

Reviewed by Alexey Proskuryakov.

Strict call filtering should be reenabled.

* WebProcess/com.apple.WebProcess.sb.in:

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

7 months ago[macOS] Crash when control-clicking or copying text rendered with a web font
pvollan@apple.com [Thu, 31 Jan 2019 21:40:59 +0000 (21:40 +0000)]
[macOS] Crash when control-clicking or copying text rendered with a web font
https://bugs.webkit.org/show_bug.cgi?id=193913
<rdar://problem/47541039>

Reviewed by Brent Fulgham.

On older versions of macOS, allowing mach lookup to com.apple.FontObjectsServer is needed.

* WebProcess/com.apple.WebProcess.sb.in:

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

7 months agoRemove WKPageIsWebProcessResponsive
benjamin@webkit.org [Thu, 31 Jan 2019 21:34:34 +0000 (21:34 +0000)]
Remove WKPageIsWebProcessResponsive
https://bugs.webkit.org/show_bug.cgi?id=194096

Reviewed by Alex Christensen.

It is not used by any client.

It is also bad API. It is better to let WebKit track
responsiveness and tell the client with processDidBecomeResponsive.

* UIProcess/API/C/WKPage.cpp:
(WKPageIsWebProcessResponsive): Deleted.
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isWebProcessResponsive): Deleted.
* UIProcess/WebPageProxy.h:

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

7 months agoRevert r238819 which is unneeded and caused a performance regression.
achristensen@apple.com [Thu, 31 Jan 2019 21:23:44 +0000 (21:23 +0000)]
Revert r238819 which is unneeded and caused a performance regression.
https://bugs.webkit.org/show_bug.cgi?id=192272
<rdar://problem/46664625>

Source/WebCore:

* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::prepareForLoadStart):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:

Source/WebKit:

* WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
(API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(PageLoaderClient::didStartProvisionalLoadForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad):

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
* WebCoreSupport/WebFrameLoaderClient.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm:
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:willStartProvisionalLoadForFrame:completionHandler:]): Deleted.

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

7 months ago[WebGPU] WebGPUAdapterDescriptor -> GPURequestAdapterOptions and take powerPreference...
justin_fan@apple.com [Thu, 31 Jan 2019 20:53:50 +0000 (20:53 +0000)]
[WebGPU] WebGPUAdapterDescriptor -> GPURequestAdapterOptions and take powerPreference into account
https://bugs.webkit.org/show_bug.cgi?id=194068
<rdar://problem/47680215>

Reviewed by Dean Jackson.
Source/WebCore:

Per the Web GPU IDL, WebGPUAdapterDescriptor is now known as GPURequestAdapterOptions and is optional.
In addition, Web GPU now actually attempts to return an integrated GPU when a low-power adapter is requested.

Test: adapter-options.html

* Modules/webgpu/GPURequestAdapterOptions.idl: Renamed from Source/WebCore/Modules/webgpu/WebGPUAdapterDescriptor.idl.
* Modules/webgpu/WebGPU.cpp:
(WebCore::WebGPU::requestAdapter const):
* Modules/webgpu/WebGPU.h:
* Modules/webgpu/WebGPU.idl:
* Modules/webgpu/WebGPUAdapter.cpp:
(WebCore::WebGPUAdapter::create):
(WebCore::WebGPUAdapter::WebGPUAdapter):
* Modules/webgpu/WebGPUAdapter.h:
(WebCore::WebGPUAdapter::options const):
* Modules/webgpu/WebGPUDevice.cpp:
(WebCore::WebGPUDevice::create):
* platform/graphics/gpu/GPUDevice.h:
* platform/graphics/gpu/GPURequestAdapterOptions.h: Renamed from Source/WebCore/Modules/webgpu/WebGPUAdapterDescriptor.h.
* platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
(WebCore::GPUDevice::create):

LayoutTests:

Add simple test to create device with all options. Update helper functions for other Web GPU
tests to request different adapters. (No change in test behavior expected.)

* webgpu/adapter-options-expected.txt: Added.
* webgpu/adapter-options.html: Added.
* webgpu/js/basic-webgpu-functions.js:
(async.setUpContexts): Update to use no adapter request argument at all.
* webgpu/js/webgpu-functions.js:
(async.getBasicDevice): Update to request the low-power adapter.

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

7 months agoUnreviewed, follow-up after r240796
ysuzuki@apple.com [Thu, 31 Jan 2019 20:15:48 +0000 (20:15 +0000)]
Unreviewed, follow-up after r240796

Initialize WriteBarrier<InferredValue> in the constructor. Otherwise, GC can see the broken one
when allocating InferredValue in FunctionExecutable::finishCreation.

* runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::FunctionExecutable::finishCreation):

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

7 months agoFormalize WebKitAdditions mechanism of LoadOptimizer
jiewen_tan@apple.com [Thu, 31 Jan 2019 20:01:07 +0000 (20:01 +0000)]
Formalize WebKitAdditions mechanism of LoadOptimizer
https://bugs.webkit.org/show_bug.cgi?id=193886
<rdar://problem/47696809>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by existing tests.

* platform/network/ResourceRequestBase.h:
Export isolatedCopy().

Source/WebKit:

This patch does the following few things:
1) formalizes WebKitAdditions mechanism of LoadOptimizer;
2) modernizes AppLinks code in tryInterceptNavigation to use BlockPtr;
3) lets AppLinks have higher precedence than LoadOptimizer.

* SourcesCocoa.txt:
* UIProcess/Cocoa/LoadOptimizer.h: Removed.
* UIProcess/Cocoa/LoadOptimizer.mm: Removed.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::tryOptimizingLoad):
(WebKit::tryInterceptNavigation):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::loadOptimizer): Deleted.
* WebKit.xcodeproj/project.pbxproj:

Tools:

* MiniBrowser/MiniBrowser.entitlements:
Make com.apple.security.temporary-exception.mach-lookup.global-name an array.

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

7 months ago[Cocoa][EME] Modern EME uses a different path for SecureStop data than Legacy EME
jer.noble@apple.com [Thu, 31 Jan 2019 19:52:14 +0000 (19:52 +0000)]
[Cocoa][EME] Modern EME uses a different path for SecureStop data than Legacy EME
https://bugs.webkit.org/show_bug.cgi?id=193988

Reviewed by Jon Lee.

Modern EME is writing SecureStop data as a file at the same path as the
directory used by Legacy EME; meaning, when Modern EME attempts to write
to that file, it will fail because a directory exists at the same path.

Add a migration step to take care of those instances where Modern EME Secure
Stop data was already written to disk, and move that previously written data
to the correct file path.

* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::setStorageDirectory):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):

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

7 months agoRegression(PSON) Crash under WebProcessProxy::canTerminateChildProcess()
cdumez@apple.com [Thu, 31 Jan 2019 19:49:43 +0000 (19:49 +0000)]
Regression(PSON) Crash under WebProcessProxy::canTerminateChildProcess()
https://bugs.webkit.org/show_bug.cgi?id=194094
<rdar://problem/47580753>

Reviewed by Ryosuke Niwa.

If a SuspendedPageProxy gets destroyed while a WebPageProxy is waiting for its to finish to suspend,
call the "failure to suspend" completion handler asynchronously instead of synchronouly to make sure
the completion handler cannot try and use the suspended page proxy while it is being destroyed.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::~SuspendedPageProxy):

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

7 months agoCall the frame main contents layer "rootContentsLayer" consistently.
antti@apple.com [Thu, 31 Jan 2019 19:39:38 +0000 (19:39 +0000)]
Call the frame main contents layer "rootContentsLayer" consistently.
https://bugs.webkit.org/show_bug.cgi?id=194089

Reviewed by Simon Fraser.

This is currently called "rootContentLayer" in the compositor and "scrolledContentsLayer" in the scrolling tree.
We want to reserve term "scrolledContentsLayer" to mean the direct child layer of the  scroll container layer
without any positioning oddities (which this isn't).

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::setNodeLayers):

Set the rootContentsLayer for frame. It is only used by the Mac frame scrolling code.

* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::rootContentsLayerForFrameView):
(WebCore::ScrollingCoordinator::rootContentLayerForFrameView): Deleted.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setNodeLayers):
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged):
(WebCore::ScrollingStateFrameScrollingNode::setRootContentsLayer):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
* page/scrolling/ScrollingStateFrameScrollingNode.h:

Introduce rootContentLayer for frames only.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):

Switch to using rootContentsLayer.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::updateRootContentLayerClipping):
(WebCore::RenderLayerCompositor::layerTreeAsText):
(WebCore::RenderLayerCompositor::rootGraphicsLayer const):
(WebCore::RenderLayerCompositor::updateRootLayerPosition):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::destroyRootLayer):
(WebCore::RenderLayerCompositor::attachRootLayer):
(WebCore::RenderLayerCompositor::detachRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):

Pass rootContentsLayer separately for frames only.
Pass null as frame scrolledContentsLayer until these are rearranged (it is not used).

* rendering/RenderLayerCompositor.h:

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

7 months agoGCGamepad is deprecated
krollin@apple.com [Thu, 31 Jan 2019 19:29:27 +0000 (19:29 +0000)]
GCGamepad is deprecated
https://bugs.webkit.org/show_bug.cgi?id=194056
<rdar://problem/47685010>

Reviewed by Brady Eidson.

GCGamepad is deprecated, resulting in compiler warnings. Address this
for now by employing ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.

No new tests since there should be no observable behavior difference.

* platform/gamepad/cocoa/GameControllerGamepad.mm:
(WebCore::GameControllerGamepad::setupAsGamepad):

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

7 months agoFix LSAppLink deprecation warnings.
timothy@apple.com [Thu, 31 Jan 2019 19:14:58 +0000 (19:14 +0000)]
Fix LSAppLink deprecation warnings.
https://bugs.webkit.org/show_bug.cgi?id=194097

Unreviewed build fix.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):

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

7 months ago[JSC] Do not use InferredValue in non-JIT configuration
ysuzuki@apple.com [Thu, 31 Jan 2019 19:13:20 +0000 (19:13 +0000)]
[JSC] Do not use InferredValue in non-JIT configuration
https://bugs.webkit.org/show_bug.cgi?id=194084

Reviewed by Saam Barati.

InferredValue is not meaningful if our VM is non-JIT configuration. InferredValue is used to watch the instantiation of the  FunctionExecutable's
JSFunction and SymbolTable's JSScope to explore the chance of folding them into constants in DFG and FTL. If it is instantiated only once, we can
put a watchpoint and fold it into this constant. But if JIT is disabled, we do not need to care it.
Even in non-JIT configuration, we still use InferredValue for FunctionExecutable to determine whether the given FunctionExecutable is preferable
target for poly proto. If JSFunction for the FunctionExecutable is used as a constructor and instantiated more than once, poly proto Structure
seems appropriate for objects created by this JSFunction. But at that time, only thing we would like to know is that whether JSFunction for this
FunctionExecutable is instantiated multiple times. This does not require the full feature of InferredValue, WatchpointState is enough.
To summarize, since nobody uses InferredValue feature in non-JIT configuration, we should not create it.

* bytecode/ObjectAllocationProfileInlines.h:
(JSC::ObjectAllocationProfile::initializeProfile):
* runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::finishCreation):
(JSC::FunctionExecutable::visitChildren):
* runtime/FunctionExecutable.h:
* runtime/InferredValue.cpp:
(JSC::InferredValue::create):
* runtime/JSAsyncFunction.cpp:
(JSC::JSAsyncFunction::create):
* runtime/JSAsyncGeneratorFunction.cpp:
(JSC::JSAsyncGeneratorFunction::create):
* runtime/JSFunction.cpp:
(JSC::JSFunction::create):
* runtime/JSFunctionInlines.h:
(JSC::JSFunction::createWithInvalidatedReallocationWatchpoint):
* runtime/JSGeneratorFunction.cpp:
(JSC::JSGeneratorFunction::create):
* runtime/JSSymbolTableObject.h:
(JSC::JSSymbolTableObject::setSymbolTable):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::finishCreation):
* runtime/VM.cpp:
(JSC::VM::VM):

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

7 months agoSimplify and streamline code that creates an appropriate document based on MIME type
darin@apple.com [Thu, 31 Jan 2019 18:10:48 +0000 (18:10 +0000)]
Simplify and streamline code that creates an appropriate document based on MIME type
https://bugs.webkit.org/show_bug.cgi?id=193756

Reviewed by Chris Dumez.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument): Use equalLettersIgnoringASCIICase rather
than == for all the MIME type checks. Use MIMETypeRegistry::isSupportedImageMIMEType
instead of Image::supportsType. Rearranged checks so that all the combinations that
that take precedence over plug-ins are checked first, fixing some unimportant edge
cases where the plug-in database is initialized and doesn't need to be. Straightened
out the logic for various special types so that the checks are more independent from
each other and hence easier to understand.

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

7 months ago[MSE][GStreamer] Unreviewed debug build fix, obsolete assert
aboya@igalia.com [Thu, 31 Jan 2019 17:27:38 +0000 (17:27 +0000)]
[MSE][GStreamer] Unreviewed debug build fix, obsolete assert

Since m_playerPrivate is now a reference, it no longer has a default
cast to bool. But there is also no longer a need to assert it's non
null, so just remove the assert.

* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::append):

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

7 months agoVersioning.
kocsen_chung@apple.com [Thu, 31 Jan 2019 17:23:53 +0000 (17:23 +0000)]
Versioning.

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

7 months ago[Curl] Fix DRT crash related to private browsing.
commit-queue@webkit.org [Thu, 31 Jan 2019 17:04:34 +0000 (17:04 +0000)]
[Curl] Fix DRT crash related to private browsing.
https://bugs.webkit.org/show_bug.cgi?id=193816

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-01-31
Reviewed by Alex Christensen.

Source/WebKitLegacy:

* WebCoreSupport/NetworkStorageSessionMap.cpp:
(NetworkStorageSessionMap::ensureSession):

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):

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