Clang doesn't optimize away undefined OwnPtr copy constructor
https://bugs.webkit.org/show_bug.cgi?id=74625

Reviewed by Anders Carlsson.

Original patch by Anders Carlsson, with a minor edit.

The publicly declared-but-not-defined copy constructor is a compiler
optimization-dependent landmine. Clang often fails to optimize the use
of this function out, leading to internal linkage errors for the missing
definition. gcc doesn't have this problem and optimizes that function
out, leading to code that inconsistently fails to link across platforms.

As a partial fix for this problem, on any compiler that supports C++11
move semantics, replace the bogus copy constructor with the move
constructors.  In the future, if all compilers support this, then the
copy constructor can be removed.

This still leaves other compilers that don't support move semantics
like Visual Studio vulnerable to linking inconsistencies.

* wtf/OwnPtr.h:
(OwnPtr):
(WTF):
(WTF::::OwnPtr):
(WTF::=):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places
https://bugs.webkit.org/show_bug.cgi?id=96344

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-09-11
Reviewed by Benjamin Poulain.

Use StringBuilder::appendNumber() instead of String::number(). Also deploy
StringBuilder::appendLiteral() instead of String::append() in the surrounding code.

Source/WebCore:

* css/CSSAspectRatioValue.cpp:
(WebCore::CSSAspectRatioValue::customCssText):
* platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
(WebCore):
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString):

Source/WebKit/blackberry:

* WebCoreSupport/DatePickerClient.cpp:
(WebCore::DatePickerClient::generateHTML):
* WebCoreSupport/SelectPopupClient.cpp:
(WebCore::SelectPopupClient::generateHTML):

Source/WebKit2:

* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
* UIProcess/InspectorServer/WebSocketServerConnection.cpp:
(WebKit::WebSocketServerConnection::sendHTTPResponseHeader):
* UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp:
(WebKit::WebInspectorServer::inspectorUrlForPageID):
(WebKit::WebInspectorServer::buildPageList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
We should wait longer before killing the PluginProcess.
<rdar://problem/12067728> and https://bugs.webkit.org/show_bug.cgi?id=96407

Reviewed by Anders Carlsson.

Currently we kill the PluginProcess 15 seconds after the last plug-in is destroyed.
This is short enough that most users will have the process killed many times during browsing sessions,
which is painful because relaunching the process is I/O and kernel intensive.

In an ideal world we could keep it around forever until the system tells us resources are running low.

In reality we do want to kill it occasionally to get a clean slate from any plug-in leaks.

A reasonable balance for now is to set a minimum lifetime of 30 minutes on the plug-in process and to
extend the termination timer from 15 seconds to 10 minutes.

* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
(WebKit::PluginProcess::initializePluginProcess):
(WebKit::PluginProcess::setMinimumLifetime):
(WebKit):
(WebKit::PluginProcess::minimumLifetimeTimerFired):
* PluginProcess/PluginProcess.h:
(PluginProcess):

* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):
* Shared/Plugins/PluginProcessCreationParameters.h:
(PluginProcessCreationParameters):

* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit):
(WebKit::PluginProcessProxy::didFinishLaunching):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed a bug where kill-old-processes failed to kill clang++.

Rubber-stamped by Alexey Proskuryakov.

* BuildSlaveSupport/kill-old-processes: Escape the + signs in "clang++"
where it is passed as a regular expression to killall.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve console error messages when 'document.domain' blocks cross-origin script access.
https://bugs.webkit.org/show_bug.cgi?id=96247

Patch by Mike West <mkwst@chromium.org> on 2012-09-11
Reviewed by Adam Barth.

Source/WebCore:

Setting 'document.domain' can produce counterintuitive "cross-origin"
error messages for script access in cases where the property isn't set
to the same value in both the accessor and accessee. This patch adds a
bit more context to the error message to make it clear that both sides
must set the property, and that the values must match.

This shouldn't change any externally visible behavior other than the
error warnings. It's covered by changes to existing tests.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::crossDomainAccessErrorMessage):
    Adding checks for 'document.domain'-related errors, and adding an
    ASSERT that crossDomainAccessErrorMessage is called in cases where
    the accessing frame is actually denied access to the frame being
    accessed.

LayoutTests:

* http/tests/security/cross-frame-access-callback-explicit-domain-DENY-expected.txt:
* http/tests/security/cross-frame-access-child-explicit-domain-expected.txt:
* http/tests/security/cross-frame-access-parent-explicit-domain-expected.txt:
* http/tests/security/cross-frame-access-protocol-expected.txt:
* http/tests/security/cross-frame-access-protocol-explicit-domain-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-expected.txt:
* http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase-expected.txt:
* http/tests/security/dataURL/xss-DENIED-to-data-url-window-open-expected.txt:
* http/tests/security/view-source-no-javascript-url-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-window-open-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-2-level-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-from-data-url-sub-frame-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-subframe-location-change-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-in-foreign-domain-window-open-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-2-level-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-sub-frame-uppercase-expected.txt:
* platform/chromium/http/tests/security/dataURL/xss-DENIED-to-data-url-window-open-expected.txt:
* platform/chromium/http/tests/security/inactive-document-with-empty-security-origin-expected.txt:
* platform/chromium/http/tests/security/window-named-proto-expected.txt:
    Updating error message.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Apple] Install plist for Apple Open Source build system
https://bugs.webkit.org/show_bug.cgi?id=96345

Reviewed by Mark Rowe.

Apple's build system requires a couple of files that describe where
the 3rd party Open Source library came from, and what license it
uses. These files are copied into /usr/local when the project is
being installed.

* ANGLE.plist: Added.
* ANGLE.txt: Added.
* ANGLE.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Restore original value of mock scrollbars enabled in InternalSettings
https://bugs.webkit.org/show_bug.cgi?id=87680

Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-09-11
Reviewed by Adam Barth.

Added backup support for mock scrollbars state in
InternalSettings::Backup, and removed support for these
from Qt's DumpRenderTree.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
(Backup):

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit2:

* win/WebKit2.def:

Tools:

* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::resetSettings):
* DumpRenderTree/qt/TestRunnerQt.cpp:
(TestRunner::setFrameFlatteningEnabled):
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunner):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Fix history navigation for error pages.
https://bugs.webkit.org/show_bug.cgi?id=96410

Reviewed by Rob Buis.

Fix how history navigation handles restoring view state when navigating between error pages.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::FrameLoaderClientBlackBerry):
(WebCore::FrameLoaderClientBlackBerry::saveViewStateToItem):
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):
* WebCoreSupport/FrameLoaderClientBlackBerry.h:
(FrameLoaderClientBlackBerry):


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