WebKit-https.git
6 years agoREGRESSION(r170676): [GTK] UI process crashes when the Web Process crashes
carlosgc@webkit.org [Thu, 3 Jul 2014 07:56:28 +0000 (07:56 +0000)]
REGRESSION(r170676): [GTK] UI process crashes when the Web Process crashes
https://bugs.webkit.org/show_bug.cgi?id=134541

Reviewed by Gyuyoung Kim.

It happens when attaching a new web process, because it tries to
encode a null SessionState.

* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::encodeLegacySessionState): Return an empty API::Data
object instead of nullptr.
(WebKit::encodeLegacySessionHistoryEntryData): Ditto.

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

6 years agoREGRESSION(r170743): [GTK] [EFL] Build broken.
carlosgc@webkit.org [Thu, 3 Jul 2014 07:53:23 +0000 (07:53 +0000)]
REGRESSION(r170743): [GTK] [EFL] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134585

Reviewed by Philippe Normand.

Add ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC) guards where needed.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):

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

6 years agoRemoving an element with CSS -webkit-overflow-scrolling: touch breaks
jhoneycutt@apple.com [Thu, 3 Jul 2014 04:25:27 +0000 (04:25 +0000)]
Removing an element with CSS -webkit-overflow-scrolling: touch breaks
subsequent touch events

<https://bugs.webkit.org/show_bug.cgi?id=134584>
<rdar://problem/17202021>

This issue is caused by the order of teardown for RenderLayers.

RenderLayer clears its m_backing in its destructor, calling the
RenderLayerBacking destructor. The RenderLayerBacking destructor calls
RenderLayerCompositor::willRemoveScrollingLayer(), which tries to
access the RenderLayer's backing that has already been cleared. This
causes us to skip the call to ChromeClient::removeScrollingLayer(),
resulting in a stale view that can block touch events.

Reviewed by Simon Fraser.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateScrollingLayers):
When calling willRemoveScrollingLayerWithBacking(), pass both the layer
and the RenderLayerBacking.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
Renamed. Use the passed RenderLayerBacking, as the RenderLayer's
backing might have already been cleared.
(WebCore::RenderLayerCompositor::willRemoveScrollingLayer): Deleted.

* rendering/RenderLayerCompositor.h:
Renamed willRemoveScrollingLayer() to
willRemoveScrollingLayerWithBacking() and added a parameter.

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

6 years agoTools: [GTK] Unreviewed gardening.
commit-queue@webkit.org [Thu, 3 Jul 2014 04:03:32 +0000 (04:03 +0000)]
Tools: [GTK] Unreviewed gardening.

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

* Scripts/run-gtk-tests:
(TestRunner): Report and mark flaky test WebKit2Gtk/TestCookieManager:persistent-storage

LayoutTests: Unreviewed gardening.

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

* platform/gtk/TestExpectations: Report and mark several flaky tests.
* platform/gtk/fast/text/indic-expected.txt: Added. Add baseline for GTK.
* platform/mac-wk2/TestExpectations: Report and mark flaky test http/tests/cache/iframe-304-crash.html.

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

6 years ago[iOS][WK2] Make is safe/fast to use the animated resize API without resizing anything
benjamin@webkit.org [Thu, 3 Jul 2014 03:52:21 +0000 (03:52 +0000)]
[iOS][WK2] Make is safe/fast to use the animated resize API without resizing anything
https://bugs.webkit.org/show_bug.cgi?id=134570

Reviewed by Enrica Casucci.

Today, if someone calls _beginAnimatedResizeWithUpdates-_endAnimatedResize, it is always a very heavy process
forcing a relayout and can cause synchronous operations.

We should not force the caller of the API to maintain their own state tracking, we should do that for them.

With this patch, we track everything we need for a resize and only do the heavy lifting if anything has actually changed.

* UIProcess/API/Cocoa/WKWebView.mm:
(activeMinimumLayoutSize):
(activeMinimumLayoutSizeForMinimalUI):
(activeMaximumUnobscuredSize):
(activeOrientation):
This code is used in both _didRelaunchProcess and _beginAnimatedResizeWithUpdates. It is moved to static functions
to avoid having it in two places.

(-[WKWebView _didRelaunchProcess]):

(-[WKWebView _beginAnimatedResizeWithUpdates:]):
The updates now goes like this:
1) Set _isAnimatingResize to prevent the undesired side effects updateBlock() if we really need to resize.
2) Get all the original values before calling the update block.
3) Call the update block.
4a) If nothing useful for resize has changed, reset _isAnimatingResize to false.
    We also need to update the visible content rect because the update block may have changed something unrelated
    to the view size (scale, scroll position, etc).
4b) If we really need to resize, proceed as usual.

(-[WKWebView _endAnimatedResize]):
With the changes in _beginAnimatedResizeWithUpdates:, _isAnimatingResize is only set for real cases of animated resize,
bail out early if that flag isn't set.

The remaining code is unchanged, it is just not indented due to the removal of the if() branch.

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

6 years agoImprove handling of primary offscreen plugins.
roger_fong@apple.com [Thu, 3 Jul 2014 03:31:05 +0000 (03:31 +0000)]
Improve handling of primary offscreen plugins.
https://bugs.webkit.org/show_bug.cgi?id=134528.
<rdar://problem/17471864>

Reviewed by Dean Jackson.

* WebProcess/Plugins/PluginView.cpp:
Determine whether or not the plugin starts offscreen when the plugin is initialized.
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Use the PluginProcessTypeNormal for offscreen plugins that are potentially primary plugins.

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

6 years agoClean up unused EFL buildbot information in BuildSlaveSupport and TestResultServer
gyuyoung.kim@samsung.com [Thu, 3 Jul 2014 02:31:53 +0000 (02:31 +0000)]
Clean up unused EFL buildbot information in BuildSlaveSupport and TestResultServer
https://bugs.webkit.org/show_bug.cgi?id=134581

Reviewed by Tim Horton.

Should be removed unused EFL bot info.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWS.js:
(EWS):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* TestResultServer/static-dashboards/builders.jsonp:
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(test):

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

6 years agoREGRESSION(WK2): Undo does not work in text fields in Safari.
enrica@apple.com [Thu, 3 Jul 2014 00:59:30 +0000 (00:59 +0000)]
REGRESSION(WK2): Undo does not work in text fields in Safari.
https://bugs.webkit.org/show_bug.cgi?id=134572
<rdar://problem/17542238>

Reviewed by Benjamin Poulain.

This patch adds for iOS the same implementation we have already for OS X.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(-[WKEditCommandObjC initWithWebEditCommandProxy:]):
(-[WKEditCommandObjC command]):
(-[WKEditorUndoTargetObjC undoEditing:]):
(-[WKEditorUndoTargetObjC redoEditing:]):
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):

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

6 years agoProcessAssertion should also prevent UIApp suspension
barraclough@apple.com [Thu, 3 Jul 2014 00:55:37 +0000 (00:55 +0000)]
ProcessAssertion should also prevent UIApp suspension
https://bugs.webkit.org/show_bug.cgi?id=134563

Reviewed by Dan Bernstein.

If the application suspends then the child processes will, too.
Use beginBackgroundTaskWithName:expirationHandler: to request that the application remain runnable
while waiting for background tasks to complete.

* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::~ProcessAssertion):
    - Added destructor.
* UIProcess/ProcessAssertion.h:
    - Added destructor.
* UIProcess/ios/ProcessAssertionIOS.mm:
(+[WKProcessAssertionBackgroundTaskManager shared]):
    - singleton WKProcessAssertionBackgroundTaskManager.
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager dealloc]):
    - register/remove notification handlers.
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
    - if we need to be runnable make sure we're holding a BackgroundTask, if not release it.
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]):
    - detect when the app enters/leaves foreground; calls to _updateBackgroundTask.
(-[WKProcessAssertionBackgroundTaskManager incrementNeedsToRunInBackgroundCount]):
(-[WKProcessAssertionBackgroundTaskManager decrementNeedsToRunInBackgroundCount]):
    - interface to update the count; calls to _updateBackgroundTask.
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):
    - count ProcessAssertions in and out of existance.
(WebKit::ProcessAssertion::setState):
    - count when the state changes.

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

6 years agoEnsure that the WebKit bundle version in the user agent string continues to match...
mrowe@apple.com [Wed, 2 Jul 2014 23:02:45 +0000 (23:02 +0000)]
Ensure that the WebKit bundle version in the user agent string continues to match the current format.
<https://webkit.org/b/134524> / <rdar://problem/17447771>

Reviewed by Simon Fraser.

* page/cocoa/UserAgent.h:
* page/cocoa/UserAgent.mm:
(WebCore::userVisibleWebKitBundleVersionFromFullVersion): Updated to take an NSString now that it's internal
to the file.
(WebCore::userAgentBundleVersionFromFullVersionString): Limit the bundle version included in the user agent
string to three components.
* page/ios/UserAgentIOS.mm:
(WebCore::standardUserAgentWithApplicationName): Update to call userAgentBundleVersionFromFullVersionString.
* page/mac/UserAgentMac.mm:
(WebCore::standardUserAgentWithApplicationName): Ditto.

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

6 years ago<https://webkit.org/b/134522> Remove duplication in code that prepares the user agent...
mrowe@apple.com [Wed, 2 Jul 2014 23:02:43 +0000 (23:02 +0000)]
<https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS

Reviewed by Simon Fraser.

Source/WebCore:
* page/cocoa/UserAgent.h:
* page/cocoa/UserAgent.mm:
(WebCore::userVisibleWebKitBundleVersionFromFullVersion): Moved from WebKit2.
* page/ios/UserAgentIOS.mm:
(WebCore::standardUserAgentWithApplicationName): Pass the WebKit bundle version through userVisibleWebKitBundleVersionFromFullVersion
before including it in the user agent string.
* page/mac/UserAgentMac.mm:
(WebCore::standardUserAgentWithApplicationName): Ditto.

Source/WebKit/mac:
* WebView/WebView.mm:
(webKitBundleVersionString): Return the entire CFBundleVersion now that WebCore handles formatting it.
(+[WebView _standardUserAgentWithApplicationName:]):

Source/WebKit2:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::webKitBundleVersionString): Return the entire CFBundleVersion now that WebCore handles formatting it.
(WebKit::WebPageProxy::standardUserAgent):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::webKitBundleVersionString): Ditto.
(WebKit::WebPageProxy::standardUserAgent):

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

6 years ago Restrict network process sandbox
oliver@apple.com [Wed, 2 Jul 2014 22:54:32 +0000 (22:54 +0000)]
   Restrict network process sandbox
       https://bugs.webkit.org/show_bug.cgi?id=134360

       Reviewed by Sam Weinig.

       Add more restrictions to the network process sandbox.

       * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
       (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
 Always use the cache directory provided in the initialization parameters,
 and make sure we consume the cookie directory extension.
       * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
 Make the sandbox profile much more restrictive.
       * Shared/Network/NetworkProcessCreationParameters.cpp:
       (WebKit::NetworkProcessCreationParameters::encode):
       (WebKit::NetworkProcessCreationParameters::decode):
       * Shared/Network/NetworkProcessCreationParameters.h:
 The network process now requires an extension to access
 its cookie storage.
       * Shared/mac/SandboxUtilities.cpp:
       (WebKit::pathForProcessContainer):
       * Shared/mac/SandboxUtilities.h:
 We need to be able to get hold of our container so
 that we can get the correct cookie storage directory.
       * UIProcess/WebContext.cpp:
       (WebKit::WebContext::ensureNetworkProcess):
 We have to pass in the an extension for the cookie storage directory when
       initalising the network process
       * UIProcess/mac/WebContextMac.mm:
       (WebKit::WebContext::platformDefaultCookieStorageDirectory):
 Make sure we provide the correct location on IOS
       * WebProcess/cocoa/WebProcessCocoa.mm:
       (WebKit::WebProcess::platformInitializeWebProcess):
 Consume the cookie storage extension

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

6 years agoURTBF after r170725.
ossy@webkit.org [Wed, 2 Jul 2014 22:52:41 +0000 (22:52 +0000)]
URTBF after r170725.

* CMakeLists.txt: Removed Shared/LegacySessionState.cpp.

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

6 years agoURTBF after r170719 for !CF platforms.
ossy@webkit.org [Wed, 2 Jul 2014 22:52:21 +0000 (22:52 +0000)]
URTBF after r170719 for !CF platforms.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sessionStateData): Deleted.
(WebKit::WebPageProxy::restoreFromSessionStateData): Deleted.

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

6 years ago<https://webkit.org/b/134521> iOS should use shared code to determine the system...
mrowe@apple.com [Wed, 2 Jul 2014 22:38:41 +0000 (22:38 +0000)]
<https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version

Reviewed by Simon Fraser.

Source/WebCore:
* WebCore.xcodeproj/project.pbxproj: Add the new files, and sort the groups they're in.
* page/cocoa/UserAgent.h: Copied from Source/WebCore/page/mac/UserAgent.h.
* page/cocoa/UserAgent.mm: Renamed from Source/WebCore/page/mac/UserAgent.h.
Move systemMarketingVersionForUserAgentString to a location where it can be shared between
Mac and iOS.
* page/ios/UserAgentIOS.mm:
(WebCore::standardUserAgentWithApplicationName): Switch to systemMarketingVersionForUserAgentString.
* page/mac/UserAgentMac.mm:
* platform/cocoa/SystemVersion.h: Renamed from Source/WebCore/platform/mac/SystemVersionMac.h.
* platform/cocoa/SystemVersion.mm: Renamed from Source/WebCore/platform/mac/SystemVersionMac.mm.
Move to a location that makes it clear this is shared between Mac and iOS. Enable the modern Mac
codepath for iOS as well.

Source/WebKit2:
* Shared/ios/ChildProcessIOS.mm: Update #import.
* Shared/mac/ChildProcessMac.mm: Ditto.

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

6 years agoRemove keyed coding from FormData
andersca@apple.com [Wed, 2 Jul 2014 22:12:32 +0000 (22:12 +0000)]
Remove keyed coding from FormData
https://bugs.webkit.org/show_bug.cgi?id=134565

Reviewed by Tim Horton.

* platform/network/FormData.cpp:
(WebCore::encodeElement): Deleted.
(WebCore::decodeElement): Deleted.
(WebCore::FormData::encode): Deleted.
(WebCore::FormData::decode): Deleted.
* platform/network/FormData.h:

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

6 years agoGet rid of the HistoryItem encoding/decoding in WebCore
andersca@apple.com [Wed, 2 Jul 2014 22:04:49 +0000 (22:04 +0000)]
Get rid of the HistoryItem encoding/decoding in WebCore
https://bugs.webkit.org/show_bug.cgi?id=134564

Reviewed by Beth Dakin.

* WebCore.exp.in:
* history/HistoryItem.cpp:
(WebCore::HistoryItem::encodeBackForwardTree): Deleted.
(WebCore::encodeRect): Deleted.
(WebCore::encodeSize): Deleted.
(WebCore::HistoryItem::encodeBackForwardTreeNode): Deleted.
(WebCore::DecodeRecursionStackElement::DecodeRecursionStackElement): Deleted.
(WebCore::decodeRect): Deleted.
(WebCore::decodeSize): Deleted.
(WebCore::HistoryItem::decodeBackForwardTree): Deleted.
* history/HistoryItem.h:

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

6 years agoRip out more dead code
andersca@apple.com [Wed, 2 Jul 2014 21:49:33 +0000 (21:49 +0000)]
Rip out more dead code
https://bugs.webkit.org/show_bug.cgi?id=134562

Reviewed by Andreas Kling.

* Shared/LegacySessionState.cpp: Removed.
* Shared/LegacySessionState.h: Removed.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem): Deleted.
(WebKit::WebBackForwardListItem::backForwardData): Deleted.
(WebKit::WebBackForwardListItem::setBackForwardData): Deleted.
(WebKit::WebBackForwardListItem::encode): Deleted.
(WebKit::WebBackForwardListItem::decode): Deleted.
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create): Deleted.
(WebKit::WebBackForwardListItem::setOriginalURL): Deleted.
(WebKit::WebBackForwardListItem::setURL): Deleted.
(WebKit::WebBackForwardListItem::setTitle): Deleted.
* UIProcess/WebPageProxy.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:

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

6 years agoRestoreSession should take a vector of BackForwardListItemStates
andersca@apple.com [Wed, 2 Jul 2014 21:31:23 +0000 (21:31 +0000)]
RestoreSession should take a vector of BackForwardListItemStates
https://bugs.webkit.org/show_bug.cgi?id=134558

Reviewed by Tim Horton.

* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::itemStates):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::restoreSession):
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoStore the back forward list item id inside BackForwardListItemState
andersca@apple.com [Wed, 2 Jul 2014 21:13:23 +0000 (21:13 +0000)]
Store the back forward list item id inside BackForwardListItemState
https://bugs.webkit.org/show_bug.cgi?id=134557

Reviewed by Tim Horton.

* Shared/SessionState.cpp:
(WebKit::BackForwardListItemState::encode):
(WebKit::BackForwardListItemState::decode):
* Shared/SessionState.h:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::itemID):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):

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

6 years agoUnreviewed. EFL and GTK build fix after r170716.
rego@igalia.com [Wed, 2 Jul 2014 21:05:14 +0000 (21:05 +0000)]
Unreviewed. EFL and GTK build fix after r170716.

* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::decodeLegacySessionState): Update method signature.

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

6 years agoBegin ripping out the old session state code
andersca@apple.com [Wed, 2 Jul 2014 20:43:17 +0000 (20:43 +0000)]
Begin ripping out the old session state code
https://bugs.webkit.org/show_bug.cgi?id=134556

Reviewed by Andreas Kling.

* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.h:
* UIProcess/cf/WebBackForwardListCF.cpp: Removed.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData): Deleted.
(WebKit::WebPageProxy::restoreFromSessionStateData): Deleted.
* WebKit2.xcodeproj/project.pbxproj:

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

6 years ago[WebGL] Fix crash when glsl expressions are too complex.
achristensen@apple.com [Wed, 2 Jul 2014 20:29:42 +0000 (20:29 +0000)]
[WebGL] Fix crash when glsl expressions are too complex.
https://bugs.webkit.org/show_bug.cgi?id=134554
<rdar://problem/17540462>

Reviewed by Dean Jackson.

This fixes the Khronos test conformance/glsl/bugs/long-expressions-should-not-crash.html.

* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
Add SH_LIMIT_EXPRESSION_COMPLEXITY to the ANGLE compile options.

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

6 years agoREGRESSION(160908): vube.com video won't play after going into and out of fullscreen
antti@apple.com [Wed, 2 Jul 2014 20:22:04 +0000 (20:22 +0000)]
REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=134489

Reviewed by Zalan Bujtas.

* fullscreen/full-screen-plugin-expected.txt: Added.
* fullscreen/full-screen-plugin.html: Added.

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

6 years agoUse legacy state coding directly in WKWebView
andersca@apple.com [Wed, 2 Jul 2014 20:19:06 +0000 (20:19 +0000)]
Use legacy state coding directly in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134553

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCreateFromData):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionStateData]):
(-[WKWebView _sessionState]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreFromSessionState:]):
(releaseNSData): Deleted.
* UIProcess/LegacySessionStateCoding.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::restoreFromState): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionState):

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

6 years agoUnreviewed. Moved self to reviewers list.
achristensen@apple.com [Wed, 2 Jul 2014 19:55:22 +0000 (19:55 +0000)]
Unreviewed.  Moved self to reviewers list.

* Scripts/webkitpy/common/config/contributors.json:
Moved self to reviewers list, added WebGL to expertise.

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

6 years agoWebCore JIT: rename registerCount to something less generic and add new types for...
benjamin@webkit.org [Wed, 2 Jul 2014 19:48:16 +0000 (19:48 +0000)]
WebCore JIT: rename registerCount to something less generic and add new types for lists of registers and lists of stack references
https://bugs.webkit.org/show_bug.cgi?id=134552

Reviewed by Alex Christensen.

Little cleanup:
-The name registerCount was a little too generic. Rename that to "maximumRegisterCount" to avoid confusion.
-Add a new type RegisterVector for any vector holding registers. This is just to avoid repeating the inline
 size everywhere, no functional change.
-Same idea for the stack: welcome StackReferenceVector!

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
Remove the appendVector here. It was unnecessarily cautious, StackAllocator already protect us
from mistakes.

* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::allocatedRegisters):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Changing from the count of "calleeSavedRegisterCount" to "maximumRegisterCount" will cause
calleeSavedRegisterStackReferences to always overallocate.
The code generator is never on the heap, so that should not change anything.

* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):

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

6 years agoiOS build fix after http://trac.webkit.org/changeset/170697.
enrica@apple.com [Wed, 2 Jul 2014 19:40:52 +0000 (19:40 +0000)]
iOS build fix after trac.webkit.org/changeset/170697.

Unreviewed.

* wtf/Deque.h:

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

6 years agoSkip fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image...
dino@apple.com [Wed, 2 Jul 2014 18:30:03 +0000 (18:30 +0000)]
Skip fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html
on Mountain Lion. It doesn't support such large textures (or at least our
bots don't).

* platform/mac/TestExpectations:

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

6 years agoAdd -[WKWebView _sessionStateData] and -[WKWebView _restoreFromSessionStateData:]
andersca@apple.com [Wed, 2 Jul 2014 17:40:38 +0000 (17:40 +0000)]
Add -[WKWebView _sessionStateData] and -[WKWebView _restoreFromSessionStateData:]
https://bugs.webkit.org/show_bug.cgi?id=134549

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
(-[WKWebView _sessionStateData]):
(-[WKWebView _restoreFromSessionState:]):
(-[WKWebView _restoreFromSessionStateData:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

6 years agoRemove some code only needed for versions of Safari that are no longer supported
mitz@apple.com [Wed, 2 Jul 2014 17:33:32 +0000 (17:33 +0000)]
Remove some code only needed for versions of Safari that are no longer supported
https://bugs.webkit.org/show_bug.cgi?id=134537

Reviewed by Anders Carlsson.

Source/WebCore:
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLInputElement _rectOnScreen]): Deleted.
(-[DOMHTMLInputElement _replaceCharactersInRange:withString:selectingFromIndex:]): Deleted.
(-[DOMHTMLInputElement _selectedRange]): Deleted.
* bindings/objc/DOMPrivate.h:
* editing/EditorCommand.cpp:
(WebCore::createCommandMap):

Source/WebKit/mac:
* History/WebHistoryItem.mm:
* Misc/WebKitVersionChecks.h:
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin domain]): Deleted.
* WebInspector/WebInspector.mm:
(-[WebInspector showTimeline:]): Deleted.
(+[WebInspector webInspector]): Deleted.
(-[WebInspector setWebFrame:]): Deleted.
(-[WebInspector window]): Deleted.
(-[WebInspector showWindow:]): Deleted.
* WebView/WebFrame.mm:
(-[WebFrame reload]):
* WebView/WebPDFView.mm:
(-[WebPDFView menuForEvent:]):
(-[WebPDFView _anyPDFTagsFoundInMenu:]): Deleted.
* WebView/WebView.mm:
(-[WebView _initWithFrame:frameName:groupName:]):
(-[WebView _preferencesChanged:]):
(-[WebView initWithFrame:frameName:groupName:]):
(-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]): Deleted.
(+[WebView _setAlwaysUseATSU:]): Deleted.
(-[WebView _needsUnrestrictedGetMatchedCSSRules]): Deleted.
* WebView/WebViewPrivate.h:

Source/WTF:
* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

6 years ago[GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enable...
carlosgc@webkit.org [Wed, 2 Jul 2014 16:02:55 +0000 (16:02 +0000)]
[GStreamer] MediaPlayerPrivateGStreamer.cpp fails to build when VIDEO_TRACK is enabled and using GSTREAMER_MPEGTS
https://bugs.webkit.org/show_bug.cgi?id=134548

Reviewed by Philippe Normand.

Include AtomicStringHash.h when ENABLE(VIDEO_TRACK) && USE(GSTREAMER_MPEGTS)
since it's used by HashMap<AtomicString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>>

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

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

6 years ago[GTK] Unstable headers should include webkitdomdefines-unstable.h
carlosgc@webkit.org [Wed, 2 Jul 2014 15:24:31 +0000 (15:24 +0000)]
[GTK] Unstable headers should include webkitdomdefines-unstable.h
https://bugs.webkit.org/show_bug.cgi?id=134540

Reviewed by Martin Robinson.

Instead of the class header that can only be included from webkitdom.h.

* bindings/scripts/CodeGeneratorGObject.pm:
(WriteData):

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

6 years ago[GTK] WebKitVersion.h should be shared between UI and Web Process APIs
carlosgc@webkit.org [Wed, 2 Jul 2014 15:22:44 +0000 (15:22 +0000)]
[GTK] WebKitVersion.h should be shared between UI and Web Process APIs
https://bugs.webkit.org/show_bug.cgi?id=134538

Reviewed by Martin Robinson.

To be able to check current version from web extensions too.

* UIProcess/API/gtk/WebKitVersion.h.in: Allow to include WebKitVersion.h also from webkit-web-extension.h.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitVersion.h.

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

6 years ago[GTK] Make dist only works when run from the source directory
carlosgc@webkit.org [Wed, 2 Jul 2014 15:13:33 +0000 (15:13 +0000)]
[GTK] Make dist only works when run from the source directory
https://bugs.webkit.org/show_bug.cgi?id=134543

Reviewed by Martin Robinson.

Since the paths in the manifest are relative to the source dir,
and the script expects the current working directory to be the
source directory, resolve all passed in relative paths while
parsing the arguments and then change the current working
directory.

* gtk/make-dist.py:

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

6 years ago[GTK] make dist is broken
carlosgc@webkit.org [Wed, 2 Jul 2014 15:11:41 +0000 (15:11 +0000)]
[GTK] make dist is broken
https://bugs.webkit.org/show_bug.cgi?id=134542

Reviewed by Martin Robinson.

.:
* Source/PlatformGTK.cmake: Remove ENABLE_WEBKIT check.

Tools:
* gtk/make-dist.py: Rename command line options to match what cmake uses.
* gtk/manifest.txt: Remove WebKit1 references and add WebKitDOM documentation.

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

6 years agoREGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html...
mario.prada@samsung.com [Wed, 2 Jul 2014 09:52:38 +0000 (09:52 +0000)]
REGRESSION(r170008): [GTK] Layout Tests fast/forms/option-constructor-selected.html and fast/forms/select-live-pseudo-selectors.html crash.
https://bugs.webkit.org/show_bug.cgi?id=134399

Reviewed by Chris Fleizach.

Source/WebCore:
Check that the value of optionIndex passed as a parameter is valid
before calling didUpdateActiveOption() over the item of the menu
list, to prevent crashes in platforms where renderers (and therefore
accessibility objects) might not be created for items at the time
of calling AccessibilityMenuList::didUpdateActiveOption().

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption): Added check.

LayoutTests:
Removing Crash expectations for two layout tests.

* platform/gtk/TestExpectations: Updated.

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

6 years ago[GTK] WebKitWebView::create should receive information about the navigation action
carlosgc@webkit.org [Wed, 2 Jul 2014 07:19:46 +0000 (07:19 +0000)]
[GTK] WebKitWebView::create should receive information about the navigation action
https://bugs.webkit.org/show_bug.cgi?id=133680

Reviewed by Martin Robinson.

Source/WebKit2:
Add WebKitNavigationAction boxed type representing a navigation
action to be passed as parameter of WebKitWebView::create
signal. In the future it could be also for the
WebKitNavigationPolicyDecision class. The class contains
information about a navigation action like the navigation type,
the request, the mouse button and key modifiers and whether it was
started by a user gesture. This information is needed to be able
to implement a proper popup blocker. Since all that information is
not provided by the C API, we have switched the UI client to use a
custom client derived from API::UIClient. This also avoids a lot
of toAPI -> toImpl unneeded conversions.

* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/WebKitHitTestResult.cpp:
(webkitHitTestResultCreate): Use a WebHitTestResult::Data const
reference instead of a pointer to a WebHitTestResult.
(webkitHitTestResultCompare): Ditto.
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitNavigationAction.cpp: Added.
(webkitNavigationActionCreate): Create a WebKitNavigationAction
for the given ResourceRequest and NavigationActionData.
(webkit_navigation_action_copy):
(webkit_navigation_action_free):
(webkit_navigation_action_get_navigation_type):
(webkit_navigation_action_get_mouse_button):
(webkit_navigation_action_get_modifiers):
(webkit_navigation_action_get_request):
(webkit_navigation_action_is_user_gesture):
* UIProcess/API/gtk/WebKitNavigationAction.h: Added.
* UIProcess/API/gtk/WebKitNavigationActionPrivate.h: Added.
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toGdkModifiers):
(toWebKitNavigationType):
(toWebKitMouseButton):
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitUIClient.cpp:
(UIClient::UIClient): Implement the UIClient using a custom class.
(attachUIClientToView): Set the UIClient directly to the WebPageProxy.
(createNewPage): Deleted.
(showPage): Deleted.
(closePage): Deleted.
(runJavaScriptAlert): Deleted.
(runJavaScriptConfirm): Deleted.
(runJavaScriptPrompt): Deleted.
(toolbarsAreVisible): Deleted.
(setToolbarsAreVisible): Deleted.
(menuBarIsVisible): Deleted.
(setMenuBarIsVisible): Deleted.
(statusBarIsVisible): Deleted.
(setStatusBarIsVisible): Deleted.
(isResizable): Deleted.
(setIsResizable): Deleted.
(getWindowFrame): Deleted.
(setWindowFrame): Deleted.
(mouseDidMoveOverElement): Deleted.
(printFrame): Deleted.
(runOpenPanel): Deleted.
(decidePolicyForGeolocationPermissionRequest): Deleted.
(runModal): Deleted.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreate): Add WebKitNavigationAction parameter.
(webkit_web_view_class_init): Add WebKitNavigationAction paramter
to CREATE signal.
(webkitWebViewCreateNewPage): Add WebKitNavigationAction parameter
and pass it to the signal callbacks.
(webkitWebViewMouseTargetChanged): Use a WebHitTestResult::Data
const reference.
(webkitWebViewPopulateContextMenu): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
(webkitWindowPropertiesUpdateFromWebWindowFeatures): Use a
WebCore::WindowFeatures const reference.
* UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/webkit2.h: Include WebKitNavigationAction.h.

Tools:
Add unit test to check the WebKitNavigationAction passed to
WebKitWebView::create callback.

* MiniBrowser/gtk/BrowserWindow.c:
(webViewCreate): Add WebKitNavigationAction parameter.
* TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestPrinting.cpp:
* TestWebKitAPI/Tests/WebKit2Gtk/TestUIClient.cpp:
(testWebViewCreateNavigationData):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitPolicyClient.cpp:
(createCallback):

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

6 years ago[GTK] Do not add forward declaration of class struct for interfaces
carlosgc@webkit.org [Wed, 2 Jul 2014 07:09:26 +0000 (07:09 +0000)]
[GTK] Do not add forward declaration of class struct for interfaces
https://bugs.webkit.org/show_bug.cgi?id=134297

Reviewed by Martin Robinson.

Source/WebCore:
* PlatformGTK.cmake: Make files generated by
gobject-generate-headers.pl script depend on it.
* bindings/gobject/WebKitDOMEventTarget.h: Remove forward declaration.
* bindings/gobject/WebKitDOMNodeFilter.h: Ditto
* bindings/gobject/WebKitDOMXPathNSResolver.h: Ditto.
* bindings/scripts/gobject-generate-headers.pl: Use Iface instead
of Class suffix for interfaces.

Tools:
Add Iface symbol to documentation instead of Class for interfaces.

* gtk/webkitdom.py:
(WebKitDOMDocGeneratorSections.write_section):

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

6 years ago[GTK] XPathNSResolver should be exposed as an interface instead of as a class
carlosgc@webkit.org [Wed, 2 Jul 2014 07:04:23 +0000 (07:04 +0000)]
[GTK] XPathNSResolver should be exposed as an interface instead of as a class
https://bugs.webkit.org/show_bug.cgi?id=134028

Reviewed by Gustavo Noronha Silva.

Source/WebCore:
Add custom implementation of WebKitDOMXPathNSResolver to expose it
as an interface instead of a class. It also includes an internal
default implementation of the interface to support methods that
create a XPathNSResolver using the native implementation.

* PlatformGTK.cmake: Add new files to compilation.
* bindings/gobject/GObjectXPathNSResolver.cpp: Added.
(WebCore::GObjectXPathNSResolver::~GObjectXPathNSResolver):
(WebCore::GObjectXPathNSResolver::lookupNamespaceURI): Call
webkit_dom_xpath_ns_resolver_lookup_namespace_uri().
* bindings/gobject/GObjectXPathNSResolver.h: Added.
(WebCore::GObjectXPathNSResolver::create):
(WebCore::GObjectXPathNSResolver::GObjectXPathNSResolver): Create
a new GObjectXPathNSResolver for the given WebKitDOMXPathNSResolver.
* bindings/gobject/WebKitDOMXPathNSResolver.cpp: Added.
(webkit_dom_xpath_ns_resolver_default_init):
(webkit_dom_xpath_ns_resolver_lookup_namespace_uri):
(webkitDOMNativeXPathNSResolverFinalize):
(webkitDOMNativeXPathNSResolverConstructor):
(webkit_dom_native_xpath_ns_resolver_init):
(webkit_dom_native_xpath_ns_resolver_class_init):
(webkitDOMNativeXPathNSResolverLookupNamespaceURI):
(webkitDOMXPathNSResolverIfaceInit):
(WebKit::core): Return the native XPathNSResolver when using the
internal implementation or create a custom XPathNSResolver when
using a user provided WebKitDOMXPathNSResolver.
(WebKit::kit):
* bindings/gobject/WebKitDOMXPathNSResolver.h: Added.
* bindings/gobject/WebKitDOMXPathNSResolverPrivate.h: Added.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction): Add exceptions for XPathNSResolver since
the core method returns a PassRefPtr.

Tools:
Add unit tests to check WebKitDOMXPathNSResolver API when using the
native one and a user provided one.

* Scripts/webkitpy/style/checker.py: Add WebKitDOMXPathNSResolver
to the list of GTK+ public API exceptions.
* TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt: Add new files to compilation.
* TestWebKitAPI/Tests/WebKit2Gtk/DOMXPathNSResolverTest.cpp: Added.
(webkitXPathNSResolverLookupNamespaceURI):
(webkitXPathNSResolverDOMXPathNSResolverIfaceInit):
(webkit_xpath_ns_resolver_init):
(webkit_xpath_ns_resolver_class_init):
(WebKitDOMXPathNSResolverTest::create):
(WebKitDOMXPathNSResolverTest::webPageFromArgs):
(WebKitDOMXPathNSResolverTest::evaluateFooChildTextAndCheckResult):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverNative):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverCustom):
(WebKitDOMXPathNSResolverTest::runTest):
(registerTests):
* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMXPathNSResolver.cpp: Added.
(runTest):
(testWebKitDOMXPathNSResolverNative):
(testWebKitDOMXPathNSResolverCustom):
(serverCallback):
(beforeAll):
(afterAll):
* gtk/webkitdom.py:
(WebKitDOMDocGeneratorSections.write_section): Add
WebKitDOMXPathNSResolver to the list of interfaces.

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

6 years agoThe OpenType MATH table is not read on Mac
fred.wang@free.fr [Wed, 2 Jul 2014 06:44:05 +0000 (06:44 +0000)]
The OpenType MATH table is not read on Mac
https://bugs.webkit.org/show_bug.cgi?id=133569

Reviewed by Chris Fleizach.

Source/WebCore:
An incorrect tag format is used to load the OpenType MATH table on Mac.
This commit makes the format consistent with what is used for other tables on Mac.
This will allow to load the MATH table and to use it for the MathML rendering.

No new tests. platform/graphics/opentype already contains tests for the OpenType MATH support.

* platform/graphics/opentype/OpenTypeMathData.cpp:

LayoutTests:
We update the references for some tests in LayoutTests/mathml/opentype/ and remove the failure from TestExpectations.
Other tests require a font with a MATH table to be installed on Mac bots and to be used by default (bug 133603).

* platform/mac-wk2/mathml/opentype/opentype-stretchy-expected.txt: Removed.
* platform/mac/TestExpectations: Enable mathml/opentype/opentype-stretchy-horizontal.html and mathml/opentype/opentype-stretchy.html.
* platform/mac/mathml/horizontal-LatinModern-expected.txt: Removed. This file should not have been in this directory.
* platform/mac/mathml/horizontal-LatinModern-munderover-expected.txt: Removed. This file should not have been in this directory.
* platform/mac/mathml/opentype-stretchy-horizontal-expected.txt: Removed. This file should not have been in this directory.
* platform/mac/mathml/opentype/opentype-stretchy-expected.txt: Add text reference.
* platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt: Add text reference.

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

6 years ago[Win64] Unreviewed build fix.
achristensen@apple.com [Wed, 2 Jul 2014 05:57:33 +0000 (05:57 +0000)]
[Win64] Unreviewed build fix.

Source/WebCore:
* WebCore.vcxproj/WebCore.vcxproj:
Exclude CA files from 32 and 64 bit WinCairo builds.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
Don't use a precompiled header in 32 or 63 bit builds of MockCDM.cpp.

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Corrected 64-bit linker symbols.

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

6 years agoReduce dynamic memory allocation in css jit.
achristensen@apple.com [Wed, 2 Jul 2014 04:49:39 +0000 (04:49 +0000)]
Reduce dynamic memory allocation in css jit.
https://bugs.webkit.org/show_bug.cgi?id=134416

Reviewed by Benjamin Poulain.

Source/WebCore:
* cssjit/FunctionCall.h:
(WebCore::FunctionCall::saveAllocatedRegisters):
* cssjit/RegisterAllocator.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):
Use inlineCapacity template parameter to reduce malloc calls.
I use 32 as the inline capacity for non-register related vectors because that
is probably big enough for the selector compiler, and if it is not then a malloc
call will not be significant because the selector is very complex.

Source/WTF:
* wtf/Deque.h:
Added inlineCapacity optional template parameter.

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

6 years ago[EFL] Fix occurrence of two cursors on WK2 EFL.
commit-queue@webkit.org [Wed, 2 Jul 2014 04:49:27 +0000 (04:49 +0000)]
[EFL] Fix occurrence of two cursors on WK2 EFL.
https://bugs.webkit.org/show_bug.cgi?id=134436

Patch by KwangHyuk Kim <hyuki.kim@samsung.com> on 2014-07-01
Reviewed by Anders Carlsson.

ecore_x_window_cursor is released when ecore_evas_object_cursor should be shown in order to avoid occurrence of two cursors.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):

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

6 years agoFix build break on EFL and GTK ports since r170683
gyuyoung.kim@samsung.com [Wed, 2 Jul 2014 03:44:17 +0000 (03:44 +0000)]
Fix build break on EFL and GTK ports since r170683
https://bugs.webkit.org/show_bug.cgi?id=134536

Unreviewed, build fix.

Source/WebKit2:
* CMakeLists.txt:

Tools:
* TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp:

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

6 years agoWebVTT percentage value can be a float
eric.carlson@apple.com [Wed, 2 Jul 2014 03:35:51 +0000 (03:35 +0000)]
WebVTT percentage value can be a float
https://bugs.webkit.org/show_bug.cgi?id=134511

Reviewed by Brent Fulgham.

Source/WebCore:
No new tests, existing tests modified.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::setLine): int -> double.
(WebCore::TextTrackCueGeneric::setPosition): Ditto.
* html/track/TextTrackCueGeneric.h:

* html/track/VTTCue.cpp:
(WebCore::VTTCue::setLine): Ditto.
(WebCore::VTTCue::setPosition):  Ditto.
(WebCore::VTTCue::setCueSettings): Support floating point values for line, position, and size.
(WebCore::scanPercentage): Deleted.
* html/track/VTTCue.h:

* html/track/VTTScanner.cpp:
(WebCore::VTTScanner::scanFloat): Support negative values.
* html/track/VTTScanner.h:

* html/track/WebVTTParser.cpp: Include parseFloatPercentageValue in non-WEBVTT_REGIONS builds.
* html/track/WebVTTParser.h:

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Drive by change to take a cue
    reference rather than a pointer.
(WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Ditto.
(WebCore::InbandTextTrackPrivateAVF::removeCompletedCues): Loop over all cues, don't LOG that
    we are asking the client to delete the cue because the client will have already deleted
    it when status when to GenericCueData::Complete.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:

LayoutTests:
* media/track/captions-webvtt/tc015-positioning-ltr.vtt:
* media/track/captions-webvtt/tc015-positioning.vtt:
* media/track/captions-webvtt/tc017-line-position.vtt:
* media/track/captions-webvtt/tc018-align-text-line-position.vtt:
* media/track/captions-webvtt/tc019-cue-size.vtt:
* media/track/track-webvtt-tc015-positioning-expected.txt:
* media/track/track-webvtt-tc015-positioning.html:
* media/track/track-webvtt-tc017-line-position-expected.txt:
* media/track/track-webvtt-tc017-line-position.html:
* media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
* media/track/track-webvtt-tc018-align-text-line-position.html:
* media/video-test.js:
(testCues):

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

6 years agoMake LogsPageMessagesToSystemConsoleEnabled a global debug preference
dino@apple.com [Wed, 2 Jul 2014 03:21:43 +0000 (03:21 +0000)]
Make LogsPageMessagesToSystemConsoleEnabled a global debug preference
https://bugs.webkit.org/show_bug.cgi?id=134534

Reviewed by Joseph Pecoraro.

* Shared/WebPreferencesDefinitions.h:

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

6 years agoHandle invalid data more gracefully.
timothy_horton@apple.com [Wed, 2 Jul 2014 03:06:15 +0000 (03:06 +0000)]
Handle invalid data more gracefully.

Reviewed by Anders Carlsson.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):

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

6 years agoFix this test; it was waiting about 32 years for the end of an animation.
simon.fraser@apple.com [Wed, 2 Jul 2014 02:50:09 +0000 (02:50 +0000)]
Fix this test; it was waiting about 32 years for the end of an animation.
What we really care about is the start of the animation.

* compositing/animation/keyframe-order.html:

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

6 years agoImprove behavior of position:sticky on zoomed pages
simon.fraser@apple.com [Wed, 2 Jul 2014 02:43:32 +0000 (02:43 +0000)]
Improve behavior of position:sticky on zoomed pages
https://bugs.webkit.org/show_bug.cgi?id=134535
<rdar://problem/12898829>

Reviewed by Dean Jackson.

Despite r138036, position:sticky still had incorrect behavior in zoomed pages.

Fix by removing the scaling of the rect from viewportConstrainedVisibleContentRect(),
since all the other math happens in unscaled coordinates.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):

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

6 years agoAdd a missing return statement in WKPageCopySessionState.
mrowe@apple.com [Wed, 2 Jul 2014 02:24:44 +0000 (02:24 +0000)]
Add a missing return statement in WKPageCopySessionState.

Reviewed by Anders Carlsson.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):

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

6 years agoRemove WebChromeClient code that was only needed for Safari versions earlier than 3.1
mitz@apple.com [Wed, 2 Jul 2014 01:36:40 +0000 (01:36 +0000)]
Remove WebChromeClient code that was only needed for Safari versions earlier than 3.1
https://bugs.webkit.org/show_bug.cgi?id=134531

Reviewed by Daniel Bates.

* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::exceededDatabaseQuota):

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

6 years agoDon't encode/decode the snapshot UUID
andersca@apple.com [Wed, 2 Jul 2014 01:27:55 +0000 (01:27 +0000)]
Don't encode/decode the snapshot UUID
https://bugs.webkit.org/show_bug.cgi?id=134532

Reviewed by Sam Weinig.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
(WebKit::decodeSessionHistoryEntry):

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

6 years agoUnreviewed, rolling out r170608.
commit-queue@webkit.org [Wed, 2 Jul 2014 01:24:17 +0000 (01:24 +0000)]
Unreviewed, rolling out r170608.
https://bugs.webkit.org/show_bug.cgi?id=134533

Safari keeps crashing on device due to sandbox violation.
(Requested by enrica on #webkit).

Reverted changeset:

"Restrict network process sandbox"
https://bugs.webkit.org/show_bug.cgi?id=134360
http://trac.webkit.org/changeset/170608

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

6 years agoEncode/decode CFURLRequestRefs when USE(CFNETWORK) is enabled
psolanki@apple.com [Wed, 2 Jul 2014 00:57:52 +0000 (00:57 +0000)]
Encode/decode CFURLRequestRefs when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134454
<rdar://problem/17510980>

Reviewed by Andreas Kling.

Source/WebKit2:
Use new helper methods to serialize/deserialize CFURLRequestRef directly so we can avoid
creating NSURLRequest.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

WebKitLibraries:
* WebKitSystemInterface.h:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

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

6 years ago[iOS][WK2] Fix a race between the short tap and long tap highlight
benjamin@webkit.org [Wed, 2 Jul 2014 00:49:13 +0000 (00:49 +0000)]
[iOS][WK2] Fix a race between the short tap and long tap highlight
https://bugs.webkit.org/show_bug.cgi?id=134530

Reviewed by Enrica Casucci.

There was a potential race of event that can theoretically cause WKContentViewInteraction
to call [WKContentView _showTapHighlight] after all interactions have been cancelled.

The race would be like this:
1) On a short tap, _singleTapRecognized: is called, a tap highlight ID is defined and
   _potentialTapInProgress is set to YES.
2) For some reason, the gesture is cancelled. The method _singleTapDidReset is called,
   setting _potentialTapInProgress but leaving the tap highlight ID as valid.
3) The UIProcess receives the tap highlight information from the WebProcess, _didGetTapHighlightForRequest:
   has a valid ID, _potentialTapInProgress is false -> the highlight is shown right away as if a long tap
   was in progress.

The missing piece that causes this is _singleTapDidReset: must also invalidate the tap highlight ID. This is done
in the new static function cancelPotentialTapIfNecessary().

Just invalidating the ID would create another race:
1) Short tap gesture recognizer starts.
2) The long press recognizer starts before (1) is commited.
3) The long press recognizers sets up its own tap highlight ID.
4) The short tap gesture recognizer resets, erasing the tap highlight ID defined in (3).

To avoid this, the long press gesture recognizers immediately cancels any potential tap in progress.
If _singleTapDidReset: is called before (3), this does nothing. If the reset is called after (3),
_singleTapDidReset does nothing.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _highlightLongPressRecognized:]):
(cancelPotentialTapIfNecessary):
(-[WKContentView _singleTapDidReset:]):

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

6 years agoAdd ABI hacks to allow WKPageRef to use WKSessionStateRef
andersca@apple.com [Wed, 2 Jul 2014 00:47:19 +0000 (00:47 +0000)]
Add ABI hacks to allow WKPageRef to use WKSessionStateRef
https://bugs.webkit.org/show_bug.cgi?id=134529

Reviewed by Sam Weinig.

* UIProcess/API/APISessionState.h:
Add a sessionState() getter.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Add a hack where we return a WKSessionStateRef if the least significant bit of the context pointer
is 1, and a WKDataRef otherwise.

(WKPageRestoreFromSessionState):
Handle both WKDataRef and WKSessionStateref.

* UIProcess/API/C/WKPage.h:
Use WKTypeRefs for state saving and restoration.

* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCopyData):
Add helper function.

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

6 years ago[WebGL] Fix PVRTC extension.
commit-queue@webkit.org [Wed, 2 Jul 2014 00:43:42 +0000 (00:43 +0000)]
[WebGL] Fix PVRTC extension.
https://bugs.webkit.org/show_bug.cgi?id=134525

Patch by Alex Christensen <achristensen@webkit.org> on 2014-07-01
Reviewed by Dean Jackson.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateCompressedTexDimensions):
Remove the return false which I mistakenly committed in r170128
and make the gl error match the S3TC error and the khronos test.

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

6 years agoWeb Inspector: Hexadecimal color values in all CSS editors are purple when they shoul...
jonowells@apple.com [Wed, 2 Jul 2014 00:13:19 +0000 (00:13 +0000)]
Web Inspector: Hexadecimal color values in all CSS editors are purple when they should be blue
https://bugs.webkit.org/show_bug.cgi?id=133997

Reviewed by Joseph Pecoraro.

CodeMirror 4 removed the style for hex colors from the CSS tokenizer.
Feature has been added to CodeMirrorAdditions.js.

* UserInterface/Views/CodeMirrorAdditions.js: Added hex-color to style for a valid hexadecimal color.
* UserInterface/Views/SyntaxHighlightingDefaultTheme.css: Added selector for hexadecimal color.

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

6 years agoWKPageRestoreFromSessionState should use the new session state restore code path
andersca@apple.com [Wed, 2 Jul 2014 00:08:13 +0000 (00:08 +0000)]
WKPageRestoreFromSessionState should use the new session state restore code path
https://bugs.webkit.org/show_bug.cgi?id=134526

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
Use the new code path.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromState):
Only restore the back-forward state if we have a back-forward list.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
Save the original URL string as well.

(WebKit::decodeV1SessionHistory):
If we don't have a current index, set it to Nullopt instead of 0.

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

6 years agoAX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
cfleizach@apple.com [Tue, 1 Jul 2014 23:57:07 +0000 (23:57 +0000)]
AX: iOS does not expose ARIA toggle buttons at all (not even as a regular button)
https://bugs.webkit.org/show_bug.cgi?id=133875

Reviewed by Enrica Casucci.

Source/WebCore:
Support the toggle button type in iOS.

Test: platform/ios-sim/accessibility/toggle-button.html

* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
(-[WebAccessibilityObjectWrapper accessibilityTraits]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):

LayoutTests:
* platform/ios-sim/accessibility/toggle-button-expected.txt: Added.
* platform/ios-sim/accessibility/toggle-button.html: Added.

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

6 years agoDebugger's breakpoint list should not be a Vector.
mark.lam@apple.com [Tue, 1 Jul 2014 23:40:32 +0000 (23:40 +0000)]
Debugger's breakpoint list should not be a Vector.
<https://webkit.org/b/134514>

Reviewed by Geoffrey Garen.

The debugger currently stores breakpoint data as entries in a Vector (see
BreakpointsInLine).  It also keeps a fast map look up of breakpoint IDs to
the breakpoint data (see m_breakpointIDToBreakpoint).  Because a Vector can
compact or reallocate its backing store, this can causes all sorts of havoc.
The m_breakpointIDToBreakpoint map assumes that the breakpoint data doesn't
move in memory.

The fix is to replace the BreakpointsInLine Vector with a BreakpointsList
doubly linked list.

* debugger/Breakpoint.h:
(JSC::Breakpoint::Breakpoint):
(JSC::BreakpointsList::~BreakpointsList):
* debugger/Debugger.cpp:
(JSC::Debugger::setBreakpoint):
(JSC::Debugger::removeBreakpoint):
(JSC::Debugger::hasBreakpoint):
* debugger/Debugger.h:

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

6 years agoUnreviewed. EFL and GTK build fix since r170654.
gyuyoung.kim@samsung.com [Tue, 1 Jul 2014 23:40:06 +0000 (23:40 +0000)]
Unreviewed. EFL and GTK build fix since r170654.

* UIProcess/LegacySessionStateCodingNone.cpp: Add a dummy encodeLegacySessionState(const SessionState&).
(WebKit::encodeLegacySessionState):

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

6 years ago[iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
dino@apple.com [Tue, 1 Jul 2014 23:26:12 +0000 (23:26 +0000)]
[iOS] Subsampled JPEG images do not draw correctly via the canvas APIs
https://bugs.webkit.org/show_bug.cgi?id=134513
<rdar://problem/12078860>
<rdar://problem/16745393>

Reviewed by Tim Horton.

Source/WebCore:
Subsampled images (e.g. JPEG) were not consistently using
their original dimensions and subsampled dimensions. This caused
things like texImage2D to pack the pixels incorrectly, or drawImage
to squish the rendering.

Renamed m_scale to m_subsamplingScale on FrameData.

Tests: fast/canvas/image-potential-subsample.html
       fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::cacheFrame): Rename to m_subsamplingScale.
(WebCore::BitmapImage::frameAtIndex): Ditto.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData): Ditto.
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::FrameData::clear): Ditto.
(WebCore::BitmapImage::BitmapImage): Ditto.
(WebCore::BitmapImage::draw): Use a scaledSrcRect that reflects the subsampled size,
rather than assuming the srcRect accurately reflects how many pixels we have
in the Bitmap.
(WebCore::BitmapImage::copyUnscaledFrameAtIndex):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Similar fix, although this
time we just ask the image decoder to take into account the subsampled size
when it is "generating" a frame, causing it to use the bitmap data it has already
decoded.

LayoutTests:
Add Canvas2D and WebGL tests that exercise a very large JPEG image.

The WebGL test is mostly copied from the WebGL test suite, so please
excuse the coding style.

* fast/canvas/image-potential-subsample-expected.txt: Added.
* fast/canvas/image-potential-subsample.html: Added.
* fast/canvas/resources/image-8000x8000.jpg: Added.
* fast/canvas/webgl/resources/tex-image-and-sub-image-2d-with-potentially-subsampled-image.js: Added.
(.init):
(.runOneIteration):
(.runTestOnImage):
(.runTest):
(generateTest):
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image-expected.txt: Added.
* fast/canvas/webgl/tex-image-and-sub-image-2d-with-potentially-subsampled-image.html: Added.

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

6 years agoCrash in WebDocumentLoader::setNavigationID
mitz@apple.com [Tue, 1 Jul 2014 23:22:03 +0000 (23:22 +0000)]
Crash in WebDocumentLoader::setNavigationID
https://bugs.webkit.org/show_bug.cgi?id=134520

Reviewed by Anders Carlsson.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision): Null-check the policy document loader.

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

6 years agoBuild fix.
mitz@apple.com [Tue, 1 Jul 2014 23:01:51 +0000 (23:01 +0000)]
Build fix.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didDestroyNavigation):

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

6 years agoUse the new legacy session state coding in WKPageCopySessionState
andersca@apple.com [Tue, 1 Jul 2014 22:34:10 +0000 (22:34 +0000)]
Use the new legacy session state coding in WKPageCopySessionState
https://bugs.webkit.org/show_bug.cgi?id=134516

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Call encodeLegacySessionState.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
Use leakPtr() so we won't attempt to double-free the buffer.

(WebKit::createDictionary):
Fix a typo.

(WebKit::encodeLegacySessionState):
Don't encode the provisional URL if it's empty.

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

6 years agoAX: [iOS WebKit2] Support for Speak selection
cfleizach@apple.com [Tue, 1 Jul 2014 22:25:25 +0000 (22:25 +0000)]
AX: [iOS WebKit2] Support for Speak selection
https://bugs.webkit.org/show_bug.cgi?id=134512

Reviewed by Darin Adler.

Implement a method that Speak Selection can use to retrieve the selected content.

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

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

6 years agoUpdate the highest back-forward list item ID in the other WebBackForwardListItem...
andersca@apple.com [Tue, 1 Jul 2014 22:19:55 +0000 (22:19 +0000)]
Update the highest back-forward list item ID in the other WebBackForwardListItem constructor
https://bugs.webkit.org/show_bug.cgi?id=134515

Reviewed by Tim Horton.

* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):

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

6 years agoFix ServicesOverlayController teardown
beidson@apple.com [Tue, 1 Jul 2014 21:21:09 +0000 (21:21 +0000)]
Fix ServicesOverlayController teardown
<rdar://problem/17523998> and https://bugs.webkit.org/show_bug.cgi?id=134510

Reviewed by Mark Rowe.

* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::~ServicesOverlayController): Flipped logic on null-checking the overlay.

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

6 years ago[Cocoa][Mac] WKWebView should automatically set topContentInset when beneath a toolbar
weinig@apple.com [Tue, 1 Jul 2014 21:16:14 +0000 (21:16 +0000)]
[Cocoa][Mac] WKWebView should automatically set topContentInset when beneath a toolbar
<rdar://problem/17523159>
https://bugs.webkit.org/show_bug.cgi?id=134496

Reviewed by Beth Dakin.

Source/WebKit2:
- Adds _automaticallyAdjustsContentInsets SPI to both WKView and WKWebView.
- Defaults _automaticallyAdjustsContentInsets to NO for WKView to keep legacy clients working.
- Defaults _automaticallyAdjustsContentInsets to YES for WKWebView.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Add _automaticallyAdjustsContentInsets SPI.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Default _automaticallyAdjustsContentInsets to YES for WKWebView.

(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
Change to forward to the WKView, since we now do coalescing and caching there.

(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
Forward to the WKView.

* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add _automaticallyAdjustsContentInsets SPI.

* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
Ensure the contentInset is updated when the view changes, as its relative location to the toolbar may have changed.

(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
Add observers for the contentLayoutRect and titlebarAppearsTransparent properties on the window. If either of them
change, we need to recalculate the content inset.

(-[WKView _updateContentInsetsIfAutomatic]):
If _automaticallyAdjustsContentInsets is YES, follow the same rules as AppKit in setting the top content inset. Like
AppKit this is only done when:
    - The window's style mask has the NSFullSizeContentViewWindowMask bit.
    - The window does not have titlebarAppearsTransparent set.
    - And we are not in an enclosing NSScrollView.

(-[WKView _setTopContentInset:]):
(-[WKView _topContentInset]):
Coalesce setting the topContentInset to avoid a visual lag when resizing the window that was caused by us sending
multiple topContentInsets to the WebContentProcess per runloop cycle. The reason for the lag was that at the time
we observe the contentLayoutRect changing, our view may not yet be in its final position yet, so the inset will be
temporarily wrong. When the view is finally positioned correctly, we will get a renewGState, at which point we will
again calculate the inset, which now will be correct. Since these both happen in the same runloop iteration, we can
just defer sending the inset to the WebContentProcess.

(-[WKView _setAutomaticallyAdjustsContentInsets:]):
(-[WKView _automaticallyAdjustsContentInsets]):
Add the new SPI.

Tools:
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController windowDidLoad]):
Use the NSFullSizeContentViewWindowMask bit on Yosemite and later to enable toolbar blurring.

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

6 years agoOops, didn't mean to commit this.
andersca@apple.com [Tue, 1 Jul 2014 21:13:42 +0000 (21:13 +0000)]
Oops, didn't mean to commit this.

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

6 years agoWeb Inspector: Selected DOM element highlights invisible near bottom of the viewport...
commit-queue@webkit.org [Tue, 1 Jul 2014 21:12:08 +0000 (21:12 +0000)]
Web Inspector: Selected DOM element highlights invisible near bottom of the viewport (topContentInset?)
https://bugs.webkit.org/show_bug.cgi?id=133818

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-07-01
Reviewed by Beth Dakin.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
Take the topContentInset into account when sizing the InspectorOverlay's FrameView.

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

6 years agoAdd a function for restoring page state given a SessionState object
andersca@apple.com [Tue, 1 Jul 2014 21:07:40 +0000 (21:07 +0000)]
Add a function for restoring page state given a SessionState object
https://bugs.webkit.org/show_bug.cgi?id=134509

Reviewed by Tim Horton.

* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::itemState):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::saveState):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::saveState):
* UIProcess/WebPageProxy.h:

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

6 years ago[CMake] Add necessary support for building for the Wayland target
zandobersek@gmail.com [Tue, 1 Jul 2014 20:45:47 +0000 (20:45 +0000)]
[CMake] Add necessary support for building for the Wayland target
https://bugs.webkit.org/show_bug.cgi?id=134160

Reviewed by Darin Adler.

