screen.availWidth always returns width of primary display
Created attachment 205146 [details] Patch
<rdar://problem/13560876>
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 on attachment 205146 [details] Patch r=me for every character of this patch that is not a tab character.
Comment on attachment 205146 [details] Patch I don't actually need to add the PlatformScreenMac.h header.
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
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 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
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 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
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
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.
http://trac.webkit.org/changeset/151877
Followup in https://trac.webkit.org/r151879
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.
Will do that cleanup via bug 117944.