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(); |
| 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 void willBeRemovedFromTree() override; |
| 68 |
55 void layout() override; | 69 void layout() override; |
56 | 70 |
57 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectMedia || LayoutImage::isOfType(type); } | 71 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectMedia || LayoutImage::isOfType(type); } |
58 | 72 |
59 private: | 73 private: |
60 LayoutObjectChildList* virtualChildren() final { return children(); } | 74 LayoutObjectChildList* virtualChildren() final { return children(); } |
61 const LayoutObjectChildList* virtualChildren() const final { return children
(); } | 75 const LayoutObjectChildList* virtualChildren() const final { return children
(); } |
62 | 76 |
63 DeprecatedPaintLayerType layerTypeRequired() const override { return NormalD
eprecatedPaintLayer; } | 77 DeprecatedPaintLayerType layerTypeRequired() const override { return NormalD
eprecatedPaintLayer; } |
64 | 78 |
65 bool canHaveChildren() const final { return true; } | 79 bool canHaveChildren() const final { return true; } |
66 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const final; | 80 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const final; |
67 | 81 |
68 bool isImage() const final { return false; } | 82 bool isImage() const final { return false; } |
69 void paintReplaced(const PaintInfo&, const LayoutPoint&) override; | 83 void paintReplaced(const PaintInfo&, const LayoutPoint&) override; |
70 | 84 |
71 bool backgroundShouldAlwaysBeClipped() const final { return false; } | 85 bool backgroundShouldAlwaysBeClipped() const final { return false; } |
72 | 86 |
| 87 // Register or unregister us for position change notifications, to match |
| 88 // the argument. Takes no action if not attached to a LayoutView or |
| 89 // if we are already (un)registered correctly. |
| 90 // Temporary helper for crbug.com/587345,402044 |
| 91 void updatePositionChangeRegistration(bool); |
| 92 |
73 LayoutObjectChildList m_children; | 93 LayoutObjectChildList m_children; |
| 94 |
| 95 // Temporary state for crbug.com/587345,402044 |
| 96 bool m_registeredForPositionChangeNotifications; |
| 97 bool m_wantPositionChangeNotifications; |
74 }; | 98 }; |
75 | 99 |
76 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); | 100 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); |
77 | 101 |
78 } // namespace blink | 102 } // namespace blink |
79 | 103 |
80 #endif // LayoutMedia_h | 104 #endif // LayoutMedia_h |
OLD | NEW |