Changeset 113471 in webkit


Ignore:
Timestamp:
Apr 6, 2012 11:55:54 AM (12 years ago)
Author:
eae@chromium.org
Message:

Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject
https://bugs.webkit.org/show_bug.cgi?id=83343

Reviewed by Eric Seidel.

Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and
RenderEmbeddedObject in preparation for turing on subpixel support.

No new tests, no change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::baselinePosition):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::nodeAtPoint):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r113467 r113471  
     12012-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
    1182012-04-06  Dan Bernstein  <mitz@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r113252 r113471  
    59175917            : (layer()->horizontalScrollbar() || layer()->scrollXOffset() != 0)))) || (isWritingModeRoot() && !isRubyRun());
    59185918       
    5919         int baselinePos = ignoreBaseline ? LayoutUnit(-1) : lastLineBoxBaseline();
     5919        LayoutUnit baselinePos = ignoreBaseline ? static_cast<LayoutUnit>(-1) : lastLineBoxBaseline();
    59205920       
    5921         int bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
     5921        LayoutUnit bottomOfContent = direction == HorizontalLine ? borderTop() + paddingTop() + contentHeight() : borderRight() + paddingRight() + contentWidth();
    59225922        if (baselinePos != -1 && baselinePos <= bottomOfContent)
    59235923            return direction == HorizontalLine ? marginTop() + baselinePos : marginRight() + baselinePos;
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r112229 r113471  
    262262
    263263    PluginViewBase* view = static_cast<PluginViewBase*>(widget());
     264    IntPoint roundedPoint = roundedIntPoint(pointInContainer);
    264265
    265266    if (Scrollbar* horizontalScrollbar = view->horizontalScrollbar()) {
    266         if (horizontalScrollbar->shouldParticipateInHitTesting() && horizontalScrollbar->frameRect().contains(pointInContainer)) {
     267        if (horizontalScrollbar->shouldParticipateInHitTesting() && horizontalScrollbar->frameRect().contains(roundedPoint)) {
    267268            result.setScrollbar(horizontalScrollbar);
    268269            return true;
     
    271272
    272273    if (Scrollbar* verticalScrollbar = view->verticalScrollbar()) {
    273         if (verticalScrollbar->shouldParticipateInHitTesting() && verticalScrollbar->frameRect().contains(pointInContainer)) {
     274        if (verticalScrollbar->shouldParticipateInHitTesting() && verticalScrollbar->frameRect().contains(roundedPoint)) {
    274275            result.setScrollbar(verticalScrollbar);
    275276            return true;
Note: See TracChangeset for help on using the changeset viewer.