<attachment> layout needs to scale with Dynamic Type size changes
<rdar://problem/64914762>
Created attachment 403645 [details] Patch
Created attachment 403646 [details] Patch
Created attachment 403647 [details] Patch
Comment on attachment 403647 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=403647&action=review > Source/WebCore/ChangeLog:9 > + No new tests; we don't currently have a mechanism for varying Dynamic Type size in tests. Seems like the right time to add one!
(In reply to Sam Weinig from comment #5) > Comment on attachment 403647 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=403647&action=review > > > Source/WebCore/ChangeLog:9 > > + No new tests; we don't currently have a mechanism for varying Dynamic Type size in tests. > > Seems like the right time to add one! Only in the "best time to plant a tree" sense. When someone was implementing DT-related font-y features would be the "right time".
(In reply to Tim Horton from comment #6) > (In reply to Sam Weinig from comment #5) > > Comment on attachment 403647 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=403647&action=review > > > > > Source/WebCore/ChangeLog:9 > > > + No new tests; we don't currently have a mechanism for varying Dynamic Type size in tests. > > > > Seems like the right time to add one! > > Only in the "best time to plant a tree" sense. When someone was implementing > DT-related font-y features would be the "right time". No time like the present!
(In reply to Sam Weinig from comment #7) > (In reply to Tim Horton from comment #6) > > (In reply to Sam Weinig from comment #5) > > > Comment on attachment 403647 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=403647&action=review > > > > > > > Source/WebCore/ChangeLog:9 > > > > + No new tests; we don't currently have a mechanism for varying Dynamic Type size in tests. > > > > > > Seems like the right time to add one! > > > > Only in the "best time to plant a tree" sense. When someone was implementing > > DT-related font-y features would be the "right time". > > No time like the present! I have no doubt I will come to regret it as much as I always do when I add one-off bits for things like this, but I will see what I can do.
Created attachment 403667 [details] Patch
Created attachment 403675 [details] Patch
(In reply to Tim Horton from comment #8) > (In reply to Sam Weinig from comment #7) > > (In reply to Tim Horton from comment #6) > > > (In reply to Sam Weinig from comment #5) > > > > Comment on attachment 403647 [details] > > > > Patch > > > > > > > > View in context: > > > > https://bugs.webkit.org/attachment.cgi?id=403647&action=review > > > > > > > > > Source/WebCore/ChangeLog:9 > > > > > + No new tests; we don't currently have a mechanism for varying Dynamic Type size in tests. > > > > > > > > Seems like the right time to add one! > > > > > > Only in the "best time to plant a tree" sense. When someone was implementing > > > DT-related font-y features would be the "right time". > > > > No time like the present! > > I have no doubt I will come to regret it as much as I always do when I add > one-off bits for things like this, but I will see what I can do. Awww. Another approach you could take, if you don't want to mess with WebCore::Internals is to add support in WebKitTestRunner (or just do it in TestWebKitAPI) that overrides [WKWebView _contentSizeCategory] and sends the UIContentSizeCategoryDidChangeNotification notification. It might make sense to override [WKWebView _contentSizeCategory] regardless so we have consistent testing on devices that might have had some changes (though I think your call in Internals::resetToConsistentState() should cover most cases).
That's what I assumed I was going to have to do when I was whining. The Internals thing is way less annoying (no bounce to the UI process, no asynchrony in the test, etc.).
Committed r264027: <https://trac.webkit.org/changeset/264027> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403675 [details].