Reviewed by Gustavo Noronha Silva.
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jul 2011 21:43:32 +0000 (21:43 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jul 2011 21:43:32 +0000 (21:43 +0000)
commit09ad4ea0b8ebc3474cc2716fff66273424d44f60
tree0a95bbb610849fdd285388b3fe9186ded3fc89b2
parent08f51ab2cd049313b45550494a4009a93d3ca5e1
Reviewed by Gustavo Noronha Silva.

[GTK] Use WebCore scrollbars for the DRT instead of GtkScrolledWindow
https://bugs.webkit.org/show_bug.cgi?id=62252

Source/WebCore:

Properly handle the situation where the GtkWidget wants WebCore to draw its
own main frame scrollbars.

* platform/gtk/ScrollViewGtk.cpp:
(WebCore::shouldCreateMainFrameScrollbar): Abstract this logic into a helper function.
(WebCore::ScrollView::createScrollbar): Use the new helper.
(WebCore::ScrollView::visibleContentRect): Use the new helper.

Source/WebKit/gtk:

Added an undocumented self-scrolling property to WebKitWebView which
communicates to WebCore whether or not this widget is expected to draw
its own main frame scrollbars or not.

* webkit/webkitwebview.cpp: Add the self-scrolling property.
* webkit/webkitwebviewprivate.h: Add the selfScrolling private member.

Tools:

Add a new subclass of WebKitWebView that overrides the size request to
return 1 pixel by 1 pixel. This ensure that it operates properly when
not packed into a GtkScrolledWindow. Also construct the WebKitWebView
with self-scrolling set to true.

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(webInspectorInspectWebView): Use the new SelfScrollingWebKitWebview class here.
(createWebView): Ditto.
(main): Pack the widget into a GtkBox instead of a GtkScrolledWindow.
* DumpRenderTree/gtk/SelfScrollingWebKitWebView.cpp: Added.
(self_scrolling_webkit_web_view_class_init):
(self_scrolling_webkit_web_view_init):
(self_scrolling_webkit_web_view_new):
(sizeRequestMethod):
(getPreferredSizeMethod):
* DumpRenderTree/gtk/SelfScrollingWebKitWebView.h: Added.
* GNUmakefile.am: Added SelfScrollingWebKitWebView files to the source list.

LayoutTests:

Unskip tests which are now passing and update results for tests which
previously had incorrect results.

* platform/gtk/Skipped: Unskip now-passing tests.
* platform/gtk/fast/css/MarqueeLayoutTest-expected.png:
* platform/gtk/fast/css/MarqueeLayoutTest-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/gtk/fast/dom/vertical-scrollbar-in-rtl-expected.txt:
* platform/gtk/fast/dynamic/window-resize-scrollbars-test-expected.png:
* platform/gtk/fast/dynamic/window-resize-scrollbars-test-expected.txt:
* platform/gtk/fast/flexbox/flex-hang-expected.png:
* platform/gtk/fast/flexbox/flex-hang-expected.txt:
* platform/gtk/fast/forms/search-vertical-alignment-expected.png:
* platform/gtk/fast/forms/search-vertical-alignment-expected.txt:
* platform/gtk/fast/forms/searchfield-heights-expected.png:
* platform/gtk/fast/forms/searchfield-heights-expected.txt:
* platform/gtk/fast/forms/textfield-overflow-expected.png:
* platform/gtk/fast/forms/textfield-overflow-expected.txt:
* platform/gtk/fast/frames/flattening/frameset-flattening-advanced-expected.png: Added.
* platform/gtk/fast/frames/flattening/frameset-flattening-advanced-expected.txt:
* platform/gtk/fast/frames/flattening/frameset-flattening-simple-expected.png: Added.
* platform/gtk/fast/frames/flattening/frameset-flattening-simple-expected.txt:
* platform/gtk/fast/frames/flattening/frameset-flattening-subframesets-expected.png: Added.
* platform/gtk/fast/frames/flattening/frameset-flattening-subframesets-expected.txt:
* platform/gtk/fast/frames/inline-object-inside-frameset-expected.png: Added.
* platform/gtk/fast/frames/inline-object-inside-frameset-expected.txt:
* platform/gtk/fast/lists/001-vertical-expected.png: Added.
* platform/gtk/fast/lists/001-vertical-expected.txt:
* platform/gtk/fast/multicol/float-multicol-expected.png: Added.
* platform/gtk/fast/multicol/float-multicol-expected.txt:
* platform/gtk/fast/multicol/table-vertical-align-expected.png: Added.
* platform/gtk/fast/multicol/table-vertical-align-expected.txt:
* platform/gtk/fast/table/border-collapsing/004-vertical-expected.png:
* platform/gtk/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/gtk/scrollbars/custom-scrollbar-with-incomplete-style-expected.png: Added.
* platform/gtk/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt:
* platform/gtk/tables/mozilla/bugs/bug145572-expected.png:
* platform/gtk/tables/mozilla/bugs/bug145572-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
45 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/gtk/fast/css/MarqueeLayoutTest-expected.png
LayoutTests/platform/gtk/fast/css/MarqueeLayoutTest-expected.txt
LayoutTests/platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/gtk/fast/dom/vertical-scrollbar-in-rtl-expected.txt
LayoutTests/platform/gtk/fast/dynamic/window-resize-scrollbars-test-expected.png
LayoutTests/platform/gtk/fast/dynamic/window-resize-scrollbars-test-expected.txt
LayoutTests/platform/gtk/fast/flexbox/flex-hang-expected.png
LayoutTests/platform/gtk/fast/flexbox/flex-hang-expected.txt
LayoutTests/platform/gtk/fast/forms/search-vertical-alignment-expected.png
LayoutTests/platform/gtk/fast/forms/search-vertical-alignment-expected.txt
LayoutTests/platform/gtk/fast/forms/searchfield-heights-expected.png
LayoutTests/platform/gtk/fast/forms/searchfield-heights-expected.txt
LayoutTests/platform/gtk/fast/forms/textfield-overflow-expected.png
LayoutTests/platform/gtk/fast/forms/textfield-overflow-expected.txt
LayoutTests/platform/gtk/fast/frames/flattening/frameset-flattening-advanced-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/frames/flattening/frameset-flattening-advanced-expected.txt
LayoutTests/platform/gtk/fast/frames/flattening/frameset-flattening-simple-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/frames/flattening/frameset-flattening-simple-expected.txt
LayoutTests/platform/gtk/fast/frames/flattening/frameset-flattening-subframesets-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/frames/flattening/frameset-flattening-subframesets-expected.txt
LayoutTests/platform/gtk/fast/frames/inline-object-inside-frameset-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/frames/inline-object-inside-frameset-expected.txt
LayoutTests/platform/gtk/fast/lists/001-vertical-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/lists/001-vertical-expected.txt
LayoutTests/platform/gtk/fast/multicol/float-multicol-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/multicol/table-vertical-align-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/fast/multicol/table-vertical-align-expected.txt
LayoutTests/platform/gtk/fast/table/border-collapsing/004-vertical-expected.png
LayoutTests/platform/gtk/fast/table/border-collapsing/004-vertical-expected.txt
LayoutTests/platform/gtk/scrollbars/custom-scrollbar-with-incomplete-style-expected.png [new file with mode: 0644]
LayoutTests/platform/gtk/scrollbars/custom-scrollbar-with-incomplete-style-expected.txt
LayoutTests/platform/gtk/tables/mozilla/bugs/bug145572-expected.png
LayoutTests/platform/gtk/tables/mozilla/bugs/bug145572-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/gtk/ScrollViewGtk.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/gtk/webkit/webkitwebviewprivate.h
Tools/ChangeLog
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.cpp [new file with mode: 0644]
Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.h [new file with mode: 0644]
Tools/GNUmakefile.am