| 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 20 matching lines...) Expand all Loading... |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 class HTMLMediaElement; | 33 class HTMLMediaElement; |
| 34 | 34 |
| 35 class RenderMedia : public RenderImage { | 35 class RenderMedia : public RenderImage { |
| 36 public: | 36 public: |
| 37 explicit RenderMedia(HTMLMediaElement*); | 37 explicit RenderMedia(HTMLMediaElement*); |
| 38 virtual ~RenderMedia(); | 38 virtual ~RenderMedia(); |
| 39 virtual void trace(Visitor*) OVERRIDE; | 39 virtual void trace(Visitor*) OVERRIDE; |
| 40 | 40 |
| 41 RenderObject* firstChild() const { ASSERT(children() == virtualChildren());
return children()->firstChild(); } | |
| 42 RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); r
eturn children()->lastChild(); } | |
| 43 | |
| 44 // If you have a RenderMedia, use firstChild or lastChild instead. | 41 // If you have a RenderMedia, use firstChild or lastChild instead. |
| 45 void slowFirstChild() const WTF_DELETED_FUNCTION; | 42 void slowFirstChild() const WTF_DELETED_FUNCTION; |
| 46 void slowLastChild() const WTF_DELETED_FUNCTION; | 43 void slowLastChild() const WTF_DELETED_FUNCTION; |
| 47 | 44 |
| 48 const RenderObjectChildList* children() const { return &m_children; } | 45 const RenderObjectChildList* children() const { return &m_children; } |
| 49 RenderObjectChildList* children() { return &m_children; } | 46 RenderObjectChildList* children() { return &m_children; } |
| 50 | 47 |
| 51 HTMLMediaElement* mediaElement() const; | 48 HTMLMediaElement* mediaElement() const; |
| 52 | 49 |
| 53 protected: | 50 protected: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 70 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) OVERRIDE; | 67 virtual void paintReplaced(PaintInfo&, const LayoutPoint&) OVERRIDE; |
| 71 | 68 |
| 72 RenderObjectChildList m_children; | 69 RenderObjectChildList m_children; |
| 73 }; | 70 }; |
| 74 | 71 |
| 75 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMedia, isMedia()); | 72 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMedia, isMedia()); |
| 76 | 73 |
| 77 } // namespace blink | 74 } // namespace blink |
| 78 | 75 |
| 79 #endif // RenderMedia_h | 76 #endif // RenderMedia_h |
| OLD | NEW |