AX: iOS: VoiceOver gets hung on some websites consistently.
https://bugs.webkit.org/show_bug.cgi?id=139331

Reviewed by Mario Sanchez Prada.

iFrames are attachments on iOS, but they do not have attachment views. As a result,
WebCore would return incorrect information for the element count and index of children elements.

No tests. Bug only manifests itself when iOS accessibility frameworks call into WebCore.

* accessibility/AccessibilityMockObject.h:
(WebCore::AccessibilityMockObject::isDetachedFromParent):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isDetachedFromParent):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ResourceHandle::loadsBlocked()
https://bugs.webkit.org/show_bug.cgi?id=139401

Reviewed by Daniel Bates.

This hasn't returned true since Leopard, so get rid of it.

* page/Chrome.cpp:
(WebCore::Chrome::canRunModalNow):
* platform/network/ResourceHandle.h:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::loadsBlocked): Deleted.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::loadsBlocked): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Change expectations for two accessibility layout tests.
https://bugs.webkit.org/show_bug.cgi?id=139399

Unreviewed gardening.

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-12-08

* platform/efl/accessibility/roles-exposed-expected.txt:
* platform/efl/accessibility/table-sections-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a stubbed out method for clearing out the website data store
https://bugs.webkit.org/show_bug.cgi?id=139404

Reviewed by Antti Koivisto.

Source/WebKit2:

Add stubbed out method that just calls the completion handler.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):

Tools:

Add a debug menu item for testing clearing of website data.

* MiniBrowser/mac/MainMenu.xib:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController clearWebsiteData:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] UserMedia Permission Request API
https://bugs.webkit.org/show_bug.cgi?id=136449

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Very basic constraints validation support in the GStreamer
MediaStreamCenter. This is needed so the GTK C API tests using the
getUserMedia() API would not time out.

* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
(WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer):
(WebCore::MediaStreamCenterGStreamer::validateRequestConstraints):
(WebCore::MediaStreamCenterGStreamer::createMediaStream):

Source/WebKit2:

* PlatformGTK.cmake: GTK-specific new files.
* UIProcess/API/gtk/WebKitUIClient.cpp:  DecidePolicy handler
implementation for UserMediaPermissionRequest.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp: Added,
WebKitGTK API for UserMediaPermissionRequest, very similar to the
one used for Geolocation.
(webkitUserMediaPermissionRequestAllow):
(webkitUserMediaPermissionRequestDeny):
(webkit_permission_request_interface_init):
(webkitUserMediaPermissionRequestDispose):
(webkit_user_media_permission_get_media_types):
(webkitUserMediaPermissionRequestGetProperty):
(webkit_user_media_permission_request_class_init):
(webkitUserMediaPermissionRequestCreate):
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.h: Added.
* UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Expose new API
in documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/webkit2.h: Expose UserMediaPermissionRequest API.

Tools:

The GTK version of the MiniBrowser has gained UserMedia permission
request support.

* MiniBrowser/gtk/BrowserWindow.c: Show a popup when the page
requires user permission to access audio/video devices.
(permissionRequestDialogCallback):
(webViewDecidePermissionRequest):
(geolocationRequestDialogCallback): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
https://bugs.webkit.org/show_bug.cgi?id=139350

Reviewed by Antti Koivisto.

Stop using ResourceRequest::cachePolicy() in FrameLoader::subresourceCachePolicy()
and use m_loadType instead. ResourceRequest::cachePolicy() is meant to be passed
to the network stack, and isn't supposed to be used as input inside WebCore.

No new tests, no behavior change.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176953 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Let DrawingArea manages setAcceleratedCompositingWindowId
https://bugs.webkit.org/show_bug.cgi?id=117230

Reviewed by Anders Carlsson.

This is a preparation patch for Threaded Coordinated Graphics.

LayerTreeHostGtk uses a native window handle to make glContext for
accelerated compositing. Therefore it is natural for DrawingArea to take
responsibility for the native window handle. And, in Coordinated
Graphics case, WebPage creates LayerTreeHost before receiving a native
window handle from UIProcess. It means we need a method to pass the
native window handle to already created LayerTreeHost.

This patch uses DrawingAreaProxy::setNativeSurfaceHandleForCompositing
instead of WebCoreProxy::setAcceleratedCompositingWindowId to set window
ID for accelerated compositing.

Also, this patch renames the setAcceleratedCompositingWindowId with a
more generic name, setNativeSurfaceHandleForCompositing.

No new tests. No change in functionality.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::setNativeSurfaceHandleForCompositing):
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/WebPageProxy.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::setAcceleratedCompositingWindowId): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::nativeSurfaceHandleForCompositing):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::setNativeSurfaceHandleForCompositing):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::glContext):
(WebKit::LayerTreeHostGtk::initialize):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::setAcceleratedCompositingWindowId): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Attempt to fix the public SDK build after <https://trac.webkit.org/r176841>
(https://bugs.webkit.org/show_bug.cgi?id=139227)

* platform/spi/ios/AVKitSPI.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a stub implementation of WebsiteDataStore::removeDataModifiedSince
https://bugs.webkit.org/show_bug.cgi?id=139406

Reviewed by Antti Koivisto.

Change _WKWebsiteDataStore to call the newly added function.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(toWebsiteDataTypes):
(toSystemClockTime):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeDataModifiedSince):
* UIProcess/WebsiteData/WebsiteDataStore.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Grid items must set a new formatting context.
https://bugs.webkit.org/show_bug.cgi?id=139150

Reviewed by David Hyatt.

Source/WebCore:

Grid item's margins must not collapse even when they may be adjoining to
its content's margins. Also, setting a new formatting context prevents any
'float' protruding content on the adjoining grid items.

This patch also renames the expandsToEncloseOverhangingFloats to be more generic now,
determining whether a new formatting context is set or not. This affects not only to
how floats behave, but whether margins should collapse or not.

Tests: fast/css-grid-layout/float-not-protruding-into-next-grid-item.html
       fast/css-grid-layout/grid-item-margins-not-collapse.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::avoidsFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlock::expandsToEncloseOverhangingFloats): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::MarginInfo::MarginInfo): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::layoutBlock): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::computeOverflow): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::addOverhangingFloats): Using the new createsNewFormattingContext function.
(WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): Using the new createsNewFormattingContext function.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext): Added.
(WebCore::RenderBox::avoidsFloats): Removed checks already defined in the new createsNewFormattingContext function.
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem): Added.

LayoutTests:

Test to verify that grid items's margin don't collapese with its parent's margin
and there is no 'float' protruding content on the adjoining grid items.

I had to rebaseline the form-hides-table.html test because table-caption, which
is supposed to establish a new formatting context, does not allow margins collapsing.

* fast/css-grid-layout/float-not-protruding-into-next-grid-item-expected.html: Added.
* fast/css-grid-layout/float-not-protruding-into-next-grid-item.html: Added.
* fast/css-grid-layout/grid-item-margins-not-collapse-expected.html: Added.
* fast/css-grid-layout/grid-item-margins-not-collapse.html: Added.
* platform/gtk/fast/forms/form-hides-table-expected.txt: Rebaseline needed.
* platform/mac/fast/forms/form-hides-table-expected.txt: Rebaseline needed.
* platform/efl/TestExpectations: Mark fast/forms/form-hides-table-expected as failure.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
URTBF after r176953, add an unreachable return to make GCC happy.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add action menu tests
https://bugs.webkit.org/show_bug.cgi?id=139156

Reviewed by Dean Jackson.

* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::PlatformWebView):
Add a mechanism allowing tests to provide their own WKView subclass.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Added.
Add a file with lots of menu targets.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm: Added.
(-[ActionMenusTestWKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]):
(-[ActionMenusTestWKView runMenuSequenceAtPoint:preMenuNeedsUpdateHandler:preWillOpenMenuHandler:preDidCloseMenuHandler:]):
(-[ActionMenusTestWKView runMenuSequenceAtPoint:preDidCloseMenuHandler:]):
Run through the normal sequence of callbacks, recording what items and type were returned, and give clients a chance to do work at various points in the process.

(-[ActionMenusTestWKView _setOverrideActionMenuItems:]):

(TestWebKitAPI::didFinishLoadForFrameCallback):
(TestWebKitAPI::didFinishDownloadCallback):
(TestWebKitAPI::didCreateDownloadDestinationCallback):
Watch downloads and ensure that they match the content we expect.

(TestWebKitAPI::watchPasteboardForString):
(TestWebKitAPI::watchPasteboardForImage):
(TestWebKitAPI::JavaScriptStringCallbackContext::JavaScriptStringCallbackContext):
(TestWebKitAPI::JavaScriptBoolCallbackContext::JavaScriptBoolCallbackContext):
(TestWebKitAPI::javaScriptStringCallback):
(TestWebKitAPI::javaScriptBoolCallback):
(TestWebKitAPI::callJavaScriptReturningString):
(TestWebKitAPI::callJavaScriptReturningBool):
(TestWebKitAPI::watchEditableAreaForString):
(TestWebKitAPI::waitForVideoReady):
(TestWebKitAPI::retrieveSelection):
(TestWebKitAPI::retrieveSelectionInElement):
(TestWebKitAPI::performMenuItemAtIndexOfTypeAsync):
(TestWebKitAPI::ensureMenuItemAtIndexOfTypeIsDisabled):
Add many helpers for testing, especially to make asynchronous things synchronous.

(TestWebKitAPI::windowPointForTarget):
(TestWebKitAPI::inset8):
Hard-code points in action-menu-targets.html for hit testing.

(TestWebKitAPI::TEST):
Add a suite of tests for WebKit2 action menus.

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenusBundle.mm: Added.
(TestWebKitAPI::createActionContextForPhoneNumber):
(TestWebKitAPI::ActionMenuTest::ActionMenuTest):
(TestWebKitAPI::ActionMenuTest::prepareForActionMenu):
(TestWebKitAPI::ActionMenuTest::actionContextForResultAtPoint):
(TestWebKitAPI::ActionMenuTest::drawRect):
(TestWebKitAPI::ActionMenuTest::didCreatePage):
Add a bundle with a PageOverlay and a actionContextForResultAtPoint override,
so that we can test that infrastructure.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move the callback invocation outside of the loop.

Rubber-stamped by Tim Horton.

* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make deleting all cookies after a given date a little more sane
https://bugs.webkit.org/show_bug.cgi?id=139409

Reviewed by Antti Koivisto.

Source/WebCore:

* WebCore.exp.in:
Update exports.

* platform/network/PlatformCookieJar.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/curl/CookieJarCurl.cpp:
* platform/network/soup/CookieJarSoup.cpp:
Rename deleteAllCookiesModifiedAfterDate to deleteAllCookiesModifiedSince and change it
to take an std::chrono::system_clock::time_point instead.

* platform/network/mac/CookieJarMac.mm:
(WebCore::cookieStorage):
Helper function that returns an NSHTTPCookieStorage given a network session.

(WebCore::deleteAllCookiesModifiedSince):
Get the cookie storage from the network storage instead of just getting the global one.

Source/WebKit2:

Change all the doubles to std::chrono::system_clock::time_points instead.

* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::encode):
(IPC::ArgumentCoder<std::chrono::system_clock::time_point>::decode):
* Platform/IPC/ArgumentCoders.h:
* Scripts/webkit/messages.py:
(headers_for_type):
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
* UIProcess/API/C/WKCookieManager.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedAfterDate): Deleted.
* UIProcess/WebCookieManagerProxy.h:
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::deleteAllCookiesModifiedAfterDate): Deleted.
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert r176293 & r176275

Unreviewed, revert r176293 & r176275 changing the Vector API to use unsigned type
instead of size_t. There is some disagreement regarding the long-term direction
of the API and we shouldn’t leave the API partly transitioned to unsigned type
while making a decision.

Source/JavaScriptCore:

* bytecode/PreciseJumpTargets.cpp:
* replay/EncodedValue.h:

Source/WebCore:

* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::jsArray):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* cssjit/SelectorCompiler.cpp:
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::append):
(WebCore::SearchBuffer::prependContext):
(WebCore::SearchBuffer::search):
(WebCore::SearchBuffer::length):
* html/HTMLFormElement.cpp:
(WebCore::removeFromVector):
* html/parser/HTMLParserIdioms.h:
* html/parser/XSSAuditor.cpp:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

Source/WebKit2:

* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/DataReference.h:

Source/WTF:

* wtf/Forward.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::compare):
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::shouldReallocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::capacity):
(WTF::VectorBufferBase::VectorBufferBase):
(WTF::VectorBuffer::VectorBuffer):
(WTF::VectorBuffer::allocateBuffer):
(WTF::VectorBuffer::tryAllocateBuffer):
(WTF::VectorBuffer::shouldReallocateBuffer):
(WTF::VectorBuffer::reallocateBuffer):
(WTF::VectorBuffer::swap):
(WTF::VectorBuffer::swapInlineBuffer):
(WTF::VectorBuffer::swapInlineBuffers):
(WTF::Vector::Vector):
(WTF::Vector::capacity):
(WTF::Vector::at):
(WTF::Vector::operator[]):
(WTF::OverflowHandler>::find):
(WTF::OverflowHandler>::reverseFind):
(WTF::OverflowHandler>::fill):
(WTF::OverflowHandler>::expandCapacity):
(WTF::OverflowHandler>::tryExpandCapacity):
(WTF::OverflowHandler>::resize):
(WTF::OverflowHandler>::resizeToFit):
(WTF::OverflowHandler>::shrink):
(WTF::OverflowHandler>::grow):
(WTF::OverflowHandler>::reserveCapacity):
(WTF::OverflowHandler>::tryReserveCapacity):
(WTF::OverflowHandler>::reserveInitialCapacity):
(WTF::OverflowHandler>::shrinkCapacity):
(WTF::OverflowHandler>::append):
(WTF::OverflowHandler>::tryAppend):
(WTF::OverflowHandler>::insert):
(WTF::OverflowHandler>::insertVector):
(WTF::OverflowHandler>::remove):
(WTF::OverflowHandler>::reverse):
(WTF::OverflowHandler>::checkConsistency):
* wtf/text/AtomicString.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::adopt):
(WTF::equalIgnoringNullity):
* wtf/text/StringView.h:
(WTF::append):
* wtf/text/WTFString.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/18046692> [iOS] Safari crashes at -[_NSUndoStack popAndInvoke] when trying to undo typing on closed tab
https://bugs.webkit.org/show_bug.cgi?id=139408

Reviewed by Anders Carlsson.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView undoManager]): Override to initialize if necessary and return a unique undo
manager for this instance. This ensures that undoable operations for this webview don’t get
put in other undo managers, and matches UIWebView behavior.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Fix the WebKit build with the public SDK

Source/WebCore:

Include header UIKit.h.

* platform/spi/ios/MediaPlayerSPI.h:

Source/WebKit/mac:

Include header NSURLDownloadSPI.h.

* WebCoreSupport/WebFrameLoaderClient.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Narrow non-breaking space does not fall back to a correct font
https://bugs.webkit.org/show_bug.cgi?id=139335

Reviewed by Enrica Casucci.

Source/WebCore:

Test: fast/text/narrow-non-breaking-space.html

* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::requiresCustomFallbackFont):
(WebCore::FontCache::getCustomFallbackFont):

LayoutTests:

* fast/text/narrow-non-breaking-space-expected.html: Added.
* fast/text/narrow-non-breaking-space.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CFA wrongly assumes that a speculation for SlowPutArrayStorageShape disallows ArrayStorageShape arrays.
<https://webkit.org/b/139327>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

The code generator and runtime slow paths expects otherwise.  This patch fixes
CFA to match the code generator's expectation.

* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::arrayModesThatPassFiltering):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShapes):

LayoutTests:

* js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage-expected.txt: Added.
* js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.html: Added.
* js/script-tests/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.js: Added.
(foo):
(test):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change WTF::currentCPUTime to return std::chrono::microseconds and get rid of currentCPUTimeMS
https://bugs.webkit.org/show_bug.cgi?id=139410

Reviewed by Andreas Kling.

Source/JavaScriptCore:

* API/JSContextRef.cpp:
(JSContextGroupSetExecutionTimeLimit):
(JSContextGroupClearExecutionTimeLimit):
* runtime/Watchdog.cpp:
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::didFire):
(JSC::Watchdog::startCountdownIfNeeded):
(JSC::Watchdog::startCountdown):
* runtime/Watchdog.h:
* runtime/WatchdogMac.cpp:
(JSC::Watchdog::startTimer):

Source/WTF:

* wtf/CurrentTime.cpp:
(WTF::currentCPUTime):
(WTF::currentCPUTimeMS): Deleted.
* wtf/CurrentTime.h:

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