WebKit-https.git
17 months agoAdd WebProcessPool option for process swapping on navigation.
beidson@apple.com [Tue, 20 Feb 2018 02:12:04 +0000 (02:12 +0000)]
Add WebProcessPool option for process swapping on navigation.
https://bugs.webkit.org/show_bug.cgi?id=182945

Reviewed by Alex Christensen.

Just the most basic groundwork for testing a new WK2 feature.

* UIProcess/API/APIProcessPoolConfiguration.h:

* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationProcessSwapsOnNavigation):
(WKContextConfigurationSetProcessSwapsOnNavigation):
* UIProcess/API/C/WKContextConfigurationRef.h:

* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration setProcessSwapsOnNavigation:]):
(-[_WKProcessPoolConfiguration processSwapsOnNavigation]):

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

17 months agoWeb Inspector: Canvas tab: hide navigation sidebar when viewing the overview
mattbaker@apple.com [Tue, 20 Feb 2018 02:04:30 +0000 (02:04 +0000)]
Web Inspector: Canvas tab: hide navigation sidebar when viewing the overview
https://bugs.webkit.org/show_bug.cgi?id=182597
<rdar://problem/37341564>

Reviewed by Devin Rousso.

Support showing/hiding the navigation sidebar panel based on the current
represented object. Individual TabContentViews can opt-in to this behavior,
by overriding TabContentView.prototype.managesNavigationSidebarPanel.

* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView.prototype.get managesNavigationSidebarPanel):
Hide the Canvas navigation sidebar when viewing the overview.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView):
(WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
(WI.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
(WI.ContentBrowserTabContentView.prototype._contentBrowserCurrentRepresentedObjectsDidChange):

* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.canShowRepresentedObject):
Provide default implementation that just defers to the TabContentView.
This exists so that a NavigationSidebarPanel that implements canShowRepresentedObject
will have a meaningful default to fall back on.

* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype._sidebarCollapsedStateDidChange):
(WI.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):

* UserInterface/Views/TabContentView.js:
(WI.TabContentView.prototype.get managesNavigationSidebarPanel):

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

17 months agoAdd SVGPropertyTraits::fromString() to all the SVG animated types
commit-queue@webkit.org [Tue, 20 Feb 2018 02:02:57 +0000 (02:02 +0000)]
Add SVGPropertyTraits::fromString() to all the SVG animated types
https://bugs.webkit.org/show_bug.cgi?id=182901

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-02-19
Reviewed by Dean Jackson.

This is a work toward https://bugs.webkit.org/show_bug.cgi?id=168586. The
goal is is to templatize the SVGAnimatedType class and to use SVGPropertyTraits
methods inside the template functions.

* WebCore.xcodeproj/project.pbxproj: Move the enum and the SVGPropertyTraits
from SVGMarkerElement.h to SVGMarkerTypes.h.
* svg/SVGAngle.h:
(WebCore::SVGAngle::SVGAngle): Delete unused constructor and create() method.
* svg/SVGAngleValue.h:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::parsePoint): Deleted. Move this function to SVGParserUtilities.cpp
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::constructFromString): Use SVGPropertyTraits::fromString().
* svg/SVGAnimatedBoolean.cpp:
(WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto.
* svg/SVGAnimatedColor.cpp:
(WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto.
(WebCore::SVGAnimatedColorAnimator::addAnimatedTypes): Use const.
(WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue): Ditto.
* svg/SVGAnimatedEnumeration.cpp:
(WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto.
* svg/SVGAnimatedInteger.cpp:
(WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto.
* svg/SVGAnimatedIntegerOptionalInteger.cpp:
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString): Ditto.
* svg/SVGAnimatedLength.cpp:
* svg/SVGAnimatedLengthList.cpp:
(WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto.
* svg/SVGAnimatedNumber.cpp:
(WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto
(WebCore::parseNumberFromString):
* svg/SVGAnimatedNumberList.cpp:
(WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto.
* svg/SVGAnimatedNumberOptionalNumber.cpp:
(WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString): Ditto.
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::constructFromString): Ditto.
* svg/SVGAnimatedPointList.cpp:
(WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto.
* svg/SVGAnimatedPreserveAspectRatio.cpp:
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString): Ditto.
* svg/SVGAnimatedRect.cpp:
(WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto.
* svg/SVGAnimatedString.cpp:
(WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto.
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::constructFromString): Ditto.
* svg/SVGLength.h:
(WebCore::SVGLength::SVGLength): Delete unused constructor and create() method.
* svg/SVGLengthListValues.h:
(WebCore::SVGPropertyTraits<SVGLengthListValues>::fromString): New SVGPropertyTraits method.
(WebCore::SVGPropertyTraits<SVGLengthListValues>::parse): Ditto.
* svg/SVGMarkerElement.h:
(WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::highestEnumValue): Deleted.
(WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString): Deleted.
(WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::fromString): Deleted.
(WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue): Deleted.
(WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue): Deleted.
(WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString): Deleted.
* svg/SVGMarkerTypes.h: Added.
(WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::highestEnumValue):
(WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::toString):
(WebCore::SVGPropertyTraits<SVGMarkerUnitsType>::fromString):
(WebCore::SVGPropertyTraits<SVGMarkerOrientType>::highestEnumValue):
(WebCore::SVGPropertyTraits<SVGMarkerOrientType>::fromString):
(WebCore::SVGIDLEnumLimits<SVGMarkerOrientType>::highestExposedEnumValue):
* svg/SVGMatrix.h: Delete unused constructor and create method.
* svg/SVGNumber.h:
(WebCore::SVGNumber::SVGNumber): Ditto.
* svg/SVGNumberListValues.h:
(WebCore::SVGPropertyTraits<SVGNumberListValues>::fromString): New SVGPropertyTraits method.
* svg/SVGParserUtilities.cpp:
(WebCore::parsePoint): This is moved from SVGAnimateMotionElement.cpp
* svg/SVGParserUtilities.h:
* svg/SVGPathByteStream.h:
(WebCore::SVGPathByteStream::SVGPathByteStream):
(WebCore::SVGPathByteStream::operator=): Add copy and move assignment operators.
(WebCore::SVGPathByteStream::copy const): Use the copy assignment.
(WebCore::SVGPathByteStream::isEmpty const): Use Data.isEmpty().
(WebCore::SVGPropertyTraits<SVGPathByteStream>::initialValue): New SVGPropertyTraits method.
(WebCore::SVGPropertyTraits<SVGPathByteStream>::fromString): Ditto.
* svg/SVGPathUtilities.cpp:
(WebCore::addToSVGPathByteStream): Answer Simon's questions which were added in r190844.
* svg/SVGPoint.h:
(WebCore::SVGPoint::SVGPoint): Delete unused constructor and create method.
* svg/SVGPointListValues.h:
(WebCore::SVGPropertyTraits<SVGPointListValues>::fromString): New SVGPropertyTraits method.
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::parseAttribute): Use the move assignment operator.
* svg/SVGPreserveAspectRatio.h:
(WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): Delete unused constructor and create method.
* svg/SVGPreserveAspectRatioValue.cpp:
(WebCore::SVGPreserveAspectRatioValue::SVGPreserveAspectRatioValue): Add new constructor.
* svg/SVGPreserveAspectRatioValue.h:
(WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::fromString): New SVGPropertyTraits method.
(WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::toString): Ditto.
* svg/SVGRect.h:
(WebCore::SVGRect::SVGRect): Delete unused constructor and create method.
* svg/SVGRectTraits.h: Removed.
* svg/SVGTransform.h:
(WebCore::SVGTransform::SVGTransform): Delete unused constructor and create method.
* svg/SVGTransformListValues.h:
(WebCore::SVGPropertyTraits<SVGTransformListValues>::fromString): New SVGPropertyTraits method.
* svg/properties/SVGPropertyTearOff.h: Delete unused create method.
* svg/properties/SVGPropertyTraits.h: New SVGPropertyTraits methods.
(WebCore::SVGPropertyTraits<bool>::fromString):
(WebCore::SVGPropertyTraits<Color>::initialValue):
(WebCore::SVGPropertyTraits<Color>::fromString):
(WebCore::SVGPropertyTraits<Color>::parse):
(WebCore::SVGPropertyTraits<Color>::toString):
(WebCore::SVGPropertyTraits<int>::fromString):
(WebCore::SVGPropertyTraits<float>::fromString):
(WebCore::SVGPropertyTraits<float>::parse):
(WebCore::SVGPropertyTraits<FloatPoint>::initialValue):
(WebCore::SVGPropertyTraits<FloatPoint>::fromString):
(WebCore::SVGPropertyTraits<FloatPoint>::parse):
(WebCore::SVGPropertyTraits<FloatPoint>::toString):
(WebCore::SVGPropertyTraits<FloatRect>::initialValue):
(WebCore::SVGPropertyTraits<FloatRect>::fromString):
(WebCore::SVGPropertyTraits<FloatRect>::parse):
(WebCore::SVGPropertyTraits<FloatRect>::toString):
(WebCore::SVGPropertyTraits<String>::fromString):
(WebCore::SVGPropertyTraits<String>::parse):
(WebCore::SVGPropertyTraits<String>::toString):

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

17 months agoDon't mark an array profile out of bounds for the cases where the DFG will convert...
sbarati@apple.com [Tue, 20 Feb 2018 02:00:39 +0000 (02:00 +0000)]
Don't mark an array profile out of bounds for the cases where the DFG will convert the access to SaneChain
https://bugs.webkit.org/show_bug.cgi?id=182912
<rdar://problem/37685083>

Reviewed by Keith Miller.

In the baseline JIT and LLInt, when we loading a hole from an original array,
with the array prototype chain being normal, we end up marking the ArrayProfile
for that GetByVal as out of bounds. However, the DFG knows exactly how to
optimize this case by returning undefined when loading from a hole. Currently,
it only does this for Contiguous arrays (and sometimes Double arrays).
This patch just makes sure to not mark the ArrayProfile as out of bounds
in this scenario for Contiguous arrays, since the DFG will always optimize
this case.

However, we should extend this by profiling when a GetByVal loads a hole. By
doing so, we can optimize this for Int32, ArrayStorage, and maybe even Double
arrays. That work will happen in:
https://bugs.webkit.org/show_bug.cgi?id=182940

This patch is a 30-50%  speedup on JetStream's hash-map test. This patch
speeds up JetStream by 1% when testing on my iMac.

* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::refine const):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* jit/JITOperations.cpp:
(JSC::getByVal):
(JSC::canAccessArgumentIndexQuickly): Deleted.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::canAccessArgumentIndexQuickly):

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

17 months ago[Modern Media Controls] Implement a compact set of media controls
graouts@webkit.org [Tue, 20 Feb 2018 00:37:42 +0000 (00:37 +0000)]
[Modern Media Controls] Implement a compact set of media controls
https://bugs.webkit.org/show_bug.cgi?id=182937
<rdar://problem/37682257>

Reviewed by Eric Carlson.

Source/WebCore:

We add a new type of media controls used when we need stripped down and compact controls. The new
CompactMediaControls only show a play/pause button and an invalid placard and disregard all media
events that are not relevant to the display of these controls.

To distinguish cases where we need to show compact media controls, we expose a new property on
MediaControlsHost called "compactMode".

Tests: media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html
       media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::base64StringForIconNameAndType const):
(WebCore::MediaControlsHost::compactMode const):
* Modules/mediacontrols/MediaControlsHost.h:
(WebCore::MediaControlsHost::setSimulateCompactMode):
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/modern-media-controls/controls/compact-media-controls.js: Added.
(CompactMediaControls.prototype.get scaleFactor):
(CompactMediaControls.prototype.set scaleFactor):
(CompactMediaControls.prototype.get shouldCenterControlsVertically):
(CompactMediaControls.prototype.set shouldCenterControlsVertically):
(CompactMediaControls.prototype.get placard):
(CompactMediaControls.prototype.set placard):
(CompactMediaControls.prototype.layout):
(CompactMediaControls.prototype.commitProperty):
* Modules/modern-media-controls/controls/icon-service.js:
(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconAndLayoutTraits):
(const.iconService.new.IconService):
* Modules/modern-media-controls/controls/inline-media-controls.js:
* Modules/modern-media-controls/controls/layout-item.js:
* Modules/modern-media-controls/js-files:
* Modules/modern-media-controls/main.js:
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get layoutTraits):
(MediaController.prototype._supportingObjectClasses): Compute the set of MediaControllerSupport classes based
on the layout traits such that in compact mode we only return PlacardSupport and PlaybackSupport.
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._controlsClassForLayoutTraits):
(MediaController.prototype._shouldControlsBeAvailable):
* Modules/modern-media-controls/media/placard-support.js:
(PlacardSupport.prototype.get mediaEvents): Only track the "error" event in compact mode since this is the only
relevant placard.
* Modules/modern-media-controls/media/playback-support.js:
(PlaybackSupport.prototype.syncControl): Only show or hide the play/pause button based on the playback state
when in compact mode.
(PlaybackSupport):
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Add new tests that cover the basic properties and layout under different situations of the new CompactMediaControls.

* media/modern-media-controls/compact-media-controls/compact-media-controls-constructor-expected.txt: Added.
* media/modern-media-controls/compact-media-controls/compact-media-controls-constructor.html: Added.
* media/modern-media-controls/compact-media-controls/compact-media-controls-layout-expected.txt: Added.
* media/modern-media-controls/compact-media-controls/compact-media-controls-layout.html: Added.

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

17 months ago[Web Animations] Make KeyframeEffect target nullable and read-write
graouts@webkit.org [Tue, 20 Feb 2018 00:36:19 +0000 (00:36 +0000)]
[Web Animations] Make KeyframeEffect target nullable and read-write
https://bugs.webkit.org/show_bug.cgi?id=182741

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions resulting from handling null values for a keyframe effect's target
as well as making the KeyframeEffect target a read-write property.

* web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/idlharness-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/target-expected.txt:

Source/WebCore:

We used to completely disregard null targets, for instance not parsing keyframes, but targets
can be null and are also supposed to be read-write for KeyframeEffect. We now update the IDL
for KeyframeEffect to mark the target property as read-write and update the implementation
to correctly handle null targets.

This revealed a few issues in our implementation by allowing more WPT tests to run. So we also
ensure that:

- we don't crash when parsing font-related properties by calling update() on the generated
RenderStyle's FontCascade when parsing keyframes.

- CSS properties are provided as camel-case and not as hyphenated form

- values provided in keyframes dictionaries are only read for valid properties

- styles for effect targets are invalidated as soon as the timing model for that animation
is changed

* animation/KeyframeEffect.idl:
* animation/KeyframeEffectReadOnly.cpp:
(WebCore::invalidateElement): Add a new utility method to invalidate a given element since
we may want to invalidate not only the current target (m_target) but also a previous target.
(WebCore::IDLAttributeNameToAnimationPropertyName): Move this function below CSSPropertyIDToIDLAttributeName
so that it can call that function. We also check that we reject CSS properties that are not provided in
camel-case form (eg. "font-size" vs. "fontSize").
(WebCore::processIterableKeyframes): Only read the JS values if we know that the provided JS property name
maps to a valid CSS property.
(WebCore::KeyframeEffectReadOnly::processKeyframes): Allow keyframes to be processed even if the effect's
target is null.
(WebCore::KeyframeEffectReadOnly::setTarget): Notify the animation that the effect target has changed and
invalidate the style of the new target and the old targets, if any. We also update the blending keyframes
since this task may not have been completed in a previous call to processKeyframes() due to the target being
null at that time.
(WebCore::KeyframeEffectReadOnly::invalidate): Use the invalidateElement() utility.
* animation/KeyframeEffectReadOnly.h:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::effectTargetDidChange): This method is called in KeyframeEffectReadOnly::setTarget()
to inform the animation of the previous effect target and the new one upon a target change. This allows us to
forward this information onto the timeline so that we correctly add or remove the targets from the list of
animated elements.
* animation/WebAnimation.h:

LayoutTests:

Add some platform-specific results for Sierra where we don't support the "font-variation-settings" property.

* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: Added.
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Added.
* platform/mac-sierra/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Added.

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

17 months agoCrash under MIMETypeRegistry::isSupportedJavaScriptMIMEType()
cdumez@apple.com [Tue, 20 Feb 2018 00:20:53 +0000 (00:20 +0000)]
Crash under MIMETypeRegistry::isSupportedJavaScriptMIMEType()
https://bugs.webkit.org/show_bug.cgi?id=182927
<rdar://problem/37675748>

Reviewed by Antti Koivisto.

Make it safe to call MIMETypeRegistry::isSupportedJavaScriptMIMEType() from the non-main thread.
It is currently being called from a background thread in the following places:
- ServiceWorkerJob::didReceiveResponse()
- WorkerGlobalScope::importScripts()

These call sites on non-main threads were added recently with the support for service workers.

No new tests, already covered by existing tests that flakily experience service worker
process crashes.

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):

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

17 months agoSIGFPE @ int WebCore::SVGToOTFFontConverter::scaleUnitsPerEm<int> const + 45
dino@apple.com [Tue, 20 Feb 2018 00:04:40 +0000 (00:04 +0000)]
SIGFPE @ int WebCore::SVGToOTFFontConverter::scaleUnitsPerEm<int> const + 45
https://bugs.webkit.org/show_bug.cgi?id=182944
<rdar://problem/35369984>

Reviewed by Myles Maxfield.

Source/WebCore:

Avoid a divide-by-zero.

Test: svg/text/font-bad-unitsperem.html

* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::unitsPerEm const):

LayoutTests:

Add a test with a 0 unitsperem SVG font.

* svg/text/font-bad-unitsperem-expected.txt: Added.
* svg/text/font-bad-unitsperem.html: Added.
* svg/text/resources/font-bad-unitsperem.svg: Added.

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

17 months agoREGRESSION (r219342): Touch event coordinates and elementFromPoint coordinates differ
timothy_horton@apple.com [Mon, 19 Feb 2018 23:30:27 +0000 (23:30 +0000)]
REGRESSION (r219342): Touch event coordinates and elementFromPoint coordinates differ
https://bugs.webkit.org/show_bug.cgi?id=182910
<rdar://problem/37533950>

Reviewed by Simon Fraser.

Source/WebCore:

We reverted other changes to the definition of client coordinates
in r219829 due to compatibility concerns. However, we failed to revert
r219342 on trunk, leaving elementFromPoint() using coordinates relative
to the layout viewport.

Add a currently off-by-default setting to switch on layout-viewport-relative
client coordinates and guard the elementFromPoint changes behind it.
A future patch should roll r219829 back in also behind this setting, so
that everything remains consistent regardless of which coordinate space we choose.

* dom/TreeScope.cpp:
(WebCore::absolutePointIfNotClipped):
* page/Settings.yaml:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):

LayoutTests:

* fast/dom/elementFromPoint-scaled-scrolled.html:
Revert changes to this test made in r219342.

* fast/dom/elementFromPoint-scaled-scrolled-layout-viewport.html:
* fast/dom/elementFromPoint-scaled-scrolled-layout-viewport-expected.txt:
Add a test that is equivalent to elementFromPoint-scaled-scrolled.html after r219342,
which turns on the new setting. This test is disabled on iOS (like it was
in r219342) because it needs window.scrollTo.

* platform/ios-wk2/fast/dom/elementFromPoint-relative-to-viewport-expected.txt:
This now passes.

* platform/ios/TestExpectations:
Re-mark-failing a test that was un-marked-failing by r219342.

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

17 months agoNull pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
dbates@webkit.org [Mon, 19 Feb 2018 22:50:35 +0000 (22:50 +0000)]
Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
https://bugs.webkit.org/show_bug.cgi?id=182905
<rdar://problem/37676775>

Reviewed by Alex Christensen.

Return nullptr when querying for the scheme handler of the null string.

Before a navigation is performed WebKit checks if the destination URL is associated with an app
unless the embedding client overrides the WKNavigationDelegate delegate callback -webView:decidePolicyForNavigationAction:decisionHandler.
If the URL is not associated with an app then WebKit may fall back to checking if the embedding
client registered a scheme handler for it. Currently we assume that the scheme is a non-null
string when checking the scheme handler registry. However the scheme can be a null string if
it is part of a malformed URL. And this leads to bad news bears when we try to use it to look
for a scheme handler. Instead check that the scheme is a non-null string before checking to see
if it is in the scheme handler registry.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::urlSchemeHandlerForScheme):

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

17 months ago[Extra zoom mode] Don't allow PiP media playback
eric.carlson@apple.com [Mon, 19 Feb 2018 22:29:38 +0000 (22:29 +0000)]
[Extra zoom mode] Don't allow PiP media playback
https://bugs.webkit.org/show_bug.cgi?id=182930
<rdar://problem/37676259>

Reviewed by Andy Estes.

Source/WebCore:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Don't call setPIPModeEnabled:
if it isn't implemented.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode): Ditto.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]): Don't enable PiP mode. Require user interaction for
all media types.

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

17 months agoUnreviewed, rolling out r228696.
ryanhaddad@apple.com [Mon, 19 Feb 2018 22:20:13 +0000 (22:20 +0000)]
Unreviewed, rolling out r228696.

The API test added with this change is timing out on macOS.

Reverted changeset:

"Null pointer dereference in
WebPageProxy::urlSchemeHandlerForScheme()"
https://bugs.webkit.org/show_bug.cgi?id=182905
https://trac.webkit.org/changeset/228696

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

17 months ago[Web Animations] Decouple parsing JS keyframes and computing blending keyframes
graouts@webkit.org [Mon, 19 Feb 2018 22:01:51 +0000 (22:01 +0000)]
[Web Animations] Decouple parsing JS keyframes and computing blending keyframes
https://bugs.webkit.org/show_bug.cgi?id=182939
<rdar://problem/37678364>

Reviewed by Dean Jackson.

Move all the code used to create the KeyframeList into a dedicated updateBlendingKeyframes() method.

No new tests since this code change has no user-visible impact.

* animation/KeyframeEffectReadOnly.cpp:
(WebCore::KeyframeEffectReadOnly::processKeyframes):
(WebCore::KeyframeEffectReadOnly::updateBlendingKeyframes):
* animation/KeyframeEffectReadOnly.h:

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

17 months ago[EME] Add mechanism for MediaKeySession to react to HDCP changes
jer.noble@apple.com [Mon, 19 Feb 2018 21:22:15 +0000 (21:22 +0000)]
[EME] Add mechanism for MediaKeySession to react to HDCP changes
https://bugs.webkit.org/show_bug.cgi?id=182935

Reviewed by Eric Carlson.

Add a client callback interface to CDMInterface to allow subclasses to communicate up to
MediaKeySEssion. Add a virtual method to CDMInterface to allow it to be notified of HDCP
status changes. Override this method in CDMInstanceFairPlayStreamingAVFObjC. Hook up the
outputObscuredDueToInsufficientExternalProtectionChanged() methods in both
MediaPlayerPrivateAVFoundationObjC and MediaPlayerPrivateMediaSourceAVFObjC to this new
CDMInstance method. Add an Internals method to simulate an HDCP error for testing purposes.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::updateKeyStatuses):
* Modules/encryptedmedia/MediaKeySession.h:
* platform/encryptedmedia/CDMInstance.h:
(WebCore::CDMInstance::setHDCPStatus):
(WebCore::CDMInstance::setClient):
(WebCore::CDMInstance::clearClient):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::beginSimulatedHDCPError):
(WebCore::MediaPlayer::endSimulatedHDCPError):
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::beginSimulatedHDCPError):
(WebCore::MediaPlayerPrivateInterface::endSimulatedHDCPError):
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::setClient):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::clearClient):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionIdentifierChanged):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
(WebCore::playerKVOProperties):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
* testing/Internals.cpp:
(WebCore::Internals::beginSimulatedHDCPError):
(WebCore::Internals::endSimulatedHDCPError):
* testing/Internals.h:
* testing/Internals.idl:

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

17 months agoCrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::TimerBase::~TimerBase
cdumez@apple.com [Mon, 19 Feb 2018 21:03:39 +0000 (21:03 +0000)]
CrashTracer: com.apple.WebKit.WebContent at WebCore: WebCore::TimerBase::~TimerBase
https://bugs.webkit.org/show_bug.cgi?id=182931
<rdar://problem/37602962>

Reviewed by Antti Koivisto.

Make sure PlatformMediaResource is ThreadSafeRefCounted since it is being
used from several threads in WebCoreNSURLSession. Also make sure it is
always destroyed on the main thread since it ends up destroying a
CachedRawResource object.

No new tests, no known reproduction case.

* platform/graphics/PlatformMediaResourceLoader.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSessionDataTask dealloc]):

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

17 months ago[RenderTreeBuilder] Rename RenderTreeBuilder::removeAndDestroyChild() -> removeAndDes...
zalan@apple.com [Mon, 19 Feb 2018 19:55:04 +0000 (19:55 +0000)]
[RenderTreeBuilder] Rename RenderTreeBuilder::removeAndDestroyChild() -> removeAndDestroy()
https://bugs.webkit.org/show_bug.cgi?id=182934
<rdar://problem/37678241>

Reviewed by Antti Koivisto.

No change in functionality.

* dom/Document.cpp:
(WebCore::Document::setFullScreenRenderer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setText):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::willBeDestroyed):
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::willBeDestroyed):
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::willBeDestroyed):
(WebCore::RenderTextFragment::setText):
* rendering/RenderView.cpp:
(WebCore::RenderView::willBeDestroyed):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::removeAndDestroy):
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
(WebCore::RenderTreeBuilder::removeAndDestroyChild): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::takeChild):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
(WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
* rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
(WebCore::RenderTreeBuilder::Ruby::takeChild):

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

17 months agoDo not block authentication challenge to navigated resources
dbates@webkit.org [Mon, 19 Feb 2018 19:10:44 +0000 (19:10 +0000)]
Do not block authentication challenge to navigated resources
https://bugs.webkit.org/show_bug.cgi?id=182807
<rdar://problem/37481619>

Reviewed by Brent Fulgham.

Source/WebCore:

Blocking the main resource from asking for credentials depending on how it was
navigated to could be confusing to a person and breaks web compatibility. Restore
the behavior before r224134.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::init):
(WebCore::ResourceLoader::willSendRequestInternal):
(WebCore::ResourceLoader::didBlockAuthenticationChallenge):
(WebCore::ResourceLoader::isAllowedToAskUserForCredentials const):
(WebCore::ResourceLoader::isMixedContent const): Deleted.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::wasAuthenticationChallengeBlocked const):
(WebCore::ResourceLoader::wasInsecureRequestSeen const): Deleted.

LayoutTests:

Update tests based on the new behavior.

* http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
* http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https.html:
* http/tests/security/mixedContent/insecure-download-redirects-to-basic-auth-secure-download.https-expected.txt: Removed.
* http/tests/security/mixedContent/insecure-download-redirects-to-basic-auth-secure-download.https.html: Removed.
* http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials-expected.txt:
* http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.html:
* http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-expected.txt:
* http/tests/security/mixedContent/resources/frame-with-insecure-image-redirects-to-basic-auth-secure-image.html:
* http/tests/security/mixedContent/resources/subresource/protected-pdf.php: Removed.
* http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https-expected.txt:
* http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https-expected.txt:
* http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
* http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html:
* http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt:
* http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https.html:
* platform/wk2/http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt: Copied from LayoutTests/http/tests/security/mixedContent/insecure-basic-auth-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt.
* platform/wk2/http/tests/security/mixedContent/insecure-image-redirects-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials-expected.txt: Added.
* platform/wk2/http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https-expected.txt: Added.
* platform/wk2/http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https-expected.txt: Added.
* platform/wk2/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt: Copied from LayoutTests/http/tests/security/mixedContent/secure-redirect-to-insecure-redirect-to-basic-auth-secure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt.
* platform/wk2/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt: Copied from LayoutTests/http/tests/security/mixedContent/secure-redirect-to-secure-redirect-to-basic-auth-insecure-image-allowCrossOriginSubresourcesToAskForCredentials.https-expected.txt.

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

17 months ago[Web Animations] Store all parsed keyframe input information in a single structure
graouts@webkit.org [Mon, 19 Feb 2018 19:06:25 +0000 (19:06 +0000)]
[Web Animations] Store all parsed keyframe input information in a single structure
https://bugs.webkit.org/show_bug.cgi?id=182903

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions resulting from returning the style values as provided
by the keyframe input when calling getKeyframes().

* web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes-expected.txt:

Source/WebCore:

When parsing keyframe input provided through the JS API, we used to create several data structures.
During parsing we would create a Vector<ProcessedKeyframe> where we would store the validated values
for "offset", "easing" and "composite" as well as CSS properties and CSS values as strings.

Then we would create a KeyframeList, a class that pre-dates the work on Web Animations and is used
for hardware animations, with RenderStyle objects that are used for CSS property blending at runtime.
Once the KeyframeList was created, the Vector<ProcessedKeyframe> was discarded.

Since KeyframeList did not know about nullable offsets, timing functions and composite operations, and
because we do not with to modify a legacy class that we will eventually remove once all the Web Animations
work is complete, we also stored the parsed offsets as m_offsets, the timing functions as m_timingFunctions
and the composite operations as m_compositeOperations.

In this patch we rename the ProcessedKeyframe structure used temporarily during parsing to ParsedKeyframe and
store both the input and processed data related to a given keyframe in that single structure which we keep
around as m_parsedKeyframes when we finished processing the keyframes input. This update ParsedKeyframe structure
allows to keep around the original nullable offsets, the original CSS properties and CSS values as strings as
a HashMap<CSSPropertyID, String>, as well as the CSS properties and CSS values as CSSValue objects using a
MutableStyleProperties object.

This has the benefit of reducing the number of members, but also pave the way for supporting read-write targets
where we will be able to decouple parsing keyframes and creating a KeyframeList, which requires a valid target
to create RenderStyle objects used for blending, since the original parsing-time information is now stored.

Finally, this allowed getKeyframes() to be more compliant by returning the CSS values as originally provided in
the keyframe input with shorthand properties when provided, rather than the long-hands we used to read back
through RenderStyle objects.

The generated KeyframeList is now stored as m_blendingKeyframes and is only used for the purpose of interfacing
with hardware animations and CSS property blending.

While ProcessedKeyframe was copyable due to holding only simple types, ParsedKeyframe is not since it uses a Ref
to hold the MutableStyleProperties. This uncovered some cases where we copied ProcessedKeyframe objects, we now
ensure that the ParsedKeyframe objects are moved instead, which was the correct thing to do all along.

* animation/KeyframeEffectReadOnly.cpp:
(WebCore::computeMissingKeyframeOffsets): While we used to store std::optional<double> for the computed offset,
we now store a simple double, which makes more sense since the computed offset is eventually a fully resolved
value after calling computeMissingKeyframeOffsets(). So we now compute the final computed offset without resorting
to intermediate nullable computed offsets.
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffectReadOnly::KeyframeEffectReadOnly):
(WebCore::KeyframeEffectReadOnly::copyPropertiesFromSource):
(WebCore::KeyframeEffectReadOnly::getKeyframes):
(WebCore::KeyframeEffectReadOnly::processKeyframes):
(WebCore::KeyframeEffectReadOnly::computeStackingContextImpact):
(WebCore::KeyframeEffectReadOnly::shouldRunAccelerated):
(WebCore::KeyframeEffectReadOnly::getAnimatedStyle):
(WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle):
(WebCore::KeyframeEffectReadOnly::startOrStopAccelerated):
* animation/KeyframeEffectReadOnly.h:
(WebCore::KeyframeEffectReadOnly::ParsedKeyframe::ParsedKeyframe):

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

17 months ago[RenderTreeBuilder] Remove redundant RenderObject::removeFromParentAndDestroy
zalan@apple.com [Mon, 19 Feb 2018 19:03:37 +0000 (19:03 +0000)]
[RenderTreeBuilder] Remove redundant RenderObject::removeFromParentAndDestroy
https://bugs.webkit.org/show_bug.cgi?id=182926
<rdar://problem/37674997>

Reviewed by Antti Koivisto.

Call RenderTreeBuilder::removeAndDestroyChild() directly instead.

No change in functionality.

* dom/Document.cpp:
(WebCore::Document::setFullScreenRenderer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setText):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::willBeDestroyed):
(WebCore::RenderFullScreen::unwrapRenderer):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::willBeDestroyed):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::removeFromParentAndDestroy): Deleted.
* rendering/RenderObject.h:
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::willBeDestroyed):
(WebCore::RenderTextFragment::setText):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::takeChild):
* rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
(WebCore::RenderTreeBuilder::Ruby::takeChild):

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

17 months agoMark media/track/track-css-matching-default.html as flaky.
ryanhaddad@apple.com [Mon, 19 Feb 2018 18:55:34 +0000 (18:55 +0000)]
Mark media/track/track-css-matching-default.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182932

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

17 months agoSkip editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null...
ryanhaddad@apple.com [Mon, 19 Feb 2018 18:49:32 +0000 (18:49 +0000)]
Skip editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin.html on iOS Release.
https://bugs.webkit.org/show_bug.cgi?id=182850

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

17 months agoMark http/tests/cache-storage/cache-representation.https.html as flaky.
ryanhaddad@apple.com [Mon, 19 Feb 2018 18:49:12 +0000 (18:49 +0000)]
Mark http/tests/cache-storage/cache-representation.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182928

Unreviewed test gardening.

* TestExpectations:

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

17 months agoIncrease text autosizing constants for extra zoom mode
timothy_horton@apple.com [Mon, 19 Feb 2018 18:47:30 +0000 (18:47 +0000)]
Increase text autosizing constants for extra zoom mode
https://bugs.webkit.org/show_bug.cgi?id=182919
<rdar://problem/37671259>

Reviewed by Wenson Hsieh.

* page/Settings.yaml:
* page/SettingsBase.cpp:
(WebCore::SettingsBase::defaultMinimumZoomFontSize):
(WebCore::SettingsBase::defaultOneLineTextMultiplierCoefficient):
(WebCore::SettingsBase::defaultMultiLineTextMultiplierCoefficient):
(WebCore::SettingsBase::defaultMaxTextAutosizingScaleIncrease):
* page/SettingsBase.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::oneLineTextMultiplier):
(WebCore::textMultiplier):
(WebCore::RenderBlockFlow::adjustComputedFontSizes):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustTextNodeSizes):
Make autosizing constants settings, and change their default values.

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

17 months agoNull pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
dbates@webkit.org [Mon, 19 Feb 2018 18:34:07 +0000 (18:34 +0000)]
Null pointer dereference in WebPageProxy::urlSchemeHandlerForScheme()
https://bugs.webkit.org/show_bug.cgi?id=182905

Reviewed by Alex Christensen.

Return nullptr when querying for the scheme handler of the null string.

Before a navigation is performed WebKit checks if the destination URL is associated with an app
unless the embedding client overrides the WKNavigationDelegate delegate callback -webView:decidePolicyForNavigationAction:decisionHandler.
If the URL is not associated with an app then WebKit may fall back to checking if the embedding
client registered a scheme handler for it. Currently we assume that the scheme is a non-null
string when checking the scheme handler registry. However the scheme can be a null string if
it is part of a malformed URL. And this leads to bad news bears when we try to use it to look
for a scheme handler. Instead check that the scheme is a non-null string before checking to see
if it is in the scheme handler registry.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::urlSchemeHandlerForScheme):

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

17 months agoMark inspector/console/messageRepeatCountUpdated.html as flaky.
ryanhaddad@apple.com [Mon, 19 Feb 2018 18:18:57 +0000 (18:18 +0000)]
Mark inspector/console/messageRepeatCountUpdated.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=152452

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

17 months ago[Web Animations] Accept null composite modes in keyframes
graouts@webkit.org [Mon, 19 Feb 2018 17:42:43 +0000 (17:42 +0000)]
[Web Animations] Accept null composite modes in keyframes
https://bugs.webkit.org/show_bug.cgi?id=182902

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions.

* web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor-expected.txt:

Source/WebCore:

The Web Animations spec used to specify that that composite modes should be non-null and instead not be
provided when specifying keyframes, but now null values are accepted. We update the IDL input types used
when parsing keyframes to allow for null values.

We had already updated the getKeyframes() output in webkit.org/b/182600.

* animation/KeyframeEffectReadOnly.cpp:
(WebCore::processIterableKeyframes):
(WebCore::processKeyframeLikeObject):
(WebCore::processPropertyIndexedKeyframes):
* animation/KeyframeEffectReadOnly.h:
* animation/KeyframeEffectReadOnly.idl:

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

17 months agoGetArrayMask should support constant folding
fpizlo@apple.com [Mon, 19 Feb 2018 17:39:52 +0000 (17:39 +0000)]
GetArrayMask should support constant folding
https://bugs.webkit.org/show_bug.cgi?id=182907

Reviewed by Saam Barati.

Implement constant folding for GetArrayMask. This revealed a bug in tryGetFoldableView, where it was
ignoring the result of a jsDynamicCast<>(). This wasn't a bug before because it would have been
impossible for that function to get called with a non-null value if the value was not an array view,
due to type filtering in CheckArray, the fact that CheckArray had to dominate GetArrayLength, and
the fact that the other tryGetFoldableView overload made sure that the array mode was some typed
array.

This isn't a measurable progression, but it does save a register in the codegen for typed array
accesses. Hopefully these improvements add up.

* assembler/AssemblerBuffer.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::tryGetFoldableView):

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

17 months agoIFrame is resized incorrectly on orientation change
fred.wang@free.fr [Mon, 19 Feb 2018 16:57:41 +0000 (16:57 +0000)]
IFrame is resized incorrectly on orientation change
https://bugs.webkit.org/show_bug.cgi?id=155198

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

Add a non-regression test to verify that iframes are properly resized after orientation
changes. This bug happened in iOS 10.0 but not in trunk.

* fast/events/ios/rotation/resize-iframe-after-orientation-change-expected.txt: Added.
* fast/events/ios/rotation/resize-iframe-after-orientation-change.html: Added.

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

17 months agoExplicitly qualify some method calls on this in lamdas in Service Worker code.
Ms2ger@igalia.com [Mon, 19 Feb 2018 16:46:23 +0000 (16:46 +0000)]
Explicitly qualify some method calls on this in lamdas in Service Worker code.
https://bugs.webkit.org/show_bug.cgi?id=182875

Reviewed by Chris Dumez.

This is necessary for the code to build with GCC 5. Other code already
appears to have been adapted similarly.

Source/WebCore:

No change in functionality.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::redirectReceived):
(WebCore::DocumentLoader::startLoadingMainResource):
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::ready):
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):
(WebCore::ServiceWorkerContainer::didFinishGetRegistrationsRequest):
* workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::updateExtendedEventsSet):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::claim):
(WebCore::SWServer::Connection::resolveRegistrationReadyRequests):
* workers/service/server/SWServerRegistration.cpp:
(WebCore::SWServerRegistration::updateRegistrationState):
(WebCore::SWServerRegistration::setUpdateViaCache):
(WebCore::SWServerRegistration::setLastUpdateTime):
(WebCore::SWServerRegistration::fireUpdateFoundEvent):
* workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::setState):

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::startFetch):

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

17 months ago[RenderTreeBuilder] Move RenderElement::removeAndDestroyChild() to RenderTreeBuilder
zalan@apple.com [Mon, 19 Feb 2018 15:16:59 +0000 (15:16 +0000)]
[RenderTreeBuilder] Move RenderElement::removeAndDestroyChild() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182915
<rdar://problem/37658123>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeAndDestroyChild): Deleted.
* rendering/RenderElement.h:
(WebCore::RenderElement::isChildAllowed const):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::removeFromParentAndDestroy):
* rendering/RenderView.cpp:
(WebCore::RenderView::willBeDestroyed):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::removeAndDestroyChild):
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
(WebCore::RenderTreeBuilder::FirstLetter::createRenderers):

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

17 months ago[WebVR][OpenVR] Implement getVRDisplays()
svillar@igalia.com [Mon, 19 Feb 2018 13:16:13 +0000 (13:16 +0000)]
[WebVR][OpenVR] Implement getVRDisplays()
https://bugs.webkit.org/show_bug.cgi?id=182692

Reviewed by Žan Doberšek.

This provides an implementation of Navigator's getVRDisplays()
method using OpenVR as backend. It queues several promises in
a queue and resolves them all just once. The information retrieved
is very minimal for the time being, but this change lays the ground
for all the changes that are about to land.

The VR code uses a VRManager which is the interface with the
platform code and the responsible for instantiating the right
platform code. This platform code is currently being implemented
using OpenVR but could we also ported in the future to OpenXR or any
other VR SDK.

* CMakeLists.txt:
* Modules/webvr/NavigatorWebVR.cpp:
(WebCore::NavigatorWebVR::getVRDisplays):
(WebCore::NavigatorWebVR::vrEnabled):
* Modules/webvr/NavigatorWebVR.h:
* Modules/webvr/VRDisplay.cpp:
(WebCore::VRDisplay::create):
(WebCore::VRDisplay::VRDisplay):
(WebCore::VRDisplay::isConnected const):
(WebCore::VRDisplay::displayName const):
* Modules/webvr/VRDisplay.h:
* Modules/webvr/VRDisplayCapabilities.cpp:
(WebCore::VRDisplayCapabilities::VRDisplayCapabilities):
(WebCore::VRDisplayCapabilities::hasPosition const):
(WebCore::VRDisplayCapabilities::hasOrientation const):
(WebCore::VRDisplayCapabilities::hasExternalDisplay const):
(WebCore::VRDisplayCapabilities::canPresent const):
(WebCore::VRDisplayCapabilities::maxLayer const):
* Modules/webvr/VRDisplayCapabilities.h:
(WebCore::VRDisplayCapabilities::create):
* Sources.txt:
* platform/vr/VRManager.cpp: Added. This is the main interface used by bindings code to
access VR devices data provided by platform code.
(WebCore::VRManager::singleton):
(WebCore::VRManager::VRManager):
(WebCore::VRManager::~VRManager):
(WebCore::VRManager::refreshVRDevices):
* platform/vr/VRManager.h: Added.
* platform/vr/VRPlatformDisplay.h: Added. Abstraction of a VR display system. To be
implemented by backends like OpenVR, OpenXR...
* platform/vr/VRPlatformManager.h: Added. Abstraction of the platform specific class which
retrieves data from VR devices. To be implemented by backends like OpenVR, OpenXR...
* platform/vr/openvr/VRPlatformDisplayOpenVR.cpp: Added.
(WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
* platform/vr/openvr/VRPlatformDisplayOpenVR.h: Added.
* platform/vr/openvr/VRPlatformManagerOpenVR.cpp: Added.
(WebCore::VRPlatformManagerOpenVR::create):
(WebCore::VRPlatformManagerOpenVR::VRPlatformManagerOpenVR):
(WebCore::VRPlatformManagerOpenVR::~VRPlatformManagerOpenVR):
(WebCore::VRPlatformManagerOpenVR::initOpenVR):
* platform/vr/openvr/VRPlatformManagerOpenVR.h: Added.
* WebCore.xcodeproj/project.pbxproj:

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

17 months ago[css-grid] Apply automatic minimum size clamping to spanning items too
rego@igalia.com [Mon, 19 Feb 2018 12:10:16 +0000 (12:10 +0000)]
[css-grid] Apply automatic minimum size clamping to spanning items too
https://bugs.webkit.org/show_bug.cgi?id=182684

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Update WPT tests related to this change.

* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-022.html:
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023-expected.txt:
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-023.html:
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html: Added.
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025-expected.txt: Added.
* web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html: Added.
* web-platform-tests/css/css-grid/grid-items/w3c-import.log:

Source/WebCore:

In r225776 we added the conditions from the spec to apply
the automatic minimum size clamping when required
but only to non-spanning items.
See: https://drafts.csswg.org/css-grid/#min-size-auto

This patch moves the code from GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem()
to GridTrackSizingAlgorithmStrategy::minSizeForChild()
that way the clamping is applied for both spanning and non-spanning items.

This somehow reverts r225776, as it was adding some duplicated code.
All the checks to know if we should use that part of the spec
were already present in GridTrackSizingAlgorithmStrategy::minSizeForChild().

Apart from using the previous code, there's a new loop to verify
that the max track sizing function is fixed for all the tracks of the item.

Tests: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-024.html
       imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-minimum-size-grid-items-025.html

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):

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

17 months ago[GTK][GStreamer] Replaying a webm video twice causes the video to stop getting rendered
philn@webkit.org [Mon, 19 Feb 2018 10:49:56 +0000 (10:49 +0000)]
[GTK][GStreamer] Replaying a webm video twice causes the video to stop getting rendered
https://bugs.webkit.org/show_bug.cgi?id=176789

Reviewed by Xabier Rodriguez-Calvar.

Ensure the wrapped GstGLContext is set when the pipeline goes from
READY to PAUSED state. This is a workaround for
https://bugzilla.gnome.org/show_bug.cgi?id=757933.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Add debug statement.
(WebCore::MediaPlayerPrivateGStreamer::readyTimerFired): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
Ensure the wrapped GstGLContext is set when the pipeline goes from
READY to PAUSED state.
(WebCore::MediaPlayerPrivateGStreamer::didEnd): Add debug statement.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
Change the requestGLContext to be a method instead of a static
function. Being a static function was a requirement for the now-removed OpenWebRTC player.
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): Add
debug statement, fix requestGLContext usage.
(WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext): Refactor as method.
(WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer): Fix requestGLContext usage.
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL): Remove fixed FIXME.
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGLVideoSinkContext):
Set display and app wrapped contexts on the video sink.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

17 months ago[GStreamer] Crash in WebCore::MediaPlayerRequestInstallMissingPluginsCallback::complete
calvaris@igalia.com [Mon, 19 Feb 2018 10:47:49 +0000 (10:47 +0000)]
[GStreamer] Crash in WebCore::MediaPlayerRequestInstallMissingPluginsCallback::complete
https://bugs.webkit.org/show_bug.cgi?id=166733

Reviewed by Philippe Normand.

There are a couple of issues to tackle here.

First is handling getting more than one missing plugin
installation request at the same time. For this we add the request
to a Vector and handle them there.

Second is that if the player is dead and we still get the result,
bad things happen. For that we "weaked" the pointer capture by the
lambda.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
Handle Vector of callbacks.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Weak
private player pointer and put the callback in the Vector.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Callback becomes Vector.
* platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h:
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::complete):
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):
Callback function is refactored into a "using" type and added self
as parameter to the function.

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

17 months ago[GTK] Update test expectations
csaavedra@igalia.com [Mon, 19 Feb 2018 09:08:12 +0000 (09:08 +0000)]
[GTK] Update test expectations

Unreviewed gardening.

* platform/gtk/TestExpectations: inspector/heap/getPreview.html is
passing again after r228600.

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

17 months ago[GStreamer] Playbin3 support
philn@webkit.org [Mon, 19 Feb 2018 08:58:14 +0000 (08:58 +0000)]
[GStreamer] Playbin3 support
https://bugs.webkit.org/show_bug.cgi?id=182530

Reviewed by Xabier Rodriguez-Calvar.

.:

* Source/cmake/GStreamerDefinitions.cmake: New
USE(GSTREAMER_PLAYBIN3) feature. This should be enabled only for
very recent versions of GStreamer (1.14 at least) and is optional, for now.

Source/WebCore:

This patch introduces opt-in support for the playbin3 GStreamer
element. This new playback element is still considered
experimental but it can still be very useful for media assets
containing multiple tracks of the same type. In such scenario
audio/video decoders would be created only for the selected tracks
whereas playbin2 creates decoder for each track.

* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: Take
a weak pointer of the media player instead of playbin and call the
player when enabling tracks. Also use the GstStream API instead of
inspecting the pad when playbin3 is used.
(WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer):
(WebCore::AudioTrackPrivateGStreamer::disconnect):
(WebCore::AudioTrackPrivateGStreamer::markAsActive):
(WebCore::AudioTrackPrivateGStreamer::setEnabled):
* platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp: GstStream and
GstStreamCollection smart pointer support.
(WTF::adoptGRef):
(WTF::refGPtr<GstStream>):
(WTF::derefGPtr<GstStream>):
(WTF::refGPtr<GstStreamCollection>):
(WTF::derefGPtr<GstStreamCollection>):
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
Use the GstStream API instead of inspecting the pad when playbin3
is used.
(WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
(WebCore::InbandTextTrackPrivateGStreamer::disconnect):
* platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
(WebCore::InbandTextTrackPrivateGStreamer::create):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
m_{audio,video,text}Tracks are now hashmaps, which is a bit more
convenient to use than Vectors.
(WebCore::MediaPlayerPrivateGStreamer::updateTracks): Update our
tracks implementations depending on the streams stored in the
collection.
(WebCore::MediaPlayerPrivateGStreamer::enableTrack): Activate the
given track. This method is called by the TrackPrivate
implementations.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
Refactored legacy (playbin2) support for track hashmap storage.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::newTextSample): Use track hashmap storage.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): React on
playbin3 GstStream messages, store the collection provided and
activate the given selected streams accordingly.
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks): Invalidate tracks no longer needed.
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::sourceSetupCallback):
Refactoring, use source-setup signal instead of the source
property which is not supported in playbin3.
(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
Promoted logging messages, GST_TRACE should be used for very
frequent and less interesting messages.
(WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::sourceSetup): Called by the source-setup signal handler.
(WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering): Debugging message added.
(WebCore::MediaPlayerPrivateGStreamer::setPreload): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Create a
playbin3 element if USE(GSTREAMER_PLAYBIN3) was enabled and
connect to playbin2 signals otherwise.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(WebCore::MediaPlayerPrivateGStreamer::createWeakPtr): Promoted to public.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
New StreamCollectionChanged notification type, used the sub-class.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Support for GstStream API.
(WebCore::TrackPrivateBaseGStreamer::disconnect): Clear GstStream too.
(WebCore::TrackPrivateBaseGStreamer::tagsChanged): Get tags from GstStream.
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfActiveChanged): No need to check m_pad twice.
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Ditto.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Take
a weak pointer of the media player instead of playbin and call the
player when enabling tracks. Also use the GstStream API instead of
inspecting the pad when playbin3 is used.
(WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
(WebCore::VideoTrackPrivateGStreamer::disconnect):
(WebCore::VideoTrackPrivateGStreamer::markAsActive):
(WebCore::VideoTrackPrivateGStreamer::setSelected):
* platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
* platform/graphics/gstreamer/mse/AppendPipeline.cpp: Pass player pointer to track constructor.
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: Source-setup signal handler.
(WebCore::MediaPlayerPrivateGStreamerMSE::sourceSetup):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

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

17 months agoREGRESSION(r219298): RELEASE_ASSERT(!m_owningPointerForClose) fails in WebCore::IDBSe...
commit-queue@webkit.org [Mon, 19 Feb 2018 08:07:57 +0000 (08:07 +0000)]
REGRESSION(r219298): RELEASE_ASSERT(!m_owningPointerForClose) fails in WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose
https://bugs.webkit.org/show_bug.cgi?id=174354
<rdar://problem/33294987>

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2018-02-19
Reviewed by Michael Catanzaro.

Source/WebCore:

UniqueIDBDatabase::invokeOperationAndTransactionTimer was called
even after m_owningPointerForClose was set in
UniqueIDBDatabase::didDeleteBackingStore.

No new tests (Covered by existing tests).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
Do not start deleting the UniqueIDBDatabase. Just call invokeOperationAndTransactionTimer.
(WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
Assert m_owningPointerForClose is null.

LayoutTests:

* platform/gtk/TestExpectations:
Unmarked imported/w3c/IndexedDB-private-browsing/idbfactory_open.html.
* platform/ios-wk2/TestExpectations:
Unmarked imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html.
* platform/mac/TestExpectations: Ditto.
* platform/wpe/TestExpectations: Unmarked
imported/w3c/IndexedDB-private-browsing/idbfactory_open.html and
imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html.

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

17 months agopatch
philn@webkit.org [Mon, 19 Feb 2018 07:46:54 +0000 (07:46 +0000)]
patch

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

17 months agoFix build error after r228417 without ACCESSIBILITY
commit-queue@webkit.org [Mon, 19 Feb 2018 02:46:34 +0000 (02:46 +0000)]
Fix build error after r228417 without ACCESSIBILITY
https://bugs.webkit.org/show_bug.cgi?id=182914

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2018-02-18
Reviewed by Chris Fleizach.

An inline empty version of AXObjectCache::deferFocusdUIElementChangeIfNeeded()
needs to be defined if not HAVE(ACCESSIBILITY).

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::deferFocusedUIElementChangeIfNeeded):

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

17 months ago[RenderTreeBuilder] REGRESSION(r228238) Detach renderer before destroying its subtree.
zalan@apple.com [Sun, 18 Feb 2018 18:44:34 +0000 (18:44 +0000)]
[RenderTreeBuilder] REGRESSION(r228238) Detach renderer before destroying its subtree.
https://bugs.webkit.org/show_bug.cgi?id=182908
<rdar://problem/37619394>

Reviewed by Antti Koivisto.

Source/WebCore:

Prior to r228238 we first detached the to-be-destroyed renderer and then
started nuking its descendants. r228238 changed the order and now the descendants are
destroyed while they are still attached to the tree. Apparently some of the takeChild()
normalization logic gets triggered now that the renderers still have access to their previous/next
siblings. This is unexpected and it shouldn't matter whether the subtree is still attached.
Let's revert it to the original order for now (see webkit.org/b/182909).

Test: fast/block/crash-when-subtree-is-still-attached.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeAndDestroyChild):

LayoutTests:

* fast/block/crash-when-subtree-is-still-attached-expected.txt: Added.
* fast/block/crash-when-subtree-is-still-attached.html: Added.

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

18 months agoSet the appropriate AutoFill context for suggested passwords.
commit-queue@webkit.org [Sun, 18 Feb 2018 17:51:49 +0000 (17:51 +0000)]
Set the appropriate AutoFill context for suggested passwords.
https://bugs.webkit.org/show_bug.cgi?id=182718
<rdar://problem/36326863>

Patch by Reza Abbasian <rabbasian@apple.com> on 2018-02-18
Reviewed by Wenson Hsieh and Tim Horton.

Before starting the input session, call the new delegate to query if AutoFill password suggestion assistance
is required for the focused element.

* UIProcess/API/Cocoa/_WKFormInputSession.h:
* UIProcess/API/Cocoa/_WKInputDelegate.h:
Introduce a new delegate to be called  before starting an input session to query if AutoFill password suggestion
assistance is required for the focused element.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession initWithContentView:focusedElementInfo:requiresStrongPasswordAssistance:]):
(-[WKFormInputSession requiresStrongPasswordAssistance]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Call the delegate to find out if AutoFill suggested password assistance is required.
(-[WKContentView _stopAssistingNode]):
(-[WKContentView _autofillContext]): If the first responder is a password element and requires
assistance for AutoFill suggested password, set the appropriate AutoFill context.
(-[WKFormInputSession initWithContentView:focusedElementInfo:]): Deleted.

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

18 months agoOfflineasm/MIPS: immediates need to be within 16-bit signed values
commit-queue@webkit.org [Sun, 18 Feb 2018 17:12:56 +0000 (17:12 +0000)]
Offlineasm/MIPS: immediates need to be within 16-bit signed values
https://bugs.webkit.org/show_bug.cgi?id=182890

Patch by Dominik Inführ <dominik.infuehr@gmail.com> on 2018-02-18
Reviewed by Michael Catanzaro.

In Sequence.getModifiedListMIPS(), we allow immediate values within
the range -0xffff..0xffff for immediates (addresses and other
immediates), but then in Immediate.mipsOperand() and
Address.mipsOperand() we raise if immediate values are not within
-0x7fff..0x7fff. This is inconsistent, and broke compilation on mips
since r228552 made the VM structure bigger meaning we address values
with bigger offsets in llint. This change restricts the allowed range,
so that a separate load of the value is done for values outside of
that range.

* offlineasm/mips.rb:

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

18 months ago[GStreamer] Push smaller buffers from HTTP source
cturner@igalia.com [Sun, 18 Feb 2018 10:02:40 +0000 (10:02 +0000)]
[GStreamer] Push smaller buffers from HTTP source
https://bugs.webkit.org/show_bug.cgi?id=182829

Reviewed by Philippe Normand.

Split the received buffer into smaller buffers of a size consistent
with the basesrc (4KiB). It is important not to push large buffers
into the appsrc (where large is relative to the appsrc's configured
byte size). If large buffers are pushed, then when they are internally
dequeued by the appsrc, the buffering percentage can dramatically
plummet due to a large amount of bytes being removed after a push. This
can in turn trick the media player into thinking it needs to buffer,
and then issuing a spurious set of playing->paused then
paused->playing transitions, which by the time the buffering logic
completes, data are already available.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::dataReceived):

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

18 months ago[Extra zoom mode] Form control values are stale after dismissing and representing...
wenson_hsieh@apple.com [Sun, 18 Feb 2018 05:50:13 +0000 (05:50 +0000)]
[Extra zoom mode] Form control values are stale after dismissing and representing input view controllers
https://bugs.webkit.org/show_bug.cgi?id=182877
<rdar://problem/37604395>

Reviewed by Tim Horton.

Currently, when presenting an input view controller for a focused element, we populate the initial form control
value using the WKContentView's assisted node information when it was last focused. However, if the user edits
the value of a form control, dismisses to the form control view controller (while the element is still focused)
and then begins editing the field again, the initial text will be the previous value of the input, since the
AssistedNodeInformation isn't up to date.

To fix this, we introduce a mechanism to update WKContentView's AssistedNodeInformation for the current assisted
node. This overwrites _assistedNodeInformation with new information computed from the web process, as long as
the assisted node before and after the request is made in the UI process has not changed. We accomplish this by
adding an identifier to AssistedNodeInformation, which is monotonically incremented when an element is focused
in the web process. The UI process may then use this identifier to determine whether AssistedNodeInformations
are describing the same focused element.

One interesting consideration here is that a normal AssistedNodeInformation update (propagated when focusing an
element) may be deferred in the UI process until the next layer tree commit. In the absence of the assisted node
identifier check, one could imagine a scenario in which the assisted node information in the UI process gets
"updated" from a new value to an old value:

1. The web process focuses an element and sends AssistedNodeInformation `A`.
2. WKContentView calls -updateCurrentAssistedNodeInformation.
3. The web process sends AssistedNodeInformation `B`.
4. `A` is received in the UI process, but deferred.
5. The UI process receives `B` and sets _assistedNodeInformation to `B`.
6. The UI process calls -_startAssistingNode: and sets _assistedNodeInformation to `A`.

This would mean that the _assistedNodeInformation is set to an earlier value, `A`, after being set to a later
value, `B`. However, because the AssistedNodeInformation identifier in step (2) refers to the assisted node
prior to step (1), the assisted node identifier in (5) would not match this identifier, and we would simply bail
instead of overwriting assisted node information.

We use this AssistedNodeInformation update mechanism after inserting text via input view controllers, and also
after reentering edit mode from the focused form control view controller. This fixes two issues where changing
the size of the focused element after editing it results in the focused form overlay highlighting a stale frame,
and also when setting the initial text when reentering edit mode for a form control that is already focused.

* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode const):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:

Add a new monotonically increasing identifier (per WebPage) which associates a AssistedNodeInformation with a
focused element. In the event that the web process crashes and relaunches (thus resetting this identifier),
AssistedNodeInformation state in the UI process is now also reset (see -cleanupInteraction), so we won't end up
confusing AssistedNodeInformations computed by different WebPages between a web process crash.

* UIProcess/WebPageProxy.h:

A bit of related refactoring here to remove an unnecessary bool flag that indicates whether we have a deferred
assisted node information. Instead, just use the presence of m_deferredNodeAssistanceArguments.

* UIProcess/WebPageProxy.messages.in:

Add a AssistedNodeInformationCallback IPC message.

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

Clear out the previous AssistedNodeInformation. See above for details.

(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView updateCurrentAssistedNodeInformation:]):

Tries to update AssistedNodeInformation for the current assisted node, invoking the completion callback when
finished. This may result in the assisted node information not being updated due to the current assisted node
changing in the time between the start of the request and the information being received in the UI process.

(-[WKContentView presentViewControllerForCurrentAssistedNode]):

Refactored from -presentViewControllerForAssistedNode:, such that it no longer takes an AssistedNodeInformation
as an argument, but rather just uses WKContentView's current _assistedNodeInformation. This was just being
called with _assistedNodeInformation from all call sites anyways.

(-[WKContentView textInputController:didCommitText:]):

Request an AssistedNodeInformation update after setting the value of a form control; if the assisted node hasn't
changed, update the focused form control overlay. This is needed to handle cases where the focused element's
frame may have changed after inserting text (e.g. due to line wrapping), and the focused form control overlay
needs to be updated to reflect this change.

(-[WKContentView focusedFormControlControllerDidBeginEditing:]):

Request an AssistedNodeInformation update before reentering edit mode; if the assisted node hasn't changed since
the start of the request, present the appropriate input view controller.

(-[WKContentView presentViewControllerForAssistedNode:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::assistedNodeInformationCallback):
(WebKit::WebPageProxy::requestAssistedNodeInformation):
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::startAssistingNode):
(WebKit::WebPageProxy::stopAssistingNode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::elementDidFocus):

Increment the assisted node identifier.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestAssistedNodeInformation):

Compute and return an AssistedNodeInformation.

(WebKit::WebPage::getAssistedNodeInformation):

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

18 months agoFix up ChangeLog entry for r228594 (https://bugs.webkit.org/show_bug.cgi?id=182900...
dbates@webkit.org [Sun, 18 Feb 2018 04:43:31 +0000 (04:43 +0000)]
Fix up ChangeLog entry for r228594 (https://bugs.webkit.org/show_bug.cgi?id=182900). Update bug title
and description to explain that this change was removing the code to parse the UTF-32{BE, LE} BOM and
encoding/decoding logic that is no longer needed following the removal of UTF-32{BE, LE} from the text
codec registry in r224747 (https://bugs.webkit.org/show_bug.cgi?id=179435).

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

18 months agoWeb Inspector: get rid of remaining uses of OptOutput<T>
darin@apple.com [Sat, 17 Feb 2018 19:10:15 +0000 (19:10 +0000)]
Web Inspector: get rid of remaining uses of OptOutput<T>
https://bugs.webkit.org/show_bug.cgi?id=180607

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/AsyncStackTrace.cpp: Removed explicit Inspector prefix from code that
is inside the Inspector namespace already. Also use auto a bit.
* inspector/AsyncStackTrace.h: Ditto.
* inspector/ConsoleMessage.cpp: Ditto.

* inspector/ContentSearchUtilities.cpp: More Inspector namespace removal and ...
(Inspector::ContentSearchUtilities::getRegularExpressionMatchesByLines): Use a
Vector instead of a unique_ptr<Vector>.
(Inspector::ContentSearchUtilities::lineEndings): Ditto.
(Inspector::ContentSearchUtilities::stylesheetCommentPattern): Deleted.
(Inspector::ContentSearchUtilities::findMagicComment): Use std::array instead of
a Vector for a fixed size array; also got rid of reinterpret_cast.
(Inspector::ContentSearchUtilities::findStylesheetSourceMapURL): Moved the regular
expression here since it's the only place it was used.

* inspector/ContentSearchUtilities.h: Cut down on unneeded includes.

* inspector/InjectedScript.cpp: Removed explicit Inspector prefix from code that
is inside the Inspector namespace already. Also use auto a bit.

* inspector/InspectorProtocolTypes.h: Removed OptOutput. Simplified assertions.
Removed base template for BindingTraits; we only need the specializations.

* inspector/ScriptCallFrame.cpp: Removed explicit Inspector prefix from code that
is inside the Inspector namespace already. Also use auto a bit.
* inspector/ScriptCallFrame.h: Ditto.
* inspector/ScriptCallStack.cpp: Ditto.
* inspector/ScriptCallStack.h: Ditto.
* inspector/agents/InspectorConsoleAgent.cpp: Ditto.
* inspector/agents/InspectorConsoleAgent.h: Ditto.

* inspector/agents/InspectorDebuggerAgent.cpp: More Inspector namespace removal and ...
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame): Use std::optional& intead of
OptOutput* for out arguments.
* inspector/agents/InspectorDebuggerAgent.h: Ditto.

* inspector/agents/InspectorHeapAgent.cpp: More Inspector namespace removal and ...
(Inspector::InspectorHeapAgent::getPreview): Use std::optional& intead of OptOutput*
for out arguments.
* inspector/agents/InspectorHeapAgent.h: Ditto.

* inspector/agents/InspectorRuntimeAgent.cpp: More Inspector namespace removal and ...
(Inspector::InspectorRuntimeAgent::parse): Use std::optional& intead of OptOutput*
for out arguments.
(Inspector::InspectorRuntimeAgent::evaluate): Ditto.
(Inspector::InspectorRuntimeAgent::callFunctionOn): Ditto.
(Inspector::InspectorRuntimeAgent::saveResult): Ditto.
* inspector/agents/InspectorRuntimeAgent.h: Ditto.

* inspector/agents/InspectorScriptProfilerAgent.cpp: More Inspector namespace removal
and removed some bogus const.
* inspector/agents/InspectorScriptProfilerAgent.h: Ditto.

* inspector/scripts/codegen/cpp_generator.py:
(CppGenerator.cpp_type_for_unchecked_formal_in_parameter): Removed some bogus const.
(CppGenerator.cpp_type_for_type_with_name): Ditto.
(CppGenerator.cpp_type_for_formal_out_parameter): Use std::optional& instead of
Inspector::Protocol::OptOutput*.
(CppGenerator.cpp_type_for_formal_async_parameter): Ditto.
(CppGenerator.cpp_type_for_stack_in_parameter): Ditto.
(CppGenerator.cpp_type_for_stack_out_parameter): Ditto.

* inspector/scripts/codegen/cpp_generator_templates.py: Removed ASSERT_DISABLED
conditional around assertion code which will now compile to nothing if ASSERT is disabled.
Build strings more simply in a few cases.

* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
Use has_value instead of isAssigned and * operator instead of getValue() since std::optional
replace OptOutput here.
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
Pass by reference instead of pointer now.

* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
Removed ASSERT_DISABLED conditional around assertion code which will now compile to nothing
if ASSERT is disabled.

* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
(CppProtocolTypesImplementationGenerator._generate_assertion_for_object_declaration): Generate
the assertion function unconditionally, but leave out the assertions if ASSERT_DISABLED is true.
(CppProtocolTypesImplementationGenerator): Use auto instead of writing out JSON::Object::iterator.

* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
(ObjCBackendDispatcherImplementationGenerator._generate_conversions_for_command): Build strings
more simply.

* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
Rebaselined.

Source/WebCore:

* inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject): Take a const Vector& instead of a Vector*.
(WebCore::InspectorStyle::buildObjectForStyle const): Pass lineEndings() instead
of lineEndings().get().
(WebCore::InspectorStyle::styleWithProperties const): Ditto.
(WebCore::InspectorStyleSheet::buildObjectForSelectorList): Ditto.
(WebCore::InspectorStyleSheet::lineEndings const): Return a Vector instead of
a std::unique_ptr<Vector>.
(WebCore::InspectorStyleSheetForInlineStyle::lineEndings const): Ditto.
* inspector/InspectorStyleSheet.h: Updated for the above.

* inspector/agents/InspectorCSSAgent.h: Removed some bogus const.
* inspector/agents/InspectorCanvasAgent.cpp: Ditto.
* inspector/agents/InspectorCanvasAgent.h: Ditto.

* inspector/agents/InspectorDOMDebuggerAgent.cpp: Improved type of global strings
so we don't waste space with a pointer to the string.
(WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint): Removed
explicit creation of String, which was wasteful and unnecessary.
(WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Removed bogus const.

* inspector/agents/InspectorDOMDebuggerAgent.h: Removed bogus const and use
final instead of override.
* inspector/agents/InspectorPageAgent.cpp: Ditto.
* inspector/agents/InspectorPageAgent.h: Ditto.

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

18 months ago[RenderTreeBuilder] Cleanup RenderTreeBuilder
zalan@apple.com [Sat, 17 Feb 2018 06:01:58 +0000 (06:01 +0000)]
[RenderTreeBuilder] Cleanup RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182899
<rdar://problem/37627888>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::takeChild):
(WebCore::RenderTreeBuilder::moveChildTo):
(WebCore::RenderTreeBuilder::moveAllChildrenTo):
(WebCore::RenderTreeBuilder::moveChildrenTo):
(WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo):
(WebCore::RenderTreeBuilder::makeChildrenNonInline):
(WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
(WebCore::RenderTreeBuilder::takeChildFromRenderMenuList): Deleted.
(WebCore::RenderTreeBuilder::takeChildFromRenderButton): Deleted.
* rendering/updating/RenderTreeBuilder.h:
(WebCore::RenderTreeBuilder::current):
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild):
* rendering/updating/RenderTreeBuilderBlockFlow.cpp:
(WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo):
* rendering/updating/RenderTreeBuilderFormControls.cpp:
(WebCore::RenderTreeBuilder::FormControls::takeChild):
* rendering/updating/RenderTreeBuilderFormControls.h:
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
(WebCore::RenderTreeBuilder::Ruby::takeChild):
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):

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

18 months agoRemove dead code for UTF-32
commit-queue@webkit.org [Sat, 17 Feb 2018 05:49:59 +0000 (05:49 +0000)]
Remove dead code for UTF-32
https://bugs.webkit.org/show_bug.cgi?id=182900
<rdar://problem/37238717>

Patch by Daniel Bates <dabates@apple.com> on 2018-02-16
Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

Update expected results now that all sub-tests pass.

* web-platform-tests/encoding/unsupported-encodings-expected.txt:
* web-platform-tests/encoding/utf-32-expected.txt:

Source/WebCore:

The UTF-32 encodings were removed from the text codec registry in r224747. So,
we no longer need code to encode or decode these variants.

* dom/TextDecoder.cpp:
(WebCore::codeUnitByteSize):
* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::checkForBOM):
(WebCore::TextResourceDecoder::checkForHeadCharset):
* platform/text/TextEncoding.cpp:
(WebCore::TextEncoding::isNonByteBasedEncoding const):
(WebCore::UTF32BigEndianEncoding): Deleted.
(WebCore::UTF32LittleEndianEncoding): Deleted.
* platform/text/TextEncoding.h:

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

18 months ago[RenderTreeBuilder] Move RenderBoxModelObject::moveChild*() to RenderTreeBuilder
zalan@apple.com [Sat, 17 Feb 2018 02:20:24 +0000 (02:20 +0000)]
[RenderTreeBuilder] Move RenderBoxModelObject::moveChild*() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182896
<rdar://problem/37623051>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderBlock.h:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
(WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo): Deleted.
* rendering/RenderBlockFlow.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::moveChildTo): Deleted.
(WebCore::RenderBoxModelObject::moveChildrenTo): Deleted.
(WebCore::RenderBoxModelObject::moveAllChildrenToInternal): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::moveChildTo): Deleted.
(WebCore::RenderBoxModelObject::moveAllChildrenTo): Deleted.
(WebCore::RenderBoxModelObject::moveChildrenTo): Deleted.
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::moveChildTo):
(WebCore::RenderTreeBuilder::moveAllChildrenTo):
(WebCore::RenderTreeBuilder::moveChildrenTo):
(WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo):
(WebCore::RenderTreeBuilder::makeChildrenNonInline):
(WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::moveAllChildrenToInternal):
(WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock):
(WebCore::RenderTreeBuilder::Block::takeChild):
(WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild):
* rendering/updating/RenderTreeBuilderBlockFlow.cpp:
(WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo):
* rendering/updating/RenderTreeBuilderBlockFlow.h:
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
(WebCore::RenderTreeBuilder::Ruby::takeChild):
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):

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

18 months ago[Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds
aestes@apple.com [Sat, 17 Feb 2018 02:13:59 +0000 (02:13 +0000)]
[Cocoa] Stop using non-prefixed vDSP functions in 32-bit builds
https://bugs.webkit.org/show_bug.cgi?id=182898
<rdar://problem/37195079>

Reviewed by Tim Horton.

There's no need to use non-prefixed vDSP function aliases on 32-bit builds.
The vDSP-prefixed versions are available on all Cocoa platforms we currently support.

* platform/audio/DirectConvolver.cpp:
(WebCore::DirectConvolver::process):
* platform/audio/VectorMath.cpp:
(WebCore::VectorMath::vsmul):
(WebCore::VectorMath::vadd):
(WebCore::VectorMath::vmul):
(WebCore::VectorMath::zvmul):

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

18 months agoUnreviewed, rolling out r228575.
ryanhaddad@apple.com [Sat, 17 Feb 2018 01:43:32 +0000 (01:43 +0000)]
Unreviewed, rolling out r228575.

Introduced LayoutTest crashes under GuardMalloc.

Reverted changeset:

"Use ResourceLoader to load appcache manifest"
https://bugs.webkit.org/show_bug.cgi?id=182861
https://trac.webkit.org/changeset/228575

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

18 months agoUse OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa
dino@apple.com [Sat, 17 Feb 2018 00:48:36 +0000 (00:48 +0000)]
Use OPENGL macros to be more clear about which OpenGL/ES WebGL uses on Cocoa
https://bugs.webkit.org/show_bug.cgi?id=182894

Reviewed by Tim Horton.

.:

Rename OPENGL_ES_2 to OPENGL_ES.

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:

PerformanceTests:

Rename OPENGL_ES_2 to OPENGL_ES.

* StitchMarker/wtf/Platform.h:

Source/WebCore:

Adjust the places where we check for PLATFORM(MAC) or
PLATFORM(IOS) related to WebGL, and instead rely
on USE(OPENGL) USE(OPENGL_ES).

* CMakeLists.txt:
* PlatformGTK.cmake:
* platform/graphics/GLContext.cpp:
(WebCore::initializeOpenGLShimsIfNeeded):
* platform/graphics/GraphicsContext3DPrivate.cpp:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::getEGLConfig):
(WebCore::GLContextEGL::createContext):
(WebCore::GLContextEGL::createSharingContext):
* platform/graphics/egl/GLContextEGLWPE.cpp:
(WebCore::GLContextEGL::createWPEContext):
* platform/graphics/egl/GLContextEGLWayland.cpp:
(WebCore::GLContextEGL::createWaylandContext):
* platform/graphics/egl/GLContextEGLX11.cpp:
(WebCore::GLContextEGL::createPixmapContext):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::isGLES2Compliant const):
* platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::isGLES2Compliant const):
(WebCore::GraphicsContext3D::getExtensions):
* platform/graphics/texmap/TextureMapperContextAttributes.cpp:
(WebCore::TextureMapperContextAttributes::initialize):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::~TextureMapperGLData):
(WebCore::TextureMapperGLData::getVAO):
(WebCore::TextureMapperGL::beginPainting):
(WebCore::TextureMapperGL::endPainting):
* platform/graphics/texmap/TextureMapperGLHeaders.h:
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::create):

Source/WebKit:

Rename OPENGL_ES_2 to OPENGL_ES.

* CMakeLists.txt:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
* UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
(WebKit::AcceleratedBackingStoreWayland::paint):
* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::initializeEGL):

Source/WebKitLegacy/win:

Rename OPENGL_ES_2 to OPENGL_ES.

* WebCoreSupport/AcceleratedCompositingContext.cpp:

Source/WTF:

If we're on a Cocoa platform, define USE_OPENGL/USE_OPENGL_ES
depending on what we're actually going to use. In this case,
they are exclusive, but it doesn't appear that other platforms
use this approach. Ultimately the idea is to be more concerned
with the type of OpenGL we're using, rather than the platform.

* wtf/Platform.h: Define USE_OPENGL(_ES) for PLATFORM(COCOA).

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

18 months agoAdd an entitlement check for service worker on iOS
rniwa@webkit.org [Sat, 17 Feb 2018 00:46:52 +0000 (00:46 +0000)]
Add an entitlement check for service worker on iOS
https://bugs.webkit.org/show_bug.cgi?id=182865
<rdar://problem/37505903>

Reviewed by Brady Eidson.

Source/WebKit:

Added an entitlement check to enable service workers on iOS.

* Shared/mac/SandboxUtilities.h:
* Shared/mac/SandboxUtilities.mm:
(WebKit::connectedProcessHasEntitlement): Added.
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::createStorageToWebProcessConnection): Enforce the entitlement check by crashing
when this code is executed without the parent process having the service worker entitlement. This should
never happen unless someone is trying to bypass the entitlement check in UI Process since we ordinarily
disable service worker gracefully in WKWebView _initializeWithConfiguration.
(WebKit::StorageProcess::swServerForSession): Ditto.
(WebKit::StorageProcess::registerSWServerConnection): Ditto.
* StorageProcess/StorageProcess.h:
(WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Added.
* StorageProcess/ios/StorageProcessIOS.mm:
(WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const): Added.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Disable the service workers when the entitlement is
missing from the current process. The entitlement is enforced by WebContent and Storage process.
This check avoids crashing WebContent process and gracefully disabling the feature.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Enforce the entitlement check.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): Added.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const): Added.

Tools:

Added the service worker entitlements to WebKitTestRunner and TestWebKitAPI on iOS.

* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

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

18 months ago[RenderTreeBuilder] Move RenderElement::insertChildInternal() to RenderTreeBuilder
zalan@apple.com [Sat, 17 Feb 2018 00:05:35 +0000 (00:05 +0000)]
[RenderTreeBuilder] Move RenderElement::insertChildInternal() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182885
<rdar://problem/37617371>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::insertChildInternal): Deleted.
* rendering/RenderObject.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChildToRenderElement):

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

18 months agoAllow specifying which plug-ins are supported
commit-queue@webkit.org [Fri, 16 Feb 2018 23:31:31 +0000 (23:31 +0000)]
Allow specifying which plug-ins are supported
https://bugs.webkit.org/show_bug.cgi?id=182748

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

Source/WebCore:

Tests: http/tests/plugins/nounsupported-plugin.html
       http/tests/plugins/supported-plugin-all-origin-visibility.html
       http/tests/plugins/supported-plugin-on-specific-origin.html
       http/tests/plugins/supported-plugin-origin-specific-visibility.html
       http/tests/plugins/unsupported-plugin-on-specific-origin.html
       plugins/unsupported-plugin.html

Added support for computing plugin web visibility with the added knowledge of supported plugins.
In case of a plugin failing to be created due to being unsupported, update the UI
to use mark the plugin as "Unexpected plug in".

Added internal API to retrieve the plug-in error description message.

* English.lproj/Localizable.strings:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::setReplacement):
* html/HTMLPlugInElement.h:
* loader/EmptyClients.cpp:
* platform/LocalizedStrings.cpp:
(WebCore::unsupportedPluginText):
* platform/LocalizedStrings.h:
* plugins/PluginData.cpp:
(WebCore::PluginData::initPlugins):
* plugins/PluginData.h:
(WebCore::decodePluginNames):
(WebCore::encodePluginNames):
(WebCore::SupportedPluginNames::decode):
(WebCore::SupportedPluginNames::encode const):
* plugins/PluginInfoProvider.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObject::pluginReplacementTextIfUnavailable const):
* testing/Internals.cpp:
(WebCore::Internals::unavailablePluginReplacementText):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Add a C and ObjC API to set which plug-ins are specified.
Plug-ins may be allowed by origin of the main page or for all origins.

If the API to set a supported plug-in is called, WebKit enters a mode
where it will block any plug-in that is not on the list.

The list of supported plug-ins is stored in UIProcess and sent to WebProcess.
This allows to compute the list of visible plug-ins according supported plugins.

PluginInfoStore is storing the list of supported plugins and can
answer whether a plug-in creation request is to be made unsupported or not.
It also creates the structure sent to WebProcess for computing plugin visibility.

Updated ArgumentCoders to accept modern HashSet decoders.

* Platform/IPC/ArgumentCoders.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextAddSupportedPlugin):
(WKContextClearSupportedPlugins):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _addSupportedPlugin:named:withMimeTypes:withExtensions:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::isSupportedPlugin):
(WebKit::PluginInfoStore::SupportedPlugins::isSupported):
(WebKit::PluginInfoStore::SupportedPlugin::isSupported):
(WebKit::PluginInfoStore::supportedPluginNames):
(WebKit::PluginInfoStore::addSupportedPlugin):
* UIProcess/Plugins/PluginInfoStore.h:
(WebKit::PluginInfoStore::clearSupportedPlugins):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::addSupportedPlugin):
(WebKit::WebProcessPool::clearSupportedPlugins):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPlugins):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::getPluginInfo):
(WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
(WebKit::WebPluginInfoProvider::populatePluginCache):
* WebProcess/Plugins/WebPluginInfoProvider.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton const):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::canPluginHandleResponse):

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPluginInfoProvider.h:
* WebCoreSupport/WebPluginInfoProvider.mm:
(WebPluginInfoProvider::getPluginInfo):
(WebPluginInfoProvider::getWebVisiblePluginInfo):

Source/WebKitLegacy/win:

* WebCoreSupport/WebPluginInfoProvider.cpp:
(WebPluginInfoProvider::getPluginInfo):
* WebCoreSupport/WebPluginInfoProvider.h:

Tools:

Add support for a test runner API to specificy supported plug-ins.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPluginsAsUnsupported):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setPluginsAsUnsupported):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

* http/tests/plugins/nounsupported-plugin-expected.txt: Added.
* http/tests/plugins/nounsupported-plugin.html: Added.
* http/tests/plugins/supported-plugin-all-origin-visibility-expected.txt: Added.
* http/tests/plugins/supported-plugin-all-origin-visibility.html: Added.
* http/tests/plugins/supported-plugin-on-specific-origin-expected.txt: Added.
* http/tests/plugins/supported-plugin-on-specific-origin.html: Added.
* http/tests/plugins/supported-plugin-origin-specific-visibility-expected.txt: Added.
* http/tests/plugins/supported-plugin-origin-specific-visibility.html: Added.
* http/tests/plugins/unsupported-plugin-on-specific-origin-expected.txt: Added.
* http/tests/plugins/unsupported-plugin-on-specific-origin.html: Added.
* plugins/unsupported-plugin-expected.txt: Added.
* plugins/unsupported-plugin.html: Added.
* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:

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

18 months agohttp/tests/security/http-0.9/xhr-blocked.html is flaky
cdumez@apple.com [Fri, 16 Feb 2018 23:18:00 +0000 (23:18 +0000)]
http/tests/security/http-0.9/xhr-blocked.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=182857
<rdar://problem/37616958>

Reviewed by Antti Koivisto.

WebCoreResourceHandleAsOperationQueueDelegate does not own the messageQueue and
the detachHandle function was failing to nullout m_messageQueue when the resourceHandle
gets destroyed. This means that callFunctionOnMainThread would sometimes try to append
to a dead messageQueue.

No new tests, already covered by:
http/tests/security/http-0.9/xhr-blocked.html is flaky

* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]):

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

18 months agoAssert in mixed blend animation
antti@apple.com [Fri, 16 Feb 2018 23:15:08 +0000 (23:15 +0000)]
Assert in mixed blend animation
https://bugs.webkit.org/show_bug.cgi?id=182887
<rdar://problem/37598140>

Reviewed by Zalan Bujtas.

Test: fast/css/calc-mixed-blend-crash.html

* platform/CalculationValue.cpp:
(WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):

Fix mismatch between the type test and the value used.

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

18 months agoApply Bugzilla patches for CVE-2018-5123
commit-queue@webkit.org [Fri, 16 Feb 2018 23:12:13 +0000 (23:12 +0000)]
Apply Bugzilla patches for CVE-2018-5123
https://bugs.webkit.org/show_bug.cgi?id=182884

Patch by Ling Ho <lingho@apple.com> on 2018-02-16
Reviewed by Alexey Proskuryakov.

* Bugzilla/CGI.pm:
(_prevent_unsafe_response):
(header):
* attachment.cgi:

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

18 months agoUnreviewed, rolling out r228318.
jlewis3@apple.com [Fri, 16 Feb 2018 22:06:33 +0000 (22:06 +0000)]
Unreviewed, rolling out r228318.

The patch that this attempted to fix was rolled out already.

Reverted changeset:

"Fix build on ARMv7 traditional JSCOnly bot after r228306"
https://bugs.webkit.org/show_bug.cgi?id=182563
https://trac.webkit.org/changeset/228318

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

18 months agoWeb Inspector: TabBar redesign: remove top-level search field and pin the Search tab
mattbaker@apple.com [Fri, 16 Feb 2018 22:06:01 +0000 (22:06 +0000)]
Web Inspector: TabBar redesign: remove top-level search field and pin the Search tab
https://bugs.webkit.org/show_bug.cgi?id=182353
<rdar://problem/37088644>

Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Base/Main.js:
(WI.contentLoaded):
Create Search UI based on experimental setting. When the new TabBar is
enabled, the Search tab is a pinned tab. Since it is also saveable, it
needs to be added to the TabBrowser (the browser adds the item to the bar).

When restoring saved tabs, make an additional check to prevent a tab
from being added twice. This can occur now that the Search tab is pinned.

* UserInterface/Images/Search.svg:
Update art to better match Safari/macOS. Slightly increase the radius of
the lens, and shorten the length of the handle.

* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog > div::before):
Update styles for new Search icon.

* UserInterface/Views/LegacyTabBar.js:
(WI.LegacyTabBar.prototype.get saveableTabCount):
Backported new TabBar method which is called by TabBrowser.

* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .field::before):
Update styles for new Search icon.

* UserInterface/Views/PinnedTabBarItem.js:
(WI.PinnedTabBarItem.prototype.fromTabInfo):
Match GeneralTabBarItem.fromTabInfo.

* UserInterface/Views/SearchTabContentView.js:
(WI.SearchTabContentView):
(WI.SearchTabContentView.tabInfo):
New image (magnifying glass without border) when new TabBar is enabled.

* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView):

* UserInterface/Views/TabBar.js:
(WI.TabBar):
Move creation of the Settings item out of TabBar. The TabBar should
only be concerned with managing tabs.

(WI.TabBar.prototype.get saveableTabCount):
(WI.TabBar.prototype._handleContextMenu):
(WI.TabBar.prototype.get normalNonEphemeralTabCount): Deleted.
Now that the Search tab is pinned, there aren't any normal tabs that
are also ephemeral. For the LegacyTabBar, both the Search and New Tab
tabs are still in this category.

* UserInterface/Views/TabBrowser.js:
(WI.TabBrowser.prototype.addTabForContentView):
(WI.TabBrowser.prototype.closeTabForContentView):
(WI.TabBrowser.prototype._tabBarItemSelected):
(WI.TabBrowser._tabBarItemRemoved):
Recent tab list should be validated against the list of saveable tabs,
since the Search tab is no longer a normal tab (a GeneralTabBarItem),
but is still persisted across Inspector sessions.

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

18 months ago[Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
bfulgham@apple.com [Fri, 16 Feb 2018 21:56:16 +0000 (21:56 +0000)]
[Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
https://bugs.webkit.org/show_bug.cgi?id=182882
<rdar://problem/35672661>

Reviewed by Dan Bernstein.

Make sure the smart pointer hold the collection of subviews lives at least as
long as the loop using it.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):

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

18 months agoMark fast/block/positioning/fixed-container-with-relative-parent.html as flaky.
ryanhaddad@apple.com [Fri, 16 Feb 2018 21:53:18 +0000 (21:53 +0000)]
Mark fast/block/positioning/fixed-container-with-relative-parent.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181834

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

18 months ago[RenderTreeBuilder] Move RenderBlock/RenderInline::addChildIgnoringContinuation(...
zalan@apple.com [Fri, 16 Feb 2018 21:42:39 +0000 (21:42 +0000)]
[RenderTreeBuilder] Move RenderBlock/RenderInline::addChildIgnoringContinuation() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182876
<rdar://problem/37607604>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringContinuation): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::addChildIgnoringContinuation): Deleted.
* rendering/RenderElement.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::addChildIgnoringContinuation): Deleted.
* rendering/RenderInline.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChildIgnoringContinuation):
(WebCore::RenderTreeBuilder::insertChildToRenderBlockIgnoringContinuation): Deleted.
(WebCore::RenderTreeBuilder::insertChildToRenderInlineIgnoringContinuation): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::insertChildToContinuation):
* rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::RenderTreeBuilder::Inline::insertChildToContinuation):
(WebCore::RenderTreeBuilder::Inline::splitInlines):

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

18 months ago[Curl] Unify logic of ResourceHandleCurlDelegate into ResourceHandle
commit-queue@webkit.org [Fri, 16 Feb 2018 21:39:38 +0000 (21:39 +0000)]
[Curl] Unify logic of ResourceHandleCurlDelegate into ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=182578

Reconstruct the classes to match Curl port network layer more similar
structure with other ports. Move CurlRequest handling into ResourceHandle
and makes CurlResourceHandleDelegate simple life cycle. Also its duty is
for most of incoming data and event handling from CurRequest.

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

No new tests because there's no new behavior.

* platform/Curl.cmake:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::didReceiveResponse):
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::~CurlDownload):
(WebCore::CurlDownload::createCurlRequest):
(WebCore::CurlDownload::curlDidReceiveResponse):
(WebCore::CurlDownload::curlDidReceiveBuffer):
(WebCore::CurlDownload::curlDidComplete):
(WebCore::CurlDownload::curlDidFailWithError):
(WebCore::CurlDownload::willSendRequest):
* platform/network/curl/CurlDownload.h:
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::CurlRequest):
(WebCore::CurlRequest::cancel):
(WebCore::CurlRequest::callClient):
(WebCore::CurlRequest::willSendData):
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::didReceiveDataFromMultipart):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::invokeDidReceiveResponse):
* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::create):
(WebCore::CurlRequest::invalidateClient):
(WebCore::CurlRequest::setClient): Deleted.
* platform/network/curl/CurlRequestClient.h:
* platform/network/curl/CurlResourceHandleDelegate.cpp: Added.
(WebCore::CurlResourceHandleDelegate::CurlResourceHandleDelegate):
(WebCore::CurlResourceHandleDelegate::ref):
(WebCore::CurlResourceHandleDelegate::deref):
(WebCore::CurlResourceHandleDelegate::cancelledOrClientless):
(WebCore::CurlResourceHandleDelegate::client const):
(WebCore::CurlResourceHandleDelegate::d):
(WebCore::CurlResourceHandleDelegate::curlDidSendData):
(WebCore::handleCookieHeaders):
(WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):
(WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer):
(WebCore::CurlResourceHandleDelegate::curlDidComplete):
(WebCore::CurlResourceHandleDelegate::curlDidFailWithError):
* platform/network/curl/CurlResourceHandleDelegate.h: Added.
(WebCore::CurlResourceHandleDelegate::response const):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandleInternal::~ResourceHandleInternal):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::cancel):
(WebCore::ResourceHandle::cancelledOrClientless):
(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::delegate):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::getCredential):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse):
(WebCore::ResourceHandle::continueAfterDidReceiveResponse):
(WebCore::ResourceHandle::shouldRedirectAsGET):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::continueAfterWillSendRequest):
(WebCore::ResourceHandle::handleDataURL):
* platform/network/curl/ResourceHandleCurlDelegate.cpp: Removed.
* platform/network/curl/ResourceHandleCurlDelegate.h: Removed.

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

18 months agoUnreviewed, roll out r228306 (custom memcpy/memset) because the bots say that it...
fpizlo@apple.com [Fri, 16 Feb 2018 21:38:53 +0000 (21:38 +0000)]
Unreviewed, roll out r228306 (custom memcpy/memset) because the bots say that it was not a
progression.

Source/bmalloc:

* bmalloc/Algorithm.h:
(bmalloc::fastCopy): Deleted.
(bmalloc::fastZeroFill): Deleted.
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::reallocate):
* bmalloc/Bits.h:
(bmalloc::BitsWordOwner::operator=):
(bmalloc::BitsWordOwner::clearAll):
(bmalloc::BitsWordOwner::set):
* bmalloc/IsoPageInlines.h:
(bmalloc::IsoPage<Config>::IsoPage):
* bmalloc/Vector.h:
(bmalloc::Vector<T>::reallocateBuffer):

Source/JavaScriptCore:

* assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::append):
* heap/LargeAllocation.cpp:
(JSC::LargeAllocation::tryCreate):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::Handle::didAddToDirectory):
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBufferContents::copyTo):
(JSC::ArrayBuffer::createInternal):
* runtime/ArrayBufferView.h:
(JSC::ArrayBufferView::zeroRangeImpl):
* runtime/ArrayConventions.cpp:
(JSC::clearArrayMemset):
* runtime/ArrayConventions.h:
(JSC::clearArray):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoPrivateFuncConcatMemcpy):
* runtime/ButterflyInlines.h:
(JSC::Butterfly::tryCreate):
(JSC::Butterfly::createOrGrowPropertyStorage):
(JSC::Butterfly::growArrayRight):
(JSC::Butterfly::resizeArray):
* runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::create):
* runtime/JSArray.cpp:
(JSC::JSArray::appendMemcpy):
(JSC::JSArray::fastSlice):
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::set):
* runtime/JSObject.cpp:
(JSC::JSObject::constructConvertedArrayStorageWithoutCopyingElements):
(JSC::JSObject::shiftButterflyAfterFlattening):
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::PropertyTable):

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/BitVector.cpp:
(WTF::BitVector::setSlow):
(WTF::BitVector::clearAll):
(WTF::BitVector::resizeOutOfLine):
* wtf/BitVector.h:
(WTF::BitVector::OutOfLineBits::numWords const):
(WTF::BitVector::wordCount): Deleted.
* wtf/CMakeLists.txt:
* wtf/ConcurrentBuffer.h:
(WTF::ConcurrentBuffer::growExact):
* wtf/FastBitVector.h:
(WTF::FastBitVectorWordOwner::operator=):
(WTF::FastBitVectorWordOwner::clearAll):
(WTF::FastBitVectorWordOwner::set):
* wtf/FastCopy.h: Removed.
* wtf/FastMalloc.cpp:
(WTF::fastZeroedMalloc):
(WTF::fastStrDup):
(WTF::tryFastZeroedMalloc):
* wtf/FastZeroFill.h: Removed.
* wtf/OSAllocator.h:
(WTF::OSAllocator::reallocateCommitted):
* wtf/StringPrintStream.cpp:
(WTF::StringPrintStream::increaseSize):
* wtf/Vector.h:
* wtf/persistence/PersistentDecoder.cpp:
(WTF::Persistence::Decoder::decodeFixedLengthData):
* wtf/persistence/PersistentEncoder.cpp:
(WTF::Persistence::Encoder::encodeFixedLengthData):
* wtf/text/CString.cpp:
(WTF::CString::init):
(WTF::CString::copyBufferIfNeeded):
* wtf/text/LineBreakIteratorPoolICU.h:
(WTF::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::append):
* wtf/text/StringConcatenate.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::copyCharacters):
* wtf/text/icu/UTextProvider.cpp:
(WTF::uTextCloneImpl):
* wtf/text/icu/UTextProviderLatin1.cpp:
(WTF::uTextLatin1Clone):
(WTF::openLatin1UTextProvider):
* wtf/threads/Signals.cpp:

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

18 months agoUse ResourceLoader to load appcache manifest
commit-queue@webkit.org [Fri, 16 Feb 2018 21:31:42 +0000 (21:31 +0000)]
Use ResourceLoader to load appcache manifest
https://bugs.webkit.org/show_bug.cgi?id=182861

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

Source/WebCore:

Covered by updated tests.

Add ApplicationCacheResourceLoader to load an ApplicationCacheResource from a ResourceLoader.
Make use of it to load the app cache manifest.
Future work should load entries using the same loader.

Remove manifest handle.
Ensure that DocumentLoader does not register the manifest resource loader as its lifetime
is handled by its ApplicationCacheGroup.

Add a ResourceLoader option to bypass the application cache.
Use it for manifest loading.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::addSubresourceLoader):
* loader/ResourceLoaderOptions.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::stopLoading):
(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::createRequest):
(WebCore::ApplicationCacheGroup::didReceiveResponseAsync):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* loader/appcache/ApplicationCacheGroup.h:
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadResource):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
* loader/appcache/ApplicationCacheResourceLoader.cpp: Added.
* loader/appcache/ApplicationCacheResourceLoader.h: Added.

LayoutTests:

* http/tests/appcache/fail-on-update-2-expected.txt:
* http/tests/appcache/manifest-redirect-2-expected.txt:
* http/tests/appcache/offline-access-expected.txt:

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

18 months agoCrash under WebCore::EventTarget::fireEventListeners
cdumez@apple.com [Fri, 16 Feb 2018 21:06:34 +0000 (21:06 +0000)]
Crash under WebCore::EventTarget::fireEventListeners
https://bugs.webkit.org/show_bug.cgi?id=182880
<rdar://problem/20788804>

Reviewed by Youenn Fablet.

Source/WebCore:

Make sure the 'ended' event does not get dispatched on a
AudioScheduledSourceNode after ActiveDOMObjects have been stopped.

Test: webaudio/audiobuffersource-ended-detached-frame.html

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::finish):

LayoutTests:

Add layout test coverage.

* webaudio/audiobuffersource-ended-detached-frame-expected.txt: Added.
* webaudio/audiobuffersource-ended-detached-frame.html: Added.
* webaudio/resources/audiobuffersource-ended-detached-frame-iframe.html: Added.

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

18 months agoWeb Inspector: TabBar redesign: TabBarItem close button is incorrectly positioned
mattbaker@apple.com [Fri, 16 Feb 2018 20:59:55 +0000 (20:59 +0000)]
Web Inspector: TabBar redesign: TabBarItem close button is incorrectly positioned
https://bugs.webkit.org/show_bug.cgi?id=182844
<rdar://problem/37586749>

Reviewed by Timothy Hatcher.

* UserInterface/Views/GeneralTabBarItem.js:
(WI.GeneralTabBarItem.prototype.set title):
Insert the title before the last flexible space item.

* UserInterface/Views/TabBar.css:
(.tab-bar > .item):
(.tab-bar > .item > .close):
(.tab-bar > .item > .flex-space):
(.tab-bar > .item.ephemeral > .flex-space:last-child):
(.tab-bar.collapsed > .item):
(.tab-bar.collapsed > .item > .flex-space):
(.tab-bar.collapsed > .item > .close):
(.tab-bar.collapsed > .item:hover > .close):
(.tab-bar.collapsed > .item.ephemeral:hover > .icon):
(.tab-bar > .item:hover > .close): Deleted.
(.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon): Deleted.

* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem):
Restore flexible space items before and after the icon.

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

18 months ago[WebAuthN] Implement PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
jiewen_tan@apple.com [Fri, 16 Feb 2018 20:43:28 +0000 (20:43 +0000)]
[WebAuthN] Implement PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
https://bugs.webkit.org/show_bug.cgi?id=182771
<rdar://problem/36459988>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch implements PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()
per https://www.w3.org/TR/webauthn/#isUserVerifyingPlatformAuthenticatorAvailable with some
limitations.

In addition, it changes DeferredPromise to DOMPromiseDeferred<> for all CredentialsManagement
and WebAuthN API.

Test: http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available.html

* Modules/credentialmanagement/CredentialsContainer.cpp:
(WebCore::CredentialsContainer::get):
(WebCore::CredentialsContainer::store):
(WebCore::CredentialsContainer::isCreate):
(WebCore::CredentialsContainer::preventSilentAccess const):
* Modules/credentialmanagement/CredentialsContainer.h:
* Modules/credentialmanagement/CredentialsMessenger.cpp:
(WebCore::CredentialsMessenger::addCreationCompletionHandler):
Remove a redundant assertion.
(WebCore::CredentialsMessenger::addRequestCompletionHandler):
Remove a redundant assertion.
(WebCore::CredentialsMessenger::addQueryCompletionHandler):
(WebCore::CredentialsMessenger::takeQueryCompletionHandler):
* Modules/credentialmanagement/CredentialsMessenger.h:
* Modules/webauthn/AuthenticatorManager.cpp:
(WebCore::AuthenticatorManagerInternal::initTimeoutTimer):
(WebCore::AuthenticatorManager::create const):
(WebCore::AuthenticatorManager::discoverFromExternalSource const):
(WebCore::AuthenticatorManager::isUserVerifyingPlatformAuthenticatorAvailable const):
* Modules/webauthn/AuthenticatorManager.h:
* Modules/webauthn/PublicKeyCredential.cpp:
(WebCore::PublicKeyCredential::isUserVerifyingPlatformAuthenticatorAvailable):
* Modules/webauthn/PublicKeyCredential.h:
* testing/MockCredentialsMessenger.cpp:
(WebCore::MockCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailable):
(WebCore::MockCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailableReply):
* testing/MockCredentialsMessenger.h:
* testing/MockCredentialsMessenger.idl:

Source/WebKit:

This patch utilizes LocalAuthentication Framework to determine if biometrics
are enrolled on a device, which is the user verifying platform authenticator.
To do so, it links the framework to WebKit.

* UIProcess/CredentialManagement/WebCredentialsMessengerProxy.cpp:
(WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailable):
(WebKit::WebCredentialsMessengerProxy::isUserVerifyingPlatformAuthenticatorAvailableReply):
* UIProcess/CredentialManagement/WebCredentialsMessengerProxy.h:
* UIProcess/CredentialManagement/WebCredentialsMessengerProxy.messages.in:
* UIProcess/CredentialManagement/cocoa/WebCredentialsMessengerProxyCocoa.mm:
(WebKit::WebCredentialsMessengerProxy::platformIsUserVerifyingPlatformAuthenticatorAvailable):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/CredentialManagement/WebCredentialsMessenger.cpp:
(WebKit::WebCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailable):
(WebKit::WebCredentialsMessenger::isUserVerifyingPlatformAuthenticatorAvailableReply):
* WebProcess/CredentialManagement/WebCredentialsMessenger.h:
* WebProcess/CredentialManagement/WebCredentialsMessenger.messages.in:

LayoutTests:

* http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available-expected.txt: Added.
* http/wpt/webauthn/public-key-is-user-verifying-platform-authenticator-available.html: Added.

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

18 months agoStop using EXCLUDED_SOURCE_FILE_NAMES for touch and gesture files in WebCore
timothy_horton@apple.com [Fri, 16 Feb 2018 19:53:19 +0000 (19:53 +0000)]
Stop using EXCLUDED_SOURCE_FILE_NAMES for touch and gesture files in WebCore
https://bugs.webkit.org/show_bug.cgi?id=182866

Reviewed by Daniel Bates.

* Configurations/WebCore.xcconfig:
These generated files already have ENABLE() flags around them,
so there's no reason to exclude them explicitly.

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

18 months agoImplement stopping of run loop in the WebContent process when using NSRunLoop.
pvollan@apple.com [Fri, 16 Feb 2018 19:38:13 +0000 (19:38 +0000)]
Implement stopping of run loop in the WebContent process when using NSRunLoop.
https://bugs.webkit.org/show_bug.cgi?id=182499
<rdar://problem/37247424>

Reviewed by Brent Fulgham.

Source/WebKit:

Add the method ChildProcess::stopNSRunLoop to end the WebContent process by executing a block
with 'exit(0)' on the main run loop.

* Shared/ChildProcess.h:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::stopNSRunLoop):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::stopRunLoop):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: Added.
(TEST):

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

18 months agoUnreviewed, fix iOS build after r228562.
cdumez@apple.com [Fri, 16 Feb 2018 19:35:52 +0000 (19:35 +0000)]
Unreviewed, fix iOS build after r228562.

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::openSQLiteDatabase):

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

18 months ago[WinCario] Add NetworkSessionCurl
commit-queue@webkit.org [Fri, 16 Feb 2018 19:34:12 +0000 (19:34 +0000)]
[WinCario] Add NetworkSessionCurl
https://bugs.webkit.org/show_bug.cgi?id=182680

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-02-16
Reviewed by Konstantin Tokarev.

* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::create):
* PlatformWin.cmake:

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

18 months ago[RenderTreeBuilder] Move RenderElement::addChild() to RenderTreeBuilder
zalan@apple.com [Fri, 16 Feb 2018 19:25:18 +0000 (19:25 +0000)]
[RenderTreeBuilder] Move RenderElement::addChild() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182878
<rdar://problem/37608349>

Reviewed by Antti Koivisto.

This patch removes the last addChild() related mutation logic from the renderers.

No change in functionality.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::didInsertChild):
(WebCore::RenderElement::addChild): Deleted.
* rendering/RenderElement.h:
(WebCore::RenderElement::isChildAllowed const):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChild):
(WebCore::RenderTreeBuilder::insertChildToRenderElement):
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation):
* rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation):
* rendering/updating/RenderTreeBuilderSVG.cpp:
(WebCore::RenderTreeBuilder::SVG::insertChild):
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::insertChild):

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

18 months agoFix bugs from r228411
sbarati@apple.com [Fri, 16 Feb 2018 19:12:29 +0000 (19:12 +0000)]
Fix bugs from r228411
https://bugs.webkit.org/show_bug.cgi?id=182851
<rdar://problem/37577732>

Reviewed by JF Bastien.

JSTests:

* stress/constant-folding-phase-insert-check-handle-varargs.js: Added.

Source/JavaScriptCore:

There was a bug from r228411 where inside the constant folding phase,
we used an insertCheck method that didn't handle varargs. This would
lead to a crash. When thinking about the fix for that function, I realized
a made a couple of mistakes in r228411. One is probably a security bug, and
the other is a performance bug because it'll prevent CSE for certain flavors
of GetByVal nodes. Both blunders are similar in nature.

In r228411, I added code in LICM that inserted a CheckVarargs node with children
of another varargs node. However, to construct this new node's children,
I just copied the AdjacencyList. This does a shallow copy. What we needed
was a deep copy. We needed to create a new vararg AdjacencyList that points
to edges that are deep copies of the original varargs children. This patch
fixes this goof in LICM.

r228411 made it so that PureValue over a varargs node would just compare actual
AdjacencyLists structs. So, if you had two GetByVals that had equal santized
children, their actual AdjacencyList structs are *not* bitwise equal, since they'll
have different firstChild values. Instead, we need to do a deep compare of their
adjacency lists. This patch teaches PureValue how to do that.

* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::copyVarargChildren):
* dfg/DFGInsertionSet.h:
(JSC::DFG::InsertionSet::insertCheck):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::attemptHoist):
* dfg/DFGPureValue.cpp:
(JSC::DFG::PureValue::dump const):
* dfg/DFGPureValue.h:
(JSC::DFG::PureValue::PureValue):
(JSC::DFG::PureValue::op const):
(JSC::DFG::PureValue::hash const):
(JSC::DFG::PureValue::operator== const):
(JSC::DFG::PureValue::isVarargs const):
(JSC::DFG::PureValue::children const): Deleted.
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
(JSC::DFG::StrengthReductionPhase::convertToIdentityOverChild):

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

18 months agoASSERTION FAILED: !m_processes[i] || *m_processes[i] == process in MessagePortChannel...
cdumez@apple.com [Fri, 16 Feb 2018 19:05:07 +0000 (19:05 +0000)]
ASSERTION FAILED: !m_processes[i] || *m_processes[i] == process in MessagePortChannel::entanglePortWithProcess()
https://bugs.webkit.org/show_bug.cgi?id=182054
<rdar://problem/36871207>

Reviewed by Brady Eidson.

Pipe postMessage messages to and from service workers via the UIProcess instead of going
directly to the StorageProcess. This is temporarily needed to avoid races due to the
MessagePort registry currently living in the UIProcess and postMessage messages potentially
sending MessagePort objects.

This change is covered by tests on the bots that currently flakily crash in debug.

* StorageProcess/ServiceWorker/WebSWServerConnection.h:
* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::postMessageToServiceWorker):
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::postMessageToServiceWorkerClient):
(WebKit::WebProcessPool::postMessageToServiceWorker):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:
* WebProcess/Storage/WebSWClientConnection.cpp:
(WebKit::WebSWClientConnection::postMessageToServiceWorker):
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::postMessageToServiceWorkerClient):

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

18 months agoUnreviewed, rolling out r228546.
jlewis3@apple.com [Fri, 16 Feb 2018 18:52:24 +0000 (18:52 +0000)]
Unreviewed, rolling out r228546.

This caused a consistent crash on all macOS WK2 platforms.

Reverted changeset:

"Web Inspector: get rid of remaining uses of OptOutput<T>"
https://bugs.webkit.org/show_bug.cgi?id=180607
https://trac.webkit.org/changeset/228546

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

18 months agoLog the error message when failing to open the database
commit-queue@webkit.org [Fri, 16 Feb 2018 18:48:32 +0000 (18:48 +0000)]
Log the error message when failing to open the database
https://bugs.webkit.org/show_bug.cgi?id=182795
<rdar://problem/37592399>

Unreviewed.
Fixing iOS simulator debug build.

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-16

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::openSQLiteDatabase):

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

18 months agofast/frames/sandboxed-iframe-navigation-top-denied.html is crashing in Inspector...
commit-queue@webkit.org [Fri, 16 Feb 2018 17:46:13 +0000 (17:46 +0000)]
fast/frames/sandboxed-iframe-navigation-top-denied.html is crashing in Inspector::createScriptCallStackForConsole::Exec for GTK
https://bugs.webkit.org/show_bug.cgi?id=172952

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2018-02-16
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Null dereference of VM::topCallFrame happens in
Inspector::createScriptCallStackForConsole if the ExecState has no
call frames.

* inspector/ScriptCallStackFactory.cpp:
(Inspector::createScriptCallStack): Do null check of topCallFrame.
(Inspector::createScriptCallStackForConsole): Ditto.

LayoutTests:

* platform/gtk/TestExpectations: Unmarked fast/frames/sandboxed-iframe-navigation-top-denied.html.

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

18 months agoIndexedDB: Several test crash in when destroying a IDBKeyData
commit-queue@webkit.org [Fri, 16 Feb 2018 17:41:12 +0000 (17:41 +0000)]
IndexedDB: Several test crash in when destroying a IDBKeyData
https://bugs.webkit.org/show_bug.cgi?id=167576

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2018-02-16
Reviewed by Michael Catanzaro.

Source/WebCore:

IDBKeyDataHashTraits::constructDeletedValue is using operator= to
assign deletedValue. But, the value is destructed just before
calling constructDeletedValue. You can't use operator= for a
destructed value.

No new tests (Covered by existing tests).

* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyDataHashTraits::constructDeletedValue):
Construct null value before assigning deletedValue.

LayoutTests:

* platform/gtk/TestExpectations: Unmarked
imported/w3c/IndexedDB-private-browsing/idbcursor_iterating.html,
imported/w3c/IndexedDB-private-browsing/idbcursor_iterating_index.html
and storage/indexeddb/modern/index-3-private.html.
* platform/wpe/TestExpectations: Unmarked
imported/w3c/IndexedDB-private-browsing/idbcursor_iterating.html and
imported/w3c/IndexedDB-private-browsing/idbcursor_iterating_index.html.

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

18 months ago[RenderTreeBuilder] Move RenderBlock/RenderBlockFlow::addChild() to RenderTreeBuilder
zalan@apple.com [Fri, 16 Feb 2018 15:13:31 +0000 (15:13 +0000)]
[RenderTreeBuilder] Move RenderBlock/RenderBlockFlow::addChild() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182862
<rdar://problem/37595464>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChild): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::addChild): Deleted.
* rendering/RenderBlockFlow.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChild):
(WebCore::RenderTreeBuilder::insertChildToRenderBlock): Deleted.
(WebCore::RenderTreeBuilder::insertChildToRenderBlockFlow): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlockFlow.cpp:
(WebCore::RenderTreeBuilder::BlockFlow::insertChild):
* rendering/updating/RenderTreeBuilderFormControls.cpp:
(WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild):
* rendering/updating/RenderTreeBuilderMathML.cpp:
(WebCore::RenderTreeBuilder::MathML::makeFences):
(WebCore::RenderTreeBuilder::MathML::insertChild):
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::insertChild):
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild):
(WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe):
* rendering/updating/RenderTreeBuilderSVG.cpp:
(WebCore::RenderTreeBuilder::SVG::insertChild):

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

18 months ago[WPE] Update expectations for a couple of flaky tests
csaavedra@igalia.com [Fri, 16 Feb 2018 15:03:59 +0000 (15:03 +0000)]
[WPE] Update expectations for a couple of flaky tests

Unreviewed gardening.

http/tests/appcache/fail-on-update.html and
svg/as-image/svg-as-image-canvas.html are flaky.
* platform/wpe/TestExpectations:

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

18 months ago[Extra zoom mode] Add basic support for <input type='date'> using date picker UI
wenson_hsieh@apple.com [Fri, 16 Feb 2018 14:35:49 +0000 (14:35 +0000)]
[Extra zoom mode] Add basic support for <input type='date'> using date picker UI
https://bugs.webkit.org/show_bug.cgi?id=182847
<rdar://problem/35143111>

Reviewed by Tim Horton.

Source/WebCore:

Add new localized strings for "month", "day" and "year" as they appear in the date picker.

* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
(WebCore::textInputModeWriteButtonTitle):
(WebCore::textInputModeSpeechButtonTitle):
(WebCore::datePickerDayLabelTitle):
(WebCore::datePickerMonthLabelTitle):
(WebCore::datePickerYearLabelTitle):
(WebCore::textInputModeWriteButton): Deleted.
(WebCore::textInputModeSpeechButton): Deleted.
* platform/LocalizedStrings.h:

Source/WebKit:

Add support for presenting date pickers when focusing a date input.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _stopAssistingNode]):
(-[WKContentView dismissAllInputViewControllers]):

Pull logic to dismiss input view controllers into a single helper.

(-[WKContentView presentDatePickerViewController:]):
(-[WKContentView dismissDatePickerViewController:]):
(-[WKContentView presentViewControllerForAssistedNode:]):
(-[WKContentView textInputController:didCommitText:]):
(-[WKContentView _wheelChangedWithEvent:]):

Delegate wheel events to the date picker.

* UIProcess/ios/forms/WKDatePickerViewController.h: Added.
* UIProcess/ios/forms/WKDatePickerViewController.mm: Added.

Add harness files for the WKDatePickerViewController implementation in WebKitAdditions.

* WebKit.xcodeproj/project.pbxproj:

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

18 months agoRemove unused line from Platform.h
keith_miller@apple.com [Fri, 16 Feb 2018 14:33:29 +0000 (14:33 +0000)]
Remove unused line from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=182871

Reviewed by Mark Lam.

* wtf/Platform.h:

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

18 months ago[WPE] New rebaseline after r228427
csaavedra@igalia.com [Fri, 16 Feb 2018 13:56:22 +0000 (13:56 +0000)]
[WPE] New rebaseline after r228427

Unreviewed gardening
* platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: Remove
gone AccessibleNode class.

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

18 months agoUpdate expectations for a couple of failing tests.
csaavedra@igalia.com [Fri, 16 Feb 2018 13:47:01 +0000 (13:47 +0000)]
Update expectations for a couple of failing tests.

Unreviewed gardening.
* platform/gtk/TestExpectations:

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

18 months agoHarfBuzzFace should operate with a FontPlatformData reference
zandobersek@gmail.com [Fri, 16 Feb 2018 08:00:19 +0000 (08:00 +0000)]
HarfBuzzFace should operate with a FontPlatformData reference
https://bugs.webkit.org/show_bug.cgi?id=182863

Reviewed by Carlos Garcia Campos.

Instead of keeping a never-null pointer to FontPlatformData,
HarfBuzzFace should operate with a FontPlatformData reference.

* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::harfBuzzFace const):
* platform/graphics/harfbuzz/HarfBuzzFace.cpp:
(WebCore::HarfBuzzFace::HarfBuzzFace):
* platform/graphics/harfbuzz/HarfBuzzFace.h:
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::HarfBuzzFace::createFace):
(WebCore::HarfBuzzFace::createFont):

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

18 months agoObjects that contain dangerous things should be allocated far away from objects that...
fpizlo@apple.com [Fri, 16 Feb 2018 05:27:39 +0000 (05:27 +0000)]
Objects that contain dangerous things should be allocated far away from objects that can do OOB
https://bugs.webkit.org/show_bug.cgi?id=182843

Reviewed by Saam Barati.

To complete our object distancing plan, we need to put objects that can contain unpoisoned data
far away from objects that cannot. Objects referenceable from JSValues cannot contain
unpoisoned data, but auxiliary data can. This further divides auxiliary data that is meant for
storing mostly JSValues from data that is meant for storing anything.

This is achieved by having three SecurityKinds that are used for MarkedBlock selection and
zeroing sort of the same way SecurityOriginToken already was.

This change shouldn't make anything slower. If anything, it will be a small speed-up because it
removes some cases of MarkedBlock zeroing since we don't need to zero blocks used for two of
the SecurityKinds.

* Sources.txt:
* bytecode/ObjectAllocationProfileInlines.h:
(JSC::ObjectAllocationProfile::initializeProfile):
* heap/BlockDirectory.cpp:
(JSC::BlockDirectory::addBlock):
* heap/BlockDirectory.h:
* heap/CellAttributes.cpp:
(JSC::CellAttributes::dump const):
* heap/CellAttributes.h:
(JSC::CellAttributes::CellAttributes):
* heap/LocalAllocator.cpp:
(JSC::LocalAllocator::allocateSlowCase):
(JSC::LocalAllocator::tryAllocateWithoutCollecting):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::Handle::didAddToDirectory):
(JSC::MarkedBlock::Handle::associateWithOrigin): Deleted.
* heap/MarkedBlock.h:
* heap/SecurityKind.cpp: Added.
(WTF::printInternal):
* heap/SecurityKind.h: Added.
* runtime/JSCellInlines.h:
(JSC::JSCell::subspaceFor):
* runtime/JSDestructibleObjectHeapCellType.cpp:
(JSC::JSDestructibleObjectHeapCellType::JSDestructibleObjectHeapCellType):
* runtime/JSObject.h:
(JSC::JSObject::subspaceFor):
* runtime/JSSegmentedVariableObjectHeapCellType.cpp:
(JSC::JSSegmentedVariableObjectHeapCellType::JSSegmentedVariableObjectHeapCellType):
* runtime/JSStringHeapCellType.cpp:
(JSC::JSStringHeapCellType::JSStringHeapCellType):
* runtime/Symbol.h:
(JSC::Symbol::subspaceFor):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp:
(JSC::JSWebAssemblyCodeBlockHeapCellType::JSWebAssemblyCodeBlockHeapCellType):

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

18 months agoResources loaded from service workers are not downloadable
commit-queue@webkit.org [Fri, 16 Feb 2018 04:27:43 +0000 (04:27 +0000)]
Resources loaded from service workers are not downloadable
https://bugs.webkit.org/show_bug.cgi?id=182848

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

Source/WebKit:

Downloads are not supporting resources loaded through service worker.
As a temporary solution, we will let network process handle it.
Note that this would not work if the URL can only be loaded through service worker.
Note also that for navigation loads, if the content type is the default one (application/octet-stream) we are overriding it to
text/html as we do not support mime sniffing yet from service worker responses.
This might interfere with automatic downloads from navigation.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):

LayoutTests:

* http/tests/workers/service/resources/download-binary.php: Added.
* http/tests/workers/service/resources/service-worker-download-worker.js: Added.
* http/tests/workers/service/service-worker-download.https-expected.txt: Added.
* http/tests/workers/service/service-worker-download.https.html: Added.

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

18 months ago[RenderTreeBuilder] parent.Render*::addChild() cleanup
zalan@apple.com [Fri, 16 Feb 2018 03:28:24 +0000 (03:28 +0000)]
[RenderTreeBuilder] parent.Render*::addChild() cleanup
https://bugs.webkit.org/show_bug.cgi?id=182842
<rdar://problem/37585524>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation):
* rendering/updating/RenderTreeBuilderFormControls.cpp:
(WebCore::RenderTreeBuilder::FormControls::createInnerRendererIfNeeded):
* rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation):
* rendering/updating/RenderTreeBuilderMathML.cpp:
(WebCore::RenderTreeBuilder::MathML::makeFences):
(WebCore::RenderTreeBuilder::MathML::insertChild):
* rendering/updating/RenderTreeBuilderSVG.cpp:
(WebCore::RenderTreeBuilder::SVG::insertChild):
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::insertChild):

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

18 months agoSupport scrolling for non-editable web-selection and start autoscroll when near scree...
megan_gardner@apple.com [Fri, 16 Feb 2018 03:08:06 +0000 (03:08 +0000)]
Support scrolling for non-editable web-selection and start autoscroll when near screen edges
https://bugs.webkit.org/show_bug.cgi?id=182815

Source/WebCore:

Reviewed by Tim Horton.

Adjust the position we are autoscrolling to so that when we are close to an edge, we will start autoscrolling
while we are still inside the view. Autoscrolling still happens when you drag past the edge of a view.

No new tests (This is difficult to test in this state, but when we switch assistants, test will also be added).

* page/EventHandler.h:
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::startSelectionAutoscroll):
(WebCore::EventHandler::cancelSelectionAutoscroll):
(WebCore::autoscrollAdjustmentFactorForScreenBoundaries):
(WebCore::EventHandler::targetPositionInWindowForSelectionAutoscroll const):
(WebCore::EventHandler::startTextAutoscroll): Deleted.
(WebCore::EventHandler::cancelTextAutoscroll): Deleted.

Source/WebKit:

Add support for autoscrolling during a selection. This also takes into account the edges of the screen
and starts autoscrolling when you get close, while still allowing autoscrolling when you are past the bounds
of the WebView.

Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView startAutoscroll:]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView useSelectionAssistantWithGranularity:]):
(-[WKContentView selectedTextRange]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAutoscrollAtPosition):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::startAutoscrollAtPosition):
(WebKit::WebPage::cancelAutoscroll):

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

18 months agoLog the error message when failing to open the database
commit-queue@webkit.org [Fri, 16 Feb 2018 02:45:07 +0000 (02:45 +0000)]
Log the error message when failing to open the database
https://bugs.webkit.org/show_bug.cgi?id=182795

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

No change of behavior.
Print the error message as it does not contain any user private information.

* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::openSQLiteDatabase):

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

18 months ago[RenderTreeBuilder] Move RenderMenuList::addChild() to RenderTreeBuilder
zalan@apple.com [Fri, 16 Feb 2018 02:37:38 +0000 (02:37 +0000)]
[RenderTreeBuilder] Move RenderMenuList::addChild() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182840
<rdar://problem/37583638>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderMenuList.cpp:
(RenderMenuList::didInsertChild):
(RenderMenuList::addChild): Deleted.
* rendering/RenderMenuList.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChild):
* rendering/updating/RenderTreeBuilderFormControls.cpp:
(WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild):
(WebCore::RenderTreeBuilder::FormControls::insertChild):
(WebCore::RenderTreeBuilder::FormControls::createInnerRendererIfNeeded): Deleted.
* rendering/updating/RenderTreeBuilderFormControls.h:

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

18 months agoWeb Inspector: get rid of remaining uses of OptOutput<T>
darin@apple.com [Fri, 16 Feb 2018 02:14:29 +0000 (02:14 +0000)]
Web Inspector: get rid of remaining uses of OptOutput<T>
https://bugs.webkit.org/show_bug.cgi?id=180607

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/AsyncStackTrace.cpp: Removed explicit Inspector prefix from code that
is inside the Inspector namespace already. Also use auto a bit.
* inspector/AsyncStackTrace.h: Ditto.
* inspector/ConsoleMessage.cpp: Ditto.

* inspector/ContentSearchUtilities.cpp: More Inspector namespace removal and ...
(Inspector::ContentSearchUtilities::getRegularExpressionMatchesByLines): Use a
Vector instead of a unique_ptr<Vector>.
(Inspector::ContentSearchUtilities::lineEndings): Ditto.
(Inspector::ContentSearchUtilities::stylesheetCommentPattern): Deleted.
(Inspector::ContentSearchUtilities::findMagicComment): Use std::array instead of
a Vector for a fixed size array; also got rid of reinterpret_cast.
(Inspector::ContentSearchUtilities::findStylesheetSourceMapURL): Moved the regular
expression here since it's the only place it was used.

* inspector/ContentSearchUtilities.h: Cut down on unneeded includes.

* inspector/InjectedScript.cpp: Removed explicit Inspector prefix from code that
is inside the Inspector namespace already. Also use auto a bit.

* inspector/InspectorProtocolTypes.h: Removed OptOutput. Simplified assertions.
Removed base template for BindingTraits; we only need the specializations.

* inspector/ScriptCallFrame.cpp: Removed explicit Inspector prefix from code that
is inside the Inspector namespace already. Also use auto a bit.
* inspector/ScriptCallFrame.h: Ditto.
* inspector/ScriptCallStack.cpp: Ditto.
* inspector/ScriptCallStack.h: Ditto.
* inspector/agents/InspectorConsoleAgent.cpp: Ditto.
* inspector/agents/InspectorConsoleAgent.h: Ditto.

* inspector/agents/InspectorDebuggerAgent.cpp: More Inspector namespace removal and ...
(Inspector::InspectorDebuggerAgent::evaluateOnCallFrame): Use std::optional& intead of
OptOutput* for out arguments.
* inspector/agents/InspectorDebuggerAgent.h: Ditto.

* inspector/agents/InspectorHeapAgent.cpp: More Inspector namespace removal and ...
(Inspector::InspectorHeapAgent::getPreview): Use std::optional& intead of OptOutput*
for out arguments.
* inspector/agents/InspectorHeapAgent.h: Ditto.

* inspector/agents/InspectorRuntimeAgent.cpp: More Inspector namespace removal and ...
(Inspector::InspectorRuntimeAgent::parse): Use std::optional& intead of OptOutput*
for out arguments.
(Inspector::InspectorRuntimeAgent::evaluate): Ditto.
(Inspector::InspectorRuntimeAgent::callFunctionOn): Ditto.
(Inspector::InspectorRuntimeAgent::saveResult): Ditto.
* inspector/agents/InspectorRuntimeAgent.h: Ditto.

* inspector/agents/InspectorScriptProfilerAgent.cpp: More Inspector namespace removal
and removed some bogus const.
* inspector/agents/InspectorScriptProfilerAgent.h: Ditto.

* inspector/scripts/codegen/cpp_generator.py:
(CppGenerator.cpp_type_for_unchecked_formal_in_parameter): Removed some bogus const.
(CppGenerator.cpp_type_for_type_with_name): Ditto.
(CppGenerator.cpp_type_for_formal_out_parameter): Use std::optional& instead of
Inspector::Protocol::OptOutput*.
(CppGenerator.cpp_type_for_formal_async_parameter): Ditto.
(CppGenerator.cpp_type_for_stack_in_parameter): Ditto.
(CppGenerator.cpp_type_for_stack_out_parameter): Ditto.

* inspector/scripts/codegen/cpp_generator_templates.py: Removed ASSERT_DISABLED
conditional around assertion code which will now compile to nothing if ASSERT is disabled.
Build strings more simply in a few cases.

* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator._generate_async_dispatcher_class_for_domain):
Use has_value instead of isAssigned and * operator instead of getValue() since std::optional
replace OptOutput here.
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command):
Pass by reference instead of pointer now.

* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
Removed ASSERT_DISABLED conditional around assertion code which will now compile to nothing
if ASSERT is disabled.

* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
(CppProtocolTypesImplementationGenerator._generate_assertion_for_object_declaration): Generate
the assertion function unconditionally, but leave out the assertions if ASSERT_DISABLED is true.
(CppProtocolTypesImplementationGenerator): Use auto instead of writing out JSON::Object::iterator.

* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py:
(ObjCBackendDispatcherImplementationGenerator._generate_conversions_for_command): Build strings
more simply.

* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
Rebaselined.

Source/WebCore:

* inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject): Take a const Vector& instead of a Vector*.
(WebCore::InspectorStyle::buildObjectForStyle const): Pass lineEndings() instead
of lineEndings().get().
(WebCore::InspectorStyle::styleWithProperties const): Ditto.
(WebCore::InspectorStyleSheet::buildObjectForSelectorList): Ditto.
(WebCore::InspectorStyleSheet::lineEndings const): Return a Vector instead of
a std::unique_ptr<Vector>.
(WebCore::InspectorStyleSheetForInlineStyle::lineEndings const): Ditto.
* inspector/InspectorStyleSheet.h: Updated for the above.

* inspector/agents/InspectorCSSAgent.h: Removed some bogus const.
* inspector/agents/InspectorCanvasAgent.cpp: Ditto.
* inspector/agents/InspectorCanvasAgent.h: Ditto.

* inspector/agents/InspectorDOMDebuggerAgent.cpp: Improved type of global strings
so we don't waste space with a pointer to the string.
(WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint): Removed
explicit creation of String, which was wasteful and unnecessary.
(WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint): Ditto.
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Removed bogus const.

* inspector/agents/InspectorDOMDebuggerAgent.h: Removed bogus const and use
final instead of override.
* inspector/agents/InspectorPageAgent.cpp: Ditto.
* inspector/agents/InspectorPageAgent.h: Ditto.

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

18 months agoFlaky Test: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl...
cdumez@apple.com [Fri, 16 Feb 2018 01:35:32 +0000 (01:35 +0000)]
Flaky Test: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl-worker.html
https://bugs.webkit.org/show_bug.cgi?id=182270
<rdar://problem/36904314>

Reviewed by Antti Koivisto.

No new tests, already covered by existing tests that crash flakily on the bots.

* loader/ThreadableLoaderClientWrapper.h:
(WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
isolate copy the initiator string as this object can be destroyed on a different thread. This was
causing the test to flakily crash as well when destroying ThreadLocalData.

* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(scheduledWithCustomRunLoopMode):
(-[WebCoreResourceHandleAsOperationQueueDelegate callFunctionOnMainThread:]):
Fix thread safety issue in callFunctionOnMainThread. This function is called from a background thread
to get to the main thread. However, it relied on m_handle which would get nullified on the main thread
by detachHandle when the ResourceHandle is destroyed. Fix the issue by not relying on m_handle anymore.

(-[WebCoreResourceHandleAsOperationQueueDelegate initWithHandle:messageQueue:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
- Go back to using autorelease() instead of get() for the returned objects to match the code pre-r224522.
- Dispatch the protectedSelf variables that were added in r227073 to the main thread to make sure we do
  not get destroyed on the background thread when protectedSelf is the last strong reference to self.
  Destroying the WebCoreResourceHandleAsOperationQueueDelegate on the background safe is unsafe due to
  its m_messageQueue data member which contains lambdas that may capture anything.
- Add a Lock to protect against detachHandle getting called on the main thread and nulling out
  m_handle / m_requestResult / m_cachedResponseResult while the background thread may be accessing
  them.

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

18 months agoMark imported/w3c/web-platform-tests/service-workers/service-worker/register-closed...
ryanhaddad@apple.com [Fri, 16 Feb 2018 01:19:57 +0000 (01:19 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/register-closed-window.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182853

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

18 months agoVersioning.
jmarcell@apple.com [Fri, 16 Feb 2018 00:45:12 +0000 (00:45 +0000)]
Versioning.

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

18 months ago[RenderTreeBuilder] Move RenderTableRow::addChild() to RenderTreeBuilder
zalan@apple.com [Fri, 16 Feb 2018 00:42:09 +0000 (00:42 +0000)]
[RenderTreeBuilder] Move RenderTableRow::addChild() to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182838
<rdar://problem/37580762>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::didInsertTableCell):
(WebCore::RenderTableRow::addChild): Deleted.
* rendering/RenderTableRow.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChild):
(WebCore::RenderTreeBuilder::insertChildToRenderTableRow): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::insertChild):

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

18 months agoMark imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress-crossorigin...
ryanhaddad@apple.com [Fri, 16 Feb 2018 00:38:43 +0000 (00:38 +0000)]
Mark imported/w3c/web-platform-tests/XMLHttpRequest/event-upload-progress-crossorigin.htm as flaky.
https://bugs.webkit.org/show_bug.cgi?id=182849

Unreviewed test gardening.

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

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

18 months agoSpeed up dSYM generation on build.webkit.org with -gline-tables-only
ap@apple.com [Fri, 16 Feb 2018 00:07:23 +0000 (00:07 +0000)]
Speed up dSYM generation on build.webkit.org with -gline-tables-only
https://bugs.webkit.org/show_bug.cgi?id=182841
rdar://problem/34579649

Reviewed by Aakash Jain.

Build speed and binary size improvements are so substantial that I'm willing to make
CI builds less suitable for debugging, which is not a common scenario anyway.
Crash logs will still have line numbers in them.

* BuildSlaveSupport/build.webkit.org-config/steps.py: (CompileWebKit.start):

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