Changeset 21093 for trunk/WebCore/rendering/RenderObject.h
- Timestamp:
- 04/25/07 12:10:24 (21 months ago)
- Files:
-
- 1 modified
-
trunk/WebCore/rendering/RenderObject.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/rendering/RenderObject.h
r21079 r21093 154 154 155 155 virtual RenderLayer* layer() const { return 0; } 156 bool hasLayer() const { return !!layer(); }157 156 RenderLayer* enclosingLayer() const; 158 157 void addLayers(RenderLayer* parentLayer, RenderObject* newObject); … … 178 177 // children. 179 178 virtual RenderBlock* firstLineBlock() const; 180 virtual void updateFirstLetter();181 179 182 180 // Called when an object that was floating or positioned becomes a normal flow object … … 207 205 208 206 // raw tree manipulation 209 virtual RenderObject* removeChildNode(RenderObject*); 210 virtual void appendChildNode(RenderObject*); 211 virtual void insertChildNode(RenderObject* child, RenderObject* before); 207 virtual RenderObject* removeChildNode(RenderObject*, bool fullRemove = true); 208 virtual void appendChildNode(RenderObject*, bool fullAppend = true); 209 virtual void insertChildNode(RenderObject* child, RenderObject* before, bool fullInsert = true); 210 // Designed for speed. Don't waste time doing a bunch of work like layer updating and repainting when we know that our 211 // change in parentage is not going to affect anything. 212 virtual void moveChildNode(RenderObject*); 212 213 ////////////////////////////////////////// 213 214 … … 311 312 bool isDragging() const { return m_isDragging; } 312 313 bool isReplaced() const { return m_replaced; } // a "replaced" element (see CSS) 313 314 315 bool hasLayer() const { return m_hasLayer; } 316 314 317 bool hasBoxDecorations() const { return m_paintBackground; } 315 318 bool mustRepaintBackgroundOrBorder() const; … … 321 324 322 325 bool prefWidthsDirty() const { return m_prefWidthsDirty; } 323 bool recalcMinMax() const { return m_recalcMinMax; }324 326 325 327 bool isSelectionBorder() const; … … 370 372 void setChildNeedsLayout(bool b, bool markParents = true); 371 373 372 void setPrefWidthsDirty(bool b) 373 { 374 m_prefWidthsDirty = b; 375 if (b) { 376 RenderObject* o = this; 377 RenderObject* root = this; 378 while(o) { // FIXME: && !o->m_recalcMinMax ) { 379 o->m_recalcMinMax = true; 380 root = o; 381 o = o->m_parent; 382 } 383 } 384 } 385 374 void setPrefWidthsDirty(bool, bool markParents = true); 375 void invalidateContainingBlockPrefWidths(); 376 386 377 void setNeedsLayoutAndPrefWidthsRecalc() 387 378 { 379 setNeedsLayout(true); 388 380 setPrefWidthsDirty(true); 389 setNeedsLayout(true);390 381 } 391 382 … … 398 389 void setReplaced(bool b = true) { m_replaced = b; } 399 390 void setHasOverflowClip(bool b = true) { m_hasOverflowClip = b; } 391 void setHasLayer(bool b = true) { m_hasLayer = b; } 400 392 401 393 void scheduleRelayout(); … … 460 452 bool includeLeftEdge = true, bool includeRightEdge = true) { } 461 453 462 /* 463 * This function calculates the minimum & maximum width that the object 464 * can be set to. 465 * 466 * when the Element calls setPrefWidthsDirty(false), calcPrefWidths() will 467 * be no longer called. 468 * 469 * when a element has a fixed size, m_minPrefWidth and m_maxPrefWidth should be 470 * set to the same value. This has the special meaning that m_width, 471 * contains the actual value. 472 * 473 * assumes calcPrefWidths has already been called for all children. 474 */ 475 virtual void calcPrefWidths() { } 476 477 /* 478 * Does the min max width recalculations after changes. 479 */ 480 void recalcMinMaxWidths(); 481 454 482 455 /* 483 456 * Calculates the actual width of the object (only for non inline … … 923 896 924 897 bool m_isAnonymous : 1; 925 bool m_recalcMinMax : 1;926 898 bool m_isText : 1; 927 899 bool m_inline : 1; … … 929 901 bool m_isDragging : 1; 930 902 903 bool m_hasLayer : 1; 931 904 bool m_hasOverflowClip : 1; 932 905