WebKit-https.git
5 years agoUnreviewed. Add missing inspector file to GTK+ compilation.
carlosgc@webkit.org [Sun, 22 Nov 2015 10:33:34 +0000 (10:33 +0000)]
Unreviewed. Add missing inspector file to GTK+ compilation.

* PlatformGTK.cmake:

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

5 years ago[GTK] Some unit tests fail when using the network process
carlosgc@webkit.org [Sun, 22 Nov 2015 09:00:45 +0000 (09:00 +0000)]
[GTK] Some unit tests fail when using the network process
https://bugs.webkit.org/show_bug.cgi?id=151490

Reviewed by Martin Robinson.

Run the soup server in a separate thread in TestResources test to
avoid deadlocks.

This fixes /webkit2/WebKitWebView/sync-request-on-max-conns and
/webkit2/WebKitWebResource/get-data when using the network process.

* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(beforeAll): Create the WebKitTestServer with ServerRunInThread flag.
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer): When ServerRunInThread is
present, create a WorkQueue to run the server.
(WebKitTestServer::run): Run the server in the work queue if it
has been created.
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.h: Convert server
type into server options as flags.

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

5 years ago[GTK] ImageDiff should normalize the diff image
carlosgc@webkit.org [Sun, 22 Nov 2015 08:53:56 +0000 (08:53 +0000)]
[GTK] ImageDiff should normalize the diff image
https://bugs.webkit.org/show_bug.cgi?id=151261

Reviewed by Sergio Villar Senin.

* ImageDiff/gtk/ImageDiff.cpp:
(readPixbufFromStdin): Fix memory leak.
(differenceImageFromDifferenceBuffer): Normalize diff buffer.
(calculateDifference): Pass max distance to differenceImageFromDifferenceBuffer.

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

5 years ago[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not...
mcatanzaro@igalia.com [Sun, 22 Nov 2015 08:50:40 +0000 (08:50 +0000)]
[GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
https://bugs.webkit.org/show_bug.cgi?id=151533

Reviewed by Carlos Garcia Campos.

platformActiveSelectionBackgroundColor(), platformInactiveSelectionBackgroundColor(), etc.
are const functions intended only to return a color used for painting, but since r174929
they also change the state of the cached style contexts we use for GTK_TYPE_ENTRY and
GTK_TYPE_TREE_VIEW. That's wrong; those style contexts should not have any state set. This
could cause theme colors returned by those GtkStyleContexts to change unexpectedly,
depending on whether the state is explicitly set before each use, or whether the theme
actually uses the states.

This didn't cause any regression only because every place using these style contexts
explicitly sets the state of the style contexts before use. In fact, the GtkTreeView style
context is not used anywhere else, and the GtkEntry style context is only used in
paintTextField, which does set the state before use (and then reverts it using
save/restore), so this cannot have broken anything in practice. But it's a landmine waiting
for the next programmer to trip it.

Fix this with a gtk_style_context_save()/gtk_style_context_restore() pair.

* rendering/RenderThemeGtk.cpp:
(WebCore::styleColor):

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

5 years agoTiny cleanup in ComplexTextController::collectComplexTextRuns()
mmaxfield@apple.com [Sat, 21 Nov 2015 23:06:46 +0000 (23:06 +0000)]
Tiny cleanup in ComplexTextController::collectComplexTextRuns()
https://bugs.webkit.org/show_bug.cgi?id=151534

Reviewed by Zalan Bujtas.

The isMissingGlyph boolean is completely unnecessary. Its entire
responsiblity is duplicated by the "font" pointer.

No new tests because there is no behavior change.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns):

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

5 years ago== Rolled over to ChangeLog-2015-11-21 ==
mcatanzaro@igalia.com [Sat, 21 Nov 2015 20:02:34 +0000 (20:02 +0000)]
== Rolled over to ChangeLog-2015-11-21 ==

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

5 years ago[GTK] Off-by-one error in getStyleContext()
mcatanzaro@igalia.com [Sat, 21 Nov 2015 17:00:00 +0000 (17:00 +0000)]
[GTK] Off-by-one error in getStyleContext()
https://bugs.webkit.org/show_bug.cgi?id=151524

Reviewed by Carlos Garcia Campos.

GtkWidgetPath* path = gtk_widget_path_new();
gtk_widget_path_append_type(path, widgetType);
// ...
gtk_widget_path_iter_add_class(path, 0, GTK_STYLE_CLASS_BUTTON);
gtk_widget_path_iter_add_class(path, 1, "text-button");

Only one widget type was appended to the widget path, so the maximum valid index is 0. This
code means to add both style classes to the first widget type in the widget path, so the
second call should use index 0 rather than index 1.

This caused no bug in practice, because when the index is invalid,
gtk_widget_path_iter_add_class() automatically changes the index to the last valid position
in the widget path -- in this case, 0. This is routinely done with -1 as a convention for
specifying the last position in the widget path.

* rendering/RenderThemeGtk.cpp:
(WebCore::getStyleContext):

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

5 years ago[GTK] Warning spam from GtkStyleContext
mcatanzaro@igalia.com [Sat, 21 Nov 2015 16:57:47 +0000 (16:57 +0000)]
[GTK] Warning spam from GtkStyleContext
https://bugs.webkit.org/show_bug.cgi?id=151520

Reviewed by Carlos Garcia Campos.

Audit every use of gtk_style_context_get_* to fix compatibility with GTK+ 3.19. Some of
these were already fine and are only changed for clarity.

Company:  gtk_style_context_get() (and _get_padding/border/color()) should only ever be
          called with the same state as gtk_style_context_get_state()
Company:  usually that's a simple replacing of the old state (like in the trace you posted)
Company:  sometimes it requires calling gtk_style_context_set_sate() with the right state
          first
Company:  and in very rare cases it needs a gtk_style_context_save() before the set_state(),
          too

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::adjustRectAccordingToMargin):
* rendering/RenderThemeGtk.cpp:
(gtk_css_section_print):
(WebCore::getStyleContext):
(WebCore::RenderThemeGtk::initMediaColors):
(WebCore::renderButton):
(WebCore::getComboBoxMetrics):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::spinButtonArrowSize):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::styleColor):

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

5 years agoREGRESSION(r192536): Null pointer dereference in JSPropertyNameEnumerator::visitChild...
akling@apple.com [Sat, 21 Nov 2015 06:07:40 +0000 (06:07 +0000)]
REGRESSION(r192536): Null pointer dereference in JSPropertyNameEnumerator::visitChildren().
<https://webkit.org/b/151495>

Reviewed by Mark Lam.

Source/JavaScriptCore:

The copied space allocation in JSPropertyNameEnumerator::finishCreation()
may end up triggering a GC, and so JSPropertyNameEnumerator::visitChildren()
would get called while m_propertyNames was still null.

This patch fixes that by having visitChildren() check for pointer nullity
instead of the number of names, since that is non-zero even before the
allocation is made.

Added a test that induces GC during JSPropertyNameEnumerator construction
to cover this bug.

Test: property-name-enumerator-gc-151495.js

* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::visitChildren):

LayoutTests:

* js/property-name-enumerator-gc-151495.html: Added.
* js/property-name-enumerator-gc-151495-expected.txt: Added.
* js/script-tests/property-name-enumerator-gc-151495.js: Added.

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

5 years agoGC timers should carry on gracefully when Heap claims it grew from GC.
akling@apple.com [Sat, 21 Nov 2015 04:40:40 +0000 (04:40 +0000)]
GC timers should carry on gracefully when Heap claims it grew from GC.
<https://webkit.org/b/151521>

Reviewed by Mark Lam.

TL;DR the Heap "extra memory" reporting APIs are hard to use 100% correctly
and GC scheduling shouldn't break if someone makes a mistake with it.

The JSC::Heap allows you to report an extra memory cost for any GC object.
This is reported first when allocating the memory, and then each time the
object is visited during the marking phase.

When reporting an allocation, it's added to the Heap's "bytes allocated in
this cycle" counter. This contributes to the computed heap size at the start
of a collection.

When visiting a GC object that reports extra memory, it's added to the Heap's
"extra memory visited in this collection" counter. This contributes to the
computed heap size at the end of a collection.

As you can see, this means that visiting more memory than we said we allocated
can lead to the Heap thinking it's bigger after a collection than it was before.

Clients of this API do some sketchy things to compute costs, for instance
StringImpl cost is determined by dividing the number of bytes used for the
characters, and dividing it by the StringImpl's ref count. Since a JSString
could be backed by any StringImpl, any code that modifies a StringImpl's
ref count during collection will change the extra memory reported by all
JSString objects that wrap that StringImpl.

So anyways...

The object death rate, which is the basis for when to schedule the next
collection is computed like so:

    deathRate = (sizeBeforeGC - sizeAfterGC) / sizeBeforeGC

This patch adds a safety mechanism that returns a zero death rate when the Heap
claims it grew from collection.

* heap/EdenGCActivityCallback.cpp:
(JSC::EdenGCActivityCallback::deathRate):
* heap/FullGCActivityCallback.cpp:
(JSC::FullGCActivityCallback::deathRate):

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

5 years agoModern IDB: After versionchange transactions complete, fire onsuccess on the original...
beidson@apple.com [Sat, 21 Nov 2015 03:57:19 +0000 (03:57 +0000)]
Modern IDB: After versionchange transactions complete, fire onsuccess on the original IDBOpenDBRequest
https://bugs.webkit.org/show_bug.cgi?id=151522

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/opendatabase-success-after-versionchange.html (And changes to other existing tests)

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

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

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::create):
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::dispatchEvent):
* Modules/indexeddb/client/IDBTransactionImpl.h:

LayoutTests:

* storage/indexeddb/modern/deletedatabase-1-expected.txt:
* storage/indexeddb/modern/deletedatabase-1.html:
* storage/indexeddb/modern/deletedatabase-2-expected.txt:
* storage/indexeddb/modern/deletedatabase-2.html:
* storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt: Added.
* storage/indexeddb/modern/opendatabase-success-after-versionchange.html: Added.
* storage/indexeddb/modern/opendatabase-versions-expected.txt:
* storage/indexeddb/modern/opendatabase-versions.html:
* storage/indexeddb/modern/versionchange-event-expected.txt:
* storage/indexeddb/modern/versionchange-event.html:

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

5 years agoWeb Inspector: Timeline does not immediately update current time after switching...
commit-queue@webkit.org [Sat, 21 Nov 2015 03:31:08 +0000 (03:31 +0000)]
Web Inspector: Timeline does not immediately update current time after switching tabs while recording
https://bugs.webkit.org/show_bug.cgi?id=151528

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

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.shown):
Provide a number so that _startUpdatingCurrentTime doesn't decide
to wait until the next event to update current time.

(WebInspector.TimelineRecordingContentView.prototype._update):
When switching tabs we stop updating and hit this code. However
we want to keep _lastUpdateTimestamp so that if we switch back
to the tab we can re-compute the current time. So don't clear it
in cases where the view was hidden, as it might need to use
it when it is shown again.

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

5 years agoWeb Inspector: Remove "Show only resources with breakpoints" filter button
mattbaker@apple.com [Sat, 21 Nov 2015 03:29:31 +0000 (03:29 +0000)]
Web Inspector: Remove "Show only resources with breakpoints" filter button
https://bugs.webkit.org/show_bug.cgi?id=151517

Reviewed by Timothy Hatcher.

Removed filter button in preparation for https://bugs.webkit.org/show_bug.cgi?id=151119.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.showResourcesWithBreakpointsOnlyFilterFunction): Deleted.
(WebInspector.DebuggerSidebarPanel): Deleted.

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

5 years agoBuild fix for old version of PHP.
rniwa@webkit.org [Sat, 21 Nov 2015 03:16:11 +0000 (03:16 +0000)]
Build fix for old version of PHP.

* public/api/runs.php:

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

5 years agoPerf dashboard's should not include results more than 366 days old in JSON
rniwa@webkit.org [Sat, 21 Nov 2015 03:12:14 +0000 (03:12 +0000)]
Perf dashboard's should not include results more than 366 days old in JSON
https://bugs.webkit.org/show_bug.cgi?id=151529

Reviewed by Timothy Hatcher.

Don't return results more than 366 days old in /api/runs/ JSON API.
This is a ~5% runtime improvement and reduces the JSON file size by 20-50% in the internal perf dashboard.

* public/api/runs.php:
(main): Added the support for "?noResults" to avoid echoing results. This is useful for debugging.
Also instantiate RunsGenerator before issuing the query to find all configurations so that the runtime cost
of doing so will be included in elapsedTime.
(RunsGenerator::fetch_runs): Skip a row when its build and commit times are more than 366 days old.
(RunsGenerator::format_run): Takes build_time and revisions as arguments since fetch_runs uses them now.
(RunsGenerator::parse_revisions_array): Compute the max of commit times.

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

5 years agoAnimometer: graphs should not do interpolation
simon.fraser@apple.com [Sat, 21 Nov 2015 03:05:50 +0000 (03:05 +0000)]
Animometer: graphs should not do interpolation
https://bugs.webkit.org/show_bug.cgi?id=151526

Reviewed by Simon Fraser.

Having the graphs do interpolation is misleading, because you can't see the actual data.

Also remove "shape-rendering: crispEdges;" so the lines get antialiased.

* Animometer/runner/resources/animometer.css:
(section#test-graph > data > svg): Deleted.
* Animometer/runner/resources/graph.js:
(graph): Deleted.

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

5 years agoUnreviewed, add watchlist for PerformanceTests/Animometer and add myself.
said@apple.com [Sat, 21 Nov 2015 02:51:51 +0000 (02:51 +0000)]
Unreviewed, add watchlist for PerformanceTests/Animometer and add myself.

* Scripts/webkitpy/common/config/watchlist:

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

5 years agoUnreviewed, mark fast/replaced/replaced-breaking.html as failing on ElCapitan-wk1.
cdumez@apple.com [Sat, 21 Nov 2015 02:29:23 +0000 (02:29 +0000)]
Unreviewed, mark fast/replaced/replaced-breaking.html as failing on ElCapitan-wk1.

The test gives a slightly different output of this configuration only
and I don't think we can have platform-specific test expectations for
this particular configuration.

* platform/mac-wk1/TestExpectations:

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

5 years agoMore deviceRGB color cleanup
simon.fraser@apple.com [Sat, 21 Nov 2015 01:51:48 +0000 (01:51 +0000)]
More deviceRGB color cleanup
https://bugs.webkit.org/show_bug.cgi?id=151523
<rdar://problem/23638597>

Reviewed by Tim Horton.

Replace calls to deviceRGBColorSpaceRef() with sRGBColorSpaceRef(), and use
sRGBColorSpaceRef() in a few places that were manually creating the colorspace.

Also use cachedCGColor() in a more places that were manually constructing CGColorRefs
from Colors.

Source/WebCore:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::createImageFromPixelBuffer):
* platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::setBackgroundColor):
(PlatformCALayerCocoa::setBorderColor):
* platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm:
(-[WebLightSystemBackdropLayer init]):
(-[WebDarkSystemBackdropLayer init]):
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::toDataURL):
(WebCore::ImageDataToDataURL):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::linearRGBColorSpaceRef):
* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::currentFrameCGImage):
* rendering/RenderThemeIOS.mm:
(WebCore::drawRadialGradient):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintSliderTrack):

Source/WebKit2:

* Shared/cg/ShareableBitmapCG.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
(WebKit::ShareableBitmap::createCGImage):
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::cgColorFromColor):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):

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

5 years agoRenaming PageCache suspension code to support more reasons for suspension.
commit-queue@webkit.org [Sat, 21 Nov 2015 01:42:11 +0000 (01:42 +0000)]
Renaming PageCache suspension code to support more reasons for suspension.
https://bugs.webkit.org/show_bug.cgi?id=151527

Patch by Katlyn Graff <kgraff@apple.com> on 2015-11-20
Reviewed by Ryosuke Niwa.

No new tests because this is simply a refactor.

Renamed Element:: and Document:: documentWillSuspendForPageCache(),
documentDidResumeFromPageCache(),
registerForPageCacheSuspensionCallbacks(),
unregisterForPageCacheSuspensionCallbacks() to prepare to support
alternate reasons for document-level suspension.

* dom/Document.cpp:
(WebCore::Document::suspend):
(WebCore::Document::resume):
(WebCore::Document::registerForDocumentSuspensionCallbacks):
(WebCore::Document::unregisterForDocumentSuspensionCallbacks):
(WebCore::Document::documentWillSuspendForPageCache): Deleted.
(WebCore::Document::documentDidResumeFromPageCache): Deleted.
(WebCore::Document::registerForPageCacheSuspensionCallbacks): Deleted.
(WebCore::Document::unregisterForPageCacheSuspensionCallbacks): Deleted.
* dom/Document.h:
* dom/Element.h:
(WebCore::Element::prepareForDocumentSuspension):
(WebCore::Element::resumeFromDocumentSuspension):
(WebCore::Element::documentWillSuspendForPageCache): Deleted.
(WebCore::Element::documentDidResumeFromPageCache): Deleted.
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::parseAttribute):
(WebCore::HTMLFormElement::resumeFromDocumentSuspension):
(WebCore::HTMLFormElement::didMoveToNewDocument):
(WebCore::HTMLFormElement::documentDidResumeFromPageCache): Deleted.
* html/HTMLFormElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded):
(WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded):
(WebCore::HTMLInputElement::resumeFromDocumentSuspension):
(WebCore::HTMLInputElement::prepareForDocumentSuspension):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::documentDidResumeFromPageCache): Deleted.
(WebCore::HTMLInputElement::documentWillSuspendForPageCache): Deleted.
* html/HTMLInputElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::registerWithDocument):
(WebCore::HTMLMediaElement::unregisterWithDocument):
(WebCore::HTMLMediaElement::prepareForDocumentSuspension):
(WebCore::HTMLMediaElement::resumeFromDocumentSuspension):
(WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Deleted.
(WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Deleted.
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::createElementRenderer):
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):
(WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension):
(WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
(WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Deleted.
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Deleted.
* html/HTMLPlugInImageElement.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::~SVGSVGElement):
(WebCore::SVGSVGElement::didMoveToNewDocument):
(WebCore::SVGSVGElement::prepareForDocumentSuspension):
(WebCore::SVGSVGElement::resumeFromDocumentSuspension):
(WebCore::SVGSVGElement::documentWillSuspendForPageCache): Deleted.
(WebCore::SVGSVGElement::documentDidResumeFromPageCache): Deleted.
* svg/SVGSVGElement.h:

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

5 years agoUnreviewed, rolling out r192139.
cdumez@apple.com [Sat, 21 Nov 2015 00:20:53 +0000 (00:20 +0000)]
Unreviewed, rolling out r192139.
https://bugs.webkit.org/show_bug.cgi?id=151525

as it may cause WKTR to crash when the Flash plugin is
installed (Requested by cdumez on #webkit).

Reverted changeset:

"Unreviewed gardening, update fast/replaced/replaced-
breaking.html"
http://trac.webkit.org/changeset/192139

Patch by Commit Queue <commit-queue@webkit.org> on 2015-11-20

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

5 years agoFix the Windows build.
simon.fraser@apple.com [Sat, 21 Nov 2015 00:04:20 +0000 (00:04 +0000)]
Fix the Windows build.

* platform/graphics/cg/IOSurfacePool.h:

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

5 years agoNew JSC tests introduced in r192664 fail on ARM.
mark.lam@apple.com [Fri, 20 Nov 2015 23:45:40 +0000 (23:45 +0000)]
New JSC tests introduced in r192664 fail on ARM.
https://bugs.webkit.org/show_bug.cgi?id=151485

Reviewed by Geoffrey Garen.

The newly added tests are exposing some pre-existing bugs.  The bugs are tracked here:
    https://bugs.webkit.org/show_bug.cgi?id=151514
    https://bugs.webkit.org/show_bug.cgi?id=151515

Skipping the tests for now.

* tests/stress/op_div.js:
* tests/stress/op_rshift.js:
* tests/stress/op_urshift.js:

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

5 years agoWent a bit too far, revert part of the previous patch.
ap@apple.com [Fri, 20 Nov 2015 23:37:23 +0000 (23:37 +0000)]
Went a bit too far, revert part of the previous patch.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mavericks.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mavericks@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:

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

5 years agoRemove Mavericks bots.
ap@apple.com [Fri, 20 Nov 2015 23:16:44 +0000 (23:16 +0000)]
Remove Mavericks bots.

Rubber-stamped by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mavericks.png: Removed.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mavericks@2x.png: Removed.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
* BuildSlaveSupport/build.webkit.org-config/templates/root.html:
* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
* Scripts/copy-webkitlibraries-to-product-directory:

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

5 years agoWeb Inspector: Add support for Gradients in the Visual sidebar background editor
commit-queue@webkit.org [Fri, 20 Nov 2015 23:16:18 +0000 (23:16 +0000)]
Web Inspector: Add support for Gradients in the Visual sidebar background editor
https://bugs.webkit.org/show_bug.cgi?id=150494

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2015-11-20
Reviewed by Timothy Hatcher.

Allows the editors in the Visual sidebar Background Style section to
work with gradients and data URIs.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/CodeMirrorGradientEditingController.css: Deleted.
Some styling was reused in VisualStyleBackgroundPicker.css.

* UserInterface/Controllers/CodeMirrorGradientEditingController.js:
(WebInspector.CodeMirrorGradientEditingController):
(WebInspector.CodeMirrorGradientEditingController.prototype.popoverWillPresent):
(WebInspector.CodeMirrorGradientEditingController.prototype.popoverDidPresent):
(WebInspector.CodeMirrorGradientEditingController.prototype._gradientEditorGradientChanged):
(WebInspector.CodeMirrorGradientEditingController.prototype.handleEvent): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype.gradientSliderStopsDidChange): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype.gradientSliderStopWasSelected): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype.dragToAdjustControllerWasAdjustedByAmount): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._handleInputEvent): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._angleInputValueDidChange): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._handleChangeEvent): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._colorPickerColorChanged): Deleted.
(WebInspector.CodeMirrorGradientEditingController.prototype._updateCSSClassForGradientType): Deleted.
Reworked gradient editor popup into WebInspector.GradientEditor.

* UserInterface/Main.html:
* UserInterface/Models/Gradient.js:
(WebInspector.Gradient.fromString):
(WebInspector.Gradient.stopsWithComponents):
(WebInspector.LinearGradient.linearGradientWithComponents):
Removed console.error statements as they didn't do anything but clog the console.

* UserInterface/Views/GradientEditor.css: Added.
(.gradient-editor):
(.gradient-editor.radial-gradient):
(.gradient-editor.editing-color):
(.gradient-editor.radial-gradient.editing-color):
(.gradient-editor > .gradient-type-select):
(.gradient-editor > .gradient-slider):
(.gradient-editor > .color-picker):
(.gradient-editor > .color-picker > .slider):
(.gradient-editor > .color-picker > .brightness):
(.gradient-editor > .color-picker > .opacity):
(.gradient-editor > .gradient-angle):
(.gradient-editor.radial-gradient > .gradient-angle):
(.gradient-editor > .gradient-angle > input):

* UserInterface/Views/GradientEditor.js: Added.
(WebInspector.GradientEditor):
(WebInspector.GradientEditor.prototype.get element):
(WebInspector.GradientEditor.prototype.set gradient):
(WebInspector.GradientEditor.prototype.get gradient):
(WebInspector.GradientEditor.prototype.gradientSliderStopsDidChange):
(WebInspector.GradientEditor.prototype.gradientSliderStopWasSelected):
(WebInspector.GradientEditor.prototype.dragToAdjustControllerWasAdjustedByAmount):
(WebInspector.GradientEditor.prototype._updateCSSClassForGradientType):
(WebInspector.GradientEditor.prototype._gradientTypeChanged):
(WebInspector.GradientEditor.prototype._colorPickerColorChanged):
(WebInspector.GradientEditor.prototype._angleChanged):
(WebInspector.GradientEditor.prototype._angleInputValueDidChange):
New standalone editor for CSS Gradients.

* UserInterface/Views/VisualStyleBackgroundPicker.css: Added.
(.visual-style-property-container.background-picker > .visual-style-property-value-container):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch:hover):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch:active):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .color-gradient-swatch > span):
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-gradient-swatch):
(.visual-style-property-container.background-picker > .visual-style-property-value-container.gradient-value > .color-gradient-swatch + .value-input):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-input[disabled]):
(.visual-style-property-container.background-picker > .visual-style-property-value-container > .value-type-picker-select):

* UserInterface/Views/VisualStyleBackgroundPicker.js: Added.
(WebInspector.VisualStyleBackgroundPicker):
(WebInspector.VisualStyleBackgroundPicker.prototype.get value):
(WebInspector.VisualStyleBackgroundPicker.prototype.set value):
(WebInspector.VisualStyleBackgroundPicker.prototype.get synthesizedValue):
(WebInspector.VisualStyleBackgroundPicker.prototype.parseValue):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateValueInput):
(WebInspector.VisualStyleBackgroundPicker.prototype._updateGradientSwatch):
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientSwatchClicked):
(WebInspector.VisualStyleBackgroundPicker.prototype._gradientEditorGradientChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._valueInputValueChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._keywordSelectMouseDown):
(WebInspector.VisualStyleBackgroundPicker.prototype._handleKeywordChanged):
(WebInspector.VisualStyleBackgroundPicker.prototype._createValueOptions):
(WebInspector.VisualStyleBackgroundPicker.prototype._addAdvancedValues):
(WebInspector.VisualStyleBackgroundPicker.prototype._removeAdvancedValues):
(WebInspector.VisualStyleBackgroundPicker.prototype._toggleTabbingOfSelectableElements):
Visual property editor for the CSS background-image property. Supports
limited keywords, as well as url() and gradients.

* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
Fixed regular expression parsing to not match commas inside parenthesis.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._populateBackgroundStyleSection):

* UserInterface/Views/VisualStylePropertyEditorLink.css:
(.visual-style-property-editor-link:not(.link-all) > .visual-style-property-editor-link-border):
Fixed spacing of link line.

* UserInterface/Views/VisualStyleURLInput.js: Removed.
Reworked into VisualStyleBackgroundPicker.js.

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

5 years agoUpdate the patch and the plan files of the graphics benchmark with the latest revision
commit-queue@webkit.org [Fri, 20 Nov 2015 23:14:52 +0000 (23:14 +0000)]
Update the patch and the plan files of the graphics benchmark with the latest revision
https://bugs.webkit.org/show_bug.cgi?id=151503

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-11-20
Reviewed by Ryosuke Niwa.

The time for each graphics test has been shortened from 30 seconds to 10
seconds. We need to update the graphics benchmark patch and plan files so
we can get the results faster. Also this will allow running the benchmark
also on the iOS performance bots.

* Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch:
* Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan:

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

5 years agoA window with a hung tab waits 5s before becoming active
ggaren@apple.com [Fri, 20 Nov 2015 23:10:57 +0000 (23:10 +0000)]
A window with a hung tab waits 5s before becoming active
https://bugs.webkit.org/show_bug.cgi?id=151426

Reviewed by Sam Weinig.

This patch adds an optimization to skip the synchronous web process
message to check for a legacy scrollbar when we know that legacy
scrollbars are not enabled.

(Note that legacy scrollbars don't work quite right, due to
<rdar://problem/23585420> and <rdar://problem/23605296>. Still, I verified
with logging that we do the synchronous message when legacy scrollbars
are enabled.)

A consequence of this change is that we will no longer support
click-to-scroll-while-inactive behavior for scrollbars with custom looks
on systems with modern scrollbars. I spoke with Beth and Dan, and they
agreed that this is a reasonable change to make, since we don't support
click-to-scroll-while-inactive behavior for fully custom scrollbars either,
and since systems with modern scrollbars typically use swipe to scroll.

* UIProcess/Cocoa/WebViewImpl.h: Added some helper functions to explain
the behaviors we're checking for.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::mightBeginDragWhileInactive): Factored out from
shouldDelayWindowOrderingForEvent.

(WebKit::WebViewImpl::mightBeginScrollWhileInactive): New function.

(WebKit::WebViewImpl::acceptsFirstMouse): Moved this function next to
shouldDelayWindowOrderingForEvent because their responsibilities are
very similar. Added a fast path check for when we know that we will
not accept first mouse because we can't start a drag or scroll by
clicking while inactive.

(WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent): Refactored
to use the helper function. Behavior unchanged.

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

5 years agoA hung webpage pretends to be responsive if you scroll
ggaren@apple.com [Fri, 20 Nov 2015 23:10:02 +0000 (23:10 +0000)]
A hung webpage pretends to be responsive if you scroll
https://bugs.webkit.org/show_bug.cgi?id=151518

Reviewed by Sam Weinig.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent): Don't treat wheel events as
starting or stopping the responsiveness timer. Wheel events usually
process on the event dispatch thread, which responds even if the main
thread is hung.

Instead, send an out-of-band ping to the main thread to verify that
it is still responsive and we'll be able to paint and respond to clicks
after scrolling.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendMainThreadPing):
(WebKit::WebProcessProxy::didReceiveMainThreadPing):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in: UI process support for pinging
the main thread in the web process.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::mainThreadPing):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Web process support for responding
to pings.

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

5 years agoAllow more buffer formats in the IOSurface pool
simon.fraser@apple.com [Fri, 20 Nov 2015 22:55:56 +0000 (22:55 +0000)]
Allow more buffer formats in the IOSurface pool
https://bugs.webkit.org/show_bug.cgi?id=151516

Reviewed by Tim Horton.
Source/WebCore:

Previously IOSurface::create was only looking in the pool for RGBA-format surfaces. Change that to
always look in the pool, and to cache all format types. We include format in the criteria used
to pick a surface from the pool.

* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::surfaceMatchesParameters):
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::shouldCacheFormat):
(WebCore::IOSurfacePool::shouldCacheSurface):
(WebCore::IOSurfacePool::addSurface):
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::surfaceFromPool):
(IOSurface::create):
(IOSurface::IOSurface):

Source/WebKit2:

Have RemoteLayerBackingStore go through a static function on IOSurface to return
a surface to the pool, rather than knowing about IOSurfacePool directly.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::Buffer::discard):

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

5 years ago[Win] Support High DPI drawing with CACFLayers
bfulgham@apple.com [Fri, 20 Nov 2015 22:35:01 +0000 (22:35 +0000)]
[Win] Support High DPI drawing with CACFLayers
https://bugs.webkit.org/show_bug.cgi?id=147242
<rdar://problem/19861992>

Reviewed by Simon Fraser.

* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::initializeContext): Set correct content scale factor
for current screen, and apply an appropriate base transform to the CACFLayer so drawing
operations are done properly.

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

5 years agoB3 should have a Select opcode
fpizlo@apple.com [Fri, 20 Nov 2015 22:31:19 +0000 (22:31 +0000)]
B3 should have a Select opcode
https://bugs.webkit.org/show_bug.cgi?id=150762

Reviewed by Benjamin Poulain.

This cleans up our conditional move implementation - specifically so that it distinguishes between
comparing the low 32 bits of a GPR and all bits of a GPR - and fixes bugs with operand ordering. It
then adds a Select opcode to B3 and adds all of the strength reduction and lowering magic that it
needs. Finally this change implements FTL::Output::select() in terms of B3::Select.

This patch lets us run Kraken/imaging-gaussian-blur. Running that benchmark using FTL+B3 is a 17%
speed-up. The compile times go down dramatically (by about 7x) and code quality stays about the same.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::moveDoubleConditionally32):
(JSC::MacroAssembler::moveDoubleConditionally64):
(JSC::MacroAssembler::moveDoubleConditionallyTest32):
(JSC::MacroAssembler::moveDoubleConditionallyTest64):
(JSC::MacroAssembler::moveDoubleConditionallyDouble):
(JSC::MacroAssembler::lea):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::move):
(JSC::MacroAssemblerX86Common::moveConditionallyDouble):
(JSC::MacroAssemblerX86Common::zeroExtend32ToPtr):
(JSC::MacroAssemblerX86Common::moveConditionally32):
(JSC::MacroAssemblerX86Common::moveConditionallyTest32):
(JSC::MacroAssemblerX86Common::set32):
(JSC::MacroAssemblerX86Common::cmov):
(JSC::MacroAssemblerX86Common::moveConditionally): Deleted.
(JSC::MacroAssemblerX86Common::moveConditionallyTest): Deleted.
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::branchNeg64):
(JSC::MacroAssemblerX86_64::moveConditionally64):
(JSC::MacroAssemblerX86_64::moveConditionallyTest64):
(JSC::MacroAssemblerX86_64::abortWithReason):
* assembler/X86Assembler.h:
(JSC::X86Assembler::cmovl_rr):
(JSC::X86Assembler::cmovl_mr):
(JSC::X86Assembler::cmovel_rr):
(JSC::X86Assembler::cmovnel_rr):
(JSC::X86Assembler::cmovpl_rr):
(JSC::X86Assembler::cmovnpl_rr):
(JSC::X86Assembler::cmovq_rr):
(JSC::X86Assembler::cmovq_mr):
(JSC::X86Assembler::cmoveq_rr):
(JSC::X86Assembler::cmovneq_rr):
(JSC::X86Assembler::cmovpq_rr):
(JSC::X86Assembler::cmovnpq_rr):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createCompare):
(JSC::B3::Air::LowerToAir::createSelect):
(JSC::B3::Air::LowerToAir::marshallCCallArgument):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3MoveConstants.cpp:
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3ReduceStrength.cpp:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::checkOpcode):
(JSC::B3::Value::typeFor):
* b3/B3Value.h:
* b3/B3ValueKey.cpp:
(JSC::B3::ValueKey::dump):
(JSC::B3::ValueKey::materialize):
* b3/B3ValueKey.h:
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::hash):
(JSC::B3::ValueKey::operator bool):
* b3/B3ValueKeyInlines.h:
(JSC::B3::ValueKey::ValueKey):
(JSC::B3::ValueKey::child):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testTruncSExt32):
(JSC::B3::testBasicSelect):
(JSC::B3::testSelectTest):
(JSC::B3::testSelectCompareDouble):
(JSC::B3::testSelectDouble):
(JSC::B3::testSelectDoubleTest):
(JSC::B3::testSelectDoubleCompareDouble):
(JSC::B3::zero):
(JSC::B3::run):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::testIsZeroPtr):
(JSC::FTL::Output::testNonZeroPtr):
(JSC::FTL::Output::select):
(JSC::FTL::Output::extractValue):
(JSC::FTL::Output::fence):

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

5 years agoModern IDB: In the VersionChangeEvent for delete database calls, oldVersion should...
beidson@apple.com [Fri, 20 Nov 2015 22:14:56 +0000 (22:14 +0000)]
Modern IDB: In the VersionChangeEvent for delete database calls, oldVersion should be null instead of 0.
https://bugs.webkit.org/show_bug.cgi?id=151481

Reviewed by Sam Weinig.

Source/WebCore:

No new tests, covered by changes to:
    storage/indexeddb/modern/deletedatabase-1.html
    storage/indexeddb/modern/deletedatabase-2.html

* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/indexeddb/IDBVersionChangeEvent.idl:

* Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
(WebCore::IDBClient::IDBVersionChangeEvent::newVersion):
* Modules/indexeddb/client/IDBVersionChangeEventImpl.h:

* Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
(WebCore::LegacyVersionChangeEvent::newVersion):
* Modules/indexeddb/legacy/LegacyVersionChangeEvent.h:

LayoutTests:

* storage/indexeddb/modern/deletedatabase-1-expected.txt:
* storage/indexeddb/modern/deletedatabase-2-expected.txt:

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

5 years agoRemove NETWORK_PROCESS compile flag
achristensen@apple.com [Fri, 20 Nov 2015 22:10:52 +0000 (22:10 +0000)]
Remove NETWORK_PROCESS compile flag
https://bugs.webkit.org/show_bug.cgi?id=151512

Reviewed by Tim Horton.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebKit2:

* CMakeLists.txt:
* NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
(NetworkProcessMain):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkLoadParameters.cpp:
(WebKit::NetworkLoadParameters::NetworkLoadParameters):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
* NetworkProcess/efl/NetworkProcessMainEfl.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkLoadMac.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformTerminate):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::storageSession):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::addCustomProtocol):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::supplementName):
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::registerScheme):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/Network/NetworkProcessSupplement.h:
(WebKit::NetworkProcessSupplement::initialize):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/ProcessExecutablePath.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/mac/CookieStorageShim.h:
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
* Shared/mac/CookieStorageShimLibrary.cpp:
* Shared/mac/CookieStorageShimLibrary.h:
* UIProcess/API/APISession.cpp:
(API::Session::~Session):
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextGetNetworkProcessIdentifier):
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_process_model_set):
(ewk_context_process_model_get):
(ewk_context_tls_error_policy_get):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::updateProcessSuppressionState):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::cancel):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::processTypeAsString):
(WebKit::ProcessLauncher::getProcessTypeFromString):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
(WebKit::createProcess):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::initializeWebPage):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::initializeClient):
(WebKit::WebProcessPool::networkingProcessConnection):
(WebKit::WebProcessPool::languageChanged):
(WebKit::WebProcessPool::setUsesNetworkProcess):
(WebKit::WebProcessPool::usesNetworkProcess):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::getNetworkProcessConnection):
(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::download):
(WebKit::WebProcessPool::resumeDownload):
(WebKit::WebProcessPool::setAdditionalPluginsDirectory):
(WebKit::WebProcessPool::networkProcessIdentifier):
(WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
(WebKit::WebProcessPool::registerURLSchemeAsLocal):
(WebKit::WebProcessPool::setCacheModel):
(WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
(WebKit::WebProcessPool::createDownloadProxy):
(WebKit::WebProcessPool::useTestingNetworkSession):
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
(WebKit::WebProcessPool::requestNetworkingStatistics):
(WebKit::WebProcessPool::handleMessage):
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToNetworkingProcess):
(WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginProcessConnection):
(WebKit::WebProcessProxy::getNetworkProcessConnection):
(WebKit::WebProcessProxy::getDatabaseProcessConnection):
(WebKit::WebProcessProxy::createDownloadProxy):
(WebKit::WebProcessProxy::didCancelProcessSuspension):
(WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
(WebKit::WebProcessProxy::didSetAssertionState):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::throttler):
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::cloneSessionData):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::initInspectorServer):
(WebKit::WebProcessPool::setIgnoreTLSErrors):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebKit2Prefix.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::networkProcessCrashed):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/Network/WebResourceLoader.cpp:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::initializeBrowserFuncs):
(WebKit::netscapeBrowserFuncs):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::registerRedirect):
(WebKit::NetscapePlugin::urlRedirectResponse):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
(WebKit::WebPlatformStrategies::resourceLoadScheduler):
(WebKit::WebPlatformStrategies::createBlobRegistry):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
(WebKit::WebProcess::usesNetworkProcess):
(WebKit::WebProcess::networkConnection):
(WebKit::WebProcess::webResourceLoadScheduler):
(WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
(WebKit::WebProcess::prefetchDNS):
* WebProcess/WebProcess.h:
* config.h:

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

5 years ago[JSC] Add Air lowering to BitNot() for Xor(value, -1)
benjamin@webkit.org [Fri, 20 Nov 2015 22:07:05 +0000 (22:07 +0000)]
[JSC] Add Air lowering to BitNot() for Xor(value, -1)
https://bugs.webkit.org/show_bug.cgi?id=151474

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

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::not32):
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::not64):
* assembler/X86Assembler.h:
(JSC::X86Assembler::notq_r):
(JSC::X86Assembler::notq_m):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::createGenericCompare):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3ReduceStrength.cpp:
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testNegValueSubOne):
(JSC::B3::testNegValueSubOne32):
(JSC::B3::testBitNotArg):
(JSC::B3::testBitNotImm):
(JSC::B3::testBitNotMem):
(JSC::B3::testBitNotArg32):
(JSC::B3::testBitNotImm32):
(JSC::B3::testBitNotMem32):
(JSC::B3::testBitNotOnBooleanAndBranch32):
(JSC::B3::int64Operands):
(JSC::B3::int32Operands):
(JSC::B3::run):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::bitNot):

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

5 years agoSuper use should be recorded in per-function scope
utatane.tea@gmail.com [Fri, 20 Nov 2015 21:19:57 +0000 (21:19 +0000)]
Super use should be recorded in per-function scope
https://bugs.webkit.org/show_bug.cgi?id=151500

Reviewed by Geoffrey Garen.

"super" use is prohibited under the non-constructor / non-class-method-related functions.
This "super" use should be recorded in per-function scope to check its incorrect use after
parsing a function.
Currently, we accidentally record it to a lexical current scope. So when using "super" inside
a block scope, our "super" use guard miss it.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/Parser.h:
(JSC::Parser::currentVariableScope):
(JSC::Parser::currentFunctionScope):
(JSC::Parser::declareVariable):
* tests/stress/super-in-lexical-scope.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntaxError.test):

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

5 years agoAddressing missed review feedback for:
beidson@apple.com [Fri, 20 Nov 2015 21:14:58 +0000 (21:14 +0000)]
Addressing missed review feedback for:
Modern IDB: Make in-memory ObjectStore cursors work.
https://bugs.webkit.org/show_bug.cgi?id=151196

Reviewed by Darin Adler.

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::maybeOpenCursor):
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::create): Deleted.
* Modules/indexeddb/server/MemoryObjectStoreCursor.h:

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

5 years agoCaching of properties on objects that have named property getters is sometimes incorrect
cdumez@apple.com [Fri, 20 Nov 2015 20:45:12 +0000 (20:45 +0000)]
Caching of properties on objects that have named property getters is sometimes incorrect
https://bugs.webkit.org/show_bug.cgi?id=151453
<rdar://problem/23049343>

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

Add new GetOwnPropertySlotIsImpureForPropertyAbsence TypeInfo flag to be
used by objects that have a non-'OverrideBuiltins' named property getter.
This flag prevents caching of properties that are missing as a named
property with this name may later become available.

Objects with an 'OverrideBuiltins' named property getter will keep using
the GetOwnPropertySlotIsImpure TypeInfo flag, which prevents all property
caching since named properties can override own properties or properties
on the prototype.

* bytecode/ComplexGetStatus.cpp:
(JSC::ComplexGetStatus::computeFor):
* bytecode/PropertyCondition.cpp:
(JSC::PropertyCondition::isStillValid):
* jit/Repatch.cpp:
(JSC::tryCacheGetByID):
(JSC::tryRepatchIn):
* jsc.cpp:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::getOwnPropertySlotIsImpure):
(JSC::TypeInfo::getOwnPropertySlotIsImpureForPropertyAbsence):
(JSC::TypeInfo::prohibitsPropertyCaching): Deleted.
* runtime/Structure.h:

Source/WebCore:

In r188590, we dropped the JSC::GetOwnPropertySlotIsImpure TypeInfo flag for
interfaces that have a non-'OverrideBuiltins' named property getter in order
to allow caching of properties returns by GetOwnPropertySlot(). We assumed
this was safe as it was no longer possible for named properties to override
own properties (or properties on the prototype).

However, there is an issue when we cache the non-existence of a property.
Even though at one point the property did not exist, a named property with
this name may later become available. In such case, caching would cause us
to wrongly report a property as missing.

To address the problem, this patch introduces a new
GetOwnPropertySlotIsImpureForPropertyAbsence TypeInfo flag and uses it for
interfaces that have a non-'OverrideBuiltins' named property getter. This
will cause us to not cache the fact that a property is missing on such
objects, while maintaining the performance win from r188590 in the common
case.

Test: fast/dom/NamedNodeMap-named-getter-caching.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:

LayoutTests:

Add layout test to make sure caching does not cause NamedNodeMap's
named property getter to sometimes wrongly report a property as
missing.

* fast/dom/NamedNodeMap-named-getter-caching-expected.txt: Added.
* fast/dom/NamedNodeMap-named-getter-caching.html: Added.

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

5 years agoRemove chartPointRadius from interactive chart component
rniwa@webkit.org [Fri, 20 Nov 2015 20:40:26 +0000 (20:40 +0000)]
Remove chartPointRadius from interactive chart component
https://bugs.webkit.org/show_bug.cgi?id=151480

Reviewed by Darin Adler.

Replaced the parameter by CSS rules.

* public/v2/chart-pane.css:
(.chart .dot):
(.chart .dot.foreground):
(.chart .highlight):
(.chart .extent):
* public/v2/index.html:
* public/v2/interactive-chart.js:
(App.InteractiveChartComponent.Ember.Component.extend._constructGraphIfPossible):
(App.InteractiveChartComponent.Ember.Component.extend._highlightedItemsChanged):

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

5 years agoPerf dashboard's runs API uses more than 128MB of memory
rniwa@webkit.org [Fri, 20 Nov 2015 20:39:34 +0000 (20:39 +0000)]
Perf dashboard's runs API uses more than 128MB of memory
https://bugs.webkit.org/show_bug.cgi?id=151478

Reviewed by Andreas Kling.

Don't fetch all query results at once to avoid using twice as much memory as needed.
Use iterative API to format each result at a time.

This change is also a 5% runtime performance gain.

* public/api/runs.php:
(RunsGenerator::__construct): Takes a Database instance instead of a list of configurations. The latter is
no longer needed as we pass in each configuration type explicitly to fetch_runs.
(RunsGenerator::fetch_runs): Renamed from add_runs since it now executes the database query via execute_query.
Also moved the logic to compute the last modified time here.
(RunsGenerator::execute_query): Moved from fetch_runs_for_config. Use Database::query instead of query_and_fetch_all.
(RunsGeneratorForTestGroup):
(RunsGeneratorForTestGroup::__construct):
(RunsGeneratorForTestGroup::execute_query): Moved from fetch_runs_for_config_and_test_group.

* public/include/db.php:
(generate_data_file): Lock the file to avoid corruption.

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

5 years agoPerf dashboard always fetches charts JSON twice
rniwa@webkit.org [Fri, 20 Nov 2015 20:35:18 +0000 (20:35 +0000)]
Perf dashboard always fetches charts JSON twice
https://bugs.webkit.org/show_bug.cgi?id=151483

Reviewed by Andreas Kling.

Only re-generate "runs" JSON via /api/runs/ when the cache doesn't exist in /data/ or the cached JSON is
obsolete (shouldRefetch is set true) or corrupt (the second closure).

* public/v2/app.js:
(App.Pane._fetch):

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

5 years agoBack-buffer to front-buffer copy fails for some buffer formats
simon.fraser@apple.com [Fri, 20 Nov 2015 20:05:05 +0000 (20:05 +0000)]
Back-buffer to front-buffer copy fails for some buffer formats
https://bugs.webkit.org/show_bug.cgi?id=151475
rdar://problem/23617899

Reviewed by Tim Horton.

Source/WebCore:

Fix some fo the bitsPerComponent/bitsPerPixel options in IOSurface::ensurePlatformContext()
for RGB10 buffers. Fix IOSurface::format() to return the new formats.

Implement IOSurface::copyToSurface(), which does a synchronous copy between
surfaces.

* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(IOSurface::create):
(IOSurface::ensurePlatformContext):
(IOSurface::format):
(IOSurface::copyToSurface):

Source/WebKit2:

When displaying RemoteLayerBackingStore, we copy the back buffer to the front
buffer before painting the updated regions. For buffers using Format::RGB10A8,
the CGImage-based copy fails, so in this case, use IOSurface::copyToSurface().

Reorganized RemoteLayerBackingStore::drawInContext() to make this a bit easier
to understand. First, we either copy the entire surface over, or paint the backImage.
Then we clip to the dirty rects, and clear them, then paint the layer contents.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):

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

5 years agoSimple line layout: Add text-indent support.
zalan@apple.com [Fri, 20 Nov 2015 19:20:57 +0000 (19:20 +0000)]
Simple line layout: Add text-indent support.
https://bugs.webkit.org/show_bug.cgi?id=151472

Reviewed by Simon Fraser.

This enables us to use simple line layout on text-indent content.

Source/WebCore:

Test: fast/text/simple-line-text-indent.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::updateLineConstrains):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::canUseForStyle): Deleted.

LayoutTests:

* fast/text/simple-line-text-indent-expected.html: Added.
* fast/text/simple-line-text-indent.html: Added.

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

5 years agoModern IDB: IDBFactory.deleteDatabase() support.
beidson@apple.com [Fri, 20 Nov 2015 18:55:42 +0000 (18:55 +0000)]
Modern IDB: IDBFactory.deleteDatabase() support.
https://bugs.webkit.org/show_bug.cgi?id=151456

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/deletedatabase-1.html
       storage/indexeddb/modern/deletedatabase-2.html

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

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

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::hasPendingActivity): Deleted.

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::deleteDatabase):
(WebCore::IDBServer::IDBServer::deleteUniqueIDBDatabase):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::hasAnyPendingCallbacks):
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChangeForUpgrade):
(WebCore::IDBServer::UniqueIDBDatabase::notifyConnectionsOfVersionChange):
(WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
(WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::invokeDeleteOrRunTransactionTimer):
(WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
(WebCore::IDBServer::UniqueIDBDatabase::invokeTransactionScheduler): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::transactionSchedulingTimerFired): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:
(WebCore::IDBServer::UniqueIDBDatabase::identifier):
(WebCore::IDBServer::UniqueIDBDatabase::deletePending):

* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::deleteDatabaseSuccess):
* Modules/indexeddb/shared/IDBResultData.h:

LayoutTests:

* storage/indexeddb/modern/deletedatabase-1-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-1.html: Added.
* storage/indexeddb/modern/deletedatabase-2-expected.txt: Added.
* storage/indexeddb/modern/deletedatabase-2.html: Added.
* storage/indexeddb/modern/deletedatabase-request-event-expected.txt:
* storage/indexeddb/modern/deletedatabase-request-event.html:

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

5 years agoModern IDB: Get IDBRequest.readyState right.
beidson@apple.com [Fri, 20 Nov 2015 18:55:11 +0000 (18:55 +0000)]
Modern IDB: Get IDBRequest.readyState right.
https://bugs.webkit.org/show_bug.cgi?id=151484

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/request-readystate.html

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

LayoutTests:

* storage/indexeddb/modern/request-readystate-expected.txt: Added.
* storage/indexeddb/modern/request-readystate.html: Added.

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

5 years agoUnreviewed, fix installation of ninja-build after the previous commit
mcatanzaro@igalia.com [Fri, 20 Nov 2015 15:17:36 +0000 (15:17 +0000)]
Unreviewed, fix installation of ninja-build after the previous commit

* gtk/install-dependencies:

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

5 years agoChanging some imported/w3c/web-platform-tests/html/semantics expectations from Timeou...
youenn.fablet@crf.canon.fr [Fri, 20 Nov 2015 15:01:27 +0000 (15:01 +0000)]
Changing some imported/w3c/web-platform-tests/html/semantics expectations from Timeout/Failure to Pass
https://bugs.webkit.org/show_bug.cgi?id=151492

Unreviewed.

* TestExpectations: Removing timeout/failure expectations.
* platform/efl/TestExpectations: Removing no longer needed pass expectation.

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

5 years ago[GTK] install-dependencies should run installer exactly once
mcatanzaro@igalia.com [Fri, 20 Nov 2015 14:41:50 +0000 (14:41 +0000)]
[GTK] install-dependencies should run installer exactly once
https://bugs.webkit.org/show_bug.cgi?id=151477

Reviewed by Carlos Garcia Campos.

* gtk/install-dependencies:

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

5 years ago[EFL] Enable FTL JIT by default on X86_64
ossy@webkit.org [Fri, 20 Nov 2015 11:38:10 +0000 (11:38 +0000)]
[EFL] Enable FTL JIT by default on X86_64
https://bugs.webkit.org/show_bug.cgi?id=143822

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/OptionsEfl.cmake:

Tools:

* Scripts/build-jsc:
* Scripts/run-javascriptcore-tests:
* Scripts/webkitperl/FeatureList.pm:
* efl/jhbuild.modules:
* gtk/jhbuildrc:
* jhbuild/jhbuildrc_common.py:
(init):

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

5 years agoUnskip mediastream tests after crash was fixed
ddkilzer@apple.com [Fri, 20 Nov 2015 09:33:23 +0000 (09:33 +0000)]
Unskip mediastream tests after crash was fixed
<https://bugs.webkit.org/show_bug.cgi?id=151353>

* platform/mac/TestExpectations: Bug 151462 fixed the crash, so
unskip the tests again.

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

5 years agoUse HTTPHeaderName as much as possible in XMLHttpRequest
youenn.fablet@crf.canon.fr [Fri, 20 Nov 2015 09:25:56 +0000 (09:25 +0000)]
Use HTTPHeaderName as much as possible in XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=151438

Reviewed by Darin Adler.

Removing XMLHttpRequest::setRequestHeaderInternal and XMLHttpRequest::getRequestHeader.
Using directly HTTPHeaderMap.add, HTTPHeaderMap.set and HTTPHeaderMap.get.

No change in behavior.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::XMLHttpRequest::getAllResponseHeaders):
* xml/XMLHttpRequest.h:

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

5 years agoMediaStream: Fix mock video source crash
eric.carlson@apple.com [Fri, 20 Nov 2015 09:06:05 +0000 (09:06 +0000)]
MediaStream: Fix mock video source crash
https://bugs.webkit.org/show_bug.cgi?id=151462

Reviewed by Alexey Proskuryakov.

No new tests, this fixes existing tests.

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawText): Declare the String used to intialize a
  StringView explicitly so it outlives the StringView.

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

5 years agoREGRESSION (r192460,r192677): Fix all the builds
ddkilzer@apple.com [Fri, 20 Nov 2015 08:09:16 +0000 (08:09 +0000)]
REGRESSION (r192460,r192677): Fix all the builds

* platform/spi/cocoa/QuartzCoreSPI.h: Check different.

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

5 years agoREGRESSION (r192460): Fix tvOS build again
ddkilzer@apple.com [Fri, 20 Nov 2015 07:02:23 +0000 (07:02 +0000)]
REGRESSION (r192460): Fix tvOS build again

* platform/spi/cocoa/QuartzCoreSPI.h: Update version check.
This will probably need to be backed out in the future.

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

5 years agoREGRESSION(r189433) Web Inspector: JSContext inspection exceptions should include...
commit-queue@webkit.org [Fri, 20 Nov 2015 06:02:09 +0000 (06:02 +0000)]
REGRESSION(r189433) Web Inspector: JSContext inspection exceptions should include native call frames by default
https://bugs.webkit.org/show_bug.cgi?id=151479

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-19
Reviewed by Brian Burg.

* inspector/JSGlobalObjectInspectorController.h:
Value accidentally got flipped when moving to initializer syntax.

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

5 years agoWebRTC: Initial testing of updated RTCPeerConnection API
adam.bergkvist@ericsson.com [Fri, 20 Nov 2015 04:51:18 +0000 (04:51 +0000)]
WebRTC: Initial testing of updated RTCPeerConnection API
https://bugs.webkit.org/show_bug.cgi?id=151304

Reviewed by Eric Carlson.

Source/WebCore:

Remove faulty ASSERT since the selector argument to
RTCPeerConnection.getStats() is nullable. Also use
pointers instead of a ref (for the same reason).

Tests: Unskip two crashing tests.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::getStats):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::privateGetStats):

LayoutTests:

Unskip two previously crashing tests.
fast/mediastream/RTCPeerConnection-overloaded-operations.html
fast/mediastream/RTCPeerConnection-overloaded-operations-params.html

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoUnreviewed, install llvm-static on Fedora to fix build now FTL is enabled
mcatanzaro@igalia.com [Fri, 20 Nov 2015 04:36:05 +0000 (04:36 +0000)]
Unreviewed, install llvm-static on Fedora to fix build now FTL is enabled

* gtk/install-dependencies:

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

5 years agoUnreviewed, rolling out r192667 and r192668.
commit-queue@webkit.org [Fri, 20 Nov 2015 03:52:56 +0000 (03:52 +0000)]
Unreviewed, rolling out r192667 and r192668.
https://bugs.webkit.org/show_bug.cgi?id=151476

broke api tests (Requested by alexchristensen on #webkit).

Reverted changesets:

"Remove the non-NetworkProcess configurations"
https://bugs.webkit.org/show_bug.cgi?id=151418
http://trac.webkit.org/changeset/192667

"Fix GTK Build after r192667."
http://trac.webkit.org/changeset/192668

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

5 years ago[EFL][GTK] context_menu API test failed after r192333
hs85.jeong@samsung.com [Fri, 20 Nov 2015 02:45:09 +0000 (02:45 +0000)]
[EFL][GTK] context_menu API test failed after r192333
https://bugs.webkit.org/show_bug.cgi?id=151437

Reviewed by Carlos Garcia Campos.

EFL,GTK port didn't use the share Menu.

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):

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

5 years ago[ES6] Add support for rest parameters
sbarati@apple.com [Fri, 20 Nov 2015 02:37:47 +0000 (02:37 +0000)]
[ES6] Add support for rest parameters
https://bugs.webkit.org/show_bug.cgi?id=38408

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch implements rest parameters from the ES6 spec.
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-function-definitions

We implement the rest parameter as a new AST node. This AST node
lowers to "op_new_array X, op_copy_rest X". Note
that the op_copy_rest opcode does not have a result.
The bulk of this patch is implementing op_copy_rest.
This patch implements this in all four tiers in a straight forward way.
The opcode is implemented as a C call that will read the pertinent
arguments from the call frame and fill them into the array.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/Instruction.h:
(JSC::Instruction::Instruction):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::invalidateForInContextForLocal):
(JSC::BytecodeGenerator::emitRestParameter):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::AssignmentElementNode::toString):
(JSC::RestParameterNode::collectBoundIdentifiers):
(JSC::RestParameterNode::toString):
(JSC::RestParameterNode::bindValue):
(JSC::RestParameterNode::emit):
(JSC::SpreadExpressionNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::setEpoch):
(JSC::DFG::Node::numberOfArgumentsToSkip):
(JSC::DFG::Node::dumpChildren):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCreateClonedArguments):
(JSC::DFG::SpeculativeJIT::compileCopyRest):
(JSC::DFG::SpeculativeJIT::compileNotifyWrite):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCreateClonedArguments):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCopyRest):
(JSC::FTL::DFG::LowerDFGToLLVM::compileNewObject):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_out_of_band_arguments):
(JSC::JIT::emit_op_copy_rest):
* jit/JITOperations.h:
* llint/LowLevelInterpreter.asm:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createBindingLocation):
(JSC::ASTBuilder::createRestParameter):
(JSC::ASTBuilder::createAssignmentElement):
* parser/NodeConstructors.h:
(JSC::AssignmentElementNode::AssignmentElementNode):
(JSC::RestParameterNode::RestParameterNode):
(JSC::DestructuringAssignmentNode::DestructuringAssignmentNode):
* parser/Nodes.h:
(JSC::DestructuringPatternNode::isBindingNode):
(JSC::DestructuringPatternNode::isRestParameter):
(JSC::DestructuringPatternNode::emitDirectBinding):
(JSC::RestParameterNode::name):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVariableDeclarationList):
(JSC::Parser<LexerType>::declareRestOrNormalParameter):
(JSC::Parser<LexerType>::createBindingPattern):
(JSC::Parser<LexerType>::parseFormalParameters):
* parser/Parser.h:
(JSC::Parser::strictMode):
(JSC::Parser::isValidStrictMode):
(JSC::Parser::declareParameter):
(JSC::Parser::breakIsValid):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
* tests/es6.yaml:
* tests/stress/rest-parameter-and-default-arguments.js: Added.
(assert):
(shouldThrowTDZ):
(foo):
(baz):
(i.shouldThrowTDZ):
* tests/stress/rest-parameter-basics.js: Added.
(assert):
(foo):
(bar):
(capture):
(baz):
(jaz):
(kaz):
(raz):
(restLength):
(testArgumentsObject):
(strictModeLikeArgumentsObject):
* tests/stress/rest-parameter-inlined.js: Added.
(assert):
(bar):
(foo):
(baz):
(jaz):

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:
(catch):

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

5 years agoMarking imported/w3c/html-templates/parsing-html-templates/creating-an-element-for...
ryanhaddad@apple.com [Fri, 20 Nov 2015 01:28:30 +0000 (01:28 +0000)]
Marking imported/w3c/html-templates/parsing-html-templates/creating-an-element-for-the-token/template-owner-document.html as flaky crasher
https://bugs.webkit.org/show_bug.cgi?id=151469

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

5 years agoCalculate the graphics benchmark test gain adaptively
commit-queue@webkit.org [Fri, 20 Nov 2015 01:20:48 +0000 (01:20 +0000)]
Calculate the graphics benchmark test gain adaptively
https://bugs.webkit.org/show_bug.cgi?id=151208

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

We need to calculate the gain of the graphics benchmark tests adaptively
and get rid of the gain and limits parameters we have to choose manually
for every test. We are going to use the classic Ziegler–Nichols method for
calculating the gain and integral and derivative times. We are going to
try moving on a cubic curve during the manual stage from y0 to reach ysp.
We also going to use a saturation actuator to ensure the system does not
fluctuate.

* Animometer/resources/extensions.js:
(ResultsTable.prototype._isNoisyMeasurement): Fix a parameter name.
(ResultsTable.prototype._isNoisyTest): Since score is a member of testResults, we need to limit our search to frame rate and complexity.
(ResultsTable.prototype._showTest): Pass the correct parameter to _isNoisyMeasurement().

* Animometer/resources/strings.js: Fix the indentation and name and value of a string.

* Animometer/runner/resources/tests.js: Remove all the manual gains and limits parameters which had to be passed to every test.

* Animometer/tests/resources/main.js:
(BenchmarkState.prototype.currentStage): Fix an enum name.
(Benchmark): Get rid of manual gain and limits.
(Benchmark.prototype.update): Simplify the calculation by having all the times in ms.

* Animometer/tests/resources/math.js:
(PIDController): Get rid of the manual gain and limits and the magic numbers for Ti and Td.
(PIDController.prototype._yPosition): Tells whether the test current output is moving towards the set-point or away from it.
(PIDController.prototype._distanceUltimate): Calculates the ultimate distance from y0 after time t using a cubic formula.
(PIDController.prototype._distance): Calculates the distance of y relative to y0.
(PIDController.prototype._gainIncrement): Decides how much the proportional gain should be increased during the manual gain stage.
(PIDController.prototype._updateStage): Updates the stage of the controller based on its current stage and the system output.
(PIDController.prototype._tuneP): Tunes the system before calculating the PID controller gains.
(PIDController.prototype._tunePID): PID tuning function.
(PIDController.prototype._tune):
(PIDController.prototype._saturate):
(PIDController.prototype.tune): Manages calculating the controller parameters. It then returns a PID tuning value.
(PIDController.prototype._sat): Deleted. We may need to return it back but the limits have to be calculated adaptively not manually.

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

5 years agoFix GTK Build after r192667.
achristensen@apple.com [Fri, 20 Nov 2015 01:13:17 +0000 (01:13 +0000)]
Fix GTK Build after r192667.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(webkit_web_context_set_process_model):
(webkit_web_context_get_process_model):
(toWebKitProcessModel): Deleted.
(injectedBundleDirectory): Deleted.

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

5 years agoRemove the non-NetworkProcess configurations
commit-queue@webkit.org [Fri, 20 Nov 2015 00:51:43 +0000 (00:51 +0000)]
Remove the non-NetworkProcess configurations
https://bugs.webkit.org/show_bug.cgi?id=151418

Patch by Alex Christensen <achristensen@webkit.org> on 2015-11-19
Reviewed by Geoffrey Garen.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebKit2:

This patch assumes ENABLE(NETWORK_PROCESS) is always 1, usesNetworkProcess is always true,
and ProcessModel is always ProcessModelMultipleSecondaryProcesses.  It does this by removing
the checks and the code that would be executed with other configurations.

* CMakeLists.txt:
* NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm:
(NetworkProcessMain):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::filesInBlob):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkLoad.cpp:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadClient.h:
* NetworkProcess/NetworkLoadParameters.cpp:
(WebKit::NetworkLoadParameters::NetworkLoadParameters):
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/NetworkResourceLoader.messages.in:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearDiskCache):
* NetworkProcess/efl/NetworkProcessMainEfl.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkLoadMac.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::NetworkProcess::platformTerminate):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::storageSession):
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKInspectorToggleJavaScriptProfiling):
(WKContextSetProcessModel):
(WKContextGetProcessModel):
(WKContextSetUsesNetworkProcess):
(WKGraphicsContextGetCGContext):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::addCustomProtocol):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
(WebKit::CustomProtocolManager::supplementName):
(WebKit::CustomProtocolManager::initialize):
(WebKit::CustomProtocolManager::registerScheme):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/Network/NetworkProcessSupplement.h:
(WebKit::NetworkProcessSupplement::initialize):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/ProcessExecutablePath.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfPluginProcess):
(WebKit::executablePathOfNetworkProcess):
(WebKit::executablePathOfDatabaseProcess):
* Shared/mac/CookieStorageShim.h:
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
* Shared/mac/CookieStorageShimLibrary.cpp:
* Shared/mac/CookieStorageShimLibrary.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APISession.cpp:
(API::Session::~Session):
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI):
(WebKit::toFontSmoothingLevel):
(WebKit::toProcessModel): Deleted.
* UIProcess/API/C/WKContext.cpp:
(WKContextGetCacheModel):
(WKContextSetMaximumNumberOfProcesses):
(WKContextSetJavaScriptGarbageCollectorTimerEnabled):
(WKContextUseTestingNetworkSession):
(WKContextSetProcessModel): Deleted.
(WKContextGetProcessModel): Deleted.
(WKContextSetUsesNetworkProcess): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextGetNetworkProcessIdentifier):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
* UIProcess/API/Cocoa/WKProcessPool.mm:
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_process_model_set):
(ewk_context_process_model_get):
(ewk_context_tls_error_policy_get):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::updateProcessSuppressionState):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::platformInvalidateContext):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::cancel):
(WebKit::DownloadProxy::invalidate):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::processTypeAsString):
(WebKit::ProcessLauncher::getProcessTypeFromString):
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::computeProcessShimPath):
(WebKit::serviceName):
(WebKit::shouldLeakBoost):
(WebKit::createProcess):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
* UIProcess/ProcessModel.h: Removed.
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::shouldTerminate):
(WebKit::WebCookieManagerProxy::refWebContextSupplement):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::inspectorProcessPool):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::initializeWebPage):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::create):
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::initializeClient):
(WebKit::WebProcessPool::setDownloadClient):
(WebKit::WebProcessPool::setMaximumNumberOfProcesses):
(WebKit::WebProcessPool::networkingProcessConnection):
(WebKit::WebProcessPool::languageChanged):
(WebKit::WebProcessPool::textCheckerStateChanged):
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::getNetworkProcessConnection):
(WebKit::WebProcessPool::ensureDatabaseProcess):
(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::processDidCachePage):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::download):
(WebKit::WebProcessPool::resumeDownload):
(WebKit::WebProcessPool::postMessageToInjectedBundle):
(WebKit::WebProcessPool::setAdditionalPluginsDirectory):
(WebKit::WebProcessPool::networkProcessIdentifier):
(WebKit::WebProcessPool::setAlwaysUsesComplexTextCodePath):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation):
(WebKit::WebProcessPool::registerURLSchemeAsLocal):
(WebKit::WebProcessPool::setCacheModel):
(WebKit::WebProcessPool::setDefaultRequestTimeoutInterval):
(WebKit::WebProcessPool::createDownloadProxy):
(WebKit::WebProcessPool::addMessageReceiver):
(WebKit::WebProcessPool::useTestingNetworkSession):
(WebKit::WebProcessPool::allowSpecificHTTPSCertificateForHost):
(WebKit::WebProcessPool::requestWebContentStatistics):
(WebKit::WebProcessPool::requestNetworkingStatistics):
(WebKit::WebProcessPool::handleMessage):
(WebKit::WebProcessPool::setProcessModel): Deleted.
(WebKit::WebProcessPool::setUsesNetworkProcess): Deleted.
(WebKit::WebProcessPool::usesNetworkProcess): Deleted.
(WebKit::WebProcessPool::ensureSharedWebProcess): Deleted.
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToNetworkingProcess):
(WebKit::WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary):
(WebKit::WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary):
(WebKit::WebProcessPool::sendToOneProcess):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::getPluginProcessConnection):
(WebKit::WebProcessProxy::getNetworkProcessConnection):
(WebKit::WebProcessProxy::getDatabaseProcessConnection):
(WebKit::WebProcessProxy::updateTextCheckerState):
(WebKit::WebProcessProxy::didSaveToPageCache):
(WebKit::WebProcessProxy::didCancelProcessSuspension):
(WebKit::WebProcessProxy::reinstateNetworkProcessAssertionState):
(WebKit::WebProcessProxy::didSetAssertionState):
(WebKit::WebProcessProxy::createDownloadProxy): Deleted.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::throttler):
* UIProcess/WebProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::~WebsiteDataStore):
(WebKit::WebsiteDataStore::cloneSessionData):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::initInspectorServer):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::setIgnoreTLSErrors):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebKit2Prefix.h:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/Network/NetworkProcessConnection.cpp:
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::networkProcessCrashed):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/Network/WebResourceLoader.cpp:
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::initializeBrowserFuncs):
(WebKit::netscapeBrowserFuncs):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::registerRedirect):
(WebKit::NetscapePlugin::urlRedirectResponse):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
(WebKit::WebPlatformStrategies::resourceLoadScheduler):
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
(WebKit::WebPlatformStrategies::createPingHandle):
(WebKit::WebPlatformStrategies::createBlobRegistry):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
(WebKit::WebFrame::source):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
(WebKit::WebProcess::destroyPrivateBrowsingSession):
(WebKit::WebProcess::pluginProcessConnectionManager):
(WebKit::WebProcess::shouldTerminate):
(WebKit::WebProcess::setInjectedBundleParameters):
(WebKit::WebProcess::networkConnection):
(WebKit::WebProcess::webResourceLoadScheduler):
(WebKit::WebProcess::webToDatabaseProcessConnectionClosed):
(WebKit::WebProcess::setEnhancedAccessibility):
(WebKit::WebProcess::prefetchDNS):
(WebKit::WebProcess::didCreateDownload): Deleted.
(WebKit::WebProcess::didDestroyDownload): Deleted.
(WebKit::WebProcess::downloadProxyConnection): Deleted.
(WebKit::WebProcess::downloadsAuthenticationManager): Deleted.
(WebKit::WebProcess::downloadManager): Deleted.
(WebKit::WebProcess::usesNetworkProcess): Deleted.
(WebKit::WebProcess::downloadRequest): Deleted.
(WebKit::WebProcess::resumeDownload): Deleted.
(WebKit::WebProcess::cancelDownload): Deleted.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::textCheckerState):
(WebKit::WebProcess::eventDispatcher):
* WebProcess/WebProcess.messages.in:
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformClearResourceCaches):
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformTerminate):
(WebKit::WebProcess::setIgnoreTLSErrors):
(WebKit::WebProcess::allowSpecificHTTPSCertificateForHost):
(WebKit::getCacheDiskFreeSize): Deleted.
(WebKit::setSoupSessionAcceptLanguage): Deleted.
(WebKit::languageChanged): Deleted.
* config.h:

Tools:

* TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp:
(TestWebKitAPI::TEST):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::generatePageConfiguration):

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

5 years agoSkip more mediastream tests that crash when painting a mock video source.
ryanhaddad@apple.com [Fri, 20 Nov 2015 00:50:57 +0000 (00:50 +0000)]
Skip more mediastream tests that crash when painting a mock video source.
https://bugs.webkit.org/show_bug.cgi?id=151353

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

5 years agoB3 should have a story for Ext/Trunc strength reduction
fpizlo@apple.com [Thu, 19 Nov 2015 23:35:50 +0000 (23:35 +0000)]
B3 should have a story for Ext/Trunc strength reduction
https://bugs.webkit.org/show_bug.cgi?id=151464

Reviewed by Geoffrey Garen.

The LLVM shift operations require the shift amount to have the same type as the shift base. The B3
shift operations require the shift amount to be an Int32. DFG concurs with this. But the initial
lowering should involve pretending the FTLOutput's shift operations still take an LLVM-style shift
amount so that we don't regress FTL->LLVM performance. That means emitting an extra Trunc. That means
that we want to be able to constant fold Trunc and be able to fold Trunc(ZExt).

* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/B3ReduceStrength.cpp:
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testSwitchChillDiv):
(JSC::B3::testTruncFold):
(JSC::B3::testZExt32):
(JSC::B3::testZExt32Fold):
(JSC::B3::testSExt32):
(JSC::B3::testSExt32Fold):
(JSC::B3::testTruncZExt32):
(JSC::B3::testTruncSExt32):
(JSC::B3::zero):
(JSC::B3::run):
* ftl/FTLB3Output.cpp:
(JSC::FTL::Output::store):
(JSC::FTL::Output::baseIndex):
(JSC::FTL::Output::branch):
* ftl/FTLB3Output.h:
(JSC::FTL::Output::bitAnd):
(JSC::FTL::Output::bitOr):
(JSC::FTL::Output::bitXor):
(JSC::FTL::Output::shl):
(JSC::FTL::Output::aShr):
(JSC::FTL::Output::lShr):
(JSC::FTL::Output::bitNot):
(JSC::FTL::Output::insertElement):
(JSC::FTL::Output::address):
(JSC::FTL::Output::baseIndex):

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

5 years agoCreate correctness tests for binary snippet operators.
mark.lam@apple.com [Thu, 19 Nov 2015 23:32:09 +0000 (23:32 +0000)]
Create correctness tests for binary snippet operators.
https://bugs.webkit.org/show_bug.cgi?id=151465

Reviewed by Geoffrey Garen.

Implement a common infrastructure for generating and running tests on binary
operators.  Also re-implemented the op_add, op_sub, and op_mul tests to be based
on this new infrastructure.

* tests/stress/op_add.js:
* tests/stress/op_mul.js:
* tests/stress/op_sub.js:
- These were reimplemented using binary-op-test.js.

* tests/stress/op_div.js: Added.
* tests/stress/op_mod.js: Added.

* tests/stress/op_bitand.js: Added.
* tests/stress/op_bitor.js: Added.
* tests/stress/op_bitxor.js: Added.

* tests/stress/op_lshift.js: Added.
* tests/stress/op_rshift.js: Added.
* tests/stress/op_urshift.js: Added.

* tests/stress/resources/binary-op-test.js: Added.
- Common code for generating and running tests.

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

5 years agojs/regress/script-tests/ftl-object-sub.js needs more iterations for benchmarking.
mark.lam@apple.com [Thu, 19 Nov 2015 23:14:55 +0000 (23:14 +0000)]
js/regress/script-tests/ftl-object-sub.js needs more iterations for benchmarking.
https://bugs.webkit.org/show_bug.cgi?id=151411

Reviewed by Filip Pizlo.

Previously, in r192392, I reduced the test iteration count to make the layout
test happy and not time out.  Unfortunately, this defeats the use of this test
for benchmarking.  I've changed it to now use different iteration counts
depending on who is running it.  run-jsc-stress-tests is fine with the higher
iteration count.

Since this test is slow and only meant to test the FTL, I also changed the run
configuration to be runFTLNoCJIT to minimize the slowness hit when running jsc
stress tests.

* js/regress/script-tests/ftl-object-sub.js:

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

5 years agoWeb Inspector: yank/kill shortcuts (CTRL+Y, K) don't work in Console / QuickConsole
bburg@apple.com [Thu, 19 Nov 2015 23:00:41 +0000 (23:00 +0000)]
Web Inspector: yank/kill shortcuts (CTRL+Y, K) don't work in Console / QuickConsole
https://bugs.webkit.org/show_bug.cgi?id=151157

Reviewed by Joseph Pecoraro.

CodeMirror maintains its own editor buffer and implements its own
`killLine` command but doesn't implement the yank command. So, text
that is "killed" with CTRL-k inside a CodeMirror instance isn't
Source/WebCore:

added to Editor's kill ring. Subsequent yank commands won't match
up with the killed text, instead returning text from a prior kill
that was handled by Editor (i.e., in a contenteditable or form input).

This patch adds a host function so that the Inspector frontend can
append "missed" killed text to Editor's kill ring. Subsequent
yanks handled by Editor will then match the text killed by CodeMirror.

No new tests, because we need to use both InspectorFrontendHost
and TestRunner.execCommand, but the latter is not available in
the inspector context where we would need to simulate a kill.

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::killText):

    Added. This appends the killed text to the kill ring, starting
    a new sequence if necessary. Unlike Editor, Inspector waits
    until the next kill command to clear the existing sequence.

* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:

Source/WebInspectorUI:

added to WebCore's kill ring. Subsequent yank commands won't match
up with the killed text, instead returning text from a prior kill
that was handled by WebCore (i.e., in a contenteditable or form input).

This patch adds a host function so that the Inspector frontend can
append "missed" killed text to WebCore's kill ring. Subsequent
yanks handled by WebCore will then match the text killed by CodeMirror.

In the frontend, we implement our own key binding handler for
CTRL-k that captures killed text, detects whether the kill
should start a new sequence, and sends it to WebCore. Because this
involves several flags and listeners, and we want this behavior for
all editable CodeMirror instances, the text kill handling is
factored into its own CodeMirrorTextKillController.

To add this behavior to all instances, this patch centralizes the
code that constructs a base CodeMirror instance, and attaches the
CodeMirrorTextKillController to all instances. The shortcut
does nothing when its CodeMirror instance is read-only.

The particulars of the kill controller are documented inline.

No new tests, because we need to use both InspectorFrontendHost
and TestRunner.execCommand, but the latter is not available in
the inspector context where we would need to simulate a kill.

* UserInterface/Controllers/CodeMirrorTextKillController.js: Added.
(WebInspector.CodeMirrorTextKillController):
(WebInspector.CodeMirrorTextKillController.prototype._handleKillLine):
(WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
(WebInspector.CodeMirrorTextKillController.prototype._handleEditorBlur):
(WebInspector.CodeMirrorTextKillController.prototype._handleSelectionOrCaretChange):
* UserInterface/Main.html:
* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.killText): Add a stub to avoid check-before-use.
* UserInterface/Views/BreakpointActionView.js:
(WebInspector.BreakpointActionView.prototype._updateBody):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
* UserInterface/Views/CodeMirrorEditor.js: Added.
(WebInspector.CodeMirrorEditor.create):
(WebInspector.CodeMirrorEditor):
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor):

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

5 years ago[JSC] Fix AssignmentElement parsing
commit-queue@webkit.org [Thu, 19 Nov 2015 22:54:46 +0000 (22:54 +0000)]
[JSC] Fix AssignmentElement parsing
https://bugs.webkit.org/show_bug.cgi?id=151026

Patch by Caitlin Potter <caitp@igalia.com> on 2015-11-19
Reviewed by Geoffrey Garen.

When parsing an AssignmentPattern, any LeftHandSideExpression which
is a valid assignment target is acceptable.

Additionally, this change minimizes the amount of time spent
re-parsing ObjectLiteral and ArrayLiterals, by parsing as an
Expression first (the common case), and re-parsing only if the
result is a valid ObjectLiteral or ArrayLiteral followed by an `=`,
or if an error specifically indicates that the expression could
have been parsed as an AssignmentPattern.

* bytecompiler/NodesCodegen.cpp:
(JSC::AssignmentElementNode::collectBoundIdentifiers):
(JSC::AssignmentElementNode::bindValue):
(JSC::AssignmentElementNode::toString):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::isAssignmentLocation):
(JSC::ASTBuilder::isObjectLiteral):
(JSC::ASTBuilder::isArrayLiteral):
(JSC::ASTBuilder::isObjectOrArrayLiteral):
(JSC::ASTBuilder::createAssignmentElement):
* parser/NodeConstructors.h:
(JSC::AssignmentElementNode::AssignmentElementNode):
* parser/Nodes.h:
(JSC::ExpressionNode::isObjectLiteral):
(JSC::ExpressionNode::isArrayLiteral):
(JSC::AssignmentElementNode::assignmentTarget):
(JSC::AssignmentElementNode::divotStart):
(JSC::AssignmentElementNode::divotEnd):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::createAssignmentElement):
(JSC::Parser<LexerType>::parseBindingOrAssignmentElement):
(JSC::Parser<LexerType>::parseAssignmentElement):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
* parser/Parser.h:
(JSC::Parser::ExpressionErrorClassifier::ExpressionErrorClassifier):
(JSC::Parser::ExpressionErrorClassifier::~ExpressionErrorClassifier):
(JSC::Parser::ExpressionErrorClassifier::classifyExpressionError):
(JSC::Parser::ExpressionErrorClassifier::indicatesPossiblePattern):
(JSC::Parser::classifyExpressionError):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):
* tests/es6.yaml:
* tests/es6/destructuring_assignment_non_simple_target.js: Added.
(test.):
(test):
* tests/es6/destructuring_initializer_scoping.js: Added.
(test.tester):
* tests/stress/destructuring-assignment-syntax.js: Added.
(testSyntax):
(testSyntaxError):
* tests/stress/rest-elements.js:
(shouldThrow): Deleted.

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

