Title: [209487] trunk
Revision
209487
Author
za...@apple.com
Date
2016-12-07 15:21:27 -0800 (Wed, 07 Dec 2016)

Log Message

ASSERTION FAILED: count >= 1 in WebCore::RenderMultiColumnSet::columnCount
https://bugs.webkit.org/show_bug.cgi?id=136365
<rdar://problem/27686727>

Reviewed by Simon Fraser.

Source/WebCore:

Margin value overflow ends up confusing the column count computing logic.

Test: fast/multicol/assert-on-column-count-when-zoomed-in.html

* css/StyleResolver.cpp:
(WebCore::addIntrinsicMargins):

LayoutTests:

* fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt: Added.
* fast/multicol/assert-on-column-count-when-zoomed-in.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209486 => 209487)


--- trunk/LayoutTests/ChangeLog	2016-12-07 22:51:54 UTC (rev 209486)
+++ trunk/LayoutTests/ChangeLog	2016-12-07 23:21:27 UTC (rev 209487)
@@ -1,3 +1,14 @@
+2016-12-07  Zalan Bujtas  <za...@apple.com>
+
+        ASSERTION FAILED: count >= 1 in WebCore::RenderMultiColumnSet::columnCount
+        https://bugs.webkit.org/show_bug.cgi?id=136365
+        <rdar://problem/27686727>
+
+        Reviewed by Simon Fraser.
+
+        * fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt: Added.
+        * fast/multicol/assert-on-column-count-when-zoomed-in.html: Added.
+
 2016-12-07  Ryosuke Niwa  <rn...@webkit.org>
 
         document.caretRangeFromPoint doesn't retarget the resultant Range correctly.

Added: trunk/LayoutTests/fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt (0 => 209487)


--- trunk/LayoutTests/fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/assert-on-column-count-when-zoomed-in-expected.txt	2016-12-07 23:21:27 UTC (rev 209487)
@@ -0,0 +1 @@
+PASS if no assert in debug. 

Added: trunk/LayoutTests/fast/multicol/assert-on-column-count-when-zoomed-in.html (0 => 209487)


--- trunk/LayoutTests/fast/multicol/assert-on-column-count-when-zoomed-in.html	                        (rev 0)
+++ trunk/LayoutTests/fast/multicol/assert-on-column-count-when-zoomed-in.html	2016-12-07 23:21:27 UTC (rev 209487)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we don't assert on huge zoom values for columns.</title>
+<style>
+* {
+    column-count: 2;
+    zoom: 8017;
+}
+</style>
+</head>
+<body>
+PASS if no assert in debug.
+<button></button>
+<script>
+if (window.testRunner)
+  testRunner.dumpAsText()
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (209486 => 209487)


--- trunk/Source/WebCore/ChangeLog	2016-12-07 22:51:54 UTC (rev 209486)
+++ trunk/Source/WebCore/ChangeLog	2016-12-07 23:21:27 UTC (rev 209487)
@@ -1,3 +1,18 @@
+2016-12-07  Zalan Bujtas  <za...@apple.com>
+
+        ASSERTION FAILED: count >= 1 in WebCore::RenderMultiColumnSet::columnCount
+        https://bugs.webkit.org/show_bug.cgi?id=136365
+        <rdar://problem/27686727>
+
+        Reviewed by Simon Fraser.
+
+        Margin value overflow ends up confusing the column count computing logic.
+
+        Test: fast/multicol/assert-on-column-count-when-zoomed-in.html
+
+        * css/StyleResolver.cpp:
+        (WebCore::addIntrinsicMargins):
+
 2016-12-07  Ryosuke Niwa  <rn...@webkit.org>
 
         document.caretRangeFromPoint doesn't retarget the resultant Range correctly.

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (209486 => 209487)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2016-12-07 22:51:54 UTC (rev 209486)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2016-12-07 23:21:27 UTC (rev 209487)
@@ -701,7 +701,7 @@
 static void addIntrinsicMargins(RenderStyle& style)
 {
     // Intrinsic margin value.
-    const int intrinsicMargin = 2 * style.effectiveZoom();
+    const int intrinsicMargin = clampToInteger(2 * style.effectiveZoom());
 
     // FIXME: Using width/height alone and not also dealing with min-width/max-width is flawed.
     // FIXME: Using "hasQuirk" to decide the margin wasn't set is kind of lame.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to