Changeset 17543 in webkit
- Timestamp:
- Nov 2, 2006 1:37:46 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r17538 r17543 1 2006-11-02 Adele Peterson <adele@apple.com> 2 3 Reviewed by Mitz and Geoff. 4 5 Test for <rdar://problem/4650271> REGRESSION(NativeTextArea): Textareas don't get scrollbars when text gets too big for content area (10105) 6 7 * fast/forms/textarea-scrollbar-expected.checksum: Added. 8 * fast/forms/textarea-scrollbar-expected.png: Added. 9 * fast/forms/textarea-scrollbar-expected.txt: Added. 10 * fast/forms/textarea-scrollbar.html: Added. 11 1 12 2006-11-02 Kevin McCullough <KMcCullough@apple.com> 2 13 -
trunk/WebCore/ChangeLog
r17539 r17543 1 2006-11-02 Adele Peterson <adele@apple.com> 2 3 Reviewed by Mitz and Geoff. 4 5 - Fix for: 6 <rdar://problem/4650271> REGRESSION(NativeTextArea): Textareas don't get scrollbars when text gets too big for content area (10105) 7 <rdar://problem/4650813> REGRESSION(tiger-leopard): typing in a textarea in Safari is extremely slow (sample shows focus ring drawing) 8 <rdar://problem/4658779> REGRESSION: Text selection is weird in textareas in Trac wiki editing pages 9 10 Test: fast/forms/textarea-scrollbar.html 11 12 To avoid some of our flexbox bugs for textareas, we're moving the text controls back to RenderBlock. This should make them 13 a lot more stable. In the future, when we've worked out more of the flexbox kinks, we may want to consider moving them back. 14 15 * rendering/RenderTextControl.h: Convert text controls back to RenderBlock instead of RenderFlexibleBox. 16 * rendering/RenderTextControl.cpp: 17 (WebCore::RenderTextControl::RenderTextControl): 18 (WebCore::RenderTextControl::setStyle): 19 (WebCore::RenderTextControl::createDivStyle): 20 (WebCore::RenderTextControl::updateFromElement): 21 (WebCore::RenderTextControl::calcHeight): 22 (WebCore::RenderTextControl::baselinePosition): 23 (WebCore::RenderTextControl::nodeAtPoint): 24 (WebCore::RenderTextControl::layout): Set the inner div's height explicitly before doing a normal layout. 25 (WebCore::RenderTextControl::scrollWidth): 26 (WebCore::RenderTextControl::scrollHeight): 27 (WebCore::RenderTextControl::scrollLeft): 28 (WebCore::RenderTextControl::scrollTop): 29 30 * rendering/RenderObject.cpp: (WebCore::RenderObject::markContainingBlocksForLayout): Make subtree layout optimization work for textareas. 31 1 32 2006-11-02 John Sullivan <sullivan@apple.com> 2 33 -
trunk/WebCore/rendering/RenderObject.cpp
r17521 r17543 759 759 760 760 last = o; 761 if (scheduleRelayout && last->isTextField())761 if (scheduleRelayout && (last->isTextField() || last->isTextArea())) 762 762 break; 763 763 o = o->container(); -
trunk/WebCore/rendering/RenderTextControl.cpp
r17494 r17543 47 47 48 48 RenderTextControl::RenderTextControl(Node* node, bool multiLine) 49 : Render FlexibleBox(node), m_dirty(false), m_multiLine(multiLine)49 : RenderBlock(node), m_dirty(false), m_multiLine(multiLine) 50 50 { 51 51 } … … 62 62 void RenderTextControl::setStyle(RenderStyle* style) 63 63 { 64 Render FlexibleBox::setStyle(style);64 RenderBlock::setStyle(style); 65 65 if (m_div) { 66 66 RenderBlock* divRenderer = static_cast<RenderBlock*>(m_div->renderer()); … … 82 82 divStyle->inheritFrom(startStyle); 83 83 divStyle->setDisplay(BLOCK); 84 divStyle->setBoxFlex(1.0f);85 84 divStyle->setUserModify(element->isReadOnlyControl() || element->disabled() ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY); 86 85 … … 142 141 143 142 // Add div to Render tree 144 Render FlexibleBox::addChild(divRenderer);143 RenderBlock::addChild(divRenderer); 145 144 } 146 145 … … 336 335 m_height = line * rows + toAdd + scrollbarSize; 337 336 338 Render FlexibleBox::calcHeight();337 RenderBlock::calcHeight(); 339 338 } 340 339 … … 343 342 if (m_multiLine) 344 343 return height() + marginTop() + marginBottom(); 345 return Render FlexibleBox::baselinePosition(b, isRootLineBox);344 return RenderBlock::baselinePosition(b, isRootLineBox); 346 345 } 347 346 … … 350 349 // If we're within the text control, we want to act as if we've hit the inner div, incase the point 351 350 // was on the control but not on the div (see Radar 4617841). 352 if (Render FlexibleBox::nodeAtPoint(request, result, x, y, tx, ty, hitTestAction)) {351 if (RenderBlock::nodeAtPoint(request, result, x, y, tx, ty, hitTestAction)) { 353 352 result.setInnerNode(m_div.get()); 354 353 return true; 355 354 } 356 355 return false; 356 } 357 358 void RenderTextControl::layout() 359 { 360 int oldHeight = m_height; 361 calcHeight(); 362 bool relayoutChildren = oldHeight != m_height; 363 364 // Set the div's height 365 int divHeight = m_height - paddingTop() - paddingBottom() - borderTop() - borderBottom(); 366 m_div->renderer()->style()->setHeight(Length(divHeight, Fixed)); 367 368 RenderBlock::layoutBlock(relayoutChildren); 357 369 } 358 370 … … 434 446 if (m_div) 435 447 return m_div->scrollWidth(); 436 return Render FlexibleBox::scrollWidth();448 return RenderBlock::scrollWidth(); 437 449 } 438 450 … … 441 453 if (m_div) 442 454 return m_div->scrollHeight(); 443 return Render FlexibleBox::scrollHeight();455 return RenderBlock::scrollHeight(); 444 456 } 445 457 … … 448 460 if (m_div) 449 461 return m_div->scrollLeft(); 450 return Render FlexibleBox::scrollLeft();462 return RenderBlock::scrollLeft(); 451 463 } 452 464 … … 455 467 if (m_div) 456 468 return m_div->scrollTop(); 457 return Render FlexibleBox::scrollTop();469 return RenderBlock::scrollTop(); 458 470 } 459 471 -
trunk/WebCore/rendering/RenderTextControl.h
r17494 r17543 22 22 #define RenderTextField_H 23 23 24 #include "Render FlexibleBox.h"24 #include "RenderBlock.h" 25 25 26 26 namespace WebCore { … … 28 28 class HTMLTextFieldInnerElement; 29 29 30 class RenderTextControl : public Render FlexibleBox{30 class RenderTextControl : public RenderBlock { 31 31 public: 32 32 RenderTextControl(Node*, bool multiLine); … … 42 42 virtual short baselinePosition( bool, bool ) const; 43 43 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction); 44 44 virtual void layout(); 45 virtual bool avoidsFloats() const { return true; } 46 45 47 RenderStyle* createDivStyle(RenderStyle* startStyle); 46 48
Note: See TracChangeset
for help on using the changeset viewer.