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

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

Issue 13674002: Support intrinsic values for height, min-height and max-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSS table tests Created 7 years, 8 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/WebCore/platform/Length.h ('k') | Source/WebCore/rendering/RenderBox.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 * 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void setHeight(LayoutUnit height) { m_frameRect.setHeight(height); } 76 void setHeight(LayoutUnit height) { m_frameRect.setHeight(height); }
77 77
78 LayoutUnit logicalLeft() const { return style()->isHorizontalWritingMode() ? x() : y(); } 78 LayoutUnit logicalLeft() const { return style()->isHorizontalWritingMode() ? x() : y(); }
79 LayoutUnit logicalRight() const { return logicalLeft() + logicalWidth(); } 79 LayoutUnit logicalRight() const { return logicalLeft() + logicalWidth(); }
80 LayoutUnit logicalTop() const { return style()->isHorizontalWritingMode() ? y() : x(); } 80 LayoutUnit logicalTop() const { return style()->isHorizontalWritingMode() ? y() : x(); }
81 LayoutUnit logicalBottom() const { return logicalTop() + logicalHeight(); } 81 LayoutUnit logicalBottom() const { return logicalTop() + logicalHeight(); }
82 LayoutUnit logicalWidth() const { return style()->isHorizontalWritingMode() ? width() : height(); } 82 LayoutUnit logicalWidth() const { return style()->isHorizontalWritingMode() ? width() : height(); }
83 LayoutUnit logicalHeight() const { return style()->isHorizontalWritingMode() ? height() : width(); } 83 LayoutUnit logicalHeight() const { return style()->isHorizontalWritingMode() ? height() : width(); }
84 84
85 LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, Ren derBlock*, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) co nst; 85 LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, Ren derBlock*, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) co nst;
86 LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit) const; 86 LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, LayoutUn it intrinsicContentHeight) const;
87 LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit) const; 87 LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight , LayoutUnit intrinsicContentHeight) const;
88 88
89 int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingM ode() ? pixelSnappedHeight() : pixelSnappedWidth(); } 89 int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingM ode() ? pixelSnappedHeight() : pixelSnappedWidth(); }
90 int pixelSnappedLogicalWidth() const { return style()->isHorizontalWritingMo de() ? pixelSnappedWidth() : pixelSnappedHeight(); } 90 int pixelSnappedLogicalWidth() const { return style()->isHorizontalWritingMo de() ? pixelSnappedWidth() : pixelSnappedHeight(); }
91 91
92 void setLogicalLeft(LayoutUnit left) 92 void setLogicalLeft(LayoutUnit left)
93 { 93 {
94 if (style()->isHorizontalWritingMode()) 94 if (style()->isHorizontalWritingMode())
95 setX(left); 95 setX(left);
96 else 96 else
97 setY(left); 97 setY(left);
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWriti ngMode() ? intrinsicSize().width() : intrinsicSize().height(); } 405 LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWriti ngMode() ? intrinsicSize().width() : intrinsicSize().height(); }
406 LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWrit ingMode() ? intrinsicSize().height() : intrinsicSize().width(); } 406 LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWrit ingMode() ? intrinsicSize().height() : intrinsicSize().width(); }
407 407
408 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width 408 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width
409 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this. 409 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this.
410 bool sizesLogicalWidthToFitContent(SizeType) const; 410 bool sizesLogicalWidthToFitContent(SizeType) const;
411 411
412 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFr omLogicalTopOfFirstPage) const; 412 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFr omLogicalTopOfFirstPage) const;
413 413
414 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, L ayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegio n*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; 414 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, L ayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegio n*, LayoutUnit offsetFromLogicalTopOfFirstPage) const;
415 LayoutUnit computeLogicalHeightUsing(const Length& height) const; 415 LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit intrin sicContentHeight) const;
416 LayoutUnit computeContentLogicalHeight(const Length& height) const; 416 LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit intr insicContentHeight) const;
417 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height ) const; 417 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height , LayoutUnit intrinsicContentHeight) const;
418 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const; 418 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const;
419 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; 419 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const;
420 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const; 420 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const;
421 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const; 421 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const;
422 422
423 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const; 423 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const;
424 virtual LayoutUnit computeReplacedLogicalHeight() const; 424 virtual LayoutUnit computeReplacedLogicalHeight() const;
425 425
426 static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool outOfFlowPositioned); 426 static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool outOfFlowPositioned);
427 LayoutUnit computePercentageLogicalHeight(const Length& height) const; 427 LayoutUnit computePercentageLogicalHeight(const Length& height) const;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0); 603 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator = CompositeSourceOver, RenderObject* backgroundObject = 0);
604 604
605 void paintMaskImages(const PaintInfo&, const LayoutRect&); 605 void paintMaskImages(const PaintInfo&, const LayoutRect&);
606 606
607 BackgroundBleedAvoidance determineBackgroundBleedAvoidance(GraphicsContext*) const; 607 BackgroundBleedAvoidance determineBackgroundBleedAvoidance(GraphicsContext*) const;
608 bool backgroundHasOpaqueTopLayer() const; 608 bool backgroundHasOpaqueTopLayer() const;
609 609
610 void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegio n* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const; 610 void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegio n* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const;
611 611
612 LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, Layo utUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; 612 LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, Layo utUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
613 LayoutUnit computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLen gth, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) const;
613 614
614 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i sInlineBlockOrInlineTable(); } 615 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i sInlineBlockOrInlineTable(); }
615 616
616 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE; 617 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE;
617 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect*, RenderGeometryMap&) const OVERRIDE; 618 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj ect*, RenderGeometryMap&) const OVERRIDE;
618 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst; 619 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c onst;
619 620
620 void paintRootBoxFillLayers(const PaintInfo&); 621 void paintRootBoxFillLayers(const PaintInfo&);
621 622
622 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); 623 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } 728 }
728 729
729 inline RenderBox* RenderBox::lastChildBox() const 730 inline RenderBox* RenderBox::lastChildBox() const
730 { 731 {
731 return toRenderBox(lastChild()); 732 return toRenderBox(lastChild());
732 } 733 }
733 734
734 } // namespace WebCore 735 } // namespace WebCore
735 736
736 #endif // RenderBox_h 737 #endif // RenderBox_h
OLDNEW
« no previous file with comments | « Source/WebCore/platform/Length.h ('k') | Source/WebCore/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698