| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (RenderFlow) | 225 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (RenderFlow) |
| 226 // to return the remaining width on a given line (and the height of a single
line). | 226 // to return the remaining width on a given line (and the height of a single
line). |
| 227 virtual LayoutUnit offsetWidth() const override { return width(); } | 227 virtual LayoutUnit offsetWidth() const override { return width(); } |
| 228 virtual LayoutUnit offsetHeight() const override { return height(); } | 228 virtual LayoutUnit offsetHeight() const override { return height(); } |
| 229 | 229 |
| 230 virtual int pixelSnappedOffsetWidth() const override final; | 230 virtual int pixelSnappedOffsetWidth() const override final; |
| 231 virtual int pixelSnappedOffsetHeight() const override final; | 231 virtual int pixelSnappedOffsetHeight() const override final; |
| 232 | 232 |
| 233 // More IE extensions. clientWidth and clientHeight represent the interior
of an object | 233 // More IE extensions. clientWidth and clientHeight represent the interior
of an object |
| 234 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. | 234 // excluding border and scrollbar. clientLeft/Top are just the borderLeftWi
dth and borderTopWidth. |
| 235 LayoutUnit clientLeft() const { return borderLeft() + (style()->shouldPlaceB
lockDirectionScrollbarOnLogicalLeft() ? verticalScrollbarWidth() : 0); } | 235 LayoutUnit clientLeft() const { return borderLeft(); } |
| 236 LayoutUnit clientTop() const { return borderTop(); } | 236 LayoutUnit clientTop() const { return borderTop(); } |
| 237 LayoutUnit clientWidth() const; | 237 LayoutUnit clientWidth() const; |
| 238 LayoutUnit clientHeight() const; | 238 LayoutUnit clientHeight() const; |
| 239 LayoutUnit clientLogicalWidth() const { return clientWidth(); } | 239 LayoutUnit clientLogicalWidth() const { return clientWidth(); } |
| 240 LayoutUnit clientLogicalHeight() const { return clientHeight(); } | 240 LayoutUnit clientLogicalHeight() const { return clientHeight(); } |
| 241 LayoutUnit clientLogicalBottom() const { return borderBefore() + clientLogic
alHeight(); } | 241 LayoutUnit clientLogicalBottom() const { return borderBefore() + clientLogic
alHeight(); } |
| 242 LayoutRect clientBoxRect() const { return LayoutRect(clientLeft(), clientTop
(), clientWidth(), clientHeight()); } | 242 LayoutRect clientBoxRect() const { return LayoutRect(clientLeft(), clientTop
(), clientWidth(), clientHeight()); } |
| 243 | 243 |
| 244 int pixelSnappedClientWidth() const; | 244 int pixelSnappedClientWidth() const; |
| 245 int pixelSnappedClientHeight() const; | 245 int pixelSnappedClientHeight() const; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 // Whether or not the element shrinks to its intrinsic width (rather than fi
lling the width | 397 // Whether or not the element shrinks to its intrinsic width (rather than fi
lling the width |
| 398 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and
floating/compact elements do this. | 398 // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and
floating/compact elements do this. |
| 399 bool sizesLogicalWidthToFitContent(const Length& logicalWidth) const; | 399 bool sizesLogicalWidthToFitContent(const Length& logicalWidth) const; |
| 400 | 400 |
| 401 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo
utUnit childMarginEnd, const RenderBlockFlow* cb) const; | 401 LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, Layo
utUnit childMarginEnd, const RenderBlockFlow* cb) const; |
| 402 | 402 |
| 403 LayoutUnit computeLogicalWidthUsing(SizeType, const Length& logicalWidth, La
youtUnit availableLogicalWidth, const RenderBlock* containingBlock) const; | 403 LayoutUnit computeLogicalWidthUsing(SizeType, const Length& logicalWidth, La
youtUnit availableLogicalWidth, const RenderBlock* containingBlock) const; |
| 404 LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit intrin
sicContentHeight) const; | 404 LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit intrin
sicContentHeight) const; |
| 405 LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit intr
insicContentHeight) const; | 405 LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit intr
insicContentHeight) const; |
| 406 LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height
, LayoutUnit intrinsicContentHeight) const; | 406 LayoutUnit computeContentLogicalHeightUsing(const Length& height, LayoutUnit
intrinsicContentHeight) const; |
| 407 LayoutUnit computeReplacedLogicalWidthUsing(const Length& width) const; | 407 LayoutUnit computeReplacedLogicalWidthUsing(const Length& width) const; |
| 408 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic
alWidth, ShouldComputePreferred = ComputeActual) const; | 408 LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logic
alWidth, ShouldComputePreferred = ComputeActual) const; |
| 409 LayoutUnit computeReplacedLogicalHeightUsing(const Length& height) const; | 409 LayoutUnit computeReplacedLogicalHeightUsing(const Length& height) const; |
| 410 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log
icalHeight) const; | 410 LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit log
icalHeight) const; |
| 411 | 411 |
| 412 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const; | 412 virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = Com
puteActual) const; |
| 413 virtual LayoutUnit computeReplacedLogicalHeight() const; | 413 virtual LayoutUnit computeReplacedLogicalHeight() const; |
| 414 | 414 |
| 415 static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock*
containingBlock, bool outOfFlowPositioned); | 415 static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock*
containingBlock, bool outOfFlowPositioned); |
| 416 LayoutUnit computePercentageLogicalHeight(const Length& height) const; | 416 LayoutUnit computePercentageLogicalHeight(const Length& height) const; |
| 417 | 417 |
| 418 // Block flows subclass availableWidth/Height to handle multi column layout
(shrinking the width/height available to children when laying out.) | 418 // Block flows subclass availableWidth/Height to handle multi column layout
(shrinking the width/height available to children when laying out.) |
| 419 virtual LayoutUnit availableLogicalWidth() const { return contentLogicalWidt
h(); } | 419 virtual LayoutUnit availableLogicalWidth() const { return contentLogicalWidt
h(); } |
| 420 virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; | 420 virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; |
| 421 LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeight
Type) const; | 421 LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeight
Type) const; |
| 422 | 422 |
| 423 // There are a few cases where we need to refer specifically to the availabl
e physical width and available physical height. | 423 // There are a few cases where we need to refer specifically to the availabl
e physical width and available physical height. |
| 424 // Relative positioning is one of those cases, since left/top offsets are ph
ysical. | 424 // Relative positioning is one of those cases, since left/top offsets are ph
ysical. |
| 425 LayoutUnit availableWidth() const { return availableLogicalWidth(); } | 425 LayoutUnit availableWidth() const { return availableLogicalWidth(); } |
| 426 LayoutUnit availableHeight() const { return availableLogicalHeight(IncludeMa
rginBorderPadding); } | 426 LayoutUnit availableHeight() const { return availableLogicalHeight(IncludeMa
rginBorderPadding); } |
| 427 | 427 |
| 428 virtual int verticalScrollbarWidth() const; | |
| 429 int horizontalScrollbarHeight() const; | |
| 430 int instrinsicScrollbarLogicalWidth() const; | |
| 431 int scrollbarLogicalHeight() const { return horizontalScrollbarHeight(); } | |
| 432 virtual bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); | 428 virtual bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); |
| 433 bool canBeScrolledAndHasScrollableArea() const; | 429 bool canBeScrolledAndHasScrollableArea() const; |
| 434 virtual bool canBeProgramaticallyScrolled() const; | 430 virtual bool canBeProgramaticallyScrolled() const; |
| 435 virtual void autoscroll(const IntPoint&); | 431 virtual void autoscroll(const IntPoint&); |
| 436 bool autoscrollInProgress() const; | 432 bool autoscrollInProgress() const; |
| 437 bool canAutoscroll() const; | 433 bool canAutoscroll() const; |
| 438 IntSize calculateAutoscrollDirection(const IntPoint& windowPoint) const; | 434 IntSize calculateAutoscrollDirection(const IntPoint& windowPoint) const; |
| 439 static RenderBox* findAutoscrollable(RenderObject*); | 435 static RenderBox* findAutoscrollable(RenderObject*); |
| 440 virtual void stopAutoscroll() { } | 436 virtual void stopAutoscroll() { } |
| 441 | 437 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 if (UNLIKELY(inlineBoxWrapper() != 0)) | 712 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 717 deleteLineBoxWrapper(); | 713 deleteLineBoxWrapper(); |
| 718 } | 714 } |
| 719 | 715 |
| 720 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 716 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 721 } | 717 } |
| 722 | 718 |
| 723 } // namespace blink | 719 } // namespace blink |
| 724 | 720 |
| 725 #endif // RenderBox_h | 721 #endif // RenderBox_h |
| OLD | NEW |