WKBundleActivateMacFontAscentHack is unused
https://bugs.webkit.org/show_bug.cgi?id=133379

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleActivateMacFontAscentHack): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed the WebKitTestRunner build after r169452.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::initialize):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: marking js/primitive-property-access-edge-cases.html as flaky.
<https://webkit.org/b/133356>

Not reviewed.

* TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
https://bugs.webkit.org/show_bug.cgi?id=133372
<rdar://problem/17045070>

Reviewed by Simon Fraser.

* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::willFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
frames, not just the main frame, because the found string can be in a subframe.
Ideally we would flip it on/off for each frame as we move the selection between them,
but would require a lot of work (and the overhead of touching each frame shouldn't be significant).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
https://bugs.webkit.org/show_bug.cgi?id=133370
<rdar://problem/17061361>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Copy the set of refresh monitors so that we don't try to mutate the list we're iterating,
and don't try to fire refresh monitors that were removed in a previous iteration of the loop.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Always use plug-in sandbox with sandboxed clients
https://bugs.webkit.org/show_bug.cgi?id=133358
<rdar://problem/15637695>

Reviewed by Anders Carlsson.

* PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox):
Refuse to start if parent process is sandboxed, and plug-in process is not going to be.
None of this should run in normal case, because there are also checks on UI process side.
        
* Shared/Plugins/PluginModuleInfo.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile.

* Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
(WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member,
we no longer need to check the file system here.

* WebKit2.xcodeproj/project.pbxproj:
* Shared/mac/SandboxUtilities.h: Added.
* Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed):
This code is simple, but include magic is not. Moved it to a separate file to
avoid repeating.

* UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include.

* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in
sandboxed applications.

* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox
from sandboxed processes.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
Use the new shared code in SandboxUtilities.h.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Added a missing @result to WKPreferences headerdoc
https://bugs.webkit.org/show_bug.cgi?id=133381

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKPreferences.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Gardening: marking js/primitive-property-access-edge-cases.html as crashy.
<https://webkit.org/b/133356>

Not reviewed.

* TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Can’t recover from subframe load errors
https://bugs.webkit.org/show_bug.cgi?id=133385

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize
webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods
struct.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the
error occurred in a subframe, invoke the new delegate method.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add a WebKit2 Performance bot.
https://bugs.webkit.org/show_bug.cgi?id=132862

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-05-29
Reviewed by Csaba Osztrogonác.

This adds a GTK WebKit2 perf bot.

* BuildSlaveSupport/build.webkit.org-config/config.json:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix an exception in InspectorBackend.Command.prototype.supports.

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

Reviewed by Joseph Pecoraro.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackend.Command.prototype.supports): Use some not any.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll out r169439. <rdar://problem/17069364>

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Need to notify the keyboard about every KeyDown event.
https://bugs.webkit.org/show_bug.cgi?id=133383
<rdar://problem/16633975>

Reviewed by Benjamin Poulain.
        
A key down will generate most of the time a call to the keyboard to add input or delete.
But the event could be handled by JavaScript and its default prevented.
We need to notify the keyboard in every case to allow updating its internal state about what has been typed.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::doneWithKeyEvent):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didHandleKeyEvent:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WebGL] Fix depth buffer clearing issue.
https://bugs.webkit.org/show_bug.cgi?id=133388

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

No new tests, but this fixes webgl/1.0.1/conformance/canvas/buffer-preserve-test.html.

* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer display]):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
Moved marking the layer as composited from the mac-only prepareTexture to
the end of [WebGLLayer display] which is called by mac and iOS.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Restoring FloatingPointEnvironment initialization that was accidentally rolled out by r169176.
<https://webkit.org/b/133389>

Rubber stamped by Oliver Hunt.

* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::platformInitialize):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an instruction on how to backup the database.
https://bugs.webkit.org/show_bug.cgi?id=133391

Rubber-stamped by Andreas Kling.

* Install.md:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loading <object> from WebArchive crashes
https://bugs.webkit.org/show_bug.cgi?id=133386
<rdar://problem/13345509>

Reviewed by Brady Eidson.


Source/WebCore: 
Test: webarchive/loading/object.html

This (a) fixes the crash, and (b) avoids the crash.

* loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy):
Some types of substitute data - such as WebArchive - don't contain HTTP result codes,
so let's not drop to <object> fallback content when status is 0.
And if the load somehow failed anyway, don't crash by trying to deliver substitute data
to a finished loader.

LayoutTests: 
* webarchive/loading/object-expected.txt: Added.
* webarchive/loading/object.html: Added.
* webarchive/loading/resources/object.webarchive: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support -apple-system-font on OS X
https://bugs.webkit.org/show_bug.cgi?id=133382

Source/WebCore:
Reviewed by Simon Fraser.

Guard on both family names: "-apple-system-font" and "-webkit-system-font"

Test: platform/mac/fast/text/systemFont.html

* platform/mac/WebFontCache.mm:
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):

LayoutTests:
This test makes sure that -apple-system-font is rendered the same way as -webkit-system-font.

Reviewed by Simon Fraser.

* platform/mac-mountainlion/platform/mac/fast/text/systemFont-expected.txt: Updated.
* platform/mac/fast/text/systemFont.html: Tests -apple-system-font in addition to -webkit-system-font.
* platform/mac/platform/mac/fast/text/systemFont-expected.txt: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll r168668 back in.

<https://bugs.webkit.org/show_bug.cgi?id=132621>

Reviewed by Brent Fulgham.

Source/WebCore:
Tests: fast/events/beforeload-assertion.html
       fast/events/beforeload-iframe-crash.html
       fast/events/beforeload-input-time-crash.html

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
* dom/Document.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::renderWidgetForJSBindings):
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::updateEmbeddedObjectsTimerFired):
(WebCore::FrameView::flushAnyPendingPostLayoutTasks):
(WebCore::FrameView::performPostLayoutTasks):
* page/FrameView.h:
* testing/Internals.cpp:
(WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:
* compositing/plugins/composited-plugin.html:
* compositing/plugins/no-backing-store.html:
* fast/dom/beforeload/flash-before-load.html:
* fast/events/beforeload-assertion-expected.txt: Added.
* fast/events/beforeload-assertion.html: Added.
* fast/events/beforeload-iframe-crash-expected.txt: Added.
* fast/events/beforeload-iframe-crash.html: Added.
* fast/events/beforeload-input-time-crash-expected.txt: Added.
* fast/events/beforeload-input-time-crash.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-notype-data.html:
* http/tests/security/contentSecurityPolicy/1.1/plugintypes-nourl-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-no-url-blocked.html:
* http/tests/security/contentSecurityPolicy/object-src-none-allowed.html:
* http/tests/security/contentSecurityPolicy/object-src-none-blocked.html:
* http/tests/security/contentSecurityPolicy/resources/multiple-iframe-plugin-test.js:
(testImpl.iframe.onload):
(testImpl):
* http/tests/security/mixedContent/insecure-plugin-in-iframe.html:
* platform/mac/plugins/supports-carbon-event-model.html:
* platform/mac/plugins/testplugin-onnew-onpaint.html:
* plugins/get-user-agent-with-null-npp-from-npp-new.html:
* plugins/mouse-click-plugin-clears-selection.html:
* plugins/netscape-plugin-map-data-to-src.html:
* plugins/no-mime-with-valid-extension.html:
* plugins/plugin-initiate-popup-window.html:
* plugins/windowless_plugin_paint_test.html:
* resources/plugin.js: Added.
(runAfterPluginLoad):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
https://bugs.webkit.org/show_bug.cgi?id=133393

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):

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