WebKit-https.git
6 years ago[GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
mrobinson@webkit.org [Fri, 26 Apr 2013 23:06:10 +0000 (23:06 +0000)]
[GTK] Add methods to add a user style sheet to the WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=99081

Reviewed by Carlos Garcia Campos, Gustavo Noronha Silva, and Benjamin Poulain.

Add methods to WebKitWebViewGroup to add and remove user style sheets.
This allows clients to inject style sheets into pages with a set of
rules for when those style sheets apply.

* UIProcess/API/gtk/WebKitWebViewGroup.cpp:
(toImmutableArray): Added this helper which converts the GList* parameters into
ImmutableArrays for use with the WebKit2 internal API.
(webkit_web_view_group_add_user_style_sheet): Added new API for adding a style sheet.
(webkit_web_view_group_remove_all_user_style_sheets): Add new API for clearing out all style sheets.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Added new method declarations.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API to the documentation.
* UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added a test for the new API.
(isStyleSheetInjectedForURLAtPath): Function to check whether the style sheet has been injected for a given URL.
(fillURLListFromPaths): Helper which converts paths passed via varargs into a whitelist or blacklist.
(removeOldInjectedStyleSheetsAndResetLists): Function to start afresh.
(testWebViewGroupInjectedStyleSheet): The actual test.
(serverCallback): Server callback for use with the test. We cannot use loadHTML or
loadAlternateHTML, because that checks the whitelist and blacklist against about:blank.
(beforeAll): Initialize the server and new test.
(afterAll): Clean up the server.

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

6 years agoUnreviewed build fix.
roger_fong@apple.com [Fri, 26 Apr 2013 22:29:00 +0000 (22:29 +0000)]
Unreviewed build fix.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit):

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

6 years ago2013-04-26 Simon Cooper <scooper@apple.com>
ap@apple.com [Fri, 26 Apr 2013 22:22:53 +0000 (22:22 +0000)]
2013-04-26  Simon Cooper  <scooper@apple.com>

        Permit ~/Library or ~/Library/Preferences to be symlinks
        https://bugs.webkit.org/show_bug.cgi?id=115142
        <rdar://problem/12953603>

        Reviewed by Alexey Proskuryakov.

        Pass in two new parameters which are the resolved paths to ~/Library
        and ~/Library/Preferences. Added new expansion functions and
        substituted the new functions for home-regex, home-subpath and
        home-literal for places referencing resources in "~/Library" or
        "~/Library/Preferences".

        * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
        * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
        * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
        * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
        * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
        * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
        * Shared/mac/ChildProcessMac.mm:
        (WebKit::ChildProcess::initializeSandbox):

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

6 years agoWebCore ObjC bridge is missing support for bool type
msaboff@apple.com [Fri, 26 Apr 2013 22:20:51 +0000 (22:20 +0000)]
WebCore ObjC bridge is missing support for bool type
https://bugs.webkit.org/show_bug.cgi?id=115276

Reviewed by Geoffrey Garen.

Added code to handle conversion between ObjC and JS booleans.

* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeObjcMethod):
* bridge/objc/objc_utility.h:
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
(JSC::Bindings::convertObjcValueToValue):
(JSC::Bindings::objcValueTypeForType):

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

6 years ago [WK2] WKContextClient doesn't need to be versioned yet
ap@apple.com [Fri, 26 Apr 2013 21:54:22 +0000 (21:54 +0000)]
    [WK2] WKContextClient doesn't need to be versioned yet
        https://bugs.webkit.org/show_bug.cgi?id=115279

        Reviewed by Anders Carlsson.

        * Shared/APIClientTraits.cpp:
        * Shared/APIClientTraits.h:
        * UIProcess/API/C/WKContext.h:

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

6 years agoDownloads need to be converted from the NSURLConnection, not canceled and restarted...
andersca@apple.com [Fri, 26 Apr 2013 21:39:27 +0000 (21:39 +0000)]
Downloads need to be converted from the NSURLConnection, not canceled and restarted, when using the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115277
<rdar://problem/12890184>

Reviewed by Sam Weinig.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
Ask the download manager to convert the main resource load to a download.

* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
Add new message.

* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::handle):
Add getter.

* Shared/Downloads/mac/DownloadMac.mm:
(dispatchOnMainThread):
Helper function that ensures that a given block is called on the main thread.

(-[WKDownloadAsDelegate downloadDidBegin:]):
(-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
(-[WKDownloadAsDelegate download:didReceiveResponse:]):
(-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
(-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
(-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
(-[WKDownloadAsDelegate download:didCreateDestination:]):
(-[WKDownloadAsDelegate downloadDidFinish:]):
(-[WKDownloadAsDelegate download:didFailWithError:]):
Use dispatchOnMainThread.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
Remove code that cancels the current load and starts a new download.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertMainResourceLoadToDownload):
Send the ConvertMainResourceLoadToDownload message to the network process.

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

6 years agoUnreviewed. Rebaseline a bunch of tests and run optimize-baselines after disabling...
roger_fong@apple.com [Fri, 26 Apr 2013 21:25:16 +0000 (21:25 +0000)]
Unreviewed. Rebaseline a bunch of tests and run optimize-baselines after disabling sub-pixel layout on mac.
https://bugs.webkit.org/show_bug.cgi?id=114999.

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

6 years agoDisable sub-pixel layout on mac.
roger_fong@apple.com [Fri, 26 Apr 2013 21:19:43 +0000 (21:19 +0000)]
Disable sub-pixel layout on mac.
https://bugs.webkit.org/show_bug.cgi?id=114999.

Reviewed by Simon Fraser.

* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
Export symbol needed to be added for IntRect(const LayoutRect&) constructor,
which is now being used in pixelSnappedIntRect(const LayoutRect&) in LayoutRect.h after disabling sub-pixel layout.

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

6 years agoInspector window is often blank when opened
simon.fraser@apple.com [Fri, 26 Apr 2013 21:13:22 +0000 (21:13 +0000)]
Inspector window is often blank when opened
https://bugs.webkit.org/show_bug.cgi?id=115220
<rdar://problem/13735496>

Reviewed by Tim Horton.

After disabling tiled scrolling and accelerated drawing in r149006, the
Inspector window was often missing its content after opening. This only
happened when the user has a preference on disk to use accelerated drawing
in the Inspector.

The missing content was caused by a failure to connect the correct contextID
for remote layer hosting. On window creation, we hook up a context using
WindowServer layer hosting (the default), but then switch back to app-hosted
layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
but that can be re-entered via its call to sendUpdateBackingStoreState(). In
that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
with a stale layerTreeContext.

Fix by moving the code that exits/enters accelerated compositing mode to before
the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
use of a possibly stale layerTreeContext.

* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):

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

6 years agoLayer-backed WebViews don't repaint content outside the visible area
simon.fraser@apple.com [Fri, 26 Apr 2013 21:13:19 +0000 (21:13 +0000)]
Layer-backed WebViews don't repaint content outside the visible area
https://bugs.webkit.org/show_bug.cgi?id=115275

Reviewed by Beth Dakin.

Source/WebCore:

Export ScrollView::setPaintsEntireContents(bool).

* WebCore.exp.in:

Source/WebKit/mac:

When a client of WebView makes the WebView be layer-backed, then
AppKit propagaes the layer-backing down to the WebHTMLView (but
no further).

In this situation, we had a bug where content that was not
in the visible content rect would not get repainted, because
WebCore clips repaints to the visible rect.

Fix by calling ScrollView::setPaintsEntireContents(bool) from
-[WebHTMLView setLayer:], saying that we need
to paint the entire contents if we have a layer.

* WebView/WebHTMLView.mm:
(-[WebHTMLView setLayer:]):

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

6 years ago[BlackBerry] Check for valid element in elementTouched
commit-queue@webkit.org [Fri, 26 Apr 2013 20:34:12 +0000 (20:34 +0000)]
[BlackBerry] Check for valid element in elementTouched
https://bugs.webkit.org/show_bug.cgi?id=115205

Patch by Nima Ghanavatian <nghanavatian@blackberry.com> on 2013-04-26
Reviewed by Rob Buis.

Internally reviewed by Genevieve Mak.

PR 331546
We might receive a null ptr from nodeAsElementIfApplicable which
is passed in here. Check to make sure it's valid before using.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::elementTouched):

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

6 years agoMake stack tracing more robust
oliver@apple.com [Fri, 26 Apr 2013 20:12:04 +0000 (20:12 +0000)]
Make stack tracing more robust
https://bugs.webkit.org/show_bug.cgi?id=115272

Reviewed by Geoffrey Garen.

CallFrame already handles stack walking confusion robustly,
so we should make sure that the actual walk handles that as well.

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

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

6 years ago Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
ap@apple.com [Fri, 26 Apr 2013 19:42:29 +0000 (19:42 +0000)]
    Crashes under ResourceHandle::continueDidReceiveResponse when loading blobs
        https://bugs.webkit.org/show_bug.cgi?id=115273

        Reviewed by Anders Carlsson.

        Covered by multiple existing tests (when using NetworkProcess), including:
        - http/tests/fileapi/blob-url-in-subframe.html
        - http/tests/fileapi/create-blob-url-from-data-url.html

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
        Work around BlobResourceHandle badness.

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

6 years agoChange RenderMeter::valueRatio() visibility to public
commit-queue@webkit.org [Fri, 26 Apr 2013 19:09:56 +0000 (19:09 +0000)]
Change RenderMeter::valueRatio() visibility to public
https://bugs.webkit.org/show_bug.cgi?id=115266

This function is currently unused.
However, it is necessary to implement a RenderTheme capable of rendering Meter elements.

Patch by Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org> on 2013-04-26
Reviewed by Alexis Menard.

No new tests, because no behaviour is changed.

* rendering/RenderMeter.h:
(RenderMeter):

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

6 years agoAdd Runtime.parse to the Inspector protocol.
timothy@apple.com [Fri, 26 Apr 2013 19:08:33 +0000 (19:08 +0000)]
Add Runtime.parse to the Inspector protocol.

This will be used to parse console expressions for errors
before evaluating them fully.

https://webkit.org/b/115242

Reviewed by Oliver Hunt.

* ForwardingHeaders/parser/ParserError.h: Added.
* inspector/Inspector.json:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::parse):
* inspector/InspectorRuntimeAgent.h:
(InspectorRuntimeAgent):

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

6 years agoFix the copyright years after r149057
benjamin@webkit.org [Fri, 26 Apr 2013 19:04:58 +0000 (19:04 +0000)]
Fix the copyright years after r149057

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-26

* page/DiagnosticLoggingKeys.cpp: I accidentally removed a year from
the copyright in r149057.

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

6 years agoWeb Inspector: Crash due to null items from getDOMStorageItems
commit-queue@webkit.org [Fri, 26 Apr 2013 18:57:35 +0000 (18:57 +0000)]
Web Inspector: Crash due to null items from getDOMStorageItems
https://bugs.webkit.org/show_bug.cgi?id=115176

Patch by Konrad Piascik <kpiascik@blackberry.com> on 2013-04-26
Reviewed by Joseph Pecoraro.

Source/WebCore:

findStorageArea was returning a null storageArea causing the items
input paramater to not be set.  This was happening without any error
being set at all.  Set an error to prevent a crash when we try to
convert the result to a JSON string.

Added tests to check if session and local storage are empty that
they are still functional.

* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):

LayoutTests:

Tests to check that if local and session storage are empty
that they still work corerctly.

* inspector/storage-panel-dom-storage-empty-expected.txt: Added.
* inspector/storage-panel-dom-storage-empty.html: Added.

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

6 years ago [WK2] Remove NetworkResourceLoader::cleanupOnMainThread
ap@apple.com [Fri, 26 Apr 2013 18:40:29 +0000 (18:40 +0000)]
    [WK2] Remove NetworkResourceLoader::cleanupOnMainThread
        https://bugs.webkit.org/show_bug.cgi?id=115268

        Reviewed by Brady Eidson.

        All cleanup() callers are now on main thread, and this indirection only complicates debugging.

        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):
        (WebKit::NetworkResourceLoader::abortInProgressLoad):
        (WebKit::NetworkResourceLoader::didFinishLoading):
        (WebKit::NetworkResourceLoader::didFail):
        * NetworkProcess/NetworkResourceLoader.h:

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

6 years ago[WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by...
aestes@apple.com [Fri, 26 Apr 2013 18:24:08 +0000 (18:24 +0000)]
[WebKit2] CustomProtocolManager's m_registeredSchemes HashSet can be accessed by multiple threads
https://bugs.webkit.org/show_bug.cgi?id=115267

Reviewed by Alexey Proskuryakov.

* Shared/Network/CustomProtocols/CustomProtocolManager.h: Added a Mutex to protect m_registeredSchemes.
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::registerScheme): Acquired the mutex before accessing m_registeredSchemes.
(WebKit::CustomProtocolManager::unregisterScheme): Ditto.
(WebKit::CustomProtocolManager::supportsScheme): Ditto.

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

6 years ago[Mac] media/track/track-mode.html sometimes trigger InvalidStateError
eric.carlson@apple.com [Fri, 26 Apr 2013 18:10:38 +0000 (18:10 +0000)]
[Mac] media/track/track-mode.html sometimes trigger InvalidStateError
https://bugs.webkit.org/show_bug.cgi?id=115045

Reviewed by Alexey Proskuryakov.

* media/track/track-mode.html: Don't assume that the video element is ready for seeking
    after a 100ms timeout.

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

6 years ago Blobs are not associated with connection when there are no sandbox extensions
ap@apple.com [Fri, 26 Apr 2013 17:51:13 +0000 (17:51 +0000)]
    Blobs are not associated with connection when there are no sandbox extensions
        https://bugs.webkit.org/show_bug.cgi?id=115264

        Reviewed by Brady Eidson.

        Covered by multiple fast/files tests when using NetworkProcess.

        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
        (WebKit::NetworkBlobRegistry::registerBlobURL): Fixed a logic error.

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

6 years ago[GTK] Clean up the TestWebKitAPI GNUmakefile.am
zandobersek@gmail.com [Fri, 26 Apr 2013 17:41:17 +0000 (17:41 +0000)]
[GTK] Clean up the TestWebKitAPI GNUmakefile.am
https://bugs.webkit.org/show_bug.cgi?id=115233

Reviewed by Martin Robinson.

Specify unconditional, non-installable program targets in one declaration. Only conditionally specify
WebKit2-specific targets, not the complete target setups (i.e. targets' sources, cppflags listings etc.).
Add missing unit test source files to the TestWTF program, namely HashSet.cpp and MetaAllocator.cpp.
Specify the TestWTF program's CXXFLAGS to be the same as the global cxxflags as the source files need to
be compiled with the -fno-rtti flag that's present in the global_cxxflags variable.

* TestWebKitAPI/GNUmakefile.am:

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

6 years ago[WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
aestes@apple.com [Fri, 26 Apr 2013 16:55:12 +0000 (16:55 +0000)]
[WebKit2] Loading a resource from a custom protocol in a synchronous XHR times out
https://bugs.webkit.org/show_bug.cgi?id=115223

Reviewed by Darin Adler.

Source/WebKit2:

When WebKit performs a synchronous load on the Mac, it spins a nested
run loop in a mode that only accepts input from the NSURLConnection
performing the load. When the load is for a custom protocol in WebKit2,
we proxy it to the UI process via CoreIPC messages, but the response
messages from the UI process are never processed as long as the run
loop is in a non-common mode (and we wouldn't want to process messages
that could re-enter WebCore in the middle of loading, anyway). Since
these messages never make it back to the NSURLConnection handling the
request, the connection eventually times out.

Fix this by using a work queue to handle custom protocol messages in
the networking process. The work queue can process incoming custom
protocol messages while the main thread is blocked.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeConnection): Called
initializeConnection() on all the NetworkProcess's supplements.
* Shared/ChildProcessSupplement.h: Added a base class for
NetworkProcessSupplement and WebProcessSupplement which defines
initializeConnection and provides an empty default implementation.
(WebKit::ChildProcessSupplement::~ChildProcessSupplement):
(WebKit::ChildProcessSupplement::initializeConnection):
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::CustomProtocolManager): Instantiated a
work queue for message processing.
(WebKit::CustomProtocolManager::initializeConnection): Added the work
queue as a message receiver on the CoreIPC connection.
(WebKit::CustomProtocolManager::initialize): If we're in the web
process and the network process is being used, unregister and destroy
the work queue we previously created. It'd be better to not create it
in the first place, but we have to register our work queue with the
CoreIPC connection before it is established, which is before the UI
process has told us whether the network process is in use.
* Shared/Network/NetworkProcessSupplement.h: Inherited from
ChildProcessSupplement.
* WebKit2.xcodeproj/project.pbxproj: Added ChildProcessSupplement.h.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeConnection): Called
initializeConnection() on all the WebProcess's supplements.
* WebProcess/WebProcessSupplement.h: Inherited from
ChildProcessSupplement.

Tools:

Added an API test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added new files.
* TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm: Added.
(TestWebKitAPI::TEST): Tested that a synchronous XHR does not time out
when it loads a request with a custom protocol.
* TestWebKitAPI/Tests/WebKit2/custom-protocol-sync-xhr.html: Added.
* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: Moved the
NSURLProtocol subclass to TestProtocol.{h, mm} and did some
miscellaneous cleanup.
* TestWebKitAPI/mac/TestProtocol.h: Copied from Source/WebKit2/WebProcess/WebProcessSupplement.h.
* TestWebKitAPI/mac/TestProtocol.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm.
(+[TestProtocol canInitWithRequest:]):
(+[TestProtocol canonicalRequestForRequest:]):
(+[TestProtocol requestIsCacheEquivalent:toRequest:]):
(+[TestProtocol scheme]):
(-[TestProtocol startLoading]):
(-[TestProtocol stopLoading]):

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

6 years agoRemove the remaining Skia #ifdefs
mrobinson@webkit.org [Fri, 26 Apr 2013 16:24:37 +0000 (16:24 +0000)]
Remove the remaining Skia #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=114886

Reviewed by Benjamin Poulain.

Source/WebCore:

* html/HTMLCanvasElement.cpp: Remove Skia #ifdef references.
* platform/graphics/BitmapImage.cpp: Ditto.
* platform/graphics/FloatPoint.h: Ditto.
* platform/graphics/FloatRect.h: Ditto.
* platform/graphics/FontCache.h: Ditto.
* platform/graphics/Gradient.cpp: Ditto.
* platform/graphics/Gradient.h: Ditto.
* platform/graphics/GraphicsContext.cpp: Ditto.
* platform/graphics/GraphicsContext.h: Ditto.
* platform/graphics/GraphicsContext3D.h: Ditto.
* platform/graphics/ImageBuffer.cpp: Ditto.
* platform/graphics/ImageBuffer.h: Ditto.
* platform/graphics/ImageBufferData.h: Ditto.
* platform/graphics/IntPoint.h: Ditto.
* platform/graphics/IntRect.h: Ditto.
* platform/graphics/NativeImagePtr.h: Ditto.
* platform/graphics/Path.h: Ditto.
* platform/graphics/Pattern.cpp: Ditto.
* platform/graphics/Pattern.h: Ditto.
* platform/graphics/filters/FEBlend.h: Ditto.
* platform/graphics/filters/FEColorMatrix.h: Ditto.
* platform/graphics/filters/FEComponentTransfer.h: Ditto.
* platform/graphics/filters/FEComposite.h: Ditto.
* platform/graphics/filters/FEConvolveMatrix.h: Ditto.
* platform/graphics/filters/FEDisplacementMap.h: Ditto.
* platform/graphics/filters/FEGaussianBlur.h: Ditto.
* platform/graphics/filters/FELighting.h: Ditto.
* platform/graphics/filters/FEMorphology.h: Ditto.
* platform/graphics/filters/FEOffset.h: Ditto.
* platform/graphics/filters/FilterEffect.cpp: Ditto.
* platform/graphics/filters/FilterEffect.h: Ditto.
* platform/graphics/transforms/AffineTransform.h: Ditto.
* platform/graphics/transforms/TransformationMatrix.h: Ditto.
* platform/image-decoders/ImageDecoder.cpp: Ditto.
* platform/image-decoders/ImageDecoder.h: Ditto.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
* platform/image-decoders/webp/WEBPImageDecoder.cpp: Ditto.
* platform/mac/LocalCurrentGraphicsContext.h: Ditto.
* platform/mac/LocalCurrentGraphicsContext.mm: Ditto.
* rendering/svg/RenderSVGResourceSolidColor.cpp: Ditto.
* svg/graphics/SVGImage.cpp: Ditto.
* svg/graphics/SVGImage.h: Ditto.

Source/WebKit/blackberry:

* Api/WebPage.cpp: Remove Skia #ifdef references.
* WebCoreSupport/AboutDataUseFeatures.in: Ditto.

Source/WTF:

* wtf/Platform.h:

Tools:

* DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
(createBitmapContextFromWebView): Remove Skia #ifdef references.

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

