Changeset 117697 in webkit
- Timestamp:
- May 19, 2012 1:48:14 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117696 r117697 1 2012-05-19 Emil A Eklund <eae@chromium.org> 2 3 Simplify RenderOverflow by using Rects 4 https://bugs.webkit.org/show_bug.cgi?id=86894 5 6 Reviewed by Eric Seidel. 7 8 Simplify the RenderOverflow class and the uses of it by storing the 9 overflow values in rects and using the rects instead of the individual 10 values where it makes sense. 11 12 No new tests, no change in functionality. 13 14 * page/FrameView.cpp: 15 (WebCore::FrameView::adjustPageHeightDeprecated): 16 Change to use layoutOverflowRect().maxX() and replace C style casts with 17 C++ style to comply with style guide. 18 19 * rendering/InlineFlowBox.h: 20 (WebCore::InlineFlowBox::logicalLeftLayoutOverflow): 21 (WebCore::InlineFlowBox::logicalRightLayoutOverflow): 22 (WebCore::InlineFlowBox::logicalTopLayoutOverflow): 23 (WebCore::InlineFlowBox::logicalBottomLayoutOverflow): 24 (WebCore::InlineFlowBox::logicalLeftVisualOverflow): 25 (WebCore::InlineFlowBox::logicalRightVisualOverflow): 26 (WebCore::InlineFlowBox::logicalTopVisualOverflow): 27 (WebCore::InlineFlowBox::logicalBottomVisualOverflow): 28 Change methods to use layoutOverflowRect() and visualOverflowRect(). 29 30 * rendering/RenderBox.cpp: 31 (WebCore::RenderBox::scrollWidth): 32 (WebCore::RenderBox::scrollHeight): 33 Change methods to use visualOverflowRect(). 34 35 (WebCore::RenderBox::clearLayoutOverflow): 36 Use setLayoutOverflow instead of resetLayoutOverflow (which has been 37 removed as it did exactly the same thing as the set method). 38 39 * rendering/RenderBox.h: 40 (WebCore::RenderBox::maxLayoutOverflow): 41 (WebCore::RenderBox::logicalLeftLayoutOverflow): 42 (WebCore::RenderBox::logicalRightLayoutOverflow): 43 (WebCore::RenderBox::logicalLeftVisualOverflow): 44 (WebCore::RenderBox::logicalRightVisualOverflow): 45 Remove minYLayoutOverflow, maxYLayoutOverflow, minXLayoutOverflow and 46 maxXLayoutOverflow and update the remaining methods to use 47 layoutOverflowRect(). 48 49 * rendering/RenderMarquee.cpp: 50 (WebCore::RenderMarquee::computePosition): 51 Change to use layoutOverflowRect(). 52 53 * rendering/RenderOverflow.h: 54 (WebCore::RenderOverflow::RenderOverflow): 55 (WebCore::RenderOverflow::layoutOverflowRect): 56 (WebCore::RenderOverflow::visualOverflowRect): 57 (RenderOverflow): 58 (WebCore::RenderOverflow::setMinYLayoutOverflow): 59 (WebCore::RenderOverflow::setMaxYLayoutOverflow): 60 (WebCore::RenderOverflow::setMinXLayoutOverflow): 61 (WebCore::RenderOverflow::setMaxXLayoutOverflow): 62 (WebCore::RenderOverflow::setMinYVisualOverflow): 63 (WebCore::RenderOverflow::setMaxYVisualOverflow): 64 (WebCore::RenderOverflow::setMinXVisualOverflow): 65 (WebCore::RenderOverflow::setMaxXVisualOverflow): 66 (WebCore): 67 (WebCore::RenderOverflow::move): 68 (WebCore::RenderOverflow::addLayoutOverflow): 69 (WebCore::RenderOverflow::addVisualOverflow): 70 (WebCore::RenderOverflow::setLayoutOverflow): 71 (WebCore::RenderOverflow::setVisualOverflow): 72 Change RenderOverflow to use two rects instead of two sets of four 73 values. Remove [min|max][Layout|Visual]Overflow getters and change the 74 layoutOverflowRect and visualOverflowRect methods to return the rects. 75 76 * rendering/RenderReplaced.cpp: 77 (WebCore::RenderReplaced::shouldPaint): 78 Change to use visualOverflowRect(). 79 80 * rendering/RenderTable.cpp: 81 (WebCore::RenderTable::layout): 82 Change to use visualOverflowRect(). 83 84 * rendering/RenderTableCell.cpp: 85 (WebCore::RenderTableCell::clippedOverflowRectForRepaint): 86 Change to use visualOverflowRect(). 87 88 * rendering/RenderTreeAsText.cpp: 89 (WebCore::writeLayers): 90 Change to use layoutOverflowRect(). 91 1 92 2012-05-19 Rob Buis <rbuis@rim.com> 2 93 -
trunk/Source/WebCore/page/FrameView.cpp
r117313 r117697 3280 3280 // Use a context with painting disabled. 3281 3281 GraphicsContext context((PlatformGraphicsContext*)0); 3282 root->setTruncatedAt( (int)floorf(oldBottom));3283 IntRect dirtyRect(0, (int)floorf(oldTop), root->maxXLayoutOverflow(), (int)ceilf(oldBottom - oldTop));3282 root->setTruncatedAt(static_cast<int>(floorf(oldBottom))); 3283 IntRect dirtyRect(0, static_cast<int>(floorf(oldTop)), root->layoutOverflowRect().maxX(), static_cast<int>(ceilf(oldBottom - oldTop))); 3284 3284 root->setPrintRect(dirtyRect); 3285 3285 root->layer()->paint(&context, dirtyRect); -
trunk/Source/WebCore/rendering/InlineFlowBox.h
r116202 r117697 208 208 return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom)); 209 209 } 210 LayoutUnit logicalLeftLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->minXLayoutOverflow() : m_overflow->minYLayoutOverflow()) : static_cast<LayoutUnit>(logicalLeft()); } 211 LayoutUnit logicalRightLayoutOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->maxXLayoutOverflow() : m_overflow->maxYLayoutOverflow()) : static_cast<LayoutUnit>(ceilf(logicalRight())); } 210 LayoutUnit logicalLeftLayoutOverflow() const 211 { 212 return m_overflow ? (isHorizontal() ? m_overflow->layoutOverflowRect().x() : m_overflow->layoutOverflowRect().y()) : 213 static_cast<LayoutUnit>(logicalLeft()); 214 } 215 LayoutUnit logicalRightLayoutOverflow() const 216 { 217 return m_overflow ? (isHorizontal() ? m_overflow->layoutOverflowRect().maxX() : m_overflow->layoutOverflowRect().maxY()) : 218 static_cast<LayoutUnit>(ceilf(logicalRight())); 219 } 212 220 LayoutUnit logicalTopLayoutOverflow(LayoutUnit lineTop) const 213 221 { 214 222 if (m_overflow) 215 return isHorizontal() ? m_overflow-> minYLayoutOverflow() : m_overflow->minXLayoutOverflow();223 return isHorizontal() ? m_overflow->layoutOverflowRect().y() : m_overflow->layoutOverflowRect().x(); 216 224 return lineTop; 217 225 } … … 219 227 { 220 228 if (m_overflow) 221 return isHorizontal() ? m_overflow-> maxYLayoutOverflow() : m_overflow->maxXLayoutOverflow();229 return isHorizontal() ? m_overflow->layoutOverflowRect().maxY() : m_overflow->layoutOverflowRect().maxX(); 222 230 return lineBottom; 223 231 } … … 234 242 return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom)); 235 243 } 236 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-> minXVisualOverflow() : m_overflow->minYVisualOverflow()) : static_cast<LayoutUnit>(logicalLeft()); }237 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-> maxXVisualOverflow() : m_overflow->maxYVisualOverflow()) : static_cast<LayoutUnit>(ceilf(logicalRight())); }244 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect().y()) : static_cast<LayoutUnit>(logicalLeft()); } 245 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRect().maxY()) : static_cast<LayoutUnit>(ceilf(logicalRight())); } 238 246 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const 239 247 { 240 248 if (m_overflow) 241 return isHorizontal() ? m_overflow-> minYVisualOverflow() : m_overflow->minXVisualOverflow();249 return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_overflow->visualOverflowRect().x(); 242 250 return lineTop; 243 251 } … … 245 253 { 246 254 if (m_overflow) 247 return isHorizontal() ? m_overflow-> maxYVisualOverflow() : m_overflow->maxXVisualOverflow();255 return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_overflow->visualOverflowRect().maxX(); 248 256 return lineBottom; 249 257 } -
trunk/Source/WebCore/rendering/RenderBox.cpp
r117633 r117697 500 500 // FIXME: Need to work right with writing modes. 501 501 if (style()->isLeftToRightDirection()) 502 return snapSizeToPixel(max(clientWidth(), maxXLayoutOverflow() - borderLeft()), clientLeft());503 return clientWidth() - min(ZERO_LAYOUT_UNIT, minXLayoutOverflow() - borderLeft());502 return snapSizeToPixel(max(clientWidth(), layoutOverflowRect().maxX() - borderLeft()), clientLeft()); 503 return clientWidth() - min(ZERO_LAYOUT_UNIT, layoutOverflowRect().x() - borderLeft()); 504 504 } 505 505 … … 510 510 // For objects with visible overflow, this matches IE. 511 511 // FIXME: Need to work right with writing modes. 512 return snapSizeToPixel(max(clientHeight(), maxYLayoutOverflow() - borderTop()), clientTop());512 return snapSizeToPixel(max(clientHeight(), layoutOverflowRect().maxY() - borderTop()), clientTop()); 513 513 } 514 514 … … 3736 3736 } 3737 3737 3738 m_overflow-> resetLayoutOverflow(borderBoxRect());3738 m_overflow->setLayoutOverflow(borderBoxRect()); 3739 3739 } 3740 3740 -
trunk/Source/WebCore/rendering/RenderBox.h
r117482 r117697 164 164 LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : clientBoxRect(); } 165 165 IntRect pixelSnappedLayoutOverflowRect() const { return pixelSnappedIntRect(layoutOverflowRect()); } 166 LayoutUnit minYLayoutOverflow() const { return m_overflow? m_overflow->minYLayoutOverflow() : static_cast<LayoutUnit>(borderTop()); } 167 LayoutUnit maxYLayoutOverflow() const { return m_overflow ? m_overflow->maxYLayoutOverflow() : static_cast<LayoutUnit>(borderTop()) + clientHeight(); } 168 LayoutUnit minXLayoutOverflow() const { return m_overflow ? m_overflow->minXLayoutOverflow() : static_cast<LayoutUnit>(borderLeft()); } 169 LayoutUnit maxXLayoutOverflow() const { return m_overflow ? m_overflow->maxXLayoutOverflow() : static_cast<LayoutUnit>(borderLeft()) + clientWidth(); } 170 LayoutSize maxLayoutOverflow() const { return LayoutSize(maxXLayoutOverflow(), maxYLayoutOverflow()); } 171 LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalWritingMode() ? minXLayoutOverflow() : minYLayoutOverflow(); } 172 LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontalWritingMode() ? maxXLayoutOverflow() : maxYLayoutOverflow(); } 166 LayoutSize maxLayoutOverflow() const { return LayoutSize(layoutOverflowRect().maxX(), layoutOverflowRect().maxY()); } 167 LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalWritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); } 168 LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontalWritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); } 173 169 174 170 virtual LayoutRect visualOverflowRect() const { return m_overflow ? m_overflow->visualOverflowRect() : borderBoxRect(); } 175 LayoutUnit minYVisualOverflow() const { return m_overflow? m_overflow->minYVisualOverflow() : ZERO_LAYOUT_UNIT; } 176 LayoutUnit maxYVisualOverflow() const { return m_overflow ? m_overflow->maxYVisualOverflow() : height(); } 177 LayoutUnit minXVisualOverflow() const { return m_overflow ? m_overflow->minXVisualOverflow() : ZERO_LAYOUT_UNIT; } 178 LayoutUnit maxXVisualOverflow() const { return m_overflow ? m_overflow->maxXVisualOverflow() : width(); } 179 LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalWritingMode() ? minXVisualOverflow() : minYVisualOverflow(); } 180 LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontalWritingMode() ? maxXVisualOverflow() : maxYVisualOverflow(); } 171 LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalWritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); } 172 LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontalWritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); } 181 173 182 174 void addLayoutOverflow(const LayoutRect&); -
trunk/Source/WebCore/rendering/RenderMarquee.cpp
r114079 r117697 138 138 } 139 139 else { 140 int contentHeight = box-> maxYLayoutOverflow() - box->borderTop() + box->paddingBottom();140 int contentHeight = box->layoutOverflowRect().maxY() - box->borderTop() + box->paddingBottom(); 141 141 int clientHeight = box->clientHeight(); 142 142 if (dir == MUP) { -
trunk/Source/WebCore/rendering/RenderOverflow.h
r95901 r117697 42 42 public: 43 43 RenderOverflow(const LayoutRect& layoutRect, const LayoutRect& visualRect) 44 : m_minYLayoutOverflow(layoutRect.y()) 45 , m_maxYLayoutOverflow(layoutRect.maxY()) 46 , m_minXLayoutOverflow(layoutRect.x()) 47 , m_maxXLayoutOverflow(layoutRect.maxX()) 48 , m_minYVisualOverflow(visualRect.y()) 49 , m_maxYVisualOverflow(visualRect.maxY()) 50 , m_minXVisualOverflow(visualRect.x()) 51 , m_maxXVisualOverflow(visualRect.maxX()) 44 : m_layoutOverflow(layoutRect) 45 , m_visualOverflow(visualRect) 52 46 { 53 47 } 54 48 55 LayoutUnit minYLayoutOverflow() const { return m_minYLayoutOverflow; } 56 LayoutUnit maxYLayoutOverflow() const { return m_maxYLayoutOverflow; } 57 LayoutUnit minXLayoutOverflow() const { return m_minXLayoutOverflow; } 58 LayoutUnit maxXLayoutOverflow() const { return m_maxXLayoutOverflow; } 59 LayoutRect layoutOverflowRect() const; 49 const LayoutRect layoutOverflowRect() const { return m_layoutOverflow; } 50 const LayoutRect visualOverflowRect() const { return m_visualOverflow; } 60 51 61 LayoutUnit minYVisualOverflow() const { return m_minYVisualOverflow; } 62 LayoutUnit maxYVisualOverflow() const { return m_maxYVisualOverflow; } 63 LayoutUnit minXVisualOverflow() const { return m_minXVisualOverflow; } 64 LayoutUnit maxXVisualOverflow() const { return m_maxXVisualOverflow; } 65 LayoutRect visualOverflowRect() const; 66 67 void setMinYLayoutOverflow(LayoutUnit overflow) { m_minYLayoutOverflow = overflow; } 68 void setMaxYLayoutOverflow(LayoutUnit overflow) { m_maxYLayoutOverflow = overflow; } 69 void setMinXLayoutOverflow(LayoutUnit overflow) { m_minXLayoutOverflow = overflow; } 70 void setMaxXLayoutOverflow(LayoutUnit overflow) { m_maxXLayoutOverflow = overflow; } 52 void setMinYLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setY(overflow); } 53 void setMaxYLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setHeight(overflow - m_layoutOverflow.y()); } 54 void setMinXLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setX(overflow); } 55 void setMaxXLayoutOverflow(LayoutUnit overflow) { m_layoutOverflow.setWidth(overflow - m_layoutOverflow.x()); } 71 56 72 void setMinYVisualOverflow(LayoutUnit overflow) { m_ minYVisualOverflow = overflow; }73 void setMaxYVisualOverflow(LayoutUnit overflow) { m_ maxYVisualOverflow = overflow; }74 void setMinXVisualOverflow(LayoutUnit overflow) { m_ minXVisualOverflow = overflow; }75 void setMaxXVisualOverflow(LayoutUnit overflow) { m_ maxXVisualOverflow = overflow; }57 void setMinYVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setY(overflow); } 58 void setMaxYVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setHeight(overflow - m_layoutOverflow.y()); } 59 void setMinXVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setX(overflow); } 60 void setMaxXVisualOverflow(LayoutUnit overflow) { m_visualOverflow.setWidth(overflow - m_layoutOverflow.x()); } 76 61 77 62 void move(LayoutUnit dx, LayoutUnit dy); … … 83 68 void setVisualOverflow(const LayoutRect&); 84 69 85 void resetLayoutOverflow(const LayoutRect& defaultRect);86 87 70 private: 88 LayoutUnit m_minYLayoutOverflow; 89 LayoutUnit m_maxYLayoutOverflow; 90 LayoutUnit m_minXLayoutOverflow; 91 LayoutUnit m_maxXLayoutOverflow; 92 93 LayoutUnit m_minYVisualOverflow; 94 LayoutUnit m_maxYVisualOverflow; 95 LayoutUnit m_minXVisualOverflow; 96 LayoutUnit m_maxXVisualOverflow; 71 LayoutRect m_layoutOverflow; 72 LayoutRect m_visualOverflow; 97 73 }; 98 99 inline LayoutRect RenderOverflow::layoutOverflowRect() const100 {101 return LayoutRect(m_minXLayoutOverflow, m_minYLayoutOverflow, m_maxXLayoutOverflow - m_minXLayoutOverflow, m_maxYLayoutOverflow - m_minYLayoutOverflow);102 }103 104 inline LayoutRect RenderOverflow::visualOverflowRect() const105 {106 return LayoutRect(m_minXVisualOverflow, m_minYVisualOverflow, m_maxXVisualOverflow - m_minXVisualOverflow, m_maxYVisualOverflow - m_minYVisualOverflow);107 }108 74 109 75 inline void RenderOverflow::move(LayoutUnit dx, LayoutUnit dy) 110 76 { 111 m_minYLayoutOverflow += dy; 112 m_maxYLayoutOverflow += dy; 113 m_minXLayoutOverflow += dx; 114 m_maxXLayoutOverflow += dx; 115 116 m_minYVisualOverflow += dy; 117 m_maxYVisualOverflow += dy; 118 m_minXVisualOverflow += dx; 119 m_maxXVisualOverflow += dx; 77 m_layoutOverflow.move(dx, dy); 78 m_visualOverflow.move(dx, dy); 120 79 } 121 80 122 81 inline void RenderOverflow::addLayoutOverflow(const LayoutRect& rect) 123 82 { 124 m_minYLayoutOverflow = std::min(rect.y(), m_minYLayoutOverflow); 125 m_maxYLayoutOverflow = std::max(rect.maxY(), m_maxYLayoutOverflow); 126 m_minXLayoutOverflow = std::min(rect.x(), m_minXLayoutOverflow); 127 m_maxXLayoutOverflow = std::max(rect.maxX(), m_maxXLayoutOverflow); 83 LayoutUnit maxX = std::max(rect.maxX(), m_layoutOverflow.maxX()); 84 LayoutUnit maxY = std::max(rect.maxY(), m_layoutOverflow.maxY()); 85 m_layoutOverflow.setX(std::min(rect.x(), m_layoutOverflow.x())); 86 m_layoutOverflow.setY(std::min(rect.y(), m_layoutOverflow.y())); 87 m_layoutOverflow.setWidth(maxX - m_layoutOverflow.x()); 88 m_layoutOverflow.setHeight(maxY - m_layoutOverflow.y()); 128 89 } 129 90 130 91 inline void RenderOverflow::addVisualOverflow(const LayoutRect& rect) 131 92 { 132 m_minYVisualOverflow = std::min(rect.y(), m_minYVisualOverflow); 133 m_maxYVisualOverflow = std::max(rect.maxY(), m_maxYVisualOverflow); 134 m_minXVisualOverflow = std::min(rect.x(), m_minXVisualOverflow); 135 m_maxXVisualOverflow = std::max(rect.maxX(), m_maxXVisualOverflow); 93 LayoutUnit maxX = std::max(rect.maxX(), m_visualOverflow.maxX()); 94 LayoutUnit maxY = std::max(rect.maxY(), m_visualOverflow.maxY()); 95 m_visualOverflow.setX(std::min(rect.x(), m_visualOverflow.x())); 96 m_visualOverflow.setY(std::min(rect.y(), m_visualOverflow.y())); 97 m_visualOverflow.setWidth(maxX - m_visualOverflow.x()); 98 m_visualOverflow.setHeight(maxY - m_visualOverflow.y()); 136 99 } 137 100 138 101 inline void RenderOverflow::setLayoutOverflow(const LayoutRect& rect) 139 102 { 140 m_minYLayoutOverflow = rect.y(); 141 m_maxYLayoutOverflow = rect.maxY(); 142 m_minXLayoutOverflow = rect.x(); 143 m_maxXLayoutOverflow = rect.maxX(); 103 m_layoutOverflow = rect; 144 104 } 145 105 146 106 inline void RenderOverflow::setVisualOverflow(const LayoutRect& rect) 147 107 { 148 m_minYVisualOverflow = rect.y(); 149 m_maxYVisualOverflow = rect.maxY(); 150 m_minXVisualOverflow = rect.x(); 151 m_maxXVisualOverflow = rect.maxX(); 152 } 153 154 inline void RenderOverflow::resetLayoutOverflow(const LayoutRect& rect) 155 { 156 m_minYLayoutOverflow = rect.y(); 157 m_maxYLayoutOverflow = rect.maxY(); 158 m_minXLayoutOverflow = rect.x(); 159 m_maxXLayoutOverflow = rect.maxX(); 108 m_visualOverflow = rect; 160 109 } 161 110 -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r113665 r117697 182 182 183 183 // Early exit if the element touches the edges. 184 LayoutUnit top = adjustedPaintOffset.y() + minYVisualOverflow();185 LayoutUnit bottom = adjustedPaintOffset.y() + maxYVisualOverflow();184 LayoutUnit top = adjustedPaintOffset.y() + visualOverflowRect().y(); 185 LayoutUnit bottom = adjustedPaintOffset.y() + visualOverflowRect().maxY(); 186 186 if (isSelected() && m_inlineBoxWrapper) { 187 187 LayoutUnit selTop = paintOffset.y() + m_inlineBoxWrapper->root()->selectionTop(); … … 193 193 LayoutRect localRepaintRect = paintInfo.rect; 194 194 localRepaintRect.inflate(maximalOutlineSize(paintInfo.phase)); 195 if (adjustedPaintOffset.x() + minXVisualOverflow() >= localRepaintRect.maxX() || adjustedPaintOffset.x() + maxXVisualOverflow() <= localRepaintRect.x())195 if (adjustedPaintOffset.x() + visualOverflowRect().x() >= localRepaintRect.maxX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= localRepaintRect.x()) 196 196 return false; 197 197 -
trunk/Source/WebCore/rendering/RenderTable.cpp
r117484 r117697 424 424 if (!sectionMoved && section->logicalTop() != logicalHeight()) { 425 425 sectionMoved = true; 426 movedSectionLogicalTop = min(logicalHeight(), section->logicalTop()) + (style()->isHorizontalWritingMode() ? section-> minYVisualOverflow() : section->minXVisualOverflow());426 movedSectionLogicalTop = min(logicalHeight(), section->logicalTop()) + (style()->isHorizontalWritingMode() ? section->visualOverflowRect().y() : section->visualOverflowRect().x()); 427 427 } 428 428 section->setLogicalLocation(LayoutPoint(sectionLogicalLeft, logicalHeight())); … … 463 463 if (!didFullRepaint && sectionMoved) { 464 464 if (style()->isHorizontalWritingMode()) 465 repaintRectangle(LayoutRect( minXVisualOverflow(), movedSectionLogicalTop, maxXVisualOverflow() - minXVisualOverflow(), maxYVisualOverflow() - movedSectionLogicalTop));465 repaintRectangle(LayoutRect(visualOverflowRect().x(), movedSectionLogicalTop, visualOverflowRect().width(), visualOverflowRect().maxY() - movedSectionLogicalTop)); 466 466 else 467 repaintRectangle(LayoutRect(movedSectionLogicalTop, minYVisualOverflow(), maxXVisualOverflow() - movedSectionLogicalTop, maxYVisualOverflow() - minYVisualOverflow()));467 repaintRectangle(LayoutRect(movedSectionLogicalTop, visualOverflowRect().y(), visualOverflowRect().maxX() - movedSectionLogicalTop, visualOverflowRect().height())); 468 468 } 469 469 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r117309 r117697 291 291 } 292 292 } 293 LayoutPoint location(max<LayoutUnit>(left, - minXVisualOverflow()), max<LayoutUnit>(top, -minYVisualOverflow()));294 LayoutRect r(-location.x(), -location.y(), location.x() + max(width() + right, maxXVisualOverflow()), location.y() + max(height() + bottom, maxYVisualOverflow()));293 LayoutPoint location(max<LayoutUnit>(left, -visualOverflowRect().x()), max<LayoutUnit>(top, -visualOverflowRect().y())); 294 LayoutRect r(-location.x(), -location.y(), location.x() + max(width() + right, visualOverflowRect().maxX()), location.y() + max(height() + bottom, visualOverflowRect().maxY())); 295 295 296 296 if (RenderView* v = view()) { -
trunk/Source/WebCore/rendering/RenderTreeAsText.cpp
r116013 r117697 711 711 LayoutRect paintDirtyRect(paintRect); 712 712 if (rootLayer == l) { 713 paintDirtyRect.setWidth(max<LayoutUnit>(paintDirtyRect.width(), rootLayer->renderBox()-> maxXLayoutOverflow()));714 paintDirtyRect.setHeight(max<LayoutUnit>(paintDirtyRect.height(), rootLayer->renderBox()-> maxYLayoutOverflow()));713 paintDirtyRect.setWidth(max<LayoutUnit>(paintDirtyRect.width(), rootLayer->renderBox()->layoutOverflowRect().maxX())); 714 paintDirtyRect.setHeight(max<LayoutUnit>(paintDirtyRect.height(), rootLayer->renderBox()->layoutOverflowRect().maxY())); 715 715 l->setSize(l->size().expandedTo(pixelSnappedIntSize(l->renderBox()->maxLayoutOverflow(), LayoutPoint(0, 0)))); 716 716 }
Note: See TracChangeset
for help on using the changeset viewer.