Title: [114764] trunk/Source
- Revision
- 114764
- Author
- [email protected]
- Date
- 2012-04-20 11:12:47 -0700 (Fri, 20 Apr 2012)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114763 => 114764)
--- trunk/Source/WebCore/ChangeLog 2012-04-20 17:57:18 UTC (rev 114763)
+++ trunk/Source/WebCore/ChangeLog 2012-04-20 18:12:47 UTC (rev 114764)
@@ -1,3 +1,21 @@
+2012-04-20 Emil A Eklund <[email protected]>
+
+ [win] Update windows platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=84283
+
+ Reviewed by Eric Seidel.
+
+ 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.
+
2012-04-20 Dana Jansens <[email protected]>
[chromium] Some filters require inflating damage rect in CCDamageTracker
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (114763 => 114764)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2012-04-20 17:57:18 UTC (rev 114763)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2012-04-20 18:12:47 UTC (rev 114764)
@@ -506,6 +506,7 @@
virtual LayoutRect boundingBoxRect() const { return LayoutRect(); }
IntRect pixelSnappedBoundingBoxRect() const { return pixelSnappedIntRect(boundingBoxRect()); }
virtual LayoutRect elementRect() const = 0;
+ IntRect pixelSnappedElementRect() const { return pixelSnappedIntRect(elementRect()); }
LayoutSize size() const { return elementRect().size(); }
IntSize pixelSnappedSize() const { return elementRect().pixelSnappedSize(); }
virtual IntPoint clickPoint();
Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.cpp (114763 => 114764)
--- trunk/Source/WebCore/platform/win/PopupMenuWin.cpp 2012-04-20 17:57:18 UTC (rev 114763)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.cpp 2012-04-20 18:12:47 UTC (rev 114764)
@@ -341,7 +341,7 @@
popupWidth += ScrollbarTheme::theme()->scrollbarThickness(SmallScrollbar);
// Add padding to align the popup text with the <select> text
- popupWidth += max(0, client()->clientPaddingRight() - client()->clientInsetRight()) + max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
+ popupWidth += max<int>(0, client()->clientPaddingRight() - client()->clientInsetRight()) + max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
// Leave room for the border
popupWidth += 2 * popupWindowBorderWidth;
@@ -653,7 +653,7 @@
// Draw the item text
if (itemStyle.isVisible()) {
- int textX = max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
+ int textX = max<int>(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
if (RenderTheme::defaultTheme()->popupOptionSupportsTextIndent() && itemStyle.textDirection() == LTR)
textX += minimumValueForLength(itemStyle.textIndent(), itemRect.width());
int textY = itemRect.y() + itemFont.fontMetrics().ascent() + (itemRect.height() - itemFont.fontMetrics().height()) / 2;
Modified: trunk/Source/WebKit/win/AccessibleBase.cpp (114763 => 114764)
--- trunk/Source/WebKit/win/AccessibleBase.cpp 2012-04-20 17:57:18 UTC (rev 114763)
+++ trunk/Source/WebKit/win/AccessibleBase.cpp 2012-04-20 18:12:47 UTC (rev 114764)
@@ -498,7 +498,7 @@
if (!childObj->documentFrameView())
return E_FAIL;
- IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->elementRect()));
+ IntRect screenRect(childObj->documentFrameView()->contentsToScreen(childObj->pixelSnappedElementRect()));
*left = screenRect.x();
*top = screenRect.y();
*width = screenRect.width();
Modified: trunk/Source/WebKit/win/ChangeLog (114763 => 114764)
--- trunk/Source/WebKit/win/ChangeLog 2012-04-20 17:57:18 UTC (rev 114763)
+++ trunk/Source/WebKit/win/ChangeLog 2012-04-20 18:12:47 UTC (rev 114764)
@@ -1,3 +1,13 @@
+2012-04-20 Emil A Eklund <[email protected]>
+
+ [win] Update windows platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=84283
+
+ Reviewed by Eric Seidel.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::accLocation):
+
2012-04-18 Vivek Galatage <[email protected]>
Web Inspector: Disabling Inspector causes build failure on Windows
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes