WebKit-https.git
5 years ago[Windows] Unreviewed. Disable unnecessary warning C4309, "truncation of constant...
roger_fong@apple.com [Thu, 23 Jan 2014 22:12:08 +0000 (22:12 +0000)]
[Windows] Unreviewed. Disable unnecessary warning C4309, "truncation of constant value".

* win/tools/vsprops/common.props:

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

5 years agoDon't enable speculative tiles immediately after main load stops progressing
antti@apple.com [Thu, 23 Jan 2014 22:03:27 +0000 (22:03 +0000)]
Don't enable speculative tiles immediately after main load stops progressing
https://bugs.webkit.org/show_bug.cgi?id=127507

Reviewed by Andreas Kling.

It is common for timers and events to trigger more loading after the initial main frame loading
has completed. We should delay a bit before enabling speculative tiles and keep them disabled
if loading still continues.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::adjustTiledBackingCoverage):
(WebCore::shouldEnableSpeculativeTilingDuringLoading):
(WebCore::FrameView::enableSpeculativeTilingIfNeeded):

    When load progression stops wait 0.5s before enabling speculative tiles.

(WebCore::FrameView::speculativeTilingEnableTimerFired):

    Don't enable speculative tiles if the progression has started again. Instead restart the timer.

* page/FrameView.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::computeTileCoverage):

    Move the FrameView level code to FrameView (so we don't need to add a timer to every RenderLayerBacking).

* rendering/RenderLayerBacking.h:

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

5 years agoAdd API::PolicyClient base class
andersca@apple.com [Thu, 23 Jan 2014 22:01:23 +0000 (22:01 +0000)]
Add API::PolicyClient base class
https://bugs.webkit.org/show_bug.cgi?id=127509

Reviewed by Tim Horton.

* UIProcess/API/APIPolicyClient.h: Copied from Source/WebKit2/UIProcess/WebPolicyClient.h.
(API::PolicyClient::~PolicyClient):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient):
(-[WKBrowsingContextController setPolicyDelegate:]):
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPolicyClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::unableToImplementPolicy):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPolicyClient.cpp:
(WebKit::WebPolicyClient::WebPolicyClient):
(WebKit::WebPolicyClient::decidePolicyForNavigationAction):
(WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
(WebKit::WebPolicyClient::decidePolicyForResponse):
* UIProcess/WebPolicyClient.h:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoAdd init methods that create default configurations
andersca@apple.com [Thu, 23 Jan 2014 21:27:23 +0000 (21:27 +0000)]
Add init methods that create default configurations
https://bugs.webkit.org/show_bug.cgi?id=127503

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKProcessClass.mm:
(-[WKProcessClass init]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:]):

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

5 years agoLoads started soon after main frame completion should be considered part of the main...
antti@apple.com [Thu, 23 Jan 2014 21:20:00 +0000 (21:20 +0000)]
Loads started soon after main frame completion should be considered part of the main load
https://bugs.webkit.org/show_bug.cgi?id=127504

Reviewed by Andreas Kling.

ProgressTracker currently decides that main load is complete when the main frame stops loading.
However it is common that timers and onload events trigger more loads immediately (for example
by inserting iframes) and loading continues visually. These should be considered as part of the
main load for paint throttling and speculative tiling coverage purposes.

* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressStarted):

    Track whether this is considered part of the main load or not with a boolean.
    It is set for subframe loads too if they start loading soon (within 1s) after the main frame load completes.

(WebCore::ProgressTracker::finalProgressComplete):

    Get a timestamp.

(WebCore::ProgressTracker::isMainLoadProgressing):

    New definition of "main load".

* loader/ProgressTracker.h:

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

5 years ago[WinCairo] Compile error.
commit-queue@webkit.org [Thu, 23 Jan 2014 21:19:31 +0000 (21:19 +0000)]
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=127499

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

* platform/network/curl/ResourceError.h: Include <winsock2.h> before <curl/curl.h>.

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

5 years ago[WinCairo] Compile error.
commit-queue@webkit.org [Thu, 23 Jan 2014 21:18:06 +0000 (21:18 +0000)]
[WinCairo] Compile error.
https://bugs.webkit.org/show_bug.cgi?id=127500

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

* WebCache.cpp:
(WebCache::cacheFolder): CurlCacheManager::getCacheDirectory() has changed name to cacheDirectory().

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

5 years agoProduction build fix.
timothy@apple.com [Thu, 23 Jan 2014 20:56:09 +0000 (20:56 +0000)]
Production build fix.

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

5 years agoIDB: Implement cross-thread and IPC plumbing for 'get' support
beidson@apple.com [Thu, 23 Jan 2014 20:25:34 +0000 (20:25 +0000)]
IDB: Implement cross-thread and IPC plumbing for 'get' support
https://bugs.webkit.org/show_bug.cgi?id=127501

Reviewed by Anders Carlsson.

Source/WebCore:

Add isolatedCopy to the IDBGetResult object:
* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::isolatedCopy):

Add a cross-thread and cross-IPC appropriate object for IDBKeyRanges:
* Modules/indexeddb/IDBKeyRangeData.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
(WebCore::IDBKeyRangeData::isolatedCopy):
* Modules/indexeddb/IDBKeyRangeData.h: Copied from Source/WebCore/Modules/indexeddb/IDBGetResult.h.
(WebCore::IDBKeyRangeData::IDBKeyRangeData):

Add a few more cross-thread copiers:
* platform/CrossThreadCopier.cpp:
(WebCore::IDBGetResult>::copy):
(WebCore::IDBKeyRangeData>::copy):
* platform/CrossThreadCopier.h:

Project file gunk:
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Make the WebProcess call out to the DatabaseProcess with a get request, and handle the
response from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::get):
(WebKit::WebIDBServerConnection::didGetRecord):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Get the request from the WebProcess and forward it to the appropriate unique IDB database:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::getRecord):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Forward the request to the database thread, and response to the result from that thread:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::getRecord):
(WebKit::UniqueIDBDatabase::getRecordFromBackingStore):
(WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

IPC and asynchronous request infrastructure:
* Scripts/webkit2/messages.py:
(struct_or_class):

* Shared/AsyncTask.h:
(WebKit::createAsyncTask):

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBGetResult>::encode):
(IPC::ArgumentCoder<IDBGetResult>::decode):
(IPC::ArgumentCoder<IDBKeyRangeData>::encode):
(IPC::ArgumentCoder<IDBKeyRangeData>::decode):
* Shared/WebCoreArgumentCoders.h:

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

5 years agosvg/animations/smil-syncbase-self-dependency.svg is very flaky
ap@apple.com [Thu, 23 Jan 2014 20:12:07 +0000 (20:12 +0000)]
svg/animations/smil-syncbase-self-dependency.svg is very flaky

This is a newly landed test for <https://bugs.webkit.org/show_bug.cgi?id=108184>
that wasn't actually testing for what the bug fixed. The plan is to add a better
test soon, so deleting this one.

* svg/animations/smil-syncbase-self-dependency-expected.txt: Removed.
* svg/animations/smil-syncbase-self-dependency.svg: Removed.

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

5 years ago[MSE][Mac] Adopt new AVStreamDataParser delegate API
jer.noble@apple.com [Thu, 23 Jan 2014 19:42:17 +0000 (19:42 +0000)]
[MSE][Mac] Adopt new AVStreamDataParser delegate API
https://bugs.webkit.org/show_bug.cgi?id=127498

Reviewed by Eric Carlson.

Adopt a new delegate API which passes in whether or not the new AVAsset
is discontinuous, implying the AVAsset is entirely new rather than
just updated with new information.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):

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

5 years agoPDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
timothy_horton@apple.com [Thu, 23 Jan 2014 19:31:18 +0000 (19:31 +0000)]
PDFPlugin: Use PDFPlugin even if there's an external plugin installed, if it's blocked
https://bugs.webkit.org/show_bug.cgi?id=127415
<rdar://problem/12482452>

Reviewed by Sam Weinig.

Allow use of PDFPlugin even if an external plugin is installed but blocked.
If an external plugin is installed and not blocked, we will continue to use that.

Inject a context menu item into the PDFPlugin context menu that allows the client
to unblock the plugin and reload the page (via the same mechanism that the
unavailable plugin button uses).

* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPageLoaderClient):
* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::pluginLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add a new PluginLoadPolicy callback for the V4 client with
yet another string out-argument, to allow clients to customize the string
that will appear in the PDFPlugin context menu when it is used in place
of a blocked plugin.

* WebProcess/Plugins/PDF/PDFPlugin.h:
Add setUsedInPlaceOfBlockedPlugin(), which determines whether or not
we should include an item in the PDFPlugin context menu that acts identically
to the unavailable plugin button, allowing the client to potentially unblock
the plugin.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginContextMenuTarget initWithPDFPlugin:WebKit::]):
(-[WKPDFPluginContextMenuTarget useBlockedPlugin:]):
Added WKPDFPluginContextMenuTarget, which is the Objective-C object that the
aforementioned context menu item targets.

(WebKit::PDFPlugin::PDFPlugin):
By default, we won't show the extra context menu item.

(WebKit::PDFPlugin::handleContextMenuEvent):
If we were used in place of a blocked plugin, inject our additional context
menu item into the menu. If we were handed a custom string via setUsedInPlaceOfBlockedPlugin,
use that. Otherwise, use the generic string from WebCore's localized strings.

(WebKit::PDFPlugin::openWithPlugin):
Pretend that the user clicked the unavailable plugin button when they click
the injected context menu item.

(WebKit::PDFPlugin::setUsedInPlaceOfBlockedPlugin):

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
If we end up with a blocked plugin, but could have used PDFPlugin to display
the content, do so instead of showing the unavailable plugin indicator.

Pass PDFPlugin the custom context menu item title acquired from the client.

(WebKit::WebPage::canPluginHandleResponse):

* English.lproj/Localizable.strings:
* WebCore.exp.in:
* platform/LocalizedStrings.cpp:
(WebCore::useBlockedPlugInContextMenuTitle):
* platform/LocalizedStrings.h:
Add a localizable string for the generic case, where the client
didn't provide a more specific string for the context menu item.

Adopt the new page loader client plugin load callback.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::pluginLoadPolicy):
* WebKitTestRunner/TestController.h:

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

5 years agoUnreviewed GTK gardening.
commit-queue@webkit.org [Thu, 23 Jan 2014 19:20:33 +0000 (19:20 +0000)]
Unreviewed GTK gardening.

Remove failure/timeout expectations for the following passed tests:

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-01-23

* platform/gtk/TestExpectations:
    http/tests/navigation/redirect-to-random-url-versus-memory-cache.html

* platform/gtk-wk2/TestExpectations:
    http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html
    accessibility/multiselect-list-reports-active-option.html

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

5 years ago[iOS] [WK2] WKContentView has a black background
timothy_horton@apple.com [Thu, 23 Jan 2014 18:52:01 +0000 (18:52 +0000)]
[iOS] [WK2] WKContentView has a black background
https://bugs.webkit.org/show_bug.cgi?id=127471
<rdar://problem/12287363>

Reviewed by Sam Weinig.

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.

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

5 years ago[Win] Mark test mathml/presentation/maction-toggle.html as failing in TestExpectation
dbates@webkit.org [Thu, 23 Jan 2014 18:48:05 +0000 (18:48 +0000)]
[Win] Mark test mathml/presentation/maction-toggle.html as failing in TestExpectation

For now, mark the test mathml/presentation/maction-toggle.html as failing. See
<https://bugs.webkit.org/show_bug.cgi?id=127495> for more details.

* platform/win/TestExpectations:

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

5 years ago[Curl] There is no way to specify cache folder.
commit-queue@webkit.org [Thu, 23 Jan 2014 18:20:38 +0000 (18:20 +0000)]
[Curl] There is no way to specify cache folder.
https://bugs.webkit.org/show_bug.cgi?id=125028

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-23
Reviewed by Brent Fulgham.

Source/WebCore:

Fixed logical test, disc cache should be disabled if creating cache folder fails.

* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::setCacheDirectory):

Source/WebKit/win:

Added interface methods to set and get cache folder location.

* Interfaces/IWebCache.idl:
* WebCache.cpp:
(WebCache::disabled):
(WebCache::cacheFolder):
(WebCache::setCacheFolder):
* WebCache.h:

Tools:

Enable disc cache in WinLauncher by setting cache folder location.

* WinLauncher/WinLauncher.cpp:
(getAppDataFolder): Added function to get app data folder.
(setCacheFolder): Added function to set cache folder.
(createCrashReport): Use new getAppDataFolder function.
(wWinMain): Use function setCacheFolder to set cache folder location.

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

5 years agoUnreviewed build fix.
beidson@apple.com [Thu, 23 Jan 2014 18:15:55 +0000 (18:15 +0000)]
Unreviewed build fix.

* WebCore.xcodeproj/project.pbxproj: Export the new header so WebKit can see it

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

5 years ago../JavaScriptCore: [Win] Update project and solution files for 64-bit builds.
bfulgham@apple.com [Thu, 23 Jan 2014 18:14:00 +0000 (18:14 +0000)]
../JavaScriptCore: [Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Add 64-bit target.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Update for VS2013
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Add missing
file from project view.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Update for VS2013
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Ditto
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Ditto

../WebCore: [Win] Update project and solution files for 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Update for VS2013
* WebCore.vcxproj/WebCore.submit.sln: Add x64 targets
* WebCore.vcxproj/WebCore.vcxproj: Update for VS2013. Also exclude 32-bit specific
assembly when building 64-bit target.
* WebCore.vcxproj/WebCore.vcxproj.filters: Update for VS2013
* config.h: Handle 64-bit type definitions.
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimation::setFromValue): Use CGFloat to support 64-bit builds
(PlatformCAAnimation::setToValue): Ditto
(PlatformCAAnimation::setValues): Ditto
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Add cast to
support 32- and 64-bit targets.
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker): Use CGFloat to
support 64-bit builds.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Specialize std::min to
work on 32- and 64-bit code.
(WebCore::createGlobalImageFileDescriptor): Ditto
* platform/win/StructuredExceptionHandlerSuppressor.cpp:
(WebCore::StructuredExceptionHandlerSuppressor::StructuredExceptionHandlerSuppressor):
Comment out 32-bit inline assembly.
(WebCore::StructuredExceptionHandlerSuppressor::~StructuredExceptionHandlerSuppressor):
Ditto

../WebKit: [Win] Update project and solution files for 64-bit builds
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Update for VS2013.
* WebKit.vcxproj/WebKit.submit.sln: Add 64-bit target.
* WebKit.vcxproj/WebKit/WebKit.vcxproj: Update for VS2013
* WebKit.vcxproj/WebKit/WebKitApple.props: Remove unused QTMovieWin
library dependency.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExportGenerator.vcxproj:
Update for VS2013.
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj: Ditto

../WTF: [Win] Update project and solution files for 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=127457

Reviewed by Eric Carlson.

* WTF.vcxproj/WTF.submit.sln: Add x64 targets.
* WTF.vcxproj/WTF.vcxproj: Update for VS2013

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

5 years ago[Win] Mark test js/dom/date-big-constructor.html as failing and add Windows expected...
dbates@webkit.org [Thu, 23 Jan 2014 18:07:21 +0000 (18:07 +0000)]
[Win] Mark test js/dom/date-big-constructor.html as failing and add Windows expected result

Mark the test js/dom/date-big-constructor.html as failing while we investigate
regression in <https://bugs.webkit.org/show_bug.cgi?id=127492>. Also add Windows expected
result for test fast/css/relative-position-replaced-in-table-display-crash.html as the test
passes but differs in whitespace. We'll investigate this whitespace difference in
<https://bugs.webkit.org/show_bug.cgi?id=127479>.

* platform/win/TestExpectations:
* platform/win/fast/css/relative-position-replaced-in-table-display-crash-expected.txt: Added.

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

5 years agoMake IDBGetResult work with IDBKeyData instead of IDBKey.
beidson@apple.com [Thu, 23 Jan 2014 18:03:19 +0000 (18:03 +0000)]
Make IDBGetResult work with IDBKeyData instead of IDBKey.
https://bugs.webkit.org/show_bug.cgi?id=127493

Reviewed by Eric Carlson.

Also break it into its own header to work better with IPC messages.

* Modules/indexeddb/IDBGetResult.h: Added.
(WebCore::IDBGetResult::IDBGetResult):

* Modules/indexeddb/IDBServerConnection.h:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform):

* WebCore.xcodeproj/project.pbxproj:

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

5 years ago[curl] Add storage limit to cache manager
commit-queue@webkit.org [Thu, 23 Jan 2014 17:53:14 +0000 (17:53 +0000)]
[curl] Add storage limit to cache manager
https://bugs.webkit.org/show_bug.cgi?id=125779

Patch by Mátyás Mustoha <mmatyas@inf.u-szeged.hu> on 2014-01-23
Reviewed by Brent Fulgham.

Sets a local disc storage size limit for the cache manager
used by the curl network backend.

* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::CurlCacheEntry):
(WebCore::CurlCacheEntry::isCached):
(WebCore::CurlCacheEntry::saveCachedData):
(WebCore::CurlCacheEntry::readCachedData):
(WebCore::CurlCacheEntry::didFail):
(WebCore::CurlCacheEntry::didFinishLoading):
(WebCore::CurlCacheEntry::loadFileToBuffer):
(WebCore::CurlCacheEntry::parseResponseHeaders):
(WebCore::CurlCacheEntry::entrySize):
* platform/network/curl/CurlCacheEntry.h:
(WebCore::CurlCacheEntry::requestHeaders):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::CurlCacheManager):
(WebCore::CurlCacheManager::setStorageSizeLimit):
(WebCore::CurlCacheManager::loadIndex):
(WebCore::CurlCacheManager::saveIndex):
(WebCore::CurlCacheManager::makeRoomForNewEntry):
(WebCore::CurlCacheManager::didReceiveResponse):
(WebCore::CurlCacheManager::didReceiveData):
(WebCore::CurlCacheManager::invalidateCacheEntry):
(WebCore::CurlCacheManager::readCachedData):
* platform/network/curl/CurlCacheManager.h:
(WebCore::CurlCacheManager::cacheDirectory):

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

5 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Thu, 23 Jan 2014 17:33:18 +0000 (17:33 +0000)]
Unreviewed EFL gardening

Add test expectations for failing tests.

* platform/efl/TestExpectations:

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

5 years agobuild-webkit --sdk=iphonesimulator doesn't think it's building iOS
dbates@webkit.org [Thu, 23 Jan 2014 17:25:31 +0000 (17:25 +0000)]
build-webkit --sdk=iphonesimulator doesn't think it's building iOS
https://bugs.webkit.org/show_bug.cgi?id=127379

Reviewed by Simon Fraser.

Teach build-webkit to recognize --sdk=X.

Currently, build-webkit recognizes --sdk X to specify X as the Xcode SDK to use, which is also
considered when determining the WebKit port to build. But build-webkit advertises --sdk=X in its
help message. We should teach build-webkit to recognize both --sdk X and --sdk=X to make its handling
of --sdk more consistent with the handling of other build-webkit options that take a value (e.g. --prefix).

* Scripts/webkitdirs.pm:
(checkForArgumentAndRemoveFromArrayRefGettingValue): Added.
(checkForArgumentAndRemoveFromARGVGettingValue): Modified to call checkForArgumentAndRemoveFromArrayRefGettingValue().
* Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRefGettingValue.pl: Added.

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

5 years ago[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html
dbates@webkit.org [Thu, 23 Jan 2014 17:23:47 +0000 (17:23 +0000)]
[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html

The expected result for the test test svg/W3C-SVG-1.1/paths-data-03-f.html on Windows
shows a progression towards matching the Mac expected result. Currently, there are many
numerical differences between the expected results for these platforms, described within
three diff chunks. After this commit there will be a single numerical difference (described
in one diff chunk) between the Mac and Windows results. See <https://bugs.webkit.org/show_bug.cgi?id=127490>
for more details.

* platform/win/svg/W3C-SVG-1.1/paths-data-03-f-expected.txt:

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

5 years ago[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html
dbates@webkit.org [Thu, 23 Jan 2014 17:21:28 +0000 (17:21 +0000)]
[Win] Update expected result for test svg/W3C-SVG-1.1/paths-data-03-f.html

The expected result for the test test svg/W3C-SVG-1.1/paths-data-03-f.html on Windows
shows a progression towards matching the Mac expected result. Currently, there are many
numerical differences between the expected results for these platforms, described within
three diff chunks. After this commit there will be a single numerical difference (described
in one diff chunk) between the Mac and Windows results. See <https://bugs.webkit.org/show_bug.cgi?id=127490>
for more details.

* platform/win/svg/W3C-SVG-1.1/paths-data-03-f-expected.txt:

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

5 years agoUnreviewed, rolling out r162612.
commit-queue@webkit.org [Thu, 23 Jan 2014 17:19:02 +0000 (17:19 +0000)]
Unreviewed, rolling out r162612.
http://trac.webkit.org/changeset/162612
https://bugs.webkit.org/show_bug.cgi?id=127488

broke the build (Requested by mhahnenberg on #webkit).

* Scripts/build-jsc:
* jsc-cli/jsc-cli.xcodeproj/project.pbxproj: Removed.
* jsc-cli/jsc-cli/CLIInstance.h: Removed.
* jsc-cli/jsc-cli/CLIInstance.m: Removed.
* jsc-cli/jsc-cli/JSModule.h: Removed.
* jsc-cli/jsc-cli/JSModule.m: Removed.
* jsc-cli/jsc-cli/JSRunLoopThread.h: Removed.
* jsc-cli/jsc-cli/JSRunLoopThread.m: Removed.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.h: Removed.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.m: Removed.
* jsc-cli/jsc-cli/RunLoopThread.h: Removed.
* jsc-cli/jsc-cli/RunLoopThread.m: Removed.
* jsc-cli/jsc-cli/ScriptInputSource.h: Removed.
* jsc-cli/jsc-cli/ScriptInputSource.m: Removed.
* jsc-cli/jsc-cli/main.m: Removed.

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

5 years agoBasic framework for a modern jsc CLI
mhahnenberg@apple.com [Thu, 23 Jan 2014 17:09:00 +0000 (17:09 +0000)]
Basic framework for a modern jsc CLI
https://bugs.webkit.org/show_bug.cgi?id=127435

Reviewed by Geoffrey Garen.

The most basic components of a modern jsc command line interface consist of the following:

- A simple REPL to enter commands and receive results
- The ability to define a module (which consists of various internal methods as well as a
  set of externally visible methods)
- The ability to load other modules at runtime
- The ability to interact with the underlying platform to perform various "privileged"
  functions (e.g. opening files, printing to the stdout, etc.)

The basic architecture will look something like the following:
- If the tool is run in REPL mode (i.e. no command line arguments), it will start the REPL
  on the main thread and start a secondary thread with a run loop to handle various inputs
  from the REPL thread.
- If the tool is given a script to run, it will evaluate that script (and any scripts that
  it might transitively load) within the run loop on the secondary thread while the main
  thread blocks until it has completed.

* Scripts/build-jsc:
* jsc-cli: Added.
* jsc-cli/jsc-cli: Added.
* jsc-cli/jsc-cli.xcodeproj: Added.
* jsc-cli/jsc-cli.xcodeproj/project.pbxproj: Added.
* jsc-cli/jsc-cli/CLIInstance.h: Added.
* jsc-cli/jsc-cli/CLIInstance.m: Added.
(-[CLIInstance init]):
(-[CLIInstance loadFile:]):
(-[CLIInstance run]):
* jsc-cli/jsc-cli/JSModule.h: Added.
* jsc-cli/jsc-cli/JSModule.m: Added.
(coreModules):
(isCoreModule):
(classForModule):
(coreModuleFullPath):
(resolveModuleAsFile):
(resolveModuleAsDirectory):
(nodeModulePaths):
(resolveAsNodeModule):
(+[JSModule resolve:atPath:]):
(globalModuleCache):
(isCached):
(cachedModule):
(cacheModule):
(+[JSModule require:atPath:]):
(+[JSModule require:atPath:inContext:]):
(-[JSModule platformObjectInContext:]):
(-[JSModule initWithId:filename:context:]):
(-[JSModule dealloc]):
(-[JSModule didStartLoading]):
(-[JSModule didFinishLoading]):
(-[JSModule require:]):
(-[JSModule exports]):
* jsc-cli/jsc-cli/JSRunLoopThread.h: Added.
* jsc-cli/jsc-cli/JSRunLoopThread.m: Added.
(jsThreadMain):
(+[JSRunLoopThread threadMain]):
(-[JSRunLoopThread initWithFiles:andContext:]):
(-[JSRunLoopThread startRunLoop]):
(-[JSRunLoopThread start]):
(-[JSRunLoopThread join]):
(-[JSRunLoopThread didReceiveInput:]):
(-[JSRunLoopThread performCallback:withError:]):
(-[JSRunLoopThread performCallback:withArguments:]):
(-[JSRunLoopThread didFinishRunLoopInitialization]):
* jsc-cli/jsc-cli/ReadEvalPrintLoop.h: Added.
* jsc-cli/jsc-cli/ReadEvalPrintLoop.m: Added.
(-[ReadEvalPrintLoop initWithJSThread:]):
(prompt):
(escapeStringForOutput):
(-[ReadEvalPrintLoop processNextInput]):
(-[ReadEvalPrintLoop run]):
* jsc-cli/jsc-cli/RunLoopThread.h: Added.
* jsc-cli/jsc-cli/RunLoopThread.m: Added.
(+[RunLoopThread threadMain]):
(-[RunLoopThread init]):
(-[RunLoopThread dealloc]):
(-[RunLoopThread didFinishRunLoopInitialization]):
(-[RunLoopThread start]):
(-[RunLoopThread join]):
* jsc-cli/jsc-cli/ScriptInputSource.h: Added.
* jsc-cli/jsc-cli/ScriptInputSource.m: Added.
(scriptInputSourceScheduleRoutine):
(scriptInputSourcePerformRoutine):
(scriptInputSourceCancelRoutine):
(-[ScriptInputSource initWithContext:]):
(-[ScriptInputSource dealloc]):
(-[ScriptInputSource addToCurrentRunLoop]):
(-[ScriptInputSource removeFromRemoteRunLoop]):
(-[ScriptInputSource didReceiveScript:]):
(-[ScriptInputSource didReceiveSignal]):
(-[ScriptInputSource runScriptRemotely:]):
(-[ScriptInputSource finishAsyncCallback:withResult:]):
* jsc-cli/jsc-cli/main.m: Added.
(main):

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

5 years ago[EFL] Unreviewed gardening
ossy@webkit.org [Thu, 23 Jan 2014 17:05:16 +0000 (17:05 +0000)]
[EFL] Unreviewed gardening

* platform/efl-wk2/TestExpectations: Skip failing tests only on WK2.
* platform/efl/TestExpectations: Unskip now passing tests on WK1.

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

5 years agoUnreviewed. Fix automake warning.
carlosgc@webkit.org [Thu, 23 Jan 2014 16:42:36 +0000 (16:42 +0000)]
Unreviewed. Fix automake warning.

* GNUmakefile.list.am: Remove trailing whitespaces.

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

5 years ago[Win] Remove Windows-specific result for test fast/css-generated-content/table-row...
dbates@webkit.org [Thu, 23 Jan 2014 16:04:35 +0000 (16:04 +0000)]
[Win] Remove Windows-specific result for test fast/css-generated-content/table-row-group-to-inline.html

As of the time of writing, the Windows expected results for test fast/css-generated-content/table-row-group-to-inline.html
are identical to the results on Mac.

* platform/win/fast/css-generated-content/table-row-group-to-inline-expected.txt: Removed.

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

5 years ago[EFL] Updated test expectations for failing tests
commit-queue@webkit.org [Thu, 23 Jan 2014 16:01:59 +0000 (16:01 +0000)]
[EFL] Updated test expectations for failing tests
https://bugs.webkit.org/show_bug.cgi?id=127478

Unreviewed EFL gardening

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2014-01-23

* platform/efl/TestExpectations:
* platform/efl/css2.1/t1604-c542-letter-sp-00-b-a-expected.png:
Removed incorrect test expectation for css2.1/t1604-c542-letter-sp-00-b-a.html
* platform/efl/css2.1/t1604-c542-letter-sp-00-b-a-expected.txt:
Ditto.

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

5 years ago[Win] Whitespace differences in test results for fast/{css, dom, forms, multicolor...
dbates@webkit.org [Thu, 23 Jan 2014 15:50:12 +0000 (15:50 +0000)]
[Win] Whitespace differences in test results for fast/{css, dom, forms, multicolor, ruinin}
https://bugs.webkit.org/show_bug.cgi?id=127479

Add Windows-specific expected results for some tests that PASS, but differ in whitespace
in their output. We should further investigate such whitespace differences.

* platform/win/fast/css/first-letter-block-form-controls-crash-expected.txt: Added.
* platform/win/fast/dom/adopt-node-crash-2-expected.txt: Added.
* platform/win/fast/forms/access-key-for-all-elements-expected.txt: Added.
* platform/win/fast/forms/form-associated-element-crash3-expected.txt: Added.
* platform/win/fast/multicol/renderer-positioned-assert-crash-expected.txt: Added.
* platform/win/fast/runin/nonblock-runin-expected.txt: Added.

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

5 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Thu, 23 Jan 2014 14:57:54 +0000 (14:57 +0000)]
Unreviewed EFL gardening

Update test expectations for failing or crashing http/tests/websocket/tests/hybi tests.

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

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

5 years ago[CSS Regions] Fix positioning composited layers when the region has overflow:hidden
commit-queue@webkit.org [Thu, 23 Jan 2014 14:19:54 +0000 (14:19 +0000)]
[CSS Regions] Fix positioning composited layers when the region has overflow:hidden
https://bugs.webkit.org/show_bug.cgi?id=124042

Patch by Mihai Maerean <mmaerean@adobe.com> on 2014-01-23
Reviewed by Mihnea Ovidenie.

Source/WebCore:

If there's a clipping GraphicsLayer on the hierarchy, substract its offset, since it's its
parent that positions us.

Tests: compositing/regions/position-layer-inside-region-overflow-hidden.html
       compositing/regions/position-layer-inside-overflow-hidden.html
       compositing/regions/position-layers-inside-region-overflow-hidden.html
       compositing/regions/position-layers-inside-regions-overflow-hidden.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread): The position
must also be correct when the region has box-shadow that inflates the region's layer. The
composited layers from the flow thread should be rendered in the same position whether the
associated region has clipping or not.
Using the position of the clipping layer instead of the location of the clipbox makes it
also work with box-shadow that inflates the region's graphics layer.

LayoutTests:

* compositing/regions/position-layer-inside-region-overflow-hidden.html: Added.
* compositing/regions/position-layer-inside-region-overflow-hidden-expected.html: Added.
* compositing/regions/position-layer-inside-overflow-hidden.html: Added.
* compositing/regions/position-layer-inside-overflow-hidden-expected.html: Added.
* compositing/regions/position-layers-inside-region-overflow-hidden.html: Added.
* compositing/regions/position-layers-inside-region-overflow-hidden-expected.html: Added.
* compositing/regions/position-layers-inside-regions-overflow-hidden.html: Added.
* compositing/regions/position-layers-inside-regions-overflow-hidden-expected.html: Added.

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

5 years agoUnreviewed gardening.
ossy@webkit.org [Thu, 23 Jan 2014 12:38:39 +0000 (12:38 +0000)]
Unreviewed gardening.

Move fast/harness/sample-fail-mismatch-reftest.html to the platform
independent TestExpectations, since all ports skip it as expected.

* TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

5 years agoRemove a FIXME comment that is already fixed.
commit-queue@webkit.org [Thu, 23 Jan 2014 10:46:17 +0000 (10:46 +0000)]
Remove a FIXME comment that is already fixed.
https://bugs.webkit.org/show_bug.cgi?id=127468

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-01-23
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/style/filereader.py:
(TextFileReader.__init__):

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

5 years ago[CSS Regions] Convert regions iterator loops to range-based loops
abucur@adobe.com [Thu, 23 Jan 2014 10:02:11 +0000 (10:02 +0000)]
[CSS Regions] Convert regions iterator loops to range-based loops
https://bugs.webkit.org/show_bug.cgi?id=127464

Reviewed by Antti Koivisto.

Replace most of the iterator loops in the region implementation with
range based for loops. The for loops that iterate only over subsets
of collections have not been changed.

Tests: no new tests, this is a refactoring patch.

* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::getRegionsByContent):
(WebCore::WebKitNamedFlow::getRegions):
(WebCore::WebKitNamedFlow::getContent):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForCSSRegionsHighlight):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::repaintRectangleInRegions):
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::collectLayerFragments):
(WebCore::RenderFlowThread::fragmentsBoundingBox):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::clearContentElements):
(WebCore::RenderNamedFlowThread::nextRendererForNode):
(WebCore::RenderNamedFlowThread::dependsOn):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
(WebCore::RenderNamedFlowThread::checkInvalidRegions):
(WebCore::RenderNamedFlowThread::pushDependencies):
(WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
(WebCore::isContainedInElements):
(WebCore::RenderNamedFlowThread::getRanges):
(WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
(WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList):

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

5 years agoRange should be constructable.
commit-queue@webkit.org [Thu, 23 Jan 2014 08:36:56 +0000 (08:36 +0000)]
Range should be constructable.
https://bugs.webkit.org/show_bug.cgi?id=115639

Patch by László Langó <llango.u-szeged@partner.samsung.com> on 2014-01-23
Reviewed by Ryosuke Niwa.

Source/WebCore:

http://www.w3.org/TR/2013/WD-dom-20131107/#interface-range
Now we can do `new Range()` instead of `document.createRange()`.

Blink: https://chromium.googlesource.com/chromium/blink/+/47ca40efdf58a4787aa33aa75a35778899b1c002%5E%21
Test: fast/dom/Range/range-constructor.html

* dom/Range.cpp:
(WebCore::Range::create):
* dom/Range.h:
* dom/Range.idl:

LayoutTests:

* fast/dom/Range/range-constructor-expected.txt: Added.
* fast/dom/Range/range-constructor.html: Added.
* fast/dom/dom-constructors-expected.txt:
* fast/dom/dom-constructors.html:

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

5 years agoUnreviewed build fix for gles after r162565. Add missing definitions.
changseok.oh@collabora.com [Thu, 23 Jan 2014 08:10:47 +0000 (08:10 +0000)]
Unreviewed build fix for gles after r162565. Add missing definitions.

* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::drawArraysInstanced):
(WebCore::GraphicsContext3D::drawElementsInstanced):
(WebCore::GraphicsContext3D::vertexAttribDivisor):

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

5 years ago[GLIB] Use GUniquePtr instead of GOwnPtr
carlosgc@webkit.org [Thu, 23 Jan 2014 07:53:48 +0000 (07:53 +0000)]
[GLIB] Use GUniquePtr instead of GOwnPtr
https://bugs.webkit.org/show_bug.cgi?id=127431

Reviewed by Martin Robinson.

GUniquePtr is a template alias of std::unique_ptr with a custom
deleter that replaces GOwnPtr. GOwnPtr is still used for the cases
where the output pointer is needed, but it will also be replaced soon.

Source/WebCore:

* GNUmakefile.list.am:
* PlatformGTK.cmake:
* accessibility/atk/AXObjectCacheAtk.cpp:
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
(accessibilityObjectLength):
(textExtents):
(webkitAccessibleTextGetChar):
(numberOfReplacedElementsBeforeOffset):
* page/ContextMenuController.cpp:
* platform/SharedBuffer.h:
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcConstructed):
(webKitWebAudioSrcLoop):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/geoclue/GeolocationProviderGeoclue.cpp:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
(webKitMediaSrcAddSrc):
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
(ResourceHandleStreamingClient::wasBlocked):
(ResourceHandleStreamingClient::cannotShowURL):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::getThemeIconFileName):
(WebCore::Image::loadPlatformResource):
* platform/gtk/ContextMenuGtk.cpp:
(WebCore::ContextMenu::itemCount):
(WebCore::contextMenuItemVector):
* platform/gtk/ContextMenuItemGtk.cpp:
(WebCore::createPlatformMenuItemDescription):
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::setURIList):
(WebCore::DataObjectGtk::setURL):
* platform/gtk/FileSystemGtk.cpp:
(WebCore::filenameToString):
(WebCore::fileSystemRepresentation):
(WebCore::filenameForDisplay):
(WebCore::pathGetFileName):
(WebCore::applicationDirectoryPath):
(WebCore::sharedResourcesPath):
(WebCore::directoryName):
(WebCore::listDirectory):
(WebCore::openTemporaryFile):
* platform/gtk/GOwnPtrGtk.cpp: Removed.
* platform/gtk/GOwnPtrGtk.h: Removed.
* platform/gtk/GUniquePtrGtk.h: Added.
* platform/gtk/GamepadsGtk.cpp:
(WebCore::GamepadsGtk::GamepadsGtk):
* platform/gtk/GtkClickCounter.cpp:
(WebCore::GtkClickCounter::shouldProcessButtonEvent):
* platform/gtk/GtkInputMethodFilter.cpp:
(WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
* platform/gtk/GtkPopupMenu.cpp:
(WebCore::GtkPopupMenu::popUp):
(WebCore::GtkPopupMenu::typeAheadFind):
* platform/gtk/LanguageGtk.cpp:
(WebCore::platformLanguage):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::imageTitle):
(WebCore::localizedMediaTimeDescription):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::selectionDataToUTF8String):
(WebCore::PasteboardHelper::getClipboardContents):
(WebCore::PasteboardHelper::fillSelectionData):
* platform/gtk/PopupMenuGtk.cpp:
(WebCore::PopupMenuGtk::createGtkActionForMenuItem):
(WebCore::PopupMenuGtk::show):
* platform/gtk/WebKitAuthenticationWidget.cpp:
(webkitAuthenticationWidgetInitialize):
* platform/network/ResourceHandleInternal.h:
* platform/network/gtk/CredentialBackingStore.cpp:
(WebCore::credentialForChallengeAsyncReadyCallback):
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* platform/network/soup/DNSSoup.cpp:
* platform/network/soup/GUniquePtrSoup.h: Added.
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::failingURI):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer):
(WebCore::cleanupSoupRequestOperation):
(WebCore::createSoupRequestAndMessageForHandle):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessageMembers):
(WebCore::ResourceRequest::updateSoupMessage):
* platform/network/soup/ResourceResponseSoup.cpp:
* platform/network/soup/SoupURIUtils.cpp:
(WebCore::soupURIToKURL):
* platform/soup/SharedBufferSoup.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::clearPlatformData):
(WebCore::SharedBuffer::maybeTransferPlatformData):
(WebCore::SharedBuffer::hasPlatformData):
* plugins/gtk/PluginPackageGtk.cpp:
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):

Source/WebKit/gtk:

* WebCoreSupport/ContextMenuClientGtk.cpp:
(WebKit::getUnicodeMenuItemPosition):
* WebCoreSupport/DragClientGtk.cpp:
(WebKit::DragClient::startDrag):
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setValueForUser):
* WebCoreSupport/EditorClientGtk.h:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::userAgent):
(WebKit::FrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
(WebKit::FrameLoaderClient::dispatchWillSendRequest):
(WebKit::FrameLoaderClient::assignIdentifierToInitialRequest):
(WebKit::FrameLoaderClient::dispatchDidReceiveResponse):
(WebKit::FrameLoaderClient::dispatchDidReceiveContentLength):
(WebKit::FrameLoaderClient::dispatchDidFinishLoading):
(WebKit::FrameLoaderClient::dispatchDidFailLoading):
(WebKit::FrameLoaderClient::dispatchDidFailLoad):
* WebCoreSupport/InspectorClientGtk.h:
* webkit/webkitfavicondatabase.cpp:
(webkit_favicon_database_set_path):
* webkit/webkitfilechooserrequest.cpp:
* webkit/webkitglobals.cpp:
(webkitInit):
* webkit/webkithittestresult.cpp:
(WebKit::kit):
* webkit/webkiticondatabase.cpp:
(webkit_icon_database_set_path):
* webkit/webkitspellcheckerenchant.cpp:
* webkit/webkitwebplugin.cpp:
(webkit_web_plugin_get_path):
* webkit/webkitwebpluginprivate.h:
* webkit/webkitwebsettings.cpp:
(webkit_web_settings_class_init):
(webkit_web_settings_copy):
* webkit/webkitwebview.cpp:
(webkit_web_view_forward_context_menu_event):
(fileChooserDialogResponseCallback):
(webkit_web_view_drag_end):
* webkit/webkitwebviewprivate.h:

Source/WebKit2:

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse):
* Shared/NativeWebKeyboardEvent.h:
* Shared/NativeWebMouseEvent.h:
* Shared/NativeWebWheelEvent.h:
* Shared/gtk/ArgumentCodersGtk.cpp:
(IPC::encodeGKeyFile):
(IPC::decodeGKeyFile):
(IPC::encode):
(IPC::decode):
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemSetSubMenuFromGtkMenu):
* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadDecideDestination):
(webkitDownloadNotifyProgress):
(webkitDownloadFailed):
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_select_files):
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle):
(getInjectedBundleInitializationUserData):
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(drawPagesForPrintingCompleted):
* UIProcess/API/gtk/WebKitURIRequest.cpp:
(webkit_uri_request_get_http_headers):
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkit_uri_scheme_request_get_scheme):
(webkit_uri_scheme_request_get_path):
* UIProcess/API/gtk/WebKitWebContext.cpp:
(injectedBundleFilename):
(webkit_web_context_set_favicon_database_directory):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewLoadFail):
(webkitWebViewCreateJavaScriptDialog):
(fileChooserDialogResponseCallback):
(webkitWebViewLoadChanged):
(webkitWebViewLoadFailedWithTLSErrors):
(webkitWebViewPopulateContextMenu):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseButtonPressEvent):
(webkitWebViewBaseStartDrag):
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
* UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
(WebKit::connectionCallback):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
(WebKit::WebContext::platformDefaultDatabaseDirectory):
(WebKit::WebContext::platformDefaultIconDatabasePath):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::contextMenuItemVisibilityChanged):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::createGtkActionForMenuItem):
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):

Tools:

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(printAccessibilityEvent):
(axObjectEventListener):
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(indexRangeInTable):
(AccessibilityUIElement::role):
(AccessibilityUIElement::title):
(AccessibilityUIElement::description):
(AccessibilityUIElement::stringValue):
(AccessibilityUIElement::language):
(AccessibilityUIElement::lineForIndex):
(AccessibilityUIElement::selectedTextRange):
(AccessibilityUIElement::url):
* DumpRenderTree/efl/AccessibilityControllerEfl.cpp:
(AccessibilityController::accessibleElementById):
* DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
(AccessibilityController::accessibleElementById):
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(getOutputDir):
(getFontsPath):
(initializeFonts):
(dumpFramesAsText):
(compareHistoryItems):
(dumpHistoryItem):
(soupURIToStringPreservingPassword):
(resetDefaultsToConsistentValues):
(temporaryDatabaseDirectory):
(webViewTitleChanged):
(webFrameLoadStatusNotified):
(pathFromSoupURI):
(convertWebResourceToURLPath):
(urlSuitableForTestResult):
(descriptionSuitableForTestResult):
(willSendRequestCallback):
(frameLoadEventCallback):
* DumpRenderTree/gtk/EditingCallbacks.cpp:
(dumpNodePath):
(dumpRange):
(shouldApplyStyle):
* DumpRenderTree/gtk/EventSender.cpp:
(contextClickCallback):
(beginDragWithFilesCallback):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::pathToLocalResource):
(TestRunner::queueLoad):
(TestRunner::removeOriginAccessWhitelistEntry):
(TestRunner::setMockGeolocationPositionUnavailableError):
(TestRunner::setIconDatabaseEnabled):
(TestRunner::findString):
(TestRunner::setDomainRelaxationForbiddenForURLScheme):
(TestRunner::overridePreference):
(TestRunner::addUserScript):
(TestRunner::addUserStyleSheet):
(TestRunner::setTextDirection):
* DumpRenderTree/gtk/TextInputController.cpp:
(setMarkedTextCallback):
(insertTextCallback):
(doCommandCallback):
* DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
(LoadHTMLStringItem::invoke):
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2Gtk/DOMNodeTest.cpp:
(WebKitDOMNodeTest::testTagNames):
* TestWebKitAPI/Tests/WebKit2Gtk/TestBackForwardList.cpp:
(testBackForwardListLimitAndCache):
* TestWebKitAPI/Tests/WebKit2Gtk/TestContextMenu.cpp:
(testContextMenuSmartSeparators):
* TestWebKitAPI/Tests/WebKit2Gtk/TestCookieManager.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(testDownloadLocalFile):
(testDownloadLocalFileError):
(addContentDispositionHTTPHeaderToResponse):
(serverCallback):
(testDownloadRemoteFileError):
* TestWebKitAPI/Tests/WebKit2Gtk/TestInspectorServer.cpp:
(startTestServer):
(testInspectorServerPageList):
(openRemoteDebuggingSession):
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
(testPrintOperationPrint):
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(addCacheHTTPHeadersToResponse):
(serverCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(httpsServerCallback):
(httpServerCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewJavaScriptDialogs):
(testWebViewWindowProperties):
(testWebViewFileChooserRequest):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebExtensions.cpp:
(testWebExtensionWindowObjectCleared):
(testWebExtensionIsolatedWorld):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitAccessibility.cpp:
(startTestServer):
(checkAtspiAccessible):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:
(serverCallback):
(testClearDatabase):
(testGetFaviconURI):
(webkitFaviconDatabaseFinalizedCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextGetPlugins):
(testWebContextURIScheme):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
(testWebViewMode):
(testWebViewPageVisibility):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebViewGroup.cpp:
(isStyleSheetInjectedForURLAtPath):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebViewEditor.cpp:
(testWebViewEditorCutCopyPasteNonEditable):
(testWebViewEditorCutCopyPasteEditable):
(testWebViewEditorSelectAllNonEditable):
(testWebViewEditorSelectAllEditable):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(sendRequestCallback):
(methodCallCallback):
* TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
* TestWebKitAPI/gtk/PlatformWebViewGtk.cpp:
(TestWebKitAPI::doKeyStroke):
(TestWebKitAPI::doMouseButtonEvent):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
(loadFailedCallback):
(LoadTrackingTest::loadURI):
(LoadTrackingTest::loadHtml):
(LoadTrackingTest::loadPlainText):
(LoadTrackingTest::loadRequest):
(LoadTrackingTest::reload):
(LoadTrackingTest::goBack):
(LoadTrackingTest::goForward):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.h:
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.cpp:
(registerGResource):
(removeNonEmptyDirectory):
(main):
* TestWebKitAPI/gtk/WebKit2Gtk/TestMain.h:
(Test::getWebKit1TestResoucesDir):
(Test::getResourcesDir):
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestBus.cpp:
(WebKitTestBus::run):
* TestWebKitAPI/gtk/WebKit2Gtk/WebKitTestServer.cpp:
(WebKitTestServer::WebKitTestServer):
(WebKitTestServer::getURIForPath):
* TestWebKitAPI/gtk/WebKit2Gtk/WebProcessTestRunner.cpp:
(WebProcessTestRunner::runTest):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.cpp:
(resourceGetDataCallback):
(WebViewTest::mainResourceData):
(WebViewTest::mouseMoveTo):
(WebViewTest::keyStroke):
(WebViewTest::doMouseButtonEvent):
* TestWebKitAPI/gtk/WebKit2Gtk/WebViewTest.h:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::accessibleElementById):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::role):
(WTR::AccessibilityUIElement::title):
(WTR::AccessibilityUIElement::description):
(WTR::AccessibilityUIElement::stringValue):
(WTR::AccessibilityUIElement::language):
(WTR::AccessibilityUIElement::lineForIndex):
(WTR::AccessibilityUIElement::selectedTextRange):
(WTR::AccessibilityUIElement::url):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getOutputDir):
(WTR::getFontsPath):
(WTR::initializeFontConfigSetting):
* WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp:
(WTR::topLevelPath):
* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::pathToLocalResource):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::initializeInjectedBundlePath):
(WTR::TestController::initializeTestPluginDirectory):

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

5 years agoPoor man's fast breakpoints for a 2.3x debugger speedup.
mark.lam@apple.com [Thu, 23 Jan 2014 07:39:58 +0000 (07:39 +0000)]
Poor man's fast breakpoints for a 2.3x debugger speedup.
<https://webkit.org/b/122836>

Reviewed by Geoffrey Garen.

Previously we gained back some performance (run at baseline JIT speeds)
when the WebInspector is opened provided no breakpoints are set. This
was achieved by simply skipping all op_debug callbacks to the debugger
if no breakpoints are set. If any breakpoints are set, the debugger will
set a m_needsOpDebugCallbacks flag which causes the callbacks to be
called, and we don't get the baseline JIT speeds anymore.

With this patch, we will now track the number of breakpoints set in the
CodeBlock that they are set in. The LLINT and baseline JIT code will
check CodeBlock::m_numBreakpoints to determine if the op_debug callbacks
need to be called. With this, we will only enable op_debug callbacks for
CodeBlocks that need it i.e. those with breakpoints set in them.

Debugger::m_needsOpDebugCallbacks is now obsoleted. The LLINT and baseline
JIT code still needs to check Debugger::m_shouldPause to determine if the
debugger is in stepping mode and hence, needs op_debug callbacks enabled
for everything until the debugger "continues" the run and exit stepping
mode.

Also in this patch, I fixed a regression in DOM breakpoints which relies
Debugger::breakProgram() to pause the debugger.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
- Missed accounting for op_debug's new hasBreakpointFlag operand here when
  it was added.
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
- This is needed in Debugger::toggleBreakpoint() to determine if a
  breakpoint falls within a CodeBlock or not. Simply checking the bounds
  of the CodeBlock is insufficient. For example, let's say we have the
  following JS code:

      // begin global scope
      function f1() {
          function f2() {
             ... // set breakpoint here.
          }
      }
      // end global scope

  Using the CodeBlock bounds alone, the breakpoint above will to appear
  to be in the global program CodeBlock, and the CodeBlocks for function
  f1() and f2(). With CodeBlock::hasOpDebugForLineAndColumn() we can
  rule out the global program CodeBlock and f1(), and only apply the
  breakpoint to f2(0 where it belongs.

  CodeBlock::hasOpDebugForLineAndColumn() works by iterating over all
  the opcodes in the CodeBlock to look for op_debug's. For each op_debug,
  it calls CodeBlock::expressionRangeForBytecodeOffset() to do a binary
  seach to get the line and column info for that op_debug. This is a
  N * log(N) algorithm. However, a quick hands on test using the
  WebInspector (with this patch applied) to exercise setting, breaking
  on, and clearing breakpoints, as well as stepping through some code
  shows no noticeable degradation of the user experience compared to the
  baseline without this patch.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::numBreakpoints):
(JSC::CodeBlock::numBreakpointsOffset):
(JSC::CodeBlock::addBreakpoint):
(JSC::CodeBlock::removeBreakpoint):
(JSC::CodeBlock::clearAllBreakpoints):
* debugger/Breakpoint.h:
- defined Breakpoint::unspecifiedColumn so that we can explicitly indicate
  when the WebInspector was setting a line breakpoint and did not provide
  a column value. CodeBlock::hasOpDebugForLineAndColumn() needs this
  information in order to loosen its matching criteria for op_debug
  bytecodes for the specified breakpoint line and column values provided
  by the debugger.

  Previously, we just hijack a 0 value column as an unspecified column.
  However, the WebInspector operates on 0-based ints for column values.
  Hence, 0 should be a valid column value and should not be hijacked to
  mean an unspecified column.

* debugger/Debugger.cpp:
(JSC::Debugger::Debugger):
- added tracking of the VM that the debugger is used with. This is
  needed by Debugger::breakProgram().

  The VM pointer is attained from the first JSGlobalObject that the debugger
  attaches to. When the debugger detaches from the last JSGlobalObject, it
  will nullify its VM pointer to allow a new one to be set on the next
  attach.

  We were always only using each debugger instance with one VM. This change
  makes it explicit with an assert to ensure that all globalObjects that
  the debugger attaches to beongs to the same VM.

(JSC::Debugger::attach):
(JSC::Debugger::detach):
(JSC::Debugger::setShouldPause):

(JSC::Debugger::registerCodeBlock):
(JSC::Debugger::unregisterCodeBlock):
- registerCodeBlock() is responsible for applying pre-existing breakpoints
  to new CodeBlocks being installed. Similarly, unregisterCodeBlock()
  clears the breakpoints.

(JSC::Debugger::toggleBreakpoint):
- This is the workhorse function that checks if a breakpoint falls within
  a CodeBlock or not. If it does, then it can either enable or disable
  said breakpoint in the CodeBlock. In the current implementation,
  enabling/disabling the breakpoint simply means incrementing/decrementing
  the CodeBlock's m_numBreakpoints.

(JSC::Debugger::applyBreakpoints):

(JSC::Debugger::ToggleBreakpointFunctor::ToggleBreakpointFunctor):
(JSC::Debugger::ToggleBreakpointFunctor::operator()):
(JSC::Debugger::toggleBreakpoint):
- Iterates all relevant CodeBlocks and apply the specified breakpoint
  if appropriate. This is called when a new breakpoint is being defined
  by the WebInspector and needs to be applied to an already installed
  CodeBlock.

(JSC::Debugger::setBreakpoint):
(JSC::Debugger::removeBreakpoint):
(JSC::Debugger::hasBreakpoint):
(JSC::Debugger::ClearBreakpointsFunctor::ClearBreakpointsFunctor):
(JSC::Debugger::ClearBreakpointsFunctor::operator()):
(JSC::Debugger::clearBreakpoints):

(JSC::Debugger::breakProgram):
- Fixed a regression that broke DOM breakpoints. The issue is that with
  the skipping of op_debug callbacks, we don't always have an updated
  m_currentCallFrame. Normally, m_currentCallFrame is provided as arg
  in the op_debug callback. In this case, we can get the CallFrame* from
  m_vm->topCallFrame.

(JSC::Debugger::updateCallFrameAndPauseIfNeeded):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::willExecuteProgram):
* debugger/Debugger.h:
(JSC::Debugger::Debugger):
(JSC::Debugger::shouldPause):

* heap/CodeBlockSet.h:
(JSC::CodeBlockSet::iterate):
* heap/Heap.h:
(JSC::Heap::forEachCodeBlock):
- Added utility to iterate all CodeBlocks in the heap / VM.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LowLevelInterpreter.asm:
- These now checks CodeBlock::m_numBreakpoints and Debugger::m_shouldPause
  instead of Debugger::m_needsOpDebugCallbacks.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):

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

5 years agoSurround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
simon.fraser@apple.com [Thu, 23 Jan 2014 06:32:12 +0000 (06:32 +0000)]
Surround fixedVisibleContentRect code with USE(TILED_BACKING_STORE)
https://bugs.webkit.org/show_bug.cgi?id=127461

Source/WebCore:

Reviewed by Andreas Kling.

The "fixedVisibleContentRect" code path is only used by platforms
which enabled TILED_BACKING_STORE, so to reduce confusion, surround
this code with #if USE(TILED_BACKING_STORE).

* page/Frame.cpp:
(WebCore::Frame::createView):
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::visibleContentRect):
* platform/ScrollView.h:
(WebCore::ScrollView::visibleSize):

Source/WebKit2:

Reviewed by Andreas Kling.

The "fixedVisibleContentRect" code path is only used by platforms
which enabled TILED_BACKING_STORE, so to reduce confusion, surround
this code with #if USE(TILED_BACKING_STORE).

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):

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

5 years agoVersioning.
lforschler@apple.com [Thu, 23 Jan 2014 05:08:03 +0000 (05:08 +0000)]
Versioning.

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

5 years agoAdd a minimalistic SPI to control the layout size outside of WKView
benjamin@webkit.org [Thu, 23 Jan 2014 05:04:43 +0000 (05:04 +0000)]
Add a minimalistic SPI to control the layout size outside of WKView
https://bugs.webkit.org/show_bug.cgi?id=127403

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-22
Reviewed by Sam Weinig.

The API lets a client of WKView force the layout size. Once the size
is set this way, default update is disabled and the client needs to
update the size systematically as needed. This is done to avoid double
layout or flickering.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
(-[WKView overrideMinimumLayoutSize:]):

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

5 years agoUnreviewed EFL gardening after r162553.
jinwoo7.song@samsung.com [Thu, 23 Jan 2014 04:31:30 +0000 (04:31 +0000)]
Unreviewed EFL gardening after r162553.

* platform/efl/css1/box_properties/padding-expected.txt:
* platform/efl/css1/box_properties/padding_top-expected.txt:
* platform/efl/css1/formatting_model/vertical_formatting-expected.txt:
* platform/efl/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt:
* platform/efl/css2.1/t0804-c5510-padn-00-b-ag-expected.txt:
* platform/efl/css2.1/t0905-c414-flt-wrap-00-e-expected.txt:
* platform/efl/fast/css/empty-pseudo-class-expected.txt:
* platform/efl/fast/css/fieldset-display-row-expected.txt:
* platform/efl/fast/css/first-child-pseudo-class-expected.txt:
* platform/efl/fast/css/last-child-pseudo-class-expected.txt:
* platform/efl/fast/css/only-child-pseudo-class-expected.txt:
* platform/efl/fast/repaint/reflection-redraw-expected.txt:
* platform/efl/fast/table/dynamic-caption-add-remove-before-child-expected.txt:
* platform/efl/fast/table/multiple-captions-display-expected.txt:
* platform/efl/tables/mozilla/marvin/body_col-expected.txt:
* platform/efl/tables/mozilla/marvin/x_th_valign_baseline-expected.txt:
* platform/efl/tables/mozilla/other/body_col-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug10140-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug10216-expected.txt:
* platform/efl/tables/mozilla_expected_failures/core/captions3-expected.txt:
* platform/efl/tables/mozilla_expected_failures/other/test4-expected.txt:

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

5 years agoASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing
mmaxfield@apple.com [Thu, 23 Jan 2014 04:24:23 +0000 (04:24 +0000)]
ASSERTION FAILED: v.isFixed() in WebCore::RenderStyle::setWordSpacing
https://bugs.webkit.org/show_bug.cgi?id=126987

Reviewed by Simon Fraser.

When "inherit" is specified and there is no parent, Length values have an "Auto" type

Source/WebCore:

Test: fast/css3-text/css3-word-spacing-percentage/word-spacing-crash.html

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setWordSpacing):

LayoutTests:

* fast/css3-text/css3-word-spacing-percentage/word-spacing-crash-expected.txt: Added.
* fast/css3-text/css3-word-spacing-percentage/word-spacing-crash.html: Added.

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

5 years agoAX: Can't always increment web sliders.
samuel_white@apple.com [Thu, 23 Jan 2014 04:12:53 +0000 (04:12 +0000)]
AX: Can't always increment web sliders.
https://bugs.webkit.org/show_bug.cgi?id=127451

Reviewed by Chris Fleizach.

Source/WebCore:

Clamping the decrement/increment amount to one when necessary (if a percent change would result in a change of less than one).

Test: accessibility/range-alter-by-percent.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::changeValueByPercent):

LayoutTests:

Adding range-alter-by-percent.html to compliment the existing range-alter-by-step.html test.

* accessibility/range-alter-by-percent-expected.txt: Added.
* accessibility/range-alter-by-percent.html: Added.

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

5 years agoFix a small issue in my recently committed ChangeLog
mrobinson@webkit.org [Thu, 23 Jan 2014 03:55:23 +0000 (03:55 +0000)]
Fix a small issue in my recently committed ChangeLog

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

5 years ago[GTK] [CMake] run-webkit-tests should support the CMake build
mrobinson@webkit.org [Thu, 23 Jan 2014 03:50:08 +0000 (03:50 +0000)]
[GTK] [CMake] run-webkit-tests should support the CMake build
https://bugs.webkit.org/show_bug.cgi?id=126503

Reviewed by Daniel Bates.

Update run-launcher and gtk.py to work properly when dealing with the CMake port.
run-webkit-tests does not need the --gtkcmake flag, but run-launcher does.

* Scripts/run-launcher: Work properly with the gtkcmake flag.
* Scripts/webkitpy/port/gtk.py:
(GtkPort._is_cmake_build): Added this helper which looks for the CMakeCache
file to detect a CMake build.
(GtkPort._built_executables_path): Added this helper to locate the built executable path.
(GtkPort._built_libraries_path): Added this helper to locate the built library path.
(GtkPort._port_flag_for_scripts): Use --gtkcmake when appropriate.
(GtkPort.setup_environ_for_server): The way CMake builds libraries differs from GTK+.
(GtkPort._path_to_driver): Use the new helper.
(GtkPort._path_to_image_diff): Use the new Helper.
(GtkPort._path_to_webcore_library): Use the new helper.
(GtkPort.build_webkit_command): Use --gtkcmake when appropriate.

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

5 years ago[EFL][WK2] defaultTextEncodingName should be stored as a member variable of EwkSettings
jinwoo7.song@samsung.com [Thu, 23 Jan 2014 03:09:37 +0000 (03:09 +0000)]
[EFL][WK2] defaultTextEncodingName should be stored as a member variable of EwkSettings
https://bugs.webkit.org/show_bug.cgi?id=127420

Reviewed by Gyuyoung Kim.

As the defaultTextEncodingName is returned as a local WKEinaSharedString variable,
the stringshared data is de-refed by eina_stringshare_del().
To maintain the reference counter, the defaultTextEncodingName should be stored
as a member variable of EwkSettings class.

* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_encoding_detector_enabled_get): Reordering.
(ewk_settings_default_text_encoding_name_set):
(ewk_settings_default_text_encoding_name_get):
(EwkSettings::setDefaultTextEncodingName):
(EwkSettings::defaultTextEncodingName):
* UIProcess/API/efl/ewk_settings_private.h:
(EwkSettings::EwkSettings): Add m_defaultTextEncodingName and setter/getter methods.

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

5 years agoSupport WebSelections in WK2 on iOS.
enrica@apple.com [Thu, 23 Jan 2014 02:56:44 +0000 (02:56 +0000)]
Support WebSelections in WK2 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=127015
<rdar://problem/15211964>

Reviewed by Benjamin Poulain.

This change adds support for text only (non block mode)
selections in non editable content.
The main changes consist in hooking up the new gesture type
and touches to handle selection creation and interaction.
It also includes changes to the way first responder is handled
which includes the implementation of the isEditable method
to allow iOS to know when to show the keyboard.

* Shared/ios/WKGestureTypes.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView isEditable]):
(-[WKInteractionView canBecomeFirstResponder]):
(-[WKInteractionView webSelectionRects]):
(-[WKInteractionView _highlightLongPressRecognized:]):
(-[WKInteractionView _singleTapRecognized:]):
(-[WKInteractionView inputAccessoryView]):
(-[WKInteractionView canPerformAction:withSender:]):
(-[WKInteractionView _showDictionary:]):
(toWKGestureType):
(toUIWKGestureType):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKInteractionView selectedTextRange]):
(-[WKInteractionView webSelectionAssistant]):
(-[WKInteractionView _startAssistingNode]):
(-[WKInteractionView _stopAssistingNode]):
(-[WKInteractionView _selectionChanged]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::updateSelectionWithTouches):

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

5 years ago[EFL] Remove unnecessary smart method since ewk_view_tiled removed
ryuan.choi@samsung.com [Thu, 23 Jan 2014 02:24:10 +0000 (02:24 +0000)]
[EFL] Remove unnecessary smart method since ewk_view_tiled removed
https://bugs.webkit.org/show_bug.cgi?id=127417

Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

pre_render related codes is only for ewk_view_tiled.
In addition, we don't have any requirement to override repaints_process
and scroll_process now.

* ewk/ewk_view.cpp:
(_ewk_view_smart_repaints_process):
(_ewk_view_smart_calculate):
(ewk_view_smart_set):
(ewk_view_scrolls_process):
* ewk/ewk_view.h:

Tools:

* EWebLauncher/main.c:
(on_key_down): Removed shortcut to test pre render.

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

5 years agoWKBrowsingContextController should not be an API wrapper around WebPageProxy
andersca@apple.com [Thu, 23 Jan 2014 02:24:06 +0000 (02:24 +0000)]
WKBrowsingContextController should not be an API wrapper around WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=127454

Reviewed by Dan Bernstein.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Shared/mac/ObjCObjectGraphCoders.mm:
(WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _initWithPageRef:]):
(+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
* UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(didNavigateWithNavigationData):
(didPerformClientRedirect):
(didPerformServerRedirect):
(didUpdateHistoryTitle):
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView browsingContextController]):
* UIProcess/API/mac/WKView.mm:
(-[WKView browsingContextController]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::platformInitialize):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformInitialize):

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

5 years agoRemove CSS3_TEXT_DECORATION define
mmaxfield@apple.com [Thu, 23 Jan 2014 02:19:42 +0000 (02:19 +0000)]
Remove CSS3_TEXT_DECORATION define
https://bugs.webkit.org/show_bug.cgi?id=127333

Source/JavaScriptCore:

This is required for unprefixing the text-decoration-* CSS properties.

Reviewed by Simon Fraser.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Reviewed by Simon Fraser.

This is required for unprefixing the text-decoration-* CSS properties.

No new tests are necessary becase the flag was already on by default.

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationSkipFlagsToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isColorPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::addTextDecorationProperty):
(WebCore::CSSParser::parseTextUnderlinePosition):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitTextDecorationShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::shouldApplyPropertyInParseOrder):
(WebCore::isValidVisitedLinkProperty):
(WebCore::StyleResolver::applyProperty):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::setPlatformStrokeStyle):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::createPen):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalTop):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::boundingBoxForAllActiveDecorations):
(WebCore::InlineTextBox::paintDecoration):
* rendering/RenderObject.cpp:
(WebCore::decorationColor):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalTop):
* rendering/RootInlineBox.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::colorIncludingFallback):
(WebCore::RenderStyle::visitedDependentColor):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

Source/WebKit/mac:

Reviewed by Simon Fraser.

This is required for unprefixing the text-decoration-* CSS properties.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Reviewed by Simon Fraser.

This is required for unprefixing the text-decoration-* CSS properties.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Reviewed by Simon Fraser.

This is required for unprefixing the text-decoration-* CSS properties.

* wtf/Platform.h:

Tools:

This is required for unprefixing the text-decoration-* CSS properties.

Reviewed by Simon Fraser.

* Configurations/FeatureDefines.xcconfig:

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

5 years agoDebug mechanism to override process QoS on Mac
barraclough@apple.com [Thu, 23 Jan 2014 02:16:43 +0000 (02:16 +0000)]
Debug mechanism to override process QoS on Mac
https://bugs.webkit.org/show_bug.cgi?id=127455

Reviewed by Anders Carlsson.

* NetworkProcess/NetworkProcess.messages.in:
    - added message.
* PluginProcess/PluginProcess.messages.in:
    - added message.
* Shared/ChildProcess.h:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setQOS):
    - Added implementation of new message.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching):
    - SetQOS for the PluginProcess.
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::pluginProcessLatencyQOS):
(WebKit::pluginProcessThroughputQOS):
    - read NSUserDefaults.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
    - SetQOS for the NetworkProcess.
(WebKit::WebContext::createNewWebProcess):
    - SetQOS for the WebProcess.
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::networkProcessLatencyQOS):
(WebKit::networkProcessThroughputQOS):
(WebKit::webProcessLatencyQOS):
(WebKit::webProcessThroughputQOS):
    - read NSUserDefaults.
* WebProcess/WebProcess.messages.in:
    - added message.

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

5 years agoSource/WebCore: AX: Do not return an accessible name for an object just because it...
cfleizach@apple.com [Thu, 23 Jan 2014 02:01:39 +0000 (02:01 +0000)]
Source/WebCore: AX: Do not return an accessible name for an object just because it has tabindex=0
https://bugs.webkit.org/show_bug.cgi?id=126914

Reviewed by Mario Sanchez Prada.

WebKit has code to return an accessible name for any object that is "generically" focusable (ie. tabindex=0).
This behavior, which is not supported in ARIA, has caused many problems for VoiceOver. Often VoiceOver will
speak all the text underneath any type of group.

I think we need to revert this behavior and follow the ARIA spec more closely.

Test: accessibility/aria-describedby-ensures-visibility.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):

LayoutTests: AX: WebKit concatenates name of all toolbar buttons in the apple.com video player
https://bugs.webkit.org/show_bug.cgi?id=126914

Reviewed by Mario Sanchez Prada.

* accessibility/focusable-div-expected.txt:
* accessibility/focusable-div.html:

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

5 years agoUpdate JS whitespace definition for changes in Unicode 6.3
ap@apple.com [Thu, 23 Jan 2014 01:35:51 +0000 (01:35 +0000)]
Update JS whitespace definition for changes in Unicode 6.3
https://bugs.webkit.org/show_bug.cgi?id=127450
<rdar://15863457>

Reviewed by Oliver Hunt.

Covered by existing tests when running against a Unicode back-end that supports
Unicode 6.3 or higher.

* runtime/JSGlobalObjectFunctions.cpp: (JSC::isStrWhiteSpace): Explicitly allow
U+180E MONGOLIAN VOWEL SEPARATOR, because we need to keep recognizing all characters
that used to be whitespace.

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

5 years agoASAN builds are broken - missing flags
dfarler@apple.com [Thu, 23 Jan 2014 01:17:37 +0000 (01:17 +0000)]
ASAN builds are broken - missing flags
https://bugs.webkit.org/show_bug.cgi?id=127231

Reviewed by Andy Estes.

Add missing $(ASAN_OTHER_LDFLAGS).
* Configurations/PluginProcessShim.xcconfig:
* Configurations/SecItemShim.xcconfig:
* Configurations/WebKit2.xcconfig:
* Configurations/WebProcessShim.xcconfig:

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

5 years ago[iOS] Prepare for upstreaming DumpRenderTree changes
aestes@apple.com [Thu, 23 Jan 2014 01:11:06 +0000 (01:11 +0000)]
[iOS] Prepare for upstreaming DumpRenderTree changes
https://bugs.webkit.org/show_bug.cgi?id=127412

Reviewed by Simon Fraser.

Unlike on Mac where DumpRenderTree is a command-line tool, on iOS it is
an application bundle. Instead of upstreaming a separate target for the
app that duplicates the 'Compile Sources' phase of the tool, separate
out the compilation into a static library target that both the
command-line tool and the app can link against. Also, perform some
unrelated cleanup.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Updated the
project file format from 2.4- to 3.2-compatible. Removed the
'Copy Headers' build phase and removed all files from the
'Compile Sources' build phase of DumpRenderTree. Added some files that
were missing from the project. Created a 'DumpRenderTree (Library)'
target for building the static library and made the 'DumpRenderTree'
target depend on it. Added a 'Compile Sources' build phase to this
target that builds the same files the DumpRenderTree target used to.
Created DumpRenderTreeMain.mm as the only source file of the
DumpRenderTree target, since targets won't link a binary without at
least one source file. Made DumpRenderTree (Library) use
DumpRenderTreeLibrary.xcconfig and made LayoutTestHelper use
BaseTarget.xcconfig (so that it doesn't try to link libDumpRenderTree.a).
* DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Moved
definitions of GCC_ENABLE_OBJC_EXCEPTIONS and GCC_PREFIX_HEADER from
DumpRenderTree.xcconfig to here so that LayoutTestHelper can use them.
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: Passed
-force_load $(BUILT_PRODUCTS_DIR)libDumpRenderTree.a to OTHER_LDFLAGS.
This is needed to correctly link a static library containing an Objective-C
category (see <https://developer.apple.com/library/mac/qa/qa1490/_index.html>).
* DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig: Added.
* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain): Renamed from main.
* DumpRenderTree/mac/DumpRenderTreeMac.h: Added declaration of DumpRenderTreeMain.
* DumpRenderTree/mac/DumpRenderTreeMain.mm: Added.
(main): Called DumpRenderTreeMain from main.

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

5 years agoSource/WebCore: The IDB backing store get() method shouldn't call IDB callbacks directly
beidson@apple.com [Thu, 23 Jan 2014 00:30:14 +0000 (00:30 +0000)]
Source/WebCore: The IDB backing store get() method shouldn't call IDB callbacks directly
https://bugs.webkit.org/show_bug.cgi?id=127453

Reviewed by Beth Dakin.

* Modules/indexeddb/IDBServerConnection.h:
(WebCore::IDBGetResult::IDBGetResult): Add a new structure to hold all of the
  possible results of a get() call.

* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::get): Don't call IDBCallbacks directly.
  Instead, return the GetResult to the GetOperation which will make IDBCallbacks.
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::GetOperation::perform): Get all of the IDBGetResults in the completion callback
  make the appropriate IDBCallback.
* Modules/indexeddb/IDBTransactionBackendOperations.h:

Source/WebKit2: The IDB backing store get() method shouldn't call IDB callbacks directly
https://bugs.webkit.org/show_bug.cgi?id=127453

Reviewed by Beth Dakin.

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::get):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:

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

5 years agoEnable Session API.
commit-queue@webkit.org [Thu, 23 Jan 2014 00:28:20 +0000 (00:28 +0000)]
Enable Session API.
https://bugs.webkit.org/show_bug.cgi?id=127255

Patch by Martin Hock <mhock@apple.com> on 2014-01-22
Reviewed by Alexey Proskuryakov.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::storageSession):
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/SessionTracker.cpp:
(WebKit::staticSessionMap):
(WebKit::SessionTracker::sessionMap):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetSession):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKSessionRef.cpp:
(WKSessionCreate):
* UIProcess/API/C/WKSessionRef.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSession):
* UIProcess/WebPageProxy.h:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::sessionID):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setSessionID):
* WebProcess/WebPage/WebPage.messages.in:

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

5 years agoUnreviewed attempt to fix 32-bit builds.
dino@apple.com [Wed, 22 Jan 2014 23:58:39 +0000 (23:58 +0000)]
Unreviewed attempt to fix 32-bit builds.

Use long long rather than GC3Dintptr.

* html/canvas/ANGLEInstancedArrays.cpp:
(WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE):
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawElementsInstanced):
* html/canvas/WebGLRenderingContext.h:

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

5 years agoIDB: "Put" support
beidson@apple.com [Wed, 22 Jan 2014 23:48:27 +0000 (23:48 +0000)]
IDB: "Put" support
<rdar://problem/15779643> and https://bugs.webkit.org/show_bug.cgi?id=127401

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Add persistent encode/decode for storage to the database:
* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::encode):
(WebCore::IDBKey::decode):
* Modules/indexeddb/IDBKey.h:

Add a data class to represent IDBKey suitable for crossing IPC:
* Modules/indexeddb/IDBKeyData.cpp: Added.
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey):
(WebCore::IDBKeyData::isolatedCopy):
* Modules/indexeddb/IDBKeyData.h: Added.
(WebCore::IDBKeyData::IDBKeyData):

* platform/CrossThreadCopier.cpp:
(WebCore::IDBKeyData>::copy):
* platform/CrossThreadCopier.h:

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

Ship putRecord requests over to the DatabaseProcess, and listen for completion from the DatabaseProcess:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::put):
(WebKit::WebIDBServerConnection::didPutRecord):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:

Pass off the putRecord request to the Unique IDBDatabase:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::putRecord):
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

Pass off the putRecord request to the backing store:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecord):
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
(WebKit::UniqueIDBDatabase::didPutRecordInBackingStore):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

Add backing store methods related to putRecord, though only one is critical right now:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::generateKey):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::keyExistsInObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::updateKeyGenerator):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Add the IDBKeyData type to IPC:
* Scripts/webkit2/messages.py:
(struct_or_class):

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBKeyData>::encode):
(IPC::ArgumentCoder<IDBKeyData>::decode):
* Shared/WebCoreArgumentCoders.h:

* DatabaseProcess/IndexedDB/IDBSerialization.cpp:
(WebKit::serializeIDBKey):
* DatabaseProcess/IndexedDB/IDBSerialization.h:

Implement more cross-thread copying:
* Shared/WebCrossThreadCopier.cpp:
(WebCore::Vector<uint8_t>>::copy):
(WebCore::Vector<Vector<IDBKeyData>>>::copy):
(WebCore::ASCIILiteral>::copy):
* Shared/WebCrossThreadCopier.h:

Implement more numbers of generic AsyncTask templates:
* Shared/AsyncTask.h:
(WebKit::createAsyncTask):

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

5 years agoSource/WebCore: [WebGL] Implement ANGLE_instanced_arrays
dino@apple.com [Wed, 22 Jan 2014 23:47:24 +0000 (23:47 +0000)]
Source/WebCore: [WebGL] Implement ANGLE_instanced_arrays
https://bugs.webkit.org/show_bug.cgi?id=127257

Reviewed by Brent Fulgham.

Implement the instanced drawing WebGL extension,
ANGLE_instanced_arrays. This is currently Mac-only,
but should be portable to other platforms if their
OpenGL exposes the functions. It's also done in a way
that will make exposing it to WebGL2 simple.

Test: fast/canvas/webgl/angle-instanced-arrays.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Add the new files to all the build systems.

* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS): Link JS side to C++ side.

* html/canvas/ANGLEInstancedArrays.cpp: Added.
(WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
* html/canvas/ANGLEInstancedArrays.h: Added.
* html/canvas/ANGLEInstancedArrays.idl: Added.
New boilerplate files that expose the extension methods.

* html/canvas/WebGLExtension.h: New extension enum.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes): Add an optional
parameter representing the number of instance primitives we are asked
to draw. Use that for the draw count if looking at an instanced attribute.
Also make sure we see at least one non-instanced attribute.
(WebCore::WebGLRenderingContext::validateDrawArrays): Update this so it could
be used from either drawArrays or drawArraysInstanced.
(WebCore::WebGLRenderingContext::drawArrays):
(WebCore::WebGLRenderingContext::validateDrawElements): Same here, now can be
used by the instanced and non-instanced versions.
(WebCore::WebGLRenderingContext::drawElements):
(WebCore::WebGLRenderingContext::getExtension): Create and return the new extension.
(WebCore::WebGLRenderingContext::getSupportedExtensions): Add new extension to the list.
(WebCore::WebGLRenderingContext::getVertexAttrib): Intercept a query to the divisor
attribute and return the value we kept in the state.
(WebCore::WebGLRenderingContext::drawArraysInstanced): Call the GC3D method.
(WebCore::WebGLRenderingContext::drawElementsInstanced): Ditto.
(WebCore::WebGLRenderingContext::vertexAttribDivisor): Ditto.

* html/canvas/WebGLRenderingContext.h: Define the new methods and parameters.

* html/canvas/WebGLVertexArrayObjectOES.cpp:
(WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Keep a record of the
divisor if we set it.
* html/canvas/WebGLVertexArrayObjectOES.h:
(WebCore::WebGLVertexArrayObjectOES::VertexAttribState::VertexAttribState):

* platform/graphics/GraphicsContext3D.h: New enum.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::drawArraysInstanced): The actual calls into OpenGL.
(WebCore::GraphicsContext3D::drawElementsInstanced): Ditto.
(WebCore::GraphicsContext3D::vertexAttribDivisor): Ditto.

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Empty implementations
for non-mac platforms.

* platform/graphics/ios/GraphicsContext3DIOS.h: Define the iOS names for the
functions.

LayoutTests: Implement ANGLE_instanced_arrays
https://bugs.webkit.org/show_bug.cgi?id=127257

Reviewed by Brent Fulgham.

Copied a slightly modified version of the Khronos instanced
arrays test (mostly modified due to the fact this comes from
an in-progress update to the test suite).

* fast/canvas/webgl/angle-instanced-arrays-expected.txt: Added.
* fast/canvas/webgl/angle-instanced-arrays.html: Added.
* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils): Added some new functions that were missing, and
some output to a checkColor test.
* platform/efl/TestExpectations: Skip this for EFL.
* platform/mac-mountainlion/fast/canvas/webgl/angle-instanced-arrays-expected.txt: Not
supported on Mountain Lion.

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

5 years agoImprove collapsing of TimelineDataGridNode graphs up to ancestors.
timothy@apple.com [Wed, 22 Jan 2014 23:27:06 +0000 (23:27 +0000)]
Improve collapsing of TimelineDataGridNode graphs up to ancestors.

https://bugs.webkit.org/show_bug.cgi?id=127440

Reviewed by Joseph Pecoraro.

* UserInterface/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.collapse):
(WebInspector.TimelineDataGridNode.prototype.createCellContent):
(WebInspector.TimelineDataGridNode.prototype.refresh):
(WebInspector.TimelineDataGridNode.prototype.needsGraphRefresh):
Notify the next visible ancestor it needs to refresh. Use needsGraphRefresh so ancestors
are notified instead of directly calling refreshGraph in some places.

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

5 years agoUnreviewed Apple Windows port gardering after r162553.
zalan@apple.com [Wed, 22 Jan 2014 23:22:44 +0000 (23:22 +0000)]
Unreviewed Apple Windows port gardering after r162553.

* platform/win/fast/repaint/reflection-redraw-expected.txt: Added.
* platform/win/fast/table/dynamic-caption-add-remove-before-child-expected.txt: Added.
* platform/win/fast/table/multiple-captions-display-expected.txt: Added.
* platform/win/tables/mozilla/marvin/body_col-a-expected.txt: Added.
* platform/win/tables/mozilla/marvin/x_th_valign_baseline-expected.txt: Added.
* platform/win/tables/mozilla/other/body_col-expected.txt: Added.

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

5 years agoWKProcessClass should create a WebContext
andersca@apple.com [Wed, 22 Jan 2014 23:14:38 +0000 (23:14 +0000)]
WKProcessClass should create a WebContext
https://bugs.webkit.org/show_bug.cgi?id=127449
<rdar://problem/15885582>

Reviewed by Dan Bernstein.

* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKBrowsingContextController.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
* UIProcess/API/Cocoa/WKProcessClass.mm:
(-[WKProcessClass initWithConfiguration:]):
(-[WKProcessClass dealloc]):
(-[WKProcessClass API::]):
* UIProcess/API/Cocoa/WKProcessClassInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroupInternal.h.
(WebKit::wrapper):
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoDon't include a hidden Timeline selection in the navigation path components.
timothy@apple.com [Wed, 22 Jan 2014 22:57:21 +0000 (22:57 +0000)]
Don't include a hidden Timeline selection in the navigation path components.

https://bugs.webkit.org/show_bug.cgi?id=127443

Reviewed by Joseph Pecoraro.

* UserInterface/GeneralTreeElementPathComponent.js:
(WebInspector.GeneralTreeElementPathComponent.prototype.get previousSibling):
(WebInspector.GeneralTreeElementPathComponent.prototype.get nextSibling):
Skip hidden siblings.

* UserInterface/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.updateLayout):
(WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
Don't include hidden selection and dispatch SelectionPathComponentsDidChange event if hidden changes.

* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
Dispatch SelectionPathComponentsDidChange event if hidden changes on the selected tree element.

* UserInterface/TimelineView.js:
(WebInspector.TimelineView.prototype.get selectionPathComponents):
Don't include hidden selection.

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

5 years agoSupport collapsing call site records into the resource timeline.
timothy@apple.com [Wed, 22 Jan 2014 22:57:11 +0000 (22:57 +0000)]
Support collapsing call site records into the resource timeline.

Also fix some filtering and graph issues.

https://bugs.webkit.org/show_bug.cgi?id=127440

Reviewed by Joseph Pecoraro.

* UserInterface/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.updateFilter):
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter):
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.makeVisible):
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
Tweak how filtering happens so custom filters never expand to reveal and auto expanded
tree elements will auto-collapse again later even with custom filters.

* UserInterface/OverviewTimelineView.css:
(.timeline-view.overview > .data-grid tr.parent:not(.expanded) td.graph-column .timeline-record-bar:not(.timeline-record-type-network) > .segment):
(.timeline-view.overview > .data-grid tr.parent:not(.expanded).selected td.graph-column .timeline-record-bar:not(.timeline-record-type-network) > .segment):
(.timeline-view.overview > .data-grid:focus tr.parent:not(.expanded).selected td.graph-column .timeline-record-bar:not(.timeline-record-type-network) > .segment):
Add a shadow to provide some negative space between juxtaposed records. Only needed when not expanded and not netwrok records.

* UserInterface/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.updateLayout):
(WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
Update the filter when current time changes and only auto expand the main resource.

* UserInterface/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode):
(WebInspector.ResourceTimelineDataGridNode.prototype._timelineRecordUpdated):
Don't schedule a refresh of the graph if the record isn't visible.

* UserInterface/SourceCodeTimelineTimelineDataGridNode.js:
(WebInspector.SourceCodeTimelineTimelineDataGridNode):
(WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._timelineRecordAdded):
Don't schedule a refresh of the graph if the record isn't visible.

* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
Remove the boolean for updateFilter.

* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
(WebInspector.TimelineDataGrid.prototype._sort):
Keep the hidden state in-sync between node and element.

* UserInterface/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.collapse):
(WebInspector.TimelineDataGridNode.prototype.expand):
(WebInspector.TimelineDataGridNode.prototype.appendChild):
(WebInspector.TimelineDataGridNode.prototype.insertChild):
(WebInspector.TimelineDataGridNode.prototype.removeChild):
(WebInspector.TimelineDataGridNode.prototype.removeChildren):
(WebInspector.TimelineDataGridNode.prototype.removeChildrenRecursive):
(WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBarsForRecords):
(WebInspector.TimelineDataGridNode.prototype.refreshGraph.else.collectRecordsByType.get if):
(WebInspector.TimelineDataGridNode.prototype.needsGraphRefresh):
(WebInspector.TimelineDataGridNode.prototype.isRecordVisible):
Support drawing the children records on the parent graph.

* UserInterface/TimelineRecordBar.css:
(.timeline-record-bar.unfinished > .segment):
(:focus .selected .timeline-record-bar > .segment):
(:focus .selected .timeline-record-bar > .segment.inactive):
(:focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
Tweaked styles to look bettwen when selected.

* UserInterface/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.recordsCannotBeCombined):
(WebInspector.TimelineRecordBar.prototype.set records):
(WebInspector.TimelineRecordBar.prototype.refresh):
Drive-by fixes for some bug with bars being reused.

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

5 years ago[CSS Shapes] shape-inside rectangle layout can fail
zalan@apple.com [Wed, 22 Jan 2014 22:56:17 +0000 (22:56 +0000)]
[CSS Shapes] shape-inside rectangle layout can fail
https://bugs.webkit.org/show_bug.cgi?id=124784

Reviewed by Darin Adler.

Early subpixel rounding/flooring/ceiling can have unwanted
side effect on the final pixel value. Delay pixel
conversions as much as possible.

Existing test is changed to reflect subpixel functionality.

Source/WebCore:

* rendering/shapes/RectangleShape.cpp:
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop):

LayoutTests:

* fast/shapes/shape-inside/shape-inside-subpixel-rectangle-top-expected.html:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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

5 years agoCrashes in DrawingAreaProxy::setExposedRect (null DrawingAreaProxy)
timothy_horton@apple.com [Wed, 22 Jan 2014 22:18:28 +0000 (22:18 +0000)]
Crashes in DrawingAreaProxy::setExposedRect (null DrawingAreaProxy)
https://bugs.webkit.org/show_bug.cgi?id=127445

Reviewed by Anders Carlsson.

* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _updateViewExposedRect]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateViewExposedRect]):
Null-check.

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

5 years agoAdd protocolIsInHTTPFamily for strings and use it where appropriate
jochen@chromium.org [Wed, 22 Jan 2014 22:17:33 +0000 (22:17 +0000)]
Add protocolIsInHTTPFamily for strings and use it where appropriate
https://bugs.webkit.org/show_bug.cgi?id=127336

Reviewed by Alexey Proskuryakov.

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPSource::schemeMatches):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::generateReferrerHeader):
* platform/URL.cpp:
(WebCore::protocolIsInHTTPFamily):
* platform/URL.h:

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

5 years agoAdd WKWebView class
andersca@apple.com [Wed, 22 Jan 2014 22:16:37 +0000 (22:16 +0000)]
Add WKWebView class
https://bugs.webkit.org/show_bug.cgi?id=127444
<rdar://problem/15884418>

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.h: Added.
* UIProcess/API/Cocoa/WKWebView.mm: Added.
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView configuration]):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoSubpixel Layout: SimpleLineLayout needs more position rounding to match InlineFlowBox...
zalan@apple.com [Wed, 22 Jan 2014 22:03:29 +0000 (22:03 +0000)]
Subpixel Layout: SimpleLineLayout needs more position rounding to match InlineFlowBox layout.
https://bugs.webkit.org/show_bug.cgi?id=127404

Reviewed by Antti Koivisto.

In order to produce a CSS pixel perfect layout, SimpleLineLayout needs to
round line positions to CSS (integral) position similarly to InlineFlowBox.

Source/WebCore:

Existing tests cover it.

* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::rect):
(WebCore::SimpleLineLayout::RunResolver::Run::baseline):

LayoutTests:

* platform/mac/css1/box_properties/padding-expected.txt:
* platform/mac/css1/box_properties/padding_top-expected.txt:
* platform/mac/css1/formatting_model/vertical_formatting-expected.txt:
* platform/mac/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt:
* platform/mac/css2.1/t0804-c5510-padn-00-b-ag-expected.txt:
* platform/mac/css2.1/t0905-c414-flt-wrap-00-e-expected.txt:
* platform/mac/fast/css/empty-pseudo-class-expected.txt:
* platform/mac/fast/css/fieldset-display-row-expected.txt:
* platform/mac/fast/css/first-child-pseudo-class-expected.txt:
* platform/mac/fast/css/last-child-pseudo-class-expected.txt:
* platform/mac/fast/css/only-child-pseudo-class-expected.txt:
* platform/mac/fast/repaint/reflection-redraw-expected.txt:
* platform/mac/fast/shapes/shape-inside/shape-inside-subpixel-rectangle-top-expected.png: Removed.
* platform/mac/fast/table/dynamic-caption-add-remove-before-child-expected.txt:
* platform/mac/fast/table/multiple-captions-display-expected.txt:
* platform/mac/tables/mozilla/marvin/body_col-expected.txt:
* platform/mac/tables/mozilla/marvin/x_th_valign_baseline-expected.txt:
* platform/mac/tables/mozilla/other/body_col-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug10140-expected.txt:
* platform/mac/tables/mozilla_expected_failures/bugs/bug10216-expected.txt:
* platform/mac/tables/mozilla_expected_failures/core/captions3-expected.txt:
* platform/mac/tables/mozilla_expected_failures/other/test4-expected.txt:

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

5 years agoUnreviewed rollout of r162534, this caused inspector test failures.
joepeck@webkit.org [Wed, 22 Jan 2014 21:02:16 +0000 (21:02 +0000)]
Unreviewed rollout of r162534, this caused inspector test failures.

* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
(WebCore::PageScriptDebugServer::removeListener):
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didRemoveLastListener):
* bindings/js/PageScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::recompileAllJSFunctionsSoon):
(WebCore::ScriptDebugServer::recompileAllJSFunctionsTimerFired):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::removeListener):
* inspector/InspectorProfilerAgent.cpp:

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

5 years agoFix 32-bit build.
andersca@apple.com [Wed, 22 Jan 2014 20:29:41 +0000 (20:29 +0000)]
Fix 32-bit build.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

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

5 years ago[wk2] Scroll pinning state is wrong until the first scroll event
timothy_horton@apple.com [Wed, 22 Jan 2014 20:18:39 +0000 (20:18 +0000)]
[wk2] Scroll pinning state is wrong until the first scroll event
https://bugs.webkit.org/show_bug.cgi?id=127437

Reviewed by Simon Fraser.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didChangeScrollOffset):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateMainFrameScrollOffsetPinning):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
Rename WebPage::didChangeScrollOffsetForMainFrame to
updateMainFrameScrollOffsetPinning, which better describes what it
actually does. Call it when a load is committed, so that we have valid
pinning state before the first scroll event comes in.

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

5 years agoAdd WKWebViewConfiguration class
andersca@apple.com [Wed, 22 Jan 2014 20:17:35 +0000 (20:17 +0000)]
Add WKWebViewConfiguration class
https://bugs.webkit.org/show_bug.cgi?id=127436
<rdar://problem/15882923>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebViewConfiguration.h: Added.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm: Added.
(-[WKWebViewConfiguration copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago[WK2] add cocoa API for private browsing setting
alice.liu@apple.com [Wed, 22 Jan 2014 20:08:59 +0000 (20:08 +0000)]
[WK2] add cocoa API for private browsing setting
https://bugs.webkit.org/show_bug.cgi?id=127391

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup privateBrowsingEnabled]):
(-[WKBrowsingContextGroup setPrivateBrowsingEnabled:]):
Adding some API for the private Browsing setting. Reaches through
to the WKPageGroup's preferences.

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

5 years ago[GTK][CMake] build-webkit should try harder to avoid re-running cmake
mrobinson@webkit.org [Wed, 22 Jan 2014 19:55:57 +0000 (19:55 +0000)]
[GTK][CMake] build-webkit should try harder to avoid re-running cmake
https://bugs.webkit.org/show_bug.cgi?id=127073

Reviewed by Daniel Bates.

* Scripts/build-webkit: Unify all the ports that call buildCMakeProjectOrExit with
the new isCMakeBuild conditional. This allows us to share more code between ports.
Pass the build arguments to the removeCMakeCache function.
* Scripts/webkitdirs.pm:
(runAutogenForAutotoolsProjectIfNecessary): Renamed mustReRunAutogen to cachedArgumentFileOutOfDate
because it's now shared with the CMake build.
(cachedArgumentFileOutOfDate): Renamed.
(cmakeCachePath): Added this helper which gets the CMakeCache.txt path.
(shouldRemoveCMakeCache): Tries to preserve current behavior for all ports,
except GTK+ which examines the OptionsGTK.cmake and OptionsCommon.cmake file
as well as checking if build-webkit has been run with different arguments.
(removeCMakeCache): Call shouldRemoveCMakeCache now.
(generateBuildSystemFromCMakeProject): Exit early if CMakeCache.txt exists for GTK+.
(isCMakeBuild): Added.

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

5 years agoCrashes in setTextForIterator
commit-queue@webkit.org [Wed, 22 Jan 2014 19:55:11 +0000 (19:55 +0000)]
Crashes in setTextForIterator
https://bugs.webkit.org/show_bug.cgi?id=127424

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-01-22
Reviewed by Brent Fulgham.

* platform/text/icu/UTextProviderLatin1.cpp:
(WebCore::uTextLatin1Clone): Provide correct buffer size in utext_setup function call.
(WebCore::uTextLatin1Access): Give correct buffer size to memset call.
(WebCore::openLatin1UTextProvider): Ditto.

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

5 years agoREGRESSION: fast/js/dfg-* typed array tests frequently time out on debug bots
ap@apple.com [Wed, 22 Jan 2014 19:53:24 +0000 (19:53 +0000)]
REGRESSION: fast/js/dfg-* typed array tests frequently time out on debug bots
https://bugs.webkit.org/show_bug.cgi?id=126166

Rubber-stamped by Filip Pizlo.

* TestExpectations: Skipped these tests in debug builds.

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

5 years agoAdd WKProcessClass class
andersca@apple.com [Wed, 22 Jan 2014 19:26:37 +0000 (19:26 +0000)]
Add WKProcessClass class
https://bugs.webkit.org/show_bug.cgi?id=127433
<rdar://problem/15882582>

Reviewed by Dan Bernstein.

Add a stubbed out WKProcessClass class.

* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKProcessClass.h: Added.
* UIProcess/API/Cocoa/WKProcessClass.mm: Added.
(-[WKProcessClass initWithConfiguration:]):
(-[WKProcessClass configuration]):
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years ago[Mac] MediaPlayerPrivateMediaSourceAVFObjC::load ASSERTs on lots of tests
jer.noble@apple.com [Wed, 22 Jan 2014 19:24:20 +0000 (19:24 +0000)]
[Mac] MediaPlayerPrivateMediaSourceAVFObjC::load ASSERTs on lots of tests
https://bugs.webkit.org/show_bug.cgi?id=127430

Reviewed by Eric Carlson.

When other registered media engines cannot load a URL, the engine selection
will eventually pick MediaPlayerPrivateMediaSourceAVFObjC and ask it to load
the URL. Instead of ASSERTing here, simply reject the URL by setting the
network state to FormatError.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):

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

5 years ago[EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
thiago.lacerda@openbossa.org [Wed, 22 Jan 2014 19:21:55 +0000 (19:21 +0000)]
[EFL][GTK] Get EFL and GTK compiling with ACCESSIBILITY disabled
https://bugs.webkit.org/show_bug.cgi?id=127119

Reviewed by Mario Sanchez Prada.

Source/WebCore:

At build time, the compiler was not able to determine which Timer's constructor to call in AXObjectCache when
ACCESSIBILITY is not enabled, fixing that.
Also guarding some members in AccessibilityObject that are only being used by EFL and GTK with ACCESSIBILITY.

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::AXObjectCache):
* accessibility/AccessibilityObject.h:

Source/WebKit/gtk:

Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).

* webkit/webkitwebview.cpp:
(webkit_web_view_class_init):

Source/WebKit2:

Guarding ACCESSIBILITY code with HAVE(ACCESSIBILITY).

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):

Tools:

Guarding ACCESSIBILITY code in DumpRenderTree and WebKitTestRunner with HAVE(ACCESSIBILITY).

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
* DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
(webViewWindowObjectCleared):
(main):
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR::AccessibilityController::platformName):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::isIndeterminate):

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

5 years agoRefactor calculation of hasRx and hasRy values in SVGPathData
commit-queue@webkit.org [Wed, 22 Jan 2014 19:10:51 +0000 (19:10 +0000)]
Refactor calculation of hasRx and hasRy values in SVGPathData
https://bugs.webkit.org/show_bug.cgi?id=127423

Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2014-01-22
Reviewed by Darin Adler.

This is a follow-up on https://bugs.webkit.org/show_bug.cgi?id=127337

* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromRectElement):

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

5 years ago[GTK][CMake] Add support for building the NetworkProcess
mrobinson@webkit.org [Wed, 22 Jan 2014 19:00:48 +0000 (19:00 +0000)]
[GTK][CMake] Add support for building the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=127195

Reviewed by Daniel Bates.

.:

* Source/cmake/OptionsGTK.cmake: Turn on the network process and give it
a name like the WebProcess.

Source/WebKit2:

* CMakeLists.txt: Add shared network process build instructions.
* PlatformEfl.cmake: Move build instructions to the platform-independent file.
* PlatformGTK.cmake: Add some files to the source lists.

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

5 years ago[GTK] Avoid a circular dependency when building webkitenumtypes.h
mrobinson@webkit.org [Wed, 22 Jan 2014 18:59:26 +0000 (18:59 +0000)]
[GTK] Avoid a circular dependency when building webkitenumtypes.h
https://bugs.webkit.org/show_bug.cgi?id=127199

Reviewed by Daniel Bates.

* PlatformGTK.cmake: Create a new list of headers consisting of all installed headers
except webkitenumtypes.h. Use this list when generating webkitenumtypes.h.

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

5 years agoWeb Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
joepeck@webkit.org [Wed, 22 Jan 2014 18:57:26 +0000 (18:57 +0000)]
Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer
https://bugs.webkit.org/show_bug.cgi?id=127409

Reviewed by Timothy Hatcher.

* bindings/js/ScriptDebugServer.h:
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::ScriptDebugServer):
Remove m_recompileTimer and the recompile soon function.
We can just recompile immediately in all existing cases.

* bindings/js/PageScriptDebugServer.h:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::addListener):
(WebCore::PageScriptDebugServer::removeListener):
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
(WebCore::PageScriptDebugServer::didAddFirstListener):
(WebCore::PageScriptDebugServer::didRemoveLastListener):
Add a "didAddFirstListener" to match "didRemoveLastListener".
Only recompile functions when we attach the debugger and when
we detach the last listener.

* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::addListener):
(WebCore::WorkerScriptDebugServer::removeListener):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
Same thing. Also rearrange the functions to read better.

* inspector/InspectorProfilerAgent.cpp:
Use the direct recompile function instead of the removed "soon" version.

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

5 years agoREGRESSION(r162441): [GTK] ResourceLoader is broken when there aren't user extensions
carlosgc@webkit.org [Wed, 22 Jan 2014 18:47:43 +0000 (18:47 +0000)]
REGRESSION(r162441): [GTK] ResourceLoader is broken when there aren't user extensions
https://bugs.webkit.org/show_bug.cgi?id=127422

Reviewed by Anders Carlsson.

* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::WebGtkExtensionManager::initialize): Always create the
WebKitWebExtension object since it's used internally to implement
the ResourceLoader client.

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

5 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Wed, 22 Jan 2014 18:47:14 +0000 (18:47 +0000)]
Unreviewed EFL gardening

Add some http/tests/websocket/tests/hybi tests to skipped list as they crash
generating thousands lines of error messages.

* platform/efl/TestExpectations:

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

5 years ago[Mac][WK2] Unable to play video protected by session cookies
jer.noble@apple.com [Wed, 22 Jan 2014 18:29:18 +0000 (18:29 +0000)]
[Mac][WK2] Unable to play video protected by session cookies
https://bugs.webkit.org/show_bug.cgi?id=127207

Reviewed by Sam Weinig.

Recent changes in our underlying media frameworks caused our shimmed methods
in CookieStorageShim to stop being called. Insert an objective-c shim in addition
to our original shim to intercept pulling cookies out of cookie storage.

* Shared/mac/CookieStorageShim.mm: Renamed from Source/WebKit2/Shared/mac/CookieStorageShim.cpp.
(WebKit::CookieStorageShim::initialize): Insert the shim.
(-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
    Pass through to webKitCookieStorageCopyRequestHeaderFieldsForURL().
* WebKit2.xcodeproj/project.pbxproj: Rename CookieStorageShim.cpp -> .mm.

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

5 years ago[curl] Improve detecting and handling of SSL client certificate
commit-queue@webkit.org [Wed, 22 Jan 2014 18:20:20 +0000 (18:20 +0000)]
[curl] Improve detecting and handling of SSL client certificate
https://bugs.webkit.org/show_bug.cgi?id=125006

Patch by Robert Sipka <sipka@inf.u-szeged.hu> on 2014-01-22
Reviewed by Brent Fulgham.

Add client certificate handling.

* platform/network/ResourceHandle.h:
* platform/network/curl/ResourceError.h:
(WebCore::ResourceError::hasSSLConnectError):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::setClientCertificateInfo):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
* platform/network/curl/SSLHandle.cpp:
(WebCore::addAllowedClientCertificate):
(WebCore::setSSLClientCertificate):
* platform/network/curl/SSLHandle.h:

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

5 years agoRemove unnecessary include in Noncopyable.h
jae.park@company100.net [Wed, 22 Jan 2014 18:16:42 +0000 (18:16 +0000)]
Remove unnecessary include in Noncopyable.h
https://bugs.webkit.org/show_bug.cgi?id=127406

Reviewed by Anders Carlsson.

* wtf/Noncopyable.h: We don't need Compiler.h as of r162198.

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

5 years agoRemember the Timeline Overview zoom and selection between sessions.
timothy@apple.com [Wed, 22 Jan 2014 17:54:32 +0000 (17:54 +0000)]
Remember the Timeline Overview zoom and selection between sessions.

https://bugs.webkit.org/show_bug.cgi?id=127369

Reviewed by Joseph Pecoraro.

* UserInterface/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):

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

5 years agoShow the Resource and Record selection path in the navigation bar for Timeline views.
timothy@apple.com [Wed, 22 Jan 2014 17:54:28 +0000 (17:54 +0000)]
Show the Resource and Record selection path in the navigation bar for Timeline views.

https://bugs.webkit.org/show_bug.cgi?id=127367

Reviewed by Joseph Pecoraro.

* UserInterface/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected):
* UserInterface/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected):
* UserInterface/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
(WebInspector.OverviewTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected):
* UserInterface/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype.treeElementPathComponentSelected):
(WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
* UserInterface/TimelineContentView.js:
(WebInspector.TimelineContentView.prototype._timelineViewSelectionPathComponentsDidChange):
(WebInspector.TimelineContentView.prototype._showTimelineView):
* UserInterface/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.treeElementForDataGridNode):
(WebInspector.TimelineDataGrid.prototype.dataGridNodeForTreeElement):
* UserInterface/TimelineView.js:
(WebInspector.TimelineView.prototype.get selectionPathComponents):
(WebInspector.TimelineView.prototype.treeElementPathComponentSelected):

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

5 years agoBuild fix for iOS clients of WebUIDelegatePrivate.h.
mitz@apple.com [Wed, 22 Jan 2014 17:35:56 +0000 (17:35 +0000)]
Build fix for iOS clients of WebUIDelegatePrivate.h.

* WebView/WebUIDelegatePrivate.h: Ensure that ENABLE_DASHBOARD_SUPPORT is defined on iOS.

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

5 years ago[CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
commit-queue@webkit.org [Wed, 22 Jan 2014 17:30:13 +0000 (17:30 +0000)]
[CSS Regions] layerOwner in RenderNamedFlowFragment cannot return null
https://bugs.webkit.org/show_bug.cgi?id=127343

Patch by Mihai Maerean <mmaerean@adobe.com> on 2014-01-22
Reviewed by Sam Weinig.

RenderNamedFlowFragment::layerOwner cannot return null because regions create stacking
contexts which create layers.

No new tests, no functional change.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::hasCompositingRegionDescendant):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
* rendering/RenderNamedFlowFragment.h:

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=127380
commit-queue@webkit.org [Wed, 22 Jan 2014 16:41:30 +0000 (16:41 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=127380
Add more methods to WKWebProcessPlugInNodeHandle.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-01-22
Reviewed by Sam Weinig.

Add a static method that creates a WKWebProcessPlugInNodeHandle from a JSValue* and a JSContext*.  Also
add a method to return the iframe's content frame from a WKWebProcessPlugInNodeHandle.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]):
(-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]):

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

5 years agoAvoid unthrottled layer flushes triggered by RenderLayerCompositor::ensureRootLayer
antti@apple.com [Wed, 22 Jan 2014 16:15:53 +0000 (16:15 +0000)]
Avoid unthrottled layer flushes triggered by RenderLayerCompositor::ensureRootLayer
https://bugs.webkit.org/show_bug.cgi?id=127426

Reviewed by Anders Carlsson.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):
(WebCore::RenderLayerCompositor::frameViewDidScroll):

    Factor scroll layer position update to a function.

(WebCore::RenderLayerCompositor::ensureRootLayer):

    Stop calling frameViewDidChangeSize/frameViewDidScroll. Instead call the relevent functions
    directly. This avoid unthrottled layer flush that is done when the view actually scrolls.

* rendering/RenderLayerCompositor.h:

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