WebKit-https.git
6 years agoMark mathml/very-large-stretchy-operators.html as Slow on newer OS X versions.
ap@apple.com [Thu, 18 Jun 2015 17:11:02 +0000 (17:11 +0000)]
Mark mathml/very-large-stretchy-operators.html as Slow on newer OS X versions.

* platform/mac/TestExpectations:

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

6 years ago[EFL][WK2] Use Web Browser cache model in MiniBrowser
commit-queue@webkit.org [Thu, 18 Jun 2015 15:25:40 +0000 (15:25 +0000)]
[EFL][WK2] Use Web Browser cache model in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=112273

Patch by Christophe Dumez <ch.dumez@sisa.samsung.com> on 2015-06-18
Reviewed by Laszlo Gombos.

Set cache model to EWK_CACHE_MODEL_PRIMARY_WEBBROWSER in EFL's MiniBrowser
instead of leaving the default value (EWK_CACHE_MODEL_DOCUMENT_VIEWER).
This way we have a decent cache capacity and the page cache actually works.

* MiniBrowser/efl/main.c:
(elm_main):

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

6 years agoFix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
ossy@webkit.org [Thu, 18 Jun 2015 14:13:58 +0000 (14:13 +0000)]
Fix missing braces and deprecated declarations warnings in WebKitNotificationProvider.cpp
https://bugs.webkit.org/show_bug.cgi?id=145921

Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::WebKitNotificationProvider):

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

6 years ago[ES6] support default values in deconstruction parameter nodes
saambarati1@gmail.com [Thu, 18 Jun 2015 12:35:32 +0000 (12:35 +0000)]
[ES6] support default values in deconstruction parameter nodes
https://bugs.webkit.org/show_bug.cgi?id=142679

Reviewed by Darin Adler.

Source/JavaScriptCore:

ES6 destructuring allows destructuring properties to assign
default values. A link to the spec:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-destructuring-binding-patterns

This patch implements default values for all places where deconstruction
is allowed besides function parameters. This is because function
parameters are parsed in a separate parser arena than the function
body itself and ExpresionNode's which are default values for
deconstruction parameters will be deallocated by the time we parse the body
of the function. I have opened a bug to address this problem:
https://bugs.webkit.org/show_bug.cgi?id=145995

* bytecompiler/NodesCodegen.cpp:
(JSC::DeconstructionPatternNode::~DeconstructionPatternNode):
(JSC::assignDefaultValueIfUndefined):
(JSC::ArrayPatternNode::bindValue):
(JSC::ArrayPatternNode::emitDirectBinding):
(JSC::ArrayPatternNode::toString):
(JSC::ArrayPatternNode::collectBoundIdentifiers):
(JSC::ObjectPatternNode::bindValue):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::appendArrayPatternSkipEntry):
(JSC::ASTBuilder::appendArrayPatternEntry):
(JSC::ASTBuilder::createObjectPattern):
(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::createBindingLocation):
* parser/Nodes.h:
(JSC::ArrayPatternNode::appendIndex):
(JSC::ObjectPatternNode::appendEntry):
(JSC::ObjectPatternNode::Entry::Entry): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseDeconstructionPattern):
(JSC::Parser<LexerType>::parseDefaultValueForDeconstructionPattern):
(JSC::Parser<LexerType>::parseConstDeclarationList):
* parser/Parser.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):

LayoutTests:

* js/destructuring-assignment-default-values-expected.txt: Added.
* js/destructuring-assignment-default-values.html: Added.
* js/script-tests/destructuring-assignment-default-values.js: Added.
(assert):
(test1):
(arr):
(test2):
(test3):
(test4):
(test5):
(test6):
(test7):
(test8):
(shouldThrow):

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

6 years agoRemove redundant Chromium bug keyword
gyuyoung.kim@webkit.org [Thu, 18 Jun 2015 09:22:48 +0000 (09:22 +0000)]
Remove redundant Chromium bug keyword
https://bugs.webkit.org/show_bug.cgi?id=146097

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._parse_modifiers): Remove BUGCR for TestExpectations.
(TestExpectationLine._format_line): Deleted.

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

6 years ago[Streams API] Implement ReadableStreamReader.releaseLock
calvaris@igalia.com [Thu, 18 Jun 2015 08:58:18 +0000 (08:58 +0000)]
[Streams API] Implement ReadableStreamReader.releaseLock
https://bugs.webkit.org/show_bug.cgi?id=145299

Reviewed by Darin Adler.

Source/WebCore:

Covered by rebased tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
(WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
(WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
* Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
* Modules/streams/ReadableStreamReader.h:
* Modules/streams/ReadableStreamReader.idl:
(WebCore::releaseLock): Deleted.

LayoutTests:

* streams/reference-implementation/readable-stream-expected.txt: Rebasing expectations.
* streams/reference-implementation/readable-stream-reader-expected.txt: Ditto.
* streams/reference-implementation/readable-stream-templated-expected.txt: Ditto.

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

6 years ago[EFL] test_ewk2_context has been failed since r185529
gyuyoung.kim@webkit.org [Thu, 18 Jun 2015 08:57:09 +0000 (08:57 +0000)]
[EFL] test_ewk2_context has been failed since r185529
https://bugs.webkit.org/show_bug.cgi?id=146046

Reviewed by Csaba Osztrogonác.

ewk_context_network_process_model test has been failed since r185529.
This patch modifies the test which is similar to ewk_context_network_process_model
based on multiple process model to fix the failure. Besides ewk_context_network_process_model
seems to be fixed indirectly. So we enable it again.

* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):

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

6 years ago[Streams API] Rejected start promise test does not timeout anymore
calvaris@igalia.com [Thu, 18 Jun 2015 08:35:43 +0000 (08:35 +0000)]
[Streams API] Rejected start promise test does not timeout anymore
https://bugs.webkit.org/show_bug.cgi?id=146065

Reviewed by Darin Adler.

* streams/reference-implementation/readable-stream-expected.txt: Updated expectations to PASS.
* streams/reference-implementation/readable-stream.html: Removed timeout

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

6 years agoGObject and ObjC bindings generator should not generate code for promise-based APIs
youenn.fablet@crf.canon.fr [Thu, 18 Jun 2015 07:02:58 +0000 (07:02 +0000)]
GObject and ObjC bindings generator should not generate code for promise-based APIs
https://bugs.webkit.org/show_bug.cgi?id=146059

Reviewed by Darin Adler.

Covered by rebased expectations.

* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction): Disabling GObject DOM binding for functions returning promises.
* bindings/scripts/CodeGeneratorObjC.pm:
(SkipFunction): Disabling ObjC DOM binding for functions returning promises.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
(webkit_dom_test_obj_get_read_only_long_attr): Deleted.
(webkit_dom_test_obj_get_read_only_string_attr): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
* bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
* bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
(core): Deleted.

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

6 years ago[EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
ryuan.choi@navercorp.com [Thu, 18 Jun 2015 06:30:06 +0000 (06:30 +0000)]
[EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
https://bugs.webkit.org/show_bug.cgi?id=146075

Reviewed by Carlos Garcia Campos.

Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
with request of SoupGenericRequest instead of request itself.
But, request of SoupGenericRequest is nullptr in EFL port because EFL port
does not use m_initiatingPageID.

This patch updates request of SoupGenericRequest although m_initiatingPageID is null.

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupRequest):

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

6 years agoClient may receive began editing callback for already focused text field
dbates@webkit.org [Thu, 18 Jun 2015 04:38:59 +0000 (04:38 +0000)]
Client may receive began editing callback for already focused text field
https://bugs.webkit.org/show_bug.cgi?id=146074
<rdar://problem/21293562>

Reviewed by Darin Adler.

Source/WebCore:

Fixes an issue where the client would be notified that began editing in a text field
for each programmatic DOM focus event dispatched at the text field regardless of
whether the field was focused. The client should only be notified that began editing
exactly once when a text field becomes focused (either programmatically or by user interaction).

* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
(WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
text field becomes newly focused.
* html/TextFieldInputType.h:

Tools:

Add a unit test to ensure that a client receives exactly one began editing
callback when a text field is newly focused. In particular, dispatching
a DOM focus event at an already focused text field does not dispatch a
began editing callback to the client.

* TestWebKitAPI/Tests/WebKit2/TextFieldDidBeginAndEndEditing.cpp:
(TestWebKitAPI::TEST_F):

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

6 years agoSource/WebKit/win:
commit-queue@webkit.org [Thu, 18 Jun 2015 04:11:05 +0000 (04:11 +0000)]
Source/WebKit/win:
[Win]Implement layoutTestController.dispatchPendingLoadRequests.
https://bugs.webkit.org/show_bug.cgi?id=26481

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

Implement WebView::dispatchPendingLoadRequests() private API for test runner.

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::scaleWebView):
(WebView::dispatchPendingLoadRequests):
* WebView.h:

Tools:
[Win]Implement layoutTestController.dispatchPendingLoadRequests.
https://bugs.webkit.org/show_bug.cgi?id=26481

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

Implement WebView::dispatchPendingLoadRequests() private API for test runner.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::dispatchPendingLoadRequests):
(TestRunner::overridePreference):

LayoutTests:
[Win]Implement layoutTestController.dispatchPendingLoadRequests.
https://bugs.webkit.org/show_bug.cgi?id=26481

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

Implement WebView::dispatchPendingLoadRequests() private API for test runner.

* platform/win/TestExpectations:

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

6 years agoReading the list of analysis tasks is extremely slow
rniwa@webkit.org [Thu, 18 Jun 2015 04:05:50 +0000 (04:05 +0000)]
Reading the list of analysis tasks is extremely slow
https://bugs.webkit.org/show_bug.cgi?id=146086

Reviewed by Darin Adler.

The bug was caused by Ember data requesting manifest.js hundreds of times.
Fetch it ahead of time in each route instead.

* public/v2/app.js:
(App.AnalysisRoute.model):
(App.AnalysisTaskRoute.model):

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

6 years agoAlso turn off long press on link preview.
commit-queue@webkit.org [Thu, 18 Jun 2015 01:05:13 +0000 (01:05 +0000)]
Also turn off long press on link preview.
https://bugs.webkit.org/show_bug.cgi?id=146084

Also turn off long presss gesture when previewing. Turn that back on when preview is completed.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-06-17
Reviewed by Tim Horton.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willPresentPreviewViewController:forPosition:inSourceView:]):
(-[WKContentView didDismissPreviewViewController:committing:]):

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

6 years ago[Content Extensions] Fail to parse invalid arrays
achristensen@apple.com [Thu, 18 Jun 2015 00:51:37 +0000 (00:51 +0000)]
[Content Extensions] Fail to parse invalid arrays
https://bugs.webkit.org/show_bug.cgi?id=146079
rdar://problem/21422649

Reviewed by Benjamin Poulain.

Source/WebCore:

Covered by new and corrected API tests.

* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::loadTrigger):
Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
Correct and add parsing tests with invalid arrays.

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

6 years agoPosition::findParent() should take a reference
jhoneycutt@apple.com [Thu, 18 Jun 2015 00:49:54 +0000 (00:49 +0000)]
Position::findParent() should take a reference
https://bugs.webkit.org/show_bug.cgi?id=146038

Reviewed by Darin Adler.

* dom/Position.cpp:
(WebCore::Position::containerNode):
(WebCore::Position::parentAnchoredEquivalent):
Pass a reference; there is already a null check.
(WebCore::Position::previous):
Add a missing null check. Code below this expects that node is non-null.
(WebCore::Position::next):
Ditto.
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
Pass a reference.
(WebCore::Position::findParent):
Changed to take a reference.

* dom/Position.h:
Ditto.

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

6 years agoOverflow regions with scroll snap points are not reliably rubber banding
bfulgham@apple.com [Thu, 18 Jun 2015 00:32:33 +0000 (00:32 +0000)]
Overflow regions with scroll snap points are not reliably rubber banding
https://bugs.webkit.org/show_bug.cgi?id=142522
<rdar://problem/20100726>

