Unreviewed gardening; rebaseline and re-enable media/track/track-cue-rendering-snap-to-lines-not-set.html

* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt:
* platform/mac/TestExpectations:
* platform/mac/media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Reenable storage tests
https://bugs.webkit.org/show_bug.cgi?id=116559 

Unreviewed update to TestExpectations:
1. Storage features are present on Windows, so test them.
2. Disable (for now) the four websql tests that fail.

* platform/win/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions][CSS Exclusions] Multiple regions with shape-insides should respect positioned shapes and overflow
https://bugs.webkit.org/show_bug.cgi?id=115001

Reviewed by David Hyatt.

In r150375 I implemented the new overflow behavior for shape-inside on regions, but it covered only the simple cases
when you had only one region. This patch adds support for the new overflow behavior for multiple regions with multiple
positioned shape-insides and overflow.

Source/WebCore:

Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
       fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Cover cases when content flows into the next region, update the
line segments for the overflow.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): In flow thread case we don't want to adjust the height
in two places.

LayoutTests:

* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes-expected.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
https://bugs.webkit.org/show_bug.cgi?id=116516

Reviewed by Alexey Proskuryakov.

Reset states in DumpRenderTree. The fix for WebKitTestRunner should be implemented in the bug 116577.

* DumpRenderTree/mac/DumpRenderTree.mm:
(createWebViewAndOffscreenWindow): Match the ordering.
(resetWebViewToConsistentStateBeforeTesting): Reset text replacement states.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove ScopeContentDistribution
https://bugs.webkit.org/show_bug.cgi?id=116576

Reviewed by Andreas Kling.

With maximum one ShadowRoot per Element this can be smashed into ContentDistributor.

* dom/ShadowRoot.cpp:
(WebCore):
* dom/ShadowRoot.h:
(WebCore):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
(WebCore):
(WebCore::ContentDistributor::~ContentDistributor):
(WebCore::ContentDistributor::invalidateInsertionPointList):
(WebCore::ContentDistributor::ensureInsertionPointList):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
* html/shadow/ContentDistributor.h:
(WebCore):
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
        
    Simplify insertion point list invalidation.

* html/shadow/InsertionPoint.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r150469. We need to bail out here when DOM is mutated by an event listener such that
the split text nodes no longer exist right next to each other.

* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Robustify repaint of previous caret node when moving FrameSelection.
<http://webkit.org/b/116558>

Reviewed by Ryosuke Niwa.

As a follow-up to r150396, also repaint the caret rects if the previous node is contenteditable.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove stub HTMLContentElement
https://bugs.webkit.org/show_bug.cgi?id=116580

Reviewed by Andreas Kling.

Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.

* html/HTMLDetailsElement.cpp:
(WebCore::DetailsContentElement::DetailsContentElement):
(WebCore::DetailsSummaryElement::DetailsSummaryElement):
* html/HTMLSummaryElement.cpp:
(WebCore::SummaryContentElement::SummaryContentElement):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::contentTagName):
* html/shadow/HTMLContentElement.h:
(WebCore::isHTMLContentElement):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::setResetStyleInheritance):
* html/shadow/InsertionPoint.h:
        
    Also remove some leftover selector code.

(WebCore::InsertionPoint::insertionPointType):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide an API to run sandboxed plug-ins outside of their sandbox
https://bugs.webkit.org/show_bug.cgi?id=116578

Reviewed by Andreas Kling.

* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::callMemberFunction):
Add new overload.

* PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
(WebKit::PluginProcessMainDelegate::getExtraInitializationData):
Handle "disable-sandbox".

* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
Handle "disable-sandbox".

* PluginProcess/PluginProcess.h:
Move Type to PluginProcessAttributes and remove hash traits for type.

* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializePluginProcess):
Update for new type name.

(WebKit::PluginProcess::initializeSandbox):
Return early if the sandbox is disabled.

* Shared/Plugins/Netscape/PluginInformation.cpp:
(WebKit::getPluginModuleInformation):
PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin.

* Shared/Plugins/PluginModuleInfo.h:
Add PluginModuleLoadUnsandboxed.

* Shared/Plugins/PluginProcessAttributes.h: Added.
Add new header with various plug-in process attributes.

* Shared/Plugins/PluginProcessCreationParameters.h:
Change type enum.

* UIProcess/API/C/WKAPICast.h:
(WebKit::toWKPluginLoadPolicy):
(WebKit::toPluginModuleLoadPolicy):
Handle the unsandboxed enum.

* UIProcess/API/C/WKPage.h:
Add kWKPluginLoadPolicyLoadUnsandboxed.

* UIProcess/Plugins/PluginInfoStore.h:
Rename policyForPlugin to defaultLoadPolicyForPlugin.

* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::pluginProcessToken):
Add new helper function for getting a token given plug-in attributes.

(WebKit::PluginProcessManager::getPluginProcessConnection):
This now takes a pluginProcessToken.

(WebKit::PluginProcessManager::getSitesWithData):
Make sure to call pluginProcessToken.

(WebKit::PluginProcessManager::clearSiteData):
Ditto.

(WebKit::PluginProcessManager::getOrCreatePluginProcess):
This now takes a token.

* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::create):
(WebKit::PluginProcessProxy::PluginProcessProxy):
Pass the PluginProcessAttributes as well as the plug-in process token.

(WebKit::PluginProcessProxy::getLaunchOptions):
Pass the plug-in process attributes to platformGetLaunchOptions.

(WebKit::PluginProcessProxy::didClose):
Pass the token to PluginProcessCrashed.

(WebKit::PluginProcessProxy::didFinishLaunching):
Update for type change.

* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::shouldBlockPlugin):
(WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
Rename policyForPlugin to defaultLoadPolicyForPlugin.

* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):
Set the "disable-sandbox" data if needed.

(WebKit::PluginProcessProxy::platformInitializePluginProcess):
(WebKit::PluginProcessProxy::openPluginPreferencePane):
Get the module info from m_pluginProcessAttributes.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
This now returns a token.

* UIProcess/WebPageProxy.messages.in:
FindPlugin now returns a token instead of the path.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPluginProcessConnection):
Pass the token to the plug-in process manager.

* UIProcess/WebProcessProxy.messages.in:
This now takes a token.

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

* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::PluginProcessConnection):
This now takes a token.

* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::create):
(WebKit::PluginProcessConnection::pluginProcessToken):
Create this with a token instead of a path and process type.

* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
This now takes a token.

(WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
Ditto.

* WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
PluginProcessCrashed now takes a token.

* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::create):
(WebKit::PluginProxy::PluginProxy):
These now take tokens.

(WebKit::PluginProxy::initialize):
Pass the token when getting the connection.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Get the token from the UI process and pass it to the PluginProxy.

(WebKit::WebPage::canPluginHandleResponse):
Update now that FindPlugin returns a token.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add missing #if guards on drag support methods
https://bugs.webkit.org/show_bug.cgi?id=116574

Reviewed by Christophe Dumez.

* platform/efl/PasteboardEfl.cpp:
(WebCore):


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

* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
Stop using lambdas :(

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update Mountain Lion test expectations per bug 116477.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: inspector/styles/import-pseudoclass-crash.html intermittently hits an assertion in HTMLLinkElement::startLoadingDynamicSheet
https://bugs.webkit.org/show_bug.cgi?id=116582

Add a flaky crash expectation.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed speculative fix for test-bots.

Add export declaration for WTFInvokeCrashHook to avoid runtime
load error on test bots.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow session storage for third-party origins even if third-party data access is blocked.
https://bugs.webkit.org/show_bug.cgi?id=116532

Reviewed by Anders Carlsson.

Source/WebCore:

In http://trac.webkit.org/changeset/149326 we relaxed our policy for
localStorage when third-party data blocking is enabled to create a
transient, session-scoped storage area for the third-party origin
instead of throwing an exception. Since this gives essentially the same
behavior as sessionStorage, we might as well also allow sessionStorage
for third-party origins.

Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html

* WebCore.exp.in: Updated the symbol for
SecurityOrigin::canAccessStorage.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
rather than canAccessLocalStorage().
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
indicating if access should be allowed from third-party origins.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessSessionStorage): Called
canAccessStorage() with AlwaysAllowFromThirdParty.
(SecurityOrigin):

LayoutTests:

* http/tests/security/cross-origin-session-storage-third-party-blocked-expected.txt: Renamed from LayoutTests/http/tests/security/cross-origin-session-storage-expected.txt.
* http/tests/security/cross-origin-session-storage-third-party-blocked.html: Renamed from LayoutTests/http/tests/security/cross-origin-session-storage.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
<http://webkit.org/b/116464>
<rdar://problem/10103795>

Reviewed by Anders Carlsson.

Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes,
just shut down the CoreIPC connection from the UI process. The web process, upon noticing this,
will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down.

(WebKit::WebProcessProxy::removeWebPage):

    When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off
    eventually, even if the WebPage::Close message never gets properly handled.

* Shared/ChildProcessProxy.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):

    Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race
    where the exiting web process may get re-used for a new tab.

* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::enableSuddenTermination):
(WebKit::WebProcessProxy::disableSuddenTermination):

    Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in
    response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check in the test and result I forgot to 'git add' before committing r150490.

* http/tests/security/cross-origin-session-storage-third-party-blocked-expected.txt: Added.
* http/tests/security/cross-origin-session-storage-third-party-blocked.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r150369): WebKit2WillLoadTest tests are failing
https://bugs.webkit.org/show_bug.cgi?id=116585

Reviewed by Alexey Proskuryakov.

willLoadURLRequest and willLoadDataRequest require the API version 6.

* TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build break after r150484

Unreviewed, fix build break on EFL, GTK.

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/13915556> Sluggish scrolling in web content

Reviewed by Gavin Barraclough.

* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important.

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