Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1250)

Side by Side Diff: Source/core/layout/LayoutFullScreen.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutFullScreen.h ('k') | Source/core/layout/LayoutGeometryMap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // if its LayoutFullScreen is destroyed. 83 // if its LayoutFullScreen is destroyed.
84 Fullscreen& fullscreen = Fullscreen::from(document()); 84 Fullscreen& fullscreen = Fullscreen::from(document());
85 if (fullscreen.fullScreenRenderer() == this) 85 if (fullscreen.fullScreenRenderer() == this)
86 fullscreen.fullScreenRendererDestroyed(); 86 fullscreen.fullScreenRendererDestroyed();
87 87
88 LayoutFlexibleBox::willBeDestroyed(); 88 LayoutFlexibleBox::willBeDestroyed();
89 } 89 }
90 90
91 void LayoutFullScreen::updateStyle() 91 void LayoutFullScreen::updateStyle()
92 { 92 {
93 RefPtr<LayoutStyle> fullscreenStyle = LayoutStyle::create(); 93 RefPtr<ComputedStyle> fullscreenStyle = ComputedStyle::create();
94 94
95 // Create a stacking context: 95 // Create a stacking context:
96 fullscreenStyle->setZIndex(INT_MAX); 96 fullscreenStyle->setZIndex(INT_MAX);
97 97
98 fullscreenStyle->setFontDescription(FontDescription()); 98 fullscreenStyle->setFontDescription(FontDescription());
99 fullscreenStyle->font().update(nullptr); 99 fullscreenStyle->font().update(nullptr);
100 100
101 fullscreenStyle->setDisplay(FLEX); 101 fullscreenStyle->setDisplay(FLEX);
102 fullscreenStyle->setJustifyContent(ContentPositionCenter); 102 fullscreenStyle->setJustifyContent(ContentPositionCenter);
103 fullscreenStyle->setAlignItems(ItemPositionCenter); 103 fullscreenStyle->setAlignItems(ItemPositionCenter);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 placeholder()->remove(); 177 placeholder()->remove();
178 remove(); 178 remove();
179 destroy(); 179 destroy();
180 } 180 }
181 181
182 void LayoutFullScreen::setPlaceholder(LayoutBlock* placeholder) 182 void LayoutFullScreen::setPlaceholder(LayoutBlock* placeholder)
183 { 183 {
184 m_placeholder = placeholder; 184 m_placeholder = placeholder;
185 } 185 }
186 186
187 void LayoutFullScreen::createPlaceholder(PassRefPtr<LayoutStyle> style, const La youtRect& frameRect) 187 void LayoutFullScreen::createPlaceholder(PassRefPtr<ComputedStyle> style, const LayoutRect& frameRect)
188 { 188 {
189 if (style->width().isAuto()) 189 if (style->width().isAuto())
190 style->setWidth(Length(frameRect.width(), Fixed)); 190 style->setWidth(Length(frameRect.width(), Fixed));
191 if (style->height().isAuto()) 191 if (style->height().isAuto())
192 style->setHeight(Length(frameRect.height(), Fixed)); 192 style->setHeight(Length(frameRect.height(), Fixed));
193 193
194 if (!m_placeholder) { 194 if (!m_placeholder) {
195 m_placeholder = new LayoutFullScreenPlaceholder(this); 195 m_placeholder = new LayoutFullScreenPlaceholder(this);
196 m_placeholder->setStyle(style); 196 m_placeholder->setStyle(style);
197 if (parent()) { 197 if (parent()) {
198 parent()->addChild(m_placeholder, this); 198 parent()->addChild(m_placeholder, this);
199 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( ); 199 parent()->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( );
200 } 200 }
201 } else { 201 } else {
202 m_placeholder->setStyle(style); 202 m_placeholder->setStyle(style);
203 } 203 }
204 } 204 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutFullScreen.h ('k') | Source/core/layout/LayoutGeometryMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698