[chromium] Avoid allocating render pass textures that have no content
https://bugs.webkit.org/show_bug.cgi?id=90702

Reviewed by Adrienne Walker.

Source/WebCore:

When OOM conditions are hit, textures are not allocated for some layers
which can prevent any quads from being present for a render surface.
This is used as a signal to prevent the RenderPass from allocating a
texture.

Replace the CCLayerTreeHostImpl::removePassesWithCachedTextures() method
with a general removeRenderPasses() which takes a culling control object
and will remove passes based on the inputs from the control object.

This new method is used for the old purpose of removing passes with cached
textures, as well as to remove passes that do not have any quad inputs.

Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawRenderPassQuad):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
(WebCore::CCLayerTreeHostImpl::removeRenderPasses):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(WebCore):
(CullRenderPassesWithCachedTextures):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListBegin):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListEnd):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListNext):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::CullRenderPassesWithCachedTextures):
(CCLayerTreeHostImpl):
(CullRenderPassesWithNoQuads):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListBegin):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListEnd):
(WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListNext):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCLayerTreeHostTest.cpp:
(WTF::ContentLayerChromiumWithUpdateTracking::ContentLayerChromiumWithUpdateTracking):
(CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit):
(WTF::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit):
(WTF::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit::beginTest):
(WTF::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit::didCommit):
(WTF::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit::drawLayersOnCCThread):
(WTF::CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit::afterTest):
(WTF):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AudioFIFO not correctly wrapping the write index on push
https://bugs.webkit.org/show_bug.cgi?id=90901

Patch by Raymond Toy <rtoy@google.com> on 2012-07-10
Reviewed by Chris Rogers.

No new tests

* platform/audio/AudioFIFO.cpp:
(WebCore::AudioFIFO::push): Wrap the write index, not read index!

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening. Adding the majority of the remaining indexeddb/mozilla tests which are all flaky and crashing.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle()
https://bugs.webkit.org/show_bug.cgi?id=90826

Reviewed by Adam Barth.

Source/WebCore:

No new tests. The change to this file is refactoring only.

* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike().

Source/WebKit/chromium:

* WebKit.gyp:
* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::getRenderStyleForStrike): Call style.setDefault() on Android or when the font is not specified.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove LayoutTestController and WebKitTestRunner support for Hixie76 WebSockets
https://bugs.webkit.org/show_bug.cgi?id=90853

Reviewed by Eric Seidel.

Tools:

WebKit no longer implements the Hixie76 version of the WebSocket
protocol. We don't need to support it in our test framework.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::overridePreference):
* DumpRenderTree/chromium/WebPreferences.cpp:
(WebPreferences::reset):
(WebPreferences::applyTo):
* DumpRenderTree/chromium/WebPreferences.h:
(WebPreferences):
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::overridePreference):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::resetSettings):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::overridePreference):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):

LayoutTests:

There's no need to explicitly disable the Hixie76 protocol because it
no longer exists in WebKit.

* http/tests/websocket/tests/hybi/alert-in-event-handler.html:
* http/tests/websocket/tests/hybi/bad-handshake-crash.html:
* http/tests/websocket/tests/hybi/bad-sub-protocol-control-chars.html:
* http/tests/websocket/tests/hybi/bad-sub-protocol-empty.html:
* http/tests/websocket/tests/hybi/bad-sub-protocol-non-ascii.html:
* http/tests/websocket/tests/hybi/binary-type.html:
* http/tests/websocket/tests/hybi/broken-utf8.html:
* http/tests/websocket/tests/hybi/bufferedAmount-after-close-in-busy.html:
* http/tests/websocket/tests/hybi/bufferedAmount-after-close.html:
* http/tests/websocket/tests/hybi/client-close.html:
* http/tests/websocket/tests/hybi/close-before-open.html:
* http/tests/websocket/tests/hybi/close-code-and-reason.html:
* http/tests/websocket/tests/hybi/close-event.html:
* http/tests/websocket/tests/hybi/close-on-navigate-new-location.html:
* http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html:
* http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html:
* http/tests/websocket/tests/hybi/close-on-unload.html:
* http/tests/websocket/tests/hybi/close-unref-websocket.html:
* http/tests/websocket/tests/hybi/close.html:
* http/tests/websocket/tests/hybi/compressed-control-frame.html:
* http/tests/websocket/tests/hybi/cross-origin.html:
* http/tests/websocket/tests/hybi/deflate-frame-comp-bit-onoff.html:
* http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter.html:
* http/tests/websocket/tests/hybi/deflate-frame-parameter.html:
* http/tests/websocket/tests/hybi/echo-with-no-extension.html:
* http/tests/websocket/tests/hybi/extensions.html:
* http/tests/websocket/tests/hybi/fragmented-binary-frames.html:
* http/tests/websocket/tests/hybi/fragmented-control-frame.html:
* http/tests/websocket/tests/hybi/fragmented-frames.html:
* http/tests/websocket/tests/hybi/frame-lengths.html:
* http/tests/websocket/tests/hybi/handshake-challenge-randomness.html:
* http/tests/websocket/tests/hybi/handshake-error.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-maxlength.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-no-cr.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null.html:
* http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header.html:
* http/tests/websocket/tests/hybi/httponly-cookie.pl:
* http/tests/websocket/tests/hybi/interleaved-fragments.html:
* http/tests/websocket/tests/hybi/invalid-continuation.html:
* http/tests/websocket/tests/hybi/invalid-encode-length.html:
* http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html:
* http/tests/websocket/tests/hybi/invalid-subprotocol-characters.html:
* http/tests/websocket/tests/hybi/invalid-subprotocols.html:
* http/tests/websocket/tests/hybi/long-control-frame.html:
* http/tests/websocket/tests/hybi/long-invalid-header.html:
* http/tests/websocket/tests/hybi/multiple-connections.html:
* http/tests/websocket/tests/hybi/multiple-subprotocols.html:
* http/tests/websocket/tests/hybi/no-subprotocol.html:
* http/tests/websocket/tests/hybi/null-character.html:
* http/tests/websocket/tests/hybi/pong.html:
* http/tests/websocket/tests/hybi/receive-arraybuffer.html:
* http/tests/websocket/tests/hybi/receive-blob.html:
* http/tests/websocket/tests/hybi/reload-crash.html:
* http/tests/websocket/tests/hybi/reserved-bits.html:
* http/tests/websocket/tests/hybi/reserved-opcodes.html:
* http/tests/websocket/tests/hybi/send-after-close-on-unload.html:
* http/tests/websocket/tests/hybi/send-arraybuffer.html:
* http/tests/websocket/tests/hybi/send-blob.html:
* http/tests/websocket/tests/hybi/send-empty.html:
* http/tests/websocket/tests/hybi/send-file-blob-fail.html:
* http/tests/websocket/tests/hybi/send-file-blob.html:
* http/tests/websocket/tests/hybi/send-object-tostring-check.html:
* http/tests/websocket/tests/hybi/send-throw.html:
* http/tests/websocket/tests/hybi/send.html:
* http/tests/websocket/tests/hybi/server-close.html:
* http/tests/websocket/tests/hybi/set-protocol.html:
* http/tests/websocket/tests/hybi/simple-stress.html:
* http/tests/websocket/tests/hybi/simple.html:
* http/tests/websocket/tests/hybi/sub-protocol.html:
* http/tests/websocket/tests/hybi/too-long-payload.html:
* http/tests/websocket/tests/hybi/unicode.html:
* http/tests/websocket/tests/hybi/unmasked-frames.html:
* http/tests/websocket/tests/hybi/unpaired-surrogates-in-close-reason.html:
* http/tests/websocket/tests/hybi/unpaired-surrogates-in-message.html:
* http/tests/websocket/tests/hybi/url-attribute.html:
* http/tests/websocket/tests/hybi/url-no-trailing-slash.html:
* http/tests/websocket/tests/hybi/url-parsing.html:
* http/tests/websocket/tests/hybi/url-with-credential.html:
* http/tests/websocket/tests/hybi/url-with-empty-query.html:
* http/tests/websocket/tests/hybi/url-with-query.html:
* http/tests/websocket/tests/hybi/websocket-event-target.html:
* http/tests/websocket/tests/hybi/websocket-pending-activity.html:
* http/tests/websocket/tests/hybi/workers/close-code-and-reason.html:
* http/tests/websocket/tests/hybi/workers/close-in-onmessage-crash.html:
* http/tests/websocket/tests/hybi/workers/close-in-shared-worker.html:
* http/tests/websocket/tests/hybi/workers/close-in-worker.html:
* http/tests/websocket/tests/hybi/workers/close.html:
* http/tests/websocket/tests/hybi/workers/multiple-subprotocols.html:
* http/tests/websocket/tests/hybi/workers/no-onmessage-in-sync-op.html:
* http/tests/websocket/tests/hybi/workers/no-subprotocol.html:
* http/tests/websocket/tests/hybi/workers/receive-arraybuffer.html:
* http/tests/websocket/tests/hybi/workers/receive-blob.html:
* http/tests/websocket/tests/hybi/workers/send-arraybuffer.html:
* http/tests/websocket/tests/hybi/workers/send-blob.html:
* http/tests/websocket/tests/hybi/workers/shared-worker-simple.html:
* http/tests/websocket/tests/hybi/workers/worker-handshake-challenge-randomness.html:
* http/tests/websocket/tests/hybi/workers/worker-reload.html:
* http/tests/websocket/tests/hybi/workers/worker-simple.html:
* http/tests/websocket/tests/hybi/zero-length-text.html:


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