WebKit-https.git
6 years agoUse the system string for telephone number menu
timothy_horton@apple.com [Sat, 6 Dec 2014 01:01:48 +0000 (01:01 +0000)]
Use the system string for telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=139324
<rdar://problem/18726471>

Reviewed by Anders Carlsson.

* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumberGroup):
Make use of the SPI to retrieve the string if it exists.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/TUCallSPI.h: Added.
Add an SPI header.

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

6 years agoURTBF, EFL is happy now.
ossy@webkit.org [Sat, 6 Dec 2014 00:42:00 +0000 (00:42 +0000)]
URTBF, EFL is happy now.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::createNonPersistent):

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

6 years agoGet rid of config.h includes and include config.h in the prefix header instead
andersca@apple.com [Sat, 6 Dec 2014 00:33:33 +0000 (00:33 +0000)]
Get rid of config.h includes and include config.h in the prefix header instead
https://bugs.webkit.org/show_bug.cgi?id=139323

Reviewed by Brent Fulgham.

This is making it easier to share code between WebKit1 for Mac and WebKit1 for Windows.

* AccessibleBase.cpp:
* AccessibleDocument.cpp:
* AccessibleImage.cpp:
* AccessibleTextImpl.cpp:
* CFDictionaryPropertyBag.cpp:
* DOMCSSClasses.cpp:
* DOMCoreClasses.cpp:
* DOMEventsClasses.cpp:
* DOMHTMLClasses.cpp:
* DefaultDownloadDelegate.cpp:
* DefaultPolicyDelegate.cpp:
* ForEachCoClass.cpp:
* FullscreenVideoController.cpp:
* MarshallingHelpers.cpp:
* MemoryStream.cpp:
* WebActionPropertyBag.cpp:
* WebArchive.cpp:
* WebBackForwardList.cpp:
* WebCache.cpp:
* WebCoreStatistics.cpp:
* WebCoreSupport/AcceleratedCompositingContext.cpp:
* WebCoreSupport/EmbeddedWidget.cpp:
* WebCoreSupport/WebChromeClient.cpp:
* WebCoreSupport/WebContextMenuClient.cpp:
* WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
* WebCoreSupport/WebDragClient.cpp:
* WebCoreSupport/WebEditorClient.cpp:
* WebCoreSupport/WebFrameLoaderClient.cpp:
* WebCoreSupport/WebFrameNetworkingContext.cpp:
* WebCoreSupport/WebGeolocationClient.cpp:
* WebCoreSupport/WebInspectorClient.cpp:
* WebCoreSupport/WebInspectorDelegate.cpp:
* WebCoreSupport/WebPlatformStrategies.cpp:
* WebCoreSupport/WebVisitedLinkStore.cpp:
* WebDataSource.cpp:
* WebDatabaseManager.cpp:
* WebDocumentLoader.cpp:
* WebDownload.cpp:
* WebDownloadCFNet.cpp:
* WebDownloadCurl.cpp:
* WebDropSource.cpp:
* WebElementPropertyBag.cpp:
* WebError.cpp:
* WebFrame.cpp:
* WebFramePolicyListener.cpp:
* WebGeolocationPolicyListener.cpp:
* WebGeolocationPosition.cpp:
* WebHTMLRepresentation.cpp:
* WebHistory.cpp:
* WebHistoryItem.cpp:
* WebIconDatabase.cpp:
* WebInspector.cpp:
* WebJavaScriptCollector.cpp:
* WebKitCOMAPI.cpp:
* WebKitClassFactory.cpp:
* WebKitDLL.cpp:
* WebKitGraphics.cpp:
* WebKitLogging.cpp:
* WebKitPrefix.h:
* WebKitStatistics.cpp:
* WebKitSystemBits.cpp:
* WebLocalizableStrings.cpp:
* WebMutableURLRequest.cpp:
* WebNavigationData.cpp:
* WebNodeHighlight.cpp:
* WebNotification.cpp:
* WebNotificationCenter.cpp:
* WebPreferences.cpp:
* WebResource.cpp:
* WebScriptObject.cpp:
* WebScriptWorld.cpp:
* WebSecurityOrigin.cpp:
* WebSerializedJSValue.cpp:
* WebTextRenderer.cpp:
* WebURLAuthenticationChallenge.cpp:
* WebURLAuthenticationChallengeSender.cpp:
* WebURLAuthenticationChallengeSenderCFNet.cpp:
* WebURLAuthenticationChallengeSenderCurl.cpp:
* WebURLCredential.cpp:
* WebURLProtectionSpace.cpp:
* WebURLResponse.cpp:
* WebUserContentURLPattern.cpp:
* WebView.cpp:
* WebWorkersPrivate.cpp:

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

6 years agoGardening: one more build fix for GTK builds.
mark.lam@apple.com [Sat, 6 Dec 2014 00:31:17 +0000 (00:31 +0000)]
Gardening: one more build fix for GTK builds.

* CMakeLists.txt:

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

6 years ago[JSC][FTL] Add the data layout to the module and fix the pass order.
commit-queue@webkit.org [Sat, 6 Dec 2014 00:29:18 +0000 (00:29 +0000)]
[JSC][FTL] Add the data layout to the module and fix the pass order.
https://bugs.webkit.org/show_bug.cgi?id=138748

Patch by Juergen Ributzka <juergen@apple.com> on 2014-12-05
Reviewed by Oliver Hunt.

This adds the data layout to the module, so it can be used by all
optimization passes in the LLVM optimizer pipeline. This also allows
FastISel to select more instructions, because less non-legal types are
generated.

Also fix the order of the alias analysis passes in the optimization
pipeline.

* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):

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

6 years agoURTBF, remove duplicated entry due to parallel buildfixing.
ossy@webkit.org [Sat, 6 Dec 2014 00:28:49 +0000 (00:28 +0000)]
URTBF, remove duplicated entry due to parallel buildfixing.

* CMakeLists.txt:

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

6 years agoURTBF after r176849.
ossy@webkit.org [Sat, 6 Dec 2014 00:25:24 +0000 (00:25 +0000)]
URTBF after r176849.

* CMakeLists.txt: Added WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp.

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

6 years agoGardening: another build fix for GTK builds.
mark.lam@apple.com [Sat, 6 Dec 2014 00:20:27 +0000 (00:20 +0000)]
Gardening: another build fix for GTK builds.

* CMakeLists.txt:

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

6 years agoREGRESSION (r176677): All tests crash on Windows
andersca@apple.com [Sat, 6 Dec 2014 00:16:24 +0000 (00:16 +0000)]
REGRESSION (r176677): All tests crash on Windows
https://bugs.webkit.org/show_bug.cgi?id=139321

Reviewed by Alexey Proskuryakov.

* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest):
Don't call CFRelease on the url while we have an outstanding pointer to its string,
and use the right number of bytes when allocating the testURL buffer.

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

6 years agoGardening: more speculative build fix for GTK builds.
mark.lam@apple.com [Sat, 6 Dec 2014 00:10:14 +0000 (00:10 +0000)]
Gardening: more speculative build fix for GTK builds.

* CMakeLists.txt:

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

6 years agoIf the action menu hit test times out, a menu with a single separator appears
timothy_horton@apple.com [Fri, 5 Dec 2014 23:59:18 +0000 (23:59 +0000)]
If the action menu hit test times out, a menu with a single separator appears
https://bugs.webkit.org/show_bug.cgi?id=139320
<rdar://problem/19158331>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _defaultMenuItems]):
Add a new "TimedOut" state, which we get into if the sync wait for
didPerformActionMenuHitTest times out. In this case, we'll drop the
separator item and give up on the menu. This way, the menu will never
have just a single separator item at the end of menuNeedsUpdate:.

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

6 years agoGardening: speculative build fix for GTK builds.
mark.lam@apple.com [Fri, 5 Dec 2014 23:54:51 +0000 (23:54 +0000)]
Gardening: speculative build fix for GTK builds.

* CMakeLists.txt:

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

6 years ago[iOS] DumpRenderTree produces many reference test mismatches
dbates@webkit.org [Fri, 5 Dec 2014 23:33:55 +0000 (23:33 +0000)]
[iOS] DumpRenderTree produces many reference test mismatches
https://bugs.webkit.org/show_bug.cgi?id=139314

Reviewed by Simon Fraser.

Fixes an issue where the scale factor used to render the snapshot taken by
DumpRenderTree may differ from the device scale factor. In particular, the
scale factor used to render a snapshot of a test may differ from the scale
factor used to render the snapshot of its expected result.

Currently DumpRenderTree uses SPI, -[UIView newSnapshotForRect], on iOS to
snapshot the UIWebBrowserView. This SPI always render using a scale factor
of one when the backing store for the LegacyTileLayer objects were out-of-
date regardless of the device scale factor. Instead we should use UIImage
and CALayer API to perform the snapshot with respect to the device scale
factor.

Additionally write iOS pixel dump support logic in terms of existing
DumpRenderTree abstractions so as to support generating and comparing
pixel dump checksums as well as make the iOS code more consistent with
the logic used by other ports.

* DumpRenderTree/PixelDumpSupport.cpp:
(dumpWebViewAsPixelsAndCompareWithExpected): Removed !PLATFORM(IOS)-guard.
* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(BitmapContext::createFromUIImage): Added.
(BitmapContext::pixelData): Added.
(BitmapContext::BitmapContext): Added.
(computeMD5HashStringForBitmapContext): Added.
(dumpBitmap): Added.
(createBitmapContextFromWebView): Moved logic from dumpWebViewAsPixelsAndCompareWithExpected() to here.
(dumpWebViewAsPixelsAndCompareWithExpected): Deleted.

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

6 years ago[MSE][Mac] Return absolute value of error code from CDMSessionMediaSourceAVFObjC...
jer.noble@apple.com [Fri, 5 Dec 2014 23:25:31 +0000 (23:25 +0000)]
[MSE][Mac] Return absolute value of error code from CDMSessionMediaSourceAVFObjC::update().
https://bugs.webkit.org/show_bug.cgi?id=139316

Reviewed by Eric Carlson.

Similarly to our asynchronous error reporting, return the absolute value of the error code.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::systemCodeForError):
(WebCore::CDMSessionMediaSourceAVFObjC::update):

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

6 years agoFix build.
andersca@apple.com [Fri, 5 Dec 2014 23:11:49 +0000 (23:11 +0000)]
Fix build.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):

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

6 years agoFix build on Windows.
andersca@apple.com [Fri, 5 Dec 2014 23:01:56 +0000 (23:01 +0000)]
Fix build on Windows.

* page/SessionIDHash.h:

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

6 years agoGive all web pages a website data store
andersca@apple.com [Fri, 5 Dec 2014 23:00:58 +0000 (23:00 +0000)]
Give all web pages a website data store
https://bugs.webkit.org/show_bug.cgi?id=139317

Reviewed by Tim Horton.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the website data store on the window.

* UIProcess/WebContext.cpp:
(WebKit::websiteDataStoreConfiguration):
Helper function that will create the default website data store configuration for a context.

(WebKit::WebContext::WebContext):
Create a new, per-context data store.

(WebKit::WebContext::createWebPage):
If we don't have a data store filled in, use the default per-context one.

* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.h:

Tools:

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate newPrivateWindow:]):
Don't release the controller - it's implicitly retained by the window.

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

6 years agoMove the website data store code to a new file
andersca@apple.com [Fri, 5 Dec 2014 22:43:44 +0000 (22:43 +0000)]
Move the website data store code to a new file
https://bugs.webkit.org/show_bug.cgi?id=139312

Reviewed by Tim Horton.

It's weird to have all the website data code in the API class, so move it to a new file.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::isNonPersistent):
(API::generateNonPersistentSessionID): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/WebsiteData/WebsiteDataStore.cpp: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp.
(WebKit::generateNonPersistentSessionID):
(WebKit::WebsiteDataStore::createNonPersistent):
(WebKit::WebsiteDataStore::create):
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::~WebsiteDataStore):
* UIProcess/WebsiteData/WebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h.
(WebKit::WebsiteDataStore::isNonPersistent):
(WebKit::WebsiteDataStore::sessionID):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoIssue repaint at setUnavailablePluginIndicatorIsHidden() only when embedded object...
zalan@apple.com [Fri, 5 Dec 2014 22:22:15 +0000 (22:22 +0000)]
Issue repaint at setUnavailablePluginIndicatorIsHidden() only when embedded object's indicator status changes.
https://bugs.webkit.org/show_bug.cgi?id=139311

