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.
Created attachment 181330 [details] Original repro case
Regressed in <http://trac.webkit.org/changeset/133351>.
Looking into this now.
Created attachment 181577 [details] Patch
Comment on attachment 181577 [details] Patch LGTM.
LGTM!
You may want to merge this into m25 given it's super low risk and high return.
Comment on attachment 181577 [details] Patch Clearing flags on attachment: 181577 Committed r139013: <http://trac.webkit.org/changeset/139013>
All reviewed patches have been landed. Closing bug.
This patch caused a build failure on Windows: http://build.webkit.org/builders/Apple%20Win%20Debug%20%28Build%29/builds/60388/steps/compile-webkit/logs/stdio 7>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification 7>WebCore.lib(RenderRegionSet.obj) : error LNK2005: "public: virtual int __thiscall WebCore::RenderBox::pixelSnappedOffsetWidth(void)const " (?pixelSnappedOffsetWidth@RenderBox@WebCore@@UBEHXZ) already defined in WebCore.lib(RenderingAllInOne.obj) 7>WebCore.lib(RenderRegionSet.obj) : error LNK2005: "public: virtual int __thiscall WebCore::RenderBox::pixelSnappedOffsetHeight(void)const " (?pixelSnappedOffsetHeight@RenderBox@WebCore@@UBEHXZ) already defined in WebCore.lib(RenderingAllInOne.obj) 7>WebCore.lib(MathMLInlineContainerElement.obj) : error LNK2005: "public: virtual int __thiscall WebCore::RenderBox::pixelSnappedOffsetWidth(void)const " (?pixelSnappedOffsetWidth@RenderBox@WebCore@@UBEHXZ) already defined in WebCore.lib(RenderingAllInOne.obj) 7>WebCore.lib(MathMLInlineContainerElement.obj) : error LNK2005: "public: virtual int __thiscall WebCore::RenderBox::pixelSnappedOffsetHeight(void)const " (?pixelSnappedOffsetHeight@RenderBox@WebCore@@UBEHXZ) already defined in WebCore.lib(RenderingAllInOne.obj) 7> Creating library C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\lib\WebKit.lib and object C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\lib\WebKit.exp 7>C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\bin\WebKit.dll : fatal error LNK1169: one or more multiply defined symbols found 7>Build log was saved at "file://C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\obj\WebKitLib\BuildLog.htm" It's probably a dependency problem though because I don't see RenderBox.cpp being recompiled.