.:
* Source/cmake/FindGTK3.cmake: Check for the gtk+-x11-3.0 package if the X11 target
is enabled, and that its version matches the version of the generic package. Same
for the gtk+-wayland-3.0 package and the Wayland target.
* Source/cmake/OptionsCommon.cmake: Don't add the -DXP_UNIX definition here.
* Source/cmake/OptionsEfl.cmake: Add -DXP_UNIX here for the EFL port, under the same
condition as in OptionsCommon.cmake. ENABLE_X11_TARGET is enabled by default for EFL
so they keep building the TestNetscapePlugin target.
* Source/cmake/OptionsGTK.cmake: Enable the X11 target and disable the Wayland target
by default. Group all the X11-specific macro definitions (WTF_PLATFORM_X11, MOZ_X11,
XP_UNIX) and only add them if the X11 target is enabled. Similar goes for the Wayland
target and WTF_PLATFORM_WAYLAND. The Wayland target requires GTK+ 3.12.0, so that's
the minimum required version as soon as that target is enabled. Only search for GLX
if the X11 target is enabled.

Tools:
* CMakeLists.txt: Only build the TestNetscapePlugIn target in case
the X11 windowing target is enabled.

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

6 years agoFollowup for: Combine the Telephone and Selection overlay controllers, updating UI...
beidson@apple.com [Tue, 1 Jul 2014 20:38:37 +0000 (20:38 +0000)]
Followup for: Combine the Telephone and Selection overlay controllers, updating UI behavior.
https://bugs.webkit.org/show_bug.cgi?id=134461

Rubberstamped by Tim Horton.

* WebProcess/WebPage/mac/ServicesOverlayController.mm: Include the correct constant.

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

6 years agoAX: HTML indeterminate IDL attribute not mapped to checkbox value=2
cfleizach@apple.com [Tue, 1 Jul 2014 20:29:52 +0000 (20:29 +0000)]
AX: HTML indeterminate IDL attribute not mapped to checkbox value=2
https://bugs.webkit.org/show_bug.cgi?id=134492

Reviewed by Andreas Kling.

Source/WebCore:
Support the indeterminate attribute in AX code.

Test: Update existing test: accessibility/aria-checked-mixed-value

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::checkboxOrRadioValue):

Tools:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isIndeterminate):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isIndeterminate):

LayoutTests:
* accessibility/aria-checked-mixed-value-expected.txt:
* accessibility/aria-checked-mixed-value.html:
* platform/mac/accessibility/aria-checked-mixed-value-expected.txt: Added.

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

6 years ago[Cocoa] Navigation parameter in navigation delegate messages is nil for navigations...
mitz@apple.com [Tue, 1 Jul 2014 20:22:58 +0000 (20:22 +0000)]
[Cocoa] Navigation parameter in navigation delegate messages is nil for navigations started by the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=134482

Reviewed by Tim Horton.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didDestroyNavigation): New client function, called when a navigation ID
is not going to be used anymore.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _restoreFromSessionState:]): If restoring triggered a navigation, create a
WKNavigation for its ID.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation): Removed FIXME, because we now remove
navigations from the map in LoaderClient::didDestroyNavigation.
(WebKit::NavigationState::createBackForwardNavigation): Ditto.
(WebKit::NavigationState::createReloadNavigation): Ditto.
(WebKit::NavigationState::createLoadDataNavigation): Ditto.
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): If we are only
getting a navigation ID now, create a WKNavigation for it. Also changed to create the
NSURLRequest lazily.
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Assert that
navigationID is not zero and that it maps to an existing WKNavigation.
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
Ditto.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didDestroyNavigation): Override the new client
function to remove the navigation from the map.
(WebKit::NavigationState::LoaderClient::processDidCrash): Clear the navigations map.

* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::WebFrameListenerProxy): Initialize new m_navigationID
member variable.
(WebKit::WebFrameListenerProxy::receivedPolicyDecision): Pass the navigation ID to
WebFrame::receivedPolicyDecision.
* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::navigationID): Added this accessor.
(WebKit::WebFrameListenerProxy::setNavigationID): Ditto.

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision): Added navigationID parameter, which is
passed along to the WebPageProxy.
* UIProcess/WebFrameProxy.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision): Added navigationID parameter, which is
passed along in the message to the Web Content process.
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID of 0.
(WebKit::WebPageProxy::restoreFromState): Changed to return a navigation ID if one was
started.
(WebKit::WebPageProxy::didDestroyNavigation): Added. Calls the new client function.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Added navigationID and
newNavigationID parameters. If a main-frame navigation doesn’t already have an ID, assign it
a new ID and return it in the newNavigationID parmeter as well as setting it on the listener
for the asynchronous case.
* UIProcess/WebPageProxy.h:

* UIProcess/WebPageProxy.messages.in: Added navigationID and newNavigationID parameters.

* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID if
one was started.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Updated for additional
parameter.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the navigation
ID to the UI process, get the new navigation ID from the reply, and set it on the document
loader.

* WebProcess/WebPage/WebDocumentLoader.cpp:
(WebKit::WebDocumentLoader::detachFromFrame): Override to let the UI process know that the
navigation ID will not be used anymore.
* WebProcess/WebPage/WebDocumentLoader.h:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision): Added navigationID parameter, set it on the
document loader.
(WebKit::WebFrame::documentLoaderDetached): Pass the message along to the UI process.
* WebProcess/WebPage/WebFrame.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision): Pass new navigationID parameter along.
* WebProcess/WebPage/WebPage.h:

* WebProcess/WebPage/WebPage.messages.in: Added navigationID parameter.

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

6 years agoFix build.
andersca@apple.com [Tue, 1 Jul 2014 19:43:48 +0000 (19:43 +0000)]
Fix build.

* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoTemporarily encode and decode the snapshot UUID
andersca@apple.com [Tue, 1 Jul 2014 19:42:03 +0000 (19:42 +0000)]
Temporarily encode and decode the snapshot UUID
https://bugs.webkit.org/show_bug.cgi?id=134507

Reviewed by Tim Horton.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
(WebKit::decodeSessionHistoryEntry):
(WebKit::decodeSessionHistoryEntries):

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

6 years agoImplement encodeSessionHistoryEntryData
andersca@apple.com [Tue, 1 Jul 2014 19:34:57 +0000 (19:34 +0000)]
Implement encodeSessionHistoryEntryData
https://bugs.webkit.org/show_bug.cgi?id=134505

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Add back a missing null check for the filter pointer.

* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):

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

6 years ago[UI-side compositing] Bad spinner on news.google.com: animations need to be ordered
simon.fraser@apple.com [Tue, 1 Jul 2014 19:15:39 +0000 (19:15 +0000)]
[UI-side compositing] Bad spinner on news.google.com: animations need to be ordered
https://bugs.webkit.org/show_bug.cgi?id=134504
<rdar://problem/17507892>

Reviewed by Tim Horton.

Source/WebKit2:
The layer's addedAnimations property needs to maintain order, since the order
in which transforms are applied is important.

* Shared/mac/RemoteLayerTreeTransaction.h: Use a Vector<pair<>> for addedAnimations.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::updateLayerAnimations):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::addAnimationForKey): If this is a new entry, we
can just append to addedAnimations, otherwise we have to find the existing one
and update its properties.
(WebKit::PlatformCALayerRemote::removeAnimationForKey): Do linear search to
find the animation to remove (this list will normally be short).

LayoutTests:
Test that the transforms from the animation are applied in the correct order.

* compositing/animation/keyframe-order-expected.html: Added.
* compositing/animation/keyframe-order.html: Added.

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

6 years agoTyping an automatic text replacement phrase after a br in contenteditable is not...
mmaxfield@apple.com [Tue, 1 Jul 2014 19:10:30 +0000 (19:10 +0000)]
Typing an automatic text replacement phrase after a br in contenteditable is not rendered as expected
https://bugs.webkit.org/show_bug.cgi?id=133883

Reviewed by Enrica Casucci.

enclosingDeletableElement() makes sure that the element's container is editable, but not
that it is capable of having content inside it (like how a <br> can't).

No new tests. I don't think this is testable because it requires setting some state in System Preferences.

* editing/DeleteButtonController.cpp:
(WebCore::enclosingDeletableElement):

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

6 years agoAdd a encodeLegacySessionState function
andersca@apple.com [Tue, 1 Jul 2014 19:04:54 +0000 (19:04 +0000)]
Add a encodeLegacySessionState function
https://bugs.webkit.org/show_bug.cgi?id=134502

Reviewed by Tim Horton.

* UIProcess/LegacySessionStateCoding.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::createDictionary):
(WebKit::encodeSessionHistory):
(WebKit::encodeLegacySessionState):

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

6 years ago[Cocoa] WebProcess doesn't follow localization of UI process when run as a service
timothy_horton@apple.com [Tue, 1 Jul 2014 18:41:27 +0000 (18:41 +0000)]
[Cocoa] WebProcess doesn't follow localization of UI process when run as a service
https://bugs.webkit.org/show_bug.cgi?id=133126
<rdar://problem/13396515>

Patch by Alexey Proskuryakov.
Reviewed by Tim Horton.

* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
Figure out which of the two keys to use. CFBundleAllowMixedLocalizations was
a workaround before we got CFBundleFollowParentLocalization, and these cannot be
used together.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Set up
XPC bootstrap for CFBundle to use.

* WebKit2.xcodeproj/project.pbxproj: Added a script that applies the key to Info.plist.

* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
Removed CFBundleAllowMixedLocalizations, we now add it programmatically.

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

6 years ago[iOS] Unreviewed build fix after r170640.
achristensen@apple.com [Tue, 1 Jul 2014 18:29:53 +0000 (18:29 +0000)]
[iOS] Unreviewed build fix after r170640.

Source/WebCore:
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged):
Add ifdefs to make everything compile and link.

Source/WebKit2:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
(WebKit::WebEditorClient::selectionRectsDidChange):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.h:
Add ifdefs to make everything compile and link.

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

6 years agoAdd WKSessionStateGetTypeID
andersca@apple.com [Tue, 1 Jul 2014 18:00:35 +0000 (18:00 +0000)]
Add WKSessionStateGetTypeID
https://bugs.webkit.org/show_bug.cgi?id=134499

Reviewed by Tim Horton.

* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateGetTypeID):
* UIProcess/API/C/WKSessionStateRef.h:

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

6 years agoRemove unnecessary calls to std::move()
dbates@webkit.org [Tue, 1 Jul 2014 17:49:47 +0000 (17:49 +0000)]
Remove unnecessary calls to std::move()
https://bugs.webkit.org/show_bug.cgi?id=134493

Reviewed by Anders Carlsson.

Source/WebCore:
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::CDM):
* css/CSSGrammar.y.in:
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberValue):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::dashesForIntersectionsWithRect):

Source/WebKit2:
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::Handle::tryWrapInCFData):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo): Return a WebCore::CertificateInfo instead
of const WebCore::CertificateInfo& to avoid returning a dangling reference to
a local variable. Also, remove the unnecessary calls to std::move() as the compiler
will invoke the move constructor for WebCore::CertificateInfo on return from the
function.
* WebProcess/WebPage/WebFrame.h:

Tools:
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:
(TestWebKitAPI::TEST):

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

6 years agoAdd a BackForwardListItemState struct and put the snapshot UUID there
andersca@apple.com [Tue, 1 Jul 2014 17:46:29 +0000 (17:46 +0000)]
Add a BackForwardListItemState struct and put the snapshot UUID there
https://bugs.webkit.org/show_bug.cgi?id=134497

Reviewed by Sam Weinig.

* Shared/SessionState.cpp:
(WebKit::PageState::encode):
(WebKit::PageState::decode):
(WebKit::BackForwardListItemState::encode):
(WebKit::BackForwardListItemState::decode):
* Shared/SessionState.h:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::backForwardData):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
(WebKit::WebBackForwardListItem::setOriginalURL):
(WebKit::WebBackForwardListItem::originalURL):
(WebKit::WebBackForwardListItem::setURL):
(WebKit::WebBackForwardListItem::url):
(WebKit::WebBackForwardListItem::setTitle):
(WebKit::WebBackForwardListItem::title):
(WebKit::WebBackForwardListItem::setSnapshotUUID):
(WebKit::WebBackForwardListItem::snapshotUUID):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeSessionHistoryEntries):

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

6 years ago[iOS] Compile fix with pointer lock enabled.
achristensen@apple.com [Tue, 1 Jul 2014 17:33:43 +0000 (17:33 +0000)]
[iOS] Compile fix with pointer lock enabled.
https://bugs.webkit.org/show_bug.cgi?id=134472

Reviewed by Pratik Solanki.

* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):
Add parameters required for pointer lock.

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

6 years agoUnreviewed. Adding myself to the reviewers list to make commit bot happy.
psolanki@apple.com [Tue, 1 Jul 2014 17:29:15 +0000 (17:29 +0000)]
Unreviewed. Adding myself to the reviewers list to make commit bot happy.

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

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

6 years agoSubpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
zalan@apple.com [Tue, 1 Jul 2014 17:25:10 +0000 (17:25 +0000)]
Subpixel rendering: Pixel crack in breadcrumbs at devforums.apple.com.
https://bugs.webkit.org/show_bug.cgi?id=134491

Reviewed by Simon Fraser.

Do not early round geometry values, while computing background image position. It changes the final
subpixel values and that could lead to wrong snap positions.
pixelSnapBackgroundImageGeometryForPainting() takes care of geometry snapping.

Source/WebCore:
Test: fast/backgrounds/background-image-size-double-rounding.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):

LayoutTests:
* fast/backgrounds/background-image-size-double-rounding-expected.html: Added.
* fast/backgrounds/background-image-size-double-rounding.html: Added.

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

6 years agoAdd encodeInteger and decodeInteger for remote object encoder and decoder.
commit-queue@webkit.org [Tue, 1 Jul 2014 17:14:35 +0000 (17:14 +0000)]
Add encodeInteger and decodeInteger for remote object encoder and decoder.
https://bugs.webkit.org/show_bug.cgi?id=134453

In 64bit system, encodeInteger/decodeInteger is by default mapped into encodeInt64/decodeInt64.  For
32bit system, they are mapped to encodeInt32/decodeInt32.  However, since we don't have encodeInt32/decodeInt32
implementation in WKRemoteObjectCoder, we could hit crash in 32bit systems.

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

* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeInteger:forKey:]): Instead of creating a new number type UInt32, use encodeInt64 for
    encoding NSInteger.
(-[WKRemoteObjectDecoder decodeIntegerForKey:]):

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

6 years agoUse an std::function for filtering session state data
andersca@apple.com [Tue, 1 Jul 2014 17:04:30 +0000 (17:04 +0000)]
Use an std::function for filtering session state data
https://bugs.webkit.org/show_bug.cgi?id=134481

Reviewed by Sam Weinig.

* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sessionStateData):
* UIProcess/WebPageProxy.h:
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData):

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

6 years agoClean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
commit-queue@webkit.org [Tue, 1 Jul 2014 16:59:00 +0000 (16:59 +0000)]
Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=134294

Patch by Rohit Kumar <kumar.rohit@samsung.com> on 2014-07-01
Reviewed by Darin Adler.

* UIProcess/API/APIUIClient.h:
(API::UIClient::reachedApplicationCacheOriginQuota):

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

6 years agoCreate NSURLRequest lazily when USE(CFNETWORK) is enabled
psolanki@apple.com [Tue, 1 Jul 2014 16:45:03 +0000 (16:45 +0000)]
Create NSURLRequest lazily when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134441

Reviewed by Andreas Kling.

No new tests. Should be covered by existing tests.

* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::ResourceRequest):
(WebCore::ResourceRequest::encodingRequiresPlatformData):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):

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

6 years agoBuild fix.
beidson@apple.com [Tue, 1 Jul 2014 16:43:03 +0000 (16:43 +0000)]
Build fix.

Forgot to commit locally before pushing.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::servicesOverlayController): s/this/*this/

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

6 years agoCombine the Telephone and Selection overlay controllers, updating UI behavior.
beidson@apple.com [Tue, 1 Jul 2014 16:22:01 +0000 (16:22 +0000)]
Combine the Telephone and Selection overlay controllers, updating UI behavior.
https://bugs.webkit.org/show_bug.cgi?id=134461

Reviewed by Tim Horton.

Source/WebCore:
* WebCore.exp.in:

* dom/Range.cpp:
(WebCore::Range::contains): Returns true if the Range completely contains the passed-in Range.
* dom/Range.h:

Source/WebKit2:
* WebKit2.xcodeproj/project.pbxproj:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
(WebKit::WebEditorClient::selectionRectsDidChange):

Remove the separate Selection overlay controller:
* WebProcess/WebPage/SelectionOverlayController.cpp: Removed.
* WebProcess/WebPage/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/SelectionOverlayController.h.
(WebKit::ServicesOverlayController::create):
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Removed.

Remove the separate TelephoneNumber overlay controller:
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Removed.
* WebProcess/WebPage/TelephoneNumberOverlayController.h: Removed.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Removed.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::servicesOverlayController):
(WebKit::WebPage::telephoneNumberOverlayController): Deleted.
(WebKit::WebPage::selectionOverlayController): Deleted.
(WebKit::WebPage::didChangeScrollOffsetForFrame): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::serviceControlsEnabled): Deleted.

ServicesOverlayController is a combination of the old TelephoneNumber and Selection overlay controllers.
A lot of code duplication is resolved, and things are generally easier to follow.
It enforces displaying a telephone number highlight if precisely one telephone number is selected, or
the selection highlight if the selection contains more than a single phone number
* WebProcess/WebPage/mac/ServicesOverlayController.mm: Added.
(WebKit::textQuadsToBoundingRectForRange):
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::destroyOverlay):
(WebKit::ServicesOverlayController::pageOverlayDestroyed):
(WebKit::ServicesOverlayController::willMoveToWebPage):
(WebKit::ServicesOverlayController::didMoveToWebPage):
(WebKit::ServicesOverlayController::createOverlayIfNeeded):
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
(WebKit::ServicesOverlayController::clearHighlightState):
(WebKit::ServicesOverlayController::drawRect):
(WebKit::ServicesOverlayController::drawSelectionHighlight):
(WebKit::ServicesOverlayController::drawTelephoneNumberHighlight):
(WebKit::ServicesOverlayController::drawCurrentHighlight):
(WebKit::ServicesOverlayController::mouseEvent):
(WebKit::ServicesOverlayController::handleClick):

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

6 years agowebkit-patch apply-from-bug / apply-attachment should not ask for credentials if...
commit-queue@webkit.org [Tue, 1 Jul 2014 15:22:44 +0000 (15:22 +0000)]
webkit-patch apply-from-bug / apply-attachment should not ask for credentials if none are required
https://bugs.webkit.org/show_bug.cgi?id=40095

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-07-01
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.fetch_attachment_contents): make a first fetch on bugzilla without authentication. If failing, use authentication (similar to fetch_bug_dictionary).
(Bugzilla):
(Bugzilla.bug_id_for_attachment_id): ditto.

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

6 years agoREGRESSION(160908): vube.com video won't play after going into and out of fullscreen
antti@apple.com [Tue, 1 Jul 2014 15:16:24 +0000 (15:16 +0000)]
REGRESSION(160908): vube.com video won't play after going into and out of fullscreen
https://bugs.webkit.org/show_bug.cgi?id=134489

Reviewed by Zalan Bujtas.

Test: fullscreen/full-screen-plugin.html

It is difficult to restore the render tree correctly in all cases after removing a full screen
renderer from the tree. r160908 avoided dealing with this by simply always reconstructing the subtree.
Unfortunately plugin lifetime is currently tied to its renderer so this would cause the plugin to restart.

With this patch we avoid reconstruction in normal cases and only force it if the render tree is complicated.

* dom/Document.cpp:
(WebCore::unwrapFullScreenRenderer):

    Force reconstruction conditionally.

(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::wrapRenderer):
(WebCore::RenderFullScreen::unwrapRenderer):

    Deal with the simple case of single child, possibly in anonymous wrapper.
    In other cases request reconstruction.
    This is covered by the existing fullscreen tests.

* rendering/RenderFullScreen.h:

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