6 years ago[GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
commit-queue@webkit.org [Fri, 26 Apr 2013 16:16:04 +0000 (16:16 +0000)]
[GTK] Compilation of ProcessLauncherGtk.cpp fails due to unresolved symbols
https://bugs.webkit.org/show_bug.cgi?id=115240

Patch by Eduardo Lima Mitev <elima@igalia.com> on 2013-04-26
Reviewed by Martin Robinson.

* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Includes sys/socket.h if OS is Linux

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

6 years agoSort jsc-test-list
ddkilzer@apple.com [Fri, 26 Apr 2013 16:15:12 +0000 (16:15 +0000)]
Sort jsc-test-list

$ sort -f -o LayoutTests/fast/js/jsc-test-list LayoutTests/fast/js/jsc-test-list

* fast/js/jsc-test-list: Sort case-insensitively.

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

6 years agoUpstream iOS changes to jsc-test-list
ddkilzer@apple.com [Fri, 26 Apr 2013 16:15:10 +0000 (16:15 +0000)]
Upstream iOS changes to jsc-test-list

Reviewed by Michael Saboff.

* fast/js/jsc-test-list: Add tests.

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

6 years ago[Qt] Unreviewed gardening. Skip two failing tests.
kadam@inf.u-szeged.hu [Fri, 26 Apr 2013 16:12:44 +0000 (16:12 +0000)]
[Qt] Unreviewed gardening. Skip two failing tests.

* platform/qt/TestExpectations:

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

6 years agoAssert in JSC::Heap::unprotect when closing facebook.com web site
allan.jensen@digia.com [Fri, 26 Apr 2013 16:08:21 +0000 (16:08 +0000)]
Assert in JSC::Heap::unprotect when closing facebook.com web site
https://bugs.webkit.org/show_bug.cgi?id=115058

Reviewed by Darin Adler.

Grab a JSLock before calling RootObject::invalidate().

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):

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

6 years ago[Mac] in-band cues sometimes have incorrect duration
eric.carlson@apple.com [Fri, 26 Apr 2013 15:17:59 +0000 (15:17 +0000)]
[Mac] in-band cues sometimes have incorrect duration
https://bugs.webkit.org/show_bug.cgi?id=115200

Reviewed by Jer Noble.

No new tests, this is not possible to test in DRT.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::addGenericCue): Don't add completed cues to the map.
(WebCore::InbandTextTrack::removeGenericCue): Log when a cue is removed from the track.

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Initialize m_pendingCueStatus.
(WebCore::InbandTextTrackPrivateAVF::processCue): Never call update() on a cue that is delivered
    while seeking.
(WebCore::InbandTextTrackPrivateAVF::beginSeeking): Flush all incomplete cues, remember that
    we are seeking.
(WebCore::InbandTextTrackPrivateAVF::resetCueValues):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek): Call track->beginSeeking() instead of resetCueValues().
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Call track->endSeeking().

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::kind): Include class name in Kind enum values to
    avoid compile error.

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

6 years agoRemove wxWebKit from WebCore.
akling@apple.com [Fri, 26 Apr 2013 15:14:59 +0000 (15:14 +0000)]
Remove wxWebKit from WebCore.
<http://webkit.org/b/115255>

Reviewed by Anders Carlsson.

* DerivedSources.make:
* WebCorePrefix.h:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::port):
* config.h:
* html/HTMLFormElement.cpp:
* platform/ContextMenu.h:
(ContextMenu):
* platform/ContextMenuItem.h:
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/PlatformExportMacros.h:
* platform/PlatformKeyboardEvent.h:
(PlatformKeyboardEvent):
* platform/PlatformMenuDescription.h:
* platform/PlatformMouseEvent.h:
(PlatformMouseEvent):
* platform/PlatformWheelEvent.h:
(PlatformWheelEvent):
* platform/ScrollView.cpp:
* platform/ScrollView.h:
(ScrollView):
* platform/Widget.h:
* platform/win/SharedTimerWin.cpp:

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

6 years agouse-after-free removing a frame from its parent in a beforeload event of an OBJECT...
commit-queue@webkit.org [Fri, 26 Apr 2013 15:13:02 +0000 (15:13 +0000)]
use-after-free removing a frame from its parent in a beforeload event of an OBJECT element
https://bugs.webkit.org/show_bug.cgi?id=113964

Source/WebCore:

Object elements have the tendecny to modify or even fully remove
the containing Document inside beforeload callback. While Document is removed,
RenderArena gets destroyed. Retained RenderWidgets fails to function with NULL arena.

Protect RendereArena from getting wiped out, when Document is removed
during FrameView::updateWidget().

Patch by Zalan Bujtas <zalan@apple.com> on 2013-04-26
Reviewed by Antti Koivisto.

Test: fast/frames/crash-remove-iframe-during-object-beforeload.html

* dom/Document.cpp:
(WebCore::Document::attach):
* dom/Document.h:
(Document):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidgets):
* rendering/RenderArena.h:
(RenderArena):
(WebCore::RenderArena::create):

LayoutTests:

Patch by Zalan Bujtas <zalan@apple.com> on 2013-04-26
Reviewed by Antti Koivisto.

* fast/frames/crash-remove-iframe-during-object-beforeload-expected.txt: Added.
* fast/frames/crash-remove-iframe-during-object-beforeload.html: Added.
* fast/frames/resources/remove-this-during-object-beforeload.html: Added.

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

6 years agoAdd move semantics to RefPtr
mikhail.pozdnyakov@intel.com [Fri, 26 Apr 2013 14:56:21 +0000 (14:56 +0000)]
Add move semantics to RefPtr
https://bugs.webkit.org/show_bug.cgi?id=115033

Reviewed by Anders Carlsson.

Add move constructors and move assignment operators to RefPtr when
COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES).
This obviates unnecessary reffing/ureffing when RefPtr is created
or assigned from rvalue references.

* wtf/RefPtr.h:
(RefPtr):
(WTF::RefPtr::RefPtr):
(WTF::RefPtr::operator=):

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

6 years agoREGRESSION(r149165): It made many tests crash on 32 bit
mhahnenberg@apple.com [Fri, 26 Apr 2013 14:32:22 +0000 (14:32 +0000)]
REGRESSION(r149165): It made many tests crash on 32 bit
https://bugs.webkit.org/show_bug.cgi?id=115227

Reviewed by Csaba Osztrogonác.

m_reservation is uninitialized when ENABLE(SUPER_REGION) is false.

* heap/SuperRegion.cpp:
(JSC::SuperRegion::~SuperRegion):

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

6 years ago[BlackBerry] Should check if it's cached resource before download
mary.wu@torchmobile.com.cn [Fri, 26 Apr 2013 13:59:15 +0000 (13:59 +0000)]
[BlackBerry] Should check if it's cached resource before download
https://bugs.webkit.org/show_bug.cgi?id=115101

Reviewed by Rob Buis.

Since main resource maybe cached, if user want to save the resource, we first check
if it's cached. If yes, don't need to initiate a fresh load again, but get the
cached resource data out to save.

RIM bug# 324003, internally reviewed by Charles Wei.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):

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

6 years ago[GTK] Enable Web Audio layout tests on WK2, provide platform-specific expected output
zandobersek@gmail.com [Fri, 26 Apr 2013 13:20:55 +0000 (13:20 +0000)]
[GTK] Enable Web Audio layout tests on WK2, provide platform-specific expected output
https://bugs.webkit.org/show_bug.cgi?id=114513

Reviewed by Philippe Normand.

Unskip the Web Audio layout tests for GTK WK2 and generate platform-specific baselines for the tests.
The audio baselines are not audibly different from the generic baselines, but it can be expected that
different backends won't produce the same binary output.

The remaining failures are marked as such in the TestExpectations, each failure having the appropriate
bug handle covering the issue. The tests are still skipped for GTK WK1 as DumpRenderTree is still missing
infrastructure support for running these tests.

* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:
* platform/gtk/webaudio/audiobuffersource-loop-points-expected.wav: Added.
* platform/gtk/webaudio/audiobuffersource-playbackrate-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/aac/vbr-128kbps-44khz-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/mp3/128kbps-44khz-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/vorbis/vbr-128kbps-44khz-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/vorbis/vbr-70kbps-44khz-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/vorbis/vbr-96kbps-44khz-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/wav/24bit-22khz-resample-expected.wav: Added.
* platform/gtk/webaudio/codec-tests/wav/24bit-44khz-expected.wav: Added.
* platform/gtk/webaudio/oscillator-custom-expected.wav: Added.
* platform/gtk/webaudio/oscillator-sawtooth-expected.wav: Added.
* platform/gtk/webaudio/oscillator-sine-expected.wav: Added.
* platform/gtk/webaudio/oscillator-square-expected.wav: Added.
* platform/gtk/webaudio/oscillator-triangle-expected.wav: Added.

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

6 years ago[BlackBerry] Clean up load interface in WebPage
mary.wu@torchmobile.com.cn [Fri, 26 Apr 2013 13:16:15 +0000 (13:16 +0000)]
[BlackBerry] Clean up load interface in WebPage
https://bugs.webkit.org/show_bug.cgi?id=113267

Reviewed by Rob Buis.

Source/WebKit/blackberry:

Remove unused loadExtended(), combine load() and download() api in WebPage.
RIM Bug# 315535, internally reviewed by Joe Mason.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::load):
* Api/WebPage.h:

Tools:

Update DumpRenderTree with change of load() interface in WebPage.
RIM Bug# 315535, internally reviewed by Joe Mason.

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::runTest):

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

6 years ago[GTK] Unreviewed gardnering. Unskip passing test.
csaavedra@igalia.com [Fri, 26 Apr 2013 13:09:33 +0000 (13:09 +0000)]
[GTK] Unreviewed gardnering. Unskip passing test.

* platform/gtk/TestExpectations: Unskip http/tests/inspector/compiler-source-mapping-debug.html

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

6 years agoRemove wxWebKit from WTF.
akling@apple.com [Fri, 26 Apr 2013 13:07:25 +0000 (13:07 +0000)]
Remove wxWebKit from WTF.
<http://webkit.org/b/115249>

Reviewed by Antti Koivisto.

* wscript: Removed.
* wtf/ArrayBufferView.h:
(ArrayBufferView):
* wtf/CurrentTime.cpp:
* wtf/DisallowCType.h:
* wtf/ExportMacros.h:
* wtf/FeatureDefines.h:
* wtf/Platform.h:
* wtf/text/WTFString.h:
(String):
* wtf/wx/MainThreadWx.cpp: Removed.
* wtf/wx/StringWx.cpp: Removed.

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

6 years agoOptimize function and interface object length computation in bindings generator
ch.dumez@sisa.samsung.com [Fri, 26 Apr 2013 13:03:23 +0000 (13:03 +0000)]
Optimize function and interface object length computation in bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115247

Reviewed by Kentaro Hara.

Introduce new GetFunctionLength() function that efficiently compute the length
of a function (i.e. its number of mandatory parameters).

We now call GetFunctionLength() instead of GenerateFunctionParametersCheck()
whenever we care only interested in the function length and not the actual
expression for checking the parameters. This is much more efficient as
GenerateFunctionParametersCheck() does a lot more processing than we need in
this case.

No new tests, no behavior change.

* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateImplementation):
(GenerateConstructorHelperMethods):

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

6 years agoRemove the HeapGraphSerializer unit test
zandobersek@gmail.com [Fri, 26 Apr 2013 13:02:53 +0000 (13:02 +0000)]
Remove the HeapGraphSerializer unit test
https://bugs.webkit.org/show_bug.cgi?id=115231

Reviewed by Andreas Kling.

Remove the HeapGraphSerializer unit test. The code it was testing was removed in r148921,
specifically the Source/WebCore/inspector/HeapGraphSerializer.(cpp|h) files.

* TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Removed.

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

6 years agoWeb Audio: Remove reduplicative addInput() in AnalyserNode.
akling@apple.com [Fri, 26 Apr 2013 11:48:15 +0000 (11:48 +0000)]
Web Audio: Remove reduplicative addInput() in AnalyserNode.
<http://webkit.org/b/115244>

From Blink r149155 by <james.wei@intel.com>:

The parent class BasicInspectorNode already called addInput() and addOutput().
So it is reduplicative to call them in AnalyserNode.

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::AnalyserNode):
* Modules/webaudio/AudioBasicInspectorNode.cpp:
(WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
* Modules/webaudio/AudioBasicInspectorNode.h:
(AudioBasicInspectorNode):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):

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

6 years ago[EFL] Add unit test cases for ewk_settings APIs
commit-queue@webkit.org [Fri, 26 Apr 2013 10:30:32 +0000 (10:30 +0000)]
[EFL] Add unit test cases for ewk_settings APIs
https://bugs.webkit.org/show_bug.cgi?id=114897

Patch by Jose Lejin PJ <jose.lejin@gmail.com> on 2013-04-26
Reviewed by Gyuyoung Kim.

Added unit tests for ewk_settings APIs.

* tests/test_ewk_setting.cpp:
(TEST_F):

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

6 years agoMouseenter and mouseleave events not supported
allan.jensen@digia.com [Fri, 26 Apr 2013 09:42:11 +0000 (09:42 +0000)]
Mouseenter and mouseleave events not supported
https://bugs.webkit.org/show_bug.cgi?id=18930

Reviewed by David Hyatt.

Source/WebCore:

Implements mouseenter and mouseleave events from W3C DOM Level 3 Events.
These event are already supported by all other major browsers.

To avoid performance regressions the new events are only dispatched when
there are event listeners for them.

Tests: fast/events/mouseenter-mouseleave-capture.html
       fast/events/mouseenter-mouseleave.html

* bindings/scripts/CodeGenerator.pm:
* dom/Document.cpp:
(WebCore::Document::prepareMouseEvent):
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
(Document):
* dom/Document.idl:
* dom/Element.h:
(Element):
* dom/Element.idl:
* dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::containsCapturing):
* dom/EventListenerMap.h:
(EventListenerMap):
* dom/EventNames.h:
* dom/EventTarget.h:
(EventTarget):
(WebCore::EventTarget::hasCapturingEventListeners):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::toElement):
(WebCore::MouseEvent::fromElement):
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::eventNameForAttributeName):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):
* svg/SVGElementInstance.h:
(SVGElementInstance):
* svg/SVGElementInstance.idl:

LayoutTests:

To new tests that mouseenter and mouseleave works in both bubbling and capture phase.

* fast/events/mouseenter-mouseleave-capture-expected.txt: Added.
* fast/events/mouseenter-mouseleave-capture.html: Added.
* fast/events/mouseenter-mouseleave-expected.txt: Added.
* fast/events/mouseenter-mouseleave.html: Added.

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

6 years agoFix SH4 build broken since r149159.
commit-queue@webkit.org [Fri, 26 Apr 2013 09:36:38 +0000 (09:36 +0000)]
Fix SH4 build broken since r149159.
https://bugs.webkit.org/show_bug.cgi?id=115229

Add BranchTruncateType enum in SH4 port and handle it in branchTruncateDoubleToInt32.

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-04-26
Reviewed by Allan Sandfeld Jensen.

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32):

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

6 years ago[Qt] REGRESSION(r149001): It made two fast/dom/DeviceMotion tests fail.
ch.dumez@sisa.samsung.com [Fri, 26 Apr 2013 09:16:34 +0000 (09:16 +0000)]
[Qt] REGRESSION(r149001): It made two fast/dom/DeviceMotion tests fail.
https://bugs.webkit.org/show_bug.cgi?id=115235

Reviewed by Kentaro Hara.

Update window-property.html test cases for DeviceMotion and DeviceOrientation.
The global constructors are no longer enumerable after r149001.

* fast/dom/DeviceMotion/script-tests/window-property.js:
* fast/dom/DeviceMotion/window-property-expected.txt:
* fast/dom/DeviceOrientation/script-tests/window-property.js:
* fast/dom/DeviceOrientation/window-property-expected.txt:

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

6 years agoAdd support for Web IDL partial interfaces to the bindings generator
ch.dumez@sisa.samsung.com [Fri, 26 Apr 2013 07:29:19 +0000 (07:29 +0000)]
Add support for Web IDL partial interfaces to the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115228

Reviewed by Kentaro Hara.

Add support for Web IDL partial interfaces to the bindings generator:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-partial-interface

Also drop support for the the WebKit-specific [Supplemental] extended
attribute and use partial interfaces instead in existing IDL files.

No new tests, no behavior change.

* Modules/battery/NavigatorBattery.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DataTransferItemFileSystem.idl:
* Modules/filesystem/HTMLInputElementFileSystem.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/NavigatorGamepad.idl:
* Modules/geolocation/NavigatorGeolocation.idl:
* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/WorkerContextIndexedDatabase.idl:
* Modules/mediastream/DOMWindowMediaStream.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NavigatorNetworkInfoConnection.idl:
* Modules/notifications/DOMWindowNotifications.idl:
* Modules/notifications/WorkerContextNotifications.idl:
* Modules/quota/DOMWindowQuota.idl:
* Modules/quota/NavigatorStorageQuota.idl:
* Modules/quota/WorkerNavigatorStorageQuota.idl:
* Modules/speech/DOMWindowSpeech.idl:
* Modules/speech/DOMWindowSpeechSynthesis.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/DOMWindowWebAudio.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/DOMWindowWebSocket.idl:
* Modules/websockets/WorkerContextWebSocket.idl:
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parsePartialDefinition):
* bindings/scripts/generate-bindings.pl:
* bindings/scripts/preprocess-idls.pl:
(getPartialInterfaceNameFromIDLFile):
* bindings/scripts/test/TestSupplemental.idl:
* page/DOMWindowPagePopup.idl:

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

6 years ago[GTK] Plugin process broken due to a missing symbol
zandobersek@gmail.com [Fri, 26 Apr 2013 06:50:05 +0000 (06:50 +0000)]
[GTK] Plugin process broken due to a missing symbol
https://bugs.webkit.org/show_bug.cgi?id=114901

Reviewed by Gustavo Noronha Silva.

Work around the missing symbols in the WebKitPluginProcess by specifying the required libraries
multiple times in the program's LDADD list. Libtool fights fiercely to avoid duplicate static library
references among the linker arguments (even if using the --preserve-dup-deps flag) so the required libraries
are specified in various ways.

The unresolved symbols in object files are no longer ignored as this can lead to further trouble (for instance
this patch also adds a few missing source files to the list of WebKitPluginProcess sources). The Freetype and
gamepad dependencies' libraries are also added to the binary's LDADD list.

* GNUmakefile.am:
* GNUmakefile.list.am: Add a few missing files to the build.

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

6 years ago[CSS Regions] Hit testing is broken for absolutely positioned regions that have overf...
mihnea@adobe.com [Fri, 26 Apr 2013 06:23:53 +0000 (06:23 +0000)]
[CSS Regions] Hit testing is broken for absolutely positioned regions that have overflow: hidden
https://bugs.webkit.org/show_bug.cgi?id=113874

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/regions/hit-test-abspos-overflow-region.html

When a region is an out-of-flow positioned object with an overflow clip, we need
to make sure that hit testing works also for cases other than foreground (content)
hit testing. This patch moves the previous hit testing code, that delegated foreground
hit testing to the region's flow thread hit testing, into the hitTestContent method,
now that RenderRegion is RenderBlock based.

* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::hitTestContents):
* rendering/RenderRegion.h:
(RenderRegion):

LayoutTests:

Add test for hit-testing of border of an out-of-flow region with overflow: hidden.

* fast/regions/hit-test-abspos-overflow-region-expected.txt: Added.
* fast/regions/hit-test-abspos-overflow-region.html: Added.

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

6 years agoCopy and paste can strip !important CSS rules due to a bug in mergeStyleFromRules
rniwa@webkit.org [Fri, 26 Apr 2013 04:51:28 +0000 (04:51 +0000)]
Copy and paste can strip !important CSS rules due to a bug in mergeStyleFromRules
https://bugs.webkit.org/show_bug.cgi?id=115217

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by mergeStyleFromRules overriding "important" style rules with "unimportant" inline styles.
Fixed the bug by using addParsedProperty, which respects !important, in MutableStylePropertySet's
mergeAndOverrideOnConflict, which was only used in editing code. Now that we've fixed this function, we can use
it in ViewportStyleResolver::addViewportRule as well.

Test: editing/pasteboard/copy-paste-with-important-rules.html

* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict): Fixed to respect !important.
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::addViewportRule): Use mergeAndOverrideOnConflict now that the code is identical.

LayoutTests:

Added a regression test.

* editing/pasteboard/copy-paste-with-important-rules-expected.txt: Added.
* editing/pasteboard/copy-paste-with-important-rules.html: Added.

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

6 years agoRemove support for Chromium from build/update scripts
commit-queue@webkit.org [Fri, 26 Apr 2013 04:50:30 +0000 (04:50 +0000)]
Remove support for Chromium from build/update scripts
https://bugs.webkit.org/show_bug.cgi?id=115218

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-25
Reviewed by Darin Adler.

