Title: [157436] trunk
Revision
157436
Author
[email protected]
Date
2013-10-14 17:38:10 -0700 (Mon, 14 Oct 2013)

Log Message

Source/WebCore: AX: fieldset should have GroupRole and legend should be description.
https://bugs.webkit.org/show_bug.cgi?id=122534

Patch by Samuel White <[email protected]> on 2013-10-14
Reviewed by Chris Fleizach.

Changes fieldset to derive AXDescription from legend if one is available. Added
convenience method to AccessibilityObject to fetch element if available.

Test: accessibility/fieldset-element.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::alternativeText):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::element):
(WebCore::AccessibilityObject::isARIAHidden):
(WebCore::AccessibilityObject::isDOMHidden):
(WebCore::AccessibilityObject::defaultObjectInclusion):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isHidden):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::getAttribute):
(WebCore::AccessibilitySlider::valueForRange):
(WebCore::AccessibilitySlider::maxValueForRange):
(WebCore::AccessibilitySlider::minValueForRange):
(WebCore::AccessibilitySlider::setValue):
(WebCore::AccessibilitySlider::inputElement):
* accessibility/AccessibilitySlider.h:
* accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFieldSetElement.h:

LayoutTests: Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
https://bugs.webkit.org/show_bug.cgi?id=122776

Reviewed by Darin Adler.

* fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt: Added.
* fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (157435 => 157436)


--- trunk/LayoutTests/ChangeLog	2013-10-15 00:35:36 UTC (rev 157435)
+++ trunk/LayoutTests/ChangeLog	2013-10-15 00:38:10 UTC (rev 157436)
@@ -1,3 +1,13 @@
+2013-10-14  Ryosuke Niwa  <[email protected]>
+
+        Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
+        https://bugs.webkit.org/show_bug.cgi?id=122776
+
+        Reviewed by Darin Adler.
+
+        * fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt: Added.
+        * fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html: Added.
+
 2013-10-14  Samuel White  <[email protected]>
 
         AX: fieldset should have GroupRole and legend should be description.

Added: trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt (0 => 157436)


--- trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt	2013-10-15 00:38:10 UTC (rev 157436)
@@ -0,0 +1 @@
+Test passes if there is no crash.

Added: trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html (0 => 157436)


--- trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html	2013-10-15 00:38:10 UTC (rev 157436)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<body dir='rtl'>
+<div style='-webkit-rtl-ordering: visual;'><li><span style="margin: 2000;"> Test passes if there is no crash.
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (157435 => 157436)


--- trunk/Source/WebCore/ChangeLog	2013-10-15 00:35:36 UTC (rev 157435)
+++ trunk/Source/WebCore/ChangeLog	2013-10-15 00:38:10 UTC (rev 157436)
@@ -42,6 +42,37 @@
 
 2013-10-14  Ryosuke Niwa  <[email protected]>
 
+        Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
+        https://bugs.webkit.org/show_bug.cgi?id=122776
+
+        Reviewed by Darin Adler.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/aca89bc4d984705a1f94b623dae0ab03e239a248
+
+        Fix modification of whitespace endpoints to not assume it's operating on RenderTexts
+
+        During line layout, we use midpoints to identify RenderObjects, or parts of
+        RenderObjects, that don't need InlineBoxes, usually because of collapsed whitespace.
+
+        Prior to actually creating BidiRuns (the precursor to InlineBoxes), we use
+        checkMidpoints to fix up our lineMidpointState to handle the case where we start
+        ignoring spaces in our line, but don't stop until somewhere on the following line.
+        Previously, this function assumed that the final midpoint (called an endpoint)
+        was a RenderText, but this assumption is wrong if we have a beginning midpoint
+        created by shouldSkipWhitespaceAfterStartObject (which handles inlines and list
+        markers) and no endpoint on that line. In that case, we'd instead adjust the
+        position backwards on the beginning midpoint, which would cause us to fail to
+        create an InlineBox for the inline or list marker. In the new test added, this
+        would actually trigger a crash due to an assumption when visually re-ordering
+        BidiRuns that a non-empty line would actually contain at least one such run.
+
+        Test: fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::checkMidpoints):
+
+2013-10-14  Ryosuke Niwa  <[email protected]>
+
         Assertion failure in Range::processContentsBetweenOffsets
         https://bugs.webkit.org/show_bug.cgi?id=122777
 

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (157435 => 157436)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-10-15 00:35:36 UTC (rev 157435)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-10-15 00:38:10 UTC (rev 157436)
@@ -207,7 +207,7 @@
         if (currpoint == lBreak) {
             // We hit the line break before the start point.  Shave off the start point.
             lineMidpointState.numMidpoints--;
-            if (endpoint.m_obj->style()->collapseWhiteSpace())
+            if (endpoint.m_obj->style()->collapseWhiteSpace() && endpoint.m_obj->isText())
                 endpoint.m_pos--;
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to