[Webkit-unassigned] [Bug 48110] New: getBoundingClientRect: loss of precision because of premature float-to-int truncation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 21 21:38:13 PDT 2010


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

           Summary: getBoundingClientRect: loss of precision because of
                    premature float-to-int truncation
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ctruta at chromium.org


I am exposing this bug using an SVG test case that I have at hand, but the code path that handles HTML elements makes the same kind of truncations.

Inside Element::getBoundingClientRect, the element's enclosing bounding box, scaled by the renderer's effective zoom factor (which is a float), is truncated to int, early on, then it enters a series of calculations. At the end of the function, the result is unscaled by multiplying with the inverse of the zoom factor, and truncated to int, yet again. This leads to unnecessary off-by-one errors (or even greater errors at very large .

I am opening this bug as the continuation of the work on getBoundingClientRect. See the bugs 42815, 46775.

-- 
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