OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 | 32 |
33 class RenderFullScreenPlaceholder FINAL : public RenderBlockFlow { | 33 class RenderFullScreenPlaceholder FINAL : public RenderBlockFlow { |
34 public: | 34 public: |
35 RenderFullScreenPlaceholder(RenderFullScreen* owner) | 35 RenderFullScreenPlaceholder(RenderFullScreen* owner) |
36 : RenderBlockFlow(0) | 36 : RenderBlockFlow(0) |
37 , m_owner(owner) | 37 , m_owner(owner) |
38 { | 38 { |
39 setDocumentForAnonymous(&owner->document()); | 39 setDocumentForAnonymous(&owner->document()); |
40 } | 40 } |
41 private: | 41 private: |
42 virtual bool isRenderFullScreenPlaceholder() const OVERRIDE { return true; } | 42 virtual bool isOfType(RenderObjectType type) const OVERRIDE { return type ==
RenderObjectRenderFullScreenPlaceholder || RenderBlockFlow::isOfType(type); } |
43 virtual void willBeDestroyed() OVERRIDE; | 43 virtual void willBeDestroyed() OVERRIDE; |
44 RenderFullScreen* m_owner; | 44 RenderFullScreen* m_owner; |
45 }; | 45 }; |
46 | 46 |
47 void RenderFullScreenPlaceholder::willBeDestroyed() | 47 void RenderFullScreenPlaceholder::willBeDestroyed() |
48 { | 48 { |
49 m_owner->setPlaceholder(0); | 49 m_owner->setPlaceholder(0); |
50 RenderBlockFlow::willBeDestroyed(); | 50 RenderBlockFlow::willBeDestroyed(); |
51 } | 51 } |
52 | 52 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (!m_placeholder) { | 193 if (!m_placeholder) { |
194 m_placeholder = new RenderFullScreenPlaceholder(this); | 194 m_placeholder = new RenderFullScreenPlaceholder(this); |
195 m_placeholder->setStyle(style); | 195 m_placeholder->setStyle(style); |
196 if (parent()) { | 196 if (parent()) { |
197 parent()->addChild(m_placeholder, this); | 197 parent()->addChild(m_placeholder, this); |
198 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); | 198 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); |
199 } | 199 } |
200 } else | 200 } else |
201 m_placeholder->setStyle(style); | 201 m_placeholder->setStyle(style); |
202 } | 202 } |
OLD | NEW |