Changeset 130560 in webkit
- Timestamp:
- Oct 5, 2012 3:09:04 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r130556 r130560 1 2012-10-05 Eric Seidel <eric@webkit.org> 2 3 Remove needless virtual calls and inline RenderStyle::logical* to make table layout faster 4 https://bugs.webkit.org/show_bug.cgi?id=98550 5 6 Reviewed by Andreas Kling. 7 8 This shaved another 5% (100ms) off of the runtime of resizecol.html microbenchmark: 9 http://www.robohornet.org/tests/resizecol.html 10 11 * rendering/AutoTableLayout.cpp: 12 (WebCore::AutoTableLayout::recalcColumn): 13 * rendering/style/RenderStyle.cpp: 14 * rendering/style/RenderStyle.h: 15 1 16 2012-10-04 Eric Carlson <eric.carlson@apple.com> 2 17 -
trunk/Source/WebCore/rendering/AutoTableLayout.cpp
r129529 r130560 50 50 RenderTableCell* maxContributor = 0; 51 51 52 for (RenderObject* child = m_table-> firstChild(); child; child = child->nextSibling()) {52 for (RenderObject* child = m_table->children()->firstChild(); child; child = child->nextSibling()) { 53 53 if (child->isRenderTableCol()) 54 54 toRenderTableCol(child)->computePreferredLogicalWidths(); … … 63 63 continue; 64 64 65 bool cellHasContent = cell-> firstChild() || cell->style()->hasBorder() || cell->style()->hasPadding();65 bool cellHasContent = cell->children()->firstChild() || cell->style()->hasBorder() || cell->style()->hasPadding(); 66 66 if (cellHasContent) 67 67 columnLayout.emptyCellsOnly = false; -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r130489 r130560 1433 1433 } 1434 1434 1435 Length RenderStyle::logicalWidth() const1436 {1437 if (isHorizontalWritingMode())1438 return width();1439 return height();1440 }1441 1442 Length RenderStyle::logicalHeight() const1443 {1444 if (isHorizontalWritingMode())1445 return height();1446 return width();1447 }1448 1449 Length RenderStyle::logicalMinWidth() const1450 {1451 if (isHorizontalWritingMode())1452 return minWidth();1453 return minHeight();1454 }1455 1456 Length RenderStyle::logicalMaxWidth() const1457 {1458 if (isHorizontalWritingMode())1459 return maxWidth();1460 return maxHeight();1461 }1462 1463 Length RenderStyle::logicalMinHeight() const1464 {1465 if (isHorizontalWritingMode())1466 return minHeight();1467 return minWidth();1468 }1469 1470 Length RenderStyle::logicalMaxHeight() const1471 {1472 if (isHorizontalWritingMode())1473 return maxHeight();1474 return maxWidth();1475 }1476 1477 1435 const BorderValue& RenderStyle::borderBefore() const 1478 1436 { -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r130489 r130560 524 524 Length maxHeight() const { return m_box->maxHeight(); } 525 525 526 Length logicalWidth() const ;527 Length logicalHeight() const ;528 Length logicalMinWidth() const ;529 Length logicalMaxWidth() const ;530 Length logicalMinHeight() const ;531 Length logicalMaxHeight() const ;526 Length logicalWidth() const { return isHorizontalWritingMode() ? width() : height(); } 527 Length logicalHeight() const { return isHorizontalWritingMode() ? height() : width(); } 528 Length logicalMinWidth() const { return isHorizontalWritingMode() ? minWidth() : minHeight(); } 529 Length logicalMaxWidth() const { return isHorizontalWritingMode() ? maxWidth() : maxHeight(); } 530 Length logicalMinHeight() const { return isHorizontalWritingMode() ? minHeight() : minWidth(); } 531 Length logicalMaxHeight() const { return isHorizontalWritingMode() ? maxHeight() : maxWidth(); } 532 532 533 533 const BorderData& border() const { return surround->border; }
Note: See TracChangeset
for help on using the changeset viewer.