WebKit-https.git
5 years agoWheel event callback removing the window causes crash in WebCore.
simon.fraser@apple.com [Fri, 19 Feb 2016 22:59:25 +0000 (22:59 +0000)]
Wheel event callback removing the window causes crash in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=150871

Reviewed by Brent Fulgham.

Source/WebCore:

Null check the FrameView before using it, since the iframe may have been removed
from its parent document inside the event handler.

The new test triggered a cross-load side-effect, where wheel event filtering wasn't
reset between page loads. Fix by calling clearLatchedState() in EventHandler::clear(),
which resets the filtering.

Test: fast/events/wheel-event-destroys-frame.html

* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
* page/WheelEventDeltaFilter.cpp:
(WebCore::WheelEventDeltaFilter::filteredDelta):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformCompleteWheelEvent):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):

LayoutTests:

* fast/events/wheel-event-destroys-frame-expected.txt: Added.
* fast/events/wheel-event-destroys-frame.html: Added.

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

5 years ago[ES6] Implement Proxy.[[Call]]
sbarati@apple.com [Fri, 19 Feb 2016 22:56:31 +0000 (22:56 +0000)]
[ES6] Implement Proxy.[[Call]]
https://bugs.webkit.org/show_bug.cgi?id=154425

Reviewed by Mark Lam.

This patch is a straight forward implementation of
Proxy.[[Call]] with respect to section 9.5.12
of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::finishCreation):
(JSC::performProxyGet):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::getOwnPropertySlotByIndex):
(JSC::performProxyCall):
(JSC::ProxyObject::getCallData):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
(JSC::ProxyObject::create):
* tests/es6.yaml:
* tests/stress/proxy-call.js: Added.
(assert):
(throw.new.Error.let.target):
(throw.new.Error.let.handler.apply):
(throw.new.Error):
(assert.let.target):
(assert.let.handler.get apply):
(let.target):
(let.handler.apply):
(i.catch):
(assert.let.handler.apply):

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

5 years ago[Win] [SVG -> OTF Converter] All uses of a font except the first one are invisible
mmaxfield@apple.com [Fri, 19 Feb 2016 22:28:24 +0000 (22:28 +0000)]
[Win] [SVG -> OTF Converter] All uses of a font except the first one are invisible
https://bugs.webkit.org/show_bug.cgi?id=154465

Reviewed by Alex Christensen.

We should re-use the existing converted data if it exists.

Covered by existing tests.

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::font):

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

5 years agoEnhance EditorState to include TypingAttributes, alignment, and color
bdakin@apple.com [Fri, 19 Feb 2016 22:15:09 +0000 (22:15 +0000)]
Enhance EditorState to include TypingAttributes, alignment, and color
https://bugs.webkit.org/show_bug.cgi?id=154424

Reviewed by Dean Jackson and Sam Weinig.

TypingAttributes is already available for iOS and GTK. This patch hooks
that up on Mac as well, and it moves the calculation of that to the shared
file since there is no reason for this to be written in an iOS-only way. This
patch also adds textColor and textAlignment to EditorState, and since those
are not technically platform-specific either, they are also calculated in the
shared editorState() function.

* Shared/EditorState.cpp:
(WebKit::EditorState::PostLayoutData::encode):
(WebKit::EditorState::PostLayoutData::decode):
* Shared/EditorState.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformEditorState):

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

5 years agoComposedTreeIterator traverses normal children for elements with empty shadow root
antti@apple.com [Fri, 19 Feb 2016 21:49:34 +0000 (21:49 +0000)]
ComposedTreeIterator traverses normal children for elements with empty shadow root
https://bugs.webkit.org/show_bug.cgi?id=154464

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/shadow-dom/composed-tree-basic.html

* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::initializeContextStack):
(WebCore::ComposedTreeIterator::traverseShadowRoot):

    If the shadow root is empty continue by skipping the real children.

(WebCore::ComposedTreeIterator::traverseNextInShadowTree):
(WebCore::composedTreeAsText):
(WebCore::ComposedTreeIterator::pushContext): Deleted.
* dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::context):
(WebCore::ComposedTreeIterator::current):
(WebCore::ComposedTreeIterator::traverseNext):
(WebCore::composedTreeChildren):
* testing/Internals.cpp:
(WebCore::Internals::composedTreeAsText):

    Testing support.

* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/shadow-dom/composed-tree-basic-expected.txt: Added.
* fast/shadow-dom/composed-tree-basic.html: Added.

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

5 years agoAnalysis tasks page complains about missing repository but with a wrong name
rniwa@webkit.org [Fri, 19 Feb 2016 21:12:40 +0000 (21:12 +0000)]
Analysis tasks page complains about missing repository but with a wrong name
https://bugs.webkit.org/show_bug.cgi?id=154468

Reviewed by Chris Dumez.

Fixed the bug by using the right variable in the template literal.

* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype._computeRootSetMap): Use querySelector here since Chrome doesn't have
getElementsByClassName on ShadowRoot.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Use name which is the name of
repository here.

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

5 years agoAdopt CachedRawResourceClient::shouldCacheResponse() in MediaResourceLoader and WebCo...
jer.noble@apple.com [Fri, 19 Feb 2016 21:04:56 +0000 (21:04 +0000)]
Adopt CachedRawResourceClient::shouldCacheResponse() in MediaResourceLoader and WebCoreNSURLSession
https://bugs.webkit.org/show_bug.cgi?id=154466

Reviewed by Alex Christensen.

Adopt the new shouldCacheResponse() callback so that byte-range
requests generated by WebCoreNSURLSession are not cached.

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResource::shouldCacheResponse):
* loader/MediaResourceLoader.h:
* platform/graphics/PlatformMediaResourceLoader.h:
(WebCore::PlatformMediaResourceClient::shouldCacheResponse):
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession downloadTaskWithRequest:]):
(-[WebCoreNSURLSession streamTaskWithHostName:port:]):
(-[WebCoreNSURLSession streamTaskWithNetService:]):
(-[WebCoreNSURLSessionDataTask _timingData]):
(-[WebCoreNSURLSessionDataTask resource:sentBytes:totalBytesToBeSent:]):

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

5 years agoRe-sync W3C web-platform-tests' html/dom/interfaces.html
cdumez@apple.com [Fri, 19 Feb 2016 21:02:43 +0000 (21:02 +0000)]
Re-sync W3C web-platform-tests' html/dom/interfaces.html
https://bugs.webkit.org/show_bug.cgi?id=154463

Reviewed by Ryosuke Niwa.

Re-sync W3C web-platform-tests' html/dom/interfaces.html after:
- https://github.com/w3c/web-platform-tests/pull/2588

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces.html:

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

5 years ago[Mac] CORS-compliant videos throw security errors when painting to Canvas
jer.noble@apple.com [Fri, 19 Feb 2016 19:46:19 +0000 (19:46 +0000)]
[Mac] CORS-compliant videos throw security errors when painting to Canvas
https://bugs.webkit.org/show_bug.cgi?id=154188
<rdar://problem/22959556>

Reviewed by Alex Christensen.

Pass the CORS access check results from WebCoreNSURLSession to it's client,
MediaPlayerPrivateAVFoundationObjC.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::didPassCORSAccessCheck): Ask the WebCoreNSURLSession.
* platform/network/cocoa/WebCoreNSURLSession.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession task:didReceiveCORSAccessCheckResult:]): Conditionally set _corsResults.
(-[WebCoreNSURLSession didPassCORSAccessChecks]): Return _corsResults.
(WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed): Call -resource:accessControlCheckFailedWithError:.
(WebCoreNSURLSessionDataTaskClient::loadFailed): Call -resource:loadFailedWithError:.
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Set _response within the delegate queue.
(-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]): Renamed from resourceFinished:
(-[WebCoreNSURLSessionDataTask resource:accessControlCheckFailedWithError:]): Ditto.
(-[WebCoreNSURLSessionDataTask resource:loadFailedWithError:]): Ditto.
(-[WebCoreNSURLSessionDataTask resourceFinished:]): Ditto.

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

5 years agoUnreviewed build fix.
cdumez@apple.com [Fri, 19 Feb 2016 19:12:51 +0000 (19:12 +0000)]
Unreviewed build fix.

* loader/cocoa/SubresourceLoaderCocoa.mm:
(WebCore::SubresourceLoader::willCacheResponse):

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

5 years agoAX: Inconsistency between CharacterOffset and VisiblePostition
n_wang@apple.com [Fri, 19 Feb 2016 18:58:31 +0000 (18:58 +0000)]
AX: Inconsistency between CharacterOffset and VisiblePostition
https://bugs.webkit.org/show_bug.cgi?id=154431

Reviewed by Chris Fleizach.

Source/WebCore:

VoiceOver is not getting the correct text marker from VisiblePostition when
navigating using arrow keys. We should make the CharacterOffset behavior consistent
with VisiblePosition so that the conversion between the two won't create different
text markers.

Changes are covered in the modified tests.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::characterOffsetForTextMarkerData):
(WebCore::AXObjectCache::traverseToOffsetInRange):
(WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
(WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
(WebCore::AXObjectCache::characterOffsetForNodeAndOffset):
(WebCore::AXObjectCache::textMarkerDataForNextCharacterOffset):
(WebCore::AXObjectCache::textMarkerDataForPreviousCharacterOffset):
(WebCore::AXObjectCache::visiblePositionFromCharacterOffset):
(WebCore::AXObjectCache::characterOffsetFromVisiblePosition):
(WebCore::AXObjectCache::accessibilityObjectForTextMarkerData):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::nextCharacterOffset):
(WebCore::AXObjectCache::previousCharacterOffset):
(WebCore::AXObjectCache::startCharacterOffsetOfWord):
(WebCore::AXObjectCache::endCharacterOffsetOfWord):
(WebCore::AXObjectCache::previousWordStartCharacterOffset):
(WebCore::AXObjectCache::previousParagraphStartCharacterOffset):
(WebCore::AXObjectCache::previousSentenceStartCharacterOffset):
* accessibility/AXObjectCache.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):

LayoutTests:

* accessibility/mac/text-marker-word-nav-expected.txt:
* accessibility/mac/text-marker-word-nav.html:
* accessibility/text-marker/text-marker-previous-next.html:

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

5 years agoPurge as much as we can from WKDeprecatedFunctions.cpp
andersca@apple.com [Fri, 19 Feb 2016 18:06:32 +0000 (18:06 +0000)]
Purge as much as we can from WKDeprecatedFunctions.cpp
https://bugs.webkit.org/show_bug.cgi?id=154459

Reviewed by Sam Weinig.

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKArrayIsMutable): Deleted.
(WKPageSetVisibilityState): Deleted.
(WKDictionaryIsMutable): Deleted.
(WKDictionaryAddItem): Deleted.
(WKDictionaryRemoveItem): Deleted.
(WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
(WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
(WKPreferencesSetMultithreadedWebGLEnabled): Deleted.
(WKPreferencesGetMultithreadedWebGLEnabled): Deleted.
(WKPreferencesSetScreenFontSubstitutionEnabled): Deleted.
(WKPreferencesGetScreenFontSubstitutionEnabled): Deleted.
(WKInspectorIsDebuggingJavaScript): Deleted.
(WKInspectorToggleJavaScriptDebugging): Deleted.
(WKInspectorIsProfilingJavaScript): Deleted.
(WKInspectorToggleJavaScriptProfiling): Deleted.
(WKContextGetProcessModel): Deleted.
(WKGraphicsContextGetCGContext): Deleted.
(WKContextGetProcessSuppressionEnabled): Deleted.
(WKContextSetProcessSuppressionEnabled): Deleted.

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

5 years agoAllow CachedRawResource clients to opt out of caching on a per-response basis
jer.noble@apple.com [Fri, 19 Feb 2016 18:05:55 +0000 (18:05 +0000)]
Allow CachedRawResource clients to opt out of caching on a per-response basis
https://bugs.webkit.org/show_bug.cgi?id=154453

Reviewed by Brady Eidson.

For CF or NS networking clients, the system loader will ask whether the client (the
SubResourceLoader in this case) wants the response to be cached. This breaks for byte
range requests due to <rdar://problem/20001985>. Allow the SubresourceLoader to query
its clients, and return null, if they opt out.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::shouldCacheResponse):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedRawResourceClient.h:
(WebCore::CachedRawResourceClient::shouldCacheResponse):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::shouldCacheResponse):
* loader/cocoa/SubresourceLoaderCocoa.mm:
(WebCore::SubresourceLoader::willCacheResponse):

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

5 years agoAdd "databaseProcessDidCrash" to the WKContextClient; Adopt it in WKTR.
beidson@apple.com [Fri, 19 Feb 2016 17:35:52 +0000 (17:35 +0000)]
Add "databaseProcessDidCrash" to the WKContextClient; Adopt it in WKTR.
https://bugs.webkit.org/show_bug.cgi?id=154428

Reviewed by Jer Noble.

Source/WebKit2:

* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextGetDatabaseProcessIdentifier):

* UIProcess/WebContextClient.cpp:
(WebKit::WebContextClient::databaseProcessDidCrash):
* UIProcess/WebContextClient.h:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::databaseProcessCrashed):
(WebKit::WebProcessPool::databaseProcessIdentifier):
* UIProcess/WebProcessPool.h:

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::generatePageConfiguration):
(WTR::TestController::databaseProcessName):
(WTR::TestController::databaseProcessDidCrash):
* WebKitTestRunner/TestController.h:

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

5 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Fri, 19 Feb 2016 16:49:28 +0000 (16:49 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196797

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

5 years ago[CSS Grid Layout Refactoring some layout tests
jfernandez@igalia.com [Fri, 19 Feb 2016 13:25:49 +0000 (13:25 +0000)]
[CSS Grid Layout Refactoring some layout tests
https://bugs.webkit.org/show_bug.cgi?id=154291

Refactored several tests so they use the shared sizing keywords
instead of specific CSS rules.

Reviewed by Sergio Villar Senin.

* fast/css-grid-layout/calc-resolution-grid-item.html:
* fast/css-grid-layout/flex-and-intrinsic-sizes-expected.txt:
* fast/css-grid-layout/flex-and-intrinsic-sizes.html:
* fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html:
* fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html:
* fast/css-grid-layout/grid-align-justify-margin-border-padding.html:
* fast/css-grid-layout/grid-align-justify-overflow.html:
* fast/css-grid-layout/grid-align-justify-stretch.html:
* fast/css-grid-layout/grid-align.html:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-container-margin-border-padding-scrollbar.html:
* fast/css-grid-layout/grid-content-alignment-and-self-alignment.html:
* fast/css-grid-layout/grid-content-alignment-overflow.html:
* fast/css-grid-layout/grid-content-alignment-with-span-vertical-lr.html:
* fast/css-grid-layout/grid-content-alignment-with-span-vertical-rl.html:
* fast/css-grid-layout/grid-content-alignment-with-span.html:
* fast/css-grid-layout/grid-element-change-columns-repaint.html:
* fast/css-grid-layout/grid-element-change-rows-repaint.html:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/grid-gutters-and-alignment.html:
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html:
* fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html:
* fast/css-grid-layout/grid-item-auto-margins-alignment.html:
* fast/css-grid-layout/grid-item-auto-margins-and-stretch.html:
* fast/css-grid-layout/grid-item-auto-sized-align-justify-margin-border-padding.html:
* fast/css-grid-layout/grid-item-change-column-repaint.html:
* fast/css-grid-layout/grid-item-order-paint-order.html:
* fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-expected.txt: Added.
* fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-lr-expected.txt: Added.
* fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-lr.html: Added.
* fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-rl-expected.txt: Added.
* fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding-vertical-rl.html: Added.
* fast/css-grid-layout/grid-item-stretch-with-margins-borders-padding.html: Added.
* fast/css-grid-layout/grid-item-z-index-stacking-context-expected.html:
* fast/css-grid-layout/grid-item-z-index-stacking-context.html:
* fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html:
* fast/css-grid-layout/grid-justify-content-distribution.html:
* fast/css-grid-layout/grid-justify-content-vertical-lr.html:
* fast/css-grid-layout/grid-justify-content-vertical-rl.html:
* fast/css-grid-layout/justify-self-cell.html:
* fast/css-grid-layout/min-width-height-auto-and-margins.html:
* fast/css-grid-layout/minmax-fixed-logical-height-only.html:
* fast/css-grid-layout/minmax-fixed-logical-width-only.html:
* fast/css-grid-layout/minmax-max-content-resolution-columns.html:
* fast/css-grid-layout/minmax-max-content-resolution-rows.html:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid.html:
* fast/css-grid-layout/percent-grid-item-in-percent-grid-track.html:
* fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html:
* fast/css-grid-layout/percent-of-indefinite-track-size.html:
* fast/css-grid-layout/percent-track-breadths-regarding-container-size.html:
* fast/css-grid-layout/place-cell-by-index.html:
* fast/css-grid-layout/resources/grid-alignment.css:
(.alignSelfCenterSafe):
(.alignSelfCenterUnsafe):
(.alignSelfEndSafe):
(.alignSelfEndUnsafe):
(.alignItemsAuto):
(.alignItemsStretch):
(.alignItemsStart):
(.alignItemsEnd):
(.alignItemsCenterSafe):
(.alignItemsCenterUnsafe):
(.alignItemsEndSafe):
(.alignItemsEndUnsafe):
(.justifySelfAuto):
(.justifySelfStretch):
(.justifySelfStart):
(.justifySelfCenter):
(.justifySelfEnd):
(.justifySelfRight):
(.justifySelfLeft):
(.justifySelfFlexStart):
(.justifySelfFlexEnd):
(.justifySelfSelfStart):
(.justifySelfSelfEnd):
(.justifySelfCenterSafe):
(.justifySelfCenterUnsafe):
(.justifyItemsAuto):
(.justifyItemsStretch):
(.justifyItemsStart):
(.justifyItemsCenter):
(.justifyItemsEnd):
(.justifyItemsCenterSafe):
(.justifyItemsCenterUnsafe):
(.justifyItemsEndSafe):
(.justifyItemsEndUnsafe):
(.selfStretch):
(.contentStart):
(.contentCenter):
(.contentEnd):
(.contentCenterSafe):
(.contentCenterUnsafe):
(.contentEndSafe):
(.contentEndUnsafe):
(.contentSpaceBetween):
(.contentSpaceAround):
(.contentSpaceEvenly):
(.contentStretch):
* fast/css-grid-layout/resources/grid.css:
(.verticalRL):
(.verticalLR):
(.horizontalTB):
(.horizontalBT):
(.inline-grid): Deleted.
(.firstRowFirstColumn): Deleted.
(.directionRTL): Deleted.

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

5 years agoBlocked plug-in placeholder is sometimes not shown.
zalan@apple.com [Fri, 19 Feb 2016 11:48:20 +0000 (11:48 +0000)]
Blocked plug-in placeholder is sometimes not shown.
https://bugs.webkit.org/show_bug.cgi?id=154434
<rdar://problem/22584973>

Reviewed by Brent Fulgham.

m_isUnavailablePluginIndicatorHidden was set to false incorrectly as initial value.
It prevented RenderEmbeddedObject from issuing repaint when the plugin indicator
was set to visible (m_isUnavailablePluginIndicatorHidden <- false) the first time.
(The reason why the indicator showed up most of the time was because some renderer
triggered repaint on the view.)

Unable to test.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden):
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject): Deleted.
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed): Deleted.
* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):

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

5 years agoRemove more LLVM related dead code after r196729
ossy@webkit.org [Fri, 19 Feb 2016 11:30:18 +0000 (11:30 +0000)]
Remove more LLVM related dead code after r196729
https://bugs.webkit.org/show_bug.cgi?id=154387

Reviewed by Filip Pizlo.

* Configurations/CompileRuntimeToLLVMIR.xcconfig: Removed.
* Configurations/LLVMForJSC.xcconfig: Removed.
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.props: Removed.
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj: Removed.
* JavaScriptCore.vcxproj/libllvmForJSC/libllvmForJSC.vcxproj.filters: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj:
* disassembler/X86Disassembler.cpp:

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

5 years agoFix pessimizing-move warnings
ossy@webkit.org [Fri, 19 Feb 2016 10:49:00 +0000 (10:49 +0000)]
Fix pessimizing-move warnings
https://bugs.webkit.org/show_bug.cgi?id=154395

Reviewed by Michael Catanzaro.

* platform/graphics/efl/CairoUtilitiesEfl.cpp:
(WebCore::evasObjectFromCairoImageSurface):
* platform/graphics/surfaces/GLTransportSurface.cpp:
(WebCore::GLTransportSurface::createTransportSurface):
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):

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

5 years agoAdd isJSString(JSCell*) variant to avoid Cell->JSValue->Cell conversion
commit-queue@webkit.org [Fri, 19 Feb 2016 10:39:34 +0000 (10:39 +0000)]
Add isJSString(JSCell*) variant to avoid Cell->JSValue->Cell conversion
https://bugs.webkit.org/show_bug.cgi?id=154442

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-19
Reviewed by Saam Barati.

* runtime/JSString.h:
(JSC::isJSString):

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

5 years ago[GStreamer] clean-up various leaks
philn@webkit.org [Fri, 19 Feb 2016 10:30:08 +0000 (10:30 +0000)]
[GStreamer] clean-up various leaks
https://bugs.webkit.org/show_bug.cgi?id=154285

Reviewed by Carlos Garcia Campos.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init): Take full ownership of the GstTask.
* platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
(WTF::adoptGRef): Null pointer support in ASSERTs.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::initializeGStreamerAndRegisterWebKitElements): Take full ownership of the GstElementFactory pointers.
(WebCore::MediaPlayerPrivateGStreamer::isAvailable): Ditto.

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

5 years agoRemove unused SymbolTable::createNameScopeTable
commit-queue@webkit.org [Fri, 19 Feb 2016 10:17:20 +0000 (10:17 +0000)]
Remove unused SymbolTable::createNameScopeTable
https://bugs.webkit.org/show_bug.cgi?id=154443

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-02-19
Reviewed by Saam Barati.

* runtime/SymbolTable.h:

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

5 years agoRevert to dispatching the popstate event synchronously
aestes@apple.com [Fri, 19 Feb 2016 09:29:44 +0000 (09:29 +0000)]
Revert to dispatching the popstate event synchronously
https://bugs.webkit.org/show_bug.cgi?id=153297
rdar://problem/24092294

Reviewed by Brent Fulgham.

Source/WebCore:

r192369 made the popstate event dispatch asynchronously, which matches what the HTML5 spec says to do. However,
due to compatibility regressions we need to revert back to dispatching synchronously. This change reverts
r192369's changes to Document.cpp, but retains the new tests.

Firing popstate synchronously makes both fast/loader/remove-iframe-during-history-navigation-different.html and
fast/loader/remove-iframe-during-history-navigation-same.html crash, because their onpopstate handlers remove
frames from the document that will later be accessed by HistoryController::recursiveGoToItem().

To prevent the crashes, this change does two things:
1. Keep a reference to the current frame inside FrameLoader::loadSameDocumentItem(), since calling
   loadInSameDocument() might otherwise delete it.
2. Handle a null frame when iterating a HistoryItem's child frames in HistoryController::recursiveGoToItem(),
   since calling goToItem() on one frame might cause another frame to be deleted.

Covered by existing tests. fast/loader/stateobjects/popstate-is-asynchronous.html was renamed to
fast/loader/stateobjects/popstate-is-synchronous.html and modified to expect synchronous dispatch.

* dom/Document.cpp:
(WebCore::Document::enqueuePopstateEvent):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadSameDocumentItem):
* loader/HistoryController.cpp:
(WebCore::HistoryController::recursiveGoToItem):

LayoutTests:

Renamed and modified this test to expect synchronous dispatch.

* fast/loader/stateobjects/popstate-is-synchronous-expected.txt: Renamed from LayoutTests/fast/loader/stateobjects/popstate-is-asynchronous-expected.txt.
* fast/loader/stateobjects/popstate-is-synchronous.html: Renamed from LayoutTests/fast/loader/stateobjects/popstate-is-asynchronous.html.

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

5 years agoUnreviewed. Fix GObject DOM bindings API break after r196769.
carlosgc@webkit.org [Fri, 19 Feb 2016 08:47:00 +0000 (08:47 +0000)]
Unreviewed. Fix GObject DOM bindings API break after r196769.

* html/HTMLTextAreaElement.idl:

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

5 years ago[GStreamer] Bump internal jhbuild versions to 1.6.3
philn@webkit.org [Fri, 19 Feb 2016 08:09:57 +0000 (08:09 +0000)]
[GStreamer] Bump internal jhbuild versions to 1.6.3
https://bugs.webkit.org/show_bug.cgi?id=149594

Reviewed by Michael Catanzaro.

.:

* Source/cmake/FindGStreamer.cmake: Check gst-gl version for the latest stable release of GStreamer.

Tools:

* gtk/jhbuild.modules: Bump to GStreamer 1.6.3.
* gtk/patches/gst-plugins-bad-fix-faad2-version-check.patch: Removed.
* gtk/patches/gst-plugins-bad-remove-gnustep-support.patch: Removed.
* gtk/patches/gst-plugins-base-rtp-rtcpbuffer-fix-typo-in-enum.patch: Removed.

LayoutTests:

* platform/gtk/TestExpectations: Skipping new failing tests for now.

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

5 years ago[GTK] Limit the number of tiles according to the visible area
yoon@igalia.com [Fri, 19 Feb 2016 07:27:28 +0000 (07:27 +0000)]
[GTK] Limit the number of tiles according to the visible area
https://bugs.webkit.org/show_bug.cgi?id=126122

Reviewed by Carlos Garcia Campos.

Source/WebCore:

TextureMapperTiledBackingStore creates tiles for whole layer bounds, which
means it creates the huge amount of textures if there is an excessively big
layer.  Not only it wastes the memory and the CPU time, it even can crash GPU
drivers.

This patch modifies TextureMapperTiledBackingStore to take into account the
visible area with a coverage multiplier when creating tiles.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
Set a flag to recalculate the visible area of the layer when there are
geometric changes.
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
(WebCore::GraphicsLayerTextureMapper::markVisibleRectAsDirty):
(WebCore::GraphicsLayerTextureMapper::selfOrAncestorHasActiveTransformAnimation):
(WebCore::GraphicsLayerTextureMapper::computeTransformedVisibleRect):
Compute the inverse transform matrix to map a global visible are to
the local visible area.
(WebCore::clampToContentsRectIfRectIsInfinite):
(WebCore::GraphicsLayerTextureMapper::transformedVisibleRect):
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
In HiDPI, the directly composited image is uploaded to the unscaled
texture to reduce memory usages. So we should apply device scale
factor to render it correctly.
(WebCore::TextureMapperTiledBackingStore::createOrDestroyTilesIfNeeded):
Create tiles which covered by visible rect with a coverage multiplier.

Source/WebKit2:

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize): Because we creates
nonCompositingLayer with a size of current view, we should not apply
the currently visible rect when creating / deleting tiles.
(WebKit::LayerTreeHostGtk::flushPendingLayerChanges): Passes the current
visible rect to the GraphicsLayers.

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

5 years agoExtend HashCountedSet with a method to efficiently set the count of an entry
bfulgham@apple.com [Fri, 19 Feb 2016 07:22:36 +0000 (07:22 +0000)]
Extend HashCountedSet with a method to efficiently set the count of an entry
https://bugs.webkit.org/show_bug.cgi?id=154352

Reviewed by Geoffrey Garen.

Source/WebCore:

Tested by new TestWebKitAPI tests.

* loader/ResourceLoadStatistics.cpp:
(WebCore::decodeHashCountedSet): Update to use new HashCountedSet::add method.

Source/WTF:

Tested by new TestWebKitAPI tests.

Update the HashCountedSet class with a new 'add' method to support efficient initialization of
the count of a given key. Also provide move and pointer template specializations to expand the
types of data that can be used as 'keys' in the HashCountedSet to match the underlying HashMap
implementation.

* wtf/HashCountedSet.h:
(WTF::Traits>::add): Added new overload supporting a supplied count.

Tools:

* TestWebKitAPI/CMakeLists.txt: Add new HashCountedSet test files.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: Added.

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

5 years agoUnreviewed, rolling out r196790.
commit-queue@webkit.org [Fri, 19 Feb 2016 06:56:55 +0000 (06:56 +0000)]
Unreviewed, rolling out r196790.
https://bugs.webkit.org/show_bug.cgi?id=154439

made fast/events/wheelevent-basic-actual.txt fail in WK2
(Requested by alexchristensen on #webkit).

Reverted changeset:

"Wheel event callback removing the window causes crash in
WebCore."
https://bugs.webkit.org/show_bug.cgi?id=150871
http://trac.webkit.org/changeset/196790

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

5 years agoUnreviewed, rolling out r196791.
commit-queue@webkit.org [Fri, 19 Feb 2016 06:53:54 +0000 (06:53 +0000)]
Unreviewed, rolling out r196791.
https://bugs.webkit.org/show_bug.cgi?id=154438

broke windows build (Requested by alexchristensen on #webkit).

Reverted changeset:

"Extend HashCountedSet with a method to efficiently set the
count of an entry"
https://bugs.webkit.org/show_bug.cgi?id=154352
http://trac.webkit.org/changeset/196791

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

5 years ago[JSC] Improve the instruction selection of Select
commit-queue@webkit.org [Fri, 19 Feb 2016 06:42:06 +0000 (06:42 +0000)]
[JSC] Improve the instruction selection of Select
https://bugs.webkit.org/show_bug.cgi?id=154432

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-02-18
Reviewed by Filip Pizlo.

Plenty of code but this patch is pretty dumb:
-On ARM64: use the 3 operand form of CSEL instead of forcing a source
 to be alised to the destination. This gives more freedom to the register
 allocator and it is one less Move to process per Select.
-On x86, introduce a fake 3 operands form and use aggressive aliasing
 to try to alias both sources to the destination.

 If aliasing succeed on the "elseCase", the condition of the Select
 is reverted in the MacroAssembler.

 If no aliasing is possible and we end up with 3 registers, the missing
 move instruction is generated by the MacroAssembler.

 The missing move is generated after testing the values because the destination
 can use the same register as one of the test operand.
 Experimental testing seems to indicate there is no macro-fusion on CMOV,
 there is no measurable cost to having the move there.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::isInvertible):
(JSC::MacroAssembler::invert):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::moveConditionallyDouble):
(JSC::MacroAssemblerARM64::moveConditionallyFloat):
(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::moveConditionally32):
(JSC::MacroAssemblerARM64::moveConditionally64):
(JSC::MacroAssemblerARM64::moveConditionallyTest32):
(JSC::MacroAssemblerARM64::moveConditionallyTest64):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::moveConditionallyDouble):
(JSC::MacroAssemblerX86Common::moveConditionallyFloat):
(JSC::MacroAssemblerX86Common::moveConditionally32):
(JSC::MacroAssemblerX86Common::moveConditionallyTest32):
(JSC::MacroAssemblerX86Common::invert):
(JSC::MacroAssemblerX86Common::isInvertible):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::moveConditionally64):
(JSC::MacroAssemblerX86_64::moveConditionallyTest64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createSelect):
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::shouldTryAliasingDef):
* b3/air/AirOpcode.opcodes:

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

5 years agoWeb Inspector: Styles Sidebar focus jumps when trying to edit a color
commit-queue@webkit.org [Fri, 19 Feb 2016 05:26:53 +0000 (05:26 +0000)]
Web Inspector: Styles Sidebar focus jumps when trying to edit a color
https://bugs.webkit.org/show_bug.cgi?id=154404
<rdar://problem/24725744>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-02-18
Reviewed by Timothy Hatcher.

Clicking an inline swatch in the CSS Rules sidebar causes any focused
editor, if any, to become blurred and therefore fire its handler function.
This causes an issue because when a CodeMirror instance in the styles
sidebar becomes blurred, it is possible for the entire Rules sidebar to
refresh and recreate all of the sections (r187714), meaning that it will
reselect whatever editor was previously selected before the refresh,
causing the swatch popup to be blurred and therefore dismiss.

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

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.createSwatch):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchBeforeClicked):
Add listener for new event and call to delegate function for handling it.

* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Now fires an event before the clicked logic happens, but still after the
click event is fired on the element.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor):
Clears the previously focused editor so when a reset happens no editor
is refocused.

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

5 years agowindow.history / window.navigator should not be replaceable
cdumez@apple.com [Fri, 19 Feb 2016 05:17:32 +0000 (05:17 +0000)]
window.history / window.navigator should not be replaceable
https://bugs.webkit.org/show_bug.cgi?id=154412

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

window.history / window.navigator should not be replaceable as per
the latest HTML specification:
https://html.spec.whatwg.org/multipage/browsers.html#the-window-object

Firefox and Chrome already match the specification. This patch aligns
our behavior.

No new tests, already covered by existing tests.

* page/DOMWindow.idl:

LayoutTests:

Update / rebaseline existing tests now that window.history and
window.navigator are no longer replaceable.

* fast/dom/Window/get-set-properties-expected.txt:
* fast/dom/Window/get-set-properties.html:
* fast/dom/Window/window-property-shadowing-expected.txt:
* fast/dom/Window/window-property-shadowing.html:
* http/tests/history/cross-origin-replace-history-object-child-expected.txt:
* http/tests/history/resources/cross-origin-replaces-history-object-child-iframe.html:
* js/dom/var-declarations-shadowing-expected.txt:
* js/dom/var-declarations-shadowing.html:
* js/getOwnPropertyDescriptor-window-attributes-expected.txt:
* js/getOwnPropertyDescriptor-window-attributes.html:

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

5 years ago[CMake][GTK] Clean up llvm guard in PlatformGTK.cmake
gyuyoung.kim@webkit.org [Fri, 19 Feb 2016 05:12:02 +0000 (05:12 +0000)]
[CMake][GTK] Clean up llvm guard in PlatformGTK.cmake
https://bugs.webkit.org/show_bug.cgi?id=154430

Reviewed by Saam Barati.

llvm isn't used anymore.

* PlatformGTK.cmake: Remove USE_LLVM_DISASSEMBLER guard.

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

5 years agoRevert an unintended change made in the previous commit.
rniwa@webkit.org [Fri, 19 Feb 2016 04:25:12 +0000 (04:25 +0000)]
Revert an unintended change made in the previous commit.

* init-database.sql:

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

5 years agoPerf dashboard should let user cancel pending A/B testing and hide failed ones
rniwa@webkit.org [Fri, 19 Feb 2016 04:18:27 +0000 (04:18 +0000)]
Perf dashboard should let user cancel pending A/B testing and hide failed ones
https://bugs.webkit.org/show_bug.cgi?id=154433

Reviewed by Chris Dumez.

Added a button to hide a test group in the details view (the bottom table) in the analysis task page, and
"Show hidden tests" link to show the hidden test groups on demand. When a test group is hidden, all pending
requests in the group will also be canceled since a common scenario of using this feature is that the user
had triggered an useless A/B testing; e.g. all builds will fail, wrong, etc... We can revisit and add the
capability to just cancel the pending requests and leaving the group visible later if necessary.

Run `ALTER TYPE build_request_status_type ADD VALUE 'canceled';` to add the new type.

* init-database.sql: Added testgroup_hidden column to analysis_test_groups table and added 'canceled'
as a value to build_request_status_type table.
* public/api/test-groups.php:
(format_test_group): Added 'hidden' field in the JSON result.
* public/privileged-api/update-test-group.php:
(main): Added the support for updating testgroup_hidden column. When this column is set to true, also
cancel all pending build requests (by setting its request_status to 'canceled' which will be ignore by
the syncing script).
* public/v3/components/test-group-results-table.js:
(TestGroupResultsTable.prototype.setTestGroup): Reset _renderedTestGroup here so that the next call to
render() will update the table; e.g. when build requests' status change from 'Pending' to 'Canceled'.
* public/v3/models/build-request.js:
(BuildRequest.prototype.hasCompleted): A build request is considered complete/finished if it's canceled.
(BuildRequest.prototype.hasPending): Added.
(BuildRequest.prototype.statusLabel): Handle 'canceled' status.
* public/v3/models/test-group.js:
(TestGroup):
(TestGroup.prototype.updateSingleton): Added to update 'hidden' field.
(TestGroup.prototype.isHidden): Added.
(TestGroup.prototype.hasPending): Added.
(TestGroup.prototype.hasPending): Added.
(TestGroup.prototype.updateHiddenFlag): Added. Uses the privileged API to update testgroup_hidden column.
The JSON API also updates the status of the 'pending' build requests in the group to 'canceled'.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage): Added _showHiddenTestGroups and _filteredTestGroups as instance variables.
(AnalysisTaskPage.prototype._didFetchTestGroups):
(AnalysisTaskPage.prototype._showAllTestGroups): Added.
(AnalysisTaskPage.prototype._didUpdateTestGroupHiddenState): Extracted from _didFetchTestGroups.
(AnalysisTaskPage.prototype._renderTestGroupList): Use the filtered list of test groups to show the list
of test groups. When all test groups are shown, we would first show the hidden ones after the regular ones.
(AnalysisTaskPage.prototype._createTestGroupListItem): Extracted from _renderTestGroupList.
(AnalysisTaskPage.prototype._renderTestGroupDetails): Update the text inside the button to hide the test
group. Also show a warning text that the pending requests will be canceled if there are any.
(AnalysisTaskPage.prototype._hideCurrentTestGroup): Added.
(AnalysisTaskPage.cssTemplate): Updated the style.

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

5 years agoHTMLTableHeaderCellElement.scope should only return known values
cdumez@apple.com [Fri, 19 Feb 2016 02:45:50 +0000 (02:45 +0000)]
HTMLTableHeaderCellElement.scope should only return known values
https://bugs.webkit.org/show_bug.cgi?id=154423
<rdar://problem/24731018>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/reflection-tabular-expected.txt:

Source/WebCore:

HTMLTableHeaderCellElement.scope should only return known values as per:
- https://html.spec.whatwg.org/multipage/tables.html#dom-th-scope

Known values are document here:
- https://html.spec.whatwg.org/multipage/tables.html#attr-th-scope

No new tests, already covered by existing test.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTableHeaderCellElement.cpp: Copied from Source/WebCore/html/HTMLTableHeaderCellElement.h.
(WebCore::HTMLTableHeaderCellElement::scope):
(WebCore::HTMLTableHeaderCellElement::setScope):
* html/HTMLTableHeaderCellElement.h:
* html/HTMLTableHeaderCellElement.idl:

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

5 years agoThe rows in the analysis results table should be expandable
rniwa@webkit.org [Fri, 19 Feb 2016 02:44:34 +0000 (02:44 +0000)]
The rows in the analysis results table should be expandable
https://bugs.webkit.org/show_bug.cgi?id=154427

Reviewed by Chris Dumez.

Added "(Expand)" link between rows that have hidden points. Upon click it inserts the hidden rows.

We insert around five rows at a time when there are hundreds of hidden points but we also avoid leaving
behind expandable rows of less than two rows.

Also fixed a bug in CustomizableTestGroupForm that getElementsById would throw in the shipping Safari
because getElementsById doesn't exist on Element.prototype by using class name instead.

* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer):
(AnalysisResultsViewer.prototype.setCurrentTestGroup): Removed superfluous call to render().
(AnalysisResultsViewer.prototype.setPoints): Always show the start and the end points.
(AnalysisResultsViewer.prototype.buildRowGroups):
(AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups): Add an instance of ExpandableRow which
shows a "(Expand)" link to show hidden rows here.
(AnalysisResultsViewer.prototype._expandBetween): Added. Expands rows between two points.
(AnalysisResultsViewer.cssTemplate): Added rules for "(Expand)" links.
(AnalysisResultsViewer.ExpandableRow): Added.
(AnalysisResultsViewer.ExpandableRow.prototype.resultContent): Added. Overrides what's in the results column.
(AnalysisResultsViewer.ExpandableRow.prototype.heading): Added. Generates "(Expand)" link.

* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype._computeRootSetMap): Use getElementsByClassName instead of
getElementById.
(CustomizableTestGroupForm.prototype._classForLabelAndRepository): Renamed from _idForLabelAndRepository.
(CustomizableTestGroupForm._constructRevisionRadioButtons): Set class name instead of id.

* public/v3/components/results-table.js:
(ResultsTable.prototype.render): Don't generate radio buttons to select a row when root set is missing;
e.g. for rows that show "(Expand)" links.

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

5 years agoExtend HashCountedSet with a method to efficiently set the count of an entry
bfulgham@apple.com [Fri, 19 Feb 2016 01:14:07 +0000 (01:14 +0000)]
Extend HashCountedSet with a method to efficiently set the count of an entry
https://bugs.webkit.org/show_bug.cgi?id=154352

Reviewed by Geoffrey Garen.

Source/WebCore:

Tested by new TestWebKitAPI tests.

* loader/ResourceLoadStatistics.cpp:
(WebCore::decodeHashCountedSet): Update to use new HashCountedSet::add method.

Source/WTF:

Tested by new TestWebKitAPI tests.

Update the HashCountedSet class with a new 'add' method to support efficient initialization of
the count of a given key. Also provide move and pointer template specializations to expand the
types of data that can be used as 'keys' in the HashCountedSet to match the underlying HashMap
implementation.

* wtf/HashCountedSet.h:
(WTF::Traits>::add): Added new overload supporting a supplied count.

Tools:

* TestWebKitAPI/CMakeLists.txt: Add new HashCountedSet test files.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: Added.

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

5 years agoWheel event callback removing the window causes crash in WebCore.
simon.fraser@apple.com [Fri, 19 Feb 2016 01:13:15 +0000 (01:13 +0000)]
Wheel event callback removing the window causes crash in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=150871

Reviewed by Brent Fulgham.
Source/WebCore:

Null check the FrameView before using it, since the iframe may have been removed
from its parent document inside the event handler.

Test: fast/events/wheel-event-destroys-frame.html

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformCompleteWheelEvent):

LayoutTests:

* fast/events/wheel-event-destroys-frame-expected.txt: Added.
* fast/events/wheel-event-destroys-frame.html: Added.

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

5 years agoImplement Proxy.[[HasProperty]]
sbarati@apple.com [Fri, 19 Feb 2016 01:07:37 +0000 (01:07 +0000)]
Implement Proxy.[[HasProperty]]
https://bugs.webkit.org/show_bug.cgi?id=154313

Reviewed by Filip Pizlo.

This patch is a straight forward implementation of
Proxy.[[HasProperty]] with respect to section 9.5.7
of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-hasproperty-p

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::getOwnPropertySlotCommon):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-basic.js:
(assert):
(let.handler.has):
* tests/stress/proxy-has-property.js: Added.
(assert):
(throw.new.Error.let.handler.get has):
(throw.new.Error):
(assert.let.handler.has):
(let.handler.has):
(getOwnPropertyDescriptor):
(i.catch):

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

5 years agoWeb Inspector: Add Native Parameter Lists to Console prototype functions
commit-queue@webkit.org [Fri, 19 Feb 2016 01:03:13 +0000 (01:03 +0000)]
Web Inspector: Add Native Parameter Lists to Console prototype functions
https://bugs.webkit.org/show_bug.cgi?id=154419
<rdar://problem/24730314>

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

* UserInterface/Models/NativeFunctionParameters.js:

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

5 years agoStatistically significant A/B testing results should be color coded in details view
rniwa@webkit.org [Fri, 19 Feb 2016 00:51:46 +0000 (00:51 +0000)]
Statistically significant A/B testing results should be color coded in details view
https://bugs.webkit.org/show_bug.cgi?id=154414

Reviewed by Chris Dumez.

Color code the statistically significant comparisions in TestGroupResultsTable as done in the analysis
results viewer.

* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.cssTemplate): Build fix after r196768.
* public/v3/components/test-group-results-table.js:
(TestGroupResultsTable.prototype.buildRowGroups): Add the status as a class name.
(TestGroupResultsTable.cssTemplate): Added styles to color-code statistically significant results.

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

5 years agoModern IDB: Fix IDBGetResult encoder/decoder.
beidson@apple.com [Fri, 19 Feb 2016 00:42:01 +0000 (00:42 +0000)]
Modern IDB: Fix IDBGetResult encoder/decoder.
https://bugs.webkit.org/show_bug.cgi?id=154421

Reviewed by Alex Christensen.

No new tests, as Modern IDB is still disabled for WK2.

But if you manually enable it, "Basic IndexedDB Seems To Work"

Source/WebCore:

* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::encode):
(WebCore::IDBGetResult::decode):

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBGetResult>::encode): Deleted.
(IPC::ArgumentCoder<IDBGetResult>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:

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

5 years agoProxy's don't properly handle Symbols as PropertyKeys.
sbarati@apple.com [Fri, 19 Feb 2016 00:27:15 +0000 (00:27 +0000)]
Proxy's don't properly handle Symbols as PropertyKeys.
https://bugs.webkit.org/show_bug.cgi?id=154385

Reviewed by Mark Lam and Yusuke Suzuki.

We were converting all PropertyKeys to strings, even when
the PropertyName was a Symbol. In the spec, PropertyKeys are
either a Symbol or a String. We now respect that in Proxy.[[Get]] and
Proxy.[[GetOwnProperty]].

* runtime/Completion.cpp:
(JSC::profiledEvaluate):
(JSC::createSymbolForEntryPointModule):
(JSC::identifierToJSValue): Deleted.
* runtime/Identifier.h:
(JSC::parseIndex):
* runtime/IdentifierInlines.h:
(JSC::Identifier::fromString):
(JSC::identifierToJSValue):
(JSC::identifierToSafePublicJSValue):
* runtime/ProxyObject.cpp:
(JSC::performProxyGet):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
* tests/es6.yaml:
* tests/stress/proxy-basic.js:
(let.handler.getOwnPropertyDescriptor):

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

5 years agoAddressing post-review comments after r196747.
mmaxfield@apple.com [Fri, 19 Feb 2016 00:03:58 +0000 (00:03 +0000)]
Addressing post-review comments after r196747.

Unreviewed.

* css/CSSFontFaceSet.h:
* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::size):
(WebCore::FontFaceSet::clear):
* css/FontFaceSet.h:

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

5 years ago.:
andersca@apple.com [Fri, 19 Feb 2016 00:01:32 +0000 (00:01 +0000)]
.:
Get rid of the "All Source (target WebProcess)" scheme.

Rubber-stamped by Dan Bernstein.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme: Removed.

Tools:
Get rid of the --target-web-process and --use-web-process-xpc-service options.

Rubber-stamped by Dan Bernstein.

We now always use XPC, and --target-web-process is no longer supported.

* Scripts/webkitdirs.pm:
(execMacWebKitAppForDebugging):
(shouldTargetWebProcess): Deleted.
(determineShouldTargetWebProcess): Deleted.
(shouldUseXPCServiceForWebProcess): Deleted.
(determineShouldUseXPCServiceForWebProcess): Deleted.
(printHelpAndExitForRunAndDebugWebKitAppIfNeeded): Deleted.
(argumentsForRunAndDebugMacWebKitApp): Deleted.

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

5 years agoSoft hyphen is not shown when it is placed at the end of an inline element
zalan@apple.com [Thu, 18 Feb 2016 23:48:19 +0000 (23:48 +0000)]
Soft hyphen is not shown when it is placed at the end of an inline element
https://bugs.webkit.org/show_bug.cgi?id=153980

Reviewed by David Hyatt.

This patch handles the case when the character at the breaking position does not fit the
line and soft-hyphen, as the first breaking opportunity, is followed by this overflowing character.
(foo&shy;bar where b overflows the line).
In such cases we don't yet have an item in the breaking history so we need to take a look at
the current context instead.

Source/WebCore:

Test: fast/text/soft-hyphen-as-first-breaking-opportunity.html

* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition):
(WebCore::BreakingContext::handleText):

LayoutTests:

* fast/text/soft-hyphen-as-first-breaking-opportunity-expected.html: Added.
* fast/text/soft-hyphen-as-first-breaking-opportunity.html: Added.

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

5 years agoSkip API test WTF_ParkingLot.UnparkOneFiftyThenFiftyAll on ios-simulator
ryanhaddad@apple.com [Thu, 18 Feb 2016 23:43:57 +0000 (23:43 +0000)]
Skip API test WTF_ParkingLot.UnparkOneFiftyThenFiftyAll on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=153997

Reviewed by Filip Pizlo.

* TestWebKitAPI/Tests/WTF/ParkingLot.cpp:

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

5 years agoFake memory pressure handler should log detailed memory breakdown.
akling@apple.com [Thu, 18 Feb 2016 23:35:42 +0000 (23:35 +0000)]
Fake memory pressure handler should log detailed memory breakdown.
<https://webkit.org/b/154415>

Reviewed by Antti Koivisto.

Piggyback on the RESOURCE_USAGE code to implement some detailed memory footprint diffing
and have the fake memory handler dump before/after/diff after it runs.

* page/ResourceUsageThread.h:
(WebCore::TagInfo::TagInfo):
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::logFootprintComparison):
(WebCore::displayNameForVMTag):
(WebCore::pagesPerVMTag):
(WebCore::TagInfo::TagInfo): Deleted.
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

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

5 years agoModern IDB: Implement server->client operations in WK2.
beidson@apple.com [Thu, 18 Feb 2016 22:42:54 +0000 (22:42 +0000)]
Modern IDB: Implement server->client operations in WK2.
https://bugs.webkit.org/show_bug.cgi?id=154411

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.
Source/WebCore:

* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/shared/IDBTransactionInfo.h:
(WebCore::IDBTransactionInfo::encode):
(WebCore::IDBTransactionInfo::decode):

Source/WebKit2:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::didDeleteDatabase):
(WebKit::WebIDBConnectionToServer::didOpenDatabase):
(WebKit::WebIDBConnectionToServer::didAbortTransaction):
(WebKit::WebIDBConnectionToServer::didCommitTransaction):
(WebKit::WebIDBConnectionToServer::didCreateObjectStore):
(WebKit::WebIDBConnectionToServer::didDeleteObjectStore):
(WebKit::WebIDBConnectionToServer::didClearObjectStore):
(WebKit::WebIDBConnectionToServer::didCreateIndex):
(WebKit::WebIDBConnectionToServer::didDeleteIndex):
(WebKit::WebIDBConnectionToServer::didPutOrAdd):
(WebKit::WebIDBConnectionToServer::didGetRecord):
(WebKit::WebIDBConnectionToServer::didGetCount):
(WebKit::WebIDBConnectionToServer::didDeleteRecord):
(WebKit::WebIDBConnectionToServer::didOpenCursor):
(WebKit::WebIDBConnectionToServer::didIterateCursor):
(WebKit::WebIDBConnectionToServer::fireVersionChangeEvent):
(WebKit::WebIDBConnectionToServer::didStartTransaction):
(WebKit::WebIDBConnectionToServer::notifyOpenDBRequestBlocked):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
(WebKit::WebToDatabaseProcessConnection::didReceiveMessage):

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

5 years agorun-webkit-httpd should use webkitpy to run httpd.
jer.noble@apple.com [Thu, 18 Feb 2016 22:31:49 +0000 (22:31 +0000)]
run-webkit-httpd should use webkitpy to run httpd.
https://bugs.webkit.org/show_bug.cgi?id=154271

Reviewed by Alexey Proskuryakov.

Update run-webkit-httpd to use webkitpy.port to launch httpd. Pass on http_port and http_all_interface
options to match the current run-webkit-httpd (optional) behavior.

* Scripts/run-webkit-httpd:
(parse_args):
(main):
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._prepare_config):
* Scripts/webkitpy/port/base.py:
(Port.to.start_http_server):

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

5 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Thu, 18 Feb 2016 21:58:15 +0000 (21:58 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196770

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

5 years agoRebaseline imported/w3c/web-platform-tests/html/dom/reflection-forms.html for ios...
ryanhaddad@apple.com [Thu, 18 Feb 2016 21:58:13 +0000 (21:58 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/reflection-forms.html for ios-simulator after r196769

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:

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

5 years agoFollow up fix to Implement Proxy.[[GetOwnProperty]]
sbarati@apple.com [Thu, 18 Feb 2016 21:55:40 +0000 (21:55 +0000)]
Follow up fix to Implement Proxy.[[GetOwnProperty]]
https://bugs.webkit.org/show_bug.cgi?id=154314

Reviewed by Filip Pizlo.

Part of the implementation was broken because
of how JSObject::getOwnPropertyDescriptor worked.
I've fixed JSObject::getOwnPropertyDescriptor to
be able to handle ProxyObject.

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
* tests/stress/proxy-get-own-property.js:
(assert):
(assert.let.handler.get getOwnPropertyDescriptor):

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

5 years agoRemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchro...
bburg@apple.com [Thu, 18 Feb 2016 21:30:23 +0000 (21:30 +0000)]
RemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchronously
https://bugs.webkit.org/show_bug.cgi?id=154359
<rdar://problem/24708897>

Reviewed by Joseph Pecoraro.

* UIProcess/Cocoa/AutomationClient.mm:
(WebKit::AutomationClient::requestAutomationSession):
Make an NSString out of the String reference so it gets captured correctly.

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

5 years agoFix unused-const-variable warning on non Cocoa platforms
ossy@webkit.org [Thu, 18 Feb 2016 20:59:26 +0000 (20:59 +0000)]
Fix unused-const-variable warning on non Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=154394

Reviewed by Michael Catanzaro.

* html/HTMLPlugInImageElement.cpp:

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

5 years agoImplement Proxy.[[GetOwnProperty]]
sbarati@apple.com [Thu, 18 Feb 2016 20:29:35 +0000 (20:29 +0000)]
Implement Proxy.[[GetOwnProperty]]
https://bugs.webkit.org/show_bug.cgi?id=154314

Reviewed by Filip Pizlo.

This patch implements Proxy.[[GetOwnProperty]].
It's a straight forward implementation as described
in section 9.5.5 of the specification:
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-proxy-object-internal-methods-and-internal-slots-getownproperty-p

* runtime/FunctionPrototype.cpp:
(JSC::functionProtoFuncBind):
* runtime/JSObject.cpp:
(JSC::validateAndApplyPropertyDescriptor):
(JSC::JSObject::defineOwnNonIndexProperty):
(JSC::JSObject::defineOwnProperty):
(JSC::JSObject::getGenericPropertyNames):
(JSC::JSObject::getMethod):
* runtime/JSObject.h:
(JSC::JSObject::butterflyAddress):
(JSC::makeIdentifier):
* runtime/ProxyObject.cpp:
(JSC::performProxyGet):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::getOwnPropertySlotCommon):
(JSC::ProxyObject::getOwnPropertySlot):
(JSC::ProxyObject::getOwnPropertySlotByIndex):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-basic.js:
(let.handler.get null):
* tests/stress/proxy-get-own-property.js: Added.
(assert):
(throw.new.Error.let.handler.getOwnPropertyDescriptor):
(throw.new.Error):
(let.handler.getOwnPropertyDescriptor):
(i.catch):
(assert.let.handler.getOwnPropertyDescriptor):

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

5 years agoModern IDB: Implement client->server operations in WK2.
beidson@apple.com [Thu, 18 Feb 2016 20:23:51 +0000 (20:23 +0000)]
Modern IDB: Implement client->server operations in WK2.
https://bugs.webkit.org/show_bug.cgi?id=154400

Reviewed by Alex Christensen.

No change in behavior yet; Just laying the groundwork.

Source/WebCore:

* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/UniqueIDBDatabase.h:
* Modules/indexeddb/shared/IDBIndexInfo.h:
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::idbServer):
* DatabaseProcess/DatabaseProcess.h:

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:

* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h:
* DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in:

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

5 years ago[Unforgeable] operations should not be writable as per Web IDL
cdumez@apple.com [Thu, 18 Feb 2016 20:18:39 +0000 (20:18 +0000)]
[Unforgeable] operations should not be writable as per Web IDL
https://bugs.webkit.org/show_bug.cgi?id=154396
<rdar://problem/24721063>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

[Unforgeable] operations should not be writable as per the Web IDL specification:
http://heycam.github.io/webidl/#es-operations

They were currently non-configurable in WebKit but still writable.

No new tests, already covered by existing test.

* bindings/scripts/CodeGeneratorJS.pm:
Mark [Unforgeable] operations as ReadOnly.

* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl:
Add bindings test coverage for [Unforgeable].

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

5 years agoFix behavior of reflecting unsigned long IDL attributes that are limited to only...
cdumez@apple.com [Thu, 18 Feb 2016 20:14:13 +0000 (20:14 +0000)]
Fix behavior of reflecting unsigned long IDL attributes that are limited to only non-negative numbers greater than zero
https://bugs.webkit.org/show_bug.cgi?id=154398

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/reflection-forms-expected.txt:
* web-platform-tests/html/dom/reflection-tabular-expected.txt:

Source/WebCore:

Fix behavior of reflecting unsigned long IDL attributes that are limited
to only non-negative numbers greater than zero to comply with:
- https://html.spec.whatwg.org/#limited-to-only-non-negative-numbers-greater-than-zero

This patch updates the following IDL attributes:
- colgroup.span
- col.span
- input.size
- textarea.cols
- textareal.rows

All of them now:
- Have "unsigned long" type on IDL size and "unsigned" type on native
  side.
- On getting, return the value if it is in the range [1; 2147483647],
  otherwise return the default value.
- On setting, set to the input value if it is in the range
  [1; 2147483647], otherwise, set to the default value.

Note that as per the specification, we are supposed to throw an
IndexSizeError exception when trying to set those attributes to zero.
However, we instead use the default value to match other browsers.
It would be risky to be the only browser to throw in this case.

No new tests, already covered by existing test.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::setSize):
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::parseAttribute):
(WebCore::HTMLTableColElement::setSpan):
* html/HTMLTableColElement.h:
* html/HTMLTableColElement.idl:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::setCols):
(WebCore::HTMLTextAreaElement::setRows):
(WebCore::HTMLTextAreaElement::shouldUseInputMethod): Deleted.
* html/HTMLTextAreaElement.h:
* html/HTMLTextAreaElement.idl:
* html/parser/HTMLParserIdioms.h:
(WebCore::limitToOnlyNonNegativeNumbersGreaterThanZero):

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

5 years agov3 UI should allow custom revisions for A/B testing
rniwa@webkit.org [Thu, 18 Feb 2016 20:07:54 +0000 (20:07 +0000)]
v3 UI should allow custom revisions for A/B testing
https://bugs.webkit.org/show_bug.cgi?id=154379

Reviewed by Chris Dumez.

Added the capability to customize revisions selected in the overview chart and the results viewer.

Newly added CustomizableTestGroupForm is responsible for allowing users to modify the set of revisions in
a new A/B testing group. Unlike TestGroupForm which doesn't know anything about which revisions are selected
for each project/repository, CustomizableTestGroupForm is aware of the list of revisions used in each set.

The list of revisions used in each set is represented by RootSet if users had not customized them, and
CustomRootSet otherwise; the latter was added since regular RootSet object requires CommitLog and other
DataModelObjects which are hard to create without corresponding database entries.

* public/v3/components/customizable-test-group-form.js: Added.
(CustomizableTestGroupForm): Added.
(CustomizableTestGroupForm.prototype.setRootSetMap): Added.
(CustomizableTestGroupForm.prototype._submitted): Overrides the superclass' method.
(CustomizableTestGroupForm.prototype._customize): Ditto. Unlike TestGroupForm's callback, this class'
callback passes in a root set map as the third argument.
(CustomizableTestGroupForm.prototype._computeRootSetMap): Added. Returns this._rootSetMap, which is set by
AnalysisTaskPage if user had not customized the root sets. Otherwise return a new map with CustomRootSet's.
(CustomizableTestGroupForm.prototype.render): Added. Creates a table to allow customization of root sets.
(CustomizableTestGroupForm._constructRevisionRadioButtons): Added.
(CustomizableTestGroupForm._createRadioButton): Added.
(CustomizableTestGroupForm.cssTemplate): Added.
(CustomizableTestGroupForm.formContent): Added. This method is called by TestGroupForm.htmlTemplate.
* public/v3/components/test-group-form.js:
(TestGroupForm): Updated the various methods to not directly mutate DOM. Store the state in instance
variables and update DOM in render() as done elsewhere.
(TestGroupForm.prototype.setNeedsName): Deleted. We no longer need this flag since TestGroupForm which is
used for retries never needs a name and CustomizableTestGroupForm which is used to create a new test group
always requires a name.
(TestGroupForm.prototype.setDisabled):
(TestGroupForm.prototype.setLabel):
(TestGroupForm.prototype.setRepetitionCount):
(TestGroupForm.prototype.render): Added.
(TestGroupForm.prototype._submitted): Moved the code to prevent the default action has been moved to the
constructor since this method is overridden by CustomizableTestGroupForm.
(TestGroupForm.cssTemplate): Added.
(TestGroupForm.htmlTemplate):
(TestGroupForm.formContent): Extracted from htmlTemplate.
* public/v3/index.html:
* public/v3/models/repository.js:
(Repository.sortByNamePreferringOnesWithURL): Added.
* public/v3/models/root-set.js:
(RootSet.prototype.revisionForRepository): Added so that _createTestGroupAfterVerifyingRootSetList can retrieve
the revision information from CustomRootSet without going through CommitLog objects since CustomRootSet doesn't
have associated CommitLog objects.
(CustomRootSet): Added. Used by CustomizableTestGroupForm to create a custom root map since regular RootSet
requires CommitLog and other related objects which are hard to create without database entries.
(CustomRootSet.prototype.setRevisionForRepository): Added.
(CustomRootSet.prototype.repositories): Added.
(CustomRootSet.prototype.revisionForRepository): Added.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage):
(AnalysisTaskPage.prototype.render): Removed the reference to v2 UI since v3 UI is now strictly more powerful
than v2 UI. Also update the root set maps in each form here.
(AnalysisTaskPage.prototype._retryCurrentTestGroup): No longer takes unused name argument as it got removed
from TestGroupForm.
(AnalysisTaskPage.prototype._chartSelectionDidChange): No longer updates the disabled-ness here since it's now
done in render() via setRootSetMap().
(AnalysisTaskPage.prototype._createNewTestGroupFromChart): Now takes rootSetMap as an argument.
(AnalysisTaskPage.prototype._selectedRowInAnalysisResultsViewer): No longer updates the disabled-ness here
since it's now done in render() via setRootSetMap().
(AnalysisTaskPage.prototype._createNewTestGroupFromViewer): Now takes rootSetMap as an argument.
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingRootSetList): Take a dictionary of root set labels
such as A and B, which maps to a RootSet or a newly-added CustomRootSet.
(AnalysisTaskPage.htmlTemplate): Use customizable-test-group-form for creating a new A/B testing group. Retry
form will continue to use TestGroupForm since customizing revisions is non-sensical in retries.
(AnalysisTaskPage.cssTemplate): Updated the style.

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

5 years ago[GTK][Threaded Compositor] The web inspector doesn't work when using the threaded...
changseok.oh@collabora.com [Thu, 18 Feb 2016 19:06:50 +0000 (19:06 +0000)]
[GTK][Threaded Compositor] The web inspector doesn't work when using the threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=154067

Reviewed by Carlos Garcia Campos.

The forceCompositingMode should be true for threaded compositor. We set it true for a normal webView
in _WebKitSettingsPrivate() but we do not for inspector anywhere. So DrawingArea is not
properly created for the inspector. Let's move the setting to WebPreferences::platformInitializeStore
which is a common place for the webView and the inspector.

* UIProcess/API/gtk/WebKitSettings.cpp:
(_WebKitSettingsPrivate::_WebKitSettingsPrivate): Deleted.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):

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

5 years agoUnreviewed, rolling out r196765.
commit-queue@webkit.org [Thu, 18 Feb 2016 19:02:26 +0000 (19:02 +0000)]
Unreviewed, rolling out r196765.
https://bugs.webkit.org/show_bug.cgi?id=154402

Broke Safari (Requested by andersca on #webkit).

Reverted changeset:

"Remove two unused functions"
https://bugs.webkit.org/show_bug.cgi?id=154397
http://trac.webkit.org/changeset/196765

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

5 years agoRemove two unused functions
andersca@apple.com [Thu, 18 Feb 2016 18:44:51 +0000 (18:44 +0000)]
Remove two unused functions
https://bugs.webkit.org/show_bug.cgi?id=154397

Reviewed by Tim Horton.

* UIProcess/API/C/WKContext.cpp:
(WKContextGetPluginSiteDataManager): Deleted.
(WKContextGetResourceCacheManager): Deleted.
* UIProcess/API/C/WKContext.h:

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

5 years agoRebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator...
ryanhaddad@apple.com [Thu, 18 Feb 2016 18:21:49 +0000 (18:21 +0000)]
Rebaseline imported/w3c/web-platform-tests/html/dom/interfaces.html for ios-simulator after r196742

Unreviewed test gardening.

* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt:

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

5 years agoRemove redundant ASSERT_WITH_MESSAGE_UNUSED() from SOFT_LINK_FRAMEWORK_FOR_SOURCE...
ddkilzer@apple.com [Thu, 18 Feb 2016 18:13:32 +0000 (18:13 +0000)]
Remove redundant ASSERT_WITH_MESSAGE_UNUSED() from SOFT_LINK_FRAMEWORK_FOR_SOURCE() macro

Follow-up fix noted by Andy Estes for:

    [Cocoa] Always check the return value of dlopen() and dlsym() in Release builds
    <http://webkit.org/b/154364>

* platform/mac/SoftLinking.h:
(SOFT_LINK_FRAMEWORK_FOR_SOURCE): Remove redundant
ASSERT_WITH_MESSAGE_UNUSED().

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

5 years agoJSC ARM Linux test gardening after r196625
ossy@webkit.org [Thu, 18 Feb 2016 17:53:33 +0000 (17:53 +0000)]
JSC ARM Linux test gardening after r196625
https://bugs.webkit.org/show_bug.cgi?id=154392

Reviewed by Mark Lam.

* js/script-tests/dfg-float32array.js:
* js/script-tests/dfg-float64array.js:
* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int32array-overflow-values.js:
* js/script-tests/dfg-int32array.js:
* js/script-tests/dfg-int8array.js:
* js/script-tests/dfg-osr-entry-hoisted-clobbered-structure-check.js:
* js/script-tests/dfg-uint16array.js:
* js/script-tests/dfg-uint32array-overflow-values.js:
* js/script-tests/dfg-uint32array.js:
* js/script-tests/dfg-uint8array.js:
* js/script-tests/dfg-uint8clampedarray.js:
* js/script-tests/regress-141098.js:

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

5 years agoJSString resolution of substrings should use StringImpl sharing optimization.
akling@apple.com [Thu, 18 Feb 2016 17:25:42 +0000 (17:25 +0000)]
JSString resolution of substrings should use StringImpl sharing optimization.
<https://webkit.org/b/154068>
<rdar://problem/24629358>

Reviewed by Antti Koivisto.

When resolving a JSString that's actually a substring of another JSString,
use the StringImpl sharing optimization to create a new string pointing into
the parent one, instead of copying out the bytes of the string.

This dramatically reduces peak memory usage on Gerrit diff viewer pages.

Another approach to this would be to induce GC far more frequently due to
the added cost of copying out these substrings. It would reduce the risk
of prolonging the life of strings only kept alive by substrings.

This patch chooses to trade that risk for less GC and lower peak memory.

* runtime/JSString.cpp:
(JSC::JSRopeString::resolveRope):

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

5 years agoCrash on SES selftest page when loading the page while WebInspector is open
cdumez@apple.com [Thu, 18 Feb 2016 17:19:33 +0000 (17:19 +0000)]
Crash on SES selftest page when loading the page while WebInspector is open
https://bugs.webkit.org/show_bug.cgi?id=154378
<rdar://problem/24713422>

Reviewed by Mark Lam.

Do a partial revert of r196676 so that JSObject::getOwnPropertyDescriptor()
returns early again if it detects that getOwnPropertySlot() returns a
non-own property. This check was removed in r196676 because we assumed that
only JSDOMWindow::getOwnPropertySlot() could return non-own properties.
However, as it turns out, DebuggerScope::getOwnPropertySlot() does so as
well.

Not having the check would lead to crashes when using the debugger because
we would get a slot with the CustomAccessor attribute but getDirect() would
then fail to return the property (because it is not an own property). We
would then cast the value returned by getDirect() to a CustomGetterSetter*
and dereference it.

* runtime/JSObject.cpp:
(JSC::JSObject::getOwnPropertyDescriptor):

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

5 years agoUnreviewed, fix VS build. I didn't know we still did that, but apparently there's...
fpizlo@apple.com [Thu, 18 Feb 2016 16:55:58 +0000 (16:55 +0000)]
Unreviewed, fix VS build. I didn't know we still did that, but apparently there's a bot
for that.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

5 years agoUnreviewed, fix CMake build. This got messed up when rebasing.
fpizlo@apple.com [Thu, 18 Feb 2016 16:48:16 +0000 (16:48 +0000)]
Unreviewed, fix CMake build. This got messed up when rebasing.

* CMakeLists.txt:

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

5 years agoFix the !ENABLE(DFG_JIT) build after r195865
ossy@webkit.org [Thu, 18 Feb 2016 16:45:26 +0000 (16:45 +0000)]
Fix the !ENABLE(DFG_JIT) build after r195865
https://bugs.webkit.org/show_bug.cgi?id=154391

Reviewed by Filip Pizlo.

* runtime/SamplingProfiler.cpp:
(JSC::tryGetBytecodeIndex):

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

5 years agoRemove remaining references to LLVM, and make sure comments refer to the backend...
fpizlo@apple.com [Thu, 18 Feb 2016 16:40:25 +0000 (16:40 +0000)]
Remove remaining references to LLVM, and make sure comments refer to the backend as "B3" not "LLVM"
https://bugs.webkit.org/show_bug.cgi?id=154383

Reviewed by Saam Barati.

Source/JavaScriptCore:

I did a grep -i llvm of all of our code and did one of the following for each occurence:

- Renamed it to B3. This is appropriate when we were using "LLVM" to mean "the FTL
  backend".

- Removed the reference because I found it to be dead. In some cases it was a dead
  comment: it was telling us things about what LLVM did and that's just not relevant
  anymore. In other cases it was dead code that I forgot to delete in a previous patch.

- Edited the comment in some smart way. There were comments talking about what LLVM did
  that were still of interest. In some cases, I added a FIXME to consider changing the
  code below the comment on the grounds that it was written in a weird way to placate
  LLVM and so we can do it better now.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGOSRAvailabilityAnalysisPhase.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::compileTimeStats):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSSAConversionPhase.h:
* dfg/DFGStaticExecutionCountEstimationPhase.h:
* dfg/DFGUnificationPhase.cpp:
(JSC::DFG::UnificationPhase::run):
* disassembler/ARM64Disassembler.cpp:
(JSC::tryToDisassemble): Deleted.
* disassembler/X86Disassembler.cpp:
(JSC::tryToDisassemble):
* ftl/FTLAbstractHeap.cpp:
(JSC::FTL::IndexedAbstractHeap::initialize):
* ftl/FTLAbstractHeap.h:
* ftl/FTLFormattedValue.h:
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLocation.cpp:
(JSC::FTL::Location::restoreInto):
* ftl/FTLLowerDFGToB3.cpp: Copied from Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp.
(JSC::FTL::DFG::ftlUnreachable):
(JSC::FTL::DFG::LowerDFGToB3::LowerDFGToB3):
(JSC::FTL::DFG::LowerDFGToB3::compileBlock):
(JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
(JSC::FTL::DFG::LowerDFGToB3::isBoolean):
(JSC::FTL::DFG::LowerDFGToB3::unboxBoolean):
(JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
(JSC::FTL::lowerDFGToB3):
(JSC::FTL::DFG::LowerDFGToLLVM::LowerDFGToLLVM): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::compileBlock): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithNegate): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::compileMultiGetByOffset): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::compileOverridesHasInstance): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::isBoolean): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::unboxBoolean): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::emitStoreBarrier): Deleted.
(JSC::FTL::lowerDFGToLLVM): Deleted.
* ftl/FTLLowerDFGToB3.h: Copied from Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.h.
* ftl/FTLLowerDFGToLLVM.cpp: Removed.
* ftl/FTLLowerDFGToLLVM.h: Removed.
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* ftl/FTLWeight.h:
(JSC::FTL::Weight::frequencyClass):
(JSC::FTL::Weight::inverse):
(JSC::FTL::Weight::scaleToTotal): Deleted.
* ftl/FTLWeightedTarget.h:
(JSC::FTL::rarely):
(JSC::FTL::unsure):
* jit/CallFrameShuffler64.cpp:
(JSC::CallFrameShuffler::emitDisplace):
* jit/RegisterSet.cpp:
(JSC::RegisterSet::ftlCalleeSaveRegisters):
* llvm: Removed.
* llvm/InitializeLLVMLinux.cpp: Removed.
* llvm/InitializeLLVMWin.cpp: Removed.
* llvm/library: Removed.
* llvm/library/LLVMTrapCallback.h: Removed.
* llvm/library/libllvmForJSC.version: Removed.
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
(JSC::Options::initialize):
* runtime/Options.h:
* wasm/WASMFunctionB3IRGenerator.h: Copied from Source/JavaScriptCore/wasm/WASMFunctionLLVMIRGenerator.h.
* wasm/WASMFunctionLLVMIRGenerator.h: Removed.
* wasm/WASMFunctionParser.cpp:

Tools:

* Scripts/run-jsc-stress-tests:

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

5 years ago[GTK] Use G_TYPE_ERROR instead of G_TYPE_POINTER for GError parameters of signals
carlosgc@webkit.org [Thu, 18 Feb 2016 16:12:23 +0000 (16:12 +0000)]
[GTK] Use G_TYPE_ERROR instead of G_TYPE_POINTER for GError parameters of signals
https://bugs.webkit.org/show_bug.cgi?id=153786

Reviewed by Michael Catanzaro.

It's binary compatible and it's needed by binding generator to
properly identify those parameters as GError.

* UIProcess/API/gtk/WebKitDownload.cpp:
(webkit_download_class_init):
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(webkit_print_operation_class_init):
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_class_init):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
* UIProcess/API/gtk/webkit2marshal.list:

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

5 years ago[EFL] Move WebView from CoordinatedGraphics to efl
ryuan.choi@navercorp.com [Thu, 18 Feb 2016 11:31:20 +0000 (11:31 +0000)]
[EFL] Move WebView from CoordinatedGraphics to efl
https://bugs.webkit.org/show_bug.cgi?id=154332

Reviewed by Csaba Osztrogonác.

* PlatformEfl.cmake:
* UIProcess/efl/WebView.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.cpp.
* UIProcess/efl/WebView.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h.
* UIProcess/efl/WebViewClient.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebViewClient.cpp.
* UIProcess/efl/WebViewClient.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/WebViewClient.h.

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

5 years agoReduce tiling coverage immediately when memory pressure hits.
akling@apple.com [Thu, 18 Feb 2016 11:13:02 +0000 (11:13 +0000)]
Reduce tiling coverage immediately when memory pressure hits.
<https://webkit.org/b/154374>

Reviewed by Simon Fraser.

We already had a policy that reduced tiling coverage to a minimum while the system
is under memory pressure. However, that policy wouldn't kick in immediately after
receiving the pressure notification, but the next time we flush compositing state.

This change makes it happen sooner, improving our chances to escape death!

* page/Page.h:
* page/Page.cpp:
(WebCore::Page::forEachPage):

    Add a little helper for visiting every Page.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):

    When under critical memory pressure, schedule a compositing flush in all Pages.
    This ensures that the reduced tiling coverage policy takes effect, allowing us to
    immediately drop several tiles in each visible web view.

* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):

    To ensure that this behavior is testable with the fake memory pressure notification,
    make the fake handler set the "in memory pressure" state just like the real one would.
    I don't know why we were not doing this previously, it was just an oversight.
    After the simulation completes, it schedules a runloop callback that resets the
    "in memory pressure" state.

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

5 years ago[cmake] Build system cleanup
ossy@webkit.org [Thu, 18 Feb 2016 10:34:47 +0000 (10:34 +0000)]
[cmake] Build system cleanup
https://bugs.webkit.org/show_bug.cgi?id=154337

Reviewed by Žan Doberšek.

* CMakeLists.txt:

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

5 years agoWeb Inspector: Align console prompt with execution context selector
nvasilyev@apple.com [Thu, 18 Feb 2016 08:46:57 +0000 (08:46 +0000)]
Web Inspector: Align console prompt with execution context selector
https://bugs.webkit.org/show_bug.cgi?id=154381

Reviewed by Timothy Hatcher.

* UserInterface/Views/QuickConsole.css:
(.quick-console > .console-prompt > .CodeMirror):
(.quick-console .execution-context):

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

5 years agoWeb Inspector: Storage tab navigation bar should fit on a single line
commit-queue@webkit.org [Thu, 18 Feb 2016 08:34:41 +0000 (08:34 +0000)]
Web Inspector: Storage tab navigation bar should fit on a single line
https://bugs.webkit.org/show_bug.cgi?id=152473
<rdar://problem/24023435>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-02-18
Reviewed by Timothy Hatcher.

* UserInterface/Base/Utilities.js:
(Number.constrain):
Reworked logic to ensure that the returned value is never less than the
given minimum value.

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

5 years ago[CMake] Remove LLVM support
mcatanzaro@igalia.com [Thu, 18 Feb 2016 08:29:51 +0000 (08:29 +0000)]
[CMake] Remove LLVM support
https://bugs.webkit.org/show_bug.cgi?id=154370

Reviewed by Csaba Osztrogonác.

After switching all CMake ports to B3, this was only needed for the LLVM disassembler, which
has been removed from JSC. Feel free to bring this back if restoring the LLVM disassembler,
but for the time being this is dead code.

* Source/cmake/FindLLVM.cmake: Removed.
* Source/cmake/OptionsCommon.cmake:

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

5 years ago[CMake] Remove meaningless conditional statements in CMakeLists.txt
jh718.park@samsung.com [Thu, 18 Feb 2016 08:28:44 +0000 (08:28 +0000)]
[CMake] Remove meaningless conditional statements in CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=153778

Reviewed by Csaba Osztrogonác.

* CMakeLists.txt:
Use CMAKE_FOO_OUTPUT_DIRECTORY located in CMakeLists.txt as default value.
And remove conditional statements which has enclosed these one
because they don't have meaning anymore.

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

5 years ago[Font Loading] Implement FontFaceSet
mmaxfield@apple.com [Thu, 18 Feb 2016 07:25:56 +0000 (07:25 +0000)]
[Font Loading] Implement FontFaceSet
https://bugs.webkit.org/show_bug.cgi?id=153348

Reviewed by Simon Fraser.

Source/WebCore:

The CSS Font Loading spec includes a FontFaceSet object which represents
a collection of FontFaces. This patch implements such an object, and
backs it with a vector of FontFaces. Similarly to the FontFace object,
FontFaceSet is separated into a FontFaceSet frontend object and a
CSSFontFaceSet backend object, which actually owns the FontFace objects.
All the interaction with Promises is performed in the frontend object.

This patch does not implement the EventTarget part of the FontFaceSet
API, so the only way to know when a font is finished loading is by using
the associated Promise objects.

The CSS Font Loading spec describes how the Document should vend an
instance of FontFaceSet which represents the font faces currently
associated with the Document. However, that functionality is
forthcoming. Currently, the only way to get a FontFaceSet is to create
one yourself (using the constructor). Therefore, this patch does not
implement the spec's notion of a "CSS-connected font face."

Test: fast/text/font-face-set-javascript.html

* CMakeLists.txt: Add new files.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSFontFaceSetCustom.cpp: Added.
(WebCore::JSFontFaceSet::ready): Use the Promise member.
(WebCore::JSFontFaceSet::entries): Use existing iterator code.
(WebCore::JSFontFaceSet::keys):
(WebCore::JSFontFaceSet::values):
* css/CSSAllInOne.cpp: Add new files.
* css/CSSFontFace.cpp: We now have a collection of clients (instead of
just one). Also, we need to keep a pointer to our FontFace wrapper.
(WebCore::CSSFontFace::CSSFontFace):
(WebCore::CSSFontFace::addClient):
(WebCore::CSSFontFace::removeClient):
(WebCore::CSSFontFace::setStatus): Rename the delegate callback to be
more clear.
(WebCore::CSSFontFace::fontLoaded):
(WebCore::CSSFontFace::addedToSegmentedFontFace): Deleted.
(WebCore::CSSFontFace::removedFromSegmentedFontFace): Deleted.
* css/CSSFontFace.h: Same as above.
(WebCore::CSSFontFace::create):
(WebCore::CSSFontFace::Client::~Client):
(WebCore::CSSFontFace::Client::kick):
(WebCore::CSSFontFace::Client::stateChanged):
(WebCore::CSSFontFace::wrapper):
(WebCore::CSSFontFaceClient::~CSSFontFaceClient): Deleted.
* css/CSSFontFaceSet.cpp: Added. Initial imlementation.
(WebCore::CSSFontFaceSet::CSSFontFaceSet):
(WebCore::CSSFontFaceSet::~CSSFontFaceSet):
(WebCore::CSSFontFaceSet::incrementActiveCount):
(WebCore::CSSFontFaceSet::decrementActiveCount):
(WebCore::CSSFontFaceSet::has):
(WebCore::CSSFontFaceSet::add):
(WebCore::CSSFontFaceSet::remove):
(WebCore::extractFamilies):
(WebCore::familiesIntersect): Because this is an initial imlementation,
this function is not optimized. A subsequent patch (which implements
Document.fonts) will optimize this.
(WebCore::CSSFontFaceSet::matchingFaces):
(WebCore::CSSFontFaceSet::load):
(WebCore::CSSFontFaceSet::check):
(WebCore::CSSFontFaceSet::stateChanged):
* css/CSSFontFaceSet.h: Added.
(WebCore::CSSFontFaceSetClient::~CSSFontFaceSetClient):
(WebCore::CSSFontFaceSet::size):
(WebCore::CSSFontFaceSet::operator[]):
(WebCore::CSSFontFaceSet::status):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::familyNameFromPrimitive):
(WebCore::CSSFontSelector::registerLocalFontFacesForFamily):
(WebCore::CSSFontSelector::addFontFaceRule):
(WebCore::familyNameFromPrimitive): Deleted.
(WebCore::CSSFontSelector::kick): Deleted.
* css/CSSFontSelector.h:
* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::~CSSSegmentedFontFace):
(WebCore::CSSSegmentedFontFace::appendFontFace):
(WebCore::CSSSegmentedFontFace::kick):
(WebCore::CSSSegmentedFontFace::fontLoaded): Deleted.
* css/CSSSegmentedFontFace.h:
* css/FontFace.cpp:
(WebCore::FontFace::FontFace):
(WebCore::FontFace::~FontFace):
(WebCore::FontFace::stateChanged): Renamed to make its purpose clearer.
(WebCore::FontFace::kick): Deleted.
* css/FontFace.h:
* css/FontFaceSet.cpp: Added.
(WebCore::createPromise):
(WebCore::FontFaceSet::FontFaceSet):
(WebCore::FontFaceSet::~FontFaceSet):
(WebCore::FontFaceSet::Iterator::Iterator):
(WebCore::FontFaceSet::Iterator::next):
(WebCore::FontFaceSet::PendingPromise::PendingPromise):
(WebCore::FontFaceSet::PendingPromise::~PendingPromise):
(WebCore::FontFaceSet::has):
(WebCore::FontFaceSet::size):
(WebCore::FontFaceSet::add):
(WebCore::FontFaceSet::remove):
(WebCore::FontFaceSet::clear):
(WebCore::FontFaceSet::load): Most of the complexity of loading is
due to the promises involved. Rather than use the Javascript function
Promise.all(), this patch builds a data structure to represent the
promises which need to be resolved. When fonts finish loading, we look
at the data structure to determine which promises to resolve.
(WebCore::FontFaceSet::check):
(WebCore::FontFaceSet::status):
(WebCore::FontFaceSet::canSuspendForDocumentSuspension):
(WebCore::FontFaceSet::startedLoading):
(WebCore::FontFaceSet::completedLoading):
(WebCore::FontFaceSet::fulfillPromise): Keep the promise alive.
(WebCore::FontFaceSet::faceFinished):
* css/FontFaceSet.h: Added.
(WebCore::FontFaceSet::create):
(WebCore::FontFaceSet::load):
(WebCore::FontFaceSet::check):
(WebCore::FontFaceSet::createIterator):
(WebCore::FontFaceSet::PendingPromise::create):
* css/FontFaceSet.idl: Added.
* dom/EventNames.h:
* dom/EventTargetFactory.in:

LayoutTests:

* fast/text/font-face-set-javascript-expected.txt: Added.
* fast/text/font-face-set-javascript.html: Added.

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

5 years agoWeb Inspector: In the styles sidebar, Option-clicking on --css-variable should jump...
commit-queue@webkit.org [Thu, 18 Feb 2016 06:37:45 +0000 (06:37 +0000)]
Web Inspector: In the styles sidebar, Option-clicking on --css-variable should jump to its definition
https://bugs.webkit.org/show_bug.cgi?id=154082
<rdar://problem/24593361>

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-02-17
Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode):
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
Now tests to see if the highlighted token was a CSS variable and if
so, attempts to show the declaration of the CSS variable instead of
the location where it is used.

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

5 years agoCallers of JSString::value() should check for exceptions thereafter.
mark.lam@apple.com [Thu, 18 Feb 2016 06:28:26 +0000 (06:28 +0000)]
Callers of JSString::value() should check for exceptions thereafter.
https://bugs.webkit.org/show_bug.cgi?id=154346

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

JSString::value() can throw an exception if the JS string is a rope and value()
needs to resolve the rope but encounters an OutOfMemory error.  If value() is not
able to resolve the rope, it will return a null string (in addition to throwing
the exception).  If a caller does not check for exceptions after calling
JSString::value(), they may eventually use the returned null string and crash the
VM.

The fix is to add all the necessary exception checks, and do the appropriate
handling if needed.

* jsc.cpp:
(functionRun):
(functionLoad):
(functionReadFile):
(functionCheckSyntax):
(functionLoadWebAssembly):
(functionLoadModule):
(functionCheckModuleSyntax):
* runtime/DateConstructor.cpp:
(JSC::dateParse):
(JSC::dateNow):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* tools/JSDollarVMPrototype.cpp:
(JSC::functionPrint):

Source/WebCore:

No new tests.  The crash that results from this issue is dependent on a race
condition where an OutOfMemory error occurs precisely at the point where the
JSString::value() function is called on a rope JSString.

* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::putDelegate):
- Added a comment at the site of the exception check to clarify the meaning of
  the return value.

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

5 years ago[Cocoa] Always check the return value of dlopen() and dlsym() in Release builds
ddkilzer@apple.com [Thu, 18 Feb 2016 06:13:15 +0000 (06:13 +0000)]
[Cocoa] Always check the return value of dlopen() and dlsym() in Release builds
<http://webkit.org/b/154364>

Reviewed by Alexey Proskuryakov.

* platform/mac/SoftLinking.h:
(SOFT_LINK_LIBRARY): Change ASSERT_WITH_MESSAGE() to
RELEASE_ASSERT_WITH_MESSAGE().
(SOFT_LINK_FRAMEWORK): Ditto.
(SOFT_LINK_PRIVATE_FRAMEWORK): Ditto.
(SOFT_LINK_STAGED_FRAMEWORK): Ditto.
(SOFT_LINK_FRAMEWORK_IN_UMBRELLA): Ditto.
(SOFT_LINK): Ditto.
(SOFT_LINK_POINTER): Ditto.
(SOFT_LINK_CONSTANT): Ditto.
(SOFT_LINK_FRAMEWORK_FOR_SOURCE): Add
RELEASE_ASSERT_WITH_MESSAGE() when soft-link is not
optional.

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

5 years agoREGRESSION (r196620): Web Inspector: DataGrid headers and resizers are misaligned...
nvasilyev@apple.com [Thu, 18 Feb 2016 06:03:30 +0000 (06:03 +0000)]
REGRESSION (r196620): Web Inspector: DataGrid headers and resizers are misaligned when the scrollbar is visible
https://bugs.webkit.org/show_bug.cgi?id=154280
<rdar://problem/24670567>

Reviewed by Timothy Hatcher.

Revert back to "overflow-y: overlay".

* UserInterface/Views/DataGrid.css:
(.data-grid .data-container):
* UserInterface/Views/DatabaseContentView.css:
(.storage-view.query):

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

5 years agoRegression(r196648): http://w3c-test.org/html/dom/interfaces.html redirects at the...
cdumez@apple.com [Thu, 18 Feb 2016 05:44:10 +0000 (05:44 +0000)]
Regression(r196648): w3c-test.org/html/dom/interfaces.html redirects at the end of the test
https://bugs.webkit.org/show_bug.cgi?id=154357

Reviewed by Alexey Proskuryakov.

LayoutTests/imported/w3c:

Rebaseline now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:

Source/WebCore:

Make location.assign() / location.replace()'s parameter mandatory,
as per the specification:
https://html.spec.whatwg.org/multipage/browsers.html#the-location-interface

Previously, calling location.assign() / location.replace() without
parameter would be identical to calling location.assign("undefined") /
location.replace("undefined"), which is not useful.

After r196648, http://w3c-test.org/html/dom/interfaces.html was able to
test location.assign() / location.replace() further because they are now
on the instance (where they should be) instead of the prototype. One of
these tests calls these functions without parameter, expecting them to
throw an exception. However, in WebKit, it would not throw and it would
redirect us to http://w3c-test.org/html/dom/undefined.

Firefox and Chrome both follow the specification already and throw in
this case.

No new tests, already covered by existing test.

* page/Location.idl:
Make location.assign() / location.replace()'s parameter mandatory,
as per the specification.

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

5 years agoREGRESSION (r196620): Web Inspector: When the scrollbars are always visible, the...
nvasilyev@apple.com [Thu, 18 Feb 2016 05:27:31 +0000 (05:27 +0000)]
REGRESSION (r196620): Web Inspector: When the scrollbars are always visible, the console prompt is 1px taller
https://bugs.webkit.org/show_bug.cgi?id=154328
<rdar://problem/24692996>

Introduce a CSS variable to ensure that the quick console is the
same height as the bottom right section of the styles sidebar.

Reviewed by Timothy Hatcher.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .options-container):
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
* UserInterface/Views/QuickConsole.css:
(.quick-console):
* UserInterface/Views/Variables.css:
(:root):

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

5 years agoUnreviewed, rolling out r196738.
commit-queue@webkit.org [Thu, 18 Feb 2016 05:16:54 +0000 (05:16 +0000)]
Unreviewed, rolling out r196738.
https://bugs.webkit.org/show_bug.cgi?id=154380

broke css3/calc/transforms-translate.html (Requested by
alexchristensen on #webkit).

Reverted changeset:

"WebKitCSSMatrix transformList with calculated relative length
crashes Safari."
https://bugs.webkit.org/show_bug.cgi?id=153333
http://trac.webkit.org/changeset/196738

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

5 years agoWeb Inspector: Add Context menu separators to Styles sidebar
commit-queue@webkit.org [Thu, 18 Feb 2016 03:57:23 +0000 (03:57 +0000)]
Web Inspector: Add Context menu separators to Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154360

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-02-17
Reviewed by Joseph Pecoraro.

In the Styles sidebar, there are three main sections for the context menu:
- Copy and Duplicate/Show-source
- Add pseudo-class rules
- Add/Select pseudo-element rules
These three sections were all put together in the same context menu, which
was very crowded as a result. Separators have been added to make it so that
these three sections are now separated and clearly show their different uses.

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

* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):

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

5 years agoWebKitCSSMatrix transformList with calculated relative length crashes Safari.
dino@apple.com [Thu, 18 Feb 2016 02:13:37 +0000 (02:13 +0000)]
WebKitCSSMatrix transformList with calculated relative length crashes Safari.
https://bugs.webkit.org/show_bug.cgi?id=153333
<rdar://problem/17198383>

Reviewed by Simon Fraser.

Source/WebCore:

WebKitCSSMatrix objects should fail to construct when not
using absolute lengths.

Updated existing tests:
- transforms/cssmatrix-2d-interface.xhtml
- transforms/cssmatrix-3d-interface.xhtml

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTransform): Tell transformsForValue
that we don't require absolute lengths.
* css/TransformFunctions.cpp:
(WebCore::convertToFloatLength): Add an optional parameter that will
cause the conversion to fail if the primitive value has a non-absolute
length.
(WebCore::transformsForValue): Pass the parameter for requiring an
absolute length on to convertToFloatLength when necessary.
* css/TransformFunctions.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue): In this case we do
require all transform strings to have absolute lengths, not ones
that depend on the font size or are calculated.

LayoutTests:

Update existing tests to exercise the non-absolute lengths for translation
and perspective functions.

* transforms/cssmatrix-2d-interface-expected.txt:
* transforms/cssmatrix-2d-interface.xhtml:
* transforms/cssmatrix-3d-interface-expected.txt:
* transforms/cssmatrix-3d-interface.xhtml:

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

5 years agoUnreviewed, rolling out r196712.
ryanhaddad@apple.com [Thu, 18 Feb 2016 02:04:40 +0000 (02:04 +0000)]
Unreviewed, rolling out r196712.
https://bugs.webkit.org/show_bug.cgi?id=154371

This change caused 5 API test failures on ios-simulator
(Requested by ryanhaddad on #webkit).

Reverted changeset:

"[iOS] Purge GraphicsServices font cache on memory warning."
https://bugs.webkit.org/show_bug.cgi?id=154343
http://trac.webkit.org/changeset/196712

Patch by Commit Queue <commit-queue@webkit.org> on 2016-02-17

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

5 years ago[JSC] ARM64: Support the immediate format used for bit operations in Air
commit-queue@webkit.org [Thu, 18 Feb 2016 01:38:40 +0000 (01:38 +0000)]
[JSC] ARM64: Support the immediate format used for bit operations in Air
https://bugs.webkit.org/show_bug.cgi?id=154327

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-02-17
Reviewed by Filip Pizlo.

ARM64 supports a pretty rich form of immediates for bit operation.
There are two formats used to encode repeating patterns and common
input in a dense form.

In this patch, I add 2 new type of Arg: BitImm32 and BitImm64.
Those represents the valid immediate forms for bit operation.
On x86, any 32bits value is valid. On ARM64, all the encoding
form are tried and the immediate is used when possible.

The arg type Imm64 is renamed to BigImm to better represent what
it is: an immediate that does not fit into Imm.

* assembler/ARM64Assembler.h:
(JSC::LogicalImmediate::create32): Deleted.
(JSC::LogicalImmediate::create64): Deleted.
(JSC::LogicalImmediate::value): Deleted.
(JSC::LogicalImmediate::isValid): Deleted.
(JSC::LogicalImmediate::is64bit): Deleted.
(JSC::LogicalImmediate::LogicalImmediate): Deleted.
(JSC::LogicalImmediate::mask): Deleted.
(JSC::LogicalImmediate::partialHSB): Deleted.
(JSC::LogicalImmediate::highestSetBit): Deleted.
(JSC::LogicalImmediate::findBitRange): Deleted.
(JSC::LogicalImmediate::encodeLogicalImmediate): Deleted.
* assembler/AssemblerCommon.h:
(JSC::ARM64LogicalImmediate::create32):
(JSC::ARM64LogicalImmediate::create64):
(JSC::ARM64LogicalImmediate::value):
(JSC::ARM64LogicalImmediate::isValid):
(JSC::ARM64LogicalImmediate::is64bit):
(JSC::ARM64LogicalImmediate::ARM64LogicalImmediate):
(JSC::ARM64LogicalImmediate::mask):
(JSC::ARM64LogicalImmediate::partialHSB):
(JSC::ARM64LogicalImmediate::highestSetBit):
(JSC::ARM64LogicalImmediate::findBitRange):
(JSC::ARM64LogicalImmediate::encodeLogicalImmediate):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::and64):
(JSC::MacroAssemblerARM64::or64):
(JSC::MacroAssemblerARM64::xor64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::bitImm):
(JSC::B3::Air::LowerToAir::bitImm64):
(JSC::B3::Air::LowerToAir::appendBinOp):
* b3/air/AirArg.cpp:
(JSC::B3::Air::Arg::dump):
(WTF::printInternal):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::bitImm):
(JSC::B3::Air::Arg::bitImm64):
(JSC::B3::Air::Arg::isBitImm):
(JSC::B3::Air::Arg::isBitImm64):
(JSC::B3::Air::Arg::isSomeImm):
(JSC::B3::Air::Arg::value):
(JSC::B3::Air::Arg::isGP):
(JSC::B3::Air::Arg::isFP):
(JSC::B3::Air::Arg::hasType):
(JSC::B3::Air::Arg::isValidBitImmForm):
(JSC::B3::Air::Arg::isValidBitImm64Form):
(JSC::B3::Air::Arg::isValidForm):
(JSC::B3::Air::Arg::asTrustedImm32):
(JSC::B3::Air::Arg::asTrustedImm64):
* b3/air/AirOpcode.opcodes:
* b3/air/opcode_generator.rb:

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

5 years agoModern IDB: Rename some "UniqueIDBDatabase" classes that conflict with new classes...
beidson@apple.com [Thu, 18 Feb 2016 01:25:21 +0000 (01:25 +0000)]
Modern IDB: Rename some "UniqueIDBDatabase" classes that conflict with new classes in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=154363.

Reviewed by Alex Christensen.

Adding "Legacy" to the front of the name fixes problems for now.

And all of this gunk will go away after Modern IDB is done, anyways.

* CMakeLists.txt:
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::getOrCreateLegacyUniqueIDBDatabase):
(WebKit::DatabaseProcess::removeLegacyUniqueIDBDatabase):
(WebKit::DatabaseProcess::getOrCreateUniqueIDBDatabase): Deleted.
(WebKit::DatabaseProcess::removeUniqueIDBDatabase): Deleted.
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::establishConnection):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.cpp: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp.
(WebKit::LegacyUniqueIDBDatabase::calculateAbsoluteDatabaseFilename):
(WebKit::LegacyUniqueIDBDatabase::LegacyUniqueIDBDatabase):
(WebKit::LegacyUniqueIDBDatabase::~LegacyUniqueIDBDatabase):
(WebKit::LegacyUniqueIDBDatabase::filenameForDatabaseName):
(WebKit::LegacyUniqueIDBDatabase::databaseFilenameIdentifier):
(WebKit::LegacyUniqueIDBDatabase::canShareDatabases):
(WebKit::LegacyUniqueIDBDatabase::registerConnection):
(WebKit::LegacyUniqueIDBDatabase::unregisterConnection):
(WebKit::LegacyUniqueIDBDatabase::shutdown):
(WebKit::LegacyUniqueIDBDatabase::shutdownBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didShutdownBackingStore):
(WebKit::LegacyUniqueIDBDatabase::deleteDatabase):
(WebKit::LegacyUniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
(WebKit::LegacyUniqueIDBDatabase::openBackingStoreAndReadMetadata):
(WebKit::LegacyUniqueIDBDatabase::didOpenBackingStoreAndReadMetadata):
(WebKit::LegacyUniqueIDBDatabase::openTransaction):
(WebKit::LegacyUniqueIDBDatabase::beginTransaction):
(WebKit::LegacyUniqueIDBDatabase::commitTransaction):
(WebKit::LegacyUniqueIDBDatabase::resetTransaction):
(WebKit::LegacyUniqueIDBDatabase::rollbackTransaction):
(WebKit::LegacyUniqueIDBDatabase::postTransactionOperation):
(WebKit::LegacyUniqueIDBDatabase::didCompleteTransactionOperation):
(WebKit::LegacyUniqueIDBDatabase::changeDatabaseVersion):
(WebKit::LegacyUniqueIDBDatabase::didChangeDatabaseVersion):
(WebKit::LegacyUniqueIDBDatabase::didCreateObjectStore):
(WebKit::LegacyUniqueIDBDatabase::didDeleteObjectStore):
(WebKit::LegacyUniqueIDBDatabase::didClearObjectStore):
(WebKit::LegacyUniqueIDBDatabase::didCreateIndex):
(WebKit::LegacyUniqueIDBDatabase::didDeleteIndex):
(WebKit::LegacyUniqueIDBDatabase::didCompleteBoolRequest):
(WebKit::LegacyUniqueIDBDatabase::createObjectStore):
(WebKit::LegacyUniqueIDBDatabase::deleteObjectStore):
(WebKit::LegacyUniqueIDBDatabase::clearObjectStore):
(WebKit::LegacyUniqueIDBDatabase::createIndex):
(WebKit::LegacyUniqueIDBDatabase::deleteIndex):
(WebKit::LegacyUniqueIDBDatabase::putRecord):
(WebKit::LegacyUniqueIDBDatabase::getRecord):
(WebKit::LegacyUniqueIDBDatabase::openCursor):
(WebKit::LegacyUniqueIDBDatabase::cursorAdvance):
(WebKit::LegacyUniqueIDBDatabase::cursorIterate):
(WebKit::LegacyUniqueIDBDatabase::count):
(WebKit::LegacyUniqueIDBDatabase::deleteRange):
(WebKit::LegacyUniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::LegacyUniqueIDBDatabase::beginBackingStoreTransaction):
(WebKit::LegacyUniqueIDBDatabase::commitBackingStoreTransaction):
(WebKit::LegacyUniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::LegacyUniqueIDBDatabase::rollbackBackingStoreTransaction):
(WebKit::LegacyUniqueIDBDatabase::changeDatabaseVersionInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::createObjectStoreInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::deleteObjectStoreInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::clearObjectStoreInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::createIndexInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::deleteIndexInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::putRecordInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didPutRecordInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didGetRecordFromBackingStore):
(WebKit::LegacyUniqueIDBDatabase::openCursorInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didOpenCursorInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::advanceCursorInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didAdvanceCursorInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::iterateCursorInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didIterateCursorInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::countInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didCountInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::deleteRangeInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didDeleteRangeInBackingStore):
(WebKit::LegacyUniqueIDBDatabase::didEstablishTransaction):
(WebKit::LegacyUniqueIDBDatabase::didResetTransaction):
(WebKit::LegacyUniqueIDBDatabase::resetAllTransactions):
(WebKit::LegacyUniqueIDBDatabase::finalizeRollback):
(WebKit::LegacyUniqueIDBDatabase::absoluteDatabaseDirectory):
(WebKit::LegacyUniqueIDBDatabase::postMainThreadTask):
(WebKit::LegacyUniqueIDBDatabase::performNextMainThreadTask):
(WebKit::LegacyUniqueIDBDatabase::postDatabaseTask):
(WebKit::LegacyUniqueIDBDatabase::performNextDatabaseTask):
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabase.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h.
(WebKit::LegacyUniqueIDBDatabase::create):
(WebKit::LegacyUniqueIDBDatabase::identifier):
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.cpp: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp.
(WebKit::LegacyUniqueIDBDatabaseIdentifier::LegacyUniqueIDBDatabaseIdentifier):
(WebKit::LegacyUniqueIDBDatabaseIdentifier::isHashTableDeletedValue):
(WebKit::LegacyUniqueIDBDatabaseIdentifier::hash):
(WebKit::LegacyUniqueIDBDatabaseIdentifier::isNull):
(WebKit::LegacyUniqueIDBDatabaseIdentifier::isolatedCopy):
(WebKit::operator==):
* DatabaseProcess/IndexedDB/LegacyUniqueIDBDatabaseIdentifier.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h.
(WebKit::LegacyUniqueIDBDatabaseIdentifier::databaseName):
(WebKit::LegacyUniqueIDBDatabaseIdentifier::openingOrigin):
(WebKit::LegacyUniqueIDBDatabaseIdentifier::mainFrameOrigin):
(WebKit::LegacyUniqueIDBDatabaseIdentifierHash::hash):
(WebKit::LegacyUniqueIDBDatabaseIdentifierHash::equal):
(WebKit::LegacyUniqueIDBDatabaseIdentifierHashTraits::isEmptyValue):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
* Shared/WebCrossThreadCopier.cpp:
(WebCore::LegacyUniqueIDBDatabaseIdentifier>::copy):
(WebCore::UniqueIDBDatabaseIdentifier>::copy): Deleted.
* Shared/WebCrossThreadCopier.h:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoSpread operator should be allowed when not the first argument of parameter list
keith_miller@apple.com [Thu, 18 Feb 2016 01:17:36 +0000 (01:17 +0000)]
Spread operator should be allowed when not the first argument of parameter list
https://bugs.webkit.org/show_bug.cgi?id=152721

Reviewed by Saam Barati.

Source/JavaScriptCore:

Spread arguments to functions should now be ES6 compliant. Before we
would only take a spread operator if it was the sole argument to a
function. Additionally, we would not use the Symbol.iterator on the
object to generate the arguments. Instead we would do a loop up to the
length mapping indexed properties to the corresponding argument. We fix
both these issues by doing an AST transformation from foo(...a, b, ...c, d)
to foo(...[...a, b, ...c, d]) (where the spread on the rhs uses the
old spread semantics). This solution has the downside of requiring the
allocation of another object and copying each element twice but avoids a
large change to the vm calling convention.

* interpreter/Interpreter.cpp:
(JSC::loadVarargs):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createElementList):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseArguments):
(JSC::Parser<LexerType>::parseArgument):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/Parser.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createElementList):
* tests/es6.yaml:
* tests/stress/spread-calling.js: Added.
(testFunction):
(testEmpty):
(makeObject):
(otherIterator.return.next):
(otherIterator):
(totalIter):
(throwingIter.return.next):
(throwingIter):
(i.catch):

LayoutTests:

Update tests with new semantics of spread calling. Additionally,
adjust benchmarks to run in a more reasonable time now that
spread is implemented correctly.

* js/basic-spread-expected.txt:
* js/parser-syntax-check-expected.txt:
* js/regress/script-tests/deltablue-varargs.js:
(deltaBlue):
* js/regress/script-tests/varargs-construct.js:
* js/script-tests/basic-spread.js:
* js/script-tests/parser-syntax-check.js:

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

5 years agoRemove a wrong cast in RemoteInspector::receivedSetupMessage
bburg@apple.com [Thu, 18 Feb 2016 01:05:56 +0000 (01:05 +0000)]
Remove a wrong cast in RemoteInspector::receivedSetupMessage
https://bugs.webkit.org/show_bug.cgi?id=154361
<rdar://problem/24709281>

Reviewed by Joseph Pecoraro.

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::receivedSetupMessage):
Not only is this cast unnecessary (the constructor accepts the base class),
but it is wrong since the target could be an automation target. Remove it.

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

5 years agoRemove WebContextSupplement::shouldTerminate, it's no longer used
andersca@apple.com [Thu, 18 Feb 2016 01:03:28 +0000 (01:03 +0000)]
Remove WebContextSupplement::shouldTerminate, it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=154367

Reviewed by Sam Weinig.

* UIProcess/WebContextSupplement.h:
(WebKit::WebContextSupplement::shouldTerminate): Deleted.
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::shouldTerminate): Deleted.
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::shouldTerminate): Deleted.

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

5 years agoRename FTLB3Blah to FTLBlah
fpizlo@apple.com [Thu, 18 Feb 2016 00:42:36 +0000 (00:42 +0000)]
Rename FTLB3Blah to FTLBlah
https://bugs.webkit.org/show_bug.cgi?id=154365

Rubber stamped by Geoffrey Garen, Benjamin Poulain, Awesome Kling, and Saam Barati.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* ftl/FTLB3Compile.cpp: Removed.
* ftl/FTLB3Output.cpp: Removed.
* ftl/FTLB3Output.h: Removed.
* ftl/FTLCompile.cpp: Copied from Source/JavaScriptCore/ftl/FTLB3Compile.cpp.
* ftl/FTLOutput.cpp: Copied from Source/JavaScriptCore/ftl/FTLB3Output.cpp.
* ftl/FTLOutput.h: Copied from Source/JavaScriptCore/ftl/FTLB3Output.h.

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

5 years agoRemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchro...
bburg@apple.com [Thu, 18 Feb 2016 00:37:50 +0000 (00:37 +0000)]
RemoteInspector deadlocks if _WKAutomationDelegate creates/registers a target synchronously
https://bugs.webkit.org/show_bug.cgi?id=154359
<rdar://problem/24708897>

Reviewed by Joseph Pecoraro.

RemoteInspector always grabs a lock whenever receiving or sending XPC messages. If it
forwards a new session request via _WKAutomationDelegate, and the client synchronously
creates and registers a session, then RemoteInspector will try to grab the lock again
while adding the session to its registry, causing a deadlock.

* UIProcess/Cocoa/AutomationClient.mm:
(WebKit::AutomationClient::requestAutomationSession): Add a dispatch_async() to
protect clients from accidentally deadlocking. They shouldn't have to care about
RemoteInspector's locking mechanisms.

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

5 years agoRemove LLVM dependencies from WebKit
fpizlo@apple.com [Thu, 18 Feb 2016 00:11:21 +0000 (00:11 +0000)]
Remove LLVM dependencies from WebKit
https://bugs.webkit.org/show_bug.cgi?id=154323

Reviewed by Antti Koivisto and Benjamin Poulain.

Source/JavaScriptCore:

We have switched all ports that use the FTL JIT to using B3 as the backend. This renders all
LLVM-related code dead, including the disassembler, which was only reachable when you were on
a platform that already had an in-tree disassembler.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGCommon.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::compileTimeStats):
* disassembler/ARM64Disassembler.cpp:
(JSC::tryToDisassemble):
* disassembler/ARMv7Disassembler.cpp:
(JSC::tryToDisassemble):
* disassembler/Disassembler.cpp:
(JSC::disassemble):
(JSC::disassembleAsynchronously):
* disassembler/Disassembler.h:
(JSC::tryToDisassemble):
* disassembler/LLVMDisassembler.cpp: Removed.
* disassembler/LLVMDisassembler.h: Removed.
* disassembler/UDis86Disassembler.cpp:
(JSC::tryToDisassembleWithUDis86):
* disassembler/UDis86Disassembler.h:
(JSC::tryToDisassembleWithUDis86):
* disassembler/X86Disassembler.cpp:
(JSC::tryToDisassemble):
* ftl/FTLAbbreviatedTypes.h:
* ftl/FTLAbbreviations.h: Removed.
* ftl/FTLAbstractHeap.cpp:
(JSC::FTL::AbstractHeap::decorateInstruction):
(JSC::FTL::AbstractHeap::dump):
(JSC::FTL::AbstractField::dump):
(JSC::FTL::IndexedAbstractHeap::IndexedAbstractHeap):
(JSC::FTL::IndexedAbstractHeap::~IndexedAbstractHeap):
(JSC::FTL::IndexedAbstractHeap::baseIndex):
(JSC::FTL::IndexedAbstractHeap::dump):
(JSC::FTL::NumberedAbstractHeap::NumberedAbstractHeap):
(JSC::FTL::NumberedAbstractHeap::dump):
(JSC::FTL::AbsoluteAbstractHeap::AbsoluteAbstractHeap):
(JSC::FTL::AbstractHeap::tbaaMetadataSlow): Deleted.
* ftl/FTLAbstractHeap.h:
(JSC::FTL::AbstractHeap::AbstractHeap):
(JSC::FTL::AbstractHeap::heapName):
(JSC::FTL::IndexedAbstractHeap::atAnyIndex):
(JSC::FTL::NumberedAbstractHeap::atAnyNumber):
(JSC::FTL::AbsoluteAbstractHeap::atAnyAddress):
(JSC::FTL::AbstractHeap::tbaaMetadata): Deleted.
* ftl/FTLAbstractHeapRepository.cpp:
(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLB3Compile.cpp:
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::Output):
(JSC::FTL::Output::check):
(JSC::FTL::Output::load):
(JSC::FTL::Output::store):
* ftl/FTLB3Output.h:
* ftl/FTLCommonValues.cpp:
(JSC::FTL::CommonValues::CommonValues):
(JSC::FTL::CommonValues::initializeConstants):
* ftl/FTLCommonValues.h:
(JSC::FTL::CommonValues::initialize): Deleted.
* ftl/FTLCompile.cpp: Removed.
* ftl/FTLCompileBinaryOp.cpp: Removed.
* ftl/FTLCompileBinaryOp.h: Removed.
* ftl/FTLDWARFDebugLineInfo.cpp: Removed.
* ftl/FTLDWARFDebugLineInfo.h: Removed.
* ftl/FTLDWARFRegister.cpp: Removed.
* ftl/FTLDWARFRegister.h: Removed.
* ftl/FTLDataSection.cpp: Removed.
* ftl/FTLDataSection.h: Removed.
* ftl/FTLExceptionHandlerManager.cpp: Removed.
* ftl/FTLExceptionHandlerManager.h: Removed.
* ftl/FTLExceptionTarget.cpp:
* ftl/FTLExceptionTarget.h:
* ftl/FTLExitThunkGenerator.cpp: Removed.
* ftl/FTLExitThunkGenerator.h: Removed.
* ftl/FTLFail.cpp:
(JSC::FTL::fail):
* ftl/FTLInlineCacheDescriptor.h: Removed.
* ftl/FTLInlineCacheSize.cpp: Removed.
* ftl/FTLInlineCacheSize.h: Removed.
* ftl/FTLIntrinsicRepository.cpp: Removed.
* ftl/FTLIntrinsicRepository.h: Removed.
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::initializeB3Code):
(JSC::FTL::JITCode::initializeB3Byproducts):
(JSC::FTL::JITCode::initializeAddressForCall):
(JSC::FTL::JITCode::contains):
(JSC::FTL::JITCode::ftl):
(JSC::FTL::JITCode::liveRegistersToPreserveAtExceptionHandlingCallSite):
(JSC::FTL::JITCode::initializeExitThunks): Deleted.
(JSC::FTL::JITCode::addHandle): Deleted.
(JSC::FTL::JITCode::addDataSection): Deleted.
(JSC::FTL::JITCode::exitThunks): Deleted.
* ftl/FTLJITCode.h:
(JSC::FTL::JITCode::b3Code):
(JSC::FTL::JITCode::handles): Deleted.
(JSC::FTL::JITCode::dataSections): Deleted.
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::codeSize):
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
* ftl/FTLJSCall.cpp: Removed.
* ftl/FTLJSCall.h: Removed.
* ftl/FTLJSCallBase.cpp: Removed.
* ftl/FTLJSCallBase.h: Removed.
* ftl/FTLJSCallVarargs.cpp: Removed.
* ftl/FTLJSCallVarargs.h: Removed.
* ftl/FTLJSTailCall.cpp: Removed.
* ftl/FTLJSTailCall.h: Removed.
* ftl/FTLLazySlowPath.cpp:
(JSC::FTL::LazySlowPath::LazySlowPath):
(JSC::FTL::LazySlowPath::generate):
* ftl/FTLLazySlowPath.h:
(JSC::FTL::LazySlowPath::createGenerator):
(JSC::FTL::LazySlowPath::patchableJump):
(JSC::FTL::LazySlowPath::done):
(JSC::FTL::LazySlowPath::usedRegisters):
(JSC::FTL::LazySlowPath::callSiteIndex):
(JSC::FTL::LazySlowPath::stub):
(JSC::FTL::LazySlowPath::patchpoint): Deleted.
* ftl/FTLLink.cpp:
(JSC::FTL::link):
* ftl/FTLLocation.cpp:
(JSC::FTL::Location::forValueRep):
(JSC::FTL::Location::dump):
(JSC::FTL::Location::forStackmaps): Deleted.
* ftl/FTLLocation.h:
(JSC::FTL::Location::forRegister):
(JSC::FTL::Location::forIndirect):
(JSC::FTL::Location::forConstant):
(JSC::FTL::Location::kind):
(JSC::FTL::Location::hasReg):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::LowerDFGToLLVM):
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::createPhiVariables):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileUpsilon):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePhi):
(JSC::FTL::DFG::LowerDFGToLLVM::compileDoubleConstant):
(JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileStrCat):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithDiv):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithNegate):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitAnd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitOr):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitXor):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitRShift):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitLShift):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBitURShift):
(JSC::FTL::DFG::LowerDFGToLLVM::compilePutById):
(JSC::FTL::DFG::LowerDFGToLLVM::compileGetButterfly):
(JSC::FTL::DFG::LowerDFGToLLVM::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToLLVM::compileTailCall):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileLoadVarargs):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::compileIsUndefined):
(JSC::FTL::DFG::LowerDFGToLLVM::compileIn):
(JSC::FTL::DFG::LowerDFGToLLVM::getById):
(JSC::FTL::DFG::LowerDFGToLLVM::loadButterflyWithBarrier):
(JSC::FTL::DFG::LowerDFGToLLVM::stringsEqual):
(JSC::FTL::DFG::LowerDFGToLLVM::emitRightShiftSnippet):
(JSC::FTL::DFG::LowerDFGToLLVM::allocateCell):
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):
(JSC::FTL::DFG::LowerDFGToLLVM::speculate):
(JSC::FTL::DFG::LowerDFGToLLVM::callCheck):
(JSC::FTL::DFG::LowerDFGToLLVM::preparePatchpointForExceptions):
(JSC::FTL::DFG::LowerDFGToLLVM::lowBlock):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitDescriptor):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToLLVM::blessSpeculation):
(JSC::FTL::DFG::LowerDFGToLLVM::buildExitArguments):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForAvailability):
(JSC::FTL::DFG::LowerDFGToLLVM::exitValueForNode):
(JSC::FTL::DFG::LowerDFGToLLVM::probe):
(JSC::FTL::DFG::LowerDFGToLLVM::crash):
(JSC::FTL::DFG::LowerDFGToLLVM::compileUntypedBinaryOp): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::emitOSRExitCall): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::callStackmap): Deleted.
* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExitDescriptor::OSRExitDescriptor):
(JSC::FTL::OSRExitDescriptor::validateReferences):
(JSC::FTL::OSRExitDescriptor::emitOSRExit):
(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):
(JSC::FTL::OSRExit::OSRExit):
(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::gatherRegistersToSpillForCallIfException): Deleted.
(JSC::FTL::OSRExit::spillRegistersToSpillSlot): Deleted.
(JSC::FTL::OSRExit::recoverRegistersFromSpillSlot): Deleted.
(JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck): Deleted.
(JSC::FTL::OSRExit::willArriveAtOSRExitFromCallOperation): Deleted.
(JSC::FTL::OSRExit::needsRegisterRecoveryOnGenericUnwindOSRExitPath): Deleted.
* ftl/FTLOSRExit.h:
(JSC::FTL::OSRExit::considerAddingAsFrequentExitSite):
(JSC::FTL::OSRExitDescriptorImpl::OSRExitDescriptorImpl): Deleted.
* ftl/FTLOSRExitCompilationInfo.h: Removed.
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileRecovery):
(JSC::FTL::compileStub):
(JSC::FTL::compileFTLOSRExit):
* ftl/FTLOSRExitHandle.cpp:
* ftl/FTLOSRExitHandle.h:
* ftl/FTLOutput.cpp: Removed.
* ftl/FTLOutput.h: Removed.
* ftl/FTLPatchpointExceptionHandle.cpp:
* ftl/FTLPatchpointExceptionHandle.h:
* ftl/FTLStackMaps.cpp: Removed.
* ftl/FTLStackMaps.h: Removed.
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
(JSC::FTL::State::~State):
(JSC::FTL::State::dumpState): Deleted.
* ftl/FTLState.h:
* ftl/FTLUnwindInfo.cpp: Removed.
* ftl/FTLUnwindInfo.h: Removed.
* ftl/FTLValueRange.cpp:
(JSC::FTL::ValueRange::decorateInstruction):
* ftl/FTLValueRange.h:
(JSC::FTL::ValueRange::ValueRange):
(JSC::FTL::ValueRange::begin):
(JSC::FTL::ValueRange::end):
* ftl/FTLWeight.h:
(JSC::FTL::Weight::value):
(JSC::FTL::Weight::frequencyClass):
(JSC::FTL::Weight::scaleToTotal):
* llvm/InitializeLLVM.cpp: Removed.
* llvm/InitializeLLVM.h: Removed.
* llvm/InitializeLLVMMac.cpp: Removed.
* llvm/InitializeLLVMPOSIX.cpp: Removed.
* llvm/InitializeLLVMPOSIX.h: Removed.
* llvm/LLVMAPI.cpp: Removed.
* llvm/LLVMAPI.h: Removed.
* llvm/LLVMAPIFunctions.h: Removed.
* llvm/LLVMHeaders.h: Removed.
* llvm/library/LLVMAnchor.cpp: Removed.
* llvm/library/LLVMExports.cpp: Removed.
* llvm/library/LLVMOverrides.cpp: Removed.
* llvm/library/config_llvm.h: Removed.

Source/WTF:

* wtf/Platform.h:

Tools:

* Scripts/copy-webkitlibraries-to-product-directory:
(isContentOfFileEqualToString):
(fileContains): Deleted.
(buildLLVM): Deleted.
(symlinkLLVMLibrariesIfNeeded): Deleted.

WebKitLibraries:

* LLVMIncludesElCapitan.tar.bz2: Removed.
* LLVMIncludesIOS9.tar.bz2: Removed.
* LLVMIncludesMavericks.tar.bz2: Removed.
* LLVMIncludesYosemite.tar.bz2: Removed.
* LLVMLibrariesElCapitan.tar.bz2: Removed.
* LLVMLibrariesIOS9.tar.bz2: Removed.
* LLVMLibrariesMavericks.tar.bz2: Removed.
* LLVMLibrariesYosemite.tar.bz2: Removed.

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