Changeset 170078 in webkit


Ignore:
Timestamp:
Jun 17, 2014 3:27:16 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Fix the handling of resize events after r169505.
https://bugs.webkit.org/show_bug.cgi?id=133517

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-06-17
Reviewed by Martin Robinson.

Tools:

  • Scripts/webkitpy/port/xvfbdriver.py:

(XvfbDriver._start): Set the resolution of Xvfb to XGA (1024x768).
The tests css3/viewport-percentage-lengths/viewport-percentage-lengths-*.html
need at least 900x640 pixels to pass.

  • Scripts/webkitpy/port/xvfbdriver_unittest.py:

(XvfbDriverTest.test_start_no_pixel_tests): Update resolution.
(XvfbDriverTest.test_start_pixel_tests): Update resolution.
(XvfbDriverTest.test_start_arbitrary_worker_number): Update resolution.
(XvfbDriverTest.test_start_next_worker): Update resolution.

  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:

(WTR::PlatformWebView::PlatformWebView): gtk_widget_size_allocate should
be requested over the main widget instead of the window.
(WTR::PlatformWebView::resizeTo): Changed this to call setWindowFrame like
the Mac port.
(WTR::PlatformWebView::windowFrame): Remove legacy ifdef for GTK2.
(WTR::PlatformWebView::setWindowFrame): Set the size and position
of the Window and the web view.

LayoutTests:

  • platform/gtk/TestExpectations: Remove the expectations for the

tests that now pass.

  • platform/gtk/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt:

