Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-14

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use performance.webkitNow in PerfTestRunner
https://bugs.webkit.org/show_bug.cgi?id=92826

Reviewed by Eric Seidel.

Use performance.webkitNow with Date.now as a fallback for more accurate time measurements.

* resources/runner.js:
(PerfTestRunner._runner):
(PerfTestRunner._perSecondRunnerIterator):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Minimize collisions when hashing pairs
https://bugs.webkit.org/show_bug.cgi?id=96022

Reviewed by Adrienne Walker.

Source/WebCore:

Use WTF::pairIntHash() to hash pairs of integers.

* dom/Document.cpp:
(WebCore::ImmutableAttributeDataCacheKey::hash):
* dom/StyledElement.cpp:
(WebCore::computePresentationAttributeCacheHash):
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::hash):
* platform/graphics/IntPointHash.h:
(WTF::IntPointHash::hash):
* platform/graphics/IntRectHash.h:
* platform/graphics/IntSizeHash.h:
* platform/graphics/blackberry/LayerTileIndex.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::SubimageCacheHash::hash):

Source/WebKit/blackberry:

Use WTF::pairIntHash() to hash a pair of integers.

* WebKitSupport/TileIndexHash.h:

Source/WTF:

The current hash function for pairs has poor performance as it does a
nice hash function on 64 bits, but then just drops the top 32 bits. The
hash method for pairs tries to use Thomas Wang's 64 bit Mix Function,
but this requires not dropping any bits in order to retain the
characteristics mentioned by Thomas.

A better method of hashing sets of 32-bit integers is to use
multiplication in 64 bits with random integers. This method is a
provably almost-universal hash function. Testing shows that this
method decreases the time required, when compared with the current
method, by more than 20% due to better hashing characteristics.

* wtf/HashFunctions.h:
(WTF):
(WTF::pairIntHash):
Implments the hashing method for a pair of unsigned integers.

(WTF::PairHash::hash):
Use pairIntHash() on the hash results of each object in the pair.

(WTF::IntPairHash::hash):
Implement an integer-specific PairHash class that does not need to
hash each object in the pair. It uses pairIntHash on the two
integers in the pair directly.

(WTF::IntPairHash::equal):
(IntPairHash):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Prevent workers from calling back into other worlds
https://bugs.webkit.org/show_bug.cgi?id=96790

Patch by Dan Carney <dcarney@google.com> on 2012-09-14
Reviewed by Adam Barth.

Added a few sanity checks to ensure callbacks are always using the correct world.

No new tests. No new change in functionality.

* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::getEventListener):
* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):
* bindings/v8/WorldContextHandle.cpp:
(WebCore::WorldContextHandle::WorldContextHandle):
(WebCore::WorldContextHandle::adjustedContext):
* bindings/v8/WorldContextHandle.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=96688
Put position:fixed elements in their own layers and allow them to 
create a stacking context
-and corresponding-
<rdar://problem/11467961>

Reviewed by Simon Fraser.

Source/WebKit/mac: 

Enable these settings in WK1 too for consistency. 
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2: 

Soon we want pages with fixed positioned elements to be able to be 
scrolled by the ScrollingCoordinator. As a part of that work, we have 
to composite fixed position elements, and we have to allow those
elements to create a stacking context.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

LayoutTests: 

A few test result differences. These first three tests actually
render differently now.
* platform/mac/fast/block/positioning/016-expected.png:
* platform/mac/fast/block/positioning/016-expected.txt:
* platform/mac/fast/block/positioning/025-expected.png:
* platform/mac/fast/block/positioning/025-expected.txt:
* platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.png: Added.
* platform/mac/fast/block/positioning/fixed-position-stacking-context-expected.txt: Added.

These tests just have different layer trees. 
* platform/mac/compositing/geometry/fixed-position-composited-switch-expected.txt: Added.
* platform/mac/compositing/rtl: Added.
* platform/mac/compositing/rtl/rtl-fixed-expected.txt: Added.
* platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow third-party storage blocking setting to change while a page is loaded
https://bugs.webkit.org/show_bug.cgi?id=95790

Reviewed by Brady Eidson.

.:

Update exported symbols.

* Source/autotools/symbols.filter:

Source/WebCore:

Pipe through changes to the storage blocking policy to each document and plugin.

Tests: http/tests/security/storage-blocking-loosened-local-storage.html
       http/tests/security/storage-blocking-loosened-plugin.html
       http/tests/security/storage-blocking-loosened-private-browsing-plugin.html
       http/tests/security/storage-blocking-loosened-shared-worker.html
       http/tests/security/storage-blocking-loosened-websql.html
       http/tests/security/storage-blocking-strengthened-local-storage.html
       http/tests/security/storage-blocking-strengthened-plugin.html
       http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html
       http/tests/security/storage-blocking-strengthened-shared-worker.html
       http/tests/security/storage-blocking-strengthened-websql.html

* WebCore.exp.in:
* dom/Document.cpp: Pipe changes through to the Document's SecurityOrigin.
(WebCore::Document::storageBlockingStateDidChange):
(WebCore):
* dom/Document.h:
(Document):
* page/DOMWindow.cpp: Check to make sure access is allowed before returning a cached storage area.
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* page/Page.cpp:
(WebCore::Page::collectPluginViews): Refactored out into a function.
(WebCore):
(WebCore::Page::storageBlockingStateChanged): Pipe changes through to each PluginView.
(WebCore::Page::privateBrowsingStateChanged):
* page/Page.h:
(Page):
* page/Settings.cpp:
(WebCore::Settings::setStorageBlockingPolicy): Tell Pages about changes to the storage blocking policy.
(WebCore):
* page/Settings.h:
(Settings):
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::storageBlockingStateChanged):

Source/WebKit2:

Inform plugins about changes to the storage blocking policy by way of the private browsing feature.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::storageBlockingStateChanged):
(WebKit):
* PluginProcess/PluginControllerProxy.h:
(PluginControllerProxy):
* PluginProcess/PluginControllerProxy.messages.in: Add WK2 message for storageBlockingStateChanged.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::storageBlockingStateChanged):
(WebKit):
(WebKit::NetscapePlugin::privateBrowsingStateChanged):
(WebKit::NetscapePlugin::updateNPNPrivateMode): Set plugin's private browsing if either private browsing or storage blocking is enabled.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
* WebProcess/Plugins/PDF/BuiltInPDFView.mm: Treat storageBlockingStateChanged as a no-op.
(WebKit::BuiltInPDFView::storageBlockingStateChanged):
(WebKit):
* WebProcess/Plugins/Plugin.h: Add pure virtual storageBlockingStateChanged method.
(Plugin):
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::storageBlockingStateChanged):
(WebKit):
* WebProcess/Plugins/PluginProxy.h:
(PluginProxy):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::storageBlockingStateChanged):
(WebKit):
* WebProcess/Plugins/PluginView.h:
(PluginView):
* win/WebKit2.def:

LayoutTests:

Tested combinations of loosening and strengthening the storage blocking policy on various types of storage.

* http/tests/security/resources/iframe-for-storage-blocking-changed-local-storage.html: Added.
* http/tests/security/resources/iframe-for-storage-blocking-changed-shared-worker.html: Added.
* http/tests/security/resources/iframe-for-storage-blocking-changed-websql.html: Added.
* http/tests/security/storage-blocking-loosened-local-storage-expected.txt: Added.
* http/tests/security/storage-blocking-loosened-local-storage.html: Added.
* http/tests/security/storage-blocking-loosened-plugin-expected.txt: Added.
* http/tests/security/storage-blocking-loosened-plugin.html: Added.
* http/tests/security/storage-blocking-loosened-private-browsing-plugin-expected.txt: Added.
* http/tests/security/storage-blocking-loosened-private-browsing-plugin.html: Added.
* http/tests/security/storage-blocking-loosened-shared-worker-expected.txt: Added.
* http/tests/security/storage-blocking-loosened-shared-worker.html: Added.
* http/tests/security/storage-blocking-loosened-websql-expected.txt: Added.
* http/tests/security/storage-blocking-loosened-websql.html: Added.
* http/tests/security/storage-blocking-strengthened-local-storage-expected.txt: Added.
* http/tests/security/storage-blocking-strengthened-local-storage.html: Added.
* http/tests/security/storage-blocking-strengthened-plugin-expected.txt: Added.
* http/tests/security/storage-blocking-strengthened-plugin.html: Added.
* http/tests/security/storage-blocking-strengthened-private-browsing-plugin-expected.txt: Added.
* http/tests/security/storage-blocking-strengthened-private-browsing-plugin.html: Added.
* http/tests/security/storage-blocking-strengthened-shared-worker-expected.txt: Added.
* http/tests/security/storage-blocking-strengthened-shared-worker.html: Added.
* http/tests/security/storage-blocking-strengthened-websql-expected.txt: Added.
* http/tests/security/storage-blocking-strengthened-websql.html: Added.
* platform/chromium/TestExpectations: Skip shared worker and plugin tests.
* platform/mac-wk2/http/tests/security/storage-blocking-strengthened-plugin-expected.txt: Added.
* platform/mac-wk2/http/tests/security/storage-blocking-strengthened-private-browsing-plugin-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ImageLoader can't be cleared when video element poster attribute removed.
https://bugs.webkit.org/show_bug.cgi?id=96301

Reviewed by Abhishek Arya.

Source/WebCore:

Same problem as in https://bugs.webkit.org/show_bug.cgi?id=90801. We can't
clear the image loader when the src attribute is cleared, because we might be
inside a handler called on top of an image loader event dispatch. Instead we
will rely on the OwnPtr relationship between the Element and the Image Loader
to limit the lifetime of the loader to that of the element.

Test: fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::parseAttribute):
Remove permature clearing of m_imageLoader.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseAttribute):
Remove permature clearing of m_imageLoader.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
Remove permature clearing of m_imageLoader.

LayoutTests:

Added test case.

* fast/dom/beforeload/clear-video-poster-in-beforeload-listener-expected.txt: Added.
* fast/dom/beforeload/clear-video-poster-in-beforeload-listener.html: Added.


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