[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 14:24:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e29694f9fb3a72e723b692310c6067b5b5f0c017
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 7 22:00:02 2010 +0000
2010-10-07 Abhishek Arya <inferno at chromium.org>
Reviewed by Dave Hyatt.
Set the m_selectedChildren flag on the root inline box if one of the leaf
inline box from the bidi runs walk has a selection state. Remove the flag
setting logic from addToLine, since line boxes created in createLinesBoxes
should not be propagating selection state to root inline box.
https://bugs.webkit.org/show_bug.cgi?id=47201
Test: editing/selection/root-inlinebox-selected-children-crash.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::constructLine):
2010-10-07 Abhishek Arya <inferno at chromium.org>
Reviewed by Dave Hyatt.
Tests that we don't crash while setting selected children on the root inline box.
https://bugs.webkit.org/show_bug.cgi?id=47201
* editing/selection/root-inlinebox-selected-children-crash-expected.txt: Added.
* editing/selection/root-inlinebox-selected-children-crash.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69345 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2dc5eb4..462f98c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-07 Abhishek Arya <inferno at chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Tests that we don't crash while setting selected children on the root inline box.
+ https://bugs.webkit.org/show_bug.cgi?id=47201
+
+ * editing/selection/root-inlinebox-selected-children-crash-expected.txt: Added.
+ * editing/selection/root-inlinebox-selected-children-crash.html: Added.
+
2010-10-07 Albert J. Wong <ajwong at chromium.org>
[Chromium] Unreviewed. Build fix.
diff --git a/LayoutTests/editing/selection/root-inlinebox-selected-children-crash-expected.txt b/LayoutTests/editing/selection/root-inlinebox-selected-children-crash-expected.txt
new file mode 100644
index 0000000..e2f785e
--- /dev/null
+++ b/LayoutTests/editing/selection/root-inlinebox-selected-children-crash-expected.txt
@@ -0,0 +1,2 @@
+Test passes if it does not crash.
+PASS
diff --git a/LayoutTests/editing/selection/root-inlinebox-selected-children-crash.html b/LayoutTests/editing/selection/root-inlinebox-selected-children-crash.html
new file mode 100644
index 0000000..2319d86
--- /dev/null
+++ b/LayoutTests/editing/selection/root-inlinebox-selected-children-crash.html
@@ -0,0 +1,19 @@
+<html>
+ <junk>
+ <blockquote>
+ Test passes if it does not crash.
+ <junk id="start">
+ </junk>
+ </blockquote>
+ <junk id="end">
+ PASS
+ </junk>
+ </junk>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ window.getSelection().setBaseAndExtent(start, 0, end, 0);
+ </script>
+</html>
+
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3d57e3f..2e48b8d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-07 Abhishek Arya <inferno at chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Set the m_selectedChildren flag on the root inline box if one of the leaf
+ inline box from the bidi runs walk has a selection state. Remove the flag
+ setting logic from addToLine, since line boxes created in createLinesBoxes
+ should not be propagating selection state to root inline box.
+ https://bugs.webkit.org/show_bug.cgi?id=47201
+
+ Test: editing/selection/root-inlinebox-selected-children-crash.html
+
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::addToLine):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlock::constructLine):
+
2010-10-07 Benjamin Otte <otte at gnome.org>
Reviewed by Martin Robinson.
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index cb01c5f..fead06d 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -83,8 +83,6 @@ void InlineFlowBox::addToLine(InlineBox* child)
child->setIsVertical(m_isVertical);
if (child->isText())
m_hasTextChildren = true;
- if (child->renderer()->selectionState() != RenderObject::SelectionNone)
- root()->setHasSelectedChildren(true);
checkConsistency();
}
diff --git a/WebCore/rendering/RenderBlockLineLayout.cpp b/WebCore/rendering/RenderBlockLineLayout.cpp
index b2acbb6..95625df 100644
--- a/WebCore/rendering/RenderBlockLineLayout.cpp
+++ b/WebCore/rendering/RenderBlockLineLayout.cpp
@@ -238,6 +238,7 @@ RootInlineBox* RenderBlock::constructLine(unsigned runCount, BidiRun* firstRun,
{
ASSERT(firstRun);
+ bool rootHasSelectedChildren = false;
InlineFlowBox* parentBox = 0;
for (BidiRun* r = firstRun; r; r = r->next()) {
// Create a box for our object.
@@ -252,6 +253,9 @@ RootInlineBox* RenderBlock::constructLine(unsigned runCount, BidiRun* firstRun,
if (!box)
continue;
+ if (!rootHasSelectedChildren && box->renderer()->selectionState() != RenderObject::SelectionNone)
+ rootHasSelectedChildren = true;
+
// If we have no parent box yet, or if the run is not simply a sibling,
// then we need to construct inline boxes as necessary to properly enclose the
// run's inline box.
@@ -279,6 +283,11 @@ RootInlineBox* RenderBlock::constructLine(unsigned runCount, BidiRun* firstRun,
// be the last continuation of our line list.
ASSERT(lastLineBox() && !lastLineBox()->isConstructed());
+ // Set the m_selectedChildren flag on the root inline box if one of the leaf inline box
+ // from the bidi runs walk above has a selection state.
+ if (rootHasSelectedChildren)
+ lastLineBox()->root()->setHasSelectedChildren(true);
+
// Set bits on our inline flow boxes that indicate which sides should
// paint borders/margins/padding. This knowledge will ultimately be used when
// we determine the horizontal positions and widths of all the inline boxes on
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list