Free up background parser's checkpoints when speculation succeeds
https://bugs.webkit.org/show_bug.cgi?id=110547

Reviewed by Adam Barth.

This should be a memory (and possible perf) win while parsing
pages, as we will no longer hold multiple copies of every
source byte during the whole parse.

Many LayoutTests exercise this code path, and I've manually (debugger and printf)
that we're hitting this code, but we'll have to wait for the memory/perf bots
to tell us if this shows up as a win.

We only bother to message the parser at the end of a speculation chain, so as not
to send too many messages to the background parser.

* html/parser/BackgroundHTMLInputStream.cpp:
(WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
(WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
(WebCore):
(WebCore::BackgroundHTMLInputStream::rewindTo):
* html/parser/BackgroundHTMLInputStream.h:
(BackgroundHTMLInputStream):
(Checkpoint):
(WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
(WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::passedCheckpoint):
(WebCore):
* html/parser/BackgroundHTMLParser.h:
(BackgroundHTMLParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpPendingSpeculations):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Chromium rebaselines and expectations updates.

* platform/chromium-linux-x86/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium-linux/compositing/tiling/rotated-tiled-clamped-expected.png: Added.
* platform/chromium-linux/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.png: Added.
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.png: Added.
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt:
* platform/chromium-linux/platform/chromium/virtual/softwarecompositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-mac-lion/platform/chromium/virtual/gpu/compositedscrolling/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.png: Added.
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium-mac-lion/platform/chromium/virtual/softwarecompositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-mac-snowleopard/platform/chromium/virtual/gpu/compositedscrolling/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.png: Added.
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium-mac-snowleopard/platform/chromium/virtual/softwarecompositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-mac/compositing/tiling/rotated-tiled-clamped-expected.png: Added.
* platform/chromium-mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.png: Added.
* platform/chromium-mac/platform/chromium/compositing/rubberbanding/transform-overhang-ne-expected.png: Added.
* platform/chromium-mac/platform/chromium/compositing/rubberbanding/transform-overhang-nw-expected.png: Added.
* platform/chromium-mac/platform/chromium/compositing/rubberbanding/transform-overhang-se-expected.png: Added.
* platform/chromium-mac/platform/chromium/compositing/rubberbanding/transform-overhang-size-change-expected.png: Added.
* platform/chromium-mac/platform/chromium/compositing/rubberbanding/transform-overhang-sw-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/overflow/overflow-scroll-expected.txt: Added.
* platform/chromium-mac/platform/chromium/virtual/gpu/compositedscrolling/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium-mac/platform/chromium/virtual/softwarecompositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-win-xp/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium-win/compositing/tiling/rotated-tiled-clamped-expected.png: Added.
* platform/chromium-win/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.png: Added.
* platform/chromium-win/platform/chromium/virtual/gpu/compositedscrolling/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium-win/platform/chromium/virtual/gpu/compositedscrolling/overflow/overflow-scroll-expected.txt: Added.
* platform/chromium-win/platform/chromium/virtual/gpu/compositedscrolling/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.png: Added.
* platform/chromium-win/platform/chromium/virtual/softwarecompositing/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium-win/platform/chromium/virtual/softwarecompositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.png: Added.
* platform/chromium/TestExpectations:
* platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt: Copied from LayoutTests/platform/chromium-linux/platform/chromium/virtual/gpu/compositedscrolling/overflow/composited-scrolling-creates-a-stacking-container-expected.txt.
* platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.txt: Added.
* platform/chromium/platform/chromium/virtual/gpu/compositedscrolling/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer-expected.txt: Added.
* platform/chromium/platform/chromium/virtual/softwarecompositing/overflow/do-not-paint-outline-into-composited-scrolling-contents-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implemented new API for RTCStatsReport object.
https://bugs.webkit.org/show_bug.cgi?id=110333

Source/Platform:

Patch by Harald Alvestrand <hta@chromium.org> on 2013-03-08
Reviewed by Adam Barth.

* chromium/public/WebRTCStatsResponse.h:
(WebKit::WebRTCStatsResponse::WebRTCStatsResponse):
(WebRTCStatsResponse):

Source/WebCore:

Removed RTCStatsElement object, moved its interface to
RTCStatsReport. Preserved some interfaces for
backwards compatibility; will be removed in a later patch.

Patch by Harald Alvestrand <hta@chromium.org> on 2013-03-08
Reviewed by Adam Barth.

Tested by extensions to RTCPeerConnection-stats test.

* Modules/mediastream/RTCStatsElement.cpp: Removed.
* Modules/mediastream/RTCStatsElement.h: Removed.
* Modules/mediastream/RTCStatsElement.idl: Removed.
* Modules/mediastream/RTCStatsReport.cpp:
(WebCore::RTCStatsReport::create):
(WebCore::RTCStatsReport::RTCStatsReport):
(WebCore):
(WebCore::RTCStatsReport::names):
(WebCore::RTCStatsReport::local):
(WebCore::RTCStatsReport::remote):
(WebCore::RTCStatsReport::addStatistic):
(WebCore::RTCStatsReport::addElement):
* Modules/mediastream/RTCStatsReport.h:
(RTCStatsReport):
(WebCore::RTCStatsReport::timestamp):
(WebCore::RTCStatsReport::id):
(WebCore::RTCStatsReport::stat):
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::namedItem):
(WebCore):
(WebCore::RTCStatsResponse::addReport):
(WebCore::RTCStatsResponse::addStatistic):
* Modules/mediastream/RTCStatsResponse.h:
(RTCStatsResponse):
* Modules/mediastream/RTCStatsResponse.idl:
* WebCore.gypi:
* platform/chromium/support/WebRTCStatsResponse.cpp:
(WebKit::WebRTCStatsResponse::addReport):
(WebKit):
(WebKit::WebRTCStatsResponse::addStatistic):
(WebKit::WebRTCStatsResponse::addElement):
* platform/mediastream/RTCStatsResponseBase.h:
(RTCStatsResponseBase):

Tools:

Patch by Harald Alvestrand <hta@chromium.org> on 2013-03-08
Reviewed by Adam Barth.

* DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp:
(WebTestRunner::MockWebRTCPeerConnectionHandler::getStats):

LayoutTests:

Patch by Harald Alvestrand <hta@chromium.org> on 2013-03-08
Reviewed by Adam Barth.

* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Check to ensure MultisampleRenderbuffer creation succeeds
https://bugs.webkit.org/show_bug.cgi?id=111780

Patch by Brandon Jones <bajones@google.com> on 2013-03-08
Reviewed by Dean Jackson.

On OSX systems using AMD graphics chips the allocation of large
Multisample Renderbuffers in Chromium would fail without any indication
of failure. Attempting to draw to the buffer resulted in garbage being
rendered onscreen. This could be reproduced by opening a full-page
WebGL app and pressing (Command + "-") several times. This patch adds an
additional check during DrawingBuffer resize to verify that the resized
buffer is valid.

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

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