[webkit-dev] calcPrefWidths, SimpleFontData, and text fields (oh my!)
In tracking down something for Mac Chromium, I came across something in WebCore that I can't explain, and hopefully someone on this list can vend me a clue. RenderTextControl::calcPrefWidths() checks the average character width of the primary font if the width isn't explicitly set. This calls into SimpleFontData to return its |m_avgCharWidth| member. However, there's nothing I can find (blame Spotlight, perhaps?) in the WebKit source that actually sets m_avgCharWidth, besides an initialization to 0 in SimpleFontData.cpp. If this is the case, shouldn't text fields always get a 0 width + some padding? Am I missing the obvious code that sets this member variable in the font code? Or am I reading this chunk incorrectly? Thanks! -- Mike Pinkerton Mac Weenie [EMAIL PROTECTED] ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] calcPrefWidths, SimpleFontData, and text fields (oh my!)
On Nov 19, 2008, at 1:17 PM, Mike Pinkerton wrote: In tracking down something for Mac Chromium, I came across something in WebCore that I can't explain, and hopefully someone on this list can vend me a clue. RenderTextControl::calcPrefWidths() checks the average character width of the primary font if the width isn't explicitly set. I don’t see such code in TOT WebKit. Are you by any chance looking at a version of the source that has a patch similar to the one from https://bugs.webkit.org/show_bug.cgi?id=15312 applied to it? ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] calcPrefWidths, SimpleFontData, and text fields (oh my!)
Sorry everyone, I was looking at our current Chromium source, which has patches applied over ToT Webkit. It all makes sense now. Clue vended, thanks! On Wed, Nov 19, 2008 at 4:26 PM, Dan Bernstein [EMAIL PROTECTED] wrote: On Nov 19, 2008, at 1:17 PM, Mike Pinkerton wrote: In tracking down something for Mac Chromium, I came across something in WebCore that I can't explain, and hopefully someone on this list can vend me a clue. RenderTextControl::calcPrefWidths() checks the average character width of the primary font if the width isn't explicitly set. I don't see such code in TOT WebKit. Are you by any chance looking at a version of the source that has a patch similar to the one from https://bugs.webkit.org/show_bug.cgi?id=15312 applied to it? -- Mike Pinkerton Mac Weenie [EMAIL PROTECTED] ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev