Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: trunk/src/content/renderer/render_widget.cc

Issue 16326004: Revert 204014 "Don't track whether a resize ack is pending durin..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/content/renderer/render_widget.h ('k') | trunk/src/content/test/layout_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/renderer/render_widget.cc
===================================================================
--- trunk/src/content/renderer/render_widget.cc (revision 204037)
+++ trunk/src/content/renderer/render_widget.cc (working copy)
@@ -373,13 +373,9 @@
const gfx::Rect& resizer_rect,
bool is_fullscreen,
ResizeAck resize_ack) {
- if (!RenderThreadImpl::current() || // Will be NULL during unit tests.
- !RenderThreadImpl::current()->layout_test_mode()) {
- // A resize ack shouldn't be requested if we have not ACK'd the previous
- // one.
- DCHECK(resize_ack != SEND_RESIZE_ACK || !next_paint_is_resize_ack());
- DCHECK(resize_ack == SEND_RESIZE_ACK || resize_ack == NO_RESIZE_ACK);
- }
+ // A resize ack shouldn't be requested if we have not ACK'd the previous one.
+ DCHECK(resize_ack != SEND_RESIZE_ACK || !next_paint_is_resize_ack());
+ DCHECK(resize_ack == SEND_RESIZE_ACK || resize_ack == NO_RESIZE_ACK);
// Ignore this during shutdown.
if (!webwidget_)
@@ -416,8 +412,7 @@
// Resize should have caused an invalidation of the entire view.
DCHECK(new_size.IsEmpty() || is_accelerated_compositing_active_ ||
paint_aggregator_.HasPendingUpdate());
- } else if (!RenderThreadImpl::current() || // Will be NULL during unit tests.
- !RenderThreadImpl::current()->layout_test_mode()) {
+ } else if (size_browser_expects_ == new_size) {
resize_ack = NO_RESIZE_ACK;
}
@@ -474,6 +469,7 @@
Resize(params.new_size, params.physical_backing_size,
params.overdraw_bottom_height, params.resizer_rect,
params.is_fullscreen, SEND_RESIZE_ACK);
+ size_browser_expects_ = params.new_size;
}
void RenderWidget::OnChangeResizeRect(const gfx::Rect& resizer_rect) {
@@ -543,6 +539,7 @@
TRACE_EVENT0("renderer", "RenderWidget::OnUpdateRectAck");
DCHECK(update_reply_pending_);
update_reply_pending_ = false;
+ size_browser_expects_ = size_;
// If we sent an UpdateRect message with a zero-sized bitmap, then we should
// have no current paint buffer.
« no previous file with comments | « trunk/src/content/renderer/render_widget.h ('k') | trunk/src/content/test/layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698