<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[167210] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/167210">167210</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2014-04-13 23:55:15 -0700 (Sun, 13 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/158617">r158617</a>): Find on Page can get stuck in a loop when the search string occurs in an &lt;input&gt; in a &lt;fieldset&gt;
https://bugs.webkit.org/show_bug.cgi?id=126322

Reviewed by Ryosuke Niwa.

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::canContainRangeEndPoint): Now returns false when the role of the element
is &quot;img&quot;. This is the same rule that's hard-coded in isRenderReplacedElement for the same
reason. Need more test coverage to make sure this role feature works consistently.

* dom/Element.h: Made canContainRangeEndPoint no longer inline since it's not just a
return statement any more.

* dom/Position.cpp:
(WebCore::Position::isCandidate): Took out code that calls isRendererReplacedElement
that was added in <a href="http://trac.webkit.org/projects/webkit/changeset/158617">r158617</a>; not needed now that we updated canContainRangeEndPoint.

* dom/Range.cpp:
(WebCore::Range::firstNode): Removed code here that called isRendererReplacedElement.
This was the wrong level to be adding editing logic, and there's a FIXME here to that
effect, which we are now deleting. This was the change that broke Find.

* editing/TextIterator.cpp: Added a comment about the redundancy between the
isRendererReplacedElement and editingIgnoresContent functions.

* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::canContainRangeEndPoint): Call through to base class instead
of just returning true when we have child nodes. Lets Element::canContainRangeEndPoint
do its thing.
* html/HTMLHRElement.h: Ditto.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to base class instead
of just returning true when we have fallback content. Lets Element::canContainRangeEndPoint
do its thing.
* html/HTMLObjectElement.h: Ditto.

* testing/Internals.cpp:
(WebCore::Internals::countMatchesForText): Set the limit to 1000 instead of infinite.

LayoutTests:

* editing/text-iterator/count-matches-in-form-expected.txt: Added.
* editing/text-iterator/count-matches-in-form.html: Added.

* fast/text/window-find.html: Tweaked the test a bit, making it a little easier to
see if the test hasn't even run.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasttextwindowfindhtml">trunk/LayoutTests/fast/text/window-find.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomPositioncpp">trunk/Source/WebCore/dom/Position.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorcpp">trunk/Source/WebCore/editing/TextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLHRElementcpp">trunk/Source/WebCore/html/HTMLHRElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLHRElementh">trunk/Source/WebCore/html/HTMLHRElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementcpp">trunk/Source/WebCore/html/HTMLObjectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLObjectElementh">trunk/Source/WebCore/html/HTMLObjectElement.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditingtextiteratorcountmatchesinformexpectedtxt">trunk/LayoutTests/editing/text-iterator/count-matches-in-form-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingtextiteratorcountmatchesinformhtml">trunk/LayoutTests/editing/text-iterator/count-matches-in-form.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/LayoutTests/ChangeLog        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-04-13  Darin Adler  &lt;darin@apple.com&gt;
+
+        REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an &lt;input&gt; in a &lt;fieldset&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=126322
+
+        Reviewed by Ryosuke Niwa.
+
+        * editing/text-iterator/count-matches-in-form-expected.txt: Added.
+        * editing/text-iterator/count-matches-in-form.html: Added.
+
+        * fast/text/window-find.html: Tweaked the test a bit, making it a little easier to
+        see if the test hasn't even run.
+
</ins><span class="cx"> 2014-04-08  Oliver Hunt  &lt;oliver@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rewrite Function.bind as a builtin
</span></span></pre></div>
<a id="trunkLayoutTestseditingtextiteratorcountmatchesinformexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/text-iterator/count-matches-in-form-expected.txt (0 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/text-iterator/count-matches-in-form-expected.txt                                (rev 0)
+++ trunk/LayoutTests/editing/text-iterator/count-matches-in-form-expected.txt        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+PASS internals.countMatchesForText('rule', 23, '') is 1
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/editing/text-iterator/count-matches-in-form-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestseditingtextiteratorcountmatchesinformhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/text-iterator/count-matches-in-form.html (0 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/text-iterator/count-matches-in-form.html                                (rev 0)
+++ trunk/LayoutTests/editing/text-iterator/count-matches-in-form.html        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;fieldset&gt;&lt;input value=&quot;rule&quot;&gt;&lt;/fieldset&gt;
+&lt;script&gt;
+shouldBe(&quot;internals.countMatchesForText('rule', 23, '')&quot;, &quot;1&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/editing/text-iterator/count-matches-in-form.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfasttextwindowfindhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/text/window-find.html (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/window-find.html        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/LayoutTests/fast/text/window-find.html        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -1,50 +1,45 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-if (window.testRunner) {
-  testRunner.dumpAsText();
-  testRunner.waitUntilDone();
-}
</del><span class="cx"> 
</span><ins>+if (window.testRunner)
+    testRunner.dumpAsText();
+
</ins><span class="cx"> function fail(s) {
</span><del>-  document.body.innerHTML = &quot;FAIL: &quot; + s;
</del><ins>+    document.body.innerHTML = &quot;FAIL: &quot; + s;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function runTest() {
</span><del>-  // Need to force layout for window.find() to operate correctly.
-  var forceLayout = document.body.offsetHeight;
-  if (window.find('nonsense')) fail('found: nonsense');
-  // https://bugs.webkit.org/show_bug.cgi?id=53654 -- failure when flipping
-  // case sensitivity back-to-back.
-  if (window.find('nonsense', true)) fail('found: nonsense');
-  if (window.find('nonsense', false)) fail('found: nonsense');
-  if (!window.find('for')) fail('not found: for');
-  if (window.find('for')) fail('found: for');
-  // Go backwards.
-  if (!window.find('test', true, true, false)) fail('not found: test');
-  if (window.find('for', true, true, false)) fail('found: for');
-  // Backwards and case sensitivity.
-  if (window.find('this', true, true, false)) fail('found: this');
-  if (!window.find('This', true, true, false)) fail('not found: This');
-  // Wrap-around forwards.
-  if (!window.find('for', true, false, true)) fail('not found: for');
-  if (!window.find('for', true, false, true)) fail('not found: for');
-  // Wrap-around backwards.
-  if (!window.find('for', true, true, true)) fail('not found: for');
-  if (!window.find('for', true, true, true)) fail('not found: for');
-  // Case sensitivity, forwards.
-  if (!window.find('for', true, false, true)) fail('not found: for');
-  if (!window.find('fOR', false, false, true)) fail('not found: for');
-  if (!window.find('for', false, false, true)) fail('not found: for');
-  if (!window.find('for', true, false, true)) fail('not found: for');
-  if (window.find('FOR', true, false, true)) fail('found: FOR');
</del><ins>+    if (window.find('nonsense')) fail('found: nonsense');
+    if (window.find('nonsense', true)) fail('found: nonsense');
+    if (window.find('nonsense', false)) fail('found: nonsense');
+    if (!window.find('for')) fail('not found: for');
+    if (window.find('for')) fail('found: for');
+    // Go backwards.
+    if (!window.find('test', true, true, false)) fail('not found: test');
+    if (window.find('for', true, true, false)) fail('found: for');
+    // Backwards and case sensitivity.
+    if (window.find('this', true, true, false)) fail('found: this');
+    if (!window.find('This', true, true, false)) fail('not found: This');
+    // Wrap-around forwards.
+    if (!window.find('for', true, false, true)) fail('not found: for');
+    if (!window.find('for', true, false, true)) fail('not found: for');
+    // Wrap-around backwards.
+    if (!window.find('for', true, true, true)) fail('not found: for');
+    if (!window.find('for', true, true, true)) fail('not found: for');
+    // Case sensitivity, forwards.
+    if (!window.find('for', true, false, true)) fail('not found: for');
+    if (!window.find('fOR', false, false, true)) fail('not found: for');
+    if (!window.find('for', false, false, true)) fail('not found: for');
+    if (!window.find('for', true, false, true)) fail('not found: for');
+    if (window.find('FOR', true, false, true)) fail('found: FOR');
</ins><span class="cx"> 
</span><del>-  if (window.testRunner)
-    testRunner.notifyDone();
</del><ins>+    document.body.innerHTML = &quot;This is a test for window.find(). SUCCESS!&quot;;
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body onload=&quot;runTest()&quot;&gt;
</span><del>-This is a test for window.find(). SUCCESS!
</del><ins>+This is a test for window.find(); the test has not run yet.
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/ChangeLog        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2014-04-13  Darin Adler  &lt;darin@apple.com&gt;
+
+        REGRESSION (r158617): Find on Page can get stuck in a loop when the search string occurs in an &lt;input&gt; in a &lt;fieldset&gt;
+        https://bugs.webkit.org/show_bug.cgi?id=126322
+
+        Reviewed by Ryosuke Niwa.
+
+        * dom/Element.cpp:
+        (WebCore::Element::canContainRangeEndPoint): Now returns false when the role of the element
+        is &quot;img&quot;. This is the same rule that's hard-coded in isRenderReplacedElement for the same
+        reason. Need more test coverage to make sure this role feature works consistently.
+
+        * dom/Element.h: Made canContainRangeEndPoint no longer inline since it's not just a
+        return statement any more.
+
+        * dom/Position.cpp:
+        (WebCore::Position::isCandidate): Took out code that calls isRendererReplacedElement
+        that was added in r158617; not needed now that we updated canContainRangeEndPoint.
+
+        * dom/Range.cpp:
+        (WebCore::Range::firstNode): Removed code here that called isRendererReplacedElement.
+        This was the wrong level to be adding editing logic, and there's a FIXME here to that
+        effect, which we are now deleting. This was the change that broke Find.
+
+        * editing/TextIterator.cpp: Added a comment about the redundancy between the
+        isRendererReplacedElement and editingIgnoresContent functions.
+
+        * html/HTMLHRElement.cpp:
+        (WebCore::HTMLHRElement::canContainRangeEndPoint): Call through to base class instead
+        of just returning true when we have child nodes. Lets Element::canContainRangeEndPoint
+        do its thing.
+        * html/HTMLHRElement.h: Ditto.
+
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::canContainRangeEndPoint): Call through to base class instead
+        of just returning true when we have fallback content. Lets Element::canContainRangeEndPoint
+        do its thing.
+        * html/HTMLObjectElement.h: Ditto.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::countMatchesForText): Set the limit to 1000 instead of infinite.
+
</ins><span class="cx"> 2014-04-12  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use unique_ptr for FillLayer::m_next
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -1069,7 +1069,7 @@
</span><span class="cx">     // when iterating text.
</span><span class="cx">     return listItem-&gt;markerTextWithSuffix();
</span><span class="cx"> }
</span><del>-    
</del><ins>+
</ins><span class="cx"> String AccessibilityObject::stringForVisiblePositionRange(const VisiblePositionRange&amp; visiblePositionRange) const
</span><span class="cx"> {
</span><span class="cx">     if (visiblePositionRange.isNull())
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/dom/Element.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -2939,4 +2939,9 @@
</span><span class="cx">     ensureElementRareData().setHasPendingResources(false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool Element::canContainRangeEndPoint() const
+{
+    return !equalIgnoringCase(fastGetAttribute(roleAttr), &quot;img&quot;);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/dom/Element.h        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -484,7 +484,7 @@
</span><span class="cx">     virtual bool isFrameElementBase() const { return false; }
</span><span class="cx">     virtual bool isSearchFieldCancelButtonElement() const { return false; }
</span><span class="cx"> 
</span><del>-    virtual bool canContainRangeEndPoint() const override { return true; }
</del><ins>+    virtual bool canContainRangeEndPoint() const override;
</ins><span class="cx"> 
</span><span class="cx">     // Used for disabled form elements; if true, prevents mouse events from being dispatched
</span><span class="cx">     // to event listeners, and prevents DOMActivate events from being sent at all.
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/dom/Position.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -224,6 +224,7 @@
</span><span class="cx">             return positionInParentBeforeNode(m_anchorNode.get());
</span><span class="cx">         return Position(m_anchorNode.get(), 0, PositionIsOffsetInAnchor);
</span><span class="cx">     }
</span><ins>+
</ins><span class="cx">     if (!m_anchorNode-&gt;offsetInCharacters()
</span><span class="cx">         &amp;&amp; (m_anchorType == PositionIsAfterAnchor || m_anchorType == PositionIsAfterChildren || static_cast&lt;unsigned&gt;(m_offset) == m_anchorNode-&gt;childNodeCount())
</span><span class="cx">         &amp;&amp; (editingIgnoresContent(m_anchorNode.get()) || isRenderedTable(m_anchorNode.get()))
</span><span class="lines">@@ -935,9 +936,6 @@
</span><span class="cx">     if (m_anchorNode-&gt;hasTagName(htmlTag))
</span><span class="cx">         return false;
</span><span class="cx">         
</span><del>-    if (isRendererReplacedElement(renderer))
-        return !nodeIsUserSelectNone(deprecatedNode()) &amp;&amp; atFirstEditingPositionForNode();
-
</del><span class="cx">     if (renderer-&gt;isRenderBlockFlow()) {
</span><span class="cx">         RenderBlockFlow&amp; block = toRenderBlockFlow(*renderer);
</span><span class="cx">         if (block.logicalHeight() || m_anchorNode-&gt;hasTagName(bodyTag)) {
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/dom/Range.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -1570,10 +1570,6 @@
</span><span class="cx">         return 0;
</span><span class="cx">     if (m_start.container()-&gt;offsetInCharacters())
</span><span class="cx">         return m_start.container();
</span><del>-    // FIXME: A renderer-based rule is completely out of place here.
-    // For one thing, the renderer could be out of date if the DOM was recently changed.
-    if (isRendererReplacedElement(m_start.container()-&gt;renderer()))
-        return m_start.container();
</del><span class="cx">     if (Node* child = m_start.container()-&gt;childNode(m_start.offset()))
</span><span class="cx">         return child;
</span><span class="cx">     if (!m_start.offset())
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/editing/TextIterator.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -242,6 +242,8 @@
</span><span class="cx">     ASSERT(stack.size() == 1 + depthCrossingShadowBoundaries(node));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// FIXME: editingIgnoresContent and isRendererReplacedElement try to do the same job.
+// It's not good to have both of them.
</ins><span class="cx"> bool isRendererReplacedElement(RenderObject* renderer)
</span><span class="cx"> {
</span><span class="cx">     if (!renderer)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLHRElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLHRElement.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLHRElement.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/html/HTMLHRElement.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -100,4 +100,9 @@
</span><span class="cx">         HTMLElement::collectStyleForPresentationAttribute(name, value, style);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool HTMLHRElement::canContainRangeEndPoint() const
+{
+    return hasChildNodes() &amp;&amp; HTMLElement::canContainRangeEndPoint();
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLHRElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLHRElement.h (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLHRElement.h        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/html/HTMLHRElement.h        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -32,13 +32,12 @@
</span><span class="cx">     static PassRefPtr&lt;HTMLHRElement&gt; create(Document&amp;);
</span><span class="cx">     static PassRefPtr&lt;HTMLHRElement&gt; create(const QualifiedName&amp;, Document&amp;);
</span><span class="cx"> 
</span><del>-    virtual bool canContainRangeEndPoint() const override { return hasChildNodes(); }
-
</del><span class="cx"> private:
</span><span class="cx">     HTMLHRElement(const QualifiedName&amp;, Document&amp;);
</span><span class="cx"> 
</span><span class="cx">     virtual bool isPresentationAttribute(const QualifiedName&amp;) const override;
</span><span class="cx">     virtual void collectStyleForPresentationAttribute(const QualifiedName&amp;, const AtomicString&amp;, MutableStyleProperties&amp;) override;
</span><ins>+    virtual bool canContainRangeEndPoint() const override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLObjectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLObjectElement.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/html/HTMLObjectElement.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -511,4 +511,9 @@
</span><span class="cx">     return FormAssociatedElement::form();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool HTMLObjectElement::canContainRangeEndPoint() const
+{
+    return m_useFallbackContent &amp;&amp; HTMLPlugInImageElement::canContainRangeEndPoint();
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLObjectElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLObjectElement.h (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLObjectElement.h        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/html/HTMLObjectElement.h        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     virtual bool isEnumeratable() const override { return true; }
</span><span class="cx">     virtual bool appendFormData(FormDataList&amp;, bool) override;
</span><span class="cx"> 
</span><del>-    virtual bool canContainRangeEndPoint() const override { return useFallbackContent(); }
</del><ins>+    virtual bool canContainRangeEndPoint() const override;
</ins><span class="cx"> 
</span><span class="cx">     bool m_docNamedItem : 1;
</span><span class="cx">     bool m_useFallbackContent : 1;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (167209 => 167210)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2014-04-14 05:29:47 UTC (rev 167209)
+++ trunk/Source/WebCore/testing/Internals.cpp        2014-04-14 06:55:15 UTC (rev 167210)
</span><span class="lines">@@ -1435,7 +1435,7 @@
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     bool mark = markMatches == &quot;mark&quot;;
</span><del>-    return document-&gt;frame()-&gt;editor().countMatchesForText(text, nullptr, findOptions, std::numeric_limits&lt;unsigned&gt;::max(), mark, nullptr);
</del><ins>+    return document-&gt;frame()-&gt;editor().countMatchesForText(text, nullptr, findOptions, 1000, mark, nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const ProfilesArray&amp; Internals::consoleProfiles() const
</span></span></pre>
</div>
</div>

</body>
</html>