WebKit-https.git
5 years agoIf there are no services available, do not show the service controls UI
beidson@apple.com [Thu, 1 May 2014 01:18:52 +0000 (01:18 +0000)]
If there are no services available, do not show the service controls UI
<rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410

Reviewed by Tim Horton.

Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
are installed and usable on the system:
* UIProcess/mac/ServicesController.h: Added.
(WebKit::ServicesController::imageServicesExist):
(WebKit::ServicesController::selectionServicesExist):
* UIProcess/mac/ServicesController.mm: Added.
(WebKit::ServicesController::shared):
(WebKit::ServicesController::ServicesController):
(WebKit::ServicesController::refreshExistingServices):
(WebKit::ServicesController::refreshExistingServicesTimerFired):

Add "image services exist" and "selection services exist" parameters:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
  services no longer exist.
* UIProcess/WebContext.h:

Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setEnabledServices):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::imageServicesExist):
(WebKit::WebProcess::selectionServicesExist):

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
  on the system must have changed. So ask the WebContext to refresh them.

* WebProcess/WebPage/SelectionOverlayController.cpp:
(WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
  overlay (and destroy any existing overlay!)

* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.

* WebProcess/WebProcess.messages.in:
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoTry yet again to fix the build.
andersca@apple.com [Thu, 1 May 2014 01:04:52 +0000 (01:04 +0000)]
Try yet again to fix the build.

* WebKit.xcodeproj/project.pbxproj:

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

5 years agoAnother build fix attempt.
andersca@apple.com [Thu, 1 May 2014 00:53:42 +0000 (00:53 +0000)]
Another build fix attempt.

* WebKit.xcodeproj/project.pbxproj:

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

5 years agoTry to fix the iOS build.
andersca@apple.com [Thu, 1 May 2014 00:44:36 +0000 (00:44 +0000)]
Try to fix the iOS build.

* WebKit.xcodeproj/project.pbxproj:

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=132415
barraclough@apple.com [Thu, 1 May 2014 00:27:14 +0000 (00:27 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=132415
Fix snapshotting on WebKit2

Reviewed by Geoff Garen

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
    - Use a VisibilityToken to keep the process runnable.

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

5 years agoFix PageVisibility on iOS
barraclough@apple.com [Thu, 1 May 2014 00:23:52 +0000 (00:23 +0000)]
Fix PageVisibility on iOS
https://bugs.webkit.org/show_bug.cgi?id=132393

Rubber stamped by Tim Horton

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
(WebKit::PageClientImpl::isVisuallyIdle):
    - m_contentView -> m_webView

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

5 years agoUnreviewed, rolling out r167879 and r167942.
rego@igalia.com [Thu, 1 May 2014 00:12:59 +0000 (00:12 +0000)]
Unreviewed, rolling out r167879 and r167942.
https://bugs.webkit.org/show_bug.cgi?id=132408

OrderIterator changes caused regressions in flexbox (Requested
by rego on #webkit).

We're keeping the new layout test introduced in r167942
(fast/flexbox/order-iterator-crash.html) to avoid similar
regressions in the future.

Reverted changesets:

"OrderIterator refactoring to avoid extra loops"
https://bugs.webkit.org/show_bug.cgi?id=119061
http://trac.webkit.org/changeset/167879

"REGRESSION (r167879): Heap-use-after-free in
WebCore::RenderFlexibleBox"
https://bugs.webkit.org/show_bug.cgi?id=132337
http://trac.webkit.org/changeset/167942

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

5 years agoCursor gets thinner on empty lines.
enrica@apple.com [Thu, 1 May 2014 00:08:51 +0000 (00:08 +0000)]
Cursor gets thinner on empty lines.
https://bugs.webkit.org/show_bug.cgi?id=132411
<rdar://problem/15994556>

Reviewed by Benjamin Poulain.

RenderLineBreak::localCaretRect should not define
locally the constant caretWidth, but use the one from
RenderObject.h which knows about the differences between
iOS and the other platforms.

* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::localCaretRect):

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

5 years agoMake sure the "All" targets build WebKitLegacy, rather than WebKit.
simon.fraser@apple.com [Wed, 30 Apr 2014 23:58:49 +0000 (23:58 +0000)]
Make sure the "All" targets build WebKitLegacy, rather than WebKit.

Reviewed by Dan Bernstein/Anders Carlsson.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

5 years ago[iOS][WK2] Add a SPI to exclude the extended background from some areas of WKWebView
benjamin@webkit.org [Wed, 30 Apr 2014 23:45:27 +0000 (23:45 +0000)]
[iOS][WK2] Add a SPI to exclude the extended background from some areas of WKWebView
https://bugs.webkit.org/show_bug.cgi?id=132406
<rdar://problem/16762197>

Reviewed by Beth Dakin.

Move the extended background to a separate layer bellow the UIScrollView.

The geometry of that layer is then changed based on ExtendedBackgroundExclusionInsets
as needed.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setExtendedBackgroundExclusionInsets:]):
(-[WKWebView _extendedBackgroundExclusionInsets]):
(-[WKWebView pageExtendedBackgroundColor]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

5 years agoAnother build fix attempt.
andersca@apple.com [Wed, 30 Apr 2014 23:32:23 +0000 (23:32 +0000)]
Another build fix attempt.

* WebKit.xcodeproj/project.pbxproj:
Remove headers if it seems like the WKWebViewPrivate header imports itself.

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

5 years agoAnother build fix.
andersca@apple.com [Wed, 30 Apr 2014 23:21:07 +0000 (23:21 +0000)]
Another build fix.

* WebKit.xcodeproj/project.pbxproj:
Remove WK headers from WebKit.framework as well when WebKitLegacy WK headers are encountered.

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

5 years ago[GStreamer] Use GstMetaVideo
vjaquez@igalia.com [Wed, 30 Apr 2014 23:17:36 +0000 (23:17 +0000)]
[GStreamer] Use GstMetaVideo
https://bugs.webkit.org/show_bug.cgi?id=132247

Reviewed by Philippe Normand.

In WebKitVideoSink we announce the usage of GstMetaVideo, but we do
not use it when handling the video frames. This might break
some decoders and filters that rely on buffer's meta, rather
that in the caps structures.

This patch enables the use of GstMetaVideo through the GstVideoFrame
API. And it is used everywhere the buffer mapping is required.

Also this patch changes to nullptr where zeros were used.

Also, compile conditionally the video buffer conversion when it is
ARGB/BGRA, since it is only required for the Cairo backend.

No new tests, already covered by current tests.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::getVideoSizeAndFormatFromCaps): init the GstVideoInfo before
used and remove caps fixate check since it is done by
gst_video_info_from_caps().
* platform/graphics/gstreamer/ImageGStreamer.h:
* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
(ImageGStreamer::ImageGStreamer): use GstVideoFrame for buffer mapping
and unmapping.
(ImageGStreamer::~ImageGStreamer): ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): ditto.
(WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
return nullptr if failed.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkRender): rely on GstVideoInfo rather than on the
caps. Use GstVideoFrame for buffer mapping and unmapping. Add guards
for buffer transformation, since it's only used by Cairo.
(webkitVideoSinkDispose): remove glib version guards.
(webkitVideoSinkSetCaps): update the value of the private
GstVideoInfo.

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

5 years ago[GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
vjaquez@igalia.com [Wed, 30 Apr 2014 23:16:48 +0000 (23:16 +0000)]
[GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=132390

Reviewed by Philippe Normand.

Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK
remove, in GTK+ and GST, the existing glib version guards.

Source/WebCore:
No new tests, already covered by current tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkDispose):
(webkitVideoSinkFinalize): Deleted.

Source/WTF:
This code was rollback from r149879 because Qt MIPS used it. But since
Qt is gone, it is safe to remove now.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr): Deleted.
(WTF::derefGPtr): Deleted.

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

5 years agoTry to fix the build.
andersca@apple.com [Wed, 30 Apr 2014 23:07:37 +0000 (23:07 +0000)]
Try to fix the build.

* WebKit.xcodeproj/project.pbxproj:
Remove old WK forwarding headers from WebKitLegacy.

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

5 years agoLet Xcode have its way with the WebKit workspace.
simon.fraser@apple.com [Wed, 30 Apr 2014 23:00:49 +0000 (23:00 +0000)]
Let Xcode have its way with the WebKit workspace.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

5 years agoFix build error when building for iOS simulator.
simon.fraser@apple.com [Wed, 30 Apr 2014 23:00:47 +0000 (23:00 +0000)]
Fix build error when building for iOS simulator.

* UIProcess/ios/ProcessAssertion.mm:

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

5 years agoUpdated ANGLE.
achristensen@apple.com [Wed, 30 Apr 2014 22:57:08 +0000 (22:57 +0000)]
Updated ANGLE.
https://bugs.webkit.org/show_bug.cgi?id=132367
<rdar://problem/16211451>

Reviewed by Dean Jackson.

Source/ThirdParty/ANGLE:
* ANGLE.plist:
Updated and xml encoded.
* ANGLE.xcodeproj/project.pbxproj:
Added needed new source files.
* changes.diff:
Added to keep track of differences between WebKit's copy of ANGLE and the master repository.

Updated ANGLE source files to e7a453a5bd76705ccb151117fa844846d4aa90af.  Long list of changes omitted.

Source/WebCore:
* CMakeLists.txt
Fixed ANGLE compiling with the update.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
Removed SH_MAP_LONG_VARIABLE_NAMES which is no longer defined in ANGLE.
See https://chromium.googlesource.com/angle/angle/+/3cdfcce86b38ef31a0afd71855887193a7924468
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
Updated type names from ANGLE.

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

5 years agoMove Blob.slice() implementation into BlobRegistryImpl
ap@apple.com [Wed, 30 Apr 2014 22:52:30 +0000 (22:52 +0000)]
Move Blob.slice() implementation into BlobRegistryImpl
https://bugs.webkit.org/show_bug.cgi?id=132402

Reviewed by Anders Carlsson.

Source/WebCore:
Part or centralizing the responsibility for file size tracking.

* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
(WebCore::Blob::slice): Deleted.
* fileapi/Blob.h:
(WebCore::Blob::slice):
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
(WebCore::registerBlobURLTask): Deleted.
(WebCore::registerBlobURLFromTask): Deleted.
* fileapi/ThreadableBlobRegistry.h:
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::appendStorageItems):
(WebCore::BlobRegistryImpl::registerBlobURLForSlice):
(WebCore::BlobRegistryImpl::blobSize):
* platform/network/BlobRegistryImpl.h:

Source/WebKit2:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
* WebProcess/FileAPI/BlobRegistryProxy.h:

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

5 years agoPhone number data detection UI is offset for iframes, pages with topContentInset
bdakin@apple.com [Wed, 30 Apr 2014 22:45:36 +0000 (22:45 +0000)]
Phone number data detection UI is offset for iframes, pages with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132372
-and corresponding-
<rdar://problem/16651235>

Reviewed by Tim Horton.

Make the overlay an OverlayType::Document, which will keep everything relative to
the main Document’s coordinates.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):

Make frames work by converting to the main  document’s coordinate space.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):

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

5 years agoUnreviewed build fix after r168041.
bfulgham@apple.com [Wed, 30 Apr 2014 22:44:42 +0000 (22:44 +0000)]
Unreviewed build fix after r168041.

* WebCore.exp.in: Add missing iOS exports.

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

5 years agoArgument flush formats should not be presumed to be JSValue since 'this' is weird
fpizlo@apple.com [Wed, 30 Apr 2014 22:22:11 +0000 (22:22 +0000)]
Argument flush formats should not be presumed to be JSValue since 'this' is weird
https://bugs.webkit.org/show_bug.cgi?id=132404

Reviewed by Michael Saboff.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock): Don't assume that arguments are flushed as JSValue. Use the logic for locals instead.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile): SetArgument "changes" the format because before this we wouldn't know we had arguments.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Ditto.
* dfg/DFGValueSource.cpp:
(JSC::DFG::ValueSource::dumpInContext): Make this easier to dump.
* dfg/DFGValueSource.h:
(JSC::DFG::ValueSource::operator!): Make this easier to dump because Operands<T> uses T::operator!().
* ftl/FTLOSREntry.cpp:
(JSC::FTL::prepareOSREntry): This had a useful assertion for everything except 'this'.
* tests/stress/strict-to-this-int.js: Added.
(foo):
(Number.prototype.valueOf):
(test):

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

5 years agoUnreviewed. Unnecessary explicit initialization of LayoutUnit from r167985.
roger_fong@apple.com [Wed, 30 Apr 2014 22:10:06 +0000 (22:10 +0000)]
Unreviewed. Unnecessary explicit initialization of LayoutUnit from r167985.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
Darin points out that I can just use “/2” instead of “/LayoutUnit(2.0)”.

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

5 years agoAlways-visible scrollbars continuously repaint after non-momentum scrollling
bdakin@apple.com [Wed, 30 Apr 2014 22:05:15 +0000 (22:05 +0000)]
Always-visible scrollbars continuously repaint after non-momentum scrollling
https://bugs.webkit.org/show_bug.cgi?id=132403
-and corresponding-
<rdar://problem/16553878>

Reviewed by Simon Fraser.

No longer universally opt into presentation value mode whenever the scroll
position changes on the scrolling thread. We really only want it for momentum
scrolls, and this will ensure that we always set it to NO once we have set it to
YES.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):

Expose shouldUsePresentationValue.
* platform/mac/NSScrollerImpDetails.h:

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

5 years agoEnable snapshot tests on mac wk2.
roger_fong@apple.com [Wed, 30 Apr 2014 22:03:57 +0000 (22:03 +0000)]
Enable snapshot tests on mac wk2.
https://bugs.webkit.org/show_bug.cgi?id=131871.
Reviewed by Darin Adler.
* platform/mac-wk2/TestExpectations:
* platform/mac-wk2/plugins/snapshotting/autoplay-dominant-expected.txt:
* platform/mac-wk2/plugins/snapshotting/autoplay-plugin-blocked-by-image-expected.txt:
* platform/mac-wk2/plugins/snapshotting/autoplay-plugin-blocked-by-image-expected.txt:
* platform/mac-wk2/plugins/snapshotting/autoplay-similar-to-dominant-after-delay-expected.txt:
* platform/mac-wk2/plugins/snapshotting/autoplay-similar-to-dominant-expected.txt:
* platform/mac-wk2/plugins/snapshotting/quicktime-plugin-snapshotted-expected.txt:
* platform/mac-wk2/plugins/snapshotting/restart-expected.txt:
* platform/mac-wk2/plugins/snapshotting/set-plugin-size-to-tiny-expected.txt:
* platform/mac-wk2/plugins/snapshotting/simple-expected.txt:
* platform/mac-wk2/plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image-expected.txt:
* plugins/snapshotting/autoplay-dominant.html:
* plugins/snapshotting/autoplay-plugin-blocked-by-image.html:
* plugins/snapshotting/autoplay-plugin-mostly-blocked-by-image.html:
* plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html:
* plugins/snapshotting/autoplay-similar-to-dominant.html:
* plugins/snapshotting/quicktime-plugin-snapshotted.html:
* plugins/snapshotting/restart.html:
* plugins/snapshotting/set-plugin-size-to-tiny.html:
* plugins/snapshotting/simple.html:
* plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html:

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

