[webkit-reviews] review denied: [Bug 32077] textarea grows when you type : [Attachment 50190] patch v0

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 8 00:04:15 PST 2010


mitz at webkit.org has denied MORITA Hajime <morrita at google.com>'s request for
review:
Bug 32077: textarea grows when you type
https://bugs.webkit.org/show_bug.cgi?id=32077

Attachment 50190: patch v0
https://bugs.webkit.org/attachment.cgi?id=50190&action=review

------- Additional Comments from mitz at webkit.org
It is incorrect to fix up the layout root during FrameView::layout() like this.
The repeated calls to setNeedsLayout(), which dirties ancestor, from within
walkToLayoutSafeAscent() make no sense to me. It seems like you may end up
marking all the way to the RenderView but still return one of its descendants
as the new layout root, and consequently end up with a dirty tree after layout.


If the textarea cannot be the layout root, the right place to fix this is in
isRelayoutBoundary(), not after the fact.

However, I don’t see why the texture cannot be the layout root, as anything
inside the textarea cannot affect the layout of anything outside it. The
problem here is that the height calculation is performed for the textarea when
its containers are already laid out and have their final widths, leading to
different results (only because of the quirk that allows percentage heights to
be computed based off the height of the auto-height body element, and it’s
questionable if even that should work the way it does). To fix this, you should
do something similar to what RenderBox::calcWidth() does (for similar reasons).
I don’t think the exact same thing in RenderBox::calcHeight() will work, but
you can ensure that RenderBlock::layout() restores the height to its previous
value (and skips the call to calcHeight()) if this is the layout root.


More information about the webkit-reviews mailing list