Changeset 128110 in webkit
- Timestamp:
- Sep 10, 2012 2:47:50 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128109 r128110 1 2012-09-10 Tony Chang <tony@chromium.org> 2 3 Rename computeLogicalWidth to updateLogicalWidth 4 https://bugs.webkit.org/show_bug.cgi?id=96288 5 6 Reviewed by Ojan Vafai. 7 8 Also rename recomputeLogicalWidth to updateLogicalWidthAndColumnWidth. 9 Also rename RenderTableCell::updateLogicalWidth to RenderTableCell::setCellLogicalWidth. 10 11 No new tests, this is just a refactor. 12 13 * rendering/RenderBlock.cpp: 14 (WebCore::RenderBlock::updateLogicalWidthAndColumnWidth): 15 (WebCore::RenderBlock::layoutBlock): 16 (WebCore::RenderBlock::layoutPositionedObjects): 17 (WebCore::RenderBlock::insertFloatingObject): 18 (WebCore::RenderBlock::getClearDelta): 19 * rendering/RenderBlock.h: 20 * rendering/RenderBox.cpp: 21 (WebCore::RenderBox::updateLogicalWidth): 22 * rendering/RenderBox.h: 23 (RenderBox): 24 (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly): 25 * rendering/RenderDeprecatedFlexibleBox.cpp: 26 (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): 27 * rendering/RenderEmbeddedObject.cpp: 28 (WebCore::RenderEmbeddedObject::layout): 29 * rendering/RenderFlexibleBox.cpp: 30 (WebCore::RenderFlexibleBox::layoutBlock): 31 * rendering/RenderFlowThread.cpp: 32 (WebCore::RenderFlowThread::layout): 33 (WebCore::RenderFlowThread::updateLogicalWidth): 34 * rendering/RenderFlowThread.h: 35 * rendering/RenderGrid.cpp: 36 (WebCore::RenderGrid::layoutBlock): 37 * rendering/RenderHTMLCanvas.cpp: 38 (WebCore::RenderHTMLCanvas::canvasSizeChanged): 39 * rendering/RenderIFrame.cpp: 40 (WebCore::RenderIFrame::updateLogicalWidth): 41 (WebCore::RenderIFrame::layoutSeamlessly): 42 (WebCore::RenderIFrame::layout): 43 * rendering/RenderIFrame.h: 44 (RenderIFrame): 45 * rendering/RenderImage.cpp: 46 (WebCore::RenderImage::imageDimensionsChanged): 47 * rendering/RenderMeter.cpp: 48 (WebCore::RenderMeter::updateLogicalWidth): 49 * rendering/RenderMeter.h: 50 (RenderMeter): 51 * rendering/RenderMultiColumnBlock.cpp: 52 (WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth): 53 * rendering/RenderMultiColumnBlock.h: 54 (RenderMultiColumnBlock): 55 * rendering/RenderMultiColumnSet.cpp: 56 (WebCore::RenderMultiColumnSet::updateLogicalWidth): 57 * rendering/RenderMultiColumnSet.h: 58 (RenderMultiColumnSet): 59 * rendering/RenderReplaced.cpp: 60 (WebCore::RenderReplaced::layout): 61 * rendering/RenderTable.cpp: 62 (WebCore::RenderTable::updateLogicalWidth): 63 (WebCore::RenderTable::layout): 64 * rendering/RenderTable.h: 65 (RenderTable): 66 * rendering/RenderTableCell.cpp: 67 (WebCore::RenderTableCell::updateLogicalWidth): 68 (WebCore::RenderTableCell::setCellLogicalWidth): 69 * rendering/RenderTableCell.h: 70 (RenderTableCell): 71 * rendering/RenderTableSection.cpp: 72 (WebCore::RenderTableSection::setCellLogicalWidths): 73 * rendering/RenderView.cpp: 74 (WebCore::RenderView::updateLogicalWidth): 75 * rendering/RenderView.h: 76 * rendering/svg/RenderSVGForeignObject.cpp: 77 (WebCore::RenderSVGForeignObject::updateLogicalWidth): 78 * rendering/svg/RenderSVGForeignObject.h: 79 (RenderSVGForeignObject): 80 * rendering/svg/RenderSVGRoot.cpp: 81 (WebCore::RenderSVGRoot::layout): 82 1 83 2012-09-10 Andreas Kling <kling@webkit.org> 2 84 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r127509 r128110 1416 1416 } 1417 1417 1418 bool RenderBlock:: recomputeLogicalWidth()1418 bool RenderBlock::updateLogicalWidthAndColumnWidth() 1419 1419 { 1420 1420 LayoutUnit oldWidth = logicalWidth(); 1421 1421 LayoutUnit oldColumnWidth = desiredColumnWidth(); 1422 1422 1423 computeLogicalWidth();1423 updateLogicalWidth(); 1424 1424 calcColumnWidth(); 1425 1425 … … 1469 1469 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); 1470 1470 1471 if ( recomputeLogicalWidth())1471 if (updateLogicalWidthAndColumnWidth()) 1472 1472 relayoutChildren = true; 1473 1473 … … 2655 2655 r->computeLogicalHeight(); 2656 2656 else 2657 r-> computeLogicalWidth();2657 r->updateLogicalWidth(); 2658 2658 oldLogicalTop = logicalTopForChild(r); 2659 2659 } … … 3761 3761 o->layoutIfNeeded(); 3762 3762 else { 3763 o-> computeLogicalWidth();3763 o->updateLogicalWidth(); 3764 3764 o->computeAndSetBlockDirectionMargins(this); 3765 3765 } … … 4653 4653 4654 4654 child->setLogicalTop(newLogicalTop); 4655 child-> computeLogicalWidth();4655 child->updateLogicalWidth(); 4656 4656 region = regionAtBlockOffset(logicalTopForChild(child)); 4657 4657 borderBox = child->borderBoxRectInRegion(region, offsetFromLogicalTopOfFirstPage() + logicalTopForChild(child), DoNotCacheRenderBoxRegionInfo); -
trunk/Source/WebCore/rendering/RenderBlock.h
r127163 r128110 1010 1010 virtual bool requiresColumns(int desiredColumnCount) const; 1011 1011 1012 virtual bool recomputeLogicalWidth();1012 virtual bool updateLogicalWidthAndColumnWidth(); 1013 1013 1014 1014 virtual bool canCollapseAnonymousBlockChild() const { return true; } -
trunk/Source/WebCore/rendering/RenderBox.cpp
r127915 r128110 1616 1616 } 1617 1617 1618 void RenderBox:: computeLogicalWidth()1618 void RenderBox::updateLogicalWidth() 1619 1619 { 1620 1620 LogicalExtentComputedValues computedValues; -
trunk/Source/WebCore/rendering/RenderBox.h
r127914 r128110 365 365 LayoutUnit perpendicularContainingBlockLogicalHeight() const; 366 366 367 virtual void computeLogicalWidth();367 virtual void updateLogicalWidth(); 368 368 virtual void computeLogicalHeight(); 369 369 void computeLogicalHeight(LogicalExtentComputedValues&) const; … … 450 450 { 451 451 LayoutUnit oldWidth = width(); 452 computeLogicalWidth();452 updateLogicalWidth(); 453 453 // If we shrink to fit our width may have changed, so we still need full layout. 454 454 if (oldWidth != width()) -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r127346 r128110 248 248 LayoutSize previousSize = size(); 249 249 250 computeLogicalWidth();250 updateLogicalWidth(); 251 251 computeLogicalHeight(); 252 252 -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r126859 r128110 231 231 ASSERT(needsLayout()); 232 232 233 computeLogicalWidth();233 updateLogicalWidth(); 234 234 computeLogicalHeight(); 235 235 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r126503 r128110 255 255 256 256 setLogicalHeight(0); 257 computeLogicalWidth();257 updateLogicalWidth(); 258 258 259 259 m_overflow.clear(); -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r127280 r128110 167 167 } 168 168 169 computeLogicalWidth(); // Called to get the maximum logical width for the region.169 updateLogicalWidth(); // Called to get the maximum logical width for the region. 170 170 171 171 LayoutUnit logicalHeight = 0; … … 197 197 } 198 198 199 void RenderFlowThread:: computeLogicalWidth()199 void RenderFlowThread::updateLogicalWidth() 200 200 { 201 201 LayoutUnit logicalWidth = 0; -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r127937 r128110 74 74 const RenderRegionList& renderRegionList() const { return m_regionList; } 75 75 76 virtual void computeLogicalWidth() OVERRIDE;76 virtual void updateLogicalWidth() OVERRIDE; 77 77 virtual void computeLogicalHeight() OVERRIDE; 78 78 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r124671 r128110 77 77 78 78 setLogicalHeight(0); 79 computeLogicalWidth();79 updateLogicalWidth(); 80 80 81 81 m_overflow.clear(); -
trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp
r111515 r128110 90 90 91 91 LayoutSize oldSize = size(); 92 computeLogicalWidth();92 updateLogicalWidth(); 93 93 computeLogicalHeight(); 94 94 if (oldSize == size()) -
trunk/Source/WebCore/rendering/RenderIFrame.cpp
r118291 r128110 62 62 } 63 63 64 void RenderIFrame:: computeLogicalWidth()64 void RenderIFrame::updateLogicalWidth() 65 65 { 66 66 // When we're seamless, we behave like a block. Thankfully RenderBox has all the right logic for this. 67 67 if (isSeamless()) 68 return RenderBox:: computeLogicalWidth();69 70 RenderPart:: computeLogicalWidth();68 return RenderBox::updateLogicalWidth(); 69 70 RenderPart::updateLogicalWidth(); 71 71 if (!flattenFrame()) 72 72 return; … … 163 163 void RenderIFrame::layoutSeamlessly() 164 164 { 165 computeLogicalWidth();165 updateLogicalWidth(); 166 166 // FIXME: Containers set their height to 0 before laying out their kids (as we're doing here) 167 167 // however, this causes FrameView::layout() to add vertical scrollbars, incorrectly inflating … … 191 191 192 192 if (flattenFrame()) { 193 RenderPart:: computeLogicalWidth();193 RenderPart::updateLogicalWidth(); 194 194 RenderPart::computeLogicalHeight(); 195 195 layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed()); … … 200 200 // Do not return so as to share the layer and overflow updates below. 201 201 } else { 202 computeLogicalWidth();202 updateLogicalWidth(); 203 203 // No kids to layout as a replaced element. 204 204 computeLogicalHeight(); -
trunk/Source/WebCore/rendering/RenderIFrame.h
r118291 r128110 42 42 private: 43 43 virtual void computeLogicalHeight() OVERRIDE; 44 virtual void computeLogicalWidth() OVERRIDE;44 virtual void updateLogicalWidth() OVERRIDE; 45 45 46 46 virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE; -
trunk/Source/WebCore/rendering/RenderImage.cpp
r127421 r128110 225 225 if (!preferredLogicalWidthsDirty()) 226 226 setPreferredLogicalWidthsDirty(true); 227 computeLogicalWidth();227 updateLogicalWidth(); 228 228 computeLogicalHeight(); 229 229 -
trunk/Source/WebCore/rendering/RenderMeter.cpp
r125659 r128110 53 53 } 54 54 55 void RenderMeter:: computeLogicalWidth()55 void RenderMeter::updateLogicalWidth() 56 56 { 57 RenderBox:: computeLogicalWidth();57 RenderBox::updateLogicalWidth(); 58 58 setWidth(theme()->meterSizeForBounds(this, pixelSnappedIntRect(frameRect())).width()); 59 59 } -
trunk/Source/WebCore/rendering/RenderMeter.h
r127937 r128110 40 40 41 41 private: 42 virtual void computeLogicalWidth() OVERRIDE;42 virtual void updateLogicalWidth() OVERRIDE; 43 43 virtual void computeLogicalHeight() OVERRIDE; 44 44 -
trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
r127267 r128110 69 69 } 70 70 71 bool RenderMultiColumnBlock:: recomputeLogicalWidth()71 bool RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth() 72 72 { 73 bool relayoutChildren = RenderBlock:: recomputeLogicalWidth();73 bool relayoutChildren = RenderBlock::updateLogicalWidthAndColumnWidth(); 74 74 LayoutUnit oldColumnWidth = m_columnWidth; 75 75 computeColumnCountAndWidth(); -
trunk/Source/WebCore/rendering/RenderMultiColumnBlock.h
r126177 r128110 51 51 virtual const char* renderName() const; 52 52 53 virtual bool recomputeLogicalWidth() OVERRIDE;53 virtual bool updateLogicalWidthAndColumnWidth() OVERRIDE; 54 54 virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight) OVERRIDE; 55 55 virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&) OVERRIDE; -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp
r127421 r128110 52 52 } 53 53 54 void RenderMultiColumnSet:: computeLogicalWidth()54 void RenderMultiColumnSet::updateLogicalWidth() 55 55 { 56 56 // Our logical width starts off matching the column block itself. -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.h
r127297 r128110 63 63 64 64 private: 65 virtual void computeLogicalWidth() OVERRIDE;65 virtual void updateLogicalWidth() OVERRIDE; 66 66 virtual void computeLogicalHeight() OVERRIDE; 67 67 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r125050 r128110 86 86 setHeight(minimumReplacedHeight()); 87 87 88 computeLogicalWidth();88 updateLogicalWidth(); 89 89 computeLogicalHeight(); 90 90 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r127812 r128110 213 213 } 214 214 215 void RenderTable:: computeLogicalWidth()215 void RenderTable::updateLogicalWidth() 216 216 { 217 217 recalcSectionsIfNeeded(); … … 347 347 348 348 LayoutUnit oldLogicalWidth = logicalWidth(); 349 computeLogicalWidth();349 updateLogicalWidth(); 350 350 351 351 if (logicalWidth() != oldLogicalWidth) { -
trunk/Source/WebCore/rendering/RenderTable.h
r127937 r128110 262 262 virtual void setCellLogicalWidths(); 263 263 264 virtual void computeLogicalWidth() OVERRIDE;264 virtual void updateLogicalWidth() OVERRIDE; 265 265 266 266 LayoutUnit convertStyleLogicalWidthToComputedWidth(const Length& styleLogicalWidth, LayoutUnit availableWidth); -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r126590 r128110 169 169 } 170 170 171 void RenderTableCell:: computeLogicalWidth()172 { 173 } 174 175 void RenderTableCell:: updateLogicalWidth(LayoutUnit w)171 void RenderTableCell::updateLogicalWidth() 172 { 173 } 174 175 void RenderTableCell::setCellLogicalWidth(LayoutUnit w) 176 176 { 177 177 if (w == logicalWidth()) -
trunk/Source/WebCore/rendering/RenderTableCell.h
r127937 r128110 77 77 virtual void computePreferredLogicalWidths(); 78 78 79 void updateLogicalWidth(LayoutUnit);79 void setCellLogicalWidth(LayoutUnit); 80 80 81 81 virtual int borderLeft() const; … … 176 176 virtual void willBeRemovedFromTree() OVERRIDE; 177 177 178 virtual void computeLogicalWidth() OVERRIDE;178 virtual void updateLogicalWidth() OVERRIDE; 179 179 180 180 virtual void paintBoxDecorations(PaintInfo&, const LayoutPoint&); -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r127538 r128110 295 295 cell->repaint(); 296 296 } 297 cell-> updateLogicalWidth(w);297 cell->setCellLogicalWidth(w); 298 298 } 299 299 } -
trunk/Source/WebCore/rendering/RenderView.cpp
r127783 r128110 97 97 } 98 98 99 void RenderView:: computeLogicalWidth()99 void RenderView::updateLogicalWidth() 100 100 { 101 101 if (!shouldUsePrintingLayout() && m_frameView) -
trunk/Source/WebCore/rendering/RenderView.h
r127783 r128110 59 59 60 60 virtual void layout() OVERRIDE; 61 virtual void computeLogicalWidth() OVERRIDE;61 virtual void updateLogicalWidth() OVERRIDE; 62 62 virtual void computeLogicalHeight() OVERRIDE; 63 63 // FIXME: This override is not needed and should be removed -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r126859 r128110 106 106 } 107 107 108 void RenderSVGForeignObject:: computeLogicalWidth()108 void RenderSVGForeignObject::updateLogicalWidth() 109 109 { 110 110 // FIXME: Investigate in size rounding issues -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
r127937 r128110 60 60 61 61 private: 62 virtual void computeLogicalWidth() OVERRIDE;62 virtual void updateLogicalWidth() OVERRIDE; 63 63 virtual void computeLogicalHeight() OVERRIDE; 64 64 -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r127421 r128110 230 230 231 231 LayoutSize oldSize = size(); 232 computeLogicalWidth();232 updateLogicalWidth(); 233 233 computeLogicalHeight(); 234 234 buildLocalToBorderBoxTransform();
Note: See TracChangeset
for help on using the changeset viewer.