[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
inferno at chromium.org
inferno at chromium.org
Wed Dec 22 11:53:30 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 06aabeddc6efdb4db331a9bed5e0b8b50f5bc729
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 10 20:46:43 2010 +0000
2010-08-10 Abhishek Arya <inferno at chromium.org>
Reviewed by David Hyatt.
Take checks for ruby base existence out of the ASSERTs.
https://bugs.webkit.org/show_bug.cgi?id=43795
Test: fast/ruby/ruby-remove-no-base.html
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::addChild):
(WebCore::RenderRubyRun::removeChild):
2010-08-10 Abhishek Arya <inferno at chromium.org>
Reviewed by David Hyatt.
Tests that removing a ruby child which causes merging of ruby base withe
a non existant base of the right sibling run does not result in crash.
https://bugs.webkit.org/show_bug.cgi?id=43795
* fast/ruby/ruby-remove-no-base-expected.txt: Added.
* fast/ruby/ruby-remove-no-base.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6f025dc..7d37a95 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-10 Abhishek Arya <inferno at chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Tests that removing a ruby child which causes merging of ruby base withe
+ a non existant base of the right sibling run does not result in crash.
+ https://bugs.webkit.org/show_bug.cgi?id=43795
+
+ * fast/ruby/ruby-remove-no-base-expected.txt: Added.
+ * fast/ruby/ruby-remove-no-base.html: Added.
+
2010-08-06 Zhenyao Mo <zmo at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt b/LayoutTests/fast/ruby/ruby-remove-no-base-expected.txt
similarity index 100%
copy from LayoutTests/fast/dom/beforeload/image-object-before-load-expected.txt
copy to LayoutTests/fast/ruby/ruby-remove-no-base-expected.txt
diff --git a/LayoutTests/fast/ruby/ruby-remove-no-base.html b/LayoutTests/fast/ruby/ruby-remove-no-base.html
new file mode 100644
index 0000000..9927f40
--- /dev/null
+++ b/LayoutTests/fast/ruby/ruby-remove-no-base.html
@@ -0,0 +1,30 @@
+<html>
+ <head>
+ <script>
+ if (window.layoutTestController)
+ {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+
+ function runTest()
+ {
+ document.body.removeChild(document.getElementById("test"));
+ document.getElementById("result").innerHTML = "PASS";
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+ </script>
+ </head>
+ <body onload='runTest()'>
+ <div id="result"></div>
+ <ruby id="test">
+ <fieldset/>
+ <rt></rt>
+ <blockquote></blockquote>
+ <rt/><rt/>
+ </ruby>
+ </body>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e43be11..671744c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-10 Abhishek Arya <inferno at chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Take checks for ruby base existence out of the ASSERTs.
+ https://bugs.webkit.org/show_bug.cgi?id=43795
+
+ Test: fast/ruby/ruby-remove-no-base.html
+
+ * rendering/RenderRubyRun.cpp:
+ (WebCore::RenderRubyRun::addChild):
+ (WebCore::RenderRubyRun::removeChild):
+
2010-08-06 Zhenyao Mo <zmo at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/rendering/RenderRubyRun.cpp b/WebCore/rendering/RenderRubyRun.cpp
index d6b724b..d48646b 100644
--- a/WebCore/rendering/RenderRubyRun.cpp
+++ b/WebCore/rendering/RenderRubyRun.cpp
@@ -143,14 +143,15 @@ void RenderRubyRun::addChild(RenderObject* child, RenderObject* beforeChild)
RenderBlock::removeChild(beforeChild);
newRun->addChild(beforeChild);
} else {
- ASSERT(hasRubyBase()); // Otherwise beforeChild would be borked.
- // Insertion before a ruby base object.
- // In this case we need insert a new run before the current one and split the base.
- RenderObject* ruby = parent();
- RenderRubyRun* newRun = staticCreateRubyRun(ruby);
- ruby->addChild(newRun, this);
- newRun->addChild(child);
- rubyBaseSafe()->moveChildren(newRun->rubyBaseSafe(), beforeChild);
+ if (hasRubyBase()) {
+ // Insertion before a ruby base object.
+ // In this case we need insert a new run before the current one and split the base.
+ RenderObject* ruby = parent();
+ RenderRubyRun* newRun = staticCreateRubyRun(ruby);
+ ruby->addChild(newRun, this);
+ newRun->addChild(child);
+ rubyBaseSafe()->moveChildren(newRun->rubyBaseSafe(), beforeChild);
+ }
}
} else {
// child is not a text -> insert it into the base
@@ -171,13 +172,14 @@ void RenderRubyRun::removeChild(RenderObject* child)
if (base && rightNeighbour && rightNeighbour->isRubyRun()) {
// Ruby run without a base can happen only at the first run.
RenderRubyRun* rightRun = static_cast<RenderRubyRun*>(rightNeighbour);
- ASSERT(rightRun->hasRubyBase());
- RenderRubyBase* rightBase = rightRun->rubyBaseSafe();
- // Collect all children in a single base, then swap the bases.
- rightBase->moveChildren(base);
- moveChildTo(rightRun, base);
- rightRun->moveChildTo(this, rightBase);
- // The now empty ruby base will be removed below.
+ if (rightRun->hasRubyBase()) {
+ RenderRubyBase* rightBase = rightRun->rubyBaseSafe();
+ // Collect all children in a single base, then swap the bases.
+ rightBase->moveChildren(base);
+ moveChildTo(rightRun, base);
+ rightRun->moveChildTo(this, rightBase);
+ // The now empty ruby base will be removed below.
+ }
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list