LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 LayoutRect RenderInline::computeRectForRepaint(const LayoutRect& rect, const Ren
derLayerModelObject* repaintContainer, RepaintContext context) const | 874 LayoutRect RenderInline::computeRectForRepaint(const LayoutRect& rect, const Ren
derLayerModelObject* repaintContainer, RepaintContext context) const |
875 { | 875 { |
876 // Repaint offset cache is only valid for root-relative repainting | 876 // Repaint offset cache is only valid for root-relative repainting |
877 LayoutRect adjustedRect = rect; | 877 LayoutRect adjustedRect = rect; |
878 if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !repai
ntContainer) { | 878 if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !repai
ntContainer) { |
879 auto* layoutState = view().frameView().layoutContext().layoutState(); | 879 auto* layoutState = view().frameView().layoutContext().layoutState(); |
880 if (style().hasInFlowPosition() && layer()) | 880 if (style().hasInFlowPosition() && layer()) |
881 adjustedRect.move(layer()->offsetForInFlowPosition()); | 881 adjustedRect.move(layer()->offsetForInFlowPosition()); |
882 adjustedRect.move(layoutState->paintOffset()); | 882 adjustedRect.move(layoutState->paintOffset()); |
883 if (context.m_useInclusiveIntersection) | 883 if (context.m_useInclusiveIntersection) |
884 *context.m_intersects = adjustedRect.inclusiveIntersect(layoutSt
ate->clipRect()); | 884 *context.m_intersects = adjustedRect.inclusiveIntersect(layoutState-
>clipRect()); |
885 else | 885 else |
886 adjustedRect.intersect(layoutState->clipRect()); | 886 adjustedRect.intersect(layoutState->clipRect()); |
887 return adjustedRect; | 887 return adjustedRect; |
888 } | 888 } |
889 | 889 |
890 if (repaintContainer == this) | 890 if (repaintContainer == this) |
891 return adjustedRect; | 891 return adjustedRect; |
892 | 892 |
893 bool containerSkipped; | 893 bool containerSkipped; |
894 RenderElement* container = this->container(repaintContainer, containerSkippe
d); | 894 RenderElement* container = this->container(repaintContainer, containerSkippe
d); |
895 if (!container) | 895 if (!container) |
896 return adjustedRect; | 896 return adjustedRect; |
(...skipping 13 matching lines...) Expand all Loading... |
910 adjustedRect.setLocation(topLeft); | 910 adjustedRect.setLocation(topLeft); |
911 if (container->hasOverflowClip()) { | 911 if (container->hasOverflowClip()) { |
912 bool intersects = true; | 912 bool intersects = true; |
913 downcast<RenderBox>(*container).applyCachedClipAndScrollPositionForRepai
nt(adjustedRect, context.m_useInclusiveIntersection, &intersects); | 913 downcast<RenderBox>(*container).applyCachedClipAndScrollPositionForRepai
nt(adjustedRect, context.m_useInclusiveIntersection, &intersects); |
914 | 914 |
915 if (context.m_useInclusiveIntersection) | 915 if (context.m_useInclusiveIntersection) |
916 *context.m_intersects = intersects; | 916 *context.m_intersects = intersects; |
917 else | 917 else |
918 intersects = !adjustedRect.isEmpty(); | 918 intersects = !adjustedRect.isEmpty(); |
919 if (!intersects) | 919 if (!intersects) |
920 return adjustedRect; | 920 return adjustedRect; |
921 } | 921 } |
922 | 922 |
923 if (containerSkipped) { | 923 if (containerSkipped) { |
924 // If the repaintContainer is below o, then we need to map the rect into
repaintContainer's coordinates. | 924 // If the repaintContainer is below o, then we need to map the rect into
repaintContainer's coordinates. |
925 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(*container); | 925 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(*container); |
926 adjustedRect.move(-containerOffset); | 926 adjustedRect.move(-containerOffset); |
927 return adjustedRect; | 927 return adjustedRect; |
928 } | 928 } |
929 return container->computeRectForRepaint(adjustedRect, repaintContainer, cont
ext); | 929 return container->computeRectForRepaint(adjustedRect, repaintContainer, cont
ext); |
930 } | 930 } |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 FloatPoint absPos = container->localToAbsolute(); | 1428 FloatPoint absPos = container->localToAbsolute(); |
1429 region.bounds.setX(absPos.x() + region.bounds.x()); | 1429 region.bounds.setX(absPos.x() + region.bounds.x()); |
1430 region.bounds.setY(absPos.y() + region.bounds.y()); | 1430 region.bounds.setY(absPos.y() + region.bounds.y()); |
1431 | 1431 |
1432 regions.append(region); | 1432 regions.append(region); |
1433 } | 1433 } |
1434 } | 1434 } |
1435 #endif | 1435 #endif |
1436 | 1436 |
1437 } // namespace WebCore | 1437 } // namespace WebCore |
LEFT | RIGHT |