Skip to content
  • mario@webkit.org's avatar
    [GTK] Test /webkit/atk/getTextInParagraphAndBodyModerate fails · f47e59bc
    mario@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=105538
    
    Reviewed by Chris Fleizach.
    
    Source/WebCore:
    
    Expose '\n' for linebreaks when they were explicitly set by the
    author of the web content with a <br> tag.
    
    Tests: accessibility/paragraph-with-linebreaks.html
    
    * accessibility/AccessibilityNodeObject.cpp:
    (WebCore::shouldAddSpaceBeforeAppendingNextElement): Helper
    function to decide when to append spaces when building the text
    under an element, considering line breaks.
    (WebCore::AccessibilityNodeObject::textUnderElement): Use the
    shouldAddSpaceBeforeAppendingNextElement() function here.
    * accessibility/AccessibilityRenderObject.cpp:
    (WebCore::AccessibilityRenderObject::textUnderElement): Return the
    renderer's text for accessibility objects exposing <br> elements.
    * html/parser/HTMLParserIdioms.h:
    (WebCore::isHTMLSpaceButNotLineBreak): New helper function, useful
    to be passed to other functions like simplifyWhiteSpace().
    
    Tools:
    
    Unskip passing test getTextInParagraphAndBodyModerate.
    
    * Scripts/run-gtk-tests:
    (TestRunner): Unskip pasing test.
    
    LayoutTests:
    
    Added new Layout test and platform specific expectations.
    
    * platform/efl/accessibility/paragraph-with-linebreaks-expected.txt: Added.
    * platform/gtk/accessibility/paragraph-with-linebreaks-expected.txt: Added.
    * accessibility/paragraph-with-linebreaks.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f47e59bc