[Webkit-unassigned] [Bug 192495] New: getBoundingClientRect() returns wrong size when started before a br tag.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 7 03:42:27 PST 2018


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

            Bug ID: 192495
           Summary: getBoundingClientRect() returns wrong size when
                    started before a br tag.
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: giosia at google.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Created attachment 356797

  --> https://bugs.webkit.org/attachment.cgi?id=356797&action=review

Calculating the height of Range that is adjacent to a break is incorrect in WebKit.

Calculating the height of Range that includes a <br> often returns incorrect sizes. This seems to happen when the start of the range is a node that is a sibling of a <br> that is included in the range.

<div>ABCDEFGHI</div>
range(CD), height = 18
range(CDEFG), height = 18

<div>ABC<br>DEF<br>GHI</div>
range(CD), height = 18 (Should be 34)
range(CDEFG), height = 34 (Should be 50)


WORKAROUND: Don't allow startContainer of a range to be siblings of <br> nodes by wrapping the start text in a span.

<div><span>ABC</span><br>DEF<br>GHI</div>
range(CD), height = 34
range(CDEFG), height = 50

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181207/24894ff4/attachment.html>


More information about the webkit-unassigned mailing list