Roll out r107887
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 18:12:25 +0000 (18:12 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Feb 2012 18:12:25 +0000 (18:12 +0000)
It broke 32-bit builds due to truncation from "long long" to "int".

Original bug is <http://webkit.org/b/76571> Add FractionalLayoutPoint/Size/Rect for
sub-pixel layout

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::isInBounds):
(WebCore::operator==):
(WebCore::operator*):
* platform/graphics/FloatPoint.cpp:
* platform/graphics/FloatPoint.h:
(WebCore):
(FloatPoint):
(WebCore::FloatPoint::move):
(WebCore::FloatPoint::moveBy):
* platform/graphics/FloatRect.cpp:
* platform/graphics/FloatRect.h:
(WebCore):
* platform/graphics/FloatSize.cpp:
* platform/graphics/FloatSize.h:
(WebCore):
* platform/graphics/FractionalLayoutPoint.h: Removed.
* platform/graphics/FractionalLayoutRect.cpp: Removed.
* platform/graphics/FractionalLayoutRect.h: Removed.
* platform/graphics/FractionalLayoutSize.cpp: Removed.
* platform/graphics/FractionalLayoutSize.h: Removed.
* platform/graphics/IntRect.cpp:
* platform/graphics/IntRect.h:
(WebCore):
(IntRect):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.order
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/FractionalLayoutUnit.h
Source/WebCore/platform/graphics/FloatPoint.cpp
Source/WebCore/platform/graphics/FloatPoint.h
Source/WebCore/platform/graphics/FloatRect.cpp
Source/WebCore/platform/graphics/FloatRect.h
Source/WebCore/platform/graphics/FloatSize.cpp
Source/WebCore/platform/graphics/FloatSize.h
Source/WebCore/platform/graphics/FractionalLayoutPoint.h [deleted file]
Source/WebCore/platform/graphics/FractionalLayoutRect.cpp [deleted file]
Source/WebCore/platform/graphics/FractionalLayoutRect.h [deleted file]
Source/WebCore/platform/graphics/FractionalLayoutSize.cpp [deleted file]
Source/WebCore/platform/graphics/FractionalLayoutSize.h [deleted file]
Source/WebCore/platform/graphics/IntRect.cpp
Source/WebCore/platform/graphics/IntRect.h

index 4a4f626..64a9e2c 100644 (file)
@@ -1100,8 +1100,6 @@ SET(WebCore_SOURCES
     platform/graphics/BitmapImage.cpp
     platform/graphics/Color.cpp
     platform/graphics/CrossfadeGeneratedImage.cpp
-    platform/graphics/FractionalLayoutRect.cpp
-    platform/graphics/FractionalLayoutSize.cpp
     platform/graphics/FloatPoint.cpp
     platform/graphics/FloatPoint3D.cpp
     platform/graphics/FloatQuad.cpp
index 3dd8195..78b5a51 100644 (file)
@@ -1,3 +1,44 @@
+2012-02-16  Adam Roben  <aroben@apple.com>
+
+        Roll out r107887
+
+        It broke 32-bit builds due to truncation from "long long" to "int".
+
+        Original bug is <http://webkit.org/b/76571> Add FractionalLayoutPoint/Size/Rect for
+        sub-pixel layout
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.gypi:
+        * WebCore.order:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/FractionalLayoutUnit.h:
+        (WebCore::FractionalLayoutUnit::isInBounds):
+        (WebCore::operator==):
+        (WebCore::operator*):
+        * platform/graphics/FloatPoint.cpp:
+        * platform/graphics/FloatPoint.h:
+        (WebCore):
+        (FloatPoint):
+        (WebCore::FloatPoint::move):
+        (WebCore::FloatPoint::moveBy):
+        * platform/graphics/FloatRect.cpp:
+        * platform/graphics/FloatRect.h:
+        (WebCore):
+        * platform/graphics/FloatSize.cpp:
+        * platform/graphics/FloatSize.h:
+        (WebCore):
+        * platform/graphics/FractionalLayoutPoint.h: Removed.
+        * platform/graphics/FractionalLayoutRect.cpp: Removed.
+        * platform/graphics/FractionalLayoutRect.h: Removed.
+        * platform/graphics/FractionalLayoutSize.cpp: Removed.
+        * platform/graphics/FractionalLayoutSize.h: Removed.
+        * platform/graphics/IntRect.cpp:
+        * platform/graphics/IntRect.h:
+        (WebCore):
+        (IntRect):
+
 2012-02-16  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: cache settings values
index 5ae95d5..cc6fb1e 100644 (file)
@@ -2962,11 +2962,6 @@ webcore_sources += \
        Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h \
        Source/WebCore/platform/graphics/filters/arm/FELightingNEON.cpp \
        Source/WebCore/platform/graphics/filters/arm/FELightingNEON.h \
-       Source/WebCore/platform/graphics/FractionalLayoutPoint.h \
-       Source/WebCore/platform/graphics/FractionalLayoutRect.cpp \
-       Source/WebCore/platform/graphics/FractionalLayoutRect.h \
-       Source/WebCore/platform/graphics/FractionalLayoutSize.cpp \
-       Source/WebCore/platform/graphics/FractionalLayoutSize.h \
        Source/WebCore/platform/graphics/FloatPoint3D.cpp \
        Source/WebCore/platform/graphics/FloatPoint3D.h \
        Source/WebCore/platform/graphics/FloatPoint.cpp \
index b0729b3..6d99658 100644 (file)
             'platform/graphics/CrossfadeGeneratedImage.cpp',
             'platform/graphics/CrossfadeGeneratedImage.h',
             'platform/graphics/Extensions3D.h',
-            'platform/graphics/FractionalLayoutRect.cpp',
-            'platform/graphics/FractionalLayoutSize.cpp',
             'platform/graphics/FloatPoint.cpp',
             'platform/graphics/FloatPoint3D.cpp',
             'platform/graphics/FloatQuad.cpp',
index 6ac9b41..497bb13 100644 (file)
@@ -10320,7 +10320,7 @@ __ZN7WebCore9CSSParser11parseCanvasERN3WTF6RefPtrINS_8CSSValueEEE
 __ZNK7WebCore8CSSValue12isImageValueEv
 __ZNK7WebCore22CSSImageGeneratorValue21isImageGeneratorValueEv
 __ZN7WebCore22CSSImageGeneratorValue14generatedImageEv
-__ZNK7WebCore14CSSCanvasValue11isFractionalLayoutSizeEv
+__ZNK7WebCore14CSSCanvasValue11isFixedSizeEv
 __ZN7WebCore19StyleGeneratedImage9addClientEPNS_12RenderObjectE
 __ZN7WebCore22CSSImageGeneratorValue9addClientEPNS_12RenderObjectERKNS_7IntSizeE
 __ZN7WebCore46jsDocumentPrototypeFunctionGetCSSCanvasContextEPN3JSC9ExecStateE
@@ -10454,7 +10454,7 @@ __ZN7WebCore15CSSReflectValueD0Ev
 __ZN7WebCore9CSSParser16parseBorderImageEibRN3WTF6RefPtrINS_8CSSValueEEE
 __ZN7WebCore23BorderImageParseContext17commitBorderImageEPNS_9CSSParserEb
 __ZN7WebCore23BorderImageParseContextD1Ev
-__ZNK7WebCore22CSSImageGeneratorValue11isFractionalLayoutSizeEv
+__ZNK7WebCore22CSSImageGeneratorValue11isFixedSizeEv
 __ZN7WebCore16CSSGradientValue5imageEPNS_12RenderObjectERKNS_7IntSizeE
 __ZNK3WTF9HashTableIPN7WebCore12RenderObjectESt4pairIS3_S4_INS1_7IntSizeEiEENS_18PairFirstExtractorIS7_EENS_7PtrHashIS3_EENS_14PairHashTraitsINS_10HashTraitsIS3_EENSD_IS6_EEEESE_E8containsIS3_NS_22IdentityHashTranslatorIS3_S7_SB_EEEEbRKT_
 __ZN7WebCore22CSSImageGeneratorValue8getImageEPNS_12RenderObjectERKNS_7IntSizeE
index 9d407ac..102bc3d 100755 (executable)
                                        >
                                </File>
                                <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutPoint.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutRect.cpp"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutRect.h"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutSize.cpp"
-                                       >
-                               </File>
-                               <File
-                                       RelativePath="..\platform\graphics\FractionalLayoutSize.h"
-                                       >
-                               </File>
-                               <File
                                        RelativePath="..\platform\graphics\FloatPoint.cpp"
                                        >
                                </File>
index 2555bca..c3e57a0 100644 (file)
                1432E8490C51493F00B1500F /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1432E8480C51493F00B1500F /* GCController.cpp */; };
                1449E24C107D4A8400B5793F /* JSCallbackData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1449E24A107D4A8400B5793F /* JSCallbackData.h */; };
                1449E287107D4DB400B5793F /* JSCallbackData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1449E286107D4DB400B5793F /* JSCallbackData.cpp */; };
-               144FCE5214EC79BC000D17A3 /* FractionalLayoutUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5114EC79BC000D17A3 /* FractionalLayoutUnit.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               144FCE5914EC79E7000D17A3 /* FractionalLayoutPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5414EC79E7000D17A3 /* FractionalLayoutPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               144FCE5A14EC79E7000D17A3 /* FractionalLayoutRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 144FCE5514EC79E7000D17A3 /* FractionalLayoutRect.cpp */; };
-               144FCE5B14EC79E7000D17A3 /* FractionalLayoutRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5614EC79E7000D17A3 /* FractionalLayoutRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               144FCE5C14EC79E7000D17A3 /* FractionalLayoutSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 144FCE5714EC79E7000D17A3 /* FractionalLayoutSize.cpp */; };
-               144FCE5D14EC79E7000D17A3 /* FractionalLayoutSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1464E06C135EC10600FDB00A /* JSMediaListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1464E06B135EC10600FDB00A /* JSMediaListCustom.cpp */; };
                1477E7760BF4134A00152872 /* PageCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1477E7740BF4134A00152872 /* PageCache.cpp */; };
                1477E7770BF4134A00152872 /* PageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1477E7750BF4134A00152872 /* PageCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B8DBDB4C130B0F8A00F5CDB1 /* SetSelectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B8DBDB48130B0F8A00F5CDB1 /* SetSelectionCommand.h */; };
                B8DBDB4D130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B8DBDB49130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp */; };
                B8DBDB4E130B0F8A00F5CDB1 /* SpellingCorrectionCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B8DBDB4A130B0F8A00F5CDB1 /* SpellingCorrectionCommand.h */; };
+               BAB22AD414B7A02D00D8ABA6 /* FractionalLayoutUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = BAB771501444CBB400EC4C4C /* FractionalLayoutUnit.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BACF290113B2A0D500781F90 /* LayoutTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BACF290013B2A0D500781F90 /* LayoutTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BC00F0040E0A185500FD04E3 /* DOMFile.h in Headers */ = {isa = PBXBuildFile; fileRef = BC00EFFE0E0A185500FD04E3 /* DOMFile.h */; };
                BC00F0050E0A185500FD04E3 /* DOMFile.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */; };
                1432E8480C51493F00B1500F /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = "<group>"; };
                1449E24A107D4A8400B5793F /* JSCallbackData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackData.h; sourceTree = "<group>"; };
                1449E286107D4DB400B5793F /* JSCallbackData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCallbackData.cpp; sourceTree = "<group>"; };
-               144FCE5114EC79BC000D17A3 /* FractionalLayoutUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutUnit.h; sourceTree = "<group>"; };
-               144FCE5414EC79E7000D17A3 /* FractionalLayoutPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutPoint.h; sourceTree = "<group>"; };
-               144FCE5514EC79E7000D17A3 /* FractionalLayoutRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FractionalLayoutRect.cpp; sourceTree = "<group>"; };
-               144FCE5614EC79E7000D17A3 /* FractionalLayoutRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutRect.h; sourceTree = "<group>"; };
-               144FCE5714EC79E7000D17A3 /* FractionalLayoutSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FractionalLayoutSize.cpp; sourceTree = "<group>"; };
-               144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutSize.h; sourceTree = "<group>"; };
                1464E06B135EC10600FDB00A /* JSMediaListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaListCustom.cpp; sourceTree = "<group>"; };
                1477E7740BF4134A00152872 /* PageCache.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PageCache.cpp; sourceTree = "<group>"; };
                1477E7750BF4134A00152872 /* PageCache.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PageCache.h; sourceTree = "<group>"; };
                B8DBDB48130B0F8A00F5CDB1 /* SetSelectionCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SetSelectionCommand.h; sourceTree = "<group>"; };
                B8DBDB49130B0F8A00F5CDB1 /* SpellingCorrectionCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpellingCorrectionCommand.cpp; sourceTree = "<group>"; };
                B8DBDB4A130B0F8A00F5CDB1 /* SpellingCorrectionCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpellingCorrectionCommand.h; sourceTree = "<group>"; };
+               BAB771501444CBB400EC4C4C /* FractionalLayoutUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractionalLayoutUnit.h; sourceTree = "<group>"; };
                BACF290013B2A0D500781F90 /* LayoutTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutTypes.h; sourceTree = "<group>"; };
                BC00EFFE0E0A185500FD04E3 /* DOMFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMFile.h; sourceTree = "<group>"; };
                BC00EFFF0E0A185500FD04E3 /* DOMFile.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMFile.mm; sourceTree = "<group>"; };
                                37202198106213C600F25C4B /* FontSmoothingMode.h */,
                                3784C34A0E11AA34007D8D48 /* FontTraitsMask.h */,
                                BCE4413512F7490B009B84B8 /* FontWidthVariant.h */,
-                               144FCE5414EC79E7000D17A3 /* FractionalLayoutPoint.h */,
-                               144FCE5514EC79E7000D17A3 /* FractionalLayoutRect.cpp */,
-                               144FCE5614EC79E7000D17A3 /* FractionalLayoutRect.h */,
-                               144FCE5714EC79E7000D17A3 /* FractionalLayoutSize.cpp */,
-                               144FCE5814EC79E7000D17A3 /* FractionalLayoutSize.h */,
                                BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */,
                                BCE04C890DAFF7A0007A0F41 /* Generator.h */,
                                2D2FC0561460CD6F00263633 /* GeneratorGeneratedImage.cpp */,
                                C57FEDE01212EE9C0097BE65 /* FileSystem.cpp */,
                                514B3F720C722047000530DF /* FileSystem.h */,
                                BC073BA90C399B1F000F5979 /* FloatConversion.h */,
-                               144FCE5114EC79BC000D17A3 /* FractionalLayoutUnit.h */,
+                               BAB771501444CBB400EC4C4C /* FractionalLayoutUnit.h */,
                                A8748BDF12CBF2DC001FBA41 /* HashTools.h */,
                                D6FDAEF2149C06190037B1E1 /* HistogramSupport.cpp */,
                                D630E2AB149BF344005B2F93 /* HistogramSupport.h */,
                                1A2AAC590DC2A3B100A20D9A /* ApplicationCacheStorage.h in Headers */,
                                9B417064125662B3006B28FC /* ApplyBlockElementCommand.h in Headers */,
                                93309DD9099E64920056E581 /* ApplyStyleCommand.h in Headers */,
+                               BAB22AD414B7A02D00D8ABA6 /* FractionalLayoutUnit.h in Headers */,
                                512DD8F60D91E6AF000F89EE /* Archive.h in Headers */,
                                512DD8FD0D91E6AF000F89EE /* ArchiveFactory.h in Headers */,
                                512DD8FC0D91E6AF000F89EE /* ArchiveResource.h in Headers */,
                                B6D9D27B14EAC0860090D75E /* JSFocusEvent.h in Headers */,
                                C598905714E9C28000E8D18B /* PasteboardStrategy.h in Headers */,
                                C598905814E9C29900E8D18B /* PlatformPasteboard.h in Headers */,
-                               144FCE5214EC79BC000D17A3 /* FractionalLayoutUnit.h in Headers */,
-                               144FCE5914EC79E7000D17A3 /* FractionalLayoutPoint.h in Headers */,
-                               144FCE5B14EC79E7000D17A3 /* FractionalLayoutRect.h in Headers */,
-                               144FCE5D14EC79E7000D17A3 /* FractionalLayoutSize.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                B6D9D23614EABD260090D75E /* FocusEvent.cpp in Sources */,
                                B6D9D27C14EAC0860090D75E /* JSFocusEvent.cpp in Sources */,
                                C598902E14E9B0F800E8D18B /* PlatformPasteboardMac.mm in Sources */,
