WebKit-https.git
4 years agoMarking perf/rel-list-remove.html as flaky on ios-simulator
ryanhaddad@apple.com [Wed, 29 Jun 2016 21:54:50 +0000 (21:54 +0000)]
Marking perf/rel-list-remove.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=156561

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoDestructuring variable declaration is missing a validation of the syntax of a sub...
sbarati@apple.com [Wed, 29 Jun 2016 21:48:17 +0000 (21:48 +0000)]
Destructuring variable declaration is missing a validation of the syntax of a sub production when there is a rhs
https://bugs.webkit.org/show_bug.cgi?id=159267

Reviewed by Mark Lam.

Source/JavaScriptCore:

We were parsing something without checking if it had a syntax error.
This is wrong for many reasons, but it could actually cause a crash
in a debug build if you parsed particular programs.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVariableDeclarationList):

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

4 years agoAX: Crash in WebCore::Document::focusNavigationStartingNode(WebCore::FocusDirection...
n_wang@apple.com [Wed, 29 Jun 2016 21:23:29 +0000 (21:23 +0000)]
AX: Crash in WebCore::Document::focusNavigationStartingNode(WebCore::FocusDirection) const + 128
https://bugs.webkit.org/show_bug.cgi?id=159240

Reviewed by Ryosuke Niwa.

Source/WebCore:

This crash is caused by passing an empty node to ElementTraversal::previous(Node&). When the
focusNavigationStartingNode has been removed and it has no next sibling, we should fallback
to itself for calculating the next focused element.

Test: fast/events/remove-focus-navigation-starting-point-crash.html

* dom/Document.cpp:
(WebCore::Document::focusNavigationStartingNode):

LayoutTests:

* fast/events/remove-focus-navigation-starting-point-crash-expected.txt: Added.
* fast/events/remove-focus-navigation-starting-point-crash.html: Added.
* platform/ios-simulator/TestExpectations:

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

4 years agoMarking animations/multiple-backgrounds.html as flaky on ios-simulator.
ryanhaddad@apple.com [Wed, 29 Jun 2016 20:59:04 +0000 (20:59 +0000)]
Marking animations/multiple-backgrounds.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=150942

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoUnreviewed, rolling out r202617.
ryanhaddad@apple.com [Wed, 29 Jun 2016 20:17:44 +0000 (20:17 +0000)]
Unreviewed, rolling out r202617.

The LayoutTest from this change crashes under GuardMalloc

Reverted changeset:

"Throw exceptions for invalid number of channels for
ConvolverNode"
https://bugs.webkit.org/show_bug.cgi?id=159238
http://trac.webkit.org/changeset/202617

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

4 years agoRename addressFields to contactFields
andersca@apple.com [Wed, 29 Jun 2016 20:14:30 +0000 (20:14 +0000)]
Rename addressFields to contactFields
https://bugs.webkit.org/show_bug.cgi?id=159271
rdar://problem/27086955

Reviewed by Beth Dakin.

Source/WebCore:

* Modules/applepay/ApplePaySession.cpp:
(WebCore::createContactFields):
(WebCore::isValidPaymentRequestPropertyName):
(WebCore::createPaymentRequest):
(WebCore::createAddressFields): Deleted.
* Modules/applepay/PaymentRequest.h:
(WebCore::PaymentRequest::requiredBillingContactFields):
(WebCore::PaymentRequest::setRequiredBillingContactFields):
(WebCore::PaymentRequest::requiredShippingContactFields):
(WebCore::PaymentRequest::setRequiredShippingContactFields):
(WebCore::PaymentRequest::requiredBillingAddressFields): Deleted.
(WebCore::PaymentRequest::setRequiredBillingAddressFields): Deleted.
(WebCore::PaymentRequest::requiredShippingAddressFields): Deleted.
(WebCore::PaymentRequest::setRequiredShippingAddressFields): Deleted.

Source/WebKit2:

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<PaymentRequest>::encode):
(IPC::ArgumentCoder<PaymentRequest>::decode):
(IPC::ArgumentCoder<PaymentRequest::ContactFields>::encode):
(IPC::ArgumentCoder<PaymentRequest::ContactFields>::decode):
(IPC::ArgumentCoder<PaymentRequest::AddressFields>::encode): Deleted.
(IPC::ArgumentCoder<PaymentRequest::AddressFields>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toPKAddressField):
(WebKit::toPKPaymentRequest):

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

4 years agoUnreviewed, third attempt to fix ASAN build for r202599
jiewen_tan@apple.com [Wed, 29 Jun 2016 19:54:23 +0000 (19:54 +0000)]
Unreviewed, third attempt to fix ASAN build for r202599

* platform/text/TextCodecReplacement.cpp:
(WebCore::TextCodecReplacement::decode):

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

4 years agoAdopt MediaRemote.
jer.noble@apple.com [Wed, 29 Jun 2016 19:29:07 +0000 (19:29 +0000)]
Adopt MediaRemote.
https://bugs.webkit.org/show_bug.cgi?id=159250

Reviewed by Eric Carlson.

Source/WebCore:

Adopt MediaRemote and use the framework to implement MediaSessionManageMac
and RemoteCommandListenerMac.

* WebCore.xcodeproj/project.pbxproj:
* platform/RemoteCommandListener.cpp:
* platform/audio/PlatformMediaSessionManager.cpp:
* platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.cpp.
(PlatformMediaSessionManager::updateSessionState):
* platform/audio/mac/MediaSessionManagerMac.h: Added.
* platform/audio/mac/MediaSessionManagerMac.mm: Added.
(WebCore::PlatformMediaSessionManager::sharedManager):
(WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
(WebCore::MediaSessionManagerMac::MediaSessionManagerMac):
(WebCore::MediaSessionManagerMac::~MediaSessionManagerMac):
(WebCore::MediaSessionManagerMac::sessionWillBeginPlayback):
(WebCore::MediaSessionManagerMac::removeSession):
(WebCore::MediaSessionManagerMac::sessionWillEndPlayback):
(WebCore::MediaSessionManagerMac::clientCharacteristicsChanged):
(WebCore::MediaSessionManagerMac::nowPlayingEligibleSession):
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
* platform/cocoa/SoftLinking.h:
* platform/mac/MediaRemoteSoftLink.cpp: Added.
* platform/mac/MediaRemoteSoftLink.h: Added.
* platform/mac/RemoteCommandListenerMac.h: Added.
(WebCore::RemoteCommandListenerMac::createWeakPtr):
* platform/mac/RemoteCommandListenerMac.mm: Added.
(WebCore::RemoteCommandListener::create):
(WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):
(WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac):
* platform/spi/mac/MediaRemoteSPI.h: Added.

Source/WebKit2:

Add a sandbox exception allowing access to the mediaremoted XPC service.

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

Source/WTF:

Add USE_MEDIAREMOTE.

* wtf/Platform.h:

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

4 years agoCannot clear a MediaSource SourceBuffer in Safari 9 and WebKit nightly
jer.noble@apple.com [Wed, 29 Jun 2016 19:22:59 +0000 (19:22 +0000)]
Cannot clear a MediaSource SourceBuffer in Safari 9 and WebKit nightly
https://bugs.webkit.org/show_bug.cgi?id=159230

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-remove.html (modified)

Move to using a MediaTime directly (rather than as a double) to add
and removed buffered ranges. Also, drop the use of the "microsecond"
fudge factor when adding buffered ranges.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::removeSamplesFromTrackBuffer):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

LayoutTests:

* media/media-source/media-source-remove.html:
* media/media-source/media-source-remove-expected.txt:

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

4 years agoWKWebView should ask WKNavigationDelegate about bad ssl certificates
commit-queue@webkit.org [Wed, 29 Jun 2016 19:19:24 +0000 (19:19 +0000)]
WKWebView should ask WKNavigationDelegate about bad ssl certificates
https://bugs.webkit.org/show_bug.cgi?id=159176
Source/WebKit2:

rdar://problem/26864882

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-29
Reviewed by Sam Weinig.

This can be tested manually by visiting a site in MiniBrowser that has invalid ssl certificates, but we don't have proper ssl testing yet.
Before this change, we would just open the site as if nothing were invalid, now we call the WKNavigationDelegate's didReceiveAuthenticationChallenge
like we did before using NSURLSession, and we do not open the page, also like we did before using NSURLSession.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
When using NSURLConnection and responding to canAuthenticateAgainstProtectionSpace with YES,
we get an NSURLAuthenticationChallenge when a bad ssl certificate is encountered in the handshake.
When using NSURLSession, we want to call webView:didReceiveAuthenticationChallenge:completionHandler: in this case.
The default implementation of NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace returns true
if there is an implementation of webView:didReceiveAuthenticationChallenge:completionHandler: in its WKNavigationDelegate.
Internal clients can implement _webView:canAuthenticateAgainstProtectionSpace:
and Safari uses canHandleHTTPSServerTrustEvaluation, so it will be unaffected.

Tools:

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-29
Reviewed by Sam Weinig.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController webView:didFinishLoadingNavigation:]):
(-[WK2BrowserWindowController webView:didReceiveAuthenticationChallenge:completionHandler:]):
(-[WK2BrowserWindowController webView:didFailNavigation:withError:]):

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

4 years agoDelete WKElementInfo since it's not used
bdakin@apple.com [Wed, 29 Jun 2016 18:48:06 +0000 (18:48 +0000)]
Delete WKElementInfo since it's not used
https://bugs.webkit.org/show_bug.cgi?id=159265

Reviewed by Sam Weinig.

* Shared/API/Cocoa/WebKit.h:
* UIProcess/API/Cocoa/WKElementInfo.h: Removed.
* UIProcess/API/Cocoa/WKElementInfo.mm: Removed.
* UIProcess/API/Cocoa/WKElementInfoInternal.h: Removed.
* UIProcess/API/Cocoa/WKPreviewElementInfo.h:
* UIProcess/API/Cocoa/WKPreviewElementInfo.mm:
(-[WKPreviewElementInfo _initWithLinkURL:]):
(-[WKPreviewElementInfo copyWithZone:]):
(-[WKPreviewElementInfo linkURL]):
* UIProcess/API/Cocoa/WKPreviewElementInfoInternal.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm:
(-[_WKContextMenuElementInfo copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoUnreviewed, second attempt to fix ASAN build for r202599
jiewen_tan@apple.com [Wed, 29 Jun 2016 18:43:25 +0000 (18:43 +0000)]
Unreviewed, second attempt to fix ASAN build for r202599

* platform/text/TextCodecReplacement.cpp:

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

4 years agoUnreviewed, first attempt to fix ASAN build for r202599
jiewen_tan@apple.com [Wed, 29 Jun 2016 18:40:35 +0000 (18:40 +0000)]
Unreviewed, first attempt to fix ASAN build for r202599

* platform/text/TextCodecReplacement.cpp:

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

4 years agoWeb Inspector: Show Shadow Root type in DOM Tree
commit-queue@webkit.org [Wed, 29 Jun 2016 18:36:29 +0000 (18:36 +0000)]
Web Inspector: Show Shadow Root type in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=159236
<rdar://problem/27068521>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-29
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:
Include optional shadowRootType property for DOMNodes.

Source/WebCore:

Test: inspector/dom/shadowRootType.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::shadowRootType):
(WebCore::InspectorDOMAgent::buildObjectForNode):
Set the shadowRootType property when a node is a ShadowRoot.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
"Shadow Content (type)" string.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode):
(WebInspector.DOMNode.prototype.shadowRoots):
(WebInspector.DOMNode.prototype.shadowRootType):
Initialize state and add accessors.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
(WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
Better string when an element is a Shadow Root.

* UserInterface/Views/DOMTreeElementPathComponent.js:
(WebInspector.DOMTreeElementPathComponent):
Better to check the Shadow Root type.

* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom .html-fragment.shadow):
Opacity looks poor when there is a selection. Switch to gray.

LayoutTests:

* inspector/dom/shadowRootType-expected.txt: Added.
* inspector/dom/shadowRootType.html: Added.

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

4 years agoUnreviewed, rolling out r202627.
commit-queue@webkit.org [Wed, 29 Jun 2016 18:25:40 +0000 (18:25 +0000)]
Unreviewed, rolling out r202627.
https://bugs.webkit.org/show_bug.cgi?id=159266

patch is broken on arm (Requested by keith_miller on #webkit).

Reverted changeset:

"LLInt should support other types of prototype GetById
caching."
https://bugs.webkit.org/show_bug.cgi?id=158083
http://trac.webkit.org/changeset/202627

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 29 Jun 2016 18:17:26 +0000 (18:17 +0000)]
Versioning.

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

4 years ago[JSC] Fix small issues of TypedArray prototype
commit-queue@webkit.org [Wed, 29 Jun 2016 18:16:33 +0000 (18:16 +0000)]
[JSC] Fix small issues of TypedArray prototype
https://bugs.webkit.org/show_bug.cgi?id=159248

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-29
Reviewed by Saam Barati.

Source/JavaScriptCore:

First, TypedArray's toString and Array's toString
should be the same function.
I moved the function to GlobalObject and each array type
gets it as needed.

Then TypedArray length was supposed to be configurable.
I removed the "DontDelete" flag accordingly.

* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::arrayProtoToStringFunction):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):

LayoutTests:

* js/script-tests/typedarray-prototype.js: Added.
* js/typedarray-prototype-expected.txt: Added.
* js/typedarray-prototype.html: Added.

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

4 years agoReplace MPAudioVideoRoutingActionSheet with MPAVRoutingSheet.
commit-queue@webkit.org [Wed, 29 Jun 2016 17:42:01 +0000 (17:42 +0000)]
Replace MPAudioVideoRoutingActionSheet with MPAVRoutingSheet.
https://bugs.webkit.org/show_bug.cgi?id=159161
<rdar://problem/26017691>

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-06-29
Reviewed by Sam Weinig.

Source/WebCore:

Replace MPAudioVideoRoutingActionSheet SPI with MPAVRoutingSheet SPI.

* platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit2:

MPAudioVideoRoutingActionSheet is being replaced by MPAVRoutingSheet,
with only minor changes to the interface.

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):

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

4 years agoWebRTC: ice-char can not contain '=' characters for credentials
commit-queue@webkit.org [Wed, 29 Jun 2016 17:36:33 +0000 (17:36 +0000)]
WebRTC: ice-char can not contain '=' characters for credentials
https://bugs.webkit.org/show_bug.cgi?id=159207

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-06-29
Reviewed by Eric Carlson.

Source/WebCore:

Avoid a general calculation to get a base64 without padding which
was wrong in the randomString function. Because each parameter
using the function requires a different setup depending of the
specification and this is not a general API, it is a better
solution to calculate and store the sizes we want to use, comment
them and test them, considering we use base64 to generate the
strings we just need to avoid padding.

Existing test modified to match the correct behavior.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::randomString): Now the size is the one passed.
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
Used different valid values following the sdp parser in each case.

LayoutTests:

Modified the parser to make the regexp similar to the one we have
in WebCore.

* fast/mediastream/resources/sdp-utils.js:
(printComparableSessionDescription):

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

4 years agoLLInt should support other types of prototype GetById caching.
commit-queue@webkit.org [Wed, 29 Jun 2016 16:53:25 +0000 (16:53 +0000)]
LLInt should support other types of prototype GetById caching.
https://bugs.webkit.org/show_bug.cgi?id=158083

Recently, we started supporting prototype load caching for get_by_id
in the LLInt. This patch is expading the caching strategy to enable
cache the prototype accessor and custom acessors.

Similarly to the get_by_id_proto_load bytecode, we are adding new
bytecodes called get_by_id_proto_accessor that uses the calculated
offset of a object to call a getter function and get_by_id_proto_custom
that stores the pointer to the custom function and call them directly
from LowLevelInterpreter.

Patch by Caio Lima <ticaiolima@gmail.com> on 2016-06-29
Reviewed by Keith Miller

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::printGetByIdOp):
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFromLLInt):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

4 years agoCrash when 'input' event handler for input[type=color] changes the input type
ddkilzer@apple.com [Wed, 29 Jun 2016 16:50:21 +0000 (16:50 +0000)]
Crash when 'input' event handler for input[type=color] changes the input type
<https://webkit.org/b/159262>
<rdar://problem/27020404>

Reviewed by Daniel Bates.

Source/WebCore:

Fix based on a Blink change (patch by <tkent@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/a17cb3ecef49a078657524cdeaba33ad2083646c>

Test: fast/forms/color/color-type-change-on-input-crash.html

* html/ColorInputType.cpp:
(WebCore::ColorInputType::didChooseColor): Add EventQueueScope
before setValueFromRenderer() to fix the bug.
* html/HTMLInputElement.h:
(WebCore::HTMLInputElement::setValueFromRenderer): Add comment
about how to use this method.

LayoutTests:

Test based on a Blink change (patch by <tkent@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/a17cb3ecef49a078657524cdeaba33ad2083646c>

* fast/forms/color/color-type-change-on-input-crash-expected.txt: Added.
* fast/forms/color/color-type-change-on-input-crash.html: Added.

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

4 years agoWebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
adam.bergkvist@ericsson.com [Wed, 29 Jun 2016 16:18:38 +0000 (16:18 +0000)]
WebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
https://bugs.webkit.org/show_bug.cgi?id=159132

Reviewed by Eric Carlson.

Source/WebCore:

Use the WEB_RTC build flag instead of MEDIA_STREAM since this event is related to
RTCPeerConnection. Also remove PassRefPtr usage.

Updated existing expected results.

* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEvent::create):
(WebCore::MediaStreamEvent::MediaStreamEvent):
* Modules/mediastream/MediaStreamEvent.h:
* Modules/mediastream/MediaStreamEvent.idl:
* dom/EventNames.in:

LayoutTests:

Update skip lists and expected results to not expect the MediaStreamEvent constructor in
the global scope (it's under the WEB_RTC build flag).

* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
(all above) Remove expected results associated with MediaStreamEvent constructor.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
Skip MediaStreamEvent constructor test on ports that dont't build with WEB_RTC yet.

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

4 years agoREGRESSION(r202337) [WebRTC] Crash when loading html5test.com
adam.bergkvist@ericsson.com [Wed, 29 Jun 2016 16:10:44 +0000 (16:10 +0000)]
REGRESSION(r202337) [WebRTC] Crash when loading html5test.com
https://bugs.webkit.org/show_bug.cgi?id=159145

Reviewed by Eric Carlson.

MediaEndpointPeerConnection uses an implementation of the MediaEndpoint interface to
interact with the port's WebRTC backend. A mock (MockMediaEndpoint) is used for testing.
This change adds an "empty" MediaEndpoint implementation that simplifies the case when a
port builds and tests with MediaEndpointPeerConnection/MockMediaEndpoint, but doesn't have
a "real" MediaEndpoint implementation yet (to use with MiniBrowser).

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
* platform/mediastream/MediaEndpoint.cpp:
(WebCore::EmptyRealtimeMediaSource::create):
(WebCore::EmptyRealtimeMediaSource::EmptyRealtimeMediaSource):
(WebCore::EmptyMediaEndpoint::EmptyMediaEndpoint):
(WebCore::createMediaEndpoint):

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

4 years ago[GTK] Fix the expectations for crypto/subtle tests after r202535.
clopez@igalia.com [Wed, 29 Jun 2016 13:14:49 +0000 (13:14 +0000)]
[GTK] Fix the expectations for crypto/subtle tests after r202535.
https://bugs.webkit.org/show_bug.cgi?id=159260

Unreviewed.

* platform/gtk/TestExpectations: Skip properly the crypto/subtle tests.

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

4 years ago[GTK] Add missing install dependency after r202619
clopez@igalia.com [Wed, 29 Jun 2016 12:21:21 +0000 (12:21 +0000)]
[GTK] Add missing install dependency after r202619
https://bugs.webkit.org/show_bug.cgi?id=156716

Unreviewed.

* gtk/install-dependencies: Missed to add the GLES headers that are needed for building mesa on Debian.

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

4 years agoToo much duplicated code in LayerTreeHosts implementations
carlosgc@webkit.org [Wed, 29 Jun 2016 12:16:41 +0000 (12:16 +0000)]
Too much duplicated code in LayerTreeHosts implementations
https://bugs.webkit.org/show_bug.cgi?id=159144

Reviewed by Žan Doberšek.

There's some code common and duplicated in all current LayerTreeHosts implementations (Gtk, Coordinated, and
ThreadedCoordinated). The thing is even worse in the case of ThreadedCoordinated and Coordinated, where the
former is actually a special case of the later, and it seems like code was copy pasted and then modified to add
ThreadedCoordinated specific code. The problem of that approach, apart from the code duplication, is that common
parts end up diverging too. This patch moves the common parts to the base class LayerTreeHost and makes
ThreadedCoordinatedLayerTreeHost inherit from CoordinatedLayerTreeHost, to share the common code and simply add
the specific one.

* PlatformGTK.cmake:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush):
(WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
(WebKit::CoordinatedLayerTreeHost::invalidate):
(WebKit::CoordinatedLayerTreeHost::sizeDidChange):
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
(WebKit::CoordinatedLayerTreeHost::commitSceneState):
(WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
(WebKit::CoordinatedLayerTreeHost::cancelPendingLayerFlush): Deleted.
(WebKit::CoordinatedLayerTreeHost::forceRepaint): Deleted.
(WebKit::CoordinatedLayerTreeHost::forceRepaintAsync): Deleted.
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer): Deleted.
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): Deleted.
(WebKit::CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Deleted.
(WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
(WebKit::ThreadedCoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::ThreadedCoordinatedLayerTreeHost::sizeDidChange):
(WebKit::ThreadedCoordinatedLayerTreeHost::setVisibleContentsRect):
(WebKit::ThreadedCoordinatedLayerTreeHost::commitSceneState):
(WebKit::ThreadedCoordinatedLayerTreeHost::create): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::scrollNonCompositedContents): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::contentsSizeChanged): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::didChangeViewportProperties): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::didScaleFactorChanged): Deleted.
(WebKit::ThreadedCoordinatedLayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::layerHostDidFlushLayers):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::~LayerTreeHost):
(WebKit::LayerTreeHost::setLayerFlushSchedulingEnabled):
(WebKit::LayerTreeHost::pauseRendering):
(WebKit::LayerTreeHost::resumeRendering):
(WebKit::LayerTreeHost::invalidate):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::layerTreeContext):
(WebKit::LayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush):
(WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplay):
(WebKit::LayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
(WebKit::LayerTreeHost::scrollNonCompositedContents):
(WebKit::LayerTreeHost::graphicsLayerFactory):
(WebKit::LayerTreeHost::contentsSizeChanged):
(WebKit::LayerTreeHost::didChangeViewportProperties):
(WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing):
(WebKit::LayerTreeHost::setViewOverlayRootLayer):
(WebKit::LayerTreeHost::forceRepaintAsync): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::invalidate):
(WebKit::LayerTreeHostGtk::setViewOverlayRootLayer):
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk): Deleted.
(WebKit::LayerTreeHostGtk::setRootCompositingLayer): Deleted.
(WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay): Deleted.
(WebKit::LayerTreeHostGtk::scrollNonCompositedContents): Deleted.
(WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

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

4 years agoFix assertion in debug build when creating the SocketStreamHandle object.
alex@webkit.org [Wed, 29 Jun 2016 11:52:32 +0000 (11:52 +0000)]
Fix assertion in debug build when creating the SocketStreamHandle object.

We have to call relaxAdoptionRequirement to avoid the assertion
when protecting the non-adopted SocketStreamHandle we are
creating. Update to r202370.

Rubber-stamped by Carlos Garcia Campos.

* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):

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

