Changeset 244900 in webkit
- Timestamp:
- May 2, 2019 10:01:49 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244899 r244900 1 2019-05-02 Simon Fraser <simon.fraser@apple.com> 2 3 Add logging for RenderLayer clip rects 4 https://bugs.webkit.org/show_bug.cgi?id=197547 5 6 Reviewed by Zalan Bujtas. 7 8 Add a ClipRects log channel, and stream output for ClipRect and ClipRects. 9 10 * platform/Logging.h: 11 * rendering/ClipRect.cpp: 12 (WebCore::operator<<): 13 * rendering/ClipRect.h: 14 * rendering/RenderLayer.cpp: 15 (WebCore::operator<<): 16 (WebCore::RenderLayer::calculateClipRects const): 17 * rendering/RenderLayer.h: 18 1 19 2019-05-02 Youenn Fablet <youenn@apple.com> 2 20 -
trunk/Source/WebCore/platform/Logging.h
r244818 r244900 43 43 M(ApplePay) \ 44 44 M(Archives) \ 45 M(ClipRects) \ 45 46 M(Compositing) \ 46 47 M(ContentFiltering) \ -
trunk/Source/WebCore/rendering/ClipRect.cpp
r178574 r244900 39 39 } 40 40 41 TextStream& operator<<(TextStream& ts, const ClipRect& clipRect) 42 { 43 ts << "rect "; 44 if (clipRect.isInfinite()) 45 ts << "infinite"; 46 else 47 ts << clipRect.rect(); 48 49 if (clipRect.affectedByRadius()) 50 ts << " affected by radius"; 51 return ts; 41 52 } 53 54 } -
trunk/Source/WebCore/rendering/ClipRect.h
r208668 r244900 27 27 28 28 #include "LayoutRect.h" 29 30 namespace WTF { 31 class TextStream; 32 } 29 33 30 34 namespace WebCore { … … 104 108 } 105 109 110 WTF::TextStream& operator<<(WTF::TextStream&, const ClipRect&); 111 106 112 } // namespace WebCore -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r244851 r244900 269 269 } 270 270 271 #if !LOG_DISABLED 272 static TextStream& operator<<(TextStream& ts, const ClipRects& clipRects) 273 { 274 TextStream::GroupScope scope(ts); 275 ts << indent << "ClipRects\n"; 276 ts << indent << " overflow : " << clipRects.overflowClipRect() << "\n"; 277 ts << indent << " fixed : " << clipRects.fixedClipRect() << "\n"; 278 ts << indent << " positioned: " << clipRects.posClipRect() << "\n"; 279 280 return ts; 281 } 282 #endif 283 271 284 RenderLayer::RenderLayer(RenderLayerModelObject& rendererLayerModelObject) 272 285 : m_isRenderViewLayer(rendererLayerModelObject.isRenderView()) … … 5529 5542 } 5530 5543 } 5544 5545 LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " calculateClipRects " << clipRects); 5531 5546 } 5532 5547 … … 5578 5593 if (parentRects->fixed() && &clipRectsContext.rootLayer->renderer() == &view && !backgroundClipRect.isInfinite()) 5579 5594 backgroundClipRect.moveBy(view.frameView().scrollPositionForFixedPosition()); 5595 5596 LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " backgroundClipRect with context " << clipRectsContext << " returning " << backgroundClipRect); 5580 5597 return backgroundClipRect; 5581 5598 } … … 6740 6757 } 6741 6758 6759 TextStream& operator<<(WTF::TextStream& ts, ClipRectsType clipRectsType) 6760 { 6761 switch (clipRectsType) { 6762 case PaintingClipRects: ts << "painting"; break; 6763 case RootRelativeClipRects: ts << "root-relative"; break; 6764 case AbsoluteClipRects: ts << "absolute"; break; 6765 case TemporaryClipRects: ts << "temporary"; break; 6766 case NumCachedClipRectsTypes: 6767 case AllClipRectTypes: 6768 ts << "?"; 6769 break; 6770 } 6771 return ts; 6772 } 6773 6742 6774 TextStream& operator<<(TextStream& ts, const RenderLayer& layer) 6743 6775 { … … 6758 6790 } 6759 6791 6792 TextStream& operator<<(TextStream& ts, const RenderLayer::ClipRectsContext& context) 6793 { 6794 ts.dumpProperty("root layer:", context.rootLayer); 6795 ts.dumpProperty("type:", context.clipRectsType); 6796 ts.dumpProperty("overflow-clip:", context.respectOverflowClip == IgnoreOverflowClip ? "ignore" : "respect"); 6797 6798 return ts; 6799 } 6800 6760 6801 } // namespace WebCore 6761 6802 -
trunk/Source/WebCore/rendering/RenderLayer.h
r244509 r244900 1370 1370 bool compositedWithOwnBackingStore(const RenderLayer&); 1371 1371 1372 WTF::TextStream& operator<<(WTF::TextStream&, ClipRectsType); 1372 1373 WTF::TextStream& operator<<(WTF::TextStream&, const RenderLayer&); 1374 WTF::TextStream& operator<<(WTF::TextStream&, const RenderLayer::ClipRectsContext&); 1373 1375 1374 1376 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.