Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: Source/WebCore/accessibility/AccessibilityRenderObject.cpp

Issue 7948002: Merge 94864 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/accessibility/AccessibilityRenderObject.cpp
===================================================================
--- Source/WebCore/accessibility/AccessibilityRenderObject.cpp (revision 95430)
+++ Source/WebCore/accessibility/AccessibilityRenderObject.cpp (working copy)
@@ -305,8 +305,12 @@
// Case 2: Anonymous block parent of the end of a continuation - skip all the way to before
// the parent of the start, since everything in between will be linked up via the continuation.
- else if (m_renderer->isAnonymousBlock() && firstChildIsInlineContinuation(m_renderer))
- previousSibling = startOfContinuations(m_renderer->firstChild())->parent()->previousSibling();
+ else if (m_renderer->isAnonymousBlock() && firstChildIsInlineContinuation(m_renderer)) {
+ RenderObject* firstParent = startOfContinuations(m_renderer->firstChild())->parent();
+ while (firstChildIsInlineContinuation(firstParent))
+ firstParent = startOfContinuations(firstParent->firstChild())->parent();
+ previousSibling = firstParent->previousSibling();
+ }
// Case 3: The node has an actual previous sibling
else if (RenderObject* ps = m_renderer->previousSibling())
@@ -343,8 +347,12 @@
// Case 2: Anonymous block parent of the start of a continuation - skip all the way to
// after the parent of the end, since everything in between will be linked up via the continuation.
- else if (m_renderer->isAnonymousBlock() && lastChildHasContinuation(m_renderer))
- nextSibling = endOfContinuations(m_renderer->lastChild())->parent()->nextSibling();
+ else if (m_renderer->isAnonymousBlock() && lastChildHasContinuation(m_renderer)) {
+ RenderObject* lastParent = endOfContinuations(m_renderer->lastChild())->parent();
+ while (lastChildHasContinuation(lastParent))
+ lastParent = endOfContinuations(lastParent->lastChild())->parent();
+ nextSibling = lastParent->nextSibling();
+ }
// Case 3: node has an actual next sibling
else if (RenderObject* ns = m_renderer->nextSibling())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698