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 // Create a stacking context: | 99 // Create a stacking context: |
100 fullscreenStyle->setZIndex(INT_MAX); | 100 fullscreenStyle->setZIndex(INT_MAX); |
101 fullscreenStyle->setIsStackingContext(true); | 101 fullscreenStyle->setIsStackingContext(true); |
102 | 102 |
103 fullscreenStyle->setFontDescription(FontDescription()); | 103 fullscreenStyle->setFontDescription(FontDescription()); |
104 fullscreenStyle->font().update(nullptr); | 104 fullscreenStyle->font().update(nullptr); |
105 | 105 |
106 fullscreenStyle->setDisplay(FLEX); | 106 fullscreenStyle->setDisplay(FLEX); |
107 fullscreenStyle->setJustifyContentPosition(ContentPositionCenter); | 107 fullscreenStyle->setJustifyContentPosition(ContentPositionCenter); |
| 108 // TODO (lajava): Since the FullScrenn layout object is anonymous, its Defau
lt Alignment (align-items) value can't be used to resolve its children Self Alig
nment 'auto' values. |
108 fullscreenStyle->setAlignItemsPosition(ItemPositionCenter); | 109 fullscreenStyle->setAlignItemsPosition(ItemPositionCenter); |
109 fullscreenStyle->setFlexDirection(FlowColumn); | 110 fullscreenStyle->setFlexDirection(FlowColumn); |
110 | 111 |
111 fullscreenStyle->setPosition(FixedPosition); | 112 fullscreenStyle->setPosition(FixedPosition); |
112 fullscreenStyle->setLeft(Length(0, blink::Fixed)); | 113 fullscreenStyle->setLeft(Length(0, blink::Fixed)); |
113 fullscreenStyle->setTop(Length(0, blink::Fixed)); | 114 fullscreenStyle->setTop(Length(0, blink::Fixed)); |
114 IntSize viewportSize = document().page()->frameHost().visualViewport().size(
); | 115 IntSize viewportSize = document().page()->frameHost().visualViewport().size(
); |
115 fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed)); | 116 fullscreenStyle->setWidth(Length(viewportSize.width(), blink::Fixed)); |
116 fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed)); | 117 fullscreenStyle->setHeight(Length(viewportSize.height(), blink::Fixed)); |
117 | 118 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 m_placeholder->setStyleWithWritingModeOfParent(style); | 198 m_placeholder->setStyleWithWritingModeOfParent(style); |
198 if (parent()) { | 199 if (parent()) { |
199 parent()->addChildWithWritingModeOfParent(m_placeholder, this); | 200 parent()->addChildWithWritingModeOfParent(m_placeholder, this); |
200 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
LayoutInvalidationReason::Fullscreen); | 201 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
LayoutInvalidationReason::Fullscreen); |
201 } | 202 } |
202 } else { | 203 } else { |
203 m_placeholder->setStyle(style); | 204 m_placeholder->setStyle(style); |
204 m_placeholder->setStyleWithWritingModeOfParent(style); | 205 m_placeholder->setStyleWithWritingModeOfParent(style); |
205 } | 206 } |
206 } | 207 } |
OLD | NEW |