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

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

Issue 1804963005: Avoid paintInvalidationContainer parameter of invalidatePaintIfNeeded() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 LayoutSize oldSize = size(); 71 LayoutSize oldSize = size();
72 updateLogicalWidth(); 72 updateLogicalWidth();
73 updateLogicalHeight(); 73 updateLogicalHeight();
74 if (oldSize == size()) 74 if (oldSize == size())
75 return; 75 return;
76 76
77 if (!selfNeedsLayout()) 77 if (!selfNeedsLayout())
78 setNeedsLayout(LayoutInvalidationReason::SizeChanged); 78 setNeedsLayout(LayoutInvalidationReason::SizeChanged);
79 } 79 }
80 80
81 PaintInvalidationReason LayoutHTMLCanvas::invalidatePaintIfNeeded(PaintInvalidat ionState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationC ontainer) 81 PaintInvalidationReason LayoutHTMLCanvas::invalidatePaintIfNeeded(const PaintInv alidationState& paintInvalidationState)
82 { 82 {
83 PaintInvalidationReason reason = LayoutBox::invalidatePaintIfNeeded(paintInv alidationState, paintInvalidationContainer); 83 PaintInvalidationReason reason = LayoutBox::invalidatePaintIfNeeded(paintInv alidationState);
84 HTMLCanvasElement* element = toHTMLCanvasElement(node()); 84 HTMLCanvasElement* element = toHTMLCanvasElement(node());
85 if (element->isDirty()) { 85 if (element->isDirty()) {
86 element->doDeferredPaintInvalidation(); 86 element->doDeferredPaintInvalidation();
87 if (reason < PaintInvalidationRectangle) 87 if (reason < PaintInvalidationRectangle)
88 reason = PaintInvalidationRectangle; 88 reason = PaintInvalidationRectangle;
89 } 89 }
90 return reason; 90 return reason;
91 } 91 }
92 92
93 CompositingReasons LayoutHTMLCanvas::additionalCompositingReasons() const 93 CompositingReasons LayoutHTMLCanvas::additionalCompositingReasons() const
94 { 94 {
95 if (toHTMLCanvasElement(node())->shouldBeDirectComposited()) 95 if (toHTMLCanvasElement(node())->shouldBeDirectComposited())
96 return CompositingReasonCanvas; 96 return CompositingReasonCanvas;
97 return CompositingReasonNone; 97 return CompositingReasonNone;
98 } 98 }
99 99
100 void LayoutHTMLCanvas::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle) 100 void LayoutHTMLCanvas::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
101 { 101 {
102 LayoutReplaced::styleDidChange(diff, oldStyle); 102 LayoutReplaced::styleDidChange(diff, oldStyle);
103 toHTMLCanvasElement(node())->styleDidChange(oldStyle, styleRef()); 103 toHTMLCanvasElement(node())->styleDidChange(oldStyle, styleRef());
104 } 104 }
105 105
106 } // namespace blink 106 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698