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

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

Issue 2336103003: Convert a few more CFI blacklist entries into DISABLE_CFI_PERF attributes. (Closed)
Patch Set: Created 4 years, 3 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
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 r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // FIXME: Guarding this by parentLayoutObject isn't quite right as the s pec for 75 // FIXME: Guarding this by parentLayoutObject isn't quite right as the s pec for
76 // top layer only talks about display: none ancestors so putting a <dial og> inside an 76 // top layer only talks about display: none ancestors so putting a <dial og> inside an
77 // <optgroup> seems like it should still work even though this check wil l prevent it. 77 // <optgroup> seems like it should still work even though this check wil l prevent it.
78 if (m_node->isInTopLayer()) 78 if (m_node->isInTopLayer())
79 return m_node->document().layoutView(); 79 return m_node->document().layoutView();
80 } 80 }
81 81
82 return m_layoutObjectParent; 82 return m_layoutObjectParent;
83 } 83 }
84 84
85 DISABLE_CFI_PERF
85 bool LayoutTreeBuilderForElement::shouldCreateLayoutObject() const 86 bool LayoutTreeBuilderForElement::shouldCreateLayoutObject() const
86 { 87 {
87 if (!m_layoutObjectParent) 88 if (!m_layoutObjectParent)
88 return false; 89 return false;
89 90
90 // FIXME: Should the following be in SVGElement::layoutObjectIsNeeded()? 91 // FIXME: Should the following be in SVGElement::layoutObjectIsNeeded()?
91 if (m_node->isSVGElement()) { 92 if (m_node->isSVGElement()) {
92 // SVG elements only render when inside <svg>, or if the element is an < svg> itself. 93 // SVG elements only render when inside <svg>, or if the element is an < svg> itself.
93 if (!isSVGSVGElement(*m_node) && (!m_layoutObjectParent->node() || !m_la youtObjectParent->node()->isSVGElement())) 94 if (!isSVGSVGElement(*m_node) && (!m_layoutObjectParent->node() || !m_la youtObjectParent->node()->isSVGElement()))
94 return false; 95 return false;
(...skipping 10 matching lines...) Expand all
105 return m_node->layoutObjectIsNeeded(style()); 106 return m_node->layoutObjectIsNeeded(style());
106 } 107 }
107 108
108 ComputedStyle& LayoutTreeBuilderForElement::style() const 109 ComputedStyle& LayoutTreeBuilderForElement::style() const
109 { 110 {
110 if (!m_style) 111 if (!m_style)
111 m_style = m_node->styleForLayoutObject(); 112 m_style = m_node->styleForLayoutObject();
112 return *m_style; 113 return *m_style;
113 } 114 }
114 115
116 DISABLE_CFI_PERF
115 void LayoutTreeBuilderForElement::createLayoutObject() 117 void LayoutTreeBuilderForElement::createLayoutObject()
116 { 118 {
117 ComputedStyle& style = this->style(); 119 ComputedStyle& style = this->style();
118 120
119 LayoutObject* newLayoutObject = m_node->createLayoutObject(style); 121 LayoutObject* newLayoutObject = m_node->createLayoutObject(style);
120 if (!newLayoutObject) 122 if (!newLayoutObject)
121 return; 123 return;
122 124
123 LayoutObject* parentLayoutObject = this->parentLayoutObject(); 125 LayoutObject* parentLayoutObject = this->parentLayoutObject();
124 126
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 newLayoutObject->setIsInsideFlowThread(m_layoutObjectParent->isInsideFlowThr ead()); 164 newLayoutObject->setIsInsideFlowThread(m_layoutObjectParent->isInsideFlowThr ead());
163 165
164 LayoutObject* nextLayoutObject = this->nextLayoutObject(); 166 LayoutObject* nextLayoutObject = this->nextLayoutObject();
165 m_node->setLayoutObject(newLayoutObject); 167 m_node->setLayoutObject(newLayoutObject);
166 // Parent takes care of the animations, no need to call setAnimatableStyle. 168 // Parent takes care of the animations, no need to call setAnimatableStyle.
167 newLayoutObject->setStyle(&style); 169 newLayoutObject->setStyle(&style);
168 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject); 170 m_layoutObjectParent->addChild(newLayoutObject, nextLayoutObject);
169 } 171 }
170 172
171 } // namespace blink 173 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698