Correct usage of LayoutUnits in dom, editing, page, accessibility, inspector, and...
authorleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 01:36:25 +0000 (01:36 +0000)
committerleviw@chromium.org <leviw@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 01:36:25 +0000 (01:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77891

Reviewed by Darin Adler.

Updating the usage of LayoutUnits in the dom, editing, page, accessibility, inspector, and loader
directories to properly use LayoutUnits vs ints.

No new tests. No new behavior.

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::boundsForVisiblePositionRange):
(WebCore::AccessibilityObject::doAXBoundsForRange):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isOffScreen):
(WebCore::AccessibilityRenderObject::clickPoint):
(WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
(WebCore::AccessibilityRenderObject::doAXBoundsForRange):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
* accessibility/AccessibilityRenderObject.h:
(AccessibilityRenderObject):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::elementAccessibilityHitTest):
* accessibility/AccessibilitySlider.h:
(AccessibilitySlider):
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::computedTransform):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* dom/Clipboard.h:
(WebCore::Clipboard::dragLocation):
(Clipboard):
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::renderedRectsForMarkers):
* dom/DocumentMarkerController.h:
* dom/Element.cpp:
(WebCore::Element::screenRect):
* dom/Element.h:
(Element):
* editing/Editor.cpp:
(WebCore::Editor::rangeForPoint):
(WebCore::Editor::firstRectForRange):
* editing/RenderedPosition.cpp:
(WebCore::RenderedPosition::absoluteRect):
* editing/RenderedPosition.h:
(WebCore::RenderedPosition::absoluteRect):
(RenderedPosition):
* editing/VisiblePosition.h:
(VisiblePosition):
* inspector/DOMNodeHighlighter.cpp:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
* loader/SubframeLoader.h:
(SubframeLoader):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
* page/Frame.cpp:
(WebCore::Frame::nodeImage):
* page/win/FrameCGWin.cpp:
(WebCore::Frame::nodeImage):

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

23 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/AccessibilitySlider.cpp
Source/WebCore/accessibility/AccessibilitySlider.h
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/dom/Clipboard.h
Source/WebCore/dom/DocumentMarkerController.cpp
Source/WebCore/dom/DocumentMarkerController.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/RenderedPosition.cpp
Source/WebCore/editing/RenderedPosition.h
Source/WebCore/editing/VisiblePosition.h
Source/WebCore/inspector/DOMNodeHighlighter.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/SubframeLoader.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/win/FrameCGWin.cpp

index 90802dd..b271134 100644 (file)
@@ -1,3 +1,67 @@
+2012-02-06  Levi Weintraub  <leviw@chromium.org>
+
+        Correct usage of LayoutUnits in dom, editing, page, accessibility, inspector, and loader
+        https://bugs.webkit.org/show_bug.cgi?id=77891
+
+        Reviewed by Darin Adler.
+
+        Updating the usage of LayoutUnits in the dom, editing, page, accessibility, inspector, and loader
+        directories to properly use LayoutUnits vs ints.
+
+        No new tests. No new behavior.
+
+        * accessibility/AccessibilityObject.h:
+        (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
+        (WebCore::AccessibilityObject::doAXBoundsForRange):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::isOffScreen):
+        (WebCore::AccessibilityRenderObject::clickPoint):
+        (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
+        (WebCore::AccessibilityRenderObject::doAXBoundsForRange):
+        (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
+        * accessibility/AccessibilityRenderObject.h:
+        (AccessibilityRenderObject):
+        * accessibility/AccessibilitySlider.cpp:
+        (WebCore::AccessibilitySlider::elementAccessibilityHitTest):
+        * accessibility/AccessibilitySlider.h:
+        (AccessibilitySlider):
+        * accessibility/mac/WebAccessibilityObjectWrapper.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::computedTransform):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * dom/Clipboard.h:
+        (WebCore::Clipboard::dragLocation):
+        (Clipboard):
+        * dom/DocumentMarkerController.cpp:
+        (WebCore::DocumentMarkerController::renderedRectsForMarkers):
+        * dom/DocumentMarkerController.h:
+        * dom/Element.cpp:
+        (WebCore::Element::screenRect):
+        * dom/Element.h:
+        (Element):
+        * editing/Editor.cpp:
+        (WebCore::Editor::rangeForPoint):
+        (WebCore::Editor::firstRectForRange):
+        * editing/RenderedPosition.cpp:
+        (WebCore::RenderedPosition::absoluteRect):
+        * editing/RenderedPosition.h:
+        (WebCore::RenderedPosition::absoluteRect):
+        (RenderedPosition):
+        * editing/VisiblePosition.h:
+        (VisiblePosition):
+        * inspector/DOMNodeHighlighter.cpp:
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::createJavaAppletWidget):
+        * loader/SubframeLoader.h:
+        (SubframeLoader):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleMousePressEvent):
+        * page/Frame.cpp:
+        (WebCore::Frame::nodeImage):
+        * page/win/FrameCGWin.cpp:
+        (WebCore::Frame::nodeImage):
+
 2012-02-05  Kentaro Hara  <haraken@chromium.org>
 
         Rename [DontCheckEnums], [ReturnsNew], [DoNotCheckDomainSecurityOnGet],
