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

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 637033003: [CSS Grid Layout] Fix positioned grid children position and size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing FIXME related to auto determination Created 6 years 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 * 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 FloatQuad absoluteContentQuad() const; 176 FloatQuad absoluteContentQuad() const;
177 177
178 // This returns the content area of the box (excluding padding and border). The only difference with contentBoxRect is that computedCSSContentBoxRect 178 // This returns the content area of the box (excluding padding and border). The only difference with contentBoxRect is that computedCSSContentBoxRect
179 // does include the intrinsic padding in the content box as this is what som e callers expect (like getComputedStyle). 179 // does include the intrinsic padding in the content box as this is what som e callers expect (like getComputedStyle).
180 LayoutRect computedCSSContentBoxRect() const { return LayoutRect(borderLeft( ) + computedCSSPaddingLeft(), borderTop() + computedCSSPaddingTop(), clientWidth () - computedCSSPaddingLeft() - computedCSSPaddingRight(), clientHeight() - comp utedCSSPaddingTop() - computedCSSPaddingBottom()); } 180 LayoutRect computedCSSContentBoxRect() const { return LayoutRect(borderLeft( ) + computedCSSPaddingLeft(), borderTop() + computedCSSPaddingTop(), clientWidth () - computedCSSPaddingLeft() - computedCSSPaddingRight(), clientHeight() - comp utedCSSPaddingTop() - computedCSSPaddingBottom()); }
181 181
182 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override; 182 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit ionalOffset) const override;
183 183
184 // Use this with caution! No type checking is done! 184 // Use this with caution! No type checking is done!
185 RenderBox* previousSiblingBox() const; 185 RenderBox* previousSiblingBox() const;
186 RenderBox* previousInFlowSiblingBox() const;
186 RenderBox* nextSiblingBox() const; 187 RenderBox* nextSiblingBox() const;
188 RenderBox* nextInFlowSiblingBox() const;
187 RenderBox* parentBox() const; 189 RenderBox* parentBox() const;
188 190
189 bool canResize() const; 191 bool canResize() const;
190 192
191 // Visual and layout overflow are in the coordinate space of the box. This means that they aren't purely physical directions. 193 // Visual and layout overflow are in the coordinate space of the box. This means that they aren't purely physical directions.
192 // For horizontal-tb and vertical-lr they will match physical directions, bu t for horizontal-bt and vertical-rl, the top/bottom and left/right 194 // For horizontal-tb and vertical-lr they will match physical directions, bu t for horizontal-bt and vertical-rl, the top/bottom and left/right
193 // respectively are flipped when compared to their physical counterparts. F or example minX is on the left in vertical-lr, 195 // respectively are flipped when compared to their physical counterparts. F or example minX is on the left in vertical-lr,
194 // but it is on the right in vertical-rl. 196 // but it is on the right in vertical-rl.
195 LayoutRect noOverflowRect() const; 197 LayoutRect noOverflowRect() const;
196 LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layo utOverflowRect() : noOverflowRect(); } 198 LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layo utOverflowRect() : noOverflowRect(); }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 344
343 LayoutUnit overrideContainingBlockContentLogicalWidth() const; 345 LayoutUnit overrideContainingBlockContentLogicalWidth() const;
344 LayoutUnit overrideContainingBlockContentLogicalHeight() const; 346 LayoutUnit overrideContainingBlockContentLogicalHeight() const;
345 bool hasOverrideContainingBlockLogicalWidth() const; 347 bool hasOverrideContainingBlockLogicalWidth() const;
346 bool hasOverrideContainingBlockLogicalHeight() const; 348 bool hasOverrideContainingBlockLogicalHeight() const;
347 void setOverrideContainingBlockContentLogicalWidth(LayoutUnit); 349 void setOverrideContainingBlockContentLogicalWidth(LayoutUnit);
348 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); 350 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit);
349 void clearContainingBlockOverrideSize(); 351 void clearContainingBlockOverrideSize();
350 void clearOverrideContainingBlockContentLogicalHeight(); 352 void clearOverrideContainingBlockContentLogicalHeight();
351 353
354 LayoutUnit overrideInlineOffset() const;
355 LayoutUnit overrideBlockOffset() const;
356 bool hasOverrideInlineOffset() const;
357 bool hasOverrideBlockOffset() const;
358 void setOverrideInlineOffset(LayoutUnit inlineOffest);
359 void setOverrideBlockOffset(LayoutUnit blockOffest);
360 void clearOverrideInlineAndBlockOffests();
361
352 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const override; 362 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin t&, bool* offsetDependsOnPoint = 0) const override;
353 363
354 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; 364 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
355 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const ; 365 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const ;
356 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; 366 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const;
357 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons t; 367 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons t;
358 368
359 struct ComputedMarginValues { 369 struct ComputedMarginValues {
360 ComputedMarginValues() { } 370 ComputedMarginValues() { }
361 371
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 OwnPtr<RenderBoxRareData> m_rareData; 777 OwnPtr<RenderBoxRareData> m_rareData;
768 }; 778 };
769 779
770 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBox, isBox()); 780 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBox, isBox());
771 781
772 inline RenderBox* RenderBox::previousSiblingBox() const 782 inline RenderBox* RenderBox::previousSiblingBox() const
773 { 783 {
774 return toRenderBox(previousSibling()); 784 return toRenderBox(previousSibling());
775 } 785 }
776 786
787 inline RenderBox* RenderBox::previousInFlowSiblingBox() const
788 {
789 RenderBox* previous = previousSiblingBox();
790 while (previous && previous->isOutOfFlowPositioned())
791 previous = previous->previousSiblingBox();
792 return previous;
793 }
794
777 inline RenderBox* RenderBox::nextSiblingBox() const 795 inline RenderBox* RenderBox::nextSiblingBox() const
778 { 796 {
779 return toRenderBox(nextSibling()); 797 return toRenderBox(nextSibling());
780 } 798 }
781 799
800 inline RenderBox* RenderBox::nextInFlowSiblingBox() const
801 {
802 RenderBox* next = nextSiblingBox();
803 while (next && next->isOutOfFlowPositioned())
804 next = next->nextSiblingBox();
805 return next;
806 }
807
782 inline RenderBox* RenderBox::parentBox() const 808 inline RenderBox* RenderBox::parentBox() const
783 { 809 {
784 return toRenderBox(parent()); 810 return toRenderBox(parent());
785 } 811 }
786 812
787 inline RenderBox* RenderBox::firstChildBox() const 813 inline RenderBox* RenderBox::firstChildBox() const
788 { 814 {
789 return toRenderBox(slowFirstChild()); 815 return toRenderBox(slowFirstChild());
790 } 816 }
791 817
(...skipping 13 matching lines...) Expand all
805 if (UNLIKELY(inlineBoxWrapper() != 0)) 831 if (UNLIKELY(inlineBoxWrapper() != 0))
806 deleteLineBoxWrapper(); 832 deleteLineBoxWrapper();
807 } 833 }
808 834
809 ensureRareData().m_inlineBoxWrapper = boxWrapper; 835 ensureRareData().m_inlineBoxWrapper = boxWrapper;
810 } 836 }
811 837
812 } // namespace blink 838 } // namespace blink
813 839
814 #endif // RenderBox_h 840 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698