WebKit-https.git
5 years agoWeb Inspector: Support smart-pasting in the Rules sidebar panel
drousso@apple.com [Thu, 30 Jul 2015 23:56:51 +0000 (23:56 +0000)]
Web Inspector: Support smart-pasting in the Rules sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=147362

Reviewed by Timothy Hatcher.

When pasting over the selector, if the pasted text matches CSS rule
formatting, replace the selected rule with the selector and text in
the pasted data.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.changeRule.changeCompleted):
(WebInspector.DOMNodeStyles.prototype.changeRule.styleChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule.changeText):
(WebInspector.DOMNodeStyles.prototype.changeRule.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRule):
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection):

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

5 years agoAdd support for window.open to WK1BrowserWindowController
andersca@apple.com [Thu, 30 Jul 2015 23:51:29 +0000 (23:51 +0000)]
Add support for window.open to WK1BrowserWindowController
https://bugs.webkit.org/show_bug.cgi?id=147474

Reviewed by Dan Bernstein.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
Set javaScriptCanOpenWindowsAutomatically to YES.
If this becomes a nuisance, we can always add a menu item to toggle this.

(-[WK1BrowserWindowController webView:createWebViewWithRequest:]):
Implement this UI delegate method.

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

5 years agoUndo stray commit.
andersca@apple.com [Thu, 30 Jul 2015 23:47:57 +0000 (23:47 +0000)]
Undo stray commit.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):
(-[WK1BrowserWindowController webView:createWebViewWithRequest:]):

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

5 years agoRemove stray printf.
andersca@apple.com [Thu, 30 Jul 2015 23:46:11 +0000 (23:46 +0000)]
Remove stray printf.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):

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

5 years agoMake Path::apply() take a function reference
simon.fraser@apple.com [Thu, 30 Jul 2015 23:41:54 +0000 (23:41 +0000)]
Make Path::apply() take a function reference
https://bugs.webkit.org/show_bug.cgi?id=147472

Reviewed by Anders Carlsson.

Path::apply() should take a const reference to a std::function.

* platform/graphics/Path.h:
* platform/graphics/cairo/PathCairo.cpp:
* platform/graphics/cg/PathCG.cpp:
(WebCore::CGPathApplierToPathApplier):
(WebCore::Path::apply):

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

5 years agoAssertion failure when a plug-in loads a resource that redirects somewhere
andersca@apple.com [Thu, 30 Jul 2015 23:38:23 +0000 (23:38 +0000)]
Assertion failure when a plug-in loads a resource that redirects somewhere
https://bugs.webkit.org/show_bug.cgi?id=147469

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/plugins/get-url-redirect.html

r186597 moved the call to addPlugInStreamLoader to willSendRequest. This is wrong since
willSendRequest can be invoked more than once.

Fix this by making the initialization phase of NetscapePlugInStreamLoader be more like
SubresourceLoader where we only call addPlugInStreamLoader once we've successfully initialized
the loader, and only call removePlugInStreamLoader if we've called addPlugInStreamLoader.

Also change addPlugInStreamLoader and removePlugInStreamLoader to take references.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::addPlugInStreamLoader):
(WebCore::DocumentLoader::removePlugInStreamLoader):
* loader/DocumentLoader.h:
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::create):
(WebCore::NetscapePlugInStreamLoader::init):
(WebCore::NetscapePlugInStreamLoader::didFinishLoading):
(WebCore::NetscapePlugInStreamLoader::didFail):
(WebCore::NetscapePlugInStreamLoader::didCancel):
(WebCore::NetscapePlugInStreamLoader::notifyDone):
* loader/NetscapePlugInStreamLoader.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest): Deleted.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::isPlugInStreamLoader): Deleted.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):

LayoutTests:

Add a test.

* http/tests/plugins/get-url-redirect-expected.txt: Added.
* http/tests/plugins/get-url-redirect.html: Added.
* http/tests/plugins/resources/redirection-response.php: Added.

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

5 years agoWeb Inspector: Fix typo in frame duration filtering console.assert message
mattbaker@apple.com [Thu, 30 Jul 2015 23:25:43 +0000 (23:25 +0000)]
Web Inspector: Fix typo in frame duration filtering console.assert message
https://bugs.webkit.org/show_bug.cgi?id=147458

Rubber-stamped by Joseph Pecoraro.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.displayNameForDurationFilter):

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

5 years ago[iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
jer.noble@apple.com [Thu, 30 Jul 2015 23:17:45 +0000 (23:17 +0000)]
[iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=147367

Reviewed by Eric Carlson.

During the request to exit fullscreen, the video element's m_videoFullscreenMode variable
is set, but no exitFullscreen() request is sent up to the UIProcess. Previous threading
issues have been discovered and fixed, but may have been re-introduced (or never fully
fixed in the first place). To solve the bad behavior this threading issue creates, add
a watchdog timer, similar to the one used in the desktop fullscreen controller, to ensure
that if an exit fullscreen request is not acted upon, the UIProcess forcibly exits fullscreen
anyway.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Initialize the timer.
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): Cancel the timer.
(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set the timer.
(WebVideoFullscreenInterfaceAVKit::watchdogTimerFired): Forcibly exit fullscreen mode.

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

5 years agoClean up makeFontCascadeCacheKey()
mmaxfield@apple.com [Thu, 30 Jul 2015 23:07:09 +0000 (23:07 +0000)]
Clean up makeFontCascadeCacheKey()
https://bugs.webkit.org/show_bug.cgi?id=147430

Reviewed by Benjamin Poulain.

FontDescriptionKey is designed to encapsulate all the cacheable properties of a FontDescription.
However, a higher-level cache, FontCascadeCacheKey, was taking some values from FontDescriptions.
The fact that there wasn't a bug before is just a happy coincidence. This patch moves those bits
from the higher-level cache and puts them into FontDescriptionKey where they belong.

No new tests because there is no behavior change.

* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::makeFlagKey):
* platform/graphics/FontCascade.cpp:
(WebCore::operator==):
(WebCore::makeFontSelectorFlags): Deleted.
(WebCore::makeFontCascadeCacheKey): Deleted.
(WebCore::computeFontCascadeCacheHash): Deleted.

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

5 years ago[iOS] Set AirPlay discovery mode to disabled when page is hidden
eric.carlson@apple.com [Thu, 30 Jul 2015 22:56:20 +0000 (22:56 +0000)]
[iOS] Set AirPlay discovery mode to disabled when page is hidden
https://bugs.webkit.org/show_bug.cgi?id=147455

Reviewed by Enrica Casucci.

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]): Set discovery mode to disabled after
  the picker has been closed.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Ditto.

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

5 years ago[Mac] Media Session: add support for more telephony interruptions
mrajca@apple.com [Thu, 30 Jul 2015 22:26:20 +0000 (22:26 +0000)]
[Mac] Media Session: add support for more telephony interruptions
https://bugs.webkit.org/show_bug.cgi?id=147079

Reviewed by Eric Carlson.

* platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
(WebCore::callDidEndRinging): End 'Transient' interruptions.
(WebCore::callDidConnect): Forward this event to media sessions as a 'Content' interruption.
(WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions): Register observers for new
 notification types.
(WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions): Unregister all observers.

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

5 years agoMedia Session: test Play/Pause media control events delivered to non-Content media...
mrajca@apple.com [Thu, 30 Jul 2015 22:13:46 +0000 (22:13 +0000)]
Media Session: test Play/Pause media control events delivered to non-Content media sessions https://bugs.webkit.org/show_bug.cgi?id=147414

Reviewed by Eric Carlson.

* media/session/play-pause-media-events-in-non-content-sessions-expected.txt: Added.
* media/session/play-pause-media-events-in-non-content-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoMedia Session: test Play/Pause media control events delivered to Content media sessions
mrajca@apple.com [Thu, 30 Jul 2015 21:58:23 +0000 (21:58 +0000)]
Media Session: test Play/Pause media control events delivered to Content media sessions
https://bugs.webkit.org/show_bug.cgi?id=147413

Reviewed by Eric Carlson.

* media/session/play-pause-media-events-in-content-sessions-expected.txt: Added.
* media/session/play-pause-media-events-in-content-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoDon't use (Details) when exposing SPI
dino@apple.com [Thu, 30 Jul 2015 21:22:47 +0000 (21:22 +0000)]
Don't use (Details) when exposing SPI
https://bugs.webkit.org/show_bug.cgi?id=147426
<rdar://problem/22062407>

Reviewed by Dan Bernstein.

If we are declaring the interface without any implementation,
we should use class extensions.

Source/WebCore:

Added three new SPI.h files for NSButtonCell, NSURLConnection and
NSURLRequest.

* WebCore.xcodeproj/project.pbxproj:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ThemeMac.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
* platform/spi/cf/CFNetworkSPI.h:
* platform/spi/cocoa/AVKitSPI.h:
* platform/spi/cocoa/CFNSURLConnectionSPI.h:
* platform/spi/cocoa/NSButtonCellSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSColorSPI.h.
* platform/spi/cocoa/NSCalendarDateSPI.h:
* platform/spi/cocoa/NSColorSPI.h:
* platform/spi/cocoa/NSFileManagerSPI.h:
* platform/spi/cocoa/NSStringSPI.h:
* platform/spi/cocoa/NSURLConnectionSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
* platform/spi/cocoa/NSURLDownloadSPI.h:
* platform/spi/cocoa/NSURLRequestSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
* platform/spi/cocoa/QuartzCoreSPI.h:
* platform/spi/cocoa/WebFilterEvaluatorSPI.h:
* platform/spi/ios/CoreUISPI.h:
* platform/spi/ios/LaunchServicesSPI.h:
* platform/spi/ios/MediaPlayerSPI.h:
* platform/spi/ios/QuickLookSPI.h:
* platform/spi/ios/UIColorSPI.h:
* platform/spi/mac/QuickLookMacSPI.h:
* rendering/RenderThemeMac.mm:

Source/WebKit/mac:

* WebView/WebFrameView.mm:
* WebView/WebPDFView.mm:

Source/WebKit2:

* Platform/spi/ios/AssertionServicesSPI.h:
* Platform/spi/ios/CorePDFSPI.h:
* Platform/spi/ios/DataDetectorsUISPI.h:
* Platform/spi/ios/ManagedConfigurationSPI.h:
* Platform/spi/ios/UIKitSPI.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
* Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
* UIProcess/_WKWebViewPrintFormatter.mm:
* UIProcess/mac/WebPageProxyMac.mm:

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
* DumpRenderTree/mac/EventSendingController.mm:
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
* WebKitTestRunner/mac/TestControllerMac.mm:

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

5 years agoReplace Google App Engine with AppScale
ap@apple.com [Thu, 30 Jul 2015 20:57:36 +0000 (20:57 +0000)]
Replace Google App Engine with AppScale
https://bugs.webkit.org/show_bug.cgi?id=147178

Patch by Aakash Jain <aakash_jain@apple.com> on 2015-07-30
Reviewed by Daniel Bates.

Tools:

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunWebKitTests):
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
(.):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitTestHistory.js:
(TestHistory):
* BuildSlaveSupport/build.webkit.org-config/templates/root.html:
* QueueStatusServer/app.yaml: We must explicitly define threadsafe property when using the Python 2.7 runtime. We set threadsafe to be false because the status server code was written to be run in AppEngine's CGI environment and AppEngine's CGI programming model handles requests serially per section "Concurrent Requests and WSGI" of <https://cloud.google.com/appengine/docs/python/python25/migrate27>.
* TestResultServer/app.yaml: Ditto
* Scripts/webkitpy/common/config/urls.py:
* TestResultServer/main.py:
* TestResultServer/static-dashboards/dashboard_base.js:
* TestResultServer/static-dashboards/loader.js:

Websites/bugs.webkit.org:

* code-review.js:
* template/en/default/attachment/edit.html.tmpl:
* template/en/default/attachment/list.html.tmpl:
* template/en/default/attachment/reviewform.html.tmpl:

LayoutTests:

* fast/harness/results.html:

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

5 years agoRemove LegacyCACFLayerTreeHost
achristensen@apple.com [Thu, 30 Jul 2015 20:20:55 +0000 (20:20 +0000)]
Remove LegacyCACFLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=147388

Reviewed by Geoffrey Garen.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::create):
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Removed.
* platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Removed.

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

5 years agoFix Windows build after r187587.
achristensen@apple.com [Thu, 30 Jul 2015 20:15:31 +0000 (20:15 +0000)]
Fix Windows build after r187587.

* loader/SubresourceLoader.h:
* loader/cache/CachedResource.h:
* platform/graphics/Font.h:
(WebCore::Font::DerivedFontData::DerivedFontData):
* rendering/RenderLayerFilterInfo.h:
Visual Studio doesn't like making std::unique_ptrs of private nested classes.
It tries to make a std::default_delete with the private class as a template parameter.

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

5 years ago[WK2][NetworkCache] Stop closing files on the main thread
cdumez@apple.com [Thu, 30 Jul 2015 19:40:56 +0000 (19:40 +0000)]
[WK2][NetworkCache] Stop closing files on the main thread
https://bugs.webkit.org/show_bug.cgi?id=147410

Reviewed by Andreas Kling.

After r186510, we no longer open cache files on the main thread.
However, we still close them on the main thread. This patch makes
sure we close the files on another thread instead.

* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):

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

5 years agoWeb Inspector: Regression: %c is broken for console.group
nvasilyev@apple.com [Thu, 30 Jul 2015 19:26:29 +0000 (19:26 +0000)]
Web Inspector: Regression: %c is broken for console.group
https://bugs.webkit.org/show_bug.cgi?id=147436

Reviewed by Timothy Hatcher.

* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):

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

5 years agoWeb Inspector: Add special case for deleting the next character when editing rules...
drousso@apple.com [Thu, 30 Jul 2015 19:24:06 +0000 (19:24 +0000)]
Web Inspector: Add special case for deleting the next character when editing rules in the CSS Sidebar
https://bugs.webkit.org/show_bug.cgi?id=147442

Reviewed by Timothy Hatcher.

If the cursor is on the first position of the first line in a CSS Rule and that line
has no content, delete the line instead of doing nothing.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange):

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

5 years agoConvert Path applier to use std::function
simon.fraser@apple.com [Thu, 30 Jul 2015 19:13:49 +0000 (19:13 +0000)]
Convert Path applier to use std::function
https://bugs.webkit.org/show_bug.cgi?id=147368

Reviewed by Sam Weinig.

Use std::function for Path::apply().

Source/WebCore:

* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(convertPathToScreenSpaceFunction):
(-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
(ConvertPathToScreenSpaceFunction): Deleted.
* inspector/InspectorOverlay.cpp:
(WebCore::appendPathSegment):
(WebCore::buildObjectForShapeOutside):
* platform/graphics/Path.cpp:
(WebCore::Path::length):
(WebCore::Path::traversalStateAtLength):
(WebCore::pathLengthApplierFunction): Deleted.
* platform/graphics/Path.h:
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::findPathIntersections):
(WebCore::FontCascade::dashesForIntersectionsWithRect):
* platform/graphics/cairo/PathCairo.cpp:
(WebCore::Path::apply):
* platform/graphics/cg/PathCG.cpp:
(WebCore::CGPathApplierToPathApplier):
(WebCore::Path::apply):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::updateZeroLengthSubpaths):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::processMarkerPositions):
* rendering/svg/SVGMarkerData.h:
(WebCore::SVGMarkerData::updateFromPathElement):
* rendering/svg/SVGSubpathData.h:
(WebCore::SVGSubpathData::updateFromPathElement):
(WebCore::SVGSubpathData::SVGSubpathData): Deleted.
* svg/SVGPathUtilities.cpp:
(WebCore::pathIteratorForBuildingString):
(WebCore::buildStringFromPath):

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathEncodeApplierFunction):
(IPC::ArgumentCoder<Path>::encode):
(IPC::pathPointCountApplierFunction): Deleted.

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

5 years ago[EFL] Enable IndexedDB based on DatabaseProcess
commit-queue@webkit.org [Thu, 30 Jul 2015 18:47:37 +0000 (18:47 +0000)]
[EFL] Enable IndexedDB based on DatabaseProcess
https://bugs.webkit.org/show_bug.cgi?id=147221

Patch by Joonghun Park <jh718.park@samsung.com> on 2015-07-30
Reviewed by Csaba Osztrogonác.

.:

* Source/cmake/OptionsEfl.cmake:

Source/WebKit2:

* DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Add ecore_init().
Without this call, it leads to crash when launching DatabaseProcess.
* PlatformEfl.cmake: Add missing include_directory.
* Shared/efl/ProcessExecutablePathEfl.cpp:
(WebKit::executablePathOfDatabaseProcess):
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/efl/WebProcessPoolEfl.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
Add default path for indexedDB sqlite3 db file.

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

* platform/efl/TestExpectations: Update IndexedDB test expectations.

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

5 years agoaria-liveregions-notifications tests are very flaky
commit-queue@webkit.org [Thu, 30 Jul 2015 18:39:42 +0000 (18:39 +0000)]
aria-liveregions-notifications tests are very flaky
https://bugs.webkit.org/show_bug.cgi?id=147299
<rdar://problem/21998675>

Patch by Nan Wang <n_wang@apple.com> on 2015-07-30
Reviewed by Chris Fleizach.

These tests were flaky because they relied on timer notification callbacks.
Fixed these tests by using different objects to capture the notifications instead.

* platform/mac/TestExpectations:
* platform/mac/accessibility/aria-liveregions-notifications-always-sent-expected.txt:
* platform/mac/accessibility/aria-liveregions-notifications-always-sent.html:
* platform/mac/accessibility/aria-liveregions-notifications-expected.txt:
* platform/mac/accessibility/aria-liveregions-notifications.html:

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

5 years agoMinimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTra...
cdumez@apple.com [Thu, 30 Jul 2015 18:36:59 +0000 (18:36 +0000)]
Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
https://bugs.webkit.org/show_bug.cgi?id=147446

Reviewed by Simon Fraser.

Minimize children vector capacity changes in PlatformCALayerRemote::recursiveBuildTransaction()
by leveraging the fact that we know in advance how many layer IDs are going to be added. We
now set the Vector size from the start, instead of clearing it and then growing the vector
capacity when appending the layer IDs one by one.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):

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

5 years agoSelecting in an iframe can cause main page scrolling
simon.fraser@apple.com [Thu, 30 Jul 2015 18:32:45 +0000 (18:32 +0000)]
Selecting in an iframe can cause main page scrolling
https://bugs.webkit.org/show_bug.cgi?id=147431
rdar://problem/19244589

Reviewed by Zalan Bujtas.

Source/WebCore:

The RenderLayer auatoscroll code walks up the RenderLayer hierarchy, crossing
frame boundaries. However, as it crosses into an ancestor frame it failed to
map the target rect into the coordinate space of the new frame, which caused
us to scroll to an incorrect location in that parent frame.

Test: fast/events/autoscroll-in-iframe.html

* rendering/RenderLayer.cpp:
(WebCore::parentLayerCrossFrame): Make the layer a reference, and pass in
an optional rect. When crossing frame boundaries, map the rect from the
contents of the child frame to the contents of the parent frame.
(WebCore::RenderLayer::enclosingScrollableLayer): Pass optional rect.
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
* rendering/RenderLayer.h:

LayoutTests:

Test that uses eventSender to select in an iframe after scrolling the
main page.

* fast/events/autoscroll-in-iframe-expected.txt: Added.
* fast/events/autoscroll-in-iframe.html: Added.

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

5 years agoImprove the history logging output
simon.fraser@apple.com [Thu, 30 Jul 2015 18:31:01 +0000 (18:31 +0000)]
Improve the history logging output
https://bugs.webkit.org/show_bug.cgi?id=147429

Reviewed by Alexey Proskuryakov.

Improve the History log channel output to show which frame is navigating,
print the addresses of the HistoryController and Frame, and print URLs
for everything.

Remove the BackForward log channel which had just one calling location,
and log for pushState/replaceState.

* loader/HistoryController.cpp:
(WebCore::HistoryController::updateForBackForwardNavigation):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* platform/Logging.h:

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

5 years agoAdd the "wasm" directory to the Additional Include Directories for jsc.exe
commit-queue@webkit.org [Thu, 30 Jul 2015 18:29:18 +0000 (18:29 +0000)]
Add the "wasm" directory to the Additional Include Directories for jsc.exe
https://bugs.webkit.org/show_bug.cgi?id=147443

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-07-30
Reviewed by Mark Lam.

This patch should fix the "..\..\jsc.cpp(46): fatal error C1083:
Cannot open include file: 'JSWASMModule.h'" error in the Windows build.

* JavaScriptCore.vcxproj/jsc/jscCommon.props:

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

5 years agoMedia Session: test Next/Previous Track media control events delivered to Content...
mrajca@apple.com [Thu, 30 Jul 2015 17:19:47 +0000 (17:19 +0000)]
Media Session: test Next/Previous Track media control events delivered to Content media sessions https://bugs.webkit.org/show_bug.cgi?id=147416

Reviewed by Eric Carlson.

* media/session/track-media-events-in-content-sessions-expected.txt: Added.
* media/session/track-media-events-in-content-sessions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoMedia Session: add infrastructure for testing media control events
mrajca@apple.com [Thu, 30 Jul 2015 17:02:13 +0000 (17:02 +0000)]
Media Session: add infrastructure for testing media control events
https://bugs.webkit.org/show_bug.cgi?id=147412

Reviewed by Eric Carlson.

* Modules/mediasession/MediaSessionManager.h:
* testing/Internals.cpp:
(WebCore::Internals::sendMediaControlEvent): Let tests simulate media control events.
* testing/Internals.h:
* testing/Internals.idl:

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

5 years agoMark more classes as fast allocated
cdumez@apple.com [Thu, 30 Jul 2015 16:25:36 +0000 (16:25 +0000)]
Mark more classes as fast allocated
https://bugs.webkit.org/show_bug.cgi?id=147440

Reviewed by Sam Weinig.

Mark more classes as fast allocated for performance. We heap-allocate
objects of those types throughout the code base.

Source/JavaScriptCore:

* API/JSCallbackObject.h:
* API/ObjCCallbackFunction.mm:
* bytecode/BytecodeKills.h:
* bytecode/BytecodeLivenessAnalysis.h:
* bytecode/CallLinkStatus.h:
* bytecode/FullBytecodeLiveness.h:
* bytecode/SamplingTool.h:
* bytecompiler/BytecodeGenerator.h:
* dfg/DFGBasicBlock.h:
* dfg/DFGBlockMap.h:
* dfg/DFGInPlaceAbstractState.h:
* dfg/DFGThreadData.h:
* heap/HeapVerifier.h:
* heap/SlotVisitor.h:
* parser/Lexer.h:
* runtime/ControlFlowProfiler.h:
* runtime/TypeProfiler.h:
* runtime/TypeProfilerLog.h:
* runtime/Watchdog.h:

Source/WebCore:

* editing/Editor.h:
* history/CachedFrame.h:
* history/CachedPage.h:
* html/parser/HTMLResourcePreloader.h:
* loader/PolicyChecker.h:
* loader/SubresourceLoader.h:
* loader/cache/CachedResource.h:
* page/animation/AnimationController.h:
* page/scrolling/ScrollingConstraints.h:
* page/scrolling/ScrollingStateTree.h:
* platform/graphics/Font.h:
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/FilterEffectRenderer.h:
* rendering/ImageQualityController.h:
* rendering/RenderLayerFilterInfo.h:
* rendering/SimpleLineLayoutResolver.h:
* rendering/shapes/RasterShape.h:
* rendering/shapes/Shape.h:

Source/WebKit2:

* NetworkProcess/cache/NetworkCacheStorage.cpp:
* NetworkProcess/cache/NetworkCacheStorage.h:
* Platform/IPC/MessageRecorder.h:
* Platform/mac/LayerHostingContext.h:

Source/WTF:

* wtf/Bag.h:
* wtf/SegmentedVector.h:
* wtf/SentinelLinkedList.h:

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

5 years ago[GTK] Crashes when SoupSession is destroyed in exit handler
mcatanzaro@igalia.com [Thu, 30 Jul 2015 16:21:45 +0000 (16:21 +0000)]
[GTK] Crashes when SoupSession is destroyed in exit handler
https://bugs.webkit.org/show_bug.cgi?id=145347

Reviewed by Carlos Garcia Campos.

Leak the default SoupSession with NeverDestroyed to avoid races at program exit.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::defaultSession):
* platform/network/soup/SoupNetworkSession.h:

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

5 years agoBuild AppleWin port with CMake
achristensen@apple.com [Thu, 30 Jul 2015 16:16:23 +0000 (16:16 +0000)]
Build AppleWin port with CMake
https://bugs.webkit.org/show_bug.cgi?id=147385

Reviewed by Martin Robinson.

.:

* Source/cmake/OptionsWindows.cmake:
Use the static multithreaded runtime.  Based on
http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F

Source/WebCore:

* CMakeLists.txt:
Add makesafeseh.asm to 32-bit build.  It needs to be after the ADD_PRECOMPILED_HEADER macro
because CMake can only set COMPILE_FLAGS once with set_source_files_properties, and we want
to use that to add /safeseh instead of a precompiled header (which wouldn't be used anyway in assembly).
* PlatformAppleWin.cmake:
* PlatformWin.cmake:
* PlatformWinCairo.cmake:
Added missing source files and libraries.

Source/WebKit:

* PlatformWin.cmake:
Added missing source files and libraries.

Tools:

* WinLauncher/CMakeLists.txt:
Link to CoreFoundation.lib and added /NODEFAULTLIB:LIBCMT to get it to link successfully.

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

5 years ago[Win] Unreviewed build fix after r187582.
achristensen@apple.com [Thu, 30 Jul 2015 15:56:35 +0000 (15:56 +0000)]
[Win] Unreviewed build fix after r187582.

* accessibility/AccessibilityAllInOne.cpp:
Include new files.

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

5 years agoWeb Inspector: [Freetype] Allow inspector to retrieve a list of system fonts
mcatanzaro@igalia.com [Thu, 30 Jul 2015 14:51:09 +0000 (14:51 +0000)]
Web Inspector: [Freetype] Allow inspector to retrieve a list of system fonts
https://bugs.webkit.org/show_bug.cgi?id=147018

Reviewed by Carlos Garcia Campos.

Source/WebCore:

No new tests; unskipped inspector/css/get-system-fonts.html

* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::patternToFamilies): Added.
(WebCore::FontCache::systemFontFamilies): Implemented.
(WebCore::strongAliasesForFamily): Split some code off to patternToFamilies.

LayoutTests:

* inspector/css/get-system-fonts-expected.txt: Expect some free fonts to be missing....
* inspector/css/get-system-fonts.html: Check for some free fonts.
* platform/gtk/TestExpectations: Unskip the test.
* platform/gtk/inspector/css/get-system-fonts-expected.txt: Added.

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

5 years agoAX: VoiceOver unable to access content in malformed trees
commit-queue@webkit.org [Thu, 30 Jul 2015 11:10:38 +0000 (11:10 +0000)]
AX: VoiceOver unable to access content in malformed trees
https://bugs.webkit.org/show_bug.cgi?id=147295
<rdar://problem/14862892>

Patch by Nan Wang <n_wang@apple.com> on 2015-07-30
Reviewed by Chris Fleizach.

Source/WebCore:

VoiceOver is skipping the content of malformed trees. This fixes the problem
by having the tree check if it has valid children (treeitems) and makes treeitems
check if they are inside trees.

Test: platform/mac/accessibility/malformed-tree.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::addChildren):
(WebCore::AccessibilityObject::addChild):
(WebCore::AccessibilityObject::insertChild):
(WebCore::AccessibilityObject::shouldIgnoreAttributeRole):
(WebCore::AccessibilityObject::canHaveChildren):
(WebCore::AccessibilityObject::hasChildren):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTree.cpp: Added.
(WebCore::AccessibilityTree::AccessibilityTree):
(WebCore::AccessibilityTree::~AccessibilityTree):
(WebCore::AccessibilityTree::create):
(WebCore::AccessibilityTree::computeAccessibilityIsIgnored):
(WebCore::AccessibilityTree::determineAccessibilityRole):
(WebCore::AccessibilityTree::isTreeValid):
* accessibility/AccessibilityTree.h: Added.
* accessibility/AccessibilityTreeItem.cpp: Added.
(WebCore::AccessibilityTreeItem::AccessibilityTreeItem):
(WebCore::AccessibilityTreeItem::~AccessibilityTreeItem):
(WebCore::AccessibilityTreeItem::create):
(WebCore::AccessibilityTreeItem::determineAccessibilityRole):
* accessibility/AccessibilityTreeItem.h: Added.

LayoutTests:

* accessibility/aria-mappings.html:
* accessibility/treeitem-child-exposed-expected.txt:
* accessibility/treeitem-child-exposed.html:
* platform/mac/accessibility/malformed-tree-expected.txt: Added.
* platform/mac/accessibility/malformed-tree.html: Added.

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

5 years agoUpdate JSC's standalone-pre.js for r187575
benjamin@webkit.org [Thu, 30 Jul 2015 09:52:48 +0000 (09:52 +0000)]
Update JSC's standalone-pre.js for r187575
https://bugs.webkit.org/show_bug.cgi?id=147444

Unreviewed.

* resources/standalone-pre.js:
(shouldBeType):
Copy shouldBeType() from the non-standalone version.

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

5 years ago[GTK] Paste data is removed from clipboard when closing browser tab
carlosgc@webkit.org [Thu, 30 Jul 2015 06:39:59 +0000 (06:39 +0000)]
[GTK] Paste data is removed from clipboard when closing browser tab
https://bugs.webkit.org/show_bug.cgi?id=144549

Reviewed by Martin Robinson.

GTK+ stores all clipboards in gtk_main or gtk_application_shutdown
when the main loop finishes. We don't use gtk_main() in the web
process, so we need to do the same and store all clipboards on
process shutdown.

* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::Pasteboard): Register the GtkClipboard.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::singleton): Make it destructible.
(WebCore::PasteboardHelper::~PasteboardHelper): Call
gtk_clipboard_store for every registered GtkClipboard.
(WebCore::PasteboardHelper::registerClipboard): Save the given
GtkClipboard.
* platform/gtk/PasteboardHelper.h:

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

5 years agoDFG::ArgumentsEliminationPhase should emit a PutStack for all of the GetStacks that...
fpizlo@apple.com [Thu, 30 Jul 2015 06:26:52 +0000 (06:26 +0000)]
DFG::ArgumentsEliminationPhase should emit a PutStack for all of the GetStacks that the ByteCodeParser emitted
https://bugs.webkit.org/show_bug.cgi?id=147433
rdar://problem/21668986

Reviewed by Mark Lam.

Ideally, the ByteCodeParser would only emit SetArgument nodes for named arguments.  But
currently that's not what it does - it emits a SetArgument for every argument that a varargs
call may pass.  Each SetArgument gets turned into a GetStack.  This means that if
ArgumentsEliminationPhase optimizes away PutStacks for those varargs arguments that didn't
get passed or used, we get degenerate IR where we have a GetStack of something that didn't
have a PutStack.

This fixes the bug by removing the code to optimize away PutStacks in
ArgumentsEliminationPhase.

* dfg/DFGArgumentsEliminationPhase.cpp:
* tests/stress/varargs-inlining-underflow.js: Added.
(baz):
(bar):
(foo):

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

5 years agoWeb Inspector: Improve styles of debugger popovers
nvasilyev@apple.com [Thu, 30 Jul 2015 05:47:26 +0000 (05:47 +0000)]
Web Inspector: Improve styles of debugger popovers
https://bugs.webkit.org/show_bug.cgi?id=147437

Reviewed by Timothy Hatcher.

Use non-monospace font and improve spacing.

* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content > .body):

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

5 years agoWeb Inspector: Border line in the debug popover should be semi-transparent black...
nvasilyev@apple.com [Thu, 30 Jul 2015 04:59:48 +0000 (04:59 +0000)]
Web Inspector: Border line in the debug popover should be semi-transparent black, not dark yellow
https://bugs.webkit.org/show_bug.cgi?id=147435

Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .body):
(@media (-webkit-min-device-pixel-ratio: 2)): Use hairline borders on retina.

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

5 years agoWeb Inspector: " = $0" text in the Elements panel should anti-aliased
nvasilyev@apple.com [Thu, 30 Jul 2015 04:40:34 +0000 (04:40 +0000)]
Web Inspector: " = $0" text in the Elements panel should anti-aliased
https://bugs.webkit.org/show_bug.cgi?id=147432

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMTreeOutline.css:
(.dom-tree-outline li.selected > span::after):
(.dom-tree-outline:focus li.selected > span::after):
Decrease the opacity just slightly to make " = $0" more distinct from DOM nodes.

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

5 years agoImplement basic types for ECMAScript Internationalization API
commit-queue@webkit.org [Thu, 30 Jul 2015 03:33:32 +0000 (03:33 +0000)]
Implement basic types for ECMAScript Internationalization API
https://bugs.webkit.org/show_bug.cgi?id=146926

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

.:

Enable flag now that the basic objects are in place.

* Source/cmake/WebKitFeatures.cmake: enable INTL

Source/JavaScriptCore:

Adds basic types for ECMA-402 2nd edition, but does not implement the full locale-aware features yet.
http://www.ecma-international.org/ecma-402/2.0/ECMA-402.pdf

* CMakeLists.txt: Added new Intl files.
* Configurations/FeatureDefines.xcconfig: Enable INTL.
* DerivedSources.make: Added Intl files.
* JavaScriptCore.xcodeproj/project.pbxproj: Added Intl files.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added Intl files.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Added Intl files.
* runtime/CommonIdentifiers.h: Added Collator, NumberFormat, and DateTimeFormat.
* runtime/DateConstructor.cpp: Made Date.now public.
* runtime/DateConstructor.h: Made Date.now public.
* runtime/IntlCollator.cpp: Added.
(JSC::IntlCollator::create):
(JSC::IntlCollator::createStructure):
(JSC::IntlCollator::IntlCollator):
(JSC::IntlCollator::finishCreation):
(JSC::IntlCollator::destroy):
(JSC::IntlCollator::visitChildren):
(JSC::IntlCollator::setBoundCompare):
(JSC::IntlCollatorFuncCompare): Added placeholder implementation using codePointCompare.
* runtime/IntlCollator.h: Added.
(JSC::IntlCollator::constructor):
(JSC::IntlCollator::boundCompare):
* runtime/IntlCollatorConstructor.cpp: Added.
(JSC::IntlCollatorConstructor::create):
(JSC::IntlCollatorConstructor::createStructure):
(JSC::IntlCollatorConstructor::IntlCollatorConstructor):
(JSC::IntlCollatorConstructor::finishCreation):
(JSC::constructIntlCollator): Added Collator constructor (10.1.2).
(JSC::callIntlCollator): Added Collator constructor (10.1.2).
(JSC::IntlCollatorConstructor::getConstructData):
(JSC::IntlCollatorConstructor::getCallData):
(JSC::IntlCollatorConstructor::getOwnPropertySlot):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf): Added placeholder implementation returning [].
(JSC::IntlCollatorConstructor::visitChildren):
* runtime/IntlCollatorConstructor.h: Added.
(JSC::IntlCollatorConstructor::collatorStructure):
* runtime/IntlCollatorPrototype.cpp: Added.
(JSC::IntlCollatorPrototype::create):
(JSC::IntlCollatorPrototype::createStructure):
(JSC::IntlCollatorPrototype::IntlCollatorPrototype):
(JSC::IntlCollatorPrototype::finishCreation):
(JSC::IntlCollatorPrototype::getOwnPropertySlot):
(JSC::IntlCollatorPrototypeGetterCompare): Added compare getter (10.3.3)
(JSC::IntlCollatorPrototypeFuncResolvedOptions): Added placeholder implementation returning {}.
* runtime/IntlCollatorPrototype.h: Added.
* runtime/IntlDateTimeFormat.cpp: Added.
(JSC::IntlDateTimeFormat::create):
(JSC::IntlDateTimeFormat::createStructure):
(JSC::IntlDateTimeFormat::IntlDateTimeFormat):
(JSC::IntlDateTimeFormat::finishCreation):
(JSC::IntlDateTimeFormat::destroy):
(JSC::IntlDateTimeFormat::visitChildren):
(JSC::IntlDateTimeFormat::setBoundFormat):
(JSC::IntlDateTimeFormatFuncFormatDateTime): Added placeholder implementation returning new Date(value).toString().
* runtime/IntlDateTimeFormat.h: Added.
(JSC::IntlDateTimeFormat::constructor):
(JSC::IntlDateTimeFormat::boundFormat):
* runtime/IntlDateTimeFormatConstructor.cpp: Added.
(JSC::IntlDateTimeFormatConstructor::create):
(JSC::IntlDateTimeFormatConstructor::createStructure):
(JSC::IntlDateTimeFormatConstructor::IntlDateTimeFormatConstructor):
(JSC::IntlDateTimeFormatConstructor::finishCreation):
(JSC::constructIntlDateTimeFormat): Added DateTimeFormat constructor (12.1.2).
(JSC::callIntlDateTimeFormat): Added DateTimeFormat constructor (12.1.2).
(JSC::IntlDateTimeFormatConstructor::getConstructData):
(JSC::IntlDateTimeFormatConstructor::getCallData):
(JSC::IntlDateTimeFormatConstructor::getOwnPropertySlot):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf): Added placeholder implementation returning [].
(JSC::IntlDateTimeFormatConstructor::visitChildren):
* runtime/IntlDateTimeFormatConstructor.h: Added.
(JSC::IntlDateTimeFormatConstructor::dateTimeFormatStructure):
* runtime/IntlDateTimeFormatPrototype.cpp: Added.
(JSC::IntlDateTimeFormatPrototype::create):
(JSC::IntlDateTimeFormatPrototype::createStructure):
(JSC::IntlDateTimeFormatPrototype::IntlDateTimeFormatPrototype):
(JSC::IntlDateTimeFormatPrototype::finishCreation):
(JSC::IntlDateTimeFormatPrototype::getOwnPropertySlot):
(JSC::IntlDateTimeFormatPrototypeGetterFormat): Added format getter (12.3.3).
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions): Added placeholder implementation returning {}.
* runtime/IntlDateTimeFormatPrototype.h: Added.
* runtime/IntlNumberFormat.cpp: Added.
(JSC::IntlNumberFormat::create):
(JSC::IntlNumberFormat::createStructure):
(JSC::IntlNumberFormat::IntlNumberFormat):
(JSC::IntlNumberFormat::finishCreation):
(JSC::IntlNumberFormat::destroy):
(JSC::IntlNumberFormat::visitChildren):
(JSC::IntlNumberFormat::setBoundFormat):
(JSC::IntlNumberFormatFuncFormatNumber): Added placeholder implementation returning Number(value).toString().
* runtime/IntlNumberFormat.h: Added.
(JSC::IntlNumberFormat::constructor):
(JSC::IntlNumberFormat::boundFormat):
* runtime/IntlNumberFormatConstructor.cpp: Added.
(JSC::IntlNumberFormatConstructor::create):
(JSC::IntlNumberFormatConstructor::createStructure):
(JSC::IntlNumberFormatConstructor::IntlNumberFormatConstructor):
(JSC::IntlNumberFormatConstructor::finishCreation):
(JSC::constructIntlNumberFormat): Added NumberFormat constructor (11.1.2).
(JSC::callIntlNumberFormat): Added NumberFormat constructor (11.1.2).
(JSC::IntlNumberFormatConstructor::getConstructData):
(JSC::IntlNumberFormatConstructor::getCallData):
(JSC::IntlNumberFormatConstructor::getOwnPropertySlot):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf): Added placeholder implementation returning [].
(JSC::IntlNumberFormatConstructor::visitChildren):
* runtime/IntlNumberFormatConstructor.h: Added.
(JSC::IntlNumberFormatConstructor::numberFormatStructure):
* runtime/IntlNumberFormatPrototype.cpp: Added.
(JSC::IntlNumberFormatPrototype::create):
(JSC::IntlNumberFormatPrototype::createStructure):
(JSC::IntlNumberFormatPrototype::IntlNumberFormatPrototype):
(JSC::IntlNumberFormatPrototype::finishCreation):
(JSC::IntlNumberFormatPrototype::getOwnPropertySlot):
(JSC::IntlNumberFormatPrototypeGetterFormat): Added format getter (11.3.3).
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions): Added placeholder implementation returning {}.
* runtime/IntlNumberFormatPrototype.h: Added.
* runtime/IntlObject.cpp:
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation): Added Collator, NumberFormat, and DateTimeFormat properties (8.1).
(JSC::IntlObject::visitChildren):
* runtime/IntlObject.h:
(JSC::IntlObject::collatorConstructor):
(JSC::IntlObject::collatorPrototype):
(JSC::IntlObject::collatorStructure):
(JSC::IntlObject::numberFormatConstructor):
(JSC::IntlObject::numberFormatPrototype):
(JSC::IntlObject::numberFormatStructure):
(JSC::IntlObject::dateTimeFormatConstructor):
(JSC::IntlObject::dateTimeFormatPrototype):
(JSC::IntlObject::dateTimeFormatStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

Source/WebCore:

* Configurations/FeatureDefines.xcconfig: Enabled INTL.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Enabled INTL.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Enabled INTL.

Tools:

Enable flag now that the basic objects are in place.

* Scripts/webkitperl/FeatureList.pm: Enabled INTL

LayoutTests:

Add tests for Intl.Collator, Intl.NumberFormat, and Intl.DateTimeFormat

* TestExpectations: Enabled intl tests.
* js/intl-collator-expected.txt: Added.
* js/intl-collator.html: Added.
* js/intl-datetimeformat-expected.txt: Added.
* js/intl-datetimeformat.html: Added.
* js/intl-expected.txt: Updated.
* js/intl-numberformat-expected.txt: Added.
* js/intl-numberformat.html: Added.
* js/script-tests/intl-collator.js: Added.
* js/script-tests/intl-datetimeformat.js: Added.
* js/script-tests/intl-numberformat.js: Added.
* js/script-tests/intl.js: Added tests for Collator, NumberFormat, and DateTimeFormat.

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

5 years agoMake TextLayout fast allocated
cdumez@apple.com [Thu, 30 Jul 2015 03:04:45 +0000 (03:04 +0000)]
Make TextLayout fast allocated
https://bugs.webkit.org/show_bug.cgi?id=147428

Reviewed by Simon Fraser.

Make TextLayout fast allocated as it is allocated frequently and on the
heap.

* platform/graphics/mac/ComplexTextController.cpp:

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

5 years agoFix iOS build
mmaxfield@apple.com [Thu, 30 Jul 2015 02:54:45 +0000 (02:54 +0000)]
Fix iOS build

Unreviewed.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade): Deleted.
* platform/graphics/FontCascade.h:

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

5 years ago[WK2] Use FastMalloc in IPC::MessageDecoder
cdumez@apple.com [Thu, 30 Jul 2015 02:34:07 +0000 (02:34 +0000)]
[WK2] Use FastMalloc in IPC::MessageDecoder
https://bugs.webkit.org/show_bug.cgi?id=147425

Reviewed by Sam Weinig.

Use FastMalloc in IPC::MessageDecoder instead of system malloc, for
performance reasons and consistency.

* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::~ArgumentDecoder):
(IPC::ArgumentDecoder::initialize):

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

5 years ago[EFL][CoordinatedGraphics] fixed position banner is moved when enabling delegateScrolling
gyuyoung.kim@webkit.org [Thu, 30 Jul 2015 02:00:31 +0000 (02:00 +0000)]
[EFL][CoordinatedGraphics] fixed position banner is moved when enabling delegateScrolling
https://bugs.webkit.org/show_bug.cgi?id=146959

Reviewed by Simon Fraser.

Don't update fixed visible content area in ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate
because PageViewportController and WebView on CoordinatedGraphics also update the visible content area according
to the scrolling. So this problem has been caused by duplicated fixed visible rect update.

EFL WTR doesn't work with fixed layout and delegatesScrolling yet. So no test for this issue.

* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate): Deleted.

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

5 years agoWeb Inspector: Allow record filtering by frame duration in Rendering Frames timeline
mattbaker@apple.com [Thu, 30 Jul 2015 01:18:04 +0000 (01:18 +0000)]
Web Inspector: Allow record filtering by frame duration in Rendering Frames timeline
https://bugs.webkit.org/show_bug.cgi?id=147419

Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
New scope bar item labels.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
New scope bar for frame duration filtering.
(WebInspector.RenderingFrameTimelineView.displayNameForDurationFilter):
(WebInspector.RenderingFrameTimelineView.prototype.matchTreeElementAgainstCustomFilters):
Overridden for view specific filtering. Filtering applies to RenderingFrameTimelineRecords only.
(WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
Force sidebar filtering when duration filter changes.

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

5 years agoUse rvalue references in FontCascade
mmaxfield@apple.com [Thu, 30 Jul 2015 00:47:34 +0000 (00:47 +0000)]
Use rvalue references in FontCascade
https://bugs.webkit.org/show_bug.cgi?id=147427

Reviewed by Simon Fraser.

No new tests because there is no behavior change.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::resolvesFamilyFor):
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::FontCascade):
(WebCore::retrieveOrAddCachedFonts):
(WebCore::FontCascade::update):
* platform/graphics/FontCascade.h:
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::FontCascadeFonts):
* platform/graphics/FontCascadeFonts.h:
(WebCore::FontCascadeFonts::create):

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

5 years agoRename FontDescriptionFontDataCacheKey to FontDescriptionKey
mmaxfield@apple.com [Wed, 29 Jul 2015 23:38:29 +0000 (23:38 +0000)]
Rename FontDescriptionFontDataCacheKey to FontDescriptionKey
https://bugs.webkit.org/show_bug.cgi?id=147424

Reviewed by Simon Fraser.

This struct holds information about a FontDescription.

No new tests because there is no behavior change.

* css/CSSSegmentedFontFace.cpp:
(WebCore::CSSSegmentedFontFace::fontRanges):
* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKeyHash::hash):
(WebCore::computeHash): Deleted.
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionKey::FontDescriptionKey):
(WebCore::FontDescriptionKey::operator==):
(WebCore::FontDescriptionKey::operator!=):
(WebCore::FontDescriptionKey::computeHash):
(WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey): Deleted.
(WebCore::FontDescriptionFontDataCacheKey::operator==): Deleted.
(WebCore::FontDescriptionFontDataCacheKey::operator!=): Deleted.
(WebCore::FontDescriptionFontDataCacheKey::computeHash): Deleted.
* platform/graphics/FontCascade.cpp:
(WebCore::operator==):
(WebCore::makeFontCascadeCacheKey):
(WebCore::computeFontCascadeCacheHash):

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

5 years agoPreview should not start if touch handler prevents default.
enrica@apple.com [Wed, 29 Jul 2015 23:03:25 +0000 (23:03 +0000)]
Preview should not start if touch handler prevents default.
https://bugs.webkit.org/show_bug.cgi?id=147423
rdar://problem/22061043

Reviewed by Tim Horton.

We need to check if _highlightLongPressCanClick has not been reset before
we allow the preview. It can be reset by a touch handler preventing default.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):

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

5 years agoRemove the spanner placeholder from m_spannerMap when the placeholder object
zalan@apple.com [Wed, 29 Jul 2015 22:17:03 +0000 (22:17 +0000)]
Remove the spanner placeholder from m_spannerMap when the placeholder object
gets transferred to a descendant flow.
https://bugs.webkit.org/show_bug.cgi?id=147380
rdar://problem/21981078

Reviewed by David Hyatt.

Before r180328, the spanner placeholder was removed from m_spannerMap through
RenderMultiColumnFlowThread::removeFlowChildInfo() by calling flowThreadRelativeWillBeRemoved()
when the placeholder renderer got transferred to the descendant flow.
Now we just remove it from the map when the renderer is being detached.

Source/WebCore:

Test: fast/multicol/newmulticol/spanner-crash-with-embedded-columns.html

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):

LayoutTests:

* fast/multicol/newmulticol/spanner-crash-with-embedded-columns-expected.txt: Added.
* fast/multicol/newmulticol/spanner-crash-with-embedded-columns.html: Added.

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

5 years agoAX: iOS: VoiceOver hangs indefinitely when an JS alert appears
cfleizach@apple.com [Wed, 29 Jul 2015 22:00:57 +0000 (22:00 +0000)]
AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
https://bugs.webkit.org/show_bug.cgi?id=147386

