Last Comment Bug 553576 - Implement css resize property behaviour
: Implement css resize property behaviour
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: -- normal with 2 votes (vote)
: ---
Assigned To: Neil Deakin
:
Mentors:
http://www.w3.org/TR/2004/CR-css3-ui-...
: 555024 577455 (view as bug list)
Depends on: 442228 773741
Blocks: 555482
  Show dependency treegraph
 
Reported: 2010-03-19 06:35 PDT by Neil Deakin
Modified: 2012-07-13 11:29 PDT (History)
24 users (show)
enndeakin: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
beta2+


Attachments
change -moz-resize to resize (16.97 KB, patch)
2010-07-02 12:12 PDT, Neil Deakin
dbaron: review+
Details | Diff | Splinter Review

Description Neil Deakin 2010-03-19 06:35:12 PDT
Currently, in bug 442228, we implement -moz-resize which allows elements to be resizable. However, this is implemented just by changing the width/height style or attributes. The css 'resize' property requires that some internal scaling factor be used instead.
Comment 1 Jeff Muizelaar [:jrmuizel] 2010-03-25 12:53:38 PDT
*** Bug 555024 has been marked as a duplicate of this bug. ***
Comment 2 Neil Deakin 2010-03-25 13:20:41 PDT
So it looks like Safari is just setting style.width and style.height as we do, but using the 'resize' property. (as well as, oddly, all four margin properties) Maybe we should just use 'resize' instead of '-moz-resize' anyway and just make changing style.width and style.height the right way.
Comment 3 :Ehsan Akhgari 2010-04-02 07:24:16 PDT
Reading the spec, the only place where our implementation is against it is that we don't reset the resize factor to 1.0 when the resize property is changed.  Here is an eample:

data:text/html,<textarea></textarea><script>setTimeout(function(){document.querySelector("textarea").style.MozResize="none";},5000);</script>

I think we can rename the property once we solve this.  We don't actually need to store a resize factor, we can just store the original computed width and height and then reset the dimensions when the resize property changes.

That said, I tested this in Chrome, and it has the same bug.
Comment 4 d 2010-04-02 07:52:19 PDT
Sounds good to me. One thing that that struck me is that having a function to automatically switch back to the original size would be useful, as it might break the layout if it's resized in any way (and finding the original size manually, might be hard). We have a few options if we want to do that, that I can think of:

1. As soon as the resizer is used to change the size, a new option appears in the right-click menu of the form, or perhaps only the resizer itself.
2. Doubleclicking the resizer-grip restores the original size.

Out of these two, I prefer the second one, if only one had to be chosen, but a right-click menu option would be good to complete it.

No matter what, though, it probably belongs in a new bug. What do you think?
Comment 5 Robert Sayre 2010-04-02 08:44:27 PDT
I think this blocks 1.9.3 because resizable text boxes need resize: none on lots of sites. See facebook.com and twitter.com, for example.
Comment 6 d 2010-04-02 09:14:47 PDT
I found bug 555482 just now, and has posted my last comment in there, instead.
Comment 7 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-18 14:31:48 PDT
(In reply to comment #5)
> I think this blocks 1.9.3 because resizable text boxes need resize: none on
> lots of sites. See facebook.com and twitter.com, for example.

How does switching the mechanism we use for the resizing away from changing style.width and height affect these sites?
Comment 8 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-06-18 14:37:59 PDT
So if we're confident we're compatible with Safari, and Safari uses 'resize' rather than something prefixed, then I think it's fine for us to drop the prefix as well, since it's not spoiling any ability that the working group has to change the spec.
Comment 9 Damon Sicore (:damons) 2010-06-18 14:41:35 PDT
Bumping this to beta2 per beta re-triage with dbaron and sayre.  If this should indeed block beta1, please re-nom.
Comment 10 Neil Deakin 2010-07-02 12:12:48 PDT
Created attachment 455740 [details] [diff] [review]
change -moz-resize to resize
Comment 11 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2010-07-02 13:40:56 PDT
Comment on attachment 455740 [details] [diff] [review]
change -moz-resize to resize

r=dbaron
Comment 14 Boris Zbarsky [:bz] 2010-07-08 02:47:52 PDT
*** Bug 577455 has been marked as a duplicate of this bug. ***
Comment 15 salvador.mazza33 2010-07-08 12:35:53 PDT
When I re-size the field that says: "What 's on Your mind?" in it, placed near the top of the page in Facebook.com, a large part of the page appears in blank and if I re-size the field to the left, the drag indicator gets to the middle of It. Is this bug about the one reported in here?

Note You need to log in before you can comment on or make changes to this bug.