Add test infrastructure to test rubber-banding overhang drawing along with...

Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
https://bugs.webkit.org/show_bug.cgi?id=67511

Patch by Alexei Svitkine <asvitkine@chromium.org> on 2011-09-07
Reviewed by Dimitri Glazkov.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

Tests: platform/chromium-mac/rubberbanding/overhang-e.html
       platform/chromium-mac/rubberbanding/overhang-n.html
       platform/chromium-mac/rubberbanding/overhang-ne.html
       platform/chromium-mac/rubberbanding/overhang-nw.html
       platform/chromium-mac/rubberbanding/overhang-s.html
       platform/chromium-mac/rubberbanding/overhang-se.html
       platform/chromium-mac/rubberbanding/overhang-sw.html
       platform/chromium-mac/rubberbanding/overhang-w.html

* WebCore.exp.in:
* platform/ScrollableArea.h:
* testing/Internals.cpp:
(WebCore::Internals::setScrollViewPosition):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

* platform/chromium-mac/rubberbanding: Added.
* platform/chromium-mac/rubberbanding/overhang-e-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-e-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-e.html: Added.
* platform/chromium-mac/rubberbanding/overhang-n-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-n-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-n.html: Added.
* platform/chromium-mac/rubberbanding/overhang-ne-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-ne-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-ne.html: Added.
* platform/chromium-mac/rubberbanding/overhang-nw-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-nw-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-nw.html: Added.
* platform/chromium-mac/rubberbanding/overhang-s-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-s-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-s.html: Added.
* platform/chromium-mac/rubberbanding/overhang-se-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-se-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-se.html: Added.
* platform/chromium-mac/rubberbanding/overhang-sw-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-sw-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-sw.html: Added.
* platform/chromium-mac/rubberbanding/overhang-w-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-w-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-w.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent eca12eeb
2011-09-07 Alexei Svitkine <asvitkine@chromium.org>
Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
https://bugs.webkit.org/show_bug.cgi?id=67511
Reviewed by Dimitri Glazkov.
* Source/autotools/symbols.filter:
2011-09-06 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
......
2011-09-07 Alexei Svitkine <asvitkine@chromium.org>
Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
https://bugs.webkit.org/show_bug.cgi?id=67511
Reviewed by Dimitri Glazkov.
* platform/chromium-mac/rubberbanding: Added.
* platform/chromium-mac/rubberbanding/overhang-e-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-e-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-e.html: Added.
* platform/chromium-mac/rubberbanding/overhang-n-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-n-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-n.html: Added.
* platform/chromium-mac/rubberbanding/overhang-ne-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-ne-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-ne.html: Added.
* platform/chromium-mac/rubberbanding/overhang-nw-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-nw-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-nw.html: Added.
* platform/chromium-mac/rubberbanding/overhang-s-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-s-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-s.html: Added.
* platform/chromium-mac/rubberbanding/overhang-se-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-se-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-se.html: Added.
* platform/chromium-mac/rubberbanding/overhang-sw-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-sw-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-sw.html: Added.
* platform/chromium-mac/rubberbanding/overhang-w-expected.png: Added.
* platform/chromium-mac/rubberbanding/overhang-w-expected.txt: Added.
* platform/chromium-mac/rubberbanding/overhang-w.html: Added.
2011-09-07 David Reveman <reveman@chromium.org>
[Chromium] Render surface anti-aliasing.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
scrolled to 50,0
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, 50, 0);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, 0, -50);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
scrolled to 50,-50
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, 50, -50);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, -50, -50);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
scrolled to 0,50
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, 0, 50);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
scrolled to 50,50
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, 50, 50);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
scrolled to -50,50
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, -50, 50);
}
</script>
</body>
</html>
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x30 [bgcolor=#000000]
RenderBlock {DIV} at (0,30) size 784x18
RenderText {#text} at (0,0) size 148x18
text run at (0,0) width 148: "This test requires DRT."
<html>
<head><title>Test rubber banding overhang drawing</title></head>
<body>
<div style="height:30px; background-color:black; width:100%"></div>
<div id="info">This test requires DRT.</div>
<script>
if (window.internals) {
document.getElementById('info').style.visibility = "hidden";
internals.setScrollViewPosition(document, -50, 0);
}
</script>
</body>
</html>
......@@ -463,6 +463,9 @@ WONTFIX SKIP : fast/frames/cross-site-this.html = FAIL
// throw. V8 follows the spec.
WONTFIX SKIP : fast/js/reparsing-semicolon-insertion.html = FAIL
// Rubber-banding is currently a Mac only feature.
WONTFIX WIN LINUX : platform/chromium/rubberbanding = IMAGE
// -----------------------------------------------------------------
// LIGHTTPD
// -----------------------------------------------------------------
......
2011-09-07 Alexei Svitkine <asvitkine@chromium.org>
Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
https://bugs.webkit.org/show_bug.cgi?id=67511
Reviewed by Dimitri Glazkov.
Tests: platform/chromium-mac/rubberbanding/overhang-e.html
platform/chromium-mac/rubberbanding/overhang-n.html
platform/chromium-mac/rubberbanding/overhang-ne.html
platform/chromium-mac/rubberbanding/overhang-nw.html
platform/chromium-mac/rubberbanding/overhang-s.html
platform/chromium-mac/rubberbanding/overhang-se.html
platform/chromium-mac/rubberbanding/overhang-sw.html
platform/chromium-mac/rubberbanding/overhang-w.html
* WebCore.exp.in:
* platform/ScrollableArea.h:
* testing/Internals.cpp:
(WebCore::Internals::setScrollViewPosition):
* testing/Internals.h:
* testing/Internals.idl:
2011-09-07 David Reveman <reveman@chromium.org>
[Chromium] Render surface anti-aliasing.
......@@ -372,7 +372,9 @@ __ZN7WebCore14SchemeRegistry32registerURLSchemeAsEmptyDocumentERKN3WTF6StringE
__ZN7WebCore14SchemeRegistry34shouldLoadURLSchemeAsEmptyDocumentERKN3WTF6StringE
__ZN7WebCore14ScrollableArea17willEndLiveResizeEv
__ZN7WebCore14ScrollableArea19willStartLiveResizeEv
__ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE
__ZN7WebCore14ScrollbarTheme11nativeThemeEv
__ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb
__ZN7WebCore14SecurityOrigin14threadsafeCopyEv
__ZN7WebCore14SecurityOrigin16createFromStringERKN3WTF6StringE
__ZN7WebCore14SecurityOrigin18setLocalLoadPolicyENS0_15LocalLoadPolicyE
......@@ -1320,6 +1322,7 @@ __ZNK7WebCore8Document4pageEv
__ZNK7WebCore8Document6domainEv
__ZNK7WebCore8Document6loaderEv
__ZNK7WebCore8Document8settingsEv
__ZNK7WebCore8Document4viewEv
__ZNK7WebCore8IntPointcv7CGPointEv
__ZNK7WebCore8IntPointcv8_NSPointEv
__ZNK7WebCore8Position10downstreamENS_27EditingBoundaryCrossingRuleE
......
......@@ -135,6 +135,12 @@ void ScrollableArea::handleGestureEvent(const PlatformGestureEvent& gestureEvent
}
#endif
// NOTE: Only called from Internals for testing.
void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
{
setScrollOffsetFromAnimation(offset);
}
void ScrollableArea::setScrollOffsetFromAnimation(const IntPoint& offset)
{
// Tell the derived class to scroll its contents.
......
......@@ -158,11 +158,14 @@ public:
virtual bool scrollAnimatorEnabled() const { return false; }
// NOTE: Only called from Internals for testing.
void setScrollOffsetFromInternals(const IntPoint&);
private:
// NOTE: Only called from the ScrollAnimator.
friend class ScrollAnimator;
void setScrollOffsetFromAnimation(const IntPoint&);
mutable OwnPtr<ScrollAnimator> m_scrollAnimator;
bool m_constrainsScrollingToContentEdge;
......
......@@ -32,6 +32,7 @@
#include "DocumentMarkerController.h"
#include "Element.h"
#include "ExceptionCode.h"
#include "FrameView.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLTextAreaElement.h"
......@@ -270,6 +271,24 @@ void Internals::setPasswordEchoDurationInSeconds(Document* document, double dura
document->settings()->setPasswordEchoDurationInSeconds(durationInSeconds);
}
void Internals::setScrollViewPosition(Document* document, long x, long y, ExceptionCode& ec)
{
if (!document || !document->view()) {
ec = INVALID_ACCESS_ERR;
return;
}
FrameView* frameView = document->view();
bool constrainsScrollingToContentEdgeOldValue = frameView->constrainsScrollingToContentEdge();
bool scrollbarsSuppressedOldValue = frameView->scrollbarsSuppressed();
frameView->setConstrainsScrollingToContentEdge(false);
frameView->setScrollbarsSuppressed(false);
frameView->setScrollOffsetFromInternals(IntPoint(x, y));
frameView->setScrollbarsSuppressed(scrollbarsSuppressedOldValue);
frameView->setConstrainsScrollingToContentEdge(constrainsScrollingToContentEdgeOldValue);
}
void Internals::reset(Document* document)
{
if (!document || !document->settings())
......
......@@ -81,6 +81,8 @@ public:
void setPasswordEchoEnabled(Document*, bool enabled, ExceptionCode&);
void setPasswordEchoDurationInSeconds(Document*, double durationInSeconds, ExceptionCode&);
void setScrollViewPosition(Document*, long x, long y, ExceptionCode&);
bool wasLastChangeUserEdit(Element* textField, ExceptionCode&);
String suggestedValue(Element* inputElement, ExceptionCode&);
void setSuggestedValue(Element* inputElement, const String&, ExceptionCode&);
......
......@@ -55,6 +55,8 @@ module window {
void setPasswordEchoEnabled(in Document document, in boolean enabled) raises(DOMException);
void setPasswordEchoDurationInSeconds(in Document document, in double durationInSeconds) raises(DOMException);
void setScrollViewPosition(in Document document, in long x, in long y) raises(DOMException);
boolean wasLastChangeUserEdit(in Element textField) raises (DOMException);
DOMString suggestedValue(in Element inputElement) raises (DOMException);
void setSuggestedValue(in Element inputElement, in DOMString value) raises (DOMException);
......
2011-09-07 Alexei Svitkine <asvitkine@chromium.org>
Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
https://bugs.webkit.org/show_bug.cgi?id=67511
Reviewed by Dimitri Glazkov.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2011-09-06 Oliver Hunt <oliver@apple.com>
Remove JSObjectWithGlobalObject
......
......@@ -165,6 +165,8 @@ EXPORTS
?setDisabled@MemoryCache@WebCore@@QAEX_N@Z
?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z
?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
?settings@Document@WebCore@@QBEPAVSettings@2@XZ
?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
......@@ -175,4 +177,5 @@ EXPORTS
?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVRange@1@@Z
?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXXZ
?view@Document@WebCore@@QBEPAVFrameView@2@XZ
?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ
......@@ -159,6 +159,8 @@ EXPORTS
?setDisabled@MemoryCache@WebCore@@QAEX_N@Z
?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
?setScrollOffsetFromInternals@ScrollableArea@WebCore@@QAEXABVIntPoint@2@@Z
?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
?settings@Document@WebCore@@QBEPAVSettings@2@XZ
?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
......@@ -168,4 +170,5 @@ EXPORTS
?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z
?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVRange@1@@Z
?toNode@WebCore@@YAPAVNode@1@VJSValue@JSC@@@Z
?view@Document@WebCore@@QBEPAVFrameView@2@XZ
?virtualFunctionToPreventWeakVtable@JSDOMWrapper@WebCore@@MAEXXZ
......@@ -72,7 +72,10 @@ _ZNK7WebCore6JSNode21pushEventHandlerScopeEPN3JSC9ExecStateEPNS1_14ScopeChainNod
_ZNK7WebCore7Element10shadowRootEv;
_ZNK7WebCore8Document4pageEv;
_ZNK7WebCore8Document8settingsEv;
_ZNK7WebCore8Document4viewEv;
_ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
_ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
_ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
local:
_Z*;
cti*;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment