jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY |
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 15 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 16 | * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 17 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 18 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 19 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
| 20 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 21 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 22 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 | */ |
| 24 | |
commit-queue@webkit.org | 46c0f52 | 2016-11-13 10:05:43 +0000 | [diff] [blame] | 25 | #pragma once |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 26 | |
| 27 | #if ENABLE(FULLSCREEN_API) |
| 28 | |
commit-queue@webkit.org | 3a9a1fa | 2013-01-24 20:16:39 +0000 | [diff] [blame] | 29 | #include "RenderFlexibleBox.h" |
commit-queue@webkit.org | d0c076d | 2012-08-22 22:25:59 +0000 | [diff] [blame] | 30 | #include "StyleInheritedData.h" |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 31 | |
| 32 | namespace WebCore { |
| 33 | |
andersca@apple.com | 16d2dd4 | 2014-01-16 23:08:24 +0000 | [diff] [blame] | 34 | class RenderFullScreen final : public RenderFlexibleBox { |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 35 | public: |
antti@apple.com | 454418f | 2016-04-25 19:49:23 +0000 | [diff] [blame] | 36 | RenderFullScreen(Document&, RenderStyle&&); |
antti@apple.com | 6310f61 | 2013-01-19 14:34:36 +0000 | [diff] [blame] | 37 | |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 38 | const char* renderName() const override { return "RenderFullScreen"; } |
jer.noble@apple.com | 5346d01 | 2011-06-03 18:48:15 +0000 | [diff] [blame] | 39 | |
jer.noble@apple.com | 572d78c | 2014-04-24 22:48:32 +0000 | [diff] [blame] | 40 | void setPlaceholder(RenderBlock*); |
jer.noble@apple.com | 5346d01 | 2011-06-03 18:48:15 +0000 | [diff] [blame] | 41 | RenderBlock* placeholder() { return m_placeholder; } |
antti@apple.com | de6dae7b | 2016-04-24 13:54:59 +0000 | [diff] [blame] | 42 | void createPlaceholder(std::unique_ptr<RenderStyle>, const LayoutRect& frameRect); |
koz@chromium.org | 24394b4 | 2011-09-17 06:07:42 +0000 | [diff] [blame] | 43 | |
jer.noble@apple.com | 572d78c | 2014-04-24 22:48:32 +0000 | [diff] [blame] | 44 | static RenderFullScreen* wrapRenderer(RenderObject*, RenderElement*, Document&); |
antti@apple.com | 18be74e | 2014-07-01 15:16:24 +0000 | [diff] [blame] | 45 | void unwrapRenderer(bool& requiresRenderTreeRebuild); |
simon.fraser@apple.com | 73cb0b3 | 2011-07-09 00:43:14 +0000 | [diff] [blame] | 46 | |
| 47 | private: |
darin@apple.com | 11ff47c | 2016-03-04 16:47:55 +0000 | [diff] [blame] | 48 | bool isRenderFullScreen() const override { return true; } |
| 49 | void willBeDestroyed() override; |
svillar@igalia.com | e2c9352 | 2015-09-10 11:58:24 +0000 | [diff] [blame] | 50 | bool isFlexibleBoxImpl() const override { return true; } |
antti@apple.com | 6310f61 | 2013-01-19 14:34:36 +0000 | [diff] [blame] | 51 | |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 52 | protected: |
jer.noble@apple.com | 5346d01 | 2011-06-03 18:48:15 +0000 | [diff] [blame] | 53 | RenderBlock* m_placeholder; |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 54 | }; |
gyuyoung.kim@samsung.com | b0b17cd | 2013-10-24 01:30:20 +0000 | [diff] [blame] | 55 | |
cdumez@apple.com | f85e2f6 | 2014-10-07 00:26:25 +0000 | [diff] [blame] | 56 | } // namespace WebCore |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 57 | |
cdumez@apple.com | f85e2f6 | 2014-10-07 00:26:25 +0000 | [diff] [blame] | 58 | SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderFullScreen, isRenderFullScreen()) |
jer.noble@apple.com | d9d59ff | 2011-01-07 22:45:47 +0000 | [diff] [blame] | 59 | |
cdumez@apple.com | f85e2f6 | 2014-10-07 00:26:25 +0000 | [diff] [blame] | 60 | #endif // ENABLE(FULLSCREEN_API) |