WebKit Bugzilla
Attachment 368877 Details for
Bug 197547
: Add logging for RenderLayer clip rects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197547-20190502200839.patch (text/plain), 6.54 KB, created by
Simon Fraser (smfr)
on 2019-05-02 20:08:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-02 20:08:40 PDT
Size:
6.54 KB
patch
obsolete
>Subversion Revision: 244862 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1f7b771dc02236fcb438311c22a10757840efccf..80d21b2749058d3fc1a91b257f3edeae7dea1940 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-05-02 Simon Fraser <simon.fraser@apple.com> >+ >+ Add logging for RenderLayer clip rects >+ https://bugs.webkit.org/show_bug.cgi?id=197547 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a ClipRects log channel, and stream output for ClipRect and ClipRects. >+ >+ * platform/Logging.h: >+ * rendering/ClipRect.cpp: >+ (WebCore::operator<<): >+ * rendering/ClipRect.h: >+ * rendering/RenderLayer.cpp: >+ (WebCore::operator<<): >+ (WebCore::RenderLayer::calculateClipRects const): >+ * rendering/RenderLayer.h: >+ > 2019-05-01 Youenn Fablet <youenn@apple.com> > > Add back hasNullReferences() assert in Document::updateIsPlayingMedia >diff --git a/Source/WebCore/platform/Logging.h b/Source/WebCore/platform/Logging.h >index 0171229bdcd8faf3dc2319b1b0b81d0073f86a8f..e120a292a8325bbb80f6115666c576c44f1b24e3 100644 >--- a/Source/WebCore/platform/Logging.h >+++ b/Source/WebCore/platform/Logging.h >@@ -42,6 +42,7 @@ namespace WebCore { > M(Animations) \ > M(ApplePay) \ > M(Archives) \ >+ M(ClipRects) \ > M(Compositing) \ > M(ContentFiltering) \ > M(ContentObservation) \ >diff --git a/Source/WebCore/rendering/ClipRect.cpp b/Source/WebCore/rendering/ClipRect.cpp >index b4db56323fa9faa381fbb7d3bd396fb9dea8b54b..3630d16abef602eec5c8475ab3392bc03ce42916 100644 >--- a/Source/WebCore/rendering/ClipRect.cpp >+++ b/Source/WebCore/rendering/ClipRect.cpp >@@ -38,4 +38,17 @@ bool ClipRect::intersects(const HitTestLocation& hitTestLocation) const > return hitTestLocation.intersects(m_rect); > } > >+TextStream& operator<<(TextStream& ts, const ClipRect& clipRect) >+{ >+ ts << "rect "; >+ if (clipRect.isInfinite()) >+ ts << "infinite"; >+ else >+ ts << clipRect.rect(); >+ >+ if (clipRect.affectedByRadius()) >+ ts << " affected by radius"; >+ return ts; >+} >+ > } >diff --git a/Source/WebCore/rendering/ClipRect.h b/Source/WebCore/rendering/ClipRect.h >index 5ed7a6c0d88976819f0a1c1aeb99996e54116466..52abb671da5a6063c9708cf524724d32ee6ecd33 100644 >--- a/Source/WebCore/rendering/ClipRect.h >+++ b/Source/WebCore/rendering/ClipRect.h >@@ -27,6 +27,10 @@ > > #include "LayoutRect.h" > >+namespace WTF { >+class TextStream; >+} >+ > namespace WebCore { > > class HitTestLocation; >@@ -103,4 +107,6 @@ inline ClipRect intersection(const ClipRect& a, const ClipRect& b) > return c; > } > >+WTF::TextStream& operator<<(WTF::TextStream&, const ClipRect&); >+ > } // namespace WebCore >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index a3ff5200aee7925412ba07757548c7f5f496921e..21c28c30c1df43a92837f454815867eabbdb26d4 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -268,6 +268,19 @@ void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRendering) > #endif > } > >+#if !LOG_DISABLED >+static TextStream& operator<<(TextStream& ts, const ClipRects& clipRects) >+{ >+ TextStream::GroupScope scope(ts); >+ ts << indent << "ClipRects\n"; >+ ts << indent << " overflow : " << clipRects.overflowClipRect() << "\n"; >+ ts << indent << " fixed : " << clipRects.fixedClipRect() << "\n"; >+ ts << indent << " positioned: " << clipRects.posClipRect() << "\n"; >+ >+ return ts; >+} >+#endif >+ > RenderLayer::RenderLayer(RenderLayerModelObject& rendererLayerModelObject) > : m_isRenderViewLayer(rendererLayerModelObject.isRenderView()) > , m_forcedStackingContext(rendererLayerModelObject.isMedia()) >@@ -5528,6 +5541,8 @@ void RenderLayer::calculateClipRects(const ClipRectsContext& clipRectsContext, C > clipRects.setFixedClipRect(intersection(newPosClip, clipRects.fixedClipRect())); > } > } >+ >+ LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " calculateClipRects " << clipRects); > } > > Ref<ClipRects> RenderLayer::parentClipRects(const ClipRectsContext& clipRectsContext) const >@@ -5577,6 +5592,8 @@ ClipRect RenderLayer::backgroundClipRect(const ClipRectsContext& clipRectsContex > // Note: infinite clipRects should not be scrolled here, otherwise they will accidentally no longer be considered infinite. > if (parentRects->fixed() && &clipRectsContext.rootLayer->renderer() == &view && !backgroundClipRect.isInfinite()) > backgroundClipRect.moveBy(view.frameView().scrollPositionForFixedPosition()); >+ >+ LOG_WITH_STREAM(ClipRects, stream << "RenderLayer " << this << " backgroundClipRect with context " << clipRectsContext << " returning " << backgroundClipRect); > return backgroundClipRect; > } > >@@ -6739,6 +6756,21 @@ void RenderLayer::invalidateEventRegion() > #endif > } > >+TextStream& operator<<(WTF::TextStream& ts, ClipRectsType clipRectsType) >+{ >+ switch (clipRectsType) { >+ case PaintingClipRects: ts << "painting"; break; >+ case RootRelativeClipRects: ts << "root-relative"; break; >+ case AbsoluteClipRects: ts << "absolute"; break; >+ case TemporaryClipRects: ts << "temporary"; break; >+ case NumCachedClipRectsTypes: >+ case AllClipRectTypes: >+ ts << "?"; >+ break; >+ } >+ return ts; >+} >+ > TextStream& operator<<(TextStream& ts, const RenderLayer& layer) > { > ts << "RenderLayer " << &layer << " " << layer.size(); >@@ -6757,6 +6789,15 @@ TextStream& operator<<(TextStream& ts, const RenderLayer& layer) > return ts; > } > >+TextStream& operator<<(TextStream& ts, const RenderLayer::ClipRectsContext& context) >+{ >+ ts.dumpProperty("root layer:", context.rootLayer); >+ ts.dumpProperty("type:", context.clipRectsType); >+ ts.dumpProperty("overflow-clip:", context.respectOverflowClip == IgnoreOverflowClip ? "ignore" : "respect"); >+ >+ return ts; >+} >+ > } // namespace WebCore > > #if ENABLE(TREE_DEBUGGING) >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index 7aad1961473ef25c1eae08115b1a272b7b2682fc..fee5060c783ca8e73be37759df57c9777c41f03c 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -1369,7 +1369,9 @@ void makeMatrixRenderable(TransformationMatrix&, bool has3DRendering); > > bool compositedWithOwnBackingStore(const RenderLayer&); > >+WTF::TextStream& operator<<(WTF::TextStream&, ClipRectsType); > WTF::TextStream& operator<<(WTF::TextStream&, const RenderLayer&); >+WTF::TextStream& operator<<(WTF::TextStream&, const RenderLayer::ClipRectsContext&); > > } // namespace WebCore >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197547
: 368877