[webkit-reviews] review granted: [Bug 98034] Add more tests for calendar picker : [Attachment 166485] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 1 17:26:07 PDT 2012


Kent Tamura <tkent at chromium.org> has granted Keishi Hattori
<keishi at webkit.org>'s request for review:
Bug 98034: Add more tests for calendar picker
https://bugs.webkit.org/show_bug.cgi?id=98034

Attachment 166485: Patch
https://bugs.webkit.org/attachment.cgi?id=166485&action=review

------- Additional Comments from Kent Tamura <tkent at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=166485&action=review


ok.

> LayoutTests/fast/forms/date/calendar-picker-mouse-operations.html:79
> +function cumulativeOffset(element) {
> +    var x = 0;
> +    var y = 0;
> +    var parentFrame = element.ownerDocument.defaultView.frameElement;
> +    if (parentFrame) {
> +	   var parentFrameOffset = cumulativeOffset(parentFrame);
> +	   x = parentFrameOffset[0];
> +	   y = parentFrameOffset[1];
> +    }
> +    if (element.parentNode) {
> +	   do {
> +	       x += element.offsetLeft || 0;
> +	       y += element.offsetTop  || 0;
> +	       element = element.offsetParent;
> +	   } while (element);
> +    }
> +    return [x, y];
> +}
> +
> +function hoverOverElement(element) {
> +    var offset = cumulativeOffset(element);
> +    var centerX = offset[0] + element.offsetWidth / 2;
> +    var centerY = offset[1] + element.offsetHeight / 2;
> +    eventSender.mouseMoveTo(centerX, centerY);
> +}
> +
> +function clickElement(element) {

I remember another test has these functions. Don't you share them?


More information about the webkit-reviews mailing list