5 years agoSimple line layout: Add word-spacing support.
zalan@apple.com [Thu, 19 Nov 2015 22:29:21 +0000 (22:29 +0000)]
Simple line layout: Add word-spacing support.
https://bugs.webkit.org/show_bug.cgi?id=151420

Reviewed by Antti Koivisto.

Source/WebCore:

This enables us to use simple line layout on word-spacing content.

Test: fast/text/simple-line-wordspacing.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::canUseForStyle): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
* rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

Some rebaselining is needed since inline box layout does not compute text run width properly (see webkit.org/b/151452)

* fast/text/simple-line-wordspacing-expected.html: Added.
* fast/text/simple-line-wordspacing.html: Added.
* platform/mac/css1/text_properties/word_spacing-expected.txt:
* platform/mac/fast/css/word-space-extra-expected.txt:
* platform/mac/fast/text/atsui-negative-spacing-features-expected.txt:
* platform/mac/fast/text/atsui-spacing-features-expected.txt:
* platform/mac/fast/text/basic/004-expected.txt:
* platform/mac/fast/text/basic/005-expected.txt:
* platform/mac/fast/text/word-space-expected.txt:
* platform/mac/svg/custom/svg-fonts-word-spacing-expected.txt:

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

5 years agoFTL->B3 lowering should support integer comparisons with the opcode abstracted and...
fpizlo@apple.com [Thu, 19 Nov 2015 22:18:15 +0000 (22:18 +0000)]
FTL->B3 lowering should support integer comparisons with the opcode abstracted and a few other things
https://bugs.webkit.org/show_bug.cgi?id=151463

Reviewed by Geoffrey Garen.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::signExt):
(JSC::FTL::Output::zeroExt):
(JSC::FTL::Output::zeroExtPtr):
(JSC::FTL::Output::fpToInt):
(JSC::FTL::Output::fpToUInt):
(JSC::FTL::Output::fpToInt32):
(JSC::FTL::Output::baseIndex):
(JSC::FTL::Output::absolute):
(JSC::FTL::Output::load32NonNegative):
(JSC::FTL::Output::equal):
(JSC::FTL::Output::notEqual):
(JSC::FTL::Output::above):
(JSC::FTL::Output::lessThan):
(JSC::FTL::Output::lessThanOrEqual):
(JSC::FTL::Output::doubleEqual):
(JSC::FTL::Output::doubleNotEqualOrUnordered):
(JSC::FTL::Output::doubleLessThan):
(JSC::FTL::Output::icmp): Deleted.
(JSC::FTL::Output::fcmp): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareEq):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareLess):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareLessEq):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareGreater):
(JSC::FTL::DFG::LowerDFGToLLVM::compileCompareGreaterEq):
(JSC::FTL::DFG::LowerDFGToLLVM::compileLogicalNot):
(JSC::FTL::DFG::LowerDFGToLLVM::baseIndex):
(JSC::FTL::DFG::LowerDFGToLLVM::compare):
(JSC::FTL::DFG::LowerDFGToLLVM::speculateTruthyObject):
(JSC::FTL::DFG::LowerDFGToLLVM::nonSpeculativeCompare):

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

5 years ago[JSC] When the iterated allocator is forced to spill, nuke the Moves that were alread...
benjamin@webkit.org [Thu, 19 Nov 2015 22:05:36 +0000 (22:05 +0000)]
[JSC] When the iterated allocator is forced to spill, nuke the Moves that were already proven to be useless
https://bugs.webkit.org/show_bug.cgi?id=151461

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

Previously, when we had to spill, we were just inserting new Spill() and Fill()
in code while everything else remained identical.

Coalescing moves is a big part of the algorithm and takes a non-trivial time.
Since we were never removing Moves until reaching a successful coloring, we were
paying that cost with every single iteration.

With this patch, I keep a copy of the coalescing aliases when we make the first
potential spill decision. Before doing that, we have only simplified and coalesced
vertices that are provably colorable regardless of the other vertices' colors
(because their degree is <K, potentially after other edges were removed by simplification).

If we end up actually spilling, I use the old aliases to simplify the blocks if possible.

This is a 5% progression on "testComplex(64, 384)".

* b3/air/AirIteratedRegisterCoalescing.cpp:
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::getAliasWhenSpilling):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::coalesce):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::selectSpill):
(JSC::B3::Air::IteratedRegisterCoalescingAllocator::assignColors):
(JSC::B3::Air::addSpillAndFillToProgram):
(JSC::B3::Air::iteratedRegisterCoalescingOnType):
(JSC::B3::Air::iteratedRegisterCoalescing):

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

5 years agoMarking storage/indexeddb/modern/cursor-4.html as flaky on mac-wk1
ryanhaddad@apple.com [Thu, 19 Nov 2015 21:39:50 +0000 (21:39 +0000)]
Marking storage/indexeddb/modern/cursor-4.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=151448

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

5 years agoFix FTL->B3 lowering of Phi
fpizlo@apple.com [Thu, 19 Nov 2015 21:25:38 +0000 (21:25 +0000)]
Fix FTL->B3 lowering of Phi
https://bugs.webkit.org/show_bug.cgi?id=151460

Reviewed by Geoffrey Garen.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compilePhi):

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

5 years agoMarking storage/indexeddb/modern/cursor-3.html as flaky on mac-wk1
ryanhaddad@apple.com [Thu, 19 Nov 2015 21:04:35 +0000 (21:04 +0000)]
Marking storage/indexeddb/modern/cursor-3.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=151448

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

5 years agoFTL->B3 lowering should support lazy slow paths, patchpoints, all integer comparisons...
fpizlo@apple.com [Thu, 19 Nov 2015 21:00:53 +0000 (21:00 +0000)]
FTL->B3 lowering should support lazy slow paths, patchpoints, all integer comparisons, and more load/stores
https://bugs.webkit.org/show_bug.cgi?id=151459

Reviewed by Benjamin Poulain.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::absolute):
(JSC::FTL::Output::load8SignExt32):
(JSC::FTL::Output::load8ZeroExt32):
(JSC::FTL::Output::load16SignExt32):
(JSC::FTL::Output::load16ZeroExt32):
(JSC::FTL::Output::load32):
(JSC::FTL::Output::load64):
(JSC::FTL::Output::loadPtr):
(JSC::FTL::Output::loadDouble):
(JSC::FTL::Output::store32):
(JSC::FTL::Output::store64):
(JSC::FTL::Output::storePtr):
(JSC::FTL::Output::storeDouble):
(JSC::FTL::Output::ascribeRange):
(JSC::FTL::Output::nonNegative32):
(JSC::FTL::Output::load32NonNegative):
(JSC::FTL::Output::icmp):
(JSC::FTL::Output::equal):
(JSC::FTL::Output::notEqual):
(JSC::FTL::Output::above):
(JSC::FTL::Output::aboveOrEqual):
(JSC::FTL::Output::below):
(JSC::FTL::Output::belowOrEqual):
(JSC::FTL::Output::greaterThan):
(JSC::FTL::Output::greaterThanOrEqual):
(JSC::FTL::Output::lessThan):
(JSC::FTL::Output::lessThanOrEqual):
(JSC::FTL::Output::fcmp):
(JSC::FTL::Output::doubleEqual):
(JSC::FTL::Output::speculateMul):
(JSC::FTL::Output::patchpoint):
(JSC::FTL::Output::trap):
(JSC::FTL::Output::anchor):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lazySlowPath):

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

5 years agoSkip 4 more mediastream tests that crash when painting a mock video source.
ryanhaddad@apple.com [Thu, 19 Nov 2015 20:43:48 +0000 (20:43 +0000)]
Skip 4 more mediastream tests that crash when painting a mock video source.
https://bugs.webkit.org/show_bug.cgi?id=151353

Unreviewed test gardening

* platform/mac/TestExpectations:

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

5 years agoBroadening scope of failure expectation for http/tests/navigation/forward-and-cancel...
ryanhaddad@apple.com [Thu, 19 Nov 2015 20:29:03 +0000 (20:29 +0000)]
Broadening scope of failure expectation for http/tests/navigation/forward-and-cancel.html on Mac
https://bugs.webkit.org/show_bug.cgi?id=140217

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoFTL->B3 lowering should support absolute(), double comparisons, and intToDouble()
fpizlo@apple.com [Thu, 19 Nov 2015 20:26:54 +0000 (20:26 +0000)]
FTL->B3 lowering should support absolute(), double comparisons, and intToDouble()
https://bugs.webkit.org/show_bug.cgi?id=151457

Reviewed by Benjamin Poulain.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::fpToInt32):
(JSC::FTL::Output::fpToUInt32):
(JSC::FTL::Output::intToFP):
(JSC::FTL::Output::intToDouble):
(JSC::FTL::Output::unsignedToFP):
(JSC::FTL::Output::unsignedToDouble):
(JSC::FTL::Output::intCast):
(JSC::FTL::Output::baseIndex):
(JSC::FTL::Output::absolute):
(JSC::FTL::Output::load8SignExt32):
(JSC::FTL::Output::load8ZeroExt32):
(JSC::FTL::Output::lessThanOrEqual):
(JSC::FTL::Output::fcmp):
(JSC::FTL::Output::doubleEqual):
(JSC::FTL::Output::doubleNotEqualOrUnordered):
(JSC::FTL::Output::doubleLessThan):
(JSC::FTL::Output::doubleLessThanOrEqual):
(JSC::FTL::Output::doubleGreaterThan):
(JSC::FTL::Output::doubleGreaterThanOrEqual):
(JSC::FTL::Output::doubleEqualOrUnordered):
(JSC::FTL::Output::doubleNotEqual):
(JSC::FTL::Output::doubleLessThanOrUnordered):
(JSC::FTL::Output::doubleLessThanOrEqualOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrUnordered):
(JSC::FTL::Output::doubleGreaterThanOrEqualOrUnordered):
(JSC::FTL::Output::isZero32):
(JSC::FTL::Output::notZero32):

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

5 years agoMarking http/tests/xmlhttprequest/workers/methods-async.html as flaky on Yosemite WK2
ryanhaddad@apple.com [Thu, 19 Nov 2015 20:20:21 +0000 (20:20 +0000)]
Marking http/tests/xmlhttprequest/workers/methods-async.html as flaky on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=151455

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

5 years agoFTL->B3 lowering should support checked int math
fpizlo@apple.com [Thu, 19 Nov 2015 20:03:22 +0000 (20:03 +0000)]
FTL->B3 lowering should support checked int math
https://bugs.webkit.org/show_bug.cgi?id=151451

Reviewed by Saam Barati.

Adds lowering of ArithAdd/Sub/Mul to CheckAdd/Sub/Mul. Includes a nice refactoring of the OSR exit
code that made this a lot easier. Also needed to implement a few other ops in FTL::Output.

I ended up renaming "check" to "speculate" in FTL::Output, because it already had a thing called
"check". The FTL terminology for side-exit is "speculate", so I think that this is appropriate.

* ftl/FTLB3Output.h:
(JSC::FTL::Output::sensibleDoubleToInt):
(JSC::FTL::Output::signExt):
(JSC::FTL::Output::zeroExt):
(JSC::FTL::Output::zeroExtPtr):
(JSC::FTL::Output::fpToInt):
(JSC::FTL::Output::fpToUInt):
(JSC::FTL::Output::unsignedToFP):
(JSC::FTL::Output::unsignedToDouble):
(JSC::FTL::Output::intCast):
(JSC::FTL::Output::castToInt32):
(JSC::FTL::Output::fpCast):
(JSC::FTL::Output::intToPtr):
(JSC::FTL::Output::ptrToInt):
(JSC::FTL::Output::unreachable):
(JSC::FTL::Output::speculate):
(JSC::FTL::Output::speculateAdd):
(JSC::FTL::Output::speculateSub):
(JSC::FTL::Output::speculateMul):
(JSC::FTL::Output::trap):
(JSC::FTL::Output::check): Deleted.
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::DFG::LowerDFGToLLVM::compileInvalidationPoint):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExitArgumentsForPatchpointIfWillCatchException):
(JSC::FTL::DFG::LowerDFGToLLVM::appendOSRExit):
(JSC::FTL::DFG::LowerDFGToLLVM::blessSpeculation):
(JSC::FTL::DFG::LowerDFGToLLVM::emitOSRExitCall):
(JSC::FTL::DFG::LowerDFGToLLVM::buildExitArguments):

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

5 years agoModern IDB: IDBObjectStore.deleteIndex() support.
beidson@apple.com [Thu, 19 Nov 2015 19:57:18 +0000 (19:57 +0000)]
Modern IDB: IDBObjectStore.deleteIndex() support.
https://bugs.webkit.org/show_bug.cgi?id=150911

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/deleteindex-1.html
       storage/indexeddb/modern/deleteindex-2.html

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::deleteIndex):
(WebCore::IDBClient::IDBConnectionToServer::didDeleteIndex):
* Modules/indexeddb/client/IDBConnectionToServer.h:
* Modules/indexeddb/client/IDBConnectionToServerDelegate.h:

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

* Modules/indexeddb/client/IDBIndexImpl.cpp:
(WebCore::IDBClient::IDBIndex::markAsDeleted):
* Modules/indexeddb/client/IDBIndexImpl.h:

* Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
(WebCore::IDBClient::IDBObjectStore::index):
(WebCore::IDBClient::IDBObjectStore::deleteIndex):

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::deleteIndex):
(WebCore::IDBClient::IDBTransaction::deleteIndexOnServer):
(WebCore::IDBClient::IDBTransaction::didDeleteIndexOnServer):
* Modules/indexeddb/client/IDBTransactionImpl.h:

* Modules/indexeddb/client/TransactionOperation.h:
(WebCore::IDBClient::createTransactionOperation):

* Modules/indexeddb/server/IDBBackingStore.h:

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

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::deleteIndex):
* Modules/indexeddb/server/IDBServer.h:

* Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
(WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
* Modules/indexeddb/server/MemoryBackingStoreTransaction.h:

* Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
* Modules/indexeddb/server/MemoryIDBBackingStore.h:

* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::clearIndexValueStore):
* Modules/indexeddb/server/MemoryIndex.h:

* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
(WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):
* Modules/indexeddb/server/MemoryObjectStore.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabase.h:

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:

* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
* Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:

* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::loggingString):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:

* Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::loggingString):
* Modules/indexeddb/shared/IDBIndexInfo.h:

* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::hasIndex):
(WebCore::IDBObjectStoreInfo::deleteIndex):
(WebCore::IDBObjectStoreInfo::loggingString):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:

* Modules/indexeddb/shared/IDBResultData.cpp:
(WebCore::IDBResultData::deleteIndexSuccess):
* Modules/indexeddb/shared/IDBResultData.h:

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::didDeleteIndex):
(WebCore::InProcessIDBServer::createIndex):
(WebCore::InProcessIDBServer::deleteIndex):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* storage/indexeddb/modern/deleteindex-1-expected.txt: Added.
* storage/indexeddb/modern/deleteindex-1.html: Added.
* storage/indexeddb/modern/deleteindex-2-expected.txt: Added.
* storage/indexeddb/modern/deleteindex-2.html: Added.
* storage/indexeddb/modern/index-get-count-failures.html:

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

5 years agoREGRESSION(r8780): Backwards delete by word incorrectly appends deleted text to kill...
bburg@apple.com [Thu, 19 Nov 2015 19:29:59 +0000 (19:29 +0000)]
REGRESSION(r8780): Backwards delete by word incorrectly appends deleted text to kill ring, should be prepend
https://bugs.webkit.org/show_bug.cgi?id=151300

Reviewed by Darin Adler.

Source/WebCore:

Over 11 years ago, someone was in a big hurry to fix a bunch
of emacs keybindings bugs, and accidentally regressed the kill ring
behavior for backwards-delete-word. It should prepend to the beginning.

This patch fixes the regression and cleans up the kill ring-related
code in Editor and commands. It also adds some tests to cover the
regressed code a bit better.

Tests: editing/pasteboard/emacs-killring-alternating-append-prepend.html
       editing/pasteboard/emacs-killring-backward-delete-prepend.html

* editing/Editor.cpp:

    Use more explicit names for insertion mode parameters and member variables.

(WebCore::Editor::deleteWithDirection):
(WebCore::Editor::performDelete):
(WebCore::Editor::addRangeToKillRing):
(WebCore::Editor::addTextToKillRing):

    Only one call site for now, but another will be added in a dependent fix.

(WebCore::Editor::addToKillRing): Deleted.
* editing/Editor.h:
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::TypingCommand::doApply):
* editing/TypingCommand.h:
* platform/mac/KillRingMac.mm:
(WebCore::KillRing::append):
(WebCore::KillRing::prepend):

    It turns out that the native API implicitly clears the kill sequence when
    alternating between prepend and append operations. Its behavior does not match
    what Sublime Text or Emacs do in this case. Clear the previous operation flag
    to prevent this behavior from happening.

LayoutTests:

* editing/pasteboard/emacs-killring-alternating-append-prepend-expected.txt: Added.
* editing/pasteboard/emacs-killring-alternating-append-prepend.html: Added.
* editing/pasteboard/emacs-killring-backward-delete-prepend-expected.txt: Added.
* editing/pasteboard/emacs-killring-backward-delete-prepend.html: Added.

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

5 years agoTatechuyoko in ruby sits too high
mmaxfield@apple.com [Thu, 19 Nov 2015 19:16:31 +0000 (19:16 +0000)]
Tatechuyoko in ruby sits too high
https://bugs.webkit.org/show_bug.cgi?id=151309
<rdar://problem/23536621>

Reviewed by Darin Adler.

Source/WebCore:

When combining text, we ask what the text's width is in order to determine if it fits in the
column. However, when we do that, we were not setting the font's orientation to horizontal.
This means that, for CJK text, the "width" which was returned was actually the height of the
glyph, and the GlyphOverflow data was similarly garbled.

We actually already were creating a corrected FontDescription, and using it in two places.
However, we weren't using it in the last place, which was causing this bug.

Test: fast/text/text-combine-placement.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::width):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::combineText):

LayoutTests:

* fast/text/resources/tatechuyoko.svg: Added.
* fast/text/text-combine-placement-expected.html: Added.
* fast/text/text-combine-placement.html: Added.

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

5 years agoLayoutTestRelay processes leak on iOS testers
ap@apple.com [Thu, 19 Nov 2015 19:15:43 +0000 (19:15 +0000)]
LayoutTestRelay processes leak on iOS testers
https://bugs.webkit.org/show_bug.cgi?id=151447

Reviewed by Tim Horton.

* BuildSlaveSupport/kill-old-processes: Added LayoutTestRelay.

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

5 years agoMarking storage/indexeddb/modern/aborted-put.html as flaky on mac-wk1
ryanhaddad@apple.com [Thu, 19 Nov 2015 19:06:35 +0000 (19:06 +0000)]
Marking storage/indexeddb/modern/aborted-put.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=151389

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

5 years ago[Win] webkitpy is applying abspath to DOS paths, yielding invalid paths
bfulgham@apple.com [Thu, 19 Nov 2015 18:42:17 +0000 (18:42 +0000)]
[Win] webkitpy is applying abspath to DOS paths, yielding invalid paths
https://bugs.webkit.org/show_bug.cgi?id=151156

Unreviewed test fix.

I tracked down the cause of the test regression on the Windows builders. Once I fixed that,
I realized that the new 'abs_results_directory' value was not needed, so this change reverts
that code.

* Scripts/webkitpy/port/base.py:
(Port.to.start_websocket_server): We don't need a special directory variable on Cygwin anymore.
(Port.abs_results_directory): Deleted.
* Scripts/webkitpy/port/win.py:
(WinPort.__init__): Deleted.
(WinPort.abs_results_directory): Deleted.
(WinPort.results_directory): Deleted.

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

5 years ago[EFL] http/tests/navigation/useragent test failed after r192459.
hs85.jeong@samsung.com [Thu, 19 Nov 2015 18:31:21 +0000 (18:31 +0000)]
[EFL] http/tests/navigation/useragent test failed after r192459.
https://bugs.webkit.org/show_bug.cgi?id=151340

Reviewed by Gyuyoung Kim.

We need the convert process the predifined value to string.

* platform/efl/UserAgentEfl.cpp:
(WebCore::versionForUAString):

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

5 years agoexplicit_timeout should be false when testharness test is run in browser
youenn.fablet@crf.canon.fr [Thu, 19 Nov 2015 18:19:17 +0000 (18:19 +0000)]
explicit_timeout should be false when testharness test is run in browser
https://bugs.webkit.org/show_bug.cgi?id=151382

Reviewed by Darin Adler.

* resources/testharnessreport.js:

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

5 years agoJIT snippet generator JumpLists should be returned as references.
mark.lam@apple.com [Thu, 19 Nov 2015 18:00:18 +0000 (18:00 +0000)]
JIT snippet generator JumpLists should be returned as references.
https://bugs.webkit.org/show_bug.cgi?id=151445

Reviewed by Gavin Barraclough.

The JumpLists were being returned by value.  As a result, new jumps added to
them in the client are actually added to a temporary copy and promptly discarded.
Those jumps never get linked, resulting in infinite loops in DFG generated code
that used the snippets.

* jit/JITAddGenerator.h:
(JSC::JITAddGenerator::endJumpList):
(JSC::JITAddGenerator::slowPathJumpList):
* jit/JITMulGenerator.h:
(JSC::JITMulGenerator::endJumpList):
(JSC::JITMulGenerator::slowPathJumpList):
* jit/JITSubGenerator.h:
(JSC::JITSubGenerator::endJumpList):
(JSC::JITSubGenerator::slowPathJumpList):

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

5 years agoUnreviewed, rolling out r192622.
commit-queue@webkit.org [Thu, 19 Nov 2015 17:45:02 +0000 (17:45 +0000)]
Unreviewed, rolling out r192622.
https://bugs.webkit.org/show_bug.cgi?id=151446

This test is failing on multiple mac testers (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"Add a test for media control dropoff"
https://bugs.webkit.org/show_bug.cgi?id=151287
http://trac.webkit.org/changeset/192622

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

5 years agobuild.webkit.org/dashboard: Move layoutTestResultsDirectoryURLForIteration implementa...
ap@apple.com [Thu, 19 Nov 2015 17:42:19 +0000 (17:42 +0000)]
build.webkit.org/dashboard: Move layoutTestResultsDirectoryURLForIteration implementation to base class
https://bugs.webkit.org/show_bug.cgi?id=151425

Reviewed by Tim Horton.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.layoutTestResultsDirectoryURLForIteration):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot.prototype.layoutTestResultsDirectoryURLForIteration): Deleted.

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

5 years ago[EFL] Fix Wreturn-type clang warning in EWK2UnitTestBase.cpp
ossy@webkit.org [Thu, 19 Nov 2015 17:42:17 +0000 (17:42 +0000)]
[EFL] Fix Wreturn-type clang warning in EWK2UnitTestBase.cpp
https://bugs.webkit.org/show_bug.cgi?id=151444

Reviewed by Darin Adler.

* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):

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

5 years ago[EFL] Fix -Winconsistent-missing-override clang warnings
ossy@webkit.org [Thu, 19 Nov 2015 17:38:43 +0000 (17:38 +0000)]
[EFL] Fix -Winconsistent-missing-override clang warnings
https://bugs.webkit.org/show_bug.cgi?id=151443

Reviewed by Darin Adler.

Source/WebCore:

* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::delegatedScrollRequested):
(WebCore::EmptyChromeClient::scheduleAnimation):

Source/WebKit2:

* Shared/CoordinatedGraphics/CoordinatedBackingStore.h:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/WebView.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
(WebKit::CoordinatedDrawingArea::layerTreeStateIsFrozen):
(WebKit::CoordinatedDrawingArea::layerTreeHost):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(WebKit::CoordinatedLayerTreeHost::layerTreeContext):
(WebKit::CoordinatedLayerTreeHost::pauseRendering):
(WebKit::CoordinatedLayerTreeHost::resumeRendering):

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

5 years agoSkip more mediastream tests that crash when painting a mock video source.
ddkilzer@apple.com [Thu, 19 Nov 2015 15:50:01 +0000 (15:50 +0000)]
Skip more mediastream tests that crash when painting a mock video source.

Fix covered by: <https://bugs.webkit.org/show_bug.cgi?id=151353>

* platform/mac/TestExpectations: Skip:
- fast/mediastream/delayed-permission-denied.html
- fast/mediastream/MediaStreamTrack-kind.html
- fast/mediastream/RTCPeerConnection-overloaded-operations.html

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

5 years agoUnreviewed CLOOP buildfix after r192624.
ossy@webkit.org [Thu, 19 Nov 2015 12:54:32 +0000 (12:54 +0000)]
Unreviewed CLOOP buildfix after r192624.

* runtime/MemoryStatistics.cpp:
(JSC::globalMemoryStatistics):
* runtime/MemoryStatistics.h:

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

5 years agoRemove unused LLVM API functions
ossy@webkit.org [Thu, 19 Nov 2015 12:01:44 +0000 (12:01 +0000)]
Remove unused LLVM API functions
https://bugs.webkit.org/show_bug.cgi?id=151184

Reviewed by Filip Pizlo.

* ftl/FTLAbbreviations.h:
(JSC::FTL::typeOf): Deleted.
(JSC::FTL::getElementType): Deleted.
(JSC::FTL::getNamedFunction): Deleted.
(JSC::FTL::removeFunctionAttr): Deleted.
(JSC::FTL::getLinkage): Deleted.
(JSC::FTL::setVisibility): Deleted.
(JSC::FTL::isDeclaration): Deleted.
(JSC::FTL::linkModules): Deleted.
(JSC::FTL::getValueName): Deleted.
(JSC::FTL::getNamedGlobal): Deleted.
(JSC::FTL::getFirstGlobal): Deleted.
(JSC::FTL::getNextGlobal): Deleted.
(JSC::FTL::createMemoryBufferWithContentsOfFile): Deleted.
(JSC::FTL::parseBitcodeInContext): Deleted.
(JSC::FTL::disposeMemoryBuffer): Deleted.
(JSC::FTL::getParamTypes): Deleted.
(JSC::FTL::constIntToPtr): Deleted.
(JSC::FTL::constBitCast): Deleted.
* llvm/LLVMAPIFunctions.h:

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

5 years agoRemove unnecessary PLATFORM(EFL) macro in globalMemoryStatistics()
gyuyoung.kim@webkit.org [Thu, 19 Nov 2015 11:58:38 +0000 (11:58 +0000)]
Remove unnecessary PLATFORM(EFL) macro in globalMemoryStatistics()
https://bugs.webkit.org/show_bug.cgi?id=151301

Reviewed by Csaba Osztrogonác.

EXECUTABLE_ALLOCATOR_FIXED is enabled on EFL port. So we don't need to keep
PLATFORM(EFL) macro anymore. Besides ENABLE(EXECUTABLE_ALLOCATOR_FIXED) guard
isn't related with ExecutableAllocator::committedByteCount() closely. So this patch
removes it as well.

* runtime/MemoryStatistics.cpp:
(JSC::globalMemoryStatistics):

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

5 years agoUnreviewed speculative buildfix after r192601.
ossy@webkit.org [Thu, 19 Nov 2015 11:37:58 +0000 (11:37 +0000)]
Unreviewed speculative buildfix after r192601.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebCoreSupport/WebFrameLoaderClient.h:

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