Closed Bug 773741 Opened 8 years ago Closed 8 years ago

Cannot resize elements in Fennec that have the CSS resize property


(Core :: CSS Parsing and Computation, defect)

Not set





(Reporter: mardeg, Assigned: wesj)




(Keywords: testcase)


(3 files, 1 obsolete file)

Attached file Testcase
Tested on today's Firefox mobile nightly trunk on Galaxy Nexus, Android 4.1.1 Jellybean.
The grippy appears but touching/dragging it does nothing in either the attached testcase or the linked example.
Confirmed in IRC on 2.3.7 Gingerbread and 4.0.4 Ice-Cream Sandwich.
Ever confirmed: true
Duplicate of this bug: 775151
Attached patch Patch v1 (obsolete) — Splinter Review
This works well, but its tough to tap on our current resizers. Maybe we need to increase their tappable size, or talk to ux about redesigning them.

Also, I'm betting you ask for tests.....
Attachment #643612 - Flags: review?(enndeakin)
Comment on attachment 643612 [details] [diff] [review]
Patch v1

>+nsBoxFrame::GetEventPoint(nsGUIEvent* aEvent, nsPoint &aPoint) {
>+  nsIntPoint refPoint;
>+  bool res = GetEventPoint(aEvent, refPoint);
>+  aPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, refPoint, this);
>+  return res;
>+nsBoxFrame::GetEventPoint(nsGUIEvent* aEvent, nsIntPoint &aPoint) {
>+  nsresult rv;
>+  if (aEvent->eventStructType == NS_TOUCH_EVENT) {
>+    rv = GetTouchPoint(static_cast<nsTouchEvent*>(aEvent), aPoint);
>+    if (NS_FAILED(rv))
>+       return false;

GetTouchPoint returns bool not nsresult.

You could also probably combine GetEventPoint and GetTouchPoint into one method instead. They could also be protected methods or even static.
Attachment #643612 - Flags: review?(enndeakin) → review+
Attached patch Patch v2Splinter Review
Update nsBoxFrame methods.
Attachment #643612 - Attachment is obsolete: true
Attachment #644074 - Flags: review?(enndeakin)
The new test file is missing from the patch.
Attached patch testsSplinter Review
This updates the already existing tests to use touch events as well. It also adds some helpers to EventUtils for (single) touch events. Pushed to try:
Assignee: nobody → wjohnston
Attachment #646347 - Flags: review?(enndeakin)
Whoops. I didn't realize the test_resizer_touchevents.xul bit was in there. Will pull it and push to try again.
Attachment #644074 - Flags: review?(enndeakin) → review+
Thanks neil. Second try push is still running as well, but looks ok so far:
Comment on attachment 646347 [details] [diff] [review]

> function doTheTest() {
>+ = resizeTypes[currentResize];
>+  runTest(pointerTypes[currentPointer]);

The test used to perform an iteration using the default value for 'resize'. (The comment still describes this behaviour and is now inaccurate). It would be nice to maintain this. You could do this by not setting 'resize' for the first pass, add an extra value to resizeTypes, and skip this for touch events.
Attachment #646347 - Flags: review?(enndeakin) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.