Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.

* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Primary plugin hit detection needs to run after plugin creation
https://bugs.webkit.org/show_bug.cgi?id=112206

Reviewed by Tim Horton.

On some pages, the plugins are created after the page has loaded, and
thus our heuristic to determine the primary plugin fails. Run this
heuristic more often: after each PluginView is created. It already exits
early if it has found a primary. But we also need to make sure that it
doesn't run before load.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addPluginView): Run detection when view is added.
(WebKit::WebPage::didFinishLoad): Remember that we have loaded.
(WebKit::WebPage::determinePrimarySnapshottedPlugIn): Look at the PluginViews to see if we have a plugin.
(WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset both flags.
* WebProcess/WebPage/WebPage.h:
(WebPage): New member variable, m_readyToFindPrimarySnapshottedPlugin.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't send events to plugins that are being snapshotted
https://bugs.webkit.org/show_bug.cgi?id=112215
<rdar://problem/13386224>

Reviewed by Tim Horton.

If a plugin is in the process of being snapshotted, do not forward it
any events. This avoids the case where we can accidentally capture some
custom mouse pointers, as well as trigger a plugin menu.

The next step will be to detect if the event should stop the snapshotting
(restart the plugin).

* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler): Return early if the plugin is snapshotting.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unbreak api tests

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r145280.
http://trac.webkit.org/changeset/145280
https://bugs.webkit.org/show_bug.cgi?id=112217

This patch broke chromium WebGL conformance tests (Requested
by shawnsingh on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-12

* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::reset):
* platform/graphics/gpu/DrawingBuffer.h:
(DrawingBuffer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] WebFrame event listener APIs are unused and can be removed
https://bugs.webkit.org/show_bug.cgi?id=112189

Reviewed by Darin Fisher.

As far as I can tell, there are no callers for these APIs. They appear
to have been added for out-of-process postMessages, but those are now
implemented using a different mechanism.

* public/WebFrame.h:
(WebFrame):
* src/WebFrameImpl.cpp:
* src/WebFrameImpl.h:
(WebFrameImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTF uses macros for exports. Try to fix the Windows build. Unreviewed.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Typo in earlier Windows build fix. Unreviewed.

* WTF.vcproj/WTF.vcproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update a few chromium test expectations.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Enable GPU-GPU texture copy in texImage2D() for HTMLVideoElement if hardware accelerated video decode is in use
https://bugs.webkit.org/show_bug.cgi?id=111126

Patch by Jun Jiang <jun.a.jiang@intel.com> on 2013-03-12
Reviewed by Kenneth Russell.

Source/WebCore:

In texImage2D() for HTMLVideoElement in WebGL, it is possible to do a GPU-GPU texture copy instead of CPU readback
and upload when videoFrame is in the form of textures. Each platform port needs to implement the interface
copyVideoTextureToPlatformTexture() defined in MediaPlayer.h to make it work.

Already covered by current tests.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture):
* html/HTMLVideoElement.h:
(HTMLVideoElement):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::videoFrameToImage): Move some security check to upper level.
(WebCore::WebGLRenderingContext::texImage2D): Add the fast GPU-GPU textures copy path for HTMLVideoElement and some security check.
(WebCore::WebGLRenderingContext::texSubImage2D): Add some security check.
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::isValid): Added to check if the texture is defined at the given level.
* html/canvas/WebGLTexture.h:
(WebGLTexture):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::copyVideoTextureToPlatformTexture): Added to do the GPU-GPU textures copy.
* platform/graphics/MediaPlayer.h:
(MediaPlayer):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::copyVideoTextureToPlatformTexture):

Source/WebKit/chromium:

* public/WebMediaPlayer.h:
(WebKit::WebMediaPlayer::copyVideoTextureToPlatformTexture):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::copyVideoTextureToPlatformTexture): do a GPU-GPU textures copy if possible.
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer().
https://bugs.webkit.org/show_bug.cgi?id=111835

