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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); | 355 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); |
356 void clearContainingBlockOverrideSize(); | 356 void clearContainingBlockOverrideSize(); |
357 void clearOverrideContainingBlockContentLogicalHeight(); | 357 void clearOverrideContainingBlockContentLogicalHeight(); |
358 | 358 |
359 LayoutUnit extraInlineOffset() const; | 359 LayoutUnit extraInlineOffset() const; |
360 LayoutUnit extraBlockOffset() const; | 360 LayoutUnit extraBlockOffset() const; |
361 void setExtraInlineOffset(LayoutUnit inlineOffest); | 361 void setExtraInlineOffset(LayoutUnit inlineOffest); |
362 void setExtraBlockOffset(LayoutUnit blockOffest); | 362 void setExtraBlockOffset(LayoutUnit blockOffest); |
363 void clearExtraInlineAndBlockOffests(); | 363 void clearExtraInlineAndBlockOffests(); |
364 | 364 |
365 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const override; | 365 virtual LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const override; |
366 | 366 |
367 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; | 367 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; |
368 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
; | 368 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
; |
369 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; | 369 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; |
370 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons
t; | 370 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons
t; |
371 | 371 |
372 struct ComputedMarginValues { | 372 struct ComputedMarginValues { |
373 ComputedMarginValues() { } | 373 ComputedMarginValues() { } |
374 | 374 |
375 LayoutUnit m_before; | 375 LayoutUnit m_before; |
(...skipping 18 matching lines...) Expand all Loading... |
394 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const; | 394 virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const; |
395 | 395 |
396 void positionLineBox(InlineBox*); | 396 void positionLineBox(InlineBox*); |
397 void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); | 397 void moveWithEdgeOfInlineContainerIfNecessary(bool isHorizontal); |
398 void markStaticPositionedBoxForLayout(bool isHorizontal, bool isInline); | 398 void markStaticPositionedBoxForLayout(bool isHorizontal, bool isInline); |
399 | 399 |
400 virtual InlineBox* createInlineBox(); | 400 virtual InlineBox* createInlineBox(); |
401 void dirtyLineBoxes(bool fullLayout); | 401 void dirtyLineBoxes(bool fullLayout); |
402 | 402 |
403 // For inline replaced elements, this function returns the inline box that o
wns us. Enables | 403 // For inline replaced elements, this function returns the inline box that o
wns us. Enables |
404 // the replaced RenderObject to quickly determine what line it is contained
on and to easily | 404 // the replaced LayoutObject to quickly determine what line it is contained
on and to easily |
405 // iterate over structures on the line. | 405 // iterate over structures on the line. |
406 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } | 406 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } |
407 void setInlineBoxWrapper(InlineBox*); | 407 void setInlineBoxWrapper(InlineBox*); |
408 void deleteLineBoxWrapper(); | 408 void deleteLineBoxWrapper(); |
409 | 409 |
410 void setSpannerPlaceholder(RenderMultiColumnSpannerPlaceholder&); | 410 void setSpannerPlaceholder(RenderMultiColumnSpannerPlaceholder&); |
411 void clearSpannerPlaceholder(); | 411 void clearSpannerPlaceholder(); |
412 virtual RenderMultiColumnSpannerPlaceholder* spannerPlaceholder() const fina
l { return m_rareData ? m_rareData->m_spannerPlaceholder : 0; } | 412 virtual RenderMultiColumnSpannerPlaceholder* spannerPlaceholder() const fina
l { return m_rareData ? m_rareData->m_spannerPlaceholder : 0; } |
413 | 413 |
414 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t override; | 414 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t override; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 int horizontalScrollbarHeight() const; | 472 int horizontalScrollbarHeight() const; |
473 int intrinsicScrollbarLogicalWidth() const; | 473 int intrinsicScrollbarLogicalWidth() const; |
474 int scrollbarLogicalWidth() const { return style()->isHorizontalWritingMode(
) ? verticalScrollbarWidth() : horizontalScrollbarHeight(); } | 474 int scrollbarLogicalWidth() const { return style()->isHorizontalWritingMode(
) ? verticalScrollbarWidth() : horizontalScrollbarHeight(); } |
475 int scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode
() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); } | 475 int scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode
() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); } |
476 virtual bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); | 476 virtual bool scroll(ScrollDirection, ScrollGranularity, float delta = 1); |
477 bool canBeScrolledAndHasScrollableArea() const; | 477 bool canBeScrolledAndHasScrollableArea() const; |
478 virtual bool canBeProgramaticallyScrolled() const; | 478 virtual bool canBeProgramaticallyScrolled() const; |
479 virtual void autoscroll(const IntPoint&); | 479 virtual void autoscroll(const IntPoint&); |
480 bool canAutoscroll() const; | 480 bool canAutoscroll() const; |
481 IntSize calculateAutoscrollDirection(const IntPoint& windowPoint) const; | 481 IntSize calculateAutoscrollDirection(const IntPoint& windowPoint) const; |
482 static RenderBox* findAutoscrollable(RenderObject*); | 482 static RenderBox* findAutoscrollable(LayoutObject*); |
483 virtual void stopAutoscroll() { } | 483 virtual void stopAutoscroll() { } |
484 virtual void panScroll(const IntPoint&); | 484 virtual void panScroll(const IntPoint&); |
485 | 485 |
486 bool hasAutoVerticalScrollbar() const { return hasOverflowClip() && (style()
->overflowY() == OAUTO || style()->overflowY() == OOVERLAY); } | 486 bool hasAutoVerticalScrollbar() const { return hasOverflowClip() && (style()
->overflowY() == OAUTO || style()->overflowY() == OOVERLAY); } |
487 bool hasAutoHorizontalScrollbar() const { return hasOverflowClip() && (style
()->overflowX() == OAUTO || style()->overflowX() == OOVERLAY); } | 487 bool hasAutoHorizontalScrollbar() const { return hasOverflowClip() && (style
()->overflowX() == OAUTO || style()->overflowX() == OOVERLAY); } |
488 bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY
(); } | 488 bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY
(); } |
489 | 489 |
490 bool hasScrollableOverflowX() const { return scrollsOverflowX() && pixelSnap
pedScrollWidth() != pixelSnappedClientWidth(); } | 490 bool hasScrollableOverflowX() const { return scrollsOverflowX() && pixelSnap
pedScrollWidth() != pixelSnappedClientWidth(); } |
491 bool hasScrollableOverflowY() const { return scrollsOverflowY() && pixelSnap
pedScrollHeight() != pixelSnappedClientHeight(); } | 491 bool hasScrollableOverflowY() const { return scrollsOverflowY() && pixelSnap
pedScrollHeight() != pixelSnappedClientHeight(); } |
492 virtual bool scrollsOverflowX() const { return hasOverflowClip() && (style()
->overflowX() == OSCROLL || hasAutoHorizontalScrollbar()); } | 492 virtual bool scrollsOverflowX() const { return hasOverflowClip() && (style()
->overflowX() == OSCROLL || hasAutoHorizontalScrollbar()); } |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 bool hasVerticalLayoutOverflow() const | 621 bool hasVerticalLayoutOverflow() const |
622 { | 622 { |
623 if (!m_overflow) | 623 if (!m_overflow) |
624 return false; | 624 return false; |
625 | 625 |
626 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); | 626 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); |
627 LayoutRect noOverflowRect = this->noOverflowRect(); | 627 LayoutRect noOverflowRect = this->noOverflowRect(); |
628 return layoutOverflowRect.y() < noOverflowRect.y() || layoutOverflowRect
.maxY() > noOverflowRect.maxY(); | 628 return layoutOverflowRect.y() < noOverflowRect.y() || layoutOverflowRect
.maxY() > noOverflowRect.maxY(); |
629 } | 629 } |
630 | 630 |
631 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) con
st | 631 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject*) con
st |
632 { | 632 { |
633 ASSERT_NOT_REACHED(); | 633 ASSERT_NOT_REACHED(); |
634 return 0; | 634 return 0; |
635 } | 635 } |
636 | 636 |
637 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir
ection() == object->style()->direction(); } | 637 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir
ection() == object->style()->direction(); } |
638 | 638 |
639 ShapeOutsideInfo* shapeOutsideInfo() const | 639 ShapeOutsideInfo* shapeOutsideInfo() const |
640 { | 640 { |
641 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t
his) : 0; | 641 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t
his) : 0; |
(...skipping 24 matching lines...) Expand all Loading... |
666 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; | 666 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; |
667 | 667 |
668 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt
h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; | 668 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt
h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; |
669 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe
ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons
t; | 669 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe
ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons
t; |
670 | 670 |
671 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i
sInlineBlockOrInlineTable(); } | 671 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i
sInlineBlockOrInlineTable(); } |
672 | 672 |
673 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const override; | 673 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const override; |
674 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; | 674 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; |
675 | 675 |
676 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); | 676 LayoutObject* splitAnonymousBoxesAroundChild(LayoutObject* beforeChild); |
677 | 677 |
678 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo
mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect)
const override; | 678 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentCo
mpositedLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect)
const override; |
679 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; | 679 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; |
680 | 680 |
681 virtual PaintInvalidationReason paintInvalidationReason(const LayoutLayerMod
elObject& paintInvalidationContainer, | 681 virtual PaintInvalidationReason paintInvalidationReason(const LayoutLayerMod
elObject& paintInvalidationContainer, |
682 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, | 682 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, |
683 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva
lidationContainer) const override; | 683 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva
lidationContainer) const override; |
684 virtual void incrementallyInvalidatePaint(const LayoutLayerModelObject& pain
tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds
, const LayoutPoint& positionFromPaintInvalidationContainer) override; | 684 virtual void incrementallyInvalidatePaint(const LayoutLayerModelObject& pain
tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds
, const LayoutPoint& positionFromPaintInvalidationContainer) override; |
685 | 685 |
686 virtual void clearPaintInvalidationState(const PaintInvalidationState&) over
ride; | 686 virtual void clearPaintInvalidationState(const PaintInvalidationState&) over
ride; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 // The preferred logical width of the element if it never breaks any lines a
t all. | 764 // The preferred logical width of the element if it never breaks any lines a
t all. |
765 LayoutUnit m_maxPreferredLogicalWidth; | 765 LayoutUnit m_maxPreferredLogicalWidth; |
766 | 766 |
767 // Our overflow information. | 767 // Our overflow information. |
768 OwnPtr<RenderOverflow> m_overflow; | 768 OwnPtr<RenderOverflow> m_overflow; |
769 | 769 |
770 private: | 770 private: |
771 OwnPtr<RenderBoxRareData> m_rareData; | 771 OwnPtr<RenderBoxRareData> m_rareData; |
772 }; | 772 }; |
773 | 773 |
774 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBox, isBox()); | 774 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderBox, isBox()); |
775 | 775 |
776 inline RenderBox* RenderBox::previousSiblingBox() const | 776 inline RenderBox* RenderBox::previousSiblingBox() const |
777 { | 777 { |
778 return toRenderBox(previousSibling()); | 778 return toRenderBox(previousSibling()); |
779 } | 779 } |
780 | 780 |
781 inline RenderBox* RenderBox::previousInFlowSiblingBox() const | 781 inline RenderBox* RenderBox::previousInFlowSiblingBox() const |
782 { | 782 { |
783 RenderBox* previous = previousSiblingBox(); | 783 RenderBox* previous = previousSiblingBox(); |
784 while (previous && previous->isOutOfFlowPositioned()) | 784 while (previous && previous->isOutOfFlowPositioned()) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 if (UNLIKELY(inlineBoxWrapper() != 0)) | 840 if (UNLIKELY(inlineBoxWrapper() != 0)) |
841 deleteLineBoxWrapper(); | 841 deleteLineBoxWrapper(); |
842 } | 842 } |
843 | 843 |
844 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 844 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
845 } | 845 } |
846 | 846 |
847 } // namespace blink | 847 } // namespace blink |
848 | 848 |
849 #endif // RenderBox_h | 849 #endif // RenderBox_h |
OLD | NEW |