WebKit-https.git
2 years ago[JSC] fix RETURN_IF_EXCEPTION() placement in ownPropertyKeys()
caitp@igalia.com [Wed, 26 Apr 2017 17:41:18 +0000 (17:41 +0000)]
[JSC] fix RETURN_IF_EXCEPTION() placement in ownPropertyKeys()
https://bugs.webkit.org/show_bug.cgi?id=171330

Reviewed by Mark Lam.

Ensure RETURN_IF_EXCEPTION() following invokation of the
filterPropertyIfNeeded() lambda.

* runtime/ObjectConstructor.cpp:
(JSC::ownPropertyKeys):

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

2 years ago[Color] Make gradients work with ExtendedColors
dino@apple.com [Wed, 26 Apr 2017 17:34:50 +0000 (17:34 +0000)]
[Color] Make gradients work with ExtendedColors
https://bugs.webkit.org/show_bug.cgi?id=171315
<rdar://problems/31830177>

Reviewed by Antoine Quint.

Source/WebCore:

Allow gradients to hold Color objects, and thus
handle ExtendedColor. Implement the backend for
CoreGraphics.

Test: css3/color/gradients.html

* platform/graphics/Gradient.cpp:
(WebCore::Gradient::addColorStop): Just copy the Color now.
(WebCore::compareStops): Handle rename of stop to offset.
(WebCore::Gradient::hasAlpha): Use Color's helper.
* platform/graphics/Gradient.h:
(WebCore::Gradient::ColorStop::ColorStop): Rename stop
to offset, and store a Color rather than four floating
point values.
* platform/graphics/cairo/GradientCairo.cpp:
(WebCore::Gradient::platformGradient):
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Use the CG method
that can handle CGColorRefs with ColorSpace values, and
pass the Extended sRGB space which should be no change for
all existing gradients but also handle ColorSpaces like
Display P3.
* platform/graphics/win/GradientDirect2D.cpp:
(WebCore::Gradient::generateGradient):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::buildStops):

LayoutTests:

Test for gradients using the color() syntax. Unfortunately,
due to rounding errors, we can't use a ref test for some
transparent colors, so comment them out for the moment.
These can be re-enabled when we can specify a tolerance
value for image comparison in the testing framework.

* css3/color/gradients-expected.html: Added.
* css3/color/gradients.html: Added.

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

2 years agoWebKit calls AppKit NSCell API from a background queue
timothy_horton@apple.com [Wed, 26 Apr 2017 17:22:47 +0000 (17:22 +0000)]
WebKit calls AppKit NSCell API from a background queue
https://bugs.webkit.org/show_bug.cgi?id=171318
<rdar://problem/31798317>

Reviewed by Anders Carlsson.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::refreshExistingServices):
Synchronously bounce to the main thread to do non-thread-safe NSCell related work.

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

2 years agoEncoded filename should be decoded for WKContentExtension.identifier
achristensen@apple.com [Wed, 26 Apr 2017 17:08:51 +0000 (17:08 +0000)]
Encoded filename should be decoded for WKContentExtension.identifier
https://bugs.webkit.org/show_bug.cgi?id=171316

Reviewed by Andy Estes.

Source/WebCore:

* platform/FileSystem.h:

Source/WebKit2:

* UIProcess/API/APIContentExtensionStore.cpp:
(API::createExtension):
(API::ContentExtensionStore::lookupContentExtension):
(API::ContentExtensionStore::getAvailableContentExtensionIdentifiers):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKContentExtensionStore.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm.
(TEST_F):
* TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm: Removed.

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

2 years agoFix typo in RenderFrameBase
commit-queue@webkit.org [Wed, 26 Apr 2017 16:54:18 +0000 (16:54 +0000)]
Fix typo in RenderFrameBase
https://bugs.webkit.org/show_bug.cgi?id=171324

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-26
Reviewed by Zalan Bujtas.

No new tests, behavior unchanged.

* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
(WebCore::RenderFrameBase::performLayoutWithFlattening):
(WebCore::RenderFrameBase::peformLayoutWithFlattening): Deleted.
* rendering/RenderFrameBase.h:

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

2 years agoForced page break on :after triggers infinite loop in column balancing
zalan@apple.com [Wed, 26 Apr 2017 16:34:32 +0000 (16:34 +0000)]
Forced page break on :after triggers infinite loop in column balancing
https://bugs.webkit.org/show_bug.cgi?id=171309
rdar://problem/26285884

Reviewed by David Hyatt.

Source/WebCore:

Stop trying to balance the columns when the forced page breaks >= the number of
columns even when this number is 1. Content will always overflow to the next page.
see https://chromium.googlesource.com/chromium/src/+/fbbebf38cefb2712c912581eccb046ef363ec84e%5E%21/#F2

Test: fast/multicol/infinite-loop-when-forced-break.html

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):

LayoutTests:

* fast/multicol/infinite-loop-when-forced-break-expected.txt: Added.
* fast/multicol/infinite-loop-when-forced-break.html: Added.

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

2 years agoAttempt to fix a PLT regression.
said@apple.com [Wed, 26 Apr 2017 16:24:34 +0000 (16:24 +0000)]
Attempt to fix a PLT regression.

Unreviewed.

Disable async decoding for large images till the flickering bug wk170640
is fixed.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::shouldUseAsyncDecodingForLargeImages):

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

2 years agoUnreviewed, rolling out r215767.
ryanhaddad@apple.com [Wed, 26 Apr 2017 16:13:02 +0000 (16:13 +0000)]
Unreviewed, rolling out r215767.

The LayoutTest for this change is a flaky failure.

Reverted changeset:

"Restrict WebKit image formats to a known whitelist"
https://bugs.webkit.org/show_bug.cgi?id=170700
http://trac.webkit.org/changeset/215767

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

2 years agoImprove wavy underline rendering
hyatt@apple.com [Wed, 26 Apr 2017 15:58:53 +0000 (15:58 +0000)]
Improve wavy underline rendering
https://bugs.webkit.org/show_bug.cgi?id=171281

Reviewed by Sam Weinig.

Change wavy underline rendering to use font size instead of stroke
thickness as a way to tune it. Cut the extra offset from 2 to 1.
Change the parameters to make the line flatter and to make the proportion
of the wave that renders underneath a glyph the same.

* rendering/TextDecorationPainter.cpp:
(WebCore::strokeWavyTextDecoration):
(WebCore::TextDecorationPainter::paintTextDecoration):
* style/InlineTextBoxStyle.cpp:
(WebCore::getWavyStrokeParameters):
(WebCore::visualOverflowForDecorations):
* style/InlineTextBoxStyle.h:
(WebCore::wavyOffsetFromDecoration):

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

2 years agoMove mediaCaptureEnabled from WKWebViewConfiguration to WKPreferences
commit-queue@webkit.org [Wed, 26 Apr 2017 15:55:34 +0000 (15:55 +0000)]
Move mediaCaptureEnabled from WKWebViewConfiguration to WKPreferences
https://bugs.webkit.org/show_bug.cgi?id=171294

Patch by Andrew Gold <agold@apple.com> on 2017-04-26
Reviewed by Eric Carlson.

Since we now want the ability to toggle this setting dynamically, I have
moved it from WKWebViewConfiguration to WKPreferences.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _mediaStreamEnabled]):
(-[WKPreferences _setMediaStreamEnabled:]):

* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): No longer set mediaStream enabled from
the configuration.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _mediaStreamEnabled]): Deleted.
(-[WKWebViewConfiguration _setMediaStreamEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

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

2 years ago[css-grid] Remove most of the usage of SizingOperation
svillar@igalia.com [Wed, 26 Apr 2017 15:34:40 +0000 (15:34 +0000)]
[css-grid] Remove most of the usage of SizingOperation
https://bugs.webkit.org/show_bug.cgi?id=171225

Reviewed by Darin Adler.

Source/WebCore:

SizingOperation was added as a way to modify the behaviour of the track sizing algorithm
with the specifics for intrinsic size computations. The problem is that although intrinsic
size computation does imply indefinite sizes, the opposite is not always true. For example,
a grid container with height:auto would compute the row sizes with an indefinite size but is
not part of the intrinsic size (preferred widths) computation.

That's why it was wrongly used in some parts of the current code, in most of the cases is
more than enough to check whether the available space is indefinite or not. In order to do
that we have to keep both available sizes (height & width) around all the time to properly
support orthogonal flows.

This change does not imply any change in behaviour.

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::setAvailableSpace):
(WebCore::GridTrackSizingAlgorithm::computeTrackBasedSize):
(WebCore::GridTrackSizingAlgorithm::initialBaseSize):
(WebCore::GridTrackSizingAlgorithm::initialGrowthLimit):
(WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::GridTrackSizingAlgorithm::assumedRowsSizeForOrthogonalChild):
(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild):
(WebCore::GridTrackSizingAlgorithm::gridTrackSize):
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction):
(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded):
(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
(WebCore::GridTrackSizingAlgorithm::setup):
(WebCore::GridTrackSizingAlgorithm::reset):
* rendering/GridTrackSizingAlgorithm.h:
(WebCore::GridTrackSizingAlgorithmStrategy::availableSpace):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::availableSpaceForGutters):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::gridGap):
(WebCore::RenderGrid::guttersSize):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize):
(WebCore::RenderGrid::computeAutoRepeatTracksCount):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::trackSizesForComputedStyle):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::populateGridPositionsForDirection):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::gridGapForDirection): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

Added a new test case which was working correctly but that was not properly tested before.

* fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows-expected.txt:
* fast/css-grid-layout/grid-track-sizing-with-percentages-and-orthogonal-flows.html:

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

2 years ago[JSC] Object.keys() must discard property names with no PropertyDescriptor
caitp@igalia.com [Wed, 26 Apr 2017 14:56:53 +0000 (14:56 +0000)]
[JSC] Object.keys() must discard property names with no PropertyDescriptor
https://bugs.webkit.org/show_bug.cgi?id=171291

Reviewed by Yusuke Suzuki.

JSTests:

* es6/Proxy_ownKeys_duplicates.js:
* stress/proxy-own-keys.js:
(let.handler.getOwnPropertyDescriptor):
(let.handler.ownKeys):

Source/JavaScriptCore:

Proxy objects can produce an arbitrary list of property names from the
"ownKeys" trap, however the Object.keys() algorithm is required to
discard names which do not have a PropertyDescriptor. This also
applies to other uses of the EnumerableOwnProperties() algorithm
(https://tc39.github.io/ecma262/#sec-enumerableownproperties)

Related to https://bugs.chromium.org/p/v8/issues/detail?id=6290

* runtime/ObjectConstructor.cpp:
(JSC::ownPropertyKeys):

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

2 years agosendMessageScoped's signal handler calls LocklessBag::consumeAll, which causes heap...
utatane.tea@gmail.com [Wed, 26 Apr 2017 13:34:18 +0000 (13:34 +0000)]
sendMessageScoped's signal handler calls LocklessBag::consumeAll, which causes heap deallocation in signal handler and leads deadlock
https://bugs.webkit.org/show_bug.cgi?id=171319

Reviewed by Keith Miller.

In sendMessageScoped, we call LocklessBag<SignalHandler>::consumeAll `thread->threadMessages().consumeAll()`.
In LocklessBag::consumeAll, we call `delete` on Nodes.
The problem is that this is called under the context of signal handler. Thus, when calling this, the original
thread may hold the lock in bmalloc. In that case, this `delete` call attempts to lock the heap lock recursively,
and causes deadlock.

Instead, this patch transfers the LocklessBag's Node to the sender thread. And the sender thread deletes it instead.

* wtf/LocklessBag.h:
(WTF::LocklessBag::consumeAllWithNode):
* wtf/ThreadMessage.cpp:
(WTF::ThreadMessageData::ThreadMessageData):
(WTF::sendMessageScoped):

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

2 years agoRemove Document::*FrameElementsShouldIgnoreScrolling
commit-queue@webkit.org [Wed, 26 Apr 2017 08:50:22 +0000 (08:50 +0000)]
Remove Document::*FrameElementsShouldIgnoreScrolling
https://bugs.webkit.org/show_bug.cgi?id=171271

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-26
Reviewed by Chris Dumez.

setFrameElementsShouldIgnoreScrolling and frameElementsShouldIgnoreScrolling were
introduced bug 23072 in order to work around a bug in the Dictionary application.
However, this was removed in bug 132095 and hence the functions are no longer necessary.

No new tests.

* dom/Document.h:
(WebCore::Document::setFrameElementsShouldIgnoreScrolling): Deleted.
(WebCore::Document::frameElementsShouldIgnoreScrolling): Deleted.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseAttribute):

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

2 years ago[GCrypt] CryptoKeyRSA: implement create(), keySizeInBits(), buildAlgorithm(), exportD...
zandobersek@gmail.com [Wed, 26 Apr 2017 07:40:28 +0000 (07:40 +0000)]
[GCrypt] CryptoKeyRSA: implement create(), keySizeInBits(), buildAlgorithm(), exportData()
https://bugs.webkit.org/show_bug.cgi?id=171213

Reviewed by Michael Catanzaro.

CryptoKeyRSA::create() validates the specified key type along with the
provided data. If everything is OK, it then proceeds to build the key
of the appropriate type through an s-expression that is constructed with
the necessary data. We don't currently support creating private keys
with any additional prime information (apart from p and q).

CryptoKeyRSA::keySizeInBits() calls the helper getRSAModulusLength()
function that find the modulus MPI in the key s-expression and returns
the modulus data length in bits.

CryptoKeyRSA::buildAlgorithm() returns KeyAlgorithm that's constructed
from the appropriate name, this key's modulus length, and this key's
public exponent data. It also specifies the hash if there is such a
restriction for this key.

CryptoKeyRSA::exportData() returns a properly-constructed
CryptoKeyDataRSAComponents object. The public modulus and exponent are
used in case the key is public. If the key is private, the secret
exponent and the p and q prime numbers are retrieved in MPI format.
They're then used to calculate the dp, dq and qi parameters that are
exported in the JWK format. Note that libgcrypt internally switches
the p and q prime numbers such that p < q, but the Web Crypto
specification and the dependant RFCs expect that q < p. We address
this by simply switching the roles of the two primes and follow the
usual q < p assumption when exporting the primes and computing the
dependant exponents and coefficients.

No new tests -- existing ones cover this but don't work yet due to missing
RSA-related CryptoAlgorithm implementations.

* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::getRSAModulusLength):
(WebCore::getParameterMPIData):
(WebCore::getRSAKeyParameter):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::keySizeInBits):
(WebCore::CryptoKeyRSA::buildAlgorithm):
(WebCore::CryptoKeyRSA::exportData):

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

2 years agoREGRESSION (r209882): Web Inspector: Command-G does not work in the console
nvasilyev@apple.com [Wed, 26 Apr 2017 06:39:00 +0000 (06:39 +0000)]
REGRESSION (r209882): Web Inspector: Command-G does not work in the console
https://bugs.webkit.org/show_bug.cgi?id=170555
<rdar://problem/31481247>

Reviewed by Brian Burg.

Command-G didn't work in the console when the console content view was in focus. It only
worked when the search input field was focused.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
(WebInspector.LogContentView.prototype.highlightPreviousSearchMatch): Added.
(WebInspector.LogContentView.prototype.findBannerRevealNextResult):
(WebInspector.LogContentView.prototype.highlightNextSearchMatch): Added.
Re-introduce highlightPreviousSearchMatch and highlightNextSearchMatch methods that were
removed in r209882.

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

2 years ago[mac-wk1 Debug] LayoutTest http/tests/inspector/network/resource-sizes-network.html...
commit-queue@webkit.org [Wed, 26 Apr 2017 06:38:37 +0000 (06:38 +0000)]
[mac-wk1 Debug] LayoutTest http/tests/inspector/network/resource-sizes-network.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170953

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

* http/tests/inspector/network/resource-sizes-disk-cache.html:
* http/tests/inspector/network/resource-sizes-network.html:
Read the entire data to ensure the load is complete before we notify the frontend.

* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
Unflake these tests, they should be more reliable now.

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

2 years agoWeb Inspector: Network Tab - Sorting by Priority Column hides all rows in the datagri...
commit-queue@webkit.org [Wed, 26 Apr 2017 06:35:04 +0000 (06:35 +0000)]
Web Inspector: Network Tab - Sorting by Priority Column hides all rows in the datagrid (uncaught exception)
https://bugs.webkit.org/show_bug.cgi?id=171312
<rdar://problem/31828554>

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

* UserInterface/Models/Resource.js:
(WebInspector.Resource.comparePriority):
Provide a helper for compariting NetworkPriority enum values.

* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.dataGridSortComparator):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
Custom sort handler for priority.

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

2 years agoUnhandled enumeration values in IntlDateTimeFormat.cpp
commit-queue@webkit.org [Wed, 26 Apr 2017 05:18:09 +0000 (05:18 +0000)]
Unhandled enumeration values in IntlDateTimeFormat.cpp
https://bugs.webkit.org/show_bug.cgi?id=171241

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-25
Reviewed by JF Bastien.

Added some missing cases of the UDateFormatField to partTypeString,
and made them conditional to the ICU version that added them.
This should remove the warnings that appear on platform builds using the
newer system ICU headers.

* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::partTypeString):

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

2 years ago[WebCrypto] Enhance ways to convert an ECDSA signature binary into DER format
jiewen_tan@apple.com [Wed, 26 Apr 2017 04:31:57 +0000 (04:31 +0000)]
[WebCrypto] Enhance ways to convert an ECDSA signature binary into DER format
https://bugs.webkit.org/show_bug.cgi?id=171287
<rdar://problem/31735332>

Reviewed by Brent Fulgham.

Covered by existing tests.

* crypto/mac/CryptoAlgorithmECDSAMac.cpp:
(WebCore::verifyECDSA):

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

2 years agoREGRESSION(206450): WebKit2PlatformMouseEvent m_modifierFlags not set
achristensen@apple.com [Wed, 26 Apr 2017 04:27:53 +0000 (04:27 +0000)]
REGRESSION(206450): WebKit2PlatformMouseEvent m_modifierFlags not set
https://bugs.webkit.org/show_bug.cgi?id=171297
<rdar://problem/31530719>

Reviewed by Geoffrey Garen.

Source/WebKit2:

* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):

Tools:

* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/EventModifiers.cpp: Added.
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::mouseDidMoveOverElement):
(TestWebKitAPI::setClients):
(TestWebKitAPI::TEST):
* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):

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

2 years agoREGRESSION (r214863): Web Inspector: Uncaught Exception when losing focus from a...
nvasilyev@apple.com [Wed, 26 Apr 2017 04:27:37 +0000 (04:27 +0000)]
REGRESSION (r214863): Web Inspector: Uncaught Exception when losing focus from a selector field
https://bugs.webkit.org/show_bug.cgi?id=171254
<rdar://problem/31813959>

Reviewed by Joseph Pecoraro.

The event.relatedTarget of a blur event contains the element where focus moved to.
In some cases this can be null, such as if the user leaves the application window.
For example Command+Tab to switch to another application.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):

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

2 years agofast/mediastream/RTCPeerConnection-icecandidate-event.html is flaky
commit-queue@webkit.org [Wed, 26 Apr 2017 04:24:21 +0000 (04:24 +0000)]
fast/mediastream/RTCPeerConnection-icecandidate-event.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=171242

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

* TestExpectations:
* fast/mediastream/RTCPeerConnection-icecandidate-event-expected.txt:
* fast/mediastream/RTCPeerConnection-icecandidate-event.html: Updating test to be more deterministic.

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

2 years agoRelax the event firing ASSERT for Attr changes
bfulgham@apple.com [Wed, 26 Apr 2017 02:26:05 +0000 (02:26 +0000)]
Relax the event firing ASSERT for Attr changes
https://bugs.webkit.org/show_bug.cgi?id=171236
<rdar://problem/30516349>

Reviewed by Dean Jackson.

Source/WebCore:

The assertions added in Bug 167318 were overly strict, and trigger for valid behavior.
Relax the assertion preventing event dispatch for the case of Attr elements at the
end of childrenChanged.

Test: fast/dom/HTMLLinkElement/event-while-removing-attribute.html

* dom/Attr.cpp:
(WebCore::Attr::childrenChanged):

LayoutTests:

* fast/dom/HTMLLinkElement/event-while-removing-attribute-expected.txt: Added.
* fast/dom/HTMLLinkElement/event-while-removing-attribute.html: Added.

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

2 years agoUnreviewed, speculative build fix
wenson_hsieh@apple.com [Wed, 26 Apr 2017 02:16:26 +0000 (02:16 +0000)]
Unreviewed, speculative build fix

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:

For the time being, remove all references to UIItemProviders from this private header.
This should be fixed to use unavailability macros in a followup. See <rdar://problem/31827095>.

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

2 years agoUnreviewed, temporarily disable the data interaction unit tests.
wenson_hsieh@apple.com [Wed, 26 Apr 2017 02:02:43 +0000 (02:02 +0000)]
Unreviewed, temporarily disable the data interaction unit tests.

The API around data interaction will change significantly in the near future, and
these tests will begin to fail. These will be reenabled once the bots are on an SDK
that supports the updated data interaction API.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:

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

2 years agoLimit allowed size of document.title to avoid locking WebKit clients
bfulgham@apple.com [Wed, 26 Apr 2017 01:53:06 +0000 (01:53 +0000)]
Limit allowed size of document.title to avoid locking WebKit clients
https://bugs.webkit.org/show_bug.cgi?id=165113
<rdar://problem/28324389>

Reviewed by Darin Adler.

Source/WebKit/mac:

When a web application attempts to set an extremely long title, truncate the
title to a more reasonable size.

We do this at at the presentation layer, rather than in the DOM, so that we do
not affect script function. Instead, we merely limit display to a level that is
reasonable for normal GUI widgets. Anything else needs to be truncated in the UI
layer, so it is a waste of effort to send across IPC.

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

Source/WebKit2:

When a web application attempts to set an extremely long title, truncate the
title to a more reasonable size.

We do this at at the presentation layer, rather than in the DOM, so that we do
not affect script function. Instead, we merely limit display to a level that is
reasonable for normal GUI widgets. Anything else needs to be truncated in the UI
layer, so it is a waste of effort to send across IPC.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files.
* TestWebKitAPI/Tests/WebKit2/LimitTitleSize.cpp: Added.
* TestWebKitAPI/Tests/WebKit2/set-long-title.html: Added.
* TestWebKitAPI/Tests/mac/LimitTitleSize.mm: Added.

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

2 years agoREGRESSION (r214129): fast/media/mq-prefers-reduced-motion.html fails
dino@apple.com [Wed, 26 Apr 2017 01:45:04 +0000 (01:45 +0000)]
REGRESSION (r214129): fast/media/mq-prefers-reduced-motion.html fails
https://bugs.webkit.org/show_bug.cgi?id=171303
<rdar://problem/31434879>

Reviewed by Brent Fulgham.

This particular test was calling notifyDone() from within
a callback triggered by the UIScriptController script, which
meant that by the time the controller tried to call its callback,
the test had finished.

* fast/media/mq-prefers-reduced-motion-matchMedia.html: Make sure
notifyDone is called after both the callback-like functions have
triggered.

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

2 years agoResource Load Statistics: Introduce shorter time-to-live for cookie partition whiteli...
wilander@apple.com [Wed, 26 Apr 2017 01:22:55 +0000 (01:22 +0000)]
Resource Load Statistics: Introduce shorter time-to-live for cookie partition whitelisting
https://bugs.webkit.org/show_bug.cgi?id=171295
<rdar://problem/31823818>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html

* loader/ResourceLoadObserver.cpp:
(WebCore::reduceTimeResolutionToOneDay): Deleted.
(WebCore::reduceTimeResolution):
    Changed name to no longer lock this to a specific resolution.
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
    Now calls WebCore::reduceTimeResolution().
(WebCore::ResourceLoadObserver::setTimeToLiveCookiePartitionFree):
    Added for testing purposes.
(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):
    Added for testing purposes.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatisticsStore.cpp:
(WebCore::shouldPartitionCookies):
    Static inline convenience function.
(WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
    Now decides whether a domain should get partitioned cookies
    based on timeToLiveCookiePartitionFree.
    Removed clearFirst parameter since it's not needed here
    and it introduced complexity in keeping the store and the
    network process cache in sync.
(WebCore::ResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
    Added for testing purposes.
* loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

* UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
(WKResourceLoadStatisticsManagerSetTimeToLiveCookiePartitionFree):
(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandler):
(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandlerForOneDomain):
    Changes and additions to test infrastructure.
* UIProcess/API/C/WKResourceLoadStatisticsManager.h:
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandlerForOneDomain):
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
    Changes and additions to test infrastructure.
* UIProcess/WebResourceLoadStatisticsManager.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
    No longer sends a boolean parameter to
    WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsTimeToLiveCookiePartitionFree):
(WTR::TestRunner::statisticsFireShouldPartitionCookiesHandler):
(WTR::TestRunner::statisticsFireShouldPartitionCookiesHandlerForOneDomain):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree):
(WTR::TestController::statisticsFireShouldPartitionCookiesHandler):
(WTR::TestController::statisticsFireShouldPartitionCookiesHandlerForOneDomain):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
    Changed a TestRunner function name to
    statisticsFireShouldPartitionCookiesHandlerForOneDomain().
* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html: Added.
* http/tests/loading/resourceLoadStatistics/partitioned-cookies-with-and-without-user-interaction.html:
    Changed a TestRunner function name to
    statisticsFireShouldPartitionCookiesHandlerForOneDomain().

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

2 years agoREGRESSION (r213719): WebGL content on cubeslam.com is 1/4 expected size
simon.fraser@apple.com [Wed, 26 Apr 2017 01:11:11 +0000 (01:11 +0000)]
REGRESSION (r213719): WebGL content on cubeslam.com is 1/4 expected size
https://bugs.webkit.org/show_bug.cgi?id=171300
rdar://problem/31051538

Reviewed by Dean Jackson.

Propagating the contentsScale to the UI process for canvas content layers causes
scaling issues, so don't do it for contents-provided layers.

No test because WebGL can't be tested in the iOS simulator.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):

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

2 years agoUnreviewed, rolling out r215476.
commit-queue@webkit.org [Wed, 26 Apr 2017 00:57:59 +0000 (00:57 +0000)]
Unreviewed, rolling out r215476.
https://bugs.webkit.org/show_bug.cgi?id=171304

"It broke JSBench" (Requested by saamyjoon on #webkit).

Reverted changeset:

"[ES6]. Implement Annex B.3.3 function hoisting rules for
eval"
https://bugs.webkit.org/show_bug.cgi?id=163208
http://trac.webkit.org/changeset/215476

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

2 years agoUpdate WebProcess(Pool) to assume there's always a WebsiteDataStore
beidson@apple.com [Wed, 26 Apr 2017 00:52:44 +0000 (00:52 +0000)]
Update WebProcess(Pool) to assume there's always a WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=171299

Reviewed by Alex Christensen.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::create):
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::m_userMediaCaptureManagerProxy):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::websiteDataStore):

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

2 years agoJSArray::isArrayPrototypeIteratorProtocolFastAndNonObservable is wrong because it...
sbarati@apple.com [Wed, 26 Apr 2017 00:52:35 +0000 (00:52 +0000)]
JSArray::isArrayPrototypeIteratorProtocolFastAndNonObservable is wrong because it does not do the necessary checks on the base object
https://bugs.webkit.org/show_bug.cgi?id=171150
<rdar://problem/31771880>

Reviewed by Sam Weinig.

JSTests:

* stress/spread-optimized-properly.js: Added.
(assert):
(test):
(shallowEq):
(makeArrayIterator):
(test.bar):
(test.callback):
(test.arr.__proto__.Symbol.iterator):
(test.arr.Symbol.iterator):
(test.get bar):
(test.hackedNext):
(test.test):
(test.):

Source/JavaScriptCore:

This patch fixes a huge oversight from the patch that introduced
op_spread/Spread. The original patch did not account for the
base object having Symbol.iterator or getters that could
change the iterator protocol. This patch fixes the oversight both
in the C code, as well as the DFG/FTL backends. We only perform
the memcpy version of spread if we've proven that it's guaranteed
to be side-effect free (no indexed getters), and if the iterator
protocol is guaranteed to be the original protocol. To do this, we
must prove that:
1. The protocol on Array.prototype hasn't changed (this is the same as the
introductory patch for op_spread).
2. The base object's __proto__ is Array.prototype
3. The base object does not have indexed getters
4. The base object does not have Symbol.iterator property.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::canDoFastSpread):
* dfg/DFGGraph.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileSpread):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
* runtime/JSArray.cpp:
(JSC::JSArray::isIteratorProtocolFastAndNonObservable):
* runtime/JSArray.h:
* runtime/JSArrayInlines.h:
(JSC::JSArray::isIteratorProtocolFastAndNonObservable): Deleted.
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObjectInlines.h:
(JSC::JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable):
(JSC::JSGlobalObject::isArrayIteratorProtocolFastAndNonObservable): Deleted.

Source/WebCore:

This patch moves the sequence converters to use the now fixed
JSArray::isArrayPrototypeIteratorProtocolFastAndNonObservable test
inside JSC.

This patch also fixes a few bugs:
1. Converting to a sequence of numbers must prove that the JSArray
is filled only with Int32/Double. If there is a chance the array
contains objects, the conversion to a numeric IDLType can be observable
(via valueOf()), and can change the iterator protocol.
2. There are other conversions that can have side effects a-la valueOf().
This patch introduces a new static constant in the various Converter
classes that tell the sequence converter if the conversion operation
can have JS side effects. If it does have side effects, we fall back to
the generic conversion that uses the iterator protocol. If not, we can
do a faster version that iterates over each element of the array,
reading it directly, and converting it.

Tests: js/sequence-iterator-protocol-2.html
       js/sequence-iterator-protocol.html

* bindings/js/JSDOMConvertAny.h: Does not have side effects.
* bindings/js/JSDOMConvertBase.h: We pessimistically assume inside DefaultConverter that converions have side effects.
* bindings/js/JSDOMConvertBoolean.h: Does not have side effects.
* bindings/js/JSDOMConvertCallbacks.h: Does not have side effects.
* bindings/js/JSDOMConvertObject.h: Does not have side effects.
* bindings/js/JSDOMConvertSequences.h:
(WebCore::Detail::NumericSequenceConverter::convert):
(WebCore::Detail::SequenceConverter::convert):

LayoutTests:

* js/sequence-iterator-protocol-2-expected.txt: Added.
* js/sequence-iterator-protocol-2.html: Added.
* js/sequence-iterator-protocol-expected.txt: Added.
* js/sequence-iterator-protocol.html: Added.

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

2 years agoMark media/modern-media-controls/pip-support/pip-support-click.html as flaky.
ryanhaddad@apple.com [Wed, 26 Apr 2017 00:42:32 +0000 (00:42 +0000)]
Mark media/modern-media-controls/pip-support/pip-support-click.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=165311

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoCall bmalloc scavenger first when handling a memory pressure event
msaboff@apple.com [Wed, 26 Apr 2017 00:39:22 +0000 (00:39 +0000)]
Call bmalloc scavenger first when handling a memory pressure event
https://bugs.webkit.org/show_bug.cgi?id=171289

Reviewed by Geoffrey Garen.

Source/bmalloc:

Registered a critical memory pressure handler.  We add this handler in addition to the
call to release bmalloc memory in the WebCore releaseMemory handler for the case of
JSC API users that don't use WebCore.  When both handlers are in the process, it is
basically a race.  One will win, but the loser won't do any more work, so it is harmless.

* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap):

Source/WebCore:

Let bmalloc free any pages to the OS that it can before doing anything else.

* page/MemoryRelease.cpp:
(WebCore::releaseMemory):

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

2 years agoSkip WebKitAdditions for Safari Technology Preview media controls
dino@apple.com [Wed, 26 Apr 2017 00:38:11 +0000 (00:38 +0000)]
Skip WebKitAdditions for Safari Technology Preview media controls
https://bugs.webkit.org/show_bug.cgi?id=171302
<rdar://problem/31823256>

Reviewed by Simon Fraser.

Safari Technology Preview should use the same controls
as OpenSource.

* WebCore.xcodeproj/project.pbxproj:

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

2 years agoMark http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce...
ryanhaddad@apple.com [Wed, 26 Apr 2017 00:16:21 +0000 (00:16 +0000)]
Mark http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=171301

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 years agoUnreviewed, rolling out r215730.
ryanhaddad@apple.com [Wed, 26 Apr 2017 00:07:13 +0000 (00:07 +0000)]
Unreviewed, rolling out r215730.

The LayoutTest for this change is a flaky timeout on mac-wk1
debug.

Reverted changeset:

"Enable expired-only reload policy on Mac and iOS"
https://bugs.webkit.org/show_bug.cgi?id=171264
http://trac.webkit.org/changeset/215730

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

2 years agoIndicate presence of audio when handling autoplay events.
mrajca@apple.com [Wed, 26 Apr 2017 00:02:59 +0000 (00:02 +0000)]
Indicate presence of audio when handling autoplay events.
https://bugs.webkit.org/show_bug.cgi?id=171227

Reviewed by Alex Christensen.

Source/WebCore:

Added API tests.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::handleAutoplayEvent):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::userDidInterfereWithAutoplay):
(WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture):
* html/HTMLMediaElement.h:
* page/AutoplayEvent.h:
* page/ChromeClient.h:

Source/WebKit2:

* UIProcess/API/APIUIClient.h:
(API::UIClient::handleAutoplayEvent):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleAutoplayEvent):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::handleAutoplayEvent):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

2 years ago[Follow up] Array.prototype.slice() should ensure that end >= begin.
mark.lam@apple.com [Tue, 25 Apr 2017 23:50:59 +0000 (23:50 +0000)]
[Follow up] Array.prototype.slice() should ensure that end >= begin.
https://bugs.webkit.org/show_bug.cgi?id=170989
<rdar://problem/31705652>

Not reviewed.

Follow up to rename a test file that was accidentally named wrongly.

* stress/regress-170989.js: Copied from JSTests/stress/regress-170989.patch.
* stress/regress-170989.patch: Removed.

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

2 years agoWebCore.framework should restrict allowable_clients
aakash_jain@apple.com [Tue, 25 Apr 2017 23:49:14 +0000 (23:49 +0000)]
WebCore.framework should restrict allowable_clients
https://bugs.webkit.org/show_bug.cgi?id=171260

Reviewed by Alexey Proskuryakov.

* Configurations/WebCore.xcconfig: Adding allowable_client to all platform, in order to restrict WebCore
from being directly linked on any platform.
Moved WebKitLegacy and WebCoreTestSupport to OTHER_LDFLAGS_BASE.
Removed WebKit2 as allowable_client from mac.
Added iTunesU, Casablanca and Remote to OTHER_LDFLAGS_BASE_ios for iTunes related projects.
Added WebKit, TVBooks, DumpRenderTree, WebKitTestRunner and TestWebKitAPI to OTHER_LDFLAGS_BASE_ios.

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

2 years agoArray.prototype.slice() should ensure that end >= begin.
mark.lam@apple.com [Tue, 25 Apr 2017 23:45:45 +0000 (23:45 +0000)]
Array.prototype.slice() should ensure that end >= begin.
https://bugs.webkit.org/show_bug.cgi?id=170989
<rdar://problem/31705652>

Reviewed by Saam Barati.

JSTests:

* stress/regress-170989.patch: Added.

Source/JavaScriptCore:

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSlice):

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

2 years agoRestrict WebKit image formats to a known whitelist
commit-queue@webkit.org [Tue, 25 Apr 2017 22:23:56 +0000 (22:23 +0000)]
Restrict WebKit image formats to a known whitelist
https://bugs.webkit.org/show_bug.cgi?id=170700

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-25
Reviewed by Tim Horton.

Source/WebCore:

If the image format is not supported, the load should be canceled and the
image is marked a broken image.

Test: fast/images/image-formats-support.html

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::setImageDataBuffer):
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedImage.h:

LayoutTests:

* fast/images/image-formats-support-expected.txt: Added.
* fast/images/image-formats-support.html: Added.
* fast/images/resources/100x100-red-psd-renamed.png: Added.
* fast/images/resources/100x100-red-tga-renamed.png: Added.
* fast/images/resources/100x100-red.psd: Added.
* fast/images/resources/100x100-red.tga: Added.

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

2 years ago[Win] Use Clang's __has_declspec_attribute for export macros
commit-queue@webkit.org [Tue, 25 Apr 2017 21:46:54 +0000 (21:46 +0000)]
[Win] Use Clang's __has_declspec_attribute for export macros
https://bugs.webkit.org/show_bug.cgi?id=171240

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-04-25
Reviewed by Alex Christensen.

Source/JavaScriptCore:

* runtime/JSExportMacros.h:

Source/WTF:

* wtf/Compiler.h:
* wtf/ExportMacros.h:
* wtf/Platform.h:

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

2 years agoDeduplicate some lines in the toplevel TestExpectations
timothy_horton@apple.com [Tue, 25 Apr 2017 21:45:24 +0000 (21:45 +0000)]
Deduplicate some lines in the toplevel TestExpectations

* TestExpectations:
Remove a duplicate line and consolidate another.

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

2 years agoElement.dataset.name incorrectly returns undefined
cdumez@apple.com [Tue, 25 Apr 2017 21:41:31 +0000 (21:41 +0000)]
Element.dataset.name incorrectly returns undefined
https://bugs.webkit.org/show_bug.cgi?id=161454
<rdar://problem/31818563>

Reviewed by Mark Lam.

Add layout test for JS caching bug on DOMStringMap that was fixed as part
of a large named property getter refactoring in r210667.

* fast/dom/dataset-caching-bug-expected.txt: Added.
* fast/dom/dataset-caching-bug.html: Added.

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

2 years agoTry to fix the WKTR build after r215758
timothy_horton@apple.com [Tue, 25 Apr 2017 21:36:21 +0000 (21:36 +0000)]
Try to fix the WKTR build after r215758

* Scripts/build-webkittestrunner:

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

2 years agoOur signal handler shouldn't print when sigaction succeeds
keith_miller@apple.com [Tue, 25 Apr 2017 21:23:15 +0000 (21:23 +0000)]
Our signal handler shouldn't print when sigaction succeeds
https://bugs.webkit.org/show_bug.cgi?id=171286

Reviewed by Michael Saboff.

It turns out !result is not the same as !!result.

* wtf/threads/Signals.cpp:
(WTF::jscSignalHandler):

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

2 years agoUnreviewed. Attempt armv7k build fix after r215720
sbarati@apple.com [Tue, 25 Apr 2017 21:21:41 +0000 (21:21 +0000)]
Unreviewed. Attempt armv7k build fix after r215720

I think we're just missing an include for the definition of ExecState::r().

* runtime/JSFixedArray.cpp:

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

2 years agoCoreAudioCaptureSource::suspend is asserting too often
commit-queue@webkit.org [Tue, 25 Apr 2017 21:21:05 +0000 (21:21 +0000)]
CoreAudioCaptureSource::suspend is asserting too often
https://bugs.webkit.org/show_bug.cgi?id=171285

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

No change of behavior.

* platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSource::suspend): Moving the assertion to where it might be useful.

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

2 years agoUse an OptionSet for compositing reasons bitmask
dbates@webkit.org [Tue, 25 Apr 2017 21:15:16 +0000 (21:15 +0000)]
Use an OptionSet for compositing reasons bitmask
https://bugs.webkit.org/show_bug.cgi?id=171153

Reviewed by Simon Fraser.

We should make use of OptionSet to represent the bitmask of the reasons a layer
was composited instead of using an integer and bitwise operations.

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::logReasonsForCompositing): Also fix code style issues;
an else-if statement should be written as an if-statement when the prior if-statement
concludes with a return statement.
* rendering/RenderLayerCompositor.h:

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

2 years agoRemove more EFL code
dbates@webkit.org [Tue, 25 Apr 2017 21:14:06 +0000 (21:14 +0000)]
Remove more EFL code
https://bugs.webkit.org/show_bug.cgi?id=171288

Rubber-stamped by Simon Fraser.

The EFL port is no longer in the WebKit OpenSource Project repository. Remove more code
that was part of the EFL port.

* CMakeLists.txt:
* DumpRenderTree/AccessibilityController.h:
* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/cairo/PixelDumpSupportCairo.h:
* ImageDiff/efl/ImageDiff.cpp: Removed.
* MiniBrowser/efl/CMakeLists.txt: Removed.
* MiniBrowser/efl/main.c: Removed.
* Scripts/build-dumprendertree:
* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/build-webkittestrunner:
* Scripts/run-minibrowser:
* Scripts/update-webkit-libs-jhbuild:
* Scripts/update-webkitefl-libs: Removed.
* Scripts/webkitdirs.pm:
(argumentsForConfiguration):
(extractNonMacOSHostConfiguration):
(executableProductDir):
(builtDylibPathForName):
(determinePortName):
(launcherPath):
(launcherName):
(getJhbuildPath):
(wrapperPrefixIfNeeded):
(generateBuildSystemFromCMakeProject):
(buildCMakeProjectOrExit):
(isEfl): Deleted.
* Scripts/webkitperl/FeatureList.pm:
* Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl:
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(GtkWK2Port.run_webkit_tests_command):
(EflWK2Port): Deleted.
(EflWK2Port.build_webkit_command): Deleted.
* Scripts/webkitpy/port/builders.py:
* Scripts/webkitpy/port/efl.py: Removed.
* Scripts/webkitpy/port/efl_unittest.py: Removed.
* Scripts/webkitpy/port/factory.py:
(platform_options):
(PortFactory):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_determine_port_from_expectations_path):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaselineTest.test_baseline_directory):
(TestRebaselineExpectations.test_rebaseline_expectations):
* TestWebKitAPI/PlatformEfl.cmake: Removed.
* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/scrollTo.html: Removed.
* TestWebKitAPI/efl/InjectedBundleController.cpp: Removed.
* TestWebKitAPI/efl/PlatformUtilities.cpp: Removed.
* TestWebKitAPI/efl/PlatformWebView.cpp: Removed.
* TestWebKitAPI/efl/main.cpp: Removed.
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityController.h:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
(WTR::EventSendingController::contextClick):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback):
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler):
* WebKitTestRunner/InjectedBundle/efl/ActivateFontsEfl.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl/FontManagement.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl/FontManagement.h: Removed.
* WebKitTestRunner/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp: Removed.
* WebKitTestRunner/PlatformEfl.cmake: Removed.
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
* WebKitTestRunner/efl/EventSenderProxyEfl.cpp: Removed.
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp: Removed.
* WebKitTestRunner/efl/TestControllerEfl.cpp: Removed.
* WebKitTestRunner/efl/main.cpp: Removed.
* efl/install-dependencies: Removed.
* efl/jhbuild-optional.modules: Removed.
* efl/jhbuild.modules: Removed.
* efl/jhbuildrc: Removed.
* efl/patches/evas-fix-build-with-giflib5.patch: Removed.
* efl/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Removed.
* efl/patches/gst-libav.patch: Removed.
* efl/patches/gst-plugins-base-rtp-rtcpbuffer-fix-typo-in-enum.patch: Removed.
* efl/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
* efl/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
* efl/patches/openwebrtc-gst-plugins-clang-warning-fix.patch: Removed.
* gtk/manifest.txt.in:

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

2 years agoWeb Inspector: Open the new bug page in the new tab
nvasilyev@apple.com [Tue, 25 Apr 2017 21:12:57 +0000 (21:12 +0000)]
Web Inspector: Open the new bug page in the new tab
https://bugs.webkit.org/show_bug.cgi?id=171253

Reviewed by Joseph Pecoraro.

* UserInterface/Debug/UncaughtExceptionReporter.js:
(createErrorSheet):

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

2 years agoSupplementary Multilingual Plane Complex Scripts Rendered Incorrectly
mmaxfield@apple.com [Tue, 25 Apr 2017 20:58:38 +0000 (20:58 +0000)]
Supplementary Multilingual Plane Complex Scripts Rendered Incorrectly
https://bugs.webkit.org/show_bug.cgi?id=171272
<rdar://problem/30966764>

Reviewed by Zalan Bujtas.

Source/WebCore:

These scripts need to take the complex text codepath.

Test: fast/text/kaithi.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

* fast/text/kaithi-expected.html: Added.
* fast/text/kaithi.html: Added.
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

2 years agoWeb Inspector: "Space" localized string is not loaded in combined and minified builds
commit-queue@webkit.org [Tue, 25 Apr 2017 20:38:00 +0000 (20:38 +0000)]
Web Inspector: "Space" localized string is not loaded in combined and minified builds
https://bugs.webkit.org/show_bug.cgi?id=171283
<rdar://problem/30871371>

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

In combined and minified builds, the document.write() to load the
localized strings script doesn't happen before the KeyboardShortcut
global code in Main.js evaluates, so there is no UIString because
window.localizedStrings hasn't populated yet. Since this is the only
instance, populate the display UIString lazily and provide warnings
in minified builds if this happens.

* UserInterface/Base/LoadLocalizedStrings.js:
(WebInspector.UIString):
Provide a warning if a UIString was attempted before the strings have loaded.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
For this rare instance, populate the display name of the string when we are
sure strings have loaded.

* UserInterface/Models/KeyboardShortcut.js:
Revert the UIString here, but note that it will be populated later.

* UserInterface/Models/Resource.js:
(WebInspector.Resource.prototype.setCachedResponseBodySize):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._statusImageContextmenu):
Address console.asserts not ending in semicolon warnings produced during
optimized builds. Without semicolons they are not stripped.

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

2 years ago[GTK] Revert r215745 (especulative build fix) after r215752.
clopez@igalia.com [Tue, 25 Apr 2017 20:33:39 +0000 (20:33 +0000)]
[GTK] Revert r215745 (especulative build fix) after r215752.
https://bugs.webkit.org/show_bug.cgi?id=170842

Unreviewed.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::normalizeCharacters):

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

2 years ago[Cocoa][Win] Enable of X-Content-Type-Options: nosniff header
dbates@webkit.org [Tue, 25 Apr 2017 20:26:13 +0000 (20:26 +0000)]
[Cocoa][Win] Enable of X-Content-Type-Options: nosniff header
https://bugs.webkit.org/show_bug.cgi?id=136452
<rdar://problem/23412620>

Reviewed by Brent Fulgham.

.:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:

LayoutTests/imported/w3c:

Update expected results now we support X-Content-Type-Options: nosniff.

* web-platform-tests/fetch/nosniff/parsing-nosniff-expected.txt:
* web-platform-tests/fetch/nosniff/script-expected.txt:
* web-platform-tests/fetch/nosniff/stylesheet-expected.txt:

Source/JavaScriptCore:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Enable support for X-Content-Type-Options: nosniff on Mac, iOS and Windows.

Additionally, honor X-Content-Type-Options: nosniff header for stylesheets as per
<https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-nosniff%3F> (30 March 2017).

Test: http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked.html

* Configurations/FeatureDefines.xcconfig:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet): Log an error if the stylesheet
has the nosniff header and does not have a valid MIME type. Also update code for
renaming of MIMETypeCheck to MIMETypeCheckHint.
(WebCore::StyleSheetContents::notifyLoadedSheet): If the stylesheet is blocked by
nosniff then consider it analogous to a load error so that we dispatch a DOM error
event at the <style>/<link> element.
* dom/LoadableClassicScript.cpp:
(WebCore::LoadableClassicScript::notifyFinished): Modified the wording of the error
message when a script is disallowed by nosniff so as to more closely match the
wording used when a stylesheet is disallowed by nonsniff.
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::sheetText): Update for renaming of MIMETypeCheck
to MIMETypeCheckHint.
(WebCore::CachedCSSStyleSheet::responseMIMEType): Added.
(WebCore::CachedCSSStyleSheet::mimeTypeAllowedByNosniff): Added.
(WebCore::CachedCSSStyleSheet::canUseSheet): Modified to check if the X-Content-Type-Options: nosniff
header is in the HTTP response for the stylesheet. If it is then we can only use the stylesheet
if its content-type is "text/css". Otherwise, apply the existing criterion for determining whether
to to use the stylesheet.
* loader/cache/CachedCSSStyleSheet.h: Rename MIMETypeCheck to MIMETypeCheckHint to better
describe its purpose as a hint as to whether to enforce MIME type checking for the stylesheet.
Processing of the HTTP header X-Content-Type-Options takes precedence over this hint.
* loader/cache/CachedScript.h: Make mimeType() private.

Source/WebCore/PAL:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

* Configurations/FeatureDefines.xcconfig:

Tools:

Enable X-Content-Type-Options: nosniff on Mac, iOS and Windows platforms.

* Scripts/webkitperl/FeatureList.pm: Also do not enable nosniff on EFL
as the EFL port is no longer in the WebKit OpenSource repository.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Unskip nosniff tests on Mac, iOS and Windows and update expected results now that
we support X-Content-Type-Options: nosniff.

Merge Blink test from <https://src.chromium.org/viewvc/blink?revision=168570&view=revision>.

* TestExpectations: Unskip all nosniff tests except imported/w3c/web-platform-tests/fetch/nosniff/importscripts.html.
We need to fix <https://bugs.webkit.org/show_bug.cgi?id=171248> before we can unskip it.
When running the nosniff Web Platform Tests (WPT) dump console messages to standard error
to avoid a difference of console message ordering due to the non-determinism of the WPT
tests from affecting the matching of the expected result.
* http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked-expected.txt: Added.
* http/tests/security/contentTypeOptions/nosniff-dynamic-script-blocked.html: Copied from LayoutTests/http/tests/security/contentTypeOptions/nosniff-script-blocked.html.
* http/tests/security/contentTypeOptions/nosniff-script-blocked-expected.txt: Update expected result.
* http/tests/security/contentTypeOptions/nosniff-script-blocked.html: Substitute the not executable
MIME type "text/xx-javascript" for "text/x-javascript" as the latter is an acceptable MIME type for
JavaScript scripts as per the Fetch standard, <https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type> (30 March 2017).
* http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked-expected.txt: Update
expected result.
* platform/gtk/TestExpectations: Skip the nosniff tests as GTK does not enable ENABLE(NOSNIFF).
* platform/ios/TestExpectations: Unskip nosniff tests.
* platform/mac/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.
* platform/wk2/TestExpectations: Ditto.

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

2 years ago[GTK] Build fix after r215737
mmaxfield@apple.com [Tue, 25 Apr 2017 20:22:42 +0000 (20:22 +0000)]
[GTK] Build fix after r215737
https://bugs.webkit.org/show_bug.cgi?id=170842

Unreviewed.

No new tests because there is no behavior change.

* platform/graphics/FontCascade.h:
(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript):

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

2 years agoRemove an unnecessary -respondsToSelector: check after r215724
wenson_hsieh@apple.com [Tue, 25 Apr 2017 19:37:16 +0000 (19:37 +0000)]
Remove an unnecessary -respondsToSelector: check after r215724

Rubber-stamped by Tim Horton.

Addresses review feedback from <https://bugs.webkit.org/show_bug.cgi?id=171156>. -[NSURL _title]
will always for builds that need to access it.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::readURL):

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

2 years agoREGRESSION (r215469): [ios-simulator-wk2] LayoutTest compositing/animation/animation...
antti@apple.com [Tue, 25 Apr 2017 19:20:17 +0000 (19:20 +0000)]
REGRESSION (r215469): [ios-simulator-wk2] LayoutTest compositing/animation/animation-backing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=171060
<rdar://problem/31771174>

Reviewed by Simon Fraser.

Accelerated transform animations move underlying layers without invalidating GraphicsLayers.
To update tile coverage we need to commit such subtrees even if there are not other changes.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::needsCommit):

    Commit subtrees with accelerated transform animations.
    Factor into a function.

(WebCore::GraphicsLayerCA::recursiveCommitChanges):

    Track if descendants had any accelerated transform animations after commit.

* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::hasDescendantsWithRunningTransformAnimations):
(WebCore::GraphicsLayerCA::setHasDescendantsWithRunningTransformAnimations):

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

2 years agoWeb Inspector: TypeError:​ sourceCodeLocation.populateLiveDisplayLocationTooltip...
commit-queue@webkit.org [Tue, 25 Apr 2017 19:15:00 +0000 (19:15 +0000)]
Web Inspector: TypeError:​ sourceCodeLocation.populateLiveDisplayLocationTooltip is not a function
https://bugs.webkit.org/show_bug.cgi?id=171259

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-04-25
Reviewed by Joseph Pecoraro.

The first argument of WebInspector.createSourceCodeLocationLink
should be SourceCodeLocation type.

* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.createCellContent):
Pass 'callFrame.sourceCodeLocation' instead of 'value' to the
first argument.

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

2 years agoLocal CSE wrongly CSEs array accesses with different result types.
mark.lam@apple.com [Tue, 25 Apr 2017 19:04:47 +0000 (19:04 +0000)]
Local CSE wrongly CSEs array accesses with different result types.
https://bugs.webkit.org/show_bug.cgi?id=170990
<rdar://problem/31705945>

Reviewed by Saam Barati.

JSTests:

* stress/regress-170990.js: Added.

Source/JavaScriptCore:

The fix is to use different LocationKind enums for the different type of array
result types.  This makes the HeapLocation values different based on the result
types, and allows CSE to discern between them.

* dfg/DFGCSEPhase.cpp:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
(JSC::DFG::indexedPropertyLocForResultType):

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

2 years agoMake DFG SpeculatedType dumps easier to read.
mark.lam@apple.com [Tue, 25 Apr 2017 18:42:33 +0000 (18:42 +0000)]
Make DFG SpeculatedType dumps easier to read.
https://bugs.webkit.org/show_bug.cgi?id=171280

Reviewed by Saam Barati.

Adding a pretty printer to insert |s between each type string and changing the
dumped strings to match the SpeculatedType names case-wise.

* bytecode/SpeculatedType.cpp:
(JSC::PrettyPrinter::PrettyPrinter):
(JSC::PrettyPrinter::print):
(JSC::dumpSpeculation):
* bytecode/SpeculatedType.h:

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

2 years ago[MediaStream macOS] Unable to apply frameRate constraint
eric.carlson@apple.com [Tue, 25 Apr 2017 18:22:09 +0000 (18:22 +0000)]
[MediaStream macOS] Unable to apply frameRate constraint
https://bugs.webkit.org/show_bug.cgi?id=171279

Reviewed by Youenn Fablet.

No new tests, this doesn't affect the mock capture devices.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate): Cast frame rate
ranges to int before comparing.

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

2 years ago[GTK] Build fix after r215737
clopez@igalia.com [Tue, 25 Apr 2017 18:21:09 +0000 (18:21 +0000)]
[GTK] Build fix after r215737
https://bugs.webkit.org/show_bug.cgi?id=170842

Unreviewed.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::normalizeCharacters):

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

2 years agoUnreviewed follow-up to r215739 and r215740.
zandobersek@gmail.com [Tue, 25 Apr 2017 17:44:15 +0000 (17:44 +0000)]
Unreviewed follow-up to r215739 and r215740.

* gtk/jhbuild.modules: List the libgcrypt patch that has to be applied.
This (and r215740) was supposed to land in r215739, but I managed to
specify the previous version of the patch.

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

2 years agolowerStackArgs: check Arg::addr.isValidForm when falling back to SP offsets
jfbastien@apple.com [Tue, 25 Apr 2017 17:36:01 +0000 (17:36 +0000)]
lowerStackArgs: check Arg::addr.isValidForm when falling back to SP offsets
https://bugs.webkit.org/show_bug.cgi?id=171278

Reviewed by Filip Pizlo.

lowerStackArgs checked that the FP offsets it tries to generate
are valid form, but didn't check that the fallback was valid
form. This lead to stackAddr's assertion being dead, and the
MaroAssembler asserting way later on move / add when handed a huge
immediate.

* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::stackAddrImpl):

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

2 years agoResource Load Statistics: Clear network process cache when clearing store
wilander@apple.com [Tue, 25 Apr 2017 17:05:04 +0000 (17:05 +0000)]
Resource Load Statistics: Clear network process cache when clearing store
https://bugs.webkit.org/show_bug.cgi?id=171256
<rdar://problem/31802347>

Reviewed by Brent Fulgham.

Source/WebCore:

Test that covers this code:
http/tests/loading/resourceLoadStatistics/clear-in-memory-and-persistent-store.html

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::clearInMemoryStore):
    Better name.
(WebCore::ResourceLoadObserver::logUserInteraction):
    Now passes on the boolean parameter clearFirst to
    ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):
    Now takes and passes on the boolean parameter clearFirst to
    ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebCore::ResourceLoadObserver::statisticsStore): Deleted.
    This getter violated abstraction. The way it was used
    is now solved through dedicated functions.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatisticsStore.cpp:
(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
    Now passes on the boolean parameter clearFirst to
    ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebCore::ResourceLoadStatisticsStore::clearInMemory):
    Better name.
    Now triggers clearing of the associated network process cache.
(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
    Now calls clearInMemory().
(WebCore::ResourceLoadStatisticsStore::setShouldPartitionCookiesCallback):
    Now expects a handler with the boolean parameter clearFirst.
(WebCore::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
    Now takes and passes on the boolean parameter clearFirst to
    m_shouldPartitionCookiesForDomainsHandler().
* loader/ResourceLoadStatisticsStore.h:
(WebCore::ResourceLoadStatisticsStore::clear): Deleted.
* platform/network/NetworkStorageSession.h:
    NetworkStorageSession::setShouldPartitionCookiesForHosts() now
    takes the boolean parameter clearFirst.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts):
    Now clears m_topPrivatelyControlledDomainsForCookiePartitioning
    if the boolean parameter clearFirst is true.

Source/WebKit2:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
    Now takes and passes on the boolean parameter clearFirst to
    WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts().
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
    The message ShouldPartitionCookiesForTopPrivatelyOwnedDomains now
    takes the boolean parameter clearFirst.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
    Now takes and passes on the boolean parameter clearFirst to
    Messages::NetworkProcess::ShouldPartitionCookiesForTopPrivatelyOwnedDomains.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
    The message ShouldPartitionCookiesForTopPrivatelyOwnedDomains now
    takes the boolean parameter clearFirst.
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
    Now uses the boolean parameter clearFirst when calling
    WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler().
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
    No longer uses the deleted store getter.
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
    No longer uses the deleted store getter.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
    No sends the boolean parameter clearFirst to
    ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler().
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
    Now expects a handler with the boolean parameter clearFirst.
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
* UIProcess/WebResourceLoadStatisticsStore.h:
    Now uses the new WebCore::ResourceLoadObserver::clearInMemoryStore().
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::shouldPartitionCookiesForTopPrivatelyOwnedDomains):
    Now takes and passes on the boolean parameter clearFirst in its
    message to the network process.
(WebKit::WebsiteDataStore::registerSharedResourceLoadObserver):
    Now expects a handler with the boolean parameter clearFirst.
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

2 years agoUnreviewed follow-up to r215739.
zandobersek@gmail.com [Tue, 25 Apr 2017 17:01:42 +0000 (17:01 +0000)]
Unreviewed follow-up to r215739.

* gtk/patches/libgcrypt-use-only-dev-urandom-for-testing.patch: Add the missing
libgcrypt patch that enforces the use of /dev/urandom.

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

2 years ago[GTK] Add libgpg-error, libgcrypt libraries to JHBuild
zandobersek@gmail.com [Tue, 25 Apr 2017 16:45:59 +0000 (16:45 +0000)]
[GTK] Add libgpg-error, libgcrypt libraries to JHBuild
https://bugs.webkit.org/show_bug.cgi?id=171270

Reviewed by Michael Catanzaro.

* gtk/jhbuild.modules: Add the latest stable versions of libgpg-error and libgcrypt
libraries to the webkitgtk-testing-dependencies metamodule. This will help people
that use systems that don't yet provide libgcrypt >= 1.7.0.

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

2 years agoMark http/tests/inspector/network/resource-sizes-disk-cache.html as flaky.
ryanhaddad@apple.com [Tue, 25 Apr 2017 16:36:23 +0000 (16:36 +0000)]
Mark http/tests/inspector/network/resource-sizes-disk-cache.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=170971

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years agoAdd performance test for FontCache::systemFallbackForCharacters()
mmaxfield@apple.com [Tue, 25 Apr 2017 16:35:39 +0000 (16:35 +0000)]
Add performance test for FontCache::systemFallbackForCharacters()
https://bugs.webkit.org/show_bug.cgi?id=170842

Reviewed by Tim Horton.

PerformanceTests:

* Layout/word-joiner.html: Added.

Source/WebCore:

No new tests because there is no behavior change.

* platform/graphics/FontCascade.h:
(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript): Deleted.
* platform/graphics/WidthCache.h:
(WebCore::WidthCache::add):
(WebCore::WidthCache::addSlowCase):

Source/WTF:

* wtf/unicode/CharacterNames.h:

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

2 years agoContent-Disposition header filename is ignored when 'download' attribute is specified...
cdumez@apple.com [Tue, 25 Apr 2017 16:29:25 +0000 (16:29 +0000)]
Content-Disposition header filename is ignored when 'download' attribute is specified in HTML
https://bugs.webkit.org/show_bug.cgi?id=171239
<rdar://problem/31789855>

Reviewed by Alex Christensen.

Source/WebCore:

Add isAttachmentWithFilename() utility method to ResourceResponse to implement:
- https://html.spec.whatwg.org/#as-a-download (Step 2)

Test: http/tests/download/anchor-download-attribute-content-disposition.html

* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::isAttachmentWithFilename):
* platform/network/ResourceResponseBase.h:

Source/WebKit2:

Content-Disposition header filename is ignored when 'download' attribute is specified in HTML.
This is not as per HTML specification:
- https://html.spec.whatwg.org/#as-a-download (Step 2)

Content-Disposition header filename is supposed to override the value of the download attribute.

Firefox and Chrome follow the specification.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::findPendingDownloadLocation):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didReceiveResponse):

LayoutTests:

* http/tests/security/anchor-download-allow-sameorigin.html:
Stop using attachment.php as resource for this download attribute test because attachment.php
returns a Content-Disposition header with a filename. Given the behavior change in this patch,
this resource is no longer suitable for testing the download attribute.

* http/tests/download/anchor-download-attribute-content-disposition-expected.txt: Added.
* http/tests/download/anchor-download-attribute-content-disposition.html: Added.
* http/tests/download/resources/content-disposition-pass.php: Added.
Add layout test coverage.

* platform/ios-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:
Skip new test on platforms where the download attribute is not supported.

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

2 years ago[GTK] Improve an unit test for the JHBuild wrapper.
clopez@igalia.com [Tue, 25 Apr 2017 16:10:03 +0000 (16:10 +0000)]
[GTK] Improve an unit test for the JHBuild wrapper.
https://bugs.webkit.org/show_bug.cgi?id=168036

Unreviewed follow-up patch after r215727

* Scripts/webkitpy/port/base_unittest.py:
(test_jhbuild_wrapper): Improve the unit test by ensuring the directory
wasn't there before calling MockFileSystem.maybe_make_directory(), and
also that it exists after calling it.

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

2 years agoRebaseline fast/canvas/canvas-crash.html for ios-simulator.
ryanhaddad@apple.com [Tue, 25 Apr 2017 16:03:02 +0000 (16:03 +0000)]
Rebaseline fast/canvas/canvas-crash.html for ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=171238

Unreviewed test gardening.

* platform/ios-simulator/fast/canvas/canvas-crash-expected.txt: Added.

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

2 years agoWebAssembly: exporting a property with a name that's a number doesn't work
utatane.tea@gmail.com [Tue, 25 Apr 2017 15:36:08 +0000 (15:36 +0000)]
WebAssembly: exporting a property with a name that's a number doesn't work
https://bugs.webkit.org/show_bug.cgi?id=168857

Reviewed by JF Bastien.

r213453 allows Wasm instances to expose indexed properties. We activate the tests.

* wasm/js-api/test_Instance.js:
(ExportedNumber):

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

2 years ago[GTK] Add WebKitInspectorWindow to create inspector windows from local and remote...
carlosgc@webkit.org [Tue, 25 Apr 2017 15:24:35 +0000 (15:24 +0000)]
[GTK] Add WebKitInspectorWindow to create inspector windows from local and remote inspector
https://bugs.webkit.org/show_bug.cgi?id=171261

Reviewed by Michael Catanzaro.

Source/WebCore/platform/gtk/po:

Remove WebInspectorProxyGtk.cpp and RemoteWebInspectorProxyGtk.cpp from POTFILES.in and add WebKitInspectorWindow.cpp.

* POTFILES.in:

Source/WebKit2:

The code is currently duplicated in WebInspectorProxyGtk.cpp and RemoteWebInspectorProxyGtk.cpp. We can simplify
it by using a common widget in both places.
This patch also fixes the build when using GTK+ < 3.16.

* PlatformGTK.cmake:
* UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:
(WebKit::RemoteWebInspectorProxy::updateWindowTitle):
(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::updateInspectorWindowTitle):
* UIProcess/gtk/WebKitInspectorWindow.cpp: Added.
(webkit_inspector_window_class_init):
(webkit_inspector_window_init):
(webkitInspectorWindowNew):
(webkitInspectorWindowSetSubtitle):
* UIProcess/gtk/WebKitInspectorWindow.h: Added.

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

2 years ago[aarch64] moveConditionally32(), moveConditionallyTest32() should move from/to 64...
zandobersek@gmail.com [Tue, 25 Apr 2017 14:15:42 +0000 (14:15 +0000)]
[aarch64] moveConditionally32(), moveConditionallyTest32() should move from/to 64-bit registers
https://bugs.webkit.org/show_bug.cgi?id=170891

Reviewed by Saam Barati.

moveConditionally32() and moveConditionallyTest32() operations in
MacroAssemblerARM64 properly perform comparisons and tests on 32-bit
values, but end up performing the moves from and to 32-bit registers.

Move operations should instead be done on 64-bit registers, just like
on the X86_64 platform. This is achieved by specifying 64 as the data
size for the csel instructions.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveConditionallyTest32):

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

2 years agoEnable expired-only reload policy on Mac and iOS
antti@apple.com [Tue, 25 Apr 2017 14:14:00 +0000 (14:14 +0000)]
Enable expired-only reload policy on Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=171264
<rdar://problem/31807637>

Reviewed by Andreas Kling.

Source/WebCore:

* loader/NavigationAction.cpp:
(WebCore::navigationType):

Test for reload navigation type correctly.

Source/WebKit2:

Enable the reload policy where only expired subresources are revalidated on Mac and iOS.
The behavor is enabled in Safari and for other clients based on SDK version check.

* UIProcess/API/C/WKPage.cpp:
(WKPageReload):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView reload]):
* UIProcess/Cocoa/VersionChecks.h:

LayoutTests:

* fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html:

WebKitDisplayImages preference blocks loads, it does not prevent images already in memory cache from displaying.
Modify the test to clear the memory cache so it still tests what it is supposed to.

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

2 years agoImage decoders must have private constructors to avoid refcount misuse: ASSERTION...
magomez@igalia.com [Tue, 25 Apr 2017 12:35:18 +0000 (12:35 +0000)]
Image decoders must have private constructors to avoid refcount misuse: ASSERTION FAILED: m_deletionHasBegun when destroying ImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=171211

Reviewed by Carlos Garcia Campos.

Add a create method to each of the decoders and set their constructors as private. Change
ICOImageDecoder to store its internal PNG decoders as RefPtr and use the new create method, and
change ImageDecoder to use the create methods as well.

Covered by existent tests.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::create):
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::decodeAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.h:
* platform/image-decoders/webp/WEBPImageDecoder.h:

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

2 years agoBuild fix
mmaxfield@apple.com [Tue, 25 Apr 2017 12:16:46 +0000 (12:16 +0000)]
Build fix

Unreviewed.

No new tests because there is no behavior change.

* crypto/mac/SerializedCryptoKeyWrapMac.mm:
(WebCore::wrapSerializedCryptoKey):
(WebCore::unwrapSerializedCryptoKey):

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

2 years ago[GTK] ImageDiff should be run by jhbuild-wrapper in case of using jhbuild
clopez@igalia.com [Tue, 25 Apr 2017 10:48:31 +0000 (10:48 +0000)]
[GTK] ImageDiff should be run by jhbuild-wrapper in case of using jhbuild
https://bugs.webkit.org/show_bug.cgi?id=168036

Reviewed by Michael Catanzaro.

Call ImageDiff with the JHBuild wrapper if we should use it.
Also add some unit tests for the JHBuild wrapper feature.

* Scripts/webkitpy/port/base.py:
(Port._should_use_jhbuild): Use self._filesystem instead of os.path to allow mock testing.
* Scripts/webkitpy/port/base_unittest.py:
(test_jhbuild_wrapper): Add a test for port._should_use_jhbuild()
* Scripts/webkitpy/port/image_diff.py:
(ImageDiffer._start): The actual fix, use the wrapper if we should.
* Scripts/webkitpy/port/image_diff_unittest.py: Removed. This two tests are now integrated in port_testcase
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase):
(PortTestCase.test_diff_image): Test the command with wrapper and without it.
(PortTestCase.test_diff_image_passed): Moved from image_diff_unittest.py
(PortTestCase.test_diff_image_failed): Moved from image_diff_unittest.py

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

2 years agoImport W3C tests for the CSSOM View module
fred.wang@free.fr [Tue, 25 Apr 2017 08:46:07 +0000 (08:46 +0000)]
Import W3C tests for the CSSOM View module
https://bugs.webkit.org/show_bug.cgi?id=171215

Patch by Frederic Wang <fwang@igalia.com> on 2017-04-25
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

This patch imports "cssom-view" test suite from WPT repo:
https://github.com/w3c/web-platform-tests/tree/master/cssom-view

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/cssom-view/CaretPosition-001-expected.txt: Added.
* web-platform-tests/cssom-view/CaretPosition-001.html: Added.
* web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt: Added.
* web-platform-tests/cssom-view/HTMLBody-ScrollArea_quirksmode.html: Added.
* web-platform-tests/cssom-view/MediaQueryList-001-expected.txt: Added.
* web-platform-tests/cssom-view/MediaQueryList-001.html: Added.
* web-platform-tests/cssom-view/MediaQueryList-with-empty-string-expected.txt: Added.
* web-platform-tests/cssom-view/MediaQueryList-with-empty-string.html: Added.
* web-platform-tests/cssom-view/OWNERS: Added.
* web-platform-tests/cssom-view/Screen-pixelDepth-Screen-colorDepth001-expected.txt: Added.
* web-platform-tests/cssom-view/Screen-pixelDepth-Screen-colorDepth001.html: Added.
* web-platform-tests/cssom-view/cssom-getBoundingClientRect-001-expected.txt: Added.
* web-platform-tests/cssom-view/cssom-getBoundingClientRect-001.html: Added.
* web-platform-tests/cssom-view/cssom-getBoundingClientRect-002.html: Added.
* web-platform-tests/cssom-view/cssom-getClientRects-expected.txt: Added.
* web-platform-tests/cssom-view/cssom-getClientRects.html: Added.
* web-platform-tests/cssom-view/cssom-view-img-attributes-001-expected.txt: Added.
* web-platform-tests/cssom-view/cssom-view-img-attributes-001.html: Added.
* web-platform-tests/cssom-view/cssom-view-window-screen-interface-expected.txt: Added.
* web-platform-tests/cssom-view/cssom-view-window-screen-interface.html: Added.
* web-platform-tests/cssom-view/cssom-view/media-query-list-interface.xht: Added.
* web-platform-tests/cssom-view/cssom-view/w3c-import.log: Added.
* web-platform-tests/cssom-view/cssom-view/window-interface-expected.txt: Added.
* web-platform-tests/cssom-view/cssom-view/window-interface.xht: Added.
* web-platform-tests/cssom-view/elementFromPoint-001-expected.txt: Added.
* web-platform-tests/cssom-view/elementFromPoint-001.html: Added.
* web-platform-tests/cssom-view/elementFromPoint-expected.txt: Added.
* web-platform-tests/cssom-view/elementFromPoint.html: Added.
* web-platform-tests/cssom-view/elementFromPosition-expected.txt: Added.
* web-platform-tests/cssom-view/elementFromPosition.html: Added.
* web-platform-tests/cssom-view/elementScroll-expected.txt: Added.
* web-platform-tests/cssom-view/elementScroll.html: Added.
* web-platform-tests/cssom-view/elementsFromPoint.html: Added.
* web-platform-tests/cssom-view/historical-expected.txt: Added.
* web-platform-tests/cssom-view/historical.html: Added.
* web-platform-tests/cssom-view/htmlelement-offset-width-001-expected.txt: Added.
* web-platform-tests/cssom-view/htmlelement-offset-width-001.html: Added.
* web-platform-tests/cssom-view/iframe.html: Added.
* web-platform-tests/cssom-view/matchMedia-expected.txt: Added.
* web-platform-tests/cssom-view/matchMedia.xht: Added.
* web-platform-tests/cssom-view/matchMediaAddListener-expected.txt: Added.
* web-platform-tests/cssom-view/matchMediaAddListener.html: Added.
* web-platform-tests/cssom-view/mouseEvent-expected.txt: Added.
* web-platform-tests/cssom-view/mouseEvent.html: Added.
* web-platform-tests/cssom-view/negativeMargins-expected.txt: Added.
* web-platform-tests/cssom-view/negativeMargins.html: Added.
* web-platform-tests/cssom-view/offsetParent_element_test-expected.txt: Added.
* web-platform-tests/cssom-view/offsetParent_element_test.html: Added.
* web-platform-tests/cssom-view/scrollWidthHeight-expected.txt: Added.
* web-platform-tests/cssom-view/scrollWidthHeight.xht: Added.
* web-platform-tests/cssom-view/scrollWidthHeightWhenNotScrollable-expected.txt: Added.
* web-platform-tests/cssom-view/scrollWidthHeightWhenNotScrollable.xht: Added.
* web-platform-tests/cssom-view/scrolling-no-browsing-context-expected.txt: Added.
* web-platform-tests/cssom-view/scrolling-no-browsing-context.html: Added.
* web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt: Added.
* web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks.html: Added.
* web-platform-tests/cssom-view/scrollingElement.html: Added.
* web-platform-tests/cssom-view/support/1x1-green.png: Added.
* web-platform-tests/cssom-view/support/1x1-lime.png: Added.
* web-platform-tests/cssom-view/support/1x1-maroon.png: Added.
* web-platform-tests/cssom-view/support/1x1-navy.png: Added.
* web-platform-tests/cssom-view/support/1x1-red.png: Added.
* web-platform-tests/cssom-view/support/1x1-white.png: Added.
* web-platform-tests/cssom-view/support/60x60-gg-rr.png: Added.
* web-platform-tests/cssom-view/support/60x60-green.png: Added.
* web-platform-tests/cssom-view/support/60x60-red.png: Added.
* web-platform-tests/cssom-view/support/README: Added.
* web-platform-tests/cssom-view/support/a-green.css: Added.
(.a):
* web-platform-tests/cssom-view/support/b-green.css: Added.
(.b):
* web-platform-tests/cssom-view/support/c-red.css: Added.
(.c):
* web-platform-tests/cssom-view/support/cat.png: Added.
* web-platform-tests/cssom-view/support/import-green.css: Added.
(.import):
* web-platform-tests/cssom-view/support/import-red.css: Added.
(.import):
* web-platform-tests/cssom-view/support/pattern-grg-rgr-grg.png: Added.
* web-platform-tests/cssom-view/support/pattern-grg-rrg-rgg.png: Added.
* web-platform-tests/cssom-view/support/pattern-rgr-grg-rgr.png: Added.
* web-platform-tests/cssom-view/support/pattern-tr.png: Added.
* web-platform-tests/cssom-view/support/ruler-h-50%.png: Added.
* web-platform-tests/cssom-view/support/ruler-h-50px.png: Added.
* web-platform-tests/cssom-view/support/ruler-v-100px.png: Added.
* web-platform-tests/cssom-view/support/ruler-v-50px.png: Added.
* web-platform-tests/cssom-view/support/square-purple.png: Added.
* web-platform-tests/cssom-view/support/square-teal.png: Added.
* web-platform-tests/cssom-view/support/square-white.png: Added.
* web-platform-tests/cssom-view/support/support/README: Added.
* web-platform-tests/cssom-view/support/support/swatch-green.png: Added.
* web-platform-tests/cssom-view/support/support/swatch-red.png: Added.
* web-platform-tests/cssom-view/support/support/w3c-import.log: Added.
* web-platform-tests/cssom-view/support/swatch-blue.png: Added.
* web-platform-tests/cssom-view/support/swatch-green.png: Added.
* web-platform-tests/cssom-view/support/swatch-lime.png: Added.
* web-platform-tests/cssom-view/support/swatch-orange.png: Added.
* web-platform-tests/cssom-view/support/swatch-red.png: Added.
* web-platform-tests/cssom-view/support/swatch-teal.png: Added.
* web-platform-tests/cssom-view/support/swatch-white.png: Added.
* web-platform-tests/cssom-view/support/swatch-yellow.png: Added.
* web-platform-tests/cssom-view/support/test-bl.png: Added.
* web-platform-tests/cssom-view/support/test-br.png: Added.
* web-platform-tests/cssom-view/support/test-inner-half-size.png: Added.
* web-platform-tests/cssom-view/support/test-outer.png: Added.
* web-platform-tests/cssom-view/support/test-tl.png: Added.
* web-platform-tests/cssom-view/support/test-tr.png: Added.
* web-platform-tests/cssom-view/support/w3c-import.log: Added.
* web-platform-tests/cssom-view/ttwf-js-cssomview-getclientrects-length-expected.txt: Added.
* web-platform-tests/cssom-view/ttwf-js-cssomview-getclientrects-length.html: Added.
* web-platform-tests/cssom-view/ttwf-scrollintoview-expected.txt: Added.
* web-platform-tests/cssom-view/ttwf-scrollintoview.html: Added.
* web-platform-tests/cssom-view/w3c-import.log: Added.
* web-platform-tests/cssom-view/window-screen-height-expected.txt: Added.
* web-platform-tests/cssom-view/window-screen-height-immutable-expected.txt: Added.
* web-platform-tests/cssom-view/window-screen-height-immutable.html: Added.
* web-platform-tests/cssom-view/window-screen-height.html: Added.
* web-platform-tests/cssom-view/window-screen-width-expected.txt: Added.
* web-platform-tests/cssom-view/window-screen-width-immutable-expected.txt: Added.
* web-platform-tests/cssom-view/window-screen-width-immutable.html: Added.
* web-platform-tests/cssom-view/window-screen-width.html: Added.

LayoutTests:

* TestExpectations: Skip some completely failing CSSOM View tests.
* platform/ios-simulator/imported/w3c/web-platform-tests/cssom-view/Screen-pixelDepth-Screen-colorDepth001-actual.txt: Added. Add an expectation for iOS simulator, differing from other platform.
* platform/ios-simulator/imported/w3c/web-platform-tests/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt: Added. Ditto.

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

2 years ago[GTK] Add po/Makevars
commit-queue@webkit.org [Tue, 25 Apr 2017 07:41:07 +0000 (07:41 +0000)]
[GTK] Add po/Makevars
https://bugs.webkit.org/show_bug.cgi?id=170012

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-04-25
Reviewed by Carlos Garcia Campos.

* Makevars: Added so we can switch https://l10n.gnome.org/module/webkit/ from intltool to pure gettext and get WEB_UI_STRING* strings extracted.

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

2 years agoSupport reading NSURL titles from the pasteboard when performing data interaction
wenson_hsieh@apple.com [Tue, 25 Apr 2017 07:00:59 +0000 (07:00 +0000)]
Support reading NSURL titles from the pasteboard when performing data interaction
https://bugs.webkit.org/show_bug.cgi?id=171156
<rdar://problem/31356937>

Reviewed by Tim Horton.

Source/WebCore:

Support reading link titles from the pasteboard when performing data interaction. To do this, we refactor
Pasteboard::readURL to take in an additional String& title which is ultimately plumbed to the PlatformPasteboard
where it is set to the value of -[NSURL _title].

Test: DataInteractionTests.ExternalSourceTitledNSURL.

* editing/FrameSelection.h:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::WebContentReader::readURL):
* page/DragController.cpp:
(WebCore::DragController::performDragOperation):
(WebCore::DragController::concludeEditDrag):

Move calls to clearDragCaret() out of concludeEditDrag and into the call site, in performDragOperation after
attempting to concludeEditDrag. This is done so that if the WebEditorClient queries whether the drag caret is
in richly editable content for the purposes of generating a document fragment to insert, the answer will not
always be false as a drop is occurring.

* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::respectsUTIFidelities):
(WebCore::Pasteboard::readString):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::readURL):

Source/WebKit/mac:

Add a new WK1 SPI property, -[WebFrame hasRichlyEditableDragCaret].

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::readURLFromPasteboard):
* WebView/WebFrame.mm:
(-[WebFrame hasRichlyEditableDragCaret]):
* WebView/WebFramePrivate.h:

Source/WebKit2:

Adjust for interface changes in WebCore to support plumbing the title of an NSURL from the platform pasteboard
back to WebCore. Additionally, implement WebEditorClient::hasRichlyEditableSelection (which previously returned
false) to check whether the current selection is richly editable, or the drop caret is in richly editable content.
See WebCore ChangeLog for more details.

* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
* UIProcess/WebPasteboardProxy.h:
* UIProcess/WebPasteboardProxy.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::readURLFromPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::hasRichlyEditableSelection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hasRichlyEditableSelection):
* WebProcess/WebPage/WebPage.h:

Tools:

Adds a new unit test, DataInteractionTests.ExternalSourceTitledNSURL.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):

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

2 years agotest262: test262/test/language/expressions/object/method-definition/early-errors...
commit-queue@webkit.org [Tue, 25 Apr 2017 06:52:04 +0000 (06:52 +0000)]
test262: test262/test/language/expressions/object/method-definition/early-errors-object-method-duplicate-parameters.js
https://bugs.webkit.org/show_bug.cgi?id=171190

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-04-24
Reviewed by Saam Barati.

JSTests:

* stress/async-await-syntax.js:
* test262.yaml:

Source/JavaScriptCore:

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunctionExpressionCommon):
(JSC::BytecodeGenerator::emitNewFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionNode::emitBytecode):
(JSC::Scope::setSourceParseMode):
* parser/ParserModes.h:
(JSC::isFunctionParseMode):
(JSC::isMethodParseMode):
(JSC::isGeneratorOrAsyncFunctionWrapperParseMode):
(JSC::isGeneratorParseMode):
(JSC::isGeneratorWrapperParseMode):
* runtime/FunctionExecutable.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
Add a new GeneratorWrapperMethodMode parse mode. The other function types
(async, arrow) already have a FunctionMode and a MethodMode. Give
generators one as well. This lets isMethodParseMode actually be accurate.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::isArrowFunctionParameters):
(JSC::Parser<LexerType>::parseFormalParameters):
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parsePropertyMethod):
* parser/Parser.h:
Add a duplicate parameter failure if there are duplicate parameters
in method syntax.

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:
Extend to cover method duplicate parameter cases.

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

2 years agoClean up ICU headers
commit-queue@webkit.org [Tue, 25 Apr 2017 05:19:03 +0000 (05:19 +0000)]
Clean up ICU headers
https://bugs.webkit.org/show_bug.cgi?id=170997

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-04-24
Reviewed by JF Bastien.

Update all icu headers to 55.1

Source/JavaScriptCore:

* icu/LICENSE: Update copyright
* icu/README: Explain ICU headers for OS X better
* icu/unicode/localpointer.h:
(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):
* icu/unicode/platform.h:
* icu/unicode/putil.h:
* icu/unicode/ucal.h:
* icu/unicode/uchar.h:
* icu/unicode/ucnv.h:
* icu/unicode/ucol.h:
* icu/unicode/uconfig.h:
* icu/unicode/ucurr.h:
* icu/unicode/udatpg.h:
* icu/unicode/udisplaycontext.h:
* icu/unicode/uformattable.h:
* icu/unicode/uloc.h:
* icu/unicode/umachine.h:
* icu/unicode/unum.h:
* icu/unicode/unumsys.h:
* icu/unicode/urename.h:
* icu/unicode/uscript.h:
* icu/unicode/uset.h:
* icu/unicode/ustring.h:
* icu/unicode/utf8.h:
* icu/unicode/utypes.h:

Source/WebCore:

* icu/LICENSE: Update copyright
* icu/README: Explain ICU headers for OS X better
* icu/unicode/localpointer.h:
(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):
* icu/unicode/platform.h:
* icu/unicode/putil.h:
* icu/unicode/std_string.h:
* icu/unicode/ubrk.h:
* icu/unicode/uchar.h:
* icu/unicode/ucnv.h:
* icu/unicode/ucol.h:
* icu/unicode/ucoleitr.h:
* icu/unicode/uconfig.h:
* icu/unicode/ucurr.h:
* icu/unicode/uidna.h:
* icu/unicode/uloc.h:
* icu/unicode/umachine.h:
* icu/unicode/unistr.h:
(UnicodeString::getArrayStart):
(UnicodeString::UnicodeString):
(UnicodeString::hasShortLength):
(UnicodeString::getShortLength):
(UnicodeString::length):
(UnicodeString::getCapacity):
(UnicodeString::isBogus):
(UnicodeString::isWritable):
(UnicodeString::isBufferWritable):
(UnicodeString::getBuffer):
(UnicodeString::isEmpty):
(UnicodeString::setZeroLength):
(UnicodeString::setShortLength):
(UnicodeString::setLength):
(UnicodeString::setToEmpty):
(UnicodeString::remove):
* icu/unicode/urename.h:
* icu/unicode/uscript.h:
* icu/unicode/usearch.h:
* icu/unicode/uset.h:
* icu/unicode/ustring.h:
* icu/unicode/utf8.h:
* icu/unicode/utypes.h:
* icu/unicode/uvernum.h:

Source/WebKit/mac:

* icu/README: Explain ICU headers for OS X better
* icu/unicode/localpointer.h:
(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):
* icu/unicode/platform.h:
* icu/unicode/putil.h:
* icu/unicode/uchar.h:
* icu/unicode/uconfig.h:
* icu/unicode/ucurr.h:
* icu/unicode/uidna.h:
* icu/unicode/umachine.h:
* icu/unicode/urename.h:
* icu/unicode/uscript.h:
* icu/unicode/ustring.h:
* icu/unicode/utf8.h:
* icu/unicode/utypes.h:
* icu/unicode/uvernum.h:

Source/WTF:

* icu/LICENSE: Update copyright
* icu/README: Explain ICU headers for OS X better
* icu/unicode/localpointer.h:
(LocalPointer::LocalPointer):
(LocalPointer::adoptInsteadAndCheckErrorCode):
* icu/unicode/platform.h:
* icu/unicode/putil.h:
* icu/unicode/std_string.h:
* icu/unicode/ubrk.h:
* icu/unicode/uchar.h:
* icu/unicode/ucnv.h:
* icu/unicode/ucol.h:
* icu/unicode/uconfig.h:
* icu/unicode/ucurr.h:
* icu/unicode/uloc.h:
* icu/unicode/umachine.h:
* icu/unicode/unistr.h:
(UnicodeString::getArrayStart):
(UnicodeString::UnicodeString):
(UnicodeString::hasShortLength):
(UnicodeString::getShortLength):
(UnicodeString::length):
(UnicodeString::getCapacity):
(UnicodeString::isBogus):
(UnicodeString::isWritable):
(UnicodeString::isBufferWritable):
(UnicodeString::getBuffer):
(UnicodeString::isEmpty):
(UnicodeString::setZeroLength):
(UnicodeString::setShortLength):
(UnicodeString::setLength):
(UnicodeString::setToEmpty):
(UnicodeString::remove):
* icu/unicode/urename.h:
* icu/unicode/uscript.h:
* icu/unicode/uset.h:
* icu/unicode/ustring.h:
* icu/unicode/utf8.h:
* icu/unicode/utypes.h:
* icu/unicode/uvernum.h:

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

2 years agoLayoutTests crypto/subtle/ecdsa-generate-key-sign-verify-p384.html and crypto/subtle...
jiewen_tan@apple.com [Tue, 25 Apr 2017 05:10:00 +0000 (05:10 +0000)]
LayoutTests crypto/subtle/ecdsa-generate-key-sign-verify-p384.html and crypto/subtle/ecdsa-generate-key-sign-verify-p256.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=171059
<rdar://problem/31734958>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by existing tests.

* crypto/mac/CryptoAlgorithmECDSAMac.cpp:
(WebCore::signECDSA):
Enhance ways to convert the DER signatures produced from CommonCrypto to r||s.

LayoutTests:

* TestExpectations:
Remove test expectations.

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

2 years ago[JSC] Use JSFixedArray directly when using call_varargs
utatane.tea@gmail.com [Tue, 25 Apr 2017 05:09:10 +0000 (05:09 +0000)]
[JSC] Use JSFixedArray directly when using call_varargs
https://bugs.webkit.org/show_bug.cgi?id=171057

Reviewed by Saam Barati.

JSTests:

* stress/spread-capture-rest.js: Added.
(shouldBe):
(capture):
(a):
(b):
* stress/spread-multi-layers.js: Added.
(shouldBe):
(a):
(b):
(c):
(d):
* stress/spread-non-varargs.js: Added.
(shouldBe):
(a):
(b):

Source/JavaScriptCore:

Previously we always emit new_array_with_spread when calling call(...args).
But this array is unnecessary if varargs operation can handle Spread directly.

This patch implements a peep-hole optimization in the bytecode compiler layer
to omit new_array_with_spread. This is very simple and effective because this
peep-hole optimization is quite common when using (...args) style calls and
this optimization works all the tiers. While we can implement the phase to
omit this NewArrayWithSpread in argument elimination phase, it only works
for FTL. While such an optimization can work with complex data flow, this
peep-hole optimization can optimize a common case easily.

For now, Spread and PhantomSpread can be directly drained by CallVarargs
and LoadVarargs related operations. We modify DFG and FTL to handle this correctly.

This shows six-speed improvement.

    spread.es6                 89.4300+-2.0236     ^     69.6015+-1.7278        ^ definitely 1.2849x faster
    spread-generator.es6      344.7879+-5.9147     ^    331.2712+-6.8610        ^ definitely 1.0408x faster

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargsWithSpread):
* interpreter/Interpreter.cpp:
(JSC::sizeOfVarargs):
(JSC::loadVarargs):
* parser/Nodes.h:
(JSC::ArrayNode::elements):
* runtime/JSFixedArray.cpp:
(JSC::JSFixedArray::copyToArguments):
* runtime/JSFixedArray.h:

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

2 years ago[selectors4] :focus-within should use the flat tree
rego@igalia.com [Tue, 25 Apr 2017 04:58:55 +0000 (04:58 +0000)]
[selectors4] :focus-within should use the flat tree
https://bugs.webkit.org/show_bug.cgi?id=170899

Reviewed by Antti Koivisto.

Source/WebCore:

This has been discussed in the following CSS WG issue:
https://github.com/w3c/csswg-drafts/issues/1135

And the spec has been updated (https://drafts.csswg.org/selectors-4/#the-focus-within-pseudo):
"An element also matches :focus-within if one of its descendants in the flat tree
 (including non-element nodes, such as text nodes) matches the conditions for matching :focus."

Test: imported/w3c/web-platform-tests/css/selectors4/focus-within-shadow-006.html

* dom/Element.cpp:
(WebCore::Element::setFocus): Use "flat tree" ("composed tree" in WebKit)
to set focus-within flag.

LayoutTests:

* TestExpectations: Remove test that is passing now.

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

2 years ago[GTK] Fix extraction of translator comments
commit-queue@webkit.org [Tue, 25 Apr 2017 03:48:12 +0000 (03:48 +0000)]
[GTK] Fix extraction of translator comments
https://bugs.webkit.org/show_bug.cgi?id=170012

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-04-24
Reviewed by Michael Catanzaro.

* CMakeLists.txt: Remove “TRANSLATORS:” header, as it’s not used and might block extraction of translator comments.

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

2 years agoUnreviewed, fix Windows build after r215715
utatane.tea@gmail.com [Tue, 25 Apr 2017 03:23:20 +0000 (03:23 +0000)]
Unreviewed, fix Windows build after r215715
https://bugs.webkit.org/show_bug.cgi?id=171199

* wtf/StackTrace.h:

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

2 years ago2017-04-24 James Craig <jcraig@apple.com>
jcraig@apple.com [Tue, 25 Apr 2017 03:21:29 +0000 (03:21 +0000)]
2017-04-24  James Craig  <jcraig@apple.com>

        Upload demo files for prefers-reduced-motion post
        https://bugs.webkit.org/show_bug.cgi?id=170663

        Rubber stamped by Jon Davis.

        * blog-files/prefers-reduced-motion: Added.
        * blog-files/prefers-reduced-motion/axi.png: Added.
        * blog-files/prefers-reduced-motion/prm.htm: Added.

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

2 years ago[WTF] Move JSC tools/StackTrace to WTF and unify stack trace dump code
utatane.tea@gmail.com [Tue, 25 Apr 2017 02:53:49 +0000 (02:53 +0000)]
[WTF] Move JSC tools/StackTrace to WTF and unify stack trace dump code
https://bugs.webkit.org/show_bug.cgi?id=171199

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch adds a utility method to produce demangled names with dladdr.
It fixes several memory leaks because the result of abi::__cxa_demangle()
needs to be `free`-ed.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::StackFrame::displayName):
* tools/CellProfile.h:
* tools/CodeProfile.cpp:
(JSC::CodeProfile::report):
(JSC::symbolName): Deleted.

Source/WTF:

JSC tools/StackTrace's dump code is almost identical to WTF Assertions'
stack trace dump code. This patch moves tools/StackTrace to WTF and use
it in Assertions. It unifies the two duplicate implementations into one.

* WTF.xcodeproj/project.pbxproj:
* wtf/Assertions.cpp:
* wtf/CMakeLists.txt:
* wtf/Platform.h:
* wtf/StackTrace.cpp: Renamed from Source/JavaScriptCore/tools/StackTrace.cpp.
(WTF::StackTrace::captureStackTrace):
(WTF::StackTrace::dump):
* wtf/StackTrace.h: Copied from Source/JavaScriptCore/tools/StackTrace.h.
(WTF::StackTrace::StackTrace):
(WTF::StackTrace::stack):
(WTF::StackTrace::DemangleEntry::mangledName):
(WTF::StackTrace::DemangleEntry::demangledName):
(WTF::StackTrace::DemangleEntry::DemangleEntry):
* wtf/SystemFree.h: Renamed from Source/JavaScriptCore/tools/StackTrace.h.
(WTF::SystemFree::operator()):

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

2 years agoRespect fidelity order when reading web content from item providers
wenson_hsieh@apple.com [Tue, 25 Apr 2017 02:35:02 +0000 (02:35 +0000)]
Respect fidelity order when reading web content from item providers
https://bugs.webkit.org/show_bug.cgi?id=171155
<rdar://problem/31356937>

Reviewed by Tim Horton.

Source/WebCore:

Currently, when reading web content from pasteboards, we assume the old UIPasteboard/NSPasteboard model wherein
the destination must determine which of the items is considered to have the highest fidelity for the purposes of
inserting into an editable area. This destination-side fidelity ranking is determined solely by the NSArray
returned from Pasteboard::supportedPasteboardTypes, which lists compatible types in order from highest fidelity
to lowest fidelity. Pasteboard::read effectively iterates over this list of types in order, attempting to read
highest fidelity types and bailing when it first successfully reads data.

However, when our pasteboard is backed by UIItemProviders, we should instead read pasteboard types in order of
fidelity as specified by the source rather than the destination. To accomplish this, we introduce an alternate
codepath, Pasteboard::readRespectingUTIFidelities, which we take if Pasteboard::respectsUTIFidelities is true
(currently, this only applies for the purposes of data interaction). This version follows a different flow:
for each item in the pasteboard, we ask for just the UTIs for that item, in order of fidelity. For each item,
we then call readPasteboardWebContentDataForType to try and read data for that type, continuing until either
all UTIs have been attempted, or reading was successful.

This patch makes two additional adjustments. First, we introduce Pasteboard::getTypesByFidelityForItemAtIndex,
which is used by Pasteboard::readRespectingUTIFidelities when querying the list of supported UTIs for each
pasteboard item, sorted by highest to lowest fidelity.

Secondly, we refactor logic to write to the item provider pasteboard in PlatformPasteboardIOS. Since we are
now respecting fidelity rankings on the destination, the source must also register UTI types in the right
fidelity order. While this was mostly achieved using our existing method of writing a list of object
representations to the pasteboard and then all of the contents of a NSString => NSData dictionary containing
private UTI data, this approach has two flaws:
1.  We are unable to register high-priority custom types, followed by representing objects, followed by more
    lower-priority custom types, since we assume that all custom types follow all representing objects.
2.  Since we're just iterating over a dictionary of NSString => NSData when registering custom UTI
    representations to the item provider, there cannot inherently be any fidelity ordering for custom types.

To address both of these issues, we introduce two new objects that encapsulate how we register data to the item
provider pasteboard. WebItemProviderRegistrationInfo represents some data that can be registered to an item
provider (either an object conforming to UIItemProviderWriting, or an NSString and NSData).
WebItemProviderRegistrationInfoList represents a list of WebItemProviderRegistrationInfos in order of highest to
lowest fidelity. In PlatformPasteboardIOS, we transform PasteboardWebContent, PasteboardImage, and PasteboardURL
into a WebItemProviderRegistrationInfoList, which we then pass along to the WebItemProviderPasteboard. In
WebItemProviderPasteboard, we traverse the list of WebItemProviderRegistrationInfos in the list and register
each WebItemProviderRegistrationInfo's representing object or data to the item provider.

Test: DataInteractionTests.RespectsExternalSourceFidelityRankings.

* WebCore.xcodeproj/project.pbxproj:
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/ios/AbstractPasteboard.h:
* platform/ios/AbstractPasteboard.mm: Removed.

Moves WebItemProviderData, formerly implemented in AbstractPasteboard.mm, into WebItemProviderPasteboard.mm.
We can delete AbstractPasteboard.mm as a result.

* platform/ios/PasteboardIOS.mm:
(WebCore::readPasteboardWebContentDataForType):

Pull out common logic for reading data given a UTI type from the pasteboard into the PasteboardWebContentReader.
This is invoked from both the existing Pasteboard::read codepath, as well as the readRespectingUTIFidelities
codepath.

(WebCore::Pasteboard::read):

Refactored to call the new readPasteboardWebContentDataForType helper. Behavior should not have changed, unless
the pasteboard supports UTI fidelities.

(WebCore::Pasteboard::respectsUTIFidelities):
(WebCore::Pasteboard::readRespectingUTIFidelities):

An alternative to Pasteboard::read that considers source-side fidelity rankings of UTIs.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::getTypesByFidelityForItemAtIndex):
(WebCore::PlatformPasteboard::writeObjectRepresentations):

Refactored to build a WebItemProviderRegistrationInfoList and pass it to the WebItemProviderPasteboard to
register items and data.

(WebCore::PlatformPasteboard::write):
* platform/ios/WebItemProviderPasteboard.h:
* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderRegistrationInfo initWithRepresentingObject:typeIdentifier:data:]):
(-[WebItemProviderRegistrationInfo representingObject]):
(-[WebItemProviderRegistrationInfo typeIdentifier]):
(-[WebItemProviderRegistrationInfo data]):

Represents a single calls to register data onto the item provider pasteboard. See
WebItemProviderPasteboard.h header comments for more info.

(-[WebItemProviderRegistrationInfoList init]):
(-[WebItemProviderRegistrationInfoList addData:forType:]):
(-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
(-[WebItemProviderRegistrationInfoList numberOfItems]):
(-[WebItemProviderRegistrationInfoList itemAtIndex:]):
(-[WebItemProviderRegistrationInfoList enumerateItems:]):

Represents a series of calls to register representations onto the item provider pasteboard. See
WebItemProviderPasteboard.h header comments for more info.

(-[WebItemProviderPasteboard pasteboardTypesByFidelityForItemAtIndex:]):
(-[WebItemProviderPasteboard setItemsUsingRegistrationInfoLists:]):
(-[WebItemProviderPasteboard setItemsFromObjectRepresentations:]): Deleted.

Source/WebKit/mac:

Adjusts for changes in WebCore (see WebCore/ChangeLog for more details).

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

Source/WebKit2:

Adjusts for changes in WebCore by adding plumbing to support Pasteboard::getTypesByFidelityForItemAtIndex. See
WebCore/ChangeLog for more details.

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

Tools:

Adds a new unit test (DataInteractionTests.RespectsExternalSourceFidelityRankings). See WebCore ChangeLog for
more details.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):

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

2 years ago[AppleWin] The procedure entry point ?waitForThreadCompletion@WTF@@YAHI@Z could not...
utatane.tea@gmail.com [Tue, 25 Apr 2017 02:15:48 +0000 (02:15 +0000)]
[AppleWin] The procedure entry point ?waitForThreadCompletion@WTF@@YAHI@Z could not be located in the dynamic link library WebKitQuartzCoreAdditions.dll
https://bugs.webkit.org/show_bug.cgi?id=171029

Reviewed by Brent Fulgham.

While WTF Threading APIs are updated, WebKitQuartzCoreAdditions.dll in Windows uses some of the old APIs,
waitForThreadCompletion and createThread. This patch implements both on top of the new APIs.
These APIs are only exposed in Windows for this compatibility problem and new code should not use it.

* wtf/ThreadHolder.cpp:
(WTF::ThreadHolder::initialize):
* wtf/ThreadHolder.h:
* wtf/ThreadHolderWin.cpp:
(WTF::ThreadHolder::get):
(WTF::ThreadHolder::platformInitialize):
(WTF::ThreadHolder::destruct):
* wtf/Threading.h:
* wtf/ThreadingWin.cpp:
(WTF::createThread):
(WTF::waitForThreadCompletion):

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

2 years ago[GTK] Update POTFILES.in
commit-queue@webkit.org [Tue, 25 Apr 2017 02:10:14 +0000 (02:10 +0000)]
[GTK] Update POTFILES.in

It’s missing some files with translatable strings.
https://bugs.webkit.org/show_bug.cgi?id=171232

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2017-04-24
Reviewed by Michael Catanzaro.

* POTFILES.in: Update POTFILES.in.

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

2 years agoRegression(r204605): support for "cp874" charset alias was inadvertently dropped...
cdumez@apple.com [Tue, 25 Apr 2017 01:44:32 +0000 (01:44 +0000)]
Regression(r204605): support for "cp874" charset alias was inadvertently dropped which may cause issues on certain Thai sites
https://bugs.webkit.org/show_bug.cgi?id=171128
<rdar://problem/31526844>

Reviewed by Alexey Proskuryakov.

When using Thai as default language on MacOS, defaultTextEncodingNameForSystemLanguage()
was returning "cp874" encoding with was dropped in r204605 for not being part of the
encoding specification (https://encoding.spec.whatwg.org/#names-and-labels).

To address the issue, we map "cp874" encoding to the "dos-874" encoding which is
properly recognized. Without this, this could lead to issue on WebSites that do not
specify a charset.

* platform/text/TextEncodingRegistry.cpp:
(WebCore::defaultTextEncodingNameForSystemLanguage):

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

2 years ago[CG] Provide a type identifier hint to the CGImageSource so getting the type identifi...
commit-queue@webkit.org [Tue, 25 Apr 2017 01:23:55 +0000 (01:23 +0000)]
[CG] Provide a type identifier hint to the CGImageSource so getting the type identifier is more accurate
https://bugs.webkit.org/show_bug.cgi?id=171042

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-04-24
Reviewed by Tim Horton.

The image URL can be used to get the type identifier hint. Without providing
this hint, the image type identifier is not accurate for image formats.

Also add a function to the ImageDecoder class to get the typeIdentifier. Add
all the pluming from the ImageDecoder till the Image class.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::frameImageAtIndexCacheIfNeeded):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::advanceAnimation):
(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::newFrameNativeImageAvailableAtIndex):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.cpp:
(WebCore::Image::sourceURL):
* platform/graphics/Image.h: Change the sourceURL() to return a URL so CG can create CFURLRef from it.
(WebCore::Image::uti):
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::cacheAsyncFrameNativeImageAtIndex):
(WebCore::ImageFrameCache::startAsyncDecodingQueue):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::stopAsyncDecodingQueue):
(WebCore::ImageFrameCache::clearMetadata):
(WebCore::ImageFrameCache::sourceURL):
(WebCore::ImageFrameCache::encodedDataStatus):
(WebCore::ImageFrameCache::uti):
(WebCore::ImageFrameCache::filenameExtension):
* platform/graphics/ImageFrameCache.h:
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ensureDecoderAvailable):
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::uti):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::ImageDecoder): Pass the type identifier hint to CGImageSourceCreateIncremental().
(WebCore::ImageDecoder::uti):
(WebCore::ImageDecoder::filenameExtension):
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):
* platform/graphics/cg/ImageDecoderCG.h:
(WebCore::ImageDecoder::create):
* platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoder::encodedDataStatus):
* platform/graphics/win/ImageDecoderDirect2D.h:
(WebCore::ImageDecoder::create): Add an argument of type URL.
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::create): Add an argument of type URL.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::encodedDataStatus): Make it const.
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::encodedDataStatus):
* platform/image-decoders/bmp/BMPImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::encodedDataStatus):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::encodedDataStatus):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::encodedDataStatus):
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::encodedDataStatus):
* platform/image-decoders/png/PNGImageDecoder.h:
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::encodedDataStatus):
* platform/image-decoders/webp/WEBPImageDecoder.h:
* platform/spi/cg/ImageIOSPI.h: Added.

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

2 years agoUnreviewed build fix.
ryanhaddad@apple.com [Tue, 25 Apr 2017 00:43:36 +0000 (00:43 +0000)]
Unreviewed build fix.

* crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
(WebCore::encryptAES_GCM):
(WebCore::decyptAES_GCM):

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