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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 // of repaintContainer. If repaintContainer is 0, repaint via the view. | 800 // of repaintContainer. If repaintContainer is 0, repaint via the view. |
801 void repaintUsingContainer(const RenderLayerModelObject* repaintContainer, c
onst IntRect&) const; | 801 void repaintUsingContainer(const RenderLayerModelObject* repaintContainer, c
onst IntRect&) const; |
802 | 802 |
803 // Repaint the entire object. Called when, e.g., the color of a border chan
ges, or when a border | 803 // Repaint the entire object. Called when, e.g., the color of a border chan
ges, or when a border |
804 // style changes. | 804 // style changes. |
805 void repaint() const; | 805 void repaint() const; |
806 | 806 |
807 // Repaint a specific subrectangle within a given object. The rect |r| is i
n the object's coordinate space. | 807 // Repaint a specific subrectangle within a given object. The rect |r| is i
n the object's coordinate space. |
808 void repaintRectangle(const LayoutRect&) const; | 808 void repaintRectangle(const LayoutRect&) const; |
809 | 809 |
810 // Repaint only if our old bounds and new bounds are different. The caller m
ay pass in newBounds and newOutlineBox if they are known. | 810 // Repaint only if our old bounds and new bounds are different. The caller m
ay pass in newBounds if they are known. |
811 bool repaintAfterLayoutIfNeeded(const RenderLayerModelObject* repaintContain
er, bool wasSelfLayout, | 811 bool repaintAfterLayoutIfNeeded(const RenderLayerModelObject* repaintContain
er, bool wasSelfLayout, |
812 const LayoutRect& oldBounds, const LayoutRect& oldOutlineBox, const Layo
utRect* newBoundsPtr = 0, const LayoutRect* newOutlineBoxPtr = 0); | 812 const LayoutRect& oldBounds, const LayoutRect* newBoundsPtr = 0); |
813 | 813 |
814 virtual void repaintOverflow(); | 814 virtual void repaintOverflow(); |
815 void repaintOverflowIfNeeded(); | 815 void repaintOverflowIfNeeded(); |
816 | 816 |
817 bool checkForRepaint() const; | 817 bool checkForRepaint() const; |
818 bool checkForRepaintDuringLayout() const; | 818 bool checkForRepaintDuringLayout() const; |
819 | 819 |
820 // Returns the rect that should be repainted whenever this object changes.
The rect is in the view's | 820 // Returns the rect that should be repainted whenever this object changes.
The rect is in the view's |
821 // coordinate space. This method deals with outlines and overflow. | 821 // coordinate space. This method deals with outlines and overflow. |
822 LayoutRect absoluteClippedOverflowRect() const | 822 LayoutRect absoluteClippedOverflowRect() const |
823 { | 823 { |
824 return clippedOverflowRectForRepaint(0); | 824 return clippedOverflowRectForRepaint(0); |
825 } | 825 } |
826 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; | 826 IntRect pixelSnappedAbsoluteClippedOverflowRect() const; |
827 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const; | 827 virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObjec
t* repaintContainer) const; |
828 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r
epaintContainer, LayoutUnit outlineWidth) const; | 828 virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* r
epaintContainer, LayoutUnit outlineWidth) const; |
829 virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*r
epaintContainer*/, const RenderGeometryMap* = 0) const { return LayoutRect(); } | |
830 | 829 |
831 // Given a rect in the object's coordinate space, compute a rect suitable fo
r repainting | 830 // Given a rect in the object's coordinate space, compute a rect suitable fo
r repainting |
832 // that rect in the coordinate space of repaintContainer. | 831 // that rect in the coordinate space of repaintContainer. |
833 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const; | 832 virtual void computeRectForRepaint(const RenderLayerModelObject* repaintCont
ainer, LayoutRect&, bool fixed = false) const; |
834 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect& repaintRect, bool fixed = false) const; | 833 virtual void computeFloatRectForRepaint(const RenderLayerModelObject* repain
tContainer, FloatRect& repaintRect, bool fixed = false) const; |
835 | 834 |
836 // If multiple-column layout results in applying an offset to the given poin
t, add the same | 835 // If multiple-column layout results in applying an offset to the given poin
t, add the same |
837 // offset to the given size. | 836 // offset to the given size. |
838 virtual void adjustForColumns(LayoutSize&, const LayoutPoint&) const { } | 837 virtual void adjustForColumns(LayoutSize&, const LayoutPoint&) const { } |
839 LayoutSize offsetForColumns(const LayoutPoint& point) const | 838 LayoutSize offsetForColumns(const LayoutPoint& point) const |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 bool shouldUseTransformFromContainer(const RenderObject* container) const; | 949 bool shouldUseTransformFromContainer(const RenderObject* container) const; |
951 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; | 950 void getTransformFromContainer(const RenderObject* container, const LayoutSi
ze& offsetInContainer, TransformationMatrix&) const; |
952 | 951 |
953 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } | 952 bool createsGroup() const { return isTransparent() || hasMask() || hasFilter
() || hasBlendMode(); } |
954 | 953 |
955 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit
ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) { }; | 954 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& /* addit
ionalOffset */, const RenderLayerModelObject* /* paintContainer */ = 0) { }; |
956 | 955 |
957 // Compute a list of hit-test rectangles per layer rooted at this renderer. | 956 // Compute a list of hit-test rectangles per layer rooted at this renderer. |
958 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; | 957 virtual void computeLayerHitTestRects(LayerHitTestRects&) const; |
959 | 958 |
960 LayoutRect absoluteOutlineBounds() const | |
961 { | |
962 return outlineBoundsForRepaint(0); | |
963 } | |
964 | |
965 // Return the renderer whose background style is used to paint the root back
ground. Should only be called on the renderer for which isRoot() is true. | 959 // Return the renderer whose background style is used to paint the root back
ground. Should only be called on the renderer for which isRoot() is true. |
966 RenderObject* rendererForRootBackground(); | 960 RenderObject* rendererForRootBackground(); |
967 | 961 |
968 RespectImageOrientationEnum shouldRespectImageOrientation() const; | 962 RespectImageOrientationEnum shouldRespectImageOrientation() const; |
969 | 963 |
970 bool isRelayoutBoundaryForInspector() const; | 964 bool isRelayoutBoundaryForInspector() const; |
971 | 965 |
972 const LayoutRect& newRepaintRect() const { return m_newRepaintRect; } | 966 const LayoutRect& newRepaintRect() const { return m_newRepaintRect; } |
973 void setNewRepaintRect(const LayoutRect& rect) { m_newRepaintRect = rect; } | 967 void setNewRepaintRect(const LayoutRect& rect) { m_newRepaintRect = rect; } |
974 | 968 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); | 1013 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo
ol antialias); |
1020 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, | 1014 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, |
1021 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); | 1015 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias); |
1022 | 1016 |
1023 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*); | 1017 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*); |
1024 void paintOutline(PaintInfo&, const LayoutRect&); | 1018 void paintOutline(PaintInfo&, const LayoutRect&); |
1025 void addPDFURLRect(GraphicsContext*, const LayoutRect&); | 1019 void addPDFURLRect(GraphicsContext*, const LayoutRect&); |
1026 | 1020 |
1027 virtual LayoutRect viewRect() const; | 1021 virtual LayoutRect viewRect() const; |
1028 | 1022 |
1029 void adjustRectForOutline(LayoutRect&) const; | |
1030 | |
1031 void clearLayoutRootIfNeeded() const; | 1023 void clearLayoutRootIfNeeded() const; |
1032 virtual void willBeDestroyed(); | 1024 virtual void willBeDestroyed(); |
1033 void postDestroy(); | 1025 void postDestroy(); |
1034 | 1026 |
1035 virtual void insertedIntoTree(); | 1027 virtual void insertedIntoTree(); |
1036 virtual void willBeRemovedFromTree(); | 1028 virtual void willBeRemovedFromTree(); |
1037 | 1029 |
1038 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_
node = document; } | 1030 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_
node = document; } |
1039 | 1031 |
1040 // Add hit-test rects for the render tree rooted at this node to the provide
d collection on a | 1032 // Add hit-test rects for the render tree rooted at this node to the provide
d collection on a |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 void showTree(const WebCore::RenderObject*); | 1418 void showTree(const WebCore::RenderObject*); |
1427 void showLineTree(const WebCore::RenderObject*); | 1419 void showLineTree(const WebCore::RenderObject*); |
1428 void showRenderTree(const WebCore::RenderObject* object1); | 1420 void showRenderTree(const WebCore::RenderObject* object1); |
1429 // We don't make object2 an optional parameter so that showRenderTree | 1421 // We don't make object2 an optional parameter so that showRenderTree |
1430 // can be called from gdb easily. | 1422 // can be called from gdb easily. |
1431 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1423 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1432 | 1424 |
1433 #endif | 1425 #endif |
1434 | 1426 |
1435 #endif // RenderObject_h | 1427 #endif // RenderObject_h |
OLD | NEW |