5 years agoMove the legacy WebKit API into WebKitLegacy.framework and move it inside WebKit...
andersca@apple.com [Wed, 30 Apr 2014 22:02:19 +0000 (22:02 +0000)]
Move the legacy WebKit API into WebKitLegacy.framework and move it inside WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=132399
<rdar://problem/15920046>

Reviewed by Dan Bernstein.

Source/WebCore:
Allow WebKitLegacy to link against WebCore.

* Configurations/WebCore.xcconfig:

Source/WebKit:
* WebKit.xcodeproj/project.pbxproj:
Add a new build target that builds the legacy WebKit API in WebKitLegacy.framework. This framework
is then re-exported by WebKit.framework, and its headers are copied to WebKit.framework. All the WebKitLegacy
headers are made private, and the MigrateHeadersFromWebKitLegacy.make Makefile will copy all the headers specified
in WEBKIT_PUBLIC_HEADERS to WebKit/Headers.

Source/WebKit/ios:
Import WebKitLegacy headers instead of WebKit headers.

* DefaultDelegates/WebDefaultFormDelegate.h:
* DefaultDelegates/WebDefaultFrameLoadDelegate.m:
* DefaultDelegates/WebDefaultResourceLoadDelegate.m:
* DefaultDelegates/WebDefaultUIKitDelegate.h:
* Misc/WebGeolocationProviderIOS.h:
* Misc/WebNSStringExtrasIPhone.h:
* WebCoreSupport/WebFrameIOS.h:
* WebCoreSupport/WebFrameIOS.mm:
* WebCoreSupport/WebFrameIPhone.h:
* WebCoreSupport/WebSelectionRect.h:
* WebCoreSupport/WebVisiblePosition.h:
* WebView/WebPDFViewIOS.h:
* WebView/WebPDFViewIOS.mm:
* WebView/WebPDFViewIPhone.h:
* WebView/WebPDFViewPlaceholder.h:
* WebView/WebPDFViewPlaceholder.mm:
* WebView/WebPlainWhiteView.h:
* WebView/WebUIKitDelegate.h:

Source/WebKit/mac:
* Carbon/CarbonUtils.h:
* Carbon/HIViewAdapter.h:
* Carbon/HIWebView.h:
Import WebKitLegacy headers instead of WebKit headers.

* Configurations/WebKit.xcconfig:
Move the definitions needed for building WebKitLegacy.framework to WebKitLegacy.xcconfig and
add the relevant definitions needed for re-exporting WebKitLegacy.framework.

* Configurations/WebKitLegacy.xcconfig:
Add definitions needed for building the "old" WebKit API as WebKitLegacy.framework.

* DOM/WebDOMOperations.h:
* DOM/WebDOMOperations.mm:
* DOM/WebDOMOperationsInternal.h:
* DOM/WebDOMOperationsPrivate.h:
* DefaultDelegates/WebDefaultContextMenuDelegate.h:
* DefaultDelegates/WebDefaultContextMenuDelegate.mm:
* DefaultDelegates/WebDefaultEditingDelegate.m:
* History/WebBackForwardListInternal.h:
* History/WebBackForwardListPrivate.h:
* History/WebHistoryItemPrivate.h:
* History/WebHistoryPrivate.h:
* History/WebURLsWithTitles.m:
Import WebKitLegacy headers instead of WebKit headers.

* MigrateHeaders.make:
Update header paths now that all WebKitLegacy headers are private.
Remove migration of WebKit2 headers, that is done by MigrateHeadersFromWebKitLegacy.make now.

* Misc/WebCoreStatistics.h:
* Misc/WebDownload.h:
* Misc/WebDownload.mm:
* Misc/WebDownloadInternal.h:
* Misc/WebElementDictionary.mm:
* Misc/WebIconDatabasePrivate.h:
* Misc/WebKit.h:
* Misc/WebKitErrors.m:
* Misc/WebKitErrorsPrivate.h:
* Misc/WebKitNSStringExtras.mm:
* Misc/WebLocalizableStrings.mm:
* Misc/WebNSDataExtras.m:
* Misc/WebNSDictionaryExtras.m:
* Misc/WebNSEventExtras.m:
* Misc/WebNSFileManagerExtras.mm:
* Misc/WebNSImageExtras.m:
* Misc/WebNSPasteboardExtras.mm:
* Misc/WebNSViewExtras.h:
* Misc/WebNSViewExtras.m:
* Panels/WebAuthenticationPanel.m:
* Panels/WebPanelAuthenticationHandler.m:
* Plugins/Hosted/HostedNetscapePluginStream.h:
* Plugins/Hosted/NetscapePluginInstanceProxy.h:
* Plugins/Hosted/WebKitPluginAgent.defs:
* Plugins/Hosted/WebKitPluginAgentReply.defs:
* Plugins/Hosted/WebKitPluginClient.defs:
* Plugins/Hosted/WebKitPluginHost.defs:
* Plugins/Hosted/WebKitPluginHostTypes.defs:
* Plugins/WebBaseNetscapePluginView.mm:
* Plugins/WebBasePluginPackage.h:
* Plugins/WebBasePluginPackage.mm:
* Plugins/WebNetscapeContainerCheckPrivate.h:
* Plugins/WebNetscapePluginEventHandlerCocoa.h:
* Plugins/WebNetscapePluginStream.h:
* Plugins/WebNetscapePluginView.h:
* Plugins/WebNetscapePluginView.mm:
* Plugins/WebPlugin.h:
* Plugins/WebPluginController.h:
* Plugins/WebPluginDatabase.h:
* Plugins/WebPluginPackage.h:
* Plugins/WebPluginPackage.mm:
* Plugins/WebPluginViewFactory.h:
* Plugins/WebPluginViewFactoryPrivate.h:
* Plugins/npapi.mm:
* Storage/WebDatabaseManagerPrivate.h:
* WebCoreSupport/WebContextMenuClient.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebFrameNetworkingContext.mm:
* WebCoreSupport/WebGeolocationClient.mm:
* WebCoreSupport/WebInspectorClient.mm:
* WebCoreSupport/WebJavaScriptTextInputPanel.m:
* WebCoreSupport/WebKeyGenerator.mm:
* WebInspector/WebInspectorPrivate.h:
* WebInspector/WebNodeHighlight.h:
* WebInspector/WebNodeHighlightView.h:
Import WebKitLegacy headers instead of WebKit headers.

* WebKitLegacy/MigrateHeadersFromWebKitLegacy.make: Added.
New makefile that handles copying WebKitLegacy headers to the WebKit framework, rewriting WebKitLegacy
imports to WebKit imports. (On iOS the WebKit headers just forward to the relevant WebKitLegacy headers).
On OS X, this also handles copying WebKit2 headers to the WebKit framework, rewriting WebKit2 imports to WebKit imports
and getting rid of C SPI imports.

* WebKitLegacy/MigrateHeadersToLegacy.make: Removed.
This is no longer needed.

* WebKitLegacy/WebKit.h: Added.
New umbrella header that imports the modern API if available, as well as the legacy API (using WebKit/WebKitLegacy.h).

* WebKitLegacy/WebKit.m:
This is an empty file so we'll have something to link.

* WebKitLegacy/WebKitPrivate.h:
New SPI header that imports the private headers of the modern API.

* WebView/WebDataSource.h:
* WebView/WebDataSource.mm:
* WebView/WebDataSourcePrivate.h:
* WebView/WebDelegateImplementationCaching.h:
* WebView/WebDocument.h:
* WebView/WebDocumentInternal.h:
* WebView/WebDocumentPrivate.h:
* WebView/WebEditingDelegate.h:
* WebView/WebEditingDelegatePrivate.h:
* WebView/WebFrameLoadDelegate.h:
* WebView/WebFrameLoadDelegatePrivate.h:
* WebView/WebFramePrivate.h:
* WebView/WebFrameView.h:
* WebView/WebFrameViewInternal.h:
* WebView/WebFrameViewPrivate.h:
* WebView/WebHTMLRepresentation.h:
* WebView/WebHTMLRepresentation.mm:
* WebView/WebHTMLRepresentationPrivate.h:
* WebView/WebHTMLView.h:
* WebView/WebHTMLView.mm:
* WebView/WebHTMLViewPrivate.h:
* WebView/WebPDFView.h:
* WebView/WebPolicyDelegatePrivate.h:
* WebView/WebPreferencesPrivate.h:
* WebView/WebResourcePrivate.h:
* WebView/WebUIDelegate.h:
* WebView/WebUIDelegatePrivate.h:
* WebView/WebView.h:
* WebView/WebView.mm:
* WebView/WebViewPrivate.h:
Import WebKitLegacy headers instead of WebKit headers.

* migrate-headers.sh:
Derived sources are put in DerivedSources/WebKitLegacy now.

Tools:
* Scripts/check-for-webkit-framework-include-consistency:
Allos WAK headers in WebKitLegacy as well as WebKit.

* TestWebKitAPI/Tests/WebKit2Cocoa/Download.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
Update header imports.

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

5 years ago[New Multicolumn] Enable new multi-column mode
hyatt@apple.com [Wed, 30 Apr 2014 21:53:41 +0000 (21:53 +0000)]
[New Multicolumn] Enable new multi-column mode
https://bugs.webkit.org/show_bug.cgi?id=131825

Reviewed by Simon Fraser.

Source/WebKit/mac:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):

Source/WebKit2:
* Shared/WebPreferencesStore.h:

LayoutTests:
* compositing/columns/composited-columns-expected.txt:
* compositing/columns/composited-in-paginated-writing-mode-rl-expected.txt:
* compositing/columns/composited-nested-columns-expected.txt:
* compositing/columns/hittest-composited-in-paginated-expected.txt:
* fast/dom/Element/getBoundingClientRect-expected.txt:
* fast/dom/Element/getBoundingClientRect.html:
* fast/multicol/flipped-blocks-border-after-expected.txt:
* fast/multicol/pagination-h-horizontal-bt-expected.txt:
* fast/multicol/pagination-h-horizontal-tb-expected.txt:
* fast/multicol/pagination-h-vertical-lr-expected.txt:
* fast/multicol/pagination-h-vertical-rl-expected.txt:
* fast/multicol/pagination-v-horizontal-bt-expected.txt:
* fast/multicol/pagination-v-horizontal-tb-expected.txt:
* fast/multicol/pagination-v-vertical-lr-expected.txt:
* fast/multicol/pagination-v-vertical-rl-expected.txt:
* fast/multicol/progression-reverse-expected.txt:
* fast/multicol/single-line-expected.txt:
* fast/multicol/span/before-child-anonymous-column-block-expected.txt:
* fast/multicol/span/generated-child-split-flow-crash-expected.txt:
* fast/multicol/vertical-lr/rules-with-border-before-expected.txt:
* fast/multicol/vertical-rl/rule-style-expected.txt:
* fast/multicol/vertical-rl/rules-with-border-before-expected.txt:
* platform/mac/css3/unicode-bidi-isolate-basic-expected.png:
* platform/mac/css3/unicode-bidi-isolate-basic-expected.txt:
* platform/mac/fast/block/float/float-not-removed-from-next-sibling4-expected.png:
* platform/mac/fast/block/float/float-not-removed-from-next-sibling4-expected.txt:
* platform/mac/fast/borders/border-antialiasing-expected.png:
* platform/mac/fast/borders/border-antialiasing-expected.txt:
* platform/mac/fast/line-grid/line-align-left-edges-expected.png:
* platform/mac/fast/line-grid/line-align-right-edges-expected.png:
* platform/mac/fast/line-grid/line-grid-contains-value-expected.png:
* platform/mac/fast/line-grid/line-grid-floating-expected.png:
* platform/mac/fast/line-grid/line-grid-inside-columns-expected.png:
* platform/mac/fast/line-grid/line-grid-inside-columns-expected.txt:
* platform/mac/fast/line-grid/line-grid-into-columns-expected.png:
* platform/mac/fast/line-grid/line-grid-into-columns-expected.txt:
* platform/mac/fast/line-grid/line-grid-into-floats-expected.png:
* platform/mac/fast/line-grid/line-grid-positioned-expected.png:
* platform/mac/fast/multicol/block-axis-horizontal-bt-expected.txt:
* platform/mac/fast/multicol/block-axis-horizontal-tb-expected.txt:
* platform/mac/fast/multicol/block-axis-vertical-lr-expected.txt:
* platform/mac/fast/multicol/block-axis-vertical-rl-expected.txt:
* platform/mac/fast/multicol/border-padding-pagination-expected.png:
* platform/mac/fast/multicol/border-padding-pagination-expected.txt:
* platform/mac/fast/multicol/client-rects-expected.png:
* platform/mac/fast/multicol/client-rects-expected.txt:
* platform/mac/fast/multicol/column-break-with-balancing-expected.txt:
* platform/mac/fast/multicol/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/column-rules-expected.png:
* platform/mac/fast/multicol/column-rules-expected.txt:
* platform/mac/fast/multicol/column-rules-stacking-expected.txt:
* platform/mac/fast/multicol/columns-shorthand-parsing-expected.txt:
* platform/mac/fast/multicol/float-avoidance-expected.txt:
* platform/mac/fast/multicol/float-multicol-expected.txt:
* platform/mac/fast/multicol/float-paginate-complex-expected.txt:
* platform/mac/fast/multicol/float-paginate-empty-lines-expected.txt:
* platform/mac/fast/multicol/float-paginate-expected.txt:
* platform/mac/fast/multicol/layers-in-multicol-expected.png:
* platform/mac/fast/multicol/layers-in-multicol-expected.txt:
* platform/mac/fast/multicol/layers-split-across-columns-expected.txt:
* platform/mac/fast/multicol/margin-collapse-expected.txt:
* platform/mac/fast/multicol/max-height-columns-block-expected.png:
* platform/mac/fast/multicol/max-height-columns-block-expected.txt:
* platform/mac/fast/multicol/nested-columns-expected.png:
* platform/mac/fast/multicol/nested-columns-expected.txt:
* platform/mac/fast/multicol/overflow-across-columns-expected.txt:
* platform/mac/fast/multicol/overflow-across-columns-percent-height-expected.txt:
* platform/mac/fast/multicol/overflow-unsplittable-expected.txt:
* platform/mac/fast/multicol/paginate-block-replaced-expected.txt:
* platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.txt:
* platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.txt:
* platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.txt:
* platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.txt:
* platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.txt:
* platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.txt:
* platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.txt:
* platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.txt:
* platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.txt:
* platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.txt:
* platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.txt:
* platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.txt:
* platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.txt:
* platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.txt:
* platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.txt:
* platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.txt:
* platform/mac/fast/multicol/positioned-split-expected.txt:
* platform/mac/fast/multicol/positive-leading-expected.txt:
* platform/mac/fast/multicol/scrolling-overflow-expected.png:
* platform/mac/fast/multicol/scrolling-overflow-expected.txt:
* platform/mac/fast/multicol/shadow-breaking-expected.png:
* platform/mac/fast/multicol/shadow-breaking-expected.txt:
* platform/mac/fast/multicol/shrink-to-column-height-for-pagination-expected.txt:
* platform/mac/fast/multicol/span/anonymous-before-child-parent-crash-expected.png:
* platform/mac/fast/multicol/span/anonymous-before-child-parent-crash-expected.txt:
* platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.png:
* platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.txt:
* platform/mac/fast/multicol/span/anonymous-style-inheritance-expected.txt:
* platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png:
* platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.txt:
* platform/mac/fast/multicol/span/clone-flexbox-expected.txt:
* platform/mac/fast/multicol/span/clone-summary-expected.txt:
* platform/mac/fast/multicol/span/generated-child-split-flow-crash-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-child-generated-content-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-child-property-removal-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-property-removal-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-removal-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-removal-expected.txt:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.png:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-expected.png:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-expected.txt:
* platform/mac/fast/multicol/span/span-as-nested-inline-block-child-expected.txt:
* platform/mac/fast/multicol/span/span-margin-collapsing-expected.txt:
* platform/mac/fast/multicol/table-margin-collapse-expected.txt:
* platform/mac/fast/multicol/table-vertical-align-expected.txt:
* platform/mac/fast/multicol/unsplittable-inline-block-expected.txt:
* platform/mac/fast/multicol/vertical-lr/border-padding-pagination-expected.png:
* platform/mac/fast/multicol/vertical-lr/border-padding-pagination-expected.txt:
* platform/mac/fast/multicol/vertical-lr/column-break-with-balancing-expected.txt:
* platform/mac/fast/multicol/vertical-lr/column-count-with-rules-expected.png:
* platform/mac/fast/multicol/vertical-lr/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/vertical-lr/column-rules-expected.png:
* platform/mac/fast/multicol/vertical-lr/column-rules-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-multicol-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-paginate-complex-expected.txt:
* platform/mac/fast/multicol/vertical-lr/float-paginate-expected.txt:
* platform/mac/fast/multicol/vertical-lr/nested-columns-expected.png:
* platform/mac/fast/multicol/vertical-lr/nested-columns-expected.txt:
* platform/mac/fast/multicol/vertical-lr/unsplittable-inline-block-expected.txt:
* platform/mac/fast/multicol/vertical-rl/border-padding-pagination-expected.png:
* platform/mac/fast/multicol/vertical-rl/border-padding-pagination-expected.txt:
* platform/mac/fast/multicol/vertical-rl/column-break-with-balancing-expected.txt:
* platform/mac/fast/multicol/vertical-rl/column-count-with-rules-expected.png:
* platform/mac/fast/multicol/vertical-rl/column-count-with-rules-expected.txt:
* platform/mac/fast/multicol/vertical-rl/column-rules-expected.png:
* platform/mac/fast/multicol/vertical-rl/column-rules-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-multicol-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-paginate-complex-expected.txt:
* platform/mac/fast/multicol/vertical-rl/float-paginate-expected.txt:
* platform/mac/fast/multicol/vertical-rl/nested-columns-expected.png:
* platform/mac/fast/multicol/vertical-rl/nested-columns-expected.txt:
* platform/mac/fast/multicol/vertical-rl/unsplittable-inline-block-expected.txt:
* platform/mac/fast/overflow/paged-x-div-expected.png:
* platform/mac/fast/overflow/paged-x-div-expected.txt:
* platform/mac/fast/overflow/paged-x-div-with-column-gap-expected.png:
* platform/mac/fast/overflow/paged-x-div-with-column-gap-expected.txt:
* platform/mac/fast/overflow/paged-x-on-root-expected.png:
* platform/mac/fast/overflow/paged-x-on-root-expected.txt:
* platform/mac/fast/overflow/paged-x-with-column-gap-expected.png:
* platform/mac/fast/overflow/paged-x-with-column-gap-expected.txt:
* platform/mac/fast/overflow/paged-y-div-expected.png:
* platform/mac/fast/overflow/paged-y-div-expected.txt:
* platform/mac/fast/overflow/paged-y-on-root-expected.png:
* platform/mac/fast/overflow/paged-y-on-root-expected.txt:
* platform/mac/fast/repaint/multicol-repaint-expected.png:
* platform/mac/fast/repaint/multicol-repaint-expected.txt:

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

5 years ago[iOS WK2] Add test URL to crash reports for the UI process, clean up project
simon.fraser@apple.com [Wed, 30 Apr 2014 21:48:39 +0000 (21:48 +0000)]
[iOS WK2] Add test URL to crash reports for the UI process, clean up project
https://bugs.webkit.org/show_bug.cgi?id=131954

Reviewed by Darin Adler.

WebKitTestRunner was adding application-specific information to crash reports
to log the test path, but only in the web process. Fix it to also do this
for the UI process, for both iOS and OS X.

Moved InjectedBundlePageMac.mm to InjectedBundlePageCocoa.mm and compile it for
both iOS and OS X.

Factored crash reprorter-related code into CrashReporterInfo, and call it from
a new TestController::platformWillRunTest() function on Mac and iOS.

Also remove Xcode-added unit test junk from the project.

* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm: Copied from Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundlePageIOS.mm.
(WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::runTest):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::url):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/WebKitTestRunnerAppTests/WebKitTestRunnerAppTests-Info.plist: Removed.
* WebKitTestRunner/WebKitTestRunnerAppTests/WebKitTestRunnerAppTests.m: Removed.
* WebKitTestRunner/WebKitTestRunnerAppTests/en.lproj/InfoPlist.strings: Removed.
* WebKitTestRunner/cocoa/CrashReporterInfo.h: Renamed from Tools/WebKitTestRunner/InjectedBundle/ios/InjectedBundlePageIOS.mm.
* WebKitTestRunner/cocoa/CrashReporterInfo.mm: Renamed from Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm.
(WTR::testPathFromURL):
(WTR::setCrashReportApplicationSpecificInformationToURL):
* WebKitTestRunner/efl/TestControllerEfl.cpp:
(WTR::TestController::platformWillRunTest):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformWillRunTest):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformWillRunTest):
(WTR::TestController::setHidden):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformWillRunTest):

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

5 years agoFix DRT assertion about mock scrollbars, which doesn't apply to iOS.
simon.fraser@apple.com [Wed, 30 Apr 2014 21:48:36 +0000 (21:48 +0000)]
Fix DRT assertion about mock scrollbars, which doesn't apply to iOS.

Reviewed by Tim Horton.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
(prepareConsistentTestingEnvironment):

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

5 years ago[New Multicolumn] ASSERTs in fast/dynamic/continuation-detach-crash.html
hyatt@apple.com [Wed, 30 Apr 2014 21:27:50 +0000 (21:27 +0000)]
[New Multicolumn] ASSERTs in fast/dynamic/continuation-detach-crash.html
https://bugs.webkit.org/show_bug.cgi?id=132392

Reviewed by Dean Jackson.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::setRegionRangeForBox):
Add ASSERTs in case we ever try to set regions from the wrong flow thread
as part of the box's region range.

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
Add a bunch of code that handles the discovery of a span from an outer flow thread
being inserted into an inner flow thread. This forces us to delete that placeholder
and shift the outer spanning content into the inner flow thread in order to get a new
mapping/placeholder created in the inner flow thread.

(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
Tighten this code to use the parent() just in case we change the invariant of
parent = containingBlock later.

* rendering/RenderMultiColumnFlowThread.h:
Add a static guard when shifting a spanner to prevent the outer flow thread from
thinking the spanner belongs to it when it gets punted out of the inner flow thread.
A better long-term solution might be to make the spanner map global instead of
per-flow thread.

* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
(WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
* rendering/RenderMultiColumnSpannerPlaceholder.h:
Cache the flow thread so that we can get back to it in order to detect if the
placeholder belongs to us or not.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
Notifications from insertedIntoTree are problematic, since this can be called during
the layout of the outer flow thread for content inside an inner flow thread that is
not getting a layout yet. This makes the currentFlowThread in the flow thread controller
inaccurate, so we have to add code to clear it out and put it back.

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

5 years agoAX: Make "contenteditable" regions into AXTextAreas
cfleizach@apple.com [Wed, 30 Apr 2014 20:47:16 +0000 (20:47 +0000)]
AX: Make "contenteditable" regions into AXTextAreas
https://bugs.webkit.org/show_bug.cgi?id=132379

Reviewed by Mario Sanchez Prada.

Source/WebCore:
Make contenteditable regions into AXTextAreas. This will allow for a more standardized
interface for interaction with assistive technologies.

Test: accessibility/content-editable-as-textarea.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
(WebCore::AccessibilityRenderObject::selectedText):
(WebCore::AccessibilityRenderObject::selectedTextRange):
(WebCore::AccessibilityRenderObject::renderObjectIsObservable):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted.
* accessibility/AccessibilityRenderObject.h:

LayoutTests:
* accessibility/content-editable-as-textarea.html: Added.
* platform/mac-mountainlion/accessibility/content-editable-as-textarea-expected.txt: Added.
* platform/mac/accessibility/content-editable-as-textarea-expected.txt: Added.

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

5 years agoClean up unnecessary methods in the BackForwardClient interface
burg@cs.washington.edu [Wed, 30 Apr 2014 20:42:19 +0000 (20:42 +0000)]
Clean up unnecessary methods in the BackForwardClient interface
https://bugs.webkit.org/show_bug.cgi?id=131637

Reviewed by Andreas Kling.

Source/WebCore:
Demote back/current/forwardItem and iOS-specific methods from the
BackForwardClient interface. Convert the class to not be refcounted.

No new tests, no behavior was changed.

* WebCore.exp.in:
* history/BackForwardClient.h:
(WebCore::BackForwardClient::~BackForwardClient): Deleted.
(WebCore::BackForwardClient::backItem): Deleted.
(WebCore::BackForwardClient::currentItem): Deleted.
(WebCore::BackForwardClient::forwardItem): Deleted.
* history/BackForwardController.cpp:
(WebCore::BackForwardController::BackForwardController):
* history/BackForwardController.h: Take ownership of the passed BackForwardClient.
(WebCore::BackForwardController::client): Return a reference.
* history/BackForwardList.h: Remove the Page field, since it isn't used any more.
(WebCore::BackForwardList::create): Deleted.
* page/Page.h: Remove RefPtr from PageClient.
* page/Page.cpp:
(WebCore::PageClients::PageClients): Initialize client to nullptr.

Source/WebKit/efl:
Remove uses of reference counting for BackForwardList.
Use references to BackForwardClient instead of pointers.
Stop using BackForwardClient::page() since it was removed.

* ewk/ewk_history.cpp:
(ewk_history_clear):
(ewk_history_new):
(ewk_history_free):
* ewk/ewk_view.cpp:
(_ewk_view_priv_new):
(ewk_view_history_enable_get):
(ewk_view_history_enable_set):
(ewk_view_history_get):

Source/WebKit/mac:
BackForwardClient instances now have ownership lifetime semantics, so
WebBackForwardList now explicitly deletes its inner BackForwardList.

Convert uses of WebCore::BackForwardList through backForward().client() to
accept references instead of pointers.

Use BackForwardController methods rather than directly operating with the
BackForwardClient where possible.

Remove page cache-related methods that are not used anywhere and that call
BackForwardClient::page(), which is removed by this change.

* History/WebBackForwardList.mm:
(-[WebBackForwardList initWithBackForwardList:]):
(-[WebBackForwardList init]):
(-[WebBackForwardList dealloc]):
(-[WebBackForwardList finalize]):
(-[WebBackForwardList setPageCacheSize]): Deleted.
(-[WebBackForwardList pageCacheSize]): Deleted.
(-[WebBackForwardList itemAtIndex:]): Deleted.
* History/WebBackForwardListInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::canCachePage):
* WebView/WebFrameView.mm:
(-[WebFrameView keyDown:keyDown:]):
* WebView/WebView.mm:
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView initWithCoder:]):
(-[WebView encodeWithCoder:]):
(-[WebView backForwardList]):
(-[WebView setMaintainsBackForwardList:]):

Source/WebKit/win:
Remove uses of reference counting for BackForwardList.
Use BackForwardController instead of BackForwardClient where possible.

* WebBackForwardList.cpp:
(WebBackForwardList::WebBackForwardList):
(WebBackForwardList::~WebBackForwardList):
(WebBackForwardList::createInstance):
* WebBackForwardList.h:
* WebView.cpp:
(WebView::backForwardList):
(WebView::canGoBack):
(WebView::canGoForward):
(WebView::loadBackForwardListFromOtherView):

Source/WebKit2:
Remove stubs for iOS-specific methods in the BackForwardClient interface.

Construct a WebBackForwardListProxy directly, and make the WebCore page
own the BackForwardClient instance. Convert uses of backForward().client()
to accept references instead of raw pointers.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
(WebKit::InjectedBundleBackForwardList::clear):
* WebProcess/WebPage/WebBackForwardListProxy.cpp: Store a reference to
WebCore::Page instead of a pointer.
(WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
(WebKit::WebBackForwardListProxy::create): Deleted.
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::backListCount):
(WebKit::WebBackForwardListProxy::forwardListCount):
(WebKit::WebBackForwardListProxy::close):
(WebKit::WebBackForwardListProxy::clear):
(WebKit::WebBackForwardListProxy::isActive):
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.

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

5 years agoWeb Inspector: clean up and decompose InspectorBackend functionality
burg@cs.washington.edu [Wed, 30 Apr 2014 20:30:49 +0000 (20:30 +0000)]
Web Inspector: clean up and decompose InspectorBackend functionality
https://bugs.webkit.org/show_bug.cgi?id=132387

Reviewed by Joseph Pecoraro.

Aside from renaming variables and other minor cleanup, this patch
changes the following:

When calling a command, only store callback data when a callback is passed.
Use explicit model objects for the agent, event, enum, and commands.
Separate the agent models from encoding and decoding of JSON messages.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype.registerEnum):
(InspectorBackendClass.prototype.registerEvent):
(InspectorBackendClass.prototype.registerDomainDispatcher):
(InspectorBackendClass.prototype.dispatch):
(InspectorBackendClass.prototype.runAfterPendingDispatches):
(InspectorBackendClass.prototype._agentForDomain):
(InspectorBackendClass.prototype._registerSentCommand):
(InspectorBackendClass.prototype._dispatchCallback):
(InspectorBackendClass.prototype._dispatchEvent):
(InspectorBackendClass.prototype._invokeCommand):
(InspectorBackendClass.prototype._reportProtocolError):
(InspectorBackend.Agent):
(InspectorBackend.Agent.prototype.get domainName):
(InspectorBackend.Agent.prototype.set dispatcher):
(InspectorBackend.Agent.prototype.addEnum):
(InspectorBackend.Agent.prototype.addCommand):
(InspectorBackend.Agent.prototype.addEvent):
(InspectorBackend.Agent.prototype.getEvent):
(InspectorBackend.Agent.prototype.dispatchEvent):
(InspectorBackend.Command):
(InspectorBackend.Command.create):
(InspectorBackend.Command.prototype.get qualifiedName):
(InspectorBackend.Command.prototype.get commandName):
(InspectorBackend.Command.prototype.get callSignature):
(InspectorBackend.Command.prototype.get replySignature):
(InspectorBackend.Command.prototype.invoke):
(InspectorBackend.Command.prototype.supports):
(InspectorBackend.Command.prototype._invokeWithArguments):
(InspectorBackend.Event):
(InspectorBackend.Enum):
(InspectorBackendClass.prototype.callback): Deleted.
(InspectorBackendClass.prototype._registerPendingResponse): Deleted.
(InspectorBackendClass.prototype._invokeMethod): Deleted.
(InspectorBackendClass.prototype._getAgent): Deleted.
(InspectorBackendClass.prototype.reportProtocolError): Deleted.
(InspectorBackendCommand): Deleted.
(InspectorBackendCommand.create): Deleted.
(InspectorBackendCommand.prototype.invoke): Deleted.
(InspectorBackendCommand.prototype.supports): Deleted.
(InspectorBackendCommand.prototype._invokeWithArguments): Deleted.

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

5 years agocheck-for-inappropriate-macros-in-external-headers should get the product name, not...
andersca@apple.com [Wed, 30 Apr 2014 20:00:47 +0000 (20:00 +0000)]
check-for-inappropriate-macros-in-external-headers should get the product name, not the project name
https://bugs.webkit.org/show_bug.cgi?id=132397

Reviewed by Dan Bernstein.

* Scripts/check-for-inappropriate-macros-in-external-headers:

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

5 years agoFix PageVisibility on iOS
barraclough@apple.com [Wed, 30 Apr 2014 19:52:26 +0000 (19:52 +0000)]
Fix PageVisibility on iOS
https://bugs.webkit.org/show_bug.cgi?id=132393

Reviewed by Andreas Kling.

Currently page visibility API doesn't work correctly on WK2 iOS for a few reasons,
the most significant of which being that the moment a WKWebView leaves the window
we'll suspend the content process, which removes the possibility for any notification
to be delivered. This patch addresses this issue, by allowing the process to run for
long enough for the notification to be delivered.

1) Introduce a new class, ProcessThrottler, to encapsulate the process suspension logic.
2) WebPageProxy uses ProcessThrottler::VisibilityToken to communicate visibility to the throttler.
3) WebPageProxy tracks pending didUpdateViewState messages to detect when the view state update in
   the web content process has completed.
4) Distiguish between 'Background' and 'Suspended' states in the ProcessAssertion.

* Shared/ChildProcessProxy.h:
    - moved m_assertion to NetworkProcessProxy / WebProcessProxy.
* UIProcess/Network/NetworkProcessProxy.h:
    - added m_assertion.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
    - initialize VisibilityToken state.
(WebKit::WebPageProxy::reattachToWebProcess):
    - reinitialize VisibilityToken state.
(WebKit::WebPageProxy::viewStateDidChange):
    - update VisibilityToken, increment m_pendingViewStateUpdates as necessary.
(WebKit::WebPageProxy::updateVisibilityToken):
    - update the VisibiliyToken based on page visibility, and whether an update is still pending.
(WebKit::WebPageProxy::didUpdateViewState):
    - detect when a view state change has completed in the web process, and update throttle state as necessary.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState): Deleted.
    - moved to .cpp.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
    - initialize m_throttler.
(WebKit::WebProcessProxy::didFinishLaunching):
    - notify the PageThrottler of the new connection.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::throttler):
    - added accessor.
(WebKit::WebProcessProxy::updateProcessState): Deleted.
    - moved trottling login to ProcessThrottler.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
    - these should only be true when the view is in a window.
(WebKit::PageClientImpl::isVisuallyIdle):
    - this should only be true when the view is not in a window.
* UIProcess/ios/ProcessAssertion.h:
* UIProcess/ios/ProcessAssertion.mm:
(WebKit::flagsForState):
    - map from enum -> BKSAssertion flags values.
(WebKit::ProcessAssertion::ProcessAssertion):
    - use flagsForState (add support for Suspended state).
(WebKit::ProcessAssertion::setState):
    - use flagsForState (add support for Suspended state).
* UIProcess/ios/ProcessThrottler.h: Added.
(WebKit::ProcessThrottler::VisibilityToken::visibility):
    - accessor.
(WebKit::ProcessThrottler::VisibilityToken::setVisibility):
    - update Visibility value; update the token as necessary.
(WebKit::ProcessThrottler::ProcessThrottler):
    - constructor; does not take an assention until didConnnectToProcess is called.
(WebKit::ProcessThrottler::visibilityToken):
    - create a VisibilityToken.
(WebKit::ProcessThrottler::didConnnectToProcess):
    - take an assertion.
(WebKit::ProcessThrottler::weakPtr):
    - create a weak pointer, used for references from VisibilityToken to the throttler.
(WebKit::ProcessThrottler::assertionState):
    - determine the correct AssertionState for the process, based on current visibility.
(WebKit::ProcessThrottler::updateAssertion):
    - update assertion, called in response to visibility change.
* UIProcess/ios/ProcessThrottler.mm: Added.
(WebKit::ProcessThrottler::VisibilityToken::VisibilityToken):
    - constructor.
(WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken):
    - set visibility to hidden to reset.
(WebKit::ProcessThrottler::VisibilityToken::hideTimerFired):
    - automatically decay from Hiding -> Hidden on a timeout.
(WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal):
    - update counters tracking visibility in ProcessThrottler.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
    - This affects all view state flags, not just the 'InWindow' state.
      If the view moves out of a window request a reply from the WebContent - we use this
      to detect when the page visibility event has completed.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState): Deleted.
    - removed.
* WebKit2.xcodeproj/project.pbxproj:
    - added new files.

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

5 years agoPreemptive header fixes for when WebKit.framework is going to provide the modern API
andersca@apple.com [Wed, 30 Apr 2014 19:47:41 +0000 (19:47 +0000)]
Preemptive header fixes for when WebKit.framework is going to provide the modern API
https://bugs.webkit.org/show_bug.cgi?id=132394

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
(NS_ENUM):
Delete WKNavigationType for now. Ultimately the entire delegate should be removed.

* UIProcess/API/Cocoa/WKPreferences.h:
Add a header guard so we can avoid importing WKPreferences.h more than once.

* WebKit2.xcodeproj/project.pbxproj:
_WKScriptWorld.h should be private, not public.
WKScriptMessagePrivate.h and WKUserContentControllerPrivate.h should be private, not project.

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

5 years ago[Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
bfulgham@apple.com [Wed, 30 Apr 2014 19:42:18 +0000 (19:42 +0000)]
[Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
https://bugs.webkit.org/show_bug.cgi?id=132320

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-text-track-container .hidden): Added.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
new 'updateCaptionsContainer'.
(WebCore::HTMLMediaElement::updateCaptionContainer): Added.
* html/HTMLMediaElement.h:

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

5 years agoWeb Inspector: Ensure UIProcess checks in to webinspectord after spawning a WebProcess
commit-queue@webkit.org [Wed, 30 Apr 2014 19:29:16 +0000 (19:29 +0000)]
Web Inspector: Ensure UIProcess checks in to webinspectord after spawning a WebProcess
https://bugs.webkit.org/show_bug.cgi?id=132389

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-30
Reviewed by Timothy Hatcher.

We aggregate WebProcess WebView's under the UIProcess. If the UIProcess
didn't connect to webinspectord these WebViews would have remained
hidden. Always have the UIProcess connect to webinspectord when it
spawns a WebProcess and may have a child process holding views that
it ultimately owns and should display under the UIProcess name.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):

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

5 years ago[iOS]Subpixel rendering: Extra line of pixels next to the YouTube loading indicator.
zalan@apple.com [Wed, 30 Apr 2014 19:00:06 +0000 (19:00 +0000)]
[iOS]Subpixel rendering: Extra line of pixels next to the YouTube loading indicator.
https://bugs.webkit.org/show_bug.cgi?id=132391

Reviewed by Simon Fraser.

CG and GraphicsContext clipping should use the same coordinates. Snapping either one
while leaving the other unsnapped results in clipping mismatch and that may produce
unpainted areas.

Not testable.

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

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=132363
ap@apple.com [Wed, 30 Apr 2014 17:50:04 +0000 (17:50 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=132363
Make Blob RawData immutable

Reviewed by Anders Carlsson.

Source/WebCore:
* Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
Create RawData in one step.

* WebCore.exp.in: Don't export a constructor that we no longer have (and the new one is inline).

* fileapi/Blob.cpp: Removed entirely dead code.

* fileapi/WebKitBlobBuilder.cpp:
* fileapi/WebKitBlobBuilder.h:
Updated to collect data in a plain Vector, so that we don't have to modify RawData.
Removed FIXMEs about renaming - there used to be a BlobBuilder exposed to JS, but
now this is just a helper to implement JS Blob constructor. We should probably
still rename it, but not how the FIXME suggested.

* platform/network/BlobData.cpp:
(WebCore::BlobDataItem::detachFromCurrentThread): RawData::detachFromCurrentThread()
was a no-op.
(WebCore::BlobDataHandle::BlobDataHandle): Deleted. This was entirely dead code.
(WebCore::BlobDataHandle::~BlobDataHandle): Ditto.

* platform/network/BlobData.h: Made RawData immutable.

* xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob):
Create RawData in one step.

Source/WebKit2:
* Shared/FileAPI/BlobRegistrationData.cpp: (WebKit::BlobRegistrationData::decode):
Create RawData in one step.

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

5 years agoMove iphone-simulator test results landed in r167402 to the correct directory
ddkilzer@apple.com [Wed, 30 Apr 2014 17:41:39 +0000 (17:41 +0000)]
Move iphone-simulator test results landed in r167402 to the correct directory

* platform/ios-sim/media/media-document-controls-size-expected.txt: Renamed from LayoutTests/platform/iphone-simulator/media/media-document-controls-size-expected.txt.
* platform/ios-sim/media/media-document-controls-size.html: Renamed from LayoutTests/platform/iphone-simulator/media/media-document-controls-size.html.

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

5 years ago[iOS] -[WebHTMLView selectionImageForcingBlackText:] returns blank image on iOS
weinig@apple.com [Wed, 30 Apr 2014 17:26:45 +0000 (17:26 +0000)]
[iOS] -[WebHTMLView selectionImageForcingBlackText:] returns blank image on iOS
https://bugs.webkit.org/show_bug.cgi?id=132359

Reviewed by Darin Adler.

* WebView/WebHTMLView.mm:
(imageFromRect):
(selectionImage):
(-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]):
Bring back the old FrameSnapshottingMac code for drawing the selection image as drag code for this
is still unimplemented on iOS.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
Set the page scale for "simple HTML documents" (this is already done for the all other documents),
to ensure that the snapshot is the correct size.

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

5 years agoFollowup to: Handle selection services menu.
beidson@apple.com [Wed, 30 Apr 2014 16:55:34 +0000 (16:55 +0000)]
Followup to: Handle selection services menu.
<rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): Remove an ASSERT from previous version of the patch
  that landed. I’d forgotten to add this stray change to my staging area.

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

5 years ago[GTK] Make it easier to run CMake for downstreams
mrobinson@webkit.org [Wed, 30 Apr 2014 16:55:33 +0000 (16:55 +0000)]
[GTK] Make it easier to run CMake for downstreams
https://bugs.webkit.org/show_bug.cgi?id=132370

Reviewed by Carlos Garcia Campos.

.:
* Source/cmake/OptionsGTK.cmake: Turn PRODUCTION_MODE into DEVELOPER_MODE.

Tools:
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Pass -DDEVELOPER_MODE when building
the GTK+ port.

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

5 years agocompositing/repaint/repaint-on-layer-grouping-change.html is flaky
ap@apple.com [Wed, 30 Apr 2014 16:43:16 +0000 (16:43 +0000)]
compositing/repaint/repaint-on-layer-grouping-change.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=132385

* platform/mac/TestExpectations: Marked as such.

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

5 years ago[New Multicolumn] Region offset not factored in when mapping to local coords
hyatt@apple.com [Wed, 30 Apr 2014 16:42:47 +0000 (16:42 +0000)]
[New Multicolumn] Region offset not factored in when mapping to local coords
https://bugs.webkit.org/show_bug.cgi?id=132383

Reviewed by Anders Carlsson.

Make sure to cache the offset of the multicolumn set from its parent and then
add that in to the translation offset.

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

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

5 years agoMove removeEquivalentProperties functions to EditingStyle
ossy@webkit.org [Wed, 30 Apr 2014 13:51:47 +0000 (13:51 +0000)]
Move removeEquivalentProperties functions to EditingStyle
https://bugs.webkit.org/show_bug.cgi?id=131093

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-30
Reviewed by Csaba Osztrogonác.

A follow-up to r167967. Use single line declaration for template methods.

* editing/EditingStyle.h:

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

5 years ago[CSS Grid Layout] Enable runtime feature by default
rego@igalia.com [Wed, 30 Apr 2014 08:54:39 +0000 (08:54 +0000)]
[CSS Grid Layout] Enable runtime feature by default
https://bugs.webkit.org/show_bug.cgi?id=132189

Reviewed by Benjamin Poulain.

Source/WebCore:
* page/Settings.in: Set cssGridLayoutEnabled to true.

Source/WebKit/mac:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Remove unneeded changes that
enable/disable the runtime feature depending on the compilation flag.
And set it to true by default.

Source/WebKit2:
* Shared/WebPreferencesStore.h: Remove unneeded changes that
enable/disable the runtime feature depending on the compilation flag.
And set it to true by default.
* UIProcess/gtk/ExperimentalFeatures.cpp: Set it to true by default.

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

5 years ago[CSS Grid Layout] Wrap some specific grid code under compilation flag
rego@igalia.com [Wed, 30 Apr 2014 08:23:00 +0000 (08:23 +0000)]
[CSS Grid Layout] Wrap some specific grid code under compilation flag
https://bugs.webkit.org/show_bug.cgi?id=132341

Reviewed by Benjamin Poulain.

Some static variables in RenderBox are only used for CSS Grid Layout code. Wrap them and the related methods
under ENABLE_CSS_GRID_LAYOUT compilation flag.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
* rendering/RenderBox.h:

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

5 years agoUnreviewed. Wrong units used in offset calculation from r167961.
roger_fong@apple.com [Wed, 30 Apr 2014 07:08:30 +0000 (07:08 +0000)]
Unreviewed. Wrong units used in offset calculation from r167961.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
I accidentally mixed and matches LayoutUnits with Ints in offset calculation here.
It should all just be in LayoutUnits.

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

5 years agoWeb Inspector: reduce per-protocol method function creation in InspectorBackend
burg@cs.washington.edu [Wed, 30 Apr 2014 05:52:04 +0000 (05:52 +0000)]
Web Inspector: reduce per-protocol method function creation in InspectorBackend
https://bugs.webkit.org/show_bug.cgi?id=130701

Reviewed by Timothy Hatcher.

Instead of creating 4 bound functions for every backend method on startup, we
can share common functionality on the InspectorBackendCommand prototype. This
also splits the various client-facing protocol introspection mechanisms from
the message encoding/decoding code.

We use a workaround to make the command instances themselves callable as well
as having .invoke, .promise, and .supports. InspectorAgent.methodName returns a
trampoline function that performs the default method invocation. The trampoline's
__proto__ is patched to point to InspectorBackendClass.prototype, and the command
instance is saved in the closure and on the trampoline function itself.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype._registerPendingResponse):
(InspectorBackendClass.prototype._invokeMethod):
(InspectorBackendClass.prototype.registerCommand):
(InspectorBackendClass.prototype.registerEvent):
(InspectorBackendCommand):
(.callable):
(InspectorBackendCommand.create):
(InspectorBackendCommand.prototype.invoke):
(InspectorBackendCommand.prototype.promise):
(InspectorBackendCommand.prototype.supports):
(InspectorBackendCommand.prototype._invokeWithArguments):
(InspectorBackendClass.prototype._wrap): Deleted.
(InspectorBackendClass.prototype._invoke): Deleted.
(InspectorBackendClass.prototype._promise): Deleted.
(InspectorBackendClass.prototype._supports): Deleted.
(InspectorBackendClass.prototype._sendMessageToBackend): Deleted.
(InspectorBackendClass.prototype._wrapCallbackAndSendMessageObject): Deleted.
(InspectorBackendClass.prototype.sendMessageObjectToBackend): Deleted.

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

5 years agoUnreviewed, rolling out r167962 and r167975.
commit-queue@webkit.org [Wed, 30 Apr 2014 05:42:57 +0000 (05:42 +0000)]
Unreviewed, rolling out r167962 and r167975.
https://bugs.webkit.org/show_bug.cgi?id=132376

Mysteriously broke many tests (Requested by ap on #webkit).

Reverted changesets:

"[Mac, iOS] Support caption activation via JS
webkitHasClosedCaptions method"
https://bugs.webkit.org/show_bug.cgi?id=132320
http://trac.webkit.org/changeset/167962

"Unreviewed test fix after r167962."
http://trac.webkit.org/changeset/167975

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

5 years ago[New Multicolumn] Multiple tests assert in RenderGeometryMap
hyatt@apple.com [Wed, 30 Apr 2014 05:15:34 +0000 (05:15 +0000)]
[New Multicolumn] Multiple tests assert in RenderGeometryMap
https://bugs.webkit.org/show_bug.cgi?id=132285

Reviewed by Simon Fraser.

Implement offsetFromContainer for RenderMultiColumnFlowThread so that the
geometry map gets the right offsets. This is really only relevant for the
geometry map, since I already overrode mapAbsoluteToLocalPoint and multicolumn
flow threads are repaint containers (so mapLocalToAbsolute never needs offsetFromContainer).

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
* rendering/RenderMultiColumnFlowThread.h:

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

5 years ago<rdar://problem/16765765> Use JSON::PP in perl scripts instead of JSON.
slewis@apple.com [Wed, 30 Apr 2014 04:54:07 +0000 (04:54 +0000)]
<rdar://problem/16765765> Use JSON::PP in perl scripts instead of JSON.

Rubber stamped by Jessie Berlin.

JSON.pm was removed from our tools setup.

* Scripts/generate-coverage-data:

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

5 years ago[iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely...
benjamin@webkit.org [Wed, 30 Apr 2014 04:03:55 +0000 (04:03 +0000)]
[iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
https://bugs.webkit.org/show_bug.cgi?id=132368

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-29
Reviewed by Simon Fraser.

Source/WebCore:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
The initial device scale factor was initialized to 1. We were returning the wrong zoomedOutContentsScale() and
contentsScale() on retina devices until the next successful scale update.

Source/WebKit2:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
PlatformCALayerRemote always initialized the content scale to 1. Since contentsScale is supposed to reflect
zoomScale * deviceScaleFactor, the value should be 2.

This was causing bugs whenever the page scale factor was 1/2 on retina device (device scale factor = 2).

When the page is initialized, GraphicsLayerCA::updateContentsScale(0.5) computes a contentsScale of 1. There is an early
return on if (contentsScale == m_layer->contentsScale()). Since PlatformCALayerRemote->contentsScale() was incorreclty
returning one, we were leaving the tile backing unmodified.

Later, when the transaction is commited, the tile backing would still be default initialized and would render everything
at the wrong scale.

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

5 years agoRemove an unused override of BlobRegistryImpl::appendStorageItems
ap@apple.com [Wed, 30 Apr 2014 03:36:32 +0000 (03:36 +0000)]
Remove an unused override of BlobRegistryImpl::appendStorageItems
https://bugs.webkit.org/show_bug.cgi?id=132365

Reviewed by Andreas Kling.

* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::appendStorageItems): Deleted.
* platform/network/BlobRegistryImpl.h:

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

5 years agoFix test up so that it looks the same as it did before my landing in r167965.
hyatt@apple.com [Wed, 30 Apr 2014 03:34:01 +0000 (03:34 +0000)]
Fix test up so that it looks the same as it did before my landing in r167965.

* fast/multicol/mixed-positioning-stacking-order.html:

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

5 years ago[Mac] tag the video layers with descriptive name to aid debugging
eric.carlson@apple.com [Wed, 30 Apr 2014 02:52:01 +0000 (02:52 +0000)]
[Mac] tag the video layers with descriptive name to aid debugging
https://bugs.webkit.org/show_bug.cgi?id=132371

Reviewed by Darin Adler.

Source/WebCore:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Set the AVPlayerLayer
    name in a debug build.

Source/WebKit2:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Set the
    fullscreen host layer name in a debug build.

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

5 years ago[GTK][cmake] CMake variable (non)expansion causing 'File name too long' build error.
commit-queue@webkit.org [Wed, 30 Apr 2014 01:53:53 +0000 (01:53 +0000)]
[GTK][cmake] CMake variable (non)expansion causing 'File name too long' build error.
https://bugs.webkit.org/show_bug.cgi?id=132244

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2014-04-29
Reviewed by Martin Robinson.

Removing quotes around include directory variable ${WebCore_INCLUDE_DIRECTORIES} in
the include_directories cmake macro enables the variable to be expanded correctly.

No tests created as this fixes a platform specific build issue.

* PlatformGTK.cmake:

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

5 years agoUnreviewed test fix after r167962.
bfulgham@apple.com [Wed, 30 Apr 2014 01:09:52 +0000 (01:09 +0000)]
Unreviewed test fix after r167962.
* Modules/mediacontrols/mediaControlsApple.css:
(.hidden): Use common '.hidden' class for controls.
(video::-webkit-media-text-track-container .hidden): Deleted.

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

5 years agoHandle selection services menu.
beidson@apple.com [Wed, 30 Apr 2014 01:04:12 +0000 (01:04 +0000)]
Handle selection services menu.
<rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362

Reviewed by Tim Horton.

Source/WebCore:
* WebCore.exp.in:

Source/WebKit2:
Add members for the relevant info for showing a service menu for a selection:
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::controlledDataIsEditable):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::controlledSelectionData):
(WebKit::ContextMenuContextData::needsServicesMenu):

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
(WebKit::WebPageProxy::showSelectionServiceMenu):

Update the services menu code to know the difference between an image service and a selection service:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
(WebKit::WebContextMenuProxyMac::clearServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu): Deleted.
(WebKit::WebContextMenuProxyMac::clearImageServicesMenu): Deleted.

* WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
(WebKit::WebPasteboardOverrides::getDataForOverride):

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
(WebKit::WebPage::handleSelectionServiceClick): Pass the relevant selection data through to the UIProcess as RTFD data.

* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::handleClick): Notify the WebPage of the click.

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

5 years agoRemoving unused argument in InlineFlowBox::placeBoxesInInlineDirection()
mmaxfield@apple.com [Wed, 30 Apr 2014 00:36:21 +0000 (00:36 +0000)]
Removing unused argument in InlineFlowBox::placeBoxesInInlineDirection()
https://bugs.webkit.org/show_bug.cgi?id=132369

Reviewed by Darin Adler.

This was not caught by our compiler because placeBoxesInInlineDirection()
is mutually-recursive with placeBoxRangeInInlineDirection().

No new tests are necessary because there should be no behavior change.

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInInlineDirection):
(WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
* rendering/InlineFlowBox.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):

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

5 years ago[WinCairo] Switch video from GStreamer to Media Foundation.
commit-queue@webkit.org [Wed, 30 Apr 2014 00:11:05 +0000 (00:11 +0000)]
[WinCairo] Switch video from GStreamer to Media Foundation.
https://bugs.webkit.org/show_bug.cgi?id=132358

Patch by Alex Christensen <achristensen@webkit.org> on 2014-04-29
Reviewed by Brent Fulgham.

Source/WebCore:
* WebCore.vcxproj/WebCore.vcxproj:
Removed dependencies on GStreamer.

Source/WebKit:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
Removed dependencies on GStreamer.

Source/WTF:
* WTF.vcxproj/WTF.vcxproj:
Removed dependencies on GStreamer.
* wtf/Platform.h:
Use Media Foundation instead of GStreamer and GLib.

Websites/webkit.org:
* building/tools.html:
Removed requirement of installing GStreamer.

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

5 years agoRemove some PLATFORM(IOS) #ifdefs related to hasAcceleratedTouchScrolling()
simon.fraser@apple.com [Tue, 29 Apr 2014 23:53:57 +0000 (23:53 +0000)]
Remove some PLATFORM(IOS) #ifdefs related to hasAcceleratedTouchScrolling()
https://bugs.webkit.org/show_bug.cgi?id=132353

Reviewed by Tim Horton & Darin Adler.

Minor cleanup and refactoring to remove #idefs.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo): No need for this #ifdef, usesCompositedScrolling()
gives the right answser already.
(WebCore::RenderLayer::visibleContentRectInternal): Use showsOverflowControls() to
avoid #ifdef.
(WebCore::RenderLayer::invalidateScrollbarRect): Ditto.
(WebCore::RenderLayer::invalidateScrollCornerRect): Ditto.
(WebCore::RenderLayer::verticalScrollbarWidth): Ditto.
(WebCore::RenderLayer::horizontalScrollbarHeight): Ditto.
(WebCore::RenderLayer::showsOverflowControls): Return false on iOS.
(WebCore::RenderLayer::paintOverflowControls): Ditto.
(WebCore::RenderLayer::calculateClipRects): Ditto.
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
Just #ifdef in side of this function rather than having two similar functions.
(WebCore::RenderLayerBacking::shouldClipCompositedBounds):
(WebCore::hasNonZeroTransformOrigin):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Use a local bool
to reduce #ifdefs.
(WebCore::layerOrAncestorIsTransformedOrScrolling): Deleted.

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

5 years agoRemove Settings::compositedScrollingForFramesEnabled
simon.fraser@apple.com [Tue, 29 Apr 2014 23:53:55 +0000 (23:53 +0000)]
Remove Settings::compositedScrollingForFramesEnabled
https://bugs.webkit.org/show_bug.cgi?id=132352

Reviewed by Andreas Kling.

Source/WebCore:
The usesCompositedScrolling setting was only used by Chromium, so
remove it and associated code.

* page/FrameView.cpp:
(WebCore::FrameView::usesCompositedScrolling): Deleted.
* page/FrameView.h:
* page/Settings.in:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollLayerPosition):

LayoutTests:
* compositing/iframes/iframe-composited-scrolling-expected.txt: Removed.
* compositing/iframes/iframe-composited-scrolling.html: Removed.

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

5 years ago<rdar://problem/16745596> [Cocoa] Crash when invoking a method with an unsigned param...
mitz@apple.com [Tue, 29 Apr 2014 23:40:49 +0000 (23:40 +0000)]
<rdar://problem/16745596> [Cocoa] Crash when invoking a method with an unsigned parameter on a remote object
https://bugs.webkit.org/show_bug.cgi?id=132366

Reviewed by Anders Carlsson.

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation): Handle the 'I' type code. Interpret the 'q' and 'Q' type codes in an
architecture-independent manner.
(decodeInvocationArguments): Ditto.

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

5 years agoMove removeEquivalentProperties functions to EditingStyle
commit-queue@webkit.org [Tue, 29 Apr 2014 23:34:29 +0000 (23:34 +0000)]
Move removeEquivalentProperties functions to EditingStyle
https://bugs.webkit.org/show_bug.cgi?id=131093

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-29
Reviewed by Darin Adler.

