Changeset 113471 in webkit
- Timestamp:
- Apr 6, 2012 11:55:54 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r113467 r113471 1 2012-04-06 Emil A Eklund <eae@chromium.org> 2 3 Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject 4 https://bugs.webkit.org/show_bug.cgi?id=83343 5 6 Reviewed by Eric Seidel. 7 8 Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and 9 RenderEmbeddedObject in preparation for turing on subpixel support. 10 11 No new tests, no change in functionality. 12 13 * rendering/RenderBlock.cpp: 14 (WebCore::RenderBlock::baselinePosition): 15 * rendering/RenderEmbeddedObject.cpp: 16 (WebCore::RenderEmbeddedObject::nodeAtPoint): 17 1 18 2012-04-06 Dan Bernstein <mitz@apple.com> 2 19 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r113252 r113471 5917 5917 : (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun()); 5918 5918 5919 int baselinePos = ignoreBaseline ? LayoutUnit(-1) : lastLineBoxBaseline();5919 LayoutUnit baselinePos = ignoreBaseline ? static_cast<LayoutUnit>(-1) : lastLineBoxBaseline(); 5920 5920 5921 int bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();5921 LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth(); 5922 5922 if (baselinePos != -1 && baselinePos <= bottomOfContent) 5923 5923 return direction == HorizontalLine ? marginTop() + baselinePos : marginRight() + baselinePos; -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r112229 r113471 262 262 263 263 PluginViewBase* view = static_cast<PluginViewBase*>(widget()); 264 IntPoint roundedPoint = roundedIntPoint(pointInContainer); 264 265 265 266 if (Scrollbar* horizontalScrollbar = view->horizontalScrollbar()) { 266 if (horizontalScrollbar->shouldParticipateInHitTesting() && horizontalScrollbar->frameRect().contains( pointInContainer)) {267 if (horizontalScrollbar->shouldParticipateInHitTesting() && horizontalScrollbar->frameRect().contains(roundedPoint)) { 267 268 result.setScrollbar(horizontalScrollbar); 268 269 return true; … … 271 272 272 273 if (Scrollbar* verticalScrollbar = view->verticalScrollbar()) { 273 if (verticalScrollbar->shouldParticipateInHitTesting() && verticalScrollbar->frameRect().contains( pointInContainer)) {274 if (verticalScrollbar->shouldParticipateInHitTesting() && verticalScrollbar->frameRect().contains(roundedPoint)) { 274 275 result.setScrollbar(verticalScrollbar); 275 276 return true;
Note: See TracChangeset
for help on using the changeset viewer.