Bug 63073 - Adding version of fast/events/offsetX-offsetY.html without text run or line height deps
Summary: Adding version of fast/events/offsetX-offsetY.html without text run or line h...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matthew Delaney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 08:54 PDT by Matthew Delaney
Modified: 2011-06-21 10:47 PDT (History)
2 users (show)

See Also:


Attachments
Patch (10.11 KB, patch)
2011-06-21 09:11 PDT, Matthew Delaney
no flags Details | Formatted Diff | Diff
Patch (9.54 KB, patch)
2011-06-21 10:33 PDT, Matthew Delaney
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>