index c417cc9..249fa29 100644 (file)
@@ -584,7 +584,7 @@ public:
     VisiblePositionRange visiblePositionRangeForRange(const PlainTextRange&) const;
 
     String stringForVisiblePositionRange(const VisiblePositionRange&) const;
-    virtual LayoutRect boundsForVisiblePositionRange(const VisiblePositionRange&) const { return LayoutRect(); }
+    virtual IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const { return IntRect(); }
     int lengthForVisiblePositionRange(const VisiblePositionRange&) const;
     virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const { }
 
@@ -615,7 +615,7 @@ public:
     PlainTextRange doAXStyleRangeForIndex(unsigned) const;
 
     virtual String doAXStringForRange(const PlainTextRange&) const { return String(); }
-    virtual LayoutRect doAXBoundsForRange(const PlainTextRange&) const { return LayoutRect(); }
+    virtual IntRect doAXBoundsForRange(const PlainTextRange&) const { return IntRect(); }
     String listMarkerTextForNodeAndPosition(Node*, const VisiblePosition&) const;
 
     unsigned doAXLineForIndex(unsigned);
index dc0d33b..44ced9d 100644 (file)
@@ -709,7 +709,7 @@ bool AccessibilityRenderObject::isOffScreen() const
     ASSERT(m_renderer);
     LayoutRect contentRect = m_renderer->absoluteClippedOverflowRect();
     FrameView* view = m_renderer->frame()->view();
-    FloatRect viewRect = view->visibleContentRect();
+    IntRect viewRect = view->visibleContentRect();
     viewRect.intersect(contentRect);
     return viewRect.isEmpty();
 }
@@ -1499,7 +1499,7 @@ LayoutSize AccessibilityRenderObject::size() const
     return rect.size();
 }
 
-LayoutPoint AccessibilityRenderObject::clickPoint()
+IntPoint AccessibilityRenderObject::clickPoint()
 {
     // Headings are usually much wider than their textual content. If the mid point is used, often it can be wrong.
     if (isHeading() && children().size() == 1)
@@ -1511,11 +1511,11 @@ LayoutPoint AccessibilityRenderObject::clickPoint()
     
     VisibleSelection visSelection = selection();
     VisiblePositionRange range = VisiblePositionRange(visSelection.visibleStart(), visSelection.visibleEnd());
-    LayoutRect bounds = boundsForVisiblePositionRange(range);
+    IntRect bounds = boundsForVisiblePositionRange(range);
 #if PLATFORM(MAC)
     bounds.setLocation(m_renderer->document()->view()->screenToContents(bounds.location()));
 #endif        
-    return LayoutPoint(bounds.x() + (bounds.width() / 2), bounds.y() - (bounds.height() / 2));
+    return IntPoint(bounds.x() + (bounds.width() / 2), bounds.y() - (bounds.height() / 2));
 }
     
 AccessibilityObject* AccessibilityRenderObject::internalLinkElement() const
@@ -2594,10 +2594,10 @@ bool AccessibilityRenderObject::nodeIsTextControl(const Node* node) const
     return axObjectForNode->isTextControl();
 }
 
-LayoutRect AccessibilityRenderObject::boundsForVisiblePositionRange(const VisiblePositionRange& visiblePositionRange) const
+IntRect AccessibilityRenderObject::boundsForVisiblePositionRange(const VisiblePositionRange& visiblePositionRange) const
 {
     if (visiblePositionRange.isNull())
-        return LayoutRect();
+        return IntRect();
     
     // Create a mutable VisiblePositionRange.
     VisiblePositionRange range(visiblePositionRange);
@@ -2811,14 +2811,14 @@ String AccessibilityRenderObject::doAXStringForRange(const PlainTextRange& range
 // The bounding rectangle of the text associated with this accessibility object that is
 // specified by the given range. This is the bounding rectangle a sighted user would see
 // on the display screen, in pixels.
-LayoutRect AccessibilityRenderObject::doAXBoundsForRange(const PlainTextRange& range) const
+IntRect AccessibilityRenderObject::doAXBoundsForRange(const PlainTextRange& range) const
 {
     if (allowsTextRanges())
         return boundsForVisiblePositionRange(visiblePositionRangeForRange(range));
-    return LayoutRect();
+    return IntRect();
 }
 
-AccessibilityObject* AccessibilityRenderObject::accessibilityImageMapHitTest(HTMLAreaElement* area, const IntPoint& point) const
+AccessibilityObject* AccessibilityRenderObject::accessibilityImageMapHitTest(HTMLAreaElement* area, const LayoutPoint& point) const
 {
     if (!area)
         return 0;
index 3ea5809..9056dc8 100644 (file)
@@ -154,7 +154,7 @@ public:
     void updateAccessibilityRole();
     
     // Should be called on the root accessibility object to kick off a hit test.
-    virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const;
+    virtual AccessibilityObject* accessibilityHitTest(const LayoutPoint&) const;
 
     virtual Element* actionElement() const;
     Element* mouseButtonListener() const;
@@ -166,7 +166,7 @@ public:
     virtual LayoutRect boundingBoxRect() const;
     virtual LayoutRect elementRect() const;
     virtual LayoutSize size() const;
-    virtual LayoutPoint clickPoint();
+    virtual IntPoint clickPoint();
     
     void setRenderer(RenderObject* renderer) { m_renderer = renderer; }
     virtual RenderObject* renderer() const { return m_renderer; }
@@ -228,7 +228,7 @@ public:
     
     virtual VisiblePositionRange visiblePositionRange() const;
     virtual VisiblePositionRange visiblePositionRangeForLine(unsigned) const;
-    virtual LayoutRect boundsForVisiblePositionRange(const VisiblePositionRange&) const;
+    virtual IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const;
     virtual void setSelectedVisiblePositionRange(const VisiblePositionRange&) const;
     virtual bool supportsARIAFlowTo() const;
     virtual void ariaFlowToElements(AccessibilityChildrenVector&) const;
@@ -250,7 +250,7 @@ public:
     virtual PlainTextRange doAXRangeForIndex(unsigned) const;
     
     virtual String doAXStringForRange(const PlainTextRange&) const;
-    virtual LayoutRect doAXBoundsForRange(const PlainTextRange&) const;
+    virtual IntRect doAXBoundsForRange(const PlainTextRange&) const;
     
     virtual String stringValueForMSAA() const;
     virtual String stringRoleForMSAA() const;
index 8bdb35c..e53ee20 100644 (file)
@@ -101,7 +101,7 @@ const AtomicString& AccessibilitySlider::getAttribute(const QualifiedName& attri
     return element()->getAttribute(attribute);
 }
     
-AccessibilityObject* AccessibilitySlider::elementAccessibilityHitTest(const IntPoint& point) const
+AccessibilityObject* AccessibilitySlider::elementAccessibilityHitTest(const LayoutPoint& point) const
 {
     if (m_children.size()) {
         ASSERT(m_children.size() == 1);
index 4b2d54b..2b83103 100644 (file)
@@ -48,7 +48,7 @@ protected:
 private:
     HTMLInputElement* element() const;
     virtual bool accessibilityIsIgnored() const;
-    virtual AccessibilityObject* elementAccessibilityHitTest(const IntPoint&) const;
+    virtual AccessibilityObject* elementAccessibilityHitTest(const LayoutPoint&) const;
 
     virtual AccessibilityRole roleValue() const { return SliderRole; }    
     virtual bool isSlider() const { return true; }
index 13c3e61..ea91c77 100644 (file)
@@ -2605,7 +2605,7 @@ static NSString* roleValueToNSString(AccessibilityRole value)
         return;
 
     // Simulate a click in the middle of the object.
-    LayoutPoint clickPoint = m_object->clickPoint();
+    IntPoint clickPoint = m_object->clickPoint();
     
     PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime());
     bool handled = frame->eventHandler()->sendContextMenuEvent(mouseEvent);
index 88fbc4e..d0131ee 100644 (file)
@@ -668,7 +668,7 @@ static PassRefPtr<CSSValue> computedTransform(RenderObject* renderer, const Rend
     if (!renderer || style->transform().operations().isEmpty())
         return cssValuePool->createIdentifierValue(CSSValueNone);
 
-    IntRect box = sizingBox(renderer);
+    LayoutRect box = sizingBox(renderer);
 
     TransformationMatrix transform;
     style->applyTransform(transform, box.size(), RenderStyle::ExcludeTransformOrigin);
@@ -2113,7 +2113,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
         case CSSPropertyWebkitPerspectiveOrigin: {
             RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
             if (renderer) {
-                IntRect box = sizingBox(renderer);
+                LayoutRect box = sizingBox(renderer);
                 list->append(zoomAdjustedPixelValue(style->perspectiveOriginX().calcMinValue(box.width()), style.get(), cssValuePool));
                 list->append(zoomAdjustedPixelValue(style->perspectiveOriginY().calcMinValue(box.height()), style.get(), cssValuePool));
             }
index f94727a..a07ae9f 100644 (file)
@@ -69,13 +69,13 @@ namespace WebCore {
         virtual HashSet<String> types() const = 0;
         virtual PassRefPtr<FileList> files() const = 0;
 
-        LayoutPoint dragLocation() const { return m_dragLoc; }
+        IntPoint dragLocation() const { return m_dragLoc; }
         CachedImage* dragImage() const { return m_dragImage.get(); }
-        virtual void setDragImage(CachedImage*, const LayoutPoint&) = 0;
+        virtual void setDragImage(CachedImage*, const IntPoint&) = 0;
         Node* dragImageElement() const { return m_dragImageElement.get(); }
-        virtual void setDragImageElement(Node*, const LayoutPoint&) = 0;
+        virtual void setDragImageElement(Node*, const IntPoint&) = 0;
         
-        virtual DragImageRef createDragImage(LayoutPoint& dragLocation) const = 0;
+        virtual DragImageRef createDragImage(IntPoint& dragLocation) const = 0;
 #if ENABLE(DRAG_SUPPORT)
         virtual void declareAndWriteDragImage(Element*, const KURL&, const String& title, Frame*) = 0;
 #endif
@@ -117,7 +117,7 @@ namespace WebCore {
         ClipboardType m_clipboardType;
         
     protected:
-        LayoutPoint m_dragLoc;
+        IntPoint m_dragLoc;
         CachedResourceHandle<CachedImage> m_dragImage;
         RefPtr<Node> m_dragImageElement;
     };
index b0eb1e1..c25023f 100644 (file)
@@ -377,9 +377,9 @@ Vector<DocumentMarker*> DocumentMarkerController::markersInRange(Range* range, D
     return foundMarkers;
 }
 
-Vector<LayoutRect> DocumentMarkerController::renderedRectsForMarkers(DocumentMarker::MarkerType markerType)
+Vector<IntRect> DocumentMarkerController::renderedRectsForMarkers(DocumentMarker::MarkerType markerType)
 {
-    Vector<LayoutRect> result;
+    Vector<IntRect> result;
 
     if (!possiblyHasMarkers(markerType))
         return result;
index 36c0d43..e0672d0 100644 (file)
@@ -72,7 +72,7 @@ public:
     Vector<DocumentMarker*> markersFor(Node*, DocumentMarker::MarkerTypes = DocumentMarker::AllMarkers());
     Vector<DocumentMarker*> markersInRange(Range*, DocumentMarker::MarkerTypes);
     Vector<DocumentMarker> markersForNode(Node*);
-    Vector<LayoutRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
+    Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType);
     void clearDescriptionOnMarkersIntersectingRange(Range*, DocumentMarker::MarkerTypes);
 
 #ifndef NDEBUG
index f97b5e2..9b023df 100644 (file)
@@ -566,10 +566,10 @@ PassRefPtr<ClientRect> Element::getBoundingClientRect()
     return ClientRect::create(result);
 }
     
-LayoutRect Element::screenRect() const
+IntRect Element::screenRect() const
 {
     if (!renderer())
-        return LayoutRect();
+        return IntRect();
     // FIXME: this should probably respect transforms
     return renderer()->view()->frameView()->contentsToScreen(renderer()->absoluteBoundingBoxRectIgnoringTransforms());
 }
index 9cce3a8..cf6d9cc 100644 (file)
@@ -187,7 +187,7 @@ public:
     PassRefPtr<ClientRect> getBoundingClientRect();
     
     // Returns the absolute bounding box translated into screen coordinates:
-    LayoutRect screenRect() const;
+    IntRect screenRect() const;
 
     void removeAttribute(const String& name);
     void removeAttributeNS(const String& namespaceURI, const String& localName);
index ea2ff54..7fe95f7 100644 (file)
@@ -2318,7 +2318,7 @@ void Editor::deletedAutocorrectionAtPosition(const Position& position, const Str
     m_spellingCorrector->deletedAutocorrectionAtPosition(position, originalString);
 }
 
-PassRefPtr<Range> Editor::rangeForPoint(const LayoutPoint& windowPoint)
+PassRefPtr<Range> Editor::rangeForPoint(const IntPoint& windowPoint)
 {
     Document* document = m_frame->documentAtPoint(windowPoint);
     if (!document)
@@ -2633,7 +2633,7 @@ String Editor::selectedText() const
 
 IntRect Editor::firstRectForRange(Range* range) const
 {
-    int extraWidthToEndOfLine = 0;
+    LayoutUnit extraWidthToEndOfLine = 0;
     ASSERT(range->startContainer());
     ASSERT(range->endContainer());
 
index 290d7a6..fb3bfb0 100644 (file)
@@ -224,7 +224,7 @@ Position RenderedPosition::positionAtRightBoundaryOfBiDiRun() const
     return createLegacyEditingPosition(prevLeafChild()->renderer()->node(), prevLeafChild()->caretRightmostOffset());
 }
 
-LayoutRect RenderedPosition::absoluteRect(int* extraWidthToEndOfLine) const
+LayoutRect RenderedPosition::absoluteRect(LayoutUnit* extraWidthToEndOfLine) const
 {
     if (isNull())
         return LayoutRect();
index 6b84120..eef01a1 100644 (file)
@@ -68,7 +68,7 @@ public:
     Position positionAtRightBoundaryOfBiDiRun() const;
 
     LayoutRect absoluteRect() const { return absoluteRect(0); }
-    LayoutRect absoluteRect(int& extraWidthToEndOfLine) const { return absoluteRect(&extraWidthToEndOfLine); }
+    LayoutRect absoluteRect(LayoutUnit& extraWidthToEndOfLine) const { return absoluteRect(&extraWidthToEndOfLine); }
 
 private:
     bool operator==(const RenderedPosition&) const { return false; }
@@ -81,7 +81,7 @@ private:
     bool atLeftBoundaryOfBidiRun(ShouldMatchBidiLevel, unsigned char bidiLevelOfRun) const;
     bool atRightBoundaryOfBidiRun(ShouldMatchBidiLevel, unsigned char bidiLevelOfRun) const;
 
-    LayoutRect absoluteRect(int* extraWidthToEndOfLine) const;
+    LayoutRect absoluteRect(LayoutUnit* extraWidthToEndOfLine) const;
 
     RenderObject* m_renderer;
     InlineBox* m_inlineBox;
index 20eee94..c3f11f3 100644 (file)
@@ -93,7 +93,7 @@ public:
     }
 
     // Rect is local to the returned renderer
-    IntRect localCaretRect(RenderObject*&) const;
+    LayoutRect localCaretRect(RenderObject*&) const;
     // Bounds of (possibly transformed) caret in absolute coords
     IntRect absoluteCaretBounds() const;
     // Abs x/y position of the caret ignoring transforms.
index c258e21..7b03c2e 100644 (file)
@@ -288,8 +288,8 @@ void drawElementTitle(GraphicsContext& context, Node* node, RenderObject* render
     titleRect.inflate(rectInflatePx);
 
     // The initial offsets needed to compensate for a 1px-thick border stroke (which is not a part of the rectangle).
-    LayoutUnit dx = -borderWidthPx;
-    LayoutUnit dy = borderWidthPx;
+    int dx = -borderWidthPx;
+    int dy = borderWidthPx;
 
     // If the tip sticks beyond the right of visibleRect, right-align the tip with the said boundary.
     if (titleRect.maxX() + dx > visibleRect.maxX())
index 8fd162f..3d7f5c5 100644 (file)
@@ -191,7 +191,7 @@ PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const
 }
 #endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)
 
-PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
+PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const LayoutSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
 {
     String baseURLString;
     String codeBaseURLString;
index 01c59e6..3126755 100644 (file)
@@ -32,6 +32,7 @@
 #define SubframeLoader_h
 
 #include "FrameLoaderTypes.h"
+#include "LayoutTypes.h"
 #include "PlatformString.h"
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
@@ -71,7 +72,7 @@ public:
     PassRefPtr<Widget> loadMediaPlayerProxyPlugin(Node*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
 #endif
 
-    PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const HashMap<String, String>& args);
+    PassRefPtr<Widget> createJavaAppletWidget(const LayoutSize&, HTMLAppletElement*, const HashMap<String, String>& args);
 
     bool allowPlugins(ReasonForCallingAllowPlugins);
 
index 6651e76..1658831 100644 (file)
@@ -1481,7 +1481,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
     HitTestRequest request(HitTestRequest::Active);
     // Save the document point we generate in case the window coordinate is invalidated by what happens 
     // when we dispatch the event.
-    IntPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.position());
+    LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.position());
     MouseEventWithHitTestResults mev = m_frame->document()->prepareMouseEvent(request, documentPoint, mouseEvent);
 
     if (!targetNode(mev)) {
index 2d50dde..114bf6b 100644 (file)
@@ -1071,7 +1071,7 @@ DragImageRef Frame::nodeImage(Node* node)
     m_doc->updateLayout();
     m_view->setNodeToDraw(node); // Enable special sub-tree drawing mode.
 
-    IntRect topLevelRect;
+    LayoutRect topLevelRect;
     IntRect paintingRect = renderer->paintingRootRect(topLevelRect);
 
     OwnPtr<ImageBuffer> buffer(ImageBuffer::create(paintingRect.size()));
index 39f8d0a..ea2c391 100644 (file)
@@ -97,7 +97,7 @@ DragImageRef Frame::nodeImage(Node* node)
     if (!renderer)
         return 0;
 
-    IntRect topLevelRect;
+    LayoutRect topLevelRect;
     IntRect paintingRect = renderer->paintingRootRect(topLevelRect);
 
     document()->updateLayout();