Bug 63073

Summary: Adding version of fast/events/offsetX-offsetY.html without text run or line height deps
Product: WebKit Reporter: Matthew Delaney <mdelaney7>
Component: Tools / TestsAssignee: Matthew Delaney <mdelaney7>
Status: RESOLVED FIXED    
Severity: Normal CC: joepeck, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch simon.fraser: review+

Description Matthew Delaney 2011-06-21 08:54:30 PDT
Adding in new version of fast/events/offsetX-offsetY.html that does not depend on text runs and line-height for the position of the targets.

Since other ports may still have a use for the original test, I'll probably just leave it alone in this patch.
Comment 1 Matthew Delaney 2011-06-21 09:11:56 PDT
Created attachment 97994 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-06-21 10:14:13 PDT
Comment on attachment 97994 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=97994&action=review

> LayoutTests/fast/events/document-elementFromPoint.html:216
> +    document.body.ontouchstart = function(e) {
> +        var touch = e.touches[0];
> +        var resultBox = document.getElementById('mouse-position');
> +        var clientRect = e.target.getBoundingClientRect();
> +        var offsets = 'element id: ' + e.target.id + '<br>';
> +        offsets += 'clientX: ' + touch.clientX + ' clientY: ' + touch.clientY + '<br>';
> +        offsets += '~offsetX: ' + (clientRect.left - touch.clientX) + ' ~offsetY: ' + (clientRect.top - touch.clientY);
> +        resultBox.innerHTML = offsets;
> +        // Do not prevent default, so we can scroll.
> +    }

Remove this.
Comment 3 Matthew Delaney 2011-06-21 10:33:29 PDT
Created attachment 98007 [details]
Patch
Comment 4 Matthew Delaney 2011-06-21 10:47:58 PDT
Committed r89363: <http://trac.webkit.org/changeset/89363>