WebKit-https.git
4 years agoPurge PassRefPtr in Modules/webdatabase
gyuyoung.kim@webkit.org [Thu, 30 Jun 2016 08:14:35 +0000 (08:14 +0000)]
Purge PassRefPtr in Modules/webdatabase
https://bugs.webkit.org/show_bug.cgi?id=159255

Reviewed by Benjamin Poulain.

As a step to remove PassRefPtr use, this patch cleans it up in Modules/webdatabase.

Additionally unnecessary spaces and tabs are removed too.

* Modules/webdatabase/ChangeVersionWrapper.cpp:
* Modules/webdatabase/DOMWindowWebDatabase.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
(WebCore::Database::~Database):
(WebCore::Database::scheduleTransaction):
(WebCore::Database::runTransaction):
* Modules/webdatabase/Database.h:
* Modules/webdatabase/DatabaseAuthorizer.cpp:
(WebCore::DatabaseAuthorizer::allowRead):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
(WebCore::DatabaseManager::fullPathForDatabase):
(WebCore::DatabaseManager::detailsForNameAndOrigin):
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseTask.cpp:
(WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::SQLCallbackWrapper):
* Modules/webdatabase/SQLResultSetRowList.h:
* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::SQLStatement):
(WebCore::SQLStatement::sqlError):
(WebCore::SQLStatement::sqlResultSet):
* Modules/webdatabase/SQLStatement.h:
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::create):
(WebCore::SQLTransactionBackend::SQLTransactionBackend):
(WebCore::SQLTransactionBackend::transactionError):
* Modules/webdatabase/SQLTransactionBackend.h:

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

4 years ago[Coordinated Graphics] Move CompositingCoordinator from platform to WebKit2 layer
carlosgc@webkit.org [Thu, 30 Jun 2016 07:32:32 +0000 (07:32 +0000)]
[Coordinated Graphics] Move CompositingCoordinator from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=159209

Reviewed by Žan Doberšek.

Source/WebCore:

Remove CompositingCoordinator and its helper classes from the platform layer.

* platform/TextureMapper.cmake:

Source/WebKit2:

Move CompositingCoordinator and its helper classes to the WebKit2 layer.

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.cpp.
(WebKit::AreaAllocator::AreaAllocator):
(WebKit::AreaAllocator::~AreaAllocator):
(WebKit::AreaAllocator::expand):
(WebKit::AreaAllocator::expandBy):
(WebKit::AreaAllocator::release):
(WebKit::AreaAllocator::overhead):
(WebKit::AreaAllocator::roundAllocation):
(WebKit::GeneralAreaAllocator::GeneralAreaAllocator):
(WebKit::GeneralAreaAllocator::~GeneralAreaAllocator):
(WebKit::GeneralAreaAllocator::freeNode):
(WebKit::GeneralAreaAllocator::expand):
(WebKit::fitsWithin):
(WebKit::GeneralAreaAllocator::allocate):
(WebKit::GeneralAreaAllocator::allocateFromNode):
(WebKit::GeneralAreaAllocator::splitNode):
(WebKit::GeneralAreaAllocator::updateLargestFree):
(WebKit::GeneralAreaAllocator::release):
(WebKit::GeneralAreaAllocator::overhead):
* WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/AreaAllocator.h.
(WebKit::nextPowerOfTwo):
(WebKit::AreaAllocator::size):
(WebKit::AreaAllocator::minimumAllocation):
(WebKit::AreaAllocator::setMinimumAllocation):
(WebKit::AreaAllocator::margin):
(WebKit::AreaAllocator::setMargin):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp.
(WebKit::CompositingCoordinator::CompositingCoordinator):
(WebKit::CompositingCoordinator::~CompositingCoordinator):
(WebKit::CompositingCoordinator::setRootCompositingLayer):
(WebKit::CompositingCoordinator::setViewOverlayRootLayer):
(WebKit::CompositingCoordinator::sizeDidChange):
(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::timestamp):
(WebKit::CompositingCoordinator::syncDisplayState):
(WebKit::CompositingCoordinator::nextAnimationServiceTime):
(WebKit::CompositingCoordinator::clearPendingStateChanges):
(WebKit::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebKit::CompositingCoordinator::createRootLayer):
(WebKit::CompositingCoordinator::syncLayerState):
(WebKit::CompositingCoordinator::createImageBackingIfNeeded):
(WebKit::CompositingCoordinator::createImageBacking):
(WebKit::CompositingCoordinator::updateImageBacking):
(WebKit::CompositingCoordinator::clearImageBackingContents):
(WebKit::CompositingCoordinator::removeImageBacking):
(WebKit::CompositingCoordinator::flushPendingImageBackingChanges):
(WebKit::CompositingCoordinator::notifyAnimationStarted):
(WebKit::CompositingCoordinator::notifyFlushRequired):
(WebKit::CompositingCoordinator::paintContents):
(WebKit::CompositingCoordinator::createGraphicsLayer):
(WebKit::CompositingCoordinator::deviceScaleFactor):
(WebKit::CompositingCoordinator::pageScaleFactor):
(WebKit::CompositingCoordinator::createUpdateAtlas):
(WebKit::CompositingCoordinator::removeUpdateAtlas):
(WebKit::CompositingCoordinator::visibleContentsRect):
(WebKit::CompositingCoordinator::mainContentsLayer):
(WebKit::CompositingCoordinator::setVisibleContentsRect):
(WebKit::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebKit::CompositingCoordinator::detachLayer):
(WebKit::CompositingCoordinator::commitScrollOffset):
(WebKit::CompositingCoordinator::renderNextFrame):
(WebKit::CompositingCoordinator::purgeBackingStores):
(WebKit::CompositingCoordinator::paintToSurface):
(WebKit::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.h.
(WebKit::CompositingCoordinator::clearRootLayer):
(WebKit::CompositingCoordinator::rootLayer):
(WebKit::CompositingCoordinator::state):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.cpp.
(WebKit::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient):
(WebKit::UpdateAtlas::UpdateAtlas):
(WebKit::UpdateAtlas::~UpdateAtlas):
(WebKit::UpdateAtlas::buildLayoutIfNeeded):
(WebKit::UpdateAtlas::didSwapBuffers):
(WebKit::UpdateAtlas::paintOnAvailableBuffer):
* WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/UpdateAtlas.h.
(WebKit::UpdateAtlas::size):
(WebKit::UpdateAtlas::supportsAlpha):
(WebKit::UpdateAtlas::addTimeInactive):
(WebKit::UpdateAtlas::isInactive):
(WebKit::UpdateAtlas::isInUse):

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

4 years agoPass SecurityOrigin as references in CORS check code
commit-queue@webkit.org [Thu, 30 Jun 2016 06:28:58 +0000 (06:28 +0000)]
Pass SecurityOrigin as references in CORS check code
https://bugs.webkit.org/show_bug.cgi?id=159263

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

No change of behavior.

* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
* loader/CrossOriginAccessControl.cpp:
(WebCore::updateRequestForAccessControl):
(WebCore::createAccessControlPreflightRequest):
(WebCore::passesAccessControlCheck):
* loader/CrossOriginAccessControl.h:
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
(WebCore::DocumentThreadableLoader::preflightSuccess):
(WebCore::DocumentThreadableLoader::isAllowedRedirect):
(WebCore::DocumentThreadableLoader::securityOrigin):
* loader/DocumentThreadableLoader.h:
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/LinkLoader.cpp:
(WebCore::preloadIfNeeded):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::requestResource):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::checkCrossOriginAccessControl):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::passesAccessControlCheck):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):

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

4 years agoFix the debug build after r202667
benjamin@webkit.org [Thu, 30 Jun 2016 05:57:22 +0000 (05:57 +0000)]
Fix the debug build after r202667

* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSTypedArrayViewPrototype::finishCreation):
The putDirect was missing the Accessor flag for the GetterSetter.

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

4 years agoAttempt to fix constructor-length.html
benjamin@webkit.org [Thu, 30 Jun 2016 05:10:01 +0000 (05:10 +0000)]
Attempt to fix constructor-length.html

I did a rebaseline of constructor-length.html.
I should have updated the test instead.

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

* js/dom/constructor-length.html:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/ios-simulator/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/win/js/dom/constructor-length-expected.txt:

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

4 years agoWebRTC: Implement MediaEndpointPeerConnection::setConfiguration()
adam.bergkvist@ericsson.com [Thu, 30 Jun 2016 04:49:26 +0000 (04:49 +0000)]
WebRTC: Implement MediaEndpointPeerConnection::setConfiguration()
https://bugs.webkit.org/show_bug.cgi?id=159254

Reviewed by Eric Carlson.

Source/WebCore:

Implement MediaEndpointPeerConnection::setConfiguration() which is the
MediaEndpointPeerConnection implementation of RTCPeerConnection.setConfiguration() [1].

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-setconfiguration

Testing: Updated existing test.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::setConfiguration):
Implemented.
* Modules/mediastream/RTCConfiguration.cpp:
(WebCore::RTCConfiguration::initialize):
* Modules/mediastream/RTCConfiguration.h:
Use shared enums.
* Modules/mediastream/RTCConfiguration.idl:
Remove 'None'/'Public' IceTransportPolicy enum value (removed from WebRTC 1.0).
* platform/mediastream/MediaEndpointConfiguration.cpp:
(WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
* platform/mediastream/MediaEndpointConfiguration.h:
Use shared enums.
(WebCore::MediaEndpointConfiguration::create):
* platform/mediastream/PeerConnectionStates.h: Renamed from Source/WebCore/Modules/mediastream/PeerConnectionStates.h.
Make shared enums accessible to platform objects (currently MediaEndpointConfiguration).

LayoutTests:

Test configuring an RTCPeerConnection object via the constructor and setConfiguration() and
check the resulting configuration with getConfiguration().

* fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt:
* fast/mediastream/RTCPeerConnection-getConfiguration.html:
Remove 'requestIdentity' tests (dictionary member removed from WebRTC 1.0). Add tests for
'bundlePolicy'.
* platform/gtk/TestExpectations:
Unskip above test.

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

4 years agoREGRESSION(200114): Netflix app does not see ChromeCast
msaboff@apple.com [Thu, 30 Jun 2016 04:46:51 +0000 (04:46 +0000)]
REGRESSION(200114): Netflix app does not see ChromeCast
https://bugs.webkit.org/show_bug.cgi?id=159287

Reviewed by Benjamin Poulain.

Change set 200114 changed the behavior of how we check for whether or not we
wrap Objective C init methods in JavaScript constructors.  The prior method
checked the version of JavaScriptCore that was linked with the application.
If the application was not directly linked with JavaScriptCore the prior
method indicated that we shouldn't create constructors.  The new method uses
the SDK the application was compiled with.  Using the new method, an
application compiled with iOS SDK 8.0 or greater would create constructors
and not export init methods to JavaScript.  The problem is that an existing
application that hasn't been recompiled will get a different answer using
the new method.  We need to come up with a method that works in a compatible
way with existing programs, but provides a newly compiled program with the
"is built with SDK N or greater" check.

Added back the prior check of the version of JavaScriptCore the program was
directly linked against.  However we only use this check if we directly linked
with JavaScriptCore.  Otherwise we fall through to check against the SDK the
program was built with.  Changed the iOS SDK version we check
against to be the new version of iOS, iOS 10.

This provides compatible behavior for existing programs.  It may be the case
that some of those programs may require changes when they are rebuilt with the
iOS 10 SDK or later.

* API/JSWrapperMap.mm:
(supportsInitMethodConstructors):

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

4 years agoAdd a link to the proposal.
dino@apple.com [Thu, 30 Jun 2016 04:46:45 +0000 (04:46 +0000)]
Add a link to the proposal.

* demos/spring/index.html:

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

4 years agoAdd the UI JavaScript library to make
dino@apple.com [Thu, 30 Jun 2016 04:39:55 +0000 (04:39 +0000)]
Add the UI JavaScript library to make
other browsers happy.

* demos/spring/dat.gui.min.js: Added.
* demos/spring/index.html:

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

4 years ago[JSC] Minor TypedArray fixes
commit-queue@webkit.org [Thu, 30 Jun 2016 04:24:52 +0000 (04:24 +0000)]
[JSC] Minor TypedArray fixes
https://bugs.webkit.org/show_bug.cgi?id=159286

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

Source/JavaScriptCore:

* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
See https://tc39.github.io/ecma262/#sec-%typedarray%

* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncLength):
See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype.length

