Changeset 115689 in webkit
- Timestamp:
- Apr 30, 2012 4:42:05 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r115687 r115689 1 2012-04-30 Levi Weintraub <leviw@chromium.org> 2 3 Update LayoutUnit usage in InlineFlowBox and RenderWidget 4 https://bugs.webkit.org/show_bug.cgi?id=85239 5 6 Reviewed by Eric Seidel. 7 8 Updating LayoutUnit usage in a pair of remaining functions to minimize the remaining work to switching 9 to FractionalLayoutUnits for layout instead of integers. 10 11 No new tests. No change in behavior. 12 13 * rendering/InlineFlowBox.cpp: 14 (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Though stored as a float, the top is always 15 set to an integer value. When we move to sub-pixel, we need to preserve this. Not preserving this 16 behavior affects text decorations, most notably underlines. 17 * rendering/RenderWidget.cpp: 18 (WebCore::RenderWidget::updateWidgetGeometry): Adding pixel snapping for the content box if it's 19 not transformed (absoluteContentBox includes pixel snapping), and properly treating the boundingBox 20 as an IntRect. 21 1 22 2012-04-30 Levi Weintraub <leviw@chromium.org> 2 23 -
trunk/Source/WebCore/rendering/InlineFlowBox.cpp
r114433 r115689 595 595 if (isRootBox) { 596 596 const FontMetrics& fontMetrics = renderer()->style(isFirstLineStyle())->fontMetrics(); 597 setLogicalTop(top + maxAscent - fontMetrics.ascent(baselineType)); 597 // RootInlineBoxes are always placed on at pixel boundaries in their logical y direction. Not doing 598 // so results in incorrect rendering of text decorations, most notably underlines. 599 setLogicalTop(roundToInt(top + maxAscent - fontMetrics.ascent(baselineType))); 598 600 } 599 601 -
trunk/Source/WebCore/rendering/RenderWidget.cpp
r112301 r115689 177 177 bool RenderWidget::updateWidgetGeometry() 178 178 { 179 LayoutRect contentBox = contentBoxRect();179 IntRect contentBox = pixelSnappedIntRect(contentBoxRect()); 180 180 if (!m_widget->transformsAffectFrameRect()) 181 181 return setWidgetGeometry(absoluteContentBox()); 182 182 183 LayoutRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox());183 IntRect absoluteContentBox(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox()); 184 184 if (m_widget->isFrameView()) { 185 185 contentBox.setLocation(absoluteContentBox.location());
Note: See TracChangeset
for help on using the changeset viewer.