Changeset 114211 in webkit


Ignore:
Timestamp:
Apr 14, 2012 8:51:21 PM (12 years ago)
Author:
eae@chromium.org
Message:

Fix pixelSnapping for CalendarPicker, MediaControl and ScrollbarPart
https://bugs.webkit.org/show_bug.cgi?id=83929

Reviewed by Eric Seidel.

Update CalendarPickerElement and MediaControlElements to use
pixelSnappedSize in preparation for turning on subpixel support.
Update RenderScrollbarPart to pixel snap rect before painting to ensure
that it is painted on device pixel boundaries.

No new tests, no change in functionality.

  • html/shadow/CalendarPickerElement.cpp:

(WebCore::CalendarPickerElement::openPopup):

  • html/shadow/MediaControlElements.cpp:

(WebCore::RenderMediaVolumeSliderContainer::layout):

  • rendering/RenderScrollbarPart.cpp:

(WebCore::RenderScrollbarPart::paintIntoRect):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r114210 r114211  
     12012-04-14  Emil A Eklund  <eae@chromium.org>
     2
     3        Fix pixelSnapping for CalendarPicker, MediaControl and ScrollbarPart
     4        https://bugs.webkit.org/show_bug.cgi?id=83929
     5
     6        Reviewed by Eric Seidel.
     7
     8        Update CalendarPickerElement and MediaControlElements to use
     9        pixelSnappedSize in preparation for turning on subpixel support.
     10        Update RenderScrollbarPart to pixel snap rect before painting to ensure
     11        that it is painted on device pixel boundaries.
     12
     13        No new tests, no change in functionality.
     14
     15        * html/shadow/CalendarPickerElement.cpp:
     16        (WebCore::CalendarPickerElement::openPopup):
     17        * html/shadow/MediaControlElements.cpp:
     18        (WebCore::RenderMediaVolumeSliderContainer::layout):
     19        * rendering/RenderScrollbarPart.cpp:
     20        (WebCore::RenderScrollbarPart::paintIntoRect):
     21
    1222012-04-14  Kent Tamura  <tkent@chromium.org>
    223
  • trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp

    r114210 r114211  
    104104    if (!document()->view())
    105105        return;
    106     IntRect elementRectInRootView = document()->view()->contentsToRootView(hostInput()->getRect());
     106    IntRect elementRectInRootView = document()->view()->contentsToRootView(hostInput()->getPixelSnappedRect());
    107107    m_popup = chrome->client()->openPagePopup(this, elementRectInRootView);
    108108}
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r114179 r114211  
    343343    LayoutStateDisabler layoutStateDisabler(view());
    344344
    345     LayoutPoint offset = theme()->volumeSliderOffsetFromMuteButton(buttonBox, size());
     345    IntPoint offset = theme()->volumeSliderOffsetFromMuteButton(buttonBox, pixelSnappedSize());
    346346    setX(offset.x() + buttonBox->offsetLeft());
    347347    setY(offset.y() + buttonBox->offsetTop());
  • trunk/Source/WebCore/rendering/RenderScrollbarPart.cpp

    r112301 r114211  
    173173
    174174    // Now do the paint.
    175     PaintInfo paintInfo(graphicsContext, rect, PaintPhaseBlockBackground, false, 0, 0, 0);
     175    PaintInfo paintInfo(graphicsContext, pixelSnappedIntRect(rect), PaintPhaseBlockBackground, false, 0, 0, 0);
    176176    paint(paintInfo, paintOffset);
    177177    paintInfo.phase = PaintPhaseChildBlockBackgrounds;
Note: See TracChangeset for help on using the changeset viewer.