Rebaseline results.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r170072 r170078  
     12014-06-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [GTK] Fix the handling of resize events after r169505.
     4        https://bugs.webkit.org/show_bug.cgi?id=133517
     5
     6        Reviewed by Martin Robinson.
     7
     8        * platform/gtk/TestExpectations: Remove the expectations for the
     9        tests that now pass.
     10        * platform/gtk/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt:
     11        Rebaseline results.
     12
    1132014-06-17  Myles C. Maxfield  <mmaxfield@apple.com>
    214
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r170068 r170078  
    809809webkit.org/b/132282 fast/inline-block/14498-positionForCoordinates.html [ Failure Pass ]
    810810
    811 #fast/dom/Window
    812 webkit.org/b/132255 fast/dom/Window/window-resize-and-move-sub-frame.html [ Timeout Pass ]
    813 webkit.org/b/132255 fast/dom/Window/window-resize-contents.html [ Timeout Pass ]
    814 
    815811#Fast overflow
    816812webkit.org/b/132258 fast/overflow/hit-test-overflow-controls.html [ Failure ImageOnlyFailure Pass ]
     
    852848webkit.org/b/133000 js/slow-stress/call-spread.html [ Pass Timeout ]
    853849webkit.org/b/133001 fast/workers/worker-context-gc.html [ Pass Timeout ]
    854 
    855 webkit.org/b/133807 fast/dynamic/window-resize-scrollbars-test.html [ Failure Timeout ]
    856850
    857851webkit.org/b/133865 media/W3C/video/networkState/networkState_during_progress.html [ Failure Pass ]
     
    10181012
    10191013webkit.org/b/133151 js/cached-window-properties.html [ Timeout Pass ]
    1020 
    1021 webkit.org/b/133517 css3/viewport-percentage-lengths/viewport-percentage-lengths-anonymous-block.html [ Timeout ]
    1022 webkit.org/b/133517 css3/viewport-percentage-lengths/viewport-percentage-lengths-percent-size-child.html [ Timeout ]
    1023 webkit.org/b/133517 css3/viewport-percentage-lengths/viewport-percentage-lengths-relative-font-size.html [ Timeout ]
    1024 webkit.org/b/133517 css3/viewport-percentage-lengths/viewport-percentage-lengths-resize.html [ Timeout ]
    10251014
    10261015webkit.org/b/133808 media/video-trackmenu-selection.html [ Timeout ]
     
    12051194Bug(GTK) editing/selection/inactive-selection.html [ Failure ]
    12061195Bug(GTK) fast/css/disabled-author-styles.html [ Failure ]
    1207 Bug(GTK) fast/dom/rtl-scroll-to-leftmost-and-resize.html [ Failure ]
    12081196Bug(GTK) fast/dom/Window/window-postmessage-clone.html [ Failure Timeout ]
    12091197Bug(GTK) fast/events/backspace-navigates-back.html [ Failure ]
     
    13301318
    13311319# Probably failing because resizing is asynchronous.
    1332 webkit.org/b/53959 fast/dom/Window/window-resize-and-move-arguments.html [ Failure Timeout ]
    13331320webkit.org/b/53959 fast/dom/Window/window-resize.html [ Failure Timeout ]
    13341321
     
    15871574
    15881575webkit.org/b/80129 fast/frames/flattening/frameset-flattening-advanced.html [ Failure ]
    1589 webkit.org/b/131793 fast/frames/frame-programmatic-noresize.html [ Failure Pass ]
    1590 webkit.org/b/131794 fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html [ Failure Pass ]
    1591 webkit.org/b/131794 fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html [ Failure Pass ]
    15921576
    15931577webkit.org/b/89663 editing/deleting/delete-3800834-fix.html [ Failure ]
  • trunk/LayoutTests/platform/gtk/fast/dom/rtl-scroll-to-leftmost-and-resize-expected.txt

    r170068 r170078  
    1 layer at (0,0) size 335x4018
    2   RenderView at (0,0) size 335x585
    3 layer at (0,0) size 335x4018
    4   RenderBlock {HTML} at (0,0) size 335x4018
    5     RenderBody {BODY} at (8,8) size 319x4002
    6       RenderBlock {DIV} at (-683,0) size 1002x4002 [border: (1px solid #FF0000)]
    7         RenderText {#text} at (-491,1) size 1492x19
     1layer at (0,0) size 235x4018
     2  RenderView at (0,0) size 235x585
     3layer at (0,0) size 235x4018
     4  RenderBlock {HTML} at (0,0) size 235x4018
     5    RenderBody {BODY} at (8,8) size 219x4002
     6      RenderBlock {DIV} at (-783,0) size 1002x4002 [border: (1px solid #FF0000)]
     7        RenderText {#text} at (-491,1) size 1492x17
    88          text run at (-491,1) width 1492: "BEGINddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddEND"
    99scrolled to -716,0
  • trunk/Tools/ChangeLog

    r170073 r170078  
     12014-06-17  Carlos Alberto Lopez Perez  <clopez@igalia.com>
     2
     3        [GTK] Fix the handling of resize events after r169505.
     4        https://bugs.webkit.org/show_bug.cgi?id=133517
     5
     6        Reviewed by Martin Robinson.
     7
     8        * Scripts/webkitpy/port/xvfbdriver.py:
     9        (XvfbDriver._start): Set the resolution of Xvfb to XGA (1024x768).
     10        The tests css3/viewport-percentage-lengths/viewport-percentage-lengths-*.html
     11        need at least 900x640 pixels to pass.
     12        * Scripts/webkitpy/port/xvfbdriver_unittest.py:
     13        (XvfbDriverTest.test_start_no_pixel_tests): Update resolution.
     14        (XvfbDriverTest.test_start_pixel_tests): Update resolution.
     15        (XvfbDriverTest.test_start_arbitrary_worker_number): Update resolution.
     16        (XvfbDriverTest.test_start_next_worker): Update resolution.
     17        * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
     18        (WTR::PlatformWebView::PlatformWebView): gtk_widget_size_allocate should
     19        be requested over the main widget instead of the window.
     20        (WTR::PlatformWebView::resizeTo): Changed this to call setWindowFrame like
     21        the Mac port.
     22        (WTR::PlatformWebView::windowFrame): Remove legacy ifdef for GTK2.
     23        (WTR::PlatformWebView::setWindowFrame): Set the size and position
     24        of the Window and the web view.
     25
    1262014-06-17  Matthew Mirman <mmirman@apple.com>
    227
  • trunk/Tools/Scripts/webkitpy/port/xvfbdriver.py

    r170068 r170078  
    8585            environment['LD_LIBRARY_PATH'] = '%s:%s' % (llvmpipe_libgl_path, os.environ.get('LD_LIBRARY_PATH', ''))
    8686
    87         run_xvfb = ["Xvfb", ":%d" % display_id, "-screen",  "0", "800x600x%s" % self._xvfb_screen_depth(), "-nolisten", "tcp"]
     87        run_xvfb = ["Xvfb", ":%d" % display_id, "-screen",  "0", "1024x768x%s" % self._xvfb_screen_depth(), "-nolisten", "tcp"]
    8888        with open(os.devnull, 'w') as devnull:
    8989            self._xvfb_process = self._port.host.executive.popen(run_xvfb, stderr=devnull)
  • trunk/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py

    r156640 r170078  
    6868    def test_start_no_pixel_tests(self):
    6969        driver = self.make_driver()
    70         expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
     70        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']\n"
    7171        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0")
    7272        self.cleanup_driver(driver)
     
    7474    def test_start_pixel_tests(self):
    7575        driver = self.make_driver()
    76         expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
     76        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']\n"
    7777        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
    7878        self.cleanup_driver(driver)
     
    8080    def test_start_arbitrary_worker_number(self):
    8181        driver = self.make_driver(worker_number=17)
    82         expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
     82        expected_logs = "MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']\n"
    8383        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
    8484        self.cleanup_driver(driver)
     
    109109        driver = self.make_driver()
    110110        driver._next_free_display = lambda: 0
    111         expected_logs = "MOCK popen: ['Xvfb', ':0', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
     111        expected_logs = "MOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']\n"
    112112        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
    113113        self.cleanup_driver(driver)
    114114        driver = self.make_driver()
    115115        driver._next_free_display = lambda: 3
    116         expected_logs = "MOCK popen: ['Xvfb', ':3', '-screen', '0', '800x600x24', '-nolisten', 'tcp']\n"
     116        expected_logs = "MOCK popen: ['Xvfb', ':3', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']\n"
    117117        self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":3", pixel_tests=True)
    118118        self.cleanup_driver(driver)
  • trunk/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp

    r170068 r170078  
    4444
    4545    GtkAllocation size = { 0, 0, 800, 600 };
    46     gtk_widget_size_allocate(m_window, &size);
     46    gtk_widget_size_allocate(GTK_WIDGET(m_view), &size);
    4747    gtk_window_resize(GTK_WINDOW(m_window), 800, 600);
    4848    gtk_widget_show_all(m_window);
     
    5959void PlatformWebView::resizeTo(unsigned width, unsigned height)
    6060{
    61     // FIXME: Don't we need to resize the window too?
    62 
    63     GtkAllocation size = { 0, 0, static_cast<int>(width), static_cast<int>(height) };
    64     gtk_widget_size_allocate(m_window, &size);
    65     gtk_window_resize(GTK_WINDOW(m_window), width, height);
    66 
    67     while (gtk_events_pending())
    68         gtk_main_iteration();
     61    WKRect frame = windowFrame();
     62    frame.size.width = width;
     63    frame.size.height = height;
     64    setWindowFrame(frame);
    6965}
    7066
     
    8379{
    8480    GtkAllocation geometry;
    85 #ifdef GTK_API_VERSION_2
    86     gint depth;
    87     gdk_window_get_geometry(gtk_widget_get_window(GTK_WIDGET(m_window)),
    88                             &geometry.x, &geometry.y, &geometry.width, &geometry.height, &depth);
    89 #else
    9081    gdk_window_get_geometry(gtk_widget_get_window(GTK_WIDGET(m_window)),
    9182                            &geometry.x, &geometry.y, &geometry.width, &geometry.height);
    92 #endif
    9383
    9484    WKRect frame;
     
    10292void PlatformWebView::setWindowFrame(WKRect frame)
    10393{
    104     gtk_window_move(GTK_WINDOW(m_window), frame.origin.x, frame.origin.y);
    105     resizeTo(frame.size.width, frame.size.height);
     94    gdk_window_move_resize(gtk_widget_get_window(GTK_WIDGET(m_window)),
     95        frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
     96    GtkAllocation size = { 0, 0, static_cast<int>(frame.size.width), static_cast<int>(frame.size.height) };
     97    gtk_widget_size_allocate(GTK_WIDGET(m_view), &size);
     98
     99    while (gtk_events_pending())
     100        gtk_main_iteration();
    106101}
    107102
Note: See TracChangeset for help on using the changeset viewer.