Skip to content

Commit

Permalink
Merge r173845 - Bad cast in isValidColumnSpanner.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=133380.

Reviewed by Simon Fraser.

Source/WebCore:

Added fast/multicol/multicol-crazy-nesting.html

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::isValidColumnSpanner):
The crawl up the chain looking for unsplittable objects should use containing blocks
and not be casting to parent boxes. You can have an inline in the parent chain, so
this was not the right way to walk up the tree.

LayoutTests:

* fast/multicol/multicol-crazy-nesting-expected.txt: Added.
* fast/multicol/multicol-crazy-nesting.html: Added.

Canonical link: https://commits.webkit.org/154760.22@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@173916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Hyatt authored and carlosgcampos committed Sep 24, 2014
1 parent cea3b10 commit 0639290
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
10 changes: 10 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
2014-09-22 David Hyatt <hyatt@apple.com>

Bad cast in isValidColumnSpanner.
https://bugs.webkit.org/show_bug.cgi?id=133380.

Reviewed by Simon Fraser.

* fast/multicol/multicol-crazy-nesting-expected.txt: Added.
* fast/multicol/multicol-crazy-nesting.html: Added.

2014-09-22 David Hyatt <hyatt@apple.com>

ASSERT in RenderMultiColumnSet::requiresBalancing.
Expand Down
2 changes: 2 additions & 0 deletions LayoutTests/fast/multicol/multicol-crazy-nesting-expected.txt
@@ -0,0 +1,2 @@
This test passes if it doesn't crash.

13 changes: 13 additions & 0 deletions LayoutTests/fast/multicol/multicol-crazy-nesting.html
@@ -0,0 +1,13 @@
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
* { -webkit-columns:3; -webkit-column-span:all }
</style>
</head>
This test passes if it doesn't crash.
<span>
<div style="float:left">
<div></div>
15 changes: 15 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
2014-09-22 David Hyatt <hyatt@apple.com>

Bad cast in isValidColumnSpanner.
https://bugs.webkit.org/show_bug.cgi?id=133380.

Reviewed by Simon Fraser.

Added fast/multicol/multicol-crazy-nesting.html

* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::isValidColumnSpanner):
The crawl up the chain looking for unsplittable objects should use containing blocks
and not be casting to parent boxes. You can have an inline in the parent chain, so
this was not the right way to walk up the tree.

2014-09-22 David Hyatt <hyatt@apple.com>

ASSERT in RenderMultiColumnSet::requiresBalancing.
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp
Expand Up @@ -264,7 +264,7 @@ static bool isValidColumnSpanner(RenderMultiColumnFlowThread* flowThread, Render
return false;

// This looks like a spanner, but if we're inside something unbreakable, it's not to be treated as one.
for (RenderBox* ancestor = toRenderBox(descendant)->parentBox(); ancestor; ancestor = ancestor->parentBox()) {
for (RenderBox* ancestor = toRenderBox(descendant)->containingBlock(); ancestor; ancestor = ancestor->containingBlock()) {
if (ancestor->isRenderFlowThread()) {
// Don't allow any intervening non-multicol fragmentation contexts. The spec doesn't say
// anything about disallowing this, but it's just going to be too complicated to
Expand Down

0 comments on commit 0639290

Please sign in to comment.