Title: [109160] branches/subpixellayout/Source

Diff

Modified: branches/subpixellayout/Source/WebCore/editing/FrameSelection.cpp (109159 => 109160)


--- branches/subpixellayout/Source/WebCore/editing/FrameSelection.cpp	2012-02-28 23:16:42 UTC (rev 109159)
+++ branches/subpixellayout/Source/WebCore/editing/FrameSelection.cpp	2012-02-28 23:28:58 UTC (rev 109160)
@@ -982,9 +982,9 @@
 }
 
 // FIXME: Maybe baseline would be better?
-static bool absoluteCaretY(const VisiblePosition &c, LayoutUnit &y)
+static bool absoluteCaretY(const VisiblePosition &c, int &y)
 {
-    LayoutRect rect = c.absoluteCaretBounds();
+    IntRect rect = c.absoluteCaretBounds();
     if (rect.isEmpty())
         return false;
     y = rect.y() + rect.height() / 2;
@@ -1023,12 +1023,12 @@
         break;
     }
 
-    LayoutUnit startY;
+    int startY;
     if (!absoluteCaretY(pos, startY))
         return false;
     if (direction == DirectionUp)
         startY = -startY;
-    LayoutUnit lastY = startY;
+    int lastY = startY;
 
     VisiblePosition result;
     VisiblePosition next;
@@ -1040,7 +1040,7 @@
 
         if (next.isNull() || next == p)
             break;
-        LayoutUnit nextY;
+        int nextY;
         if (!absoluteCaretY(next, nextY))
             break;
         if (direction == DirectionUp)
@@ -1242,11 +1242,11 @@
     return localCaretRectWithoutUpdate();
 }
 
-LayoutRect CaretBase::absoluteBoundsForLocalRect(Node* node, const LayoutRect& rect) const
+IntRect CaretBase::absoluteBoundsForLocalRect(Node* node, const LayoutRect& rect) const
 {
     RenderObject* caretPainter = caretRenderer(node);
     if (!caretPainter)
-        return LayoutRect();
+        return IntRect();
     
     LayoutRect localRect(rect);
     if (caretPainter->isBox())
@@ -1254,7 +1254,7 @@
     return caretPainter->localToAbsoluteQuad(FloatRect(localRect)).enclosingBoundingBox();
 }
 
-LayoutRect FrameSelection::absoluteCaretBounds()
+IntRect FrameSelection::absoluteCaretBounds()
 {
     recomputeCaretRect();
     return m_absCaretBounds;
@@ -1270,7 +1270,7 @@
     return caret;
 }
 
-LayoutRect CaretBase::caretRepaintRect(Node* node) const
+IntRect CaretBase::caretRepaintRect(Node* node) const
 {
     return absoluteBoundsForLocalRect(node, repaintRectForCaret(localCaretRectWithoutUpdate()));
 }
@@ -1292,7 +1292,7 @@
     if (oldRect == newRect && !m_absCaretBoundsDirty)
         return false;
 
-    LayoutRect oldAbsCaretBounds = m_absCaretBounds;
+    IntRect oldAbsCaretBounds = m_absCaretBounds;
     // FIXME: Rename m_caretRect to m_localCaretRect.
     m_absCaretBounds = absoluteBoundsForLocalRect(m_selection.start().deprecatedNode(), localCaretRectWithoutUpdate());
     m_absCaretBoundsDirty = false;
@@ -1300,7 +1300,7 @@
     if (oldAbsCaretBounds == m_absCaretBounds)
         return false;
         
-    LayoutRect oldAbsoluteCaretRepaintBounds = m_absoluteCaretRepaintBounds;
+    IntRect oldAbsoluteCaretRepaintBounds = m_absoluteCaretRepaintBounds;
     // We believe that we need to inflate the local rect before transforming it to obtain the repaint bounds.
     m_absoluteCaretRepaintBounds = caretRepaintRect(m_selection.start().deprecatedNode());
 

Modified: branches/subpixellayout/Source/WebCore/editing/FrameSelection.h (109159 => 109160)


--- branches/subpixellayout/Source/WebCore/editing/FrameSelection.h	2012-02-28 23:16:42 UTC (rev 109159)
+++ branches/subpixellayout/Source/WebCore/editing/FrameSelection.h	2012-02-28 23:28:58 UTC (rev 109160)
@@ -59,8 +59,8 @@
     void invalidateCaretRect(Node*, bool caretRectChanged = false);
     void clearCaretRect();
     bool updateCaretRect(Document*, const VisiblePosition& caretPosition);
-    LayoutRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const;
-    LayoutRect caretRepaintRect(Node*) const;
+    IntRect absoluteBoundsForLocalRect(Node*, const LayoutRect&) const;
+    IntRect caretRepaintRect(Node*) const;
     bool shouldRepaintCaret(const RenderView*, bool isContentEditable) const;
     void paintCaret(Node*, GraphicsContext*, const LayoutPoint&, const LayoutRect& clipRect) const;
     RenderObject* caretRenderer(Node*) const;
@@ -180,8 +180,7 @@
     LayoutRect localCaretRect();
 
     // Bounds of (possibly transformed) caret in absolute coords
-    LayoutRect absoluteCaretBounds();
-    IntRect pixelSnappedAbsoluteCaretBounds() { return pixelSnappedIntRect(absoluteCaretBounds()); }
+    IntRect absoluteCaretBounds();
     void setCaretRectNeedsUpdate() { CaretBase::setCaretRectNeedsUpdate(); }
 
     void willBeModified(EAlteration, SelectionDirection);
@@ -296,8 +295,8 @@
     RefPtr<EditingStyle> m_typingStyle;
 
     Timer<FrameSelection> m_caretBlinkTimer;
-    LayoutRect m_absCaretBounds; // absolute bounding rect for the caret
-    LayoutRect m_absoluteCaretRepaintBounds;
+    IntRect m_absCaretBounds; // absolute bounding rect for the caret
+    IntRect m_absoluteCaretRepaintBounds;
     bool m_absCaretBoundsDirty : 1;
     bool m_caretPaint : 1;
     bool m_isCaretBlinkingSuspended : 1;

Modified: branches/subpixellayout/Source/WebCore/editing/mac/FrameSelectionMac.mm (109159 => 109160)


--- branches/subpixellayout/Source/WebCore/editing/mac/FrameSelectionMac.mm	2012-02-28 23:16:42 UTC (rev 109159)
+++ branches/subpixellayout/Source/WebCore/editing/mac/FrameSelectionMac.mm	2012-02-28 23:28:58 UTC (rev 109160)
@@ -63,7 +63,7 @@
     if (!frameView)
         return;
 
-    IntRect selectionRect = pixelSnappedAbsoluteCaretBounds();
+    IntRect selectionRect = absoluteCaretBounds();
     IntRect viewRect = enclosingIntRect(renderView->viewRect());
 
     selectionRect = frameView->contentsToScreen(selectionRect);

Modified: branches/subpixellayout/Source/WebKit/chromium/src/WebViewImpl.cpp (109159 => 109160)


--- branches/subpixellayout/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-02-28 23:16:42 UTC (rev 109159)
+++ branches/subpixellayout/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-02-28 23:28:58 UTC (rev 109160)
@@ -1819,7 +1819,7 @@
         return false;
 
     if (selection->isCaret()) {
-        start = end = frame->view()->contentsToWindow(selection->pixelSnappedAbsoluteCaretBounds());
+        start = end = frame->view()->contentsToWindow(selection->absoluteCaretBounds());
         return true;
     }
 

Modified: branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp (109159 => 109160)


--- branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp	2012-02-28 23:16:42 UTC (rev 109159)
+++ branches/subpixellayout/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp	2012-02-28 23:28:58 UTC (rev 109160)
@@ -813,7 +813,7 @@
 
 IntPoint BuiltInPDFView::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const
 {
-    IntLayoutPoint point = pluginView()->frame()->view()->convertToRenderer(pluginView()->renderer(), parentPoint);
+    IntPoint point = pluginView()->frame()->view()->convertToRenderer(pluginView()->renderer(), parentPoint);
     point.move(pluginView()->location() - scrollbar->location());
 
     return point;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to