WebKit-https.git
5 years agoBad position of large operators inside an munderover element
fred.wang@free.fr [Wed, 9 Dec 2015 14:46:11 +0000 (14:46 +0000)]
Bad position of large operators inside an munderover element
https://bugs.webkit.org/show_bug.cgi?id=151916

Reviewed by Alejandro G. Castro.

Source/WebCore:

Test: mathml/opentype/large-operators-munderover.html

* rendering/mathml/RenderMathMLOperator.h:
(WebCore::RenderMathMLOperator::isVertical): Expose the direction of the operator.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout): Remove call to horizontal stretching for vertical operators.

LayoutTests:

* mathml/opentype/large-operators-munderover-expected.txt: Added.
* mathml/opentype/large-operators-munderover.html: Added.

Add a test to verify the position and size of a large operator used as an munderover base.

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

5 years ago[TexMap] TextureMapperTiledBackingStore should notify the ImageObserver of the data...
zandobersek@gmail.com [Wed, 9 Dec 2015 14:03:34 +0000 (14:03 +0000)]
[TexMap] TextureMapperTiledBackingStore should notify the ImageObserver of the data access
https://bugs.webkit.org/show_bug.cgi?id=152053

Reviewed by Martin Robinson.

TextureMapperTiledBackingStore should call ImageObserver::didDraw() on the Image's
observer after updating the tile with the Image's data. This way the CachedImage
(i.e. the observer) can mark the data access with the current timestamp, avoiding
removing the decoded data in the very near future during a cache purge.

* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
(WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):

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

5 years agoSource/WebKit2:
ryuan.choi@navercorp.com [Wed, 9 Dec 2015 14:00:03 +0000 (14:00 +0000)]
Source/WebKit2:
[CoordinatedGraphics][EFL] Fix unhandled web process message when launching MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=152048

Reviewed by Gyuyoung Kim.

WebPage should be initialized before updating preferences.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewInitialize): Deleted.
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
Calls WKViewSetIsActive instead of WKViewInitialize not to change the behavior
of EFL port.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::WebView):
Initialize just before creating WebPage because there is not use case to separate
initializing WebPage from creating in CoordinatedGraphics.
(WebKit::WebView::initialize): Deleted.
* UIProcess/CoordinatedGraphics/WebView.h:

Tools:
[EFL] Fix unhandled web process message when launching MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=152048

Reviewed by Gyuyoung Kim.

* TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp:
(TestWebKitAPI::TEST):

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

5 years ago[GTK] Add API to handle beforeunload events
carlosgc@webkit.org [Wed, 9 Dec 2015 13:32:54 +0000 (13:32 +0000)]
[GTK] Add API to handle beforeunload events
https://bugs.webkit.org/show_bug.cgi?id=139090

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

beforeunload is fired when a page is about to be closed, to ask
the user for confirmation. This happens when reloading a page,
when navigating to another page or when the page is closed by a
user action (a tab or window closed). In the first two cases, the
event is automatically fired by WebCore, but in the case of a user
action we need additional API to ensure the event is fired before
the page is closed. A new script dialog type has been added to
handle beforeunload events and webkit_web_view_try_close() to
allow applications to try to close the page.

* UIProcess/API/gtk/WebKitScriptDialog.cpp:
(webkit_script_dialog_confirm_set_confirmed): BeforeUnloadConfirm
dialogs can also be confirmed.
* UIProcess/API/gtk/WebKitScriptDialog.h: Add
WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM script dialog type.
* UIProcess/API/gtk/WebKitUIClient.cpp: Implement
canRunBeforeUnloadConfirmPanel() and runBeforeUnloadConfirmPanel().
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreateJavaScriptDialog): Add secondaryText optional
parameter for BeforeUnloadConfirm dialogs. Do not set the default
response if the dialog was created without buttons.
(webkitWebViewScriptDialog): Handle
WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM script dialog type to
create a message dialog for beforeunlos events.
(webkit_web_view_class_init): Update documentation of
WebKitWebView::close and WebKitWebView::script-dialog.
(webkitWebViewRunJavaScriptBeforeUnloadConfirm): Emit WebKitWebView::script-dialog.
(webkit_web_view_try_close): Try to close the page.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

Tools:

* MiniBrowser/gtk/BrowserWindow.c:
(browserWindowConstructed):
(browserWindowDeleteEvent):
(browser_window_class_init):
Handle delete-event to prevent the window from being closed when
the page has beforeunload handlers. Use
webkit_web_view_try_close() when the window is requested to be
closed.
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewJavaScriptDialogs):
Add a test case for the WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM
script dialog type.

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

5 years ago[AX][GTK] Accessibility gardening
jdiggs@igalia.com [Wed, 9 Dec 2015 13:30:11 +0000 (13:30 +0000)]
[AX][GTK] Accessibility gardening
https://bugs.webkit.org/show_bug.cgi?id=152062

Unreviewed test gardening.

Skip two tests specific to AX API, mark a test which is timing out, remove passing
test from failures.

* platform/gtk/TestExpectations:

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

5 years ago[Streams API] Import the web-platform-tests directly from the spec
calvaris@igalia.com [Wed, 9 Dec 2015 13:09:20 +0000 (13:09 +0000)]
[Streams API] Import the web-platform-tests directly from the spec
https://bugs.webkit.org/show_bug.cgi?id=152051

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

These are the web platform tests imported directly (or almost) from the Streams API repository. Tests work out
of the box (all but a small flakiness that we are forcing as failure to not disrupt the execution of the rest of
tests).

To make them work we are importing also the service worker test helpers that is used by the tests.

* web-platform-tests/service-workers/service-workers/resources/README.txt: Added.
* web-platform-tests/service-workers/service-workers/resources/test-helpers.js: Added. Imported from the web-platform-tests.
* web-platform-tests/streams-api/README.txt: Added.
* web-platform-tests/streams-api/byte-length-queuing-strategy-expected.txt: Added.
* web-platform-tests/streams-api/byte-length-queuing-strategy.html: Added.
* web-platform-tests/streams-api/byte-length-queuing-strategy.js: Added.
* web-platform-tests/streams-api/count-queuing-strategy-expected.txt: Added.
* web-platform-tests/streams-api/count-queuing-strategy.html: Added.
* web-platform-tests/streams-api/count-queuing-strategy.js: Added.
* web-platform-tests/streams-api/readable-streams/bad-strategies-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/bad-strategies.html: Added.
* web-platform-tests/streams-api/readable-streams/bad-strategies.js: Added.
* web-platform-tests/streams-api/readable-streams/bad-underlying-sources-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/bad-underlying-sources.html: Added.
* web-platform-tests/streams-api/readable-streams/bad-underlying-sources.js: Added.
* web-platform-tests/streams-api/readable-streams/brand-checks-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/brand-checks.html: Added.
* web-platform-tests/streams-api/readable-streams/brand-checks.js: Added.
* web-platform-tests/streams-api/readable-streams/cancel-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/cancel.html: Added. There's a test with a forced failure
because it is flaky.
* web-platform-tests/streams-api/readable-streams/cancel.js: Added.
* web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.html: Added.
* web-platform-tests/streams-api/readable-streams/count-queuing-strategy-integration.js: Added.
* web-platform-tests/streams-api/readable-streams/garbage-collection-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/garbage-collection.html: Added.
* web-platform-tests/streams-api/readable-streams/garbage-collection.js: Added.
* web-platform-tests/streams-api/readable-streams/general-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/general.html: Added.
* web-platform-tests/streams-api/readable-streams/general.js: Added.
* web-platform-tests/streams-api/readable-streams/pipe-through-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/pipe-through.html: Added.
* web-platform-tests/streams-api/readable-streams/pipe-through.js: Added.
* web-platform-tests/streams-api/readable-streams/readable-stream-reader-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/readable-stream-reader.html: Added.
* web-platform-tests/streams-api/readable-streams/readable-stream-reader.js: Added.
* web-platform-tests/streams-api/readable-streams/tee-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/tee.html: Added.
* web-platform-tests/streams-api/readable-streams/tee.js: Added.
* web-platform-tests/streams-api/readable-streams/templated-expected.txt: Added.
* web-platform-tests/streams-api/readable-streams/templated.html: Added.
* web-platform-tests/streams-api/readable-streams/templated.js: Added.
* web-platform-tests/streams-api/resources/rs-test-templates.js: Added.
* web-platform-tests/streams-api/resources/rs-utils.js: Added.
* web-platform-tests/streams-api/resources/test-initializer.js: Added.
* web-platform-tests/streams-api/resources/test-utils.js: Added.

LayoutTests:

Removed the tests that are already imported directly from the spec.

* streams/brand-checks-expected.txt: Added.
* streams/brand-checks.html: Added. This includes some tests that vanished from the spec.
* streams/reference-implementation/bad-strategies-expected.txt:
* streams/reference-implementation/bad-strategies.html:
* streams/reference-implementation/bad-underlying-sources.html: Removed.
* streams/reference-implementation/brand-checks-expected.txt:
* streams/reference-implementation/brand-checks.html:
* streams/reference-implementation/byte-length-queuing-strategy-expected.txt:
* streams/reference-implementation/byte-length-queuing-strategy.html:
* streams/reference-implementation/count-queuing-strategy-expected.txt:
* streams/reference-implementation/count-queuing-strategy.html:
* streams/reference-implementation/readable-stream-cancel.html: Removed.
* streams/reference-implementation/readable-stream-reader.html: Removed.
* streams/reference-implementation/readable-stream-tee.html: Removed.
* streams/reference-implementation/readable-stream-templated-expected.txt:
* streams/reference-implementation/readable-stream-templated.html:
* streams/reference-implementation/readable-stream.html: Removed.

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

5 years ago[AX][GTK] combobox-descendants-orientation-crash.html needs new baseline after r190648
jdiggs@igalia.com [Wed, 9 Dec 2015 12:00:40 +0000 (12:00 +0000)]
[AX][GTK] combobox-descendants-orientation-crash.html needs new baseline after r190648
https://bugs.webkit.org/show_bug.cgi?id=152052

Unreviewed test gardening.

* accessibility/gtk/combobox-descendants-orientation-crash-expected.txt:

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

5 years ago[EFL] Missing to set ignoreTLSError to NetworkProcess
gyuyoung.kim@webkit.org [Wed, 9 Dec 2015 11:43:18 +0000 (11:43 +0000)]
[EFL] Missing to set ignoreTLSError to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=152047

Reviewed by Csaba Osztrogonác.

NetworkProcess has been enabled for all ports since r192796 though, EFL port
didn't send the ignoreTLSError value to NetworkProcess. This has caused failure of EFL API tests
related with ssl feature.

* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::setIgnoreTLSErrors):

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

5 years agoAX: The aria-table-content.html layout test should be more cross-platform friendly
jdiggs@igalia.com [Wed, 9 Dec 2015 11:33:24 +0000 (11:33 +0000)]
AX: The aria-table-content.html layout test should be more cross-platform friendly
https://bugs.webkit.org/show_bug.cgi?id=152002

Reviewed by Mario Sanchez Prada.

Use 'debug' to dump the role instead of 'shouldBe' with a hard-coded role.

* accessibility/aria-table-content-expected.txt: Updated
* accessibility/aria-table-content.html: Updated
* platform/gtk/accessibility/aria-table-content-expected.txt: Added
* platform/efl/accessibility/aria-table-content-expected.txt: Added

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

5 years agoMake MainThreadSharedTimerGtk implementation GLib-specific
zandobersek@gmail.com [Wed, 9 Dec 2015 11:27:56 +0000 (11:27 +0000)]
Make MainThreadSharedTimerGtk implementation GLib-specific
https://bugs.webkit.org/show_bug.cgi?id=152044

Reviewed by Carlos Garcia Campos.

MainThreadSharedTimerGtk has implementation that only directly depends
on GLib, and not GTK+. Because of that it can be moved under
Source/WebCore/platform/glib and slightly renamed.

