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

Side by Side Diff: Source/core/layout/LayoutBox.h

Issue 1318713003: Make classes and structures in core/layout fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/core/layout/LayoutBlockFlow.h ('k') | Source/core/layout/LayoutFrameSet.h » ('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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 void clearExtraInlineAndBlockOffests(); 429 void clearExtraInlineAndBlockOffests();
430 430
431 LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoint&, bool * offsetDependsOnPoint = nullptr) const override; 431 LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoint&, bool * offsetDependsOnPoint = nullptr) const override;
432 432
433 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; 433 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
434 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const ; 434 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const ;
435 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; 435 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
436 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons t; 436 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons t;
437 437
438 struct ComputedMarginValues { 438 struct ComputedMarginValues {
439 DISALLOW_ALLOCATION();
439 ComputedMarginValues() { } 440 ComputedMarginValues() { }
440 441
441 LayoutUnit m_before; 442 LayoutUnit m_before;
442 LayoutUnit m_after; 443 LayoutUnit m_after;
443 LayoutUnit m_start; 444 LayoutUnit m_start;
444 LayoutUnit m_end; 445 LayoutUnit m_end;
445 }; 446 };
446 struct LogicalExtentComputedValues { 447 struct LogicalExtentComputedValues {
448 STACK_ALLOCATED();
447 LogicalExtentComputedValues() { } 449 LogicalExtentComputedValues() { }
448 450
449 LayoutUnit m_extent; 451 LayoutUnit m_extent;
450 LayoutUnit m_position; 452 LayoutUnit m_position;
451 ComputedMarginValues m_margins; 453 ComputedMarginValues m_margins;
452 }; 454 };
453 // Resolve auto margins in the chosen direction of the containing block so t hat objects can be pushed to the start, middle or end 455 // Resolve auto margins in the chosen direction of the containing block so t hat objects can be pushed to the start, middle or end
454 // of the containing block. 456 // of the containing block.
455 void computeMarginsForDirection(MarginDirection forDirection, const LayoutBl ock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUn it& marginStart, LayoutUnit& marginEnd, Length marginStartLength, Length marginS tartEnd) const; 457 void computeMarginsForDirection(MarginDirection forDirection, const LayoutBl ock* containingBlock, LayoutUnit containerWidth, LayoutUnit childWidth, LayoutUn it& marginStart, LayoutUnit& marginEnd, Length marginStartLength, Length marginS tartEnd) const;
456 458
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 if (UNLIKELY(inlineBoxWrapper() != nullptr)) 932 if (UNLIKELY(inlineBoxWrapper() != nullptr))
931 deleteLineBoxWrapper(); 933 deleteLineBoxWrapper();
932 } 934 }
933 935
934 ensureRareData().m_inlineBoxWrapper = boxWrapper; 936 ensureRareData().m_inlineBoxWrapper = boxWrapper;
935 } 937 }
936 938
937 } // namespace blink 939 } // namespace blink
938 940
939 #endif // LayoutBox_h 941 #endif // LayoutBox_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlockFlow.h ('k') | Source/core/layout/LayoutFrameSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698