Closed Bug 773741 Opened 8 years ago Closed 8 years ago

Cannot resize elements in Fennec that have the CSS resize property

Categories

(Core :: CSS Parsing and Computation, defect)

ARM
Android
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: mardeg, Assigned: wesj)

References

()

Details

(Keywords: testcase)

Attachments

(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.
Status: UNCONFIRMED → NEW
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

>+
>+bool
>+nsBoxFrame::GetEventPoint(nsGUIEvent* aEvent, nsPoint &aPoint) {
>+  nsIntPoint refPoint;
>+  bool res = GetEventPoint(aEvent, refPoint);
>+  aPoint = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, refPoint, this);
>+  return res;
>+}
>+
>+bool
>+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:

https://tbpl.mozilla.org/?tree=Try&rev=25176e73ff1a
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:
https://tbpl.mozilla.org/?tree=Try&rev=8e4ec4f3137c
Comment on attachment 646347 [details] [diff] [review]
tests

> function doTheTest() {
>+  textarea.style.resize = 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+
https://hg.mozilla.org/mozilla-central/rev/853e5839a8af
https://hg.mozilla.org/mozilla-central/rev/377f1998ca05
Status: NEW → RESOLVED
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.