Chromium Code Reviews

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

Issue 1317643005: [css-grid] Fix track sizing algo w/ size restrictions and intrinsic sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New design Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 507 matching lines...)
518 518
519 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width 519 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width
520 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this. 520 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this.
521 bool sizesLogicalWidthToFitContent(const Length& logicalWidth) const; 521 bool sizesLogicalWidthToFitContent(const Length& logicalWidth) const;
522 522
523 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const LayoutBlockFlow* cb) const; 523 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const LayoutBlockFlow* cb) const;
524 524
525 LayoutUnit computeLogicalWidthUsing(SizeType, const Length& logicalWidth, La youtUnit availableLogicalWidth, const LayoutBlock* containingBlock) const; 525 LayoutUnit computeLogicalWidthUsing(SizeType, const Length& logicalWidth, La youtUnit availableLogicalWidth, const LayoutBlock* containingBlock) const;
526 LayoutUnit computeLogicalHeightUsing(SizeType, const Length& height, LayoutU nit intrinsicContentHeight) const; 526 LayoutUnit computeLogicalHeightUsing(SizeType, const Length& height, LayoutU nit intrinsicContentHeight) const;
527 LayoutUnit computeContentLogicalHeight(SizeType, const Length& height, Layou tUnit intrinsicContentHeight) const; 527 LayoutUnit computeContentLogicalHeight(SizeType, const Length& height, Layou tUnit intrinsicContentHeight) const;
528 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Leng th& height, LayoutUnit intrinsicContentHeight) const; 528 virtual LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, co nst Length& height, LayoutUnit intrinsicContentHeight) const;
529 LayoutUnit computeReplacedLogicalWidthUsing(SizeType, const Length& width) c onst; 529 LayoutUnit computeReplacedLogicalWidthUsing(SizeType, const Length& width) c onst;
530 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; 530 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const;
531 LayoutUnit computeReplacedLogicalHeightUsing(SizeType, const Length& height) const; 531 LayoutUnit computeReplacedLogicalHeightUsing(SizeType, const Length& height) const;
532 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const; 532 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const;
533 533
534 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const; 534 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const;
535 virtual LayoutUnit computeReplacedLogicalHeight() const; 535 virtual LayoutUnit computeReplacedLogicalHeight() const;
536 536
537 bool hasDefiniteLogicalWidth() const; 537 bool hasDefiniteLogicalWidth() const;
538 bool percentageLogicalHeightIsResolvable() const; 538 bool percentageLogicalHeightIsResolvable() const;
(...skipping 192 matching lines...)
731 731
732 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect. 732 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect.
733 // FIXME: make this a const method once the LayoutBox reference in BoxPainte r is const. 733 // FIXME: make this a const method once the LayoutBox reference in BoxPainte r is const.
734 bool getBackgroundPaintedExtent(LayoutRect&); 734 bool getBackgroundPaintedExtent(LayoutRect&);
735 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const; 735 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const;
736 bool computeBackgroundIsKnownToBeObscured() override; 736 bool computeBackgroundIsKnownToBeObscured() override;
737 737
738 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; 738 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const;
739 739
740 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; 740 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
741 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons t; 741 virtual LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& l ogicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPaddi ng) const;
742 742
743 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i sInlineBlockOrInlineTable(); } 743 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i sInlineBlockOrInlineTable(); }
744 744
745 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override; 745 void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override;
746 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove rride; 746 void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const ove rride;
747 747
748 LayoutObject* splitAnonymousBoxesAroundChild(LayoutObject* beforeChild); 748 LayoutObject* splitAnonymousBoxesAroundChild(LayoutObject* beforeChild);
749 749
750 void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintLayer* cu rrentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containe rRect) const override; 750 void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintLayer* cu rrentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containe rRect) const override;
751 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf fset) const override; 751 void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint& layerOf fset) const override;
(...skipping 185 matching lines...)
937 if (UNLIKELY(inlineBoxWrapper() != nullptr)) 937 if (UNLIKELY(inlineBoxWrapper() != nullptr))
938 deleteLineBoxWrapper(); 938 deleteLineBoxWrapper();
939 } 939 }
940 940
941 ensureRareData().m_inlineBoxWrapper = boxWrapper; 941 ensureRareData().m_inlineBoxWrapper = boxWrapper;
942 } 942 }
943 943
944 } // namespace blink 944 } // namespace blink
945 945
946 #endif // LayoutBox_h 946 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine