[webkit-reviews] review granted: [Bug 213242] Web Inspector: Add setScreenSizeOverride API to the Page agent : [Attachment 411419] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 16 16:04:36 PDT 2020

Devin Rousso <drousso at apple.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 213242: Web Inspector: Add setScreenSizeOverride API to the Page agent

Attachment 411419: Patch


--- Comment #30 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 411419
  --> https://bugs.webkit.org/attachment.cgi?id=411419

View in context: https://bugs.webkit.org/attachment.cgi?id=411419&action=review

r=me with a few fixes

> Source/WebCore/page/Frame.cpp:1069
> +    if (!m_overrideScreenSize.isZero())

I think `isEmpty` is probably enough (and simpler), but I don't have a strong

> Source/WebCore/page/Frame.h:380
> +    Optional<int> m_overrideScreenWidth;
> +    Optional<int> m_overrideScreenHeight;

these don't appear to be necessary anymore

> Source/WebInspectorUI/UserInterface/Base/Main.js:2290
> +	       screenSizeValueInput.value = screenSizeValueInput.placeholder =
WI._overridenDeviceScreenSize || window.screen.width + "x" +

NIT: I'd add `(` `)` around the stuff after the `||` so it's explicitly clear

More information about the webkit-reviews mailing list