Patch by Huang Dongsung <luxtella@company100.net> on 2013-03-12
Reviewed by Luiz Agostini.

Source/WebCore:

This patch removes CoordinatedGraphicsLayer::setRootLayer() because
CoordinatedGraphicsScene already knows which layer is root.

No new tests, no behavior change.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):

Source/WebKit2:

Amend CoordinatedLayerTreeHost because
CoordinatedGraphicsLayer::setRootLayer() is removed.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update test expectation for the bug 111521.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-03-12  Geoffrey Garen  <ggaren@apple.com>

        Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.

        * platform/RunLoopTimer.h: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled Chromium DEPS to r187688.  Requested by
"James Robinson" <jamesr@chromium.org> via sheriffbot.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-12

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] ewk_popup_menu_close() does not work as intended
https://bugs.webkit.org/show_bug.cgi?id=110209

Reviewed by Laszlo Gombos.

ewk_popup_menu_close() is called by the browser to notify WebKit that
the popup menu was closed. However, the implementation was calling
EwkView::closePopupMenu() which was asking the browser to close the
popup menu via an Evas smart function. This patch fixes the behavior
and ewk_popup_menu_close() now calls WKPopupMenuListenerSetSelection()
C API so that the WebProcess is notified that the popup menu was
hidden.

* UIProcess/API/efl/ewk_popup_menu.cpp:
(EwkPopupMenu::close):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Crash] Touch Events retargeting causes crashes on chrome on android.
https://bugs.webkit.org/show_bug.cgi?id=112210

Reviewed by Dimitri Glazkov.

Added null-check for TouchEvent's touches(), targetTouches() and changedTouches().

No new tests - no new functionality.

* dom/EventRetargeter.cpp:
(WebCore::EventRetargeter::adjustForTouchEvent):
(WebCore::EventRetargeter::adjustTouchList):
* dom/EventRetargeter.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed attempted Windows build fix after http://trac.webkit.org/changeset/145592.

* wtf/SchedulePair.cpp:
* wtf/SchedulePair.h:
(WTF::SchedulePair::SchedulePair): Since linking is failing,
try inlining this function.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup: Move flatten-trie to loader.
https://bugs.webkit.org/show_bug.cgi?id=112196

Reviewed by Dirk Pranke.

flatten-trie is used only by the loader, so move it there and make it
private, rather than global in dashbaord_base. Moved the corresponding
unit test from flakiness_dashboard_unittests to loader_unittests.

* TestResultServer/static-dashboards/dashboard_base.js:
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
* TestResultServer/static-dashboards/loader.js:
(.):
* TestResultServer/static-dashboards/loader_unittests.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Basic child obscuration test for backgrounds
https://bugs.webkit.org/show_bug.cgi?id=111701

Source/WebCore:

Reviewed by Simon Fraser.

Test: fast/repaint/obscured-background-no-repaint.html

We can easily detect some simple cases where a background image is fully obscured by an opaque child.

This avoids unncessary painting and image decoding. It is especially helpful for cases like about.com home
page where a fully obscured 'loading' spinner keeps triggering frequent complex repaints (gif animations
progress by getting painted and stop if they are not).

This could be made way more sophisticated. The checking could also be done per-layout rather per-paint.
Even this simple approach gets hit surprisingly often in real world sites.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::backgroundIsObscured):

    Before painting background test if any single child renderer fully obscures it.

(WebCore::RenderBox::backgroundIsOpaqueInRect):
* rendering/RenderBox.h:

LayoutTests:

Reviewed by Simon Fraser.

* fast/repaint/obscured-background-no-repaint-expected.txt: Added.
* fast/repaint/obscured-background-no-repaint.html: Added.
* fast/repaint/resources/animated.gif: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed inspector test fix.

* http/tests/inspector/resource-tree/resource-request-content-after-loading-and-clearing-cache.html:
* inspector/datagrid-autosize.html:
* inspector/debugger/breakpoint-manager-listeners-count.html:

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