Changeset 112158 in webkit
- Timestamp:
- Mar 26, 2012 3:41:28 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112156 r112158 1 2012-03-26 Levi Weintraub <leviw@chromium.org> 2 3 Correct LayoutUnit usage in RenderFieldSet and RenderMenuItem 4 https://bugs.webkit.org/show_bug.cgi?id=82179 5 6 Reviewed by Julien Chaffraix. 7 8 Correcting small misuses of ints vs LayoutUnits in RenderFieldSet and RenderMenuItem. Also 9 adding zeroLayoutUnit where necessary to fix the sub-pixel build. See below for details. 10 11 No new tests. No change in behavior. 12 13 * rendering/RenderFieldset.cpp: 14 (WebCore::RenderFieldset::paintBoxDecorations): Clip rects need to be pixel snapped to mirror 15 the actual coordinates we paint. 16 (WebCore::RenderFieldset::paintMask): Using zeroLayoutUnit for ternary operation to fix the 17 sub-pixel build. 18 * rendering/RenderMenuList.cpp: 19 (WebCore::RenderMenuList::showPopup): Correctly using an IntRect for absoluteBoundingBoxRect. 20 (WebCore::RenderMenuList::clientPaddingLeft): Correcting mismatched return type with header. 21 (WebCore::RenderMenuList::clientPaddingRight): Ditto. 22 1 23 2012-03-26 Dan Bernstein <mitz@apple.com> 2 24 -
trunk/Source/WebCore/rendering/RenderFieldset.cpp
r111818 r112158 160 160 LayoutUnit clipTop = paintRect.y(); 161 161 LayoutUnit clipHeight = max(static_cast<LayoutUnit>(style()->borderTopWidth()), legend->height() - ((legend->height() - borderTop()) / 2)); 162 graphicsContext->clipOut( LayoutRect(paintRect.x() + legend->x(), clipTop, legend->width(), clipHeight));162 graphicsContext->clipOut(pixelSnappedIntRect(paintRect.x() + legend->x(), clipTop, legend->width(), clipHeight)); 163 163 } else { 164 164 LayoutUnit clipLeft = paintRect.x(); 165 165 LayoutUnit clipWidth = max(static_cast<LayoutUnit>(style()->borderLeftWidth()), legend->width()); 166 graphicsContext->clipOut( LayoutRect(clipLeft, paintRect.y() + legend->y(), clipWidth, legend->height()));166 graphicsContext->clipOut(pixelSnappedIntRect(clipLeft, paintRect.y() + legend->y(), clipWidth, legend->height())); 167 167 } 168 168 … … 184 184 // https://bugs.webkit.org/show_bug.cgi?id=47236 185 185 if (style()->isHorizontalWritingMode()) { 186 LayoutUnit yOff = (legend->y() > 0) ? 0: (legend->height() - borderTop()) / 2;186 LayoutUnit yOff = (legend->y() > 0) ? zeroLayoutUnit : (legend->height() - borderTop()) / 2; 187 187 paintRect.expand(0, -yOff); 188 188 paintRect.move(0, yOff); 189 189 } else { 190 LayoutUnit xOff = (legend->x() > 0) ? 0: (legend->width() - borderLeft()) / 2;190 LayoutUnit xOff = (legend->x() > 0) ? zeroLayoutUnit : (legend->width() - borderLeft()) / 2; 191 191 paintRect.expand(-xOff, 0); 192 192 paintRect.move(xOff, 0); -
trunk/Source/WebCore/rendering/RenderMenuList.cpp
r111539 r112158 309 309 // the actual width of the element to size the popup. 310 310 FloatPoint absTopLeft = localToAbsolute(FloatPoint(), false, true); 311 LayoutRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();311 IntRect absBounds = absoluteBoundingBoxRectIgnoringTransforms(); 312 312 int scale = document()->page()->settings()->defaultDeviceScaleFactor(); 313 313 if (scale && scale != 1) 314 314 absBounds.scale(scale); 315 absBounds.setLocation(rounded LayoutPoint(absTopLeft));315 absBounds.setLocation(roundedIntPoint(absTopLeft)); 316 316 HTMLSelectElement* select = toHTMLSelectElement(node()); 317 317 m_popup->show(absBounds, document()->view(), select->optionToListIndex(select->selectedIndex())); … … 512 512 } 513 513 514 int RenderMenuList::clientPaddingLeft() const514 LayoutUnit RenderMenuList::clientPaddingLeft() const 515 515 { 516 516 return paddingLeft() + m_innerBlock->paddingLeft(); … … 518 518 519 519 const int endOfLinePadding = 2; 520 int RenderMenuList::clientPaddingRight() const520 LayoutUnit RenderMenuList::clientPaddingRight() const 521 521 { 522 522 if (style()->appearance() == MenulistPart || style()->appearance() == MenulistButtonPart) {
Note: See TracChangeset
for help on using the changeset viewer.