Moved the removeEquivalentProperties functions
from StyleProperties to EditingStyle class.

* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::removeEquivalentProperties): Deleted.
* css/StyleProperties.h:
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::removeEquivalentProperties):
(WebCore::extractPropertiesNotIn):
* editing/EditingStyle.h:

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

5 years ago[New Multicolumn] Implement support for compositing
hyatt@apple.com [Tue, 29 Apr 2014 22:59:26 +0000 (22:59 +0000)]
[New Multicolumn] Implement support for compositing
https://bugs.webkit.org/show_bug.cgi?id=132298

Source/WebCore:

Reviewed by Simon Fraser.

* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
Add in a case for the new columns that calls into the multi-column flow thread
to get an offset to adjust by.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
Make sure this code only runs for named flow threads.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::canBeComposited):
Turn on compositing support for in-flow RenderFlowThreads instead of always returning
false

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
Changed this function to fix a couple of bugs exposed by compositing/columns tests. Its
end goal is the same, but the approach is improved.

* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::endFlow):
Don't pad out to a multiple of column height. You can't flip around a flow thread
to get back to accurate physical coordinates if bogus padding is introduced. This
seemed to have no effect on any layout tests when removed, so I don't think it
was really serving any useful purpose.

(WebCore::RenderMultiColumnSet::columnTranslationForOffset):
Don't factor in the overall flow thread portion, since this is handled by the callers
now.

(WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
* rendering/RenderMultiColumnSet.h:
Change this function to be ASSERT_NOT_REACHED(), since we want to know if someone calls
it. It only runs for named flow thread compositing code, so it would be a mistake if
this ever gets invoked.

LayoutTests:

Reviewed by Simon Fraser.

Minor pixel test changes based off how we flip now.

* platform/mac/fast/multicol/block-axis-horizontal-bt-expected.png:
* platform/mac/fast/multicol/block-axis-horizontal-tb-expected.png:
* platform/mac/fast/multicol/block-axis-vertical-lr-expected.png:
* platform/mac/fast/multicol/block-axis-vertical-rl-expected.png:
* platform/mac/fast/multicol/border-padding-pagination-expected.png:
* platform/mac/fast/multicol/client-rects-spanners-complex-expected.txt:
* platform/mac/fast/multicol/client-rects-spanners-expected.txt:
* platform/mac/fast/multicol/column-break-with-balancing-expected.png:
* platform/mac/fast/multicol/column-count-with-rules-expected.png:
* platform/mac/fast/multicol/column-rules-expected.png:
* platform/mac/fast/multicol/column-rules-stacking-expected.png:
* platform/mac/fast/multicol/columns-shorthand-parsing-expected.png:
* platform/mac/fast/multicol/float-avoidance-expected.png:
* platform/mac/fast/multicol/float-multicol-expected.png:
* platform/mac/fast/multicol/float-paginate-complex-expected.png:
* platform/mac/fast/multicol/float-paginate-empty-lines-expected.png:
* platform/mac/fast/multicol/float-paginate-expected.png:
* platform/mac/fast/multicol/layers-in-multicol-expected.png:
* platform/mac/fast/multicol/layers-split-across-columns-expected.png:
* platform/mac/fast/multicol/margin-collapse-expected.png:
* platform/mac/fast/multicol/max-height-columns-block-expected.png:
* platform/mac/fast/multicol/nested-columns-expected.png:
* platform/mac/fast/multicol/newmulticol/client-rects-expected.txt:
* platform/mac/fast/multicol/overflow-across-columns-expected.png:
* platform/mac/fast/multicol/overflow-across-columns-percent-height-expected.png:
* platform/mac/fast/multicol/overflow-unsplittable-expected.png:
* platform/mac/fast/multicol/paginate-block-replaced-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-bt-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-lr-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-rl-expected.png:
* platform/mac/fast/multicol/pagination/BottomToTop-tb-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-bt-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-lr-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-rl-expected.png:
* platform/mac/fast/multicol/pagination/LeftToRight-tb-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-bt-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-lr-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-rl-expected.png:
* platform/mac/fast/multicol/pagination/RightToLeft-tb-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-bt-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-lr-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-rl-expected.png:
* platform/mac/fast/multicol/pagination/TopToBottom-tb-expected.png:
* platform/mac/fast/multicol/positioned-split-expected.png:
* platform/mac/fast/multicol/positive-leading-expected.png:
* platform/mac/fast/multicol/scrolling-overflow-expected.png:
* platform/mac/fast/multicol/shadow-breaking-expected.png:
* platform/mac/fast/multicol/single-line-expected.png:
* platform/mac/fast/multicol/span/anonymous-before-child-parent-crash-expected.png:
* platform/mac/fast/multicol/span/anonymous-split-block-crash-expected.png:
* platform/mac/fast/multicol/span/anonymous-style-inheritance-expected.png:
* platform/mac/fast/multicol/span/anonymous-style-inheritance-expected.txt:
* platform/mac/fast/multicol/span/clone-anonymous-block-non-inline-child-crash-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-generated-content-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-child-property-removal-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-expected.png:
* platform/mac/fast/multicol/span/span-as-immediate-columns-child-removal-expected.png:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.png:
* platform/mac/fast/multicol/span/span-as-nested-columns-child-expected.png:
* platform/mac/fast/multicol/span/span-as-nested-inline-block-child-expected.png:
* platform/mac/fast/multicol/span/span-margin-collapsing-expected.png:
* platform/mac/fast/multicol/table-margin-collapse-expected.png:
* platform/mac/fast/multicol/table-vertical-align-expected.png:
* platform/mac/fast/multicol/unsplittable-inline-block-expected.png:
* platform/mac/fast/multicol/vertical-lr/border-padding-pagination-expected.png:
* platform/mac/fast/multicol/vertical-lr/column-break-with-balancing-expected.png:
* platform/mac/fast/multicol/vertical-lr/column-count-with-rules-expected.png:
* platform/mac/fast/multicol/vertical-lr/column-rules-expected.png:
* platform/mac/fast/multicol/vertical-lr/float-avoidance-expected.png:
* platform/mac/fast/multicol/vertical-lr/float-multicol-expected.png:
* platform/mac/fast/multicol/vertical-lr/float-paginate-complex-expected.png:
* platform/mac/fast/multicol/vertical-lr/float-paginate-expected.png:
* platform/mac/fast/multicol/vertical-lr/nested-columns-expected.png:
* platform/mac/fast/multicol/vertical-lr/unsplittable-inline-block-expected.png:
* platform/mac/fast/multicol/vertical-rl/border-padding-pagination-expected.png:
* platform/mac/fast/multicol/vertical-rl/column-break-with-balancing-expected.png:
* platform/mac/fast/multicol/vertical-rl/column-count-with-rules-expected.png:
* platform/mac/fast/multicol/vertical-rl/column-rules-expected.png:
* platform/mac/fast/multicol/vertical-rl/float-avoidance-expected.png:
* platform/mac/fast/multicol/vertical-rl/float-multicol-expected.png:
* platform/mac/fast/multicol/vertical-rl/float-paginate-complex-expected.png:
* platform/mac/fast/multicol/vertical-rl/float-paginate-expected.png:
* platform/mac/fast/multicol/vertical-rl/nested-columns-expected.png:
* platform/mac/fast/multicol/vertical-rl/unsplittable-inline-block-expected.png:

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

5 years agoSource/JavaScriptCore: Don't hold on to parameterBindingNodes forever
oliver@apple.com [Tue, 29 Apr 2014 22:23:17 +0000 (22:23 +0000)]
Source/JavaScriptCore: Don't hold on to parameterBindingNodes forever
https://bugs.webkit.org/show_bug.cgi?id=132360

Reviewed by Geoffrey Garen.

Don't keep the parameter nodes anymore. Instead we store the
original parameter string and reparse whenever we actually
need them. Because we only actually need them for compilation
this only results in a single extra parse.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::visitChildren):
(JSC::UnlinkedFunctionExecutable::finishCreation):
(JSC::UnlinkedFunctionExecutable::paramString):
(JSC::UnlinkedFunctionExecutable::parameters):
(JSC::UnlinkedFunctionExecutable::parameterCount): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::create):
(JSC::UnlinkedFunctionExecutable::parameterCount):
(JSC::UnlinkedFunctionExecutable::parameters): Deleted.
(JSC::UnlinkedFunctionExecutable::finishCreation): Deleted.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::setFunctionBodyParameters):
* parser/Nodes.h:
(JSC::FunctionBodyNode::parametersStartOffset):
(JSC::FunctionBodyNode::parametersEndOffset):
(JSC::FunctionBodyNode::setParameterLocation):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::parseParameters):
* parser/Parser.h:
(JSC::parse):
* parser/SourceCode.h:
(JSC::SourceCode::subExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::setFunctionBodyParameters):

LayoutTests: Don't hold on to parameter BindingNodes forever
https://bugs.webkit.org/show_bug.cgi?id=132360

Reviewed by Geoffrey Garen.

We don't regenerate the parameter string anymore, so these tests now
match the original input.

* js/destructuring-assignment-expected.txt:

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

5 years agoJSProxies should be cacheable
mhahnenberg@apple.com [Tue, 29 Apr 2014 22:21:04 +0000 (22:21 +0000)]
JSProxies should be cacheable
https://bugs.webkit.org/show_bug.cgi?id=132351

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:
Whenever we encounter a proxy in an inline cache we should try to cache on the
proxy's target instead of giving up.

This patch adds support for a simple "recursive" inline cache if the base object
we're accessing is a pure forwarding proxy. JSGlobalObject and its subclasses
are the only ones to benefit from this right now.

This is performance neutral on the benchmarks we track. Currently we won't
cache on JSDOMWindow due to HasImpureGetOwnPropertySlot, but this issue will be fixed soon.

* jit/Repatch.cpp:
(JSC::generateByIdStub):
(JSC::tryBuildGetByIDList):
(JSC::tryCachePutByID):
(JSC::tryBuildPutByIdList):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionCreateProxy):
* runtime/IntendedStructureChain.cpp:
(JSC::IntendedStructureChain::isNormalized):
* runtime/JSCellInlines.h:
(JSC::JSCell::isProxy):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::finishCreation):
* runtime/JSProxy.h:
(JSC::JSProxy::createStructure):
(JSC::JSProxy::targetOffset):
* runtime/JSType.h:
* runtime/Operations.h:
(JSC::isPrototypeChainNormalized):
* runtime/Structure.h:
(JSC::Structure::isProxy):
* tests/stress/proxy-inline-cache.js: Added.
(cacheOnTarget.getX):
(cacheOnTarget):
(cacheOnPrototypeOfTarget.getX):
(cacheOnPrototypeOfTarget):
(dontCacheOnProxyInPrototypeChain.getX):
(dontCacheOnProxyInPrototypeChain):
(dontCacheOnTargetOfProxyInPrototypeChainOfTarget.getX):
(dontCacheOnTargetOfProxyInPrototypeChainOfTarget):

Source/WebCore:
No new tests.

Whenever we encounter a proxy in an inline cache we should try to cache on the
proxy's target instead of giving up.

This patch adds support for a simple "recursive" inline cache if the base object
we're accessing is a pure forwarding proxy. JSGlobalObject and its subclasses
are the only ones to benefit from this right now.

This is performance neutral on the benchmarks we track. Currently we won't
cache on JSDOMWindow due to HasImpureGetOwnPropertySlot, but this issue will be fixed soon.

* bindings/js/JSDOMWindowShell.h:
(WebCore::JSDOMWindowShell::createStructure):

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

5 years ago[Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
bfulgham@apple.com [Tue, 29 Apr 2014 22:19:16 +0000 (22:19 +0000)]
[Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
https://bugs.webkit.org/show_bug.cgi?id=132320

Reviewed by Eric Carlson.

* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-text-track-container .hidden): Added.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
new 'updateCaptionsContainer'.
(WebCore::HTMLMediaElement::updateCaptionContainer): Added.
* html/HTMLMediaElement.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::hide): Use CSS class .hidden instead of
hard-coded "display:none".
(WebCore::MediaControlTextTrackContainerElement::show): Ditto.
* html/shadow/MediaControlElements.h:

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

5 years agoDon't immediately snapshot plugin to allow for proper dominant plugin detection.
roger_fong@apple.com [Tue, 29 Apr 2014 22:14:37 +0000 (22:14 +0000)]
Don't immediately snapshot plugin to allow for proper dominant plugin detection.
https://bugs.webkit.org/show_bug.cgi?id=132294.
<rdar://problem/16745679>

Reviewed by Dean Jackson.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin):
Instead of immediately setting the display state to DisplaySnapshot,
put it on a timer to let the page fully layout and get hit test properly.

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

5 years agoPlugins hidden by images should autoplay.
roger_fong@apple.com [Tue, 29 Apr 2014 22:10:32 +0000 (22:10 +0000)]
Plugins hidden by images should autoplay.
https://bugs.webkit.org/show_bug.cgi?id=132222.
<rdar://problem/16653536>

Reviewed by Jon Lee and Darin Adler.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
If the image on top of the plugin is similarly sized and similarly positioned as the plugin rect,
set the plugin to autoplay. This is assuming that the previous snapshot checks have passed as well.
* WebCore.exp.in: Add exports needed by WK2.
* platform/mac-wk2/plugins/snapshotting/autoplay-plugin-blocked-by-image-expected.txt: Added.
* platform/mac-wk2/plugins/snapshotting/autoplay-plugin-mostly-blocked-by-image-expected.txt: Added.
* platform/mac-wk2/plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image-expected.txt: Added.
* plugins/snapshotting/autoplay-plugin-blocked-by-image.html: Added.
* plugins/snapshotting/autoplay-plugin-mostly-blocked-by-image.html: Added.
* plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html: Added.

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

5 years agoUnreviewed, fix cloop build.
fpizlo@apple.com [Tue, 29 Apr 2014 22:07:28 +0000 (22:07 +0000)]
Unreviewed, fix cloop build.

* wtf/Platform.h:

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

5 years agoUse LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
fpizlo@apple.com [Tue, 29 Apr 2014 22:02:00 +0000 (22:02 +0000)]
Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
https://bugs.webkit.org/show_bug.cgi?id=112840

Rubber stamped by Geoffrey Garen.

Source/JavaScriptCore:
* Configurations/FeatureDefines.xcconfig:

Source/WebCore:
It already has a lot of tests.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:
* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:
* Configurations/FeatureDefines.xcconfig:

Tools:
* Scripts/build-jsc: Enable it on Mac.
* Scripts/build-webkit: Enable it on Mac.
* Scripts/export-llvm-build: Make it slightly easier to export the build if you've done a "make install".

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

5 years agoFix check-webkit-style after r167926.
lforschler@apple.com [Tue, 29 Apr 2014 21:58:08 +0000 (21:58 +0000)]
Fix check-webkit-style after r167926.

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

5 years agoChange Image Controls replacement to use selection and paste
beidson@apple.com [Tue, 29 Apr 2014 21:54:23 +0000 (21:54 +0000)]
Change Image Controls replacement to use selection and paste
<rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992

Reviewed by Tim Horton.

Source/WebCore:
* WebCore.exp.in: Remove deleted symbol.

* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::defaultEventHandler):

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showImageControlsMenu): Select the image element
  before showing the menu.
(WebCore::ContextMenuController::replaceControlledImage): Deleted.
* page/ContextMenuController.h:

Source/WebKit/mac:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController sharingService:didShareItems:]): Write the
  replacement data to a special pasteboard, then replace the current selection from
  that pasteboard.

Source/WebKit2:
Add a "pasteboard override" mechanism which allows WebKit to keep pasteboard content local
to the WebProcess and access it there without having to message up to the UI process:
* WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Added.
(WebKit::WebPasteboardOverrides::sharedPasteboardOverrides):
(WebKit::WebPasteboardOverrides::WebPasteboardOverrides):
(WebKit::WebPasteboardOverrides::addOverride):
(WebKit::WebPasteboardOverrides::removeOverride):
(WebKit::WebPasteboardOverrides::overriddenTypes):
(WebKit::WebPasteboardOverrides::getDataForOverride):
* WebProcess/WebCoreSupport/WebPasteboardOverrides.h: Added.

Change the pasteboard strategy to consult the pasteboard overrides before consulting the native pasteboard:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getTypes):
(WebKit::WebPlatformStrategies::bufferForType):

Add "replaceSelectionWithPasteboardData" which uses the new pasteboard overrides mechanism
and then has WebCore perform the replacement:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::replaceSelectionPasteboardName):
(WebKit::WebPage::replaceSelectionWithPasteboardData):

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::replaceSelectionWithPasteboardData):

* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::page):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Use "replaceSelectionWithPasteboardData".
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.

Remain other remnants of "replaceControlledImage":
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::replaceControlledImage): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage): Deleted.

* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoWeb Inspector: DataGrid columns should be objects not Maps
burg@cs.washington.edu [Tue, 29 Apr 2014 20:51:47 +0000 (20:51 +0000)]
Web Inspector: DataGrid columns should be objects not Maps
https://bugs.webkit.org/show_bug.cgi?id=129383

Reviewed by Timothy Hatcher.

This reverts an earlier conversion to maps, so that column properties
(which rarely change) can be optimized.

String literals for column properties have been preserved so columns
can be easily converted into objects with methods.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.autoSizeColumns):
(WebInspector.DataGrid.prototype.set var):
(WebInspector.DataGrid.prototype.set if):
(WebInspector.DataGrid.prototype.insertColumn):
(WebInspector.DataGrid.prototype.removeColumn.get this):
(WebInspector.DataGrid.prototype.removeColumn):
(WebInspector.DataGrid.prototype.columnWidthsMap):
(WebInspector.DataGrid.prototype.applyColumnWidthsMap):
(WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
(WebInspector.DataGridNode.prototype.createCell.get if):
(WebInspector.DataGridNode.prototype.createCell):
(WebInspector.DataGrid.prototype.get length): Deleted.
* UserInterface/Views/ProbeSetDataGrid.js:
(WebInspector.ProbeSetDataGrid.prototype._probeExpressionChanged.get this):
(WebInspector.ProbeSetDataGrid.prototype._probeExpressionChanged):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters.scopeBar.this.columns.get string_appeared_here):
(WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):

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

5 years agoREGRESSION (r167906?): js/dom/basic-weakmap.html is much more flaky than before
akling@apple.com [Tue, 29 Apr 2014 20:33:43 +0000 (20:33 +0000)]
REGRESSION (r167906?): js/dom/basic-weakmap.html is much more flaky than before
<https://webkit.org/b/132322>

Remove the part of js/dom/basic-weakmap.html that expects deterministic behavior
from our non-deterministic GC.

Rubber-stamped by Phil Pizlo.

* TestExpectations:
* js/dom/basic-weakmap-expected.txt:
* js/dom/script-tests/basic-weakmap.js:

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

5 years agoFor DARWIN platforms, use system temporary directory for DataLog output
msaboff@apple.com [Tue, 29 Apr 2014 20:28:37 +0000 (20:28 +0000)]
For DARWIN platforms, use system temporary directory for DataLog output
https://bugs.webkit.org/show_bug.cgi?id=132346

Reviewed by Geoffrey Garen.

Added code to call confstr() to access the process's temporary directory to use that
location instead of /tmp/.  Put the code behind #ifdef DATA_LOG_TO_DARWIN_TEMP_DIR.

* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):

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

5 years agoString.prototype.trim removes U+200B from strings.
ggaren@apple.com [Tue, 29 Apr 2014 19:47:25 +0000 (19:47 +0000)]
String.prototype.trim removes U+200B from strings.
https://bugs.webkit.org/show_bug.cgi?id=130184

Reviewed by Michael Saboff.

Source/JavaScriptCore:
* runtime/StringPrototype.cpp:
(JSC::trimString):
(JSC::isTrimWhitespace): Deleted.

LayoutTests:
* js/script-tests/string-trim.js:
* js/string-trim-expected.txt:

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

5 years agoREGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
ap@apple.com [Tue, 29 Apr 2014 19:23:08 +0000 (19:23 +0000)]
REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
https://bugs.webkit.org/show_bug.cgi?id=111613
<rdar://problem/13407093>

* platform/mac/TestExpectations: Remove test expectation, now that the bug is fixed.

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

5 years agoBuild fix.
timothy_horton@apple.com [Tue, 29 Apr 2014 18:56:50 +0000 (18:56 +0000)]
Build fix.

* DatabaseProcess/ios/DatabaseProcessIOS.mm:

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

5 years agoZombifying sweep should ignore retired blocks.
mark.lam@apple.com [Tue, 29 Apr 2014 18:20:05 +0000 (18:20 +0000)]
Zombifying sweep should ignore retired blocks.
<https://webkit.org/b/132344>

Reviewed by Mark Hahnenberg.

By definition, retired blocks do not have "dead" objects, or at least
none that we know of yet until the next marking phase has been run
over it.  So, we should not be sweeping them (even for zombie mode).

* heap/Heap.cpp:
(JSC::Heap::zombifyDeadObjects):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::zombifySweep):
* heap/MarkedSpace.h:
(JSC::ZombifySweep::operator()):

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

5 years agoREGRESSION (r167906?): js/dom/basic-weakmap.html is much more flaky than before
timothy_horton@apple.com [Tue, 29 Apr 2014 18:09:09 +0000 (18:09 +0000)]
REGRESSION (r167906?): js/dom/basic-weakmap.html is much more flaky than before
https://bugs.webkit.org/show_bug.cgi?id=132322

* TestExpectations:
Mark the test as flaky.

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

5 years ago[WK2] DatabaseProcess should be sandboxed
ap@apple.com [Tue, 29 Apr 2014 17:54:21 +0000 (17:54 +0000)]
[WK2] DatabaseProcess should be sandboxed
https://bugs.webkit.org/show_bug.cgi?id=132324
<rdar://problem/15961708>

Reviewed by Darin Adler.

* Configurations/WebKit2.xcconfig: Added the profile to the list of files skipped
on iOS.

* DatabaseProcess/DatabaseProcess.cpp: (WebKit::DatabaseProcess::initializeDatabaseProcess):
Consume a sandbox extension for IndexedDB directory (which we get with initialization
message after entering sandbox).

* DatabaseProcess/ios: Added.
* DatabaseProcess/ios/DatabaseProcessIOS.mm: Copied from Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm.
Separated from Mac version to match how other processes are implemented.

* DatabaseProcess/mac/DatabaseProcessMac.mm: (WebKit::DatabaseProcess::initializeProcessName):
Removed ifdefs.

* DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in: Added.

* DerivedSources.make: Generate the profile from .sb.in.

* Shared/Databases/DatabaseProcessCreationParameters.cpp:
(WebKit::DatabaseProcessCreationParameters::encode):
(WebKit::DatabaseProcessCreationParameters::decode):
* Shared/Databases/DatabaseProcessCreationParameters.h:
Added a sandbox extension for indexedDatabaseDirectory.

* Shared/SecurityOriginData.h: Added an unrelated FIXME.

* UIProcess/WebContext.cpp: (WebKit::WebContext::ensureDatabaseProcess): Create
a sandbox extension for indexedDatabaseDirectory.

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

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

5 years agoFix bit rot in zombie mode heap code.
mark.lam@apple.com [Tue, 29 Apr 2014 17:45:24 +0000 (17:45 +0000)]
Fix bit rot in zombie mode heap code.
<https://webkit.org/b/132342>

Reviewed by Mark Hahnenberg.

Need to enter a DelayedReleaseScope before doing a sweep.

* heap/Heap.cpp:
(JSC::Heap::zombifyDeadObjects):

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

5 years ago[iOS] Remove workaround for <rdar://problem/16578727>.
jer.noble@apple.com [Tue, 29 Apr 2014 17:42:18 +0000 (17:42 +0000)]
[iOS] Remove workaround for <rdar://problem/16578727>.
https://bugs.webkit.org/show_bug.cgi?id=132338

Reviewed by Darin Adler.

Now that <rdar://problem/16578727> is fixed, remove the workaround by replacing the
call to -_updatePlaybackControlsViewController with one to -layoutIfNeeded.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreen):

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

5 years agoScriptExecutionContext::Task should work well with C++11 lambdas
zandobersek@gmail.com [Tue, 29 Apr 2014 17:41:31 +0000 (17:41 +0000)]
ScriptExecutionContext::Task should work well with C++11 lambdas
https://bugs.webkit.org/show_bug.cgi?id=129795

Reviewed by Darin Adler.

Instead of having classes that subclass ScriptExecutionContext::Task and override
the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
which would contain the code currently kept in the performTask() methods.

This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
cleanup tasks, the Task object can be implicitly constructed by using the initializer list
constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
object in the std::function wrapper, along with a boolean member that indicates whether the
task is of cleanup nature.