* Scripts/build-webkit:
(writeCongrats):
* Scripts/update-webkit:

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

6 years agoSuperRegion doesn't call deallocate() on its PageReservation
mhahnenberg@apple.com [Fri, 26 Apr 2013 02:47:26 +0000 (02:47 +0000)]
SuperRegion doesn't call deallocate() on its PageReservation
https://bugs.webkit.org/show_bug.cgi?id=115208

Reviewed by Geoffrey Garen.

It should. This doesn't cause us to leak physical memory, but it does cause us to leak virtual
address space (and probably mach ports), which is also bad :-( FixedVMPoolExecutableAllocator
also has this bug, but it doesn't matter much because there's only one instance of that class
throughout the entire lifetime of the process, whereas each VM has its own SuperRegion.

* heap/SuperRegion.cpp:
(JSC::SuperRegion::~SuperRegion):
* heap/SuperRegion.h:
(SuperRegion):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(FixedVMPoolExecutableAllocator):
(JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator):

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

6 years agoRemove support for Chromium from api-test
commit-queue@webkit.org [Fri, 26 Apr 2013 02:30:11 +0000 (02:30 +0000)]
Remove support for Chromium from api-test
https://bugs.webkit.org/show_bug.cgi?id=115211

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-25
Reviewed by Dirk Pranke.

* Scripts/build-api-tests:
* Scripts/run-api-tests:
(isSupportedPlatform):

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

6 years agoGet rid of Chromium in build-dumprendertree
commit-queue@webkit.org [Fri, 26 Apr 2013 01:38:23 +0000 (01:38 +0000)]
Get rid of Chromium in build-dumprendertree
https://bugs.webkit.org/show_bug.cgi?id=115212

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-25
Reviewed by Dirk Pranke.

* Scripts/build-dumprendertree:

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

6 years agoDFG doesn't support to_jsnumber
fpizlo@apple.com [Fri, 26 Apr 2013 01:18:18 +0000 (01:18 +0000)]
DFG doesn't support to_jsnumber
https://bugs.webkit.org/show_bug.cgi?id=115129

Reviewed by Geoffrey Garen.

Based on Oliver's patch. Implements to_jsnumber as Identity(Number:@thingy), and then does
an optimization in Fixup to turn Identity(Number:) into Identity(Int32:) if the predictions
tell us to. Identity is later turned into Phantom.

Also fixed BackPropMask, which appeared to have NodeDoesNotExit included in it. That's
wrong; NodeDoesNotExit is not a backward propagation property.

Also fixed Identity to be marked as CanExit (i.e. not NodeDoesNotExit).

This more than doubles the FPS on ammo.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.h:
(JSC::DFG::canCompileOpcode):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(FixupPhase):
(JSC::DFG::FixupPhase::observeUseKindOnNode):
(JSC::DFG::FixupPhase::observeUseKindOnEdge):
* dfg/DFGNodeFlags.h:
(DFG):
* dfg/DFGNodeType.h:
(DFG):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):

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

6 years agoVersioning.
mrowe@apple.com [Fri, 26 Apr 2013 00:50:24 +0000 (00:50 +0000)]
Versioning.

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

6 years agoAdd support for Math.imul
oliver@apple.com [Fri, 26 Apr 2013 00:41:38 +0000 (00:41 +0000)]
Add support for Math.imul
https://bugs.webkit.org/show_bug.cgi?id=115143

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Add support for Math.imul, a thunk generator for Math.imul,
and an intrinsic.

Fairly self explanatory set of changes, DFG intrinsics simply
leverages the existing ValueToInt32 nodes.

* create_hash_table:
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
(DFG):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithIMul):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/ThunkGenerators.cpp:
(JSC::imulThunkGenerator):
(JSC):
* jit/ThunkGenerators.h:
(JSC):
* runtime/Intrinsic.h:
* runtime/MathObject.cpp:
(JSC):
(JSC::mathProtoFuncIMul):
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):

LayoutTests:

Add a bunch of tests for Math.imul

* fast/js/Object-getOwnPropertyNames-expected.txt:
* fast/js/imul-expected.txt: Added.
* fast/js/imul.html: Added.
* fast/js/regress/imul-double-only-expected.txt: Added.
* fast/js/regress/imul-double-only.html: Added.
* fast/js/regress/imul-int-only-expected.txt: Added.
* fast/js/regress/imul-int-only.html: Added.
* fast/js/regress/imul-mixed-expected.txt: Added.
* fast/js/regress/imul-mixed.html: Added.
* fast/js/regress/script-tests/imul-double-only.js: Added.
(f):
* fast/js/regress/script-tests/imul-int-only.js: Added.
(f):
* fast/js/regress/script-tests/imul-mixed.js: Added.
(f):
* fast/js/script-tests/Object-getOwnPropertyNames.js:
* fast/js/script-tests/imul.js: Added.
(testIMul):

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

6 years agoUnreviewed, roll out http://trac.webkit.org/changeset/148999
fpizlo@apple.com [Fri, 26 Apr 2013 00:40:27 +0000 (00:40 +0000)]
Unreviewed, roll out trac.webkit.org/changeset/148999
It broke http://kripken.github.io/ammo.js/examples/new/ammo.html

Source/JavaScriptCore:

* JavaScriptCore.order:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewArray):
(JSC::BytecodeGenerator::emitThrowReferenceError):
(JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::shouldEmitProfileHooks):
(BytecodeGenerator):
* bytecompiler/NodesCodegen.cpp:
(JSC):
(JSC::NullNode::emitBytecode):
(JSC::BooleanNode::emitBytecode):
(JSC::NumberNode::emitBytecode):
(JSC::StringNode::emitBytecode):
(JSC::IfNode::emitBytecode):
(JSC::IfElseNode::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createIfStatement):
(ASTBuilder):
* parser/NodeConstructors.h:
(JSC):
(JSC::NullNode::NullNode):
(JSC::BooleanNode::BooleanNode):
(JSC::NumberNode::NumberNode):
(JSC::StringNode::StringNode):
(JSC::IfNode::IfNode):
(JSC::IfElseNode::IfElseNode):
* parser/Nodes.h:
(JSC::ExpressionNode::isPure):
(JSC::ExpressionNode::isSubtract):
(StatementNode):
(NullNode):
(JSC::NullNode::isNull):
(BooleanNode):
(JSC::BooleanNode::isPure):
(NumberNode):
(JSC::NumberNode::value):
(JSC::NumberNode::isPure):
(StringNode):
(JSC::StringNode::isPure):
(JSC::StringNode::isString):
(BinaryOpNode):
(IfNode):
(JSC):
(IfElseNode):
(ContinueNode):
(BreakNode):
* parser/Parser.cpp:
(JSC::::parseIfStatement):
* parser/ResultType.h:
(ResultType):
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::pureToBoolean):
* runtime/JSCell.h:
(JSCell):
* runtime/JSCellInlines.h:
(JSC):

Source/WTF:

* wtf/TriState.h:

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

6 years agoStylePropertySet::getPropertyShorthand() should return a String.
akling@apple.com [Fri, 26 Apr 2013 00:33:59 +0000 (00:33 +0000)]
StylePropertySet::getPropertyShorthand() should return a String.
<http://webkit.org/b/115213>

Reviewed by Anders Carlsson.

Return a String directly from getPropertyShorthand() instead of forcing clients
to call getPropertyNameString().

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyShorthand):
* css/StylePropertySet.h:
(StylePropertySet):

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

6 years agoWEB SPEECH: language support does not work as expected
cfleizach@apple.com [Fri, 26 Apr 2013 00:27:56 +0000 (00:27 +0000)]
WEB SPEECH: language support does not work as expected
https://bugs.webkit.org/show_bug.cgi?id=115119

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Make the Mac platform synthesizer have access to all the voices installed on the system.

* WebCore.exp.in:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):

WebKitLibraries:

* WebKitSystemInterface.h:

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

6 years agoSource/WebCore: <meter> element not exposed to accessibility
cfleizach@apple.com [Thu, 25 Apr 2013 23:33:23 +0000 (23:33 +0000)]
Source/WebCore: <meter> element not exposed to accessibility
https://bugs.webkit.org/show_bug.cgi?id=109023
rdar://problem/13658964

Reviewed by Tim Horton.

Makes the <meter> element appear in the AX tree by reusing the
AccessibilityProgressIndicator element to handle either progress or meter
elements.

Test: accessibility/meter-element.html

* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
(WebCore::AXObjectCache::getOrCreate):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::visibleText):
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::AccessibilityProgressIndicator):
(WebCore::AccessibilityProgressIndicator::create):
(WebCore::AccessibilityProgressIndicator::valueForRange):
(WebCore::AccessibilityProgressIndicator::maxValueForRange):
(WebCore::AccessibilityProgressIndicator::minValueForRange):
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityProgressIndicator.h:
(AccessibilityProgressIndicator):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::firstChild):
(WebCore::AccessibilityRenderObject::lastChild):
    These methods are modified to handle when there is no rendered children, but there are Node
    children. The node children are desired when calculating text within a node, for example.

LayoutTests: <meter> element not exposed to accessibility
https://bugs.webkit.org/show_bug.cgi?id=109023

Reviewed by Tim Horton.

* accessibility/meter-element-expected.txt: Added.
* accessibility/meter-element.html: Added.
* platform/mac/accessibility/role-subrole-roledescription-expected.txt:
* platform/mac/accessibility/role-subrole-roledescription.html:

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

6 years agoPreciseJumpTargets should treat loop_hint as a jump target
fpizlo@apple.com [Thu, 25 Apr 2013 23:10:41 +0000 (23:10 +0000)]
PreciseJumpTargets should treat loop_hint as a jump target
https://bugs.webkit.org/show_bug.cgi?id=115209

Reviewed by Mark Hahnenberg.

I didn't add a test but I turned this into a release assertion. Running Octane is enough
to trigger it.

* bytecode/PreciseJumpTargets.cpp:
(JSC::computePreciseJumpTargets):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

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

6 years ago[CSS Shaders] Remove the meshType from the CustomFilterOperation
commit-queue@webkit.org [Thu, 25 Apr 2013 23:06:35 +0000 (23:06 +0000)]
[CSS Shaders] Remove the meshType from the CustomFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=102529

Patch by Qiankun Miao <qiankun.miao@intel.com> on 2013-04-25
Reviewed by Dean Jackson.

No new tests, no new functionality.

MeshType can be accessed from program, so remove the m_meshType
related code in CustomFilterOperation.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
* platform/graphics/filters/CustomFilterOperation.cpp:
(WebCore::CustomFilterOperation::CustomFilterOperation):
(WebCore::CustomFilterOperation::blend):
* platform/graphics/filters/CustomFilterOperation.h:
(WebCore::CustomFilterOperation::create):
(WebCore::CustomFilterOperation::meshType):
(CustomFilterOperation):
(WebCore::CustomFilterOperation::operator==):
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
(WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation):

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

6 years agoSource/JavaScriptCore: Fix problems with processing negative zero on DFG.
commit-queue@webkit.org [Thu, 25 Apr 2013 22:52:34 +0000 (22:52 +0000)]
Source/JavaScriptCore: Fix problems with processing negative zero on DFG.
https://bugs.webkit.org/show_bug.cgi?id=113862

Patch by Roman Zhuykov <zhroma@ispras.ru> on 2013-04-25
Reviewed by Filip Pizlo.

Fix NodeNeedsNegZero flag propagation in BackwardPropagationPhase.
Function arithNodeFlags should not mask NodeNeedsNegZero flag for ArithNegate and DoubleAsInt32
nodes and this flag should be always used to decide where we need to generate nezative-zero checks.
Remove unnecessary negative-zero checks from integer ArithDiv on ARM.
Also remove such checks from integer ArithMod on ARM and X86, and make them always to
check not only "modulo_result == 0" but also "dividend < 0".
Generate faster code for case when ArithMod operation divisor is constant power of 2 on ARMv7
in the same way as on ARMv7s, and add negative-zero checks into this code when needed.
Change speculationCheck ExitKind from Overflow to NegativeZero where applicable.

This shows 30% speedup of math-spectral-norm, and 5% speedup
on SunSpider overall on ARMv7 Linux.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::branchConvertDoubleToInt32):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchConvertDoubleToInt32):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::isNotNegZero):
(JSC::DFG::BackwardsPropagationPhase::isNotPosZero):
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGNode.h:
(JSC::DFG::Node::arithNodeFlags):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileDoubleAsInt32):
(JSC::DFG::SpeculativeJIT::compileSoftModulo):
(JSC::DFG::SpeculativeJIT::compileArithNegate):

LayoutTests: Arithmetic operations with negative zero should be optimized correclty.
https://bugs.webkit.org/show_bug.cgi?id=113862

Patch by Roman Zhuykov <zhroma@ispras.ru> on 2013-04-25
Reviewed by Filip Pizlo.
* fast/js/regress/negative-zero-divide-expected.txt: Added.
* fast/js/regress/negative-zero-divide.html: Added.
* fast/js/regress/negative-zero-modulo-expected.txt: Added.
* fast/js/regress/negative-zero-modulo.html: Added.
* fast/js/regress/negative-zero-negate-expected.txt: Added.
* fast/js/regress/negative-zero-negate.html: Added.
* fast/js/regress/script-tests/negative-zero-divide.js: Added.
(foo):
* fast/js/regress/script-tests/negative-zero-modulo.js: Added.
(foo):
* fast/js/regress/script-tests/negative-zero-negate.js: Added.
(foo):

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

6 years agoIgnore invalid regular expressions for input[pattern].
tkent@chromium.org [Thu, 25 Apr 2013 22:51:08 +0000 (22:51 +0000)]
Ignore invalid regular expressions for input[pattern].
https://bugs.webkit.org/show_bug.cgi?id=115204

Reviewed by Darin Adler.

Source/WebCore:

According to the specification, we should not proceed regular expression
matching if a pattern attribute value is an invalid regular
expression. We had a bug that invalid expressions such as
pattern=")foo(" made RegularExpression objects successfully.

http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute
> If an input element has a pattern attribute specified, and the
> attribute's value, when compiled as a JavaScript regular expression with
> the global, ignoreCase, and multiline flags disabled (see ECMA262
> Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles successfully,
> then the resulting regular expression is the element's compiled pattern
> regular expression. If the element has no such attribute, or if the
> value doesn't compile successfully, then the element has no compiled
> pattern regular expression.

This imports a part of Blink r148951.

Tests: Update fast/forms/ValidityState-patternMismatch.html

* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
Check correctness of pattern attribute value before wrapping with parentheses.
* platform/text/RegularExpression.cpp:
(WebCore::RegularExpression::isValid): Added.
* platform/text/RegularExpression.h:
(RegularExpression): Declare isValid.

LayoutTests:

* fast/forms/ValidityState-patternMismatch-expected.txt:
* fast/forms/ValidityState-patternMismatch.html:

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

6 years agoFix 32bit build
oliver@apple.com [Thu, 25 Apr 2013 22:50:07 +0000 (22:50 +0000)]
Fix 32bit build

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

6 years agoBuild fix for smart compliers.
simon.fraser@apple.com [Thu, 25 Apr 2013 22:37:22 +0000 (22:37 +0000)]
Build fix for smart compliers.

Reviewed by Tim Horton.

[NSDictionary dictionaryWithObjectsAndKeys:] returns an NSDictionary,
not a NSMutableDictionary.

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::updateSpellingUIWithGrammarString):

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

6 years ago Pass relatedPage when creating a page in WebKitTestRunner
ap@apple.com [Thu, 25 Apr 2013 22:25:07 +0000 (22:25 +0000)]
    Pass relatedPage when creating a page in WebKitTestRunner
        https://bugs.webkit.org/show_bug.cgi?id=115206

        Reviewed by Geoffrey Garen.

        To make sure that window.open() opens in the same process even when using multiple processes.

        * WebKitTestRunner/PlatformWebView.h:
        * WebKitTestRunner/TestController.cpp:
        (WTR::TestController::createOtherPage):
        (WTR::TestController::createWebViewWithOptions):
        * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/mac/PlatformWebViewMac.mm:
        (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:relatedToPage:useTiledDrawing:]):
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
        (WTR::PlatformWebView::PlatformWebView):
        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
        (WTR::PlatformWebView::PlatformWebView):

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

6 years agoRename DecidePolicyForResponse message to DecidePolicyForResponseSync
andersca@apple.com [Thu, 25 Apr 2013 22:23:39 +0000 (22:23 +0000)]
Rename DecidePolicyForResponse message to DecidePolicyForResponseSync
https://bugs.webkit.org/show_bug.cgi?id=115207

Reviewed by Beth Dakin.

In preparation for adding a new async DecidePolicyForResponse message,
rename the current one to DecidePolicyForResponseSync. Also split out the async part
into a separate WebPageProxy::decidePolicyForResponse member function.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForResponse):
(WebKit::WebPageProxy::decidePolicyForResponseSync):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

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

6 years agoStack guards are too conservative
oliver@apple.com [Thu, 25 Apr 2013 22:17:34 +0000 (22:17 +0000)]
Stack guards are too conservative
https://bugs.webkit.org/show_bug.cgi?id=115147

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

Increase stack guard to closer to old size.

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

Source/WTF:

Use getrlimit on darwin to get the stack size for the main thread.

* wtf/StackBounds.cpp:
(WTF::StackBounds::initialize):

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

6 years ago[BlackBerry] Selection overlay on non-composited iframes are incorrectly positioned.
commit-queue@webkit.org [Thu, 25 Apr 2013 21:39:35 +0000 (21:39 +0000)]
[BlackBerry] Selection overlay on non-composited iframes are incorrectly positioned.
https://bugs.webkit.org/show_bug.cgi?id=115197

Patch by Andrew Lo <anlo@rim.com> on 2013-04-25
Reviewed by Rob Buis.

When drawing the selection overlay, the rects to
paint when selecting text on non-composited sub-frames
need to be adjusted by the frame position.

* WebKitSupport/SelectionOverlay.cpp:
(BlackBerry::WebKit::SelectionOverlay::paintContents):

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

6 years agoGlyphs may fail to render when using SVG font
graouts@apple.com [Thu, 25 Apr 2013 21:29:45 +0000 (21:29 +0000)]
Glyphs may fail to render when using SVG font
https://bugs.webkit.org/show_bug.cgi?id=115193

Reviewed by Simon Fraser.

Calling SimpleFontData::applyTransforms() when the font used is
an SVG font makes little sense since Core Text doesn’t know or
understand SVG fonts and would be passed some other, unrelated
platform font.

* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::applyTransforms):

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

6 years agoFix autocompletion for Benjamin. The Bugzilla email address must come first.
rniwa@webkit.org [Thu, 25 Apr 2013 21:21:07 +0000 (21:21 +0000)]
Fix autocompletion for Benjamin. The Bugzilla email address must come first.

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

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

6 years agoMedia elements shouldn't resume playback when a page is restored from the back/forwar...
jer.noble@apple.com [Thu, 25 Apr 2013 21:02:20 +0000 (21:02 +0000)]
Media elements shouldn't resume playback when a page is restored from the back/forward cache if the WKView isn't in a window
https://bugs.webkit.org/show_bug.cgi?id=115191

Reviewed by Eric Carlson.

If a page is suspended, then resumed when its WebView or WKView has been removed from a window,
the page's media elements will unpause. Check whether media is allowed to start during resume()
via Page::canMediaStart() and if not, register for mediaCanStart notifications. Then, in
mediaCanStart() if the media is force-paused, unpause it.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::mediaCanStart):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::pageConsentRequiredForResume):

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

6 years ago Update a comment, mentioning a newly filed bug.
ap@apple.com [Thu, 25 Apr 2013 21:01:13 +0000 (21:01 +0000)]
    Update a comment, mentioning a newly filed bug.

        * platform/wk2/TestExpectations:

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

6 years agoRemove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
akling@apple.com [Thu, 25 Apr 2013 20:37:50 +0000 (20:37 +0000)]
Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.

Rubber-stamped by Anders Koivisto.

Source/WebCore:

* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):

Source/WebKit:

* PlatformWinCE.cmake:

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataEnableFeatures.in:

Source/WTF:

* wtf/FeatureDefines.h:

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

6 years agoRemove OS(WINCE) from AccessibilityObject.h
paroga@webkit.org [Thu, 25 Apr 2013 20:26:56 +0000 (20:26 +0000)]
Remove OS(WINCE) from AccessibilityObject.h
https://bugs.webkit.org/show_bug.cgi?id=115192

Reviewed by Andreas Kling.

Use the same files like the the other PLATFORM(WIN) ports use.

Source/WebCore:

* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
(AccessibilityObject):

Source/WebKit:

* PlatformWinCE.cmake:

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

6 years agoAdd definition of GlyphBufferGlyph for BlackBerry
commit-queue@webkit.org [Thu, 25 Apr 2013 20:11:06 +0000 (20:11 +0000)]
Add definition of GlyphBufferGlyph for BlackBerry
https://bugs.webkit.org/show_bug.cgi?id=115183

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-04-25
Reviewed by Xan Lopez.

BlackBerry uses an unsigned int.

* platform/graphics/GlyphBuffer.h:
(WebCore):

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

6 years ago[BlackBerry] Make scroll position adjustment work with pages with fixed position...
commit-queue@webkit.org [Thu, 25 Apr 2013 20:02:55 +0000 (20:02 +0000)]
[BlackBerry] Make scroll position adjustment work with pages with fixed position elements.
https://bugs.webkit.org/show_bug.cgi?id=115178

Patch by Iris Wu <shuwu@blackberry.com> on 2013-04-25
Reviewed by Rob Buis.

PR 308796

Currently the position WebPage::adjustDocumentScrollPosition adjusts is the top
left point of the viewport.
On the page with fixed position elements, we want it to adjust the position beneath
the fixed elements so it can be always visible.

The basic idea is:
1.  Detect if there are fixed position elements before going through ProximityDetector.
2.  If the fixed element exists, calculate its the size and the actual visible position
    beneath it.
3.  Pass the position to ProximityDetector. Then according to the new position we get,
    calculate the top left position of the viewport (final scroll position).

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::fixedElementSizeDelta):
(WebKit):
* Api/WebPage.h:
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::findFixedElementRect):
(WebKit):
* Api/WebPageCompositor_p.h:
(WebPageCompositorPrivate):

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

6 years agoStack guards are too conservative
oliver@apple.com [Thu, 25 Apr 2013 20:00:36 +0000 (20:00 +0000)]
Stack guards are too conservative
https://bugs.webkit.org/show_bug.cgi?id=115147

Reviewed by Geoffrey Garen.

Reduce the limits and simplify the decision making.

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

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

6 years ago[BlackBerry] Enable balanced page group load deferrer behaviour.
commit-queue@webkit.org [Thu, 25 Apr 2013 19:56:58 +0000 (19:56 +0000)]
[BlackBerry] Enable balanced page group load deferrer behaviour.
https://bugs.webkit.org/show_bug.cgi?id=115189

Patch by Mike Lattanzio <mlattanzio@blackberry.com> on 2013-04-25
Reviewed by Rob Buis.

Prevent a possible deadlock by enabling balanced deferrers.
Internally reviewed by: Joe Mason
PR 329986

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):

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

6 years agoJSC: Fix interpreter misbehavior in builds with JIT disabled
commit-queue@webkit.org [Thu, 25 Apr 2013 19:54:53 +0000 (19:54 +0000)]
JSC: Fix interpreter misbehavior in builds with JIT disabled
https://bugs.webkit.org/show_bug.cgi?id=115190

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-04-25
Reviewed by Oliver Hunt.

Commit http://trac.webkit.org/changeset/147858 modified
some details on how JS stack traces are built. The method
"getLineNumberForCallFrame", renamed in that changeset to
"getBytecodeOffsetForCallFrame" is always returning `0' when
JIT is disabled

How to reproduce:
 - Build webkit with JIT disabled
 - Open MiniBrowser, for example, with http://google.com
 - In a debug build, WebProcess will hit the following ASSERT:
   Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp:279 ASSERT(low);

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

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

6 years agoBuild fix. Forgot to merge args.
rniwa@webkit.org [Thu, 25 Apr 2013 19:50:03 +0000 (19:50 +0000)]
Build fix. Forgot to merge args.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Hi.execute):

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

6 years agowebkitbot should recognize its own nickname in greetings.
rniwa@webkit.org [Thu, 25 Apr 2013 19:44:20 +0000 (19:44 +0000)]
webkitbot should recognize its own nickname in greetings.
https://bugs.webkit.org/show_bug.cgi?id=115196

Reviewed by Andreas Kling.

Make webkitbot recognize other forms of its nick. Also be tolerant of spaces between the nick and !.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Hi.execute):

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

6 years agoScriptExecutionContext log exception should include a column number
joepeck@webkit.org [Thu, 25 Apr 2013 19:31:50 +0000 (19:31 +0000)]
ScriptExecutionContext log exception should include a column number
https://bugs.webkit.org/show_bug.cgi?id=114315

Reviewed by Oliver Hunt.

Source/WebCore:

Test: inspector/console/console-exception-stack-traces.html

* bindings/js/ScriptCallStackFactory.h:
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Generate a ScriptCallStack from an exception. Use the vm.exceptionStack
if available, and fallback to the exception object where needed.

* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Always include a non-empty call stack with exceptions.
Where not provided, fallback to the exception object.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::PendingException::PendingException):
(ScriptExecutionContext::PendingException):
(WebCore::ScriptExecutionContext::reportException):
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/SharedWorkerContext.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):
Plumb columnNumber through as needed.

LayoutTests:

* inspector/console/console-exception-stack-traces-expected.txt: Added.
* inspector/console/console-exception-stack-traces.html: Added.
Verifies that exceptions have stack traces and match a console.trace stack.

* http/tests/inspector-enabled/console-exception-while-no-inspector-expected.txt: Removed.
* http/tests/inspector-enabled/console-exception-while-no-inspector.html: Removed.
We now save exception backtraces even if the inspector is not open.

* fast/dom/javascript-url-exception-isolation-expected.txt
* fast/events/remove-target-with-shadow-in-drag-expected.txt
* fast/events/set-attribute-listener-window-onerror-crash-expected.txt
* inspector-protocol/media-query-listener-exception-expected.txt:
* inspector/console/console-uncaught-exception-expected.txt:
* inspector/console/console-uncaught-exception-in-eval-expected.txt:
Update results that now include backtraces or different data. Most better, some worse.

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

6 years agoMake checkSyntax take a VM instead of an ExecState
oliver@apple.com [Thu, 25 Apr 2013 18:59:50 +0000 (18:59 +0000)]
Make checkSyntax take a VM instead of an ExecState

RS=Tim

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

6 years agoFix build files so WebGLDebugXXX extensions can be used if enabled.
gman@chromium.org [Thu, 25 Apr 2013 18:50:46 +0000 (18:50 +0000)]
Fix build files so WebGLDebugXXX extensions can be used if enabled.
https://bugs.webkit.org/show_bug.cgi?id=113976

Reviewed by Dean Jackson.

No new tests as no new functionality.

* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:

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

6 years ago32 Bit: Crash due to RegExpTest nodes not setting result type to Boolean
msaboff@apple.com [Thu, 25 Apr 2013 18:35:04 +0000 (18:35 +0000)]
32 Bit: Crash due to RegExpTest nodes not setting result type to Boolean
https://bugs.webkit.org/show_bug.cgi?id=115188

Reviewed by Geoffrey Garen.

Changed the RegExpTest node to set the AbstractValue to boolean, since that
what it is.

* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::executeEffects):

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

6 years agocloneChildNodes looks for deleteButtonController in each level of recursion
rniwa@webkit.org [Thu, 25 Apr 2013 18:33:22 +0000 (18:33 +0000)]
cloneChildNodes looks for deleteButtonController in each level of recursion
https://bugs.webkit.org/show_bug.cgi?id=115146

Reviewed by Andreas Kling.

Obtain the delete button controller upfront, and shallow copy descendents of each child
so that we don't look for the delete button controller inside cloneNode called on each child.

Performance Tests: DOM/CloneNodes.html

* dom/ContainerNode.cpp:
(WebCore::cloneChildNodesAvoidingDeleteButon): Extracted.
(WebCore::ContainerNode::cloneChildNodes):

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

6 years agoHTMLOptionsCollection's namedItem and name getter should return the first item
rniwa@webkit.org [Thu, 25 Apr 2013 18:32:06 +0000 (18:32 +0000)]
HTMLOptionsCollection's namedItem and name getter should return the first item
https://bugs.webkit.org/show_bug.cgi?id=115150

Reviewed by Andreas Kling.

Source/WebCore:

Following the resolution in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038355.html,
the spefication has been updated to only return the first item when there are multiple items of the same name
in HTMLOptionsCollection; this new behavior matches that of Firefox and Opera (Presto).

Implement this new behavior to remove the custom binding code and use the fast path in namedItem and name
getter of HTMLOptionsCollection. (Obtaining all items for a given name is expensive!).

Tests: fast/dom/HTMLSelectElement/named-options.html
       fast/dom/html-collections-named-getter.html

* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore): Removed the custom bindings for name getter and namedItem.
* html/HTMLOptionsCollection.idl:

LayoutTests:

Changed the expectations of the tests.

* fast/dom/HTMLSelectElement/named-options-expected.txt:
* fast/dom/HTMLSelectElement/script-tests/named-options.js:
* fast/dom/html-collections-named-getter-expected.txt:
* fast/dom/html-collections-named-getter.html:

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

6 years agoWeb Inspector: ConsoleMessage should include line and column number where possible
joepeck@webkit.org [Thu, 25 Apr 2013 18:31:05 +0000 (18:31 +0000)]
Web Inspector: ConsoleMessage should include line and column number where possible
https://bugs.webkit.org/show_bug.cgi?id=114929

Source/WebCore:

  - adds "m_column" to WebCore::ConsoleMessage
  - adds "column" to Console.ConsoleMessage in the inspector protocol
  - set the column number for console.* functions (Console.cpp)
  - set the column number for XSLT errors (XSLTProcessor)
  - plumb columnNumber everywhere else it is needed, set it to 0 and file
    bugs for all cases missing columnNumber that could provide it.

Reviewed by Timothy Hatcher.

Test: inspector/console/console-url-line-column.html
      inspector/console/console-messages-stack-traces.html

* inspector/ConsoleMessage.h:
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
(WebCore::ConsoleMessage::autogenerateMetadata):
(WebCore::ConsoleMessage::addToFrontend):
(WebCore::ConsoleMessage::isEqual):
Add m_column and set it where appropriate.

* inspector/Inspector.json:
Add column property to Console.ConsoleMessage.

* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
Set columnNumber like lineNumber from the last stack frame.
(WebCore::Console::groupEnd):
Line and column are unused in this message type, set both to 0.

* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
* xml/XSLTProcessorQt.cpp:
(WebCore::XSLTMessageHandler::handleMessage):
Add real column numbers, the XSLT handlers already had it available.

* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::addConsoleMessage):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::addMessage):
* dom/Document.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
(WebCore::InspectorConsoleAgent::stopTiming):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addProfileImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
(WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::addMessageToConsole):
* page/ChromeClient.h:
(WebCore::ChromeClient::addMessageToConsole):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::logToConsole):
* page/PageConsole.cpp:
(WebCore::PageConsole::addMessage):
* page/PageConsole.h:
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::postExceptionTask):
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
(WebCore::WorkerContext::addConsoleMessage):
(WebCore::WorkerContext::addMessage):
(WebCore::WorkerContext::addMessageToWorkerConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::create):
(WebCore::WorkerExceptionTask::WorkerExceptionTask):
(WebCore::WorkerExceptionTask::performTask):
(WorkerExceptionTask):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
* workers/WorkerMessagingProxy.h:
(WorkerMessagingProxy):
* workers/WorkerReportingProxy.h:
(WorkerReportingProxy):
Plumb columnNumber through where appropriate. File bugs where missing.

Source/WebKit/blackberry:

Reviewed by Timothy Hatcher.

* Api/DumpRenderTreeClient.h:
* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::addMessageToConsole):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Source/WebKit/efl:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::addMessageToConsole):
* WebCoreSupport/ChromeClientEfl.h:
(ChromeClientEfl):

Source/WebKit/gtk:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::addMessageToConsole):
* WebCoreSupport/ChromeClientGtk.h:
(ChromeClient):

Source/WebKit/mac:

Reviewed by Timothy Hatcher.

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole):

Source/WebKit/qt:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::addMessageToConsole):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

Reviewed by Timothy Hatcher.

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::addMessageToConsole):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

Reviewed by Timothy Hatcher.

* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::addMessageToConsole):
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit2:

Reviewed by Timothy Hatcher.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::addMessageToConsole):
* WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

Update a test that was outputting the url and line number of console
method calls, to output the column number as well. Added a test that
verifies that console API messages have stack traces if appropriate.

Reviewed by Timothy Hatcher.

* inspector/console/console-url-and-line-expected.txt: Removed.
* inspector/console/console-url-line-column-expected.txt: Added.
* inspector/console/console-url-line-column.html: Renamed from LayoutTests/inspector/console/console-url-and-line.html.
* inspector/console/console-messages-stack-traces-expected.txt: Added.
* inspector/console/console-messages-stack-traces.html: Added.

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

6 years ago[BlackBerry] Get rid of return in void method
commit-queue@webkit.org [Thu, 25 Apr 2013 18:29:07 +0000 (18:29 +0000)]
[BlackBerry] Get rid of return in void method
https://bugs.webkit.org/show_bug.cgi?id=115186

Patch by Konrad Piascik <kpiascik@blackberry.com> on 2013-04-25
Reviewed by Rob Buis.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::setForcedTextEncoding):

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

6 years ago[Qt] Animated opacity does not trigger accelerated compositing
allan.jensen@digia.com [Thu, 25 Apr 2013 18:19:05 +0000 (18:19 +0000)]
[Qt] Animated opacity does not trigger accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=115107

Reviewed by Simon Fraser.

Source/WebCore:

Add extra option to also trigger compositing on animated opacity.

* page/ChromeClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):

Source/WebKit/qt:

We should trigger compositing on animated opacity as it is always faster on Qt.

* WebCoreSupport/ChromeClientQt.cpp:
VideoTrigger removed because we have already disabled AC for video in qwebsettings.

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

6 years agoUnreviewed. Adding myself to the reviwers list.
achicu@adobe.com [Thu, 25 Apr 2013 18:09:10 +0000 (18:09 +0000)]
Unreviewed. Adding myself to the reviwers list.

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

6 years agoThread safety issues in WKCustomProtocol.
beidson@apple.com [Thu, 25 Apr 2013 17:59:07 +0000 (17:59 +0000)]
Thread safety issues in WKCustomProtocol.
<rdar://problem/13247304> and https://bugs.webkit.org/show_bug.cgi?id=115185

Reviewed by Alexey Proskuryakov.

* Shared/Network/CustomProtocols/CustomProtocolManager.h:

* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::addCustomProtocol): Protect m_customProtocolMap with its mutex.
(WebKit::CustomProtocolManager::removeCustomProtocol): Ditto.
(WebKit::CustomProtocolManager::didFailWithError):
(WebKit::CustomProtocolManager::didLoadData):
(WebKit::CustomProtocolManager::didReceiveResponse):
(WebKit::CustomProtocolManager::didFinishLoading):
(WebKit::CustomProtocolManager::protocolForID): Protect m_customProtocolMap with its mutex, and return
  a RetainPtr instead of a raw pointer.

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

6 years agoSec-WebSocket-Extensions header field must not appear more than once in an HTTP response.
commit-queue@webkit.org [Thu, 25 Apr 2013 17:48:58 +0000 (17:48 +0000)]
Sec-WebSocket-Extensions header field must not appear more than once in an HTTP response.
https://bugs.webkit.org/show_bug.cgi?id=115128

Patch by Lamarque V. Souza <Lamarque.Souza@basyskom.com> on 2013-04-25
Reviewed by Alexey Proskuryakov.

Source/WebCore:

According to WebSocket specification Sec-WebSocket-Extensions header field
must not appear more than once in an HTTP response. It is ok if it appears
more than once in client request. Also add a check for invalid UTF-8
characters when parsing Sec-WebSocket-Extensions quoted string.

Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header.html

* Modules/websockets/WebSocketExtensionParser.cpp:
(WebCore::WebSocketExtensionParser::consumeQuotedString): Return false if there is
invalid character in the quoted string being parsed.
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders): Check if Sec-WebSocket-Extensions
appears more than once in header response. Abort handshake if it does.

LayoutTests:

* http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header_wsh.py: Added.

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

6 years agoFurther build fixes: correct two more misnames of WebProcessShim.dyld.
jer.noble@apple.com [Thu, 25 Apr 2013 17:31:05 +0000 (17:31 +0000)]
Further build fixes: correct two more misnames of WebProcessShim.dyld.

* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
(WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:

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

6 years agoMake gobject-introspection warnings non-fatal
mrobinson@webkit.org [Thu, 25 Apr 2013 17:12:30 +0000 (17:12 +0000)]
Make gobject-introspection warnings non-fatal
https://bugs.webkit.org/show_bug.cgi?id=115184

Reviewed by Carlos Garcia Campos.

* GNUmakefile.am: Make it so that gobject-introspection errors do not fail the buld
until we get to a point where gobject-introspection gives consistent warnings.

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

6 years ago[GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
carlosgc@webkit.org [Thu, 25 Apr 2013 16:46:55 +0000 (16:46 +0000)]
[GTK] Add WebKitWebViewGroup to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=111265

Reviewed by Anders Carlsson.

In the current API the settings are always shared by all web
views, because they are always created on the default page
group. This makes impossible to have different settings on
different web views. Expose the page group in the API,
so that users can create web views on a group different than the
default one to have their own settings.

* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkitSettingsGetPreferences): Helper private method to get the
WebPreferences wrapped by a WebKitSettings object.
* UIProcess/API/gtk/WebKitSettingsPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(_WebKitWebContextPrivate): Add a default WebKitWebViewGroup.
(webkitWebContextCreatePageForWebView): Create the WebPageProxy
with the WebPageGroup of the given WebKitWebViewGroup.
(webkitWebContextGetDefaultWebViewGroup): Helper private method to
get the default WebKitWebViewGroup.
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(_WebKitWebViewPrivate): Add a WebKitWebViewGroup in case the view
is created with a group.
(webkitWebViewUpdateSettings): Keep a reference of the group
settings to be able to disconnect the signals when the settings
object is replaced in the view group and connect to the signals
for the custom settings.
(webkitWebViewSettingsChanged): Disconnect the signals for the
previous settings and set the new settings.
(webkitWebViewDisconnectSettingsChangedSignalHandler): Disconnect
notify::settings signal of WebKitWebViewGroup.
(webkitWebViewConstructed): Pass the current WebKitWebViewGroup to
webkitWebContextCreatePageForWebView().
(webkitWebViewSetProperty): Add setter for group property.
(webkitWebViewGetProperty): Add getter for group property.
(webkitWebViewDispose): Call
webkitWebViewDisconnectSettingsChangedSignalHandler().
(webkit_web_view_class_init): Add WebKitWebView:group property.
(webkitWebViewHandleAuthenticationChallenge): Use
webkit_web_view_get_settings().
(webkit_web_view_new_with_group): Create a new web view with the
given WebKitWebViewGroup.
(webkit_web_view_get_group): Return the current WebKitWebViewGroup
or the default one if the view was not created with
webkit_web_view_new_with_group().
(webkit_web_view_set_settings): Set the settings of the current
WebKitWebViewGroup.
(webkit_web_view_get_settings): Get the settings of the current
WebKitWebViewGroup.
(webkit_web_view_set_zoom_level): Use
webkit_web_view_get_settings().
(webkit_web_view_get_zoom_level): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewGroup.cpp: Added.
(_WebKitWebViewGroupPrivate):
(webkitWebViewGroupSetProperty):
(webkitWebViewGroupGetProperty):
(webkitWebViewGroupConstructed):
(webkit_web_view_group_class_init):
(webkitWebViewGroupAttachSettingsToPageGroup): Set the
WebPreferences of the current WebKitSettings to the WebPageGroup.
(webkitWebViewGroupCreate): Create a new WebKitWebViewGroup for
the given WebPageGroup.
(webkitWebViewGroupGetPageGroup): Helper private method to get the
WebPageGroup wrapped by the WebKitWebViewGroup.
(webkit_web_view_group_new): Create a new WebKitWebViewGroup.
(webkit_web_view_group_get_name): Return the name of a
WebKitWebViewGroup.
(webkit_web_view_group_get_settings): Get the settings of a
WebKitWebViewGroup.
(webkit_web_view_group_set_settings): Set new settings of a
WebKitWebViewGroup.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Added.
(_WebKitWebViewGroup):
(_WebKitWebViewGroupClass):
* UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Added.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
WebKitWebViewGroup section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/docs/webkit2gtk.types: Add
webkit_web_view_group_get_type.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
compilation.
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewSettings): We can't watch settings in the default view
group anymore, because they are not released with the web view but
with the web context that is freed after the Test destructor.
* UIProcess/API/gtk/tests/TestWebKitWebViewGroup.cpp: Added.
(testWebViewGroupDefault):
(testWebViewGroupNewGroup):
(testWebViewNewWithGroup):
(testWebViewGroupSettings):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/webkit2.h: Include WebKitWebViewGroup.h.

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

6 years ago[Windows] Compile fix.
commit-queue@webkit.org [Thu, 25 Apr 2013 16:39:56 +0000 (16:39 +0000)]
[Windows] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=115170

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-04-25
Reviewed by Filip Pizlo.

Forward declare function, instead of including intrin.h.

* wtf/Atomics.h:

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