-                               144FCE5A14EC79E7000D17A3 /* FractionalLayoutRect.cpp in Sources */,
-                               144FCE5C14EC79E7000D17A3 /* FractionalLayoutSize.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 56edc78..7d7644a 100644 (file)
@@ -115,7 +115,7 @@ private:
     }
     inline bool isInBounds(unsigned value)
     {
-        return value < static_cast<unsigned>(std::numeric_limits<int>::max()) / kFixedPointDenominator;
+        return value < std::numeric_limits<int>::max() / kFixedPointDenominator;
     }
     inline bool isInBounds(double value)
     {
@@ -262,12 +262,12 @@ inline bool operator==(const FractionalLayoutUnit& a, const FractionalLayoutUnit
 
 inline bool operator==(const FractionalLayoutUnit& a, int b)
 {
-    return a == FractionalLayoutUnit(b);
+    return a == FractionLayoutUnit(b);
 }
 
 inline bool operator==(const int a, const FractionalLayoutUnit& b)
 {
-    return FractionalLayoutUnit(a) == b;
+    return FractionLayoutUnit(a) == b;
 }
 
 inline bool operator==(const FractionalLayoutUnit& a, float b)
@@ -297,7 +297,7 @@ inline FractionalLayoutUnit operator*(const FractionalLayoutUnit& a, const Fract
 {
     FractionalLayoutUnit returnVal;
     long long rawVal = static_cast<long long>(a.rawValue()) * b.rawValue() / kFixedPointDenominator;
-    returnVal.setRawValue(rawVal);
+    returnVal.setRawValue((a.rawValue() / kFixedPointDenominator) * b.rawValue());
     return returnVal;
 }    
 
index c52af99..abe9b86 100644 (file)
 #include "FloatPoint.h"
 
 #include "AffineTransform.h"
-#include "FractionalLayoutPoint.h"
+#include "TransformationMatrix.h"
 #include "FloatConversion.h"
 #include "IntPoint.h"
-#include "TransformationMatrix.h"
 #include <limits>
 #include <math.h>
 
@@ -41,10 +40,6 @@ FloatPoint::FloatPoint(const IntPoint& p) : m_x(p.x()), m_y(p.y())
 {
 }
 
-FloatPoint::FloatPoint(const FractionalLayoutPoint& p) : m_x(p.x()), m_y(p.y())
-{
-}
-
 void FloatPoint::normalize()
 {
     float tempLength = length();
@@ -60,18 +55,6 @@ float FloatPoint::length() const
     return sqrtf(lengthSquared());
 }
 
-void FloatPoint::move(const FractionalLayoutSize& size)
-{
-    m_x += size.width();
-    m_y += size.height();
-}
-
-void FloatPoint::moveBy(const FractionalLayoutPoint& point)
-{
-    m_x += point.x();
-    m_y += point.y();
-}
-
 FloatPoint FloatPoint::matrixTransform(const AffineTransform& transform) const
 {
     double newX, newY;
index bf901e5..ea4bdf4 100644 (file)
@@ -60,15 +60,13 @@ class AffineTransform;
 class TransformationMatrix;
 class IntPoint;
 class IntSize;
-class FractionalLayoutPoint;
-class FractionalLayoutSize;
 
 class FloatPoint {
 public:
     FloatPoint() : m_x(0), m_y(0) { }
     FloatPoint(float x, float y) : m_x(x), m_y(y) { }
     FloatPoint(const IntPoint&);
-    FloatPoint(const FractionalLayoutPoint&);
+
 
     static FloatPoint zero() { return FloatPoint(); }
 
@@ -94,7 +92,6 @@ public:
         m_x += a.width();
         m_y += a.height();
     }
-    void move(const FractionalLayoutSize&);
     void move(const FloatSize& a)
     {
         m_x += a.width();
@@ -105,7 +102,6 @@ public:
         m_x += a.x();
         m_y += a.y();
     }
-    void moveBy(const FractionalLayoutPoint&);
     void moveBy(const FloatPoint& a)
     {
         m_x += a.x();
@@ -135,17 +131,6 @@ public:
         return FloatPoint(std::max(m_x, other.m_x), std::max(m_y, other.m_y));
     }
 
-    FloatPoint shrunkTo(const FloatPoint& other) const
-    {
-        return FloatPoint(m_x < other.m_x ? m_x : other.m_x,
-            m_y < other.m_y ? m_y : other.m_y);
-    }
-
-    void clampNegativeToZero()
-    {
-        *this = expandedTo(zero());
-    }
-
     FloatPoint transposedPoint() const
     {
         return FloatPoint(m_y, m_x);
@@ -254,11 +239,6 @@ inline IntSize flooredIntSize(const FloatPoint& p)
     return IntSize(static_cast<int>(p.x()), static_cast<int>(p.y()));
 }
 
-inline FloatPoint toPoint(const FloatSize& size)
-{
-    return FloatPoint(size.width(), size.height());
-}
-
 float findSlope(const FloatPoint& p1, const FloatPoint& p2, float& c);
 
 // Find point where lines through the two pairs of points intersect. Returns false if the lines don't intersect.
index 737473c..595af2a 100644 (file)
@@ -28,7 +28,6 @@
 #include "FloatRect.h"
 
 #include "FloatConversion.h"
-#include "FractionalLayoutRect.h"
 #include "IntRect.h"
 #include <algorithm>
 #include <math.h>
@@ -43,10 +42,6 @@ FloatRect::FloatRect(const IntRect& r) : m_location(r.location()), m_size(r.size
 {
 }
 
-FloatRect::FloatRect(const FractionalLayoutRect& r) : m_location(r.location()), m_size(r.size())
-{
-}
-
 FloatRect FloatRect::narrowPrecision(double x, double y, double width, double height)
 {
     return FloatRect(narrowPrecisionToFloat(x), narrowPrecisionToFloat(y), narrowPrecisionToFloat(width), narrowPrecisionToFloat(height));
index 4d4eadf..22c171c 100644 (file)
@@ -66,7 +66,6 @@ namespace WebCore {
 class VGRect;
 #endif
 
-class FractionalLayoutRect;
 class IntRect;
 class IntPoint;
 
@@ -83,7 +82,6 @@ public:
     FloatRect(float x, float y, float width, float height)
         : m_location(FloatPoint(x, y)), m_size(FloatSize(width, height)) { }
     FloatRect(const IntRect&);
-    FloatRect(const FractionalLayoutRect&);
 
     static FloatRect narrowPrecision(double x, double y, double width, double height);
 
index 2b62a9d..25512a7 100644 (file)
@@ -27,7 +27,6 @@
 #include "config.h"
 #include "FloatSize.h"
 
-#include "FractionalLayoutSize.h"
 #include "FloatConversion.h"
 #include "IntSize.h"
 #include <limits>
@@ -41,10 +40,6 @@ FloatSize::FloatSize(const IntSize& size) : m_width(size.width()), m_height(size
 {
 }
 
-FloatSize::FloatSize(const FractionalLayoutSize& size) : m_width(size.width()), m_height(size.height())
-{
-}
-
 float FloatSize::diagonalLength() const
 {
     return sqrtf(diagonalLengthSquared());
index 2b55450..1cee681 100644 (file)
@@ -46,14 +46,12 @@ typedef struct _NSSize NSSize;
 namespace WebCore {
 
 class IntSize;
-class FractionalLayoutSize;
 
 class FloatSize {
 public:
     FloatSize() : m_width(0), m_height(0) { }
     FloatSize(float width, float height) : m_width(width), m_height(height) { }
     FloatSize(const IntSize&);
-    FloatSize(const FractionalLayoutSize&);
 
     static FloatSize narrowPrecision(double width, double height);
 
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutPoint.h b/Source/WebCore/platform/graphics/FractionalLayoutPoint.h
deleted file mode 100644 (file)
index c9863fa..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2012, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FractionalLayoutPoint_h
-#define FractionalLayoutPoint_h
-
-#include "FloatPoint.h"
-#include "FractionalLayoutSize.h"
-#include <wtf/MathExtras.h>
-
-namespace WebCore {
-
-class FractionalLayoutPoint {
-public:
-    FractionalLayoutPoint() : m_x(0), m_y(0) { }
-    FractionalLayoutPoint(FractionalLayoutUnit x, FractionalLayoutUnit y) : m_x(x), m_y(y) { }
-    FractionalLayoutPoint(const IntPoint& point) : m_x(point.x()), m_y(point.y()) { }
-    explicit FractionalLayoutPoint(const FloatPoint& size) : m_x(size.x()), m_y(size.y()) { }
-
-    static FractionalLayoutPoint zero() { return FractionalLayoutPoint(); }
-
-    FractionalLayoutUnit x() const { return m_x; }
-    FractionalLayoutUnit y() const { return m_y; }
-
-    void setX(FractionalLayoutUnit x) { m_x = x; }
-    void setY(FractionalLayoutUnit y) { m_y = y; }
-
-    void move(const FractionalLayoutSize& s) { move(s.width(), s.height()); } 
-    void moveBy(const FractionalLayoutPoint& offset) { move(offset.x(), offset.y()); }
-    void move(FractionalLayoutUnit dx, FractionalLayoutUnit dy) { m_x += dx; m_y += dy; }
-    void scale(float sx, float sy)
-    {
-        m_x *= sx;
-        m_y *= sy;
-    }
-    
-    FractionalLayoutPoint expandedTo(const FractionalLayoutPoint& other) const
-    {
-        return FractionalLayoutPoint(std::max(m_x, other.m_x), std::max(m_y, other.m_y));
-    }
-
-    FractionalLayoutPoint shrunkTo(const FractionalLayoutPoint& other) const
-    {
-        return FractionalLayoutPoint(std::min(m_x, other.m_x), std::min(m_y, other.m_y));
-    }
-
-    void clampNegativeToZero()
-    {
-        *this = expandedTo(zero());
-    }
-
-    FractionalLayoutPoint transposedPoint() const
-    {
-        return FractionalLayoutPoint(m_y, m_x);
-    }
-
-private:
-    FractionalLayoutUnit m_x, m_y;
-};
-
-inline FractionalLayoutPoint& operator+=(FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    a.move(b.width(), b.height());
-    return a;
-}
-
-inline FractionalLayoutPoint& operator-=(FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    a.move(-b.width(), -b.height());
-    return a;
-}
-
-inline FractionalLayoutPoint operator+(const FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    return FractionalLayoutPoint(a.x() + b.width(), a.y() + b.height());
-}
-
-inline FractionalLayoutPoint operator+(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return FractionalLayoutPoint(a.x() + b.x(), a.y() + b.y());
-}
-
-inline FractionalLayoutSize operator-(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return FractionalLayoutSize(a.x() - b.x(), a.y() - b.y());
-}
-
-inline FractionalLayoutPoint operator-(const FractionalLayoutPoint& a, const FractionalLayoutSize& b)
-{
-    return FractionalLayoutPoint(a.x() - b.width(), a.y() - b.height());
-}
-
-inline FractionalLayoutPoint operator-(const FractionalLayoutPoint& point)
-{
-    return FractionalLayoutPoint(-point.x(), -point.y());
-}
-
-inline bool operator==(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return a.x() == b.x() && a.y() == b.y();
-}
-
-inline bool operator!=(const FractionalLayoutPoint& a, const FractionalLayoutPoint& b)
-{
-    return a.x() != b.x() || a.y() != b.y();
-}
-
-inline FractionalLayoutPoint toPoint(const FractionalLayoutSize& size)
-{
-    return FractionalLayoutPoint(size.width(), size.height());
-}
-
-inline FractionalLayoutSize toSize(const FractionalLayoutPoint& a)
-{
-    return FractionalLayoutSize(a.x(), a.y());
-}
-
-inline IntPoint flooredIntPoint(const FractionalLayoutPoint& point)
-{
-    return IntPoint(point.x().toInt(), point.y().toInt());
-}
-
-inline IntPoint roundedIntPoint(const FractionalLayoutPoint& point)
-{
-    return IntPoint(point.x().round(), point.y().round());
-}
-
-inline IntPoint ceiledIntPoint(const FractionalLayoutPoint& point)
-{
-    return IntPoint(point.x().ceil(), point.y().ceil());
-}
-
-
-} // namespace WebCore
-
-#endif // FractionalLayoutPoint_h
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutRect.cpp b/Source/WebCore/platform/graphics/FractionalLayoutRect.cpp
deleted file mode 100644 (file)
index 0654235..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2012, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "FractionalLayoutRect.h"
-
-#include "FloatRect.h"
-#include "FractionalLayoutUnit.h"
-#include <algorithm>
-
-namespace WebCore {
-
-FractionalLayoutRect::FractionalLayoutRect(const FloatRect& r)
-    : m_location(FractionalLayoutPoint(r.location()))
-    , m_size(FractionalLayoutSize(r.size()))
-{
-}
-
-bool FractionalLayoutRect::intersects(const FractionalLayoutRect& other) const
-{
-    // Checking emptiness handles negative widths as well as zero.
-    return !isEmpty() && !other.isEmpty()
-        && x() < other.maxX() && other.x() < maxX()
-        && y() < other.maxY() && other.y() < maxY();
-}
-
-bool FractionalLayoutRect::contains(const FractionalLayoutRect& other) const
-{
-    return x() <= other.x() && maxX() >= other.maxX()
-        && y() <= other.y() && maxY() >= other.maxY();
-}
-
-void FractionalLayoutRect::intersect(const FractionalLayoutRect& other)
-{
-    FractionalLayoutUnit newX = std::max(x(), other.x());
-    FractionalLayoutUnit newY = std::max(y(), other.y());
-    FractionalLayoutUnit newMaxX = std::min(maxX(), other.maxX());
-    FractionalLayoutUnit newMaxY = std::min(maxY(), other.maxY());
-
-    // Return a clean empty rectangle for non-intersecting cases.
-    if (newX >= newMaxX || newY >= newMaxY) {
-        newX = 0;
-        newY = 0;
-        newMaxX = 0;
-        newMaxY = 0;
-    }
-
-    m_location.setX(newX);
-    m_location.setY(newY);
-    m_size.setWidth(newMaxX - newX);
-    m_size.setHeight(newMaxY - newY);
-}
-
-void FractionalLayoutRect::unite(const FractionalLayoutRect& other)
-{
-    // Handle empty special cases first.
-    if (other.isEmpty())
-        return;
-    if (isEmpty()) {
-        *this = other;
-        return;
-    }
-
-    FractionalLayoutUnit newX = std::min(x(), other.x());
-    FractionalLayoutUnit newY = std::min(y(), other.y());
-    FractionalLayoutUnit newMaxX = std::max(maxX(), other.maxX());
-    FractionalLayoutUnit newMaxY = std::max(maxY(), other.maxY());
-
-    m_location.setX(newX);
-    m_location.setY(newY);
-    m_size.setWidth(newMaxX - newX);
-    m_size.setHeight(newMaxY - newY);
-}
-
-void FractionalLayoutRect::uniteIfNonZero(const FractionalLayoutRect& other)
-{
-    // Handle empty special cases first.
-    if (!other.width() && !other.height())
-        return;
-    if (!width() && !height()) {
-        *this = other;
-        return;
-    }
-
-    FractionalLayoutUnit newX = std::min(x(), other.x());
-    FractionalLayoutUnit newY = std::min(y(), other.y());
-    FractionalLayoutUnit newMaxX = std::max(maxX(), other.maxX());
-    FractionalLayoutUnit newMaxY = std::max(maxY(), other.maxY());
-
-    m_location.setX(newX);
-    m_location.setY(newY);
-    m_size.setWidth(newMaxX - newX);
-    m_size.setHeight(newMaxY - newY);
-}
-
-void FractionalLayoutRect::scale(float s)
-{
-    m_location.setX(x() * s);
-    m_location.setY(y() * s);
-    m_size.setWidth(width() * s);
-    m_size.setHeight(height() * s);
-}
-
-FractionalLayoutRect unionRect(const Vector<FractionalLayoutRect>& rects)
-{
-    FractionalLayoutRect result;
-
-    size_t count = rects.size();
-    for (size_t i = 0; i < count; ++i)
-        result.unite(rects[i]);
-
-    return result;
-}
-
-IntRect enclosingIntRect(const FractionalLayoutRect& rect)
-{
-    float x = floorf(rect.x().toFloat());
-    float y = floorf(rect.y().toFloat());
-    float width = ceilf(rect.maxX().toFloat()) - x;
-    float height = ceilf(rect.maxY().toFloat()) - y;
-
-    return IntRect(clampToInteger(x), clampToInteger(y), 
-                   clampToInteger(width), clampToInteger(height));
-}
-
-FractionalLayoutRect enclosingFractionalLayoutRect(const FloatRect& rect)
-{
-    return FractionalLayoutRect(rect.x(), rect.y(),
-                     rect.maxX() - rect.x() + FractionalLayoutUnit::epsilon(),
-                     rect.maxY() - rect.y() + FractionalLayoutUnit::epsilon());
-}
-
-IntRect pixelSnappedIntRect(const FractionalLayoutRect& rect)
-{
-    IntPoint roundedLocation = roundedIntPoint(rect.location());
-    return IntRect(roundedLocation, IntSize((rect.x() + rect.width()).round() - roundedLocation.x(),
-                                            (rect.y() + rect.height()).round() - roundedLocation.y()));
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutRect.h b/Source/WebCore/platform/graphics/FractionalLayoutRect.h
deleted file mode 100644 (file)
index e166555..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2012, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FractionalLayoutRect_h
-#define FractionalLayoutRect_h
-
-#include "FractionalLayoutPoint.h"
-#include "IntRect.h"
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class FloatRect;
-
-class FractionalLayoutRect {
-public:
-    FractionalLayoutRect() { }
-    FractionalLayoutRect(const FractionalLayoutPoint& location, const FractionalLayoutSize& size)
-        : m_location(location), m_size(size) { }
-    FractionalLayoutRect(FractionalLayoutUnit x, FractionalLayoutUnit y, FractionalLayoutUnit width, FractionalLayoutUnit height)
-        : m_location(FractionalLayoutPoint(x, y)), m_size(FractionalLayoutSize(width, height)) { }
-    FractionalLayoutRect(const FloatPoint& location, const FloatSize& size)
-        : m_location(location), m_size(size) { }
-    FractionalLayoutRect(const IntRect& rect) : m_location(rect.location()), m_size(rect.size()) { }
-
-    explicit FractionalLayoutRect(const FloatRect&); // don't do this implicitly since it's lossy
-        
-    FractionalLayoutPoint location() const { return m_location; }
-    FractionalLayoutSize size() const { return m_size; }
-
-    void setLocation(const FractionalLayoutPoint& location) { m_location = location; }
-    void setSize(const FractionalLayoutSize& size) { m_size = size; }
-
-    FractionalLayoutUnit x() const { return m_location.x(); }
-    FractionalLayoutUnit y() const { return m_location.y(); }
-    FractionalLayoutUnit maxX() const { return x() + width(); }
-    FractionalLayoutUnit maxY() const { return y() + height(); }
-    FractionalLayoutUnit width() const { return m_size.width(); }
-    FractionalLayoutUnit height() const { return m_size.height(); }
-
-    void setX(FractionalLayoutUnit x) { m_location.setX(x); }
-    void setY(FractionalLayoutUnit y) { m_location.setY(y); }
-    void setWidth(FractionalLayoutUnit width) { m_size.setWidth(width); }
-    void setHeight(FractionalLayoutUnit height) { m_size.setHeight(height); }
-
-    bool isEmpty() const { return m_size.isEmpty(); }
-
-    // NOTE: The result is rounded to integer values, and thus may be not the exact
-    // center point.
-    FractionalLayoutPoint center() const { return FractionalLayoutPoint(x() + width() / 2, y() + height() / 2); }
-
-    void move(const FractionalLayoutSize& size) { m_location += size; } 
-    void moveBy(const FractionalLayoutPoint& offset) { m_location.move(offset.x(), offset.y()); }
-    void move(FractionalLayoutUnit dx, FractionalLayoutUnit dy) { m_location.move(dx, dy); } 
-
-    void expand(const FractionalLayoutSize& size) { m_size += size; }
-    void expand(FractionalLayoutUnit dw, FractionalLayoutUnit dh) { m_size.expand(dw, dh); }
-    void contract(const FractionalLayoutSize& size) { m_size -= size; }
-    void contract(FractionalLayoutUnit dw, FractionalLayoutUnit dh) { m_size.expand(-dw, -dh); }
-
-    void shiftXEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - x();
-        setX(edge);
-        setWidth(std::max<FractionalLayoutUnit>(0, width() - delta));
-    }
-    void shiftMaxXEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - maxX();
-        setWidth(std::max<FractionalLayoutUnit>(0, width() + delta));
-    }
-    void shiftYEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - y();
-        setY(edge);
-        setHeight(std::max<FractionalLayoutUnit>(0, height() - delta));
-    }
-    void shiftMaxYEdgeTo(FractionalLayoutUnit edge)
-    {
-        FractionalLayoutUnit delta = edge - maxY();
-        setHeight(std::max<FractionalLayoutUnit>(0, height() + delta));
-    }
-
-    FractionalLayoutPoint minXMinYCorner() const { return m_location; } // typically topLeft
-    FractionalLayoutPoint maxXMinYCorner() const { return FractionalLayoutPoint(m_location.x() + m_size.width(), m_location.y()); } // typically topRight
-    FractionalLayoutPoint minXMaxYCorner() const { return FractionalLayoutPoint(m_location.x(), m_location.y() + m_size.height()); } // typically bottomLeft
-    FractionalLayoutPoint maxXMaxYCorner() const { return FractionalLayoutPoint(m_location.x() + m_size.width(), m_location.y() + m_size.height()); } // typically bottomRight
-    
-    bool intersects(const FractionalLayoutRect&) const;
-    bool contains(const FractionalLayoutRect&) const;
-
-    // This checks to see if the rect contains x,y in the traditional sense.
-    // Equivalent to checking if the rect contains a 1x1 rect below and to the right of (px,py).
-    bool contains(FractionalLayoutUnit px, FractionalLayoutUnit py) const
-        { return px >= x() && px < maxX() && py >= y() && py < maxY(); }
-    bool contains(const FractionalLayoutPoint& point) const { return contains(point.x(), point.y()); }
-
-    void intersect(const FractionalLayoutRect&);
-    void unite(const FractionalLayoutRect&);
-    void uniteIfNonZero(const FractionalLayoutRect&);
-
-    void inflateX(FractionalLayoutUnit dx)
-    {
-        m_location.setX(m_location.x() - dx);
-        m_size.setWidth(m_size.width() + dx + dx);
-    }
-    void inflateY(FractionalLayoutUnit dy)
-    {
-        m_location.setY(m_location.y() - dy);
-        m_size.setHeight(m_size.height() + dy + dy);
-    }
-    void inflate(FractionalLayoutUnit d) { inflateX(d); inflateY(d); }
-    void scale(float s);
-
-    FractionalLayoutRect transposedRect() const { return FractionalLayoutRect(m_location.transposedPoint(), m_size.transposedSize()); }
-
-    static FractionalLayoutRect infiniteRect() {return FractionalLayoutRect(FractionalLayoutUnit::min() / 2, FractionalLayoutUnit::min() / 2, FractionalLayoutUnit::max(), FractionalLayoutUnit::max()); }
-
-private:
-    FractionalLayoutPoint m_location;
-    FractionalLayoutSize m_size;
-};
-
-inline FractionalLayoutRect intersection(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    FractionalLayoutRect c = a;
-    c.intersect(b);
-    return c;
-}
-
-inline FractionalLayoutRect unionRect(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    FractionalLayoutRect c = a;
-    c.unite(b);
-    return c;
-}
-
-FractionalLayoutRect unionRect(const Vector<FractionalLayoutRect>&);
-
-inline bool operator==(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    return a.location() == b.location() && a.size() == b.size();
-}
-
-inline bool operator!=(const FractionalLayoutRect& a, const FractionalLayoutRect& b)
-{
-    return a.location() != b.location() || a.size() != b.size();
-}
-
-IntRect enclosingIntRect(const FractionalLayoutRect&);
-FractionalLayoutRect enclosingFractionalLayoutRect(const FloatRect&);
-IntRect pixelSnappedIntRect(const FractionalLayoutRect&);
-
-} // namespace WebCore
-
-#endif // FractionalLayoutRect_h
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutSize.cpp b/Source/WebCore/platform/graphics/FractionalLayoutSize.cpp
deleted file mode 100644 (file)
index b101522..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2012, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "FractionalLayoutSize.h"
-
-#include "FractionalLayoutPoint.h"
-
-namespace WebCore {
-
-IntSize pixelSnappedIntSize(const FractionalLayoutSize& s, const FractionalLayoutPoint& p)
-{
-    return IntSize(snapSizeToPixel(s.width(), p.x()), snapSizeToPixel(s.height(), p.y()));
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/FractionalLayoutSize.h b/Source/WebCore/platform/graphics/FractionalLayoutSize.h
deleted file mode 100644 (file)
index 1b9e942..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (c) 2012, Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FractionalLayoutSize_h
-#define FractionalLayoutSize_h
-
-#include "FloatSize.h"
-#include "FractionalLayoutUnit.h"
-#include "IntSize.h"
-
-namespace WebCore {
-
-class FractionalLayoutPoint;
-
-class FractionalLayoutSize {
-public:
-    FractionalLayoutSize() : m_width(0), m_height(0) { }
-    FractionalLayoutSize(const IntSize& size) : m_width(size.width()), m_height(size.height()) { }
-    FractionalLayoutSize(FractionalLayoutUnit width, FractionalLayoutUnit height) : m_width(width), m_height(height) { }
-
-    explicit FractionalLayoutSize(const FloatSize& size) : m_width(size.width()), m_height(size.height()) { }
-    
-    FractionalLayoutUnit width() const { return m_width; }
-    FractionalLayoutUnit height() const { return m_height; }
-
-    void setWidth(FractionalLayoutUnit width) { m_width = width; }
-    void setHeight(FractionalLayoutUnit height) { m_height = height; }
-
-    bool isEmpty() const { return m_width <= 0 || m_height <= 0; }
-    bool isZero() const { return !m_width && !m_height; }
-
-    float aspectRatio() const { return static_cast<float>(m_width) / static_cast<float>(m_height); }
-    
-    void expand(FractionalLayoutUnit width, FractionalLayoutUnit height)
-    {
-        m_width += width;
-        m_height += height;
-    }
-    
-    void scale(float scale)
-    {
-        m_width = static_cast<int>(static_cast<float>(m_width) * scale);
-        m_height = static_cast<int>(static_cast<float>(m_height) * scale);
-    }
-    
-    FractionalLayoutSize expandedTo(const FractionalLayoutSize& other) const
-    {
-        return FractionalLayoutSize(m_width > other.m_width ? m_width : other.m_width,
-            m_height > other.m_height ? m_height : other.m_height);
-    }
-
-    FractionalLayoutSize shrunkTo(const FractionalLayoutSize& other) const
-    {
-        return FractionalLayoutSize(m_width < other.m_width ? m_width : other.m_width,
-            m_height < other.m_height ? m_height : other.m_height);
-    }
-
-    void clampNegativeToZero()
-    {
-        *this = expandedTo(FractionalLayoutSize());
-    }
-
-    FractionalLayoutSize transposedSize() const
-    {
-        return FractionalLayoutSize(m_height, m_width);
-    }
-
-private:
-    FractionalLayoutUnit m_width, m_height;
-};
-
-inline FractionalLayoutSize& operator+=(FractionalLayoutSize& a, const FractionalLayoutSize& b)
-{
-    a.setWidth(a.width() + b.width());
-    a.setHeight(a.height() + b.height());
-    return a;
-}
-
-inline FractionalLayoutSize& operator-=(FractionalLayoutSize& a, const FractionalLayoutSize& b)
-{
-    a.setWidth(a.width() - b.width());
-    a.setHeight(a.height() - b.height());
-    return a;
-}
-
-inline FractionalLayoutSize operator+(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
-{
-    return FractionalLayoutSize(a.width() + b.width(), a.height() + b.height());
-}
-
-inline FractionalLayoutSize operator-(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
-{
-    return FractionalLayoutSize(a.width() - b.width(), a.height() - b.height());
-}
-
-inline FractionalLayoutSize operator-(const FractionalLayoutSize& size)
-{
-    return FractionalLayoutSize(-size.width(), -size.height());
-}
-
-inline bool operator==(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
-{
-    return a.width() == b.width() && a.height() == b.height();
-}
-
-inline bool operator!=(const FractionalLayoutSize& a, const FractionalLayoutSize& b)
-{
-    return a.width() != b.width() || a.height() != b.height();
-}
-
-inline IntSize flooredIntSize(const FractionalLayoutSize& s)
-{
-    return IntSize(s.width().toInt(), s.height().toInt());
-}
-
-inline IntSize roundedIntSize(const FractionalLayoutSize& s)
-{
-    return IntSize(s.width().round(), s.height().round());
-}
-
-IntSize pixelSnappedIntSize(const FractionalLayoutSize&, const FractionalLayoutPoint&);
-
-} // namespace WebCore
-
-#endif // FractionalLayoutSize_h
index 03c35e8..9507406 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "IntRect.h"
 
-#include "FractionalLayoutRect.h"
 #include "FloatRect.h"
 #include <algorithm>
 
@@ -41,12 +40,6 @@ IntRect::IntRect(const FloatRect& r)
 {
 }
 
-IntRect::IntRect(const FractionalLayoutRect& r)
-    : m_location(flooredIntPoint(r.location()))
-    , m_size(flooredIntSize(r.size()))
-{
-}
-
 bool IntRect::intersects(const IntRect& other) const
 {
     // Checking emptiness handles negative widths as well as zero.
index 3ea8229..2e2ff0b 100644 (file)
@@ -71,7 +71,6 @@ struct SkIRect;
 namespace WebCore {
 
 class FloatRect;
-class FractionalLayoutRect;
 
 class IntRect {
 public:
@@ -81,8 +80,7 @@ public:
     IntRect(int x, int y, int width, int height)
         : m_location(IntPoint(x, y)), m_size(IntSize(width, height)) { }
 
-    explicit IntRect(const FloatRect&); // don't do this implicitly since it's lossy
-    explicit IntRect(const FractionalLayoutRect&); // don't do this implicitly since it's lossy
+    explicit IntRect(const FloatRect& rect); // don't do this implicitly since it's lossy
         
     IntPoint location() const { return m_location; }
     IntSize size() const { return m_size; }