Reviewed by Tim Horton.

Not testable.

* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden):

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

6 years agoPassRef should deref on destruction if pointee was not moved.
akling@apple.com [Fri, 5 Dec 2014 22:20:49 +0000 (22:20 +0000)]
PassRef should deref on destruction if pointee was not moved.
<https://webkit.org/b/139309>

Reviewed by Antti Koivisto.

Source/WebCore:

Remove calls to PassRef::dropRef() since it's no longer necessary to manually
notify PassRef that you didn't move the pointee.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::setStyle):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):

Source/WTF:

Let PassRef become nullptr internally after having WTF::move()'d the pointee.
This means that PassRef is now essentially a PassRefPtr that can only be
constructed with a non-null pointee.

This should make it possible for all ::create()-style construction helpers to
return PassRef, removing a branch in each case.

* wtf/PassRef.h:
(WTF::PassRef<T>::PassRef):
(WTF::PassRef<T>::~PassRef):
(WTF::PassRef<T>::get):
(WTF::PassRef<T>::ptr):
(WTF::PassRef<T>::leakRef):
(WTF::PassRef<T>::dropRef): Deleted.

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

6 years ago[iOS] DumpRenderTree fails to render every other test when pixel tests are on
dbates@webkit.org [Fri, 5 Dec 2014 22:13:18 +0000 (22:13 +0000)]
[iOS] DumpRenderTree fails to render every other test when pixel tests are on
https://bugs.webkit.org/show_bug.cgi?id=137581
<rdar://problem/18642906>

Reviewed by Simon Fraser.

Fixes an issue where the DumpRenderTree snapshot may reflect the rendered content
of the test that proceeded the currently running test.

* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(dumpWebViewAsPixelsAndCompareWithExpected): Ensure that UIKit has performed a layout
of the UIWebBrowserView view. Also, remove unnecessary call to -[UIWebDocumentView layoutTilesNow]
as -[UIWebDocumentView newSnapshotWithRect] will layout the tiles.

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

6 years ago2014-12-05 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Fri, 5 Dec 2014 22:11:53 +0000 (22:11 +0000)]
2014-12-05  Geoffrey Garen  <ggaren@apple.com>

        Removed an unused function.

        Reviewed by Michael Saboff.

        Broken out from https://bugs.webkit.org/show_bug.cgi?id=139305.

        * parser/ParserArena.h:

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

6 years agoKeyboard input should be disabled in the preview popover
timothy_horton@apple.com [Fri, 5 Dec 2014 21:29:05 +0000 (21:29 +0000)]
Keyboard input should be disabled in the preview popover
https://bugs.webkit.org/show_bug.cgi?id=139219
<rdar://problem/19052381>

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView performKeyEquivalent:]):
(-[WKView keyUp:]):
(-[WKView keyDown:]):
(-[WKView flagsChanged:]):
There are two implementations of each of these methods in this file.
Adjust the ones that the original patch missed.

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

6 years agoFix style sharing with the "type" and "readonly" attributes
benjamin@webkit.org [Fri, 5 Dec 2014 20:58:08 +0000 (20:58 +0000)]
Fix style sharing with the "type" and "readonly" attributes
https://bugs.webkit.org/show_bug.cgi?id=139283

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-05
Reviewed by Antti Koivisto.

Source/WebCore:

There are two bugs adressed with this patch:
1) The attributes "type" and "readonly" where only handled correctly
   for input elements. For everything else, they could incorrectly
   be ignored for style sharing.
2) The handling of attributes was incorrect for selector lists, leading
   to various bugs (incorrect style sharing in some cases, disabling
   style sharing on valid cases).

For [1], the problem was that attribute checking had been limited to
StyleResolver::canShareStyleWithControl(). That function is for handling
the special states of input element. For any other element, the attributes
were simply ignored.

For [2], there were a bunch of small problems. First, containsUncommonAttributeSelector()
was not recursive, which caused it to ignored any nested selector list. This used to be
correct but since we have advanced selectors we can no longer assumed selectors are not nested.

A second issue was that any attribute in a selector list was causing us to fall back
to the slow case. Now that we have the fast :matches(), we really don't want that.

The function containsUncommonAttributeSelector() was transformed into a recursive function
tracking where we are in the selector.

At the entry point, we start with the flag "startsOnRightmostElement" set to true. The flag is then
updated on the stack of each recursive call.

For example, "webkit > is:matches(freaking > awesome)". We evalute "is" with the flag to true, then recurse
into evaluating "freaking > awesome" with the flag still set to true. When we evalute ">", the flag
is set to false to evaluate any following selectors.
After evaluating "freaking > awesome", we go back to our previous stack frame, and the flag
is back to true and we can continue evaluating with the curren top level state.

From some logging, I discovered that the attribute handling is way too aggressive.
This is not a regression and I cannot fix that easily so I left a fixme.

Tests: fast/css/data-attribute-style-sharing-1.html
       fast/css/data-attribute-style-sharing-2.html
       fast/css/data-attribute-style-sharing-3.html
       fast/css/data-attribute-style-sharing-4.html
       fast/css/data-attribute-style-sharing-5.html
       fast/css/data-attribute-style-sharing-6.html
       fast/css/data-attribute-style-sharing-7.html
       fast/css/readonly-attribute-style-sharing-1.html
       fast/css/readonly-attribute-style-sharing-2.html
       fast/css/readonly-attribute-style-sharing-3.html
       fast/css/readonly-attribute-style-sharing-4.html
       fast/css/readonly-attribute-style-sharing-5.html
       fast/css/readonly-attribute-style-sharing-6.html
       fast/css/readonly-attribute-style-sharing-7.html
       fast/css/type-attribute-style-sharing-1.html
       fast/css/type-attribute-style-sharing-2.html
       fast/css/type-attribute-style-sharing-3.html
       fast/css/type-attribute-style-sharing-4.html
       fast/css/type-attribute-style-sharing-5.html
       fast/css/type-attribute-style-sharing-6.html
       fast/css/type-attribute-style-sharing-7.html

* css/RuleSet.cpp:
(WebCore::containsUncommonAttributeSelector):
(WebCore::RuleData::RuleData):
(WebCore::selectorListContainsAttributeSelector): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
(WebCore::StyleResolver::canShareStyleWithElement):

LayoutTests:

* fast/css/data-attribute-style-sharing-1-expected.html: Added.
* fast/css/data-attribute-style-sharing-1.html: Added.
* fast/css/data-attribute-style-sharing-2-expected.html: Added.
* fast/css/data-attribute-style-sharing-2.html: Added.
* fast/css/data-attribute-style-sharing-3-expected.html: Added.
* fast/css/data-attribute-style-sharing-3.html: Added.
* fast/css/data-attribute-style-sharing-4-expected.html: Added.
* fast/css/data-attribute-style-sharing-4.html: Added.
* fast/css/data-attribute-style-sharing-5-expected.html: Added.
* fast/css/data-attribute-style-sharing-5.html: Added.
* fast/css/data-attribute-style-sharing-6-expected.html: Added.
* fast/css/data-attribute-style-sharing-6.html: Added.
* fast/css/data-attribute-style-sharing-7-expected.html: Added.
* fast/css/data-attribute-style-sharing-7.html: Added.
* fast/css/readonly-attribute-style-sharing-1-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-1.html: Added.
* fast/css/readonly-attribute-style-sharing-2-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-2.html: Added.
* fast/css/readonly-attribute-style-sharing-3-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-3.html: Added.
* fast/css/readonly-attribute-style-sharing-4-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-4.html: Added.
* fast/css/readonly-attribute-style-sharing-5-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-5.html: Added.
* fast/css/readonly-attribute-style-sharing-6-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-6.html: Added.
* fast/css/readonly-attribute-style-sharing-7-expected.html: Added.
* fast/css/readonly-attribute-style-sharing-7.html: Added.
* fast/css/type-attribute-style-sharing-1-expected.html: Added.
* fast/css/type-attribute-style-sharing-1.html: Added.
* fast/css/type-attribute-style-sharing-2-expected.html: Added.
* fast/css/type-attribute-style-sharing-2.html: Added.
* fast/css/type-attribute-style-sharing-3-expected.html: Added.
* fast/css/type-attribute-style-sharing-3.html: Added.
* fast/css/type-attribute-style-sharing-4-expected.html: Added.
* fast/css/type-attribute-style-sharing-4.html: Added.
* fast/css/type-attribute-style-sharing-5-expected.html: Added.
* fast/css/type-attribute-style-sharing-5.html: Added.
* fast/css/type-attribute-style-sharing-6-expected.html: Added.
* fast/css/type-attribute-style-sharing-6.html: Added.
* fast/css/type-attribute-style-sharing-7-expected.html: Added.
* fast/css/type-attribute-style-sharing-7.html: Added.

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

6 years ago[WTF] MediaTime should support round-tripping from and to doubles.
jer.noble@apple.com [Fri, 5 Dec 2014 20:51:02 +0000 (20:51 +0000)]
[WTF] MediaTime should support round-tripping from and to doubles.
https://bugs.webkit.org/show_bug.cgi?id=139248

Reviewed by Eric Carlson.

Source/WebCore:

Check whether the MediaTime's underlying data is floating point before converting
to a CMTime or QTTime.

* platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
(WebCore::toCMTime):
* platform/graphics/mac/MediaTimeQTKit.mm:
(WebCore::toQTTime):

Source/WTF:

MediaTimes should be able to return precisely the same double value as was used
when the MediaTime was created, so long as that MediaTime was not modified in a
non-destructive way. This will allow API which accepts floating-point values to
return the exact same value when asked, but still be able to store that value
as a MediaTime.

* wtf/MediaTime.cpp:
(WTF::MediaTime::createWithFloat): Added; store the floating-point value in a union.
(WTF::MediaTime::createWithDouble): Ditto.
(WTF::MediaTime::toFloat): If the value is a double, just return it.
(WTF::MediaTime::toDouble): Ditto.
(WTF::MediaTime::operator+): Special case when one or both sides are doubles.
(WTF::MediaTime::operator-): Ditto.
(WTF::MediaTime::operator*): Ditto.
(WTF::MediaTime::compare): Ditto.
(WTF::abs): Ditto.
(WTF::MediaTime::setTimeScale): Convert the MediaTime from a double.

Tools:

Add API tests for new features of MediaTime. Update the LLDB python provider to correctly display
the MediaTimes after this change.

* TestWebKitAPI/Tests/WTF/MediaTime.cpp:
(WTF::operator<<):
(TestWebKitAPI::TEST):
* lldb/lldb_webkit.py:
(WTFMediaTime_SummaryProvider):
(WTFMediaTimeProvider.timeValueAsDouble):
(WTFMediaTimeProvider.isIndefinite):
(WTFMediaTimeProvider):
(WTFMediaTimeProvider.hasDoubleValue):

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

6 years agoAdd a private browsing mode to MiniBrowser
andersca@apple.com [Fri, 5 Dec 2014 20:48:20 +0000 (20:48 +0000)]
Add a private browsing mode to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=139308

Reviewed by Sam Weinig.

Source/WebCore:

Use -1 instead of -2 for the deleted value.

* page/SessionIDHash.h:

Tools:

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
(-[BrowserAppDelegate newWindow:]):
(-[BrowserAppDelegate newPrivateWindow:]):
* MiniBrowser/mac/MainMenu.xib:
* MiniBrowser/mac/WK2BrowserWindowController.h:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController initWithConfiguration:]):
(-[WK2BrowserWindowController dealloc]):
(-[WK2BrowserWindowController observeValueForKeyPath:ofObject:change:context:]):

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

6 years agoMove 'text-emphasis-style' CSS property to the new StyleBuilder
cdumez@apple.com [Fri, 5 Dec 2014 20:27:37 +0000 (20:27 +0000)]
Move 'text-emphasis-style' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139285

Reviewed by Sam Weinig.

Move 'text-emphasis-style' CSS property to the new StyleBuilder by
using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisStyle::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitTextEmphasisStyle):
(WebCore::StyleBuilderCustom::applyInheritWebkitTextEmphasisStyle):
(WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):

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

6 years agoIn NetworkResourceLoader always bail out after abort()
antti@apple.com [Fri, 5 Dec 2014 19:43:03 +0000 (19:43 +0000)]
In NetworkResourceLoader always bail out after abort()
https://bugs.webkit.org/show_bug.cgi?id=139299

Reviewed by Alexey Proskuryakov.

Invoking abort() may kill the current object. Take care to bail out after it.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):

    Either make sure sendAbortingOnFailure() is called last in callbacks or the results is explicitly tested.

(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBufferMaybeAborting):

    Rename and return a boolean to indicate if load should continue.

(WebKit::NetworkResourceLoader::sendBuffer): Deleted.
* NetworkProcess/NetworkResourceLoader.h:

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

6 years ago[iOS] remove "enter optimized fullscreen" gesture
eric.carlson@apple.com [Fri, 5 Dec 2014 19:31:28 +0000 (19:31 +0000)]
[iOS] remove "enter optimized fullscreen" gesture
https://bugs.webkit.org/show_bug.cgi?id=139301

Reviewed by Jer Noble.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handleWrapperTouchStart): Remove gesture recognizer.

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

6 years agoLegacy WebKit should set deviceScaleFactor in _commonInitializationWithFrameName...
timothy_horton@apple.com [Fri, 5 Dec 2014 19:28:43 +0000 (19:28 +0000)]
Legacy WebKit should set deviceScaleFactor in _commonInitializationWithFrameName, not _initWithFrame
https://bugs.webkit.org/show_bug.cgi?id=139306
<rdar://problem/19157955>

Reviewed by Beth Dakin.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _initWithFrame:frameName:groupName:]):
Move setDeviceScaleFactor to the initialization path that is guaranteed to happen.

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

6 years agordar://problem/19156353 Additional build-fixes needed.
bdakin@apple.com [Fri, 5 Dec 2014 19:21:26 +0000 (19:21 +0000)]
rdar://problem/19156353 Additional build-fixes needed.

Rubber-stamped by Tim Horton.

This is a bit unfortunate, but we need to always forward-declare this for now.
* platform/spi/mac/QuickLookMacSPI.h:

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

6 years agoDon't use PLATFORM(IOS) in non-project headers.
andersca@apple.com [Fri, 5 Dec 2014 19:10:17 +0000 (19:10 +0000)]
Don't use PLATFORM(IOS) in non-project headers.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _allowsAlternateFullscreen]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

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

6 years agoWeb Inspector: Uncaught Exceptions when attempting to show Content Flow
commit-queue@webkit.org [Fri, 5 Dec 2014 18:48:05 +0000 (18:48 +0000)]
Web Inspector: Uncaught Exceptions when attempting to show Content Flow
https://bugs.webkit.org/show_bug.cgi?id=139276

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-12-05
Reviewed by Brian Burg.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
LegacyJavaScriptProfileObject no longer exists, these references should be removed.

* UserInterface/Views/FolderizedTreeElement.js:
(WebInspector.FolderizedTreeElement.prototype._insertChildTreeElement):
This sort function references "this" and needed to be bound.

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

6 years ago[WinCairo] WTF project is missing a GStreamer source file.
commit-queue@webkit.org [Fri, 5 Dec 2014 18:46:56 +0000 (18:46 +0000)]
[WinCairo] WTF project is missing a GStreamer source file.
https://bugs.webkit.org/show_bug.cgi?id=139296

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-12-05
Reviewed by Philippe Normand.

The WTF project file is missing a GStreamer source file,
causing a link error when compiling with GStreamer enabled.

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:

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

6 years agoWKBundleCSSStyleDeclarationRef needs to be a real API::Object
andersca@apple.com [Fri, 5 Dec 2014 18:30:14 +0000 (18:30 +0000)]
WKBundleCSSStyleDeclarationRef needs to be a real API::Object
https://bugs.webkit.org/show_bug.cgi?id=139291

Patch by Sam Weinig <sam@webkit.org> on 2014-12-05
Reviewed by Dan Bernstein.

Change WKBundleCSSStyleDeclarationRef from being a WebCore::CSSStyleDeclaration, to
being a real API::Object.  WKRetain and WKRelease require this.

* Shared/APIObject.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp: Added.
(WebKit::domHandleCache):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::getOrCreate):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::InjectedBundleCSSStyleDeclarationHandle):
(WebKit::InjectedBundleCSSStyleDeclarationHandle::~InjectedBundleCSSStyleDeclarationHandle):
* WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.h: Added.
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):

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

6 years agoOops, didn't mean to commit this.
andersca@apple.com [Fri, 5 Dec 2014 18:23:52 +0000 (18:23 +0000)]
Oops, didn't mean to commit this.

* Shared/API/Cocoa/WKFoundation.h:

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

6 years agoAdd an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
andersca@apple.com [Fri, 5 Dec 2014 18:20:23 +0000 (18:20 +0000)]
Add an API::WebsiteDataStore object and use it for _WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=139304

Reviewed by Tim Horton.

* Shared/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
Make _WKWebsiteDataStore a wrapper for API::WebsiteDataStore instead of API::Session.

* UIProcess/API/APIWebsiteDataStore.cpp: Added.
(API::generateNonPersistentSessionID):
(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::createNonPersistentDataStore):
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::~WebsiteDataStore):
(API::WebsiteDataStore::isNonPersistent):
Add new WebsiteDataStore implementation. Currently it only contains the WebCore Session ID, but more will be
added to it in upcoming commits.

* UIProcess/API/APIWebsiteDataStore.h:
Add header.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: Added.
(API::WebsiteDataStore::defaultDataStoreConfiguration):
Platform specific file that returns the default data store configuration.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the session ID from the website data store.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore dealloc]):
(-[_WKWebsiteDataStore isNonPersistent]):
(-[_WKWebsiteDataStore _apiObject]):
Update now that we wrap an API::WebsiteDataStore instead.

* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h:
(WebKit::wrapper):
Update for API::Session -> API::WebsiteDataStore change.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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

6 years agoFeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
ddkilzer@apple.com [Fri, 5 Dec 2014 17:55:33 +0000 (17:55 +0000)]
FeatureDefines.xcconfig: Workaround bug in Xcode 5.1.1 when defining ENABLE_WEB_REPLAY
<http://webkit.org/b/139286>

Reviewed by Daniel Bates.

* Configurations/FeatureDefines.xcconfig: Switch back to using
PLATFORM_NAME to workaround a bug in Xcode 5.1.1 on 10.8.

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

6 years agoMake WebPageProxy hold on to a SessionID instead of an API:Session
andersca@apple.com [Fri, 5 Dec 2014 17:33:29 +0000 (17:33 +0000)]
Make WebPageProxy hold on to a SessionID instead of an API:Session
https://bugs.webkit.org/show_bug.cgi?id=139302

Reviewed by Sam Weinig.

This is in preparation for adding API::WebsiteDataStore. Currently we have to keep the
Session ID and the WebsiteDataStore separate because we still need to support toggling private browsing.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetSession):
* UIProcess/API/C/WKSessionRef.cpp:
(WKSessionCreate):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(+[_WKWebsiteDataStore nonPersistentDataStore]):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::Session):
(API::Session::createEphemeral):
(API::Session::legacyPrivateSession): Deleted.
(API::Session::create): Deleted.
* UIProcess/APISession.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSessionID):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setSession): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):

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

6 years agoFollow-up build fix.
andersca@apple.com [Fri, 5 Dec 2014 16:34:14 +0000 (16:34 +0000)]
Follow-up build fix.

* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::shared):

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

6 years ago[iOS] allow host application to opt-out of alternate fullscreen pt. 2
eric.carlson@apple.com [Fri, 5 Dec 2014 13:25:28 +0000 (13:25 +0000)]
[iOS] allow host application to opt-out of alternate fullscreen pt. 2
https://bugs.webkit.org/show_bug.cgi?id=139227

Source/WebCore:

Reviewed by Jer Noble and Anders Carlsson

* WebCore.exp.in: Export HTMLMediaSession::allowsAlternateFullscreen, change the signature of
    WebVideoFullscreenInterfaceAVKit::setupFullscreen.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(-[WebVideoFullscreenController enterFullscreen:mode:]): Update for
    WebVideoFullscreenInterfaceAVKit::setupFullscreen change.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add argument to setupFullscreen.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.

Source/WebKit2:

Reviewed by Jer Noble and Anders Carlsson.

* UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add bool param to setupFullscreenWithID.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: Ditto.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Ditto.

* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): Pass new parameter
    to SetupFullscreenWithID.

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

6 years agoFix build warning in WebCore/platform/graphics module
commit-queue@webkit.org [Fri, 5 Dec 2014 10:29:32 +0000 (10:29 +0000)]
Fix build warning in WebCore/platform/graphics module
https://bugs.webkit.org/show_bug.cgi?id=139290

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-12-05
Reviewed by Carlos Garcia Campos.

Fix a build warning by removing parameter name from function.

No new tests, no behavior change.

* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::getFamilyNameStringFromFontDescriptionAndFamily):

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

6 years agoGraphicsLayerTextureMapper: Rename parameter to be more clear
commit-queue@webkit.org [Fri, 5 Dec 2014 08:11:27 +0000 (08:11 +0000)]
GraphicsLayerTextureMapper: Rename parameter to be more clear
https://bugs.webkit.org/show_bug.cgi?id=139288

Patch by sungmin cho <sungmin17.cho@lge.com> on 2014-12-05
Reviewed by Martin Robinson.

Rename 'media' to 'platformLayer'.

No new tests, no change in functionality.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToPlatformLayer):

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

6 years agoFix pre-Yosemite builds.
mrowe@apple.com [Fri, 5 Dec 2014 07:46:11 +0000 (07:46 +0000)]
Fix pre-Yosemite builds.

The #ifs in two SPI wrapper headers were incorrect, resulting in code being included
prior to Yosemite that required Yosemite to compile.

* platform/spi/mac/NSSharingServicePickerSPI.h:
* platform/spi/mac/NSSharingServiceSPI.h:

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

6 years agoBuild fix after r176836.
mrowe@apple.com [Fri, 5 Dec 2014 06:58:04 +0000 (06:58 +0000)]
Build fix after r176836.

Reviewed by Mark Lam.

* runtime/VM.h:
(JSC::VM::controlFlowProfiler): Don't try to export an inline function.
Doing so results in a weak external symbol being generated.

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

6 years agoJavaScript Control Flow Profiler
saambarati1@gmail.com [Fri, 5 Dec 2014 05:58:07 +0000 (05:58 +0000)]
JavaScript Control Flow Profiler
https://bugs.webkit.org/show_bug.cgi?id=137785

Reviewed by Filip Pizlo.

This patch introduces a mechanism for JavaScriptCore to profile
which basic blocks have executed. This mechanism will then be
used by the Web Inspector to indicate which basic blocks
have and have not executed.

The profiling works by compiling in an op_profile_control_flow
at the start of every basic block. Then, whenever this op code
executes, we know that a particular basic block has executed.

When we tier up a CodeBlock that contains an op_profile_control_flow
that corresponds to an already executed basic block, we don't
have to emit code for that particular op_profile_control_flow
because the internal data structures used to keep track of
basic block locations has already recorded that the corresponding
op_profile_control_flow has executed.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecode/Instruction.h:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset):
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitProfileControlFlow):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ConditionalNode::emitBytecode):
(JSC::IfElseNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ContinueNode::emitBytecode):
(JSC::BreakNode::emitBytecode):
(JSC::ReturnNode::emitBytecode):
(JSC::CaseClauseNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::ThrowNode::emitBytecode):
(JSC::TryNode::emitBytecode):
(JSC::ProgramNode::emitBytecode):
(JSC::FunctionNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::basicBlockLocation):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::InspectorRuntimeAgent::getRuntimeTypesForVariablesAtOffsets):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_profile_control_flow):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_profile_control_flow):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionFindTypeForExpression):
(functionReturnTypeFor):
(functionDumpBasicBlockExecutionRanges):
* llint/LowLevelInterpreter.asm:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::endOffset):
(JSC::ASTBuilder::setStartOffset):
* parser/NodeConstructors.h:
(JSC::Node::Node):
* parser/Nodes.h:
(JSC::CaseClauseNode::setStartOffset):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseSwitchClauses):
(JSC::Parser<LexerType>::parseSwitchDefaultClause):
(JSC::Parser<LexerType>::parseBlockStatement):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseIfStatement):
(JSC::Parser<LexerType>::parseExpression):
(JSC::Parser<LexerType>::parseConditionalExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFuncDeclStatement):
(JSC::SyntaxChecker::createGetterOrSetterProperty):
(JSC::SyntaxChecker::operatorStackPop):
* runtime/BasicBlockLocation.cpp: Added.
(JSC::BasicBlockLocation::BasicBlockLocation):
(JSC::BasicBlockLocation::insertGap):
(JSC::BasicBlockLocation::getExecutedRanges):
(JSC::BasicBlockLocation::dumpData):
(JSC::BasicBlockLocation::emitExecuteCode):
* runtime/BasicBlockLocation.h: Added.
(JSC::BasicBlockLocation::startOffset):
(JSC::BasicBlockLocation::endOffset):
(JSC::BasicBlockLocation::setStartOffset):
(JSC::BasicBlockLocation::setEndOffset):
(JSC::BasicBlockLocation::hasExecuted):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
* runtime/ControlFlowProfiler.cpp: Added.
(JSC::ControlFlowProfiler::~ControlFlowProfiler):
(JSC::ControlFlowProfiler::getBasicBlockLocation):
(JSC::ControlFlowProfiler::dumpData):
(JSC::ControlFlowProfiler::getBasicBlocksForSourceID):
* runtime/ControlFlowProfiler.h: Added. This class is in
charge of generating BasicBlockLocations and also
providing an interface that the Web Inspector can use to ping
which basic blocks have executed based on the source id of a script.

(JSC::BasicBlockKey::BasicBlockKey):
(JSC::BasicBlockKey::isHashTableDeletedValue):
(JSC::BasicBlockKey::operator==):
(JSC::BasicBlockKey::hash):
(JSC::BasicBlockKeyHash::hash):
(JSC::BasicBlockKeyHash::equal):
* runtime/Executable.cpp:
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::ProgramExecutable::initializeGlobalProperties):
* runtime/FunctionHasExecutedCache.cpp:
(JSC::FunctionHasExecutedCache::getUnexecutedFunctionRanges):
* runtime/FunctionHasExecutedCache.h:
* runtime/Options.h:
* runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::logTypesForTypeLocation):
(JSC::TypeProfiler::typeInformationForExpressionAtOffset):
(JSC::TypeProfiler::findLocation):
(JSC::TypeProfiler::dumpTypeProfilerData):
* runtime/TypeProfiler.h:
(JSC::TypeProfiler::functionHasExecutedCache): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::enableProfilerWithRespectToCount):
(JSC::disableProfilerWithRespectToCount):
(JSC::VM::enableTypeProfiler):
(JSC::VM::disableTypeProfiler):
(JSC::VM::enableControlFlowProfiler):
(JSC::VM::disableControlFlowProfiler):
(JSC::VM::dumpTypeProfilerData):
* runtime/VM.h:
(JSC::VM::functionHasExecutedCache):
(JSC::VM::controlFlowProfiler):

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

6 years agoREGRESSION (r176683): RefCounter.h is installed outside SDKROOT
ddkilzer@apple.com [Fri, 5 Dec 2014 04:59:56 +0000 (04:59 +0000)]
REGRESSION (r176683): RefCounter.h is installed outside SDKROOT

* WTF.xcodeproj/project.pbxproj: Don't mark RefCounter.h as a
private header.  WTF headers use a special build phase script to
be installed.

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

6 years agoRun http tests parallel
ap@apple.com [Fri, 5 Dec 2014 01:37:02 +0000 (01:37 +0000)]
Run http tests parallel
https://bugs.webkit.org/show_bug.cgi?id=138958

Reviewed by Daniel Bates.

Remove the concept of "locked shard". Now http tests are just like any other tests.
We start HTTP and WebSocket servers at the start if we need them, and terminate them
when done with all the tests (not when the last http test runs, which is unnecessarily
unpredictable).

This makes debug tests run in 8 minutes and 12 seconds on my Mac Pro. Without the
patch, they used to take over 15 minutes.

As part of the fix, we no longer pass the number of servers to Apache. I don't
think that these parameters did what we wanted them to do; Apache handles the load
just fine without them.

The change applies to all platforms. I fixed everything I could find on Mac, and
Ossy told me that he's been running http tests in parallel for a long time. If
there is increased instability for some ports, it will need to be fixed - there is
generally nothing special about http tests at this point, and most code is
cross-platform in WebKit2.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.__init__):
(LayoutTestRunner.run_tests):
(LayoutTestRunner.start_servers_with_lock):
(LayoutTestRunner._handle_started_test):
(Worker.handle):
(Sharder.__init__):
(Sharder.shard_tests):
(Sharder._shard_every_file):
(Sharder._shard_by_directory):
(LayoutTestRunner._handle_finished_test_list): Deleted.
(LayoutTestRunner._handle_finished_test_list.find): Deleted.
(Sharder._shard_in_two): Deleted.
(Sharder): Deleted.
(Sharder._resize_shards): Deleted.
(Sharder._resize_shards.divide_and_round_up): Deleted.
(Sharder._resize_shards.extract_and_flatten): Deleted.
(Sharder._resize_shards.split_at): Deleted.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(FakePrinter.print_workers_and_shards):
(LayoutTestRunnerTests.test_servers_started.start_http_server):
(LayoutTestRunnerTests.test_servers_started):
(SharderTests.get_shards):
(SharderTests.test_shard_by_dir):
(SharderTests.test_shard_every_file):
(SharderTests): Deleted.
(SharderTests.test_shard_in_two): Deleted.
(SharderTests.test_shard_in_two_has_no_locked_shards): Deleted.
(SharderTests.test_shard_in_two_has_no_unlocked_shards): Deleted.
(SharderTests.test_multiple_locked_shards): Deleted.
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ManagerTest.test_needs_servers.get_manager):
(ManagerTest.integration_test_needs_servers.get_manager):
(ManagerTest.test_look_for_new_crash_logs.get_manager):
(ManagerTest):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_batch_size):
(RunTest.test_max_locked_shards): Deleted.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
* Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
(TestLayoutTestApacheHttpd.test_start_cmd):
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd.__init__):
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.__init__):
* Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_workers_and_shards):
* Scripts/webkitpy/port/base.py:
(Port.default_child_processes):
(Port.to.start_http_server):
(Port.default_max_locked_shards): Deleted.
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.make_port):
(PortTestCase.test_default_max_locked_shards): Deleted.
* Scripts/webkitpy/port/test.py:
(TestPort.start_http_server):

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

6 years agoAdd missing includes in preparation for making toAPI require that it's passed an...
andersca@apple.com [Fri, 5 Dec 2014 01:23:51 +0000 (01:23 +0000)]
Add missing includes in preparation for making toAPI require that it's passed an API::Object
https://bugs.webkit.org/show_bug.cgi?id=139278

Reviewed by Tim Horton.

* UIProcess/API/C/WKAuthenticationChallenge.cpp:
* UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKDownload.cpp:
* UIProcess/API/C/WKFrame.cpp:
* UIProcess/API/C/WKGeolocationManager.cpp:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/GenericCallback.h:
* UIProcess/Notifications/WebNotificationProvider.cpp:
* UIProcess/WebContextConnectionClient.cpp:
* UIProcess/WebContextInjectedBundleClient.cpp:
* UIProcess/WebCookieManagerProxyClient.cpp:
* UIProcess/WebDatabaseManagerProxyClient.cpp:
* UIProcess/WebFindClient.cpp:
* UIProcess/WebFormClient.cpp:
* UIProcess/WebIconDatabaseClient.cpp:
* UIProcess/WebPageContextMenuClient.cpp:
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/InjectedBundleClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:

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

6 years agoprintInternal(PrintStream& out, JSC::JITCode::JITType type) ends up dumping a literal %s
fpizlo@apple.com [Fri, 5 Dec 2014 01:06:27 +0000 (01:06 +0000)]
printInternal(PrintStream& out, JSC::JITCode::JITType type) ends up dumping a literal %s
https://bugs.webkit.org/show_bug.cgi?id=139274

Reviewed by Geoffrey Garen.

* jit/JITCode.cpp:
(WTF::printInternal):

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

6 years agoDon't use NeverDestroyed with a RefCounted object.
andersca@apple.com [Fri, 5 Dec 2014 01:06:21 +0000 (01:06 +0000)]
Don't use NeverDestroyed with a RefCounted object.

* WebCoreSupport/WebVisitedLinkStore.cpp:
(WebVisitedLinkStore::shared):

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

6 years agoMake API::String copy the underlying strings if needed, for thread safety
andersca@apple.com [Fri, 5 Dec 2014 01:03:15 +0000 (01:03 +0000)]
Make API::String copy the underlying strings if needed, for thread safety
https://bugs.webkit.org/show_bug.cgi?id=139261

Reviewed by Sam Weinig.

Source/WebKit2:

* Shared/API/c/WKString.cpp:
(WKStringCreateWithUTF8CString):
(WKStringCreateWithJSString):
(WKStringCopyJSString):
Move the implementations from API::String and directly into the API functions.

* Shared/APIString.h:
Add a create overload that takes an rvalue reference. Call it from the create overload
that takes an lvalue reference, but explicitly copy the string.
We call isolatedCopy() again on the string in the rvalue reference overload, but that is a no-op
if the string can be sent to another thread. Add assertions in the String constructor that we can
send the string to another thread.

Source/WTF:

* wtf/RefPtr.h:
(WTF::RefPtr<T>::leakRef):
Add a leakRef() to RefPtr so we don't have to go through PassRefPtr.

* wtf/text/WTFString.cpp:
(WTF::String::isSafeToSendToAnotherThread):
Check if the string is empty before checking whether it's in an atomic string table.
It's safe to send empty strings to other threads even if they're in the atomic string table
since they will never be deallocated.

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

6 years agoRemoved the concept of ParserArenaRefCounted
ggaren@apple.com [Fri, 5 Dec 2014 00:59:33 +0000 (00:59 +0000)]
Removed the concept of ParserArenaRefCounted
https://bugs.webkit.org/show_bug.cgi?id=139277

Reviewed by Oliver Hunt.

This is a step toward a parser speedup.

Now that we have a clear root node type for each parse tree, there's no
need to have a concept for "I might be refcounted or arena allocated".
Instead, we can just use unique_ptr to manage the tree as a whole.

* API/JSScriptRef.cpp:
(parseScript):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable): Updated for type change.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock): Use unique_ptr. No need to call
destroyData() explicitly: the unique_ptr destructor will do everything
we need, as Bjarne intended.

* parser/NodeConstructors.h:
(JSC::ParserArenaRoot::ParserArenaRoot):
(JSC::ParserArenaRefCounted::ParserArenaRefCounted): Deleted.

* parser/Nodes.cpp:
(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::EvalNode::EvalNode):
(JSC::FunctionNode::FunctionNode):
(JSC::ProgramNode::create): Deleted.
(JSC::EvalNode::create): Deleted.
(JSC::FunctionNode::create): Deleted. All special create semantics can
just go away now that we play by C++ constructor / destructor rules.

* parser/Nodes.h:
(JSC::ParserArenaRoot::parserArena):
(JSC::ParserArenaRoot::~ParserArenaRoot): Just a normal class now, which
holds onto the whole parse tree by virtue of owning the arena in which
all the parsed nodes (except for itself) were allocated.

(JSC::ProgramNode::closedVariables):
(JSC::ParserArenaRefCounted::~ParserArenaRefCounted): Deleted.

(JSC::ScopeNode::destroyData): Deleted. No need to destroy anything
explicitly anymore -- we can just rely on destructors.

(JSC::ScopeNode::parserArena): Deleted.

* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
(JSC::parse): unique_ptr all the things.

* parser/ParserArena.cpp:
(JSC::ParserArena::reset):
(JSC::ParserArena::isEmpty):
(JSC::ParserArena::contains): Deleted.
(JSC::ParserArena::last): Deleted.
(JSC::ParserArena::removeLast): Deleted.
(JSC::ParserArena::derefWithArena): Deleted.
* parser/ParserArena.h:
(JSC::ParserArena::swap): Much delete. Such wow.

* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode):
* runtime/Completion.cpp:
(JSC::checkSyntax):
* runtime/Executable.cpp:
(JSC::ProgramExecutable::checkSyntax): unique_ptr all the things.

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

6 years agoREGRESSION(r173188): Text inserted when trying to delete a word from the Twitter...
akling@apple.com [Fri, 5 Dec 2014 00:55:30 +0000 (00:55 +0000)]
REGRESSION(r173188): Text inserted when trying to delete a word from the Twitter message box.
<https://webkit.org/b/139076>

Reviewed by Geoffrey Garen.

The StringImpl* -> Weak<JSString> cache used by the DOM bindings
had a bug where the key could become a stale pointer if the cached
JSString had its internal StringImpl atomicized.

If a new StringImpl was then later constructed at the exact same
address as the stale key, before the Weak<JSString> got booted out
of the string cache, we'd now have a situation where asking the
string cache for that key would return the old JSString.

Solve this by not allowing JSString::toExistingAtomicString() to
change the JSString's internal StringImpl unless it's resolving a
rope string. (The StringImpl nullity determines rope state.)

This means that calling toExistingAtomicString() may now have to
query the AtomicString table on each call rather than just once.
All clients of this API would be forced to do this regardless,
since they return value will be used to key into containers with
AtomicStringImpl* keys.

No test because this relies on malloc putting two StringImpls
at the same address at different points in time and we have no
mechanism to reliably test that.

* runtime/JSString.h:
(JSC::JSString::toExistingAtomicString):

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

6 years ago2014-12-04 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 4 Dec 2014 23:55:34 +0000 (23:55 +0000)]
2014-12-04  Geoffrey Garen  <ggaren@apple.com>

        Marked some final things final.

        Reviewed by Andreas Kling.

        * parser/Nodes.h:

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

6 years agoSplit out FunctionNode from FunctionBodyNode
ggaren@apple.com [Thu, 4 Dec 2014 23:47:49 +0000 (23:47 +0000)]
Split out FunctionNode from FunctionBodyNode
https://bugs.webkit.org/show_bug.cgi?id=139273

Reviewed by Andreas Kling.

This is step toward a parser speedup.

We used to use FunctionBodyNode for two different purposes:

(1) "I am the root function you are currently parsing";

(2) "I am a lazy record of a nested function, which you will parse later".

This made for awkward lifetime semantics and interfaces.

Now, case (1) is handled by FunctionBodyNode, and case (2) is handled by
a new node named FunctionNode.

Since case (1) no longer needs to handle being the root of the parse
tree, FunctionBodyNode can be a normal arena-allocated node.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock): Use FunctionNode instead of
FunctionBodyNode, since we are producing the root of the function parse
tree.

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): Removed
some unused data, and default-initialized other data, which isn't filled
in meaningfully until recordParse() is called. (The previous values were
incorrect / meaningless, since the FunctionBodyNode didn't have
meaningful values in this case.)

* bytecode/UnlinkedCodeBlock.h: Ditto.

(JSC::UnlinkedFunctionExecutable::forceUsesArguments): Deleted.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator): Use FunctionNode instead of
FunctionBodyNode, since we are generating code starting at the root of
the parse tree.

(JSC::BytecodeGenerator::resolveCallee):
(JSC::BytecodeGenerator::addCallee):
* bytecompiler/BytecodeGenerator.h: Ditto.

* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionBodyNode::emitBytecode):
(JSC::FunctionNode::emitBytecode): Moved the emitBytecode implementation
to FunctionNode, since we never generate code for FunctionBodyNode,
since it's just a placeholder in the AST.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::setUsesArguments): Deleted. Updated for interface
changes.

* parser/Nodes.cpp:
(JSC::FunctionBodyNode::FunctionBodyNode):
(JSC::FunctionBodyNode::finishParsing):
(JSC::FunctionBodyNode::setEndPosition):
(JSC::FunctionNode::FunctionNode):
(JSC::FunctionNode::create):
(JSC::FunctionNode::finishParsing):
(JSC::FunctionBodyNode::create): Deleted.

* parser/Nodes.h:
(JSC::FunctionBodyNode::parameters):
(JSC::FunctionBodyNode::source):
(JSC::FunctionBodyNode::startStartOffset):
(JSC::FunctionBodyNode::isInStrictContext):
(JSC::FunctionNode::parameters):
(JSC::FunctionNode::ident):
(JSC::FunctionNode::functionMode):
(JSC::FunctionNode::startColumn):
(JSC::FunctionNode::endColumn):
(JSC::ScopeNode::setSource): Deleted.
(JSC::FunctionBodyNode::parameterCount): Deleted. Split out the differences
between FunctionNode and FunctionBodyNode.

* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createClauseList):
(JSC::SyntaxChecker::setUsesArguments): Deleted. Removed setUsesArguments
since it wasn't used.

* runtime/Executable.cpp:
(JSC::ProgramExecutable::checkSyntax): Removed a branch that was always
false.

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

6 years agocss3/viewport-percentage-lengths tests are flakey on WK1 Mavericks Debug
dino@apple.com [Thu, 4 Dec 2014 23:26:48 +0000 (23:26 +0000)]
css3/viewport-percentage-lengths tests are flakey on WK1 Mavericks Debug
https://bugs.webkit.org/show_bug.cgi?id=139271

Marking as flakey.

* platform/mac-mavericks/TestExpectations:

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

6 years agoClients disabling action menus sometimes still invoke action menu behaviors
bdakin@apple.com [Thu, 4 Dec 2014 22:57:53 +0000 (22:57 +0000)]
Clients disabling action menus sometimes still invoke action menu behaviors
https://bugs.webkit.org/show_bug.cgi?id=139270
-and corresponding-
rdar://problem/19147218

Reviewed by Tim Horton.

By default, we will keep a single item in the action menu up until the point where
_state == ActionMenuState::Ready. So by checking _state here, we are preventing
clients from opting out of our choice to wait. Ideally we would always still wait
for the Ready state, but this will get the best behavior in the mean time.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _updateActionMenuItems]):

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

6 years agoWeb Inspector: Network Timeline Filter Bar only has "All", missing Resource Type...
commit-queue@webkit.org [Thu, 4 Dec 2014 22:56:01 +0000 (22:56 +0000)]
Web Inspector: Network Timeline Filter Bar only has "All", missing Resource Type filters
https://bugs.webkit.org/show_bug.cgi?id=139268

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-12-04
Reviewed by Brian Burg.

* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.createColumnScopeBar):
Users of createColumnScopeBar pass a Map object now instead of a dictionary.
Iterate over the map appropriately.

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

6 years agoREGRESSION (r173468): Cannot step in WebInspector
antti@apple.com [Thu, 4 Dec 2014 22:48:24 +0000 (22:48 +0000)]
REGRESSION (r173468): Cannot step in WebInspector
https://bugs.webkit.org/show_bug.cgi?id=139260

Reviewed by Alexey Proskuryakov.

Inspector defers all loads and starts a nested runloop when it hits a breakpoint. When continuing it undefers the loads.
If the script execution was triggered from the didFinishLoading callback of the main resource then the main resource would
already be in the finished state in the network process side and setDefersLoading(false) message would end up restarting its load.
Since loads are not meant to restart the generated callbacks would assert or crash the web process when handled in the next
nested inspector runloop.

Fix by taking care that cleaned up NetworkResourceLoaders are always removed from the loader map of
the NetworkConnectionToWebProcess and so can't end up handling late messages.

No test, this requires JS debugger to trigger.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didCleanupResourceLoader):

    This is now the only way to remove resource loaders.
    It is called from NetworkResourceLoader::cleanup only.

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):

    Calling abort  removes the resource loader (since it calls cleanup) so no need to do it explicitly anymore.

* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):

    We are guaranteed to be reffed by NetworkConnectionToWebProcess until cleanup so the explicit ref/deref can be removed.

(WebKit::NetworkResourceLoader::cleanup):

    Call to NetworkConnectionToWebProcess::didCleanupResourceLoader to make the loader unreachable.

* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::identifier):

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

6 years agoWeb Inspector: timeline probe records have inaccurate per-probe hit counts
burg@cs.washington.edu [Thu, 4 Dec 2014 22:20:08 +0000 (22:20 +0000)]
Web Inspector: timeline probe records have inaccurate per-probe hit counts
https://bugs.webkit.org/show_bug.cgi?id=138976

Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:

Previously, the DebuggerAgent was responsible for assigning unique ids to samples.
However, this makes it impossible for the frontend's Timeline manager to associate
a Probe Sample timeline record with the corresponding probe sample data. The record
only included the probe batchId (misnamed as hitCount in ScriptDebugServer).

This patch moves both the batchId and sampleId counters into ScriptDebugServer, so
any client of ScriptDebugListener will get the correct sampleId for each sample.

* inspector/ScriptDebugListener.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::ScriptDebugServer):
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
(Inspector::ScriptDebugServer::handleBreakpointHit):
* inspector/ScriptDebugServer.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::breakpointActionProbe):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebCore:

Update the signature for breakpointActionProbe to take batchId and sampleId.
Covered by existing test inspector-protocol/debugger/didSampleProbe-multiple-probes.html.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::breakpointActionProbe):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createProbeSampleData):
* inspector/TimelineRecordFactory.h:

LayoutTests:

Patch by Katie Madonna <madonnk@gmail.com>

Update test to also cover expected probe sampleId behavior.

* inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt:
* inspector-protocol/debugger/didSampleProbe-multiple-probes.html:

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

6 years agoGroove/inset/outset borders show solid if the color is black
cavalcantii@gmail.com [Thu, 4 Dec 2014 22:01:30 +0000 (22:01 +0000)]
Groove/inset/outset borders show solid if the color is black
https://bugs.webkit.org/show_bug.cgi?id=58608

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/borders/mixed-border-style2.html

This patch will lighten/darken the border side colors, handling
border decoration in a similar way as Firefox does.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
(WebCore::RenderObject::calculateBorderStyleColor):
* rendering/RenderObject.h:

LayoutTests:

* fast/borders/mixed-border-style2.html: Added.
* platform/mac-mavericks/fast/borders/mixed-border-style2-expected.png: Added.
* platform/mac-mavericks/fast/borders/mixed-border-style2-expected.txt: Added.

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

6 years agoWeb Inspector: LayoutTests/inspector tests fail in Production builds due to missing...
joepeck@webkit.org [Thu, 4 Dec 2014 21:56:04 +0000 (21:56 +0000)]
Web Inspector: LayoutTests/inspector tests fail in Production builds due to missing test resources
https://bugs.webkit.org/show_bug.cgi?id=138898

Reviewed by Mark Rowe.

Source/WebInspectorUI:

In Production builds, if FORCE_TOOL_INSTALL=YES is in the environment
we will copy all resources (for Tests) and still do the combine and
optimize phase for normal Production inspection resources.

* Scripts/copy-user-interface-resources.pl:

LayoutTests:

* platform/mac/TestExpectations:

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

6 years agoDon't lock perf tests in run-webkit-tests
ap@apple.com [Thu, 4 Dec 2014 21:49:43 +0000 (21:49 +0000)]
Don't lock perf tests in run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=139264

Reviewed by Daniel Bates.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
* Scripts/webkitpy/layout_tests/controllers/manager.py:
* Scripts/webkitpy/layout_tests/models/test_input.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

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

6 years agoMove 'webkit-aspect-ratio' CSS property to the new StyleBuilder
cdumez@apple.com [Thu, 4 Dec 2014 21:48:33 +0000 (21:48 +0000)]
Move 'webkit-aspect-ratio' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139250

Reviewed by Sam Weinig.

Move 'aspect-ratio' CSS property to the new StyleBuilder by
using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyAspectRatio::applyInheritValue): Deleted.
(WebCore::ApplyPropertyAspectRatio::applyInitialValue): Deleted.
(WebCore::ApplyPropertyAspectRatio::applyValue): Deleted.
(WebCore::ApplyPropertyAspectRatio::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialWebkitAspectRatio):
(WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio):
(WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio):

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

6 years agoFurther fix the 32-bit build.
timothy_horton@apple.com [Thu, 4 Dec 2014 21:32:21 +0000 (21:32 +0000)]
Further fix the 32-bit build.

* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):

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

6 years agoFix the 32-bit build.
timothy_horton@apple.com [Thu, 4 Dec 2014 21:10:49 +0000 (21:10 +0000)]
Fix the 32-bit build.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):

* WebView/WebView.mm:
(-[WebView _setTextIndicator:fadeOut:animationCompletionHandler:]):

* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(WebCore::TextIndicatorWindow::setTextIndicator):

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

6 years agoTextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
timothy_horton@apple.com [Thu, 4 Dec 2014 19:58:14 +0000 (19:58 +0000)]
TextIndicator::createWithSelectionInFrame does synchronous IPC in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=139252
<rdar://problem/19140827>

Reviewed by Anders Carlsson.

It turns out contentsToScreen requires sync IPC in Mac WebKit2, which we
really don't want to be doing here (especially since the UI process will often
be sitting in waitForAndDispatchImmediately waiting for didPerformActionMenuHitTest).

Go back to keeping TextIndicator rects in "window" coordinates and do the conversion
in each of the WebKits instead of trying to share that code.

* WebCore.exp.in:
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithSelectionInFrame):
(WebCore::TextIndicator::TextIndicator):
* page/TextIndicator.h:
(WebCore::TextIndicator::selectionRectInWindowCoordinates):
(WebCore::TextIndicator::textBoundingRectInWindowCoordinates):
(WebCore::TextIndicator::selectionRectInScreenCoordinates): Deleted.
(WebCore::TextIndicator::textBoundingRectInScreenCoordinates): Deleted.
Go back to keeping the rects in "window" coordinates.

* page/mac/TextIndicatorWindow.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
(WebCore::TextIndicatorWindow::setTextIndicator):
Let callers pass in the contentRect instead of trying to share the code
to compute it, since it needs to be different for legacy and modern WebKit.

* WebView/WebView.mm:
(-[WebView _setTextIndicator:fadeOut:animationCompletionHandler:]):
Adjust to the WebCore changes.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::encode):
(IPC::ArgumentCoder<TextIndicatorData>::decode):
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTextIndicator:fadeOut:animationCompletionHandler:]):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
(WebKit::FindController::drawRect):
Adjust to the WebCore changes.

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

6 years agoSimplify StorageManager callback functions
andersca@apple.com [Thu, 4 Dec 2014 19:39:48 +0000 (19:39 +0000)]
Simplify StorageManager callback functions
https://bugs.webkit.org/show_bug.cgi?id=139257

Reviewed by Antti Koivisto.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getOrigins):
(WebKit::StorageManager::getStorageDetailsByOrigin):
(WebKit::callCallbackFunction): Deleted.
(WebKit::StorageManager::getOriginsInternal): Deleted.
(WebKit::StorageManager::getStorageDetailsByOriginInternal): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::didGetKeyValueStorageOrigins): Deleted.
(WebKit::didGetStorageDetailsByOrigin): Deleted.

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

6 years agoFix cast-align warning in StringImpl.h
ossy@webkit.org [Thu, 4 Dec 2014 19:22:35 +0000 (19:22 +0000)]
Fix cast-align warning in StringImpl.h
https://bugs.webkit.org/show_bug.cgi?id=139222

Reviewed by Anders Carlsson.

* wtf/text/StringImpl.h:
(WTF::StringImpl::tailPointer):

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

6 years agoSerialization of MapData object provides unsafe access to internal types
ddkilzer@apple.com [Thu, 4 Dec 2014 18:31:47 +0000 (18:31 +0000)]
Serialization of MapData object provides unsafe access to internal types
https://bugs.webkit.org/show_bug.cgi?id=138653

Patch by Oliver Hunt <oliver@apple.com> on 2014-12-04
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Converting these ASSERTs into RELEASE_ASSERTs, as it is now obvious
that despite trying hard to be safe in all cases it's simply to easy
to use an iterator in an unsafe state.

* runtime/MapData.h:
(JSC::MapData::const_iterator::key):
(JSC::MapData::const_iterator::value):

Source/WebCore:

We now keep the value portion of the key/value pair in MapData as a
separate stack. This allows us to maintain the spec semantic of
"atomic" serialisation of the key/value pair without retaining the
use of a potentially invalid iterator.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):

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

6 years agoURTBF after r176794.
ossy@webkit.org [Thu, 4 Dec 2014 17:41:51 +0000 (17:41 +0000)]
URTBF after r176794.

* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileCreationTime):
(WebKit::fileModificationTime):

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

6 years agohttp/tests/security/mixedContent/about-blank-iframe-in-main-frame.html fails unless...
ap@apple.com [Thu, 4 Dec 2014 17:18:14 +0000 (17:18 +0000)]
http/tests/security/mixedContent/about-blank-iframe-in-main-frame.html fails unless certain other tests run before it
https://bugs.webkit.org/show_bug.cgi?id=139243

Reviewed by Anders Carlsson.

We didn't get WKPageLoaderClient calls in secondary windows, so we didn't have a
chance to allow untrusted certificates.

* WebKitTestRunner/TestController.cpp: (WTR::TestController::createOtherPage):
Set up more client objects for secondary windows. We may be able to share some of the
code with main view creation function, but it's not exactly the same (notably, we
do not focus a secondary window when it's done loading).

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

6 years ago[SVG Masking] Add support for referencing <mask> elements from -webkit-mask-image
stavila@adobe.com [Thu, 4 Dec 2014 17:05:12 +0000 (17:05 +0000)]
[SVG Masking] Add support for referencing <mask> elements from -webkit-mask-image
https://bugs.webkit.org/show_bug.cgi?id=139092

Reviewed by Simon Fraser.

This patch improves the -webkit-mask-image property by allowing it to reference
a <mask> element defined in an inline or external SVG document.
Up until now, each image to be used as a mask consisted of a FillLayer object
whose m_image member represented the mask. Now, in order to accomodate
<mask> elements referenced by a fragment identifier (e.g. file.svg#mask1)
a new class was created (MaskImageOperation) and added as a member of the
FillLayer. As such, from now on, all FillLayer objects used for masking will
store the masking information in this new member.
When parsing the -webkit-mask-image property (or the -webkit-mask shorthand)
a new MaskImageOperation object is created for each image. If the value represents
an external URL, a pending SVG document will be created which will be loaded
during the phase that loads the pending resources. When the download is complete,
the MaskImageOperation is notified by the CachedSVGDocument class and checks if
the received download is a valid SVG and the requested fragment identifier
actually exists and identifies a <mask> element. If it does, that element's
renderer (of type RenderSVGResourceMasker) will be used when painting the mask layers.
Otherwise, the MaskImageOperation class will use the already downloaded data
buffer to create a CachedImage from it and use that instead, basically emulating
the previous behavior, when only images were accepted. This ensures that all existing
behavior, like painting entire SVGs, painting normal images (e.g. PNG/JPG), painting
generated images (e.g. linear-gradient) works as it did before.

No new tests required, this patch doesn't change any current functionality.
It only adds support for referencing <mask> elements for the -webkit-mask-image
property. This is sub-part 1 of the bigger patch https://bugs.webkit.org/show_bug.cgi?id=129682.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isWebKitCSSResourceValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::createMaskImageOperations):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments):
* css/WebKitCSSResourceValue.cpp: Added.
(WebCore::WebKitCSSResourceValue::WebKitCSSResourceValue):
(WebCore::WebKitCSSResourceValue::customCSSText):
(WebCore::WebKitCSSResourceValue::isCSSValueNone):
* css/WebKitCSSResourceValue.h: Added.
(WebCore::WebKitCSSResourceValue::create):
(WebCore::WebKitCSSResourceValue::innerValue):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::addCachedResource):
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::CachedSVGDocument):
(WebCore::CachedSVGDocument::finishLoading):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::load):
* loader/cache/CachedSVGDocumentReference.h:
* page/FrameView.cpp:
(WebCore::FrameView::isSVGDocument):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::createPageFromBuffer):
* page/Page.h:
* platform/ScrollView.h:
(WebCore::ScrollView::isSVGDocument):
* platform/graphics/MaskImageOperation.cpp: Added.
(WebCore::MaskImageOperation::create):
(WebCore::MaskImageOperation::MaskImageOperation):
(WebCore::MaskImageOperation::~MaskImageOperation):
(WebCore::MaskImageOperation::isCSSValueNone):
(WebCore::MaskImageOperation::cssValue):
(WebCore::MaskImageOperation::isMaskLoaded):
(WebCore::MaskImageOperation::setRenderLayerImageClient):
(WebCore::MaskImageOperation::addRendererImageClient):
(WebCore::MaskImageOperation::removeRendererImageClient):
(WebCore::MaskImageOperation::getOrCreateCachedSVGDocumentReference):
(WebCore::MaskImageOperation::notifyFinished): This is the method that gets called when the document has finished
downloading and checks if it can find a valid <mask> element.
(WebCore::MaskImageOperation::drawMask):
(WebCore::MaskImageOperation::getSVGMasker):
* platform/graphics/MaskImageOperation.h: Added.
* rendering/RenderBoxModelObject.cpp: The BackgroundImageGeometry class was moved out of RenderBoxModelObject in
order to be used as a parameter for other methods. This was necessary to avoid having methods with very many parameters.
(WebCore::BackgroundImageGeometry::setNoRepeatX):
(WebCore::BackgroundImageGeometry::setNoRepeatY):
(WebCore::BackgroundImageGeometry::useFixedAttachment):
(WebCore::BackgroundImageGeometry::clip):
(WebCore::BackgroundImageGeometry::relativePhase):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::destOrigin):
(WebCore::BackgroundImageGeometry::setDestOrigin):
(WebCore::BackgroundImageGeometry::destRect):
(WebCore::BackgroundImageGeometry::setDestRect):
(WebCore::BackgroundImageGeometry::phase):
(WebCore::BackgroundImageGeometry::setPhase):
(WebCore::BackgroundImageGeometry::tileSize):
(WebCore::BackgroundImageGeometry::setTileSize):
(WebCore::BackgroundImageGeometry::spaceSize):
(WebCore::BackgroundImageGeometry::setSpaceSize):
(WebCore::BackgroundImageGeometry::setPhaseX):
(WebCore::BackgroundImageGeometry::setPhaseY):
(WebCore::BackgroundImageGeometry::setHasNonLocalGeometry):
(WebCore::BackgroundImageGeometry::hasNonLocalGeometry):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::hasNonLocalGeometry): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::~RenderLayer):
* rendering/RenderLayer.h:
* rendering/RenderLayerMaskImageInfo.cpp: Added.
(WebCore::RenderLayer::MaskImageInfo::layerToMaskMap): Returns a static map that links MaskImageInfo objects to RenderLayers.
(WebCore::RenderLayer::MaskImageInfo::getIfExists): Returns the MaskImageInfo associated with a specific RenderLayer.
(WebCore::RenderLayer::MaskImageInfo::get): Returns the MaskImageInfo associated with a specific RenderLayer (creates it if necessary).
(WebCore::RenderLayer::MaskImageInfo::remove): Removes the MaskImageInfo associated with a specific RenderLayer.
(WebCore::RenderLayer::MaskImageInfo::MaskImageInfo):
(WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo):
(WebCore::RenderLayer::MaskImageInfo::notifyFinished): Gets called when the SVG document finished loading, triggers repaint.
(WebCore::RenderLayer::MaskImageInfo::imageChanged): Gets called when the image object changed, triggers repaint.
(WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Goes through all mask layers and sets image/SVG clients.
Updates list of internal and external SVG references.
(WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Removes all image/SVG clients and clears lists of internal and external SVG references.
* rendering/RenderLayerMaskImageInfo.h: Added.
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderSVGResourceMasker):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::operator=):
(WebCore::FillLayer::operator==):
(WebCore::FillLayer::cullEmptyLayers):
(WebCore::FillLayer::hasNonEmptyMaskImage):
(WebCore::FillLayer::imagesAreLoaded):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::maskImage):
(WebCore::FillLayer::imageOrMaskImage):
(WebCore::FillLayer::setMaskImage):
(WebCore::FillLayer::clearMaskImage):
(WebCore::FillLayer::hasMaskImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applySVGMask):
(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
* rendering/svg/RenderSVGResourceMasker.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
(WebCore::SVGMaskElement::addClientRenderLayer):
(WebCore::SVGMaskElement::removeClientRenderLayer):
* svg/SVGMaskElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::setCachedDocument):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):

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

6 years agoAdd a way to delete local storage origins modified after a given date
andersca@apple.com [Thu, 4 Dec 2014 16:35:29 +0000 (16:35 +0000)]
Add a way to delete local storage origins modified after a given date
https://bugs.webkit.org/show_bug.cgi?id=139249

Reviewed by Tim Horton.

Also change LocalStorageDatabaseTracker to hold on to WTF::Optional time_t values
instead of treating missing values as zero.

* UIProcess/LocalStorageDetails.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileCreationTime):
(WebKit::fileModificationTime):
(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
(WebKit::LocalStorageDatabaseTracker::details):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::didGetStorageDetailsByOrigin):

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

6 years agoUnreviewed, rolling out r176789.
commit-queue@webkit.org [Thu, 4 Dec 2014 14:09:57 +0000 (14:09 +0000)]
Unreviewed, rolling out r176789.
https://bugs.webkit.org/show_bug.cgi?id=139255

Broke the non Mac-WK2 builds (Requested by stavila on
#webkit).

Reverted changeset:

"Remove isSpecifiedFont boolean from FontDescription"
https://bugs.webkit.org/show_bug.cgi?id=139233
http://trac.webkit.org/changeset/176789

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

6 years agoRemove isSpecifiedFont boolean from FontDescription
antti@apple.com [Thu, 4 Dec 2014 11:50:26 +0000 (11:50 +0000)]
Remove isSpecifiedFont boolean from FontDescription
https://bugs.webkit.org/show_bug.cgi?id=139233

Reviewed by Andreas Kling.

It is barely used.

* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInheritFontFamily):
(WebCore::StyleBuilderCustom::applyValueFontFamily):
* platform/graphics/FontDescription.cpp:
(WebCore::genericFamiliesSet):
(WebCore::FontDescription::hasGenericFirstFamily):

    Add a function to test for generic families.

* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::setTextRenderingMode):
(WebCore::FontDescription::operator==):
(WebCore::FontDescription::isSpecifiedFont): Deleted.
(WebCore::FontDescription::setIsSpecifiedFont): Deleted.
* rendering/RenderText.cpp:
(WebCore::RenderText::computeUseBackslashAsYenSymbol):

    This is the only client.
    Figure out the equivalent information dynamically if needed.

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

6 years ago[EFL][WebGL] Remove junk webgl layout tests from TestExpectations
evab.u-szeged@partner.samsung.com [Thu, 4 Dec 2014 10:18:31 +0000 (10:18 +0000)]
[EFL][WebGL] Remove junk webgl layout tests from TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=139253

Reviewed by Gyuyoung Kim.

* platform/efl/TestExpectations:

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

6 years agocan not find cairo-gl.h when build webkit with gtk on ubuntu 14.04
berto@igalia.com [Thu, 4 Dec 2014 10:10:36 +0000 (10:10 +0000)]
can not find cairo-gl.h when build webkit with gtk on ubuntu 14.04
https://bugs.webkit.org/show_bug.cgi?id=136576

Reviewed by Carlos Garcia Campos.

CMake should complain if Accelerated 2D Canvas is explicitly
enabled but cairo-gl is not found.

* Source/cmake/OptionsGTK.cmake:

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

6 years ago[EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific...
pmolnar.u-szeged@partner.samsung.com [Thu, 4 Dec 2014 09:23:28 +0000 (09:23 +0000)]
[EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific host
https://bugs.webkit.org/show_bug.cgi?id=131160

Reviewed by Gyuyoung Kim.

* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::allowSpecificHTTPSCertificateForHost):
(ewk_context_tls_certificate_for_host_allow):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/test_ewk2_ssl.cpp:

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

6 years agoAdd a sample plugin to demonstrate the mute plugin API.
adachan@apple.com [Thu, 4 Dec 2014 06:42:38 +0000 (06:42 +0000)]
Add a sample plugin to demonstrate the mute plugin API.
https://bugs.webkit.org/show_bug.cgi?id=139231

Reviewed by Anders Carlsson.

* NetscapeMuteAPIPlugin/AudioPlayer.h: Added.
* NetscapeMuteAPIPlugin/AudioPlayer.mm: Added.
(-[AudioPlayer initWithURL:]):
(-[AudioPlayer dealloc]):
(-[AudioPlayer isReadyToPlay]):
(-[AudioPlayer isPlaying]):
(-[AudioPlayer setPlaying:]):
(-[AudioPlayer isMuted]):
(-[AudioPlayer setMuted:]):
(-[AudioPlayer observeValueForKeyPath:ofObject:change:context:]):
* NetscapeMuteAPIPlugin/English.lproj/InfoPlist.strings: Added.
* NetscapeMuteAPIPlugin/Info.plist: Added.
* NetscapeMuteAPIPlugin/MenuHandler.h: Added.
* NetscapeMuteAPIPlugin/MenuHandler.m: Added.
(-[MenuHandler _play:]):
(-[MenuHandler _pause:]):
(-[MenuHandler validateUserInterfaceItem:]):
(-[MenuHandler initWithAudioPlayer:]):
(-[MenuHandler dealloc]):
(-[MenuHandler menu]):
* NetscapeMuteAPIPlugin/NetscapeMuteAPIPlugin.xcodeproj/project.pbxproj: Added.
* NetscapeMuteAPIPlugin/main.m: Added.
(-[PluginObject initWithNPP:audioURL:]):
(-[PluginObject dealloc]):
(-[PluginObject menuHandler]):
(-[PluginObject isPlayingAudio]):
(-[PluginObject isMuted]):
(-[PluginObject setMuted:]):
(-[PluginObject readyStateDidChangeForAudioPlayer:]):
(-[PluginObject mutedStateDidChangeForAudioPlayer:]):
(-[PluginObject playStateDidChangeForAudioPlayer:]):
(-[PluginObject _invalidateDisplayString]):
(NP_Initialize):
(NP_GetEntryPoints):
(NP_Shutdown):
(NPP_New):
(NPP_Destroy):
(NPP_SetWindow):
(NPP_NewStream):
(NPP_DestroyStream):
(NPP_WriteReady):
(NPP_Write):
(NPP_StreamAsFile):
(NPP_Print):
(handleDraw):
(invalidatePlugin):
(handleMouseEvent):
(NPP_HandleEvent):
(NPP_URLNotify):
(NPP_GetValue):
(NPP_SetValue):
* NetscapeMuteAPIPlugin/test.html: Added.

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

6 years agoUse std::unique_ptr instead of PassOwnPtr|OwnPtr for Pasteboard
commit-queue@webkit.org [Thu, 4 Dec 2014 03:02:57 +0000 (03:02 +0000)]
Use std::unique_ptr instead of PassOwnPtr|OwnPtr for Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=139019

Patch by Joonghun Park <jh718.park@samsung.com> on 2014-12-03
Reviewed by Darin Adler.

No new tests, no behavior changes.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::DataTransfer):
* dom/DataTransfer.h:
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingDataTransfer):
* platform/Pasteboard.h:
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createForGlobalSelection):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::Pasteboard::create): Deleted.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::Pasteboard::create): Deleted.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createForCopyAndPaste):
(WebCore::Pasteboard::createPrivate):
(WebCore::Pasteboard::createForDragAndDrop):

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

6 years agoMove JavaScriptCore/dfg to std::unique_ptr
gyuyoung.kim@samsung.com [Thu, 4 Dec 2014 02:52:51 +0000 (02:52 +0000)]
Move JavaScriptCore/dfg to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=139169

Reviewed by Filip Pizlo.

Use std::unique_ptr<>|std::make_unique<> in JavaScriptCore/dfg directory.

* dfg/DFGBasicBlock.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::JITCompiler):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compileFunction):
(JSC::DFG::JITCompiler::linkFunction):
* dfg/DFGJITCompiler.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::cancel):
* dfg/DFGPlan.h:
* dfg/DFGSlowPathGenerator.h:
* dfg/DFGWorklist.h:
* ftl/FTLFail.cpp:
(JSC::FTL::fail):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):

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

6 years agoUnreviewed. Some webgl conformance tests crash.
roger_fong@apple.com [Thu, 4 Dec 2014 02:43:19 +0000 (02:43 +0000)]
Unreviewed. Some webgl conformance tests crash.
<rdar://problem/19136723>
* platform/mac/TestExpectations:

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

6 years agoImplement action menus for tel: URLs
timothy_horton@apple.com [Thu, 4 Dec 2014 02:32:40 +0000 (02:32 +0000)]
Implement action menus for tel: URLs
https://bugs.webkit.org/show_bug.cgi?id=139240
<rdar://problem/19115662>

Reviewed by Anders Carlsson.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForDataDetectableLink]):
Make sure to use the newly created currentActionContext... everywhere.

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

6 years agoUnreviewed. Add 1.0.3 conformance tests. Remove unused webgl test resource files.
roger_fong@apple.com [Thu, 4 Dec 2014 02:32:40 +0000 (02:32 +0000)]
Unreviewed. Add 1.0.3 conformance tests. Remove unused webgl test resource files.
* platform/mac/TestExpectations: Skipping 1.0.3 tests until we are at least somewhat conformant.
* webgl/1.0.3: Added.
* webgl/resources/webgl_test_files: Removed

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

6 years agoImplement action menus for tel: URLs
timothy_horton@apple.com [Thu, 4 Dec 2014 02:28:57 +0000 (02:28 +0000)]
Implement action menus for tel: URLs
https://bugs.webkit.org/show_bug.cgi?id=139240
<rdar://problem/19115662>

Reviewed by Anders Carlsson.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForDataDetectableLink]):
Make sure to use the newly created currentActionContext.

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

6 years agoGet rid of FrameLoaderClient::dispatchWillRequestResource
benjamin@webkit.org [Thu, 4 Dec 2014 02:06:38 +0000 (02:06 +0000)]
Get rid of FrameLoaderClient::dispatchWillRequestResource
https://bugs.webkit.org/show_bug.cgi?id=139235

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-12-03
Reviewed by Alexey Proskuryakov.

It is useless.

* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::dispatchWillRequestResource): Deleted.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):

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

6 years agoREGRESSION (r176479): DFG ASSERTION beneath emitOSRExitCall running Kraken/imaging...
msaboff@apple.com [Thu, 4 Dec 2014 01:59:40 +0000 (01:59 +0000)]
REGRESSION (r176479): DFG ASSERTION beneath emitOSRExitCall running Kraken/imaging-gaussian-blur.js.ftl-no-cjit-osr-validation and other tests
https://bugs.webkit.org/show_bug.cgi?id=139246

Reviewed by Geoffrey Garen.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::buildExitArguments):
The DFG_ASSERT that checks liveness at exit time doesn't properly
handle the case where the local is not available at OSR exit time,
but the local is live in the bytecode.  This now happens with the
allocated scope register when we are compiling for FTLForOSREntryMode
due to DCE done when the control flow was changed and a new entrypoint
was added in the OSR entrypoint creation phase.  Therefore we silence
the assert when compiling for FTLForOSREntryMode.

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

6 years agoWeb Inspector: Missing getter, clients never see DragToAdjustController is enabled
commit-queue@webkit.org [Thu, 4 Dec 2014 01:40:21 +0000 (01:40 +0000)]
Web Inspector: Missing getter, clients never see DragToAdjustController is enabled
https://bugs.webkit.org/show_bug.cgi?id=139228

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-12-03
Reviewed by Simon Fraser.

* UserInterface/Controllers/DragToAdjustController.js:
(WebInspector.DragToAdjustController.prototype.get enabled):

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

6 years agoUnreviewed, rolling out r176457.
commit-queue@webkit.org [Thu, 4 Dec 2014 01:31:37 +0000 (01:31 +0000)]
Unreviewed, rolling out r176457.
https://bugs.webkit.org/show_bug.cgi?id=139247

More iOS breakage (Requested by andersca on #webkit).

Reverted changeset:

"Fix iOS build."
http://trac.webkit.org/changeset/176457

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

6 years agoList markers in RTL languages do not draw the first character.
mmaxfield@apple.com [Thu, 4 Dec 2014 01:30:07 +0000 (01:30 +0000)]
List markers in RTL languages do not draw the first character.
https://bugs.webkit.org/show_bug.cgi?id=139244

Reviewed by Simon Fraser.

Source/WebCore:

Off-by-one error when reversing the string (from LTR to RTL)

Test: fast/lists/rtl-marker.html

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):

LayoutTests:

* fast/lists/rtl-marker-expected.html: Added.
* fast/lists/rtl-marker.html: Added.

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

6 years ago<input> elements get whitespace action menu instead of editable text menu
bdakin@apple.com [Thu, 4 Dec 2014 01:06:52 +0000 (01:06 +0000)]
<input> elements get whitespace action menu instead of editable text menu
https://bugs.webkit.org/show_bug.cgi?id=139241
-and corresponding-
rdar://problem/19072083

Reviewed by Sam Weinig.

Source/WebCore:

Since we will hit test form controls as form controls, we need a new function to
determine if the hit point is over text inside that form control or not.
* WebCore.exp.in:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isOverTextInsideFormControlElement):
* rendering/HitTestResult.h:

Source/WebKit/mac:

We should disallow shadow content in the hit test. This is the default and it is
how context menus behave. We originally wanted to text inside shadow content so
that we could find the text, but the new function I added to HitTestResult will
allow that.
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController performHitTestAtPoint:]):

Adjust to the fact that we don’t hit test shadow content any more.
(-[WebActionMenuController focusAndSelectHitTestResult]):

Offer the text menus for text inside form controls.
(-[WebActionMenuController _defaultMenuItems]):

Source/WebKit2:

Add isOverTextInsideFormControlElement to WebHitTestResult.
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::Data):
(WebKit::WebHitTestResult::Data::encode):
(WebKit::WebHitTestResult::Data::decode):
* Shared/WebHitTestResult.h:
(WebKit::WebHitTestResult::isOverTextInsideFormControlElement):

Offer the text menus for text inside form controls.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):

We should disallow shadow content in the hit test. This is the default and it is
how context menus behave. We originally wanted to text inside shadow content so
that we could find the text, but the new function I added to HitTestResult will
allow that.
* WebProcess/WebPage/mac/WebPageMac.mm:

Adjust to the fact that we don’t hit test shadow content any more.
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):
(WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):

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

6 years agoUnreviewed, rolling out r176489.
commit-queue@webkit.org [Thu, 4 Dec 2014 00:51:02 +0000 (00:51 +0000)]
Unreviewed, rolling out r176489.
https://bugs.webkit.org/show_bug.cgi?id=139242

More iOS breakage (Requested by andersca on #webkit).

Reverted changeset:

"Unreviewed, iOS build fix after r176452."
http://trac.webkit.org/changeset/176489

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

6 years agoImplement action menus for tel: URLs
timothy_horton@apple.com [Thu, 4 Dec 2014 00:33:07 +0000 (00:33 +0000)]
Implement action menus for tel: URLs
https://bugs.webkit.org/show_bug.cgi?id=139240
<rdar://problem/19115662>

Reviewed by Anders Carlsson.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForDataDetectableLink]):
Rename this function as it will work for both mailto and tel URLs.
Adjust it to use contextForView:.

(-[WebActionMenuController webView:willHandleMouseDown:]):
(-[WebActionMenuController prepareForMenu:withEvent:]):
(-[WebActionMenuController didCloseMenu:withEvent:]):
(-[WebActionMenuController _defaultMenuItems]):
Don't check the menu type when going to interact with _currentActionContext.
We'll only have a _currentActionContext if we have a data detected item,
and there are multiple menu types that end up using DDActionContext.

* WebView/WebUIDelegatePrivate.h:
Add a new type.

* Shared/API/c/WKActionMenuTypes.h:
Add a new type.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
Rename this function as it will work for both mailto and tel URLs.
Adjust it to use contextForView:.

(-[WKActionMenuController _clearActionMenuState]):
(-[WKActionMenuController menuNeedsUpdate:]):
(-[WKActionMenuController _defaultMenuItems]):
Don't check the menu type when going to interact with _currentActionContext.
We'll only have a _currentActionContext if we have a data detected item,
and there are multiple menu types that end up using DDActionContext.

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

6 years agoUnreviewed, rolling out r176452 and r176559.
andersca@apple.com [Thu, 4 Dec 2014 00:16:38 +0000 (00:16 +0000)]
Unreviewed, rolling out r176452 and r176559.
https://bugs.webkit.org/show_bug.cgi?id=139239

Broke iOS (Requested by andersca on #webkit).

Reverted changesets:

"Remove alignment code from IPC coders"
https://bugs.webkit.org/show_bug.cgi?id=138963
http://trac.webkit.org/changeset/176452

"[WK2] SecComp buildfix after r176452"
https://bugs.webkit.org/show_bug.cgi?id=139081
http://trac.webkit.org/changeset/176559

Patch by Commit Queue <commit-queue@webkit.org> on 2014-12-03

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

6 years agoUnreviewed gardening.
cdumez@apple.com [Thu, 4 Dec 2014 00:00:30 +0000 (00:00 +0000)]
Unreviewed gardening.

Land expected result for fast/dom/timer-throttle-on-scrolling-iframe-away.html
that was missing in r176729.

* fast/dom/timer-throttle-on-scrolling-iframe-away-expected.txt: Added.

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

6 years agoUnreviewed. Remove 1.0.1 and experimental 1.0.3 WebGL conformance tests to make way...
roger_fong@apple.com [Wed, 3 Dec 2014 23:53:30 +0000 (23:53 +0000)]
Unreviewed. Remove 1.0.1 and experimental 1.0.3 WebGL conformance tests to make way for official 1.0.3 tests.

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

6 years agohttp/tests/misc/authentication-redirect tests use the same authentication realm
ap@apple.com [Wed, 3 Dec 2014 23:39:41 +0000 (23:39 +0000)]
http/tests/misc/authentication-redirect tests use the same authentication realm
https://bugs.webkit.org/show_bug.cgi?id=139225

Land custom results for WebKit2, because the format of output is different there.

* platform/wk2/http/tests/misc/authentication-redirect-3: Added.
* platform/wk2/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt: Copied from LayoutTests/http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials-expected.txt.

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

6 years agoRemoved the global parser arena
ggaren@apple.com [Wed, 3 Dec 2014 23:23:56 +0000 (23:23 +0000)]
Removed the global parser arena
https://bugs.webkit.org/show_bug.cgi?id=139236

Reviewed by Sam Weinig.

Simplifies parser lifetime logic.

There's no need to keep a global arena. We can create a new arena
each time we parse.

* bytecompiler/BytecodeGenerator.h: Global replace to pass around a
ParserArena instead of VM*, since the VM no longer owns the arena.
(JSC::BytecodeGenerator::parserArena):

* bytecompiler/NodesCodegen.cpp: Ditto.
(JSC::ArrayNode::toArgumentList):
(JSC::ApplyFunctionCallDotNode::emitBytecode):
* parser/ASTBuilder.h: Ditto.
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::createSourceElements):
(JSC::ASTBuilder::createCommaExpr):
(JSC::ASTBuilder::createLogicalNot):
(JSC::ASTBuilder::createUnaryPlus):
(JSC::ASTBuilder::createVoid):
(JSC::ASTBuilder::thisExpr):
(JSC::ASTBuilder::createResolve):
(JSC::ASTBuilder::createObjectLiteral):
(JSC::ASTBuilder::createArray):
(JSC::ASTBuilder::createNumberExpr):
(JSC::ASTBuilder::createString):
(JSC::ASTBuilder::createBoolean):
(JSC::ASTBuilder::createNull):
(JSC::ASTBuilder::createBracketAccess):
(JSC::ASTBuilder::createDotAccess):
(JSC::ASTBuilder::createSpreadExpression):
(JSC::ASTBuilder::createRegExp):
(JSC::ASTBuilder::createNewExpr):
(JSC::ASTBuilder::createConditionalExpr):
(JSC::ASTBuilder::createAssignResolve):
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createFunctionBody):
(JSC::ASTBuilder::createGetterOrSetterProperty):
(JSC::ASTBuilder::createArguments):
(JSC::ASTBuilder::createArgumentsList):
(JSC::ASTBuilder::createProperty):
(JSC::ASTBuilder::createPropertyList):
(JSC::ASTBuilder::createElementList):
(JSC::ASTBuilder::createFormalParameterList):
(JSC::ASTBuilder::createClause):
(JSC::ASTBuilder::createClauseList):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::createBlockStatement):
(JSC::ASTBuilder::createExprStatement):
(JSC::ASTBuilder::createIfStatement):
(JSC::ASTBuilder::createForLoop):
(JSC::ASTBuilder::createForInLoop):
(JSC::ASTBuilder::createForOfLoop):
(JSC::ASTBuilder::createEmptyStatement):
(JSC::ASTBuilder::createVarStatement):
(JSC::ASTBuilder::createEmptyVarExpression):
(JSC::ASTBuilder::createReturnStatement):
(JSC::ASTBuilder::createBreakStatement):
(JSC::ASTBuilder::createContinueStatement):
(JSC::ASTBuilder::createTryStatement):
(JSC::ASTBuilder::createSwitchStatement):
(JSC::ASTBuilder::createWhileStatement):
(JSC::ASTBuilder::createDoWhileStatement):
(JSC::ASTBuilder::createLabelStatement):
(JSC::ASTBuilder::createWithStatement):
(JSC::ASTBuilder::createThrowStatement):
(JSC::ASTBuilder::createDebugger):
(JSC::ASTBuilder::createConstStatement):
(JSC::ASTBuilder::appendConstDecl):
(JSC::ASTBuilder::combineCommaNodes):
(JSC::ASTBuilder::createDeconstructingAssignment):
(JSC::ASTBuilder::Scope::Scope):
(JSC::ASTBuilder::createNumber):
(JSC::ASTBuilder::makeTypeOfNode):
(JSC::ASTBuilder::makeDeleteNode):
(JSC::ASTBuilder::makeNegateNode):
(JSC::ASTBuilder::makeBitwiseNotNode):
(JSC::ASTBuilder::makeMultNode):
(JSC::ASTBuilder::makeDivNode):
(JSC::ASTBuilder::makeModNode):
(JSC::ASTBuilder::makeAddNode):
(JSC::ASTBuilder::makeSubNode):
(JSC::ASTBuilder::makeLeftShiftNode):
(JSC::ASTBuilder::makeRightShiftNode):
(JSC::ASTBuilder::makeURightShiftNode):
(JSC::ASTBuilder::makeBitOrNode):
(JSC::ASTBuilder::makeBitAndNode):
(JSC::ASTBuilder::makeBitXOrNode):
(JSC::ASTBuilder::makeFunctionCallNode):
(JSC::ASTBuilder::makeBinaryNode):
(JSC::ASTBuilder::makeAssignNode):
(JSC::ASTBuilder::makePrefixNode):
(JSC::ASTBuilder::makePostfixNode):

* parser/NodeConstructors.h: Ditto.
(JSC::ParserArenaFreeable::operator new):
(JSC::ParserArenaDeletable::operator new):
(JSC::ParserArenaRefCounted::ParserArenaRefCounted):

* parser/Nodes.cpp: Ditto.
(JSC::ScopeNode::ScopeNode):
(JSC::ProgramNode::ProgramNode):
(JSC::ProgramNode::create):
(JSC::EvalNode::EvalNode):
(JSC::EvalNode::create):
(JSC::FunctionBodyNode::FunctionBodyNode):
(JSC::FunctionBodyNode::create):

* parser/Nodes.h: Ditto.
(JSC::ScopeNode::parserArena):

* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseProperty): The parser now owns its own
arena, and transfers ownership of its contents when invoking the ScopeNode
constructor.

* parser/Parser.h:
(JSC::Parser<LexerType>::parse): No need to explicitly reset the arena,
since its lifetime is tied to the parser's lifetime now.

* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createProperty):
(JSC::SyntaxChecker::createGetterOrSetterProperty):

* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h: The point of the patch: no more global.

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