| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 BSBottom, | 95 BSBottom, |
| 96 BSLeft | 96 BSLeft |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 enum MarkingBehavior { | 99 enum MarkingBehavior { |
| 100 MarkOnlyThis, | 100 MarkOnlyThis, |
| 101 MarkContainingBlockChain, | 101 MarkContainingBlockChain, |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 enum MapCoordinatesMode { | 104 enum MapCoordinatesMode { |
| 105 IsFixed = 1 << 0, | 105 UseTransforms = 1 << 0, |
| 106 UseTransforms = 1 << 1, | 106 // FIXME(sky): What is this for? Do we need it? |
| 107 ApplyContainerFlip = 1 << 2, | 107 ApplyContainerFlip = 1 << 1, |
| 108 TraverseDocumentBoundaries = 1 << 3, | 108 // FIXME(sky): Remove |
| 109 TraverseDocumentBoundaries = 1 << 2, |
| 109 }; | 110 }; |
| 110 typedef unsigned MapCoordinatesFlags; | 111 typedef unsigned MapCoordinatesFlags; |
| 111 | 112 |
| 112 enum InvalidationReason { | 113 enum InvalidationReason { |
| 113 InvalidationNone, | 114 InvalidationNone, |
| 114 InvalidationIncremental, | 115 InvalidationIncremental, |
| 115 InvalidationFull, | 116 InvalidationFull, |
| 116 InvalidationBorderFitLines, | 117 InvalidationBorderFitLines, |
| 117 InvalidationBorderBoxChange, | 118 InvalidationBorderBoxChange, |
| 118 InvalidationBoundsChange, | 119 InvalidationBoundsChange, |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 { | 625 { |
| 625 return isRenderView() || (hasTransform() && isRenderBlock()); | 626 return isRenderView() || (hasTransform() && isRenderBlock()); |
| 626 } | 627 } |
| 627 | 628 |
| 628 // Convert the given local point to absolute coordinates | 629 // Convert the given local point to absolute coordinates |
| 629 // FIXME: Temporary. If UseTransforms is true, take transforms into account.
Eventually localToAbsolute() will always be transform-aware. | 630 // FIXME: Temporary. If UseTransforms is true, take transforms into account.
Eventually localToAbsolute() will always be transform-aware. |
| 630 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC
oordinatesFlags = 0) const; | 631 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC
oordinatesFlags = 0) const; |
| 631 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const
; | 632 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const
; |
| 632 | 633 |
| 633 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. | 634 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. |
| 634 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const | 635 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0) const |
| 635 { | 636 { |
| 636 return localToContainerQuad(quad, 0, mode, wasFixed); | 637 return localToContainerQuad(quad, 0, mode); |
| 637 } | 638 } |
| 638 // Convert an absolute quad to local coordinates. | 639 // Convert an absolute quad to local coordinates. |
| 639 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; | 640 FloatQuad absoluteToLocalQuad(const FloatQuad&, MapCoordinatesFlags mode = 0
) const; |
| 640 | 641 |
| 641 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. | 642 // Convert a local quad into the coordinate system of container, taking tran
sforms into account. |
| 642 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec
t* paintInvalidatinoContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0) cons
t; | 643 FloatQuad localToContainerQuad(const FloatQuad&, const RenderLayerModelObjec
t* paintInvalidatinoContainer, MapCoordinatesFlags = 0) const; |
| 643 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb
ject* paintInvalidationContainer, MapCoordinatesFlags = 0, bool* wasFixed = 0, c
onst PaintInvalidationState* = 0) const; | 644 FloatPoint localToContainerPoint(const FloatPoint&, const RenderLayerModelOb
ject* paintInvalidationContainer, MapCoordinatesFlags = 0, const PaintInvalidati
onState* = 0) const; |
| 644 | 645 |
| 645 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, | 646 // Return the offset from the container() renderer (excluding transforms). I
n multi-column layout, |
| 646 // different offsets apply at different points, so return the offset that ap
plies to the given point. | 647 // different offsets apply at different points, so return the offset that ap
plies to the given point. |
| 647 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; | 648 virtual LayoutSize offsetFromContainer(const RenderObject*, const LayoutPoin
t&, bool* offsetDependsOnPoint = 0) const; |
| 648 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. | 649 // Return the offset from an object up the container() chain. Asserts that n
one of the intermediate objects have transforms. |
| 649 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; | 650 LayoutSize offsetFromAncestorContainer(const RenderObject*) const; |
| 650 | 651 |
| 651 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } | 652 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { } |
| 652 | 653 |
| 653 // Computes the position of the given render object in the space of |paintIn
validationContainer|. | 654 // Computes the position of the given render object in the space of |paintIn
validationContainer|. |
| 654 LayoutPoint positionFromPaintInvalidationContainer(const RenderLayerModelObj
ect* paintInvalidationContainer, const PaintInvalidationState* = 0) const; | 655 LayoutPoint positionFromPaintInvalidationContainer(const RenderLayerModelObj
ect* paintInvalidationContainer, const PaintInvalidationState* = 0) const; |
| 655 | 656 |
| 656 IntRect absoluteBoundingBoxRect() const; | 657 IntRect absoluteBoundingBoxRect() const; |
| 657 // FIXME: This function should go away eventually | 658 // FIXME: This function should go away eventually |
| 658 IntRect absoluteBoundingBoxRectIgnoringTransforms() const; | 659 IntRect absoluteBoundingBoxRectIgnoringTransforms() const; |
| 659 | 660 |
| 660 // Build an array of quads in absolute coords for line boxes | 661 // Build an array of quads in absolute coords for line boxes |
| 661 virtual void absoluteQuads(Vector<FloatQuad>&, bool* /*wasFixed*/ = 0) const
{ } | 662 virtual void absoluteQuads(Vector<FloatQuad>&) const { } |
| 662 | 663 |
| 663 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); | 664 virtual void absoluteFocusRingQuads(Vector<FloatQuad>&); |
| 664 | 665 |
| 665 static FloatRect absoluteBoundingBoxRectForRange(const Range*); | 666 static FloatRect absoluteBoundingBoxRectForRange(const Range*); |
| 666 | 667 |
| 667 // the rect that will be painted if this object is passed as the paintingRoo
t | 668 // the rect that will be painted if this object is passed as the paintingRoo
t |
| 668 LayoutRect paintingRootRect(LayoutRect& topLevelRect); | 669 LayoutRect paintingRootRect(LayoutRect& topLevelRect); |
| 669 | 670 |
| 670 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } | 671 virtual LayoutUnit minPreferredLogicalWidth() const { return 0; } |
| 671 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } | 672 virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; } |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 bool isInert() const; | 826 bool isInert() const; |
| 826 | 827 |
| 827 bool supportsTouchAction() const; | 828 bool supportsTouchAction() const; |
| 828 | 829 |
| 829 bool visibleToHitTestRequest(const HitTestRequest& request) const { return (
request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE) && !is
Inert(); } | 830 bool visibleToHitTestRequest(const HitTestRequest& request) const { return (
request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE) && !is
Inert(); } |
| 830 | 831 |
| 831 bool visibleToHitTesting() const { return style()->pointerEvents() != PE_NON
E && !isInert(); } | 832 bool visibleToHitTesting() const { return style()->pointerEvents() != PE_NON
E && !isInert(); } |
| 832 | 833 |
| 833 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use | 834 // Map points and quads through elements, potentially via 3d transforms. You
should never need to call these directly; use |
| 834 // localToAbsolute/absoluteToLocal methods instead. | 835 // localToAbsolute/absoluteToLocal methods instead. |
| 835 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool*
wasFixed = 0, const PaintInvalidationState* = 0) const; | 836 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, const
PaintInvalidationState* = 0) const; |
| 836 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; | 837 virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) c
onst; |
| 837 | 838 |
| 838 // Pushes state onto RenderGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). | 839 // Pushes state onto RenderGeometryMap about how to map coordinates from thi
s renderer to its container, or ancestorToStopAt (whichever is encountered first
). |
| 839 // Returns the renderer which was mapped to (container or ancestorToStopAt). | 840 // Returns the renderer which was mapped to (container or ancestorToStopAt). |
| 840 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const; | 841 virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObj
ect* ancestorToStopAt, RenderGeometryMap&) const; |
| 841 | 842 |
| 842 bool shouldUseTransformFromContainer(const RenderObject* container) const; | 843 bool shouldUseTransformFromContainer(const RenderObject* container) const; |
| 843 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; | 844 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; |
| 844 | 845 |
| 845 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } | 846 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 void showTree(const blink::RenderObject*); | 1345 void showTree(const blink::RenderObject*); |
| 1345 void showLineTree(const blink::RenderObject*); | 1346 void showLineTree(const blink::RenderObject*); |
| 1346 void showRenderTree(const blink::RenderObject* object1); | 1347 void showRenderTree(const blink::RenderObject* object1); |
| 1347 // We don't make object2 an optional parameter so that showRenderTree | 1348 // We don't make object2 an optional parameter so that showRenderTree |
| 1348 // can be called from gdb easily. | 1349 // can be called from gdb easily. |
| 1349 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1350 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
| 1350 | 1351 |
| 1351 #endif | 1352 #endif |
| 1352 | 1353 |
| 1353 #endif // RenderObject_h | 1354 #endif // RenderObject_h |
| OLD | NEW |