| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // check above is insufficient because updateLogical{Width,Height} just | 76 // check above is insufficient because updateLogical{Width,Height} just |
| 77 // used the override size. We actually have to mark ourselves as needing | 77 // used the override size. We actually have to mark ourselves as needing |
| 78 // layout so the flex algorithm can run and compute our size correctly. | 78 // layout so the flex algorithm can run and compute our size correctly. |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 | 81 |
| 82 if (!SelfNeedsLayout()) | 82 if (!SelfNeedsLayout()) |
| 83 SetNeedsLayout(LayoutInvalidationReason::kSizeChanged); | 83 SetNeedsLayout(LayoutInvalidationReason::kSizeChanged); |
| 84 } | 84 } |
| 85 | 85 |
| 86 PaintInvalidationReason LayoutHTMLCanvas::InvalidatePaintIfNeeded( | 86 PaintInvalidationReason LayoutHTMLCanvas::InvalidatePaint( |
| 87 const PaintInvalidatorContext& context) const { | 87 const PaintInvalidatorContext& context) const { |
| 88 return HTMLCanvasPaintInvalidator(*this, context).InvalidatePaintIfNeeded(); | 88 return HTMLCanvasPaintInvalidator(*this, context).InvalidatePaint(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 CompositingReasons LayoutHTMLCanvas::AdditionalCompositingReasons() const { | 91 CompositingReasons LayoutHTMLCanvas::AdditionalCompositingReasons() const { |
| 92 if (toHTMLCanvasElement(GetNode())->ShouldBeDirectComposited()) | 92 if (toHTMLCanvasElement(GetNode())->ShouldBeDirectComposited()) |
| 93 return kCompositingReasonCanvas; | 93 return kCompositingReasonCanvas; |
| 94 return kCompositingReasonNone; | 94 return kCompositingReasonNone; |
| 95 } | 95 } |
| 96 | 96 |
| 97 void LayoutHTMLCanvas::StyleDidChange(StyleDifference diff, | 97 void LayoutHTMLCanvas::StyleDidChange(StyleDifference diff, |
| 98 const ComputedStyle* old_style) { | 98 const ComputedStyle* old_style) { |
| 99 LayoutReplaced::StyleDidChange(diff, old_style); | 99 LayoutReplaced::StyleDidChange(diff, old_style); |
| 100 toHTMLCanvasElement(GetNode())->StyleDidChange(old_style, StyleRef()); | 100 toHTMLCanvasElement(GetNode())->StyleDidChange(old_style, StyleRef()); |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace blink | 103 } // namespace blink |
| OLD | NEW |