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

Side by Side Diff: third_party/WebKit/Source/core/dom/LayoutTreeBuilder.cpp

Issue 2202493002: NOT FOR REVIEW: Fullscreen WIP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 13 matching lines...) Expand all
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #include "core/dom/LayoutTreeBuilder.h" 28 #include "core/dom/LayoutTreeBuilder.h"
29 29
30 #include "core/HTMLNames.h" 30 #include "core/HTMLNames.h"
31 #include "core/SVGNames.h" 31 #include "core/SVGNames.h"
32 #include "core/css/resolver/StyleResolver.h" 32 #include "core/css/resolver/StyleResolver.h"
33 #include "core/dom/FirstLetterPseudoElement.h" 33 #include "core/dom/FirstLetterPseudoElement.h"
34 #include "core/dom/Fullscreen.h"
35 #include "core/dom/Node.h" 34 #include "core/dom/Node.h"
36 #include "core/dom/PseudoElement.h" 35 #include "core/dom/PseudoElement.h"
37 #include "core/dom/Text.h" 36 #include "core/dom/Text.h"
38 #include "core/dom/shadow/InsertionPoint.h" 37 #include "core/dom/shadow/InsertionPoint.h"
39 #include "core/layout/LayoutFullScreen.h"
40 #include "core/layout/LayoutObject.h" 38 #include "core/layout/LayoutObject.h"
41 #include "core/layout/LayoutText.h" 39 #include "core/layout/LayoutText.h"
42 #include "core/layout/LayoutView.h" 40 #include "core/layout/LayoutView.h"
43 #include "core/svg/SVGElement.h" 41 #include "core/svg/SVGElement.h"
44 #include "platform/RuntimeEnabledFeatures.h" 42 #include "platform/RuntimeEnabledFeatures.h"
45 43
46 namespace blink { 44 namespace blink {
47 45
48 LayoutTreeBuilderForElement::LayoutTreeBuilderForElement(Element& element, 46 LayoutTreeBuilderForElement::LayoutTreeBuilderForElement(Element& element,
49 ComputedStyle* style) 47 ComputedStyle* style)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // using inLayoutFlowThread() in the styleWillChange and styleDidChange will 134 // using inLayoutFlowThread() in the styleWillChange and styleDidChange will
137 // fail. 135 // fail.
138 newLayoutObject->setIsInsideFlowThread( 136 newLayoutObject->setIsInsideFlowThread(
139 parentLayoutObject->isInsideFlowThread()); 137 parentLayoutObject->isInsideFlowThread());
140 138
141 LayoutObject* nextLayoutObject = this->nextLayoutObject(); 139 LayoutObject* nextLayoutObject = this->nextLayoutObject();
142 m_node->setLayoutObject(newLayoutObject); 140 m_node->setLayoutObject(newLayoutObject);
143 newLayoutObject->setStyle( 141 newLayoutObject->setStyle(
144 &style); // setStyle() can depend on layoutObject() already being set. 142 &style); // setStyle() can depend on layoutObject() already being set.
145 143
146 if (Fullscreen::isCurrentFullScreenElement(*m_node)) {
147 newLayoutObject = LayoutFullScreen::wrapLayoutObject(
148 newLayoutObject, parentLayoutObject, &m_node->document());
149 if (!newLayoutObject)
150 return;
151 }
152
153 // Note: Adding newLayoutObject instead of layoutObject(). layoutObject() may 144 // Note: Adding newLayoutObject instead of layoutObject(). layoutObject() may
154 // be a child of newLayoutObject. 145 // be a child of newLayoutObject.
155 parentLayoutObject->addChild(newLayoutObject, nextLayoutObject); 146 parentLayoutObject->addChild(newLayoutObject, nextLayoutObject);
156 } 147 }
157 148
158 void LayoutTreeBuilderForText::createLayoutObject() { 149 void LayoutTreeBuilderForText::createLayoutObject() {
159 ComputedStyle& style = m_layoutObjectParent->mutableStyleRef(); 150 ComputedStyle& style = m_layoutObjectParent->mutableStyleRef();
160 151
161 DCHECK(m_node->textLayoutObjectIsNeeded(style, *m_layoutObjectParent)); 152 DCHECK(m_node->textLayoutObjectIsNeeded(style, *m_layoutObjectParent));
162 153
(...skipping 11 matching lines...) Expand all
174 m_layoutObjectParent->isInsideFlowThread()); 165 m_layoutObjectParent->isInsideFlowThread());
175 166
176 LayoutObject* nextLayoutObject = this->nextLayoutObject(); 167 LayoutObject* nextLayoutObject = this->nextLayoutObject();
177 m_node->setLayoutObject(newLayoutObject); 168 m_node->setLayoutObject(newLayoutObject);
178 // Parent takes care of the animations, no need to call setAnimatableStyle. 169 // Parent takes care of the animations, no need to call setAnimatableStyle.
179 newLayoutObject->setStyle(&style); 170 newLayoutObject->setStyle(&style);
180 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject); 171 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject);
181 } 172 }
182 173
183 } // namespace blink 174 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Fullscreen.cpp ('k') | third_party/WebKit/Source/core/dom/PseudoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698