4 years ago[GTK][Wayland] Implement support for running the layout tests under a (virtualized...
clopez@igalia.com [Wed, 29 Jun 2016 10:31:40 +0000 (10:31 +0000)]
[GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
https://bugs.webkit.org/show_bug.cgi?id=156716

Reviewed by Carlos Garcia Campos and Michael Catanzaro.

Tools:

* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland
(parse_args):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.__init__):
(GtkPort._driver_class):
(GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests.
(GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional
platform directory for storing the wayland specific layout test results and expectations for ${port}.
For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific
test expectations file on the GTK port when running the tests with the --wayland command line switch.
Baseline search path: gtk-wayland -> gtk -> wk2 -> generic.
* Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb.
(WestonDriver.check_driver):
(WestonDriver.__init__):
(WestonDriver._start):
* Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver.
(WestonXvfbDriverDisplayTest):
(WestonXvfbDriverDisplayTest.__init__):
(WestonXvfbDriverDisplayTest._xvfb_run):
(WestonDriverTest.make_driver):
(WestonDriverTest.test_start):
* gtk/install-dependencies: Add the new dependencies that are required for either building weston,
or to satisfy the pkg-config check of the new added modules in JHBuild.
* gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland
and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones
provided by the system are already new enough.
Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one.
It was the only way to get the software EGL rasterizer working without depending on user drivers.
Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config
feature to avoid building libdrm when the one provided by the system is new enough.
* gtk/jhbuildrc:
* gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added.
Xorg had no support for searching the DRI drivers on a custom path at runtime.
This patch implements support for that reusing the same variable that we use with Mesa to set the
custom path for the DRI drivers path.

LayoutTests:

* platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations.

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

4 years ago[WebRTC][OWR] Bump gst-plugins-openwebrtc jhbuild version to get scream fixes
commit-queue@webkit.org [Wed, 29 Jun 2016 10:28:27 +0000 (10:28 +0000)]
[WebRTC][OWR] Bump gst-plugins-openwebrtc jhbuild version to get scream fixes
https://bugs.webkit.org/show_bug.cgi?id=159256

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-06-29
Reviewed by Philippe Normand.

We need the last fixes in the repository to make the scream queue
work with apprtc.

* gtk/jhbuild.modules:

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

4 years agoThrow exceptions for invalid number of channels for ConvolverNode
ddkilzer@apple.com [Wed, 29 Jun 2016 10:19:36 +0000 (10:19 +0000)]
Throw exceptions for invalid number of channels for ConvolverNode
<https://webkit.org/b/159238>
<rdar://problem/27020410>

Reviewed by Brent Fulgham.

Source/WebCore:

Fix based on a Blink change (patch by <rtoy@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/0cc26bbb7175aec77910d0b47faf9f8c8a640fe5>

Test: webaudio/convolver-channels.html

* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::setBuffer): Throw an exception for
anything but 1, 2 or 4 channels.

LayoutTests:

Test based on a Blink change (patch by <rtoy@chromium.org>):
<https://chromium.googlesource.com/chromium/src.git/+/0cc26bbb7175aec77910d0b47faf9f8c8a640fe5>

compatibility.js based on a Blink change (patch by <rtoy@google.com>):
<https://chromium.googlesource.com/chromium/src.git/+/f846f5a461d1fcdbe5152898576c125058079ed1>

* webaudio/convolver-channels-expected.txt: Added.
* webaudio/convolver-channels.html: Added.
* webaudio/resources/compatibility.js: Added.

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

4 years agoREGRESSION(r198782, r201043): [image-decoders] Flickering with some animated gif
carlosgc@webkit.org [Wed, 29 Jun 2016 07:23:51 +0000 (07:23 +0000)]
REGRESSION(r198782, r201043): [image-decoders] Flickering with some animated gif
https://bugs.webkit.org/show_bug.cgi?id=159089

Reviewed by Antonio Gomes.

There's some flickering when loading big enough animated gifs running the animation in a loop. The first time it
loads everything is fine, but after the first loop iteration there are several flickering effects, once every
time the animation finishes and some others happening in the middle of the animation loop. The flickering
happens because we fail to render some of the frames, and it has two diferent causes:

 - In r198782, ImageDecoder::createFrameImageAtIndex(), was modified to check first if the image is empty to
return early, and then try to get the frame image from the decoder. This is the aone causing the flickering
always on the first frame after one iteration. It happens because ImageDecoder::size() is always empty at that
point. The first time doesn't happen because the gif is loaded and BitmapImage calls isSizeAvailable() from
BitmapImage::dataChanged(). The isSizeAvailable call makes the gif decoder calculate the size. But for the next
iterations, frames are cached and BitmapImage already has the decoded data so isSizeAvailable is not called
again. When createFrameImageAtIndex() is called again for the first frame, size is empty until the gif decoder
creates the reader again, which happens when frameBufferAtIndex() is called, so after that the size is
available. So, we could call isSizeAvailable before checking the size, or simply do the check after the
frameBufferAtIndex() call as we used to do.

 - In r201043 BitmapImage::destroyDecodedDataIfNecessary() was fixed to use the actual bytes used by the frame
in order to decide whether to destroy decoded data or not. This actually revealed a bug, it didn't happen before
because we were never destroying frames before. The bug is in the gif decoder that doesn't correctly handle the
case of destroying only some of the frames from the buffer cache. The gif decoder is designed to always process the
frames in order, the reader keeps an index of the currently processed frame, so when some frames are read from the
cache, and then we ask the decoder for a not cached frame, the currently processed frame is not in sync with the
actual frame we are asking for, and we end do not processing any frame at all.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::createFrameImageAtIndex): Check the size after calling frameBufferAtIndex().
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::clearFrameBufferCache): Delete the reader when clearing the cache since it's out of sync.

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

4 years ago[GStreamer] Adaptive streaming issues
carlosgc@webkit.org [Wed, 29 Jun 2016 06:33:57 +0000 (06:33 +0000)]
[GStreamer] Adaptive streaming issues
https://bugs.webkit.org/show_bug.cgi?id=144040

Reviewed by Philippe Normand.

There are multiple deadlocks in the web process when HLS content is loaded by GStreamer. It happens because gst
is using several threads to download manifest, fragments, monitor the downloads, etc. To download the fragments
and manifest it always creates the source element in a separate thread, something that is not actually expected
to happen in WebKit source element. Our source element is always scheduling tasks (start, stop, need-data,
enough-data and seek) to the main thread, and those downloads that use the ResourceHandleStreamingClient
(there's no player associated) also happen in the main thread, because libsoup calls all its async callbacks in
the main thread. So, the result is that it can happen that we end up blocking the main thread in a lock until
the download finishes, but the download never finishes because tasks are scheduled in the main thread that is
blocked in a lock. This can be prevented by always using a secondary thread for downloads made by
ResourceHandleStreamingClient, using its own run loop with a different GMainContext so that libsoup sends
callbacks to the right thread. We also had to refactor the tasks a bit, leaving the thread safe parts to be run
in the calling thread always, and only scheduling to the main thread in case of not using
ResourceHandleStreamingClient and only for the non thread safe parts.
This patch also includes r200455 that was rolled out, but it was a perfectly valid workaround for GST bug.

* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::ensureGRef): Consume the floating ref if needed.
* platform/graphics/gstreamer/GRefPtrGStreamer.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init): Check if object is being created in the main thread.
(webKitWebSrcStop): Stop the media resource loader in the main thread and the resource handle streaming in the
current thread.
(webKitWebSrcStart): Start the media resource loader in the main thread and the resource handle streaming in
the current thread.
(webKitWebSrcChangeState): Call webKitWebSrcStart and webKitWebSrcStop in the current thread.
(webKitWebSrcNeedData): Update status in the current thread and notify the media resource loader in the main thread.
(webKitWebSrcEnoughData): Ditto.
(webKitWebSrcSeek): Ditto.
(webKitWebSrcSetMediaPlayer): Add an assert to ensure that source elements used by WebKit are always created in
the main thread.
(ResourceHandleStreamingClient::ResourceHandleStreamingClient): Use a secondary thread to do the download.
(ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Stop the secondary thread.
(ResourceHandleStreamingClient::setDefersLoading): Notify the secondary thread.

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

4 years agoRemove ThreadableLoaderOptions origin
commit-queue@webkit.org [Wed, 29 Jun 2016 06:25:59 +0000 (06:25 +0000)]
Remove ThreadableLoaderOptions origin
https://bugs.webkit.org/show_bug.cgi?id=159221

Patch by Youenn Fablet <youennf@gmail.com> on 2016-06-28
Reviewed by Sam Weinig.

No change of behavior.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadResourceSynchronously): Adding origing parameter.
(WebCore::DocumentThreadableLoader::create): Ditto.
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
(WebCore::DocumentThreadableLoader::redirectReceived): Setting m_origin.
(WebCore::DocumentThreadableLoader::securityOrigin): Checking m_origin.
* loader/DocumentThreadableLoader.h: Adding m_origin member.
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Removing origin.
(WebCore::ThreadableLoaderOption::isolatedCopy): Deleted.
* loader/ThreadableLoader.h: Removing origin parameter and isolatedCopy function.
* loader/WorkerThreadableLoader.cpp:
(WebCore::LoaderTaskOptions::LoaderTaskOptions): Structure to pass loader task options from one thread to another.
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* page/EventSource.cpp:
(WebCore::EventSource::connect): Removing setting of the origin.
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
(WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest): Ditto.

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

4 years agoES6SampleBench should have a harness
fpizlo@apple.com [Wed, 29 Jun 2016 05:55:37 +0000 (05:55 +0000)]
ES6SampleBench should have a harness
https://bugs.webkit.org/show_bug.cgi?id=159246

Reviewed by Saam Barati.

This adds a simple web harness for ES6SampleBench. It runs Air and Basic 10 times for 200
iterations each and reports three metrics:

First iteration: the time it takes for the first iteration to run. This is the first
iteration after the benchmark is loaded into the iframe, so it's representative of what
would happen if one of these workloads only ran for a short time.

Worst 2%: of the last 199 iterations, the average of the worst 2% iterations. If code like
any of these workloads was used in an important event handler, you'd want that code to run
well in the worst case in addition to having great throughput.

Steady state: the total of the last 199 iterations. This is representative of what would
happen if you ran code like this for a long time.

The total score is the geomean of the firstIteration/worstCase/steadyState numbers of the
two benchmarks.

The harness does statistics using Student's T-distribution confidence intervals.

* ES6SampleBench/Basic/benchmark.js:
(Benchmark):
* ES6SampleBench/air_benchmark.js: Added.
* ES6SampleBench/basic_benchmark.js: Added.
* ES6SampleBench/driver.js: Added.
(Driver):
(Driver.prototype.addBenchmark):
(Driver.prototype.start):
(Driver.prototype.reportResult):
(Driver.prototype.reportError):
(Driver.prototype._recomputeSummary.Geomean):
(Driver.prototype._recomputeSummary.Geomean.prototype.add):
(Driver.prototype._recomputeSummary.Geomean.prototype.get result):
(Driver.prototype._recomputeSummary):
(Driver.prototype._iterate):
(Driver.prototype._updateIterations):
* ES6SampleBench/glue.js: Added.
* ES6SampleBench/index.html: Added.
* ES6SampleBench/results.js: Added.
(Results):
(Results.prototype.get benchmark):
(Results.prototype.reset):
(Results.prototype.reportRunning):
(Results.prototype.reportDone):
(Results.prototype.reportResult.averageAbovePercentile):
(Results.prototype.reportResult):
(Results.prototype.reportError):
* ES6SampleBench/stats.js: Added.
(Stats):
(Stats.prototype.reset):
(Stats.prototype.add):
(Stats.prototype.get numIterations):
(Stats.prototype.valueForIteration):
(Stats.get result.tDist):
(Stats.prototype.get result):
(Stats.prototype.toString):
(Stats.prototype._update):
* ES6SampleBench/style.css: Added.
(body):
(body, th, tr):
(h1, h2, h3, h4):
(h1):
(h2):
(h3):
(hr):
(address):
(img):
(.underline):
(ol.loweralpha):
(ol.upperalpha):
(ol.lowerroman):
(ol.upperroman):
(ol.arabic):
(.banner-link:link, .banner-link:visited):
(:link, :visited):
(h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited):
(.anchor:link, .anchor:visited):
(* > .anchor:link, * > .anchor:visited):
(span:hover .anchor):
(a.forbidden, span.forbidden):
(a.missing:hover):
(a.closed:link, a.closed:visited, span.closed):
(pre):
(div.code):
(div.code pre):
(dt):
(dd):
(dd:last-child):
(.site-logo):
(.site-logo .tagline):
(table):
(#contents):
(p):
(p:last-child):
(th):
(td):

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

4 years agoUnreviewed, rolling out r202586 and r202595.
ryanhaddad@apple.com [Wed, 29 Jun 2016 05:04:28 +0000 (05:04 +0000)]
Unreviewed, rolling out r202586 and r202595.
https://bugs.webkit.org/show_bug.cgi?id=159247

These changes broke the iOS build (Requested by ryanhaddad on
#webkit).

Reverted changesets:

"Keep track of when a WKWebView is blank before the initial
non-empty layout"
https://bugs.webkit.org/show_bug.cgi?id=159217
http://trac.webkit.org/changeset/202586

"Try to fix the build."
http://trac.webkit.org/changeset/202595

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-28

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

4 years agoUnreviewed, rolling out r202580.
commit-queue@webkit.org [Wed, 29 Jun 2016 04:49:27 +0000 (04:49 +0000)]
Unreviewed, rolling out r202580.
https://bugs.webkit.org/show_bug.cgi?id=159245

Caused all WKTR tests to fail on GuardMalloc and Production
only for unknown reasons, investigating offline. (Requested by
brrian on #webkit).

Reverted changeset:

"RunLoop::Timer should use constructor templates instead of
class templates"
https://bugs.webkit.org/show_bug.cgi?id=159153
http://trac.webkit.org/changeset/202580

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

4 years agoAX: Add accessibility tests for MathML operators
fred.wang@free.fr [Wed, 29 Jun 2016 04:31:41 +0000 (04:31 +0000)]
AX: Add accessibility tests for MathML operators
https://bugs.webkit.org/show_bug.cgi?id=124836

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Joanmarie Diggs.

We add one test to verify the (sub)roles of MathML operators with various fence and separator
properties. These properties can be set via an explicit attribute or read from the operator
dictionary.

* accessibility/math-mo-fences-and-separators.html: Added.
* platform/gtk/accessibility/math-mo-fences-and-separators-expected.txt: Added.
* platform/mac/accessibility/math-mo-fences-and-separators-expected.txt: Added.

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

4 years agoEnhance shouldNotThrow()/shouldThrow() to accept functions and a descriptive message
ddkilzer@apple.com [Wed, 29 Jun 2016 04:17:36 +0000 (04:17 +0000)]
Enhance shouldNotThrow()/shouldThrow() to accept functions and a descriptive message
<https://webkit.org/b/159232>

Reviewed by Brent Fulgham.

Based on a Blink change (patch by <hongchan@chromium.org>):
<https://src.chromium.org/viewvc/blink?view=revision&revision=192204>

Currently, shouldNotThrow() and shouldThrow() take the following
arguments:

    shouldNotThrow(evalString)
    shouldThrow(evalString, expectedExceptionString)

The challenges with this design are:

    1) The 'evalString' must capture every variable that it
       needs, which means the code can be long, and concatenated
       into a single line.  It would be really nice to be able
       to use an (anonymous) function to capture variables
       instead.
    2) The 'evalString' is literally printed out in the test
       results, which isn't always the most descriptive.  A
       descriptive message would make it clearer what failed.
    3) When changing a shouldThrow() into a shouldNotThrow()
       or copying/pasting code, it's possible to forget to
       remove 'expectedExceptionString' from the function call.

This patch changes the methods to take the following arguments:

    shouldNotThrow(evalString|function [, message])
    shouldThrow(evalString|function, expectedExceptionString [, message])

If 'function' is passed in, then it is invoked instead of
evaluated, and 'message' replaces the literal code in the
pass/fail output.

This patch also adds the global 'didFailSomeTests' variable to
js-test.js, which already exists in js-test-pre.js.  This was
added to js-test-pre.js in r153203 by Oliver Hunt to
LayoutTests/fast/js/resources/js-test-pre.js.

* fast/canvas/webgl/canvas-supports-context-expected.txt:
* fast/canvas/webgl/gl-bind-attrib-location-before-compile-test-expected.txt:
* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
* fast/dom/getElementsByClassName/ASCII-case-insensitive-expected.txt:
* storage/indexeddb/cursor-basics-expected.txt:
* storage/indexeddb/cursor-basics-private-expected.txt:
- Update expected results to include "Some tests fail." since
  some subtests actually do fail during these tests.

* fast/css/parsing-css-lang.html:
* fast/css/parsing-css-matches-1.html:
* fast/css/parsing-css-matches-2.html:
* fast/css/parsing-css-matches-3.html:
* fast/css/parsing-css-matches-4.html:
* fast/css/parsing-css-not-1.html:
* fast/css/parsing-css-not-2.html:
* fast/css/parsing-css-not-3.html:
* fast/css/parsing-css-not-4.html:
* fast/css/parsing-css-nth-child-of-1.html:
* fast/css/parsing-css-nth-child-of-2.html:
* fast/css/parsing-css-nth-last-child-of-1.html:
* fast/css/parsing-css-nth-last-child-of-2.html:
* js/script-tests/arrowfunction-supercall.js:
- Remove expectedExceptionString from shouldNotThrow() calls
  after they were changed from shouldThrow() calls.

* resources/js-test-pre.js:
(shouldNotThrow): Change to invoke first argument if it is a
function, else use eval() as before.  Use second argurment in
place of first argument (if set) when printing results.  NOTE:
Care was taken not to add any lines of code to prevent changes
to test results.
(shouldThrow): Ditto.  Reformat code.
* resources/js-test.js: Declare 'didFailSomeTests'.
(testFailed): Set 'didFailSomeTests' to true when a test fails.
(shouldNotThrow): Same changes as js-test-pre.js.
(shouldThrow): Ditto.
(isSuccessfullyParsed): Output a message if 'didFailSomeTests'
is true.

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

4 years agoWe should not crash there is a finally inside a for-in loop
keith_miller@apple.com [Wed, 29 Jun 2016 04:06:31 +0000 (04:06 +0000)]
We should not crash there is a finally inside a for-in loop
https://bugs.webkit.org/show_bug.cgi?id=159243
<rdar://problem/27018910>

Reviewed by Benjamin Poulain.

Previously we would swap the m_forInContext with an empty vector
then attempt to shrink the size of m_forInContext by the amount
we expected. This meant that if there was more than one ForInContext
on the stack and we wanted to pop exactly one off we would crash.
This patch makes ForInContexts RefCounted so they can be duplicated
into other vectors. It also has ForInContexts copy the entire stack
rather than do the swap that we did before. This makes ForInContexts
work the same as the other contexts.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::pushIndexedForInScope):
(JSC::BytecodeGenerator::pushStructureForInScope):
* bytecompiler/BytecodeGenerator.h:
* tests/stress/finally-for-in.js: Added.
(repeat):
(createSimple):

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

4 years agoRename ChildrenAffectedByActive to StyleAffectedByActive
benjamin@webkit.org [Wed, 29 Jun 2016 04:03:43 +0000 (04:03 +0000)]
Rename ChildrenAffectedByActive to StyleAffectedByActive
https://bugs.webkit.org/show_bug.cgi?id=159187

Reviewed by Antti Koivisto.

Flags named "ChildrenAffectedBy" are used when the invalidation
of children is so crazy that we invalidate the whole parent subtree instead.

That's not the case for :active. It is a straightforward element invalidation.
Consequently, the property is renamed to StyleAffectedByActive.

* dom/Element.cpp:
(WebCore::Element::setActive):
(WebCore::Element::setStyleAffectedByActive):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren):
(WebCore::Element::rareDataStyleAffectedByActive):
(WebCore::Element::setChildrenAffectedByActive): Deleted.
(WebCore::Element::rareDataChildrenAffectedByActive): Deleted.
* dom/Element.h:
(WebCore::Element::styleAffectedByActive):
(WebCore::Element::childrenAffectedByActive): Deleted.
* dom/ElementRareData.h:
(WebCore::ElementRareData::styleAffectedByActive):
(WebCore::ElementRareData::setStyleAffectedByActive):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetDynamicRestyleObservations):
(WebCore::ElementRareData::childrenAffectedByActive): Deleted.
(WebCore::ElementRareData::setChildrenAffectedByActive): Deleted.
* style/StyleRelations.cpp:
(WebCore::Style::commitRelations):

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

4 years agoUse a regex to check if a test step is for JavaScriptCore
commit-queue@webkit.org [Wed, 29 Jun 2016 03:56:18 +0000 (03:56 +0000)]
Use a regex to check if a test step is for JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=159224

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2016-06-28
Reviewed by Geoffrey Garen.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotCombinedQueueView.js:
(BuildbotCombinedQueueView.prototype.update): Replace array membership test with regex test.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype._parseData): Replace array membership test with regex test.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype.appendBuilderQueueStatus): Replace array membership test with regex test.

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

4 years agoUnreviewed, rolling out r202598.
commit-queue@webkit.org [Wed, 29 Jun 2016 03:53:16 +0000 (03:53 +0000)]
Unreviewed, rolling out r202598.
https://bugs.webkit.org/show_bug.cgi?id=159244

broke the build. (Requested by keith_miller on #webkit).

Reverted changeset:

"Try to fix the build."
http://trac.webkit.org/changeset/202598

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

4 years agobtjs no longer accepts optional frame count argument
msaboff@apple.com [Wed, 29 Jun 2016 02:26:54 +0000 (02:26 +0000)]
btjs no longer accepts optional frame count argument
https://bugs.webkit.org/show_bug.cgi?id=159235

Reviewed by Saam Barati.

Fix the detection of optional backtrace-depth parameter to use the length
of the command.

* lldb/lldb_webkit.py:
(btjs):

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

4 years agoUpdate animometer.plan
jonlee@apple.com [Wed, 29 Jun 2016 02:07:15 +0000 (02:07 +0000)]
Update animometer.plan

Rubber-stamped by Said Abou-Hallawa.

* Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan: Update to r202601.

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

4 years agoAssertion failure or crash when accessing let-variable in TDZ with eval with a functi...
sbarati@apple.com [Wed, 29 Jun 2016 02:06:22 +0000 (02:06 +0000)]
Assertion failure or crash when accessing let-variable in TDZ with eval with a function in it that returns let variable
https://bugs.webkit.org/show_bug.cgi?id=158796
<rdar://problem/26984659>

Reviewed by Michael Saboff.

There was a bug where some functions inside of an eval were
omitting a necessary TDZ check. This obviously leads to bad
things because a variable under TDZ is the null pointer.
The eval's bytecode was generated with the correct TDZ set, but
it created all its functions before pushing that TDZ set onto
the stack. That's a mistake. Those functions need to be created with
that TDZ set. The solution is simple, the TDZ set that the eval
is created with needs to be pushed onto the TDZ stack before
the eval creates any functions.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* tests/stress/variable-under-tdz-eval-tricky.js: Added.
(assert):
(throw.new.Error):
(assert.try.underTDZ):

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

4 years agoUpdate focus test
jonlee@apple.com [Wed, 29 Jun 2016 01:52:14 +0000 (01:52 +0000)]
Update focus test
https://bugs.webkit.org/show_bug.cgi?id=159242
rdar://problem/27070007

Reviewed by Dean Jackson.
Provisionally reviewed by Said Abou-Hallawa.

Move previous test to dom suite, and update the test for better reporting of frame rate, although
it uses a different rendering path.

* Animometer/resources/debug-runner/tests.js: Add to dom suite.
* Animometer/tests/dom/focus.html: Copied from PerformanceTests/Animometer/tests/master/focus.html.
* Animometer/tests/dom/resources/focus.js: Copied from PerformanceTests/Animometer/tests/master/resources/focus.js.
* Animometer/tests/master/focus.html: Remove center element.
* Animometer/tests/master/resources/focus.js: Use narrower size range with smaller particles. Remove the
container elements. Inline getBlurValue and getOpacityValue since they are only called once.

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

4 years agoAdd a more interactive version of the demo.
dino@apple.com [Wed, 29 Jun 2016 01:37:53 +0000 (01:37 +0000)]
Add a more interactive version of the demo.

* blog-files/color-gamut/comparison.html: Added.

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

4 years agoImplement "replacement" codec
jiewen_tan@apple.com [Wed, 29 Jun 2016 01:04:05 +0000 (01:04 +0000)]
Implement "replacement" codec
https://bugs.webkit.org/show_bug.cgi?id=159180
<rdar://problem/26015178>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

* web-platform-tests/dom/nodes/Document-characterSet-normalization-expected.txt:

Source/WebCore:

Test: fast/encoding/charset-replacement.html

Add support for "replacement" codec according to the spec:
https://encoding.spec.whatwg.org/#replacement
According to the spec, encoding labels {"csiso2022kr", "hz-gb-2312", "iso-2022-cn",
"iso-2022-cn-ext", "iso-2022-kr"} are used to conduct certain attacks that abuse
a mismatch between encodings supported on the server and the client. Therefore,
they are grouped under the "replacement" codec, which does the following things
to prevent those attacks.
1) Decode: terminates with a single U+FFFD.
2) Encode: treated as UTF-8.

Furthermore, the "replacement" codec is a specification convenience to group those
vulnerable encoding labels. Therefore, it should not be able to use directly.

This change is based on the following Blink changes:
https://codereview.chromium.org/265973003, and
https://codereview.chromium.org/261013007.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/text/TextAllInOne.cpp:
* platform/text/TextCodecReplacement.cpp: Added.
(WebCore::TextCodecReplacement::create):
(WebCore::TextCodecReplacement::TextCodecReplacement):
(WebCore::TextCodecReplacement::registerEncodingNames):
(WebCore::TextCodecReplacement::registerCodecs):
(WebCore::TextCodecReplacement::decode):
* platform/text/TextCodecReplacement.h: Added.
* platform/text/TextEncoding.cpp:
(WebCore::TextEncoding::TextEncoding):
* platform/text/TextEncodingRegistry.cpp:
(WebCore::isReplacementEncoding):
(WebCore::extendTextCodecMaps):
* platform/text/TextEncodingRegistry.h:

LayoutTests:

* fast/encoding/char-decoding-expected.txt:
* fast/encoding/char-decoding.html:
* fast/encoding/char-encoding-expected.txt:
* fast/encoding/char-encoding.html:
* fast/encoding/charset-replacement-expected.txt: Added.
* fast/encoding/charset-replacement.html: Added.

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

4 years ago* UIProcess/API/Cocoa/WKWebView.mm:
timothy_horton@apple.com [Wed, 29 Jun 2016 00:47:35 +0000 (00:47 +0000)]
* UIProcess/API/Cocoa/WKWebView.mm:
(convertSystemLayoutDirection):
(-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:

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

4 years agoREGRESSION (r200946): Improper backtracking from last alternative in sticky patterns
msaboff@apple.com [Wed, 29 Jun 2016 00:38:58 +0000 (00:38 +0000)]
REGRESSION (r200946): Improper backtracking from last alternative in sticky patterns
https://bugs.webkit.org/show_bug.cgi?id=159233

Reviewed by Mark Lam.

Source/JavaScriptCore:

Jump to fail exit code when the last alternative of a sticky pattern fails.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::backtrack):

LayoutTests:

Updated tests.

* js/regexp-sticky-expected.txt:
* js/script-tests/regexp-sticky.js:

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

4 years agoMarking fast/images/composited-animated-gif-outside-viewport.html as flaky on ios...
ryanhaddad@apple.com [Wed, 29 Jun 2016 00:18:34 +0000 (00:18 +0000)]
Marking fast/images/composited-animated-gif-outside-viewport.html as flaky on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=157592

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoTry to fix the build.
timothy_horton@apple.com [Tue, 28 Jun 2016 23:07:07 +0000 (23:07 +0000)]
Try to fix the build.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewInternal.h:

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

4 years agoUnreviewed, fix JSC tests. Air.js moved, and the harness needs to know.
fpizlo@apple.com [Tue, 28 Jun 2016 22:16:19 +0000 (22:16 +0000)]
Unreviewed, fix JSC tests. Air.js moved, and the harness needs to know.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

4 years agoFixed tile height for mobile phone-sized viewports.
jond@apple.com [Tue, 28 Jun 2016 22:12:52 +0000 (22:12 +0000)]
Fixed tile height for mobile phone-sized viewports.
https://bugs.webkit.org/show_bug.cgi?id=159228

Reviewed by Timothy Hatcher.

Prevents cutoff text for featured tiles and prevents overlapping text and controls on the Twitter tile for phone-sized viewports.

* wp-content/themes/webkit/style.css:
(.twitter-tile.text-only .tile-content):
(.tile):

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

4 years agoRemove incorrect comments in HTMLCanvasElement
dino@apple.com [Tue, 28 Jun 2016 22:11:45 +0000 (22:11 +0000)]
Remove incorrect comments in HTMLCanvasElement
https://bugs.webkit.org/show_bug.cgi?id=159229

Reviewed by Sam Weinig.

These comments are wrong.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::probablySupportsContext):
(WebCore::HTMLCanvasElement::getContext): Deleted.

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

4 years agoMove Air.js and Basic into ES6SampleBench
fpizlo@apple.com [Tue, 28 Jun 2016 22:09:06 +0000 (22:09 +0000)]
Move Air.js and Basic into ES6SampleBench

Rubber stamped by Geoffrey Garen.

We want to group our ES6 benchmarks together, and eventually, we want to give them a
common harness.

* Air.js: Removed.
* Air.js/README.md: Removed.
* Air.js/airjs-tests.yaml: Removed.
* Air.js/all.js: Removed.
* Air.js/allocate_stack.js: Removed.
* Air.js/arg.js: Removed.
* Air.js/basic_block.js: Removed.
* Air.js/benchmark.js: Removed.
* Air.js/code.js: Removed.
* Air.js/custom.js: Removed.
* Air.js/frequented_block.js: Removed.
* Air.js/insertion_set.js: Removed.
* Air.js/inst.js: Removed.
* Air.js/liveness.js: Removed.
* Air.js/make_dist.sh: Removed.
* Air.js/opcode.js: Removed.
* Air.js/payload-airjs-ACLj8C.js: Removed.
* Air.js/payload-gbemu-executeIteration.js: Removed.
* Air.js/payload-imaging-gaussian-blur-gaussianBlur.js: Removed.
* Air.js/payload-typescript-scanIdentifier.js: Removed.
* Air.js/reg.js: Removed.
* Air.js/stack_slot.js: Removed.
* Air.js/stress-test.js: Removed.
* Air.js/strip-hash.rb: Removed.
* Air.js/symbols.js: Removed.
* Air.js/test.html: Removed.
* Air.js/test.js: Removed.
* Air.js/tmp.js: Removed.
* Air.js/tmp_base.js: Removed.
* Air.js/util.js: Removed.
* Basic: Removed.
* Basic/ast.js: Removed.
* Basic/basic.js: Removed.
* Basic/benchmark.js: Removed.
* Basic/caseless_map.js: Removed.
* Basic/lexer.js: Removed.
* Basic/number.js: Removed.
* Basic/parser.js: Removed.
* Basic/random.js: Removed.
* Basic/state.js: Removed.
* Basic/test.html: Removed.
* Basic/test.js: Removed.
* Basic/util.js: Removed.
* ES6SampleBench: Added.
* ES6SampleBench/Air: Copied from PerformanceTests/Air.js.
* ES6SampleBench/Basic: Copied from PerformanceTests/Basic.
* Skipped:

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

4 years agoCrashTracer beneath JSC::MarkedBlock::specializedSweep
ggaren@apple.com [Tue, 28 Jun 2016 21:35:37 +0000 (21:35 +0000)]
CrashTracer beneath JSC::MarkedBlock::specializedSweep
https://bugs.webkit.org/show_bug.cgi?id=159223

Reviewed by Saam Barati.

This crash is caused by a media element re-entering JS during the GC
sweep phase.

In theory, other CachedResourceClients in the DOM might also trigger
similar bugs, but our data only implicates the media elements, so this
fix targets them.

* html/HTMLDocument.h: Document has no reason to inherit from
CachedResourceClient. I found this becuase I had to search for all
CachedResourceClients in researching this patch.

* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::invalidate): Delay our call to
stopLoading because it might re-enter JS, and we might have been called
by the GC sweep phase destroying a media element.

* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::invalidate): Ditto.

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

4 years agoREGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS...
nvasilyev@apple.com [Tue, 28 Jun 2016 21:33:10 +0000 (21:33 +0000)]
REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=157869
<rdar://problem/26356520>

Reviewed by Timothy Hatcher.

Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text.
This patch keeps trimming unnecessary whitespace but brings back required line break prefix.

* UserInterface/Models/CSSStyleDeclaration.js:
(WebInspector.CSSStyleDeclaration.prototype.set text):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
Make PrefixWhitespace and SuffixWhitespace public.

(WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
Remove an if conditional as it's always true.

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

4 years agosome Watchpoints' ::fireInternal method will call operations that might GC where...
sbarati@apple.com [Tue, 28 Jun 2016 21:30:20 +0000 (21:30 +0000)]
some Watchpoints' ::fireInternal method will call operations that might GC where the GC will cause the watchpoint itself to destruct
https://bugs.webkit.org/show_bug.cgi?id=159198
<rdar://problem/26302360>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Firing a watchpoint may cause a GC to happen. This GC could destroy various
Watchpoints themselves while they're in the process of firing. It's not safe
for most Watchpoints to be destructed while they're in the middle of firing.
This GC could also destroy the WatchpointSet itself, and it's not in a safe
state to be destroyed. WatchpointSet::fireAllWatchpoints now defers gc for a
while. This prevents a GC from destructing any Watchpoints while they're
in the process of firing. This bug was being hit by the stress GC bots
because we would destruct a particular Watchpoint while it was firing,
and then we would access its field after it had already been destroyed.
This was causing all kinds of weird symptoms. Also, this was easier to
catch when running with guard malloc because the first access after
destruction would lead to a crash.

* bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp:
(JSC::AdaptiveInferredPropertyValueWatchpointBase::fire):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/VariableWriteFireDetail.cpp:
(JSC::VariableWriteFireDetail::dump):
(JSC::VariableWriteFireDetail::touch):
* bytecode/VariableWriteFireDetail.h:
* bytecode/Watchpoint.cpp:
(JSC::WatchpointSet::add):
(JSC::WatchpointSet::fireAllSlow):
(JSC::WatchpointSet::fireAllWatchpoints):
(JSC::InlineWatchpointSet::add):
(JSC::InlineWatchpointSet::fireAll):
(JSC::InlineWatchpointSet::inflateSlow):
* bytecode/Watchpoint.h:
(JSC::WatchpointSet::startWatching):
(JSC::WatchpointSet::fireAll):
(JSC::WatchpointSet::touch):
(JSC::WatchpointSet::invalidate):
(JSC::WatchpointSet::isBeingWatched):
(JSC::WatchpointSet::offsetOfState):
(JSC::WatchpointSet::addressOfSetIsNotEmpty):
(JSC::InlineWatchpointSet::startWatching):
(JSC::InlineWatchpointSet::fireAll):
(JSC::InlineWatchpointSet::invalidate):
(JSC::InlineWatchpointSet::touch):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGOperations.cpp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jit/JITOperations.cpp:
* jsc.cpp:
(WTF::Masquerader::create):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ArrayBufferNeuteringWatchpoint.cpp:
(JSC::ArrayBufferNeuteringWatchpoint::fireAll):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::clear):
* runtime/InferredType.cpp:
(JSC::InferredType::willStoreValueSlow):
(JSC::InferredType::makeTopSlow):
(JSC::InferredType::set):
(JSC::InferredType::removeStructure):
(JSC::InferredType::InferredStructureWatchpoint::fireInternal):
* runtime/InferredValue.cpp:
(JSC::InferredValue::notifyWriteSlow):
(JSC::InferredValue::ValueCleanup::finalizeUnconditionally):
* runtime/InferredValue.h:
(JSC::InferredValue::notifyWrite):
(JSC::InferredValue::invalidate):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::haveABadTime):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTablePutTouchWatchpointSet):
(JSC::symbolTablePutInvalidateWatchpointSet):
* runtime/Structure.cpp:
(JSC::Structure::didCachePropertyReplacement):
(JSC::Structure::startWatchingInternalProperties):
(JSC::DeferredStructureTransitionWatchpointFire::~DeferredStructureTransitionWatchpointFire):
(JSC::DeferredStructureTransitionWatchpointFire::add):
(JSC::Structure::didTransitionFromThisStructure):
(JSC::Structure::prototypeForLookup):
* runtime/StructureInlines.h:
(JSC::Structure::didReplaceProperty):
(JSC::Structure::propertyReplacementWatchpointSet):
* runtime/SymbolTable.h:
(JSC::SymbolTableEntry::isDontEnum):
(JSC::SymbolTableEntry::disableWatching):
* runtime/VM.cpp:
(JSC::VM::addImpureProperty):
(JSC::enableProfilerWithRespectToCount):

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):

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

4 years agoRebaseline http/tests/media/video-auth.html for WK2
ryanhaddad@apple.com [Tue, 28 Jun 2016 21:27:21 +0000 (21:27 +0000)]
Rebaseline http/tests/media/video-auth.html for WK2
https://bugs.webkit.org/show_bug.cgi?id=159195

Unreviewed test gardening.

* platform/wk2/http/tests/media/video-auth-expected.txt:

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

4 years agoKeep track of when a WKWebView is blank before the initial non-empty layout
timothy_horton@apple.com [Tue, 28 Jun 2016 21:10:32 +0000 (21:10 +0000)]
Keep track of when a WKWebView is blank before the initial non-empty layout
https://bugs.webkit.org/show_bug.cgi?id=159217
<rdar://problem/26071766>

Reviewed by Beth Dakin.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _setIsBlankBeforeFirstNonEmptyLayout:]):
(-[WKWebView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):

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

4 years agoJSRopeString should use release asserts, not debug asserts, about substring bounds
fpizlo@apple.com [Tue, 28 Jun 2016 21:03:15 +0000 (21:03 +0000)]
JSRopeString should use release asserts, not debug asserts, about substring bounds
https://bugs.webkit.org/show_bug.cgi?id=159227

Reviewed by Saam Barati.

According to my experiments this change costs nothing.  That's not surprising since the
most common way to construct a rope these days is inlined into the JIT, which does its own
safety checks.  This makes us crash sooner rather than corrupting memory.

* runtime/JSString.h:

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

4 years agoMove the user gesture requirement to the ApplePaySession constructor
andersca@apple.com [Tue, 28 Jun 2016 21:02:52 +0000 (21:02 +0000)]
Move the user gesture requirement to the ApplePaySession constructor
https://bugs.webkit.org/show_bug.cgi?id=159225
rdar://problem/26507267

Reviewed by Tim Horton.

By doing this, clients can do pre-validation before showing the sheet, while we still maintain the user gesture requirement.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::begin): Deleted.

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

4 years agoIterable interfaces should have their related prototype @@iterator property writable
commit-queue@webkit.org [Tue, 28 Jun 2016 20:19:01 +0000 (20:19 +0000)]
Iterable interfaces should have their related prototype @@iterator property writable
https://bugs.webkit.org/show_bug.cgi?id=159211
Source/WebCore:

<rdar://problem/26950766>

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Chris Dumez.

Updating @@iterator property according  http://heycam.github.io/webidl/#es-iterator.

Covered by updated test.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Removing ReadOnly flag from @@iterator property of iterable interfaces.
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodePrototype::finishCreation): Rebasing expectation.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjPrototype::finishCreation): Ditto.

LayoutTests:

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Chris Dumez.

* fast/dom/nodeListIterator-expected.txt:
* fast/dom/nodeListIterator.html: Overriding NodeList @@iterator by Array one and checking everything is fine.

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

4 years ago"Total amount is too big" error message is displaying on clicking Pay button
andersca@apple.com [Tue, 28 Jun 2016 19:50:01 +0000 (19:50 +0000)]
"Total amount is too big" error message is displaying on clicking Pay button
https://bugs.webkit.org/show_bug.cgi?id=159219
rdar://problem/26722110

Reviewed by Tim Horton.

Match the PassKit max amount.

* Modules/applepay/PaymentRequestValidator.cpp:
(WebCore::PaymentRequestValidator::validateTotal):

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

4 years agoPaymentMerchantSession should wrap a PKPaymentMerchantSession
andersca@apple.com [Tue, 28 Jun 2016 19:31:10 +0000 (19:31 +0000)]
PaymentMerchantSession should wrap a PKPaymentMerchantSession
https://bugs.webkit.org/show_bug.cgi?id=159218
rdar://problem/26872118

Reviewed by Tim Horton.

Source/WebCore:

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::completeMerchantValidation):
Use PaymentMerchantSession::fromJS.

(WebCore::createMerchantSession): Deleted.

* Modules/applepay/PaymentCoordinator.h:
PaymentMerchantSession is now a class.

* Modules/applepay/PaymentCoordinatorClient.h:
PaymentMerchantSession is now a class.

* Modules/applepay/PaymentMerchantSession.h:
(WebCore::PaymentMerchantSession::PaymentMerchantSession):
(WebCore::PaymentMerchantSession::~PaymentMerchantSession):
(WebCore::PaymentMerchantSession::pkPaymentMerchantSession):
Store a PKPaymentMerchantSession in a RetainPtr inside the PaymentMerchantSession object.

* Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
(WebCore::PaymentMerchantSession::fromJS):
Convert the JS object to a PKPaymentMerchantSession and return a PaymentMerchantSession that wraps it.

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* bindings/js/Dictionary.h:
(WebCore::Dictionary::initializerObject):
Add new getter.

Source/WebKit2:

* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm:
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::encode):
(IPC::ArgumentCoder<WebCore::PaymentMerchantSession>::decode):
Use NSCoder.

* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
PaymentMerchantSession is now a class.

* UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
PaymentMerchantSession is now a class.

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCompleteMerchantValidation):
Just get the underlying PKPaymentMerchantSession from the PaymentMerchantSession object.
(WebKit::toPKPaymentMerchantSession): Deleted.

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

4 years agoRunLoop::Timer should use constructor templates instead of class templates
bburg@apple.com [Tue, 28 Jun 2016 19:10:31 +0000 (19:10 +0000)]
RunLoop::Timer should use constructor templates instead of class templates
https://bugs.webkit.org/show_bug.cgi?id=159153

Reviewed by Alex Christensen.

Source/JavaScriptCore:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::SendGarbageCollectionEventsTask::SendGarbageCollectionEventsTask):

Source/WebCore:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::WebMediaSessionManager):
* Modules/mediasession/WebMediaSessionManager.h:
* page/WheelEventTestTrigger.cpp:
(WebCore::WheelEventTestTrigger::WheelEventTestTrigger):
* page/WheelEventTestTrigger.h:
* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::TextIndicatorWindow):
* platform/MainThreadSharedTimer.h:
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::ScrollController):
* platform/glib/MainThreadSharedTimerGLib.cpp:
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
* platform/graphics/MediaPlaybackTargetPicker.cpp:
(WebCore::MediaPlaybackTargetPicker::MediaPlaybackTargetPicker):
* platform/graphics/MediaPlaybackTargetPicker.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(VideoRenderRequestScheduler::VideoRenderRequestScheduler):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
(WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy):
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
* platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
* platform/mock/MediaPlaybackTargetPickerMock.cpp:
(WebCore::MediaPlaybackTargetPickerMock::MediaPlaybackTargetPickerMock):
* platform/mock/MediaPlaybackTargetPickerMock.h:
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
* platform/mock/MockRealtimeVideoSource.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):

Source/WebKit2:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
* PluginProcess/PluginProcess.h:
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::ChildProcess):
* Shared/ChildProcess.h:
* Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
* UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:
(API::SharedJSContext::SharedJSContext):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(_WebKitWebViewBasePrivate::_WebKitWebViewBasePrivate):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
* UIProcess/ProcessThrottler.h:
* UIProcess/ResponsivenessTimer.cpp:
(WebKit::ResponsivenessTimer::ResponsivenessTimer):
* UIProcess/ResponsivenessTimer.h:
* UIProcess/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::SnapshotRemovalTracker::SnapshotRemovalTracker):
* UIProcess/VisitedLinkStore.cpp:
(WebKit::VisitedLinkStore::VisitedLinkStore):
* UIProcess/VisitedLinkStore.h:
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::m_hiddenPageThrottlingTimer):
* UIProcess/WebProcessPool.h:
* UIProcess/gtk/GestureController.cpp:
(WebKit::GestureController::DragGesture::DragGesture):
(WebKit::GestureController::ZoomGesture::ZoomGesture):
* UIProcess/gtk/GestureController.h:
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
* UIProcess/mac/ViewGestureController.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::WebLoaderStrategy):
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin):
(WebKit::NetscapePlugin::Timer::Timer):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::NetscapePluginStream):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::RenderFrameScheduler::RenderFrameScheduler):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

Source/WTF:

Refactor RunLoop::Timer to align with WebCore::Timer. Use a constructor
template instead of a class template. Store a bound std::function rather than
a templated member and function. Add a constructor that takes a std::function.

* wtf/RunLoop.h:
(WTF::RunLoop::Timer::Timer):
(WTF::RunLoop::Timer::fired):

Tools:

Remove the RunLoop::Timer class template argument, and pass its constructor
a reference to `this` instead of a pointer to `this`.

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):

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

4 years agoCross-domain video loads do not prompt for authorization.
jer.noble@apple.com [Tue, 28 Jun 2016 18:25:27 +0000 (18:25 +0000)]
Cross-domain video loads do not prompt for authorization.
https://bugs.webkit.org/show_bug.cgi?id=159195
<rdar://problem/26234612>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/media/video-auth.html (modified)

We should prompt for authorization when a cross-origin <video> is embedded
in a web page.

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):

LayoutTests:

Add a cross-origin authorization sub-test.

* http/tests/media/video-auth.html:
* http/tests/media/video-auth-expected.txt:

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

4 years agoREGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a...
rniwa@webkit.org [Tue, 28 Jun 2016 18:20:42 +0000 (18:20 +0000)]
REGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a text field is removed
https://bugs.webkit.org/show_bug.cgi?id=159199
Source/WebCore:

<rdar://problem/26748189>

Reviewed by Alexey Proskuryakov.

The bug was caused by HTMLInputElement's endEditing no longer getting called due to the behavior change.
Preserve the WebKit2 API semantics by manually calling HTMLInputElement::endEditing in setFocusedElement.

Tests: WebKit2TextFieldDidBeginAndEndEditing

* dom/Document.cpp:
(WebCore::Document::setFocusedElement):

Tools:

Reviewed by Alexey Proskuryakov.

Added a test case for removing a text field. Also fixed the flakiness and re-enabled it on Mac.

* TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing.cpp:
* TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing_Bundle.cpp:
* TestWebKitAPI/Tests/WebKit2/input-focus-blur.html: Focus a div upfront to avoid the flakiness from
an input element getting automatically focused on Mac.

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

4 years agoFixed Open Graph meta data and image entries.
jond@apple.com [Tue, 28 Jun 2016 18:12:23 +0000 (18:12 +0000)]
Fixed Open Graph meta data and image entries.
https://bugs.webkit.org/show_bug.cgi?id=159167.

Reviewed by Timothy Hatcher.

This patch addresses Open Graph meta data issues:

- Added a high-resolution PNG of the WebKit logo because Facebook doesn't support SVG images
- Uses the first image of a page or post if not featured image is set
- Article date/time information should not be given for the homepage
- Added Facebook admins as per the Facebook Open Graph debugger

* wp-content/plugins/social-meta.php:
* wp-content/themes/webkit/images/ogimage.png: Added.

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

4 years ago[WK2] Add some logging related to NetworkProcess suspension
cdumez@apple.com [Tue, 28 Jun 2016 18:08:59 +0000 (18:08 +0000)]
[WK2] Add some logging related to NetworkProcess suspension
https://bugs.webkit.org/show_bug.cgi?id=159178

Reviewed by Andreas Kling.

Add some logging related to NetworkProcess suspension to help debug
suspension issues.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::cancelPrepareToSuspend):
(WebKit::NetworkProcess::processDidResume):

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

4 years agoAdd some more UIProcess-side logging related to process assertions
cdumez@apple.com [Tue, 28 Jun 2016 18:08:39 +0000 (18:08 +0000)]
Add some more UIProcess-side logging related to process assertions
https://bugs.webkit.org/show_bug.cgi?id=159188

Reviewed by Andreas Kling.

Add some more UIProcess-side logging related to process assertions
to help debug process suspension issues.

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::updateAssertionNow):
(WebKit::ProcessThrottler::updateAssertion):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateActivityToken):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):
(WebKit::WebProcessProxy::didSetAssertionState):

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

4 years ago[WK2] Do not suppress navigation snapshotting on session restore if we are not naviga...
cdumez@apple.com [Tue, 28 Jun 2016 18:07:05 +0000 (18:07 +0000)]
[WK2] Do not suppress navigation snapshotting on session restore if we are not navigating right away
https://bugs.webkit.org/show_bug.cgi?id=159216
<rdar://problem/27058360>

Reviewed by Andreas Kling.

Do not suppress navigation snapshotting on session restore if we are not navigating
right away. The snapshot we already have may be outdated by the time we actually
navigate (e.g. Because the user scrolled) so we don't want to suppress snapshotting
in this case.

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

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

4 years agoMarking fast/multicol/fixed-stack.html as failing on ios-simulator
ryanhaddad@apple.com [Tue, 28 Jun 2016 17:23:43 +0000 (17:23 +0000)]
Marking fast/multicol/fixed-stack.html as failing on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

4 years agoPhrasing content should be accepted in <mo> elements
fred.wang@free.fr [Tue, 28 Jun 2016 17:01:29 +0000 (17:01 +0000)]
Phrasing content should be accepted in <mo> elements
https://bugs.webkit.org/show_bug.cgi?id=130245

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Brent Fulgham.

Source/WebCore:

After r202420, the RenderMathMLOperator element no longer messes with anonymous block and
text nodes. Hence it is now safe to allow foreign content inside <mo>.

We extend foreign-element-in-token.html to cover the mo case.

* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::childShouldCreateRenderer): Remove the early return for <mo> so
that it accepts phrasing content children.

LayoutTests:

* mathml/presentation/foreign-element-in-token.html: Copy test cases to
check <mo> elements too.
* mathml/presentation/foreign-element-in-token-expected.txt: Add the
expectations for <mo>.

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

4 years agoSierra test expectation gardening.
ap@apple.com [Tue, 28 Jun 2016 16:53:27 +0000 (16:53 +0000)]
Sierra test expectation gardening.

* platform/mac-elcapitan/fast/canvas: Added.
* platform/mac-elcapitan/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt: Copied from platform/mac/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt.
* platform/mac-elcapitan/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Copied from platform/mac/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt.
* platform/mac/fast/canvas/canvas-strokePath-gradient-shadow-expected.txt: Removed.
* platform/mac/fast/canvas/canvas-strokeRect-gradient-shadow-expected.txt: Removed.
Sierra matches cross-platform expectations.

* platform/mac/TestExpectations: Removed expectations for fast/canvas/canvas-strokeRect-alpha-shadow.html

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

4 years agoWebKit::WebPaymentCoordinator leak
andersca@apple.com [Tue, 28 Jun 2016 16:45:12 +0000 (16:45 +0000)]
WebKit::WebPaymentCoordinator leak
https://bugs.webkit.org/show_bug.cgi?id=159168
rdar://problem/26929772

Reviewed by Beth Dakin.

Source/WebCore:

* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::~PaymentCoordinator):
Call paymentCoordinatorDestroyed().

* Modules/applepay/PaymentCoordinatorClient.h:
Rename mainFrameDestroyed to paymentCoordinatorDestroyed().

* loader/EmptyClients.cpp:

Source/WebKit/mac:

Update for WebCore changes.

* WebCoreSupport/WebPaymentCoordinatorClient.h:
* WebCoreSupport/WebPaymentCoordinatorClient.mm:
(WebPaymentCoordinatorClient::paymentCoordinatorDestroyed):
(WebPaymentCoordinatorClient::mainFrameDestroyed): Deleted.

Source/WebKit2:

Update for WebCore changes.

* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::paymentCoordinatorDestroyed):
(WebKit::WebPaymentCoordinator::mainFrameDestroyed): Deleted.
* WebProcess/ApplePay/WebPaymentCoordinator.h:

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

4 years agoRemove anonymous in renderName for all MathML renderers but RenderMathMLOperator
fred.wang@free.fr [Tue, 28 Jun 2016 15:36:13 +0000 (15:36 +0000)]
Remove anonymous in renderName for all MathML renderers but RenderMathMLOperator
https://bugs.webkit.org/show_bug.cgi?id=159114

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Martin Robinson.

After r202420, the only anonymous MathML renderers are the RenderMathMLOperators created by
the mfenced element. Hence we remove the special case for anonymous in the renderName
implementation of most MathML renderers.

No new tests, behavior unchanged.

* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.h:

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

4 years agoWeb Inspector: selectElement.options shows unexpected entries in console (named index...
commit-queue@webkit.org [Tue, 28 Jun 2016 15:33:49 +0000 (15:33 +0000)]
Web Inspector: selectElement.options shows unexpected entries in console (named indexes beyond collection length)
https://bugs.webkit.org/show_bug.cgi?id=159192

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-28
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.arrayIndexPropertyNames):
Start with an empty array because we just push valid indexes.

(InjectedScript.prototype._propertyDescriptors):
Avoid the >100 length requirement, and always treat the
array-like objects the same. The frontend currently
doesn't show named indexes for arrays anyways, so they
would have been unused.

LayoutTests:

* inspector/model/remote-object-get-properties-expected.txt:
* inspector/model/remote-object-get-properties.html:
* inspector/runtime/getProperties-expected.txt:

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

4 years ago[Win] Skip failing INTL test.
pvollan@apple.com [Tue, 28 Jun 2016 15:32:39 +0000 (15:32 +0000)]
[Win] Skip failing INTL test.
https://bugs.webkit.org/show_bug.cgi?id=159141

Reviewed by Brent Fulgham.

INTL is not enabled on Windows.

* tests/stress/intl-constructors-with-proxy.js:
(shouldBe):

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

4 years agoWeb Inspector: QuickConsole should update its selection when RuntimeManager.defaultEx...
bburg@apple.com [Tue, 28 Jun 2016 15:12:10 +0000 (15:12 +0000)]
Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
https://bugs.webkit.org/show_bug.cgi?id=159183

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

Currently, the UI listens for state changes in the Frame tree to decide when to reset
the selected execution context back to its default value. This is no good, because this
should happen even if we have no UI (i.e., testing models only). The UI should simply
display changes to the model rather than driving them based on other model changes.

Move the logic to reset the execution context into RuntimeManager. When the selected
context changes, an event is fired which causes the QuickConsole to rebuild its path components.

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager):
(WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
Fire an event when the execution context actually changes.

(WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
Added. If the selected context was cleared, reset back to default.

* UserInterface/Models/Frame.js:
(WebInspector.Frame.prototype.clearExecutionContexts):
Include the contexts that were cleared so clients can match against them.

* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole):
Use the proper constant name. Both the old and new names evaluated to `undefined`.
No need to keep track of the selected path component, it will always match the
defaultExecutionContextIdentifier in RuntimeManager.

(WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
(WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.

(WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
Special-case for the main frame execution context.

(WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
Remove indirection.

(WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).

(WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
Rebuild when the model changes.

(WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
(WebInspector.QuickConsole.prototype.get executionContextIdentifier):
(WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
Move the fallback selection behavior into RuntimeManager.

(WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
This has been dead code ever since we removed iOS 6 legacy support.

LayoutTests:

Add a new test case for reverting to the top-level execution context when the selected context is destroyed.

* inspector/runtime/change-execution-context-identifier-expected.txt:
* inspector/runtime/change-execution-context-identifier.html:

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

4 years agoWebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins
adam.bergkvist@ericsson.com [Tue, 28 Jun 2016 15:10:50 +0000 (15:10 +0000)]
WebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins
https://bugs.webkit.org/show_bug.cgi?id=158831

Reviewed by Youenn Fablet.

Source/WebCore:

Use @operations slot in RTCPeerConnection type check.

Updated results of existing test.

* Modules/mediastream/RTCPeerConnection.js:
(initializeRTCPeerConnection):
Initialize @operations slot in constructor.
* Modules/mediastream/RTCPeerConnectionInternals.js:
(isRTCPeerConnection):
Use @operations slot in type check.

LayoutTests:

* fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt:
Flip some result lines from FAIL to PASS. Clean out unnecessary tests (third set).

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

4 years agoRemove flakiness expectations for mathml/wbr-in-mroot-crash.html
fred.wang@free.fr [Tue, 28 Jun 2016 15:05:47 +0000 (15:05 +0000)]
Remove flakiness expectations for mathml/wbr-in-mroot-crash.html
https://bugs.webkit.org/show_bug.cgi?id=130353

Unreviewed gardening.

The flakiness seemed to be due to the timeout of mathml/very-large-stretchy-operators.html.
The latter was fixed in r202489, so we update the test expectations.

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:

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

4 years agoIncrease opacity of stretched operators in mo-stacked-glyphs.html
fred.wang@free.fr [Tue, 28 Jun 2016 14:43:39 +0000 (14:43 +0000)]
Increase opacity of stretched operators in mo-stacked-glyphs.html
https://bugs.webkit.org/show_bug.cgi?id=159201

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Martin Robinson.

The reftest mo-stacked-glyphs.html fails with small pixel differences invisible at the naked
eyes. We increase opacity of stretched operators in that test to reduce these differences and
make the test pass.

* mathml/presentation/mo-stacked-glyphs-expected.html: Increase opacity of stretched operators.
* mathml/presentation/mo-stacked-glyphs.html: Ditto.
* platform/gtk/TestExpectations: Remove failure expectation.

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

4 years agoAX: Remove dead code in AccessibilityRenderObject::textUnderElement
fred.wang@free.fr [Tue, 28 Jun 2016 14:16:36 +0000 (14:16 +0000)]
AX: Remove dead code in AccessibilityRenderObject::textUnderElement
https://bugs.webkit.org/show_bug.cgi?id=159205

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-28
Reviewed by Joanmarie Diggs.

RenderMathMLOperator used to destroy its descendants and to replace them with an anonymous
text node wrapped inside anonymous blocks. After r202420, it just behaves as any other token
elements. Hence we remove the code in AccessibilityRenderObject::textUnderElement that was
used to handle this specific render tree structure.

No new tests, already covered by accessibility/math-text.html.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Remove dead code for RenderText and RenderMathMLOperator.

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

4 years ago[GTK] Update expectations for subtle crypto layout tests
mcatanzaro@igalia.com [Tue, 28 Jun 2016 14:10:03 +0000 (14:10 +0000)]
[GTK] Update expectations for subtle crypto layout tests

Unreviewed.

* platform/gtk/TestExpectations:

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

4 years agoTHUMB2 support not correctly detected on Fedora with GCC 6.1.
commit-queue@webkit.org [Tue, 28 Jun 2016 13:25:18 +0000 (13:25 +0000)]
THUMB2 support not correctly detected on Fedora with GCC 6.1.
https://bugs.webkit.org/show_bug.cgi?id=159083

Patch by Tomas Popela <tpopela@redhat.com> on 2016-06-28
Reviewed by Carlos Garcia Campos.

On Fedora 24 with GCC 6.1. the __thumb2__ and __thumb__ are not
defined so the detection of THUMB2 support will fail. Look also
whether the __ARM_ARCH_ISA_THUMB is defined to fix the THUMB2
detection.

* wtf/Platform.h:

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

4 years ago[Win] Custom elements tests are failing.
pvollan@apple.com [Tue, 28 Jun 2016 11:49:21 +0000 (11:49 +0000)]
[Win] Custom elements tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=159139

Reviewed by Alex Christensen.

.:

Enable custom element API on Windows.

* Source/cmake/OptionsWin.cmake:

Source/WebCore:

Fix compile errors after enabling custom element API.

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::addElementDefinition):
* dom/Document.cpp:
(WebCore::createHTMLElementWithNameValidation):
(WebCore::createFallbackHTMLElement):
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* dom/LifecycleCallbackQueue.cpp:
(WebCore::LifecycleQueueItem::LifecycleQueueItem):
(WebCore::LifecycleCallbackQueue::enqueueElementUpgrade):
(WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface):
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::CustomElementConstructionData::CustomElementConstructionData):
(WebCore::HTMLTreeBuilder::insertGenericHTMLElement):
* html/parser/HTMLTreeBuilder.h:

Source/WebKit/win:

Add preference for enabling custom element API.

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::customElementsEnabled):
(WebPreferences::setCustomElementsEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Enable custom element API when running tests.

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):

LayoutTests:

Update test expectations for passing custom elements tests.

* platform/win/TestExpectations:

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

4 years ago[GStreamer] usec rounding is wrong during accurate seeking
philn@webkit.org [Tue, 28 Jun 2016 11:26:07 +0000 (11:26 +0000)]
[GStreamer] usec rounding is wrong during accurate seeking
https://bugs.webkit.org/show_bug.cgi?id=90734

Reviewed by Carlos Garcia Campos.

Use floor() to round the microseconds value, this is more robust
than roundf.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::toGstClockTime):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):

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

4 years ago[GTK] Web audio tests failing since GStreamer 1.6 upgrade
philn@webkit.org [Tue, 28 Jun 2016 11:24:15 +0000 (11:24 +0000)]
[GTK] Web audio tests failing since GStreamer 1.6 upgrade
https://bugs.webkit.org/show_bug.cgi?id=158927

Unreviewed GTK rebaseline of webaudio tests.

* platform/gtk/TestExpectations:
* platform/gtk/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav:
* platform/gtk/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav:
* platform/gtk/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav:
* platform/gtk/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav:

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

4 years ago[GStreamer] improved duration query support in the HTTP source element
philn@webkit.org [Tue, 28 Jun 2016 10:20:59 +0000 (10:20 +0000)]
[GStreamer] improved duration query support in the HTTP source element
https://bugs.webkit.org/show_bug.cgi?id=159204

Reviewed by Carlos Garcia Campos.

When we have the Content-Length value it is possible to infer the TIME
duration in most cases by performing a convert query in the downstream
elements. This is especially useful when the duration query wasn't
managed by the sinks and thus reached the source element.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcQueryWithParent):

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

4 years ago[JSC] Fix build break since r202502 - 2
jh718.park@samsung.com [Tue, 28 Jun 2016 10:15:58 +0000 (10:15 +0000)]
[JSC] Fix build break since r202502 - 2
https://bugs.webkit.org/show_bug.cgi?id=159194

Reviewed by Gyuyoung Kim.

Fix about the error message below.
error: control reaches end of non-void function [-Werror=return-type]

* b3/B3TypeMap.h: add #pragma GCC diagnostic ignored "-Wreturn-type".

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

4 years agohttp/tests/media/hls/video-controller-getStartDate.html is failing on non-PDT time...
commit-queue@webkit.org [Tue, 28 Jun 2016 07:17:26 +0000 (07:17 +0000)]
http/tests/media/hls/video-controller-getStartDate.html is failing on non-PDT time-based computers
https://bugs.webkit.org/show_bug.cgi?id=159134

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Alex Christensen.

* http/tests/media/hls/video-controller-getStartDate-expected.txt: Converting date to UTC string before making the comparison.
* http/tests/media/hls/video-controller-getStartDate.html: Rebasing.

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

4 years ago[JSC] Fix build break since r202502
jh718.park@samsung.com [Tue, 28 Jun 2016 07:10:01 +0000 (07:10 +0000)]
[JSC] Fix build break since r202502
https://bugs.webkit.org/show_bug.cgi?id=159194

Reviewed by Alex Christensen.

Fix about the error message below.
error: control reaches end of non-void function [-Werror=return-type]

* b3/B3TypeMap.h:
(JSC::B3::TypeMap::at): add missing ASSERT_NOT_REACHED().

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

4 years agoUnreviewed EFL Gardening on 28th Jun.
hs85.jeong@samsung.com [Tue, 28 Jun 2016 07:09:19 +0000 (07:09 +0000)]
Unreviewed EFL Gardening on 28th Jun.

* platform/efl/accessibility/aria-hidden-negates-no-visibility-expected.txt: Added.
* platform/efl/accessibility/aria-labelledby-overrides-aria-label-expected.txt: Added.
* platform/efl/accessibility/aria-labelledby-overrides-label-expected.txt: Added.
* platform/efl/accessibility/aria-option-role-expected.txt: Added.
* platform/efl/accessibility/aria-role-on-label-expected.txt: Added.
* platform/efl/accessibility/aria-switch-text-expected.txt:
* platform/efl/accessibility/auto-fill-crash-expected.txt: Added.
* platform/efl/accessibility/empty-image-with-title-expected.txt: Added.
* platform/efl/accessibility/form-control-value-settable-expected.txt: Added.
* platform/efl/accessibility/image-link-expected.txt:
* platform/efl/accessibility/image-map1-expected.txt:
* platform/efl/accessibility/image-map2-expected.txt:
* platform/efl/accessibility/image-with-alt-and-map-expected.txt:
* platform/efl/accessibility/img-fallsback-to-title-expected.txt:
* platform/efl/accessibility/math-fenced-expected.txt: Added.
* platform/efl/accessibility/math-foreign-content-expected.txt: Added.
* platform/efl/accessibility/math-multiscript-attributes-expected.txt:
* platform/efl/accessibility/math-text-expected.txt:
* platform/efl/accessibility/media-element-expected.txt:
* platform/efl/accessibility/meter-element-expected.txt:
* platform/efl/accessibility/radio-button-title-label-expected.txt:
* platform/efl/accessibility/table-detection-expected.txt:

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

4 years agoBinding generator should generate accessors for constructors safely accessed from...
commit-queue@webkit.org [Tue, 28 Jun 2016 07:04:55 +0000 (07:04 +0000)]
Binding generator should generate accessors for constructors safely accessed from JS builtin
https://bugs.webkit.org/show_bug.cgi?id=159087

Patch by Youenn Fablet <youenn@apple.com> on 2016-06-28
Reviewed by Alex Christensen.

Removed constructor private slots direct additions in JSDOMGlobalObject.
Added support for generating the code that will do that.
Advantage of the implementation:
- Private slots will expose constructors that are also publically visible (previously workers had some private slots filled with WebRTC constructors).
- Private slots no longer require the creation of the constructors at window creation time.

Although PublicIdentifier and PrivateIdentifier are both added where needed, the binding generator does not
support the case of a constructor accessible only privately.

Covered by existing test set and adding binding test.

* Modules/mediastream/MediaStream.idl: Marked as PublicIdentifier/PrivateIdentifier.
* Modules/mediastream/MediaStreamTrack.idl: Ditto.
* Modules/mediastream/RTCIceCandidate.idl: Ditto.
* Modules/mediastream/RTCSessionDescription.idl: Ditto.
* Modules/streams/ReadableStream.idl: Ditto.
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::addBuiltinGlobals): Removed unneeded additions.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Added support for private slots for interface constructors marked as
PrivateIdentifier.
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute): Make PublicIdentifier/PrivateIdentifier copied interface attributes.
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp:
(webkit_dom_test_global_object_set_property):
(webkit_dom_test_global_object_get_property):
(webkit_dom_test_global_object_class_init):
(webkit_dom_test_global_object_get_public_and_private_attribute):
(webkit_dom_test_global_object_set_public_and_private_attribute):
* bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectPublicAndPrivateAttribute):
(WebCore::setJSTestGlobalObjectPublicAndPrivateAttribute):
* bindings/scripts/test/ObjC/DOMTestGlobalObject.h:
* bindings/scripts/test/ObjC/DOMTestGlobalObject.mm:
(-[DOMTestGlobalObject publicAndPrivateAttribute]):
(-[DOMTestGlobalObject setPublicAndPrivateAttribute:]):
* bindings/scripts/test/TestGlobalObject.idl:

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

4 years agoREGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect...
jer.noble@apple.com [Tue, 28 Jun 2016 06:44:01 +0000 (06:44 +0000)]
REGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect.html failing on Sierra
https://bugs.webkit.org/show_bug.cgi?id=159172
<rdar://problem/27030025>

Reviewed by Brent Fulgham.

Add a hasSingleSecurityOrigin property to WebCoreNSURLSession that gets updated each time one of that
sessions' tasks receieves a response or a redirect request. Check that property from the MediaPlayerPrivate.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]):
(-[WebCoreNSURLSession dataTaskWithRequest:]):
(-[WebCoreNSURLSession dataTaskWithURL:]):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
(-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):

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

4 years agoCMake build fix.
achristensen@apple.com [Tue, 28 Jun 2016 06:38:32 +0000 (06:38 +0000)]
CMake build fix.

* PlatformMac.cmake:

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

4 years agoUnreviewed, rebaseline test on iOS after r202539.
cdumez@apple.com [Tue, 28 Jun 2016 06:22:46 +0000 (06:22 +0000)]
Unreviewed, rebaseline test on iOS after r202539.

* platform/ios-simulator/fast/dom/event-handler-attributes-expected.txt:

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

4 years agoTest commit. Please ignore.
lforschler@apple.com [Tue, 28 Jun 2016 06:11:21 +0000 (06:11 +0000)]
Test commit. Please ignore.

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