Bug 117863 - screen.availWidth always returns width of primary display
Summary: screen.availWidth always returns width of primary display
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: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-06-20 21:59 PDT by Simon Fraser (smfr)
Modified: 2013-06-24 13:33 PDT (History)
9 users (show)

See Also:


Attachments
Patch (15.72 KB, patch)
2013-06-20 22:07 PDT, Simon Fraser (smfr)
ggaren: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion (575.86 KB, application/zip)
2013-06-21 03:26 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (618.54 KB, application/zip)
2013-06-21 04:02 PDT, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (580.86 KB, application/zip)
2013-06-21 06:42 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2013-06-20 21:59:28 PDT
screen.availWidth always returns width of primary display
Comment 1 Simon Fraser (smfr) 2013-06-20 22:07:30 PDT
Created attachment 205146 [details]
Patch
Comment 2 Simon Fraser (smfr) 2013-06-20 22:08:04 PDT
<rdar://problem/13560876>
Comment 3 WebKit Commit Bot 2013-06-20 22:08:36 PDT
Attachment 205146 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/FrameView.h', u'Source/WebCore/platform/Widget.cpp', u'Source/WebCore/platform/Widget.h', u'Source/WebCore/platform/mac/PlatformScreenMac.h', u'Source/WebCore/platform/mac/PlatformScreenMac.mm', u'Source/WebCore/platform/mac/WidgetMac.mm', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/UIProcess/API/mac/WKView.mm']" exit_code: 1
Source/WebKit2/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
Source/WebKit2/ChangeLog:9:  Line contains tab character.  [whitespace/tab] [5]
Source/WebKit2/ChangeLog:10:  Line contains tab character.  [whitespace/tab] [5]
Source/WebKit2/ChangeLog:11:  Line contains tab character.  [whitespace/tab] [5]
Source/WebKit2/ChangeLog:12:  Line contains tab character.  [whitespace/tab] [5]
Source/WebKit2/ChangeLog:13:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:8:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:9:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:10:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:11:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:12:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:13:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:14:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:15:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:16:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:17:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:18:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:19:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:20:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:21:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:22:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 21 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Geoffrey Garen 2013-06-20 22:16:31 PDT
Comment on attachment 205146 [details]
Patch

r=me for every character of this patch that is not a tab character.
Comment 5 Simon Fraser (smfr) 2013-06-20 23:12:47 PDT
Comment on attachment 205146 [details]
Patch

I don't actually need to add the PlatformScreenMac.h header.
Comment 6 Build Bot 2013-06-21 03:26:37 PDT
Comment on attachment 205146 [details]
Patch

Attachment 205146 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/876645

New failing tests:
fast/frames/iframe-access-screen-of-deleted.html
Comment 7 Build Bot 2013-06-21 03:26:39 PDT
Created attachment 205167 [details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-08  Port: mac-mountainlion  Platform: Mac OS X 10.8.3
Comment 8 Build Bot 2013-06-21 04:02:47 PDT
Comment on attachment 205146 [details]
Patch

Attachment 205146 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/921769

New failing tests:
fast/frames/iframe-access-screen-of-deleted.html
Comment 9 Build Bot 2013-06-21 04:02:51 PDT
Created attachment 205168 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.3
Comment 10 Build Bot 2013-06-21 06:42:53 PDT
Comment on attachment 205146 [details]
Patch

Attachment 205146 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/937609

New failing tests:
fast/media/invalid-lengths.html
fast/frames/iframe-access-screen-of-deleted.html
media/video-source-media.html
fast/css/device-aspect-ratio.html
fast/dom/Window/window-resize-and-move-arguments.html
fast/media/matchmedium-query-api.html
fast/media/w3c/test_media_queries.html
fast/media/media-query-list-01.html
fast/dom/Window/window-resize.html
Comment 11 Build Bot 2013-06-21 06:42:55 PDT
Created attachment 205178 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.3
Comment 12 Simon Fraser (smfr) 2013-06-22 12:38:20 PDT
Test failures are because WebKitTestRunner puts the window offscreen, so we were failing to get any screen. Will fix to fall back to the first screen, as the old code did.
Comment 13 Simon Fraser (smfr) 2013-06-22 12:42:10 PDT
http://trac.webkit.org/changeset/151877
Comment 14 Simon Fraser (smfr) 2013-06-22 13:30:28 PDT
Followup in https://trac.webkit.org/r151879
Comment 15 Geoffrey Garen 2013-06-24 10:53:10 PDT
A few things Anders pointed out:

(1) Can we remove the category methods from NSScreen? They pollute the global namespace. 

(2) Can we move this code from Widget to HostWindow? Then you would have:

    if (!widget)
        return XXX;
    ScrollView* view = widget->view();
    if (!view)
        return XXX;
    return view->hostWindow()->displayID();

That seems like a better separation of concerns between classes.
Comment 16 Simon Fraser (smfr) 2013-06-24 13:33:37 PDT
Will do that cleanup via bug 117944.