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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 class RenderFullScreenPlaceholder final : public RenderBlockFlow { | 39 class RenderFullScreenPlaceholder final : public RenderBlockFlow { |
40 public: | 40 public: |
41 RenderFullScreenPlaceholder(RenderFullScreen* owner) | 41 RenderFullScreenPlaceholder(RenderFullScreen* owner) |
42 : RenderBlockFlow(0) | 42 : RenderBlockFlow(0) |
43 , m_owner(owner) | 43 , m_owner(owner) |
44 { | 44 { |
45 setDocumentForAnonymous(&owner->document()); | 45 setDocumentForAnonymous(&owner->document()); |
46 } | 46 } |
47 private: | 47 private: |
48 virtual bool isRenderFullScreenPlaceholder() const override { return true; } | 48 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectRenderFullScreenPlaceholder || RenderBlockFlow::isOfType(type); } |
49 virtual void willBeDestroyed() override; | 49 virtual void willBeDestroyed() override; |
50 RenderFullScreen* m_owner; | 50 RenderFullScreen* m_owner; |
51 }; | 51 }; |
52 | 52 |
53 void RenderFullScreenPlaceholder::willBeDestroyed() | 53 void RenderFullScreenPlaceholder::willBeDestroyed() |
54 { | 54 { |
55 m_owner->setPlaceholder(0); | 55 m_owner->setPlaceholder(0); |
56 RenderBlockFlow::willBeDestroyed(); | 56 RenderBlockFlow::willBeDestroyed(); |
57 } | 57 } |
58 | 58 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 if (!m_placeholder) { | 205 if (!m_placeholder) { |
206 m_placeholder = new RenderFullScreenPlaceholder(this); | 206 m_placeholder = new RenderFullScreenPlaceholder(this); |
207 m_placeholder->setStyle(style); | 207 m_placeholder->setStyle(style); |
208 if (parent()) { | 208 if (parent()) { |
209 parent()->addChild(m_placeholder, this); | 209 parent()->addChild(m_placeholder, this); |
210 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); | 210 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
); |
211 } | 211 } |
212 } else | 212 } else |
213 m_placeholder->setStyle(style); | 213 m_placeholder->setStyle(style); |
214 } | 214 } |
OLD | NEW |