Title: [124528] branches/safari-536.26-branch
- Revision
- 124528
- Author
- [email protected]
- Date
- 2012-08-02 16:27:33 -0700 (Thu, 02 Aug 2012)
Log Message
Merged r120761. <rdar://problem/11983816>
Modified Paths
Added Paths
Diff
Modified: branches/safari-536.26-branch/LayoutTests/ChangeLog (124527 => 124528)
--- branches/safari-536.26-branch/LayoutTests/ChangeLog 2012-08-02 23:21:33 UTC (rev 124527)
+++ branches/safari-536.26-branch/LayoutTests/ChangeLog 2012-08-02 23:27:33 UTC (rev 124528)
@@ -1,5 +1,23 @@
2012-08-02 Lucas Forschler <[email protected]>
+ Merge 120761
+
+ 2012-06-19 Ken Buchanan <[email protected]>
+
+ Absolute positioned objects should not be added to anonymous block lists
+ https://bugs.webkit.org/show_bug.cgi?id=87768
+
+ Reviewed by Abhishek Arya.
+
+ Test crashing condition in bug 87768.
+
+ * fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt: Added
+ * fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html: Added
+ * fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt: Added
+ * fast/block/positioning/insert-positioned-in-anonymous-crash.html: Added
+
+2012-08-02 Lucas Forschler <[email protected]>
+
Merge 120731
2012-06-19 Abhishek Arya <[email protected]>
Copied: branches/safari-536.26-branch/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt (from rev 120761, trunk/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt) (0 => 124528)
--- branches/safari-536.26-branch/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash-expected.txt 2012-08-02 23:27:33 UTC (rev 124528)
@@ -0,0 +1 @@
+PASS. WebKit didn't crash.
Copied: branches/safari-536.26-branch/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html (from rev 120761, trunk/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html) (0 => 124528)
--- branches/safari-536.26-branch/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/fast/block/positioning/abspositioned-object-under-split-relpositioned-inline-crash.html 2012-08-02 23:27:33 UTC (rev 124528)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<body>
+<style>
+.class1 { position: relative; }
+.class2 { position: absolute; }
+</style>
+<script>
+window._onload_ = function() {
+ document.designMode="on";
+ document.execCommand("SelectAll");
+ document.execCommand("Strikethrough");
+ document.body.offsetTop;
+ document.body.innerHTML = "PASS. WebKit didn't crash.";
+
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+}
+</script>
+<i class="class1">
+<span class="class2"></span>
+<div>
+<xmp class="class2">
+A
+</xmp>
+</div>
+</i>
+</body>
+</html>
Copied: branches/safari-536.26-branch/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt (from rev 120761, trunk/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt) (0 => 124528)
--- branches/safari-536.26-branch/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash-expected.txt 2012-08-02 23:27:33 UTC (rev 124528)
@@ -0,0 +1 @@
+PASSED
Copied: branches/safari-536.26-branch/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash.html (from rev 120761, trunk/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash.html) (0 => 124528)
--- branches/safari-536.26-branch/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash.html (rev 0)
+++ branches/safari-536.26-branch/LayoutTests/fast/block/positioning/insert-positioned-in-anonymous-crash.html 2012-08-02 23:27:33 UTC (rev 124528)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ .inlineContainer {
+ position: relative;
+ display: inline;
+ }
+ #positioned {
+ position: absolute;
+ }
+ </style>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ function runTest() {
+ document.getElementById('positioned').innerHTML = 'PASSED';
+ }
+ </script>
+ </head>
+ <body _onload_="runTest()">
+ <div class='inlineContainer'>
+ <div>
+ <div id='positioned'>FAILED</div>
+ </div>
+ </div>
+ </body>
+</html>
Modified: branches/safari-536.26-branch/Source/WebCore/ChangeLog (124527 => 124528)
--- branches/safari-536.26-branch/Source/WebCore/ChangeLog 2012-08-02 23:21:33 UTC (rev 124527)
+++ branches/safari-536.26-branch/Source/WebCore/ChangeLog 2012-08-02 23:27:33 UTC (rev 124528)
@@ -1,5 +1,30 @@
2012-08-02 Lucas Forschler <[email protected]>
+ Merge 120761
+
+ 2012-06-19 Ken Buchanan <[email protected]>
+
+ Absolute positioned objects should not be added to anonymous block lists
+ https://bugs.webkit.org/show_bug.cgi?id=87768
+
+ Reviewed by Abhishek Arya.
+
+ containingBlock() was returning an anonymous block for absolute
+ positioned objects under a relative positioned inline in the case
+ that the inline is split and the object is underneath the block
+ continuation. Anonymous blocks should never have anything in their
+ positioned object lists because they can be destroyed at any time
+ for a different reasons such as anonymous block merging, which is
+ a problem for layout if they have m_posChildNeedsLayout set.
+
+ This patch adds a generic check for anonymous blocks in
+ containingBlock() to correct this problem.
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::containingBlock):
+
+2012-08-02 Lucas Forschler <[email protected]>
+
Merge 120731
2012-06-19 Abhishek Arya <[email protected]>
Modified: branches/safari-536.26-branch/Source/WebCore/rendering/RenderObject.cpp (124527 => 124528)
--- branches/safari-536.26-branch/Source/WebCore/rendering/RenderObject.cpp 2012-08-02 23:21:33 UTC (rev 124527)
+++ branches/safari-536.26-branch/Source/WebCore/rendering/RenderObject.cpp 2012-08-02 23:27:33 UTC (rev 124528)
@@ -715,7 +715,11 @@
if (!o && isRenderScrollbarPart())
o = toRenderScrollbarPart(this)->rendererOwningScrollbar();
if (!isText() && m_style->position() == FixedPosition) {
- while (o && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) {
+ while (o) {
+ if (o->isRenderView())
+ break;
+ if (o->hasTransform() && o->isRenderBlock())
+ break;
#if ENABLE(SVG)
// foreignObject is the containing block for its contents.
if (o->isSVGForeignObject())
@@ -723,18 +727,24 @@
#endif
o = o->parent();
}
+ ASSERT(!o->isAnonymousBlock());
} else if (!isText() && m_style->position() == AbsolutePosition) {
- while (o && (o->style()->position() == StaticPosition || (o->isInline() && !o->isReplaced())) && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) {
+ while (o) {
// For relpositioned inlines, we return the nearest non-anonymous enclosing block. We don't try
// to return the inline itself. This allows us to avoid having a positioned objects
// list in all RenderInlines and lets us return a strongly-typed RenderBlock* result
// from this method. The container() method can actually be used to obtain the
// inline directly.
+ if (!o->style()->position() == StaticPosition && !(o->isInline() && !o->isReplaced()))
+ break;
+ if (o->isRenderView())
+ break;
+ if (o->hasTransform() && o->isRenderBlock())
+ break;
+
if (o->style()->position() == RelativePosition && o->isInline() && !o->isReplaced()) {
- RenderBlock* relPositionedInlineContainingBlock = o->containingBlock();
- while (relPositionedInlineContainingBlock->isAnonymousBlock())
- relPositionedInlineContainingBlock = relPositionedInlineContainingBlock->containingBlock();
- return relPositionedInlineContainingBlock;
+ o = o->containingBlock();
+ break;
}
#if ENABLE(SVG)
if (o->isSVGForeignObject()) //foreignObject is the containing block for contents inside it
@@ -743,6 +753,9 @@
o = o->parent();
}
+
+ while (o && o->isAnonymousBlock())
+ o = o->containingBlock();
} else {
while (o && ((o->isInline() && !o->isReplaced()) || !o->isRenderBlock()))
o = o->parent();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes