blob: 73cd32b8eff406d5026bfd086c43b22fbbcc8dd6 [file] [log] [blame]
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +00001/*
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.org46c0f522016-11-13 10:05:43 +000025#pragma once
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000026
27#if ENABLE(FULLSCREEN_API)
28
commit-queue@webkit.org3a9a1fa2013-01-24 20:16:39 +000029#include "RenderFlexibleBox.h"
commit-queue@webkit.orgd0c076d2012-08-22 22:25:59 +000030#include "StyleInheritedData.h"
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000031
32namespace WebCore {
33
andersca@apple.com16d2dd42014-01-16 23:08:24 +000034class RenderFullScreen final : public RenderFlexibleBox {
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000035public:
antti@apple.com454418f2016-04-25 19:49:23 +000036 RenderFullScreen(Document&, RenderStyle&&);
antti@apple.com6310f612013-01-19 14:34:36 +000037
darin@apple.com11ff47c2016-03-04 16:47:55 +000038 const char* renderName() const override { return "RenderFullScreen"; }
jer.noble@apple.com5346d012011-06-03 18:48:15 +000039
jer.noble@apple.com572d78c2014-04-24 22:48:32 +000040 void setPlaceholder(RenderBlock*);
jer.noble@apple.com5346d012011-06-03 18:48:15 +000041 RenderBlock* placeholder() { return m_placeholder; }
antti@apple.comde6dae7b2016-04-24 13:54:59 +000042 void createPlaceholder(std::unique_ptr<RenderStyle>, const LayoutRect& frameRect);
koz@chromium.org24394b42011-09-17 06:07:42 +000043
jer.noble@apple.com572d78c2014-04-24 22:48:32 +000044 static RenderFullScreen* wrapRenderer(RenderObject*, RenderElement*, Document&);
antti@apple.com18be74e2014-07-01 15:16:24 +000045 void unwrapRenderer(bool& requiresRenderTreeRebuild);
simon.fraser@apple.com73cb0b32011-07-09 00:43:14 +000046
47private:
darin@apple.com11ff47c2016-03-04 16:47:55 +000048 bool isRenderFullScreen() const override { return true; }
49 void willBeDestroyed() override;
svillar@igalia.come2c93522015-09-10 11:58:24 +000050 bool isFlexibleBoxImpl() const override { return true; }
antti@apple.com6310f612013-01-19 14:34:36 +000051
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000052protected:
jer.noble@apple.com5346d012011-06-03 18:48:15 +000053 RenderBlock* m_placeholder;
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000054};
gyuyoung.kim@samsung.comb0b17cd2013-10-24 01:30:20 +000055
cdumez@apple.comf85e2f62014-10-07 00:26:25 +000056} // namespace WebCore
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000057
cdumez@apple.comf85e2f62014-10-07 00:26:25 +000058SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderFullScreen, isRenderFullScreen())
jer.noble@apple.comd9d59ff2011-01-07 22:45:47 +000059
cdumez@apple.comf85e2f62014-10-07 00:26:25 +000060#endif // ENABLE(FULLSCREEN_API)