Title: [192103] trunk
- Revision
- 192103
- Author
- [email protected]
- Date
- 2015-11-06 08:25:50 -0800 (Fri, 06 Nov 2015)
Log Message
Layout Test accessibility/win/linked-elements.html is crashing on win debug
https://bugs.webkit.org/show_bug.cgi?id=150944
Reviewed by Chris Fleizach.
Source/WebCore:
Be more precise ASSERTing on textUnderElement, only checking that the render
tree is stable before using TextIteraror when in 'IncludeAllChildren' mode.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
LayoutTests:
Removed accessibility/win/linked-elements.html crashing expectation.
* platform/win/TestExpectations: Removed crashing expectation.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (192102 => 192103)
--- trunk/LayoutTests/ChangeLog 2015-11-06 14:51:48 UTC (rev 192102)
+++ trunk/LayoutTests/ChangeLog 2015-11-06 16:25:50 UTC (rev 192103)
@@ -1,3 +1,14 @@
+2015-11-06 Mario Sanchez Prada <[email protected]>
+
+ Layout Test accessibility/win/linked-elements.html is crashing on win debug
+ https://bugs.webkit.org/show_bug.cgi?id=150944
+
+ Reviewed by Chris Fleizach.
+
+ Removed accessibility/win/linked-elements.html crashing expectation.
+
+ * platform/win/TestExpectations: Removed crashing expectation.
+
2015-11-05 Sukolsak Sakshuwong <[email protected]>
Layout Test js/intl-collator.html is crashing on win 7 debug
Modified: trunk/LayoutTests/platform/win/TestExpectations (192102 => 192103)
--- trunk/LayoutTests/platform/win/TestExpectations 2015-11-06 14:51:48 UTC (rev 192102)
+++ trunk/LayoutTests/platform/win/TestExpectations 2015-11-06 16:25:50 UTC (rev 192103)
@@ -3305,8 +3305,6 @@
webkit.org/b/147933 streams/reference-implementation/writable-stream-abort.html [ Pass Failure ]
-webkit.org/b/150944 [ Debug ] accessibility/win/linked-elements.html [ Crash ]
-
webkit.org/b/150946 [ Debug ] scrollbars/custom-scrollbar-appearance-property.html [ Crash ]
webkit.org/b/150948 [ Debug ] imported/blink/transitions/unprefixed-transform.html [ Pass Failure ]
Modified: trunk/Source/WebCore/ChangeLog (192102 => 192103)
--- trunk/Source/WebCore/ChangeLog 2015-11-06 14:51:48 UTC (rev 192102)
+++ trunk/Source/WebCore/ChangeLog 2015-11-06 16:25:50 UTC (rev 192103)
@@ -1,3 +1,16 @@
+2015-11-06 Mario Sanchez Prada <[email protected]>
+
+ Layout Test accessibility/win/linked-elements.html is crashing on win debug
+ https://bugs.webkit.org/show_bug.cgi?id=150944
+
+ Reviewed by Chris Fleizach.
+
+ Be more precise ASSERTing on textUnderElement, only checking that the render
+ tree is stable before using TextIteraror when in 'IncludeAllChildren' mode.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::textUnderElement):
+
2015-11-06 Carlos Garcia Campos <[email protected]>
[GStreamer] Use MainThreadNotifier to send notifications to main thread in WebKitWebSourceGStreamer
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (192102 => 192103)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2015-11-06 14:51:48 UTC (rev 192102)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2015-11-06 16:25:50 UTC (rev 192103)
@@ -632,10 +632,12 @@
if (m_renderer->isBR())
return ASCIILiteral("\n");
+ bool isRenderText = is<RenderText>(*m_renderer);
+
#if ENABLE(MATHML)
// Math operators create RenderText nodes on the fly that are not tied into the DOM in a reasonable way,
// so rangeOfContents does not work for them (nor does regular text selection).
- if (is<RenderText>(*m_renderer) && m_renderer->isAnonymous() && ancestorsOfType<RenderMathMLOperator>(*m_renderer).first())
+ if (isRenderText && m_renderer->isAnonymous() && ancestorsOfType<RenderMathMLOperator>(*m_renderer).first())
return downcast<RenderText>(*m_renderer).text();
if (is<RenderMathMLOperator>(*m_renderer) && !m_renderer->isAnonymous())
return downcast<RenderMathMLOperator>(*m_renderer).element().textContent();
@@ -647,7 +649,8 @@
// We use a text iterator for text objects AND for those cases where we are
// explicitly asking for the full text under a given element.
- if (is<RenderText>(*m_renderer) || mode.childrenInclusion == AccessibilityTextUnderElementMode::TextUnderElementModeIncludeAllChildren) {
+ bool shouldIncludeAllChildren = mode.childrenInclusion == AccessibilityTextUnderElementMode::TextUnderElementModeIncludeAllChildren;
+ if (isRenderText || shouldIncludeAllChildren) {
// If possible, use a text iterator to get the text, so that whitespace
// is handled consistently.
Document* nodeDocument = nullptr;
@@ -687,11 +690,10 @@
if (frame->document() != nodeDocument)
return String();
- // The render tree should be stable before going ahead. Otherwise, further uses of the
- // TextIterator will force a layout update, potentially altering the accessibility tree
- // and leading to crashes in the loop that computes the result text from the children.
- ASSERT(!nodeDocument->renderView()->layoutState());
- ASSERT(!nodeDocument->childNeedsStyleRecalc());
+ // The tree should be stable before looking through the children of a non-Render Text object.
+ // Otherwise, further uses of TextIterator will force a layout update, potentially altering
+ // the accessibility tree and causing crashes in the loop that computes the result text.
+ ASSERT((isRenderText || !shouldIncludeAllChildren) || (!nodeDocument->renderView()->layoutState() && !nodeDocument->childNeedsStyleRecalc()));
return plainText(textRange.get(), textIteratorBehaviorForTextRange());
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes