Bug 111606

Summary: border-fit should happen at layout time rather than paint time
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Status: RESOLVED WONTFIX    
Severity: Normal CC: bfulgham, dino, eoconnor, eric, esprehn+autocc, jonlee, ntim, ojan.autocc, roger_fong, simon.fraser, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=229564
Attachments:
Description Flags
Patch koivisto: review+

Description Dave Hyatt 2013-03-06 11:30:57 PST
border-fit-adjust should happen at layout time rather than paint time. When the border-fit-adjusted box is right-aligned but contains left-aligned text, the paint time hack chops off the right side of the box correctly but then doesn't shift the smaller box to the right. We basically need to genuinely shrink the box during layout so that cases like this work.
Comment 1 Dave Hyatt 2013-03-07 09:52:27 PST
Created attachment 192024 [details]
Patch
Comment 2 Antti Koivisto 2013-03-07 10:35:06 PST
Comment on attachment 192024 [details]
Patch

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

r=me

> Source/WebCore/rendering/RenderBlock.cpp:6885
> +    layoutBlock(false);

Recursion :(
Comment 3 Dave Hyatt 2013-03-07 10:44:21 PST
Fixed in r145100.
Comment 4 Roger Fong 2013-03-07 14:18:46 PST
Hi, this broke
+fast/borders/border-fit-2.html
+fast/borders/border-fit.html
+fast/repaint/border-fit-lines.html

on mac and windows.

http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK1%20(Tests)/r145119%20(7678)/results.html
Comment 5 Dean Jackson 2013-03-07 16:29:18 PST
Test Expectations added to get our EWS going again.
Reopening bug until the tests can be reenabled.
Comment 6 Dean Jackson 2013-03-07 16:29:39 PST
https://trac.webkit.org/r145151
Comment 7 Jon Lee 2013-03-13 21:36:56 PDT
r145139 fixed one of the tests. See bug 111776.
Comment 8 Jon Lee 2013-03-13 21:40:02 PDT
<rdar://problem/13101714>
Comment 9 Brent Fulgham 2015-10-12 12:03:56 PDT
I no longer see border-fit-lines.html failing on Windows.
Comment 10 Tim Nguyen (:ntim) 2021-12-24 13:25:09 PST
Bug 229564 removed -webkit-border-fit.