* PlatformGTK.cmake:
* platform/glib/MainThreadSharedTimerGLib.cpp: Renamed from Source/WebCore/platform/gtk/MainThreadSharedTimerGtk.cpp.
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
(WebCore::MainThreadSharedTimer::setFireInterval):
(WebCore::MainThreadSharedTimer::stop):
(WebCore::MainThreadSharedTimer::invalidate):
* platform/gtk/MainThreadSharedTimerGtk.cpp:
(WebCore::MainThreadSharedTimer::MainThreadSharedTimer): Deleted.
(WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
(WebCore::MainThreadSharedTimer::stop): Deleted.
(WebCore::MainThreadSharedTimer::invalidate): Deleted.

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

5 years ago[TextureMapper] TextureMapperShaderProgram::setMatrix() should use TransformationMatr...
zandobersek@gmail.com [Wed, 9 Dec 2015 11:26:30 +0000 (11:26 +0000)]
[TextureMapper] TextureMapperShaderProgram::setMatrix() should use TransformationMatrix::FloatMatrix4
https://bugs.webkit.org/show_bug.cgi?id=152042

Reviewed by Martin Robinson.

* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::TextureMapperShaderProgram::setMatrix): Instead of manually writing out
the complete matrix in a C array, simply use TransformationMatrix::FloatMatrix4
and fill that via the TransformationMatrix::toColumnMajorFloatArray() method
called on the passed-in TransformationMatrix.

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

5 years ago[Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default...
zandobersek@gmail.com [Wed, 9 Dec 2015 11:22:00 +0000 (11:22 +0000)]
[Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default context
https://bugs.webkit.org/show_bug.cgi?id=152041

Reviewed by Carlos Garcia Campos.

* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Attach the
write-ready source to the thread-default context, instead of implicitly
relying on the default context for dispatching.

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

5 years ago[Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
zandobersek@gmail.com [Wed, 9 Dec 2015 11:20:33 +0000 (11:20 +0000)]
[Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
https://bugs.webkit.org/show_bug.cgi?id=152040

Reviewed by Carlos Garcia Campos.

* platform/network/soup/SocketStreamHandleSoup.cpp:
(WebCore::SocketStreamHandle::stopWaitingForSocketWritability): Instead of
calling the g_source_get_id()-g_source_remove() pair, destroy the source via
the g_source_destroy() call. Also use nullptr to clear out the pointer
variable.

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

5 years ago[AX][GTK] media-emits-object-replacement.html needs new baseline
jdiggs@igalia.com [Wed, 9 Dec 2015 11:12:52 +0000 (11:12 +0000)]
[AX][GTK] media-emits-object-replacement.html needs new baseline
https://bugs.webkit.org/show_bug.cgi?id=152050

Unreviewed test gardening.

* accessibility/gtk/media-emits-object-replacement-expected.txt:

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

5 years agoRefactored initialization code in LoadTrackingTest.
mario@webkit.org [Wed, 9 Dec 2015 11:09:31 +0000 (11:09 +0000)]
Refactored initialization code in LoadTrackingTest.

Rubber-stamped by Carlos Garcia Campos.

Small refactoring to make sure that the state of a LoadTrackingTest
gets properly reset before loading new web content.

* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
(LoadTrackingTest::reset): New, refactored code from *load*() and go*()
functions and reset the remaining local variables.
(LoadTrackingTest::loadURI): Call reset();
(LoadTrackingTest::loadHtml): Ditto.
(LoadTrackingTest::loadPlainText): Ditto.
(LoadTrackingTest::loadBytes): Ditto.
(LoadTrackingTest::loadRequest): Ditto.
(LoadTrackingTest::reload): Ditto.
(LoadTrackingTest::goBack): Ditto.
(LoadTrackingTest::goForward): Ditto.

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

5 years agoMake AudioBusGtk implementation GLib-specific
zandobersek@gmail.com [Wed, 9 Dec 2015 10:35:35 +0000 (10:35 +0000)]
Make AudioBusGtk implementation GLib-specific
https://bugs.webkit.org/show_bug.cgi?id=152049

Reviewed by Philippe Normand.

AudioBusGtk only depends on GLib, so it should be moved to
Source/WebCore/platform/audio/glib and the implementation file
renamed to AudioBusGLib.cpp.

The hard-coded webkitgtk path component can be addressed later.

* PlatformGTK.cmake: Update the build target.
* platform/audio/glib/AudioBusGLib.cpp: Renamed from Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp.
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource): Deleted.

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

5 years agoAX: [EFL] Consider deferring to WebCore Accessibility for table exposure
jdiggs@igalia.com [Wed, 9 Dec 2015 10:09:05 +0000 (10:09 +0000)]
AX: [EFL] Consider deferring to WebCore Accessibility for table exposure
https://bugs.webkit.org/show_bug.cgi?id=144898

Reviewed by Darin Adler.

Source/WebCore:

Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
for WebKitEfl.

No new tests. Several existing tests already cover table exposure. They have
been updated accordingly.

* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):

LayoutTests:

* platform/efl/accessibility/table-detection-expected.txt: Updated to reflect new behavior.
* platform/efl/accessibility/table-hierarchy-expected.txt: Updated to reflect new behavior.
* platform/efl/accessibility/table-one-cell-expected.txt: Updated to reflect new behavior.
* platform/efl/accessibility/table-with-rules-expected.txt: Updated to reflect new behavior.

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

5 years ago[EFL] REGRESSION(r193616): WKPreferences test has been failed since r193616
gyuyoung.kim@webkit.org [Wed, 9 Dec 2015 09:58:07 +0000 (09:58 +0000)]
[EFL] REGRESSION(r193616): WKPreferences test has been failed since r193616
https://bugs.webkit.org/show_bug.cgi?id=151942

Reviewed by Darin Adler.

Source/WebKit2:

As wkpreference settings were moved from EwkView to WKPreferenceEfl, the offline-web-application-cache feature
is enabled by default when running API test. It seems this option should be enabled by MiniBrowser.

* UIProcess/efl/WebPreferencesEfl.cpp:
(WebKit::WebPreferences::platformInitializeStore): Remove to enable web application cache feature here.

Tools:

* MiniBrowser/efl/main.c:
(window_create): Enable offline web application cache feature on MiniBrowser.
(elm_main):

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

5 years ago[CoordinatedGraphics] layerTreeHost always exist in CoordinatedDrawingArea
ryuan.choi@navercorp.com [Wed, 9 Dec 2015 09:42:39 +0000 (09:42 +0000)]
[CoordinatedGraphics] layerTreeHost always exist in CoordinatedDrawingArea
https://bugs.webkit.org/show_bug.cgi?id=151987

Reviewed by Darin Adler.

CoordinatedGraphics using UI side compositor always forces accelerated compositing.
This patch cleans up dead code for layerTreeHost which always exists.

* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::paint): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::setBackingStoreIsDiscardable): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::update): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::discardBackingStoreSoon): Deleted.
(WebKit::CoordinatedDrawingAreaProxy::discardBackingStore): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
(WebKit::CoordinatedDrawingAreaProxy::setBackingStoreIsDiscardable):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea): Deleted.
(WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers): Deleted.
(WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlush): Deleted.
(WebKit::CoordinatedDrawingArea::didUpdate): Deleted.
(WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode): Deleted.
(WebKit::CoordinatedDrawingArea::scheduleDisplay): Deleted.
(WebKit::CoordinatedDrawingArea::displayTimerFired): Deleted.
(WebKit::CoordinatedDrawingArea::display): Deleted.
(WebKit::shouldPaintBoundsRect): Deleted.
(WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:

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

5 years agoSkip storage/indexeddb/index-multientry.html once again
ddkilzer@apple.com [Wed, 9 Dec 2015 06:45:56 +0000 (06:45 +0000)]
Skip storage/indexeddb/index-multientry.html once again

* platform/mac-wk1/TestExpectations: Skip:
- storage/indexeddb/index-multientry.html

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

5 years agoConvert resetAnimValToBaseVal take a reference to a SVGAnimatedType
simon.fraser@apple.com [Wed, 9 Dec 2015 05:48:43 +0000 (05:48 +0000)]
Convert resetAnimValToBaseVal take a reference to a SVGAnimatedType
https://bugs.webkit.org/show_bug.cgi?id=152036

Reviewed by Zalan Bujtas.

Change resetAnimValToBaseVal() to take a reference at the last argument.

* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::resetAnimatedType):
* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedAngle.h:
* svg/SVGAnimatedBoolean.cpp:
(WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedColor.h:
* svg/SVGAnimatedEnumeration.cpp:
(WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedEnumeration.h:
* svg/SVGAnimatedInteger.cpp:
(WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedInteger.h:
* svg/SVGAnimatedIntegerOptionalInteger.cpp:
(WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedIntegerOptionalInteger.h:
* svg/SVGAnimatedLength.cpp:
(WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedLength.h:
* svg/SVGAnimatedLengthList.cpp:
(WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumber.cpp:
(WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimatedNumberList.cpp:
(WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedNumberOptionalNumber.cpp:
(WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedNumberOptionalNumber.h:
* svg/SVGAnimatedPath.cpp:
(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedPath.h:
* svg/SVGAnimatedPointList.cpp:
(WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedPointList.h:
* svg/SVGAnimatedPreserveAspectRatio.cpp:
(WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedRect.cpp:
(WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedRect.h:
* svg/SVGAnimatedString.cpp:
(WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
* svg/SVGAnimatedTransformList.h:
* svg/SVGAnimatedTypeAnimator.h:
(WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
(WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):

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

5 years agoWide tables should be scrollable on narrow mobile screens.
jond@apple.com [Wed, 9 Dec 2015 04:15:09 +0000 (04:15 +0000)]
Wide tables should be scrollable on narrow mobile screens.
https://bugs.webkit.org/show_bug.cgi?id=151941

Reviewed by Timothy Hatcher.

* wp-content/themes/webkit/scripts/global.js:
(inView):
(onMovement):
(updateImages):
(enableScrollableTables):
(update): Deleted.
* wp-content/themes/webkit/style.css:
(.pagination .prev-post):
(article .scrollable):
(.scrollable .scrollable-padding):

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

5 years agoFix Code Style Guidelines code parsing.
jond@apple.com [Wed, 9 Dec 2015 04:10:26 +0000 (04:10 +0000)]
Fix Code Style Guidelines code parsing.
https://bugs.webkit.org/show_bug.cgi?id=152024

Reviewed by Timothy Hatcher.

* wp-content/plugins/table-of-contents.php:

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

5 years agoWeb Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
commit-queue@webkit.org [Wed, 9 Dec 2015 03:58:53 +0000 (03:58 +0000)]
Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
https://bugs.webkit.org/show_bug.cgi?id=152031

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

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
Workaround an existing arrow function issue by moving off of arrow functions here.

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

5 years agoRemove Mavericks-specific code from FontCacheMac
mmaxfield@apple.com [Wed, 9 Dec 2015 03:57:08 +0000 (03:57 +0000)]
Remove Mavericks-specific code from FontCacheMac
https://bugs.webkit.org/show_bug.cgi?id=152030

Reviewed by Simon Fraser.

Mavericks is no longer a supported platform.

No new tests because there is no behavior change.

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::platformLookupFallbackFont):
(WebCore::platformFontWithFamilySpecialCase): Deleted.

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

5 years ago[JSC] Improve how B3 lowers Add() and Sub() on x86
commit-queue@webkit.org [Wed, 9 Dec 2015 02:30:39 +0000 (02:30 +0000)]
[JSC] Improve how B3 lowers Add() and Sub() on x86
https://bugs.webkit.org/show_bug.cgi?id=152026

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-08
Reviewed by Geoffrey Garen.

The assembler was missing some important x86 forms of
ADD and SUB that were making our lowering
unfriendly with register allocation.

First, we were missing a 3 operand version of Add
implement with LEA. As a result, an Add would
be lowered as:
    Move op1->srcDest
    Add op2, srcDest
The problem with such code is that op2 and srcDest
interferes. It is impossible to assign them the same
machine register.

With the new Add form, we have:
    Add op1, op2, dest
without interferences between any of those values.
The add is implement by a LEA without scaling or displacement.

This patch also adds missing forms of Add and Sub with
direct addressing for arguments. This avoids dealing with Tmps
that only exist for those operations.

Finally, the lowering of adding something to itself was updated accordingly.
Such operation is transformed in Shl by 2. The lowering of Shl
was adding an explicit Move, preventing the use of LEA when it
is useful.
Instead of having an explicit move, I changed the direct addressing
forms to only be selected if the two operands are different.
A Move is then added by appendBinOp() if needed.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::add32):
(JSC::MacroAssemblerX86Common::x86Lea32):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::add64):
(JSC::MacroAssemblerX86_64::x86Lea64):
(JSC::MacroAssemblerX86_64::sub64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::addq_rm):
(JSC::X86Assembler::subq_mr):
(JSC::X86Assembler::subq_rm):
(JSC::X86Assembler::subq_im):
(JSC::X86Assembler::leal_mr):
(JSC::X86Assembler::leaq_mr):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testAddArgMem):
(JSC::B3::testAddMemArg):
(JSC::B3::testAddImmMem):
(JSC::B3::testAddArg32):
(JSC::B3::testAddArgMem32):
(JSC::B3::testAddMemArg32):
(JSC::B3::testAddImmMem32):
(JSC::B3::testSubArgMem):
(JSC::B3::testSubMemArg):
(JSC::B3::testSubImmMem):
(JSC::B3::testSubMemImm):
(JSC::B3::testSubMemArg32):
(JSC::B3::testSubArgMem32):
(JSC::B3::testSubImmMem32):
(JSC::B3::testSubMemImm32):
(JSC::B3::run):

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

5 years agoModern IDB: storage/indexeddb/objectstore-cursor.html fails.
beidson@apple.com [Wed, 9 Dec 2015 01:59:07 +0000 (01:59 +0000)]
Modern IDB: storage/indexeddb/objectstore-cursor.html fails.
https://bugs.webkit.org/show_bug.cgi?id=152023

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
(WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange): Make sure the
  found iterator is actually in the target range.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

5 years agoChanging <video> src during 'ended' event can leave screen sleep disabled
jer.noble@apple.com [Wed, 9 Dec 2015 01:18:29 +0000 (01:18 +0000)]
Changing <video> src during 'ended' event can leave screen sleep disabled
https://bugs.webkit.org/show_bug.cgi?id=152018

Reviewed by Eric Carlson.

Resetting a HTMLMediaElement's src during 'ended' introduces a race condition: whether
the 'mediaPlayerRateChanged()' notification will fire before createMediaPlayer() destroys
the old MediaPlayer firing said notification.

To break the race condition, always update the sleep disabling assertion after destroying
the media player (by creating a new one).

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaPlayer):

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

5 years agoSkipping fast/canvas/canvas-too-large-to-draw.html on win
ryanhaddad@apple.com [Wed, 9 Dec 2015 00:40:04 +0000 (00:40 +0000)]
Skipping fast/canvas/canvas-too-large-to-draw.html on win
https://bugs.webkit.org/show_bug.cgi?id=152009

Unreviewed test gardening.

* platform/win/TestExpectations:

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

5 years agoRebaseline fast/block/float/overhanging-tall-block.html for win after r193511
ryanhaddad@apple.com [Wed, 9 Dec 2015 00:36:37 +0000 (00:36 +0000)]
Rebaseline fast/block/float/overhanging-tall-block.html for win after r193511
https://bugs.webkit.org/show_bug.cgi?id=151906

Unreviewed test gardening.

* platform/win/fast/block/float/overhanging-tall-block-expected.txt:

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

5 years agoFactoring out common DFG code for bitwise and shift operators.
mark.lam@apple.com [Wed, 9 Dec 2015 00:30:18 +0000 (00:30 +0000)]
Factoring out common DFG code for bitwise and shift operators.
https://bugs.webkit.org/show_bug.cgi?id=152019

Reviewed by Michael Saboff.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileBitwiseOp):
(JSC::DFG::SpeculativeJIT::compileShiftOp):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

5 years agoSkipping fast/canvas/canvas-too-large-to-draw.html on ElCapitan Debug
ryanhaddad@apple.com [Wed, 9 Dec 2015 00:23:01 +0000 (00:23 +0000)]
Skipping fast/canvas/canvas-too-large-to-draw.html on ElCapitan Debug
https://bugs.webkit.org/show_bug.cgi?id=152009

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

5 years agoDFG and FTL should be resilient against cases where both snippet operands are constant.
mark.lam@apple.com [Wed, 9 Dec 2015 00:12:48 +0000 (00:12 +0000)]
DFG and FTL should be resilient against cases where both snippet operands are constant.
https://bugs.webkit.org/show_bug.cgi?id=152017

Reviewed by Michael Saboff.

The DFG front end may not always constant fold cases where both operands are
constant.  As a result, the DFG and FTL back ends needs to be resilient against
this when using snippet generators since the generators do not support the case
where both operands are constant.  The strategy for handling this 2 const operands
case is to treat at least one of them as a variable if both are constant.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileValueAdd):
- Also remove the case for folding 2 constant operands.  It is the front end's
  job to do so, not the back end here.

(JSC::DFG::SpeculativeJIT::compileArithSub):
(JSC::DFG::SpeculativeJIT::compileArithMul):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):

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

5 years agoModern IDB: IDBTransaction::hasPendingActivity() was wrong, leading to premature...
beidson@apple.com [Wed, 9 Dec 2015 00:08:09 +0000 (00:08 +0000)]
Modern IDB: IDBTransaction::hasPendingActivity() was wrong, leading to premature GC of the wrapper.
https://bugs.webkit.org/show_bug.cgi?id=151507

Reviewed by Beth Dakin.

A handful of tests were marked flaky and tracked back to this bug.

Ever since the presumed fix for this bug (r192687) the flakiness dashboard says they pass.

* platform/mac-wk1/TestExpectations: Re-enable the no-longer-flaky tests.

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

5 years agoWeb Inspector: Add a hidden property to TreeOutline
mattbaker@apple.com [Wed, 9 Dec 2015 00:04:46 +0000 (00:04 +0000)]
Web Inspector: Add a hidden property to TreeOutline
https://bugs.webkit.org/show_bug.cgi?id=152014

Reviewed by Timothy Hatcher.

* UserInterface/Views/NavigationSidebarPanel.js:
Removed static property for "hidden" CSS class. No longer used.
(WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
Fixed bug in order of visibleTreeOutlines add/remove.
(WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype._changeViewMode):

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.get hidden):
(WebInspector.TreeOutline.prototype.set hidden):
Added hidden property, set DOM element hidden attribute.
(WebInspector.TreeElement.prototype.set hidden):
Remove CSS class, set DOM element hidden attribute.
(WebInspector.TreeElement.prototype._attach):
(WebInspector.TreeElement.prototype.expand):

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

5 years agoMore IDB TestExpectations gardening.
beidson@apple.com [Tue, 8 Dec 2015 23:57:13 +0000 (23:57 +0000)]
More IDB TestExpectations gardening.

Reviewed by Alex Christensen.

* platform/mac-wk1/TestExpectations:

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

5 years agoUnreviewed IDB layout test gardening (Adding some flaky crashes)
beidson@apple.com [Tue, 8 Dec 2015 23:42:19 +0000 (23:42 +0000)]
Unreviewed IDB layout test gardening (Adding some flaky crashes)

* platform/mac-wk1/TestExpectations:

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

5 years agoSnippefy shift operators for the baseline JIT.
mark.lam@apple.com [Tue, 8 Dec 2015 23:05:57 +0000 (23:05 +0000)]
Snippefy shift operators for the baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=151875

Reviewed by Geoffrey Garen.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jit/JIT.h:

* jit/JITArithmetic.cpp:
(JSC::JIT::emitBitBinaryOpFastPath):
- Don't need GPRInfo:: qualifiers.  Removed them to reduce verbosity.
- Also removed the emitStoreInt32() case for storing the result on 32-bit ports.
  This is because:
  1. The client should not make assumptions about whether the snippet fast path
     only include cases where the result tag already contain the IntTag.
  2. The "(op1 == result || op2 == result)" condition for skipping the IntTag
     storage, is only valid for the bitand, bitor, and bitxor implementations.
     It is invalid for the lshift implementation that uses this code now.
  Instead, we'll always unconditionally store what the result tag that the
  snippet computed for us.

(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emitSlow_op_urshift):

* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_op_lshift): Deleted.
(JSC::JIT::emitSlow_op_lshift): Deleted.
(JSC::JIT::emitRightShift): Deleted.
(JSC::JIT::emitRightShiftSlowCase): Deleted.
(JSC::JIT::emit_op_rshift): Deleted.
(JSC::JIT::emitSlow_op_rshift): Deleted.
(JSC::JIT::emit_op_urshift): Deleted.
(JSC::JIT::emitSlow_op_urshift): Deleted.

* jit/JITLeftShiftGenerator.cpp: Added.
(JSC::JITLeftShiftGenerator::generateFastPath):
* jit/JITLeftShiftGenerator.h: Added.
(JSC::JITLeftShiftGenerator::JITLeftShiftGenerator):
* jit/JITRightShiftGenerator.cpp: Added.
(JSC::JITRightShiftGenerator::generateFastPath):
* jit/JITRightShiftGenerator.h: Added.
(JSC::JITRightShiftGenerator::JITRightShiftGenerator):

* tests/stress/op_lshift.js:
* tests/stress/op_rshift.js:
* tests/stress/op_urshift.js:
- Fixed some values and added others that are meaningful for testing shifts.

* tests/stress/resources/binary-op-test.js:
(stringifyIfNeeded):
(generateBinaryTests):
- Fixed the test generator to give unique names to all the generated test
  functions.  Without this, multiple tests may end up using the same global
  test function.  As a result, with enough test values to test, the function may
  get prematurely JITted, and the computed expected result which is supposed to
  be computed by the LLINT, may end up being computed by a JIT instead.

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

5 years agoProgress towards implementing downloads with NetworkSession
commit-queue@webkit.org [Tue, 8 Dec 2015 23:05:52 +0000 (23:05 +0000)]
Progress towards implementing downloads with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=151883

Patch by Alex Christensen <achristensen@webkit.org> on 2015-12-08
Reviewed by Brady Eidson.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::willPerformHTTPRedirection):
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponse):
(WebKit::NetworkLoad::didReceiveData):
(WebKit::NetworkLoad::didCompleteWithError):
(WebKit::NetworkLoad::didBecomeDownload):
(WebKit::NetworkLoad::didReceiveResponseAsync):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didConvertToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
(WebKit::NetworkSession::~NetworkSession): Deleted.
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[NetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[NetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::createDataTaskWithRequest):
* Shared/Downloads/Download.h:
* Shared/Downloads/DownloadManager.h:
(WebKit::DownloadManager::isDownloading):
(WebKit::DownloadManager::activeDownloadCount):

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

5 years agoModern IDB: Fire blocked events for delete requests that are blocked.
beidson@apple.com [Tue, 8 Dec 2015 23:02:58 +0000 (23:02 +0000)]
Modern IDB: Fire blocked events for delete requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152015

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Previous failing tests now pass, and previously timing-out tests now complete).

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

5 years agoMore IDB TestExpectations gardening.
beidson@apple.com [Tue, 8 Dec 2015 22:18:40 +0000 (22:18 +0000)]
More IDB TestExpectations gardening.

Reviewed by Alex Christensen.

* platform/mac-wk1/TestExpectations:

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

5 years agoModern IDB: Fire blocked events for upgrade requests that are blocked.
beidson@apple.com [Tue, 8 Dec 2015 22:12:34 +0000 (22:12 +0000)]
Modern IDB: Fire blocked events for upgrade requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152007

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/blocked-open-db-requests.html
      And some that used to fail now pass.
      And some that used to timeout now complete.

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::notifyOpenDBRequestBlocked):
* Modules/indexeddb/client/IDBConnectionToServer.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::IDBDatabase):

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::requestBlocked):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent):

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): When a request that would
  result in a version change transaction is blocked by open connections, notify it.

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

* storage/indexeddb/modern/blocked-open-db-requests-expected.txt: Added.
* storage/indexeddb/modern/blocked-open-db-requests.html: Added.
* storage/indexeddb/modern/resources/blocked-open-db-requests.js: Added.

* storage/indexeddb/modern/deleteobjectstore-1.html: Fix subtly broken test.
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html: Ditto.

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

5 years agoCreate a Sandbox SPI header
joepeck@webkit.org [Tue, 8 Dec 2015 21:49:26 +0000 (21:49 +0000)]
Create a Sandbox SPI header
https://bugs.webkit.org/show_bug.cgi?id=151981

Reviewed by Andy Estes.

Source/JavaScriptCore:

* inspector/remote/RemoteInspector.mm:

Source/WebKit2:

* PluginProcess/mac/PluginProcessShim.mm:
* Shared/ios/ChildProcessIOS.mm:
* Shared/mac/ChildProcessMac.mm:
* Shared/mac/SandboxUtilities.mm:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/spi/darwin/SandboxSPI.h: Added.

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

5 years agoDFG::UnificationPhase should merge isProfitableToUnbox, since this may have been...
fpizlo@apple.com [Tue, 8 Dec 2015 21:45:54 +0000 (21:45 +0000)]
DFG::UnificationPhase should merge isProfitableToUnbox, since this may have been set in ByteCodeParser
https://bugs.webkit.org/show_bug.cgi?id=152011
rdar://problem/23777875

Reviewed by Michael Saboff.

Previously UnificationPhase did not merge this because we used to only set this in FixupPhase, which runs after unification. But now
ByteCodeParser may set isProfitableToUnbox as part of how it handles the ArgumentCount of an inlined varargs call, so UnificationPhase
needs to merge it after unifying.

Also changed the order of unification since this makes the bug more obvious and easier to test.

* dfg/DFGUnificationPhase.cpp:
(JSC::DFG::UnificationPhase::run):
* tests/stress/varargs-with-unused-count.js: Added.

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

5 years agoPolymorphic operand types for DFG and FTL div.
mark.lam@apple.com [Tue, 8 Dec 2015 21:44:12 +0000 (21:44 +0000)]
Polymorphic operand types for DFG and FTL div.
https://bugs.webkit.org/show_bug.cgi?id=151747

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Perf on benchmarks is neutral.  The new JSRegress ftl-object-div test shows
a speed up not from the div operator itself, but from the fact that the
polymorphic operand types support now allow the test function to run without OSR
exiting, thereby realizing the DFG and FTL's speed up on other work that the test
function does.

This patch has passed the layout tests on x86_64 with a debug build.
It passed the JSC tests with x86 and x86_64 debug builds.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithDiv):

* ftl/FTLCompileBinaryOp.cpp:
(JSC::FTL::generateBinaryArithOpFastPath):
(JSC::FTL::generateBinaryOpFastPath):

* ftl/FTLInlineCacheDescriptor.h:
* ftl/FTLInlineCacheDescriptorInlines.h:
(JSC::FTL::ArithDivDescriptor::ArithDivDescriptor):
(JSC::FTL::ArithDivDescriptor::icSize):

* ftl/FTLInlineCacheSize.cpp:
(JSC::FTL::sizeOfArithDiv):
* ftl/FTLInlineCacheSize.h:

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
- Fixed a cut-paste bug where the op_mul IC was using the op_sub IC size.
  This bug is benign because the op_sub IC size turns out to be larger
  than op_mul needs.
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithDiv):

* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_div):
- Fixed a bug where the scratchFPR was not allocated for the 64bit port.
  This bug is benign because the scratchFPR is only needed if we are
  using scratchGPR register (used for branchConvertDoubleToInt32()) is
  >= X86Registers::r8.  Since we're always using regT2 for the scratchT2,
  the scratchFPR is never needed.   However, we should fix this anyway to
  be correct.

* tests/stress/op_div.js:
- Fixed some test values.

LayoutTests:

* js/regress/ftl-object-div-expected.txt: Added.
* js/regress/ftl-object-div.html: Added.
* js/regress/script-tests/ftl-object-div.js: Added.
(o1.valueOf):
(foo):

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

5 years ago[WinCairo] Compile error.
peavo@outlook.com [Tue, 8 Dec 2015 21:41:04 +0000 (21:41 +0000)]
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=152008

Reviewed by Brent Fulgham.

GLuint is undefined.

* platform/graphics/GraphicsContext3D.h:

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

5 years agoLight cleanup in TextPainter.
zalan@apple.com [Tue, 8 Dec 2015 21:35:21 +0000 (21:35 +0000)]
Light cleanup in TextPainter.
https://bugs.webkit.org/show_bug.cgi?id=151994

Reviewed by Darin Adler.

No change in functionality.

* rendering/TextPainter.cpp:
(WebCore::TextPainter::TextPainter):
* rendering/TextPainter.h: Address post review comment.
(WebCore::ShadowApplier::isLastShadowIteration):
(WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):

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

5 years agoFollow-up to:
bdakin@apple.com [Tue, 8 Dec 2015 21:07:46 +0000 (21:07 +0000)]
Follow-up to:
Add support for WebViewAdditions
https://bugs.webkit.org/show_bug.cgi?id=151967

Rubber-stamped by Dan Bernstein.

We should use the Web prefix for all category names.
* WebView/WebView.mm:
(-[WebView updateWebViewAdditions]):
* WebView/WebViewInternal.h:

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

5 years agoDo not insert positioned renderers to multiple gPositionedDescendantsMap.
zalan@apple.com [Tue, 8 Dec 2015 20:44:51 +0000 (20:44 +0000)]
Do not insert positioned renderers to multiple gPositionedDescendantsMap.
https://bugs.webkit.org/show_bug.cgi?id=151878
rdar://problem/22229889

Reviewed by Simon Fraser.

We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
returns true for RenderElement::canContainAbsolutelyPositionedObjects().
canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
If this container's style changes so that it's no longer positioned and it has no transform anymore,
we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).

This patch addresses the case when the renderer does not have transforms anymore.

Source/WebCore:

Test: fast/block/positioning/crash-when-transform-is-removed.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleWillChange):

LayoutTests:

* fast/block/positioning/crash-when-transform-is-removed-expected.txt: Added.
* fast/block/positioning/crash-when-transform-is-removed.html: Added.

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

5 years agoFix social meta for home page.
jond@apple.com [Tue, 8 Dec 2015 20:43:33 +0000 (20:43 +0000)]
Fix social meta for home page.
https://bugs.webkit.org/show_bug.cgi?id=151764

Reviewed by Timothy Hatcher.

* wp-content/plugins/social-meta.php:

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

5 years agoWeb Inspector: Global Breakpoints should always be visible
mattbaker@apple.com [Tue, 8 Dec 2015 20:42:42 +0000 (20:42 +0000)]
Web Inspector: Global Breakpoints should always be visible
https://bugs.webkit.org/show_bug.cgi?id=151066

Reviewed by Timothy Hatcher.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
Turn off filtering for Global Breakpoints elements.

* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
Allow filtering to be turned off for specific tree elements.
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
Make element visible if filtering suppressed.
(WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
Visible elements with filtering disabled aren't considered when
showing/hiding the empty content placeholder.

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

5 years agoMarking fast/canvas/canvas-too-large-to-draw.html as flaky on ElCapitan Debug
ryanhaddad@apple.com [Tue, 8 Dec 2015 20:37:23 +0000 (20:37 +0000)]
Marking fast/canvas/canvas-too-large-to-draw.html as flaky on ElCapitan Debug
https://bugs.webkit.org/show_bug.cgi?id=152009

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

5 years ago[ES6] "super" and "this" should be lexically bound inside an arrow function and shoul...
commit-queue@webkit.org [Tue, 8 Dec 2015 20:24:04 +0000 (20:24 +0000)]
[ES6] "super" and "this" should be lexically bound inside an arrow function and should live in a JSLexicalEnvironment
https://bugs.webkit.org/show_bug.cgi?id=149338

Source/JavaScriptCore:

Patch by Aleksandr Skachkov <gskachkov@gmail.com> on 2015-12-05
Reviewed by Saam Barati.

Implemented new version of the lexically bound 'this' in arrow function. In current version
'this' is stored inside of the lexical environment of the function. To store and load we use
op_get_from_scope and op_put_to_scope operations. Also new implementation prevent raising TDZ
error for arrow functions that are declared before super() but invoke after.

* builtins/BuiltinExecutables.cpp:
(JSC::createExecutableInternal):
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::getSlow):
* bytecode/ExecutableInfo.h:
(JSC::ExecutableInfo::ExecutableInfo):
(JSC::ExecutableInfo::isDerivedConstructorContext):
(JSC::ExecutableInfo::isArrowFunctionContext):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::isArrowFunction):
(JSC::UnlinkedCodeBlock::isDerivedConstructorContext):
(JSC::UnlinkedCodeBlock::isArrowFunctionContext):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::generateUnlinkedFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::variable):
(JSC::BytecodeGenerator::emitNewArrowFunctionExpression):
(JSC::BytecodeGenerator::emitLoadArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadThisFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadNewTargetFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::emitPutNewTargetToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope):
(JSC::BytecodeGenerator::emitPutThisToArrowFunctionContextScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::isDerivedConstructorContext):
(JSC::BytecodeGenerator::usesArrowFunction):
(JSC::BytecodeGenerator::needsToUpdateArrowFunctionContext):
(JSC::BytecodeGenerator::usesEval):
(JSC::BytecodeGenerator::usesThis):
(JSC::BytecodeGenerator::newTarget):
(JSC::BytecodeGenerator::makeFunction):
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::SuperNode::emitBytecode):
(JSC::EvalFunctionCallNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* dfg/DFGAbstractInterpreterInlines.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
* dfg/DFGClobberize.h:
* dfg/DFGDoesGC.cpp:
* dfg/DFGFixupPhase.cpp:
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGPromotedHeapLocation.cpp:
* dfg/DFGPromotedHeapLocation.h:
* dfg/DFGSafeToExecute.h:
* dfg/DFGSpeculativeJIT.cpp:
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
* dfg/DFGSpeculativeJIT64.cpp:
* ftl/FTLCapabilities.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* interpreter/Interpreter.cpp:
(JSC::eval):
* jit/JIT.cpp:
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emitNewFuncExprCommon):
* jit/JITOpcodes32_64.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createArrowFunctionExpr):
(JSC::ASTBuilder::usesArrowFunction):
* parser/Nodes.h:
(JSC::ScopeNode::usesArrowFunction):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/ParserModes.h:
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getModuleProgramCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/CodeCache.h:
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::ScriptExecutable):
(JSC::EvalExecutable::create):
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::ModuleProgramExecutable::ModuleProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/Executable.h:
(JSC::ScriptExecutable::isArrowFunctionContext):
(JSC::ScriptExecutable::isDerivedConstructorContext):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createEvalCodeBlock):
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
* tests/es6.yaml:
* tests/stress/arrowfunction-activation-sink-osrexit.js:
* tests/stress/arrowfunction-activation-sink.js:
* tests/stress/arrowfunction-lexical-bind-newtarget.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-1.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-2.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-3.js: Added.
* tests/stress/arrowfunction-lexical-bind-supercall-4.js: Added.
* tests/stress/arrowfunction-lexical-bind-this-1.js:
* tests/stress/arrowfunction-lexical-bind-this-7.js: Added.
* tests/stress/arrowfunction-tdz-1.js: Added.
* tests/stress/arrowfunction-tdz-2.js: Added.
* tests/stress/arrowfunction-tdz-3.js: Added.
* tests/stress/arrowfunction-tdz-4.js: Added.
* tests/stress/arrowfunction-tdz.js: Removed.

LayoutTests:

Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2015-12-08
Reviewed by Saam Barati.

* js/arrowfunction-supercall-expected.txt: Added.
* js/arrowfunction-supercall.html: Added.
* js/arrowfunction-tdz-expected.txt: Added new expectation.
* js/script-tests/arrowfunction-supercall.js: Added.
* js/script-tests/arrowfunction-tdz.js: Added new cases.

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=151243
commit-queue@webkit.org [Tue, 8 Dec 2015 19:49:04 +0000 (19:49 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=151243
<rdar://problem/22955197>

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-12-08
Reviewed by Alexey Proskuryakov.

* LayoutTestRelay/LayoutTestRelay/main.m:
(getTestingSimDevice): Use separate testing device for each worker.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run): Perform cleanup even if setup fails.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.default_child_processes): Calculate number of simulators to use.
(IOSSimulatorPort.child_processes): Gets the number of simulators from options variable.
(IOSSimulatorPort.setup_test_run): Handle mulitple simulators.
(IOSSimulatorPort._quit_ios_simulator): Same
(IOSSimulatorPort.clean_up_test_run): Same
(IOSSimulatorPort.check_sys_deps): Same
(IOSSimulatorPort.testing_device): Same
(IOSSimulatorPort.reset_preferences): Same
(IOSSimulatorPort.get_simulator_path): Return simulator path.
(IOSSimulatorPort._createSimulatorApp): Create the copy of simulator app.
* Scripts/webkitpy/xcode/simulator.py:
(Device.delete): Delete the simulator device.
(Simulator.delete_device): Same
(Simulator.wait_until_device_is_booted): Wait for device booting.

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

5 years ago[MediaStream] Rename UserMediaClient and UserMediaController methods
eric.carlson@apple.com [Tue, 8 Dec 2015 19:35:20 +0000 (19:35 +0000)]
[MediaStream] Rename UserMediaClient and UserMediaController methods
https://bugs.webkit.org/show_bug.cgi?id=152001

Reviewed by Brady Eidson.

Source/WebCore:

No new tests, no behavior change.

* Modules/mediastream/UserMediaClient.h:
(WebCore::UserMediaClient::~UserMediaClient):
* Modules/mediastream/UserMediaController.h:
(WebCore::UserMediaController::client):
(WebCore::UserMediaController::from):
(WebCore::UserMediaController::requestUserMediaAccess):
(WebCore::UserMediaController::cancelUserMediaAccessRequest):
(WebCore::UserMediaController::requestPermission): Deleted.
(WebCore::UserMediaController::cancelRequest): Deleted.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::constraintsValidated):
(WebCore::UserMediaRequest::contextDestroyed):
* platform/mock/UserMediaClientMock.h:

Source/WebKit/mac:

* WebCoreSupport/WebUserMediaClient.h:
* WebCoreSupport/WebUserMediaClient.mm:
(WebUserMediaClient::pageDestroyed):
(WebUserMediaClient::requestUserMediaAccess):
(WebUserMediaClient::cancelUserMediaAccessRequest):
(-[WebUserMediaPolicyListener initWithUserMediaRequest:]):
(-[WebUserMediaPolicyListener cancelUserMediaAccessRequest]):
(WebUserMediaClient::requestPermission): Deleted.
(WebUserMediaClient::cancelRequest): Deleted.
(-[WebUserMediaPolicyListener cancelRequest]): Deleted.

Source/WebKit2:

* WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
(WebKit::WebUserMediaClient::pageDestroyed):
(WebKit::WebUserMediaClient::requestUserMediaAccess):
(WebKit::WebUserMediaClient::cancelUserMediaAccessRequest):
(WebKit::WebUserMediaClient::requestPermission): Deleted.
(WebKit::WebUserMediaClient::cancelRequest): Deleted.
* WebProcess/WebCoreSupport/WebUserMediaClient.h:

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

5 years ago[GTK] Remove an unused variable from WebKitWebContext
commit-queue@webkit.org [Tue, 8 Dec 2015 19:34:40 +0000 (19:34 +0000)]
[GTK] Remove an unused variable from WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=151999

Patch by Tomas Popela <tpopela@redhat.com> on 2015-12-08
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebContext.cpp:

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

5 years ago[iOS] Do not exit fullscreen mode during auto-PiP.
jer.noble@apple.com [Tue, 8 Dec 2015 19:29:39 +0000 (19:29 +0000)]
[iOS] Do not exit fullscreen mode during auto-PiP.
https://bugs.webkit.org/show_bug.cgi?id=151889

Reviewed by Darin Adler.

When auto-PiPing, do not exit fullscreen mode, as that causes a two-step animation upon returing from auto-PiP.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::applicationDidBecomeActive): Handle the case where we open Safari after an
    auto-PiP by clicking on a link; if so, hide the fullscreen window.
(WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture): Do not exit fullscreen during auto-PiP.
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Ditto.

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

5 years ago[WinCairo] Remove unneeded function.
peavo@outlook.com [Tue, 8 Dec 2015 19:20:52 +0000 (19:20 +0000)]
[WinCairo] Remove unneeded function.
https://bugs.webkit.org/show_bug.cgi?id=151989

Reviewed by Brent Fulgham.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
(MFCreateMediaType): Deleted.

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

5 years ago[iOS] Adopt WebFullScreenVideoRootViewController.
jer.noble@apple.com [Tue, 8 Dec 2015 19:11:03 +0000 (19:11 +0000)]
[iOS] Adopt WebFullScreenVideoRootViewController.
https://bugs.webkit.org/show_bug.cgi?id=151996

Reviewed by Dan Bernstein.

Adopt WebFullScreenVideoRootViewController from WebKitAdditions. If it is not available, create and use
a generic UIViewController subclass.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(createFullScreenVideoRootViewControllerClass):
(allocWebFullScreenVideoRootViewControllerInstance):
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):

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

5 years agoImmutableNFANodeBuilder's move constructor moves an uninitialized member variable...
aestes@apple.com [Tue, 8 Dec 2015 18:00:13 +0000 (18:00 +0000)]
ImmutableNFANodeBuilder's move constructor moves an uninitialized member variable into itself
https://bugs.webkit.org/show_bug.cgi?id=151982

Reviewed by Darin Adler.

* contentextensions/ImmutableNFANodeBuilder.h:
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):

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

5 years ago[Cocoa] ResourceUsageOverlay should query kernel for VM page size.
akling@apple.com [Tue, 8 Dec 2015 17:50:48 +0000 (17:50 +0000)]
[Cocoa] ResourceUsageOverlay should query kernel for VM page size.
<https://webkit.org/b/151920>

Reviewed by Andy Estes.

Read the vm.pagesize sysctl to find the correct page size for memory usage calculations.
This fixes broken math on systems that have different hw.pagesize and vm.pagesize.

* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::vmPageSize):
(WebCore::pagesPerVMTag):
(WebCore::runSamplerThread):

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

5 years agoAdd diagnostic logging to measure speculative revalidation accuracy
cdumez@apple.com [Tue, 8 Dec 2015 17:39:46 +0000 (17:39 +0000)]
Add diagnostic logging to measure speculative revalidation accuracy
https://bugs.webkit.org/show_bug.cgi?id=151953
<rdar://problem/23092196>

Reviewed by Darin Adler.

Source/WebCore:

Add diagnostic logging to measure speculative revalidation accuracy.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey):
(WebCore::DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey):
(WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey):
(WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey):
(WebCore::DiagnosticLoggingKeys::unknownEntryRequestKey):
(WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey):
(WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

We track the following:
1. Resources we knew about AND did not get requested
   A. We did not speculate (Good)
   B. We speculated but did not go to network (Bad)
   C. We speculated and went to network (Very bad)
2. Resources we did not know about (Neutral)
3. Resources we knew about AND got requested
   A. We did not speculate (Bad)
   B. We speculated but did not go to network (Good)
   C. We speculated and went to network (Very good)

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::allSpeculativeLoadingDiagnosticMessages):
(WebKit::NetworkCache::printSpeculativeLoadingDiagnosticMessageCounts):
(WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage):
(WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::wasRevalidated):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::markLoadAsCompleted):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieve):
(WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):
(WebKit::NetworkCache::makeSubresourcesKey): Deleted.
(WebKit::NetworkCache::constructRevalidationRequest): Deleted.
(WebKit::NetworkCache::responseNeedsRevalidation): Deleted.
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady): Deleted.
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveEntryFromStorage): Deleted.
(WebKit::NetworkCache::SpeculativeLoadManager::satisfyPendingRequests): Deleted.
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:

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

5 years agoModern IDB: storage/indexeddb/index-cursor.html fails.
beidson@apple.com [Tue, 8 Dec 2015 17:37:35 +0000 (17:37 +0000)]
Modern IDB: storage/indexeddb/index-cursor.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151973

Reviewed by Darin Adler.

Source/WebCore:

No new tests (At least one failing test now passes).

* Modules/indexeddb/server/MemoryIndexCursor.cpp:
(WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor): When the initial cursor creation
  generates an iterator outside of the cursor's IDBKeyRange, invalidate the iterator.

LayoutTests:

* platform/mac-wk1/TestExpectations:

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

5 years agoFix the !ENABLE(DFG_JIT) build after r193649
ossy@webkit.org [Tue, 8 Dec 2015 17:35:31 +0000 (17:35 +0000)]
Fix the !ENABLE(DFG_JIT) build after r193649
https://bugs.webkit.org/show_bug.cgi?id=151985

Reviewed by Saam Barati.

* jit/JITOpcodes.cpp:
(JSC::JIT::emitSlow_op_loop_hint):

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

5 years agoUnreviewed. Remove unnecessary check for 0 in commitSize().
berto@igalia.com [Tue, 8 Dec 2015 16:42:18 +0000 (16:42 +0000)]
Unreviewed. Remove unnecessary check for 0 in commitSize().

Change suggested by Darin Adler in bug #130237.

* interpreter/JSStack.cpp:
(JSC::commitSize):

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

5 years ago[EFL] REGRESSION(r173394): MiniBrowser stucked in an infinite loop if NETWORK_CACHE...
ossy@webkit.org [Tue, 8 Dec 2015 16:42:01 +0000 (16:42 +0000)]
[EFL] REGRESSION(r173394): MiniBrowser stucked in an infinite loop if NETWORK_CACHE is disabled
https://bugs.webkit.org/show_bug.cgi?id=137692

Reviewed by Darin Adler.

Source/WebKit2:

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::maximumBufferingTime): Disable caching if NETWORK_CACHE is disabled.

LayoutTests:

* platform/efl/TestExpectations: Unskip now passing tests.

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

5 years ago[EFL][AX] Rebaseline failing AX tests since r185662
gyuyoung.kim@webkit.org [Tue, 8 Dec 2015 16:16:28 +0000 (16:16 +0000)]
[EFL][AX] Rebaseline failing AX tests since r185662
https://bugs.webkit.org/show_bug.cgi?id=151991

Unreviewed EFL rebaseline.

* platform/efl/TestExpectations:
* platform/efl/accessibility/image-link-expected.txt:
* platform/efl/accessibility/image-map2-expected.txt:
* platform/efl/accessibility/lists-expected.txt:
* platform/efl/accessibility/table-attributes-expected.txt:
* platform/efl/accessibility/table-cell-spans-expected.txt:
* platform/efl/accessibility/table-cells-expected.txt:
* platform/efl/accessibility/table-detection-expected.txt:
* platform/efl/accessibility/table-one-cell-expected.txt:
* platform/efl/accessibility/table-sections-expected.txt:
* platform/efl/accessibility/table-with-rules-expected.txt:

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

5 years ago[EFL] some ax tests have been failed since r186692
jdiggs@igalia.com [Tue, 8 Dec 2015 16:02:50 +0000 (16:02 +0000)]
[EFL] some ax tests have been failed since r186692
https://bugs.webkit.org/show_bug.cgi?id=146887

Reviewed by Mario Sanchez Prada.

Source/WebCore:

The tests were failing because there are now two WebCore accessibility
roles which need to implement the AtkTable interface: TableRole and
GridRole. Because the latter was not added in r186692, any tests with
ARIA role grid that accessed cells via coordinates stopped working.

No new tests; instead unskipped all the broken table tests which now pass.

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

LayoutTests:

* platform/efl/TestExpectations: Removed failing tests.

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

