Bug 97474 - [Chromium] Remove screen-related functions from PlatformSupport
Summary: [Chromium] Remove screen-related functions from PlatformSupport
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Pilgrim (Google)
URL:
Keywords:
Depends on:
Blocks: 82948
  Show dependency treegraph
 
Reported: 2012-09-24 12:30 PDT by Mark Pilgrim (Google)
Modified: 2012-10-24 16:20 PDT (History)
8 users (show)

See Also:


Attachments
WIP Patch (16.60 KB, patch)
2012-09-24 12:30 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
WIP Patch (22.96 KB, patch)
2012-09-25 14:49 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
WIP Patch (22.51 KB, patch)
2012-09-25 15:16 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
WIP Patch (22.43 KB, patch)
2012-09-25 16:15 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
WIP Patch (22.66 KB, patch)
2012-09-25 16:30 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
WIP Patch (22.77 KB, patch)
2012-09-26 10:16 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (23.09 KB, patch)
2012-09-27 13:59 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (23.81 KB, patch)
2012-09-27 16:07 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (24.86 KB, patch)
2012-10-01 14:22 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
Patch (24.80 KB, patch)
2012-10-24 14:15 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Pilgrim (Google) 2012-09-24 12:30:38 PDT
[Chromium] Remove screen-related functions from PlatformSupport
Comment 1 Mark Pilgrim (Google) 2012-09-24 12:30:57 PDT
Created attachment 165430 [details]
WIP Patch
Comment 2 Mark Pilgrim (Google) 2012-09-25 14:49:36 PDT
Created attachment 165680 [details]
WIP Patch
Comment 3 Mark Pilgrim (Google) 2012-09-25 15:16:37 PDT
Created attachment 165685 [details]
WIP Patch
Comment 4 Mark Pilgrim (Google) 2012-09-25 16:15:30 PDT
Created attachment 165697 [details]
WIP Patch
Comment 5 Mark Pilgrim (Google) 2012-09-25 16:30:46 PDT
Created attachment 165700 [details]
WIP Patch
Comment 6 Mark Pilgrim (Google) 2012-09-26 10:16:06 PDT
Created attachment 165826 [details]
WIP Patch
Comment 7 Mark Pilgrim (Google) 2012-09-27 13:59:07 PDT
Created attachment 166059 [details]
Patch
Comment 8 WebKit Review Bot 2012-09-27 14:02:38 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 9 Adam Barth 2012-09-27 14:23:36 PDT
Comment on attachment 166059 [details]
Patch

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

Very nice.

> Source/Platform/chromium/public/WebScreenInfo.h:77
> +        , isMonochrome(false) { }

Technically the { and } should each be on their own line.

> Source/WebKit/chromium/src/ChromeClientImpl.cpp:911
> +

You've got an extra blank line here
Comment 10 WebKit Review Bot 2012-09-27 15:30:14 PDT
Comment on attachment 166059 [details]
Patch

Rejecting attachment 166059 [details] from commit-queue.

New failing tests:
fast/media/media-svg-crash.html
fast/frames/iframe-display-none.html
fast/frames/crash-removed-iframe.html
Full output: http://queues.webkit.org/results/14061015
Comment 11 Mark Pilgrim (Google) 2012-09-27 16:07:11 PDT
Created attachment 166087 [details]
Patch
Comment 12 Mark Pilgrim (Google) 2012-09-27 16:08:11 PDT
Comment on attachment 166087 [details]
Patch

Now with guards against nonexistent objects in the screenInfo() call chain.
Comment 13 Adam Barth 2012-09-27 16:09:44 PDT
Comment on attachment 166087 [details]
Patch

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

> Source/WebCore/platform/chromium/PlatformScreenChromium.cpp:53
> +    if (!widget)
> +        return 0;
> +    ScrollView* root = widget->root();
> +    if (!root)
> +        return 0;
> +    HostWindow* hostWindow = root->hostWindow();
> +    if (!hostWindow)
> +        return 0;
> +    return hostWindow->platformPageClient();

Can all these things really be 0?
Comment 14 Mark Pilgrim (Google) 2012-09-27 16:28:25 PDT
(In reply to comment #13)
> (From update of attachment 166087 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=166087&action=review
> 
> Can all these things really be 0?

root() was in several tests. Don't know about the others. The old code had tons of guards like this in the old PlatformSupport::toWebWidget() function, at every step of the call chain.
Comment 15 Adam Barth 2012-09-27 16:46:36 PDT
Comment on attachment 166087 [details]
Patch

I checked hostWindow().  It can definitely be 0.
Comment 16 WebKit Review Bot 2012-09-27 16:50:18 PDT
Comment on attachment 166087 [details]
Patch

Rejecting attachment 166087 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1

ERROR: /mnt/git/webkit-commit-queue/Source/WebKit/mac/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://queues.webkit.org/results/14054099
Comment 17 Adam Barth 2012-09-27 17:00:50 PDT
I'm not sure why the bot is having trouble today.  :(
Comment 18 WebKit Review Bot 2012-09-27 17:30:57 PDT
Comment on attachment 166087 [details]
Patch

Clearing flags on attachment: 166087

Committed r129825: <http://trac.webkit.org/changeset/129825>
Comment 19 WebKit Review Bot 2012-09-27 17:31:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Kentaro Hara 2012-09-28 07:16:04 PDT
Reverted r129825 for reason:

DOMWindow.resizeTo() is broken. Asked by Mark Pilgrim.

Committed r129894: <http://trac.webkit.org/changeset/129894>
Comment 21 Mark Pilgrim (Google) 2012-10-01 14:22:01 PDT
Created attachment 166542 [details]
Patch
Comment 22 Mark Pilgrim (Google) 2012-10-01 14:24:09 PDT
Comment on attachment 166542 [details]
Patch

Includes patch from bug 97909, also implementing platformPageClient() on PagePopupChromeClient.
Comment 23 Adam Barth 2012-10-01 14:42:50 PDT
What's different in this patch from the previous patch?  Should we include a test so we don't make the same mistake again?
Comment 24 Eric Seidel (no email) 2012-10-24 12:49:26 PDT
Looks like this one is ready to go?  With a reply from Mark and a review from Adam...
Comment 25 Mark Pilgrim (Google) 2012-10-24 12:51:37 PDT
(In reply to comment #23)
> What's different in this patch from the previous patch?  Should we include a test so we don't make the same mistake again?

What's different is that it includes the patch from bug 97909. Not sure how to make a test for it. Perhaps we could ask Keishi?
Comment 26 Mark Pilgrim (Google) 2012-10-24 13:01:41 PDT
FYI, the latest patch still applies cleanly to ToT.
Comment 27 Adam Barth 2012-10-24 13:58:55 PDT
Comment on attachment 166542 [details]
Patch

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

> Source/WebCore/platform/chromium/PlatformScreenChromium.cpp:92
> +        return 0;

return false?

> Source/WebCore/platform/chromium/PlatformScreenChromium.cpp:100
> +        return IntRect();

return FloatRect() ?

> Source/WebCore/platform/chromium/PlatformScreenChromium.cpp:108
> +        return IntRect();

Return FloatRect() ?

> Source/WebKit/chromium/src/ChromeClientImpl.cpp:910
> +

You've got an extra blank line here.

> Source/WebKit/chromium/src/PlatformSupport.cpp:-369
> -        return 0;

I see.  This goofiness was here already.  We should still probably clean it up.
Comment 28 Mark Pilgrim (Google) 2012-10-24 14:15:49 PDT
Created attachment 170469 [details]
Patch
Comment 29 Mark Pilgrim (Google) 2012-10-24 14:16:42 PDT
Comment on attachment 170469 [details]
Patch

Nits addressed.
Comment 30 WebKit Review Bot 2012-10-24 16:20:00 PDT
Comment on attachment 170469 [details]
Patch

Clearing flags on attachment: 170469

Committed r132419: <http://trac.webkit.org/changeset/132419>
Comment 31 WebKit Review Bot 2012-10-24 16:20:06 PDT
All reviewed patches have been landed.  Closing bug.