Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(899)

Issue 239983004: Textarea resize-able only to larger; min-height and min-width properly set (Closed)

Created:
6 years, 8 months ago by harpreet.sk
Modified:
6 years, 7 months ago
CC:
blink-reviews, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, blink-layers+watch_chromium.org, jchaffraix+rendering, pdr., rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Textarea resize-able only to larger; min-height and min-width properly set Textarea does not respect the min-height and min-width property when they are set by user. When textarea min-height and min-width is set by the user and if we resize textarea it will only resize to value larger than the width and heght of textarea and not with value smaller than it's width and height. It assumes width and height as min-width and min height and does not take into account the actual min-width and min-height set by user. This patch removes this bug by initializing the setMinimumSizeForResizing value with min-width and min-height. BUG=94583 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173269

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressing the changes asked in comments in patch set 1 #

Total comments: 15

Patch Set 3 : Addresses the changes asked in patch set 2 #

Total comments: 21

Patch Set 4 : Addresses the changes asked in patch set 3 #

Total comments: 9

Patch Set 5 : Addressing the changes asked in patch set 4 #

Total comments: 10

Patch Set 6 : Addresses the changes asked in patch set 5 #

Total comments: 1

Patch Set 7 : Rebase and added shouldBeEqualToString() instead of shouldBe() in LayoutTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -29 lines) Patch
A LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html View 1 2 3 4 5 6 1 chunk +52 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock-expected.txt View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/textarea-resize-above-min-size-set-and-below-initial-size.html View 1 2 3 4 5 6 1 chunk +66 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/textarea-resize-above-min-size-set-and-below-initial-size-expected.txt View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size.html View 1 2 3 4 5 6 1 chunk +49 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size-expected.txt View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/textarea-resize-below-min-size-set.html View 1 2 3 4 5 6 1 chunk +78 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/textarea-resize-below-min-size-set-expected.txt View 1 2 3 4 5 1 chunk +15 lines, -0 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 5 6 1 chunk +0 lines, -12 lines 0 comments Download
M Source/core/dom/ElementRareData.h View 1 2 3 3 chunks +0 lines, -10 lines 0 comments Download
M Source/core/dom/ElementRareData.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderLayerScrollableArea.cpp View 1 2 3 4 5 6 4 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
harpreet.sk
Please have a look.
6 years, 8 months ago (2014-04-16 07:24:22 UTC) #1
tkent
Julien would be the best person to review this change.
6 years, 8 months ago (2014-04-16 14:05:50 UTC) #2
Julien - ping for review
I expect the 2 previous bugs to be covered by a test in the follow-up ...
6 years, 8 months ago (2014-04-18 17:04:08 UTC) #3
esprehn
This allows resizing the textarea to 0, we don't support that on purpose since once ...
6 years, 8 months ago (2014-04-18 17:09:26 UTC) #4
harpreet.sk
https://codereview.chromium.org/239983004/diff/1/Source/core/rendering/RenderLayerScrollableArea.cpp File Source/core/rendering/RenderLayerScrollableArea.cpp (right): https://codereview.chromium.org/239983004/diff/1/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode97 Source/core/rendering/RenderLayerScrollableArea.cpp:97: element->setMinimumSizeForResizing(LayoutSize(LayoutUnit(m_box->style()->logicalMinWidth().value()), LayoutUnit(m_box->style()->logicalMinHeight().value()))); On 2014/04/18 17:04:08, Julien Chaffraix - PST ...
6 years, 8 months ago (2014-04-21 13:21:55 UTC) #5
harpreet.sk
On 2014/04/18 17:04:08, Julien Chaffraix - PST wrote: > I expect the 2 previous bugs ...
6 years, 8 months ago (2014-04-21 13:25:02 UTC) #6
harpreet.sk
On 2014/04/18 17:09:26, esprehn wrote: > This allows resizing the textarea to 0, we don't ...
6 years, 8 months ago (2014-04-21 13:32:06 UTC) #7
Julien - ping for review
https://codereview.chromium.org/239983004/diff/20001/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html File LayoutTests/fast/forms/textarea-resize-min-width-min-height.html (right): https://codereview.chromium.org/239983004/diff/20001/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html#newcode2 LayoutTests/fast/forms/textarea-resize-min-width-min-height.html:2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> We prefer to use the HTML5 doctype (easier ...
6 years, 8 months ago (2014-04-21 17:46:46 UTC) #8
esprehn
On 2014/04/21 17:46:46, Julien Chaffraix - PST wrote: > ... > https://codereview.chromium.org/239983004/diff/20001/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode728 > Source/core/rendering/RenderLayerScrollableArea.cpp:728: > ...
6 years, 8 months ago (2014-04-21 17:55:11 UTC) #9
harpreet.sk
https://codereview.chromium.org/239983004/diff/20001/Source/core/rendering/RenderLayerScrollableArea.cpp File Source/core/rendering/RenderLayerScrollableArea.cpp (right): https://codereview.chromium.org/239983004/diff/20001/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode728 Source/core/rendering/RenderLayerScrollableArea.cpp:728: element->setMinimumSizeForResizing(LayoutSize(minimumWidth, minimumHeight)); On 2014/04/21 17:46:46, Julien Chaffraix - PST ...
6 years, 8 months ago (2014-04-22 13:56:35 UTC) #10
Julien - ping for review
https://codereview.chromium.org/239983004/diff/20001/Source/core/rendering/RenderLayerScrollableArea.cpp File Source/core/rendering/RenderLayerScrollableArea.cpp (right): https://codereview.chromium.org/239983004/diff/20001/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode728 Source/core/rendering/RenderLayerScrollableArea.cpp:728: element->setMinimumSizeForResizing(LayoutSize(minimumWidth, minimumHeight)); On 2014/04/22 13:56:36, harpreet.sk wrote: > On ...
6 years, 8 months ago (2014-04-22 22:35:12 UTC) #11
harpreet.sk
https://codereview.chromium.org/239983004/diff/20001/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html File LayoutTests/fast/forms/textarea-resize-min-width-min-height.html (right): https://codereview.chromium.org/239983004/diff/20001/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html#newcode2 LayoutTests/fast/forms/textarea-resize-min-width-min-height.html:2: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> On 2014/04/21 17:46:46, Julien Chaffraix - PST wrote: ...
6 years, 8 months ago (2014-04-24 15:28:27 UTC) #12
Julien - ping for review
This is starting to look good. Some more comments. https://codereview.chromium.org/239983004/diff/30001/LayoutTests/fast/forms/textarea-resize-below-min-size-set.html File LayoutTests/fast/forms/textarea-resize-below-min-size-set.html (right): https://codereview.chromium.org/239983004/diff/30001/LayoutTests/fast/forms/textarea-resize-below-min-size-set.html#newcode53 LayoutTests/fast/forms/textarea-resize-below-min-size-set.html:53: ...
6 years, 8 months ago (2014-04-24 21:49:04 UTC) #13
harpreet.sk
https://codereview.chromium.org/239983004/diff/30001/LayoutTests/fast/forms/textarea-resize-below-min-size-set.html File LayoutTests/fast/forms/textarea-resize-below-min-size-set.html (right): https://codereview.chromium.org/239983004/diff/30001/LayoutTests/fast/forms/textarea-resize-below-min-size-set.html#newcode53 LayoutTests/fast/forms/textarea-resize-below-min-size-set.html:53: if ((draggable.style.width == "194px") && (draggable.style.height == "194px")) On ...
6 years, 8 months ago (2014-04-25 13:33:48 UTC) #14
harpreet.sk
https://codereview.chromium.org/239983004/diff/40001/LayoutTests/fast/forms/textarea-resize-below-min-size-set.html File LayoutTests/fast/forms/textarea-resize-below-min-size-set.html (right): https://codereview.chromium.org/239983004/diff/40001/LayoutTests/fast/forms/textarea-resize-below-min-size-set.html#newcode61 LayoutTests/fast/forms/textarea-resize-below-min-size-set.html:61: if ((draggable.style.width == "114px") && (draggable.style.height == "84px")) Ideally ...
6 years, 8 months ago (2014-04-25 13:36:15 UTC) #15
Julien - ping for review
https://codereview.chromium.org/239983004/diff/30001/Source/core/rendering/RenderLayerScrollableArea.cpp File Source/core/rendering/RenderLayerScrollableArea.cpp (right): https://codereview.chromium.org/239983004/diff/30001/Source/core/rendering/RenderLayerScrollableArea.cpp#newcode730 Source/core/rendering/RenderLayerScrollableArea.cpp:730: minimumHeight = valueForLength(m_box->style()->logicalMinHeight(), m_box->parentBox()->logicalHeight()); On 2014/04/25 13:33:48, harpreet.sk wrote: ...
6 years, 7 months ago (2014-04-28 17:07:29 UTC) #16
harpreet.sk
Added the orthogonal flow test and made the changes asked in previous patch. https://codereview.chromium.org/239983004/diff/40001/Source/core/rendering/RenderLayerScrollableArea.cpp File ...
6 years, 7 months ago (2014-04-29 08:57:42 UTC) #17
Julien - ping for review
lgtm The comments on the last test apply to all the tests. I would like ...
6 years, 7 months ago (2014-04-29 22:13:54 UTC) #18
harpreet.sk
https://codereview.chromium.org/239983004/diff/60001/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html File LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html (right): https://codereview.chromium.org/239983004/diff/60001/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html#newcode46 LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html:46: <textarea style="width:400px; height:400px; min-width:10%; min-height:10%" id="textInputID"> On 2014/04/29 22:13:54, ...
6 years, 7 months ago (2014-04-30 10:12:52 UTC) #19
harpreet.sk
6 years, 7 months ago (2014-05-02 14:51:30 UTC) #20
Julien - ping for review
lgtm https://codereview.chromium.org/239983004/diff/80001/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html File LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html (right): https://codereview.chromium.org/239983004/diff/80001/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html#newcode48 LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html:48: shouldBe('document.getElementById("textInputID").style.height;', '"74px"'); FYI for next change, there is ...
6 years, 7 months ago (2014-05-02 16:26:22 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/239983004/80001
6 years, 7 months ago (2014-05-02 16:26:46 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-02 16:26:56 UTC) #23
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderLayerScrollableArea.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-05-02 16:26:57 UTC) #24
harpreet.sk
The CQ bit was checked by harpreet.sk@samsung.com
6 years, 7 months ago (2014-05-03 07:56:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/harpreet.sk@samsung.com/239983004/100001
6 years, 7 months ago (2014-05-03 07:56:43 UTC) #26
commit-bot: I haz the power
Change committed as 173269
6 years, 7 months ago (2014-05-04 04:40:03 UTC) #27
tkent
6 years, 6 months ago (2014-06-15 23:37:46 UTC) #28
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/336143002/ by tkent@chromium.org.

The reason for reverting is: Regression for RTL textareas.

BUG=94583,371743
.

Powered by Google App Engine
This is Rietveld 408576698