Trying to do this from web APIs doesn't work well because of space needed for Dock. This is easier to do correctly on the browser side. And, some WebKit embedders may not have a notion of maximize, so doing it unconditionally doesn't make sense.
<rdar://problem/40544391>
Created attachment 341705 [details] Patch
Attachment 341705 [details] did not pass style-queue: ERROR: Source/WebKit/UIProcess/Cocoa/AutomationSessionClient.mm:152: More than one command on the same line [whitespace/newline] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r232396: <https://trac.webkit.org/changeset/232396>