OLD | NEW |
---|---|
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 Loading... | |
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 // First argument is the height from style, second argument is the content h eight of the block (used for min-content/max-content) |
ojan
2013/04/11 03:21:46
In cases like this, you can just use variable name
cbiesinger
2013/04/12 01:17:52
Done.
| |
87 LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit) const; | 87 LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit, LayoutUnit) const; |
88 LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit, LayoutUnit) const; | |
88 | 89 |
89 int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingM ode() ? pixelSnappedHeight() : pixelSnappedWidth(); } | 90 int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingM ode() ? pixelSnappedHeight() : pixelSnappedWidth(); } |
90 int pixelSnappedLogicalWidth() const { return style()->isHorizontalWritingMo de() ? pixelSnappedWidth() : pixelSnappedHeight(); } | 91 int pixelSnappedLogicalWidth() const { return style()->isHorizontalWritingMo de() ? pixelSnappedWidth() : pixelSnappedHeight(); } |
91 | 92 |
92 void setLogicalLeft(LayoutUnit left) | 93 void setLogicalLeft(LayoutUnit left) |
93 { | 94 { |
94 if (style()->isHorizontalWritingMode()) | 95 if (style()->isHorizontalWritingMode()) |
95 setX(left); | 96 setX(left); |
96 else | 97 else |
97 setY(left); | 98 setY(left); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
404 virtual LayoutSize intrinsicSize() const { return LayoutSize(); } | 405 virtual LayoutSize intrinsicSize() const { return LayoutSize(); } |
405 LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWriti ngMode() ? intrinsicSize().width() : intrinsicSize().height(); } | 406 LayoutUnit intrinsicLogicalWidth() const { return style()->isHorizontalWriti ngMode() ? intrinsicSize().width() : intrinsicSize().height(); } |
406 LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWrit ingMode() ? intrinsicSize().height() : intrinsicSize().width(); } | 407 LayoutUnit intrinsicLogicalHeight() const { return style()->isHorizontalWrit ingMode() ? intrinsicSize().height() : intrinsicSize().width(); } |
407 | 408 |
408 // Whether or not the element shrinks to its intrinsic width (rather than fi lling the width | 409 // 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. | 410 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this. |
410 bool sizesLogicalWidthToFitContent(SizeType) const; | 411 bool sizesLogicalWidthToFitContent(SizeType) const; |
411 | 412 |
412 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFr omLogicalTopOfFirstPage) const; | 413 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo utUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFr omLogicalTopOfFirstPage) const; |
413 | 414 |
414 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, L ayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegio n*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; | 415 LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length, LayoutUnit ava ilableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*, LayoutUni t offsetFromLogicalTopOfFirstPage) const; |
ojan
2013/04/11 03:21:46
IMO, it isn't obvious without the name what the Le
cbiesinger
2013/04/12 01:17:52
Oh, that must have been a bad merge :( Fixed.
| |
415 LayoutUnit computeLogicalHeightUsing(const Length& height) const; | 416 LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit conten tHeight) const; |
416 LayoutUnit computeContentLogicalHeight(const Length& height) const; | 417 LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit cont entHeight) const; |
417 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height ) const; | 418 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height , LayoutUnit contentHeight) const; |
418 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const; | 419 LayoutUnit computeReplacedLogicalWidthUsing(Length width) const; |
419 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; | 420 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic alWidth, ShouldComputePreferred = ComputeActual) const; |
420 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const; | 421 LayoutUnit computeReplacedLogicalHeightUsing(Length height) const; |
421 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const; | 422 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log icalHeight) const; |
422 | 423 |
423 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const; | 424 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com puteActual) const; |
424 virtual LayoutUnit computeReplacedLogicalHeight() const; | 425 virtual LayoutUnit computeReplacedLogicalHeight() const; |
425 | 426 |
426 static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool outOfFlowPositioned); | 427 static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool outOfFlowPositioned); |
427 LayoutUnit computePercentageLogicalHeight(const Length& height) const; | 428 LayoutUnit computePercentageLogicalHeight(const Length& height) const; |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
731 } | 732 } |
732 | 733 |
733 inline RenderBox* RenderBox::lastChildBox() const | 734 inline RenderBox* RenderBox::lastChildBox() const |
734 { | 735 { |
735 return toRenderBox(lastChild()); | 736 return toRenderBox(lastChild()); |
736 } | 737 } |
737 | 738 |
738 } // namespace WebCore | 739 } // namespace WebCore |
739 | 740 |
740 #endif // RenderBox_h | 741 #endif // RenderBox_h |
OLD | NEW |