Bug 82633 - remove ahem font from flexbox layout tests
Summary: remove ahem font from flexbox layout tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 11:34 PDT by Tony Chang
Modified: 2012-03-29 14:26 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.52 KB, patch)
2012-03-29 11:35 PDT, Tony Chang
ojan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2012-03-29 11:34:15 PDT
remove ahem font from flexbox layout tests
Comment 1 Tony Chang 2012-03-29 11:35:50 PDT
Created attachment 134628 [details]
Patch
Comment 3 Ojan Vafai 2012-03-29 12:01:13 PDT
Comment on attachment 134628 [details]
Patch

I don't mind this "fix" but doesn't this point to a genuine bug? It seems that we're not reflowing when we finally load the ahem font, which is totally wrong, no?
Comment 4 Dimitri Glazkov (Google) 2012-03-29 13:06:23 PDT
(In reply to comment #3)
> (From update of attachment 134628 [details])
> I don't mind this "fix" but doesn't this point to a genuine bug? It seems that we're not reflowing when we finally load the ahem font, which is totally wrong, no?

I am pretty sure it's reflowing after the ahem font is loaded. The test doesn't explicitly wait until then -- that's the problem. Ishibashi-san, would you mind confirming this?
Comment 5 Eric Seidel (no email) 2012-03-29 13:09:18 PDT
Comment on attachment 134628 [details]
Patch

Really?  Why should DRT be dumping before the font is loaded?
Comment 6 Ojan Vafai 2012-03-29 13:17:16 PDT
(In reply to comment #5)
> (From update of attachment 134628 [details])
> Really?  Why should DRT be dumping before the font is loaded?

I don't think it is. My running theory is that the font loads halfway through laying out the page. I'm not actively debugging this though, so I'm not sure.
Comment 7 Ojan Vafai 2012-03-29 13:17:31 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 134628 [details] [details])
> > I don't mind this "fix" but doesn't this point to a genuine bug? It seems that we're not reflowing when we finally load the ahem font, which is totally wrong, no?
> 
> I am pretty sure it's reflowing after the ahem font is loaded. The test doesn't explicitly wait until then -- that's the problem. Ishibashi-san, would you mind confirming this?

Hm...I think we might have a race. Specifically, we baseline align by calling RenderBlock::firstLineBoxBaseline, which calls style(true)->fontMetrics().ascent(firstRootBox()->baselineType()). If we first layout the flex items before the font has loaded and then reposition them after the font has loaded, then we'll layout the flex items using the fallback font, but align them using the loaded font's ascent.

Not 100% sure that's what's going on, but it still looks like a genuine bug to me. I would expect this to affect any other layout code that uses fontMetrics as well.
Comment 8 Tony Chang 2012-03-29 13:40:22 PDT
(adding dirk since this is gardening related).

I'm going to build on mac and debug this a bit.
Comment 9 Tony Chang 2012-03-29 13:40:49 PDT
We may want to land this in the interim to green the tree.
Comment 10 Ojan Vafai 2012-03-29 13:47:23 PDT
Comment on attachment 134628 [details]
Patch

Regardless, this bug is almost certainly in the mac font code and not in the flexbox code. Tony's going to file a bug with this testcase. Interestingly, this test only fails on the Chromium 10.5 and 10.7 bots. It passes on the Apple Mac bots and the Chromium 10.6 bots.
Comment 11 Tony Chang 2012-03-29 14:17:28 PDT
https://bugs.webkit.org/show_bug.cgi?id=82654 is for tracking this bug.  I'm going to land this patch in an attempt to green the tree.
Comment 12 Tony Chang 2012-03-29 14:26:57 PDT
Committed r112578: <http://trac.webkit.org/changeset/112578>