(JSC::typedArrayViewProtoGetterFuncToStringTag):
Yep, that's odd.
See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag

(JSC::JSTypedArrayViewPrototype::finishCreation):
See the last paragraph of https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects

LayoutTests:

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

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

4 years agoWeb Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters)
joepeck@webkit.org [Thu, 30 Jun 2016 04:19:42 +0000 (04:19 +0000)]
Web Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters)
https://bugs.webkit.org/show_bug.cgi?id=158334
<rdar://problem/26615366>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(InjectedScript.prototype._getProperties):
(InjectedScript.prototype._propertyDescriptors):
Do not create fake value property descriptors for native accessors
unless requested. This means, getProperties for a native prototype
should return  accessors for native accessors just like it does
for normal non-native accessors (getters/setters).

(InjectedScript.prototype.getProperties):
Do not produce fake value accessors for native accessors.

(InjectedScript.prototype.getDisplayableProperties):
(InjectedScript.RemoteObject.prototype._generatePreview):
Do produce fake value accessors for native accessors.

LayoutTests:

* inspector/runtime/getProperties-expected.txt:
* inspector/runtime/getProperties.html:
Improve output for accessors now that getProperties
returns real accessor descriptors for native accessors
instead of fake value descriptors.

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

4 years agoDemo and JS implementation of our spring() animation
dino@apple.com [Thu, 30 Jun 2016 04:17:33 +0000 (04:17 +0000)]
Demo and JS implementation of our spring() animation
timing function.

* demos/spring/index.html: Added.
* demos/spring/spring.js: Added.
(SpringSolver):
(SpringSolver.prototype.solve):

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

4 years agoJSGlobalLexicalEnvironment needs a toThis implementation
sbarati@apple.com [Thu, 30 Jun 2016 03:55:34 +0000 (03:55 +0000)]
JSGlobalLexicalEnvironment needs a toThis implementation
https://bugs.webkit.org/show_bug.cgi?id=159285

Reviewed by Mark Lam.

This was a huge oversight of my original implementation. It gave users
of the language direct access to the JSGlobalLexicalEnvironment object.

* runtime/JSGlobalLexicalEnvironment.cpp:
(JSC::JSGlobalLexicalEnvironment::isConstVariable):
(JSC::JSGlobalLexicalEnvironment::toThis):
* runtime/JSGlobalLexicalEnvironment.h:
(JSC::JSGlobalLexicalEnvironment::isEmpty):
* tests/stress/global-lexical-environment-to-this.js: Added.
(assert):
(let.f):
(let.fStrict):

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

4 years agoSmall change to wording, and link to the interactive version.
dino@apple.com [Thu, 30 Jun 2016 02:34:22 +0000 (02:34 +0000)]
Small change to wording, and link to the interactive version.

* blog-files/color-gamut/index.html:

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

4 years agoUnreviewed, CMake build fix - 2.
hs85.jeong@samsung.com [Thu, 30 Jun 2016 02:09:16 +0000 (02:09 +0000)]
Unreviewed, CMake build fix - 2.

* PlatformMac.cmake:

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

4 years agoSource/WebCore:
hs85.jeong@samsung.com [Thu, 30 Jun 2016 01:03:27 +0000 (01:03 +0000)]
Source/WebCore:
Unreviewed, CMake build fix.

* PlatformMac.cmake:

Source/WebKit2:
Unreviewed, CMake build fix.

* PlatformMac.cmake:

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

4 years agoUnprefix webkit-playsinline.
jer.noble@apple.com [Thu, 30 Jun 2016 00:12:07 +0000 (00:12 +0000)]
Unprefix webkit-playsinline.
https://bugs.webkit.org/show_bug.cgi?id=159283

Reviewed by Eric Carlson.

Tests: media/video-playsinline.html
       media/video-webkit-playsinline.html

Unprefix the webkit-playsinline content attribute, as an unprefixed version
was added to the HTML spec by <https://github.com/whatwg/html/pull/1444>.
The new 'playsinline' content attribute reflects to a new DOM property of
the same name.

* html/HTMLAttributeNames.in:
* html/HTMLVideoElement.idl:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):

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

4 years agoWeb Inspector: Wrong function name next to scope
joepeck@webkit.org [Wed, 29 Jun 2016 23:59:35 +0000 (23:59 +0000)]
Web Inspector: Wrong function name next to scope
https://bugs.webkit.org/show_bug.cgi?id=158210
<rdar://problem/26543093>

Reviewed by Brian Burg.

Source/JavaScriptCore:

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
Add DebuggerLocation. A helper for describing a unique location.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setConstantRegisters):
When compiled with debug info, add a SymbolTable rare data pointer
back to the CodeBlock. This will be used later to get JSScope debug
info if Web Inspector pauses.

* runtime/SymbolTable.h:
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::cloneScopePart):
(JSC::SymbolTable::prepareForTypeProfiling):
(JSC::SymbolTable::uniqueIDForVariable):
(JSC::SymbolTable::uniqueIDForOffset):
(JSC::SymbolTable::globalTypeSetForOffset):
(JSC::SymbolTable::globalTypeSetForVariable):
Rename rareData and include a CodeBlock pointer.

(JSC::SymbolTable::rareDataCodeBlock):
(JSC::SymbolTable::setRareDataCodeBlock):
Setter and getter for the rare data. It should only be set once.

(JSC::SymbolTable::visitChildren):
Visit the rare data code block if we have one.

* debugger/DebuggerLocation.cpp: Added.
(JSC::DebuggerLocation::DebuggerLocation):
* debugger/DebuggerLocation.h: Added.
(JSC::DebuggerLocation::DebuggerLocation):
Construction from a ScriptExecutable.

* runtime/JSScope.cpp:
(JSC::JSScope::symbolTable):
* runtime/JSScope.h:
* debugger/DebuggerScope.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::name):
(JSC::DebuggerScope::location):
Name and location for a scope. This uses:
JSScope -> SymbolTable -> CodeBlock -> Executable

* inspector/protocol/Debugger.json:
* inspector/InjectedScriptSource.js:
(InjectedScript.CallFrameProxy.prototype._wrapScopeChain):
(InjectedScript.CallFrameProxy._createScopeJson):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::valueForScopeType):
(Inspector::valueForScopeLocation):
(Inspector::JSJavaScriptCallFrame::scopeDescriptions):
(Inspector::JSJavaScriptCallFrame::scopeType): Deleted.
* inspector/JSJavaScriptCallFrame.h:
* inspector/JSJavaScriptCallFramePrototype.cpp:
(Inspector::JSJavaScriptCallFramePrototype::finishCreation):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeDescriptions):
(Inspector::jsJavaScriptCallFramePrototypeFunctionScopeType): Deleted.
Simplify this code to build the objects we will send across the protocol
to descript a Scope.

Source/WebInspectorUI:

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Include new payload data in the construction call.
All the new data is optional, so we gracefully handle
legacy backends.

* UserInterface/Models/ScopeChainNode.js:
(WebInspector.ScopeChainNode):
(WebInspector.ScopeChainNode.prototype.get type):
(WebInspector.ScopeChainNode.prototype.get objects):
(WebInspector.ScopeChainNode.prototype.get name):
(WebInspector.ScopeChainNode.prototype.get location):
(WebInspector.ScopeChainNode.prototype.get hash):
Hash is a rough (name:sourceId:line:column) string for quick comparisons.

(WebInspector.ScopeChainNode.prototype.makeLocalScope):
Make this an action you take on a scope, to avoid having to
do it at construction time, or making it a generic setting.

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
This was wrong before. Move the work to CallFrame
and change it to be correct.

* UserInterface/CallFrame.js:
(WebInspector.CallFrame.prototype.mergedScopeChain):

This transforms the scope chain for a call frame from:

     scope1  scope2  scope3  scope4  scope5  scope6  scope7
      foo     foo     foo     bar     bar      -       -
     Block  Closure Closure Closure Closure   GLE     GBL

To:
     scope1  scope2&3   scope4&5  scope6  scope7
      foo      foo*       bar*      -       -
     Block    Local     Closure    GLE     GBL

Doing a few things:

    - Merge the first two Closure scopes sharing a location.
      These are the "var" and "let" Closure scopes in a function,
      and it is better to present these together in the UI.

    - Mark the first Closure scope within a function (*). When
      this is displayed in the UI, we can provide the name of
      the function: "Closure Scope (name)", and we even have
      location information that we can use to display a goto
      arrow if needed.

    - Make the first Closure scope the Local scope if it
      matches the Call Frame's function name. This lets us
      display the section as "Local Variables".

LayoutTests:

* inspector/debugger/paused-scopes-expected.txt: Added.
* inspector/debugger/paused-scopes.html: Added.
* inspector/debugger/resources/paused-scopes.js: Added.
Test dumps the call frames and scope chains for each call frame
when pausing at different locations in a program. Outputting
the hashes we can see even identically named functions have
different hashes because their location is different.

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

4 years agoFix null dereferencing after r201441
achristensen@apple.com [Wed, 29 Jun 2016 23:28:16 +0000 (23:28 +0000)]
Fix null dereferencing after r201441
https://bugs.webkit.org/show_bug.cgi?id=159282
rdar://problem/27082559

Reviewed by Andreas Kling.

No new tests.  This is reproducible when dragging from regular to high-DPI displays,
and we don't have testing infrastructure for simulating that.

* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::styleResolverChanged):
MediaQueryListListener::queryChanged can mutate the Vector of listeners while we are iterating it.
Copy the Vector of listeners and iterate the copy so we don't go out of bounds.

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

4 years agoWeb Inspector: Uncaught Exception page never shows if exception is thrown while proce...
bburg@apple.com [Wed, 29 Jun 2016 23:05:55 +0000 (23:05 +0000)]
Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
https://bugs.webkit.org/show_bug.cgi?id=159182

Reviewed by Joseph Pecoraro.

Since we catch exceptions raised during the handling of protocol responses and events, there
is no way for these exceptions to trigger the global exception handler that shows the Uncaught
Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.

Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
a free-form map of strings to strings for storing additional information such as message data.
Pass the error and any other relevant details to this entry point, which decides whether to
show the uncaught exception reporter or quietly log the error to Inspector^2 console.

In future patches, I would like to do the following once the common errors are fixed:
 - enable reporting via Uncaught Exception Reporter for all engineering builds
 - move internal console.error call sites to use WebInspector.reportInternalError

* UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
exception reporter sheet or does console.error. It also adds a console.assert that could
cause the debugger to pause if desired.

* UserInterface/Debug/UncaughtExceptionReporter.css:
(.sheet-container): Make the report scrollable now that we could potentially show a lot of text.

* UserInterface/Debug/UncaughtExceptionReporter.js:
(handleError): Also pass along the 'details' poperty.
(formattedEntry): Refactor the code so it additionally prints out the keys and values of
the 'details' property. It does not do any coercions, so callers must convert values to strings.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
(InspectorBackendClass.prototype._dispatchResponseToCallback):
(InspectorBackendClass.prototype._dispatchEvent):
Report uncaught exceptions via WebInspector.reportInternalError.

(InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.

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

4 years agoFactor pending CSS resources into a struct
antti@apple.com [Wed, 29 Jun 2016 23:01:42 +0000 (23:01 +0000)]
Factor pending CSS resources into a struct
https://bugs.webkit.org/show_bug.cgi?id=159268

Reviewed by Andreas Kling.

To fix resource loading related re-entrancy issues in StyleResolver we should move the triggering of
resource loads outside the style resolver. The first step for that is to capture pending resources to a struct.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedImage):
(WebCore::CSSCursorImageValue::cachedOrPendingImage):
* css/CSSCursorImageValue.h:
* css/CSSGradientValue.cpp:
(WebCore::GradientStop::GradientStop):
(WebCore::CSSGradientValue::gradientWithStylesResolved):
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::loadSubimages):
(WebCore::CSSGradientValue::CSSGradientValue):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
(WebCore::CSSImageSetValue::cachedOrPendingImageSet):
* css/CSSImageSetValue.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::State::setParentStyle):
(WebCore::StyleResolver::State::ensurePendingResources):
(WebCore::isAtShadowBoundary):
(WebCore::StyleResolver::cachedOrPendingFromValue):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::setOrPendingFromValue):
(WebCore::StyleResolver::cursorOrPendingFromValue):
(WebCore::filterOperationForType):
(WebCore::StyleResolver::createFilterOperations):
(WebCore::StyleResolver::loadPendingResources):
(WebCore::StyleResolver::MatchedProperties::MatchedProperties):
(WebCore::StyleResolver::loadPendingSVGDocuments): Deleted.
(WebCore::StyleResolver::loadPendingImage): Deleted.
(WebCore::StyleResolver::loadPendingShapeImage): Deleted.
(WebCore::StyleResolver::loadPendingImages): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::rootElementStyle):
(WebCore::StyleResolver::element):
(WebCore::StyleResolver::document):
(WebCore::StyleResolver::documentSettings):
(WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::State::applyPropertyToRegularStyle):
(WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
(WebCore::StyleResolver::State::setFontDirty):
(WebCore::StyleResolver::State::fontDirty):
(WebCore::StyleResolver::State::useSVGZoomRules):
(WebCore::StyleResolver::State::takePendingResources):
(WebCore::StyleResolver::State::cssToLengthConversionData):
(WebCore::StyleResolver::State::cascadeLevel):
(WebCore::StyleResolver::State::setCascadeLevel):
(WebCore::StyleResolver::state):
(WebCore::StyleResolver::State::pendingImageProperties): Deleted.
(WebCore::StyleResolver::State::filtersWithPendingSVGDocuments): Deleted.
* style/StylePendingResources.cpp: Added.
(WebCore::Style::loadPendingImage):
(WebCore::Style::loadPendingImages):
(WebCore::Style::loadPendingSVGFilters):
(WebCore::Style::loadPendingResources):

    Move the functions for triggering the resource loads from StyleResolver.

* style/StylePendingResources.h: Added.

    Add struct for pending resources.

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

4 years agoAdd "type" and "paymentPass" properties in PaymentMethod
andersca@apple.com [Wed, 29 Jun 2016 22:41:15 +0000 (22:41 +0000)]
Add "type" and "paymentPass" properties in PaymentMethod
https://bugs.webkit.org/show_bug.cgi?id=159278
rdar://problem/26999112

Reviewed by Dean Jackson.

* Modules/applepay/cocoa/PaymentMethodCocoa.mm:
(WebCore::toString):
(WebCore::toDictionary):

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

4 years agoWe don't emit TDZ checks for call_eval
sbarati@apple.com [Wed, 29 Jun 2016 22:34:03 +0000 (22:34 +0000)]
We don't emit TDZ checks for call_eval
https://bugs.webkit.org/show_bug.cgi?id=159277
<rdar://problem/27018801>

Reviewed by Benjamin Poulain.

This is a problem if you're trying to call a TDZ variable
that is named 'eval'.

* bytecompiler/NodesCodegen.cpp:
(JSC::EvalFunctionCallNode::emitBytecode):
* tests/stress/variable-named-eval-under-tdz.js: Added.
(shouldThrowTDZ):
(test):
(test.foo):
(throw.new.Error):

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

4 years agoAdd media_icon to WebKit2
bdakin@apple.com [Wed, 29 Jun 2016 22:18:38 +0000 (22:18 +0000)]
Add media_icon to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=159273
-and corresponding-
rdar://problem/27087714

Reviewed by Dean Jackson.

* Resources/mediaIcon.pdf: Added.
* WebKit2.xcodeproj/project.pbxproj:

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

4 years agoAdd support for collecting cumulative LLINT stats via a JSC_llintStatsFile option.
mark.lam@apple.com [Wed, 29 Jun 2016 22:00:02 +0000 (22:00 +0000)]
Add support for collecting cumulative LLINT stats via a JSC_llintStatsFile option.
https://bugs.webkit.org/show_bug.cgi?id=159274

Reviewed by Keith Miller.

Source/JavaScriptCore:

* jsc.cpp:
(main):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
(JSC::LLInt::Data::finalizeStats):
(JSC::LLInt::compareStats):
(JSC::LLInt::Data::dumpStats):
(JSC::LLInt::Data::ensureStats):
(JSC::LLInt::Data::loadStats):
(JSC::LLInt::Data::resetStats):
(JSC::LLInt::Data::saveStats):
* llint/LLIntData.h:
(JSC::LLInt::Data::opcodeStats):
* runtime/Options.cpp:
(JSC::Options::isAvailable):
(JSC::recomputeDependentOptions):
(JSC::Options::initialize):
* runtime/Options.h:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain):

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

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