| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 RefPtr<ComputedStyle> fullscreenStyle = ComputedStyle::create(); | 97 RefPtr<ComputedStyle> fullscreenStyle = ComputedStyle::create(); |
| 98 | 98 |
| 99 // Create a stacking context: | 99 // Create a stacking context: |
| 100 fullscreenStyle->setZIndex(INT_MAX); | 100 fullscreenStyle->setZIndex(INT_MAX); |
| 101 | 101 |
| 102 fullscreenStyle->setFontDescription(FontDescription()); | 102 fullscreenStyle->setFontDescription(FontDescription()); |
| 103 fullscreenStyle->font().update(nullptr); | 103 fullscreenStyle->font().update(nullptr); |
| 104 | 104 |
| 105 fullscreenStyle->setDisplay(FLEX); | 105 fullscreenStyle->setDisplay(FLEX); |
| 106 fullscreenStyle->setJustifyContentPosition(ContentPositionCenter); | 106 fullscreenStyle->setJustifyContentPosition(ContentPositionCenter); |
| 107 fullscreenStyle->setAlignItemsPosition(ItemPositionCenter); | |
| 108 fullscreenStyle->setFlexDirection(FlowColumn); | 107 fullscreenStyle->setFlexDirection(FlowColumn); |
| 109 | 108 |
| 110 fullscreenStyle->setPosition(FixedPosition); | 109 fullscreenStyle->setPosition(FixedPosition); |
| 111 fullscreenStyle->setLeft(Length(0, blink::Fixed)); | 110 fullscreenStyle->setLeft(Length(0, blink::Fixed)); |
| 112 fullscreenStyle->setTop(Length(0, blink::Fixed)); | 111 fullscreenStyle->setTop(Length(0, blink::Fixed)); |
| 113 IntSize viewportSize = document().page()->frameHost().visualViewport().size(
); | 112 IntSize viewportSize = document().page()->frameHost().visualViewport().size(
); |
| 114 fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed)); | 113 fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed)); |
| 115 fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed)); | 114 fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed)); |
| 116 | 115 |
| 117 fullscreenStyle->setBackgroundColor(StyleColor(Color::black)); | 116 fullscreenStyle->setBackgroundColor(StyleColor(Color::black)); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 m_placeholder->setStyleWithWritingModeOfParent(style); | 195 m_placeholder->setStyleWithWritingModeOfParent(style); |
| 197 if (parent()) { | 196 if (parent()) { |
| 198 parent()->addChildWithWritingModeOfParent(m_placeholder, this); | 197 parent()->addChildWithWritingModeOfParent(m_placeholder, this); |
| 199 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
LayoutInvalidationReason::Fullscreen); | 198 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
LayoutInvalidationReason::Fullscreen); |
| 200 } | 199 } |
| 201 } else { | 200 } else { |
| 202 m_placeholder->setStyle(style); | 201 m_placeholder->setStyle(style); |
| 203 m_placeholder->setStyleWithWritingModeOfParent(style); | 202 m_placeholder->setStyleWithWritingModeOfParent(style); |
| 204 } | 203 } |
| 205 } | 204 } |
| OLD | NEW |