| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2009 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 class LayoutHTMLCanvas final : public LayoutReplaced { | 35 class LayoutHTMLCanvas final : public LayoutReplaced { |
| 36 public: | 36 public: |
| 37 explicit LayoutHTMLCanvas(HTMLCanvasElement*); | 37 explicit LayoutHTMLCanvas(HTMLCanvasElement*); |
| 38 | 38 |
| 39 bool IsOfType(LayoutObjectType type) const override { | 39 bool IsOfType(LayoutObjectType type) const override { |
| 40 return type == kLayoutObjectCanvas || LayoutReplaced::IsOfType(type); | 40 return type == kLayoutObjectCanvas || LayoutReplaced::IsOfType(type); |
| 41 } | 41 } |
| 42 PaintLayerType LayerTypeRequired() const override; | 42 PaintLayerType LayerTypeRequired() const override; |
| 43 | 43 |
| 44 PaintInvalidationReason InvalidatePaintIfNeeded( | 44 PaintInvalidationReason InvalidatePaint( |
| 45 const PaintInvalidatorContext&) const final; | 45 const PaintInvalidatorContext&) const final; |
| 46 | 46 |
| 47 void CanvasSizeChanged(); | 47 void CanvasSizeChanged(); |
| 48 | 48 |
| 49 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; | 49 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; |
| 50 | 50 |
| 51 const char* GetName() const override { return "LayoutHTMLCanvas"; } | 51 const char* GetName() const override { return "LayoutHTMLCanvas"; } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void PaintReplaced(const PaintInfo&, const LayoutPoint&) const override; | 54 void PaintReplaced(const PaintInfo&, const LayoutPoint&) const override; |
| 55 void IntrinsicSizeChanged() override { CanvasSizeChanged(); } | 55 void IntrinsicSizeChanged() override { CanvasSizeChanged(); } |
| 56 | 56 |
| 57 CompositingReasons AdditionalCompositingReasons() const override; | 57 CompositingReasons AdditionalCompositingReasons() const override; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutHTMLCanvas, IsCanvas()); | 60 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutHTMLCanvas, IsCanvas()); |
| 61 | 61 |
| 62 } // namespace blink | 62 } // namespace blink |
| 63 | 63 |
| 64 #endif // LayoutHTMLCanvas_h | 64 #endif // LayoutHTMLCanvas_h |
| OLD | NEW |