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 21 matching lines...) Expand all Loading... |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class HTMLMediaElement; | 34 class HTMLMediaElement; |
35 | 35 |
36 class LayoutMedia : public LayoutImage { | 36 class LayoutMedia : public LayoutImage { |
37 public: | 37 public: |
38 explicit LayoutMedia(HTMLMediaElement*); | 38 explicit LayoutMedia(HTMLMediaElement*); |
39 ~LayoutMedia() override; | 39 ~LayoutMedia() override; |
40 | 40 |
41 LayoutObject* firstChild() const { | 41 LayoutObject* firstChild() const { |
42 ASSERT(children() == virtualChildren()); | 42 DCHECK_EQ(children(), virtualChildren()); |
43 return children()->firstChild(); | 43 return children()->firstChild(); |
44 } | 44 } |
45 LayoutObject* lastChild() const { | 45 LayoutObject* lastChild() const { |
46 ASSERT(children() == virtualChildren()); | 46 DCHECK_EQ(children(), virtualChildren()); |
47 return children()->lastChild(); | 47 return children()->lastChild(); |
48 } | 48 } |
49 | 49 |
50 // If you have a LayoutMedia, use firstChild or lastChild instead. | 50 // If you have a LayoutMedia, use firstChild or lastChild instead. |
51 void slowFirstChild() const = delete; | 51 void slowFirstChild() const = delete; |
52 void slowLastChild() const = delete; | 52 void slowLastChild() const = delete; |
53 | 53 |
54 const LayoutObjectChildList* children() const { return &m_children; } | 54 const LayoutObjectChildList* children() const { return &m_children; } |
55 LayoutObjectChildList* children() { return &m_children; } | 55 LayoutObjectChildList* children() { return &m_children; } |
56 | 56 |
(...skipping 27 matching lines...) Expand all Loading... |
84 LayoutUnit computePanelWidth(const LayoutRect& mediaWidth) const; | 84 LayoutUnit computePanelWidth(const LayoutRect& mediaWidth) const; |
85 | 85 |
86 LayoutObjectChildList m_children; | 86 LayoutObjectChildList m_children; |
87 }; | 87 }; |
88 | 88 |
89 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); | 89 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); |
90 | 90 |
91 } // namespace blink | 91 } // namespace blink |
92 | 92 |
93 #endif // LayoutMedia_h | 93 #endif // LayoutMedia_h |
OLD | NEW |