Changeset 102323 in webkit
- Timestamp:
- Dec 8, 2011 1:18:01 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r102201 r102323 1 2011-12-08 Fady Samuel <fsamuel@chromium.org> 2 3 Move scalePageBy from eventSender to window.internals 4 https://bugs.webkit.org/show_bug.cgi?id=64512 5 6 Reviewed by Simon Fraser. 7 8 * Source/autotools/symbols.filter: 9 1 10 2011-12-06 Dirk Pranke <dpranke@chromium.org> 2 11 -
trunk/LayoutTests/ChangeLog
r102322 r102323 1 2011-12-08 Fady Samuel <fsamuel@chromium.org> 2 3 Move scalePageBy from eventSender to window.internals 4 https://bugs.webkit.org/show_bug.cgi?id=64512 5 6 Reviewed by Simon Fraser. 7 8 Updated layout tests to use window.internals.setPageScaleFactor. 9 10 * compositing/geometry/fixed-position-composited-page-scale-down.html: 11 * compositing/geometry/fixed-position-composited-page-scale.html: 12 * compositing/geometry/fixed-position-iframe-composited-page-scale-down.html: 13 * compositing/geometry/fixed-position-iframe-composited-page-scale.html: 14 * compositing/geometry/fixed-position-transform-composited-page-scale-down.html: 15 * compositing/geometry/fixed-position-transform-composited-page-scale.html: 16 * compositing/scaling/tiled-layer-recursion.html: 17 * fast/dom/Element/scale-page-bounding-client-rect.html: 18 * fast/dom/Element/scale-page-client-rects.html: 19 * fast/dom/Range/scale-page-bounding-client-rect.html: 20 * fast/dom/Range/scale-page-client-rects.html: 21 * fast/events/scale-and-scroll-body.html: 22 * fast/events/scale-and-scroll-iframe-body.html: 23 * fast/events/scale-and-scroll-iframe-window.html: 24 * fast/events/scale-and-scroll-window.html: 25 * fast/events/script-tests/page-scaled-mouse-click-iframe.js: 26 (iframeLoaded): 27 * fast/events/script-tests/page-scaled-mouse-click.js: 28 * fast/events/scroll-in-scaled-page-with-overflow-hidden.html: 29 * fast/events/touch/page-scaled-touch-gesture-click.html: 30 * fast/frames/frame-set-rotation-hit.html: 31 * fast/frames/frame-set-scaling-hit.html: 32 * fast/frames/iframe-double-scale-contents.html: 33 * fast/repaint/background-scaling.html: 34 * fast/repaint/scale-page-shrink.html: 35 * fast/transforms/selection-bounds-in-transformed-view.html: 36 1 37 2011-12-08 Kenichi Ishibashi <bashi@chromium.org> 2 38 -
trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale-down.html
r100839 r102323 19 19 <script> 20 20 function scale() { 21 if (window.internals) 21 if (window.internals) { 22 22 window.internals.setEnableCompositingForFixedPosition(document, true); 23 if (window.layoutTestController) { 23 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 24 } 25 if (window.layoutTestController) 24 26 layoutTestController.dumpAsText(true); 25 eventSender.scalePageBy(0.5, 0, 0);26 }27 27 } 28 28 </script> -
trunk/LayoutTests/compositing/geometry/fixed-position-composited-page-scale.html
r100839 r102323 19 19 <script> 20 20 function scale() { 21 if (window.internals) 21 if (window.internals) { 22 22 window.internals.setEnableCompositingForFixedPosition(document, true); 23 if (window.layoutTestController) { 23 window.internals.setPageScaleFactor(document, 2, 0, 0); 24 } 25 if (window.layoutTestController) 24 26 layoutTestController.dumpAsText(true); 25 eventSender.scalePageBy(2, 0, 0);26 }27 27 } 28 28 </script> -
trunk/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale-down.html
r100839 r102323 19 19 <script> 20 20 function test() { 21 if (window.internals) 21 if (window.internals) { 22 22 window.internals.setEnableCompositingForFixedPosition(document, true); 23 if (window.layoutTestController) { 23 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 24 } 25 if (window.layoutTestController) 24 26 layoutTestController.dumpAsText(true); 25 eventSender.scalePageBy(0.5, 0, 0);26 }27 27 28 28 var d = document.getElementById('frame').contentDocument.open(); -
trunk/LayoutTests/compositing/geometry/fixed-position-iframe-composited-page-scale.html
r100839 r102323 19 19 <script> 20 20 function test() { 21 if (window.internals) 21 if (window.internals) { 22 22 window.internals.setEnableCompositingForFixedPosition(document, true); 23 if (window.layoutTestController) { 23 window.internals.setPageScaleFactor(document, 2, 0, 0); 24 } 25 if (window.layoutTestController) 24 26 layoutTestController.dumpAsText(true); 25 eventSender.scalePageBy(2, 0, 0);26 }27 27 28 28 var d = document.getElementById('frame').contentDocument.open(); -
trunk/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale-down.html
r100839 r102323 21 21 <script> 22 22 function scale() { 23 if (window.internals) 23 if (window.internals) { 24 24 window.internals.setEnableCompositingForFixedPosition(document, true); 25 if (window.layoutTestController) { 25 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 26 } 27 if (window.layoutTestController) 26 28 layoutTestController.dumpAsText(true); 27 eventSender.scalePageBy(0.5, 0, 0);28 }29 29 } 30 30 </script> -
trunk/LayoutTests/compositing/geometry/fixed-position-transform-composited-page-scale.html
r100839 r102323 21 21 <script> 22 22 function scale() { 23 if (window.internals) 23 if (window.internals) { 24 24 window.internals.setEnableCompositingForFixedPosition(document, true); 25 if (window.layoutTestController) { 25 window.internals.setPageScaleFactor(document, 2, 0, 0); 26 } 27 if (window.layoutTestController) 26 28 layoutTestController.dumpAsText(true); 27 eventSender.scalePageBy(2, 0, 0);28 }29 29 } 30 30 </script> -
trunk/LayoutTests/compositing/scaling/tiled-layer-recursion.html
r91294 r102323 17 17 function scalePage() 18 18 { 19 eventSender.scalePageBy(1.50025, 0, 0); 19 if (window.internals) 20 window.internals.setPageScaleFactor(document, 1.50025, 0, 0); 20 21 } 21 22 -
trunk/LayoutTests/fast/dom/Element/scale-page-bounding-client-rect.html
r82780 r102323 4 4 function testRects() 5 5 { 6 if (!window.layoutTestController )6 if (!window.layoutTestController || !window.internals) 7 7 return; 8 8 layoutTestController.dumpAsText(); … … 10 10 var div = document.getElementById("div"); 11 11 var rect = div.getBoundingClientRect(); 12 eventSender.scalePageBy(2,0,0);12 window.internals.setPageScaleFactor(document, 2, 0, 0); 13 13 var scaledRect = div.getBoundingClientRect(); 14 14 -
trunk/LayoutTests/fast/dom/Element/scale-page-client-rects.html
r82780 r102323 4 4 function testRects() 5 5 { 6 if (!window.layoutTestController )6 if (!window.layoutTestController || !window.internals) 7 7 return; 8 8 layoutTestController.dumpAsText(); … … 10 10 var div = document.getElementById("div"); 11 11 var rectList = div.getClientRects(); 12 eventSender.scalePageBy(2,0,0);12 window.internals.setPageScaleFactor(document, 2, 0, 0); 13 13 var scaledRectList = div.getClientRects(); 14 14 -
trunk/LayoutTests/fast/dom/Range/scale-page-bounding-client-rect.html
r82780 r102323 4 4 function testRects() 5 5 { 6 if (!window.layoutTestController )6 if (!window.layoutTestController || !window.internals) 7 7 return; 8 8 layoutTestController.dumpAsText(); … … 12 12 var rect = range.getBoundingClientRect(); 13 13 14 eventSender.scalePageBy(2,0,0);14 window.internals.setPageScaleFactor(document, 2, 0, 0); 15 15 var scaledRange = document.createRange(); 16 16 scaledRange.selectNodeContents(document.getElementById('div')); -
trunk/LayoutTests/fast/dom/Range/scale-page-client-rects.html
r82780 r102323 4 4 function testRects() 5 5 { 6 if (!window.layoutTestController )6 if (!window.layoutTestController || !window.internals) 7 7 return; 8 8 layoutTestController.dumpAsText(); … … 13 13 var rect = rectList[0]; 14 14 15 eventSender.scalePageBy(2,0,0);15 window.internals.setPageScaleFactor(document, 2, 0, 0); 16 16 var scaledRange = document.createRange(); 17 17 scaledRange.selectNodeContents(document.getElementById('div')); -
trunk/LayoutTests/fast/events/scale-and-scroll-body.html
r95715 r102323 11 11 12 12 function scroll() { 13 // The page scale, as set by EventSender.scalePageByshould not be apparent13 // The page scale, as set by window.internals.setPageScaleFactor should not be apparent 14 14 // to javascript. So, we expect scrolling to (100,100) to be page coordinates, rather 15 15 // than device pixels. … … 26 26 var scaleFactor = 2.0; 27 27 var scaleOffset = 0; 28 if (window. eventSender) {29 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);28 if (window.internals) { 29 window.internals.setPageScaleFactor(document, scaleFactor, scaleOffset, scaleOffset); 30 30 } 31 31 } -
trunk/LayoutTests/fast/events/scale-and-scroll-iframe-body.html
r95715 r102323 25 25 var scaleFactor = 0.5; 26 26 var scaleOffset = 0; 27 if (window. eventSender) {28 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);27 if (window.internals) { 28 window.internals.setPageScaleFactor(document, scaleFactor, scaleOffset, scaleOffset); 29 29 } 30 30 } -
trunk/LayoutTests/fast/events/scale-and-scroll-iframe-window.html
r95715 r102323 24 24 var scaleFactor = 0.5; 25 25 var scaleOffset = 0; 26 if (window. eventSender) {27 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);26 if (window.internals) { 27 window.internals.setPageScaleFactor(document, scaleFactor, scaleOffset, scaleOffset); 28 28 } 29 29 } -
trunk/LayoutTests/fast/events/scale-and-scroll-window.html
r95715 r102323 11 11 12 12 function scroll() { 13 // The page scale, as set by EventSender.scalePageByshould not be apparent13 // The page scale, as set by window.internals.setPageScaleFactor should not be apparent 14 14 // to javascript. So, we expect scrolling to (100,100) to be page coordinates, rather 15 15 // than device pixels. … … 25 25 var scaleFactor = 2.0; 26 26 var scaleOffset = 0; 27 if (window. eventSender) {28 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);27 if (window.internals) { 28 window.internals.setPageScaleFactor(document, scaleFactor, scaleOffset, scaleOffset); 29 29 } 30 30 } -
trunk/LayoutTests/fast/events/script-tests/page-scaled-mouse-click-iframe.js
r98407 r102323 53 53 iframe.contentWindow.document.body.insertBefore(div, iframe.contentWindow.document.body.firstChild); 54 54 55 if (window.eventSender ) {55 if (window.eventSender && window.internals) { 56 56 eventSender.mouseMoveTo(10, 10); 57 57 // We are clicking in the same position on screen. As we scale or transform the page, … … 61 61 testEvents(0, "Unscaled", "click(10, 10)"); 62 62 63 eventSender.scalePageBy(0.5, 0, 0);63 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 64 64 testEvents(0, "setPageScale(0.5)", "click(20, 20)"); 65 65 66 eventSender.scalePageBy(1.0, 0, 0);66 window.internals.setPageScaleFactor(document, 1.0, 0, 0); 67 67 html.style["-webkit-transform"] = "scale(0.5, 2.0)"; 68 68 html.style["-webkit-transform-origin"] = "0 0"; 69 69 testEvents(0, "CSS scale(0.5, 2.0)", "click(20, 5)"); 70 70 71 eventSender.scalePageBy(0.5, 0, 0);71 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 72 72 testEvents(0, "setPageScale(0.5), CSS scale(0.5, 2.0)", "click(40, 10)"); 73 73 } -
trunk/LayoutTests/fast/events/script-tests/page-scaled-mouse-click.js
r98407 r102323 44 44 } 45 45 46 if (window.eventSender ) {46 if (window.eventSender && window.internals) { 47 47 eventSender.mouseMoveTo(10, 10); 48 48 // We are clicking in the same position on screen. As we scale or transform the page, … … 51 51 testEvents(0, "Unscaled", "click(10, 10)"); 52 52 53 eventSender.scalePageBy(0.5, 0, 0);53 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 54 54 testEvents(0, "setPageScale(0.5)", "click(20, 20)"); 55 55 } -
trunk/LayoutTests/fast/events/scroll-in-scaled-page-with-overflow-hidden.html
r97881 r102323 23 23 document.body.offsetLeft; 24 24 25 if (window. eventSender)26 eventSender.scalePageBy(2, 0, 0);25 if (window.internals) 26 window.internals.setPageScaleFactor(document, 2, 0, 0); 27 27 28 28 shouldBe("window.document.body.scrollTop", "0"); -
trunk/LayoutTests/fast/events/touch/page-scaled-touch-gesture-click.html
r99220 r102323 84 84 85 85 function runTest() { 86 if (window. eventSender) {87 eventSender.scalePageBy(0.5, 0, 0);86 if (window.internals) { 87 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 88 88 } 89 89 -
trunk/LayoutTests/fast/frames/frame-set-rotation-hit.html
r96385 r102323 5 5 <script> 6 6 function init() { 7 if (!window.eventSender )7 if (!window.eventSender || !window.internals) 8 8 return; 9 9 // Scale the page and resize the frames to verify hit testing on the frameset 10 eventSender.scalePageBy(0.5, 0, 0);10 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 11 11 var leftPanelWidth = window.innerWidth / 8; 12 12 eventSender.mouseMoveTo(window.innerWidth / 4, leftPanelWidth); -
trunk/LayoutTests/fast/frames/frame-set-scaling-hit.html
r96385 r102323 5 5 <script> 6 6 function init() { 7 if (!window.eventSender )7 if (!window.eventSender || !window.internals) 8 8 return; 9 9 // Scale the page and resize the frames to verify hit testing on the frameset 10 10 var leftPanelWidth = window.innerWidth / 8; 11 eventSender.scalePageBy(0.5, 0, 0);11 window.internals.setPageScaleFactor(document, 0.5, 0, 0); 12 12 eventSender.mouseMoveTo(leftPanelWidth, window.innerHeight / 4); 13 13 eventSender.mouseDown(); -
trunk/LayoutTests/fast/frames/iframe-double-scale-contents.html
r98637 r102323 23 23 function scalePage(scaleFactor) { 24 24 var scaleOffset = 0; 25 if (window. eventSender) {26 eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);25 if (window.internals) { 26 window.internals.setPageScaleFactor(document, scaleFactor, scaleOffset, scaleOffset); 27 27 } 28 28 } -
trunk/LayoutTests/fast/repaint/background-scaling.html
r92417 r102323 5 5 function repaintTest() 6 6 { 7 if (window. layoutTestController)8 eventSender.scalePageBy(0.2,0,0);7 if (window.internals) 8 window.internals.setPageScaleFactor(document, 0.25, 0, 0); 9 9 } 10 10 </script> -
trunk/LayoutTests/fast/repaint/scale-page-shrink.html
r83140 r102323 5 5 function repaintTest() 6 6 { 7 if (window. layoutTestController)8 eventSender.scalePageBy(0.2,0,0);7 if (window.internals) 8 window.internals.setPageScaleFactor(document, 0.25, 0, 0); 9 9 } 10 10 </script> -
trunk/LayoutTests/fast/transforms/selection-bounds-in-transformed-view.html
r84454 r102323 5 5 <div style="height: 1000px;"></div> 6 6 <script> 7 if (window.layoutTestController ) {7 if (window.layoutTestController && window.internals) { 8 8 layoutTestController.dumpAsText(); 9 10 eventSender.scalePageBy(2, 0, 0); 9 window.internals.setPageScaleFactor(document, 2, 0, 0); 11 10 } 12 11 -
trunk/Source/WebCore/ChangeLog
r102321 r102323 1 2011-12-08 Fady Samuel <fsamuel@chromium.org> 2 3 Move scalePageBy from eventSender to window.internals 4 https://bugs.webkit.org/show_bug.cgi?id=64512 5 6 Reviewed by Simon Fraser. 7 8 Added setPageScaleFactor to window.internals. 9 Renamed window.internals.getPageScaleFactor to window.internals.pageScaleFactor 10 to match the webkit style. 11 12 * testing/Internals.cpp: 13 (WebCore::Internals::pageScaleFactor): 14 (WebCore::Internals::setPageScaleFactor): 15 * testing/Internals.h: 16 * testing/Internals.idl: 17 1 18 2011-12-08 Kentaro Hara <haraken@chromium.org> 2 19 -
trunk/Source/WebCore/testing/Internals.cpp
r102231 r102323 365 365 } 366 366 367 float Internals::getPageScaleFactor(Document *document, ExceptionCode& ec)368 {369 if (!document || !document->page()) {370 ec = INVALID_ACCESS_ERR;371 return 0;372 }373 374 return document->page()->pageScaleFactor();375 }376 377 367 void Internals::setZoomParameters(Document* document, float scale, float x, float y, ExceptionCode& ec) 378 368 { … … 628 618 } 629 619 620 float Internals::pageScaleFactor(Document *document, ExceptionCode& ec) 621 { 622 if (!document || !document->page()) { 623 ec = INVALID_ACCESS_ERR; 624 return 0; 625 } 626 627 return document->page()->pageScaleFactor(); 628 } 629 630 void Internals::setPageScaleFactor(Document* document, float scaleFactor, int x, int y, ExceptionCode& ec) 631 { 632 if (!document || !document->page()) { 633 ec = INVALID_ACCESS_ERR; 634 return; 635 } 636 document->page()->setPageScaleFactor(scaleFactor, IntPoint(x, y)); 637 } 638 630 639 int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionCode& ec) 631 640 { -
trunk/Source/WebCore/testing/Internals.h
r102231 r102323 84 84 void setEnableScrollAnimator(Document*, bool enabled, ExceptionCode&); 85 85 void setZoomAnimatorTransform(Document*, float scale, float tx, float ty, ExceptionCode&); 86 float getPageScaleFactor(Document*, ExceptionCode&);87 86 void setZoomParameters(Document*, float scale, float x, float y, ExceptionCode&); 88 87 … … 113 112 int lastSpellCheckRequestSequence(Document*, ExceptionCode&); 114 113 int lastSpellCheckProcessedSequence(Document*, ExceptionCode&); 114 115 float pageScaleFactor(Document*, ExceptionCode&); 116 void setPageScaleFactor(Document*, float scaleFactor, int x, int y, ExceptionCode&); 115 117 116 118 static const char* internalsId; -
trunk/Source/WebCore/testing/Internals.idl
r102231 r102323 56 56 void setEnableScrollAnimator(in Document document, in boolean enabled) raises(DOMException); 57 57 void setZoomAnimatorTransform(in Document document, in float scale, in float tx, in float ty) raises(DOMException); 58 float getPageScaleFactor(in Document document) raises(DOMException);59 58 void setZoomParameters(in Document document, in float scale, in float x, in float y) raises(DOMException); 60 59 void setMockScrollbarsEnabled(in Document document, in boolean enabled) raises(DOMException); … … 85 84 long lastSpellCheckRequestSequence(in Document document) raises (DOMException); 86 85 long lastSpellCheckProcessedSequence(in Document document) raises (DOMException); 86 87 float pageScaleFactor(in Document document) raises(DOMException); 88 void setPageScaleFactor(in Document document, in float scaleFactor, in long x, in long y) raises(DOMException); 87 89 }; 88 90 } -
trunk/Source/WebKit2/ChangeLog
r102319 r102323 1 2011-12-08 Fady Samuel <fsamuel@chromium.org> 2 3 Move scalePageBy from eventSender to window.internals 4 https://bugs.webkit.org/show_bug.cgi?id=64512 5 6 Reviewed by Simon Fraser. 7 8 * win/WebKit2.def: 9 * win/WebKit2CFLite.def: 10 1 11 2011-12-07 Mark Rowe <mrowe@apple.com> 2 12 -
trunk/Source/WebKit2/win/WebKit2.def
r101875 r102323 173 173 ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z 174 174 ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z 175 ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z 175 176 ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z 176 177 ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r101875 r102323 166 166 ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z 167 167 ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z 168 ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z 168 169 ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z 169 170 ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z -
trunk/Source/autotools/symbols.filter
r101875 r102323 27 27 _ZN3WTF7CStringaSERKS0_; 28 28 _ZN24DumpRenderTreeSupportGtk*; 29 _ZN7WebCore4Page18setPageScaleFactorEfRKNS_8IntPointE; 29 30 _ZN7WebCore4Page13setPaginationERKNS0_10PaginationE; 30 31 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ClientRectE;
Note: See TracChangeset
for help on using the changeset viewer.