5 years ago[EFL] Remove the flag to check timer state in IncrementalSweeper
ryuan.choi@navercorp.com [Tue, 8 Dec 2015 15:38:11 +0000 (15:38 +0000)]
[EFL] Remove the flag to check timer state in IncrementalSweeper
https://bugs.webkit.org/show_bug.cgi?id=151988

Reviewed by Gyuyoung Kim.

* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::cancelTimer):

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

5 years ago[ThreadedCompositor] Add support for Cairo GL-backed ImageBuffer.
yoon@igalia.com [Tue, 8 Dec 2015 14:20:28 +0000 (14:20 +0000)]
[ThreadedCompositor] Add support for Cairo GL-backed ImageBuffer.
https://bugs.webkit.org/show_bug.cgi?id=151986

Reviewed by Žan Doberšek.

This patch adds a support for accelerated 2d canvas which uses cairo-gl as its
backend to the threaded compositor. Basically, it applies same way to support
WebGL for the threaded compositor.

Unfortunately, we cannot swap the buffer for the accelerated 2d canvas because
it should preserve the buffer of the previous frame when drawing new contents.
Because of that, the surface of the accelerated 2d canvas will be copied for
each frame.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBufferData::ImageBufferData):
(WebCore::ImageBufferData::createCompositorBuffer): Prepare a texture
surface to push the rendered result to the compositing thread.
(WebCore::ImageBufferData::swapBuffersIfNeeded): Copies the contents
of the canvas's surface to the compositing texture.
(WebCore::ImageBufferData::createCairoGLSurface): Moved to the inside
of ImageBufferData.

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

5 years ago[Mac][GTK] Fix JSC FTL build
philn@webkit.org [Tue, 8 Dec 2015 11:18:12 +0000 (11:18 +0000)]
[Mac][GTK] Fix JSC FTL build
https://bugs.webkit.org/show_bug.cgi?id=151915

Reviewed by Csaba Osztrogonác.

* CMakeLists.txt: Don't pass version-script option to ld on Darwin because this platform's linker
doesn't support this option.

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

5 years ago[GTK] 15 accessibility tests fail since r186692.
jdiggs@igalia.com [Tue, 8 Dec 2015 11:07:11 +0000 (11:07 +0000)]
[GTK] 15 accessibility tests fail since r186692.
https://bugs.webkit.org/show_bug.cgi?id=148938

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Failing tests rebaselined.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole): Treat GridCellRole and CellRole the same.
(roleIsTextType): Treat GridCellRole and CellRole the same.

LayoutTests:

* platform/gtk/TestExpectations: Removed failing tests.
* platform/gtk/accessibility/roles-computedRoleString-expected.txt: Rebaselined.
* platform/gtk/accessibility/table-attributes-expected.txt: Rebaselined.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Rebaselined.
* platform/gtk/accessibility/table-cells-expected.txt: Rebaselined.
* platform/gtk/accessibility/table-detection-expected.txt: Rebaselined.
* platform/gtk/accessibility/table-sections-expected.txt: Rebaselined.
* platform/gtk/accessibility/table-with-rules-expected.txt: Rebaselined.

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

5 years agoUnreviewed. Use pageSize() instead of getpagesize() after r193648
berto@igalia.com [Tue, 8 Dec 2015 10:26:39 +0000 (10:26 +0000)]
Unreviewed. Use pageSize() instead of getpagesize() after r193648

* interpreter/JSStack.cpp:
(JSC::commitSize):

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

5 years ago[EFL] Add API to provide preferences before creating ewk_view
ryuan.choi@navercorp.com [Tue, 8 Dec 2015 10:00:39 +0000 (10:00 +0000)]
[EFL] Add API to provide preferences before creating ewk_view
https://bugs.webkit.org/show_bug.cgi?id=151587

Reviewed by Gyuyoung Kim.

Source/WebKit2:

This patch adds ewk_view_configuration_settings_get to provide preferences
before createing ewk_view.

* PlatformEfl.cmake:
* UIProcess/API/efl/ewk_view_configuration.cpp:
(EwkViewConfiguration::EwkViewConfiguration):
(ewk_view_configuration_settings_get):
* UIProcess/API/efl/ewk_view_configuration.h:
* UIProcess/API/efl/ewk_view_configuration_private.h:
(EwkViewConfiguration::pageGroup):
* UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp:
(TEST_F): Added test case for ewk_view_configuration_settings_get().

Tools:

* MiniBrowser/efl/main.c:
(on_key_down):
(quit):
(window_create):
Moved settings related code to configuration() not to update settings
whenever ewk_view is created.
(configuration):
(elm_main):

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

5 years ago[cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
fred.wang@free.fr [Tue, 8 Dec 2015 09:17:38 +0000 (09:17 +0000)]
[cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
https://bugs.webkit.org/show_bug.cgi?id=151947

Reviewed by Martin Robinson.

Source/WebCore:

Test: mathml/presentation/radical-bar-visibility.html

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px

LayoutTests:

Add a test to check that the radical overbar appears on the screen when it has thickness less than 1px.

* mathml/presentation/radical-bar-visibility-expected-mismatch.html: Added.
* mathml/presentation/radical-bar-visibility.html: Added.

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

5 years agoUnreviewed. Fix GTK+ API tests after r193639.
carlosgc@webkit.org [Tue, 8 Dec 2015 09:12:29 +0000 (09:12 +0000)]
Unreviewed. Fix GTK+ API tests after r193639.

The new jhbuild version needs some more variables ot be present in
the builtin dict, even if they are set to None.

* jhbuild/jhbuildutils.py:
(enter_jhbuild_environment_if_available):

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

5 years ago[ThreadedCompositor] Support WebGL for OpenGL.
yoon@igalia.com [Tue, 8 Dec 2015 08:36:02 +0000 (08:36 +0000)]
[ThreadedCompositor] Support WebGL for OpenGL.
https://bugs.webkit.org/show_bug.cgi?id=143300

Reviewed by Žan Doberšek.

To remove pixel transfer operation, this patch adds m_compositorFBO which uses same depth and stencil
buffer with m_fbo but uses m_compositorTexture as a color attachment in GraphicsContext3D.
Because switching target framebuffer is cheaper than pixel transfer operation and switching color
attachment of m_fbo. In Threaded Compositor, when WebGL renders a scene, prepareTexture swaps
m_fbo with m_compositorFBO and send the color attachment to the compositor thread.
This patch only supports WebGL for OpenGL. OpenGLES will be covered in following-up patches.

No new tests needed.

* platform/graphics/GraphicsContext3D.h:
* platform/graphics/GraphicsContext3DPrivate.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::proxy):
(WebCore::GraphicsContext3DPrivate::swapBuffersIfNeeded):
Implement interfaces to pass a rendered texture to the compositing
thread.
* platform/graphics/GraphicsContext3DPrivate.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
Create additional compositing texture and FBO to swaping buffers for
threaded compositor.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
Split attaching depth and stencil buffer codes from reshapeFBOs
to make complete framebuffer with not only m_fbo but m_compositorFBO also.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
If we are in the threaded compositor, we will swap m_fbo with
m_compositorFBO instead of copying it.

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

5 years ago[GTK] Notify WebCore when notification is clicked
gns@gnome.org [Tue, 8 Dec 2015 08:26:16 +0000 (08:26 +0000)]
[GTK] Notify WebCore when notification is clicked
https://bugs.webkit.org/show_bug.cgi?id=151951

Reviewed by Carlos Garcia Campos.

Source/WebKit2:

* UIProcess/API/gtk/WebKitNotification.cpp:
(webkit_notification_class_init): new clicked signal.
(webkit_notification_clicked): method to emit the clicked signal.
* UIProcess/API/gtk/WebKitNotification.h:
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::notificationClickedCallback): handle the clicked signal and tell WebProcess about the click.
(WebKitNotificationProvider::show): connect to the clicked signal in addition to closed.
* UIProcess/API/gtk/WebKitNotificationProvider.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(notifyNotificationClicked): handle the click on our libnotify notification.
(webkitWebViewShowNotification): add the "default" action to our libnotify notification to be notified of the click.
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewNotification): test the new API.

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

5 years agoMove an IDB test from the "generic failure" section to the "fails because no workers...
beidson@apple.com [Tue, 8 Dec 2015 04:59:08 +0000 (04:59 +0000)]
Move an IDB test from the "generic failure" section to the "fails because no workers" section.

Rubberstamped by Andy Estes.

* platform/mac-wk1/TestExpectations:

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

5 years agoMake paintTextWithShadows a member function (TextPainter).
zalan@apple.com [Tue, 8 Dec 2015 04:34:27 +0000 (04:34 +0000)]
Make paintTextWithShadows a member function (TextPainter).
https://bugs.webkit.org/show_bug.cgi?id=151979

Reviewed by Simon Fraser.

This patch also simplifies paintTextWithShadows and
rearranges some of the functions' arguments.

No change in functionality.

* rendering/TextPainter.cpp:
(WebCore::TextPainter::drawTextOrEmphasisMarks):
(WebCore::TextPainter::paintTextWithShadows):
(WebCore::TextPainter::paintEmphasisMarksIfNeeded):
(WebCore::TextPainter::paintTextWithStyle):
(WebCore::TextPainter::paintText):
(WebCore::drawTextOrEmphasisMarks): Deleted.
(WebCore::paintTextWithShadows): Deleted.
* rendering/TextPainter.h:

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

5 years agoSmall style fixes in B3MoveConstants.cpp
fpizlo@apple.com [Tue, 8 Dec 2015 04:05:24 +0000 (04:05 +0000)]
Small style fixes in B3MoveConstants.cpp
https://bugs.webkit.org/show_bug.cgi?id=151980

Reviewed by Benjamin Poulain.

* b3/B3MoveConstants.cpp:

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

5 years ago[JSC] On x86, we should XOR registers instead of moving a zero immediate
commit-queue@webkit.org [Tue, 8 Dec 2015 03:35:24 +0000 (03:35 +0000)]
[JSC] On x86, we should XOR registers instead of moving a zero immediate
https://bugs.webkit.org/show_bug.cgi?id=151977

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-07
Reviewed by Filip Pizlo.

It is smaller and the frontend has special support
for xor.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::move):
(JSC::MacroAssemblerX86Common::signExtend32ToPtr):

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

5 years agoUpdate suites for benchmark
jonlee@apple.com [Tue, 8 Dec 2015 03:23:42 +0000 (03:23 +0000)]
Update suites for benchmark
https://bugs.webkit.org/show_bug.cgi?id=151957

Reviewed by Simon Fraser.

* Animometer/runner/animometer.html: Use spacers instead of relying on
justify-content center to center the content. That allows the opening screen
to grow downward when expanding the list of choices, otherwise it expands
from the center, and off the top edge of the screen.
* Animometer/runner/resources/animometer.css:
(.tree): Don't overflow scroll.
(.tree > li > label.tree-label:before): Use better glyphs.
(.tree > li > :checked ~ label.tree-label:before):
(main): Using flex-start for justify-content so that if the section grows too
big it gets pinned to the top edge of the document instead of growing past it.
(.spacer): Make the spacers have a minimum 20px and grow evenly.
(section#home): Add a min-height so that the border will expand if the suite
tests shown make the section grow past the height.
* Animometer/runner/resources/animometer.js: Update the selectors.
(window.suitesManager._treeElement):
(window.suitesManager._suitesElements):
(window.suitesManager._editsElements):

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

5 years agoFix a typo from r193683
benjamin@webkit.org [Tue, 8 Dec 2015 03:04:32 +0000 (03:04 +0000)]
Fix a typo from r193683

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-07

* ftl/FTLCommonValues.cpp:
(JSC::FTL::CommonValues::CommonValues):

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

5 years ago[JSC] Add Float support to B3
benjamin@webkit.org [Tue, 8 Dec 2015 02:56:16 +0000 (02:56 +0000)]
[JSC] Add Float support to B3
https://bugs.webkit.org/show_bug.cgi?id=151974

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-12-07
Reviewed by Filip Pizlo.

This patch adds comprehensive float support to B3.

The new phase reduceDoubleToFloat() gives us a primitive
version of what LLVM was giving us on floats.
It needs to support conversions accross Phis but that can
be added later.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::moveDoubleConditionallyFloat):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::sqrtFloat):
(JSC::MacroAssemblerX86Common::loadFloat):
(JSC::MacroAssemblerX86Common::storeFloat):
(JSC::MacroAssemblerX86Common::convertDoubleToFloat):
(JSC::MacroAssemblerX86Common::convertFloatToDouble):
(JSC::MacroAssemblerX86Common::addFloat):
(JSC::MacroAssemblerX86Common::divFloat):
(JSC::MacroAssemblerX86Common::subFloat):
(JSC::MacroAssemblerX86Common::mulFloat):
(JSC::MacroAssemblerX86Common::branchDouble):
(JSC::MacroAssemblerX86Common::branchFloat):
(JSC::MacroAssemblerX86Common::moveConditionallyDouble):
(JSC::MacroAssemblerX86Common::moveConditionallyFloat):
(JSC::MacroAssemblerX86Common::jumpAfterFloatingPointCompare):
(JSC::MacroAssemblerX86Common::moveConditionallyAfterFloatingPointCompare):
* assembler/X86Assembler.h:
(JSC::X86Assembler::addss_rr):
(JSC::X86Assembler::addss_mr):
(JSC::X86Assembler::cvtsd2ss_mr):
(JSC::X86Assembler::cvtss2sd_mr):
(JSC::X86Assembler::movss_rm):
(JSC::X86Assembler::movss_mr):
(JSC::X86Assembler::mulss_rr):
(JSC::X86Assembler::mulss_mr):
(JSC::X86Assembler::subss_rr):
(JSC::X86Assembler::subss_mr):
(JSC::X86Assembler::ucomiss_rr):
(JSC::X86Assembler::ucomiss_mr):
(JSC::X86Assembler::divss_rr):
(JSC::X86Assembler::divss_mr):
(JSC::X86Assembler::sqrtss_rr):
(JSC::X86Assembler::sqrtss_mr):
* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::bitwiseCastConstant):
* b3/B3Const32Value.h:
* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::doubleToFloatConstant):
(JSC::B3::ConstDoubleValue::sqrtConstant):
* b3/B3ConstDoubleValue.h:
* b3/B3ConstFloatValue.cpp: Added.
(JSC::B3::ConstFloatValue::~ConstFloatValue):
(JSC::B3::ConstFloatValue::negConstant):
(JSC::B3::ConstFloatValue::addConstant):
(JSC::B3::ConstFloatValue::subConstant):
(JSC::B3::ConstFloatValue::mulConstant):
(JSC::B3::ConstFloatValue::bitwiseCastConstant):
(JSC::B3::ConstFloatValue::floatToDoubleConstant):
(JSC::B3::ConstFloatValue::sqrtConstant):
(JSC::B3::ConstFloatValue::divConstant):
(JSC::B3::ConstFloatValue::equalConstant):
(JSC::B3::ConstFloatValue::notEqualConstant):
(JSC::B3::ConstFloatValue::lessThanConstant):
(JSC::B3::ConstFloatValue::greaterThanConstant):
(JSC::B3::ConstFloatValue::lessEqualConstant):
(JSC::B3::ConstFloatValue::greaterEqualConstant):
(JSC::B3::ConstFloatValue::dumpMeta):
* b3/B3ConstFloatValue.h: Copied from Source/JavaScriptCore/b3/B3ConstDoubleValue.h.
* b3/B3Generate.cpp:
(JSC::B3::generateToAir):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tryOpcodeForType):
(JSC::B3::Air::LowerToAir::opcodeForType):
(JSC::B3::Air::LowerToAir::appendUnOp):
(JSC::B3::Air::LowerToAir::appendBinOp):
(JSC::B3::Air::LowerToAir::appendShift):
(JSC::B3::Air::LowerToAir::tryAppendStoreUnOp):
(JSC::B3::Air::LowerToAir::tryAppendStoreBinOp):
(JSC::B3::Air::LowerToAir::moveForType):
(JSC::B3::Air::LowerToAir::relaxedMoveForType):
(JSC::B3::Air::LowerToAir::createGenericCompare):
(JSC::B3::Air::LowerToAir::createBranch):
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::createSelect):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3MemoryValue.cpp:
(JSC::B3::MemoryValue::accessByteSize): Deleted.
* b3/B3MemoryValue.h:
* b3/B3MoveConstants.cpp:
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::addIntConstant):
* b3/B3ReduceDoubleToFloat.cpp: Added.
(JSC::B3::reduceDoubleToFloat):
* b3/B3ReduceDoubleToFloat.h: Copied from Source/JavaScriptCore/b3/B3Type.cpp.
* b3/B3ReduceStrength.cpp:
* b3/B3Type.cpp:
(WTF::printInternal):
* b3/B3Type.h:
(JSC::B3::isFloat):
(JSC::B3::sizeofType):
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::doubleToFloatConstant):
(JSC::B3::Value::floatToDoubleConstant):
(JSC::B3::Value::sqrtConstant):
(JSC::B3::Value::asTriState):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::checkOpcode):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/B3ValueInlines.h:
(JSC::B3::Value::isConstant):
(JSC::B3::Value::hasFloat):
(JSC::B3::Value::asFloat):
(JSC::B3::Value::hasNumber):
(JSC::B3::Value::isNegativeZero):
(JSC::B3::Value::representableAs):
(JSC::B3::Value::asNumber):
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::materialize):
* b3/B3ValueKey.h:
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::floatValue):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::typeForB3Type):
(JSC::B3::Air::Arg::widthForB3Type):
* b3/air/AirFixPartialRegisterStalls.cpp:
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testAddArgFloat):
(JSC::B3::testAddArgsFloat):
(JSC::B3::testAddArgImmFloat):
(JSC::B3::testAddImmArgFloat):
(JSC::B3::testAddImmsFloat):
(JSC::B3::testAddArgFloatWithUselessDoubleConversion):
(JSC::B3::testAddArgsFloatWithUselessDoubleConversion):
(JSC::B3::testAddArgsFloatWithEffectfulDoubleConversion):
(JSC::B3::testMulArgFloat):
(JSC::B3::testMulArgsFloat):
(JSC::B3::testMulArgImmFloat):
(JSC::B3::testMulImmArgFloat):
(JSC::B3::testMulImmsFloat):
(JSC::B3::testMulArgFloatWithUselessDoubleConversion):
(JSC::B3::testMulArgsFloatWithUselessDoubleConversion):
(JSC::B3::testMulArgsFloatWithEffectfulDoubleConversion):
(JSC::B3::testDivArgFloat):
(JSC::B3::testDivArgsFloat):
(JSC::B3::testDivArgImmFloat):
(JSC::B3::testDivImmArgFloat):
(JSC::B3::testDivImmsFloat):
(JSC::B3::testDivArgFloatWithUselessDoubleConversion):
(JSC::B3::testDivArgsFloatWithUselessDoubleConversion):
(JSC::B3::testDivArgsFloatWithEffectfulDoubleConversion):
(JSC::B3::testSubArgFloat):
(JSC::B3::testSubArgsFloat):
(JSC::B3::testSubArgImmFloat):
(JSC::B3::testSubImmArgFloat):
(JSC::B3::testSubImmsFloat):
(JSC::B3::testSubArgFloatWithUselessDoubleConversion):
(JSC::B3::testSubArgsFloatWithUselessDoubleConversion):
(JSC::B3::testSubArgsFloatWithEffectfulDoubleConversion):
(JSC::B3::testClzMem32):
(JSC::B3::testSqrtArg):
(JSC::B3::testSqrtImm):
(JSC::B3::testSqrtMem):
(JSC::B3::testSqrtArgWithUselessDoubleConversion):
(JSC::B3::testSqrtArgWithEffectfulDoubleConversion):
(JSC::B3::testDoubleArgToInt64BitwiseCast):
(JSC::B3::testDoubleImmToInt64BitwiseCast):
(JSC::B3::testTwoBitwiseCastOnDouble):
(JSC::B3::testBitwiseCastOnDoubleInMemory):
(JSC::B3::testInt64BArgToDoubleBitwiseCast):
(JSC::B3::testInt64BImmToDoubleBitwiseCast):
(JSC::B3::testTwoBitwiseCastOnInt64):
(JSC::B3::testBitwiseCastOnInt64InMemory):
(JSC::B3::testFloatImmToInt32BitwiseCast):
(JSC::B3::testBitwiseCastOnFloatInMemory):
(JSC::B3::testInt32BArgToFloatBitwiseCast):
(JSC::B3::testInt32BImmToFloatBitwiseCast):
(JSC::B3::testTwoBitwiseCastOnInt32):
(JSC::B3::testBitwiseCastOnInt32InMemory):
(JSC::B3::testConvertDoubleToFloatArg):
(JSC::B3::testConvertDoubleToFloatImm):
(JSC::B3::testConvertDoubleToFloatMem):
(JSC::B3::testConvertFloatToDoubleArg):
(JSC::B3::testConvertFloatToDoubleImm):
(JSC::B3::testConvertFloatToDoubleMem):
(JSC::B3::testConvertDoubleToFloatToDoubleToFloat):
(JSC::B3::testLoadFloatConvertDoubleConvertFloatStoreFloat):
(JSC::B3::testFroundArg):
(JSC::B3::testFroundMem):
(JSC::B3::testStore32):
(JSC::B3::modelLoad):
(JSC::B3::float>):
(JSC::B3::double>):
(JSC::B3::testLoad):
(JSC::B3::testStoreFloat):
(JSC::B3::testReturnFloat):
(JSC::B3::simpleFunctionFloat):
(JSC::B3::testCallSimpleFloat):
(JSC::B3::functionWithHellaFloatArguments):
(JSC::B3::testCallFunctionWithHellaFloatArguments):
(JSC::B3::testSelectCompareFloat):
(JSC::B3::testSelectCompareFloatToDouble):
(JSC::B3::testSelectDoubleCompareFloat):
(JSC::B3::testSelectFloatCompareFloat):
(JSC::B3::populateWithInterestingValues):
(JSC::B3::floatingPointOperands):
(JSC::B3::int64Operands):
(JSC::B3::run):
(JSC::B3::testStore): Deleted.
(JSC::B3::posInfinity): Deleted.
(JSC::B3::negInfinity): Deleted.
(JSC::B3::doubleOperands): Deleted.
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::loadFloatToDouble):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::fround):
* ftl/FTLCommonValues.cpp:
(JSC::FTL::CommonValues::CommonValues):
* ftl/FTLCommonValues.h:

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

5 years agoFTL B3 should be able to flag the tag constants as being super important so that...
fpizlo@apple.com [Tue, 8 Dec 2015 02:46:22 +0000 (02:46 +0000)]
FTL B3 should be able to flag the tag constants as being super important so that B3 can hoist them and Air can force them into registers
https://bugs.webkit.org/show_bug.cgi?id=151955

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Taught B3 about the concept of "fast constants". A client of B3 can now tell B3 which
constants are super important. B3 will not spill the constant in that case and will ensure
that the constant is materialized only once: statically once, and dynamically once per
procedure execution. The hoistFastConstants() algorithm in B3MoveConstants.cpp achieves this
by first picking the lowest common dominator of all uses of each fast constant, and then
picking the materialization point by finding the lowest dominator of that dominator that is
tied for lowest block frequency. In practice, the second step ensures that this is the lowest
point in the program that is not in a loop (i.e. executes no more than once dynamically per
procedure invocation).

Taught Air about the concept of "fast tmps". B3 tells Air that a tmp is fast if it is used to
hold the materialization of a fast constant. IRC will use the lowest possible spill score for
fast tmps. In practice, this ensures that fast constants are never spilled.

Added a small snippet of code to FTL::LowerDFGToLLVM that makes both of the tag constants
into fast constants.

My hope is that this very brute-force heuristic is good enough that we don't have to think
about constants for a while. Based on my experience with how LLVM's constant hoisting works
out, the heuristic in this patch is going to be tough to beat. LLVM's constant hoisting does
good things when it hoists the tags, and usually causes nothing but problems when it hoists
anything else. This is because there is no way a low-level compiler to really understand how
a constant materialization impacts some operation's contribution to the overall execution
time of a procedure. But, in the FTL we know that constant materializations for type checks
are a bummer because we are super comfortable placing type checks on the hottest of paths. So
those are the last paths where extra instructions should be added by the compiler. On the
other hand, all other large constant uses are on relatively cold paths, or paths that are
already expensive for other reasons. For example, global variable accesses have to
materialize a pointer to the global. But that's not really a big deal, since a load from a
global involves first the load itself and then type checks on the result - so probably the
constant materialization is just not interesting. A store to a global often involves a store
barrier, so the constant materialization is really not interesting. This patch codifies this
heuristic in a pact between Air, B3, and the FTL: FTL demands that B3 pin the two tags in
registers, and B3 relays the demand to Air.

* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3CFG.h: Added.
(JSC::B3::CFG::CFG):
(JSC::B3::CFG::root):
(JSC::B3::CFG::newMap):
(JSC::B3::CFG::successors):
(JSC::B3::CFG::predecessors):
(JSC::B3::CFG::index):
(JSC::B3::CFG::node):
(JSC::B3::CFG::numNodes):
(JSC::B3::CFG::dump):
* b3/B3Dominators.h: Added.
(JSC::B3::Dominators::Dominators):
* b3/B3IndexMap.h:
(JSC::B3::IndexMap::resize):
(JSC::B3::IndexMap::size):
(JSC::B3::IndexMap::operator[]):
* b3/B3LowerMacros.cpp:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tmp):
* b3/B3MoveConstants.cpp:
* b3/B3Opcode.h:
(JSC::B3::constPtrOpcode):
(JSC::B3::isConstant):
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::Procedure):
(JSC::B3::Procedure::resetReachability):
(JSC::B3::Procedure::invalidateCFG):
(JSC::B3::Procedure::dump):
(JSC::B3::Procedure::deleteValue):
(JSC::B3::Procedure::dominators):
(JSC::B3::Procedure::addFastConstant):
(JSC::B3::Procedure::isFastConstant):
(JSC::B3::Procedure::addDataSection):
* b3/B3Procedure.h:
(JSC::B3::Procedure::size):
(JSC::B3::Procedure::cfg):
(JSC::B3::Procedure::setLastPhaseName):
* b3/B3ReduceStrength.cpp:
* b3/B3ValueInlines.h:
(JSC::B3::Value::isConstant):
(JSC::B3::Value::isInteger):
* b3/B3ValueKey.h:
(JSC::B3::ValueKey::canMaterialize):
(JSC::B3::ValueKey::isConstant):
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::findNextBlock):
(JSC::B3::Air::Code::addFastTmp):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::specials):
(JSC::B3::Air::Code::isFastTmp):
(JSC::B3::Air::Code::setLastPhaseName):
* b3/air/AirIteratedRegisterCoalescing.cpp:
* dfg/DFGDominators.h:
* dfg/DFGSSACalculator.cpp:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):

Source/WTF:

Remove some remaining DFG-specific snippets from Dominators. This used to be a non-template
DFG class, and some time ago I hoisted it into WTF and made it generic. But since the only
user of the class was the DFG, this class still had a handful of DFG-specific snippets that
didn't compile when I started using it from B3.

Also renamed immediateDominatorOf() to idom(). This is the sort of abbreviation that we
wouldn't ordinarily want to have in WebKit. But WebKit does allow for abbreviations that are
"more canonical". The term "idom" is definitely more canonical than "immediateDominatorOf".

* wtf/Dominators.h:
(WTF::Dominators::dominates):
(WTF::Dominators::idom):
(WTF::Dominators::forAllStrictDominatorsOf):
(WTF::Dominators::NaiveDominators::dominates):
(WTF::Dominators::NaiveDominators::dump):
(WTF::Dominators::ValidationContext::handleErrors):

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

5 years ago[INTL] Implement String.prototype.toLocaleUpperCase in ECMA-402
commit-queue@webkit.org [Tue, 8 Dec 2015 02:14:29 +0000 (02:14 +0000)]
[INTL] Implement String.prototype.toLocaleUpperCase in ECMA-402
https://bugs.webkit.org/show_bug.cgi?id=147609

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2015-12-07
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Refactor most of toLocaleLowerCase to static function used by both
toLocaleUpperCase and toLocaleLowerCase.
Add toLocaleUpperCase using icu u_strToUpper.

* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::toLocaleCase):
(JSC::stringProtoFuncToLocaleLowerCase):
(JSC::stringProtoFuncToLocaleUpperCase):

LayoutTests:

* js/script-tests/string-toLocaleUpperCase.js: Added.
* js/string-toLocaleUpperCase-expected.txt: Added.
* js/string-toLocaleUpperCase.html: Added.

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

5 years agoImplemented a workaround for sharp SVG WebKit logo.
jond@apple.com [Tue, 8 Dec 2015 01:42:46 +0000 (01:42 +0000)]
Implemented a workaround for sharp SVG WebKit logo.
https://bugs.webkit.org/show_bug.cgi?id=151971

Reviewed by Timothy Hatcher.

* wp-content/themes/webkit/images/webkit.svg:

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

5 years agoBuild fix after r193675.
achristensen@apple.com [Tue, 8 Dec 2015 01:11:51 +0000 (01:11 +0000)]
Build fix after r193675.

* WebView/WebViewData.h:

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

5 years agoBuild fix after r193661.
achristensen@apple.com [Tue, 8 Dec 2015 00:59:17 +0000 (00:59 +0000)]
Build fix after r193661.

Reviewed by Beth Dakin.

* WebView/WebViewData.h:

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

5 years agoCRASH: CodeBlock::setOptimizationThresholdBasedOnCompilationResult + 567
msaboff@apple.com [Tue, 8 Dec 2015 00:31:49 +0000 (00:31 +0000)]
CRASH: CodeBlock::setOptimizationThresholdBasedOnCompilationResult + 567
https://bugs.webkit.org/show_bug.cgi?id=151892

Reviewed by Geoffrey Garen.

Reverted the change made in change set r193491.

The updated change is to finish all concurrent compilations and install the resulting
code blocks before we make any state changes due to debugger activity.  After all code
blocks have been installed, we make the debugger state changes, including jettisoning
all optimized code blocks.

This means that we will discard the optimized code blocks we just installed,
but we won't do that while on the install code block path.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult): Reverted r193491.
* debugger/Debugger.cpp:
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):
Call Heap::completeAllDFGPlans() before updating code blocks for debugging changes.

* heap/Heap.h: Made completeAllDFGPlans() public.

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

5 years agoUnreviewed, rolling out r193655.
commit-queue@webkit.org [Tue, 8 Dec 2015 00:22:16 +0000 (00:22 +0000)]
Unreviewed, rolling out r193655.
https://bugs.webkit.org/show_bug.cgi?id=151970

This change broke existing LayoutTests on mac-wk2 (Requested
by ryanhaddad on #webkit).

Reverted changeset:

"UIProcess should determine AppNap state for WebPage"
https://bugs.webkit.org/show_bug.cgi?id=151964
http://trac.webkit.org/changeset/193655

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

5 years ago[Mac] Remove Mavericks-specific TestExpectations lines
mmaxfield@apple.com [Tue, 8 Dec 2015 00:08:56 +0000 (00:08 +0000)]
[Mac] Remove Mavericks-specific TestExpectations lines
https://bugs.webkit.org/show_bug.cgi?id=151913

Reviewed by Alexey Proskuryakov.

Mavericks is no longer a supported OS.

* platform/mac/TestExpectations:

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

5 years agoFTL lowering should tell B3 the right block frequencies
fpizlo@apple.com [Tue, 8 Dec 2015 00:02:09 +0000 (00:02 +0000)]
FTL lowering should tell B3 the right block frequencies
https://bugs.webkit.org/show_bug.cgi?id=151531

Reviewed by Geoffrey Garen.

This glues together the DFG's view of basic block execution counts and B3's block frequencies.
This further improves our performance on imaging-gaussian-blur. It appears to improve the steady
state throughput by almost 4%.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::newBlock):
(JSC::FTL::Output::insertNewBlocksBefore):
(JSC::FTL::Output::callWithoutSideEffects):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower):
(JSC::FTL::DFG::LowerDFGToLLVM::compileBlock):
* ftl/FTLOutput.h:
(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::insertNewBlocksBefore):

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

5 years agoAdd support for WebViewAdditions
bdakin@apple.com [Mon, 7 Dec 2015 23:47:56 +0000 (23:47 +0000)]
Add support for WebViewAdditions
https://bugs.webkit.org/show_bug.cgi?id=151967

Reviewed by Sam Weinig.

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::respondToChangedSelection):
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView updateWebViewAdditions]):
* WebView/WebViewData.h:
* WebView/WebViewInternal.h:

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

5 years agoModern IDB: Miscellaneous test cleanup.
beidson@apple.com [Mon, 7 Dec 2015 23:43:38 +0000 (23:43 +0000)]
Modern IDB: Miscellaneous test cleanup.
https://bugs.webkit.org/show_bug.cgi?id=151968

Reviewed by Sam Weinig.

- Reorganize TestExpectations a bit.
- Remove two tests that primarily test features that have been removed from the spec.

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/cursor-continueprimarykey-expected.txt: Removed.
* storage/indexeddb/cursor-continueprimarykey.html: Removed.
* storage/indexeddb/factory-basics-expected.txt: Removed.
* storage/indexeddb/factory-basics.html: Removed.
* storage/indexeddb/resources/cursor-continueprimarykey.js: Removed.
* storage/indexeddb/resources/factory-basics.js: Removed.

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

5 years agoUpdate JSC feature list for rest parameters and generators
sbarati@apple.com [Mon, 7 Dec 2015 23:15:54 +0000 (23:15 +0000)]
Update JSC feature list for rest parameters and generators
https://bugs.webkit.org/show_bug.cgi?id=151740

Reviewed by Joseph Pecoraro.

* features.json:

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

5 years agoModern IDB: storage/indexeddb/factory-deletedatabase.html fails.
beidson@apple.com [Mon, 7 Dec 2015 23:12:50 +0000 (23:12 +0000)]
Modern IDB: storage/indexeddb/factory-deletedatabase.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151966
Source/WebCore:

Reviewed by Sam Weinig.

No new tests (At least one failing test now passes).

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::onDeleteDatabaseSuccess): The spec says that the result of
  deleteDatabase should be undefined. Without explicitly making it undefined, it's incorrectly null.

LayoutTests:

Reviewed by Sam Weinig.

* platform/mac-wk1/TestExpectations:

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

5 years agoModern IDB: storage/indexeddb/cursor-continue-validity.html fails.
beidson@apple.com [Mon, 7 Dec 2015 23:07:03 +0000 (23:07 +0000)]
Modern IDB: storage/indexeddb/cursor-continue-validity.html fails.
https://bugs.webkit.org/show_bug.cgi?id=151961

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (At least one failing test now passes).

When an index cursor's iterator was invalidated, there were some cases where it did
not correctly find the next iterator to pick up where it left off.

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::update):
(WebCore::IDBClient::IDBCursor::deleteFunction):

* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::find):
(WebCore::IDBServer::IndexValueStore::loggingString):
* Modules/indexeddb/server/IndexValueStore.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:
* storage/indexeddb/cursor-finished-expected.txt:

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

5 years agoRefactor TextPainter::paintText() into sub methods.
zalan@apple.com [Mon, 7 Dec 2015 23:01:13 +0000 (23:01 +0000)]
Refactor TextPainter::paintText() into sub methods.
https://bugs.webkit.org/show_bug.cgi?id=151962

Reviewed by Myles C. Maxfield.

No change in functionality.

* rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextWithEmphasisIfNeeded):
(WebCore::TextPainter::paintTextWithStyle):
(WebCore::TextPainter::paintText):
* rendering/TextPainter.h:

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