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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 namespace WebCore { | 48 namespace WebCore { |
49 | 49 |
50 class AffineTransform; | 50 class AffineTransform; |
51 class Cursor; | 51 class Cursor; |
52 class Document; | 52 class Document; |
53 class HitTestLocation; | 53 class HitTestLocation; |
54 class HitTestResult; | 54 class HitTestResult; |
55 class InlineBox; | 55 class InlineBox; |
56 class InlineFlowBox; | 56 class InlineFlowBox; |
| 57 class InvalidationTreeWalkState; |
57 class Position; | 58 class Position; |
58 class PositionWithAffinity; | 59 class PositionWithAffinity; |
59 class PseudoStyleRequest; | 60 class PseudoStyleRequest; |
60 class RenderBoxModelObject; | 61 class RenderBoxModelObject; |
61 class RenderBlock; | 62 class RenderBlock; |
62 class RenderFlowThread; | 63 class RenderFlowThread; |
63 class RenderGeometryMap; | 64 class RenderGeometryMap; |
64 class RenderLayer; | 65 class RenderLayer; |
65 class RenderLayerModelObject; | 66 class RenderLayerModelObject; |
66 class RenderView; | 67 class RenderView; |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. | 740 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. |
740 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const | 741 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const |
741 { | 742 { |
742 return localToContainerQuad(quad, 0, mode, wasFixed); | 743 return localToContainerQuad(quad, 0, mode, wasFixed); |
743 } | 744 } |
744 // Convert an absolute quad to local coordinates. | 745 // Convert an absolute quad to local coordinates. |
745 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; | 746 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; |
746 | 747 |
747 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. | 748 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. |
748 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec
t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons
t; | 749 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec
t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons
t; |
749 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb
ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) c
onst; | 750 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb
ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, c
onst InvalidationTreeWalkState* = 0) const; |
750 | 751 |
751 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, | 752 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, |
752 // different offsets apply at different points, so return the offset that ap
plies to the given point. | 753 // different offsets apply at different points, so return the offset that ap
plies to the given point. |
753 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; | 754 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; |
754 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. | 755 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. |
755 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; | 756 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; |
756 | 757 |
757 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } | 758 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } |
758 | 759 |
759 // Computes the position of the given render object in the space of |repaint
Container|. | 760 // Computes the position of the given render object in the space of |repaint
Container|. |
760 LayoutPoint positionFromPaintInvalidationContainer(const RenderLayerModelObj
ect* paintInvalidationContainer) const; | 761 LayoutPoint positionFromPaintInvalidationContainer(const RenderLayerModelObj
ect* paintInvalidationContainer, const InvalidationTreeWalkState* = 0) const; |
761 | 762 |
762 IntRect absoluteBoundingBoxRect() const; | 763 IntRect absoluteBoundingBoxRect() const; |
763 // FIXME: This function should go away eventually | 764 // FIXME: This function should go away eventually |
764 IntRect absoluteBoundingBoxRectIgnoringTransforms() const; | 765 IntRect absoluteBoundingBoxRectIgnoringTransforms() const; |
765 | 766 |
766 // Build an array of quads in absolute coords for line boxes | 767 // Build an array of quads in absolute coords for line boxes |
767 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const
{ } | 768 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const
{ } |
768 | 769 |
769 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); | 770 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); |
770 | 771 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 const RenderLayerModelObject* containerForPaintInvalidation() const; | 817 const RenderLayerModelObject* containerForPaintInvalidation() const; |
817 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c
onst RenderLayerModelObject* paintInvalidationContainer) const; | 818 const RenderLayerModelObject* adjustCompositedContainerForSpecialAncestors(c
onst RenderLayerModelObject* paintInvalidationContainer) const; |
818 bool isPaintInvalidationContainer() const; | 819 bool isPaintInvalidationContainer() const; |
819 | 820 |
820 LayoutRect computePaintInvalidationRect() | 821 LayoutRect computePaintInvalidationRect() |
821 { | 822 { |
822 return computePaintInvalidationRect(containerForPaintInvalidation()); | 823 return computePaintInvalidationRect(containerForPaintInvalidation()); |
823 } | 824 } |
824 | 825 |
825 // Returns the paint invalidation rect for this RenderObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. | 826 // Returns the paint invalidation rect for this RenderObject in the coordina
te space of the paint backing (typically a GraphicsLayer) for |paintInvalidation
Container|. |
826 LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintI
nvalidationContainer) const; | 827 LayoutRect computePaintInvalidationRect(const RenderLayerModelObject* paintI
nvalidationContainer, const InvalidationTreeWalkState* = 0) const; |
827 | 828 |
828 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| | 829 // Returns the rect bounds needed to invalidate the paint of this object, in
the coordinate space of the rendering backing of |paintInvalidationContainer| |
829 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain
tInvalidationContainer) const; | 830 LayoutRect boundsRectForPaintInvalidation(const RenderLayerModelObject* pain
tInvalidationContainer, const InvalidationTreeWalkState* = 0) const; |
830 | 831 |
831 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space | 832 // Actually do the paint invalidate of rect r for this object which has been
computed in the coordinate space |
832 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same | 833 // of the GraphicsLayer backing of |paintInvalidationContainer|. Note that t
his coordinaten space is not the same |
833 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. | 834 // as the local coordinate space of |paintInvalidationContainer| in the pres
ence of layer squashing. |
834 // If |paintInvalidationContainer| is 0, invalidate paints via the view. | 835 // If |paintInvalidationContainer| is 0, invalidate paints via the view. |
835 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636
99. | 836 // FIXME: |paintInvalidationContainer| should never be 0. See crbug.com/3636
99. |
836 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali
dationContainer, const IntRect&, InvalidationReason) const; | 837 void invalidatePaintUsingContainer(const RenderLayerModelObject* paintInvali
dationContainer, const IntRect&, InvalidationReason) const; |
837 | 838 |
838 // Invalidate the paint of the entire object. Called when, e.g., the color o
f a border changes, or when a border | 839 // Invalidate the paint of the entire object. Called when, e.g., the color o
f a border changes, or when a border |
839 // style changes. | 840 // style changes. |
840 void paintInvalidationForWholeRenderer() const; | 841 void paintInvalidationForWholeRenderer() const; |
841 | 842 |
842 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. | 843 // Invalidate the paint of a specific subrectangle within a given object. Th
e rect |r| is in the object's coordinate space. |
843 void invalidatePaintRectangle(const LayoutRect&) const; | 844 void invalidatePaintRectangle(const LayoutRect&) const; |
844 | 845 |
845 bool invalidatePaintIfNeeded(const RenderLayerModelObject* paintInvalidation
Container, | 846 bool invalidatePaintIfNeeded(const RenderLayerModelObject* paintInvalidation
Container, |
846 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer); | 847 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva
lidationContainer); |
847 | 848 |
848 // 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. | 849 // 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. |
849 virtual void invalidateTreeAfterLayout(const RenderLayerModelObject&); | 850 virtual void invalidateTreeAfterLayout(const InvalidationTreeWalkState&); |
850 | 851 |
851 virtual void invalidatePaintForOverflow(); | 852 virtual void invalidatePaintForOverflow(); |
852 void invalidatePaintForOverflowIfNeeded(); | 853 void invalidatePaintForOverflowIfNeeded(); |
853 | 854 |
854 bool checkForPaintInvalidation() const; | 855 bool checkForPaintInvalidation() const; |
855 | 856 |
856 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's | 857 // Returns the rect that should have paint invalidated whenever this object
changes. The rect is in the view's |
857 // coordinate space. This method deals with outlines and overflow. | 858 // coordinate space. This method deals with outlines and overflow. |
858 LayoutRect absoluteClippedOverflowRect() const | 859 LayoutRect absoluteClippedOverflowRect() const |
859 { | 860 { |
860 return clippedOverflowRectForPaintInvalidation(0); | 861 return clippedOverflowRectForPaintInvalidation(0); |
861 } | 862 } |
862 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; | 863 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; |
863 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer) const; | 864 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject* paintInvalidationContainer, const InvalidationTreeWalkState* = 0) c
onst; |
864 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode
lObject* paintInvalidationContainer, LayoutUnit outlineWidth) const; | 865 virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerMode
lObject* paintInvalidationContainer, LayoutUnit outlineWidth, const Invalidation
TreeWalkState* = 0) const; |
865 | 866 |
866 // Given a rect in the object's coordinate space, compute a rect suitable fo
r invalidating paints of | 867 // Given a rect in the object's coordinate space, compute a rect suitable fo
r invalidating paints of |
867 // that rect in the coordinate space of paintInvalidationContainer. | 868 // that rect in the coordinate space of paintInvalidationContainer. |
868 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, bool fixed = false) const; | 869 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, bool fixed = false, const Invalidation
TreeWalkState* = 0) const; |
869 virtual void computeFloatRectForPaintInvalidation(const RenderLayerModelObje
ct* paintInvalidationContainer, FloatRect& paintInvalidationRect, bool fixed = f
alse) const; | 870 virtual void computeFloatRectForPaintInvalidation(const RenderLayerModelObje
ct* paintInvalidationContainer, FloatRect& paintInvalidationRect, bool fixed = f
alse, const InvalidationTreeWalkState* = 0) const; |
870 | 871 |
871 // Return the offset to the column in which the specified point (in flow-thr
ead coordinates) | 872 // Return the offset to the column in which the specified point (in flow-thr
ead coordinates) |
872 // lives. This is used to convert a flow-thread point to a visual point. | 873 // lives. This is used to convert a flow-thread point to a visual point. |
873 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz
e(); } | 874 virtual LayoutSize columnOffset(const LayoutPoint&) const { return LayoutSiz
e(); } |
874 | 875 |
875 virtual unsigned length() const { return 1; } | 876 virtual unsigned length() const { return 1; } |
876 | 877 |
877 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } | 878 bool isFloatingOrOutOfFlowPositioned() const { return (isFloating() || isOut
OfFlowPositioned()); } |
878 | 879 |
879 bool isTransparent() const { return style()->opacity() < 1.0f; } | 880 bool isTransparent() const { return style()->opacity() < 1.0f; } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 bool isInert() const; | 960 bool isInert() const; |
960 | 961 |
961 bool supportsTouchAction() const; | 962 bool supportsTouchAction() const; |
962 | 963 |
963 bool visibleToHitTestRequest(const HitTestRequest& request) const { return s
tyle()->visibility() == VISIBLE && (request.ignorePointerEventsNone() || style()
->pointerEvents() != PE_NONE) && !isInert(); } | 964 bool visibleToHitTestRequest(const HitTestRequest& request) const { return s
tyle()->visibility() == VISIBLE && (request.ignorePointerEventsNone() || style()
->pointerEvents() != PE_NONE) && !isInert(); } |
964 | 965 |
965 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE &
& style()->pointerEvents() != PE_NONE && !isInert(); } | 966 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE &
& style()->pointerEvents() != PE_NONE && !isInert(); } |
966 | 967 |
967 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use | 968 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use |
968 // localToAbsolute/absoluteToLocal methods instead. | 969 // localToAbsolute/absoluteToLocal methods instead. |
969 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0) const; | 970 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const InvalidationTreeWalkState* = 0) const; |
970 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; | 971 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; |
971 | 972 |
972 // Pushes state onto RenderGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). | 973 // Pushes state onto RenderGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). |
973 // Returns the renderer which was mapped to (container or ancestorToStopAt). | 974 // Returns the renderer which was mapped to (container or ancestorToStopAt). |
974 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const; | 975 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const; |
975 | 976 |
976 bool shouldUseTransformFromContainer(const RenderObject* container) const; | 977 bool shouldUseTransformFromContainer(const RenderObject* container) const; |
977 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; | 978 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; |
978 | 979 |
979 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } | 980 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 void showTree(const WebCore::RenderObject*); | 1495 void showTree(const WebCore::RenderObject*); |
1495 void showLineTree(const WebCore::RenderObject*); | 1496 void showLineTree(const WebCore::RenderObject*); |
1496 void showRenderTree(const WebCore::RenderObject* object1); | 1497 void showRenderTree(const WebCore::RenderObject* object1); |
1497 // We don't make object2 an optional parameter so that showRenderTree | 1498 // We don't make object2 an optional parameter so that showRenderTree |
1498 // can be called from gdb easily. | 1499 // can be called from gdb easily. |
1499 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1500 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1500 | 1501 |
1501 #endif | 1502 #endif |
1502 | 1503 |
1503 #endif // RenderObject_h | 1504 #endif // RenderObject_h |
OLD | NEW |