| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 void slowFirstChild() const = delete; | 44 void slowFirstChild() const = delete; |
| 45 void slowLastChild() const = delete; | 45 void slowLastChild() const = delete; |
| 46 | 46 |
| 47 const LayoutObjectChildList* children() const { return &m_children; } | 47 const LayoutObjectChildList* children() const { return &m_children; } |
| 48 LayoutObjectChildList* children() { return &m_children; } | 48 LayoutObjectChildList* children() { return &m_children; } |
| 49 | 49 |
| 50 HTMLMediaElement* mediaElement() const; | 50 HTMLMediaElement* mediaElement() const; |
| 51 | 51 |
| 52 const char* name() const override { return "LayoutMedia"; } | 52 const char* name() const override { return "LayoutMedia"; } |
| 53 | 53 |
| 54 // Temporary callback for crbug.com/587345,402044 |
| 55 void notifyPositionMayHaveChanged(const IntRect&); |
| 56 |
| 57 // Change whether we want or don't want to receive position change |
| 58 // notifications. This will cause us to start / stop receiving change |
| 59 // notifications if possible. |
| 60 // Temporary method for crbug.com/587345,402044 |
| 61 void setRequestPositionUpdates(bool); |
| 62 |
| 54 protected: | 63 protected: |
| 64 // Temporary overrides for crbug.com/587345,402044 |
| 65 void willBeDestroyed() override; |
| 66 void insertedIntoTree() override; |
| 67 |
| 55 void layout() override; | 68 void layout() override; |
| 56 | 69 |
| 57 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectMedia || LayoutImage::isOfType(type); } | 70 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectMedia || LayoutImage::isOfType(type); } |
| 58 | 71 |
| 59 private: | 72 private: |
| 60 LayoutObjectChildList* virtualChildren() final { return children(); } | 73 LayoutObjectChildList* virtualChildren() final { return children(); } |
| 61 const LayoutObjectChildList* virtualChildren() const final { return children
(); } | 74 const LayoutObjectChildList* virtualChildren() const final { return children
(); } |
| 62 | 75 |
| 63 PaintLayerType layerTypeRequired() const override { return NormalPaintLayer;
} | 76 PaintLayerType layerTypeRequired() const override { return NormalPaintLayer;
} |
| 64 | 77 |
| 65 bool canHaveChildren() const final { return true; } | 78 bool canHaveChildren() const final { return true; } |
| 66 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const final; | 79 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const final; |
| 67 | 80 |
| 68 bool isImage() const final { return false; } | 81 bool isImage() const final { return false; } |
| 69 void paintReplaced(const PaintInfo&, const LayoutPoint&) const override; | 82 void paintReplaced(const PaintInfo&, const LayoutPoint&) const override; |
| 70 | 83 |
| 71 bool backgroundShouldAlwaysBeClipped() const final { return false; } | 84 bool backgroundShouldAlwaysBeClipped() const final { return false; } |
| 72 | 85 |
| 73 LayoutObjectChildList m_children; | 86 LayoutObjectChildList m_children; |
| 74 }; | 87 }; |
| 75 | 88 |
| 76 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); | 89 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); |
| 77 | 90 |
| 78 } // namespace blink | 91 } // namespace blink |
| 79 | 92 |
| 80 #endif // LayoutMedia_h | 93 #endif // LayoutMedia_h |
| OLD | NEW |