Bug 91521 - Contained div with right 0 sometimes overlaps parent div
Summary: Contained div with right 0 sometimes overlaps parent div
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Emil A Eklund
URL: http://jsfiddle.net/7RUWQ/
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 10:43 PDT by Andrew Bachmann
Modified: 2012-07-31 16:31 PDT (History)
5 users (show)

See Also:


Attachments
a button showing the effect (1.71 KB, image/png)
2012-07-20 13:07 PDT, Andrew Bachmann
no flags Details
200 percent zoom (4.36 KB, image/png)
2012-07-23 13:45 PDT, Andrew Bachmann
no flags Details
minimal test case (835 bytes, text/html)
2012-07-25 09:40 PDT, Emil A Eklund
no flags Details
Patch (79.26 KB, patch)
2012-07-26 11:28 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bachmann 2012-07-17 10:43:07 PDT
When viewing the attached URL at various zoom levels, the display changes and sometimes the right hand top of the button loses its border.

The attached image shows the effect in Chrome 22.0.1209.0 (146837) using WebKit 537.1 (@122718)

This manifests in our application with no zoom on some buttons but not other buttons.  It was first experienced in Chrome 21.0.1180.41 (Official Build 146467) beta using WebKit 537.1 (@122379)

It works okay in Chrome 20.0.1132.43 (Official Build 143823) beta using WebKit 536.11 (@121111)

Guess: subpixel rendering issue?

Bug 90097 looks relevant but the fix for that didn't fix this.
Comment 1 Andrew Bachmann 2012-07-17 10:50:24 PDT
May be related to or same as bug 90281.

Reproduced on latest Chrome "nightly":

Chrome 22.0.1210.0 (Developer Build 146999)
WebKit	537.1 (@122833)
Comment 2 Emil A Eklund 2012-07-18 12:17:58 PDT
Did you forget to attach an image?
Comment 3 Andrew Bachmann 2012-07-20 13:07:59 PDT
Created attachment 153577 [details]
a button showing the effect

Attaching image of button showing the top right corner being clipped off. (in chrome, from jsfiddle linked in bug)
Comment 4 Emil A Eklund 2012-07-20 15:26:57 PDT
I can reproduce this in 21.0.1180.49 but not a recent trunk build (22.0.1213.0) which makes me think one of the recent changes might have fixed this. Could you pelase retest on 22.0.1213 or later?

Thanks!
Comment 5 Andrew Bachmann 2012-07-23 13:45:30 PDT
Created attachment 153854 [details]
200 percent zoom
Comment 6 Andrew Bachmann 2012-07-23 13:46:14 PDT
Reproduced it at 110%,125% zoom level in this build:

Chromium	22.0.1216.0 (Developer Build 147907)
OS	Linux
WebKit	537.2 (@123338)
JavaScript	V8 3.12.14

Also at higher zoom levels such as 200% it is broken although less obviously so.  See attachement where the right hand side goes from "2 pixel" wide to "1 pixel".
Comment 7 Emil A Eklund 2012-07-24 15:39:17 PDT
Thanks, I'll look into it.
Comment 8 Emil A Eklund 2012-07-25 09:40:44 PDT
Created attachment 154375 [details]
minimal test case

Seems to be caused by the right: 0; rule, likely related to bug 89519.
Comment 9 Emil A Eklund 2012-07-26 11:28:24 PDT
Created attachment 154697 [details]
Patch
Comment 10 Levi Weintraub 2012-07-26 11:30:33 PDT
Comment on attachment 154697 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154697&action=review

> Source/WebCore/rendering/RenderBox.h:205
> +    LayoutUnit clientLogicalWidth() const { return style()->isHorizontalWritingMode() ? clientWidth() : clientHeight(); }
> +    LayoutUnit clientLogicalHeight() const { return style()->isHorizontalWritingMode() ? clientHeight() : clientWidth(); }

I'm sad this went uncaught for so long!
Comment 11 Eric Seidel (no email) 2012-07-26 11:38:50 PDT
Levi is a ninja.
Comment 12 WebKit Review Bot 2012-07-26 12:54:54 PDT
Comment on attachment 154697 [details]
Patch

Clearing flags on attachment: 154697

Committed r123782: <http://trac.webkit.org/changeset/123782>
Comment 13 WebKit Review Bot 2012-07-26 12:54:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Andrew Bachmann 2012-07-31 15:56:12 PDT
I have verified this as fixed for us in the nightly chromium build:

Chromium: 22.0.1223.0 (Developer Build 149222)
OS	Linux
WebKit	537.3 (@124188)
JavaScript	V8 3.12.18

Thanks for the fast turnaround!
Comment 15 Emil A Eklund 2012-07-31 16:31:13 PDT
(In reply to comment #14)
> I have verified this as fixed for us in the nightly chromium build:
> 
Great, thanks for verifying.