| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |