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 * (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) 2004, 2005, 2006, 2007, 2008, 2011, 2013 Apple Inc. All rights
reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011, 2013 Apple Inc. All rights
reserved. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 r.inflate(outlineWidth); | 955 r.inflate(outlineWidth); |
956 return r; | 956 return r; |
957 } | 957 } |
958 | 958 |
959 LayoutRect RenderObject::clippedOverflowRectForRepaint(const RenderLayerModelObj
ect*) const | 959 LayoutRect RenderObject::clippedOverflowRectForRepaint(const RenderLayerModelObj
ect*) const |
960 { | 960 { |
961 ASSERT_NOT_REACHED(); | 961 ASSERT_NOT_REACHED(); |
962 return LayoutRect(); | 962 return LayoutRect(); |
963 } | 963 } |
964 | 964 |
965 RenderObject::ShouldApplyClipsAndScrolls RenderObject::shouldApplyClipsAndScroll
sForRepaint() | 965 bool RenderObject::shouldApplyCompositedContainerScrollsForRepaint() |
966 { | 966 { |
967 #if PLATFORM(IOS) | 967 #if PLATFORM(IOS) |
968 return SkipCompositedClipsAndContainerScrolls; | 968 return false; |
| 969 #else |
| 970 return true; |
969 #endif | 971 #endif |
970 | |
971 return SkipCompositedClips; | |
972 } | 972 } |
973 | 973 |
974 RenderObject::VisibleRectContext RenderObject::visibleRectContextForRepaint() | 974 RenderObject::VisibleRectContext RenderObject::visibleRectContextForRepaint() |
975 { | 975 { |
976 return { false, false, false, shouldApplyClipsAndScrollsForRepaint() }; | 976 return { false, false, false, false, shouldApplyCompositedContainerScrollsFo
rRepaint() }; |
977 } | 977 } |
978 | 978 |
979 LayoutRect RenderObject::computeRectForRepaint(const LayoutRect& rect, const Ren
derLayerModelObject* repaintContainer) const | 979 LayoutRect RenderObject::computeRectForRepaint(const LayoutRect& rect, const Ren
derLayerModelObject* repaintContainer) const |
980 { | 980 { |
981 return computeVisibleRectInContainer(rect, repaintContainer, visibleRectCont
extForRepaint()); | 981 return *computeVisibleRectInContainer(rect, repaintContainer, visibleRectCon
textForRepaint()); |
982 } | 982 } |
983 | 983 |
984 FloatRect RenderObject::computeFloatRectForRepaint(const FloatRect& rect, const
RenderLayerModelObject* repaintContainer) const | 984 FloatRect RenderObject::computeFloatRectForRepaint(const FloatRect& rect, const
RenderLayerModelObject* repaintContainer) const |
985 { | 985 { |
986 return computeFloatVisibleRectInContainer(rect, repaintContainer, visibleRec
tContextForRepaint()); | 986 return *computeFloatVisibleRectInContainer(rect, repaintContainer, visibleRe
ctContextForRepaint()); |
987 } | 987 } |
988 | 988 |
989 LayoutRect RenderObject::computeVisibleRectInContainer(const LayoutRect& rect, c
onst RenderLayerModelObject* container, VisibleRectContext context) const | 989 std::optional<LayoutRect> RenderObject::computeVisibleRectInContainer(const Layo
utRect& rect, const RenderLayerModelObject* container, VisibleRectContext contex
t) const |
990 { | 990 { |
991 if (container == this) | 991 if (container == this) |
992 return rect; | 992 return rect; |
993 | 993 |
994 auto* parent = this->parent(); | 994 auto* parent = this->parent(); |
995 if (!parent) | 995 if (!parent) |
996 return rect; | 996 return rect; |
997 | 997 |
998 LayoutRect adjustedRect = rect; | 998 LayoutRect adjustedRect = rect; |
999 if (parent->hasOverflowClip()) { | 999 if (parent->hasOverflowClip()) { |
1000 downcast<RenderBox>(*parent).applyCachedClipAndScrollPosition(adjustedRe
ct, container, context.m_shouldApplyClipsAndScrolls); | 1000 bool isEmpty = downcast<RenderBox>(*parent).applyCachedClipAndScrollPosi
tion(adjustedRect, container, context.m_applyCompositedClips, context.m_applyCom
positedContainerScrolls, context.m_useEdgeInclusiveIntersection); |
1001 if (adjustedRect.isEmpty()) | 1001 if (isEmpty) { |
| 1002 if (context.m_useEdgeInclusiveIntersection) |
| 1003 return std::nullopt; |
1002 return adjustedRect; | 1004 return adjustedRect; |
| 1005 } |
1003 } | 1006 } |
1004 return parent->computeVisibleRectInContainer(adjustedRect, container, contex
t); | 1007 return parent->computeVisibleRectInContainer(adjustedRect, container, contex
t); |
1005 } | 1008 } |
1006 | 1009 |
1007 FloatRect RenderObject::computeFloatVisibleRectInContainer(const FloatRect&, con
st RenderLayerModelObject*, VisibleRectContext) const | 1010 std::optional<FloatRect> RenderObject::computeFloatVisibleRectInContainer(const
FloatRect&, const RenderLayerModelObject*, VisibleRectContext) const |
1008 { | 1011 { |
1009 ASSERT_NOT_REACHED(); | 1012 ASSERT_NOT_REACHED(); |
1010 return FloatRect(); | 1013 return FloatRect(); |
1011 } | 1014 } |
1012 | 1015 |
1013 #if ENABLE(TREE_DEBUGGING) | 1016 #if ENABLE(TREE_DEBUGGING) |
1014 | 1017 |
1015 static void outputRenderTreeLegend(TextStream& stream) | 1018 static void outputRenderTreeLegend(TextStream& stream) |
1016 { | 1019 { |
1017 stream.nextLine(); | 1020 stream.nextLine(); |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1995 } | 1998 } |
1996 | 1999 |
1997 void showRenderTree(const WebCore::RenderObject* object) | 2000 void showRenderTree(const WebCore::RenderObject* object) |
1998 { | 2001 { |
1999 if (!object) | 2002 if (!object) |
2000 return; | 2003 return; |
2001 object->showRenderTreeForThis(); | 2004 object->showRenderTreeForThis(); |
2002 } | 2005 } |
2003 | 2006 |
2004 #endif | 2007 #endif |
LEFT | RIGHT |