| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 57 HTMLMediaElement* mediaElement() const; | 57 HTMLMediaElement* mediaElement() const; |
| 58 | 58 |
| 59 const char* name() const override { return "LayoutMedia"; } | 59 const char* name() const override { return "LayoutMedia"; } |
| 60 char objectSize() const override { return sizeof(this); } |
| 60 | 61 |
| 61 protected: | 62 protected: |
| 62 void layout() override; | 63 void layout() override; |
| 63 | 64 |
| 64 bool isOfType(LayoutObjectType type) const override { | 65 bool isOfType(LayoutObjectType type) const override { |
| 65 return type == LayoutObjectMedia || LayoutImage::isOfType(type); | 66 return type == LayoutObjectMedia || LayoutImage::isOfType(type); |
| 66 } | 67 } |
| 67 | 68 |
| 68 private: | 69 private: |
| 69 LayoutObjectChildList* virtualChildren() final { return children(); } | 70 LayoutObjectChildList* virtualChildren() final { return children(); } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 84 LayoutUnit computePanelWidth(const LayoutRect& mediaWidth) const; | 85 LayoutUnit computePanelWidth(const LayoutRect& mediaWidth) const; |
| 85 | 86 |
| 86 LayoutObjectChildList m_children; | 87 LayoutObjectChildList m_children; |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); | 90 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMedia, isMedia()); |
| 90 | 91 |
| 91 } // namespace blink | 92 } // namespace blink |
| 92 | 93 |
| 93 #endif // LayoutMedia_h | 94 #endif // LayoutMedia_h |
| OLD | NEW |