| 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 class LayoutFullScreenPlaceholder final : public LayoutBlockFlow { | 38 class LayoutFullScreenPlaceholder final : public LayoutBlockFlow { |
| 39 public: | 39 public: |
| 40 LayoutFullScreenPlaceholder(LayoutFullScreen* owner) | 40 LayoutFullScreenPlaceholder(LayoutFullScreen* owner) |
| 41 : LayoutBlockFlow(nullptr) | 41 : LayoutBlockFlow(nullptr) |
| 42 , m_owner(owner) | 42 , m_owner(owner) |
| 43 { | 43 { |
| 44 setDocumentForAnonymous(&owner->document()); | 44 setDocumentForAnonymous(&owner->document()); |
| 45 } | 45 } |
| 46 private: | 46 private: |
| 47 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectLayoutFullScreenPlaceholder || LayoutBlockFlow::isOfType(type); } | 47 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectLayoutFullScreenPlaceholder || LayoutBlockFlow::isOfType(type); } |
| 48 virtual void willBeDestroyed() override; | 48 void willBeDestroyed() override; |
| 49 LayoutFullScreen* m_owner; | 49 LayoutFullScreen* m_owner; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 void LayoutFullScreenPlaceholder::willBeDestroyed() | 52 void LayoutFullScreenPlaceholder::willBeDestroyed() |
| 53 { | 53 { |
| 54 m_owner->setPlaceholder(nullptr); | 54 m_owner->setPlaceholder(nullptr); |
| 55 LayoutBlockFlow::willBeDestroyed(); | 55 LayoutBlockFlow::willBeDestroyed(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 LayoutFullScreen::LayoutFullScreen() | 58 LayoutFullScreen::LayoutFullScreen() |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 m_placeholder = new LayoutFullScreenPlaceholder(this); | 194 m_placeholder = new LayoutFullScreenPlaceholder(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(
LayoutInvalidationReason::Fullscreen); | 198 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
LayoutInvalidationReason::Fullscreen); |
| 199 } | 199 } |
| 200 } else { | 200 } else { |
| 201 m_placeholder->setStyle(style); | 201 m_placeholder->setStyle(style); |
| 202 } | 202 } |
| 203 } | 203 } |
| OLD | NEW |