Title: [201124] trunk/Source/WebCore
Revision
201124
Author
za...@apple.com
Date
2016-05-18 20:11:41 -0700 (Wed, 18 May 2016)

Log Message

Make LayoutUnit::operator bool() explicit.
https://bugs.webkit.org/show_bug.cgi?id=157871

Reviewed by Simon Fraser.

This is in preparation for getting LayoutUnit::operator int() removed.

No behaviour change.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::operator bool):
* rendering/RenderView.cpp:
(WebCore::RenderView::initializeLayoutState): Negative page height is invalid.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (201123 => 201124)


--- trunk/Source/WebCore/ChangeLog	2016-05-19 02:39:54 UTC (rev 201123)
+++ trunk/Source/WebCore/ChangeLog	2016-05-19 03:11:41 UTC (rev 201124)
@@ -1,3 +1,19 @@
+2016-05-18  Zalan Bujtas  <za...@apple.com>
+
+        Make LayoutUnit::operator bool() explicit.
+        https://bugs.webkit.org/show_bug.cgi?id=157871
+
+        Reviewed by Simon Fraser.
+
+        This is in preparation for getting LayoutUnit::operator int() removed.
+
+        No behaviour change.
+
+        * platform/LayoutUnit.h:
+        (WebCore::LayoutUnit::operator bool):
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::initializeLayoutState): Negative page height is invalid.
+
 2016-05-18  Eric Carlson  <eric.carl...@apple.com>
 
         [iOS] Fullscreen video playback broken in WK1 apps

Modified: trunk/Source/WebCore/platform/LayoutUnit.h (201123 => 201124)


--- trunk/Source/WebCore/platform/LayoutUnit.h	2016-05-19 02:39:54 UTC (rev 201123)
+++ trunk/Source/WebCore/platform/LayoutUnit.h	2016-05-19 03:11:41 UTC (rev 201124)
@@ -116,7 +116,7 @@
     operator int() const { return toInt(); }
     operator float() const { return toFloat(); }
     operator double() const { return toDouble(); }
-    operator bool() const { return m_value; }
+    explicit operator bool() const { return m_value; }
 
     LayoutUnit& operator++()
     {

Modified: trunk/Source/WebCore/rendering/RenderView.cpp (201123 => 201124)


--- trunk/Source/WebCore/rendering/RenderView.cpp	2016-05-19 02:39:54 UTC (rev 201123)
+++ trunk/Source/WebCore/rendering/RenderView.cpp	2016-05-19 03:11:41 UTC (rev 201124)
@@ -277,7 +277,8 @@
 
     state.m_pageLogicalHeight = m_pageLogicalHeight;
     state.m_pageLogicalHeightChanged = m_pageLogicalHeightChanged;
-    state.m_isPaginated = state.m_pageLogicalHeight;
+    ASSERT(state.m_pageLogicalHeight >= 0);
+    state.m_isPaginated = state.m_pageLogicalHeight > 0;
 }
 
 // The algorithm below assumes this is a full layout. In case there are previously computed values for regions, supplemental steps are taken
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to