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

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

Issue 8386021: Merge 98935 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « LayoutTests/fullscreen/anonymous-block-merge-crash-expected.txt ('k') | no next file » | 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 document->setFullScreenRenderer(fullscreenRenderer); 119 document->setFullScreenRenderer(fullscreenRenderer);
120 if (fullscreenRenderer->placeholder()) 120 if (fullscreenRenderer->placeholder())
121 return fullscreenRenderer->placeholder(); 121 return fullscreenRenderer->placeholder();
122 return fullscreenRenderer; 122 return fullscreenRenderer;
123 } 123 }
124 124
125 void RenderFullScreen::unwrapRenderer() 125 void RenderFullScreen::unwrapRenderer()
126 { 126 {
127 RenderObject* holder = placeholder() ? placeholder() : this; 127 RenderObject* holder = placeholder() ? placeholder() : this;
128 RenderObject* parent = holder->parent(); 128 if (holder->parent()) {
129 if (parent) { 129 RenderObject* child;
130 RenderObject* child = firstChild(); 130 while ((child = firstChild())) {
131 while (child) {
132 RenderObject* nextChild = child->nextSibling();
133 child->remove(); 131 child->remove();
134 parent->addChild(child, holder); 132 holder->parent()->addChild(child, holder);
135 child = nextChild;
136 } 133 }
137 } 134 }
138 remove(); 135 remove();
139 document()->setFullScreenRenderer(0); 136 document()->setFullScreenRenderer(0);
140 } 137 }
141 138
142 void RenderFullScreen::setPlaceholder(RenderBlock* placeholder) 139 void RenderFullScreen::setPlaceholder(RenderBlock* placeholder)
143 { 140 {
144 m_placeholder = placeholder; 141 m_placeholder = placeholder;
145 } 142 }
(...skipping 11 matching lines...) Expand all
157 if (parent()) { 154 if (parent()) {
158 parent()->addChild(m_placeholder, this); 155 parent()->addChild(m_placeholder, this);
159 remove(); 156 remove();
160 } 157 }
161 m_placeholder->addChild(this); 158 m_placeholder->addChild(this);
162 } else 159 } else
163 m_placeholder->setStyle(style); 160 m_placeholder->setStyle(style);
164 } 161 }
165 162
166 #endif 163 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fullscreen/anonymous-block-merge-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698