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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutPart.cpp

Issue 2229303002: Revert "Remove extraneous frameView->setNeedsLayout() in LayoutPart" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows too. :( Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 setShouldDoFullPaintInvalidation(); 293 setShouldDoFullPaintInvalidation();
294 } 294 }
295 } 295 }
296 296
297 void LayoutPart::updateWidgetGeometry() 297 void LayoutPart::updateWidgetGeometry()
298 { 298 {
299 Widget* widget = this->widget(); 299 Widget* widget = this->widget();
300 if (!widget || !node()) // Check the node in case destroy() has been called. 300 if (!widget || !node()) // Check the node in case destroy() has been called.
301 return; 301 return;
302 302
303 LayoutRect newFrame = replacedContentRect();
304 DCHECK(newFrame.size() == roundedIntSize(newFrame.size()));
305 bool boundsWillChange = LayoutSize(widget->frameRect().size()) != newFrame.s ize();
306
307 FrameView* frameView = widget->isFrameView() ? toFrameView(widget) : nullptr ;
308
309 // If frame bounds are changing mark the view for layout. Also check the
310 // frame's page to make sure that the frame isn't in the process of being
311 // destroyed.
312 if (frameView && boundsWillChange && frameView->frame().page())
313 frameView->setNeedsLayout();
314
303 updateWidgetGeometryInternal(); 315 updateWidgetGeometryInternal();
304 316
305 // If view needs layout, either because bounds have changed or possibly 317 // If view needs layout, either because bounds have changed or possibly
306 // indicating content size is wrong, we have to do a layout to set the right 318 // indicating content size is wrong, we have to do a layout to set the right
307 // widget size. 319 // widget size.
308 FrameView* frameView = widget->isFrameView() ? toFrameView(widget) : nullptr ;
309 if (frameView && frameView->needsLayout() && frameView->frame().page()) 320 if (frameView && frameView->needsLayout() && frameView->frame().page())
310 frameView->layout(); 321 frameView->layout();
311 322
312 widget->widgetGeometryMayHaveChanged(); 323 widget->widgetGeometryMayHaveChanged();
313 } 324 }
314 325
315 void LayoutPart::updateWidgetGeometryInternal() 326 void LayoutPart::updateWidgetGeometryInternal()
316 { 327 {
317 Widget* widget = this->widget(); 328 Widget* widget = this->widget();
318 ASSERT(widget); 329 ASSERT(widget);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 369
359 bool LayoutPart::isThrottledFrameView() const 370 bool LayoutPart::isThrottledFrameView() const
360 { 371 {
361 if (!widget() || !widget()->isFrameView()) 372 if (!widget() || !widget()->isFrameView())
362 return false; 373 return false;
363 const FrameView* frameView = toFrameView(widget()); 374 const FrameView* frameView = toFrameView(widget());
364 return frameView->shouldThrottleRendering(); 375 return frameView->shouldThrottleRendering();
365 } 376 }
366 377
367 } // namespace blink 378 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698