[Webkit-unassigned] [Bug 106107] New: REGRESSION: el.offsetWidth < el.clientWidth for elements of a certain size

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 4 10:37:32 PST 2013


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

           Summary: REGRESSION: el.offsetWidth < el.clientWidth for
                    elements of a certain size
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bradavogel at gmail.com


Repro:
1) Run the attached file in Chrome 21 or later, or Webkit Nightly.

Actual Result:
You will see the alert "BUG: offsetWidth is smaller than clientWidth".

Expected Result:
You will see the alert "NO BUG: unable to repro"

Tested in:
Firefox 17.0.1: PASS
Chrome 20: PASS
Safari 6.0.2 (7536.26.17): PASS
Chrome 21: FAIL
Chrome Canary 26.0.1374.1: FAIL
Webkit Nightly Version 6.0.2 (7536.26.17, 537+): FAIL

Notes:
Per the W3C spec, offsetWidth should never be smaller than clientWidth.

If you change the attached repro case to use "margin: 1.2em" instead of "margin: 1.1em", it will not repro the bug.

Impact:
This breaks scripts that use the following code to check if an element is scrollable:
    var isScrollable = el.offsetWidth < el.scrollWidth;
because if the bug is reproducing, offsetWidth will be smaller than clientWidth, but scrollWidth will equal clientWidth.

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