REOPENED130165
RenderTextControl does not need OS X-specific behavior
https://bugs.webkit.org/show_bug.cgi?id=130165
Summary RenderTextControl does not need OS X-specific behavior
Myles C. Maxfield
Reported 2014-03-12 16:26:45 PDT
RenderTextControl inspects a family name to see if it starts with a '.' This is OSX-specific.
Attachments
Patch (6.25 KB, patch)
2014-03-18 12:00 PDT, Myles C. Maxfield
dino: review+
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (542.87 KB, application/zip)
2014-03-18 13:19 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (550.04 KB, application/zip)
2014-03-18 13:23 PDT, Build Bot
no flags
WIP (12.13 KB, patch)
2014-03-20 15:02 PDT, Myles C. Maxfield
no flags
Myles C. Maxfield
Comment 1 2014-03-18 12:00:04 PDT
Dean Jackson
Comment 2 2014-03-18 12:12:07 PDT
Comment on attachment 227085 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227085&action=review > Source/WebCore/ChangeLog:3 > + RenderTextControl switches on OSX behavior Please change bug title to "RenderTextControl does not need iOS-specific behavior" > Source/WebCore/ChangeLog:18 > + * platform/graphics/Font.cpp: > + (WebCore::Font::hasValidAverageCharWidth): > + (WebCore::Font::fastAverageCharWidthIfAvailable): You should describe what you did here, because it isn't removing platform-specific code, or at least doesn't look like it is. > Source/WebCore/rendering/RenderTextControlSingleLine.cpp:-354 > - // For text inputs, IE adds some extra width. > - if (maxCharWidth > 0.f) > - result += maxCharWidth - charWidth; How do we know we can get rid of this too?
Dean Jackson
Comment 3 2014-03-18 12:12:33 PDT
Comment on attachment 227085 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=227085&action=review >> Source/WebCore/ChangeLog:3 >> + RenderTextControl switches on OSX behavior > > Please change bug title to "RenderTextControl does not need iOS-specific behavior" I meant OS X specific, of course :)
Myles C. Maxfield
Comment 4 2014-03-18 12:16:58 PDT
That code is guarded behind a check which is never true. Therefore, it wasn't getting hit. By unifying the two code paths, I was changing the behavior of the guard, which was making this code be (erroneously) hit, so I needed to take it out.
Build Bot
Comment 5 2014-03-18 13:19:06 PDT
Created attachment 227095 [details] Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 6 2014-03-18 13:23:30 PDT
Created attachment 227096 [details] Archive of layout-test-results from webkit-ews-01 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Myles C. Maxfield
Comment 7 2014-03-18 20:36:04 PDT
Looks like the OS/2 table has positive values for xAvgCharWidth, rather than negative values which I had anticipated. This patch is bad.
Myles C. Maxfield
Comment 8 2014-03-20 15:02:36 PDT
Reopening to attach new patch.
Myles C. Maxfield
Comment 9 2014-03-20 15:02:37 PDT
Ahmad Saleem
Comment 10 2022-10-25 08:38:44 PDT
(In reply to Myles C. Maxfield from comment #9) > Created attachment 227341 [details] > WIP @myles - We do have this code still: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/FontCascade.cpp#L354 Is this patch needed anymore? Thanks!
Note You need to log in before you can comment on or make changes to this bug.