Title: [167705] trunk/Source/WebCore
Revision
167705
Author
abu...@adobe.com
Date
2014-04-23 05:30:22 -0700 (Wed, 23 Apr 2014)

Log Message

[CSS Regions] Improve the debugging infrastructure
https://bugs.webkit.org/show_bug.cgi?id=132042

Reviewed by Mihnea Ovidenie.

This patch improves the debugging code for CSS Regions.

Tests: No function change. No new tests.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
the render tree to the console.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167704 => 167705)


--- trunk/Source/WebCore/ChangeLog	2014-04-23 11:19:36 UTC (rev 167704)
+++ trunk/Source/WebCore/ChangeLog	2014-04-23 12:30:22 UTC (rev 167705)
@@ -1,3 +1,20 @@
+2014-04-23  Andrei Bucur  <abu...@adobe.com>
+
+        [CSS Regions] Improve the debugging infrastructure
+        https://bugs.webkit.org/show_bug.cgi?id=132042
+
+        Reviewed by Mihnea Ovidenie.
+
+        This patch improves the debugging code for CSS Regions.
+
+        Tests: No function change. No new tests.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::showRegionsInformation): Print brackets around the region range when dumping
+        the render tree to the console.
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::containingRegion): Convert the ASSERT to an ASSERT_WITH_SECURITY_IMPLICATION.
+
 2014-04-22  Ryosuke Niwa  <rn...@webkit.org>
 
         Cursor doesn't change back to pointer when leaving the Safari window

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (167704 => 167705)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2014-04-23 11:19:36 UTC (rev 167704)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2014-04-23 12:30:22 UTC (rev 167705)
@@ -1426,7 +1426,7 @@
             RenderRegion* startRegion = nullptr;
             RenderRegion* endRegion = nullptr;
             flowThread->getRegionRangeForBox(box, startRegion, endRegion);
-            printedCharacters += fprintf(stderr, " Rs:%p Re:%p", startRegion, endRegion);
+            printedCharacters += fprintf(stderr, " [Rs:%p Re:%p]", startRegion, endRegion);
         }
     }
 }

Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (167704 => 167705)


--- trunk/Source/WebCore/rendering/RootInlineBox.cpp	2014-04-23 11:19:36 UTC (rev 167704)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp	2014-04-23 12:30:22 UTC (rev 167705)
@@ -218,14 +218,17 @@
 
 RenderRegion* RootInlineBox::containingRegion() const
 {
+    RenderRegion* region = m_hasContainingRegion ? containingRegionMap().get(this) : nullptr;
+
 #ifndef NDEBUG
     if (m_hasContainingRegion) {
         RenderFlowThread* flowThread = blockFlow().flowThreadContainingBlock();
         const RenderRegionList& regionList = flowThread->renderRegionList();
-        ASSERT(regionList.contains(containingRegionMap().get(this)));
+        ASSERT_WITH_SECURITY_IMPLICATION(regionList.contains(region));
     }
 #endif
-    return m_hasContainingRegion ? containingRegionMap().get(this) : nullptr;
+
+    return region;
 }
 
 void RootInlineBox::clearContainingRegion()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to