Changeset 128201 in webkit
- Timestamp:
- Sep 11, 2012 10:21:57 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128196 r128201 1 2012-09-11 Tony Chang <tony@chromium.org> 2 3 Rename computeLogicalHeight to updateLogicalHeight 4 https://bugs.webkit.org/show_bug.cgi?id=96305 5 6 Reviewed by Ojan Vafai. 7 8 computeLogicalHeight changes the value of 4 member variables of the 9 render box, so give it a name that makes it more clear that it is 10 updating member variables. 11 12 No new tests, this is just a refactor. 13 14 * rendering/RenderBlock.cpp: 15 (WebCore::RenderBlock::computeInitialRegionRangeForBlock): 16 (WebCore::RenderBlock::checkForPaginationLogicalHeightChange): 17 (WebCore::RenderBlock::layoutBlock): 18 (WebCore::RenderBlock::layoutPositionedObjects): 19 (WebCore::RenderBlock::computeBlockPreferredLogicalWidths): 20 * rendering/RenderBox.cpp: 21 (WebCore::RenderBox::updateLogicalHeight): 22 (WebCore::RenderBox::computePercentageLogicalHeight): 23 (WebCore::RenderBox::computeReplacedLogicalHeightUsing): 24 (WebCore::RenderBox::availableLogicalHeightUsing): 25 * rendering/RenderBox.h: 26 (RenderBox): 27 (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly): 28 * rendering/RenderDeprecatedFlexibleBox.cpp: 29 (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): 30 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): 31 (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): 32 * rendering/RenderEmbeddedObject.cpp: 33 (WebCore::RenderEmbeddedObject::layout): 34 * rendering/RenderFlexibleBox.cpp: 35 (WebCore::RenderFlexibleBox::layoutBlock): 36 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): 37 * rendering/RenderFlowThread.cpp: 38 (WebCore::RenderFlowThread::updateLogicalHeight): 39 * rendering/RenderFlowThread.h: 40 * rendering/RenderGrid.cpp: 41 (WebCore::RenderGrid::layoutBlock): 42 * rendering/RenderHTMLCanvas.cpp: 43 (WebCore::RenderHTMLCanvas::canvasSizeChanged): 44 * rendering/RenderIFrame.cpp: 45 (WebCore::RenderIFrame::updateLogicalHeight): 46 (WebCore::RenderIFrame::layoutSeamlessly): 47 (WebCore::RenderIFrame::layout): 48 * rendering/RenderIFrame.h: 49 (RenderIFrame): 50 * rendering/RenderImage.cpp: 51 (WebCore::RenderImage::imageDimensionsChanged): 52 * rendering/RenderListBox.cpp: 53 (WebCore::RenderListBox::updateLogicalHeight): 54 * rendering/RenderListBox.h: 55 (RenderListBox): 56 * rendering/RenderMeter.cpp: 57 (WebCore::RenderMeter::updateLogicalHeight): 58 * rendering/RenderMeter.h: 59 (RenderMeter): 60 * rendering/RenderMultiColumnBlock.cpp: 61 (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange): 62 * rendering/RenderMultiColumnFlowThread.h: 63 * rendering/RenderMultiColumnSet.cpp: 64 (WebCore::RenderMultiColumnSet::updateLogicalHeight): 65 * rendering/RenderMultiColumnSet.h: 66 (RenderMultiColumnSet): 67 * rendering/RenderReplaced.cpp: 68 (WebCore::RenderReplaced::layout): 69 * rendering/RenderSearchField.cpp: 70 (WebCore::RenderSearchField::computeControlHeight): 71 * rendering/RenderTable.cpp: 72 (WebCore::RenderTable::layout): 73 * rendering/RenderTextControl.cpp: 74 (WebCore::RenderTextControl::updateLogicalHeight): 75 * rendering/RenderTextControl.h: 76 (RenderTextControl): 77 * rendering/RenderView.cpp: 78 (WebCore::RenderView::updateLogicalHeight): 79 * rendering/RenderView.h: 80 * rendering/svg/RenderSVGForeignObject.cpp: 81 (WebCore::RenderSVGForeignObject::updateLogicalHeight): 82 * rendering/svg/RenderSVGForeignObject.h: 83 (RenderSVGForeignObject): 84 * rendering/svg/RenderSVGRoot.cpp: 85 (WebCore::RenderSVGRoot::layout): 86 1 87 2012-09-11 Zach Kuznia <zork@chromium.org> 2 88 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r128130 r128201 1403 1403 LayoutUnit oldLogicalTop = logicalTop(); 1404 1404 setLogicalHeight(MAX_LAYOUT_UNIT / 2); 1405 computeLogicalHeight();1405 updateLogicalHeight(); 1406 1406 enclosingRenderFlowThread()->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()); 1407 1407 setLogicalHeight(oldHeight); … … 1434 1434 // We need to go ahead and set our explicit page height if one exists, so that we can 1435 1435 // avoid doing two layout passes. 1436 computeLogicalHeight();1436 updateLogicalHeight(); 1437 1437 LayoutUnit columnHeight = contentLogicalHeight(); 1438 1438 if (columnHeight > ZERO_LAYOUT_UNIT) { … … 1547 1547 LayoutUnit oldHeight = logicalHeight(); 1548 1548 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 1549 computeLogicalHeight();1549 updateLogicalHeight(); 1550 1550 LayoutUnit newHeight = logicalHeight(); 1551 1551 if (oldHeight != newHeight) { … … 2653 2653 if (needsBlockDirectionLocationSetBeforeLayout) { 2654 2654 if (isHorizontalWritingMode() == r->isHorizontalWritingMode()) 2655 r-> computeLogicalHeight();2655 r->updateLogicalHeight(); 2656 2656 else 2657 2657 r->updateLogicalWidth(); … … 6058 6058 LayoutUnit oldHeight = childBox->logicalHeight(); 6059 6059 childBox->setLogicalHeight(childBox->borderAndPaddingLogicalHeight()); 6060 childBox-> computeLogicalHeight();6060 childBox->updateLogicalHeight(); 6061 6061 childMinPreferredLogicalWidth = childMaxPreferredLogicalWidth = childBox->logicalHeight(); 6062 6062 childBox->setLogicalHeight(oldHeight); -
trunk/Source/WebCore/rendering/RenderBox.cpp
r128155 r128201 1962 1962 } 1963 1963 1964 void RenderBox:: computeLogicalHeight()1964 void RenderBox::updateLogicalHeight() 1965 1965 { 1966 1966 LogicalExtentComputedValues computedValues; … … 2182 2182 // can get called while the block is still laying out its kids. 2183 2183 LayoutUnit oldHeight = cb->logicalHeight(); 2184 cb-> computeLogicalHeight();2184 cb->updateLogicalHeight(); 2185 2185 result = cb->contentLogicalHeight(); 2186 2186 cb->setLogicalHeight(oldHeight); … … 2277 2277 RenderBlock* block = toRenderBlock(cb); 2278 2278 LayoutUnit oldHeight = block->height(); 2279 block-> computeLogicalHeight();2279 block->updateLogicalHeight(); 2280 2280 LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(block->contentHeight()); 2281 2281 block->setHeight(oldHeight); … … 2348 2348 RenderBlock* block = const_cast<RenderBlock*>(toRenderBlock(this)); 2349 2349 LayoutUnit oldHeight = block->logicalHeight(); 2350 block-> computeLogicalHeight();2350 block->updateLogicalHeight(); 2351 2351 LayoutUnit newHeight = block->adjustContentBoxLogicalHeightForBoxSizing(block->contentLogicalHeight()); 2352 2352 block->setLogicalHeight(oldHeight); -
trunk/Source/WebCore/rendering/RenderBox.h
r128130 r128201 366 366 367 367 virtual void updateLogicalWidth(); 368 virtual void computeLogicalHeight();368 virtual void updateLogicalHeight(); 369 369 void computeLogicalHeight(LogicalExtentComputedValues&) const; 370 370 … … 454 454 if (oldWidth != width()) 455 455 return false; 456 computeLogicalHeight();456 updateLogicalHeight(); 457 457 return true; 458 458 } -
trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
r128130 r128201 249 249 250 250 updateLogicalWidth(); 251 computeLogicalHeight();251 updateLogicalHeight(); 252 252 253 253 m_overflow.clear(); … … 270 270 271 271 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 272 computeLogicalHeight();272 updateLogicalHeight(); 273 273 274 274 if (previousSize.height() != height()) … … 415 415 416 416 oldHeight = height(); 417 computeLogicalHeight();417 updateLogicalHeight(); 418 418 419 419 relayoutChildren = false; … … 448 448 // Now do a layout. 449 449 LayoutUnit oldChildHeight = child->height(); 450 child-> computeLogicalHeight();450 child->updateLogicalHeight(); 451 451 if (oldChildHeight != child->height()) 452 452 child->setChildNeedsLayout(true, MarkOnlyThis); … … 736 736 // Now we have to calc our height, so we know how much space we have remaining. 737 737 oldHeight = height(); 738 computeLogicalHeight();738 updateLogicalHeight(); 739 739 if (oldHeight != height()) 740 740 heightSpecified = true; -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r128110 r128201 232 232 233 233 updateLogicalWidth(); 234 computeLogicalHeight();234 updateLogicalHeight(); 235 235 236 236 RenderPart::layout(); -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r128130 r128201 266 266 267 267 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 268 computeLogicalHeight();268 updateLogicalHeight(); 269 269 repositionLogicalHeightDependentFlexItems(*m_orderIterator, lineContexts, oldClientAfterEdge); 270 270 … … 1059 1059 // We have to do an extra pass for column-reverse to reposition the flex items since the start depends 1060 1060 // on the height of the flexbox, which we only know after we've positioned all the flex items. 1061 computeLogicalHeight();1061 updateLogicalHeight(); 1062 1062 layoutColumnReverse(children, childSizes, crossAxisOffset, availableFreeSpace); 1063 1063 } -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r128110 r128201 223 223 } 224 224 225 void RenderFlowThread:: computeLogicalHeight()225 void RenderFlowThread::updateLogicalHeight() 226 226 { 227 227 LayoutUnit logicalHeight = 0; -
trunk/Source/WebCore/rendering/RenderFlowThread.h
r128110 r128201 75 75 76 76 virtual void updateLogicalWidth() OVERRIDE; 77 virtual void computeLogicalHeight() OVERRIDE;77 virtual void updateLogicalHeight() OVERRIDE; 78 78 79 79 void paintFlowThreadPortionInRegion(PaintInfo&, RenderRegion*, LayoutRect flowThreadPortionRect, LayoutRect flowThreadPortionOverflowRect, const LayoutPoint&) const; -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r128110 r128201 84 84 85 85 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 86 computeLogicalHeight();86 updateLogicalHeight(); 87 87 88 88 if (size() != previousSize) -
trunk/Source/WebCore/rendering/RenderHTMLCanvas.cpp
r128110 r128201 91 91 LayoutSize oldSize = size(); 92 92 updateLogicalWidth(); 93 computeLogicalHeight();93 updateLogicalHeight(); 94 94 if (oldSize == size()) 95 95 return; -
trunk/Source/WebCore/rendering/RenderIFrame.cpp
r128110 r128201 44 44 } 45 45 46 void RenderIFrame:: computeLogicalHeight()47 { 48 RenderPart:: computeLogicalHeight();46 void RenderIFrame::updateLogicalHeight() 47 { 48 RenderPart::updateLogicalHeight(); 49 49 if (!flattenFrame()) 50 50 return; … … 176 176 if (childFrameView) // Widget should never be null during layout(), but just in case. 177 177 setLogicalHeight(childFrameView->contentsHeight() + borderTop() + borderBottom()); 178 computeLogicalHeight();178 updateLogicalHeight(); 179 179 180 180 updateWidgetPosition(); // Notify the Widget of our final height. … … 192 192 if (flattenFrame()) { 193 193 RenderPart::updateLogicalWidth(); 194 RenderPart:: computeLogicalHeight();194 RenderPart::updateLogicalHeight(); 195 195 layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed()); 196 196 // FIXME: Is early return really OK here? What about transform/overflow code below? … … 202 202 updateLogicalWidth(); 203 203 // No kids to layout as a replaced element. 204 computeLogicalHeight();204 updateLogicalHeight(); 205 205 } 206 206 -
trunk/Source/WebCore/rendering/RenderIFrame.h
r128110 r128201 41 41 42 42 private: 43 virtual void computeLogicalHeight() OVERRIDE;44 43 virtual void updateLogicalWidth() OVERRIDE; 44 virtual void updateLogicalHeight() OVERRIDE; 45 45 46 46 virtual LayoutUnit minPreferredLogicalWidth() const OVERRIDE; -
trunk/Source/WebCore/rendering/RenderImage.cpp
r128110 r128201 226 226 setPreferredLogicalWidthsDirty(true); 227 227 updateLogicalWidth(); 228 computeLogicalHeight();228 updateLogicalHeight(); 229 229 230 230 if (imageSizeChanged || width() != oldwidth || height() != oldheight) { -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r128134 r128201 251 251 } 252 252 253 void RenderListBox:: computeLogicalHeight()253 void RenderListBox::updateLogicalHeight() 254 254 { 255 255 int toAdd = borderAndPaddingHeight(); … … 258 258 setHeight(itemHeight * size() - rowSpacing + toAdd); 259 259 260 RenderBlock:: computeLogicalHeight();260 RenderBlock::updateLogicalHeight(); 261 261 262 262 if (m_vBar) { -
trunk/Source/WebCore/rendering/RenderListBox.h
r128134 r128201 78 78 virtual void computePreferredLogicalWidths(); 79 79 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 80 virtual void computeLogicalHeight() OVERRIDE;80 virtual void updateLogicalHeight() OVERRIDE; 81 81 82 82 virtual void layout(); -
trunk/Source/WebCore/rendering/RenderMeter.cpp
r128110 r128201 59 59 } 60 60 61 void RenderMeter:: computeLogicalHeight()61 void RenderMeter::updateLogicalHeight() 62 62 { 63 RenderBox:: computeLogicalHeight();63 RenderBox::updateLogicalHeight(); 64 64 setHeight(theme()->meterSizeForBounds(this, pixelSnappedIntRect(frameRect())).height()); 65 65 } -
trunk/Source/WebCore/rendering/RenderMeter.h
r128110 r128201 41 41 private: 42 42 virtual void updateLogicalWidth() OVERRIDE; 43 virtual void computeLogicalHeight() OVERRIDE;43 virtual void updateLogicalHeight() OVERRIDE; 44 44 45 45 virtual const char* renderName() const { return "RenderMeter"; } -
trunk/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
r128110 r128201 82 82 { 83 83 // We don't actually update any of the variables. We just subclassed to adjust our column height. 84 computeLogicalHeight();84 updateLogicalHeight(); 85 85 LayoutUnit newContentLogicalHeight = contentLogicalHeight(); 86 86 if (newContentLogicalHeight > ZERO_LAYOUT_UNIT) { -
trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.h
r126602 r128201 40 40 virtual const char* renderName() const OVERRIDE; 41 41 42 virtual void computeLogicalHeight() OVERRIDE {};// We simply remain at our intrinsic height.42 virtual void updateLogicalHeight() OVERRIDE { } // We simply remain at our intrinsic height. 43 43 }; 44 44 -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp
r128110 r128201 65 65 } 66 66 67 void RenderMultiColumnSet:: computeLogicalHeight()67 void RenderMultiColumnSet::updateLogicalHeight() 68 68 { 69 69 // Make sure our column height is up to date. -
trunk/Source/WebCore/rendering/RenderMultiColumnSet.h
r128110 r128201 64 64 private: 65 65 virtual void updateLogicalWidth() OVERRIDE; 66 virtual void computeLogicalHeight() OVERRIDE;66 virtual void updateLogicalHeight() OVERRIDE; 67 67 68 68 virtual void paintReplaced(PaintInfo&, const LayoutPoint& paintOffset) OVERRIDE; -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r128110 r128201 87 87 88 88 updateLogicalWidth(); 89 computeLogicalHeight();89 updateLogicalHeight(); 90 90 91 91 m_overflow.clear(); -
trunk/Source/WebCore/rendering/RenderSearchField.cpp
r120569 r128201 152 152 HTMLElement* resultsButton = resultsButtonElement(); 153 153 if (RenderBox* resultsRenderer = resultsButton ? resultsButton->renderBox() : 0) { 154 resultsRenderer-> computeLogicalHeight();154 resultsRenderer->updateLogicalHeight(); 155 155 nonContentHeight = max(nonContentHeight, resultsRenderer->borderAndPaddingHeight() + resultsRenderer->marginHeight()); 156 156 lineHeight = max(lineHeight, resultsRenderer->height()); … … 158 158 HTMLElement* cancelButton = cancelButtonElement(); 159 159 if (RenderBox* cancelRenderer = cancelButton ? cancelButton->renderBox() : 0) { 160 cancelRenderer-> computeLogicalHeight();160 cancelRenderer->updateLogicalHeight(); 161 161 nonContentHeight = max(nonContentHeight, cancelRenderer->borderAndPaddingHeight() + cancelRenderer->marginHeight()); 162 162 lineHeight = max(lineHeight, cancelRenderer->height()); -
trunk/Source/WebCore/rendering/RenderTable.cpp
r128110 r128201 408 408 409 409 if (!isOutOfFlowPositioned()) 410 computeLogicalHeight();410 updateLogicalHeight(); 411 411 412 412 Length logicalHeightLength = style()->logicalHeight(); … … 460 460 461 461 if (isOutOfFlowPositioned()) 462 computeLogicalHeight();462 updateLogicalHeight(); 463 463 464 464 // table can be containing block of positioned elements. -
trunk/Source/WebCore/rendering/RenderTextControl.cpp
r128130 r128201 145 145 } 146 146 147 void RenderTextControl:: computeLogicalHeight()147 void RenderTextControl::updateLogicalHeight() 148 148 { 149 149 HTMLElement* innerText = innerTextElement(); … … 158 158 } 159 159 160 RenderBlock:: computeLogicalHeight();160 RenderBlock::updateLogicalHeight(); 161 161 } 162 162 -
trunk/Source/WebCore/rendering/RenderTextControl.h
r127937 r128201 63 63 64 64 virtual void updateFromElement(); 65 virtual void computeLogicalHeight() OVERRIDE;65 virtual void updateLogicalHeight() OVERRIDE; 66 66 virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren); 67 67 -
trunk/Source/WebCore/rendering/RenderView.cpp
r128110 r128201 91 91 } 92 92 93 void RenderView:: computeLogicalHeight()93 void RenderView::updateLogicalHeight() 94 94 { 95 95 if (!shouldUsePrintingLayout() && m_frameView) -
trunk/Source/WebCore/rendering/RenderView.h
r128110 r128201 60 60 virtual void layout() OVERRIDE; 61 61 virtual void updateLogicalWidth() OVERRIDE; 62 virtual void computeLogicalHeight() OVERRIDE;62 virtual void updateLogicalHeight() OVERRIDE; 63 63 // FIXME: This override is not needed and should be removed 64 64 // it only exists to make computePreferredLogicalWidths public. -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r128110 r128201 113 113 } 114 114 115 void RenderSVGForeignObject:: computeLogicalHeight()115 void RenderSVGForeignObject::updateLogicalHeight() 116 116 { 117 117 // FIXME: Investigate in size rounding issues -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h
r128110 r128201 61 61 private: 62 62 virtual void updateLogicalWidth() OVERRIDE; 63 virtual void computeLogicalHeight() OVERRIDE;63 virtual void updateLogicalHeight() OVERRIDE; 64 64 65 65 virtual const AffineTransform& localToParentTransform() const; -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r128110 r128201 231 231 LayoutSize oldSize = size(); 232 232 updateLogicalWidth(); 233 computeLogicalHeight();233 updateLogicalHeight(); 234 234 buildLocalToBorderBoxTransform(); 235 235
Note: See TracChangeset
for help on using the changeset viewer.