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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 class HitTestResult; | 60 class HitTestResult; |
61 class InlineBox; | 61 class InlineBox; |
62 class Position; | 62 class Position; |
63 class PositionWithAffinity; | 63 class PositionWithAffinity; |
64 class PseudoStyleRequest; | 64 class PseudoStyleRequest; |
65 class LayoutBoxModelObject; | 65 class LayoutBoxModelObject; |
66 class RenderBlock; | 66 class RenderBlock; |
67 class LayoutFlowThread; | 67 class LayoutFlowThread; |
68 class LayoutGeometryMap; | 68 class LayoutGeometryMap; |
69 class Layer; | 69 class Layer; |
70 class LayoutLayerModelObject; | |
71 class LayoutMultiColumnSpannerPlaceholder; | 70 class LayoutMultiColumnSpannerPlaceholder; |
72 class RenderView; | 71 class RenderView; |
73 class TransformState; | 72 class TransformState; |
74 | 73 |
75 struct PaintInfo; | 74 struct PaintInfo; |
76 | 75 |
77 enum CursorDirective { | 76 enum CursorDirective { |
78 SetCursorBasedOnStyle, | 77 SetCursorBasedOnStyle, |
79 SetCursor, | 78 SetCursor, |
80 DoNotSetCursor | 79 DoNotSetCursor |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 bool isTableSection() const { return isOfType(LayoutObjectTableSection); } | 374 bool isTableSection() const { return isOfType(LayoutObjectTableSection); } |
376 bool isTextArea() const { return isOfType(LayoutObjectTextArea); } | 375 bool isTextArea() const { return isOfType(LayoutObjectTextArea); } |
377 bool isTextControl() const { return isOfType(LayoutObjectTextControl); } | 376 bool isTextControl() const { return isOfType(LayoutObjectTextControl); } |
378 bool isTextField() const { return isOfType(LayoutObjectTextField); } | 377 bool isTextField() const { return isOfType(LayoutObjectTextField); } |
379 bool isVideo() const { return isOfType(LayoutObjectVideo); } | 378 bool isVideo() const { return isOfType(LayoutObjectVideo); } |
380 bool isWidget() const { return isOfType(LayoutObjectWidget); } | 379 bool isWidget() const { return isOfType(LayoutObjectWidget); } |
381 | 380 |
382 virtual bool isImage() const { return false; } | 381 virtual bool isImage() const { return false; } |
383 | 382 |
384 virtual bool isInlineBlockOrInlineTable() const { return false; } | 383 virtual bool isInlineBlockOrInlineTable() const { return false; } |
385 virtual bool isLayoutLayerModelObject() const { return false; } | 384 virtual bool isLayoutBoxModelObject() const { return false; } |
386 virtual bool isRenderBlock() const { return false; } | 385 virtual bool isRenderBlock() const { return false; } |
387 virtual bool isRenderBlockFlow() const { return false; } | 386 virtual bool isRenderBlockFlow() const { return false; } |
388 virtual bool isLayoutFlowThread() const { return false; } | 387 virtual bool isLayoutFlowThread() const { return false; } |
389 virtual bool isRenderInline() const { return false; } | 388 virtual bool isRenderInline() const { return false; } |
390 virtual bool isLayoutPart() const { return false; } | 389 virtual bool isLayoutPart() const { return false; } |
391 | 390 |
392 bool isDocumentElement() const { return document().documentElement() == m_no
de; } | 391 bool isDocumentElement() const { return document().documentElement() == m_no
de; } |
393 // isBody is called from RenderBox::styleWillChange and is thus quite hot. | 392 // isBody is called from RenderBox::styleWillChange and is thus quite hot. |
394 bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag
); } | 393 bool isBody() const { return node() && node()->hasTagName(HTMLNames::bodyTag
); } |
395 bool isHR() const; | 394 bool isHR() const; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 | 630 |
632 Document& document() const { return m_node->document(); } | 631 Document& document() const { return m_node->document(); } |
633 LocalFrame* frame() const { return document().frame(); } | 632 LocalFrame* frame() const { return document().frame(); } |
634 | 633 |
635 virtual LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const { re
turn 0; } | 634 virtual LayoutMultiColumnSpannerPlaceholder* spannerPlaceholder() const { re
turn 0; } |
636 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll
&& spannerPlaceholder(); } | 635 bool isColumnSpanAll() const { return style()->columnSpan() == ColumnSpanAll
&& spannerPlaceholder(); } |
637 | 636 |
638 // Returns the object containing this one. Can be different from parent for
positioned elements. | 637 // Returns the object containing this one. Can be different from parent for
positioned elements. |
639 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped | 638 // If paintInvalidationContainer and paintInvalidationContainerSkipped are n
ot null, on return *paintInvalidationContainerSkipped |
640 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. | 639 // is true if the renderer returned is an ancestor of paintInvalidationConta
iner. |
641 LayoutObject* container(const LayoutLayerModelObject* paintInvalidationConta
iner = 0, bool* paintInvalidationContainerSkipped = 0) const; | 640 LayoutObject* container(const LayoutBoxModelObject* paintInvalidationContain
er = 0, bool* paintInvalidationContainerSkipped = 0) const; |
642 RenderBlock* containerForFixedPosition(const LayoutLayerModelObject* paintIn
validationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; | 641 RenderBlock* containerForFixedPosition(const LayoutBoxModelObject* paintInva
lidationContainer = 0, bool* paintInvalidationContainerSkipped = 0) const; |
643 | 642 |
644 virtual LayoutObject* hoverAncestor() const { return parent(); } | 643 virtual LayoutObject* hoverAncestor() const { return parent(); } |
645 | 644 |
646 Element* offsetParent() const; | 645 Element* offsetParent() const; |
647 | 646 |
648 void markContainingBlocksForLayout(bool scheduleRelayout = true, LayoutObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); | 647 void markContainingBlocksForLayout(bool scheduleRelayout = true, LayoutObjec
t* newRoot = 0, SubtreeLayoutScope* = 0); |
649 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); | 648 void setNeedsLayout(MarkingBehavior = MarkContainingBlockChain, SubtreeLayou
tScope* = 0); |
650 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining
BlockChain, SubtreeLayoutScope* = 0); | 649 void setNeedsLayoutAndFullPaintInvalidation(MarkingBehavior = MarkContaining
BlockChain, SubtreeLayoutScope* = 0); |
651 void clearNeedsLayout(); | 650 void clearNeedsLayout(); |
652 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); | 651 void setChildNeedsLayout(MarkingBehavior = MarkContainingBlockChain, Subtree
LayoutScope* = 0); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 | 759 |
761 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. | 760 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. |
762 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const | 761 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const |
763 { | 762 { |
764 return localToContainerQuad(quad, 0, mode, wasFixed); | 763 return localToContainerQuad(quad, 0, mode, wasFixed); |
765 } | 764 } |
766 // Convert an absolute quad to local coordinates. | 765 // Convert an absolute quad to local coordinates. |
767 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; | 766 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; |
768 | 767 |
769 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. | 768 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. |
770 FloatQuad localToContainerQuad(const FloatQuad&, const LayoutLayerModelObjec
t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons
t; | 769 FloatQuad localToContainerQuad(const FloatQuad&, const LayoutBoxModelObject*
paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) const; |
771 FloatPoint localToContainerPoint(const FloatPoint&, const LayoutLayerModelOb
ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, c
onst PaintInvalidationState* = 0) const; | 770 FloatPoint localToContainerPoint(const FloatPoint&, const LayoutBoxModelObje
ct* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, con
st PaintInvalidationState* = 0) const; |
772 | 771 |
773 // Convert a local point into the coordinate system of backing coordinates.
Also returns the backing layer if needed. | 772 // Convert a local point into the coordinate system of backing coordinates.
Also returns the backing layer if needed. |
774 FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, Layer** backi
ngLayer = nullptr); | 773 FloatPoint localToInvalidationBackingPoint(const LayoutPoint&, Layer** backi
ngLayer = nullptr); |
775 | 774 |
776 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, | 775 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, |
777 // different offsets apply at different points, so return the offset that ap
plies to the given point. | 776 // different offsets apply at different points, so return the offset that ap
plies to the given point. |
778 virtual LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; | 777 virtual LayoutSize offsetFromContainer(const LayoutObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; |
779 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. | 778 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. |
780 LayoutSize offsetFromAncestorContainer(const LayoutObject*) const; | 779 LayoutSize offsetFromAncestorContainer(const LayoutObject*) const; |
781 | 780 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; | 828 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; |
830 | 829 |
831 struct AppliedTextDecoration { | 830 struct AppliedTextDecoration { |
832 Color color; | 831 Color color; |
833 TextDecorationStyle style; | 832 TextDecorationStyle style; |
834 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio
nStyleSolid) { } | 833 AppliedTextDecoration() : color(Color::transparent), style(TextDecoratio
nStyleSolid) { } |
835 }; | 834 }; |
836 | 835 |
837 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli
ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu
irksMode = false, bool firstlineStyle = false); | 836 void getTextDecorations(unsigned decorations, AppliedTextDecoration& underli
ne, AppliedTextDecoration& overline, AppliedTextDecoration& linethrough, bool qu
irksMode = false, bool firstlineStyle = false); |
838 | 837 |
839 // Return the LayoutLayerModelObject in the container chain which is respons
ible for painting this object, or 0 | 838 // Return the LayoutBoxModelObject in the container chain which is responsib
le for painting this object, or 0 |
840 // if painting is root-relative. This is the container that should be passed
to the 'forPaintInvalidation' | 839 // if painting is root-relative. This is the container that should be passed
to the 'forPaintInvalidation' |
841 // methods. | 840 // methods. |
842 const LayoutLayerModelObject* containerForPaintInvalidation() const; | 841 const LayoutBoxModelObject* containerForPaintInvalidation() const; |
843 const LayoutLayerModelObject* adjustCompositedContainerForSpecialAncestors(c
onst LayoutLayerModelObject* paintInvalidationContainer) const; | 842 const LayoutBoxModelObject* adjustCompositedContainerForSpecialAncestors(con
st LayoutBoxModelObject* paintInvalidationContainer) const; |
844 bool isPaintInvalidationContainer() const; | 843 bool isPaintInvalidationContainer() const; |
845 | 844 |
846 LayoutRect computePaintInvalidationRect() | 845 LayoutRect computePaintInvalidationRect() |
847 { | 846 { |
848 return computePaintInvalidationRect(containerForPaintInvalidation()); | 847 return computePaintInvalidationRect(containerForPaintInvalidation()); |
849 } | 848 } |
850 | 849 |
851 // Returns the paint invalidation rect for this LayoutObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. | 850 // Returns the paint invalidation rect for this LayoutObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. |
852 LayoutRect computePaintInvalidationRect(const LayoutLayerModelObject* paintI
nvalidationContainer, const PaintInvalidationState* = 0) const; | 851 LayoutRect computePaintInvalidationRect(const LayoutBoxModelObject* paintInv
alidationContainer, const PaintInvalidationState* = 0) const; |
853 | 852 |
854 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| | 853 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| |
855 LayoutRect boundsRectForPaintInvalidation(const LayoutLayerModelObject* pain
tInvalidationContainer, const PaintInvalidationState* = 0) const; | 854 LayoutRect boundsRectForPaintInvalidation(const LayoutBoxModelObject* paintI
nvalidationContainer, const PaintInvalidationState* = 0) const; |
856 | 855 |
857 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space | 856 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space |
858 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same | 857 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same |
859 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. | 858 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. |
860 // If |paintInvalidationContainer| is 0, invalidate paints via the view. | 859 // If |paintInvalidationContainer| is 0, invalidate paints via the view. |
861 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636
99. | 860 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636
99. |
862 void invalidatePaintUsingContainer(const LayoutLayerModelObject* paintInvali
dationContainer, const LayoutRect&, PaintInvalidationReason) const; | 861 void invalidatePaintUsingContainer(const LayoutBoxModelObject* paintInvalida
tionContainer, const LayoutRect&, PaintInvalidationReason) const; |
863 | 862 |
864 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. | 863 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. |
865 void invalidatePaintRectangle(const LayoutRect&) const; | 864 void invalidatePaintRectangle(const LayoutRect&) const; |
866 | 865 |
867 void invalidateSelectionIfNeeded(const LayoutLayerModelObject&, PaintInvalid
ationReason); | 866 void invalidateSelectionIfNeeded(const LayoutBoxModelObject&, PaintInvalidat
ionReason); |
868 | 867 |
869 // 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. | 868 // 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. |
870 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); | 869 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&); |
871 | 870 |
872 virtual void invalidatePaintForOverflow(); | 871 virtual void invalidatePaintForOverflow(); |
873 void invalidatePaintForOverflowIfNeeded(); | 872 void invalidatePaintForOverflowIfNeeded(); |
874 | 873 |
875 void invalidatePaintIncludingNonCompositingDescendants(); | 874 void invalidatePaintIncludingNonCompositingDescendants(); |
876 | 875 |
877 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's | 876 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's |
878 // coordinate space. This method deals with outlines and overflow. | 877 // coordinate space. This method deals with outlines and overflow. |
879 virtual LayoutRect absoluteClippedOverflowRect() const; | 878 virtual LayoutRect absoluteClippedOverflowRect() const; |
880 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutLayer
ModelObject* paintInvalidationContainer, const PaintInvalidationState* = 0) cons
t; | 879 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer, const PaintInvalidationState* = 0) const; |
881 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutLayerMode
lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalid
ationState* = 0) const; | 880 virtual LayoutRect rectWithOutlineForPaintInvalidation(const LayoutBoxModelO
bject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInvalidat
ionState* = 0) const; |
882 | 881 |
883 // Given a rect in the object's coordinate space, compute a rect suitable fo
r invalidating paints of | 882 // Given a rect in the object's coordinate space, compute a rect suitable fo
r invalidating paints of |
884 // that rect in the coordinate space of paintInvalidationContainer. | 883 // that rect in the coordinate space of paintInvalidationContainer. |
885 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const; | 884 virtual void mapRectToPaintInvalidationBacking(const LayoutBoxModelObject* p
aintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const; |
886 | 885 |
887 // Return the offset to the column in which the specified point (in flow-thr
ead coordinates) | 886 // Return the offset to the column in which the specified point (in flow-thr
ead coordinates) |
888 // lives. This is used to convert a flow-thread point to a visual point. | 887 // lives. This is used to convert a flow-thread point to a visual point. |
889 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz
e(); } | 888 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz
e(); } |
890 | 889 |
891 virtual unsigned length() const { return 1; } | 890 virtual unsigned length() const { return 1; } |
892 | 891 |
893 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } | 892 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } |
894 | 893 |
895 bool isTransparent() const { return style()->hasOpacity(); } | 894 bool isTransparent() const { return style()->hasOpacity(); } |
(...skipping 11 matching lines...) Expand all Loading... |
907 | 906 |
908 // The current selection state for an object. For blocks, the state refers
to the state of the leaf | 907 // The current selection state for an object. For blocks, the state refers
to the state of the leaf |
909 // descendants (as described above in the SelectionState enum declaration). | 908 // descendants (as described above in the SelectionState enum declaration). |
910 SelectionState selectionState() const { return m_bitfields.selectionState();
} | 909 SelectionState selectionState() const { return m_bitfields.selectionState();
} |
911 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect
ionState(state); } | 910 virtual void setSelectionState(SelectionState state) { m_bitfields.setSelect
ionState(state); } |
912 inline void setSelectionStateIfNeeded(SelectionState); | 911 inline void setSelectionStateIfNeeded(SelectionState); |
913 bool canUpdateSelectionOnRootLineBoxes() const; | 912 bool canUpdateSelectionOnRootLineBoxes() const; |
914 | 913 |
915 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest | 914 // A single rectangle that encompasses all of the selected objects within th
is object. Used to determine the tightest |
916 // possible bounding box for the selection. The rect returned is in the coor
dinate space of the paint invalidation container's backing. | 915 // possible bounding box for the selection. The rect returned is in the coor
dinate space of the paint invalidation container's backing. |
917 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutLayerModelO
bject* /*paintInvalidationContainer*/) const { return LayoutRect(); } | 916 virtual LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObj
ect* /*paintInvalidationContainer*/) const { return LayoutRect(); } |
918 | 917 |
919 virtual bool canBeSelectionLeaf() const { return false; } | 918 virtual bool canBeSelectionLeaf() const { return false; } |
920 bool hasSelectedChildren() const { return selectionState() != SelectionNone;
} | 919 bool hasSelectedChildren() const { return selectionState() != SelectionNone;
} |
921 | 920 |
922 bool isSelectable() const; | 921 bool isSelectable() const; |
923 // Obtains the selection colors that should be used when painting a selectio
n. | 922 // Obtains the selection colors that should be used when painting a selectio
n. |
924 Color selectionBackgroundColor() const; | 923 Color selectionBackgroundColor() const; |
925 Color selectionForegroundColor() const; | 924 Color selectionForegroundColor() const; |
926 Color selectionEmphasisMarkColor() const; | 925 Color selectionEmphasisMarkColor() const; |
927 | 926 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 bool isInert() const; | 978 bool isInert() const; |
980 | 979 |
981 bool supportsTouchAction() const; | 980 bool supportsTouchAction() const; |
982 | 981 |
983 bool visibleToHitTestRequest(const HitTestRequest& request) const { return s
tyle()->visibility() == VISIBLE && (request.ignorePointerEventsNone() || style()
->pointerEvents() != PE_NONE) && !isInert(); } | 982 bool visibleToHitTestRequest(const HitTestRequest& request) const { return s
tyle()->visibility() == VISIBLE && (request.ignorePointerEventsNone() || style()
->pointerEvents() != PE_NONE) && !isInert(); } |
984 | 983 |
985 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE &
& style()->pointerEvents() != PE_NONE && !isInert(); } | 984 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE &
& style()->pointerEvents() != PE_NONE && !isInert(); } |
986 | 985 |
987 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use | 986 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use |
988 // localToAbsolute/absoluteToLocal methods instead. | 987 // localToAbsolute/absoluteToLocal methods instead. |
989 virtual void mapLocalToContainer(const LayoutLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const; | 988 virtual void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidati
onContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wa
sFixed = 0, const PaintInvalidationState* = 0) const; |
990 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; | 989 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; |
991 | 990 |
992 // Pushes state onto LayoutGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). | 991 // Pushes state onto LayoutGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). |
993 // Returns the renderer which was mapped to (container or ancestorToStopAt). | 992 // Returns the renderer which was mapped to (container or ancestorToStopAt). |
994 virtual const LayoutObject* pushMappingToContainer(const LayoutLayerModelObj
ect* ancestorToStopAt, LayoutGeometryMap&) const; | 993 virtual const LayoutObject* pushMappingToContainer(const LayoutBoxModelObjec
t* ancestorToStopAt, LayoutGeometryMap&) const; |
995 | 994 |
996 bool shouldUseTransformFromContainer(const LayoutObject* container) const; | 995 bool shouldUseTransformFromContainer(const LayoutObject* container) const; |
997 void getTransformFromContainer(const LayoutObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; | 996 void getTransformFromContainer(const LayoutObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; |
998 | 997 |
999 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || style()->hasBlendMode(); } | 998 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || style()->hasBlendMode(); } |
1000 | 999 |
1001 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset) const { } | 1000 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addit
ionalOffset) const { } |
1002 | 1001 |
1003 // Compute a list of hit-test rectangles per layer rooted at this renderer. | 1002 // Compute a list of hit-test rectangles per layer rooted at this renderer. |
1004 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; | 1003 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 // container, so callers should provide only the offset of the container wit
hin it's layer. | 1168 // container, so callers should provide only the offset of the container wit
hin it's layer. |
1170 // containerRect is a rect that has already been added for the currentLayer
which is likely to | 1169 // containerRect is a rect that has already been added for the currentLayer
which is likely to |
1171 // be a container for child elements. Any rect wholly contained by container
Rect can be | 1170 // be a container for child elements. Any rect wholly contained by container
Rect can be |
1172 // skipped. | 1171 // skipped. |
1173 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentLa
yer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const; | 1172 virtual void addLayerHitTestRects(LayerHitTestRects&, const Layer* currentLa
yer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const; |
1174 | 1173 |
1175 // Add hit-test rects for this renderer only to the provided list. layerOffs
et is the offset | 1174 // Add hit-test rects for this renderer only to the provided list. layerOffs
et is the offset |
1176 // of this renderer within the current layer that should be used for each re
sult. | 1175 // of this renderer within the current layer that should be used for each re
sult. |
1177 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { }; | 1176 virtual void computeSelfHitTestRects(Vector<LayoutRect>&, const LayoutPoint&
layerOffset) const { }; |
1178 | 1177 |
1179 virtual PaintInvalidationReason paintInvalidationReason(const LayoutLayerMod
elObject& paintInvalidationContainer, | 1178 virtual PaintInvalidationReason paintInvalidationReason(const LayoutBoxModel
Object& paintInvalidationContainer, |
1180 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, | 1179 const LayoutRect& oldPaintInvalidationRect, const LayoutPoint& oldPositi
onFromPaintInvalidationBacking, |
1181 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; | 1180 const LayoutRect& newPaintInvalidationRect, const LayoutPoint& newPositi
onFromPaintInvalidationBacking) const; |
1182 virtual void incrementallyInvalidatePaint(const LayoutLayerModelObject& pain
tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds
, const LayoutPoint& positionFromPaintInvalidationBacking); | 1181 virtual void incrementallyInvalidatePaint(const LayoutBoxModelObject& paintI
nvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds,
const LayoutPoint& positionFromPaintInvalidationBacking); |
1183 void fullyInvalidatePaint(const LayoutLayerModelObject& paintInvalidationCon
tainer, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect&
newBounds); | 1182 void fullyInvalidatePaint(const LayoutBoxModelObject& paintInvalidationConta
iner, PaintInvalidationReason, const LayoutRect& oldBounds, const LayoutRect& ne
wBounds); |
1184 | 1183 |
1185 virtual bool hasNonCompositedScrollbars() const { return false; } | 1184 virtual bool hasNonCompositedScrollbars() const { return false; } |
1186 | 1185 |
1187 #if ENABLE(ASSERT) | 1186 #if ENABLE(ASSERT) |
1188 virtual bool paintInvalidationStateIsDirty() const | 1187 virtual bool paintInvalidationStateIsDirty() const |
1189 { | 1188 { |
1190 return neededLayoutBecauseOfChildren() || shouldCheckForPaintInvalidatio
nRegardlessOfPaintInvalidationState(); | 1189 return neededLayoutBecauseOfChildren() || shouldCheckForPaintInvalidatio
nRegardlessOfPaintInvalidationState(); |
1191 } | 1190 } |
1192 #endif | 1191 #endif |
1193 | 1192 |
1194 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
childPaintInvalidationState); | 1193 virtual void invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState&
childPaintInvalidationState); |
1195 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
ionState&, const LayoutLayerModelObject& paintInvalidationContainer); | 1194 virtual PaintInvalidationReason invalidatePaintIfNeeded(const PaintInvalidat
ionState&, const LayoutBoxModelObject& paintInvalidationContainer); |
1196 | 1195 |
1197 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients | 1196 // When this object is invalidated for paint, this method is called to inval
idate any DisplayItemClients |
1198 // owned by this object, including the object itself, RenderText/RenderInlin
e line boxes, scrollbars, etc., | 1197 // owned by this object, including the object itself, RenderText/RenderInlin
e line boxes, scrollbars, etc., |
1199 // not including children which will be invalidated normally during invalida
teTreeIfNeeded(). | 1198 // not including children which will be invalidated normally during invalida
teTreeIfNeeded(). |
1200 virtual void invalidateDisplayItemClients(DisplayItemList*) const; | 1199 virtual void invalidateDisplayItemClients(DisplayItemList*) const; |
1201 | 1200 |
1202 private: | 1201 private: |
1203 void setLayoutDidGetCalledSinceLastFrame() | 1202 void setLayoutDidGetCalledSinceLastFrame() |
1204 { | 1203 { |
1205 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); | 1204 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); |
1206 | 1205 |
1207 // Make sure our parent is marked as needing invalidation. | 1206 // Make sure our parent is marked as needing invalidation. |
1208 // This would be unneeded if we allowed sub-tree invalidation (akin to s
ub-tree layouts). | 1207 // This would be unneeded if we allowed sub-tree invalidation (akin to s
ub-tree layouts). |
1209 markContainingBlockChainForPaintInvalidation(); | 1208 markContainingBlockChainForPaintInvalidation(); |
1210 } | 1209 } |
1211 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa
lledSinceLastFrame(false); } | 1210 void clearLayoutDidGetCalledSinceLastFrame() { m_bitfields.setLayoutDidGetCa
lledSinceLastFrame(false); } |
1212 | 1211 |
1213 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutL
ayerModelObject* repaintContainer); | 1212 void invalidatePaintIncludingNonCompositingDescendantsInternal(const LayoutB
oxModelObject* repaintContainer); |
1214 | 1213 |
1215 LayoutRect previousSelectionRectForPaintInvalidation() const; | 1214 LayoutRect previousSelectionRectForPaintInvalidation() const; |
1216 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); | 1215 void setPreviousSelectionRectForPaintInvalidation(const LayoutRect&); |
1217 | 1216 |
1218 const LayoutLayerModelObject* enclosingCompositedContainer() const; | 1217 const LayoutBoxModelObject* enclosingCompositedContainer() const; |
1219 | 1218 |
1220 LayoutFlowThread* locateFlowThreadContainingBlock() const; | 1219 LayoutFlowThread* locateFlowThreadContainingBlock() const; |
1221 void removeFromLayoutFlowThread(); | 1220 void removeFromLayoutFlowThread(); |
1222 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); | 1221 void removeFromLayoutFlowThreadRecursive(LayoutFlowThread*); |
1223 | 1222 |
1224 LayoutStyle* cachedFirstLineStyle() const; | 1223 LayoutStyle* cachedFirstLineStyle() const; |
1225 StyleDifference adjustStyleDifference(StyleDifference) const; | 1224 StyleDifference adjustStyleDifference(StyleDifference) const; |
1226 | 1225 |
1227 Color selectionColor(int colorProperty) const; | 1226 Color selectionColor(int colorProperty) const; |
1228 | 1227 |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 void showTree(const blink::LayoutObject*); | 1633 void showTree(const blink::LayoutObject*); |
1635 void showLineTree(const blink::LayoutObject*); | 1634 void showLineTree(const blink::LayoutObject*); |
1636 void showRenderTree(const blink::LayoutObject* object1); | 1635 void showRenderTree(const blink::LayoutObject* object1); |
1637 // We don't make object2 an optional parameter so that showRenderTree | 1636 // We don't make object2 an optional parameter so that showRenderTree |
1638 // can be called from gdb easily. | 1637 // can be called from gdb easily. |
1639 void showRenderTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); | 1638 void showRenderTree(const blink::LayoutObject* object1, const blink::LayoutObjec
t* object2); |
1640 | 1639 |
1641 #endif | 1640 #endif |
1642 | 1641 |
1643 #endif // LayoutObject_h | 1642 #endif // LayoutObject_h |
OLD | NEW |