[Webkit-unassigned] [Bug 112275] New: plainText() call in TextIterator does not strip <br>

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 13 12:05:15 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=112275

           Summary: plainText() call in TextIterator does not strip <br>
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Text
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: aurimas at chromium.org
                CC: rniwa at webkit.org


The shadow tree for an input element that is empty is:
<div></div>
Once a user enters character "a", the shadow tree element becomes:
<div>"a"</div>
Once the user deletes that character, the shadow tree element becomes:
<div><br>""</div>

The call below to plainText returns "\n" after adding and deleting a character:

Node* node = document()->frame()->selection()->selection().rootEditableElement();       
plainText(rangeOfContents(node).get());

This is incorrect as the field is actually empty and <br> is there just to keep input element's <div> from collapsing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list