Changeset 21120 in webkit
- Timestamp:
- Apr 26, 2007, 12:51:11 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r21119 r21120 1 2007-04-26 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by hyatt 4 5 - http://bugs.webkit.org/show_bug.cgi?id=13496 6 Eliminate repaintObjectsBeforeLayout 7 8 No tests added since there is no change to functionality. Several 9 tests in fast/repaint test repainting of objects that move during layout. 10 11 * page/FrameView.cpp: 12 (WebCore::FrameView::layout): 13 * rendering/RenderBlock.cpp: 14 (WebCore::RenderBlock::layoutBlockChildren): Removed an early 15 setNeedsLayout(false). Resetting the bit here prevents the full repaint 16 that we rely on when we decide not to repaint children that move. 17 * rendering/RenderBlock.h: 18 * rendering/RenderObject.cpp: 19 * rendering/RenderObject.h: 20 * rendering/RenderTableSection.cpp: 21 (WebCore::RenderTableSection::setCellWidths): Replaced the call to 22 repaintObjectsBeforeLayout() if the cell didn't need layout with 23 an unconditional repaint(). We don't bother with repainting only the 24 delta between the old and new widths, since by marking the cell for 25 layout results in a full repaint with the new width anyway. 26 1 27 2007-04-26 David Hyatt <hyatt@apple.com> 2 28 -
trunk/WebCore/page/FrameView.cpp
r21093 r21120 406 406 RenderLayer* layer = root->enclosingLayer(); 407 407 408 if (!d->doFullRepaint) {408 if (!d->doFullRepaint) 409 409 layer->checkForRepaintOnResize(); 410 root->repaintObjectsBeforeLayout();411 }412 410 413 411 pauseScheduledEvents(); -
trunk/WebCore/rendering/RenderBlock.cpp
r21116 r21120 1237 1237 // determining the correct collapsed bottom margin information. 1238 1238 handleBottomOfBlock(top, bottom, marginInfo); 1239 1240 // Finished. Clear the dirty layout bits.1241 setNeedsLayout(false);1242 1239 } 1243 1240 … … 1295 1292 } 1296 1293 } 1297 }1298 }1299 1300 void RenderBlock::repaintObjectsBeforeLayout()1301 {1302 RenderFlow::repaintObjectsBeforeLayout();1303 if (!needsLayout())1304 return;1305 1306 // Walk our positioned objects.1307 if (m_positionedObjects) {1308 RenderObject* r;1309 DeprecatedPtrListIterator<RenderObject> it(*m_positionedObjects);1310 for ( ; (r = it.current()); ++it )1311 r->repaintObjectsBeforeLayout();1312 1294 } 1313 1295 } -
trunk/WebCore/rendering/RenderBlock.h
r21079 r21120 100 100 virtual void removeChild(RenderObject*); 101 101 102 virtual void repaintObjectsBeforeLayout();103 102 virtual void repaintOverhangingFloats(bool paintAllDescendants); 104 103 -
trunk/WebCore/rendering/RenderObject.cpp
r21116 r21120 1866 1866 } 1867 1867 1868 void RenderObject::repaintObjectsBeforeLayout()1869 {1870 if (!needsLayout() || isText())1871 return;1872 1873 bool blockWithInlineChildren = (isRenderBlock() && !isTable() && normalChildNeedsLayout() && childrenInline());1874 if (selfNeedsLayout()) {1875 repaint();1876 if (blockWithInlineChildren)1877 return;1878 }1879 1880 for (RenderObject* current = firstChild(); current; current = current->nextSibling()) {1881 if (!current->isPositioned()) // RenderBlock subclass method handles walking the positioned objects.1882 current->repaintObjectsBeforeLayout();1883 }1884 }1885 1886 1868 IntRect RenderObject::getAbsoluteRepaintRectWithOutline(int ow) 1887 1869 { -
trunk/WebCore/rendering/RenderObject.h
r21116 r21120 700 700 virtual void repaintOverhangingFloats(bool paintAllDescendants = false); 701 701 702 // Called before layout to repaint all dirty children (with selfNeedsLayout() set).703 virtual void repaintObjectsBeforeLayout();704 705 702 bool checkForRepaintDuringLayout() const; 706 703 -
trunk/WebCore/rendering/RenderTableSection.cpp
r21093 r21120 283 283 int oldWidth = cell->width(); 284 284 if (w != oldWidth) { 285 bool neededLayout = cell->selfNeedsLayout();286 285 cell->setNeedsLayout(true); 287 if (! neededLayout && !selfNeedsLayout() && cell->checkForRepaintDuringLayout())288 cell->repaint ObjectsBeforeLayout();286 if (!table()->selfNeedsLayout() && cell->checkForRepaintDuringLayout()) 287 cell->repaint(); 289 288 cell->setWidth(w); 290 289 }
Note:
See TracChangeset
for help on using the changeset viewer.