Changeset 157436 in webkit


Ignore:
Timestamp:
Oct 14, 2013 5:38:10 PM (11 years ago)
Author:
rniwa@webkit.org
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 <Samuel White> 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.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r157434 r157436  
     12013-10-14  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
     4        https://bugs.webkit.org/show_bug.cgi?id=122776
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash-expected.txt: Added.
     9        * fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html: Added.
     10
    1112013-10-14  Samuel White  <samuel_white@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r157434 r157436  
    4040
    4141        * WebCore.vcxproj/WebCoreCommon.props:
     42
     432013-10-14  Ryosuke Niwa  <rniwa@webkit.org>
     44
     45        Crash in WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>::createBidiRunsForLine
     46        https://bugs.webkit.org/show_bug.cgi?id=122776
     47
     48        Reviewed by Darin Adler.
     49
     50        Merge https://chromium.googlesource.com/chromium/blink/+/aca89bc4d984705a1f94b623dae0ab03e239a248
     51
     52        Fix modification of whitespace endpoints to not assume it's operating on RenderTexts
     53
     54        During line layout, we use midpoints to identify RenderObjects, or parts of
     55        RenderObjects, that don't need InlineBoxes, usually because of collapsed whitespace.
     56
     57        Prior to actually creating BidiRuns (the precursor to InlineBoxes), we use
     58        checkMidpoints to fix up our lineMidpointState to handle the case where we start
     59        ignoring spaces in our line, but don't stop until somewhere on the following line.
     60        Previously, this function assumed that the final midpoint (called an endpoint)
     61        was a RenderText, but this assumption is wrong if we have a beginning midpoint
     62        created by shouldSkipWhitespaceAfterStartObject (which handles inlines and list
     63        markers) and no endpoint on that line. In that case, we'd instead adjust the
     64        position backwards on the beginning midpoint, which would cause us to fail to
     65        create an InlineBox for the inline or list marker. In the new test added, this
     66        would actually trigger a crash due to an assumption when visually re-ordering
     67        BidiRuns that a non-empty line would actually contain at least one such run.
     68
     69        Test: fast/text/whitespace/whitespace-and-margin-wrap-after-list-marker-crash.html
     70
     71        * rendering/RenderBlockLineLayout.cpp:
     72        (WebCore::checkMidpoints):
    4273
    43742013-10-14  Ryosuke Niwa  <rniwa@webkit.org>
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r157391 r157436  
    208208            // We hit the line break before the start point.  Shave off the start point.
    209209            lineMidpointState.numMidpoints--;
    210             if (endpoint.m_obj->style()->collapseWhiteSpace())
     210            if (endpoint.m_obj->style()->collapseWhiteSpace() && endpoint.m_obj->isText())
    211211                endpoint.m_pos--;
    212212        }
Note: See TracChangeset for help on using the changeset viewer.