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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 enum ScrollOffsetClamping { | 46 enum ScrollOffsetClamping { |
47 ScrollOffsetUnclamped, | 47 ScrollOffsetUnclamped, |
48 ScrollOffsetClamped | 48 ScrollOffsetClamped |
49 }; | 49 }; |
50 | 50 |
51 struct LayoutBoxRareData { | 51 struct LayoutBoxRareData { |
52 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); WTF_MAKE_FAST_ALLOCATED(LayoutBoxRa
reData); | 52 WTF_MAKE_NONCOPYABLE(LayoutBoxRareData); WTF_MAKE_FAST_ALLOCATED(LayoutBoxRa
reData); |
53 public: | 53 public: |
54 LayoutBoxRareData() | 54 LayoutBoxRareData() |
55 : m_inlineBoxWrapper(0) | 55 : m_inlineBoxWrapper(nullptr) |
56 , m_spannerPlaceholder(0) | 56 , m_spannerPlaceholder(nullptr) |
57 , m_overrideLogicalContentHeight(-1) | 57 , m_overrideLogicalContentHeight(-1) |
58 , m_overrideLogicalContentWidth(-1) | 58 , m_overrideLogicalContentWidth(-1) |
59 , m_previousBorderBoxSize(-1, -1) | 59 , m_previousBorderBoxSize(-1, -1) |
60 { | 60 { |
61 } | 61 } |
62 | 62 |
63 // For inline replaced elements, the inline box that owns us. | 63 // For inline replaced elements, the inline box that owns us. |
64 InlineBox* m_inlineBoxWrapper; | 64 InlineBox* m_inlineBoxWrapper; |
65 | 65 |
66 // For spanners, the spanner placeholder that lays us out within the multico
l container. | 66 // For spanners, the spanner placeholder that lays us out within the multico
l container. |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 virtual LayoutUnit marginLeft() const override { return m_marginBoxOutsets.l
eft(); } | 341 virtual LayoutUnit marginLeft() const override { return m_marginBoxOutsets.l
eft(); } |
342 virtual LayoutUnit marginRight() const override { return m_marginBoxOutsets.
right(); } | 342 virtual LayoutUnit marginRight() const override { return m_marginBoxOutsets.
right(); } |
343 void setMarginTop(LayoutUnit margin) { m_marginBoxOutsets.setTop(margin); } | 343 void setMarginTop(LayoutUnit margin) { m_marginBoxOutsets.setTop(margin); } |
344 void setMarginBottom(LayoutUnit margin) { m_marginBoxOutsets.setBottom(margi
n); } | 344 void setMarginBottom(LayoutUnit margin) { m_marginBoxOutsets.setBottom(margi
n); } |
345 void setMarginLeft(LayoutUnit margin) { m_marginBoxOutsets.setLeft(margin);
} | 345 void setMarginLeft(LayoutUnit margin) { m_marginBoxOutsets.setLeft(margin);
} |
346 void setMarginRight(LayoutUnit margin) { m_marginBoxOutsets.setRight(margin)
; } | 346 void setMarginRight(LayoutUnit margin) { m_marginBoxOutsets.setRight(margin)
; } |
347 | 347 |
348 LayoutUnit marginLogicalLeft() const { return m_marginBoxOutsets.logicalLeft
(style()->writingMode()); } | 348 LayoutUnit marginLogicalLeft() const { return m_marginBoxOutsets.logicalLeft
(style()->writingMode()); } |
349 LayoutUnit marginLogicalRight() const { return m_marginBoxOutsets.logicalRig
ht(style()->writingMode()); } | 349 LayoutUnit marginLogicalRight() const { return m_marginBoxOutsets.logicalRig
ht(style()->writingMode()); } |
350 | 350 |
351 virtual LayoutUnit marginBefore(const ComputedStyle* overrideStyle = 0) cons
t override final { return m_marginBoxOutsets.before((overrideStyle ? overrideSty
le : style())->writingMode()); } | 351 virtual LayoutUnit marginBefore(const ComputedStyle* overrideStyle = nullptr
) const override final { return m_marginBoxOutsets.before((overrideStyle ? overr
ideStyle : style())->writingMode()); } |
352 virtual LayoutUnit marginAfter(const ComputedStyle* overrideStyle = 0) const
override final { return m_marginBoxOutsets.after((overrideStyle ? overrideStyle
: style())->writingMode()); } | 352 virtual LayoutUnit marginAfter(const ComputedStyle* overrideStyle = nullptr)
const override final { return m_marginBoxOutsets.after((overrideStyle ? overrid
eStyle : style())->writingMode()); } |
353 virtual LayoutUnit marginStart(const ComputedStyle* overrideStyle = 0) const
override final | 353 virtual LayoutUnit marginStart(const ComputedStyle* overrideStyle = nullptr)
const override final |
354 { | 354 { |
355 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); | 355 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); |
356 return m_marginBoxOutsets.start(styleToUse->writingMode(), styleToUse->d
irection()); | 356 return m_marginBoxOutsets.start(styleToUse->writingMode(), styleToUse->d
irection()); |
357 } | 357 } |
358 virtual LayoutUnit marginEnd(const ComputedStyle* overrideStyle = 0) const o
verride final | 358 virtual LayoutUnit marginEnd(const ComputedStyle* overrideStyle = nullptr) c
onst override final |
359 { | 359 { |
360 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); | 360 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); |
361 return m_marginBoxOutsets.end(styleToUse->writingMode(), styleToUse->dir
ection()); | 361 return m_marginBoxOutsets.end(styleToUse->writingMode(), styleToUse->dir
ection()); |
362 } | 362 } |
363 void setMarginBefore(LayoutUnit value, const ComputedStyle* overrideStyle =
0) { m_marginBoxOutsets.setBefore((overrideStyle ? overrideStyle : style())->wri
tingMode(), value); } | 363 void setMarginBefore(LayoutUnit value, const ComputedStyle* overrideStyle =
nullptr) { m_marginBoxOutsets.setBefore((overrideStyle ? overrideStyle : style()
)->writingMode(), value); } |
364 void setMarginAfter(LayoutUnit value, const ComputedStyle* overrideStyle = 0
) { m_marginBoxOutsets.setAfter((overrideStyle ? overrideStyle : style())->writi
ngMode(), value); } | 364 void setMarginAfter(LayoutUnit value, const ComputedStyle* overrideStyle = n
ullptr) { m_marginBoxOutsets.setAfter((overrideStyle ? overrideStyle : style())-
>writingMode(), value); } |
365 void setMarginStart(LayoutUnit value, const ComputedStyle* overrideStyle = 0
) | 365 void setMarginStart(LayoutUnit value, const ComputedStyle* overrideStyle = n
ullptr) |
366 { | 366 { |
367 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); | 367 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); |
368 m_marginBoxOutsets.setStart(styleToUse->writingMode(), styleToUse->direc
tion(), value); | 368 m_marginBoxOutsets.setStart(styleToUse->writingMode(), styleToUse->direc
tion(), value); |
369 } | 369 } |
370 void setMarginEnd(LayoutUnit value, const ComputedStyle* overrideStyle = 0) | 370 void setMarginEnd(LayoutUnit value, const ComputedStyle* overrideStyle = nul
lptr) |
371 { | 371 { |
372 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); | 372 const ComputedStyle* styleToUse = overrideStyle ? overrideStyle : style(
); |
373 m_marginBoxOutsets.setEnd(styleToUse->writingMode(), styleToUse->directi
on(), value); | 373 m_marginBoxOutsets.setEnd(styleToUse->writingMode(), styleToUse->directi
on(), value); |
374 } | 374 } |
375 | 375 |
376 // The following functions are used to implement collapsing margins. | 376 // The following functions are used to implement collapsing margins. |
377 // All objects know their maximal positive and negative margins. The | 377 // All objects know their maximal positive and negative margins. The |
378 // formula for computing a collapsed margin is |maxPosMargin| - |maxNegmargi
n|. | 378 // formula for computing a collapsed margin is |maxPosMargin| - |maxNegmargi
n|. |
379 // For a non-collapsing box, such as a leaf element, this formula will simpl
y return | 379 // For a non-collapsing box, such as a leaf element, this formula will simpl
y return |
380 // the margin of the element. Blocks override the maxMarginBefore and maxMa
rginAfter | 380 // the margin of the element. Blocks override the maxMarginBefore and maxMa
rginAfter |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); | 420 void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); |
421 void clearContainingBlockOverrideSize(); | 421 void clearContainingBlockOverrideSize(); |
422 void clearOverrideContainingBlockContentLogicalHeight(); | 422 void clearOverrideContainingBlockContentLogicalHeight(); |
423 | 423 |
424 LayoutUnit extraInlineOffset() const; | 424 LayoutUnit extraInlineOffset() const; |
425 LayoutUnit extraBlockOffset() const; | 425 LayoutUnit extraBlockOffset() const; |
426 void setExtraInlineOffset(LayoutUnit inlineOffest); | 426 void setExtraInlineOffset(LayoutUnit inlineOffest); |
427 void setExtraBlockOffset(LayoutUnit blockOffest); | 427 void setExtraBlockOffset(LayoutUnit blockOffest); |
428 void clearExtraInlineAndBlockOffests(); | 428 void clearExtraInlineAndBlockOffests(); |
429 | 429 |
430 virtual LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const override; | 430 virtual LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = nullptr) const override; |
431 | 431 |
432 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; | 432 LayoutUnit adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const; |
433 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
; | 433 LayoutUnit adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const
; |
434 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; | 434 LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; |
435 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons
t; | 435 LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) cons
t; |
436 | 436 |
437 struct ComputedMarginValues { | 437 struct ComputedMarginValues { |
438 ComputedMarginValues() { } | 438 ComputedMarginValues() { } |
439 | 439 |
440 LayoutUnit m_before; | 440 LayoutUnit m_before; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 // the replaced LayoutObject to quickly determine what line it is contained
on and to easily | 473 // the replaced LayoutObject to quickly determine what line it is contained
on and to easily |
474 // iterate over structures on the line. | 474 // iterate over structures on the line. |
475 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } | 475 InlineBox* inlineBoxWrapper() const { return m_rareData ? m_rareData->m_inli
neBoxWrapper : 0; } |
476 void setInlineBoxWrapper(InlineBox*); | 476 void setInlineBoxWrapper(InlineBox*); |
477 void deleteLineBoxWrapper(); | 477 void deleteLineBoxWrapper(); |
478 | 478 |
479 void setSpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder&); | 479 void setSpannerPlaceholder(LayoutMultiColumnSpannerPlaceholder&); |
480 void clearSpannerPlaceholder(); | 480 void clearSpannerPlaceholder(); |
481 virtual LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const fina
l { return m_rareData ? m_rareData->m_spannerPlaceholder : 0; } | 481 virtual LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const fina
l { return m_rareData ? m_rareData->m_spannerPlaceholder : 0; } |
482 | 482 |
483 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const
override; | 483 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr)
const override; |
484 virtual void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const ove
rride; | 484 virtual void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const ove
rride; |
485 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants); | 485 virtual void invalidatePaintForOverhangingFloats(bool paintAllDescendants); |
486 | 486 |
487 LayoutUnit containingBlockLogicalHeightForGetComputedStyle() const; | 487 LayoutUnit containingBlockLogicalHeightForGetComputedStyle() const; |
488 | 488 |
489 virtual LayoutUnit containingBlockLogicalWidthForContent() const override; | 489 virtual LayoutUnit containingBlockLogicalWidthForContent() const override; |
490 LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType
) const; | 490 LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType
) const; |
491 | 491 |
492 LayoutUnit containingBlockAvailableLineWidth() const; | 492 LayoutUnit containingBlockAvailableLineWidth() const; |
493 LayoutUnit perpendicularContainingBlockLogicalHeight() const; | 493 LayoutUnit perpendicularContainingBlockLogicalHeight() const; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 virtual bool scrollsOverflowY() const { return hasOverflowClip() && (style()
->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); } | 571 virtual bool scrollsOverflowY() const { return hasOverflowClip() && (style()
->overflowY() == OSCROLL || hasAutoVerticalScrollbar()); } |
572 bool usesCompositedScrolling() const; | 572 bool usesCompositedScrolling() const; |
573 | 573 |
574 // Elements such as the <input> field override this to specify that they are
scrollable | 574 // Elements such as the <input> field override this to specify that they are
scrollable |
575 // outside the context of the CSS overflow style | 575 // outside the context of the CSS overflow style |
576 virtual bool isIntrinsicallyScrollable(ScrollbarOrientation orientation) con
st { return false; } | 576 virtual bool isIntrinsicallyScrollable(ScrollbarOrientation orientation) con
st { return false; } |
577 | 577 |
578 bool hasUnsplittableScrollingOverflow() const; | 578 bool hasUnsplittableScrollingOverflow() const; |
579 bool isUnsplittableForPagination() const; | 579 bool isUnsplittableForPagination() const; |
580 | 580 |
581 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = 0) override; | 581 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e
xtraWidthToEndOfLine = nullptr) override; |
582 | 582 |
583 virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScro
llbarSizeRelevancy = IgnoreOverlayScrollbarSize); | 583 virtual LayoutRect overflowClipRect(const LayoutPoint& location, OverlayScro
llbarSizeRelevancy = IgnoreOverlayScrollbarSize); |
584 LayoutRect clipRect(const LayoutPoint& location); | 584 LayoutRect clipRect(const LayoutPoint& location); |
585 virtual bool hasControlClip() const { return false; } | 585 virtual bool hasControlClip() const { return false; } |
586 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout
Rect(); } | 586 virtual LayoutRect controlClipRect(const LayoutPoint&) const { return Layout
Rect(); } |
587 | 587 |
588 virtual void paintObject(const PaintInfo&, const LayoutPoint&) { ASSERT_NOT_
REACHED(); } | 588 virtual void paintObject(const PaintInfo&, const LayoutPoint&) { ASSERT_NOT_
REACHED(); } |
589 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin
t&); | 589 virtual void paintBoxDecorationBackground(const PaintInfo&, const LayoutPoin
t&); |
590 virtual void paintMask(const PaintInfo&, const LayoutPoint&); | 590 virtual void paintMask(const PaintInfo&, const LayoutPoint&); |
591 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; | 591 virtual void imageChanged(WrappedImagePtr, const IntRect* = nullptr) overrid
e; |
592 | 592 |
593 void logicalExtentAfterUpdatingLogicalWidth(const LayoutUnit& logicalTop, Lo
gicalExtentComputedValues&); | 593 void logicalExtentAfterUpdatingLogicalWidth(const LayoutUnit& logicalTop, Lo
gicalExtentComputedValues&); |
594 | 594 |
595 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 595 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
596 | 596 |
597 void removeFloatingOrPositionedChildFromBlockLists(); | 597 void removeFloatingOrPositionedChildFromBlockLists(); |
598 | 598 |
599 DeprecatedPaintLayer* enclosingFloatPaintingLayer() const; | 599 DeprecatedPaintLayer* enclosingFloatPaintingLayer() const; |
600 | 600 |
601 virtual int firstLineBoxBaseline() const { return -1; } | 601 virtual int firstLineBoxBaseline() const { return -1; } |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 return false; | 701 return false; |
702 | 702 |
703 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); | 703 LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); |
704 LayoutRect noOverflowRect = this->noOverflowRect(); | 704 LayoutRect noOverflowRect = this->noOverflowRect(); |
705 return layoutOverflowRect.y() < noOverflowRect.y() || layoutOverflowRect
.maxY() > noOverflowRect.maxY(); | 705 return layoutOverflowRect.y() < noOverflowRect.y() || layoutOverflowRect
.maxY() > noOverflowRect.maxY(); |
706 } | 706 } |
707 | 707 |
708 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject*) con
st | 708 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject*) con
st |
709 { | 709 { |
710 ASSERT_NOT_REACHED(); | 710 ASSERT_NOT_REACHED(); |
711 return 0; | 711 return nullptr; |
712 } | 712 } |
713 | 713 |
714 bool hasSameDirectionAs(const LayoutBox* object) const { return style()->dir
ection() == object->style()->direction(); } | 714 bool hasSameDirectionAs(const LayoutBox* object) const { return style()->dir
ection() == object->style()->direction(); } |
715 | 715 |
716 ShapeOutsideInfo* shapeOutsideInfo() const | 716 ShapeOutsideInfo* shapeOutsideInfo() const |
717 { | 717 { |
718 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t
his) : 0; | 718 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t
his) : nullptr; |
719 } | 719 } |
720 | 720 |
721 void markShapeOutsideDependentsForLayout() | 721 void markShapeOutsideDependentsForLayout() |
722 { | 722 { |
723 if (isFloating()) | 723 if (isFloating()) |
724 removeFloatingOrPositionedChildFromBlockLists(); | 724 removeFloatingOrPositionedChildFromBlockLists(); |
725 } | 725 } |
726 | 726 |
727 bool backgroundHasOpaqueTopLayer() const; | 727 bool backgroundHasOpaqueTopLayer() const; |
728 | 728 |
(...skipping 14 matching lines...) Expand all Loading... |
743 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const; | 743 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const; |
744 virtual bool computeBackgroundIsKnownToBeObscured() override; | 744 virtual bool computeBackgroundIsKnownToBeObscured() override; |
745 | 745 |
746 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; | 746 void computePositionedLogicalWidth(LogicalExtentComputedValues&) const; |
747 | 747 |
748 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt
h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; | 748 LayoutUnit computeIntrinsicLogicalWidthUsing(const Length& logicalWidthLengt
h, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; |
749 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe
ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons
t; | 749 LayoutUnit computeIntrinsicLogicalContentHeightUsing(const Length& logicalHe
ightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) cons
t; |
750 | 750 |
751 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i
sInlineBlockOrInlineTable(); } | 751 virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !i
sInlineBlockOrInlineTable(); } |
752 | 752 |
753 virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati
onContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wa
sFixed = 0, const PaintInvalidationState* = 0) const override; | 753 virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati
onContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wa
sFixed = nullptr, const PaintInvalidationState* = nullptr) const override; |
754 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; | 754 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst override; |
755 | 755 |
756 LayoutObject* splitAnonymousBoxesAroundChild(LayoutObject* beforeChild); | 756 LayoutObject* splitAnonymousBoxesAroundChild(LayoutObject* beforeChild); |
757 | 757 |
758 virtual void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintL
ayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect&
containerRect) const override; | 758 virtual void addLayerHitTestRects(LayerHitTestRects&, const DeprecatedPaintL
ayer* currentCompositedLayer, const LayoutPoint& layerOffset, const LayoutRect&
containerRect) const override; |
759 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; | 759 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const override; |
760 | 760 |
761 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel
Object& paintInvalidationContainer, | 761 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel
Object& paintInvalidationContainer, |
762 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, | 762 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, |
763 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva
lidationContainer) const override; | 763 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva
lidationContainer) const override; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 inline LayoutBox* LayoutBox::lastChildBox() const | 909 inline LayoutBox* LayoutBox::lastChildBox() const |
910 { | 910 { |
911 return toLayoutBox(slowLastChild()); | 911 return toLayoutBox(slowLastChild()); |
912 } | 912 } |
913 | 913 |
914 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const | 914 inline LayoutBox* LayoutBox::previousSiblingMultiColumnBox() const |
915 { | 915 { |
916 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 916 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
917 LayoutBox* previousBox = previousSiblingBox(); | 917 LayoutBox* previousBox = previousSiblingBox(); |
918 if (previousBox->isLayoutFlowThread()) | 918 if (previousBox->isLayoutFlowThread()) |
919 return 0; | 919 return nullptr; |
920 return previousBox; | 920 return previousBox; |
921 } | 921 } |
922 | 922 |
923 inline LayoutBox* LayoutBox::nextSiblingMultiColumnBox() const | 923 inline LayoutBox* LayoutBox::nextSiblingMultiColumnBox() const |
924 { | 924 { |
925 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); | 925 ASSERT(isLayoutMultiColumnSpannerPlaceholder() || isLayoutMultiColumnSet()); |
926 return nextSiblingBox(); | 926 return nextSiblingBox(); |
927 } | 927 } |
928 | 928 |
929 inline void LayoutBox::setInlineBoxWrapper(InlineBox* boxWrapper) | 929 inline void LayoutBox::setInlineBoxWrapper(InlineBox* boxWrapper) |
930 { | 930 { |
931 if (boxWrapper) { | 931 if (boxWrapper) { |
932 ASSERT(!inlineBoxWrapper()); | 932 ASSERT(!inlineBoxWrapper()); |
933 // m_inlineBoxWrapper should already be 0. Deleting it is a safeguard ag
ainst security issues. | 933 // m_inlineBoxWrapper should already be 0. Deleting it is a safeguard ag
ainst security issues. |
934 // Otherwise, there will two line box wrappers keeping the reference to
this layoutObject, and | 934 // Otherwise, there will two line box wrappers keeping the reference to
this layoutObject, and |
935 // only one will be notified when the layoutObject is getting destroyed.
The second line box wrapper | 935 // only one will be notified when the layoutObject is getting destroyed.
The second line box wrapper |
936 // will keep a stale reference. | 936 // will keep a stale reference. |
937 if (UNLIKELY(inlineBoxWrapper() != 0)) | 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 |
OLD | NEW |