Title: [113484] trunk/Source
- Revision
- 113484
- Author
- [email protected]
- Date
- 2012-04-06 12:54:28 -0700 (Fri, 06 Apr 2012)
Log Message
Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
https://bugs.webkit.org/show_bug.cgi?id=83376
Reviewed by Eric Seidel.
Source/WebCore:
Correcting LayoutUnit usage in QT RenderTheme code.
No new tests. No change in behavior.
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before
applying it to the pixel snapped partRect.
(WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor
offset, and also pixel snapping the content rect before painting.
Source/WebKit/qt:
Calculating the progress animation using the pixel-snapped RenderProgress size instead
of the internal sub-pixel version.
* WebCoreSupport/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::animationDurationForProgressBar):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (113483 => 113484)
--- trunk/Source/WebCore/ChangeLog 2012-04-06 19:47:25 UTC (rev 113483)
+++ trunk/Source/WebCore/ChangeLog 2012-04-06 19:54:28 UTC (rev 113484)
@@ -1,3 +1,20 @@
+2012-04-06 Levi Weintraub <[email protected]>
+
+ Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
+ https://bugs.webkit.org/show_bug.cgi?id=83376
+
+ Reviewed by Eric Seidel.
+
+ Correcting LayoutUnit usage in QT RenderTheme code.
+
+ No new tests. No change in behavior.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before
+ applying it to the pixel snapped partRect.
+ (WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor
+ offset, and also pixel snapping the content rect before painting.
+
2012-04-06 Kenneth Russell <[email protected]>
context-lost.html is failing
Modified: trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp (113483 => 113484)
--- trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp 2012-04-06 19:47:25 UTC (rev 113483)
+++ trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp 2012-04-06 19:54:28 UTC (rev 113484)
@@ -435,7 +435,7 @@
IntRect RenderThemeQt::convertToPaintingRect(RenderObject* inputRenderer, const RenderObject* partRenderer, IntRect partRect, const IntRect& localOffset) const
{
// Compute an offset between the part renderer and the input renderer.
- IntSize offsetFromInputRenderer = -(partRenderer->offsetFromAncestorContainer(inputRenderer));
+ IntSize offsetFromInputRenderer = -roundedIntSize(partRenderer->offsetFromAncestorContainer(inputRenderer));
// Move the rect into partRenderer's coords.
partRect.move(offsetFromInputRenderer);
// Account for the local drawing offset.
@@ -454,7 +454,7 @@
if (!input->renderer()->isBox())
return false;
RenderBox* inputRenderBox = toRenderBox(input->renderer());
- IntRect inputContentBox = inputRenderBox->contentBoxRect();
+ IntRect inputContentBox = pixelSnappedIntRect(inputRenderBox->contentBoxRect());
// Make sure the scaled button stays square and will fit in its parent's box.
int cancelButtonSize = qMin(inputContentBox.width(), qMin(inputContentBox.height(), r.height()));
Modified: trunk/Source/WebKit/qt/ChangeLog (113483 => 113484)
--- trunk/Source/WebKit/qt/ChangeLog 2012-04-06 19:47:25 UTC (rev 113483)
+++ trunk/Source/WebKit/qt/ChangeLog 2012-04-06 19:54:28 UTC (rev 113484)
@@ -1,3 +1,16 @@
+2012-04-06 Levi Weintraub <[email protected]>
+
+ Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
+ https://bugs.webkit.org/show_bug.cgi?id=83376
+
+ Reviewed by Eric Seidel.
+
+ Calculating the progress animation using the pixel-snapped RenderProgress size instead
+ of the internal sub-pixel version.
+
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
+
2012-04-05 Patrick Gansterer <[email protected]>
[Qt] Correct <wtf/*.h> include paths.
Modified: trunk/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp (113483 => 113484)
--- trunk/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp 2012-04-06 19:47:25 UTC (rev 113483)
+++ trunk/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp 2012-04-06 19:54:28 UTC (rev 113484)
@@ -499,7 +499,7 @@
return 0;
QStyleOptionProgressBarV2 option;
- option.rect.setSize(renderProgress->size());
+ option.rect.setSize(renderProgress->pixelSnappedSize());
// FIXME: Until http://bugreports.qt.nokia.com/browse/QTBUG-9171 is fixed,
// we simulate one square animating across the progress bar.
return (option.rect.width() / qStyle()->pixelMetric(QStyle::PM_ProgressBarChunkWidth, &option)) * animationRepeatIntervalForProgressBar(renderProgress);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes