Changeset 114764 in webkit


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

[win] Update windows platform code to use pixel snapped values
https://bugs.webkit.org/show_bug.cgi?id=84283

Reviewed by Eric Seidel.

Source/WebCore:

No new tests, no change in functionality.

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::pixelSnappedElementRect):
Use pixel snapped values when computing screenRect.

  • platform/win/PopupMenuWin.cpp:

(WebCore::PopupMenuWin::calculatePositionAndSize):
(WebCore::PopupMenuWin::paint):
Cast client padding to ints as they are guaranteed to align with device pixels.

Source/WebKit/win:

  • AccessibleBase.cpp:

(AccessibleBase::accLocation):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r114763 r114764  
     12012-04-20  Emil A Eklund  <eae@chromium.org>
     2
     3        [win] Update windows platform code to use pixel snapped values
     4        https://bugs.webkit.org/show_bug.cgi?id=84283
     5
     6        Reviewed by Eric Seidel.
     7
     8        No new tests, no change in functionality.
     9
     10        * accessibility/AccessibilityObject.h:
     11        (WebCore::AccessibilityObject::pixelSnappedElementRect):
     12        Use pixel snapped values when computing screenRect.
     13       
     14        * platform/win/PopupMenuWin.cpp:
     15        (WebCore::PopupMenuWin::calculatePositionAndSize):
     16        (WebCore::PopupMenuWin::paint):
     17        Cast client padding to ints as they are guaranteed to align with device pixels.
     18
    1192012-04-20  Dana Jansens  <danakj@chromium.org>
    220
  • trunk/Source/WebCore/accessibility/AccessibilityObject.h

    r114031 r114764  
    507507    IntRect pixelSnappedBoundingBoxRect() const { return pixelSnappedIntRect(boundingBoxRect()); }
    508508    virtual LayoutRect elementRect() const = 0;
     509    IntRect pixelSnappedElementRect() const { return pixelSnappedIntRect(elementRect()); }
    509510    LayoutSize size() const { return elementRect().size(); }
    510511    IntSize pixelSnappedSize() const { return elementRect().pixelSnappedSize(); }
  • trunk/Source/WebCore/platform/win/PopupMenuWin.cpp

    r112198 r114764  
    342342
    343343    // Add padding to align the popup text with the <select> text
    344     popupWidth += max(0, client()->clientPaddingRight() - client()->clientInsetRight()) + max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
     344    popupWidth += max<int>(0, client()->clientPaddingRight() - client()->clientInsetRight()) + max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
    345345
    346346    // Leave room for the border
     
    654654        // Draw the item text
    655655        if (itemStyle.isVisible()) {
    656             int textX = max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
     656            int textX = max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
    657657            if (RenderTheme::defaultTheme()->popupOptionSupportsTextIndent() && itemStyle.textDirection() == LTR)
    658658                textX += minimumValueForLength(itemStyle.textIndent(), itemRect.width());
  • trunk/Source/WebKit/win/AccessibleBase.cpp

    r103112 r114764  
    499499        return E_FAIL;
    500500
    501     IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect()));
     501    IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->pixelSnappedElementRect()));
    502502    *left = screenRect.x();
    503503    *top = screenRect.y();
  • trunk/Source/WebKit/win/ChangeLog

    r114499 r114764  
     12012-04-20  Emil A Eklund  <eae@chromium.org>
     2
     3        [win] Update windows platform code to use pixel snapped values
     4        https://bugs.webkit.org/show_bug.cgi?id=84283
     5
     6        Reviewed by Eric Seidel.
     7
     8        * AccessibleBase.cpp:
     9        (AccessibleBase::accLocation):
     10
    1112012-04-18  Vivek Galatage  <vivekgalatage@gmail.com>
    212
Note: See TracChangeset for help on using the changeset viewer.