Reviewed by Dan Bernstein.

Make sure this also builds on iOS8.

* Platform/IPC/mac/ConnectionMac.mm:

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

5 years agoUnreviewed, rolling out r187550.
commit-queue@webkit.org [Wed, 29 Jul 2015 21:34:44 +0000 (21:34 +0000)]
Unreviewed, rolling out r187550.
https://bugs.webkit.org/show_bug.cgi?id=147420

Broke Windows build (again) (Requested by smfr on #webkit).

Reverted changeset:

"Implement WebAssembly module parser"
https://bugs.webkit.org/show_bug.cgi?id=147293
http://trac.webkit.org/changeset/187550

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

5 years agoReview feedback followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyCh...
beidson@apple.com [Wed, 29 Jul 2015 21:34:41 +0000 (21:34 +0000)]
Review feedback followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
https://bugs.webkit.org/show_bug.cgi?id=147418

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):

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

5 years agoRELEASE_ASSERT followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
beidson@apple.com [Wed, 29 Jul 2015 21:32:58 +0000 (21:32 +0000)]
RELEASE_ASSERT followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
https://bugs.webkit.org/show_bug.cgi?id=147418

Reviewed by Chris Dumez.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::cancelPolicyCheckIfNeeded): RELEASE_ASSERT we have a FrameLoader here.
  We want to know if we ever get here without one.

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

5 years agoCrash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
beidson@apple.com [Wed, 29 Jul 2015 21:26:59 +0000 (21:26 +0000)]
Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
<rdar://problem/21412186> and https://bugs.webkit.org/show_bug.cgi?id=147418

Reviewed by Chris Dumez.

No new tests (No known reproducibility)

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): When setting to m_waitingForContentPolicy true, make sure we have a FrameLoader.
(WebCore::DocumentLoader::detachFromFrame): Always explicitly call cancelPolicyCheckIfNeeded().
(WebCore::DocumentLoader::cancelPolicyCheckIfNeeded): Cancel the policy check if there is one.
(WebCore::DocumentLoader::cancelMainResourceLoad): Use cancelPolicyCheckIfNeeded().
* loader/DocumentLoader.h:

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

5 years agoCrash calling webSocket.close() from onError handler for blocked web socket.
beidson@apple.com [Wed, 29 Jul 2015 21:08:30 +0000 (21:08 +0000)]
Crash calling webSocket.close() from onError handler for blocked web socket.
<rdar://problem/21771620> and https://bugs.webkit.org/show_bug.cgi?id=147411

Reviewed by Tim Horton.

Source/WebCore:

Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
       http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html

This was introduced with http://trac.webkit.org/changeset/185848

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): When blocked because of mixedContent, call dispatchOrQueueErrorEvent().
(WebCore::WebSocket::didReceiveMessageError): Use dispatchOrQueueErrorEvent() instead.
(WebCore::WebSocket::dispatchOrQueueErrorEvent): Dispatch the error event, but don't dispatch one twice!
* Modules/websockets/WebSocket.h:

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::fail): Null-check m_handshake before creating a console message from it.

LayoutTests:

* http/tests/security/mixedContent/resources/frame-with-insecure-websocket.html: Add a call to webSocket.close() inside the onError handler.
* http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe-expected.txt:
* http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame-expected.txt:

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

5 years agoRemove native call inlining
basile_clement@apple.com [Wed, 29 Jul 2015 20:30:08 +0000 (20:30 +0000)]
Remove native call inlining
https://bugs.webkit.org/show_bug.cgi?id=147417

.:

Rubber-stamped by Filip Pizlo.

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

Source/JavaScriptCore:

Rubber Stamped by Filip Pizlo.

* CMakeLists.txt:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): Deleted.
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall): Deleted.
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize): Deleted.
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC): Deleted.
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode): Deleted.
* dfg/DFGNode.h:
(JSC::DFG::Node::hasHeapPrediction): Deleted.
(JSC::DFG::Node::hasCellOperand): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate): Deleted.
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute): Deleted.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Deleted.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Deleted.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile): Deleted.
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::lower): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::compileNode): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::compileNativeCallOrConstruct): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::getFunctionBySymbol): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::getModuleByPathForSymbol): Deleted.
(JSC::FTL::DFG::LowerDFGToLLVM::didOverflowStack): Deleted.
* ftl/FTLState.cpp:
(JSC::FTL::State::State): Deleted.
* ftl/FTLState.h:
* runtime/BundlePath.cpp: Removed.
(JSC::bundlePath): Deleted.
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
* runtime/Options.h:

Source/WTF:

Rubber-stamped by Filip Pizlo.

* wtf/Platform.h:

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

5 years agoMedia Session: test 'Transient Solo' interruptions https://bugs.webkit.org/show_bug...
mrajca@apple.com [Wed, 29 Jul 2015 19:54:49 +0000 (19:54 +0000)]
Media Session: test 'Transient Solo' interruptions https://bugs.webkit.org/show_bug.cgi?id=147091

Reviewed by Eric Carlson.

* media/session/transient-solo-interruptions-expected.txt: Added.
* media/session/transient-solo-interruptions.html: Added.
* platform/mac/TestExpectations: Media Session support is disabled by default.

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

5 years agoUnreviewed, skipping a test that is too complex for its own good
basile_clement@apple.com [Wed, 29 Jul 2015 19:20:35 +0000 (19:20 +0000)]
Unreviewed, skipping a test that is too complex for its own good
https://bugs.webkit.org/show_bug.cgi?id=147167

* tests/stress/math-pow-coherency.js:

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

5 years agoImplement WebAssembly module parser
commit-queue@webkit.org [Wed, 29 Jul 2015 19:03:34 +0000 (19:03 +0000)]
Implement WebAssembly module parser
https://bugs.webkit.org/show_bug.cgi?id=147293

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-07-29
Reviewed by Mark Lam.

Reupload the patch, since r187539 should fix the "Cannot open include file:
'JSWASMModule.h'" issue in the Windows build.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionLoadWebAssembly):
* parser/SourceProvider.h:
(JSC::WebAssemblySourceProvider::create):
(JSC::WebAssemblySourceProvider::data):
(JSC::WebAssemblySourceProvider::WebAssemblySourceProvider):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::wasmModuleStructure):
* wasm/WASMMagicNumber.h: Added.
* wasm/WASMModuleParser.cpp: Added.
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseModule):
(JSC::parseWebAssembly):
* wasm/WASMModuleParser.h: Added.
* wasm/WASMReader.cpp: Added.
(JSC::WASMReader::readUnsignedInt32):
(JSC::WASMReader::readFloat):
(JSC::WASMReader::readDouble):
* wasm/WASMReader.h: Added.
(JSC::WASMReader::WASMReader):

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

5 years agoUnreviewed, remove a .orig file.
basile_clement@apple.com [Wed, 29 Jul 2015 17:52:44 +0000 (17:52 +0000)]
Unreviewed, remove a .orig file.
https://bugs.webkit.org/show_bug.cgi?id=113610

* fast/css-intrinsic-dimensions/height-property-value.html.orig: Removed.

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

5 years agoUnreviewed, lower the number of test iterations to prevent timing out on Debug builds
basile_clement@apple.com [Wed, 29 Jul 2015 17:44:16 +0000 (17:44 +0000)]
Unreviewed, lower the number of test iterations to prevent timing out on Debug builds
https://bugs.webkit.org/show_bug.cgi?id=147167

* tests/stress/math-pow-coherency.js:

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

5 years ago[Seccomp] Further improvements to default web process policy
mcatanzaro@igalia.com [Wed, 29 Jul 2015 15:52:27 +0000 (15:52 +0000)]
[Seccomp] Further improvements to default web process policy
https://bugs.webkit.org/show_bug.cgi?id=142987

Provide various helper functions to allow more flexible construction of
filesystem access policies.

Reviewed by Žan Doberšek.

Improve the policy. Also, remove ifdefs to reduce potential for breakage in non-default
configurations.

* Shared/linux/SeccompFilters/SyscallPolicy.cpp:
(WebKit::SyscallPolicy::addDefaultWebProcessPolicy):

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

5 years agoClean up RefPtrCairo.cpp
mcatanzaro@igalia.com [Wed, 29 Jul 2015 14:30:50 +0000 (14:30 +0000)]
Clean up RefPtrCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=147384

Reviewed by Martin Robinson.

Tests for null/non-null should all be done without equality comparisons.

* platform/graphics/cairo/RefPtrCairo.cpp:
(WTF::refIfNotNull):
(WTF::derefIfNotNull):

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

5 years agoRemove dispatch_apply_f and instead use vImage more directly
dino@apple.com [Wed, 29 Jul 2015 12:35:31 +0000 (12:35 +0000)]
Remove dispatch_apply_f and instead use vImage more directly
https://bugs.webkit.org/show_bug.cgi?id=147391
<rdar://problem/21893047>

Fix the iOS builds.

* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::unpremultiplyBufferData):
(WebCore::premultiplyBufferData):

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

5 years agoAvoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
cdumez@apple.com [Wed, 29 Jul 2015 07:16:34 +0000 (07:16 +0000)]
Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
https://bugs.webkit.org/show_bug.cgi?id=147398

Reviewed by Jer Noble.

Only call PlatformMediaSessionManager::stopAllMediaPlaybackForProcess() in
Source/WebCore:

destructors if an PlatformMediaSessionManager instance already exists, to
avoid constructing one unecessarily at that point.

* dom/Document.cpp:
(WebCore::Document::~Document):
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::sharedManager):
(WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
* platform/audio/PlatformMediaSessionManager.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::PlatformMediaSessionManager::sharedManager):
(WebCore::PlatformMediaSessionManager::sharedManagerIfExists):

Source/WebKit2:

destructors if an PlatformMediaSessionManager instance already exists, to
avoid constructing one unecessarily at that point.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose):

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

5 years ago[GTK] Add API to set the maximum number of web processes per WebKitWebContext
carlosgc@webkit.org [Wed, 29 Jul 2015 06:50:50 +0000 (06:50 +0000)]
[GTK] Add API to set the maximum number of web processes per WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=147108

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_web_process_count_limit):
(webkit_web_context_get_web_process_count_limit):
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

Tools:

Add test case to check the web process limit.

* TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
(testWebProcessLimit):
(beforeAll):

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

5 years ago[GTK] Fix empty space in popup menus when first item is selected
carlosgc@webkit.org [Wed, 29 Jul 2015 06:48:23 +0000 (06:48 +0000)]
[GTK] Fix empty space in popup menus when first item is selected
https://bugs.webkit.org/show_bug.cgi?id=147358

Reviewed by Martin Robinson.

It happens when one of the first elements are selected, because we
try to center the current selection on the combo element. When the
menu is large enough to make the element centered we need to leave
empty space at the beginning. This can be fixed by not scrolling
to center the selected item when it's above the combo
element. This ensure the selected item will always be visible,
even if it's not centered. If the selected item is already
centered or below the combo element, the behaviour doesn't change
and we scroll to center it.

* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):

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

5 years ago[GTK] Missing casts in BrowserWindow.c
mcatanzaro@igalia.com [Wed, 29 Jul 2015 06:47:12 +0000 (06:47 +0000)]
[GTK] Missing casts in BrowserWindow.c
https://bugs.webkit.org/show_bug.cgi?id=147395

Reviewed by Carlos Garcia Campos.

* MiniBrowser/gtk/BrowserWindow.c:
(browserWindowSetupEditorToolbar):

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

5 years ago[EFL] Fix typos in ewk_extension.cpp
commit-queue@webkit.org [Wed, 29 Jul 2015 06:41:02 +0000 (06:41 +0000)]
[EFL] Fix typos in ewk_extension.cpp
https://bugs.webkit.org/show_bug.cgi?id=147396

Patch by Jincheol Jo <jincheol.jo@navercorp.com> on 2015-07-28
Reviewed by Gyuyoung Kim.

Fix from toEwkExtendion to toEwkExtension.

* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(toEwkExtension):
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
(EwkExtension::didReceiveMessage):
(toEwkExtendion): Deleted.

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

5 years agoAdd the "wasm" directory to Visual Studio project files
commit-queue@webkit.org [Wed, 29 Jul 2015 05:48:29 +0000 (05:48 +0000)]
Add the "wasm" directory to Visual Studio project files
https://bugs.webkit.org/show_bug.cgi?id=147400

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-07-28
Reviewed by Simon Fraser.

This patch should fix the "Cannot open include file: 'JSWASMModule.h'" issue
in the Windows build.

* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
* JavaScriptCore.vcxproj/copy-files.cmd:

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

5 years agoUnreviewed, rolling out r187531.
commit-queue@webkit.org [Wed, 29 Jul 2015 03:27:23 +0000 (03:27 +0000)]
Unreviewed, rolling out r187531.
https://bugs.webkit.org/show_bug.cgi?id=147397

Broke Windows bild (Requested by smfr on #webkit).

Reverted changeset:

"Implement WebAssembly module parser"
https://bugs.webkit.org/show_bug.cgi?id=147293
http://trac.webkit.org/changeset/187531

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

5 years agoSpeed up the Stringifier::toJSON() fast case
benjamin@webkit.org [Wed, 29 Jul 2015 02:15:41 +0000 (02:15 +0000)]
Speed up the Stringifier::toJSON() fast case
https://bugs.webkit.org/show_bug.cgi?id=147383

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-07-28
Reviewed by Andreas Kling.

Source/JavaScriptCore:

* runtime/JSONObject.cpp:
(JSC::Stringifier::toJSON):
(JSC::Stringifier::toJSONImpl):

LayoutTests:

Make the fast case of Stringifier::toJSON() inline and the uncommon
case out-of-line.

* js/dom/JSON-stringify-string-object-with-tojson-expected.txt: Added.
* js/dom/JSON-stringify-string-object-with-tojson.html: Added.
* js/resources/JSON-stringify-string-object-with-tojson.js: Added.
(stringObject.toJSON):
(String.prototype.toJSON):

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

5 years agoFix debug builds.
simon.fraser@apple.com [Wed, 29 Jul 2015 02:08:36 +0000 (02:08 +0000)]
Fix debug builds.

* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::premultiplyBufferData):
(WebCore::unpremultiplyBufferData):

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

5 years agoAnimations sometimes fail to start
simon.fraser@apple.com [Wed, 29 Jul 2015 01:57:30 +0000 (01:57 +0000)]
Animations sometimes fail to start
https://bugs.webkit.org/show_bug.cgi?id=147394
rdar://problem/21852603

Reviewed by Dean Jackson.
Source/WebCore:

When an accelerated animation or transition was started at the same time as
a non-accelerated one, and then the node for the former was removed, we could
never kick off the non-accelerated animation.

AnimationControllerPrivate has logic to synchronize the two types of animation
when they start in the same animation update, which involves setting the
m_waitingForAsyncStartNotification flag, and waiting for a notifyAnimationStarted()
to come in from the graphics system.

However, it failed to handle the case where the accelerated animation was removed
before the callback was received, which left the m_waitingForAsyncStartNotification flag
set to true, preventing the non-accelerated animation from running.

Test: animations/remove-syncing-animation.html

* page/animation/AnimationBase.h:
(WebCore::AnimationBase::isAccelerated): Make this public.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::clear): Add logging.
(WebCore::AnimationControllerPrivate::receivedStartTimeResponse): Add logging.
(WebCore::AnimationControllerPrivate::animationWillBeRemoved): Add logging.
After removing animations from the maps, check to see if we expect any of the
remaining animations are waiting for a notifyAnimationStarted(). If not, clear
the m_waitingForAsyncStartNotification flag.
(WebCore::AnimationController::notifyAnimationStarted): Log the renderer.
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Remove unneeded
initializations of HashMaps.
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions): Log renderers.
(WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.

LayoutTests:

Test that starts an accelerated and non-accelerated animation, then removes
the node for the accelerated one.

* animations/remove-syncing-animation-expected.txt: Added.
* animations/remove-syncing-animation.html: Added.

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

5 years agoRemove dispatch_apply_f and instead use vImage more directly
dino@apple.com [Wed, 29 Jul 2015 01:43:58 +0000 (01:43 +0000)]
Remove dispatch_apply_f and instead use vImage more directly
https://bugs.webkit.org/show_bug.cgi?id=147391
<rdar://problem/21893047>

Reviewed by Simon Fraser.

Use vImage unmultiplication and premultiplication functions on the
entire ImageBufferData object, rather than getting and setting data on an
line by line using dispatch_apply.

We were seeing some crashes in vImage with the smaller buffer sizes, and
hopefully this will either fix the problem, or give us a better
stack trace to diagnose.

I also did a drive-by change of "dst" to "dest". It was inconsistent throughout
the file.

Convered by the tests in fast/canvas and imported/w3c/canvas

* platform/graphics/cg/ImageBufferDataCG.cpp: Remove the ScanlineData structure. It is
no longer needed.
(WebCore::premultiplyBufferData): New function that calls vImagePremultiplyData_RGBA8888.
(WebCore::unpremultiplyBufferData): New function that calls vImageUnpremultiplyData_RGBA8888.
(WebCore::affineWarpBufferData): Extracting some common code into a function.
(WebCore::ImageBufferData::getData): Use the two new functions as appropriate. Move
some of the code around now that more is shared between the different #if branches.
(WebCore::ImageBufferData::putData):
(WebCore::convertScanline): Deleted.
(WebCore::unpremultitplyScanline): Deleted.
(WebCore::premultitplyScanline): Deleted.

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

5 years agoClean up usesAsyncCallbacks handling in ResourceHandle
ap@apple.com [Wed, 29 Jul 2015 01:26:49 +0000 (01:26 +0000)]
Clean up usesAsyncCallbacks handling in ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=147342

Reviewed by Darin Adler.

Source/WebCore:

Store "usesAsyncCallbacks" bit in ResourceHandle, because it's not accessible
via client once the client is zeroed out.

Changed ResourceHandle::setClient into ResourceHandle::clearClient, because it's
only ever used to zero out the client pointer, and it doesn't support changing it.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::stopLoading):
* platform/network/BlobResourceHandle.cpp:
(WebCore::BlobResourceHandle::notifyResponseOnSuccess):
(WebCore::BlobResourceHandle::notifyResponseOnError):
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::client):
(WebCore::ResourceHandle::clearClient):
(WebCore::ResourceHandle::setDefersLoading):
(WebCore::ResourceHandle::usesAsyncCallbacks):
(WebCore::ResourceHandle::setClient): Deleted.
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::shouldUseCredentialStorage):
(WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::makeDelegate):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::continueWillSendRequest):
(WebCore::ResourceHandle::continueDidReceiveResponse):
(WebCore::ResourceHandle::shouldUseCredentialStorage):
(WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
(WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
(WebCore::ResourceHandle::continueWillCacheResponse):

Source/WebKit2:

Update for a renaming in WebCore.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::platformInvalidate):

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

5 years agoMinor cleanups in FontCacheFreeType.cpp
mcatanzaro@igalia.com [Wed, 29 Jul 2015 00:57:00 +0000 (00:57 +0000)]
Minor cleanups in FontCacheFreeType.cpp
https://bugs.webkit.org/show_bug.cgi?id=147392

Reviewed by Martin Robinson.

Mark several functions as static (file-scope), use more nullptr, and use more smart
pointers. No behavior changes.

* platform/graphics/freetype/FcUniquePtr.h:
(WebCore::FcPtrDeleter<FcCharSet>::operator()):
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::createFontConfigPatternForCharacters):
(WebCore::findBestFontGivenFallbacks):
(WebCore::FontCache::systemFallbackForCharacters):
(WebCore::fontWeightToFontconfigWeight):
(WebCore::FontCache::createFontPlatformData):

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

5 years agoImplement WebAssembly module parser
commit-queue@webkit.org [Wed, 29 Jul 2015 00:55:17 +0000 (00:55 +0000)]
Implement WebAssembly module parser
https://bugs.webkit.org/show_bug.cgi?id=147293

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-07-28
Reviewed by Geoffrey Garen.

Implement WebAssembly module parser for WebAssembly files produced by pack-asmjs
<https://github.com/WebAssembly/polyfill-prototype-1>. This patch only checks
the magic number at the beginning of the files. Parsing of the rest will be
implemented in a subsequent patch.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionLoadWebAssembly):
* parser/SourceProvider.h:
(JSC::WebAssemblySourceProvider::create):
(JSC::WebAssemblySourceProvider::data):
(JSC::WebAssemblySourceProvider::WebAssemblySourceProvider):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::wasmModuleStructure):
* wasm/WASMMagicNumber.h: Added.
* wasm/WASMModuleParser.cpp: Added.
(JSC::WASMModuleParser::WASMModuleParser):
(JSC::WASMModuleParser::parse):
(JSC::WASMModuleParser::parseModule):
(JSC::parseWebAssembly):
* wasm/WASMModuleParser.h: Added.
* wasm/WASMReader.cpp: Added.
(JSC::WASMReader::readUnsignedInt32):
(JSC::WASMReader::readFloat):
(JSC::WASMReader::readDouble):
* wasm/WASMReader.h: Added.
(JSC::WASMReader::WASMReader):

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

5 years agoAX: iOS: VoiceOver hangs indefinitely when an JS alert appears
cfleizach@apple.com [Wed, 29 Jul 2015 00:44:14 +0000 (00:44 +0000)]
AX: iOS: VoiceOver hangs indefinitely when an JS alert appears
https://bugs.webkit.org/show_bug.cgi?id=147386

Reviewed by Anders Carlsson.

Support the iOS platform API to notify accessibility clients when the WebProcess is about to suspend (because of some modal dialog).
Luckily, we did all the hardwork for OSX a few years ago to support this paradigm.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::AccessibilityProcessSuspendedNotification):
(IPC::Connection::willSendSyncMessage):
(IPC::Connection::didReceiveSyncReply):

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

5 years ago[ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
utatane.tea@gmail.com [Wed, 29 Jul 2015 00:38:29 +0000 (00:38 +0000)]
[ES6] Add ENABLE_ES6_MODULES compile time flag with the default value "false"
https://bugs.webkit.org/show_bug.cgi?id=147350

Reviewed by Sam Weinig.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

5 years agoWeb Inspector: console.groupEnd causes negative indent when no group is active
commit-queue@webkit.org [Tue, 28 Jul 2015 23:50:11 +0000 (23:50 +0000)]
Web Inspector: console.groupEnd causes negative indent when no group is active
https://bugs.webkit.org/show_bug.cgi?id=147375

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

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):

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

5 years ago[Freetype] Always allow font matching for strong aliases
mcatanzaro@igalia.com [Tue, 28 Jul 2015 23:37:10 +0000 (23:37 +0000)]
[Freetype] Always allow font matching for strong aliases
https://bugs.webkit.org/show_bug.cgi?id=147057

Reviewed by Martin Robinson.

Source/WebCore:

Tests: platform/gtk/fonts/font-family-fallback-ignores-weak-aliases.html
       platform/gtk/fonts/font-family-fallback-respects-strong-aliases.html

Treat fonts that are strongly-aliased to each other as if they were identical for the
purposes of CSS font fallback. This improves the layout of many web pages by allowing
fontconfig to replace fonts with metric-compatible equivalents (e.g. Arial -> Liberation
Sans) instead of rejecting the metric-compatible font as unsuitable.

* platform/graphics/cairo/RefPtrCairo.cpp:
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* platform/graphics/cairo/RefPtrCairo.h:
* platform/graphics/freetype/FcUniquePtr.h: Added.
(WebCore::FcPtrDeleter<FcFontSet>::operator()):
(WebCore::FcPtrDeleter<FcLangSet>::operator()):
(WebCore::FcPtrDeleter<FcObjectSet>::operator()):
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::strengthOfFirstAlias):
(WebCore::strongAliasesForFamily):
(WebCore::areStronglyAliased):
(WebCore::FontCache::createFontPlatformData):

Tools:

Create family aliases needed for the new layout tests.

* WebKitTestRunner/gtk/fonts/fonts.conf:

LayoutTests:

* platform/gtk/fonts/font-family-fallback-ignores-weak-aliases-expected.html: Added.
* platform/gtk/fonts/font-family-fallback-ignores-weak-aliases.html: Added.
* platform/gtk/fonts/font-family-fallback-respects-strong-aliases-expected.html: Added.
* platform/gtk/fonts/font-family-fallback-respects-strong-aliases.html: Added.

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

5 years agoSunSpider is no longer maintained
ggaren@apple.com [Tue, 28 Jul 2015 23:21:15 +0000 (23:21 +0000)]
SunSpider is no longer maintained
https://bugs.webkit.org/show_bug.cgi?id=147370

Reviewed by Michael Saboff.

Add an indicator to show that SunSpider is no longer maintained.

* perf/sunspider/sunspider.css:
(#logo):
(.topbox):
(.bottombox):
* perf/sunspider/sunspider.html:

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

5 years ago[iOS] Crash when encountering characters whose natural font is one we can't look up
mmaxfield@apple.com [Tue, 28 Jul 2015 23:12:46 +0000 (23:12 +0000)]
[iOS] Crash when encountering characters whose natural font is one we can't look up
https://bugs.webkit.org/show_bug.cgi?id=147377
<rdar://problem/22022011>

Reviewed by Simon Fraser.

Source/WebCore:

These characters hit the complex text code path, where CoreText picks fonts
to use for each character. We then try to map these CoreText fonts back to
our own Font objects, and we assume (on iOS) that our own font search will
always return something.

On OS X, we do not have such an assumption, and we handle the case where it
does not hold. This method works on iOS as well, so the solution is to just
perform it on both OSes.

Test: fast/text/crash-complex-unknown-font.html

* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

LayoutTests:

* fast/text/crash-complex-unknown-font-expected.html: Added.
* fast/text/crash-complex-unknown-font.html: Added.

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

5 years agoMake the type profiler work with lexical scoping and add tests
saambarati1@gmail.com [Tue, 28 Jul 2015 22:39:12 +0000 (22:39 +0000)]
Make the type profiler work with lexical scoping and add tests
https://bugs.webkit.org/show_bug.cgi?id=145438

Reviewed by Geoffrey Garen.

op_profile_type now knows how to resolve variables allocated within
the local scope stack. This means it knows how to resolve "let"
and "const" variables. Also, some refactoring was done inside
the BytecodeGenerator to make writing code to support the type
profiler much simpler and clearer.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::symbolTable): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::addExceptionHandler):
(JSC::UnlinkedCodeBlock::exceptionHandler):
(JSC::UnlinkedCodeBlock::vm):
(JSC::UnlinkedCodeBlock::addArrayProfile):
(JSC::UnlinkedCodeBlock::setSymbolTableConstantIndex): Deleted.
(JSC::UnlinkedCodeBlock::symbolTableConstantIndex): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitMove):
(JSC::BytecodeGenerator::emitTypeProfilerExpressionInfo):
(JSC::BytecodeGenerator::emitProfileType):
(JSC::BytecodeGenerator::emitProfileControlFlow):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitNodeForLeftHandSide):
* bytecompiler/NodesCodegen.cpp:
(JSC::ThisNode::emitBytecode):
(JSC::ResolveNode::emitBytecode):
(JSC::BracketAccessorNode::emitBytecode):
(JSC::DotAccessorNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):
(JSC::FunctionCallResolveNode::emitBytecode):
(JSC::FunctionCallBracketNode::emitBytecode):
(JSC::FunctionCallDotNode::emitBytecode):
(JSC::CallFunctionCallDotNode::emitBytecode):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
(JSC::PostfixNode::emitResolve):
(JSC::PostfixNode::emitBracket):
(JSC::PostfixNode::emitDot):
(JSC::PrefixNode::emitResolve):
(JSC::PrefixNode::emitBracket):
(JSC::PrefixNode::emitDot):
(JSC::ReadModifyResolveNode::emitBytecode):
(JSC::AssignResolveNode::emitBytecode):
(JSC::AssignDotNode::emitBytecode):
(JSC::ReadModifyDotNode::emitBytecode):
(JSC::AssignBracketNode::emitBytecode):
(JSC::ReadModifyBracketNode::emitBytecode):
(JSC::EmptyVarExpression::emitBytecode):
(JSC::EmptyLetExpression::emitBytecode):
(JSC::ForInNode::emitLoopHeader):
(JSC::ForOfNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
(JSC::BindingNode::bindValue):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_type):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_type):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* tests/typeProfiler/es6-block-scoping.js: Added.
(noop):
(arr):
(wrapper.changeFoo):
(wrapper.scoping):
(wrapper.scoping2):
(wrapper):
* tests/typeProfiler/es6-classes.js: Added.
(noop):
(wrapper.Animal):
(wrapper.Animal.prototype.methodA):
(wrapper.Dog):
(wrapper.Dog.prototype.methodB):
(wrapper):

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

5 years agoTests introduced in r187489 are flaky
cdumez@apple.com [Tue, 28 Jul 2015 22:38:17 +0000 (22:38 +0000)]
Tests introduced in r187489 are flaky
https://bugs.webkit.org/show_bug.cgi?id=147327

Rubber-stamped by Benjamin Poulain.

Tests introduced in r187489 are flaky, they sometimes print the console
message, sometimes not. The reason is that we sometimes use a cached
parsed stylesheet and we do not print the warning in this case. To fix
the flakiness, we now clear the memory cache at the beginning of each
test to make sure we download and parse the stylesheets.

* http/tests/security/cross-origin-css-1.html:
* http/tests/security/cross-origin-css-2.html:
* http/tests/security/cross-origin-css-3.html:
* http/tests/security/cross-origin-css-4.html:
* http/tests/security/cross-origin-css-5.html:
* http/tests/security/cross-origin-css-6.html:
* http/tests/security/cross-origin-css-7.html:
* http/tests/security/cross-origin-css-8.html:
* http/tests/security/cross-origin-css-in-quirks-1.html:
* http/tests/security/cross-origin-css-in-quirks-2.html:
* http/tests/security/cross-origin-css-in-quirks-3.html:
* http/tests/security/cross-origin-css-in-quirks-4.html:
* http/tests/security/cross-origin-css-in-quirks-5.html:
* http/tests/security/cross-origin-css-in-quirks-6.html:
* http/tests/security/cross-origin-css-in-quirks-7.html:
* http/tests/security/cross-origin-css-in-quirks-8.html:
* http/tests/security/same-origin-css-1.html:
* http/tests/security/same-origin-css-2.html:
* http/tests/security/same-origin-css-3.html:
* http/tests/security/same-origin-css-4.html:
* http/tests/security/same-origin-css-5.html:
* http/tests/security/same-origin-css-6.html:
* http/tests/security/same-origin-css-7.html:
* http/tests/security/same-origin-css-8.html:
* http/tests/security/same-origin-css-in-quirks.html:

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

5 years ago[iOS] REGRESSION(r168075): Fullscreen web video doesn't pause on screen lock
commit-queue@webkit.org [Tue, 28 Jul 2015 22:29:54 +0000 (22:29 +0000)]
[iOS] REGRESSION(r168075): Fullscreen web video doesn't pause on screen lock
https://bugs.webkit.org/show_bug.cgi?id=147269

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-07-28
Reviewed by Andreas Kling.

Media elements should pause when the application is going to EnterBackground
under lock regardless whether it is in full screen or not.

Source/WebCore:

* platform/audio/PlatformMediaSession.h:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::doInterruption): This code was moved from
beginInterruption().

(WebCore::PlatformMediaSession::shouldDoInterruption): Move the condition
which allows the media session interruption to a separate function.

(WebCore::PlatformMediaSession::beginInterruption): Call the functions
shouldDoInterruption() and doInterruption().

(WebCore::PlatformMediaSession::forceInterruption): This function will
be called from PlatformMediaSessionManager::applicationDidEnterBackground()
to override the decision which is made by PlatformMediaSession::beginInterruption()
if the application isSuspendedUnderLock.

* platform/audio/PlatformMediaSessionManager.h:
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::applicationDidEnterBackground):
[UIApp isSuspendedUnderLock] is only valid when it is called when the
UIApplicationDidEnterBackgroundNotification is received. We need to force
interrupting the media sessions if the application isSuspendedUnderLock
and UIApplicationWillResignActiveNotification was ignored because of PiP.

* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper applicationDidEnterBackground:]): Listen to
UIApplicationDidEnterBackgroundNotification and make a call on the web
thread to PlatformMediaSessionManager::applicationDidEnterBackground()
and pass the isSuspendedUnderLock flag which is queried on the UIProcess.

Source/WebKit2:

* Platform/spi/ios/UIKitSPI.h: Forward declare [UIApplication isSuspendedUnderLock].

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationDidEnterBackground):
[UIApp isSuspendedUnderLock] can only be called in the UIProcess. We need
to call it here and pass it to the WebPage in the WebProcess as part of the
ApplicationDidEnterBackground message.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Add the new parameter:
'isSuspendedUnderLock' to the ApplicationDidEnterBackground message.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackground): On iOS, the WebPage needs
to notify the MediaSessionManagerIOS that it received the message
ApplicationDidEnterBackground.

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

5 years ago[iOS] Creating a TextIndicator causes the view to scroll to the current selection
timothy_horton@apple.com [Tue, 28 Jul 2015 22:22:14 +0000 (22:22 +0000)]
[iOS] Creating a TextIndicator causes the view to scroll to the current selection
https://bugs.webkit.org/show_bug.cgi?id=147379
<rdar://problem/22038421>

Reviewed by Beth Dakin.

* editing/Editor.cpp:
(WebCore::Editor::setIgnoreCompositionSelectionChange):
* editing/Editor.h:
Add a flag so that setIgnoreCompositionSelectionChange(false) can still
not force-reveal the current selection.

This is useful for e.g. TextIndicator, who saves the selection, changes it,
and then restores it, but doesn't want to scroll to the saved/restored selection.

* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):
Make use of the above flag.

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

5 years agoWeb Inspector: Convert NavigationItem subclasses to ES6
burg@cs.washington.edu [Tue, 28 Jul 2015 21:53:10 +0000 (21:53 +0000)]
Web Inspector: Convert NavigationItem subclasses to ES6
https://bugs.webkit.org/show_bug.cgi?id=147364

Reviewed by Timothy Hatcher.

Convert remaining NavigationItem subclasses to use ES6 class.

Also promote the _additionalClassNames to be a protected getter,
and inline the style class names that are only used in one place.

Mechanical changes are elided from the changelog.

* UserInterface/Views/ActivateButtonNavigationItem.js:
(WebInspector.ActivateButtonNavigationItem):
(WebInspector.ActivateButtonNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/ActivateButtonToolbarItem.js:
(WebInspector.ActivateButtonToolbarItem):
* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem):
(WebInspector.ButtonNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/ButtonToolbarItem.js:
(WebInspector.ButtonToolbarItem):
* UserInterface/Views/ControlToolbarItem.js:
(WebInspector.ControlToolbarItem):
(WebInspector.ControlToolbarItem.prototype.get additionalClassNames):
* UserInterface/Views/DividerNavigationItem.js:
(WebInspector.DividerNavigationItem):
(WebInspector.DividerNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/FlexibleSpaceNavigationItem.js:
(WebInspector.FlexibleSpaceNavigationItem):
(WebInspector.FlexibleSpaceNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WebInspector.HierarchicalPathNavigationItem.prototype.get additionalClassNames):
(WebInspector.HierarchicalPathNavigationItem.prototype.get _additionalClassNames): Deleted.
* UserInterface/Views/NavigationItem.js:
(WebInspector.NavigationItem):
(WebInspector.NavigationItem.prototype.get _classNames):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WebInspector.RadioButtonNavigationItem):
(WebInspector.RadioButtonNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/ToggleButtonNavigationItem.js:
(WebInspector.ToggleButtonNavigationItem):
(WebInspector.ToggleButtonNavigationItem.prototype.get additionalClassNames):
* UserInterface/Views/ToggleControlToolbarItem.js:
(WebInspector.ToggleControlToolbarItem):
(WebInspector.ToggleControlToolbarItem.prototype.get additionalClassNames):

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

5 years agoBounds in InteractionInformationAtPosition should be always in main frame coordinate...
commit-queue@webkit.org [Tue, 28 Jul 2015 21:43:30 +0000 (21:43 +0000)]
Bounds in InteractionInformationAtPosition should be always in main frame coordinate space.
https://bugs.webkit.org/show_bug.cgi?id=147372

When we prepare the bounds for InteractionInformationAtPosition, we should convert the rect to
main frame space since WKContent in UIProcess expects it to be in the web view space.

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

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): Convert the bounding rect to main frame space if the element is inside a sub-frame.

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

5 years ago[iOS] Set AirPlay discovery mode to disabled when page is hidden
eric.carlson@apple.com [Tue, 28 Jul 2015 21:42:56 +0000 (21:42 +0000)]
[iOS] Set AirPlay discovery mode to disabled when page is hidden
https://bugs.webkit.org/show_bug.cgi?id=147369

Reviewed by Jer Noble.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresPlaybackTargetRouteMonitoring): Return false when
  the client is not visible.
* html/MediaElementSession.h:

* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::clientDataBufferingTimerFired): Call configureWireLessTargetMonitoring.

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

5 years agoImplement catch scope using lexical scoping constructs introduced with "let" scoping...
saambarati1@gmail.com [Tue, 28 Jul 2015 21:39:34 +0000 (21:39 +0000)]
Implement catch scope using lexical scoping constructs introduced with "let" scoping patch
https://bugs.webkit.org/show_bug.cgi?id=146979

Reviewed by Geoffrey Garen.

Now that BytecodeGenerator has a notion of local scope depth,
we can easily implement a catch scope that doesn't claim that
all variables are dynamically scoped. This means that functions
that use try/catch can have local variable resolution. This also
means that all functions that use try/catch don't have all
their variables marked as being captured.

Catch scopes now behave like a "let" scope (sans the TDZ logic) with a
single variable. Catch scopes are now just JSLexicalEnvironments and the
symbol table backing the catch scope knows that it corresponds to a catch scope.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/EvalCodeCache.h:
(JSC::EvalCodeCache::isCacheable):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::emitLoadGlobalObject):
(JSC::BytecodeGenerator::pushLexicalScope):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::popLexicalScope):
(JSC::BytecodeGenerator::popLexicalScopeInternal):
(JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration):
(JSC::BytecodeGenerator::variable):
(JSC::BytecodeGenerator::resolveType):
(JSC::BytecodeGenerator::emitResolveScope):
(JSC::BytecodeGenerator::emitPopScope):
(JSC::BytecodeGenerator::emitPopWithScope):
(JSC::BytecodeGenerator::emitDebugHook):
(JSC::BytecodeGenerator::popScopedControlFlowContext):
(JSC::BytecodeGenerator::emitPushCatchScope):
(JSC::BytecodeGenerator::emitPopCatchScope):
(JSC::BytecodeGenerator::beginSwitch):
(JSC::BytecodeGenerator::emitPopWithOrCatchScope): Deleted.
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::lastOpcodeID):
* bytecompiler/NodesCodegen.cpp:
(JSC::AssignResolveNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::TryNode::emitBytecode):
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::isCatchScope):
(JSC::DebuggerScope::isFunctionNameScope):
(JSC::DebuggerScope::isFunctionOrEvalScope):
(JSC::DebuggerScope::caughtValue):
* debugger/DebuggerScope.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::exceptionOrCaughtValue):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_push_name_scope):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_name_scope):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createTryStatement):
* parser/NodeConstructors.h:
(JSC::ThrowNode::ThrowNode):
(JSC::TryNode::TryNode):
(JSC::FunctionParameters::FunctionParameters):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseTryStatement):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createBreakStatement):
(JSC::SyntaxChecker::createContinueStatement):
(JSC::SyntaxChecker::createTryStatement):
(JSC::SyntaxChecker::createSwitchStatement):
(JSC::SyntaxChecker::createWhileStatement):
(JSC::SyntaxChecker::createWithStatement):
* runtime/JSCatchScope.cpp:
* runtime/JSCatchScope.h:
(JSC::JSCatchScope::JSCatchScope): Deleted.
(JSC::JSCatchScope::create): Deleted.
(JSC::JSCatchScope::createStructure): Deleted.
* runtime/JSFunctionNameScope.h:
(JSC::JSFunctionNameScope::JSFunctionNameScope):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::withScopeStructure):
(JSC::JSGlobalObject::strictEvalActivationStructure):
(JSC::JSGlobalObject::activationStructure):
(JSC::JSGlobalObject::functionNameScopeStructure):
(JSC::JSGlobalObject::directArgumentsStructure):
(JSC::JSGlobalObject::scopedArgumentsStructure):
(JSC::JSGlobalObject::catchScopeStructure): Deleted.
* runtime/JSNameScope.cpp:
(JSC::JSNameScope::create):
(JSC::JSNameScope::toThis):
* runtime/JSNameScope.h:
* runtime/JSObject.cpp:
(JSC::JSObject::toThis):
(JSC::JSObject::isFunctionNameScopeObject):
(JSC::JSObject::isCatchScopeObject): Deleted.
* runtime/JSObject.h:
* runtime/JSScope.cpp:
(JSC::JSScope::collectVariablesUnderTDZ):
(JSC::JSScope::isLexicalScope):
(JSC::JSScope::isCatchScope):
(JSC::resolveModeName):
* runtime/JSScope.h:
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::SymbolTable):
(JSC::SymbolTable::cloneScopePart):
* runtime/SymbolTable.h:
* tests/stress/const-semantics.js:
(.):

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

5 years agoDFG::ArgumentsEliminationPhase has a redundant check for inserting CheckInBounds...
fpizlo@apple.com [Tue, 28 Jul 2015 21:23:06 +0000 (21:23 +0000)]
DFG::ArgumentsEliminationPhase has a redundant check for inserting CheckInBounds when converting GetByVal to GetStack in the inline non-varargs case
https://bugs.webkit.org/show_bug.cgi?id=147373

Reviewed by Mark Lam.

The code was doing a check for "index >= inlineCallFrame->arguments.size() - 1" in code where
safeToGetStack is true and we aren't in varargs context, but in a non-varargs context,
safeToGetStack can only be true if "index < inlineCallFrame->arguments.size() - 1".

When converting a GetByVal to GetStack, there are three possibilities:

1) Impossible to convert. This can happen if the GetByVal is out-of-bounds of the things we
   know to have stored to the stack. For example, if we inline a function that does
   "arguments[42]" at a call that passes no arguments.

2) Possible to convert, but we cannot prove statically that the GetByVal was in bounds. This
   can happen for "arguments[42]" with no inline call frame (since we don't know statically
   how many arguments we will be passed) or in a varargs call frame.

3) Possible to convert, and we know statically that the GetByVal is in bounds. This can
   happen for "arguments[42]" if we have an inline call frame, and it's not a varargs call
   frame, and we know that the caller passed 42 or more arguments.

The way the phase handles this is it first determines that we're not in case (1). This is
called safeToGetStack. safeToGetStack is true if we have case (2) or (3). For inline call
frames that have no varargs, this means that safeToGetStack is true exactly when the GetByVal
is in-bounds (i.e. case (3)).

But the phase was again doing a check for whether the index is in-bounds for non-varargs
inline call frames even when safeToGetStack was true. That check is redundant and should be
eliminated, since it makes the code confusing.

* dfg/DFGArgumentsEliminationPhase.cpp:

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

5 years agoUnreviewed, fix wrong test baseline landed in r187489.
cdumez@apple.com [Tue, 28 Jul 2015 21:19:28 +0000 (21:19 +0000)]
Unreviewed, fix wrong test baseline landed in r187489.

* http/tests/security/same-origin-css-4-expected.txt:

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

5 years agoDFG::PutStackSinkingPhase should be more aggressive about its "no GetStack until...
fpizlo@apple.com [Tue, 28 Jul 2015 20:50:18 +0000 (20:50 +0000)]
DFG::PutStackSinkingPhase should be more aggressive about its "no GetStack until put" rule
https://bugs.webkit.org/show_bug.cgi?id=147371

Reviewed by Mark Lam.

Two fixes:

- Make ConflictingFlush really mean that you can't load from the stack slot. This means not
  using ConflictingFlush for arguments.

- Assert that a GetStack never sees ConflictingFlush.

* dfg/DFGPutStackSinkingPhase.cpp:

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

5 years agoWeb Inspector: Include <template> node content in DOM Tree
commit-queue@webkit.org [Tue, 28 Jul 2015 20:37:16 +0000 (20:37 +0000)]
Web Inspector: Include <template> node content in DOM Tree
https://bugs.webkit.org/show_bug.cgi?id=147335

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

Source/WebInspectorUI:

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._unbind):
Cleanup templateContent when DOMNodes get removed.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.templateContent):
Create a DOMNode from the payload's templateContent.

* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._singleTextChild):
(WebInspector.DOMTreeElement.prototype._hasVisibleChildren):
(WebInspector.DOMTreeElement.prototype._visibleChildren):
A DOMTreeElement has children if the DOMNode has template content.

LayoutTests:

* inspector/dom/template-content-expected.txt: Added.
* inspector/dom/template-content.html: Added.

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

5 years agoMisleading error message: "At least one digit must occur after a decimal point"
basile_clement@apple.com [Tue, 28 Jul 2015 20:20:40 +0000 (20:20 +0000)]
Misleading error message: "At least one digit must occur after a decimal point"
https://bugs.webkit.org/show_bug.cgi?id=146238

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Interestingly, we had a comment explaining what this error message was
about that is much clearer than the error message itself. This patch
simply replaces the error message with the explanation from the
comment.

* parser/Lexer.cpp:
(JSC::Lexer<T>::lex):

LayoutTests:

The expected error message in this test has changed.

* js/basic-strict-mode-expected.txt:

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

5 years agoSimplify call linking
basile_clement@apple.com [Tue, 28 Jul 2015 20:12:33 +0000 (20:12 +0000)]
Simplify call linking
https://bugs.webkit.org/show_bug.cgi?id=147363

Reviewed by Filip Pizlo.

Previously, we were passing both the CallLinkInfo and a
(CodeSpecializationKind, RegisterPreservationMode) pair to the
different call linking slow paths. However, the CallLinkInfo already
has all of that information, and we don't gain anything by having them
in additional static parameters - except possibly a very small
performance gain in presence of inlining. However since those are
already slow paths, this performance loss (if it exists) will not be
visible in practice.

This patch removes the various specialized thunks and JIT operations
for regular and polymorphic call linking with a single thunk and
operation for each case. Moreover, it removes the four specialized
virtual call thunks and operations with one virtual call thunk for each
call link info, allowing for better branch prediction by the CPU and
fixing a pre-existing FIXME.

* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::unlink):
(JSC::CallLinkInfo::dummy): Deleted.
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::CallLinkInfo):
(JSC::CallLinkInfo::registerPreservationMode):
(JSC::CallLinkInfo::setUpCallFromFTL):
(JSC::CallLinkInfo::setSlowStub):
(JSC::CallLinkInfo::clearSlowStub):
(JSC::CallLinkInfo::slowStub):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* ftl/FTLJSCallBase.cpp:
(JSC::FTL::JSCallBase::link):
* jit/JITCall.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
(JSC::operationLinkFor): Deleted.
(JSC::operationVirtualFor): Deleted.
(JSC::operationLinkPolymorphicCallFor): Deleted.
* jit/Repatch.cpp:
(JSC::generateByIdStub):
(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::revertCall):
(JSC::unlinkFor):
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):
* jit/Repatch.h:
* jit/ThunkGenerators.cpp:
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::linkForThunkGenerator): Deleted.
(JSC::linkConstructThunkGenerator): Deleted.
(JSC::linkCallThatPreservesRegsThunkGenerator): Deleted.
(JSC::linkConstructThatPreservesRegsThunkGenerator): Deleted.
(JSC::linkPolymorphicCallForThunkGenerator): Deleted.
(JSC::linkPolymorphicCallThatPreservesRegsThunkGenerator): Deleted.
(JSC::virtualForThunkGenerator): Deleted.
(JSC::virtualCallThunkGenerator): Deleted.
(JSC::virtualConstructThunkGenerator): Deleted.
(JSC::virtualCallThatPreservesRegsThunkGenerator): Deleted.
(JSC::virtualConstructThatPreservesRegsThunkGenerator): Deleted.
* jit/ThunkGenerators.h:
(JSC::linkThunkGeneratorFor): Deleted.
(JSC::linkPolymorphicCallThunkGeneratorFor): Deleted.
(JSC::virtualThunkGeneratorFor): Deleted.

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