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 8036039: Merge 94864 - Source/WebCore: Assert being hit in AccessibilityRenderObject::addChildren() (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
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 | « LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt ('k') | 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 95992)
+++ Source/WebCore/accessibility/AccessibilityRenderObject.cpp (working copy)
@@ -304,8 +304,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())
@@ -342,8 +346,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 | « LayoutTests/platform/mac/accessibility/adjacent-continuations-cause-assertion-failure-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698