Reviewed by Darin Adler.

Source/WebCore:

When computing the target scroll destination, update the nearest snap point index
and other bookkeeping, but keep the original gesture target if it would have taken
us beyond either limit of the scroll container.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
to support client API.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h:
(WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
target, and use that instead of our nearest snap point if the gesture takes us past
either extreme of the scroll container.

Source/WebKit2:

Make sure we don't block rubberbanding behavior when a scroll gesture should take us past
the end of the scroll container.

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): Don't adjust
target point if we were going to scroll past the edges of the scroll container.

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

6 years agoWould like a way, in the API, to get notified about a web process crash
andersca@apple.com [Thu, 18 Jun 2015 00:22:23 +0000 (00:22 +0000)]
Would like a way, in the API, to get notified about a web process crash
https://bugs.webkit.org/show_bug.cgi?id=146085
rdar://problem/17358828

Reviewed by Darin Adler.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::processDidCrash):

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

6 years agoSwipe gesture can get stuck, preventing scrolling and other gestures
timothy_horton@apple.com [Thu, 18 Jun 2015 00:03:42 +0000 (00:03 +0000)]
Swipe gesture can get stuck, preventing scrolling and other gestures
https://bugs.webkit.org/show_bug.cgi?id=146088
<rdar://problem/16056087>

Reviewed by Darin Adler.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
Ignore mouse events that come in while we're doing a swipe.
This prevents potentially problematic mouse events (especially context menus)
won't be processed during a swipe, avoiding situations that can cause
the swipe gesture to get stuck.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/NSEventSPI.h: Added.
Add an SPI header.

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

6 years agoMediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
mrajca@apple.com [Thu, 18 Jun 2015 00:01:10 +0000 (00:01 +0000)]
MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
https://bugs.webkit.org/show_bug.cgi?id=146028

Reviewed by Darin Adler.

* Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
* Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
(WebCore::MediaSession::skipToNextTrack):
(WebCore::MediaSession::skipToPreviousTrack):
* Modules/mediasession/MediaSession.h:
* Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
(WebCore::MediaSessionManager::skipToNextTrack):
(WebCore::MediaSessionManager::skipToPreviousTrack):
* Modules/mediasession/MediaSessionManager.h:
* dom/EventNames.h: Added the nexttrack/previoustrack event names.
* page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
(WebCore::Page::handleMediaEvent):

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

6 years agoRemove willSendEventToPlugin() from PluginController.h.
commit-queue@webkit.org [Wed, 17 Jun 2015 23:38:39 +0000 (23:38 +0000)]
Remove willSendEventToPlugin() from PluginController.h.
https://bugs.webkit.org/show_bug.cgi?id=146054

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-06-17
Reviewed by Darin Adler.

PluginController::willSendEventToPlugin() was introduced by http://webkit.org/b/59124.
This method had been used only for WebKit2 on Windows, and no one uses it now.
So we can remove it.

No new tests, no behavior change.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::willSendEventToPlugin): Deleted.
* PluginProcess/PluginControllerProxy.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::willSendEventToPlugin): Deleted.
* WebProcess/Plugins/PluginView.h:

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

6 years agoUpdate ReadMe.md and Install.md per database changes
rniwa@webkit.org [Wed, 17 Jun 2015 23:23:51 +0000 (23:23 +0000)]
Update ReadMe.md and Install.md per database changes
https://bugs.webkit.org/show_bug.cgi?id=146076

Reviewed by Darin Adler.

Updated.

* Install.md:
* ReadMe.md:

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

6 years agoAX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
cfleizach@apple.com [Wed, 17 Jun 2015 23:20:27 +0000 (23:20 +0000)]
AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
https://bugs.webkit.org/show_bug.cgi?id=146066

Reviewed by Darin Adler.

Source/WebCore:

Allow the region role to identify as a landmark type.

Updated test: platform/ios-simulator/accessibility/landmark-types.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):

LayoutTests:

* platform/ios-simulator/accessibility/landmark-type-expected.txt:
* platform/ios-simulator/accessibility/landmark-type.html:

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

6 years agoUnreviewed. Added myself as a committer.
mrajca@apple.com [Wed, 17 Jun 2015 23:02:07 +0000 (23:02 +0000)]
Unreviewed. Added myself as a committer.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years agoRepro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestu...
timothy_horton@apple.com [Wed, 17 Jun 2015 22:47:56 +0000 (22:47 +0000)]
Repro crash when swiping back from a NY Times article @ WebPageProxy::navigationGestureDidEnd
https://bugs.webkit.org/show_bug.cgi?id=146083
<rdar://problem/20974232>

Reviewed by Darin Adler.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
It is possible to get didSameDocumentNavigationForMainFrame *before*
endSwipeGesture, while the user is still interactively swiping. We
cannot remove the snapshot in this case, nor should we start the active
load monitoring timer; all of these things should happen only after the
swipe is completed and we've performed the navigation.

This was particularly bad (a crash instead of just a disappearing snapshot)
because removing the snapshot also causes m_webPageProxyForBackForwardListForCurrentSwipe
to be nulled out, but then it is dereferenced during endSwipeGesture.

Make sure that we never call removeSwipeSnapshotIfReady unless we were actually
waiting to remove the swipe snapshot (because the gesture had completed).
Most callers already did ensure this, but these two did not.

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

6 years agoWeb Inspector: Improve Full Screen support for Web Inspector windows
commit-queue@webkit.org [Wed, 17 Jun 2015 21:38:24 +0000 (21:38 +0000)]
Web Inspector: Improve Full Screen support for Web Inspector windows
https://bugs.webkit.org/show_bug.cgi?id=146036

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

* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter windowDidEnterFullScreen:]):
(-[WKWebInspectorProxyObjCAdapter windowDidExitFullScreen:]):
(WebKit::WebInspectorProxy::platformCanAttach):
(WebKit::WebInspectorProxy::windowFullScreenDidChange):
When entering / leaving full screen update attach availability to
potentially show / hide the frontend's docking buttons.

(WebKit::WebInspectorProxy::createInspectorWindow):
Allow a Web Inspector window to be a full screen auxillary window,
so that if the application with a WebView opens a detached inspector
window it can be shown on the same desktop as the full screen app.
Also, reduce the minimum window size requirements for full screen tiling.

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

6 years agoWeb Inspector: Improve a few more node preview types
commit-queue@webkit.org [Wed, 17 Jun 2015 21:34:22 +0000 (21:34 +0000)]
Web Inspector: Improve a few more node preview types
https://bugs.webkit.org/show_bug.cgi?id=146048

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

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForNodePreview):

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

6 years agoWeb Inspector: Do not show JavaScriptCore builtins in inspector
commit-queue@webkit.org [Wed, 17 Jun 2015 21:34:06 +0000 (21:34 +0000)]
Web Inspector: Do not show JavaScriptCore builtins in inspector
https://bugs.webkit.org/show_bug.cgi?id=146049

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

* debugger/Debugger.cpp:

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

6 years agoWeb Inspector: Show/Hide sidebar buttons have inconsistent highlighted state
commit-queue@webkit.org [Wed, 17 Jun 2015 21:33:32 +0000 (21:33 +0000)]
Web Inspector: Show/Hide sidebar buttons have inconsistent highlighted state
https://bugs.webkit.org/show_bug.cgi?id=145073

Patch by Diego Pino Garcia <dpino@igalia.com> on 2015-06-17
Reviewed by Joseph Pecoraro.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):

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

6 years ago<rdar://problem/19034131> Cleaned up the WebDownload.h framework header.
mitz@apple.com [Wed, 17 Jun 2015 21:32:14 +0000 (21:32 +0000)]
<rdar://problem/19034131> Cleaned up the WebDownload.h framework header.

Reviewed by Anders Carlsson.

* Misc/WebDownload.h: Changed to use USE_APPLE_INTERNAL_SDK instead of __has_include.
* postprocess-headers.sh: Define USE_APPLE_INTERNAL_SDK when postprocessing framework
headers.

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

6 years agoIncrease the popup dismissal time from 100ms to 500ms
rniwa@webkit.org [Wed, 17 Jun 2015 21:27:35 +0000 (21:27 +0000)]
Increase the popup dismissal time from 100ms to 500ms
https://bugs.webkit.org/show_bug.cgi?id=146077

Rubber-stamped by Andreas Kling.

* public/v2/popup.js:
(App.PopupView.scheduleHiding):

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

6 years agoREGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
simon.fraser@apple.com [Wed, 17 Jun 2015 21:08:44 +0000 (21:08 +0000)]
REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
https://bugs.webkit.org/show_bug.cgi?id=146073
rdar://problem/21022203

Reviewed by Tim Horton.

Source/WebCore:

Text controls (text inputs and textareas) need backing store even when empty, because
they need to be able to paint a caret.

Test: compositing/backing/form-controls-backing.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):

LayoutTests:

Dump layers for composited text inputs and textareas.

* compositing/backing/form-controls-backing-expected.txt: Added.
* compositing/backing/form-controls-backing.html: Added.

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

6 years agoSelection cache produces invalid result when ancestor has float element.
zalan@apple.com [Wed, 17 Jun 2015 21:06:58 +0000 (21:06 +0000)]
Selection cache produces invalid result when ancestor has float element.
https://bugs.webkit.org/show_bug.cgi?id=146042
rdar://problem/20604592

Reviewed by Ryosuke Niwa.

Selection cache already takes floats into account, however it's not enough to check current
block against floats. Any of the ancestor's float starting from the selection root block
can impact the selection offsets.

Source/WebCore:

Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html

* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
(WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):

LayoutTests:

* fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float-expected.txt: Added.
* fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html: Added.

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

6 years agoExport VCSUtils::gitTreeDirectory()
dbates@webkit.org [Wed, 17 Jun 2015 20:41:03 +0000 (20:41 +0000)]
Export VCSUtils::gitTreeDirectory()
<rdar://problem/21248901>

Rubber-stamped by Alexey Proskuryakov.

* Scripts/VCSUtils.pm:

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

6 years agoSegmentedVector should waste less memory.
akling@apple.com [Wed, 17 Jun 2015 20:27:22 +0000 (20:27 +0000)]
SegmentedVector should waste less memory.
<https://webkit.org/b/146069>

Reviewed by Anders Carlsson.

We were wasting sizeof(Vector) on every segment in SegmentVector.
The segments were using inline capacity, and would never go beyond it,
so all the size/capacity/out-of-line-buffer metadata was useless.

Change the internal representation to Vector<T[SegmentSize]> instead.
This saves 16 bytes per segment, so lower SegmentSize -> bigger savings!

* wtf/SegmentedVector.h:
(WTF::SegmentedVectorIterator::operator*):
(WTF::SegmentedVectorIterator::operator->):
(WTF::SegmentedVectorIterator::operator++):
(WTF::SegmentedVectorIterator::operator==):
(WTF::SegmentedVectorIterator::operator!=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(WTF::SegmentedVector::at):
(WTF::SegmentedVector::append):
(WTF::SegmentedVector::removeLast):
(WTF::SegmentedVector::grow):
(WTF::SegmentedVector::begin):
(WTF::SegmentedVector::end):
(WTF::SegmentedVector::deleteAllSegments):
(WTF::SegmentedVector::ensureSegmentsFor):
(WTF::SegmentedVector::ensureSegment):
(WTF::SegmentedVector::allocateSegment):
(WTF::SegmentedVectorIterator::operator=): Deleted.
(WTF::SegmentedVector::SegmentedVector): Deleted.

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

6 years agoAX: [ATK] Expose element tag name as an object attribute
jdiggs@igalia.com [Wed, 17 Jun 2015 20:03:13 +0000 (20:03 +0000)]
AX: [ATK] Expose element tag name as an object attribute
https://bugs.webkit.org/show_bug.cgi?id=146062

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Expose the element tag name as an object attribute with name "tag" and
value being the lowercase tag name, both being what Gecko does for ATK.

No new tests. We already have sufficient coverage for AtkObject attributes.
These tests have been updated to reflect the addition of the new attribute.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):

LayoutTests:

The following tests all include the AtkObject attributes of elements. Now that
tag name is exposed, the expectations needed to be updated to reflect the change.

* platform/gtk/accessibility/image-link-expected.txt: Updated.
* platform/gtk/accessibility/image-map2-expected.txt: Updated.
* platform/gtk/accessibility/lists-expected.txt: Updated.
* platform/gtk/accessibility/math-multiscript-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-attributes-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated.
* platform/gtk/accessibility/table-cells-expected.txt: Updated.
* platform/gtk/accessibility/table-detection-expected.txt: Updated.
* platform/gtk/accessibility/table-one-cell-expected.txt: Updated.
* platform/gtk/accessibility/table-sections-expected.txt: Updated.
* platform/gtk/accessibility/table-with-rules-expected.txt: Updated.
* platform/gtk/accessibility/transformed-element-expected.txt: Updated.
* platform/gtk/accessibility/xml-roles-exposed-expected.txt: Updated.

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

6 years agoSafari tabs still have shrunken content after coming out of fullscreen
timothy_horton@apple.com [Wed, 17 Jun 2015 19:23:08 +0000 (19:23 +0000)]
Safari tabs still have shrunken content after coming out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=146037
<rdar://problem/21105960>

Reviewed by Simon Fraser and Darin Adler.

* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::useFixedLayoutDidChange):
(WebKit::WebPageProxy::fixedLayoutSizeDidChange):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
(WebKit::WebPage::setFixedLayoutSize):
Keep the UI process up-to-date when fixed layout is enabled or the size changes.
This is important because these things can change from the Web process side too,
and the UI process uses its (potentially stale) version to do some short-circuiting.
This was causing us to fail to turn off fixed layout when it was turned
on from the Web process side (by TiledCoreAnimationDrawingArea).

* UIProcess/mac/WKViewLayoutStrategy.mm:
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy willChangeLayoutStrategy]):
Reset the view scale, which WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy
makes heavy use of, just like the others.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/ShrinkToFit.mm: Added.
(-[ShrinkToFitNavigationDelegate webView:didFinishNavigation:]):
(TEST):
Add a test that ensures that disabling scale-to-fit mode correctly updates
the page's layout.

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

6 years agoiOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
antti@apple.com [Wed, 17 Jun 2015 19:18:30 +0000 (19:18 +0000)]
iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
https://bugs.webkit.org/show_bug.cgi?id=146072
rdar://problem/21149759

Reviewed by Simon Fraser

There are some scenarios where we end up drawing without web lock due to client or system issues.
This can cause crashes.

* platform/ios/LegacyTileLayer.mm:
(-[LegacyTileLayer setNeedsDisplayInRect:]):
(-[LegacyTileLayer drawInContext:]):

    Ensure we have the web lock when called in main thread (even though we should have it already).

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

6 years ago[JSC] jsSubstring() should have a fast path for 0..baseLength "substrings."
akling@apple.com [Wed, 17 Jun 2015 18:54:13 +0000 (18:54 +0000)]
[JSC] jsSubstring() should have a fast path for 0..baseLength "substrings."
<https://webkit.org/b/146051>

Reviewed by Anders Carlsson.

If asked to make a substring that actually spans the entire base string,
have jsSubstring() just return the base instead of allocating a new JSString.

3% speed-up on Octane/regexp.

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

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

6 years agoCSS scroll snap: defining snap points on axis that does not scroll does not work...
bfulgham@apple.com [Wed, 17 Jun 2015 18:32:24 +0000 (18:32 +0000)]
CSS scroll snap: defining snap points on axis that does not scroll does not work properly
https://bugs.webkit.org/show_bug.cgi?id=146043
<rdar://problem/20125511>

Reviewed by Simon Fraser.

Source/WebCore:

Tested by css3/scroll-snap/scroll-snap-mismatch.html

We always seed the set of scroll snap points with the start and end of the scroll container. This is not
the right behavior if there are no scroll points defined, because we end up creating a snap for the start
and end of the container, and any scroll gesture just takes us across the entire element.

Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
only holds '0', return an empty Vector.
(WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
clear the horizontal (or vertical) snap offsets for the scroll area.

LayoutTests:

* css3/scroll-snap/scroll-snap-mismatch-expected.txt: Added.
* css3/scroll-snap/scroll-snap-mismatch.html: Added.

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

6 years agoUnreviewed, rolling out r185636.
commit-queue@webkit.org [Wed, 17 Jun 2015 17:15:01 +0000 (17:15 +0000)]
Unreviewed, rolling out r185636.
https://bugs.webkit.org/show_bug.cgi?id=146068

Caused many crashes on Windows (Requested by ap on #webkit).

Reverted changeset:

"[Win] Implement WebViewGroup to support
WebView::addxxxToGroup()."
https://bugs.webkit.org/show_bug.cgi?id=145908
http://trac.webkit.org/changeset/185636

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

6 years agoNew test inspector/console/console-table.html frequently times out in debug.
ap@apple.com [Wed, 17 Jun 2015 17:07:06 +0000 (17:07 +0000)]
New test inspector/console/console-table.html frequently times out in debug.

* TestExpectations: Added an expectation.

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

6 years agoUpdate test results after https://bugs.webkit.org/show_bug.cgi?id=145873
ap@apple.com [Wed, 17 Jun 2015 17:03:31 +0000 (17:03 +0000)]
Update test results after https://bugs.webkit.org/show_bug.cgi?id=145873

The changes appear expected, however looking at previous pixel results, we seem
to have a (much much earlier) regression, as small caps are rotated incorrectly.

* platform/mac-mavericks/fast/writing-mode/broken-ideograph-small-caps-expected.png: Copied from LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.png.
* platform/mac-mavericks/fast/writing-mode/broken-ideograph-small-caps-expected.txt: Copied from LayoutTests/platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt.
* platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.png:
* platform/mac/fast/writing-mode/broken-ideograph-small-caps-expected.txt:

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

6 years ago[CSS Grid Layout] We should add performance tests for stretching logic
jfernandez@igalia.com [Wed, 17 Jun 2015 16:45:07 +0000 (16:45 +0000)]
[CSS Grid Layout] We should add performance tests for stretching logic
https://bugs.webkit.org/show_bug.cgi?id=146063

Reviewed by Sergio Villar Senin.

Added a new performance test for Grid Layout to ensure there are no
regressions in the stretching alignment logic.

* Layout/fixed-grid-lots-of-stretched-data.html: Added.

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

6 years ago[Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
mitz@apple.com [Wed, 17 Jun 2015 16:18:04 +0000 (16:18 +0000)]
[Cocoa] Expose UIDelegate::UIClient::close via WKUIDelegate
https://bugs.webkit.org/show_bug.cgi?id=145957

Reviewed by Darin Adler.

Source/WebKit2:

* UIProcess/API/Cocoa/WKUIDelegate.h: Added -webViewDidClose: to the protocol.
* UIProcess/Cocoa/UIDelegate.h: Added a webViewDidClose boolean to the delegate methods struct.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Initialize the webViewDidClose boolean.
(WebKit::UIDelegate::UIClient::close): Changed to call the new delegate method. Left behind
code that calls the old private method if it’s implemented.

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/OpenAndCloseWindow.mm:
(-[OpenAndCloseWindowUIDelegate webViewDidClose:]): Renamed from -_webViewClose:.

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

6 years ago[CSS Grid Layout] Performance tests are using the old syntax
jfernandez@igalia.com [Wed, 17 Jun 2015 16:13:49 +0000 (16:13 +0000)]
[CSS Grid Layout] Performance tests are using the old syntax
https://bugs.webkit.org/show_bug.cgi?id=146061

Reviewed by Sergio Villar Senin.

Adapted tests to the new grid tracks definition syntax.

* Layout/auto-grid-lots-of-data.html:
* Layout/fixed-grid-lots-of-data.html:

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

6 years ago[GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before...
carlosgc@webkit.org [Wed, 17 Jun 2015 15:32:38 +0000 (15:32 +0000)]
[GTK] WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER doesn't disable memory cache when set before the web process is launched
https://bugs.webkit.org/show_bug.cgi?id=146053

Reviewed by Martin Robinson.

The cache is disabled in WebProcess::platformSetCacheModel() when
the cache model is CacheModelDocumentViewer, but it's enabled
again by WebProcess::setMemoryCacheDisabled() when
memoryCacheDisabled creation parameter is processed. We need to
make sure the cache model and memoryCacheDisabled parameters are consistent.

* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Initialize
memoryCacheDisabled parameter to true if memory cache was
explicitly disabled or cache model is CacheModelDocumentViewer.

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

6 years ago[WK2] valueForKey() shouldn't copy the defaults map
zandobersek@gmail.com [Wed, 17 Jun 2015 15:21:19 +0000 (15:21 +0000)]
[WK2] valueForKey() shouldn't copy the defaults map
https://bugs.webkit.org/show_bug.cgi?id=146050

Reviewed by Sam Weinig.

* Shared/WebPreferencesStore.cpp:
(WebKit::valueForKey): Avoid copying the defaults HashMap by binding the return value to a reference.

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

6 years agoAX: input role="spinbutton" gets skipped in voiceover
cfleizach@apple.com [Wed, 17 Jun 2015 14:13:30 +0000 (14:13 +0000)]
AX: input role="spinbutton" gets skipped in voiceover
https://bugs.webkit.org/show_bug.cgi?id=145514

Reviewed by Mario Sanchez Prada.

SpinButton role was added, but left out of iOS.
To prevent this from happening again, explicitly list every role in the switch statement that
determines accessible visibility.

Test: platform/ios-simulator/accessibility/spinbutton.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper isAccessibilityElement]):

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

6 years ago[Streams API] ReadableJSStream should handle promises returned by JS source pull...
youenn.fablet@crf.canon.fr [Wed, 17 Jun 2015 07:45:51 +0000 (07:45 +0000)]
[Streams API] ReadableJSStream should handle promises returned by JS source pull callback
https://bugs.webkit.org/show_bug.cgi?id=145965

Reviewed by Darin Adler.

Source/WebCore:

Implemented asynchronous pulling.
In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
Storing whether to pull automatically when the current pull is finished.

Covered by rebased tests.

* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::pull): stores whether to pull again.
(WebCore::ReadableStream::finishPulling): called when pulling finishes.
* Modules/streams/ReadableStream.h:
* bindings/js/ReadableJSStream.cpp:
(WebCore::createPullResultFulfilledFunction): The promise resolve callback.
(WebCore::ReadableJSStream::doPull): Handling of promise.
* bindings/js/ReadableJSStream.h:

LayoutTests:

Rebasing tests and removing timeout: 50 for test that is passing..

* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream.html:

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

6 years ago32-bit build fix after r185640.
achristensen@apple.com [Wed, 17 Jun 2015 07:07:42 +0000 (07:07 +0000)]
32-bit build fix after r185640.

* dfg/DFGIntegerRangeOptimizationPhase.cpp:
Explicitly cast clamped int64_t to an int.

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

6 years agoVersioning.
bshafiei@apple.com [Wed, 17 Jun 2015 06:56:59 +0000 (06:56 +0000)]
Versioning.

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

6 years agoWebProcess crashes after too many redirect error when there's an active NPAPI plugin
carlosgc@webkit.org [Wed, 17 Jun 2015 06:03:27 +0000 (06:03 +0000)]
WebProcess crashes after too many redirect error when there's an active NPAPI plugin
https://bugs.webkit.org/show_bug.cgi?id=146019

Reviewed by Darin Adler.

This happens with the GTK+ port after a navigation action ends up
in an infinite redirection and the ResourceHandle fails with too
many redirections error. I should actually happen after any error
is reported by the ResourceHnalder before the load is
committed. But tt only happens if there's an active NPAPI
plugin. The problem is that FrameLoader::receivedMainResourceError()
is called recursively because DocumentLoader::stopLoading() ends up
calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
again. DocumentLoader::stopLoading() checks if the document is
still loading, which can happen if the main resource is loading,
if there's any subresource loading or if there's a plugin
loading. So, in case of being loading, those cases are handled
individually to cancel the main resource, or set an error in the
document loader and cancel subresources and plugins, except for
this case of plugins, that mainReceivedError is called instead of
setting cancelled error on the document loader.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoading): If the document is still
loading because there are active plugins, set the cancelled error
on the document instead of calling mainReceivedError again.

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

6 years ago[GTK] Inhibit screen saver when playing full screen video
carlosgc@webkit.org [Wed, 17 Jun 2015 06:00:31 +0000 (06:00 +0000)]
[GTK] Inhibit screen saver when playing full screen video
https://bugs.webkit.org/show_bug.cgi?id=145795

Reviewed by Gustavo Noronha Silva.

Source/WebCore/platform/gtk/po:

* POTFILES.in: Add WebKitWebViewBase.cpp.

Source/WebKit2:

Use Freedesktop.org DBus API to inhibit/unhinibit the screen saver
when entering/leaving fullscreen.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(screenSaverInhibitedCallback):
(webkitWebViewBaseSendInhibitMessageToScreenSaver):
(screenSaverProxyCreatedCallback):
(webkitWebViewBaseInhibitScreenSaver):
(webkitWebViewBaseUninhibitScreenSaver):
(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseExitFullScreen):

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

6 years ago[Streams API] Implement ReadableStream locked property
calvaris@igalia.com [Wed, 17 Jun 2015 06:00:27 +0000 (06:00 +0000)]
[Streams API] Implement ReadableStream locked property
https://bugs.webkit.org/show_bug.cgi?id=146023

Reviewed by Darin Adler.

Source/WebCore:

Covered by rebased tests.

* Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::locked): Renamed isLocked by locked.
* Modules/streams/ReadableStream.idl: Adding locked.
* bindings/js/JSReadableStreamCustom.cpp:
(WebCore::JSReadableStream::getReader): Using isLocked.
* bindings/js/JSReadableStreamReaderCustom.cpp:
(WebCore::constructJSReadableStreamReader): Using isLocked.

LayoutTests:

Rebasing tests.

* streams/reference-implementation/readable-stream-expected.txt:
* streams/reference-implementation/readable-stream-templated-expected.txt:

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

6 years agoFTL should eliminate array bounds checks in loops
fpizlo@apple.com [Wed, 17 Jun 2015 05:31:30 +0000 (05:31 +0000)]
FTL should eliminate array bounds checks in loops
https://bugs.webkit.org/show_bug.cgi?id=145768

Reviewed by Benjamin Poulain.
Source/JavaScriptCore:

This adds a phase that does forward propagation of integer inequalities. This allows us
to do the algebraic reasoning we need to eliminate array bounds checks in loops. It
also eliminates overflow checks on ArithAdd with a constant.

The phase's analysis produces results that are powerful enough to do speculative bounds
check hoisting, but this phase currently only does elimination. We can implement
hoisting later.

On programs that just loop over an array like:

    for (var i = 0; i < array.length; ++i)
        thingy += array[i]

This change is a 60% speed-up.

This is also a ~3% speed-up on Kraken, and it shows various speed-ups on individual
tests in Octane.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGIntegerRangeOptimizationPhase.cpp: Added.
(JSC::DFG::performIntegerRangeOptimization):
* dfg/DFGIntegerRangeOptimizationPhase.h: Added.
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* tests/stress/add-overflows-after-not-equal.js: Added.
* tests/stress/no-abc-skippy-loop.js: Added.
* tests/stress/no-abc-skippy-paired-loop.js: Added.
* tests/stress/sub-overflows-after-not-equal.js: Added.

LayoutTests:

* js/regress/abc-forward-loop-equal-expected.txt: Added.
* js/regress/abc-forward-loop-equal.html: Added.
* js/regress/abc-postfix-backward-loop-expected.txt: Added.
* js/regress/abc-postfix-backward-loop.html: Added.
* js/regress/abc-skippy-loop-expected.txt: Added.
* js/regress/abc-skippy-loop.html: Added.
* js/regress/abc-simple-backward-loop-expected.txt: Added.
* js/regress/abc-simple-backward-loop.html: Added.
* js/regress/abc-simple-forward-loop-expected.txt: Added.
* js/regress/abc-simple-forward-loop.html: Added.
* js/regress/script-tests/abc-forward-loop-equal.js: Added.
* js/regress/script-tests/abc-postfix-backward-loop.js: Added.
* js/regress/script-tests/abc-skippy-loop.js: Added.
* js/regress/script-tests/abc-simple-backward-loop.js: Added.
* js/regress/script-tests/abc-simple-forward-loop.js: Added.

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

6 years agoRemove unused template parameter InlineCapacity from SegmentedVector.
akling@apple.com [Wed, 17 Jun 2015 05:18:21 +0000 (05:18 +0000)]
Remove unused template parameter InlineCapacity from SegmentedVector.
<https://webkit.org/b/146044>

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* bytecode/ArrayProfile.h:
* dfg/DFGCommonData.h:

Source/WTF:

* wtf/SegmentedVector.h:
(WTF::SegmentedVectorIterator::operator=):
(WTF::SegmentedVectorIterator::SegmentedVectorIterator):
(WTF::SegmentedVector::at):

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

6 years agoWeb Inspector: Inspector Scripts evaluated in the page should not be searchable
commit-queue@webkit.org [Wed, 17 Jun 2015 05:11:49 +0000 (05:11 +0000)]
Web Inspector: Inspector Scripts evaluated in the page should not be searchable
https://bugs.webkit.org/show_bug.cgi?id=146040

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-06-16
Reviewed by Darin Adler.

Any script with a __WebInspector source URL will be hidden by the tools.
There were a number of ways the inspector could evaluate script on the page
without getting the sourceURL and therefore not getting hidden. Audit
all cases of Runtime.evaluate, Runtime.callFunctionOn, and
Debugger.evaluateOnCallFrame, to ensure we have an appropriate source URL.

* UserInterface/Base/Utilities.js:
(appendWebInspectorSourceURL):
Helper to append a __WebInspectorInternal__ sourceURL to a string that may
be evaluated directly on the inspected context.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.domNodeResolved):
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted): Deleted.
* UserInterface/Controllers/RuntimeManager.js:
* UserInterface/Models/DOMTree.js:
(WebInspector.DOMTree.prototype._requestRootDOMNode):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
Ensure all cases that evaluate directly on the inspected page / context
have the intenral source URL.

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

6 years agoPurge PassRefPtr with Ref or RefPtr
gyuyoung.kim@webkit.org [Wed, 17 Jun 2015 03:33:26 +0000 (03:33 +0000)]
Purge PassRefPtr with Ref or RefPtr
https://bugs.webkit.org/show_bug.cgi?id=146001

Reviewed by Darin Adler.

As step to remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
If function can't return nullptr, PassRefPtr is changed with Ref. If not, the function
returns RefPtr.

* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::create):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
(WebKit::DatabaseProcessIDBConnection::create):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
(WebKit::UniqueIDBDatabase::create):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::create):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/RemoteNetworkingContext.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::create):
* PluginProcess/WebProcessConnection.h:
* Shared/API/APINumber.h:
(API::Number::create):
* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::createFromString):
(API::SecurityOrigin::create):
* Shared/API/APISerializedScriptValue.h:
(API::SerializedScriptValue::create):
(API::SerializedScriptValue::adopt):
* Shared/APIWebArchive.h:
* Shared/APIWebArchive.mm:
(API::WebArchive::create):
* Shared/APIWebArchiveResource.h:
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::create):
* Shared/AsyncRequest.h:
* UIProcess/API/efl/ewk_url_request_private.h:
(EwkUrlRequest::create):
* UIProcess/API/efl/ewk_url_response_private.h:
(EwkUrlResponse::create):
* UIProcess/API/efl/ewk_url_scheme_request_private.h:
(EwkUrlSchemeRequest::create):
* UIProcess/API/efl/ewk_window_features_private.h:
(EwkWindowFeatures::create):
* UIProcess/API/efl/tests/test_ewk2_object.cpp:
(TestEwkObject1::create):
(TestEwkObject2::create):
* UIProcess/API/gtk/WebKitBatteryProvider.cpp:
(WebKitBatteryProvider::create):
* UIProcess/API/gtk/WebKitBatteryProvider.h:
* UIProcess/API/gtk/WebKitColorChooser.cpp:
(WebKit::WebKitColorChooser::create):
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
(WebKitGeolocationProvider::create):
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::create):
* UIProcess/API/gtk/WebKitNotificationProvider.h:
* UIProcess/GeolocationPermissionRequestProxy.h:
(WebKit::GeolocationPermissionRequestProxy::create):
* UIProcess/InspectorServer/HTTPRequest.h:
(WebKit::HTTPRequest::create):
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
(WebKit::WebSoupCustomProtocolRequestManager::create):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::create):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Notifications/NotificationPermissionRequest.cpp:
(WebKit::NotificationPermissionRequest::create):
* UIProcess/Notifications/NotificationPermissionRequest.h:
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scriptValueCallback):
* UIProcess/WebVibrationProxy.cpp:
(WebKit::WebVibrationProxy::create):
* UIProcess/WebVibrationProxy.h:
* UIProcess/WebViewportAttributes.h:
(WebKit::WebViewportAttributes::create):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::WebsiteDataStore::create):
* UIProcess/WebsiteData/WebsiteDataStore.h:
* UIProcess/gtk/WebColorPickerGtk.cpp:
(WebKit::WebColorPickerGtk::create):
* UIProcess/gtk/WebColorPickerGtk.h:
* UIProcess/gtk/WebContextMenuProxyGtk.h:
(WebKit::WebContextMenuProxyGtk::create):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::create):
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshot::create):
* UIProcess/mac/WebColorPickerMac.h:
* UIProcess/mac/WebColorPickerMac.mm:
(WebKit::WebColorPickerMac::create):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::create):
* UIProcess/mac/WebPopupMenuProxyMac.h:
(WebKit::WebPopupMenuProxyMac::create):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
(WebKit::WebToDatabaseProcessConnection::create):
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::create):
* WebProcess/FullScreen/WebFullScreenManager.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::create):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
(WebKit::InjectedBundleBackForwardList::create):

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

6 years ago[Win] Implement WebViewGroup to support WebView::addxxxToGroup().
commit-queue@webkit.org [Wed, 17 Jun 2015 03:30:51 +0000 (03:30 +0000)]
[Win] Implement WebViewGroup to support WebView::addxxxToGroup().
https://bugs.webkit.org/show_bug.cgi?id=145908

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-16
Reviewed by Brent Fulgham.

Make WebViewGroup class sharing on Mac and Win port.

Source/WebKit:

* WebCoreSupport: Added.
* WebCoreSupport/WebViewGroup.cpp: Copied from Source/WebKit/mac/WebCoreSupport/WebViewGroup.mm.
* WebCoreSupport/WebViewGroup.h: Copied from Source/WebKit/mac/WebCoreSupport/WebViewGroup.h.
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.vcxproj/WebKit/WebKitCommon.props:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* WebCoreSupport/WebViewGroup.h: Removed.
* WebCoreSupport/WebViewGroup.mm: Removed.

Source/WebKit/win:

* WebCoreSupport/WebVisitedLinkStore.cpp:
(visitedLinkStores):
(WebVisitedLinkStore::create):
(WebVisitedLinkStore::WebVisitedLinkStore):
(WebVisitedLinkStore::~WebVisitedLinkStore):
(WebVisitedLinkStore::setShouldTrackVisitedLinks):
(WebVisitedLinkStore::removeAllVisitedLinks):
(WebVisitedLinkStore::singleton): Deleted.
* WebCoreSupport/WebVisitedLinkStore.h:
* WebView.cpp:
(WebView::~WebView):
(WebView::initWithFrame):
(WebView::setGroupName):
(WebView::addVisitedLinks):
* WebView.h:

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

6 years ago[EFL] Unreviewed, EFL gardening on 17th June.
gyuyoung.kim@webkit.org [Wed, 17 Jun 2015 02:54:34 +0000 (02:54 +0000)]
[EFL] Unreviewed, EFL gardening on 17th June.

Follow up gardening since using xvfb on EFL WTR. Unskip passing tests,
mark new crash and failure tests.

* platform/efl/TestExpectations:

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

6 years agoUnreviewed build fix after r185615.
clopez@igalia.com [Wed, 17 Jun 2015 02:18:12 +0000 (02:18 +0000)]
Unreviewed build fix after r185615.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache): Comment the call to the code
removed and write down the bugzilla link for reimplementation.

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

6 years ago[EFL] Remove duplicated PUBLIC argument in OptionsEfl.cmake
ryuan.choi@navercorp.com [Wed, 17 Jun 2015 02:00:33 +0000 (02:00 +0000)]
[EFL] Remove duplicated PUBLIC argument in OptionsEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=146035

Reviewed by Gyuyoung Kim.

* Source/cmake/OptionsEfl.cmake:

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

6 years agoSource/WebCore:
mmaxfield@apple.com [Wed, 17 Jun 2015 01:26:22 +0000 (01:26 +0000)]
Source/WebCore:
REGRESSION(r184899): [Cocoa] font-variant: small-caps is not honored with web fonts
https://bugs.webkit.org/show_bug.cgi?id=145873
<rdar://problem/21314282>

Reviewed by Dean Jackson.

When font-variant: small-caps is applied, we create a smaller version of the original font
and draw capital characters in that smaller font. CGFontRefs do not have an intrinsic size,
and web fonts historically only had a CGFontRef, which means that there was no need to
convert the CGFontRef to be smaller (as opposed to regular fonts, which had a CTFontRef and
therefore needed the conversion). Instead, we just changed m_size, which represents
the size that the text should be drawn in.

However, r184899 gave CTFontRefs to web fonts. This means that now the FontPlatformData's
m_size variable disagreed with the CTFontRef member. The solution here is to unify the web
font and regular font codepaths, and treat them the same throughout.

Note that this patch removes the last use of the m_isCustomFont variable. As soon as we
entirely migrate to CORETEXT_WEB_FONTS, we should delete this variable.

Test: fast/text/small-caps-web-font.html

* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont): Treat web fonts the same as regular fonts.
* platform/text/TextFlags.h: Add a comment regarding teh deletion of m_isCustomFont.

LayoutTests:
font-variant: small-caps is not honored with web fonts
https://bugs.webkit.org/show_bug.cgi?id=145873
<rdar://problem/21314282>

Reviewed by Dean Jackson.

* fast/text/small-caps-web-font-expected.html: Added.
* fast/text/small-caps-web-font.html: Added.

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

6 years agoGet rid of performAPICallbackWithSecurityOriginDataVector
andersca@apple.com [Wed, 17 Jun 2015 01:06:56 +0000 (01:06 +0000)]
Get rid of performAPICallbackWithSecurityOriginDataVector
https://bugs.webkit.org/show_bug.cgi?id=146039

Reviewed by Andreas Kling.

Get rid of performAPICallbackWithSecurityOriginDataVector since it's now no longer used
and add a bunch of includes to make up for SecurityOriginData.h no longer including GenericCallback.h.
* DatabaseProcess/DatabaseProcess.cpp:
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* Shared/SecurityOriginData.cpp:
(WebKit::performAPICallbackWithSecurityOriginDataVector): Deleted.
* Shared/SecurityOriginData.h:
* Shared/WebsiteData/WebsiteData.cpp:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
* WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:

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

6 years agoWeb Inspector: REGRESSION (r171645): up/down key navigation of timeline sidebar tree...
mattbaker@apple.com [Wed, 17 Jun 2015 00:33:06 +0000 (00:33 +0000)]
Web Inspector: REGRESSION (r171645): up/down key navigation of timeline sidebar tree elements is broken when scope bar filters are applied
https://bugs.webkit.org/show_bug.cgi?id=142315

Reviewed by Timothy Hatcher.

TreeOutline's element traversal algorithms have been rewritten to correctly skip over unrevealed tree elements.
Previously traversal would halt after encountering a hidden element. We now use an iterative approach, with
each iteration producing the next (or previous) element, with respect to the last candidate element. Iteration
begins with the current node, and halts once a valid element is found or candidate elements are exhausted.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeElement.prototype.traverseNextTreeElement.shouldSkip):
(WebInspector.TreeElement.prototype.traverseNextTreeElement):
(WebInspector.TreeElement.prototype.traversePreviousTreeElement.shouldSkip):
(WebInspector.TreeElement.prototype.traversePreviousTreeElement):

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

6 years agoUnreviewed build fix attempt on CMake based port after r185623.
ryuan.choi@navercorp.com [Wed, 17 Jun 2015 00:12:56 +0000 (00:12 +0000)]
Unreviewed build fix attempt on CMake based port after r185623.

* CMakeLists.txt:

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

6 years agoInlining in the DFG trashes ByteCodeParser::m_currentInstruction for the calling...
msaboff@apple.com [Wed, 17 Jun 2015 00:06:14 +0000 (00:06 +0000)]
Inlining in the DFG trashes ByteCodeParser::m_currentInstruction for the calling function
https://bugs.webkit.org/show_bug.cgi?id=146029

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Save and restore m_currentInstruction around call to ByteCodeParser::inlineCall() as it will
use m_currentInstruction during its own parsing.  This happens because inlineCall() parses the
inlined callee's bytecodes by calling parseCodeBlock() which calls parseBlock() on each block.
It is in parseBlock() that we set m_currentInstruction to an instruction before we parse it.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::parseBlock): Added an ASSERT to catch this issue.

LayoutTests:

New regression test.

* js/regress-146029-expected.txt: Added.
* js/regress-146029.html: Added.
* js/script-tests/regress-146029.js: Added.
(myPush):
(myPop):
(foo):
(test):

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

6 years agoMove LocalStorageDetails into the local storage database tracker
andersca@apple.com [Tue, 16 Jun 2015 23:30:49 +0000 (23:30 +0000)]
Move LocalStorageDetails into the local storage database tracker
https://bugs.webkit.org/show_bug.cgi?id=146034

Reviewed by Andreas Kling.

* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
(WKKeyValueStorageManagerDeleteAllEntries):
* UIProcess/LocalStorageDetails.h: Removed.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::originDetails):
(WebKit::LocalStorageDatabaseTracker::details): Deleted.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::getLocalStorageDetailsByOrigin): Deleted.
(WebKit::StorageManager::deleteAllLocalStorageEntries): Deleted.
* UIProcess/Storage/StorageManager.h:
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoRemoved the WebKit2SandboxProfiles target.
mitz@apple.com [Tue, 16 Jun 2015 22:56:24 +0000 (22:56 +0000)]
Removed the WebKit2SandboxProfiles target.

Rubber-stamped by Anders Carlsson.

WebKit2SandboxProfiles was just an alias for the Sandbox Profiles target, and it’s not
needed anymore.

* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoFold WebKeyValueStorageManager into WKKeyValueStorageManager
andersca@apple.com [Tue, 16 Jun 2015 22:53:08 +0000 (22:53 +0000)]
Fold WebKeyValueStorageManager into WKKeyValueStorageManager
https://bugs.webkit.org/show_bug.cgi?id=146030

Reviewed by Andreas Kling.

* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetKeyValueStorageManager):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetTypeID):
(WKKeyValueStorageManagerGetOriginKey):
(WKKeyValueStorageManagerGetCreationTimeKey):
(WKKeyValueStorageManagerGetModificationTimeKey):
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
(WKKeyValueStorageManagerDeleteEntriesForOrigin):
(WKKeyValueStorageManagerDeleteAllEntries):
* UIProcess/WebKeyValueStorageManager.cpp: Removed.
(WebKit::WebKeyValueStorageManager::supplementName): Deleted.
(WebKit::WebKeyValueStorageManager::originKey): Deleted.
(WebKit::WebKeyValueStorageManager::creationTimeKey): Deleted.
(WebKit::WebKeyValueStorageManager::modificationTimeKey): Deleted.
(WebKit::WebKeyValueStorageManager::create): Deleted.
(WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): Deleted.
(WebKit::WebKeyValueStorageManager::~WebKeyValueStorageManager): Deleted.
(WebKit::WebKeyValueStorageManager::refWebContextSupplement): Deleted.
(WebKit::WebKeyValueStorageManager::derefWebContextSupplement): Deleted.
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): Deleted.
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin): Deleted.
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): Deleted.
(WebKit::WebKeyValueStorageManager::deleteAllEntries): Deleted.
* UIProcess/WebKeyValueStorageManager.h: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoCMake build fix after r185615.
achristensen@apple.com [Tue, 16 Jun 2015 22:39:29 +0000 (22:39 +0000)]
CMake build fix after r185615.

* CMakeLists.txt:
Remove WebResourceCacheManager from CMake build system.

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

6 years ago[Content Extensions] Implement branch compaction for DFA bytecode.
commit-queue@webkit.org [Tue, 16 Jun 2015 22:29:19 +0000 (22:29 +0000)]
[Content Extensions] Implement branch compaction for DFA bytecode.
https://bugs.webkit.org/show_bug.cgi?id=145619

Patch by Alex Christensen <achristensen@webkit.org> on 2015-06-16
Reviewed by Benjamin Poulain.

Source/WebCore:

This patch adds another pass to the DFABytecodeCompiler which finds where the bytecode from each node
would be if it were compiled with no branch compaction, then uses that as a worst-case value to determine
how many bytes are needed to store the relative jump distance.  Then when linking, it will fill in the
value as it already did, but with a variable size jump.  The jumps are also now signed distances relative to
where the jump is stored.

This patch is covered by existing tests, which have many jumps that are near the -128/127 byte boundary,
and the switch from 16-bit jumps to 32-bit jumps near the -65536/65535 byte boundary is analogous.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::smallestPossibleJumpSize):
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::append):
(WebCore::ContentExtensions::appendZeroes):
(WebCore::ContentExtensions::setBits):
(WebCore::ContentExtensions::appendActionBytecodeSize):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
(WebCore::ContentExtensions::DFABytecodeCompiler::longestPossibleJump):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
(WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
(WebCore::ContentExtensions::DFABytecodeCompiler::compiledNodeMaxBytecodeSize):
(WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
(WebCore::ContentExtensions::DFABytecodeCompiler::checkForRangeMaxBytecodeSize):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
(WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
(WebCore::ContentExtensions::DFABytecodeCompiler::compile):
(WebCore::ContentExtensions::set32Bits): Deleted.
* contentextensions/DFABytecodeCompiler.h:
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::getInstruction):
(WebCore::ContentExtensions::jumpSizeInBytes):
(WebCore::ContentExtensions::getJumpSize):
(WebCore::ContentExtensions::getJumpDistance):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* loader/ResourceLoadInfo.h:

Source/WebKit2:

* UIProcess/API/APIUserContentExtensionStore.h:
Increment version number to reflect changes to bytecode.

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

6 years ago[GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
clopez@igalia.com [Tue, 16 Jun 2015 22:18:39 +0000 (22:18 +0000)]
[GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
https://bugs.webkit.org/show_bug.cgi?id=145701

Reviewed by Darin Adler.

.:

* Source/cmake/OptionsGTK.cmake: Remove conflicting options.

Source/WebCore:

No new tests, no behavior changes.

When building both targets, we have to include the wayland-egl
headers in order to build the Wayland target. This causes that
EGLNativePixmapType and EGLNativeWindowType get defined as
different types than when building only the X11 target.

By type casting them to the ones that are expected, we are able
to build both targets at the same time.

I have done tests (building each target alone as also both targets
at the same time), and everything seems to works as expected.

Once built for both targets, if you try to launch the MiniBrowser
from inside a Wayland compositor (Weston on top of X for example),
it will trigger the X11 target if the DISPLAY environment variable
is set and the environment variable GDK_BACKEND is not set to wayland,
otherwise it will trigger the Wayland target.

* platform/graphics/GLContext.cpp:
(WebCore::GLContext::createContextForWindow): Add type casts. We have
to consider here two different type casts depending on the type of
GLNativeWindowType to avoid a build failure on 32-bits platforms.
The static_cast one was already beeing done as an implicit cast
(from uint64_t to XID), the reinterpret_cast is the new one that
we need to do only when building on both platforms.
* platform/graphics/egl/GLContextEGL.cpp: Add missing include when
building both targets that is required for defining DefaultRootWindow().
(WebCore::GLContextEGL::createPixmapContext): Add type cast.

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

6 years agoUnreviewed, roll out unintended JSC change from https://trac.webkit.org/changeset...
fpizlo@apple.com [Tue, 16 Jun 2015 22:13:19 +0000 (22:13 +0000)]
Unreviewed, roll out unintended JSC change from https://trac.webkit.org/changeset/185425.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasExitSite):
(JSC::CodeBlock::exitProfile):
(JSC::CodeBlock::numberOfExitSites): Deleted.
* bytecode/DFGExitProfile.cpp:
(JSC::DFG::ExitProfile::add):
* bytecode/DFGExitProfile.h:
(JSC::DFG::ExitProfile::hasExitSite):
(JSC::DFG::ExitProfile::size): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::inliningCost):
* runtime/Options.h:

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

6 years agoUnreviewed test update: Add multiple scroll-snap-coordinate test.
bfulgham@apple.com [Tue, 16 Jun 2015 22:08:53 +0000 (22:08 +0000)]
Unreviewed test update: Add multiple scroll-snap-coordinate test.
https://bugs.webkit.org/show_bug.cgi?id=145843

Add a test that confirms that we properly understand scroll-snap-coordinate
declarations with sets of points on a single element.

* css3/scroll-snap/scroll-snap-coordinate.html: Added.
* css3/scroll-snap/scroll-snap-coordinate-expected.txt: Added.

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

6 years agoTweak results for fast/canvas/canvas-too-large-to-draw.html
ap@apple.com [Tue, 16 Jun 2015 22:06:29 +0000 (22:06 +0000)]
Tweak results for fast/canvas/canvas-too-large-to-draw.html

* platform/mac/TestExpectations:

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

6 years agoWebResourceCacheManager is unused, get rid of it
andersca@apple.com [Tue, 16 Jun 2015 21:55:07 +0000 (21:55 +0000)]
WebResourceCacheManager is unused, get rid of it
https://bugs.webkit.org/show_bug.cgi?id=146027

Reviewed by Sam Weinig.

* DerivedSources.make:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebResourceCacheManagerProxy.cpp: Removed.
(WebKit::WebResourceCacheManagerProxy::supplementName): Deleted.
(WebKit::WebResourceCacheManagerProxy::create): Deleted.
(WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Deleted.
(WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy): Deleted.
(WebKit::WebResourceCacheManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebResourceCacheManagerProxy::processDidClose): Deleted.
(WebKit::WebResourceCacheManagerProxy::shouldTerminate): Deleted.
(WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Deleted.
(WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Deleted.
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): Deleted.
(WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Deleted.
* UIProcess/WebResourceCacheManagerProxy.h: Removed.
* UIProcess/WebResourceCacheManagerProxy.messages.in: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ResourceCache/WebResourceCacheManager.cpp: Removed.
(WebKit::WebResourceCacheManager::supplementName): Deleted.
(WebKit::WebResourceCacheManager::WebResourceCacheManager): Deleted.
(WebKit::WebResourceCacheManager::getCacheOrigins): Deleted.
(WebKit::WebResourceCacheManager::returnCacheOrigins): Deleted.
(WebKit::WebResourceCacheManager::clearCacheForOrigin): Deleted.
(WebKit::WebResourceCacheManager::clearCacheForAllOrigins): Deleted.
* WebProcess/ResourceCache/WebResourceCacheManager.h: Removed.
* WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Removed.
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.mm: Removed.
(WebKit::partitionName): Deleted.
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): Deleted.
(WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Deleted.

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

6 years ago[iOS] Crash long pressing on <input type=file>
jhoneycutt@apple.com [Tue, 16 Jun 2015 21:39:57 +0000 (21:39 +0000)]
[iOS] Crash long pressing on <input type=file>
https://bugs.webkit.org/show_bug.cgi?id=146009
<rdar://problem/21234453>

Reviewed by Ryosuke Niwa.

.:

* ManualTests/ios/long-press-input-type-file-crash.html: Added.

Source/WebCore:

* dom/Position.cpp:
(WebCore::Position::atStartOfTree):
(WebCore::Position::atEndOfTree):
Null check the container node before passing it to findParent().

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

6 years agoSkip the new test, fast/canvas/canvas-too-large-to-draw.html
ap@apple.com [Tue, 16 Jun 2015 21:21:01 +0000 (21:21 +0000)]
Skip the new test, fast/canvas/canvas-too-large-to-draw.html

* platform/mac/TestExpectations:

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

6 years agoRollout accidental Xcode project change.
bfulgham@apple.com [Tue, 16 Jun 2015 21:11:52 +0000 (21:11 +0000)]
Rollout accidental Xcode project change.

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

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

6 years agoAX: iOS accessibility tests are not running because we need WKTR support
cfleizach@apple.com [Tue, 16 Jun 2015 20:58:39 +0000 (20:58 +0000)]
AX:  iOS accessibility tests are not running because we need WKTR support
https://bugs.webkit.org/show_bug.cgi?id=145991

Reviewed by Daniel Bates.

Source/WebCore:

Make some minor modifications to support notification handling in WKTR.

* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
(-[WebAccessibilityObjectWrapper description]):
(-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
(-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.

Tools:

Add support for WKTR iOS accessibility.
Utilize the notification handling mechanisms that Mac already uses.
Rename iphone* DRT methods to either use existing methods that are similar, or rename to more generic names.

* DumpRenderTree/AccessibilityUIElement.cpp:
(stringForSelectionCallback):
(getIdentifierCallback):
(getTraitsCallback):
(getElementTextPositionCallback):
(getElementTextLengthCallback):
(AccessibilityUIElement::getJSClass):
(getIPhoneLabelCallback): Deleted.
(getIPhoneHintCallback): Deleted.
(getIPhoneValueCallback): Deleted.
(getIPhoneIdentifierCallback): Deleted.
(getIPhoneTraitsCallback): Deleted.
(getIPhoneIsElementCallback): Deleted.
(getIPhoneElementTextPositionCallback): Deleted.
(getIPhoneElementTextLengthCallback): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::identifier):
(AccessibilityUIElement::traits):
(AccessibilityUIElement::elementTextPosition):
(AccessibilityUIElement::elementTextLength):
(AccessibilityUIElement::description):
(AccessibilityUIElement::orientation):
(AccessibilityUIElement::stringValue):
(AccessibilityUIElement::language):
(AccessibilityUIElement::helpText):
(AccessibilityUIElement::intValue):
(AccessibilityUIElement::isSelected):
(AccessibilityUIElement::isExpanded):
(AccessibilityUIElement::documentURI):
(AccessibilityUIElement::addNotificationListener):
(AccessibilityUIElement::removeNotificationListener):
(AccessibilityUIElement::isFocusable):
(AccessibilityUIElement::isIgnored):
(AccessibilityUIElement::hasPopup):
(AccessibilityUIElement::iphoneLabel): Deleted.
(AccessibilityUIElement::iphoneHint): Deleted.
(AccessibilityUIElement::iphoneValue): Deleted.
(AccessibilityUIElement::iphoneIdentifier): Deleted.
(AccessibilityUIElement::iphoneTraits): Deleted.
(AccessibilityUIElement::iphoneIsElement): Deleted.
(AccessibilityUIElement::iphoneElementTextPosition): Deleted.
(AccessibilityUIElement::iphoneElementTextLength): Deleted.
(_accessibilityNotificationCallback): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isValid):
(WTR::AccessibilityUIElement::identifier):
(WTR::AccessibilityUIElement::traits):
(WTR::AccessibilityUIElement::elementTextPosition):
(WTR::AccessibilityUIElement::elementTextLength):
(WTR::AccessibilityUIElement::stringForSelection):
(WTR::AccessibilityUIElement::elementsForRange):
(WTR::AccessibilityUIElement::increaseTextSelection):
(WTR::AccessibilityUIElement::decreaseTextSelection):
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
(WTR::AccessibilityUIElement::characterAtOffset):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::findAccessibleObjectById):
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(+[NSString stringWithJSStringRef:]):
(-[NSString createJSStringRef]):
(WTR::convertNSArrayToVector):
(WTR::concatenateAttributeAndValue):
(WTR::AccessibilityUIElement::AccessibilityUIElement):
(WTR::AccessibilityUIElement::isEqual):
(WTR::AccessibilityUIElement::headerElementAtIndex):
(WTR::AccessibilityUIElement::linkedElement):
(WTR::AccessibilityUIElement::getLinkedUIElements):
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::convertElementsToObjectArray):
(WTR::AccessibilityUIElement::elementsForRange):
(WTR::AccessibilityUIElement::indexOfChild):
(WTR::AccessibilityUIElement::stringAttributeValue):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::orientation):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::helpText):
(WTR::AccessibilityUIElement::x):
(WTR::AccessibilityUIElement::clickPointX):
(WTR::AccessibilityUIElement::clickPointY):
(WTR::AccessibilityUIElement::intValue):
(WTR::AccessibilityUIElement::minValue):
(WTR::AccessibilityUIElement::maxValue):
(WTR::AccessibilityUIElement::valueDescription):
(WTR::AccessibilityUIElement::isSelected):
(WTR::AccessibilityUIElement::isSelectedOptionActive):
(WTR::AccessibilityUIElement::stringForRange):
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::attributesOfHeader):
(WTR::AccessibilityUIElement::traits):
(WTR::AccessibilityUIElement::identifier):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::rowIndexRange):
(WTR::AccessibilityUIElement::columnIndexRange):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::documentURI):
(WTR::AccessibilityUIElement::assistiveTechnologySimulatedFocus):
(WTR::AccessibilityUIElement::increaseTextSelection):
(WTR::AccessibilityUIElement::decreaseTextSelection):
(WTR::AccessibilityUIElement::stringForSelection):
(WTR::AccessibilityUIElement::elementTextPosition):
(WTR::AccessibilityUIElement::elementTextLength):
(WTR::AccessibilityUIElement::url):
(WTR::AccessibilityUIElement::addNotificationListener):
(WTR::AccessibilityUIElement::removeNotificationListener):
(WTR::AccessibilityUIElement::isFocusable):
(WTR::AccessibilityUIElement::isIgnored):
(WTR::AccessibilityUIElement::hasPopup):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):
(WTR::_CGPathEnumerationIteration):
(WTR::AccessibilityUIElement::pathDescription):
(WTR::AccessibilityUIElement::supportedActions):

LayoutTests:

Alter tests so that it addresses:
   1) Utilize the new AX methods which created new expectations.
   2) There were some expectations checked in with failures that are now fixed.
   3) Remove failing test expectations from TestExpectations.

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/accessibility: Replaced with LayoutTests/platform/ios-simulator/accessibility.
* platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer-expected.txt:
* platform/ios-simulator/accessibility/accessibility-crash-in-axcontainer.html:
* platform/ios-simulator/accessibility/accessibility-hint-expected.txt:
* platform/ios-simulator/accessibility/accessibility-hint.html:
* platform/ios-simulator/accessibility/aria-label-with-internal-text-expected.txt:
* platform/ios-simulator/accessibility/aria-label-with-internal-text.html:
* platform/ios-simulator/accessibility/disabled-states-expected.txt:
* platform/ios-simulator/accessibility/disabled-states.html:
* platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element-expected.txt:
* platform/ios-simulator/accessibility/dom-focus-fires-on-correct-element.html:
* platform/ios-simulator/accessibility/file-upload-button-expected.txt:
* platform/ios-simulator/accessibility/file-upload-button.html:
* platform/ios-simulator/accessibility/focus-change-notifications.html:
* platform/ios-simulator/accessibility/identifier-expected.txt:
* platform/ios-simulator/accessibility/identifier.html:
* platform/ios-simulator/accessibility/internal-link-expected.txt:
* platform/ios-simulator/accessibility/internal-link.html:
* platform/ios-simulator/accessibility/landmark-type-expected.txt:
* platform/ios-simulator/accessibility/landmark-type.html:
* platform/ios-simulator/accessibility/link-with-images-text-expected.txt:
* platform/ios-simulator/accessibility/link-with-images-text.html:
* platform/ios-simulator/accessibility/link-with-only-image-expected.txt:
* platform/ios-simulator/accessibility/link-with-only-image.html:
* platform/ios-simulator/accessibility/math-expected.txt:
* platform/ios-simulator/accessibility/math.html:
* platform/ios-simulator/accessibility/mixed-checkboxes-expected.txt:
* platform/ios-simulator/accessibility/mixed-checkboxes.html:
* platform/ios-simulator/accessibility/no-child-link-header.html:
* platform/ios-simulator/accessibility/non-contiguous-link-expected.txt:
* platform/ios-simulator/accessibility/non-contiguous-link.html:
* platform/ios-simulator/accessibility/password-value-expected.txt:
* platform/ios-simulator/accessibility/password-value.html:
* platform/ios-simulator/accessibility/placeholder-value-expected.txt:
* platform/ios-simulator/accessibility/placeholder-value.html:
* platform/ios-simulator/accessibility/popup-button-value-label-expected.txt:
* platform/ios-simulator/accessibility/popup-button-value-label.html:
* platform/ios-simulator/accessibility/progressbar-expected.txt:
* platform/ios-simulator/accessibility/progressbar.html:
* platform/ios-simulator/accessibility/radio-button-expected.txt:
* platform/ios-simulator/accessibility/radio-button.html:
* platform/ios-simulator/accessibility/secure-text-field.html:
* platform/ios-simulator/accessibility/selected-buttons-expected.txt:
* platform/ios-simulator/accessibility/svg-group-element-with-title-expected.txt:
* platform/ios-simulator/accessibility/svg-group-element-with-title.html:
* platform/ios-simulator/accessibility/tab-role-expected.txt:
* platform/ios-simulator/accessibility/tab-role.html:
* platform/ios-simulator/accessibility/tables-lists-expected.txt:
* platform/ios-simulator/accessibility/tables-lists.html:
* platform/ios-simulator/accessibility/text-marker-list-item-expected.txt:
* platform/ios-simulator/accessibility/text-marker-list-item.html:
* platform/ios-simulator/accessibility/text-marker-validation.html:
* platform/ios-simulator/accessibility/text-role-expected.txt:
* platform/ios-simulator/accessibility/text-role.html:
* platform/ios-simulator/accessibility/textfield-in-axvalue-expected.txt:
* platform/ios-simulator/accessibility/textfield-in-axvalue.html:
* platform/ios-simulator/accessibility/toggle-button.html:
* platform/ios-simulator/accessibility/url-test.html:

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

6 years agoUse NakedPtr<Exception>& to return exception results.
mark.lam@apple.com [Tue, 16 Jun 2015 20:51:04 +0000 (20:51 +0000)]
Use NakedPtr<Exception>& to return exception results.
https://bugs.webkit.org/show_bug.cgi?id=145870

Reviewed by Anders Carlsson and Filip Pizlo.

Source/JavaScriptCore:

Before r185259, calls into the VM takes a JSValue* exception result argument for
returning any uncaught exception that may have been thrown while executing JS code.
As a result, clients of the VM functions will declare a local JSValue exception
result which is automatically initialized to a null value (i.e. the empty value,
not the JS null value).

With r185259, the VM functions were changed to take an Exception*& exception result
instead, and the VM functions are responsible for initializing the exception result
to null if no exception is thrown.

This introduces 2 issues:

1. the VM functions are vulnerable to modifications that may add early returns
   before the exception result is nullified.  This can result in the exception
   result being used without initialization.

2. Previously, a client could technically use the same exception result for more
   than one calls into the VM functions.  If an earlier call sets it to a thrown
   value, the thrown value will stick unless a subsequent call throws a different
   exception.

   With the new Exception*& exception result, the VM functions will always clear
   the exception result before proceeding.  As a result, the client's exception
   result will be null after the second call even though the first call saw an
   exception thrown.  This is a change in the expected behavior.

To fix these issues, we'll introduce a NakedPtr smart pointer whose sole purpose
is to guarantee that the pointer is initialized.  The VM functions will now take
a NakedPtr<Exception>& instead of the Exception*&.  This ensures that the
exception result is initialized.

The VM functions be also reverted to only set the exception result if a new
exception is thrown.

* API/JSBase.cpp:
(JSEvaluateScript):
* API/JSScriptRef.cpp:
* bindings/ScriptFunctionCall.cpp:
(Deprecated::ScriptFunctionCall::call):
* bindings/ScriptFunctionCall.h:
* debugger/Debugger.cpp:
(JSC::Debugger::hasBreakpoint):
* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::thisValue):
(JSC::DebuggerCallFrame::evaluate):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::isValid):
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::createInjectedScript):
* inspector/InspectorEnvironment.h:
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::evaluate):
* inspector/JavaScriptCallFrame.h:
(Inspector::JavaScriptCallFrame::vmEntryGlobalObject):
(Inspector::JavaScriptCallFrame::thisValue):
(Inspector::JavaScriptCallFrame::evaluate):
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::evaluateBreakpointAction):
* jsc.cpp:
(functionRun):
(functionLoad):
(runWithScripts):
(runInteractive):
* runtime/CallData.cpp:
(JSC::call):
* runtime/CallData.h:
* runtime/Completion.cpp:
(JSC::checkSyntax):
(JSC::evaluate):
* runtime/Completion.h:
(JSC::evaluate):

Source/WebCore:

No new WebCore tests because this functionality is already covered by existing tests.
API tests added for WTF::NakedPtr.

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSMainThreadExecState.cpp:
(WebCore::JSMainThreadExecState::didLeaveScriptContext):
(WebCore::functionCallHandlerFromAnyThread):
(WebCore::evaluateHandlerFromAnyThread):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::currentState):
(WebCore::JSMainThreadExecState::call):
(WebCore::JSMainThreadExecState::evaluate):
* bindings/js/JSMutationCallback.cpp:
(WebCore::JSMutationCallback::call):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
* bindings/js/WorkerScriptController.h:
(WebCore::WorkerScriptController::workerGlobalScopeWrapper):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject callWebScriptMethod:withArguments:]):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::importScripts):

Source/WTF:

Introducing the NakedPtr class.

* WTF.xcodeproj/project.pbxproj:
* wtf/NakedPtr.h: Added.
(WTF::NakedPtr::NakedPtr):
(WTF::NakedPtr::get):
(WTF::NakedPtr::clear):
(WTF::NakedPtr::operator*):
(WTF::NakedPtr::operator->):
(WTF::NakedPtr::operator T*):
(WTF::NakedPtr::operator!):
(WTF::NakedPtr::operator bool):
(WTF::=):
(WTF::NakedPtr<T>::swap):
(WTF::swap):

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/NakedPtr.cpp: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::nakedPtrFoo):

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

6 years agoCMake build fix after r185601.
achristensen@apple.com [Tue, 16 Jun 2015 20:50:21 +0000 (20:50 +0000)]
CMake build fix after r185601.

* CMakeLists.txt:
Remove application cache manager classes.

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

6 years agoCSS Scroll Snap - support snapping to nested elements
bfulgham@apple.com [Tue, 16 Jun 2015 20:44:18 +0000 (20:44 +0000)]
CSS Scroll Snap - support snapping to nested elements
https://bugs.webkit.org/show_bug.cgi?id=145843
<rdar://problem/21339581>

Reviewed by Darin Adler.

Source/WebCore:

Tested by css3/scroll-snap/nested-elements.html

The Scroll Snap Point implementation was not properly handling nested elements.
This could be resolved by recursively calling 'appendChildSnapOffsets', but this
seemed like an inefficient approach, especially considering how often this method
is called during various scaling and other operations.

Instead, do the following:
(1) Add a new HashSet to RenderView that holds a collection of RenderElements that
    have scroll-snap-coordinates.
(2) During RenderElement::styleWillChange, register all elements that have the
    scroll-snap-coordinates style with the RenderView.
(3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
    subset of these entries relevant to the current scrolling container, and build up the
    set of scroll-snap-coordinates needed for the current scrolling container.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
for the RenderView to find all elements that are children of the current scrolling container.
Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
* rendering/RenderElement.cpp:
(WebCore::findEnclosingScrollableContainer): New helper function.
(WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
defined, remember it for later so we can use it with the relevant scrolling container
after layout completes.
(WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
RenderView.
(WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
scrolling container for the current object.
* rendering/RenderElement.h:
* rendering/RenderView.cpp:
(WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
(WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
* rendering/RenderView.h:

LayoutTests:

* css3/scroll-snap/nested-elements-expected.txt: Added.
* css3/scroll-snap/nested-elements.html: Added.
* css3/scroll-snap/scroll-snap-offsets-expected.txt: Updated to
  account for 50%/50% scroll-snap-coordinates.

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

6 years agoStop calling into WebResourceCacheManager
andersca@apple.com [Tue, 16 Jun 2015 20:27:51 +0000 (20:27 +0000)]
Stop calling into WebResourceCacheManager
https://bugs.webkit.org/show_bug.cgi?id=146026

Reviewed by Andreas Kling.

Copy the cache clearing code into NetworkProcessCocoa in preparation of getting rid of
the WebResourceCacheManager code.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::fetchDiskCacheEntries):
(WebKit::clearDiskCacheEntries):
(WebKit::cfURLCacheOrigins): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::partitionName):
(WebKit::NetworkProcess::cfURLCacheOrigins):
(WebKit::NetworkProcess::clearCFURLCacheForOrigins):

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

6 years ago[IndexedDB] array index keys are concatenated across cursor lifetime
beidson@apple.com [Tue, 16 Jun 2015 20:24:55 +0000 (20:24 +0000)]
[IndexedDB] array index keys are concatenated across cursor lifetime
<rdar://problem/19684902> and https://bugs.webkit.org/show_bug.cgi?id=138504

Reviewed by Brady Eidson, patch by Mark Dixon <mark@lowla.io>

Source/WebCore:

Tested by:
storage/indexeddb/keypath-arrays.html

IDBKeyData and IDBKeyPath need to clear any existing array values before calling
decodeObjects to update the value of an existing object.

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::decode):
* Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::IDBKeyPath::decode):

LayoutTests:

* storage/indexeddb/keypath-arrays-expected.txt:
* storage/indexeddb/resources/keypath-arrays.js:
Verify that iterating cursors with array keypaths returns correct keys for all
records, not just the first.

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

6 years agoCanvas dimensions should be limited to 4096x4096 pixels on iOS devices.
commit-queue@webkit.org [Tue, 16 Jun 2015 19:50:59 +0000 (19:50 +0000)]
Canvas dimensions should be limited to 4096x4096 pixels on iOS devices.
https://bugs.webkit.org/show_bug.cgi?id=145998

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-06-16
Reviewed by Darin Adler.

Source/WebCore:

The value of MaxCanvasArea should depend on the platform. If the platform
is iOS, the limit should be 64M. Otherwise the limit should be 1G.

Test: fast/canvas/pattern-too-large-to-create-2.html

* html/HTMLCanvasElement.cpp: Change MaxCanvasArea value based on the platform.

* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::graphicsElement): Remove un-implemented constructor.

LayoutTests:

* fast/canvas/canvas-toDataURL-crash-expected.txt:
* fast/canvas/pattern-too-large-to-create-expected.txt: Change the expected
results due to changing the type of MaxCanvasArea from float to unsigned.

* fast/canvas/canvas-too-large-to-draw-expected.txt: Added.
* fast/canvas/canvas-too-large-to-draw.html: Added.

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

6 years agoREGRESSION(r185012): chat frame in Gmail now says "Something's not right"
cdumez@apple.com [Tue, 16 Jun 2015 19:47:49 +0000 (19:47 +0000)]
REGRESSION(r185012): chat frame in Gmail now says "Something's not right"
https://bugs.webkit.org/show_bug.cgi?id=146025
<rdar://problem/21391412>

Reviewed by Darin Adler.

Only throttle timers in non-visible iframes once they've reached the
max nesting level to avoid throttling critical one-shot timers. This is
consistent with the default DOMTimer throttling behavior that is
defined in the specification.

Power-wise, we are mostly interested in DOMTimers that fire frequently
and cause high CPU usage over an extended period of time anyway.

* dom/Document.cpp:
(WebCore::Document::setTimerThrottlingEnabled):
(WebCore::Document::timerAlignmentInterval):
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::timerAlignmentInterval):
* dom/ScriptExecutionContext.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::alignedFireTime):

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

6 years agoGet rid of the application cache manager classes, they are no longer used
andersca@apple.com [Tue, 16 Jun 2015 19:43:11 +0000 (19:43 +0000)]
Get rid of the application cache manager classes, they are no longer used
https://bugs.webkit.org/show_bug.cgi?id=146024

Reviewed by Sam Weinig.

* DerivedSources.make:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/WebApplicationCacheManagerProxy.cpp: Removed.
(WebKit::WebApplicationCacheManagerProxy::supplementName): Deleted.
(WebKit::WebApplicationCacheManagerProxy::create): Deleted.
(WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): Deleted.
(WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy): Deleted.
(WebKit::WebApplicationCacheManagerProxy::processPoolDestroyed): Deleted.
(WebKit::WebApplicationCacheManagerProxy::processDidClose): Deleted.
(WebKit::WebApplicationCacheManagerProxy::shouldTerminate): Deleted.
(WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement): Deleted.
(WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement): Deleted.
(WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): Deleted.
(WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Deleted.
(WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): Deleted.
(WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): Deleted.
* UIProcess/WebApplicationCacheManagerProxy.h: Removed.
* UIProcess/WebApplicationCacheManagerProxy.messages.in: Removed.
* UIProcess/WebProcessPool.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Removed.
(WebKit::WebApplicationCacheManager::supplementName): Deleted.
(WebKit::WebApplicationCacheManager::WebApplicationCacheManager): Deleted.
(WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): Deleted.
(WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): Deleted.
(WebKit::WebApplicationCacheManager::deleteAllEntries): Deleted.
(WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): Deleted.
* WebProcess/ApplicationCache/WebApplicationCacheManager.h: Removed.
* WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Removed.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCache):
(WebKit::InjectedBundle::setAppCacheMaximumSize):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Deleted.

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

6 years agoFTL boolify() UntypedUse is wrong in the masquerades-as-undefined case
fpizlo@apple.com [Tue, 16 Jun 2015 19:17:40 +0000 (19:17 +0000)]
FTL boolify() UntypedUse is wrong in the masquerades-as-undefined case
https://bugs.webkit.org/show_bug.cgi?id=146002

Reviewed by Darin Adler.

* ftl/FTLLowerDFGToLLVM.cpp: Put this in an anonymous namespace. We should have done that all along. It makes it easier to add debug code.
(JSC::FTL::DFG::LowerDFGToLLVM::boolify): Fix the bug.
* tests/stress/logical-not-masquerades.js: Added. This test creates a masquerader so that the watchpoint is invalid. Previously this would fail for the normal object cases.
(foo):

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

6 years agoIDB: Records table migration doesn't work with all versions of SQLite.
beidson@apple.com [Tue, 16 Jun 2015 18:41:21 +0000 (18:41 +0000)]
IDB: Records table migration doesn't work with all versions of SQLite.
https://bugs.webkit.org/show_bug.cgi?id=145993

Reviewed by Darin Adler, provisionally reviewed by Jon Lee.

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::v1RecordsTableSchema):
(WebKit::v1RecordsTableSchemaAlternate):
(WebKit::v2RecordsTableSchema):
(WebKit::v2RecordsTableSchemaAlternate):
(WebKit::createOrMigrateRecordsTableIfNecessary): Check both v1 and v1 Alternate whenever we check for the v1 schema.
  Ditto for the v2 schema. Crash all builds if the current schema is none of these.

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

6 years agoREGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
ap@apple.com [Tue, 16 Jun 2015 18:39:53 +0000 (18:39 +0000)]
REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
https://bugs.webkit.org/show_bug.cgi?id=144399

* TestExpectations: Marked it as flakily crashing.

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

6 years ago[JSC] Pre-bake final Structure for RegExp matches arrays.
akling@apple.com [Tue, 16 Jun 2015 18:38:04 +0000 (18:38 +0000)]
[JSC] Pre-bake final Structure for RegExp matches arrays.
<https://webkit.org/b/146006>

Reviewed by Darin Adler.

Since we always add the "index" and "input" fields to RegExp matches arrays,
cache a finished structure on the global object so we can create these arrays without
starting from scratch with a bare array every time.

10% progression on Octane/regexp (on my MBP.)

* runtime/JSArray.h:
(JSC::JSArray::create):
(JSC::JSArray::tryCreateUninitialized):
(JSC::JSArray::createWithButterfly): Factored out JSArray construction into a helper
so we can call this from RegExpMatchesArray.cpp.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::regExpMatchesArrayStructure): Add a cached Structure for RegExp
subpattern matches arrays.

* runtime/JSObject.h:
(JSC::JSNonFinalObject::finishCreation): Tweak assertion that used to check that
JSNonFinalObjects always start out with zero capacity. Since RegExp matches arrays now
start out with capacity for 2 properties, that won't work. Change it to check that we
don't have inline storage instead, since that should only be used by final objects.

* runtime/RegExpMatchesArray.h:
* runtime/RegExpMatchesArray.cpp:
(JSC::tryCreateUninitializedRegExpMatchesArray): Helper to construct a JSArray with
the cached Structure and a Butterfly with 2 slots of property storage.

(JSC::createRegExpMatchesArray):
(JSC::createRegExpMatchesArrayStructure): Creates the array Structure that gets cached
by the JSGlobalObject.

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

6 years agoLLInt's code path for get_from_scope with case GlobalVarWithVarInjectionChecks has...
saambarati1@gmail.com [Tue, 16 Jun 2015 18:34:24 +0000 (18:34 +0000)]
LLInt's code path for get_from_scope with case GlobalVarWithVarInjectionChecks has dead code
https://bugs.webkit.org/show_bug.cgi?id=144268

Reviewed by Darin Adler.

The call to loadVariable(.) both for 32bit and 64bit is unnecessary.
It grabs a value that is immediately overwritten by a call to getGlobalVar().

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

6 years agoIncorrect order of arguments in initial-letter property
commit-queue@webkit.org [Tue, 16 Jun 2015 17:58:19 +0000 (17:58 +0000)]
Incorrect order of arguments in initial-letter property
https://bugs.webkit.org/show_bug.cgi?id=139667

Patch by sylvain-galineau <galineau@adobe.com> on 2015-06-16
Reviewed by Sam Weinig.

Source/WebCore:

The CSS specification swapped the order of the initial-letters numeric values.
The drop cap's height now comes first, followed by its optional vertical position.
See http://www.w3.org/TR/css-inline/#sizing-drop-initials.

No new tests. Existing tests updated.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.

LayoutTests:

Update initial-letter tests to reflect the value's new ordering, per CSS Inline Layout module.

* fast/css-generated-content/initial-letter-border-padding.html:
* fast/css-generated-content/initial-letter-clearance.html:
* fast/css-generated-content/initial-letter-descender.html:
* fast/css-generated-content/initial-letter-raised.html:
* fast/css-generated-content/initial-letter-sunken.html:

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

6 years agov2 UI should have buttons to breakdown a test
rniwa@webkit.org [Tue, 16 Jun 2015 17:48:47 +0000 (17:48 +0000)]
v2 UI should have buttons to breakdown a test
https://bugs.webkit.org/show_bug.cgi?id=146010

Reviewed by Chris Dumez.

Added buttons beneath each chart pane to add "alternative panes". By default, it shows every platform
as well as "Breakdown" to add all subtests' metrics.

Also removed the metric submenu from tests that had exactly one metric. When a test only measures Time
for example, we make the test itself clickable instead of showing a submenu that only contains one item.

* public/v2/app.js:
(App.ChartsController.addAlternativePanes): Added.
(App.TestProxyForPopup.children): Calls _updateChildren and returns this._children.
(App.TestProxyForPopup.actionName): Added.
(App.TestProxyForPopup.actionArgument): Added.
(App.TestProxyForPopup._updateChildren): Extracted from children. Now also sets _actionName and
_actionArgument in the case there was exactly one metric so that showing submenu is unnecessary.
(App.PaneController.alternativePanes): Added. Returns the list of alternative panes. The platform list
excludes ones that don't have this metric (e.g. iOS doesn't have desktop PLT results) as well as ones
that are already present in the list of panes.
* public/v2/chart-pane.css: Added CSS rules for alternative pane buttons beneath the chart panes.
* public/v2/index.html:
* public/v2/manifest.js:
(App.Metric.childMetrics): Added.

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

6 years agoRemove some unused values.
commit-queue@webkit.org [Tue, 16 Jun 2015 17:45:12 +0000 (17:45 +0000)]
Remove some unused values.
https://bugs.webkit.org/show_bug.cgi?id=145997

Patch by Alex Christensen <achristensen@webkit.org> on 2015-06-16
Reviewed by Gyuyoung Kim.

This patch should have no change in behavior.

* accessibility/AccessibilityObject.cpp:
(WebCore::computeBestScrollOffset):
(WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
(WebCore::AccessibilityObject::scrollToGlobalPoint):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::validateTexFuncData):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateTexFuncData):
* platform/graphics/StringTruncator.cpp:
(WebCore::leftTruncateToBuffer):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::anchorRect):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
Remove unused values.

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

6 years ago[Streams API] Calling controller.error() should trigger storing an undefined error
calvaris@igalia.com [Tue, 16 Jun 2015 17:36:08 +0000 (17:36 +0000)]
[Streams API] Calling controller.error() should trigger storing an undefined error
https://bugs.webkit.org/show_bug.cgi?id=145976

Reviewed by Darin Adler.

Source/WebCore:

Covered by rebased test.

* bindings/js/JSReadableStreamControllerCustom.cpp:
(WebCore::JSReadableStreamController::error): Storing undefined if no error value passed.
* bindings/js/ReadableJSStream.cpp: Removed storeError(ExecState*).
(WebCore::ReadableJSStream::ReadableJSStream):

LayoutTests:

* streams/readable-stream-controller-error-expected.txt: Rebasing expectation as test is passing now.
* streams/readable-stream-reader-read-expected.txt:
* streams/readable-stream-reader-read.html: Adding test for promise rejection without any parameter.

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

6 years agoPurge StyledElement's presentation attribute cache on memory pressure
cdumez@apple.com [Tue, 16 Jun 2015 15:45:57 +0000 (15:45 +0000)]
Purge StyledElement's presentation attribute cache on memory pressure
https://bugs.webkit.org/show_bug.cgi?id=145999
<rdar://problem/21359252>

Reviewed by Andreas Kling.

Purge StyledElement's presentation attribute cache on memory pressure.

* dom/StyledElement.cpp:
(WebCore::presentationAttributeCache):
(WebCore::presentationAttributeCacheCleaner):
(WebCore::StyledElement::clearPresentationAttributeCache):
* dom/StyledElement.h:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseNoncriticalMemory):

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