* Modules/quota/StorageErrorCallback.cpp:
(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
(WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
* Modules/quota/StorageErrorCallback.h:
(WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
* Modules/webdatabase/Database.cpp:
(WebCore::Database::~Database):
(WebCore::Database::runTransaction):
(WebCore::Database::scheduleTransactionCallback):
(WebCore::DerefContextTask::create): Deleted.
(WebCore::DerefContextTask::performTask): Deleted.
(WebCore::DerefContextTask::isCleanupTask): Deleted.
(WebCore::DerefContextTask::DerefContextTask): Deleted.
(WebCore::callTransactionErrorCallback): Deleted.
(WebCore::DeliverPendingCallbackTask::create): Deleted.
(WebCore::DeliverPendingCallbackTask::performTask): Deleted.
(WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::openDatabase):
(WebCore::DatabaseCreationCallbackTask::create): Deleted.
(WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
(WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
* Modules/webdatabase/DatabaseSync.cpp:
(WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
(WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
(WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
(WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
(WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
(WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
(WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
(WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
(WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
(WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
(WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
* bindings/js/JSCallbackData.h:
(WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
(WebCore::DeleteCallbackDataTask::create): Deleted.
(WebCore::DeleteCallbackDataTask::performTask): Deleted.
(WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
* bindings/js/JSDOMGlobalObjectTask.cpp:
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
(WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
(WebCore::JSGlobalObjectTask::performTask): Deleted.
* bindings/js/JSDOMGlobalObjectTask.h:
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::~JSTestCallback):
(GenerateCallbackImplementation):
* dom/CrossThreadTask.h:
(WebCore::CrossThreadTask1::performTask):
(WebCore::CrossThreadTask2::performTask):
(WebCore::CrossThreadTask3::performTask):
(WebCore::CrossThreadTask4::performTask):
(WebCore::CrossThreadTask5::performTask):
(WebCore::CrossThreadTask6::performTask):
(WebCore::CrossThreadTask7::performTask):
(WebCore::CrossThreadTask8::performTask):
(WebCore::createCallbackTask):
(WebCore::CrossThreadTask1::create): Deleted.
(WebCore::CrossThreadTask2::create): Deleted.
(WebCore::CrossThreadTask3::create): Deleted.
(WebCore::CrossThreadTask4::create): Deleted.
(WebCore::CrossThreadTask5::create): Deleted.
(WebCore::CrossThreadTask6::create): Deleted.
(WebCore::CrossThreadTask7::create): Deleted.
(WebCore::CrossThreadTask8::create): Deleted.
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
(WebCore::Document::postTask):
(WebCore::Document::pendingTasksTimerFired):
(WebCore::PerformTaskContext::PerformTaskContext): Deleted.
(WebCore::Document::didReceiveTask): Deleted.
* dom/Document.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
(WebCore::ScriptExecutionContext::timerAlignmentInterval):
(WebCore::ProcessMessagesSoonTask::create): Deleted.
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
(WebCore::ScriptExecutionContext::Task::~Task): Deleted.
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::Task::Task):
(WebCore::ScriptExecutionContext::Task::performTask):
(WebCore::ScriptExecutionContext::Task::isCleanupTask):
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
(WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
* dom/StringCallback.cpp:
(WebCore::StringCallback::scheduleCallback):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::postListenerTask):
(WebCore::CallCacheListenerTask::create): Deleted.
(WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskToLoader):
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
(WebCore::DefaultSharedWorkerRepository::connectToWorker):
(WebCore::SharedWorkerConnectTask::create): Deleted.
(WebCore::SharedWorkerConnectTask::performTask): Deleted.
* workers/WorkerEventQueue.cpp:
(WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
(WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
(WebCore::WorkerEventQueue::EventDispatcher::dispatch):
(WebCore::WorkerEventQueue::enqueueEvent):
(WebCore::WorkerEventQueue::cancelEvent):
(WebCore::WorkerEventQueue::close):
* workers/WorkerEventQueue.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::close):
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
(WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
(WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
* workers/WorkerGlobalScope.h:
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskToLoader):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::WorkerMessagingProxy::workerThreadCreated):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
(WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
(WebCore::WorkerMessagingProxy::reportPendingActivity):
(WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
(WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
(WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
(WebCore::MessageWorkerTask::create): Deleted.
(WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
(WebCore::MessageWorkerTask::performTask): Deleted.
(WebCore::WorkerExceptionTask::create): Deleted.
(WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
(WebCore::WorkerExceptionTask::performTask): Deleted.
(WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
(WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
(WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
(WebCore::WorkerTerminateTask::create): Deleted.
(WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
(WebCore::WorkerTerminateTask::performTask): Deleted.
(WebCore::WorkerThreadActivityReportTask::create): Deleted.
(WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
(WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
(WebCore::PostMessageToPageInspectorTask::create): Deleted.
(WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
(WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
(WebCore::NotifyNetworkStateChangeTask::create): Deleted.
(WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
(WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
* workers/WorkerMessagingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::postTask):
(WebCore::WorkerRunLoop::postTaskAndTerminate):
(WebCore::WorkerRunLoop::postTaskForMode):
(WebCore::WorkerRunLoop::Task::create):
(WebCore::WorkerRunLoop::Task::performTask):
(WebCore::WorkerRunLoop::Task::Task):
* workers/WorkerRunLoop.h:
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):
(WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
(WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
(WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
(WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
(WebCore::WorkerThreadShutdownStartTask::create): Deleted.
(WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
(WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.

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

5 years agoREGRESSION (r167879): Heap-use-after-free in WebCore::RenderFlexibleBox
rego@igalia.com [Tue, 29 Apr 2014 17:34:34 +0000 (17:34 +0000)]
REGRESSION (r167879): Heap-use-after-free in WebCore::RenderFlexibleBox
https://bugs.webkit.org/show_bug.cgi?id=132337

Reviewed by Simon Fraser.

From Blink r154582 by <jchaffraix@chromium.org>

Source/WebCore:
This is a regression from the changes in OrderIterator. The issue is
that we don't invalidate our iterator when a child is removed. This
means that we could hold onto free'd memory until the next layout
when we will recompute the iterator.

The solution is simple: just clear the memory when we remove a child.

Note that RenderGrid is not impacted by this bug as we don't use the
iterator outside layout yet, but if we do it at some point the very same
problem will arise, so the same treatment was applied to the class.

Test: fast/flexbox/order-iterator-crash.html

* rendering/OrderIterator.cpp:
(WebCore::OrderIterator::invalidate): Clear m_children Vector.
* rendering/OrderIterator.h:
(WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Use
invalidate() method.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::removeChild): Invalidate m_orderIterator.
* rendering/RenderFlexibleBox.h: Add removeChild() signature.
* rendering/RenderGrid.cpp: Invalidate m_orderIterator.
(WebCore::RenderGrid::removeChild):
* rendering/RenderGrid.h: Add removeChild() header.

LayoutTests:
Add new layout test to check that removing a child doesn't cause a crash
in OrderIterator.

* fast/flexbox/order-iterator-crash-expected.txt: Added.
* fast/flexbox/order-iterator-crash.html: Added.

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

5 years agoiOS build fix after http://trac.webkit.org/changeset/167937.
enrica@apple.com [Tue, 29 Apr 2014 17:28:52 +0000 (17:28 +0000)]
iOS build fix after trac.webkit.org/changeset/167937.
Unreviewed.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::adjustButtonStyle):

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

5 years ago[iOS] Introduce -didNotHandleTapAsClickAtPoint: to WKUIDelegatePrivate
aestes@apple.com [Tue, 29 Apr 2014 16:56:36 +0000 (16:56 +0000)]
[iOS] Introduce -didNotHandleTapAsClickAtPoint: to WKUIDelegatePrivate
https://bugs.webkit.org/show_bug.cgi?id=132316

Reviewed by Darin Adler.

One WebKit2 client is interested to know if a tap was not handled by an element that responds to clicks.
Introduce a new, private WKUIDelegate method telling it that a tap at a location was not handled as a click on
an element.

* UIProcess/API/APIUIClient.h:
(API::UIClient::didNotHandleTapAsClick):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didNotHandleTapAsClick):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap): Sent Messages::WebPageProxy::DidNotHandleTapAsClick if the tap wasn't handled, no
node responded to the click event, or the responding node wasn't an element.

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

5 years agoREGRESSION (r167751): svn-create-patch is very slow
weinig@apple.com [Tue, 29 Apr 2014 16:50:26 +0000 (16:50 +0000)]
REGRESSION (r167751): svn-create-patch is very slow
https://bugs.webkit.org/show_bug.cgi?id=132300

Reviewed by Alexey Proskuryakov.

* Scripts/svn-create-patch:
Change default behavior of svn-create-patch to no longer run the style checker. It can still be run
by calling `svn-create-patch --style`.

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

5 years ago[CSS Shapes] off-by-one error in Shape::createRasterShape()
hmuller@adobe.com [Tue, 29 Apr 2014 16:40:30 +0000 (16:40 +0000)]
[CSS Shapes] off-by-one error in Shape::createRasterShape()
https://bugs.webkit.org/show_bug.cgi?id=132154

Reviewed by Bem Jones-Bey.

Source/WebCore:
This is a port of a patch for a bug that was reported by and fixed in Blink by
David Vest: https://codereview.chromium.org/237123002/.  Shape::createRasterShape()
now consistently reports "end-point exclusive" intervals. Before the patch
an entire row of pixels was above the shape-image-threshold, the interval's end
index was reported as image.width. Now it's image.width + 1, which is consistent
with the way the end index is reported if the last above threshold pixel is within
an image row.

Two existing tests were revised to account for this change.

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShape::getExcludedIntervals):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createRasterShape):

LayoutTests:
Change two tests that had incorrect X values to account for the off-by-one
in Shape::createRasterShape().

* fast/shapes/shape-outside-floats/shape-outside-insert-svg-shape.html:
* fast/shapes/shape-outside-floats/shape-outside-linear-gradient-expected.html:

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

5 years agoWrap CSS length conversion arguments in an object
bjonesbe@adobe.com [Tue, 29 Apr 2014 16:36:43 +0000 (16:36 +0000)]
Wrap CSS length conversion arguments in an object
https://bugs.webkit.org/show_bug.cgi?id=131552

Reviewed by Andreas Kling.

This patch introduces a class CSSToLengthConversionData to wrap the
data required to convert CSS lengths to Lengths. This simplifies the
plumbing that goes on whenever we need to resolve CSS lengths and
makes it easier to update the arguments needed for resolving these (in
particular adding a RenderView for resolving viewport units at style
recalc time; removing the computingFontSize bool also appears
possible).

Note that the zoom argument, which was previously a float in some
places and a double in others is now a float.

This is a port of a Blink patch by timloh@chromium.org.

No new tests, no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* css/BasicShapeFunctions.cpp:
(WebCore::convertToLength):
(WebCore::convertToLengthSize):
(WebCore::convertToCenterCoordinate):
(WebCore::cssValueToBasicShapeRadius):
(WebCore::basicShapeForValue):
* css/BasicShapeFunctions.h:
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::computeLengthPx):
(WebCore::determineCategory):
* css/CSSCalculationValue.h:
(WebCore::CSSCalcValue::createCalculationValue):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
(WebCore::positionFromValue):
(WebCore::CSSGradientValue::computeEndPoint):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::resolveRadius):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSGradientValue.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLength):
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* css/CSSPrimitiveValue.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertToLength):
* css/CSSToLengthConversionData.cpp: Added.
(WebCore::CSSToLengthConversionData::zoom):
* css/CSSToLengthConversionData.h: Added.
(WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
(WebCore::CSSToLengthConversionData::style):
(WebCore::CSSToLengthConversionData::rootStyle):
(WebCore::CSSToLengthConversionData::computingFontSize):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::CSSToStyleMap):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapFillXPosition):
(WebCore::CSSToStyleMap::mapFillYPosition):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
* css/CSSToStyleMap.h:
(WebCore::CSSToStyleMap::CSSToStyleMap): Deleted.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::convertToLength):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyBorderRadius::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
(WebCore::ApplyPropertyWordSpacing::applyValue):
(WebCore::ApplyPropertyPageSize::mmLength):
(WebCore::ApplyPropertyPageSize::inchLength):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/MediaQueryEvaluator.cpp:
(WebCore::colorMediaFeatureEval):
(WebCore::color_indexMediaFeatureEval):
(WebCore::monochromeMediaFeatureEval):
(WebCore::orientationMediaFeatureEval):
(WebCore::aspect_ratioMediaFeatureEval):
(WebCore::device_aspect_ratioMediaFeatureEval):
(WebCore::device_pixel_ratioMediaFeatureEval):
(WebCore::resolutionMediaFeatureEval):
(WebCore::gridMediaFeatureEval):
(WebCore::computeLength):
(WebCore::device_heightMediaFeatureEval):
(WebCore::device_widthMediaFeatureEval):
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):
(WebCore::min_colorMediaFeatureEval):
(WebCore::max_colorMediaFeatureEval):
(WebCore::min_color_indexMediaFeatureEval):
(WebCore::max_color_indexMediaFeatureEval):
(WebCore::min_monochromeMediaFeatureEval):
(WebCore::max_monochromeMediaFeatureEval):
(WebCore::min_aspect_ratioMediaFeatureEval):
(WebCore::max_aspect_ratioMediaFeatureEval):
(WebCore::min_device_aspect_ratioMediaFeatureEval):
(WebCore::max_device_aspect_ratioMediaFeatureEval):
(WebCore::min_device_pixel_ratioMediaFeatureEval):
(WebCore::max_device_pixel_ratioMediaFeatureEval):
(WebCore::min_heightMediaFeatureEval):
(WebCore::max_heightMediaFeatureEval):
(WebCore::min_widthMediaFeatureEval):
(WebCore::max_widthMediaFeatureEval):
(WebCore::min_device_heightMediaFeatureEval):
(WebCore::max_device_heightMediaFeatureEval):
(WebCore::min_device_widthMediaFeatureEval):
(WebCore::max_device_widthMediaFeatureEval):
(WebCore::min_resolutionMediaFeatureEval):
(WebCore::max_resolutionMediaFeatureEval):
(WebCore::animationMediaFeatureEval):
(WebCore::transitionMediaFeatureEval):
(WebCore::transform_2dMediaFeatureEval):
(WebCore::transform_3dMediaFeatureEval):
(WebCore::view_modeMediaFeatureEval):
(WebCore::video_playable_inlineMediaFeatureEval):
(WebCore::hoverMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
(WebCore::MediaQueryEvaluator::eval):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::convertToIntLength):
(WebCore::StyleResolver::convertToFloatLength):
(WebCore::createGridTrackBreadth):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::setStyle):
(WebCore::StyleResolver::State::cssToLengthConversionData):
* css/TransformFunctions.cpp:
(WebCore::convertToFloatLength):
(WebCore::transformsForValue):
* css/TransformFunctions.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* rendering/RenderThemeIOS.mm:
(WebCore::applyCommonButtonPaddingToStyle):
(WebCore::RenderThemeIOS::adjustButtonStyle):

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

5 years ago[CSS Shapes] complex calc args for inset round vanish
zoltan@webkit.org [Tue, 29 Apr 2014 16:17:09 +0000 (16:17 +0000)]
[CSS Shapes] complex calc args for inset round vanish
https://bugs.webkit.org/show_bug.cgi?id=132293

Reviewed by Bem Jones-Bey.

Source/WebCore:
In order to use calc in the rounded parameters for inset shapes, we need
to pass RenderStyle for the value creation as we did for the width arguments.
Without taking RenderStyle into account, we hit an assert not reache
in CSSPrimitiveValue::init in the debug builds.

I've added new parsing test.

* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::init):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::create):
* css/CSSValuePool.h:
(WebCore::CSSValuePool::createValue):

LayoutTests:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:

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

5 years ago[CSS Shapes] complex calc values for shape-margin return null for computed style
zoltan@webkit.org [Tue, 29 Apr 2014 16:16:11 +0000 (16:16 +0000)]
[CSS Shapes] complex calc values for shape-margin return null for computed style
https://bugs.webkit.org/show_bug.cgi?id=132313

Reviewed by Bem Jones-Bey.

Source/WebCore:
We need to pass RenderStyle* to the cssValuePool when parsing
shape-margin in order to use calc() as a parameter.

I've added the new test case to parsing-shape-margin.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):

LayoutTests:
* fast/shapes/parsing/parsing-shape-margin.html:

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

5 years agoAX: Row span info is wrong for table cells when a footer section is placed above...
cfleizach@apple.com [Tue, 29 Apr 2014 16:15:14 +0000 (16:15 +0000)]
AX: Row span info is wrong for table cells when a footer section is placed above a body section
https://bugs.webkit.org/show_bug.cgi?id=131832

Reviewed by Mario Sanchez Prada.

Source/WebCore:
If a <footer> section is placed before the body, it renders AX row information and order incorrectly.
This also affects ARIA tables because they add their children by looking at renderer children, instead
interrogating the RenderTable directly.

Test: accessibility/table-with-footer-section-above-body.html

* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
(WebCore::AccessibilityTable::addChildrenFromSection):
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::rowIndexRange):
(WebCore::AccessibilityTableCell::columnIndexRange):

LayoutTests:
* accessibility/table-with-footer-section-above-body-expected.txt: Added.
* accessibility/table-with-footer-section-above-body.html: Added.

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

5 years agoAX: SpeechSynthesisUtterance cannot addEventListener
cfleizach@apple.com [Tue, 29 Apr 2014 16:04:57 +0000 (16:04 +0000)]
AX: SpeechSynthesisUtterance cannot addEventListener
https://bugs.webkit.org/show_bug.cgi?id=132321

Reviewed by Mario Sanchez Prada.

Source/WebCore:
Modified an existing test (speech-synthesis-speak.html) to use addEventTarget.

* Modules/speech/SpeechSynthesisUtterance.idl:

LayoutTests:
* platform/mac/fast/speechsynthesis/speech-synthesis-speak.html:

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

5 years agoGenerate Eclipse project + ninja build for GTK+ if Eclipse in available in the PATH
commit-queue@webkit.org [Tue, 29 Apr 2014 15:17:08 +0000 (15:17 +0000)]
Generate Eclipse project + ninja build for GTK+ if Eclipse in available in the PATH
https://bugs.webkit.org/show_bug.cgi?id=132190

Patch by Enrique Ocaña González <eocanha@igalia.com> on 2014-04-29
Reviewed by Gustavo Noronha Silva.

* Scripts/webkitdirs.pm:
(canUseEclipse): Test if Eclipse is in the path. This is the same method used to test
    if ninja is in the path.
(generateBuildSystemFromCMakeProject): Use the eclipse generator if possible, fallback
    to the previous ninja generator if not.

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