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

Unified Diff: Source/core/rendering/RenderHTMLCanvas.cpp

Issue 828163002: Don't check for layout in a canvas if it it's already needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 11 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 | « LayoutTests/fast/block/crash-when-element-becomes-positioned-and-doesnt-clear-floating-objects-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderHTMLCanvas.cpp
diff --git a/Source/core/rendering/RenderHTMLCanvas.cpp b/Source/core/rendering/RenderHTMLCanvas.cpp
index a98c72cda9b5cf3293607dbb3a786f2ec4fb04d0..a09c9fac38b4c60db4aad69415c65de73845f1bd 100644
--- a/Source/core/rendering/RenderHTMLCanvas.cpp
+++ b/Source/core/rendering/RenderHTMLCanvas.cpp
@@ -71,14 +71,16 @@ void RenderHTMLCanvas::canvasSizeChanged()
if (!preferredLogicalWidthsDirty())
setPreferredLogicalWidthsDirty();
+ if (selfNeedsLayout())
+ return;
+
LayoutSize oldSize = size();
updateLogicalWidth();
updateLogicalHeight();
if (oldSize == size())
return;
- if (!selfNeedsLayout())
- setNeedsLayout();
+ setNeedsLayout();
}
CompositingReasons RenderHTMLCanvas::additionalCompositingReasons() const
« no previous file with comments | « LayoutTests/fast/block/crash-when-element-becomes-positioned-and-doesnt-clear-floating-objects-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698