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

Side by Side Diff: Source/core/rendering/RenderFullScreen.cpp

Issue 20231002: Replace RenderArena with PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 4 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/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderImage.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 RenderFullScreen::RenderFullScreen() 52 RenderFullScreen::RenderFullScreen()
53 : RenderFlexibleBox(0) 53 : RenderFlexibleBox(0)
54 , m_placeholder(0) 54 , m_placeholder(0)
55 { 55 {
56 setReplaced(false); 56 setReplaced(false);
57 } 57 }
58 58
59 RenderFullScreen* RenderFullScreen::createAnonymous(Document* document) 59 RenderFullScreen* RenderFullScreen::createAnonymous(Document* document)
60 { 60 {
61 RenderFullScreen* renderer = new (document->renderArena()) RenderFullScreen( ); 61 RenderFullScreen* renderer = new RenderFullScreen();
62 renderer->setDocumentForAnonymous(document); 62 renderer->setDocumentForAnonymous(document);
63 return renderer; 63 return renderer;
64 } 64 }
65 65
66 void RenderFullScreen::willBeDestroyed() 66 void RenderFullScreen::willBeDestroyed()
67 { 67 {
68 if (m_placeholder) { 68 if (m_placeholder) {
69 remove(); 69 remove();
70 if (!m_placeholder->beingDestroyed()) 70 if (!m_placeholder->beingDestroyed())
71 m_placeholder->destroy(); 71 m_placeholder->destroy();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 void RenderFullScreen::createPlaceholder(PassRefPtr<RenderStyle> style, const La youtRect& frameRect) 173 void RenderFullScreen::createPlaceholder(PassRefPtr<RenderStyle> style, const La youtRect& frameRect)
174 { 174 {
175 if (style->width().isAuto()) 175 if (style->width().isAuto())
176 style->setWidth(Length(frameRect.width(), Fixed)); 176 style->setWidth(Length(frameRect.width(), Fixed));
177 if (style->height().isAuto()) 177 if (style->height().isAuto())
178 style->setHeight(Length(frameRect.height(), Fixed)); 178 style->setHeight(Length(frameRect.height(), Fixed));
179 179
180 if (!m_placeholder) { 180 if (!m_placeholder) {
181 m_placeholder = new (document()->renderArena()) RenderFullScreenPlacehol der(this); 181 m_placeholder = new RenderFullScreenPlaceholder(this);
182 m_placeholder->setStyle(style); 182 m_placeholder->setStyle(style);
183 if (parent()) { 183 if (parent()) {
184 parent()->addChild(m_placeholder, this); 184 parent()->addChild(m_placeholder, this);
185 parent()->setNeedsLayoutAndPrefWidthsRecalc(); 185 parent()->setNeedsLayoutAndPrefWidthsRecalc();
186 } 186 }
187 } else 187 } else
188 m_placeholder->setStyle(style); 188 m_placeholder->setStyle(style);
189 } 189 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFlexibleBox.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698