Changeset 295665 in webkit for trunk/Source/WebCore/rendering/RenderObject.cpp
- Timestamp:
- Jun 19, 2022, 8:57:23 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/rendering/RenderObject.cpp
r294902 r295665 978 978 } 979 979 980 void RenderObject::repaint() const 981 { 982 // Don't repaint if we're unrooted (note that view() still returns the view when unrooted) 983 if (!isRooted()) 984 return; 985 986 const RenderView& view = this->view(); 987 if (view.printing()) 988 return; 989 980 void RenderObject::issueRepaint(std::optional<LayoutRect> partialRepaintRect, ClipRepaintToLayer clipRepaintToLayer, ForceRepaint forceRepaint) const 981 { 990 982 auto repaintContainer = containerForRepaint(); 991 983 if (!repaintContainer.renderer) 992 repaintContainer = { fullRepaintIsScheduled(*this), &view }; 993 994 if (!repaintContainer.fullRepaintIsScheduled) 995 repaintUsingContainer(repaintContainer.renderer, clippedOverflowRectForRepaint(repaintContainer.renderer)); 996 } 997 998 void RenderObject::repaintRectangle(const LayoutRect& r, bool shouldClipToLayer) const 984 repaintContainer = { fullRepaintIsScheduled(*this), &view() }; 985 986 if (repaintContainer.fullRepaintIsScheduled && forceRepaint == ForceRepaint::No) 987 return; 988 989 auto repaintRect = partialRepaintRect ? computeRectForRepaint(*partialRepaintRect, repaintContainer.renderer) : clippedOverflowRectForRepaint(repaintContainer.renderer); 990 repaintUsingContainer(repaintContainer.renderer, repaintRect, clipRepaintToLayer == ClipRepaintToLayer::Yes); 991 } 992 993 void RenderObject::repaint() const 999 994 { 1000 995 // Don't repaint if we're unrooted (note that view() still returns the view when unrooted) 1001 if (!isRooted()) 1002 return; 1003 1004 const RenderView& view = this->view(); 1005 if (view.printing()) 1006 return; 1007 1008 LayoutRect dirtyRect(r); 996 if (!isRooted() || view().printing()) 997 return; 998 issueRepaint(); 999 } 1000 1001 void RenderObject::repaintRectangle(const LayoutRect& repaintRect, bool shouldClipToLayer) const 1002 { 1003 // Don't repaint if we're unrooted (note that view() still returns the view when unrooted) 1004 if (!isRooted() || view().printing()) 1005 return; 1009 1006 // FIXME: layoutDelta needs to be applied in parts before/after transforms and 1010 1007 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 1011 dirtyRect.move(view.frameView().layoutContext().layoutDelta()); 1012 1013 auto repaintContainer = containerForRepaint(); 1014 if (!repaintContainer.renderer) 1015 repaintContainer = { fullRepaintIsScheduled(*this), &view }; 1016 1017 if (!repaintContainer.fullRepaintIsScheduled) 1018 repaintUsingContainer(repaintContainer.renderer, computeRectForRepaint(dirtyRect, repaintContainer.renderer), shouldClipToLayer); 1008 auto dirtyRect = repaintRect; 1009 dirtyRect.move(view().frameView().layoutContext().layoutDelta()); 1010 issueRepaint(dirtyRect, shouldClipToLayer ? ClipRepaintToLayer::Yes : ClipRepaintToLayer::No); 1019 1011 } 1020 1012
Note:
See TracChangeset
for help on using the changeset viewer.