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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 { | 98 { |
99 RefPtr<RenderStyle> fullscreenStyle = RenderStyle::createDefaultStyle(); | 99 RefPtr<RenderStyle> fullscreenStyle = RenderStyle::createDefaultStyle(); |
100 | 100 |
101 // Create a stacking context: | 101 // Create a stacking context: |
102 fullscreenStyle->setZIndex(INT_MAX); | 102 fullscreenStyle->setZIndex(INT_MAX); |
103 | 103 |
104 fullscreenStyle->setFontDescription(FontDescription()); | 104 fullscreenStyle->setFontDescription(FontDescription()); |
105 fullscreenStyle->font().update(nullptr); | 105 fullscreenStyle->font().update(nullptr); |
106 | 106 |
107 fullscreenStyle->setDisplay(FLEX); | 107 fullscreenStyle->setDisplay(FLEX); |
108 fullscreenStyle->setJustifyContent(JustifyCenter); | 108 fullscreenStyle->setJustifyContent(ContentPositionCenter); |
109 fullscreenStyle->setAlignItems(ItemPositionCenter); | 109 fullscreenStyle->setAlignItems(ItemPositionCenter); |
110 fullscreenStyle->setFlexDirection(FlowColumn); | 110 fullscreenStyle->setFlexDirection(FlowColumn); |
111 | 111 |
112 fullscreenStyle->setPosition(FixedPosition); | 112 fullscreenStyle->setPosition(FixedPosition); |
113 fullscreenStyle->setLeft(Length(0, blink::Fixed)); | 113 fullscreenStyle->setLeft(Length(0, blink::Fixed)); |
114 fullscreenStyle->setTop(Length(0, blink::Fixed)); | 114 fullscreenStyle->setTop(Length(0, blink::Fixed)); |
115 if (document().page()->settings().pinchVirtualViewportEnabled()) { | 115 if (document().page()->settings().pinchVirtualViewportEnabled()) { |
116 IntSize viewportSize = document().page()->frameHost().pinchViewport().si
ze(); | 116 IntSize viewportSize = document().page()->frameHost().pinchViewport().si
ze(); |
117 fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed)); | 117 fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed)); |
118 fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed)); | 118 fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed)); |
(...skipping 86 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 |