Diff
Modified: trunk/LayoutTests/ChangeLog (121932 => 121933)
--- trunk/LayoutTests/ChangeLog 2012-07-06 01:24:38 UTC (rev 121932)
+++ trunk/LayoutTests/ChangeLog 2012-07-06 01:27:35 UTC (rev 121933)
@@ -1,3 +1,15 @@
+2012-07-05 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r121921.
+ http://trac.webkit.org/changeset/121921
+ https://bugs.webkit.org/show_bug.cgi?id=90648
+
+ caused hundreds of crashes on Mac (Requested by pizlo on
+ #webkit).
+
+ * platform/chromium/editing/surrounding-text/surrounding-text-expected.txt:
+ * platform/chromium/editing/surrounding-text/surrounding-text.html:
+
2012-07-05 Hayato Ito <hay...@chromium.org>
[Crash] Click an element which will be 'display: none' on focus.
Modified: trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text-expected.txt (121932 => 121933)
--- trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text-expected.txt 2012-07-06 01:24:38 UTC (rev 121932)
+++ trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text-expected.txt 2012-07-06 01:27:35 UTC (rev 121933)
@@ -15,7 +15,6 @@
PASS surroundingText('<button>.</button><div id="here">012345678901234567890123456789</div><button>.</button>', 15, 12) is "901234567890"
PASS surroundingText('<option>.</option>12345<button id="here">test</button><option>.</option>', 0, 100) is ""
PASS surroundingText('<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>', 0, 100) is ""
-PASS surroundingText('<p id="here">.', 0, 2) is "."
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text.html (121932 => 121933)
--- trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text.html 2012-07-06 01:24:38 UTC (rev 121932)
+++ trunk/LayoutTests/platform/chromium/editing/surrounding-text/surrounding-text.html 2012-07-06 01:27:35 UTC (rev 121933)
@@ -40,7 +40,6 @@
shouldBeEqualToString('surroundingText(\'<button>.</button><div id="here">012345678901234567890123456789</div><button>.</button>\', 15, 12)', '901234567890');
shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button id="here">test</button><option>.</option>\', 0, 100)', '');
shouldBeEqualToString('surroundingText(\'<option>.</option>12345<button>te<span id="here">st</span></button><option>.</option>\', 0, 100)', '');
- shouldBeEqualToString('surroundingText(\'<p id="here">.\', 0, 2)', '.');
document.body.removeChild(document.getElementById('test'));
finishJSTest();
Modified: trunk/Source/WebCore/ChangeLog (121932 => 121933)
--- trunk/Source/WebCore/ChangeLog 2012-07-06 01:24:38 UTC (rev 121932)
+++ trunk/Source/WebCore/ChangeLog 2012-07-06 01:27:35 UTC (rev 121933)
@@ -1,3 +1,18 @@
+2012-07-05 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r121921.
+ http://trac.webkit.org/changeset/121921
+ https://bugs.webkit.org/show_bug.cgi?id=90648
+
+ caused hundreds of crashes on Mac (Requested by pizlo on
+ #webkit).
+
+ * editing/SurroundingText.cpp:
+ (WebCore::SurroundingText::SurroundingText):
+ * editing/TextIterator.cpp:
+ (WebCore::CharacterIterator::advance):
+ (WebCore::BackwardsCharacterIterator::advance):
+
2012-07-05 Anders Carlsson <ander...@apple.com>
Type-ahead doesn't work in options inside optgroups
Modified: trunk/Source/WebCore/editing/SurroundingText.cpp (121932 => 121933)
--- trunk/Source/WebCore/editing/SurroundingText.cpp 2012-07-06 01:24:38 UTC (rev 121932)
+++ trunk/Source/WebCore/editing/SurroundingText.cpp 2012-07-06 01:27:35 UTC (rev 121933)
@@ -45,8 +45,7 @@
{
const unsigned halfMaxLength = maxLength / 2;
CharacterIterator forwardIterator(makeRange(visiblePosition, endOfDocument(visiblePosition)).get(), TextIteratorStopsOnFormControls);
- if (!forwardIterator.atEnd())
- forwardIterator.advance(maxLength - halfMaxLength);
+ forwardIterator.advance(maxLength - halfMaxLength);
Position position = visiblePosition.deepEquivalent().parentAnchoredEquivalent();
Document* document = position.document();
@@ -54,8 +53,7 @@
return;
BackwardsCharacterIterator backwardsIterator(makeRange(startOfDocument(visiblePosition), visiblePosition).get(), TextIteratorStopsOnFormControls);
- if (!backwardsIterator.atEnd())
- backwardsIterator.advance(halfMaxLength);
+ backwardsIterator.advance(halfMaxLength);
m_positionOffsetInContent = Range::create(document, backwardsIterator.range()->endPosition(), position)->text().length();
m_contentRange = Range::create(document, backwardsIterator.range()->endPosition(), forwardIterator.range()->startPosition());
Modified: trunk/Source/WebCore/editing/TextIterator.cpp (121932 => 121933)
--- trunk/Source/WebCore/editing/TextIterator.cpp 2012-07-06 01:24:38 UTC (rev 121932)
+++ trunk/Source/WebCore/editing/TextIterator.cpp 2012-07-06 01:27:35 UTC (rev 121933)
@@ -1406,8 +1406,6 @@
void CharacterIterator::advance(int count)
{
- ASSERT(!atEnd());
-
if (count <= 0) {
ASSERT(count == 0);
return;
@@ -1516,8 +1514,6 @@
void BackwardsCharacterIterator::advance(int count)
{
- ASSERT(!atEnd());
-
if (count <= 0) {
ASSERT(!count);
return;