Title: [113590] branches/subpixellayout/Source/WebCore
- Revision
- 113590
- Author
- [email protected]
- Date
- 2012-04-09 10:26:20 -0700 (Mon, 09 Apr 2012)
Log Message
Fix a bug in calculating pixelSnappedClientWidth/Height (thanks Julien), and cleaning up some style errors in LayoutTypes and Length.
Modified Paths
Diff
Modified: branches/subpixellayout/Source/WebCore/platform/Length.h (113589 => 113590)
--- branches/subpixellayout/Source/WebCore/platform/Length.h 2012-04-09 17:17:25 UTC (rev 113589)
+++ branches/subpixellayout/Source/WebCore/platform/Length.h 2012-04-09 17:26:20 UTC (rev 113590)
@@ -24,13 +24,13 @@
#define Length_h
#include "AnimationUtilities.h"
+#include "LayoutTypes.h"
#include <wtf/Assertions.h>
#include <wtf/FastAllocBase.h>
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/MathExtras.h>
#include <wtf/PassOwnArrayPtr.h>
-#include "LayoutTypes.h"
namespace WebCore {
@@ -109,11 +109,13 @@
return *this;
}
- float value() const {
+ float value() const
+ {
return getFloatValue();
}
- int intValue() const {
+ int intValue() const
+ {
if (isCalculated()) {
ASSERT_NOT_REACHED();
return 0;
Modified: branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h (113589 => 113590)
--- branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h 2012-04-09 17:17:25 UTC (rev 113589)
+++ branches/subpixellayout/Source/WebCore/rendering/LayoutTypes.h 2012-04-09 17:26:20 UTC (rev 113590)
@@ -36,9 +36,9 @@
#ifndef LayoutTypes_h
#define LayoutTypes_h
+#include "FloatRect.h"
#include "FractionalLayoutUnit.h"
#include "FractionalLayoutRect.h"
-#include "FloatRect.h"
#include "IntRect.h"
#include <wtf/MathExtras.h>
Modified: branches/subpixellayout/Source/WebCore/rendering/RenderBox.cpp (113589 => 113590)
--- branches/subpixellayout/Source/WebCore/rendering/RenderBox.cpp 2012-04-09 17:17:25 UTC (rev 113589)
+++ branches/subpixellayout/Source/WebCore/rendering/RenderBox.cpp 2012-04-09 17:26:20 UTC (rev 113590)
@@ -487,12 +487,12 @@
int RenderBox::pixelSnappedClientWidth() const
{
- return snapSizeToPixel(clientWidth(), clientLeft());
+ return snapSizeToPixel(clientWidth(), x() + clientLeft());
}
int RenderBox::pixelSnappedClientHeight() const
{
- return snapSizeToPixel(clientHeight(), clientTop());
+ return snapSizeToPixel(clientHeight(), y() + clientTop());
}
int RenderBox::scrollWidth() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes