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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.h

Issue 2304563003: Add DISABLE_CFI_PERF attribute on the methods with CFI checks disabled. (Closed)
Patch Set: InlineBox 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.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) 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* parent) cons t override; 193 LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* parent) cons t override;
194 194
195 int columnGap() const; 195 int columnGap() const;
196 196
197 // Accessors for logical width/height and margins in the containing block's block-flow direction. 197 // Accessors for logical width/height and margins in the containing block's block-flow direction.
198 LayoutUnit logicalWidthForChild(const LayoutBox& child) const { return logic alWidthForChildSize(child.size()); } 198 LayoutUnit logicalWidthForChild(const LayoutBox& child) const { return logic alWidthForChildSize(child.size()); }
199 LayoutUnit logicalWidthForChildSize(LayoutSize childSize) const { return isH orizontalWritingMode() ? childSize.width() : childSize.height(); } 199 LayoutUnit logicalWidthForChildSize(LayoutSize childSize) const { return isH orizontalWritingMode() ? childSize.width() : childSize.height(); }
200 LayoutUnit logicalHeightForChild(const LayoutBox& child) const { return isHo rizontalWritingMode() ? child.size().height() : child.size().width(); } 200 LayoutUnit logicalHeightForChild(const LayoutBox& child) const { return isHo rizontalWritingMode() ? child.size().height() : child.size().width(); }
201 LayoutSize logicalSizeForChild(const LayoutBox& child) const { return isHori zontalWritingMode() ? child.size() : child.size().transposedSize(); } 201 LayoutSize logicalSizeForChild(const LayoutBox& child) const { return isHori zontalWritingMode() ? child.size() : child.size().transposedSize(); }
202 LayoutUnit logicalTopForChild(const LayoutBox& child) const { return isHoriz ontalWritingMode() ? child.location().y() : child.location().x(); } 202 LayoutUnit logicalTopForChild(const LayoutBox& child) const { return isHoriz ontalWritingMode() ? child.location().y() : child.location().x(); }
203 LayoutUnit marginBeforeForChild(const LayoutBoxModelObject& child) const { r eturn child.marginBefore(style()); } 203 DISABLE_CFI_PERF LayoutUnit marginBeforeForChild(const LayoutBoxModelObject& child) const { return child.marginBefore(style()); }
204 LayoutUnit marginAfterForChild(const LayoutBoxModelObject& child) const { re turn child.marginAfter(style()); } 204 DISABLE_CFI_PERF LayoutUnit marginAfterForChild(const LayoutBoxModelObject& child) const { return child.marginAfter(style()); }
205 LayoutUnit marginStartForChild(const LayoutBoxModelObject& child) const { re turn child.marginStart(style()); } 205 DISABLE_CFI_PERF LayoutUnit marginStartForChild(const LayoutBoxModelObject& child) const { return child.marginStart(style()); }
206 LayoutUnit marginEndForChild(const LayoutBoxModelObject& child) const { retu rn child.marginEnd(style()); } 206 LayoutUnit marginEndForChild(const LayoutBoxModelObject& child) const { retu rn child.marginEnd(style()); }
207 void setMarginStartForChild(LayoutBox& child, LayoutUnit value) const { chil d.setMarginStart(value, style()); } 207 void setMarginStartForChild(LayoutBox& child, LayoutUnit value) const { chil d.setMarginStart(value, style()); }
208 void setMarginEndForChild(LayoutBox& child, LayoutUnit value) const { child. setMarginEnd(value, style()); } 208 void setMarginEndForChild(LayoutBox& child, LayoutUnit value) const { child. setMarginEnd(value, style()); }
209 void setMarginBeforeForChild(LayoutBox& child, LayoutUnit value) const { chi ld.setMarginBefore(value, style()); } 209 void setMarginBeforeForChild(LayoutBox& child, LayoutUnit value) const { chi ld.setMarginBefore(value, style()); }
210 void setMarginAfterForChild(LayoutBox& child, LayoutUnit value) const { chil d.setMarginAfter(value, style()); } 210 void setMarginAfterForChild(LayoutBox& child, LayoutUnit value) const { chil d.setMarginAfter(value, style()); }
211 LayoutUnit collapsedMarginBeforeForChild(const LayoutBox& child) const; 211 LayoutUnit collapsedMarginBeforeForChild(const LayoutBox& child) const;
212 LayoutUnit collapsedMarginAfterForChild(const LayoutBox& child) const; 212 LayoutUnit collapsedMarginAfterForChild(const LayoutBox& child) const;
213 213
214 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v erticalScrollbarChanged*/); 214 virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*v erticalScrollbarChanged*/);
215 215
216 LayoutUnit availableLogicalWidthForContent() const { return (logicalRightOff setForContent() - logicalLeftOffsetForContent()).clampNegativeToZero(); } 216 LayoutUnit availableLogicalWidthForContent() const { return (logicalRightOff setForContent() - logicalLeftOffsetForContent()).clampNegativeToZero(); }
217 LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingM ode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); } 217 DISABLE_CFI_PERF LayoutUnit logicalLeftOffsetForContent() const { return isH orizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop (); }
218 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); } 218 LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetFo rContent() + availableLogicalWidth(); }
219 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); } 219 LayoutUnit startOffsetForContent() const { return style()->isLeftToRightDire ction() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetFor Content(); }
220 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); } 220 LayoutUnit endOffsetForContent() const { return !style()->isLeftToRightDirec tion() ? logicalLeftOffsetForContent() : logicalWidth() - logicalRightOffsetForC ontent(); }
221 221
222 virtual LayoutUnit logicalLeftSelectionOffset(const LayoutBlock* rootBlock, LayoutUnit position) const; 222 virtual LayoutUnit logicalLeftSelectionOffset(const LayoutBlock* rootBlock, LayoutUnit position) const;
223 virtual LayoutUnit logicalRightSelectionOffset(const LayoutBlock* rootBlock, LayoutUnit position) const; 223 virtual LayoutUnit logicalRightSelectionOffset(const LayoutBlock* rootBlock, LayoutUnit position) const;
224 224
225 #if ENABLE(ASSERT) 225 #if ENABLE(ASSERT)
226 void checkPositionedObjectsNeedLayout(); 226 void checkPositionedObjectsNeedLayout();
227 #endif 227 #endif
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // This is necessary for now for interoperability between the old and new 421 // This is necessary for now for interoperability between the old and new
422 // layout code. Primarily for calling layoutPositionedObjects at the moment. 422 // layout code. Primarily for calling layoutPositionedObjects at the moment.
423 friend class NGBox; 423 friend class NGBox;
424 }; 424 };
425 425
426 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 426 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
427 427
428 } // namespace blink 428 } // namespace blink
429 429
430 #endif // LayoutBlock_h 430 #endif // LayoutBlock_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698