| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 InvalidationIncremental, | 117 InvalidationIncremental, |
| 118 InvalidationSelfLayout, | 118 InvalidationSelfLayout, |
| 119 InvalidationBorderFitLines, | 119 InvalidationBorderFitLines, |
| 120 InvalidationBorderRadius, | 120 InvalidationBorderRadius, |
| 121 InvalidationBoundsChangeWithBackground, | 121 InvalidationBoundsChangeWithBackground, |
| 122 InvalidationBoundsChange, | 122 InvalidationBoundsChange, |
| 123 InvalidationLocationChange, | 123 InvalidationLocationChange, |
| 124 InvalidationScroll, | 124 InvalidationScroll, |
| 125 InvalidationSelection, | 125 InvalidationSelection, |
| 126 InvalidationLayer, | 126 InvalidationLayer, |
| 127 InvalidationRepaint, | 127 InvalidationPaint, |
| 128 InvalidationRepaintRectangle | 128 InvalidationPaintRectangle |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 const int caretWidth = 1; | 131 const int caretWidth = 1; |
| 132 | 132 |
| 133 struct AnnotatedRegionValue { | 133 struct AnnotatedRegionValue { |
| 134 bool operator==(const AnnotatedRegionValue& o) const | 134 bool operator==(const AnnotatedRegionValue& o) const |
| 135 { | 135 { |
| 136 return draggable == o.draggable && bounds == o.bounds; | 136 return draggable == o.draggable && bounds == o.bounds; |
| 137 } | 137 } |
| 138 | 138 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 } | 290 } |
| 291 | 291 |
| 292 ////////////////////////////////////////// | 292 ////////////////////////////////////////// |
| 293 private: | 293 private: |
| 294 #ifndef NDEBUG | 294 #ifndef NDEBUG |
| 295 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } | 295 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } |
| 296 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } | 296 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag
; } |
| 297 #endif | 297 #endif |
| 298 | 298 |
| 299 void addAbsoluteRectForLayer(LayoutRect& result); | 299 void addAbsoluteRectForLayer(LayoutRect& result); |
| 300 void setLayerNeedsFullRepaintForPositionedMovementLayout(); | 300 void setLayerNeedsFullPaintInvalidationForPositionedMovementLayout(); |
| 301 bool requiresAnonymousTableWrappers(const RenderObject*) const; | 301 bool requiresAnonymousTableWrappers(const RenderObject*) const; |
| 302 | 302 |
| 303 // Gets pseudoStyle from Shadow host(in case of input elements) | 303 // Gets pseudoStyle from Shadow host(in case of input elements) |
| 304 // or from Parent element. | 304 // or from Parent element. |
| 305 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const
; | 305 PassRefPtr<RenderStyle> getUncachedPseudoStyleFromParentOrShadowHost() const
; |
| 306 | 306 |
| 307 public: | 307 public: |
| 308 #ifndef NDEBUG | 308 #ifndef NDEBUG |
| 309 void showTreeForThis() const; | 309 void showTreeForThis() const; |
| 310 void showRenderTreeForThis() const; | 310 void showRenderTreeForThis() const; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 bool childrenInline() const { return m_bitfields.childrenInline(); } | 402 bool childrenInline() const { return m_bitfields.childrenInline(); } |
| 403 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } | 403 void setChildrenInline(bool b) { m_bitfields.setChildrenInline(b); } |
| 404 bool hasColumns() const { return m_bitfields.hasColumns(); } | 404 bool hasColumns() const { return m_bitfields.hasColumns(); } |
| 405 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } | 405 void setHasColumns(bool b = true) { m_bitfields.setHasColumns(b); } |
| 406 | 406 |
| 407 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } | 407 bool ancestorLineBoxDirty() const { return m_bitfields.ancestorLineBoxDirty(
); } |
| 408 void setAncestorLineBoxDirty(bool value = true) | 408 void setAncestorLineBoxDirty(bool value = true) |
| 409 { | 409 { |
| 410 m_bitfields.setAncestorLineBoxDirty(value); | 410 m_bitfields.setAncestorLineBoxDirty(value); |
| 411 if (value) | 411 if (value) |
| 412 setNeedsLayoutAndFullRepaint(); | 412 setNeedsLayoutAndFullPaintInvalidation(); |
| 413 } | 413 } |
| 414 | 414 |
| 415 enum FlowThreadState { | 415 enum FlowThreadState { |
| 416 NotInsideFlowThread = 0, | 416 NotInsideFlowThread = 0, |
| 417 InsideOutOfFlowThread = 1, | 417 InsideOutOfFlowThread = 1, |
| 418 InsideInFlowThread = 2, | 418 InsideInFlowThread = 2, |
| 419 }; | 419 }; |
| 420 | 420 |
| 421 void setFlowThreadStateIncludingDescendants(FlowThreadState); | 421 void setFlowThreadStateIncludingDescendants(FlowThreadState); |
| 422 | 422 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 // This is used for all computation of objectBoundingBox relative units and
by SVGLocatable::getBBox(). | 454 // This is used for all computation of objectBoundingBox relative units and
by SVGLocatable::getBBox(). |
| 455 // NOTE: Markers are not specifically ignored here by SVG 1.1 spec, but we i
gnore them | 455 // NOTE: Markers are not specifically ignored here by SVG 1.1 spec, but we i
gnore them |
| 456 // since stroke-width is ignored (and marker size can depend on stroke-width
). | 456 // since stroke-width is ignored (and marker size can depend on stroke-width
). |
| 457 // objectBoundingBox is returned local coordinates. | 457 // objectBoundingBox is returned local coordinates. |
| 458 // The name objectBoundingBox is taken from the SVG 1.1 spec. | 458 // The name objectBoundingBox is taken from the SVG 1.1 spec. |
| 459 virtual FloatRect objectBoundingBox() const; | 459 virtual FloatRect objectBoundingBox() const; |
| 460 virtual FloatRect strokeBoundingBox() const; | 460 virtual FloatRect strokeBoundingBox() const; |
| 461 | 461 |
| 462 // Returns the smallest rectangle enclosing all of the painted content | 462 // Returns the smallest rectangle enclosing all of the painted content |
| 463 // respecting clipping, masking, filters, opacity, stroke-width and markers | 463 // respecting clipping, masking, filters, opacity, stroke-width and markers |
| 464 virtual FloatRect repaintRectInLocalCoordinates() const; | 464 virtual FloatRect paintInvalidationRectInLocalCoordinates() const; |
| 465 | 465 |
| 466 // This only returns the transform="" value from the element | 466 // This only returns the transform="" value from the element |
| 467 // most callsites want localToParentTransform() instead. | 467 // most callsites want localToParentTransform() instead. |
| 468 virtual AffineTransform localTransform() const; | 468 virtual AffineTransform localTransform() const; |
| 469 | 469 |
| 470 // Returns the full transform mapping from local coordinates to local coords
for the parent SVG renderer | 470 // Returns the full transform mapping from local coordinates to local coords
for the parent SVG renderer |
| 471 // This includes any viewport transforms and x/y offsets as well as the tran
sform="" value off the element. | 471 // This includes any viewport transforms and x/y offsets as well as the tran
sform="" value off the element. |
| 472 virtual const AffineTransform& localToParentTransform() const; | 472 virtual const AffineTransform& localToParentTransform() const; |
| 473 | 473 |
| 474 // SVG uses FloatPoint precise hit testing, and passes the point in parent | 474 // SVG uses FloatPoint precise hit testing, and passes the point in parent |
| 475 // coordinates instead of in repaint container coordinates. Eventually the | 475 // coordinates instead of in paint invalidaiton container coordinates. Event
ually the |
| 476 // rest of the rendering tree will move to a similar model. | 476 // rest of the rendering tree will move to a similar model. |
| 477 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); | 477 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F
loatPoint& pointInParent, HitTestAction); |
| 478 | 478 |
| 479 virtual bool canHaveWhitespaceChildren() const | 479 virtual bool canHaveWhitespaceChildren() const |
| 480 { | 480 { |
| 481 if (isTable() || isTableRow() || isTableSection() || isRenderTableCol()
|| isFrameSet() || isFlexibleBox() || isRenderGrid()) | 481 if (isTable() || isTableRow() || isTableSection() || isRenderTableCol()
|| isFrameSet() || isFlexibleBox() || isRenderGrid()) |
| 482 return false; | 482 return false; |
| 483 return true; | 483 return true; |
| 484 } | 484 } |
| 485 | 485 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 | 519 |
| 520 enum BoxDecorationState { | 520 enum BoxDecorationState { |
| 521 NoBoxDecorations, | 521 NoBoxDecorations, |
| 522 HasBoxDecorationsAndBackgroundObscurationStatusInvalid, | 522 HasBoxDecorationsAndBackgroundObscurationStatusInvalid, |
| 523 HasBoxDecorationsAndBackgroundIsKnownToBeObscured, | 523 HasBoxDecorationsAndBackgroundIsKnownToBeObscured, |
| 524 HasBoxDecorationsAndBackgroundMayBeVisible, | 524 HasBoxDecorationsAndBackgroundMayBeVisible, |
| 525 }; | 525 }; |
| 526 bool hasBoxDecorations() const { return m_bitfields.boxDecorationState() !=
NoBoxDecorations; } | 526 bool hasBoxDecorations() const { return m_bitfields.boxDecorationState() !=
NoBoxDecorations; } |
| 527 bool backgroundIsKnownToBeObscured(); | 527 bool backgroundIsKnownToBeObscured(); |
| 528 bool canRenderBorderImage() const; | 528 bool canRenderBorderImage() const; |
| 529 bool mustRepaintBackgroundOrBorderOnWidthChange() const; | 529 bool mustInvalidateBackgroundOrBorderPaintOnWidthChange() const; |
| 530 bool mustRepaintBackgroundOrBorderOnHeightChange() const; | 530 bool mustInvalidateBackgroundOrBorderPaintOnHeightChange() const; |
| 531 bool mustRepaintFillLayersOnWidthChange(const FillLayer&) const; | 531 bool mustInvalidateFillLayersPaintOnWidthChange(const FillLayer&) const; |
| 532 bool mustRepaintFillLayersOnHeightChange(const FillLayer&) const; | 532 bool mustInvalidateFillLayersPaintOnHeightChange(const FillLayer&) const; |
| 533 bool hasBackground() const { return style()->hasBackground(); } | 533 bool hasBackground() const { return style()->hasBackground(); } |
| 534 bool hasEntirelyFixedBackground() const; | 534 bool hasEntirelyFixedBackground() const; |
| 535 | 535 |
| 536 bool needsLayout() const | 536 bool needsLayout() const |
| 537 { | 537 { |
| 538 return m_bitfields.selfNeedsLayout() || m_bitfields.normalChildNeedsLayo
ut() || m_bitfields.posChildNeedsLayout() | 538 return m_bitfields.selfNeedsLayout() || m_bitfields.normalChildNeedsLayo
ut() || m_bitfields.posChildNeedsLayout() |
| 539 || m_bitfields.needsSimplifiedNormalFlowLayout() || m_bitfields.need
sPositionedMovementLayout(); | 539 || m_bitfields.needsSimplifiedNormalFlowLayout() || m_bitfields.need
sPositionedMovementLayout(); |
| 540 } | 540 } |
| 541 | 541 |
| 542 bool selfNeedsLayout() const { return m_bitfields.selfNeedsLayout(); } | 542 bool selfNeedsLayout() const { return m_bitfields.selfNeedsLayout(); } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 // pseudo elements for which their parent node is returned. | 606 // pseudo elements for which their parent node is returned. |
| 607 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh
adowHostNode() : node(); } | 607 Node* generatingNode() const { return isPseudoElement() ? node()->parentOrSh
adowHostNode() : node(); } |
| 608 | 608 |
| 609 Document& document() const { return m_node->document(); } | 609 Document& document() const { return m_node->document(); } |
| 610 LocalFrame* frame() const { return document().frame(); } | 610 LocalFrame* frame() const { return document().frame(); } |
| 611 | 611 |
| 612 bool hasOutlineAnnotation() const; | 612 bool hasOutlineAnnotation() const; |
| 613 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati
on(); } | 613 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati
on(); } |
| 614 | 614 |
| 615 // Returns the object containing this one. Can be different from parent for
positioned elements. | 615 // Returns the object containing this one. Can be different from parent for
positioned elements. |
| 616 // If repaintContainer and repaintContainerSkipped are not null, on return *
repaintContainerSkipped | 616 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped |
| 617 // is true if the renderer returned is an ancestor of repaintContainer. | 617 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. |
| 618 RenderObject* container(const RenderLayerModelObject* repaintContainer = 0,
bool* repaintContainerSkipped = 0) const; | 618 RenderObject* container(const RenderLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; |
| 619 | 619 |
| 620 virtual RenderObject* hoverAncestor() const { return parent(); } | 620 virtual RenderObject* hoverAncestor() const { return parent(); } |
| 621 | 621 |
| 622 Element* offsetParent() const; | 622 Element* offsetParent() const; |
| 623 | 623 |
| 624 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); | 624 void markContainingBlocksForLayout(bool scheduleRelayout = true, RenderObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); |
| 625 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); | 625 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); |
| 626 void setNeedsLayoutAndFullRepaint(MarkingBehavior = MarkContainingBlockChain
, SubtreeLayoutScope* = 0); | 626 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining
BlockChain, SubtreeLayoutScope* = 0); |
| 627 void clearNeedsLayout(); | 627 void clearNeedsLayout(); |
| 628 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); | 628 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); |
| 629 void setNeedsPositionedMovementLayout(); | 629 void setNeedsPositionedMovementLayout(); |
| 630 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); | 630 void setPreferredLogicalWidthsDirty(MarkingBehavior = MarkContainingBlockCha
in); |
| 631 void clearPreferredLogicalWidthsDirty(); | 631 void clearPreferredLogicalWidthsDirty(); |
| 632 void invalidateContainerPreferredLogicalWidths(); | 632 void invalidateContainerPreferredLogicalWidths(); |
| 633 | 633 |
| 634 void setNeedsLayoutAndPrefWidthsRecalc() | 634 void setNeedsLayoutAndPrefWidthsRecalc() |
| 635 { | 635 { |
| 636 setNeedsLayout(); | 636 setNeedsLayout(); |
| 637 setPreferredLogicalWidthsDirty(); | 637 setPreferredLogicalWidthsDirty(); |
| 638 } | 638 } |
| 639 void setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint() | 639 void setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation() |
| 640 { | 640 { |
| 641 setNeedsLayoutAndFullRepaint(); | 641 setNeedsLayoutAndFullPaintInvalidation(); |
| 642 setPreferredLogicalWidthsDirty(); | 642 setPreferredLogicalWidthsDirty(); |
| 643 } | 643 } |
| 644 | 644 |
| 645 void setPositionState(EPosition position) | 645 void setPositionState(EPosition position) |
| 646 { | 646 { |
| 647 ASSERT((position != AbsolutePosition && position != FixedPosition) || is
Box()); | 647 ASSERT((position != AbsolutePosition && position != FixedPosition) || is
Box()); |
| 648 m_bitfields.setPositionedState(position); | 648 m_bitfields.setPositionedState(position); |
| 649 } | 649 } |
| 650 void clearPositionedState() { m_bitfields.clearPositionedState(); } | 650 void clearPositionedState() { m_bitfields.clearPositionedState(); } |
| 651 | 651 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 679 virtual bool updateImageLoadingPriorities() { return false; } | 679 virtual bool updateImageLoadingPriorities() { return false; } |
| 680 void setHasPendingResourceUpdate(bool hasPendingResourceUpdate) { m_bitfield
s.setHasPendingResourceUpdate(hasPendingResourceUpdate); } | 680 void setHasPendingResourceUpdate(bool hasPendingResourceUpdate) { m_bitfield
s.setHasPendingResourceUpdate(hasPendingResourceUpdate); } |
| 681 bool hasPendingResourceUpdate() const { return m_bitfields.hasPendingResourc
eUpdate(); } | 681 bool hasPendingResourceUpdate() const { return m_bitfields.hasPendingResourc
eUpdate(); } |
| 682 | 682 |
| 683 /* This function performs a layout only if one is needed. */ | 683 /* This function performs a layout only if one is needed. */ |
| 684 void layoutIfNeeded() { if (needsLayout()) layout(); } | 684 void layoutIfNeeded() { if (needsLayout()) layout(); } |
| 685 | 685 |
| 686 void forceLayout(); | 686 void forceLayout(); |
| 687 void forceChildLayout(); | 687 void forceChildLayout(); |
| 688 | 688 |
| 689 // used for element state updates that cannot be fixed with a | 689 // Used for element state updates that cannot be fixed with a |
| 690 // repaint and do not need a relayout | 690 // paint invalidation and do not need a relayout. |
| 691 virtual void updateFromElement() { } | 691 virtual void updateFromElement() { } |
| 692 | 692 |
| 693 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); | 693 virtual void addAnnotatedRegions(Vector<AnnotatedRegionValue>&); |
| 694 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); | 694 void collectAnnotatedRegions(Vector<AnnotatedRegionValue>&); |
| 695 | 695 |
| 696 CompositingState compositingState() const; | 696 CompositingState compositingState() const; |
| 697 virtual CompositingReasons additionalCompositingReasons(CompositingTriggerFl
ags) const; | 697 virtual CompositingReasons additionalCompositingReasons(CompositingTriggerFl
ags) const; |
| 698 | 698 |
| 699 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l
ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes
tAll); | 699 bool hitTest(const HitTestRequest&, HitTestResult&, const HitTestLocation& l
ocationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTes
tAll); |
| 700 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&); | 700 virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 | 732 |
| 733 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. | 733 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. |
| 734 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const | 734 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const |
| 735 { | 735 { |
| 736 return localToContainerQuad(quad, 0, mode, wasFixed); | 736 return localToContainerQuad(quad, 0, mode, wasFixed); |
| 737 } | 737 } |
| 738 // Convert an absolute quad to local coordinates. | 738 // Convert an absolute quad to local coordinates. |
| 739 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; | 739 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; |
| 740 | 740 |
| 741 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. | 741 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. |
| 742 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec
t* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const; | 742 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec
t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons
t; |
| 743 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb
ject* repaintContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const; | 743 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb
ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) c
onst; |
| 744 | 744 |
| 745 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, | 745 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, |
| 746 // different offsets apply at different points, so return the offset that ap
plies to the given point. | 746 // different offsets apply at different points, so return the offset that ap
plies to the given point. |
| 747 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; | 747 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; |
| 748 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. | 748 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. |
| 749 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; | 749 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; |
| 750 | 750 |
| 751 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } | 751 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } |
| 752 | 752 |
| 753 LayoutPoint positionFromRepaintContainer(const RenderLayerModelObject* repai
ntContainer) const; | 753 LayoutPoint positionFromPaintInvalidationContainer(const RenderLayerModelObj
ect* paintInvalidationContainer) const; |
| 754 | 754 |
| 755 IntRect absoluteBoundingBoxRect() const; | 755 IntRect absoluteBoundingBoxRect() const; |
| 756 // FIXME: This function should go away eventually | 756 // FIXME: This function should go away eventually |
| 757 IntRect absoluteBoundingBoxRectIgnoringTransforms() const; | 757 IntRect absoluteBoundingBoxRectIgnoringTransforms() const; |
| 758 | 758 |
| 759 // Build an array of quads in absolute coords for line boxes | 759 // Build an array of quads in absolute coords for line boxes |
| 760 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const
{ } | 760 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const
{ } |
| 761 | 761 |
| 762 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); | 762 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); |
| 763 | 763 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 781 inline Color resolveColor(int colorProperty) const | 781 inline Color resolveColor(int colorProperty) const |
| 782 { | 782 { |
| 783 return style()->visitedDependentColor(colorProperty); | 783 return style()->visitedDependentColor(colorProperty); |
| 784 } | 784 } |
| 785 | 785 |
| 786 // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style
based off of a | 786 // Used only by Element::pseudoStyleCacheIsInvalid to get a first line style
based off of a |
| 787 // given new style, without accessing the cache. | 787 // given new style, without accessing the cache. |
| 788 PassRefPtr<RenderStyle> uncachedFirstLineStyle(RenderStyle*) const; | 788 PassRefPtr<RenderStyle> uncachedFirstLineStyle(RenderStyle*) const; |
| 789 | 789 |
| 790 // Anonymous blocks that are part of of a continuation chain will return the
ir inline continuation's outline style instead. | 790 // Anonymous blocks that are part of of a continuation chain will return the
ir inline continuation's outline style instead. |
| 791 // This is typically only relevant when repainting. | 791 // This is typically only relevant when invalidating paints. |
| 792 virtual RenderStyle* outlineStyleForRepaint() const { return style(); } | 792 virtual RenderStyle* outlineStyleForPaintInvalidation() const { return style
(); } |
| 793 | 793 |
| 794 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; | 794 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; |
| 795 | 795 |
| 796 struct AppliedTextDecoration { | 796 struct AppliedTextDecoration { |
| 797 Color color; | 797 Color color; |
| 798 TextDecorationStyle style; | 798 TextDecorationStyle style; |
| 799 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio
nStyleSolid) { } | 799 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio
nStyleSolid) { } |
| 800 }; | 800 }; |
| 801 | 801 |
| 802 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli
ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu
irksMode = false, bool firstlineStyle = false); | 802 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli
ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu
irksMode = false, bool firstlineStyle = false); |
| 803 | 803 |
| 804 // Return the RenderLayerModelObject in the container chain which is respons
ible for painting this object, or 0 | 804 // Return the RenderLayerModelObject in the container chain which is respons
ible for painting this object, or 0 |
| 805 // if painting is root-relative. This is the container that should be passed
to the 'forRepaint' | 805 // if painting is root-relative. This is the container that should be passed
to the 'forPaintInvalidation' |
| 806 // methods. | 806 // methods. |
| 807 const RenderLayerModelObject* containerForRepaint() const; | 807 const RenderLayerModelObject* containerForPaintInvalidation() const; |
| 808 const RenderLayerModelObject* enclosingCompositedContainer() const; | 808 const RenderLayerModelObject* enclosingCompositedContainer() const; |
| 809 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c
onst RenderLayerModelObject* repaintContainer) const; | 809 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c
onst RenderLayerModelObject* paintInvalidationContainer) const; |
| 810 bool isRepaintContainer() const; | 810 bool isPaintInvalidationContainer() const; |
| 811 | 811 |
| 812 LayoutRect computeRepaintRect() | 812 LayoutRect computePaintInvalidationRect() |
| 813 { | 813 { |
| 814 return computeRepaintRect(containerForRepaint()); | 814 return computePaintInvalidationRect(containerForPaintInvalidation()); |
| 815 } | 815 } |
| 816 | 816 |
| 817 // Returns the repaint rect for this RenderObject in the coordinate space of
the paint backing (typically a GraphicsLayer) for |repaintContainer|. | 817 // Returns the paint invalidation rect for this RenderObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. |
| 818 LayoutRect computeRepaintRect(const RenderLayerModelObject* repaintContainer
) const; | 818 LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintI
nvalidationContainer) const; |
| 819 | 819 |
| 820 // Returns the rect bounds needed to repaint this object, in the coordinate
space of the rendering backing of |repaintContainer| | 820 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| |
| 821 LayoutRect boundsRectForRepaint(const RenderLayerModelObject* repaintContain
er) const; | 821 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain
tInvalidationContainer) const; |
| 822 | 822 |
| 823 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space | 823 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space |
| 824 // of paintInvalidationContainer. If paintInvalidationContainer is 0, invali
date paints via the view. | 824 // of paintInvalidationContainer. If paintInvalidationContainer is 0, invali
date paints via the view. |
| 825 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali
dationContainer, const IntRect&, InvalidationReason) const; | 825 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali
dationContainer, const IntRect&, InvalidationReason) const; |
| 826 | 826 |
| 827 // Invalidate the paint of the entire object. Called when, e.g., the color o
f a border changes, or when a border | 827 // Invalidate the paint of the entire object. Called when, e.g., the color o
f a border changes, or when a border |
| 828 // style changes. | 828 // style changes. |
| 829 void paintInvalidationForWholeRenderer() const; | 829 void paintInvalidationForWholeRenderer() const; |
| 830 | 830 |
| 831 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. | 831 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. |
| 832 void invalidatePaintRectangle(const LayoutRect&) const; | 832 void invalidatePaintRectangle(const LayoutRect&) const; |
| 833 | 833 |
| 834 // Invalidate the paint only if our old bounds and new bounds are different.
The caller may pass in newBounds if they are known. | 834 // Invalidate the paint only if our old bounds and new bounds are different.
The caller may pass in newBounds if they are known. |
| 835 bool invalidatePaintAfterLayoutIfNeeded(const RenderLayerModelObject* paintI
nvalidationContainer, bool wasSelfLayout, | 835 bool invalidatePaintAfterLayoutIfNeeded(const RenderLayerModelObject* paintI
nvalidationContainer, bool wasSelfLayout, |
| 836 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, | 836 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer, |
| 837 const LayoutRect* newBoundsPtr = 0, const LayoutPoint* newPositionFromPa
intInvalidationContainer = 0); | 837 const LayoutRect* newBoundsPtr = 0, const LayoutPoint* newPositionFromPa
intInvalidationContainer = 0); |
| 838 | 838 |
| 839 // Walk the tree after layout issuing paint invalidations for renderers that
have changed or moved, updating bounds that have changed, and clearing paint in
validation state. | 839 // Walk the tree after layout issuing paint invalidations for renderers that
have changed or moved, updating bounds that have changed, and clearing paint in
validation state. |
| 840 virtual void invalidateTreeAfterLayout(const RenderLayerModelObject&); | 840 virtual void invalidateTreeAfterLayout(const RenderLayerModelObject&); |
| 841 | 841 |
| 842 virtual void invalidatePaintForOverflow(); | 842 virtual void invalidatePaintForOverflow(); |
| 843 void invalidatePaintForOverflowIfNeeded(); | 843 void invalidatePaintForOverflowIfNeeded(); |
| 844 | 844 |
| 845 bool checkForRepaint() const; | 845 bool checkForPaintInvalidation() const; |
| 846 bool checkForRepaintDuringLayout() const; | 846 bool checkForPaintInvalidationDuringLayout() const; |
| 847 | 847 |
| 848 // Returns the rect that should be repainted whenever this object changes.
The rect is in the view's | 848 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's |
| 849 // coordinate space. This method deals with outlines and overflow. | 849 // coordinate space. This method deals with outlines and overflow. |
| 850 LayoutRect absoluteClippedOverflowRect() const | 850 LayoutRect absoluteClippedOverflowRect() const |
| 851 { | 851 { |
| 852 return clippedOverflowRectForRepaint(0); | 852 return clippedOverflowRectForPaintInvalidation(0); |
| 853 } | 853 } |
| 854 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; | 854 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; |
| 855 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const; | 855 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer) const; |
| 856 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r
epaintContainer, LayoutUnit outlineWidth) const; | 856 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode
lObject* paintInvalidationContainer, LayoutUnit outlineWidth) const; |
| 857 | 857 |
| 858 // Given a rect in the object's coordinate space, compute a rect suitable fo
r repainting | 858 // Given a rect in the object's coordinate space, compute a rect suitable fo
r invalidating paints of |
| 859 // that rect in the coordinate space of repaintContainer. | 859 // that rect in the coordinate space of paintInvalidationContainer. |
| 860 virtual void mapRectToRepaintBacking(const RenderLayerModelObject* repaintCo
ntainer, LayoutRect&, bool fixed = false) const; | 860 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, bool fixed = false) const; |
| 861 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect& repaintRect, bool fixed = false) const; | 861 virtual void computeFloatRectForPaintInvalidation(const RenderLayerModelObje
ct* paintInvalidationContainer, FloatRect& paintInvalidationRect, bool fixed = f
alse) const; |
| 862 | 862 |
| 863 // Return the offset to the column in which the specified point (in flow-thr
ead coordinates) | 863 // Return the offset to the column in which the specified point (in flow-thr
ead coordinates) |
| 864 // lives. This is used to convert a flow-thread point to a visual point. | 864 // lives. This is used to convert a flow-thread point to a visual point. |
| 865 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz
e(); } | 865 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz
e(); } |
| 866 | 866 |
| 867 virtual unsigned length() const { return 1; } | 867 virtual unsigned length() const { return 1; } |
| 868 | 868 |
| 869 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } | 869 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } |
| 870 | 870 |
| 871 bool isTransparent() const { return style()->opacity() < 1.0f; } | 871 bool isTransparent() const { return style()->opacity() < 1.0f; } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 883 | 883 |
| 884 // The current selection state for an object. For blocks, the state refers
to the state of the leaf | 884 // The current selection state for an object. For blocks, the state refers
to the state of the leaf |
| 885 // descendants (as described above in the SelectionState enum declaration). | 885 // descendants (as described above in the SelectionState enum declaration). |
| 886 SelectionState selectionState() const { return m_bitfields.selectionState();
} | 886 SelectionState selectionState() const { return m_bitfields.selectionState();
} |
| 887 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect
ionState(state); } | 887 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect
ionState(state); } |
| 888 inline void setSelectionStateIfNeeded(SelectionState); | 888 inline void setSelectionStateIfNeeded(SelectionState); |
| 889 bool canUpdateSelectionOnRootLineBoxes(); | 889 bool canUpdateSelectionOnRootLineBoxes(); |
| 890 | 890 |
| 891 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest | 891 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest |
| 892 // possible bounding box for the selection. | 892 // possible bounding box for the selection. |
| 893 LayoutRect selectionRect(bool clipToVisibleContent = true) { return selectio
nRectForRepaint(0, clipToVisibleContent); } | 893 LayoutRect selectionRect(bool clipToVisibleContent = true) { return selectio
nRectForPaintInvalidation(0, clipToVisibleContent); } |
| 894 virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* /*r
epaintContainer*/, bool /*clipToVisibleContent*/ = true) { return LayoutRect();
} | 894 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO
bject* /*paintInvalidationContainer*/, bool /*clipToVisibleContent*/ = true) { r
eturn LayoutRect(); } |
| 895 | 895 |
| 896 virtual bool canBeSelectionLeaf() const { return false; } | 896 virtual bool canBeSelectionLeaf() const { return false; } |
| 897 bool hasSelectedChildren() const { return selectionState() != SelectionNone;
} | 897 bool hasSelectedChildren() const { return selectionState() != SelectionNone;
} |
| 898 | 898 |
| 899 bool isSelectable() const; | 899 bool isSelectable() const; |
| 900 // Obtains the selection colors that should be used when painting a selectio
n. | 900 // Obtains the selection colors that should be used when painting a selectio
n. |
| 901 Color selectionBackgroundColor() const; | 901 Color selectionBackgroundColor() const; |
| 902 Color selectionForegroundColor() const; | 902 Color selectionForegroundColor() const; |
| 903 Color selectionEmphasisMarkColor() const; | 903 Color selectionEmphasisMarkColor() const; |
| 904 | 904 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 { | 956 { |
| 957 if (request.touchAction() && !visibleForTouchAction()) | 957 if (request.touchAction() && !visibleForTouchAction()) |
| 958 return false; | 958 return false; |
| 959 return style()->visibility() == VISIBLE && (request.ignorePointerEventsN
one() || style()->pointerEvents() != PE_NONE) && !isInert(); | 959 return style()->visibility() == VISIBLE && (request.ignorePointerEventsN
one() || style()->pointerEvents() != PE_NONE) && !isInert(); |
| 960 } | 960 } |
| 961 | 961 |
| 962 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE &
& style()->pointerEvents() != PE_NONE && !isInert(); } | 962 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE &
& style()->pointerEvents() != PE_NONE && !isInert(); } |
| 963 | 963 |
| 964 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use | 964 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use |
| 965 // localToAbsolute/absoluteToLocal methods instead. | 965 // localToAbsolute/absoluteToLocal methods instead. |
| 966 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const; | 966 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0) const; |
| 967 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; | 967 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; |
| 968 | 968 |
| 969 // Pushes state onto RenderGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). | 969 // Pushes state onto RenderGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). |
| 970 // Returns the renderer which was mapped to (container or ancestorToStopAt). | 970 // Returns the renderer which was mapped to (container or ancestorToStopAt). |
| 971 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const; | 971 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const; |
| 972 | 972 |
| 973 bool shouldUseTransformFromContainer(const RenderObject* container) const; | 973 bool shouldUseTransformFromContainer(const RenderObject* container) const; |
| 974 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; | 974 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; |
| 975 | 975 |
| 976 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } | 976 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 // containerRect is a rect that has already been added for the currentLayer
which is likely to | 1076 // containerRect is a rect that has already been added for the currentLayer
which is likely to |
| 1077 // be a container for child elements. Any rect wholly contained by container
Rect can be | 1077 // be a container for child elements. Any rect wholly contained by container
Rect can be |
| 1078 // skipped. | 1078 // skipped. |
| 1079 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t; | 1079 virtual void addLayerHitTestRects(LayerHitTestRects&, const RenderLayer* cur
rentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) cons
t; |
| 1080 | 1080 |
| 1081 // Add hit-test rects for this renderer only to the provided list. layerOffs
et is the offset | 1081 // Add hit-test rects for this renderer only to the provided list. layerOffs
et is the offset |
| 1082 // of this renderer within the current layer that should be used for each re
sult. | 1082 // of this renderer within the current layer that should be used for each re
sult. |
| 1083 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { }; | 1083 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { }; |
| 1084 | 1084 |
| 1085 private: | 1085 private: |
| 1086 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* repaint
Container = 0, bool* repaintContainerSkipped = 0) const; | 1086 RenderBlock* containerForFixedPosition(const RenderLayerModelObject* paintIn
validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; |
| 1087 | 1087 |
| 1088 RenderFlowThread* locateFlowThreadContainingBlock() const; | 1088 RenderFlowThread* locateFlowThreadContainingBlock() const; |
| 1089 void removeFromRenderFlowThread(); | 1089 void removeFromRenderFlowThread(); |
| 1090 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); | 1090 void removeFromRenderFlowThreadRecursive(RenderFlowThread*); |
| 1091 | 1091 |
| 1092 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; | 1092 bool hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor() const; |
| 1093 | 1093 |
| 1094 RenderStyle* cachedFirstLineStyle() const; | 1094 RenderStyle* cachedFirstLineStyle() const; |
| 1095 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensi
tiveProperties) const; | 1095 StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensi
tiveProperties) const; |
| 1096 | 1096 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } | 1263 void setIsDragging(bool b) { m_bitfields.setIsDragging(b); } |
| 1264 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } | 1264 void setEverHadLayout(bool b) { m_bitfields.setEverHadLayout(b); } |
| 1265 void setShouldInvalidateOverflowForPaint(bool b) { m_bitfields.setShouldInva
lidateOverflowForPaint(b); } | 1265 void setShouldInvalidateOverflowForPaint(bool b) { m_bitfields.setShouldInva
lidateOverflowForPaint(b); } |
| 1266 void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSel
fNeedsOverflowRecalcAfterStyleChange(b); } | 1266 void setSelfNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setSel
fNeedsOverflowRecalcAfterStyleChange(b); } |
| 1267 void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setCh
ildNeedsOverflowRecalcAfterStyleChange(b); } | 1267 void setChildNeedsOverflowRecalcAfterStyleChange(bool b) { m_bitfields.setCh
ildNeedsOverflowRecalcAfterStyleChange(b); } |
| 1268 | 1268 |
| 1269 private: | 1269 private: |
| 1270 // Store state between styleWillChange and styleDidChange | 1270 // Store state between styleWillChange and styleDidChange |
| 1271 static bool s_affectsParentBlock; | 1271 static bool s_affectsParentBlock; |
| 1272 | 1272 |
| 1273 // This stores the repaint rect from the previous layout. | 1273 // This stores the paint invalidation rect from the previous layout. |
| 1274 LayoutRect m_previousPaintInvalidationRect; | 1274 LayoutRect m_previousPaintInvalidationRect; |
| 1275 | 1275 |
| 1276 // This stores the position in the repaint container's coordinate. | 1276 // This stores the position in the paint invalidation container's coordinate
. |
| 1277 // It is used to detect renderer shifts that forces a full invalidation. | 1277 // It is used to detect renderer shifts that forces a full invalidation. |
| 1278 LayoutPoint m_previousPositionFromPaintInvalidationContainer; | 1278 LayoutPoint m_previousPositionFromPaintInvalidationContainer; |
| 1279 }; | 1279 }; |
| 1280 | 1280 |
| 1281 // FIXME: remove this once the render object lifecycle ASSERTS are no longer hit
. | 1281 // FIXME: remove this once the render object lifecycle ASSERTS are no longer hit
. |
| 1282 class DeprecatedDisableModifyRenderTreeStructureAsserts { | 1282 class DeprecatedDisableModifyRenderTreeStructureAsserts { |
| 1283 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyRenderTreeStructureAsserts); | 1283 WTF_MAKE_NONCOPYABLE(DeprecatedDisableModifyRenderTreeStructureAsserts); |
| 1284 public: | 1284 public: |
| 1285 DeprecatedDisableModifyRenderTreeStructureAsserts(); | 1285 DeprecatedDisableModifyRenderTreeStructureAsserts(); |
| 1286 | 1286 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1316 if (isText() && !isBR()) | 1316 if (isText() && !isBR()) |
| 1317 return false; | 1317 return false; |
| 1318 return true; | 1318 return true; |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 inline bool RenderObject::isBeforeOrAfterContent() const | 1321 inline bool RenderObject::isBeforeOrAfterContent() const |
| 1322 { | 1322 { |
| 1323 return isBeforeContent() || isAfterContent(); | 1323 return isBeforeContent() || isAfterContent(); |
| 1324 } | 1324 } |
| 1325 | 1325 |
| 1326 // If repaintAfterLayout is enabled, setNeedsLayout() won't cause full repaint a
s | 1326 // If repaintAfterLayout is enabled, setNeedsLayout() won't cause full paint inv
alidations as |
| 1327 // setNeedsLayoutAndFullRepaint() does. Otherwise the two methods are identical. | 1327 // setNeedsLayoutAndFullPaintInvalidation() does. Otherwise the two methods are
identical. |
| 1328 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) | 1328 inline void RenderObject::setNeedsLayout(MarkingBehavior markParents, SubtreeLay
outScope* layouter) |
| 1329 { | 1329 { |
| 1330 ASSERT(!isSetNeedsLayoutForbidden()); | 1330 ASSERT(!isSetNeedsLayoutForbidden()); |
| 1331 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); | 1331 bool alreadyNeededLayout = m_bitfields.selfNeedsLayout(); |
| 1332 setSelfNeedsLayout(true); | 1332 setSelfNeedsLayout(true); |
| 1333 if (!alreadyNeededLayout) { | 1333 if (!alreadyNeededLayout) { |
| 1334 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) | 1334 if (markParents == MarkContainingBlockChain && (!layouter || layouter->r
oot() != this)) |
| 1335 markContainingBlocksForLayout(true, 0, layouter); | 1335 markContainingBlocksForLayout(true, 0, layouter); |
| 1336 } | 1336 } |
| 1337 } | 1337 } |
| 1338 | 1338 |
| 1339 inline void RenderObject::setNeedsLayoutAndFullRepaint(MarkingBehavior markParen
ts, SubtreeLayoutScope* layouter) | 1339 inline void RenderObject::setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior
markParents, SubtreeLayoutScope* layouter) |
| 1340 { | 1340 { |
| 1341 setNeedsLayout(markParents, layouter); | 1341 setNeedsLayout(markParents, layouter); |
| 1342 setShouldDoFullPaintInvalidationAfterLayout(true); | 1342 setShouldDoFullPaintInvalidationAfterLayout(true); |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 inline void RenderObject::clearNeedsLayout() | 1345 inline void RenderObject::clearNeedsLayout() |
| 1346 { | 1346 { |
| 1347 if (needsPositionedMovementLayoutOnly()) | 1347 if (needsPositionedMovementLayoutOnly()) |
| 1348 setOnlyNeededPositionedMovementLayout(true); | 1348 setOnlyNeededPositionedMovementLayout(true); |
| 1349 setLayoutDidGetCalled(true); | 1349 setLayoutDidGetCalled(true); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 inline void RenderObject::setNeedsPositionedMovementLayout() | 1372 inline void RenderObject::setNeedsPositionedMovementLayout() |
| 1373 { | 1373 { |
| 1374 bool alreadyNeededLayout = needsPositionedMovementLayout(); | 1374 bool alreadyNeededLayout = needsPositionedMovementLayout(); |
| 1375 setNeedsPositionedMovementLayout(true); | 1375 setNeedsPositionedMovementLayout(true); |
| 1376 ASSERT(!isSetNeedsLayoutForbidden()); | 1376 ASSERT(!isSetNeedsLayoutForbidden()); |
| 1377 if (!alreadyNeededLayout) { | 1377 if (!alreadyNeededLayout) { |
| 1378 markContainingBlocksForLayout(); | 1378 markContainingBlocksForLayout(); |
| 1379 if (hasLayer()) | 1379 if (hasLayer()) |
| 1380 setLayerNeedsFullRepaintForPositionedMovementLayout(); | 1380 setLayerNeedsFullPaintInvalidationForPositionedMovementLayout(); |
| 1381 } | 1381 } |
| 1382 } | 1382 } |
| 1383 | 1383 |
| 1384 inline bool RenderObject::preservesNewline() const | 1384 inline bool RenderObject::preservesNewline() const |
| 1385 { | 1385 { |
| 1386 if (isSVGInlineText()) | 1386 if (isSVGInlineText()) |
| 1387 return false; | 1387 return false; |
| 1388 | 1388 |
| 1389 return style()->preserveNewline(); | 1389 return style()->preserveNewline(); |
| 1390 } | 1390 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 void showTree(const WebCore::RenderObject*); | 1483 void showTree(const WebCore::RenderObject*); |
| 1484 void showLineTree(const WebCore::RenderObject*); | 1484 void showLineTree(const WebCore::RenderObject*); |
| 1485 void showRenderTree(const WebCore::RenderObject* object1); | 1485 void showRenderTree(const WebCore::RenderObject* object1); |
| 1486 // We don't make object2 an optional parameter so that showRenderTree | 1486 // We don't make object2 an optional parameter so that showRenderTree |
| 1487 // can be called from gdb easily. | 1487 // can be called from gdb easily. |
| 1488 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1488 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
| 1489 | 1489 |
| 1490 #endif | 1490 #endif |
| 1491 | 1491 |
| 1492 #endif // RenderObject_h | 1492 #endif // RenderObject_h |
| OLD | NEW |