Bug 124963

Summary: [CSS Regions] Fix Layout/RegionsSelection.html in Mac platform
Product: WebKit Reporter: Manuel Rego Casasnovas <rego>
Component: Tools / TestsAssignee: Manuel Rego Casasnovas <rego>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jfernandez, mihnea, rniwa, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 124281    
Attachments:
Description Flags
Patch
none
Patch none

Description Manuel Rego Casasnovas 2013-11-28 01:55:40 PST
The performance test Layout/RegionsSelection.html introduced in r159488 is not working properly in Mac platform.

In Mac it takes just a few milliseconds to run the test, while in GTK+ and Blink (Linux) it takes more than 1 second (of course depending on the the machine).

It seems that the test actually is not selecting anything due to mouse events being done out of the window dimensions.

I think we should use setBaseAndExtent() to fix this test and in the future if we think it's needed we could add a new test that fits in the window size performing selection using mouse events.
Comment 1 Manuel Rego Casasnovas 2013-11-28 01:57:28 PST
Created attachment 217987 [details]
Patch
Comment 2 Ryosuke Niwa 2013-12-03 13:19:37 PST
Comment on attachment 217987 [details]
Patch

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

> PerformanceTests/Layout/resources/regions.js:95
> +            window.getSelection().setBaseAndExtent(paragraphs[0], 0, paragraphs[i], 0);

setBaseAndExtent is a non-standard API so perhaps we want to use collapse & extend?
Also, we don't need "window.".
Comment 3 Manuel Rego Casasnovas 2013-12-03 13:42:19 PST
Created attachment 218335 [details]
Patch
Comment 4 WebKit Commit Bot 2013-12-03 14:32:31 PST
Comment on attachment 218335 [details]
Patch

Clearing flags on attachment: 218335

Committed r160041: <http://trac.webkit.org/changeset/160041>
Comment 5 WebKit Commit Bot 2013-12-03 14:32:33 PST
All reviewed patches have been landed.  Closing bug.