Cannot resize elements in Fennec that have the CSS resize property

RESOLVED FIXED in mozilla17

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: Mardeg, Assigned: wesj)

Tracking

({testcase})

Trunk
mozilla17
ARM
Android
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments, 1 obsolete attachment)

494 bytes, text/html
Details
11.61 KB, patch
Neil Deakin (mostly unavailable until September)
: review+
Details | Diff | Splinter Review
8.68 KB, patch
Neil Deakin (mostly unavailable until September)
: review+
Details | Diff | Splinter Review
(Reporter)

Description

5 years ago
Created attachment 641974 [details]
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.
(Reporter)

Comment 1

5 years ago
Confirmed in IRC on 2.3.7 Gingerbread and 4.0.4 Ice-Cream Sandwich.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

5 years ago
good news. https://bugzilla.mozilla.org/show_bug.cgi?id=775151
(Reporter)

Updated

5 years ago
Duplicate of this bug: 775151
(Assignee)

Comment 4

5 years ago
Created attachment 643612 [details] [diff] [review]
Patch v1

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+
(Assignee)

Comment 6

5 years ago
Created attachment 644074 [details] [diff] [review]
Patch v2

Update nsBoxFrame methods.
Attachment #643612 - Attachment is obsolete: true
Attachment #644074 - Flags: review?(enndeakin)
The new test file is missing from the patch.
(Assignee)

Comment 8

5 years ago
Created attachment 646347 [details] [diff] [review]
tests

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)
(Assignee)

Comment 9

5 years ago
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+
(Assignee)

Comment 10

5 years ago
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+
(Assignee)

Comment 12

5 years ago
Fixed test. Inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/377f1998ca05
https://hg.mozilla.org/integration/mozilla-inbound/rev/853e5839a8af
https://hg.mozilla.org/mozilla-central/rev/853e5839a8af
https://hg.mozilla.org/mozilla-central/rev/377f1998ca05
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.