Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm

5656#import <WebCore/Element.h>
5757#import <WebCore/FileChooser.h>
5858#import <WebCore/FileIconLoader.h>
59 #import <WebCore/FloatRect.h>
6059#import <WebCore/Frame.h>
6160#import <WebCore/FrameLoadRequest.h>
6261#import <WebCore/FrameView.h>
 62#import <WebCore/GraphicsRect.h>
6363#import <WebCore/HTMLNames.h>
6464#import <WebCore/HitTestResult.h>
6565#import <WebCore/Icon.h>

158158// These functions scale between window and WebView coordinates because JavaScript/DOM operations
159159// assume that the WebView and the window share the same coordinate system.
160160
161 void WebChromeClient::setWindowRect(const FloatRect& rect)
 161void WebChromeClient::setWindowRect(const GraphicsRect& rect)
162162{
163163 NSRect windowRect = toDeviceSpace(rect, [m_webView window]);
164164 [[m_webView _UIDelegateForwarder] webView:m_webView setFrame:windowRect];
165165}
166166
167 FloatRect WebChromeClient::windowRect()
 167GraphicsRect WebChromeClient::windowRect()
168168{
169169 NSRect windowRect = [[m_webView _UIDelegateForwarder] webViewFrame:m_webView];
170170 return toUserSpace(windowRect, [m_webView window]);
171171}
172172
173173// FIXME: We need to add API for setting and getting this.
174 FloatRect WebChromeClient::pageRect()
 174GraphicsRect WebChromeClient::pageRect()
175175{
176176 return [m_webView frame];
177177}

738738
739739#endif
740740
741 FloatRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& type, const FloatRect& lineRect)
 741GraphicsRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& type, const GraphicsRect& lineRect)
742742{
743743 BEGIN_BLOCK_OBJC_EXCEPTIONS;
744744

755755 return NSZeroRect;
756756}
757757
758 void WebChromeClient::paintCustomHighlight(Node* node, const AtomicString& type, const FloatRect& boxRect, const FloatRect& lineRect,
 758void WebChromeClient::paintCustomHighlight(Node* node, const AtomicString& type, const GraphicsRect& boxRect, const GraphicsRect& lineRect,
759759 bool behindText, bool entireLine)
760760{
761761 BEGIN_BLOCK_OBJC_EXCEPTIONS;
90929

Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

863863}
864864
865865#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
866 void WebEditorClient::showCorrectionPanel(CorrectionPanelInfo::PanelType panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 866void WebEditorClient::showCorrectionPanel(CorrectionPanelInfo::PanelType panelType, const GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
867867{
868868 m_correctionPanel.show(m_webView, panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
869869}
90929

Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm

5454 dismissInternal(ReasonForDismissingCorrectionPanelIgnored, false);
5555}
5656
57 void CorrectionPanel::show(WebView* view, CorrectionPanelInfo::PanelType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 57void CorrectionPanel::show(WebView* view, CorrectionPanelInfo::PanelType type, const GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
5858{
5959 dismissInternal(ReasonForDismissingCorrectionPanelIgnored, false);
6060
90929

Source/WebKit/mac/WebCoreSupport/WebChromeClient.h

4040
4141 virtual void chromeDestroyed();
4242
43  virtual void setWindowRect(const WebCore::FloatRect&);
44  virtual WebCore::FloatRect windowRect();
 43 virtual void setWindowRect(const WebCore::GraphicsRect&);
 44 virtual WebCore::GraphicsRect windowRect();
4545
46  virtual WebCore::FloatRect pageRect();
 46 virtual WebCore::GraphicsRect pageRect();
4747
4848 virtual float scaleFactor();
4949

129129
130130 virtual void setCursor(const WebCore::Cursor&);
131131
132  virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type,
133  const WebCore::FloatRect& lineRect);
 132 virtual WebCore::GraphicsRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type,
 133 const WebCore::GraphicsRect& lineRect);
134134 virtual void paintCustomHighlight(WebCore::Node*, const WTF::AtomicString& type,
135  const WebCore::FloatRect& boxRect, const WebCore::FloatRect& lineRect,
 135 const WebCore::GraphicsRect& boxRect, const WebCore::GraphicsRect& lineRect,
136136 bool behindText, bool entireLine);
137137
138138 virtual WebCore::KeyboardUIMode keyboardUIMode();
90929

Source/WebKit/mac/WebCoreSupport/WebEditorClient.h

137137 virtual void setInputMethodState(bool enabled);
138138 virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&);
139139#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
140  virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
 140 virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
141141 virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel);
142142 virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingCorrectionPanel);
143143 virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const String& replacedString, const String& replacementString);
90929

Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h

3838public:
3939 CorrectionPanel();
4040 ~CorrectionPanel();
41  void show(WebView*, WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
 41 void show(WebView*, WebCore::CorrectionPanelInfo::PanelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
4242 String dismiss(WebCore::ReasonForDismissingCorrectionPanel);
4343 static void recordAutocorrectionResponse(WebView*, NSCorrectionResponse, const String& replacedString, const String& replacementString);
4444
90929

Source/WebKit/mac/Misc/WebKitNSStringExtras.mm

103103 [[textColor colorUsingColorSpaceName:NSDeviceRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
104104 graphicsContext.setFillColor(makeRGBA(red * 255, green * 255, blue * 255, alpha * 255), ColorSpaceDeviceRGB);
105105
106  webCoreFont.drawText(&graphicsContext, run, FloatPoint(point.x, (flipped ? point.y : (-1 * point.y))));
 106 webCoreFont.drawText(&graphicsContext, run, GraphicsPoint(point.x, (flipped ? point.y : (-1 * point.y))));
107107
108108 if (!flipped)
109109 CGContextScaleCTM(cgContext, 1, -1);
90929

Source/WebKit/mac/Misc/WebCoreStatistics.mm

275275
276276- (int)pageNumberForElement:(DOMElement*)element:(float)pageWidthInPixels:(float)pageHeightInPixels
277277{
278  return PrintContext::pageNumberForElement(core(element), FloatSize(pageWidthInPixels, pageHeightInPixels));
 278 return PrintContext::pageNumberForElement(core(element), GraphicsSize(pageWidthInPixels, pageHeightInPixels));
279279}
280280
281281- (int)numberOfPages:(float)pageWidthInPixels:(float)pageHeightInPixels
282282{
283  return PrintContext::numberOfPages(_private->coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
 283 return PrintContext::numberOfPages(_private->coreFrame, GraphicsSize(pageWidthInPixels, pageHeightInPixels));
284284}
285285
286286- (NSString *)pageProperty:(const char *)propertyName:(int)pageNumber

305305 return;
306306
307307 GraphicsContext graphicsContext(cgContext);
308  PrintContext::spoolAllPagesWithBoundaries(coreFrame, graphicsContext, FloatSize(pageWidthInPixels, pageHeightInPixels));
 308 PrintContext::spoolAllPagesWithBoundaries(coreFrame, graphicsContext, GraphicsSize(pageWidthInPixels, pageHeightInPixels));
309309}
310310
311311@end
90929

Source/WebKit/mac/WebView/WebRenderNode.mm

9999 Frame* frame = frameView ? frameView->frame() : 0;
100100
101101 // FIXME: broken with transforms
102  FloatPoint absPos = node->localToAbsolute(FloatPoint());
 102 GraphicsPoint absPos = node->localToAbsolute(GraphicsPoint());
103103 int x = 0;
104104 int y = 0;
105105 int width = 0;
90929

Source/WebKit/mac/WebView/WebFrame.mm

13481348 float printHeight = root->style()->isHorizontalWritingMode() ? pageSize.height : documentRect.height() / printScaleFactor;
13491349
13501350 PrintContext printContext(_private->coreFrame);
1351  printContext.computePageRectsWithPageSize(FloatSize(printWidth, printHeight), true);
 1351 printContext.computePageRectsWithPageSize(GraphicsSize(printWidth, printHeight), true);
13521352 const Vector<IntRect>& pageRects = printContext.pageRects();
13531353
13541354 size_t size = pageRects.size();
90929

Source/WebKit/mac/WebView/WebHTMLView.mm

9090#import <WebCore/Element.h>
9191#import <WebCore/EventHandler.h>
9292#import <WebCore/ExceptionHandlers.h>
93 #import <WebCore/FloatRect.h>
9493#import <WebCore/FocusController.h>
9594#import <WebCore/Frame.h>
9695#import <WebCore/FrameLoader.h>
9796#import <WebCore/FrameSelection.h>
9897#import <WebCore/FrameView.h>
 98#import <WebCore/GraphicsRect.h>
9999#import <WebCore/HTMLConverter.h>
100100#import <WebCore/HTMLNames.h>
101101#import <WebCore/HitTestResult.h>

21472147
21482148 float pageLogicalWidth = isHorizontal ? pageWidth : pageHeight;
21492149 float pageLogicalHeight = isHorizontal ? pageHeight : pageWidth;
2150  FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
 2150 GraphicsSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
21512151 float maximumShrinkRatio = 1;
21522152
21532153 // If we are a frameset just print with the layout we have onscreen, otherwise relayout
21542154 // according to the page width.
21552155 if (shrinkToFit && (!frame->document() || !frame->document()->isFrameSet())) {
2156  minLayoutSize = frame->resizePageRectsKeepingRatio(FloatSize(pageLogicalWidth, pageLogicalHeight), FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
 2156 minLayoutSize = frame->resizePageRectsKeepingRatio(GraphicsSize(pageLogicalWidth, pageLogicalHeight), GraphicsSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
21572157 maximumShrinkRatio = _WebHTMLViewPrintingMaximumShrinkFactor / _WebHTMLViewPrintingMinimumShrinkFactor;
21582158 }
21592159

21832183
21842184 float pageLogicalWidth = isHorizontal ? pageSize.width : pageSize.height;
21852185 float pageLogicalHeight = isHorizontal ? pageSize.height : pageSize.width;
2186  FloatSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
 2186 GraphicsSize minLayoutSize(pageLogicalWidth, pageLogicalHeight);
21872187 float maximumShrinkRatio = 1;
21882188
21892189 // If we are a frameset just print with the layout we have onscreen, otherwise relayout
21902190 // according to the page width.
21912191 if (shrinkToFit && (!frame->document() || !frame->document()->isFrameSet())) {
2192  minLayoutSize = frame->resizePageRectsKeepingRatio(FloatSize(pageLogicalWidth, pageLogicalHeight), FloatSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
 2192 minLayoutSize = frame->resizePageRectsKeepingRatio(GraphicsSize(pageLogicalWidth, pageLogicalHeight), GraphicsSize(pageLogicalWidth * _WebHTMLViewPrintingMinimumShrinkFactor, pageLogicalHeight * _WebHTMLViewPrintingMinimumShrinkFactor));
21932193 maximumShrinkRatio = _WebHTMLViewPrintingMaximumShrinkFactor / _WebHTMLViewPrintingMinimumShrinkFactor;
21942194 }
21952195

30223022
30233023 if (FrameView* coreView = coreFrame->view()) {
30243024 if (minPageLogicalWidth > 0.0) {
3025  FloatSize pageSize(minPageLogicalWidth, minPageLogicalHeight);
 3025 GraphicsSize pageSize(minPageLogicalWidth, minPageLogicalHeight);
30263026 if (coreFrame->document() && coreFrame->document()->renderView() && !coreFrame->document()->renderView()->style()->isHorizontalWritingMode())
3027  pageSize = FloatSize(minPageLogicalHeight, minPageLogicalWidth);
 3027 pageSize = GraphicsSize(minPageLogicalHeight, minPageLogicalWidth);
30283028 coreView->forceLayoutForPagination(pageSize, maximumShrinkRatio, adjustViewSize ? AdjustViewSize : DoNotAdjustViewSize);
30293029 } else {
30303030 coreView->forceLayout(!adjustViewSize);

59715971 if (![self _hasSelection])
59725972 return nil;
59735973
5974  Vector<FloatRect> list;
 5974 Vector<GraphicsRect> list;
59755975 if (Frame* coreFrame = core([self _frame]))
59765976 coreFrame->selection()->getClippedVisibleTextRectangles(list);
59775977
90929

Source/WebCore/WebCore.exp.in

139139__ZN3WTF6StringC1EPK10__CFString
140140__ZN7WebCore10CredentialC1ERKN3WTF6StringES4_NS_21CredentialPersistenceE
141141__ZN7WebCore10CredentialC1Ev
142 __ZN7WebCore10FloatPointC1ERKNS_8IntPointE
 142__ZN7WebCore13GraphicsPointC1ERKNS_8IntPointE
143143__ZN7WebCore10JSDocument3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE
144144__ZN7WebCore10JSDocument6s_infoE
145145__ZN7WebCore10MouseEvent6createERKN3WTF12AtomicStringENS1_10PassRefPtrINS_9DOMWindowEEERKNS_18PlatformMouseEventEiNS5_INS_4NodeEEE

220220__ZN7WebCore11startOfWordERKNS_15VisiblePositionENS_9EWordSideE
221221__ZN7WebCore11toUserSpaceERK7_NSRectP8NSWindow
222222__ZN7WebCore11writeToFileEiPKci
223 __ZN7WebCore12ChromeClient20paintCustomScrollbarEPNS_15GraphicsContextERKNS_9FloatRectENS_20ScrollbarControlSizeEjNS_13ScrollbarPartEbffj
 223__ZN7WebCore12ChromeClient20paintCustomScrollbarEPNS_15GraphicsContextERKNS_12GraphicsRectENS_20ScrollbarControlSizeEjNS_13ScrollbarPartEbffj
224224__ZN7WebCore12ChromeClient23paintCustomOverhangAreaEPNS_15GraphicsContextERKNS_7IntRectES5_S5_
225 __ZN7WebCore12ChromeClient23paintCustomScrollCornerEPNS_15GraphicsContextERKNS_9FloatRectE
 225__ZN7WebCore12ChromeClient23paintCustomScrollCornerEPNS_15GraphicsContextERKNS_12GraphicsRectE
226226__ZN7WebCore12EditingStyleD1Ev
227227__ZN7WebCore12EventHandler10mouseMovedEP7NSEvent
228228__ZN7WebCore12EventHandler10mouseMovedERKNS_18PlatformMouseEventE

265265__ZN7WebCore12JSDOMWrapper34virtualFunctionToPreventWeakVtableEv
266266__ZN7WebCore12PopupMenuMacC1EPNS_15PopupMenuClientE
267267__ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci
268 __ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE
269 __ZN7WebCore12PrintContext16computePageRectsERKNS_9FloatRectEfffRfb
 268__ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_12GraphicsSizeE
 269__ZN7WebCore12PrintContext16computePageRectsERKNS_12GraphicsRectEfffRfb
270270__ZN7WebCore12PrintContext16isPageBoxVisibleEPNS_5FrameEi
271 __ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_9FloatSizeE
 271__ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_12GraphicsSizeE
272272__ZN7WebCore12PrintContext26pageSizeAndMarginsInPixelsEPNS_5FrameEiiiiiii
273 __ZN7WebCore12PrintContext27computeAutomaticScaleFactorERKNS_9FloatSizeE
274 __ZN7WebCore12PrintContext27spoolAllPagesWithBoundariesEPNS_5FrameERNS_15GraphicsContextERKNS_9FloatSizeE
275 __ZN7WebCore12PrintContext28computePageRectsWithPageSizeERKNS_9FloatSizeEb
 273__ZN7WebCore12PrintContext27computeAutomaticScaleFactorERKNS_12GraphicsSizeE
 274__ZN7WebCore12PrintContext27spoolAllPagesWithBoundariesEPNS_5FrameERNS_15GraphicsContextERKNS_12GraphicsSizeE
 275__ZN7WebCore12PrintContext28computePageRectsWithPageSizeERKNS_12GraphicsSizeEb
276276__ZN7WebCore12PrintContext3endEv
277277__ZN7WebCore12PrintContext5beginEff
278278__ZN7WebCore12PrintContext9spoolPageERNS_15GraphicsContextEif

325325__ZN7WebCore13TypingCommand39insertParagraphSeparatorInQuotedContentEPNS_8DocumentE
326326__ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE
327327__ZN7WebCore13directoryNameERKN3WTF6StringE
328 __ZN7WebCore13toDeviceSpaceERKNS_9FloatRectEP8NSWindow
 328__ZN7WebCore13toDeviceSpaceERKNS_12GraphicsRectEP8NSWindow
329329__ZN7WebCore13toHTMLElementEPNS_21FormAssociatedElementE
330330__ZN7WebCore13toJSDOMWindowEN3JSC7JSValueE
331331__ZN7WebCore14CachedResource12removeClientEPNS_20CachedResourceClientE

409409__ZN7WebCore15GraphicsContext22beginTransparencyLayerEf
410410__ZN7WebCore15GraphicsContext4clipERKNS_4PathE
411411__ZN7WebCore15GraphicsContext4clipERKNS_7IntRectE
412 __ZN7WebCore15GraphicsContext4clipERKNS_9FloatRectE
 412__ZN7WebCore15GraphicsContext4clipERKNS_12GraphicsRectE
413413__ZN7WebCore15GraphicsContext4saveEv
414 __ZN7WebCore15GraphicsContext5scaleERKNS_9FloatSizeE
 414__ZN7WebCore15GraphicsContext5scaleERKNS_12GraphicsSizeE
415415__ZN7WebCore15GraphicsContext7restoreEv
416416__ZN7WebCore15GraphicsContext8fillPathERKNS_4PathE
417 __ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectE
418 __ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectERKNS_5ColorENS_10ColorSpaceE
419 __ZN7WebCore15GraphicsContext9clearRectERKNS_9FloatRectE
 417__ZN7WebCore15GraphicsContext8fillRectERKNS_12GraphicsRectE
 418__ZN7WebCore15GraphicsContext8fillRectERKNS_12GraphicsRectERKNS_5ColorENS_10ColorSpaceE
 419__ZN7WebCore15GraphicsContext9clearRectERKNS_12GraphicsRectE
420420__ZN7WebCore15GraphicsContext9drawImageEPNS_5ImageENS_10ColorSpaceERKNS_8IntPointENS_17CompositeOperatorE
421 __ZN7WebCore15GraphicsContext9setShadowERKNS_9FloatSizeEfRKNS_5ColorENS_10ColorSpaceE
 421__ZN7WebCore15GraphicsContext9setShadowERKNS_12GraphicsSizeEfRKNS_5ColorENS_10ColorSpaceE
422422__ZN7WebCore15GraphicsContext9translateEff
423423__ZN7WebCore15GraphicsContextC1EP9CGContext
424424__ZN7WebCore15GraphicsContextD1Ev

489489__ZN7WebCore16createFullMarkupEPKNS_5RangeE
490490__ZN7WebCore16deleteAllCookiesEv
491491__ZN7WebCore16enclosingIntRectERK7_NSRect
492 __ZN7WebCore16enclosingIntRectERKNS_9FloatRectE
 492__ZN7WebCore16enclosingIntRectERKNS_12GraphicsRectE
493493__ZN7WebCore16isEndOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
494494__ZN7WebCore16startOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
495495__ZN7WebCore17CredentialStorage24getFromPersistentStorageERKNS_15ProtectionSpaceE

716716__ZN7WebCore4Page9initGroupEv
717717__ZN7WebCore4PageC1ERNS0_11PageClientsE
718718__ZN7WebCore4PageD1Ev
719 __ZN7WebCore4Path14addRoundedRectERKNS_9FloatRectERKNS_9FloatSizeE
 719__ZN7WebCore4Path14addRoundedRectERKNS_12GraphicsRectERKNS_12GraphicsSizeE
720720__ZN7WebCore4PathC1Ev
721721__ZN7WebCore4PathD1Ev
722722__ZN7WebCore4coreEP20NSURLProtectionSpace

734734__ZN7WebCore5Frame23visiblePositionForPointERKNS_8IntPointE
735735__ZN7WebCore5Frame25matchLabelsAgainstElementEP7NSArrayPNS_7ElementE
736736__ZN7WebCore5Frame25setPageAndTextZoomFactorsEff
737 __ZN7WebCore5Frame27resizePageRectsKeepingRatioERKNS_9FloatSizeES3_
 737__ZN7WebCore5Frame27resizePageRectsKeepingRatioERKNS_12GraphicsSizeES3_
738738__ZN7WebCore5Frame28searchForLabelsBeforeElementEP7NSArrayPNS_7ElementEPmPb
739739__ZN7WebCore5Frame6createEPNS_4PageEPNS_21HTMLFrameOwnerElementEPNS_17FrameLoaderClientE
740740__ZN7WebCore5Frame7setViewEN3WTF10PassRefPtrINS_9FrameViewEEE

824824__ZN7WebCore7IntRect5scaleEf
825825__ZN7WebCore7IntRect5uniteERKS0_
826826__ZN7WebCore7IntRect9intersectERKS0_
827 __ZN7WebCore7IntRectC1ERKNS_9FloatRectE
 827__ZN7WebCore7IntRectC1ERKNS_12GraphicsRectE
828828__ZN7WebCore7IntSizeC1ERK7_NSSize
829829__ZN7WebCore7TextRun19allowsRoundingHacksEv
830830__ZN7WebCore7TextRun21s_allowsRoundingHacksE

850850__ZN7WebCore8FormData6createEPKvm
851851__ZN7WebCore8FormDataD1Ev
852852__ZN7WebCore8Gradient12addColorStopEfRKNS_5ColorE
853 __ZN7WebCore8GradientC1ERKNS_10FloatPointES3_
 853__ZN7WebCore8GradientC1ERKNS_13GraphicsPointES3_
854854__ZN7WebCore8IntPointC1ERK8_NSPoint
855855__ZN7WebCore8PositionC1EN3WTF10PassRefPtrINS_4NodeEEEiNS0_10AnchorTypeE
856856__ZN7WebCore8Settings14setJavaEnabledEb

929929__ZN7WebCore8toStringERKN3WTF6VectorINS_11ProxyServerELm0EEE
930930__ZN7WebCore9DOMWindow30dispatchAllPendingUnloadEventsEv
931931__ZN7WebCore9DOMWindow36dispatchAllPendingBeforeUnloadEventsEv
932 __ZN7WebCore9FloatRectC1ERK7_NSRect
933 __ZN7WebCore9FloatRectC1ERKNS_7IntRectE
934 __ZN7WebCore9FloatSizeC1ERKNS_7IntSizeE
 932__ZN7WebCore12GraphicsRectC1ERK7_NSRect
 933__ZN7WebCore12GraphicsRectC1ERKNS_7IntRectE
 934__ZN7WebCore12GraphicsSizeC1ERKNS_7IntSizeE
935935__ZN7WebCore9FontCache13fontDataCountEv
936936__ZN7WebCore9FontCache21inactiveFontDataCountEv
937937__ZN7WebCore9FontCache21purgeInactiveFontDataEi

953953__ZN7WebCore9FrameView21flushDeferredRepaintsEv
954954__ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
955955__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
956 __ZN7WebCore9FrameView24forceLayoutForPaginationERKNS_9FloatSizeEfNS_19AdjustViewSizeOrNotE
 956__ZN7WebCore9FrameView24forceLayoutForPaginationERKNS_12GraphicsSizeEfNS_19AdjustViewSizeOrNotE
957957__ZN7WebCore9FrameView26adjustPageHeightDeprecatedEPffff
958958__ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
959959__ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv

10371037__ZNK7WebCore10Credential4userEv
10381038__ZNK7WebCore10Credential7isEmptyEv
10391039__ZNK7WebCore10Credential8passwordEv
1040 __ZNK7WebCore10FloatPointcv8_NSPointEv
 1040__ZNK7WebCore13GraphicsPointcv8_NSPointEv
10411041__ZNK7WebCore10PluginData16supportsMimeTypeERKN3WTF6StringE
10421042__ZNK7WebCore10RenderText16linesBoundingBoxEv
10431043__ZNK7WebCore10RenderText9firstRunXEv

10881088__ZNK7WebCore12IconDatabase24shouldStopThreadActivityEv
10891089__ZNK7WebCore12IconDatabase9isEnabledEv
10901090__ZNK7WebCore12RenderObject14enclosingLayerEv
1091 __ZNK7WebCore12RenderObject15localToAbsoluteERKNS_10FloatPointEbb
 1091__ZNK7WebCore12RenderObject15localToAbsoluteERKNS_13GraphicsPointEbb
10921092__ZNK7WebCore12RenderObject4viewEv
10931093__ZNK7WebCore12RenderObject7childAtEj
10941094__ZNK7WebCore12RenderWidget14windowClipRectEv

11381138__ZNK7WebCore14FrameSelection15copyTypingStyleEv
11391139__ZNK7WebCore14FrameSelection17isInPasswordFieldEv
11401140__ZNK7WebCore14FrameSelection18isFocusedAndActiveEv
1141 __ZNK7WebCore14FrameSelection31getClippedVisibleTextRectanglesERN3WTF6VectorINS_9FloatRectELm0EEE
 1141__ZNK7WebCore14FrameSelection31getClippedVisibleTextRectanglesERN3WTF6VectorINS_12GraphicsRectELm0EEE
11421142__ZNK7WebCore14FrameSelection6boundsEb
11431143__ZNK7WebCore14RenderListItem10markerTextEv
11441144__ZNK7WebCore14ResourceHandle10connectionEv

12091209__ZNK7WebCore27AuthenticationChallengeBase5errorEv
12101210__ZNK7WebCore27AuthenticationChallengeBase6isNullEv
12111211__ZNK7WebCore4Font5widthERKNS_7TextRunEPN3WTF7HashSetIPKNS_14SimpleFontDataENS4_7PtrHashIS8_EENS4_10HashTraitsIS8_EEEEPNS_13GlyphOverflowE
1212 __ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_10FloatPointEii
 1212__ZNK7WebCore4Font8drawTextEPNS_15GraphicsContextERKNS_7TextRunERKNS_13GraphicsPointEii
12131213__ZNK7WebCore4KURL10protocolIsEPKc
12141214__ZNK7WebCore4KURL11createCFURLEv
12151215__ZNK7WebCore4KURL11isLocalFileEv

12451245__ZNK7WebCore5Range4textEv
12461246__ZNK7WebCore5Range9endOffsetERi
12471247__ZNK7WebCore5Range9firstNodeEv
1248 __ZNK7WebCore5Range9textQuadsERN3WTF6VectorINS_9FloatQuadELm0EEEb
 1248__ZNK7WebCore5Range9textQuadsERN3WTF6VectorINS_12GraphicsQuadELm0EEEb
12491249__ZNK7WebCore6Chrome12createWindowEPNS_5FrameERKNS_16FrameLoadRequestERKNS_14WindowFeaturesERKNS_16NavigationActionE
12501250__ZNK7WebCore6Cursor14platformCursorEv
12511251__ZNK7WebCore6Editor12selectedTextEv

13111311__ZNK7WebCore8Position26trailingWhitespacePositionENS_9EAffinityEb
13121312__ZNK7WebCore8Position8upstreamENS_27EditingBoundaryCrossingRuleE
13131313__ZNK7WebCore9DOMWindow27pendingUnloadEventListenersEv
1314 __ZNK7WebCore9FloatQuad11boundingBoxEv
1315 __ZNK7WebCore9FloatRectcv7_NSRectEv
 1314__ZNK7WebCore12GraphicsQuad11boundingBoxEv
 1315__ZNK7WebCore12GraphicsRectcv7_NSRectEv
13161316__ZNK7WebCore9FrameTree12traverseNextEPKNS_5FrameE
13171317__ZNK7WebCore9FrameTree14isDescendantOfEPKNS_5FrameE
13181318__ZNK7WebCore9FrameTree20traverseNextWithWrapEb
90929

Source/WebCore/GNUmakefile.list.am

24732473 Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h \
24742474 Source/WebCore/platform/graphics/filters/arm/FELightingNEON.cpp \
24752475 Source/WebCore/platform/graphics/filters/arm/FELightingNEON.h \
2476  Source/WebCore/platform/graphics/FloatPoint3D.cpp \
2477  Source/WebCore/platform/graphics/FloatPoint3D.h \
2478  Source/WebCore/platform/graphics/FloatPoint.cpp \
2479  Source/WebCore/platform/graphics/FloatPoint.h \
2480  Source/WebCore/platform/graphics/FloatQuad.cpp \
2481  Source/WebCore/platform/graphics/FloatQuad.h \
2482  Source/WebCore/platform/graphics/FloatRect.cpp \
2483  Source/WebCore/platform/graphics/FloatRect.h \
2484  Source/WebCore/platform/graphics/FloatSize.cpp \
2485  Source/WebCore/platform/graphics/FloatSize.h \
24862476 Source/WebCore/platform/graphics/FontBaseline.h \
24872477 Source/WebCore/platform/graphics/FontCache.cpp \
24882478 Source/WebCore/platform/graphics/FontCache.h \

25192509 Source/WebCore/platform/graphics/GraphicsContext.h \
25202510 Source/WebCore/platform/graphics/GraphicsLayer.h \
25212511 Source/WebCore/platform/graphics/GraphicsLayer.cpp \
 2512 Source/WebCore/platform/graphics/GraphicsPoint3D.cpp \
 2513 Source/WebCore/platform/graphics/GraphicsPoint3D.h \
 2514 Source/WebCore/platform/graphics/GraphicsPoint.cpp \
 2515 Source/WebCore/platform/graphics/GraphicsPoint.h \
 2516 Source/WebCore/platform/graphics/GraphicsQuad.cpp \
 2517 Source/WebCore/platform/graphics/GraphicsQuad.h \
 2518 Source/WebCore/platform/graphics/GraphicsRect.cpp \
 2519 Source/WebCore/platform/graphics/GraphicsRect.h \
 2520 Source/WebCore/platform/graphics/GraphicsSize.cpp \
 2521 Source/WebCore/platform/graphics/GraphicsSize.h \
25222522 Source/WebCore/platform/graphics/GraphicsTypes.cpp \
25232523 Source/WebCore/platform/graphics/GraphicsTypes.h \
25242524 Source/WebCore/platform/graphics/GraphicsTypes3D.h \
90929

Source/WebCore/dom/WheelEvent.cpp

3636{
3737}
3838
39 WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
 39WheelEvent::WheelEvent(const GraphicsPoint& wheelTicks, const GraphicsPoint& rawDelta,
4040 Granularity granularity, PassRefPtr<AbstractView> view,
4141 const IntPoint& screenLocation, const IntPoint& pageLocation,
4242 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)

9696 if (!(event.deltaX() || event.deltaY()))
9797 return;
9898
99  setEvent(WheelEvent::create(FloatPoint(event.wheelTicksX(), event.wheelTicksY()), FloatPoint(event.deltaX(), event.deltaY()), granularity(event),
 99 setEvent(WheelEvent::create(GraphicsPoint(event.wheelTicksX(), event.wheelTicksY()), GraphicsPoint(event.deltaX(), event.deltaY()), granularity(event),
100100 view, IntPoint(event.globalX(), event.globalY()), IntPoint(event.x(), event.y()), event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey()));
101101
102102}
90929

Source/WebCore/dom/MouseRelatedEvent.cpp

125125void MouseRelatedEvent::computePageLocation()
126126{
127127 float zoomFactor = pageZoomFactor(this);
128  setAbsoluteLocation(roundedIntPoint(FloatPoint(pageX() * zoomFactor, pageY() * zoomFactor)));
 128 setAbsoluteLocation(roundedIntPoint(GraphicsPoint(pageX() * zoomFactor, pageY() * zoomFactor)));
129129}
130130
131131void MouseRelatedEvent::receivedTarget()

149149 // Adjust offsetLocation to be relative to the target's position.
150150 if (!isSimulated()) {
151151 if (RenderObject* r = targetNode->renderer()) {
152  FloatPoint localPos = r->absoluteToLocal(absoluteLocation(), false, true);
 152 GraphicsPoint localPos = r->absoluteToLocal(absoluteLocation(), false, true);
153153 m_offsetLocation = roundedIntPoint(localPos);
154154 float scaleFactor = 1 / pageZoomFactor(this);
155155 if (scaleFactor != 1.0f)
90929

Source/WebCore/dom/Element.cpp

519519 if (!view)
520520 return IntRect();
521521
522  Vector<FloatQuad> quads;
 522 Vector<GraphicsQuad> quads;
523523#if ENABLE(SVG)
524524 if (isSVGElement() && renderer()) {
525525 // Get the bounding rectangle from the SVG model.
526526 const SVGElement* svgElement = static_cast<const SVGElement*>(this);
527  FloatRect localRect;
 527 GraphicsRect localRect;
528528 if (svgElement->boundingBox(localRect))
529529 quads.append(renderer()->localToAbsoluteQuad(localRect));
530530 } else

557557 // FIXME: Handle SVG elements.
558558 // FIXME: Handle table/inline-table with a caption.
559559
560  Vector<FloatQuad> quads;
 560 Vector<GraphicsQuad> quads;
561561 renderBoxModelObject->absoluteQuads(quads);
562562
563563 float pageScale = 1;

570570 IntRect visibleContentRect = view->visibleContentRect();
571571 for (size_t i = 0; i < quads.size(); ++i) {
572572 quads[i].move(-visibleContentRect.x(), -visibleContentRect.y());
573  adjustFloatQuadForAbsoluteZoom(quads[i], renderBoxModelObject);
 573 adjustGraphicsQuadForAbsoluteZoom(quads[i], renderBoxModelObject);
574574 if (pageScale != 1)
575  adjustFloatQuadForPageScale(quads[i], pageScale);
 575 adjustGraphicsQuadForPageScale(quads[i], pageScale);
576576 }
577577 }
578578

583583{
584584 document()->updateLayoutIgnorePendingStylesheets();
585585
586  Vector<FloatQuad> quads;
 586 Vector<GraphicsQuad> quads;
587587#if ENABLE(SVG)
588588 if (isSVGElement() && renderer()) {
589589 // Get the bounding rectangle from the SVG model.
590590 const SVGElement* svgElement = static_cast<const SVGElement*>(this);
591  FloatRect localRect;
 591 GraphicsRect localRect;
592592 if (svgElement->boundingBox(localRect))
593593 quads.append(renderer()->localToAbsoluteQuad(localRect));
594594 } else

602602 if (quads.isEmpty())
603603 return ClientRect::create();
604604
605  FloatRect result = quads[0].boundingBox();
 605 GraphicsRect result = quads[0].boundingBox();
606606 for (size_t i = 1; i < quads.size(); ++i)
607607 result.unite(quads[i].boundingBox());
608608

611611 result.move(-visibleContentRect.x(), -visibleContentRect.y());
612612 }
613613
614  adjustFloatRectForAbsoluteZoom(result, renderer());
 614 adjustGraphicsRectForAbsoluteZoom(result, renderer());
615615 if (Page* page = document()->page()) {
616616 if (Frame* frame = page->mainFrame())
617  adjustFloatRectForPageScale(result, frame->pageScaleFactor());
 617 adjustGraphicsRectForPageScale(result, frame->pageScaleFactor());
618618 }
619619
620620 return ClientRect::create(result);
90929

Source/WebCore/dom/Node.h

5151class Event;
5252class EventContext;
5353class EventListener;
54 class FloatPoint;
 54class GraphicsPoint;
5555class Frame;
5656class HTMLInputElement;
5757class IntRect;

428428 virtual bool canStartSelection() const;
429429
430430 // Getting points into and out of screen space
431  FloatPoint convertToPage(const FloatPoint&) const;
432  FloatPoint convertFromPage(const FloatPoint&) const;
 431 GraphicsPoint convertToPage(const GraphicsPoint&) const;
 432 GraphicsPoint convertFromPage(const GraphicsPoint&) const;
433433
434434 // -----------------------------------------------------------------------------
435435 // Integration with rendering tree
90929

Source/WebCore/dom/Document.cpp

11231123 return 0;
11241124
11251125 float zoomFactor = frame->pageZoomFactor();
1126  IntPoint point = roundedIntPoint(FloatPoint(centerX * zoomFactor + view()->scrollX(), centerY * zoomFactor + view()->scrollY()));
 1126 IntPoint point = roundedIntPoint(GraphicsPoint(centerX * zoomFactor + view()->scrollX(), centerY * zoomFactor + view()->scrollY()));
11271127
11281128 int type = HitTestRequest::ReadOnly | HitTestRequest::Active;
11291129

11711171 return 0;
11721172
11731173 float zoomFactor = frame->pageZoomFactor();
1174  IntPoint point = roundedIntPoint(FloatPoint(x * zoomFactor + frameView->scrollX(), y * zoomFactor + frameView->scrollY()));
 1174 IntPoint point = roundedIntPoint(GraphicsPoint(x * zoomFactor + frameView->scrollX(), y * zoomFactor + frameView->scrollY()));
11751175
11761176 if (!frameView->visibleContentRect().contains(point))
11771177 return 0;
90929

Source/WebCore/dom/ClientRectList.cpp

3636{
3737}
3838
39 ClientRectList::ClientRectList(const Vector<FloatQuad>& quads)
 39ClientRectList::ClientRectList(const Vector<GraphicsQuad>& quads)
4040{
4141 m_list.reserveInitialCapacity(quads.size());
4242 for (size_t i = 0; i < quads.size(); ++i)
90929

Source/WebCore/dom/ContainerNode.cpp

2929#include "DeleteButtonController.h"
3030#include "EventNames.h"
3131#include "ExceptionCode.h"
32 #include "FloatRect.h"
 32#include "GraphicsRect.h"
3333#include "Frame.h"
3434#include "FrameView.h"
3535#include "InlineTextBox.h"

849849 document()->frame()->editor()->deleteButtonController()->enable();
850850}
851851
852 bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
 852bool ContainerNode::getUpperLeftCorner(GraphicsPoint& point) const
853853{
854854 if (!renderer())
855855 return false;

858858 RenderObject *p = o;
859859
860860 if (!o->isInline() || o->isReplaced()) {
861  point = o->localToAbsolute(FloatPoint(), false, true);
 861 point = o->localToAbsolute(GraphicsPoint(), false, true);
862862 return true;
863863 }
864864

883883 ASSERT(o);
884884
885885 if (!o->isInline() || o->isReplaced()) {
886  point = o->localToAbsolute(FloatPoint(), false, true);
 886 point = o->localToAbsolute(GraphicsPoint(), false, true);
887887 return true;
888888 }
889889
890890 if (p->node() && p->node() == this && o->isText() && !o->isBR() && !toRenderText(o)->firstTextBox()) {
891891 // do nothing - skip unrendered whitespace that is a child or next sibling of the anchor
892892 } else if ((o->isText() && !o->isBR()) || o->isReplaced()) {
893  point = FloatPoint();
 893 point = GraphicsPoint();
894894 if (o->isText() && toRenderText(o)->firstTextBox()) {
895895 point.move(toRenderText(o)->linesBoundingBox().x(),
896896 toRenderText(o)->firstTextBox()->root()->lineTop());

906906 // If the target doesn't have any children or siblings that could be used to calculate the scroll position, we must be
907907 // at the end of the document. Scroll to the bottom. FIXME: who said anything about scrolling?
908908 if (!o && document()->view()) {
909  point = FloatPoint(0, document()->view()->contentsHeight());
 909 point = GraphicsPoint(0, document()->view()->contentsHeight());
910910 return true;
911911 }
912912 return false;
913913}
914914
915915// FIXME: This doesn't work correctly with transforms.
916 bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
 916bool ContainerNode::getLowerRightCorner(GraphicsPoint& point) const
917917{
918918 if (!renderer())
919919 return false;

921921 RenderObject* o = renderer();
922922 if (!o->isInline() || o->isReplaced()) {
923923 RenderBox* box = toRenderBox(o);
924  point = o->localToAbsolute(FloatPoint(), false, true);
 924 point = o->localToAbsolute(GraphicsPoint(), false, true);
925925 point.move(box->size());
926926 return true;
927927 }

944944 }
945945 ASSERT(o);
946946 if (o->isText() || o->isReplaced()) {
947  point = FloatPoint();
 947 point = GraphicsPoint();
948948 if (o->isText()) {
949949 RenderText* text = toRenderText(o);
950950 IntRect linesBox = text->linesBoundingBox();

964964
965965IntRect ContainerNode::getRect() const
966966{
967  FloatPoint upperLeft, lowerRight;
 967 GraphicsPoint upperLeft, lowerRight;
968968 bool foundUpperLeft = getUpperLeftCorner(upperLeft);
969969 bool foundLowerRight = getLowerRightCorner(lowerRight);
970970

977977 upperLeft = lowerRight;
978978 }
979979
980  return enclosingIntRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));
 980 return enclosingIntRect(GraphicsRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));
981981}
982982
983983void ContainerNode::setFocus(bool received)
90929

Source/WebCore/dom/Range.h

2626#define Range_h
2727
2828#include "ExceptionCodePlaceholder.h"
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "IntRect.h"
3131#include "Node.h"
3232#include "RangeBoundaryPoint.h"

4141class ContainerNode;
4242class Document;
4343class DocumentFragment;
44 class FloatQuad;
 44class GraphicsQuad;
4545class NodeWithIndex;
4646class Text;
4747

115115 // Not transform-friendly
116116 void textRects(Vector<IntRect>&, bool useSelectionHeight = false);
117117 // Transform-friendly
118  void textQuads(Vector<FloatQuad>&, bool useSelectionHeight = false) const;
119  void getBorderAndTextQuads(Vector<FloatQuad>&) const;
120  FloatRect boundingRect() const;
 118 void textQuads(Vector<GraphicsQuad>&, bool useSelectionHeight = false) const;
 119 void getBorderAndTextQuads(Vector<GraphicsQuad>&) const;
 120 GraphicsRect boundingRect() const;
121121
122122 void nodeChildrenChanged(ContainerNode*);
123123 void nodeChildrenWillBeRemoved(ContainerNode*);
90929

Source/WebCore/dom/WheelEvent.h

2424#ifndef WheelEvent_h
2525#define WheelEvent_h
2626
27 #include "FloatPoint.h"
 27#include "GraphicsPoint.h"
2828#include "MouseRelatedEvent.h"
2929
3030namespace WebCore {

3838 {
3939 return adoptRef(new WheelEvent);
4040 }
41  static PassRefPtr<WheelEvent> create(const FloatPoint& wheelTicks,
42  const FloatPoint& rawDelta, Granularity granularity, PassRefPtr<AbstractView> view,
 41 static PassRefPtr<WheelEvent> create(const GraphicsPoint& wheelTicks,
 42 const GraphicsPoint& rawDelta, Granularity granularity, PassRefPtr<AbstractView> view,
4343 const IntPoint& screenLocation, const IntPoint& pageLocation,
4444 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
4545 {

6767
6868 private:
6969 WheelEvent();
70  WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
 70 WheelEvent(const GraphicsPoint& wheelTicks, const GraphicsPoint& rawDelta,
7171 Granularity granularity, PassRefPtr<AbstractView>,
7272 const IntPoint& screenLocation, const IntPoint& pageLocation,
7373 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
90929

Source/WebCore/dom/Node.cpp

843843 return true;
844844
845845 Vector<IntRect> rects;
846  FloatPoint absPos = renderer()->localToAbsolute();
 846 GraphicsPoint absPos = renderer()->localToAbsolute();
847847 renderer()->absoluteRects(rects, flooredIntPoint(absPos));
848848 size_t n = rects.size();
849849 for (size_t i = 0; i < n; ++i)

22622262 DOCUMENT_POSITION_PRECEDING | DOCUMENT_POSITION_CONTAINS;
22632263}
22642264
2265 FloatPoint Node::convertToPage(const FloatPoint& p) const
 2265GraphicsPoint Node::convertToPage(const GraphicsPoint& p) const
22662266{
22672267 // If there is a renderer, just ask it to do the conversion
22682268 if (renderer())

22772277 return p;
22782278}
22792279
2280 FloatPoint Node::convertFromPage(const FloatPoint& p) const
 2280GraphicsPoint Node::convertFromPage(const GraphicsPoint& p) const
22812281{
22822282 // If there is a renderer, just ask it to do the conversion
22832283 if (renderer())
90929

Source/WebCore/dom/Range.cpp

2828#include "ClientRectList.h"
2929#include "DocumentFragment.h"
3030#include "ExceptionCode.h"
31 #include "FloatQuad.h"
 31#include "GraphicsQuad.h"
3232#include "Frame.h"
3333#include "FrameView.h"
3434#include "HTMLElement.h"

16531653 }
16541654}
16551655
1656 void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight) const
 1656void Range::textQuads(Vector<GraphicsQuad>& quads, bool useSelectionHeight) const
16571657{
16581658 Node* startContainer = m_start.container();
16591659 Node* endContainer = m_end.container();

19141914
19151915 m_ownerDocument->updateLayoutIgnorePendingStylesheets();
19161916
1917  Vector<FloatQuad> quads;
 1917 Vector<GraphicsQuad> quads;
19181918 getBorderAndTextQuads(quads);
19191919
19201920 return ClientRectList::create(quads);

19221922
19231923PassRefPtr<ClientRect> Range::getBoundingClientRect() const
19241924{
1925  FloatRect rect = boundingRect();
 1925 GraphicsRect rect = boundingRect();
19261926 return rect.isEmpty() ? 0 : ClientRect::create(rect);
19271927}
19281928
1929 static void adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale(Vector<FloatQuad>& quads, Document* document, RenderObject* renderer)
 1929static void adjustGraphicsQuadsForScrollAndAbsoluteZoomAndPageScale(Vector<GraphicsQuad>& quads, Document* document, RenderObject* renderer)
19301930{
19311931 FrameView* view = document->view();
19321932 if (!view)

19411941 IntRect visibleContentRect = view->visibleContentRect();
19421942 for (size_t i = 0; i < quads.size(); ++i) {
19431943 quads[i].move(-visibleContentRect.x(), -visibleContentRect.y());
1944  adjustFloatQuadForAbsoluteZoom(quads[i], renderer);
 1944 adjustGraphicsQuadForAbsoluteZoom(quads[i], renderer);
19451945 if (pageScale != 1)
1946  adjustFloatQuadForPageScale(quads[i], pageScale);
 1946 adjustGraphicsQuadForPageScale(quads[i], pageScale);
19471947 }
19481948}
19491949
1950 void Range::getBorderAndTextQuads(Vector<FloatQuad>& quads) const
 1950void Range::getBorderAndTextQuads(Vector<GraphicsQuad>& quads) const
19511951{
19521952 Node* startContainer = m_start.container();
19531953 Node* endContainer = m_end.container();

19631963 if (node->isElementNode()) {
19641964 if (!nodeSet.contains(node->parentNode())) {
19651965 if (RenderBoxModelObject* renderBoxModelObject = static_cast<Element*>(node)->renderBoxModelObject()) {
1966  Vector<FloatQuad> elementQuads;
 1966 Vector<GraphicsQuad> elementQuads;
19671967 renderBoxModelObject->absoluteQuads(elementQuads);
1968  adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale(elementQuads, m_ownerDocument.get(), renderBoxModelObject);
 1968 adjustGraphicsQuadsForScrollAndAbsoluteZoomAndPageScale(elementQuads, m_ownerDocument.get(), renderBoxModelObject);
19691969
19701970 quads.append(elementQuads);
19711971 }

19761976 int startOffset = (node == startContainer) ? m_start.offset() : 0;
19771977 int endOffset = (node == endContainer) ? m_end.offset() : INT_MAX;
19781978
1979  Vector<FloatQuad> textQuads;
 1979 Vector<GraphicsQuad> textQuads;
19801980 renderText->absoluteQuadsForRange(textQuads, startOffset, endOffset);
1981  adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale(textQuads, m_ownerDocument.get(), renderText);
 1981 adjustGraphicsQuadsForScrollAndAbsoluteZoomAndPageScale(textQuads, m_ownerDocument.get(), renderText);
19821982
19831983 quads.append(textQuads);
19841984 }

19871987}
19881988
19891989
1990 FloatRect Range::boundingRect() const
 1990GraphicsRect Range::boundingRect() const
19911991{
19921992 if (!m_start.container())
1993  return FloatRect();
 1993 return GraphicsRect();
19941994
19951995 m_ownerDocument->updateLayoutIgnorePendingStylesheets();
19961996
1997  Vector<FloatQuad> quads;
 1997 Vector<GraphicsQuad> quads;
19981998 getBorderAndTextQuads(quads);
19991999 if (quads.isEmpty())
2000  return FloatRect();
 2000 return GraphicsRect();
20012001
2002  FloatRect result;
 2002 GraphicsRect result;
20032003 for (size_t i = 0; i < quads.size(); ++i)
20042004 result.unite(quads[i].boundingBox());
20052005
90929

Source/WebCore/dom/ClientRect.h

2727#ifndef ClientRect_h
2828#define ClientRect_h
2929
30 #include "FloatRect.h"
 30#include "GraphicsRect.h"
3131#include <wtf/PassRefPtr.h>
3232#include <wtf/RefCounted.h>
3333

3939 public:
4040 static PassRefPtr<ClientRect> create() { return adoptRef(new ClientRect); }
4141 static PassRefPtr<ClientRect> create(const IntRect& rect) { return adoptRef(new ClientRect(rect)); }
42  static PassRefPtr<ClientRect> create(const FloatRect& rect) { return adoptRef(new ClientRect(rect)); }
 42 static PassRefPtr<ClientRect> create(const GraphicsRect& rect) { return adoptRef(new ClientRect(rect)); }
4343
4444 float top() const { return m_rect.y(); }
4545 float right() const { return m_rect.maxX(); }

5151 private:
5252 ClientRect();
5353 ClientRect(const IntRect&);
54  ClientRect(const FloatRect&);
 54 ClientRect(const GraphicsRect&);
5555
56  FloatRect m_rect;
 56 GraphicsRect m_rect;
5757 };
5858
5959} // namespace WebCore
90929

Source/WebCore/dom/ContainerNode.h

2828
2929namespace WebCore {
3030
31 class FloatPoint;
 31class GraphicsPoint;
3232
3333typedef void (*NodeCallback)(Node*, unsigned);
3434

109109
110110 static void dispatchPostAttachCallbacks();
111111
112  bool getUpperLeftCorner(FloatPoint&) const;
113  bool getLowerRightCorner(FloatPoint&) const;
 112 bool getUpperLeftCorner(GraphicsPoint&) const;
 113 bool getLowerRightCorner(GraphicsPoint&) const;
114114
115115 Node* m_firstChild;
116116 Node* m_lastChild;
90929

Source/WebCore/dom/ClientRectList.h

2727#ifndef ClientRectList_h
2828#define ClientRectList_h
2929
30 #include "FloatQuad.h"
 30#include "GraphicsQuad.h"
3131#include <wtf/PassRefPtr.h>
3232#include <wtf/RefCounted.h>
3333#include <wtf/Vector.h>

3939 class ClientRectList : public RefCounted<ClientRectList> {
4040 public:
4141 static PassRefPtr<ClientRectList> create() { return adoptRef(new ClientRectList); }
42  static PassRefPtr<ClientRectList> create(const Vector<FloatQuad>& quads) { return adoptRef(new ClientRectList(quads)); }
 42 static PassRefPtr<ClientRectList> create(const Vector<GraphicsQuad>& quads) { return adoptRef(new ClientRectList(quads)); }
4343 ~ClientRectList();
4444
4545 unsigned length() const;

4747
4848 private:
4949 ClientRectList();
50  ClientRectList(const Vector<FloatQuad>&);
 50 ClientRectList(const Vector<GraphicsQuad>&);
5151
5252 Vector<RefPtr<ClientRect> > m_list;
5353 };
90929

Source/WebCore/dom/ClientRect.cpp

3838{
3939}
4040
41 ClientRect::ClientRect(const FloatRect& rect)
 41ClientRect::ClientRect(const GraphicsRect& rect)
4242 : m_rect(rect)
4343{
4444}
90929

Source/WebCore/editing/SpellingCorrectionController.cpp

3030#include "DocumentMarkerController.h"
3131#include "EditCommand.h"
3232#include "EditorClient.h"
33 #include "FloatQuad.h"
 33#include "GraphicsQuad.h"
3434#include "Frame.h"
3535#include "FrameView.h"
3636#include "Page.h"

155155
156156void SpellingCorrectionController::show(PassRefPtr<Range> rangeToReplace, const String& replacement)
157157{
158  FloatRect boundingBox = windowRectForRange(rangeToReplace.get());
 158 GraphicsRect boundingBox = windowRectForRange(rangeToReplace.get());
159159 if (boundingBox.isEmpty())
160160 return;
161161 m_correctionPanelInfo.replacedString = plainText(rangeToReplace.get());

298298 break;
299299 m_correctionPanelInfo.isActive = true;
300300 m_correctionPanelInfo.replacedString = plainText(m_correctionPanelInfo.rangeToBeReplaced.get());
301  FloatRect boundingBox = windowRectForRange(m_correctionPanelInfo.rangeToBeReplaced.get());
 301 GraphicsRect boundingBox = windowRectForRange(m_correctionPanelInfo.rangeToBeReplaced.get());
302302 if (!boundingBox.isEmpty())
303303 client()->showCorrectionPanel(m_correctionPanelInfo.panelType, boundingBox, m_correctionPanelInfo.replacedString, m_correctionPanelInfo.replacementString, Vector<String>());
304304 }

316316 String topSuggestion = suggestions.first();
317317 suggestions.remove(0);
318318 m_correctionPanelInfo.isActive = true;
319  FloatRect boundingBox = windowRectForRange(m_correctionPanelInfo.rangeToBeReplaced.get());
 319 GraphicsRect boundingBox = windowRectForRange(m_correctionPanelInfo.rangeToBeReplaced.get());
320320 if (!boundingBox.isEmpty())
321321 client()->showCorrectionPanel(m_correctionPanelInfo.panelType, boundingBox, m_correctionPanelInfo.replacedString, topSuggestion, suggestions);
322322 }

362362 return client() && client()->isAutomaticSpellingCorrectionEnabled();
363363}
364364
365 FloatRect SpellingCorrectionController::windowRectForRange(const Range* range) const
 365GraphicsRect SpellingCorrectionController::windowRectForRange(const Range* range) const
366366{
367367 FrameView* view = m_frame->view();
368368 if (!view)
369  return FloatRect();
370  Vector<FloatQuad> textQuads;
 369 return GraphicsRect();
 370 Vector<GraphicsQuad> textQuads;
371371 range->textQuads(textQuads);
372  FloatRect boundingRect;
 372 GraphicsRect boundingRect;
373373 size_t size = textQuads.size();
374374 for (size_t i = 0; i < size; ++i)
375375 boundingRect.unite(textQuads[i].boundingBox());
90929

Source/WebCore/editing/FrameSelection.cpp

3434#include "Element.h"
3535#include "EventHandler.h"
3636#include "ExceptionCode.h"
37 #include "FloatQuad.h"
 37#include "GraphicsQuad.h"
3838#include "FocusController.h"
3939#include "Frame.h"
4040#include "FrameTree.h"

11341134 LayoutRect localRect(rect);
11351135 if (caretPainter->isBox())
11361136 toRenderBox(caretPainter)->flipForWritingMode(localRect);
1137  return caretPainter->localToAbsoluteQuad(FloatRect(localRect)).enclosingBoundingBox();
 1137 return caretPainter->localToAbsoluteQuad(GraphicsRect(localRect)).enclosingBoundingBox();
11381138}
11391139
11401140LayoutRect FrameSelection::absoluteCaretBounds()

17321732 return m_frame->editor()->client()->shouldDeleteRange(selection.toNormalizedRange().get());
17331733}
17341734
1735 FloatRect FrameSelection::bounds(bool clipToVisibleContent) const
 1735GraphicsRect FrameSelection::bounds(bool clipToVisibleContent) const
17361736{
17371737 RenderView* root = m_frame->contentRenderer();
17381738 FrameView* view = m_frame->view();

17431743 return clipToVisibleContent ? intersection(selectionRect, view->visibleContentRect()) : selectionRect;
17441744}
17451745
1746 void FrameSelection::getClippedVisibleTextRectangles(Vector<FloatRect>& rectangles) const
 1746void FrameSelection::getClippedVisibleTextRectangles(Vector<GraphicsRect>& rectangles) const
17471747{
17481748 RenderView* root = m_frame->contentRenderer();
17491749 if (!root)
17501750 return;
17511751
1752  FloatRect visibleContentRect = m_frame->view()->visibleContentRect();
 1752 GraphicsRect visibleContentRect = m_frame->view()->visibleContentRect();
17531753
1754  Vector<FloatQuad> quads;
 1754 Vector<GraphicsQuad> quads;
17551755 toNormalizedRange()->textQuads(quads, true);
17561756
17571757 size_t size = quads.size();
17581758 for (size_t i = 0; i < size; ++i) {
1759  FloatRect intersectionRect = intersection(quads[i].enclosingBoundingBox(), visibleContentRect);
 1759 GraphicsRect intersectionRect = intersection(quads[i].enclosingBoundingBox(), visibleContentRect);
17601760 if (!intersectionRect.isEmpty())
17611761 rectangles.append(intersectionRect);
17621762 }
90929

Source/WebCore/editing/Editor.cpp

27442744 ASSERT(startRenderer);
27452745 IntRect startCaretRect = startRenderer->localCaretRect(startInlineBox, startCaretOffset, &extraWidthToEndOfLine);
27462746 if (startCaretRect != IntRect())
2747  startCaretRect = startRenderer->localToAbsoluteQuad(FloatRect(startCaretRect)).enclosingBoundingBox();
 2747 startCaretRect = startRenderer->localToAbsoluteQuad(GraphicsRect(startCaretRect)).enclosingBoundingBox();
27482748
27492749 InlineBox* endInlineBox;
27502750 int endCaretOffset;

27572757 ASSERT(endRenderer);
27582758 IntRect endCaretRect = endRenderer->localCaretRect(endInlineBox, endCaretOffset);
27592759 if (endCaretRect != IntRect())
2760  endCaretRect = endRenderer->localToAbsoluteQuad(FloatRect(endCaretRect)).enclosingBoundingBox();
 2760 endCaretRect = endRenderer->localToAbsoluteQuad(GraphicsRect(endCaretRect)).enclosingBoundingBox();
27612761
27622762 if (startCaretRect.y() == endCaretRect.y()) {
27632763 // start and end are on the same line
90929

Source/WebCore/editing/FrameSelection.h

233233 void setTypingStyle(PassRefPtr<EditingStyle>);
234234 void clearTypingStyle();
235235
236  FloatRect bounds(bool clipToVisibleContent = true) const;
 236 GraphicsRect bounds(bool clipToVisibleContent = true) const;
237237
238  void getClippedVisibleTextRectangles(Vector<FloatRect>&) const;
 238 void getClippedVisibleTextRectangles(Vector<GraphicsRect>&) const;
239239
240240 HTMLFormElement* currentForm() const;
241241
90929

Source/WebCore/editing/visible_units.cpp

509509{
510510 ASSERT(root);
511511 RenderBlock* containingBlock = root->block();
512  FloatPoint absoluteBlockPoint = containingBlock->localToAbsolute(FloatPoint());
 512 GraphicsPoint absoluteBlockPoint = containingBlock->localToAbsolute(GraphicsPoint());
513513 if (containingBlock->hasOverflowClip())
514514 absoluteBlockPoint -= containingBlock->layer()->scrolledContentOffset();
515515
90929

Source/WebCore/editing/VisiblePosition.cpp

2727#include "VisiblePosition.h"
2828
2929#include "Document.h"
30 #include "FloatQuad.h"
 30#include "GraphicsQuad.h"
3131#include "HTMLElement.h"
3232#include "HTMLNames.h"
3333#include "InlineTextBox.h"

593593 if (localRect.isEmpty() || !renderer)
594594 return IntRect();
595595
596  return renderer->localToAbsoluteQuad(FloatRect(localRect)).enclosingBoundingBox();
 596 return renderer->localToAbsoluteQuad(GraphicsRect(localRect)).enclosingBoundingBox();
597597}
598598
599599int VisiblePosition::lineDirectionPointForBlockDirectionNavigation() const

606606 // This ignores transforms on purpose, for now. Vertical navigation is done
607607 // without consulting transforms, so that 'up' in transformed text is 'up'
608608 // relative to the text, not absolute 'up'.
609  FloatPoint caretPoint = renderer->localToAbsolute(localRect.location());
 609 GraphicsPoint caretPoint = renderer->localToAbsolute(localRect.location());
610610 return renderer->containingBlock()->isHorizontalWritingMode() ? caretPoint.x() : caretPoint.y();
611611}
612612
90929

Source/WebCore/editing/SpellingCorrectionController.h

124124
125125 EditorClient* client();
126126 TextCheckerClient* textChecker();
127  FloatRect windowRectForRange(const Range*) const;
 127 GraphicsRect windowRectForRange(const Range*) const;
128128 void markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand(EditCommand*);
129129
130130 EditorClient* m_client;
90929

Source/WebCore/page/ChromeClient.h

4949 class Element;
5050 class FileChooser;
5151 class FileIconLoader;
52  class FloatRect;
 52 class GraphicsRect;
5353 class Frame;
5454 class Geolocation;
5555 class GraphicsLayer;

7979 public:
8080 virtual void chromeDestroyed() = 0;
8181
82  virtual void setWindowRect(const FloatRect&) = 0;
83  virtual FloatRect windowRect() = 0;
 82 virtual void setWindowRect(const GraphicsRect&) = 0;
 83 virtual GraphicsRect windowRect() = 0;
8484
85  virtual FloatRect pageRect() = 0;
 85 virtual GraphicsRect pageRect() = 0;
8686
8787 virtual float scaleFactor() = 0;
8888

209209
210210 virtual void populateVisitedLinks();
211211
212  virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect);
213  virtual void paintCustomHighlight(Node*, const AtomicString& type, const FloatRect& boxRect, const FloatRect& lineRect,
 212 virtual GraphicsRect customHighlightRect(Node*, const AtomicString& type, const GraphicsRect& lineRect);
 213 virtual void paintCustomHighlight(Node*, const AtomicString& type, const GraphicsRect& boxRect, const GraphicsRect& lineRect,
214214 bool behindText, bool entireLine);
215215
216216 virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename);
217217 virtual String generateReplacementFile(const String& path);
218218
219  virtual bool paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize,
 219 virtual bool paintCustomScrollbar(GraphicsContext*, const GraphicsRect&, ScrollbarControlSize,
220220 ScrollbarControlState, ScrollbarPart pressedPart, bool vertical,
221221 float value, float proportion, ScrollbarControlPartMask);
222  virtual bool paintCustomScrollCorner(GraphicsContext*, const FloatRect&);
 222 virtual bool paintCustomScrollCorner(GraphicsContext*, const GraphicsRect&);
223223
224224 virtual bool paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&);
225225
90929

Source/WebCore/page/DragController.cpp

4040#include "EditorClient.h"
4141#include "Element.h"
4242#include "EventHandler.h"
43 #include "FloatRect.h"
 43#include "GraphicsRect.h"
4444#include "Frame.h"
4545#include "FrameLoader.h"
4646#include "FrameSelection.h"

267267{
268268 Frame* frame = documentUnderMouse->frame();
269269 float zoomFactor = frame ? frame->pageZoomFactor() : 1;
270  IntPoint point = roundedIntPoint(FloatPoint(p.x() * zoomFactor, p.y() * zoomFactor));
 270 IntPoint point = roundedIntPoint(GraphicsPoint(p.x() * zoomFactor, p.y() * zoomFactor));
271271
272272 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active);
273273 HitTestResult result(point);
90929

Source/WebCore/page/Chrome.h

3838 class ChromeClient;
3939 class FileChooser;
4040 class FileIconLoader;
41  class FloatRect;
 41 class GraphicsRect;
4242 class Frame;
4343 class Geolocation;
4444 class HitTestResult;

8787 void contentsSizeChanged(Frame*, const IntSize&) const;
8888 void layoutUpdated(Frame*) const;
8989
90  void setWindowRect(const FloatRect&) const;
91  FloatRect windowRect() const;
 90 void setWindowRect(const GraphicsRect&) const;
 91 GraphicsRect windowRect() const;
9292
93  FloatRect pageRect() const;
 93 GraphicsRect pageRect() const;
9494
9595 float scaleFactor();
9696
90929

Source/WebCore/page/FrameView.cpp

3535#include "ChromeClient.h"
3636#include "DocumentMarkerController.h"
3737#include "EventHandler.h"
38 #include "FloatRect.h"
 38#include "GraphicsRect.h"
3939#include "FocusController.h"
4040#include "FontCache.h"
4141#include "Frame.h"

26102610 layout(allowSubtree);
26112611}
26122612
2613 void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximumShrinkFactor, AdjustViewSizeOrNot shouldAdjustViewSize)
 2613void FrameView::forceLayoutForPagination(const GraphicsSize& pageSize, float maximumShrinkFactor, AdjustViewSizeOrNot shouldAdjustViewSize)
26142614{
26152615 // Dumping externalRepresentation(m_frame->renderer()).ascii() is a good trick to see
26162616 // the state of things before and after the layout

26772677
26782678IntRect FrameView::convertFromRenderer(const RenderObject* renderer, const IntRect& rendererRect) const
26792679{
2680  IntRect rect = renderer->localToAbsoluteQuad(FloatRect(rendererRect)).enclosingBoundingBox();
 2680 IntRect rect = renderer->localToAbsoluteQuad(GraphicsRect(rendererRect)).enclosingBoundingBox();
26812681
26822682 // Convert from page ("absolute") to FrameView coordinates.
26832683 rect.moveBy(-scrollPosition());
90929

Source/WebCore/page/PrintContext.h

2828
2929class Element;
3030class Frame;
31 class FloatRect;
32 class FloatSize;
 31class GraphicsRect;
 32class GraphicsSize;
3333class GraphicsContext;
3434class IntRect;
3535

4343 // Break up a page into rects without relayout.
4444 // FIXME: This means that CSS page breaks won't be on page boundary if the size is different than what was passed to begin(). That's probably not always desirable.
4545 // FIXME: Header and footer height should be applied before layout, not after.
46  // FIXME: The printRect argument is only used to determine page aspect ratio, it would be better to pass a FloatSize with page dimensions instead.
47  void computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalTiling = false);
 46 // FIXME: The printRect argument is only used to determine page aspect ratio, it would be better to pass a GraphicsSize with page dimensions instead.
 47 void computePageRects(const GraphicsRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalTiling = false);
4848
4949 // Deprecated. Page size computation is already in this class, clients shouldn't be copying it.
50  void computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool allowHorizontalTiling);
 50 void computePageRectsWithPageSize(const GraphicsSize& pageSizeInPixels, bool allowHorizontalTiling);
5151
5252 // These are only valid after page rects are computed.
5353 size_t pageCount() const { return m_pageRects.size(); }
5454 const IntRect& pageRect(size_t pageNumber) const { return m_pageRects[pageNumber]; }
5555 const Vector<IntRect>& pageRects() const { return m_pageRects; }
5656
57  float computeAutomaticScaleFactor(const FloatSize& availablePaperSize);
 57 float computeAutomaticScaleFactor(const GraphicsSize& availablePaperSize);
5858
5959 // Enter print mode, updating layout for new page size.
6060 // This function can be called multiple times to apply new print options without going back to screen mode.

6969 void end();
7070
7171 // Used by layout tests.
72  static int pageNumberForElement(Element*, const FloatSize& pageSizeInPixels); // Returns -1 if page isn't found.
 72 static int pageNumberForElement(Element*, const GraphicsSize& pageSizeInPixels); // Returns -1 if page isn't found.
7373 static String pageProperty(Frame* frame, const char* propertyName, int pageNumber);
7474 static bool isPageBoxVisible(Frame* frame, int pageNumber);
7575 static String pageSizeAndMarginsInPixels(Frame* frame, int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
76  static int numberOfPages(Frame*, const FloatSize& pageSizeInPixels);
 76 static int numberOfPages(Frame*, const GraphicsSize& pageSizeInPixels);
7777 // Draw all pages into a graphics context with lines which mean page boundaries.
7878 // The height of the graphics context should be
7979 // (pageSizeInPixels.height() + 1) * number-of-pages - 1
80  static void spoolAllPagesWithBoundaries(Frame*, GraphicsContext&, const FloatSize& pageSizeInPixels);
 80 static void spoolAllPagesWithBoundaries(Frame*, GraphicsContext&, const GraphicsSize& pageSizeInPixels);
8181
8282protected:
8383 Frame* m_frame;
8484 Vector<IntRect> m_pageRects;
8585
8686private:
87  void computePageRectsWithPageSizeInternal(const FloatSize& pageSizeInPixels, bool allowHorizontalTiling);
 87 void computePageRectsWithPageSizeInternal(const GraphicsSize& pageSizeInPixels, bool allowHorizontalTiling);
8888
8989 // Used to prevent misuses of begin() and end() (e.g., call end without begin).
9090 bool m_isPrinting;
90929

Source/WebCore/page/WindowFeatures.cpp

2323#include "config.h"
2424#include "WindowFeatures.h"
2525
26 #include "FloatRect.h"
 26#include "GraphicsRect.h"
2727#include "PlatformString.h"
2828#include <wtf/Assertions.h>
2929#include <wtf/MathExtras.h>

161161 additionalFeatures.append(keyString);
162162}
163163
164 WindowFeatures::WindowFeatures(const String& dialogFeaturesString, const FloatRect& screenAvailableRect)
 164WindowFeatures::WindowFeatures(const String& dialogFeaturesString, const GraphicsRect& screenAvailableRect)
165165 : widthSet(true)
166166 , heightSet(true)
167167 , menuBarVisible(false)
90929

Source/WebCore/page/EventHandler.h

5353class Cursor;
5454class Event;
5555class EventTarget;
56 class FloatPoint;
57 class FloatQuad;
 56class GraphicsPoint;
 57class GraphicsQuad;
5858class Frame;
5959class HTMLFrameSetElement;
6060class HitTestRequest;

116116 void updateAutoscrollRenderer();
117117
118118 void dispatchFakeMouseMoveEventSoon();
119  void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&);
 119 void dispatchFakeMouseMoveEventSoonInQuad(const GraphicsQuad&);
120120
121121 HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false,
122122 HitTestScrollbars scrollbars = DontHitTestScrollbars,

291291
292292 bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent&);
293293
294  bool dragHysteresisExceeded(const FloatPoint&) const;
 294 bool dragHysteresisExceeded(const GraphicsPoint&) const;
295295 bool dragHysteresisExceeded(const IntPoint&) const;
296296#endif // ENABLE(DRAG_SUPPORT)
297297
90929

Source/WebCore/page/WindowFeatures.h

3434
3535namespace WebCore {
3636
37  class FloatRect;
 37 class GraphicsRect;
3838
3939 struct WindowFeatures {
4040 // FIXME: We can delete this constructor once V8 showModalDialog is changed to use DOMWindow.

5555 }
5656
5757 WindowFeatures(const String& windowFeaturesString);
58  WindowFeatures(const String& dialogFeaturesString, const FloatRect& screenAvailableRect);
 58 WindowFeatures(const String& dialogFeaturesString, const GraphicsRect& screenAvailableRect);
5959
6060 float x;
6161 bool xSet;
90929

Source/WebCore/page/EventHandler.cpp

3939#include "Editor.h"
4040#include "EventNames.h"
4141#include "EventQueue.h"
42 #include "FloatPoint.h"
43 #include "FloatRect.h"
 42#include "GraphicsPoint.h"
 43#include "GraphicsRect.h"
4444#include "FocusController.h"
4545#include "Frame.h"
4646#include "FrameLoader.h"

659659 if (!editableElement->renderer())
660660 return VisiblePosition();
661661
662  FloatPoint absolutePoint = targetNode->renderer()->localToAbsolute(FloatPoint(selectionEndPoint));
 662 GraphicsPoint absolutePoint = targetNode->renderer()->localToAbsolute(GraphicsPoint(selectionEndPoint));
663663 selectionEndPoint = roundedIntPoint(editableElement->renderer()->absoluteToLocal(absolutePoint));
664664 targetNode = editableElement;
665665 }

23542354 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveInterval);
23552355}
23562356
2357 void EventHandler::dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad)
 2357void EventHandler::dispatchFakeMouseMoveEventSoonInQuad(const GraphicsQuad& quad)
23582358{
23592359 FrameView* view = m_frame->view();
23602360 if (!view)

26842684}
26852685
26862686#if ENABLE(DRAG_SUPPORT)
2687 bool EventHandler::dragHysteresisExceeded(const FloatPoint& floatDragViewportLocation) const
 2687bool EventHandler::dragHysteresisExceeded(const GraphicsPoint& floatDragViewportLocation) const
26882688{
26892689 IntPoint dragViewportLocation((int)floatDragViewportLocation.x(), (int)floatDragViewportLocation.y());
26902690 return dragHysteresisExceeded(dragViewportLocation);

28472847 if (dragState().m_dragType == DragSourceActionDHTML) {
28482848 if (RenderObject* renderer = dragState().m_dragSrc->renderer()) {
28492849 // FIXME: This doesn't work correctly with transforms.
2850  FloatPoint absPos = renderer->localToAbsolute();
 2850 GraphicsPoint absPos = renderer->localToAbsolute();
28512851 IntSize delta = m_mouseDownPos - roundedIntPoint(absPos);
28522852 dragState().m_dragClipboard->setDragImageElement(dragState().m_dragSrc.get(), toPoint(delta));
28532853 } else {
90929

Source/WebCore/page/EditorClient.h

2929
3030#include "SpellingCorrectionController.h"
3131#include "EditorInsertAction.h"
32 #include "FloatRect.h"
 32#include "GraphicsRect.h"
3333#include "TextAffinity.h"
3434#include <wtf/Forward.h>
3535#include <wtf/Vector.h>

156156 };
157157
158158#if USE(AUTOCORRECTION_PANEL)
159  virtual void showCorrectionPanel(CorrectionPanelInfo::PanelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacmentString, const Vector<String>& alternativeReplacementStrings) = 0;
 159 virtual void showCorrectionPanel(CorrectionPanelInfo::PanelType, const GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacmentString, const Vector<String>& alternativeReplacementStrings) = 0;
160160 virtual void dismissCorrectionPanel(ReasonForDismissingCorrectionPanel) = 0;
161161 virtual String dismissCorrectionPanelSoon(ReasonForDismissingCorrectionPanel) = 0;
162162 virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const String& replacedString, const String& replacementString) = 0;
90929

Source/WebCore/page/Frame.cpp

4343#include "EditingText.h"
4444#include "EditorClient.h"
4545#include "EventNames.h"
46 #include "FloatQuad.h"
 46#include "GraphicsQuad.h"
4747#include "FocusController.h"
4848#include "FrameLoader.h"
4949#include "FrameLoaderClient.h"

548548 return view()->baseBackgroundColor().blend(htmlBackgroundColor).blend(bodyBackgroundColor);
549549}
550550
551 void Frame::setPrinting(bool printing, const FloatSize& pageSize, float maximumShrinkRatio, AdjustViewSizeOrNot shouldAdjustViewSize)
 551void Frame::setPrinting(bool printing, const GraphicsSize& pageSize, float maximumShrinkRatio, AdjustViewSizeOrNot shouldAdjustViewSize)
552552{
553553 // In setting printing, we should not validate resources already cached for the document.
554554 // See https://bugs.webkit.org/show_bug.cgi?id=43704

571571 child->setPrinting(printing, IntSize(), 0, shouldAdjustViewSize);
572572}
573573
574 FloatSize Frame::resizePageRectsKeepingRatio(const FloatSize& originalSize, const FloatSize& expectedSize)
 574GraphicsSize Frame::resizePageRectsKeepingRatio(const GraphicsSize& originalSize, const GraphicsSize& expectedSize)
575575{
576  FloatSize resultSize;
 576 GraphicsSize resultSize;
577577 if (!contentRenderer())
578  return FloatSize();
 578 return GraphicsSize();
579579
580580 if (contentRenderer()->style()->isHorizontalWritingMode()) {
581581 float ratio = originalSize.height() / originalSize.width();
90929

Source/WebCore/page/chromium/EventHandlerChromium.cpp

3030#include "ChromiumDataObject.h"
3131#include "ClipboardChromium.h"
3232#include "Cursor.h"
33 #include "FloatPoint.h"
3433#include "FocusController.h"
3534#include "Frame.h"
3635#include "FrameSelection.h"
90929

Source/WebCore/page/DOMWindow.h

4848 class ErrorCallback;
4949 class EventListener;
5050 class FileSystemCallback;
51  class FloatRect;
 51 class GraphicsRect;
5252 class Frame;
5353 class History;
5454 class IDBFactory;

106106 static bool dispatchAllPendingBeforeUnloadEvents();
107107 static void dispatchAllPendingUnloadEvents();
108108
109  static void adjustWindowRect(const FloatRect& screen, FloatRect& window, const FloatRect& pendingChanges);
 109 static void adjustWindowRect(const GraphicsRect& screen, GraphicsRect& window, const GraphicsRect& pendingChanges);
110110
111111 // FIXME: We can remove this function once V8 showModalDialog is changed to use DOMWindow.
112112 static void parseModalDialogFeatures(const String&, HashMap<String, String>&);
90929

Source/WebCore/page/FrameView.h

3737
3838class Color;
3939class Event;
40 class FloatSize;
 40class GraphicsSize;
4141class Frame;
4242class FrameActionScheduler;
4343class IntRect;

232232 void setIsVisuallyNonEmpty() { m_isVisuallyNonEmpty = true; }
233233
234234 void forceLayout(bool allowSubtree = false);
235  void forceLayoutForPagination(const FloatSize& pageSize, float maximumShrinkFactor, AdjustViewSizeOrNot);
 235 void forceLayoutForPagination(const GraphicsSize& pageSize, float maximumShrinkFactor, AdjustViewSizeOrNot);
236236
237237 // FIXME: This method is retained because of embedded WebViews in AppKit. When a WebView is embedded inside
238238 // some enclosing view with auto-pagination, no call happens to resize the view. The new pagination model
90929

Source/WebCore/page/Frame.h

147147
148148 Settings* settings() const; // can be NULL
149149
150  void setPrinting(bool printing, const FloatSize& pageSize, float maximumShrinkRatio, AdjustViewSizeOrNot);
151  FloatSize resizePageRectsKeepingRatio(const FloatSize& originalSize, const FloatSize& expectedSize);
 150 void setPrinting(bool printing, const GraphicsSize& pageSize, float maximumShrinkRatio, AdjustViewSizeOrNot);
 151 GraphicsSize resizePageRectsKeepingRatio(const GraphicsSize& originalSize, const GraphicsSize& expectedSize);
152152
153153 bool inViewSourceMode() const;
154154 void setInViewSourceMode(bool = true);
90929

Source/WebCore/page/DOMWindow.cpp

5656#include "EventListener.h"
5757#include "EventNames.h"
5858#include "ExceptionCode.h"
59 #include "FloatRect.h"
 59#include "GraphicsRect.h"
6060#include "Frame.h"
6161#include "FrameLoadRequest.h"
6262#include "FrameLoader.h"

320320// screen rect.
321321// 5) Translate the window rect coordinates to be within the coordinate space of
322322// the screen rect.
323 void DOMWindow::adjustWindowRect(const FloatRect& screen, FloatRect& window, const FloatRect& pendingChanges)
 323void DOMWindow::adjustWindowRect(const GraphicsRect& screen, GraphicsRect& window, const GraphicsRect& pendingChanges)
324324{
325325 // Make sure we're in a valid state before adjusting dimensions.
326326 ASSERT(isfinite(screen.x()));

343343 window.setHeight(pendingChanges.height());
344344
345345 // Resize the window to between 100 and the screen width and height.
346  window.setWidth(min(max(100.0f, window.width()), screen.width()));
347  window.setHeight(min(max(100.0f, window.height()), screen.height()));
 346 window.setWidth(min(max<GraphicsUnit>(100.0f, window.width()), screen.width()));
 347 window.setHeight(min(max<GraphicsUnit>(100.0f, window.height()), screen.height()));
348348
349349 // Constrain the window position to the screen.
350350 window.setX(max(screen.x(), min(window.x(), screen.maxX() - window.width())));

13151315
13161316 m_frame->document()->updateLayoutIgnorePendingStylesheets();
13171317
1318  FloatPoint pagePoint(p->x(), p->y());
 1318 GraphicsPoint pagePoint(p->x(), p->y());
13191319 pagePoint = node->convertToPage(pagePoint);
13201320 return WebKitPoint::create(pagePoint.x(), pagePoint.y());
13211321}

13271327
13281328 m_frame->document()->updateLayoutIgnorePendingStylesheets();
13291329
1330  FloatPoint nodePoint(p->x(), p->y());
 1330 GraphicsPoint nodePoint(p->x(), p->y());
13311331 nodePoint = node->convertFromPage(nodePoint);
13321332 return WebKitPoint::create(nodePoint.x(), nodePoint.y());
13331333}

14001400 if (m_frame != page->mainFrame())
14011401 return;
14021402
1403  FloatRect fr = page->chrome()->windowRect();
1404  FloatRect update = fr;
 1403 GraphicsRect fr = page->chrome()->windowRect();
 1404 GraphicsRect update = fr;
14051405 update.move(x, y);
14061406 // Security check (the spec talks about UniversalBrowserWrite to disable this check...)
14071407 adjustWindowRect(screenAvailableRect(page->mainFrame()->view()), fr, update);

14201420 if (m_frame != page->mainFrame())
14211421 return;
14221422
1423  FloatRect fr = page->chrome()->windowRect();
1424  FloatRect sr = screenAvailableRect(page->mainFrame()->view());
 1423 GraphicsRect fr = page->chrome()->windowRect();
 1424 GraphicsRect sr = screenAvailableRect(page->mainFrame()->view());
14251425 fr.setLocation(sr.location());
1426  FloatRect update = fr;
 1426 GraphicsRect update = fr;
14271427 update.move(x, y);
14281428 // Security check (the spec talks about UniversalBrowserWrite to disable this check...)
14291429 adjustWindowRect(sr, fr, update);

14421442 if (m_frame != page->mainFrame())
14431443 return;
14441444
1445  FloatRect fr = page->chrome()->windowRect();
1446  FloatSize dest = fr.size() + FloatSize(x, y);
1447  FloatRect update(fr.location(), dest);
 1445 GraphicsRect fr = page->chrome()->windowRect();
 1446 GraphicsSize dest = fr.size() + GraphicsSize(x, y);
 1447 GraphicsRect update(fr.location(), dest);
14481448 adjustWindowRect(screenAvailableRect(page->mainFrame()->view()), fr, update);
14491449 page->chrome()->setWindowRect(fr);
14501450}

14611461 if (m_frame != page->mainFrame())
14621462 return;
14631463
1464  FloatRect fr = page->chrome()->windowRect();
1465  FloatSize dest = FloatSize(width, height);
1466  FloatRect update(fr.location(), dest);
 1464 GraphicsRect fr = page->chrome()->windowRect();
 1465 GraphicsSize dest = GraphicsSize(width, height);
 1466 GraphicsRect update(fr.location(), dest);
14671467 adjustWindowRect(screenAvailableRect(page->mainFrame()->view()), fr, update);
14681468 page->chrome()->setWindowRect(fr);
14691469}

18261826 }
18271827
18281828 WindowFeatures windowFeatures(windowFeaturesString);
1829  FloatRect windowRect(windowFeatures.xSet ? windowFeatures.x : 0, windowFeatures.ySet ? windowFeatures.y : 0,
 1829 GraphicsRect windowRect(windowFeatures.xSet ? windowFeatures.x : 0, windowFeatures.ySet ? windowFeatures.y : 0,
18301830 windowFeatures.widthSet ? windowFeatures.width : 0, windowFeatures.heightSet ? windowFeatures.height : 0);
18311831 Page* page = m_frame->page();
18321832 DOMWindow::adjustWindowRect(screenAvailableRect(page ? page->mainFrame()->view() : 0), windowRect, windowRect);
90929

Source/WebCore/page/Chrome.cpp

2727#include "FileIconLoader.h"
2828#include "FileChooser.h"
2929#include "FileList.h"
30 #include "FloatRect.h"
 30#include "GraphicsRect.h"
3131#include "Frame.h"
3232#include "FrameTree.h"
3333#include "Geolocation.h"

132132 m_client->scrollbarsModeDidChange();
133133}
134134
135 void Chrome::setWindowRect(const FloatRect& rect) const
 135void Chrome::setWindowRect(const GraphicsRect& rect) const
136136{
137137 m_client->setWindowRect(rect);
138138}
139139
140 FloatRect Chrome::windowRect() const
 140GraphicsRect Chrome::windowRect() const
141141{
142142 return m_client->windowRect();
143143}
144144
145 FloatRect Chrome::pageRect() const
 145GraphicsRect Chrome::pageRect() const
146146{
147147 return m_client->pageRect();
148148}

513513{
514514}
515515
516 FloatRect ChromeClient::customHighlightRect(Node*, const AtomicString&, const FloatRect&)
 516GraphicsRect ChromeClient::customHighlightRect(Node*, const AtomicString&, const GraphicsRect&)
517517{
518  return FloatRect();
 518 return GraphicsRect();
519519}
520520
521 void ChromeClient::paintCustomHighlight(Node*, const AtomicString&, const FloatRect&, const FloatRect&, bool, bool)
 521void ChromeClient::paintCustomHighlight(Node*, const AtomicString&, const GraphicsRect&, const GraphicsRect&, bool, bool)
522522{
523523}
524524

533533 return String();
534534}
535535
536 bool ChromeClient::paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize,
 536bool ChromeClient::paintCustomScrollbar(GraphicsContext*, const GraphicsRect&, ScrollbarControlSize,
537537 ScrollbarControlState, ScrollbarPart, bool,
538538 float, float, ScrollbarControlPartMask)
539539{
540540 return false;
541541}
542542
543 bool ChromeClient::paintCustomScrollCorner(GraphicsContext*, const FloatRect&)
 543bool ChromeClient::paintCustomScrollCorner(GraphicsContext*, const GraphicsRect&)
544544{
545545 return false;
546546}
90929

Source/WebCore/page/Screen.cpp

3030#include "config.h"
3131#include "Screen.h"
3232
33 #include "FloatRect.h"
 33#include "GraphicsRect.h"
3434#include "Frame.h"
3535#include "FrameView.h"
3636#include "PlatformScreen.h"
90929

Source/WebCore/page/PrintContext.cpp

5555 end();
5656}
5757
58 void PrintContext::computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalTiling)
 58void PrintContext::computePageRects(const GraphicsRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalTiling)
5959{
6060 m_pageRects.clear();
6161 outPageHeight = 0;

7070
7171 RenderView* view = toRenderView(m_frame->document()->renderer());
7272 const IntRect& documentRect = view->documentRect();
73  FloatSize pageSize = m_frame->resizePageRectsKeepingRatio(FloatSize(printRect.width(), printRect.height()), FloatSize(documentRect.width(), documentRect.height()));
 73 GraphicsSize pageSize = m_frame->resizePageRectsKeepingRatio(GraphicsSize(printRect.width(), printRect.height()), GraphicsSize(documentRect.width(), documentRect.height()));
7474 float pageWidth = pageSize.width();
7575 float pageHeight = pageSize.height();
7676

8282 return;
8383 }
8484
85  computePageRectsWithPageSizeInternal(FloatSize(pageWidth / userScaleFactor, pageHeight / userScaleFactor), allowHorizontalTiling);
 85 computePageRectsWithPageSizeInternal(GraphicsSize(pageWidth / userScaleFactor, pageHeight / userScaleFactor), allowHorizontalTiling);
8686}
8787
88 void PrintContext::computePageRectsWithPageSize(const FloatSize& pageSizeInPixels, bool allowHorizontalTiling)
 88void PrintContext::computePageRectsWithPageSize(const GraphicsSize& pageSizeInPixels, bool allowHorizontalTiling)
8989{
9090 m_pageRects.clear();
9191 computePageRectsWithPageSizeInternal(pageSizeInPixels, allowHorizontalTiling);
9292}
9393
94 void PrintContext::computePageRectsWithPageSizeInternal(const FloatSize& pageSizeInPixels, bool allowInlineDirectionTiling)
 94void PrintContext::computePageRectsWithPageSizeInternal(const GraphicsSize& pageSizeInPixels, bool allowInlineDirectionTiling)
9595{
9696 if (!m_frame->document() || !m_frame->view() || !m_frame->document()->renderer())
9797 return;

165165 // This function can be called multiple times to adjust printing parameters without going back to screen mode.
166166 m_isPrinting = true;
167167
168  FloatSize minLayoutSize = m_frame->resizePageRectsKeepingRatio(FloatSize(width, height), FloatSize(width * printingMinimumShrinkFactor, height * printingMinimumShrinkFactor));
 168 GraphicsSize minLayoutSize = m_frame->resizePageRectsKeepingRatio(GraphicsSize(width, height), GraphicsSize(width * printingMinimumShrinkFactor, height * printingMinimumShrinkFactor));
169169
170170 // This changes layout, so callers need to make sure that they don't paint to screen while in printing mode.
171171 m_frame->setPrinting(true, minLayoutSize, printingMaximumShrinkFactor / printingMinimumShrinkFactor, AdjustViewSize);
172172}
173173
174 float PrintContext::computeAutomaticScaleFactor(const FloatSize& availablePaperSize)
 174float PrintContext::computeAutomaticScaleFactor(const GraphicsSize& availablePaperSize)
175175{
176176 if (!m_frame->view())
177177 return 1;

196196 float scale = width / pageRect.width();
197197
198198 ctx.save();
199  ctx.scale(FloatSize(scale, scale));
 199 ctx.scale(GraphicsSize(scale, scale));
200200 ctx.translate(-pageRect.x(), -pageRect.y());
201201 ctx.clip(pageRect);
202202 m_frame->view()->paintContents(&ctx, pageRect);

217217{
218218 ASSERT(m_isPrinting);
219219 m_isPrinting = false;
220  m_frame->setPrinting(false, FloatSize(), 0, AdjustViewSize);
 220 m_frame->setPrinting(false, GraphicsSize(), 0, AdjustViewSize);
221221}
222222
223223static RenderBoxModelObject* enclosingBoxModelObject(RenderObject* object)

230230 return toRenderBoxModelObject(object);
231231}
232232
233 int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSizeInPixels)
 233int PrintContext::pageNumberForElement(Element* element, const GraphicsSize& pageSizeInPixels)
234234{
235235 // Make sure the element is not freed during the layout.
236236 RefPtr<Element> elementRef(element);

241241 return -1;
242242
243243 Frame* frame = element->document()->frame();
244  FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels);
 244 GraphicsRect pageRect(GraphicsPoint(0, 0), pageSizeInPixels);
245245 PrintContext printContext(frame);
246246 printContext.begin(pageRect.width(), pageRect.height());
247  FloatSize scaledPageSize = pageSizeInPixels;
 247 GraphicsSize scaledPageSize = pageSizeInPixels;
248248 scaledPageSize.scale(frame->view()->contentsSize().width() / pageRect.width());
249249 printContext.computePageRectsWithPageSize(scaledPageSize, false);
250250

299299 String::number(marginTop) + ' ' + String::number(marginRight) + ' ' + String::number(marginBottom) + ' ' + String::number(marginLeft);
300300}
301301
302 int PrintContext::numberOfPages(Frame* frame, const FloatSize& pageSizeInPixels)
 302int PrintContext::numberOfPages(Frame* frame, const GraphicsSize& pageSizeInPixels)
303303{
304304 frame->document()->updateLayout();
305305
306  FloatRect pageRect(FloatPoint(0, 0), pageSizeInPixels);
 306 GraphicsRect pageRect(GraphicsPoint(0, 0), pageSizeInPixels);
307307 PrintContext printContext(frame);
308308 printContext.begin(pageRect.width(), pageRect.height());
309309 // Account for shrink-to-fit.
310  FloatSize scaledPageSize = pageSizeInPixels;
 310 GraphicsSize scaledPageSize = pageSizeInPixels;
311311 scaledPageSize.scale(frame->view()->contentsSize().width() / pageRect.width());
312312 printContext.computePageRectsWithPageSize(scaledPageSize, false);
313313 return printContext.pageCount();
314314}
315315
316 void PrintContext::spoolAllPagesWithBoundaries(Frame* frame, GraphicsContext& graphicsContext, const FloatSize& pageSizeInPixels)
 316void PrintContext::spoolAllPagesWithBoundaries(Frame* frame, GraphicsContext& graphicsContext, const GraphicsSize& pageSizeInPixels)
317317{
318318 if (!frame->document() || !frame->view() || !frame->document()->renderer())
319319 return;

324324 printContext.begin(pageSizeInPixels.width(), pageSizeInPixels.height());
325325
326326 float pageHeight;
327  printContext.computePageRects(FloatRect(FloatPoint(0, 0), pageSizeInPixels), 0, 0, 1, pageHeight);
 327 printContext.computePageRects(GraphicsRect(GraphicsPoint(0, 0), pageSizeInPixels), 0, 0, 1, pageHeight);
328328
329329 const float pageWidth = pageSizeInPixels.width();
330330 const Vector<IntRect>& pageRects = printContext.pageRects();

332332
333333 // Fill the whole background by white.
334334 graphicsContext.setFillColor(Color(255, 255, 255), ColorSpaceDeviceRGB);
335  graphicsContext.fillRect(FloatRect(0, 0, pageWidth, totalHeight));
 335 graphicsContext.fillRect(GraphicsRect(0, 0, pageWidth, totalHeight));
336336
337337 graphicsContext.save();
338338 graphicsContext.translate(0, totalHeight);
339  graphicsContext.scale(FloatSize(1, -1));
 339 graphicsContext.scale(GraphicsSize(1, -1));
340340
341341 int currentHeight = 0;
342342 for (size_t pageIndex = 0; pageIndex < pageRects.size(); pageIndex++) {
90929

Source/WebCore/platform/ScrollableArea.h

3232
3333namespace WebCore {
3434
35 class FloatPoint;
 35class GraphicsPoint;
3636class GraphicsContext;
3737class PlatformGestureEvent;
3838class PlatformWheelEvent;

4747 virtual ~ScrollableArea();
4848
4949 bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1);
50  void scrollToOffsetWithoutAnimation(const FloatPoint&);
 50 void scrollToOffsetWithoutAnimation(const GraphicsPoint&);
5151 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset);
5252 void scrollToXOffsetWithoutAnimation(float x);
5353 void scrollToYOffsetWithoutAnimation(float x);
90929

Source/WebCore/platform/ScrollableArea.cpp

3434
3535#include "GraphicsContext.h"
3636#include "GraphicsLayer.h"
37 #include "FloatPoint.h"
 37#include "GraphicsPoint.h"
3838#include "PlatformWheelEvent.h"
3939#include "ScrollAnimator.h"
4040#include "ScrollbarTheme.h"

9999 return scrollAnimator()->scroll(orientation, granularity, step, multiplier);
100100}
101101
102 void ScrollableArea::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
 102void ScrollableArea::scrollToOffsetWithoutAnimation(const GraphicsPoint& offset)
103103{
104104 scrollAnimator()->scrollToOffsetWithoutAnimation(offset);
105105}

114114
115115void ScrollableArea::scrollToXOffsetWithoutAnimation(float x)
116116{
117  scrollToOffsetWithoutAnimation(FloatPoint(x, scrollAnimator()->currentPosition().y()));
 117 scrollToOffsetWithoutAnimation(GraphicsPoint(x, scrollAnimator()->currentPosition().y()));
118118}
119119
120120void ScrollableArea::scrollToYOffsetWithoutAnimation(float y)
121121{
122  scrollToOffsetWithoutAnimation(FloatPoint(scrollAnimator()->currentPosition().x(), y));
 122 scrollToOffsetWithoutAnimation(GraphicsPoint(scrollAnimator()->currentPosition().x(), y));
123123}
124124
125125void ScrollableArea::handleWheelEvent(PlatformWheelEvent& wheelEvent)
90929

Source/WebCore/platform/graphics/GraphicsContext.h

2929
3030#include "ColorSpace.h"
3131#include "DashArray.h"
32 #include "FloatRect.h"
 32#include "GraphicsRect.h"
3333#include "Gradient.h"
3434#include "Image.h"
3535#include "Path.h"

184184 RefPtr<Gradient> fillGradient;
185185 RefPtr<Pattern> fillPattern;
186186
187  FloatSize shadowOffset;
 187 GraphicsSize shadowOffset;
188188
189189 float strokeThickness;
190190 float shadowBlur;

285285 void drawRect(const IntRect&);
286286 void drawLine(const IntPoint&, const IntPoint&);
287287 void drawEllipse(const IntRect&);
288  void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntialias = false);
 288 void drawConvexPolygon(size_t numPoints, const GraphicsPoint*, bool shouldAntialias = false);
289289
290290 void fillPath(const Path&);
291291 void strokePath(const Path&);

293293 // Arc drawing (used by border-radius in CSS) just supports stroking at the moment.
294294 void strokeArc(const IntRect&, int startAngle, int angleSpan);
295295
296  void fillRect(const FloatRect&);
297  void fillRect(const FloatRect&, const Color&, ColorSpace);
298  void fillRect(const FloatRect&, Generator&);
299  void fillRect(const FloatRect&, const Color&, ColorSpace, CompositeOperator);
 296 void fillRect(const GraphicsRect&);
 297 void fillRect(const GraphicsRect&, const Color&, ColorSpace);
 298 void fillRect(const GraphicsRect&, Generator&);
 299 void fillRect(const GraphicsRect&, const Color&, ColorSpace, CompositeOperator);
300300 void fillRoundedRect(const IntRect&, const IntSize& topLeft, const IntSize& topRight, const IntSize& bottomLeft, const IntSize& bottomRight, const Color&, ColorSpace);
301301 void fillRoundedRect(const RoundedRect&, const Color&, ColorSpace);
302302 void fillRectWithRoundedHole(const IntRect&, const RoundedRect& roundedHoleRect, const Color&, ColorSpace);
303303
304  void clearRect(const FloatRect&);
 304 void clearRect(const GraphicsRect&);
305305
306  void strokeRect(const FloatRect&, float lineWidth);
 306 void strokeRect(const GraphicsRect&, float lineWidth);
307307
308308 void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint&, CompositeOperator = CompositeSourceOver);
309309 void drawImage(Image*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
310310 void drawImage(Image*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver);
311311 void drawImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
312  void drawImage(Image*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1),
 312 void drawImage(Image*, ColorSpace styleColorSpace, const GraphicsRect& destRect, const GraphicsRect& srcRect = GraphicsRect(0, 0, -1, -1),
313313 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
314314 void drawTiledImage(Image*, ColorSpace styleColorSpace, const IntRect& destRect, const IntPoint& srcPoint, const IntSize& tileSize,
315315 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);

321321 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect&, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
322322 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntPoint& destPoint, const IntRect& srcRect, CompositeOperator = CompositeSourceOver);
323323 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const IntRect& destRect, const IntRect& srcRect, CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
324  void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1),
 324 void drawImageBuffer(ImageBuffer*, ColorSpace styleColorSpace, const GraphicsRect& destRect, const GraphicsRect& srcRect = GraphicsRect(0, 0, -1, -1),
325325 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
326326
327327 void setImageInterpolationQuality(InterpolationQuality);
328328 InterpolationQuality imageInterpolationQuality() const;
329329
330330 void clip(const IntRect&);
331  void clip(const FloatRect&);
 331 void clip(const GraphicsRect&);
332332 void addRoundedRectClip(const RoundedRect&);
333333 void addInnerRoundedRectClip(const IntRect&, int thickness);
334334 void clipOut(const IntRect&);
335335 void clipOutRoundedRect(const RoundedRect&);
336336 void clipPath(const Path&, WindRule);
337  void clipConvexPolygon(size_t numPoints, const FloatPoint*, bool antialias = true);
338  void clipToImageBuffer(ImageBuffer*, const FloatRect&);
 337 void clipConvexPolygon(size_t numPoints, const GraphicsPoint*, bool antialias = true);
 338 void clipToImageBuffer(ImageBuffer*, const GraphicsRect&);
339339
340340 IntRect clipBounds() const;
341341
342342 TextDrawingModeFlags textDrawingMode() const;
343343 void setTextDrawingMode(TextDrawingModeFlags);
344344
345  void drawText(const Font&, const TextRun&, const FloatPoint&, int from = 0, int to = -1);
346  void drawEmphasisMarks(const Font&, const TextRun& , const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1);
347  void drawBidiText(const Font&, const TextRun&, const FloatPoint&);
348  void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, int h, const Color& backgroundColor, ColorSpace, int from = 0, int to = -1);
 345 void drawText(const Font&, const TextRun&, const GraphicsPoint&, int from = 0, int to = -1);
 346 void drawEmphasisMarks(const Font&, const TextRun& , const AtomicString& mark, const GraphicsPoint&, int from = 0, int to = -1);
 347 void drawBidiText(const Font&, const TextRun&, const GraphicsPoint&);
 348 void drawHighlightForText(const Font&, const TextRun&, const GraphicsPoint&, int h, const Color& backgroundColor, ColorSpace, int from = 0, int to = -1);
349349
350350 enum RoundingMode {
351351 RoundAllSides,
352352 RoundOriginAndDimensions
353353 };
354  FloatRect roundToDevicePixels(const FloatRect&, RoundingMode = RoundAllSides);
 354 GraphicsRect roundToDevicePixels(const GraphicsRect&, RoundingMode = RoundAllSides);
355355
356  void drawLineForText(const FloatPoint&, float width, bool printing);
 356 void drawLineForText(const GraphicsPoint&, float width, bool printing);
357357 enum TextCheckingLineStyle {
358358 TextCheckingSpellingLineStyle,
359359 TextCheckingGrammarLineStyle,
360360 TextCheckingReplacementLineStyle
361361 };
362  void drawLineForTextChecking(const FloatPoint&, float width, TextCheckingLineStyle);
 362 void drawLineForTextChecking(const GraphicsPoint&, float width, TextCheckingLineStyle);
363363
364364 bool paintingDisabled() const;
365365 void setPaintingDisabled(bool);

371371 void endTransparencyLayer();
372372
373373 bool hasShadow() const;
374  void setShadow(const FloatSize&, float blur, const Color&, ColorSpace);
 374 void setShadow(const GraphicsSize&, float blur, const Color&, ColorSpace);
375375 // Legacy shadow blur radius is used for canvas, and -webkit-box-shadow.
376376 // It has different treatment of radii > 8px.
377  void setLegacyShadow(const FloatSize&, float blur, const Color&, ColorSpace);
 377 void setLegacyShadow(const GraphicsSize&, float blur, const Color&, ColorSpace);
378378
379  bool getShadow(FloatSize&, float&, Color&, ColorSpace&) const;
 379 bool getShadow(GraphicsSize&, float&, Color&, ColorSpace&) const;
380380 void clearShadow();
381381
382382 void drawFocusRing(const Vector<IntRect>&, int width, int offset, const Color&);

400400 void canvasClip(const Path&);
401401 void clipOut(const Path&);
402402
403  void scale(const FloatSize&);
 403 void scale(const GraphicsSize&);
404404 void rotate(float angleInRadians);
405  void translate(const FloatSize& size) { translate(size.width(), size.height()); }
 405 void translate(const GraphicsSize& size) { translate(size.width(), size.height()); }
406406 void translate(float x, float y);
407407
408408 void setURLForRect(const KURL&, const IntRect&);

416416 const AffineTransform& affineTransform() const;
417417 AffineTransform& affineTransform();
418418 void resetAffineTransform();
419  void fillRect(const FloatRect&, const Gradient*);
420  void drawText(const SimpleFontData* fontData, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point);
 419 void fillRect(const GraphicsRect&, const Gradient*);
 420 void drawText(const SimpleFontData* fontData, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const GraphicsPoint& point);
421421 void drawFrameControl(const IntRect& rect, unsigned type, unsigned state);
422422 void drawFocusRect(const IntRect& rect);
423423 void paintTextField(const IntRect& rect, unsigned state);
424424 void drawBitmap(SharedBitmap*, const IntRect& dstRect, const IntRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp);
425  void drawBitmapPattern(SharedBitmap*, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect, const IntSize& origSourceSize);
 425 void drawBitmapPattern(SharedBitmap*, const GraphicsRect& tileRectIn, const AffineTransform& patternTransform, const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const GraphicsRect& destRect, const IntSize& origSourceSize);
426426 void drawIcon(HICON icon, const IntRect& dstRect, UINT flags);
427427 bool inTransparencyLayer() const { return false; }
428428 HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = false, bool mayCreateBitmap = true); // The passed in rect is used to create a bitmap for compositing inside transparency layers.

479479#if PLATFORM(WX)
480480 // This is needed because of a bug whereby getting an HDC from a GDI+ context
481481 // loses the scale operations applied to the context.
482  FloatSize currentScale();
 482 GraphicsSize currentScale();
483483 bool inTransparencyLayer() const { return false; }
484484#endif
485485

513513
514514 void setGraphicsContext3D(GraphicsContext3D*, DrawingBuffer*, const IntSize&);
515515
516  static void adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle);
 516 static void adjustLineToPixelBoundaries(GraphicsPoint& p1, GraphicsPoint& p2, float strokeWidth, StrokeStyle);
517517
518518 private:
519519 void platformInit(PlatformGraphicsContext*);

538538 void setPlatformShouldAntialias(bool);
539539 void setPlatformShouldSmoothFonts(bool);
540540
541  void setPlatformShadow(const FloatSize&, float blur, const Color&, ColorSpace);
 541 void setPlatformShadow(const GraphicsSize&, float blur, const Color&, ColorSpace);
542542 void clearPlatformShadow();
543543
544544 void setPlatformCompositeOperation(CompositeOperator);
90929

Source/WebCore/platform/graphics/gpu/Texture.cpp

3535#include "Texture.h"
3636
3737#include "Extensions3D.h"
38 #include "FloatRect.h"
 38#include "GraphicsRect.h"
3939#include "GraphicsContext3D.h"
4040#include "IntRect.h"
4141
90929

Source/WebCore/platform/graphics/gpu/TilingData.cpp

3434
3535#include "TilingData.h"
3636
37 #include "FloatRect.h"
 37#include "GraphicsRect.h"
3838#include "IntRect.h"
3939#include <algorithm>
4040

144144 return bounds;
145145}
146146
147 FloatRect TilingData::tileBoundsNormalized(int tile) const
 147GraphicsRect TilingData::tileBoundsNormalized(int tile) const
148148{
149149 assertTile(tile);
150  FloatRect bounds(tileBounds(tile));
 150 GraphicsRect bounds(tileBounds(tile));
151151 bounds.scale(1.0f / m_totalSizeX, 1.0f / m_totalSizeY);
152152 return bounds;
153153}

213213 return IntRect(x, y, r - x, b - y);
214214}
215215
216 IntRect TilingData::overlappedTileIndices(const WebCore::FloatRect &srcRect) const
 216IntRect TilingData::overlappedTileIndices(const WebCore::GraphicsRect &srcRect) const
217217{
218218 return overlappedTileIndices(enclosingIntRect(srcRect));
219219}
220220
221 void TilingData::intersectDrawQuad(const FloatRect& srcRect, const FloatRect& dstRect, int tile,
222  FloatRect* newSrc, FloatRect* newDst) const
 221void TilingData::intersectDrawQuad(const GraphicsRect& srcRect, const GraphicsRect& dstRect, int tile,
 222 GraphicsRect* newSrc, GraphicsRect* newDst) const
223223{
224224 // Intersect with tile
225  FloatRect tileBounds = this->tileBounds(tile);
226  FloatRect srcRectIntersected = srcRect;
 225 GraphicsRect tileBounds = this->tileBounds(tile);
 226 GraphicsRect srcRectIntersected = srcRect;
227227 srcRectIntersected.intersect(tileBounds);
228228
229229 if (srcRectIntersected.isEmpty()) {
230  *newSrc = *newDst = FloatRect(0, 0, 0, 0);
 230 *newSrc = *newDst = GraphicsRect(0, 0, 0, 0);
231231 return;
232232 }
233233

241241 -tileBounds.x() + m_borderTexels,
242242 -tileBounds.y() + m_borderTexels);
243243
244  *newDst = FloatRect(
 244 *newDst = GraphicsRect(
245245 srcRectIntersectedNormX * dstRect.width() + dstRect.x(),
246246 srcRectIntersectedNormY * dstRect.height() + dstRect.y(),
247247 srcRectIntersectedNormW * dstRect.width(),
90929

Source/WebCore/platform/graphics/gpu/TilingData.h

3535
3636namespace WebCore {
3737
38 class FloatRect;
 38class GraphicsRect;
3939class IntRect;
4040class IntPoint;
4141

6262 IntRect tileBounds(int tile) const;
6363 IntRect tileBoundsWithBorder(int tile) const;
6464 IntRect tileBoundsWithOuterBorder(int tile) const;
65  FloatRect tileBoundsNormalized(int tile) const;
 65 GraphicsRect tileBoundsNormalized(int tile) const;
6666 int tilePositionX(int xIndex) const;
6767 int tilePositionY(int yIndex) const;
6868 int tileSizeX(int xIndex) const;
6969 int tileSizeY(int yIndex) const;
7070 IntRect overlappedTileIndices(const IntRect& srcRect) const;
71  IntRect overlappedTileIndices(const FloatRect& srcRect) const;
 71 IntRect overlappedTileIndices(const GraphicsRect& srcRect) const;
7272
7373 // Given a set of source and destination coordinates for a drawing quad
7474 // in texel units, returns adjusted data to render just the one tile.
75  void intersectDrawQuad(const FloatRect& srcRect, const FloatRect& dstRect, int tile, FloatRect* newSrc, FloatRect* newDst) const;
 75 void intersectDrawQuad(const GraphicsRect& srcRect, const GraphicsRect& dstRect, int tile, GraphicsRect* newSrc, GraphicsRect* newDst) const;
7676
7777 // Difference between tileBound's and tileBoundWithBorder's location().
7878 IntPoint textureOffset() const;
90929

Source/WebCore/platform/graphics/GlyphMetricsMap.h

9696 return cGlyphSizeUnknown;
9797}
9898
99 template<> inline FloatRect GlyphMetricsMap<FloatRect>::unknownMetrics()
 99template<> inline GraphicsRect GlyphMetricsMap<GraphicsRect>::unknownMetrics()
100100{
101  return FloatRect(0, 0, cGlyphSizeUnknown, cGlyphSizeUnknown);
 101 return GraphicsRect(0, 0, cGlyphSizeUnknown, cGlyphSizeUnknown);
102102}
103103
104104template<class T> typename GlyphMetricsMap<T>::GlyphMetricsPage* GlyphMetricsMap<T>::locatePageSlowCase(unsigned pageNumber)
90929

Source/WebCore/platform/graphics/filters/SourceGraphic.cpp

4646void SourceGraphic::determineAbsolutePaintRect()
4747{
4848 Filter* filter = this->filter();
49  FloatRect paintRect = filter->sourceImageRect();
 49 GraphicsRect paintRect = filter->sourceImageRect();
5050 paintRect.scale(filter->filterResolution().width(), filter->filterResolution().height());
5151 setAbsolutePaintRect(enclosingIntRect(paintRect));
5252}
90929

Source/WebCore/platform/graphics/filters/SpotLightSource.cpp

177177 return true;
178178}
179179
180 static TextStream& operator<<(TextStream& ts, const FloatPoint3D& p)
 180static TextStream& operator<<(TextStream& ts, const GraphicsPoint3D& p)
181181{
182182 ts << "x=" << p.x() << " y=" << p.y() << " z=" << p.z();
183183 return ts;
90929

Source/WebCore/platform/graphics/filters/FEBlend.cpp

2626#include "FEBlend.h"
2727
2828#include "Filter.h"
29 #include "FloatPoint.h"
 29#include "GraphicsPoint.h"
3030#include "GraphicsContext.h"
3131#include "RenderTreeAsText.h"
3232#include "TextStream.h"
90929

Source/WebCore/platform/graphics/filters/PointLightSource.cpp

7373 return true;
7474}
7575
76 static TextStream& operator<<(TextStream& ts, const FloatPoint3D& p)
 76static TextStream& operator<<(TextStream& ts, const GraphicsPoint3D& p)
7777{
7878 ts << "x=" << p.x() << " y=" << p.y() << " z=" << p.z();
7979 return ts;
90929

Source/WebCore/platform/graphics/filters/SourceAlpha.cpp

4747void SourceAlpha::determineAbsolutePaintRect()
4848{
4949 Filter* filter = this->filter();
50  FloatRect paintRect = filter->sourceImageRect();
 50 GraphicsRect paintRect = filter->sourceImageRect();
5151 paintRect.scale(filter->filterResolution().width(), filter->filterResolution().height());
5252 setAbsolutePaintRect(enclosingIntRect(paintRect));
5353}

6363
6464 setIsAlphaImage(true);
6565
66  FloatRect imageRect(FloatPoint(), absolutePaintRect().size());
 66 GraphicsRect imageRect(GraphicsPoint(), absolutePaintRect().size());
6767 GraphicsContext* filterContext = resultImage->context();
6868 GraphicsContextStateSaver stateSaver(*filterContext);
6969 filterContext->clipToImageBuffer(filter->sourceImage(), imageRect);
90929

Source/WebCore/platform/graphics/filters/FETile.cpp

6262
6363 // Source input needs more attention. It has the size of the filterRegion but gives the
6464 // size of the cutted sourceImage back. This is part of the specification and optimization.
65  FloatRect tileRect = in->maxEffectRect();
66  FloatPoint inMaxEffectLocation = tileRect.location();
67  FloatPoint maxEffectLocation = maxEffectRect().location();
 65 GraphicsRect tileRect = in->maxEffectRect();
 66 GraphicsPoint inMaxEffectLocation = tileRect.location();
 67 GraphicsPoint maxEffectLocation = maxEffectRect().location();
6868 if (in->filterEffectType() == FilterEffectTypeSourceInput) {
6969 Filter* filter = this->filter();
7070 tileRect = filter->filterRegion();

8686 pattern->setPatternSpaceTransform(patternTransform);
8787 GraphicsContext* filterContext = resultImage->context();
8888 filterContext->setFillPattern(pattern);
89  filterContext->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()));
 89 filterContext->fillRect(GraphicsRect(GraphicsPoint(), absolutePaintRect().size()));
9090#endif
9191}
9292
90929

Source/WebCore/platform/graphics/filters/FEComposite.cpp

227227 return;
228228 GraphicsContext* filterContext = resultImage->context();
229229
230  FloatRect srcRect = FloatRect(0, 0, -1, -1);
 230 GraphicsRect srcRect = GraphicsRect(0, 0, -1, -1);
231231 switch (m_type) {
232232 case FECOMPOSITE_OPERATOR_OVER:
233233 filterContext->drawImageBuffer(in2->asImageBuffer(), ColorSpaceDeviceRGB, drawingRegionOfInputImage(in2->absolutePaintRect()));
90929

Source/WebCore/platform/graphics/filters/FELighting.cpp

184184 if (m_lightingType == FELighting::DiffuseLighting)
185185 lightStrength = m_diffuseConstant * paintingData.lightVector.z() / paintingData.lightVectorLength;
186186 else {
187  FloatPoint3D halfwayVector = paintingData.lightVector;
 187 GraphicsPoint3D halfwayVector = paintingData.lightVector;
188188 halfwayVector.setZ(halfwayVector.z() + paintingData.lightVectorLength);
189189 float halfwayVectorLength = halfwayVector.length();
190190 if (m_specularExponent == 1)

193193 lightStrength = m_specularConstant * powf(halfwayVector.z() / halfwayVectorLength, m_specularExponent);
194194 }
195195 } else {
196  FloatPoint3D normalVector;
197  normalVector.setX(factorX * static_cast<float>(normal2DVector.x()) * data.surfaceScale);
198  normalVector.setY(factorY * static_cast<float>(normal2DVector.y()) * data.surfaceScale);
 196 GraphicsPoint3D normalVector;
 197 normalVector.setX(factorX * static_cast<GraphicsUnit>(normal2DVector.x()) * data.surfaceScale);
 198 normalVector.setY(factorY * static_cast<GraphicsUnit>(normal2DVector.y()) * data.surfaceScale);
199199 normalVector.setZ(1);
200200 float normalVectorLength = normalVector.length();
201201
202202 if (m_lightingType == FELighting::DiffuseLighting)
203203 lightStrength = m_diffuseConstant * (normalVector * paintingData.lightVector) / (normalVectorLength * paintingData.lightVectorLength);
204204 else {
205  FloatPoint3D halfwayVector = paintingData.lightVector;
 205 GraphicsPoint3D halfwayVector = paintingData.lightVector;
206206 halfwayVector.setZ(halfwayVector.z() + paintingData.lightVectorLength);
207207 float halfwayVectorLength = halfwayVector.length();
208208 if (m_specularExponent == 1)

310310 data.widthMultipliedByPixelSize = width * cPixelSize;
311311 data.widthDecreasedByOne = width - 1;
312312 data.heightDecreasedByOne = height - 1;
313  paintingData.colorVector = FloatPoint3D(m_lightingColor.red(), m_lightingColor.green(), m_lightingColor.blue());
 313 paintingData.colorVector = GraphicsPoint3D(m_lightingColor.red(), m_lightingColor.green(), m_lightingColor.blue());
314314 m_lightSource->initPaintingData(paintingData);
315315
316316 // Top/Left corner.
90929

Source/WebCore/platform/graphics/filters/FETurbulence.h

108108 FETurbulence(Filter*, TurbulenceType, float, float, int, float, bool);
109109
110110 inline void initPaint(PaintingData&);
111  float noise2D(int channel, PaintingData&, const FloatPoint&);
112  unsigned char calculateTurbulenceValueForPoint(int channel, PaintingData&, const FloatPoint&);
 111 float noise2D(int channel, PaintingData&, const GraphicsPoint&);
 112 unsigned char calculateTurbulenceValueForPoint(int channel, PaintingData&, const GraphicsPoint&);
113113 inline void fillRegion(ByteArray*, PaintingData&, int, int);
114114
115115 TurbulenceType m_type;
90929

Source/WebCore/platform/graphics/filters/Filter.h

2121#define Filter_h
2222
2323#if ENABLE(FILTERS)
24 #include "FloatRect.h"
25 #include "FloatSize.h"
 24#include "GraphicsRect.h"
 25#include "GraphicsSize.h"
2626#include "ImageBuffer.h"
2727
2828#include <wtf/PassRefPtr.h>

4141 void setSourceImage(PassOwnPtr<ImageBuffer> sourceImage) { m_sourceImage = sourceImage; }
4242 ImageBuffer* sourceImage() { return m_sourceImage.get(); }
4343
44  FloatSize filterResolution() const { return m_filterResolution; }
45  void setFilterResolution(const FloatSize& filterResolution) { m_filterResolution = filterResolution; }
 44 GraphicsSize filterResolution() const { return m_filterResolution; }
 45 void setFilterResolution(const GraphicsSize& filterResolution) { m_filterResolution = filterResolution; }
4646
4747 virtual float applyHorizontalScale(float value) const { return value * m_filterResolution.width(); }
4848 virtual float applyVerticalScale(float value) const { return value * m_filterResolution.height(); }
4949
50  virtual FloatRect sourceImageRect() const = 0;
51  virtual FloatRect filterRegion() const = 0;
 50 virtual GraphicsRect sourceImageRect() const = 0;
 51 virtual GraphicsRect filterRegion() const = 0;
5252
53  virtual FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint&) const { return FloatPoint(); }
 53 virtual GraphicsPoint mapAbsolutePointToLocalPoint(const GraphicsPoint&) const { return GraphicsPoint(); }
5454
55  virtual FloatRect filterRegionInUserSpace() const { return FloatRect(); }
 55 virtual GraphicsRect filterRegionInUserSpace() const { return GraphicsRect(); }
5656
5757 virtual bool effectBoundingBoxMode() const = 0;
5858
5959 private:
6060 OwnPtr<ImageBuffer> m_sourceImage;
61  FloatSize m_filterResolution;
 61 GraphicsSize m_filterResolution;
6262 };
6363
6464} // namespace WebCore
90929

Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h

2525
2626#if ENABLE(FILTERS)
2727#include "FilterEffect.h"
28 #include "FloatPoint.h"
29 #include "FloatSize.h"
 28#include "GraphicsPoint.h"
 29#include "GraphicsSize.h"
3030#include "Filter.h"
3131#include <wtf/AlwaysInline.h>
3232#include <wtf/Vector.h>

4545class FEConvolveMatrix : public FilterEffect {
4646public:
4747 static PassRefPtr<FEConvolveMatrix> create(Filter*, const IntSize&,
48  float, float, const IntPoint&, EdgeModeType, const FloatPoint&,
 48 float, float, const IntPoint&, EdgeModeType, const GraphicsPoint&,
4949 bool, const Vector<float>&);
5050
5151 IntSize kernelSize() const;

6666 EdgeModeType edgeMode() const;
6767 bool setEdgeMode(EdgeModeType);
6868
69  FloatPoint kernelUnitLength() const;
70  bool setKernelUnitLength(const FloatPoint&);
 69 GraphicsPoint kernelUnitLength() const;
 70 bool setKernelUnitLength(const GraphicsPoint&);
7171
7272 bool preserveAlpha() const;
7373 bool setPreserveAlpha(bool);

9090 };
9191
9292 FEConvolveMatrix(Filter*, const IntSize&, float, float,
93  const IntPoint&, EdgeModeType, const FloatPoint&, bool, const Vector<float>&);
 93 const IntPoint&, EdgeModeType, const GraphicsPoint&, bool, const Vector<float>&);
9494
9595 template<bool preserveAlphaValues>
9696 ALWAYS_INLINE void fastSetInteriorPixels(PaintingData&, int clipRight, int clipBottom, int yStart, int yEnd);

128128 float m_bias;
129129 IntPoint m_targetOffset;
130130 EdgeModeType m_edgeMode;
131  FloatPoint m_kernelUnitLength;
 131 GraphicsPoint m_kernelUnitLength;
132132 bool m_preserveAlpha;
133133 Vector<float> m_kernelMatrix;
134134};
90929

Source/WebCore/platform/graphics/filters/FEOffset.cpp

6767
6868void FEOffset::determineAbsolutePaintRect()
6969{
70  FloatRect paintRect = inputEffect(0)->absolutePaintRect();
 70 GraphicsRect paintRect = inputEffect(0)->absolutePaintRect();
7171 Filter* filter = this->filter();
7272 paintRect.move(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
7373 paintRect.intersect(maxEffectRect());

8989
9090 setIsAlphaImage(in->isAlphaImage());
9191
92  FloatRect drawingRegion = drawingRegionOfInputImage(in->absolutePaintRect());
 92 GraphicsRect drawingRegion = drawingRegionOfInputImage(in->absolutePaintRect());
9393 Filter* filter = this->filter();
9494 drawingRegion.move(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
9595 resultImage->context()->drawImageBuffer(in->asImageBuffer(), ColorSpaceDeviceRGB, drawingRegion);
90929

Source/WebCore/platform/graphics/filters/SpotLightSource.h

3030
3131class SpotLightSource : public LightSource {
3232public:
33  static PassRefPtr<SpotLightSource> create(const FloatPoint3D& position,
34  const FloatPoint3D& direction, float specularExponent, float limitingConeAngle)
 33 static PassRefPtr<SpotLightSource> create(const GraphicsPoint3D& position,
 34 const GraphicsPoint3D& direction, float specularExponent, float limitingConeAngle)
3535 {
3636 return adoptRef(new SpotLightSource(position, direction, specularExponent, limitingConeAngle));
3737 }
3838
39  const FloatPoint3D& position() const { return m_position; }
 39 const GraphicsPoint3D& position() const { return m_position; }
4040 bool setX(float);
4141 bool setY(float);
4242 bool setZ(float);
43  const FloatPoint3D& direction() const { return m_direction; }
 43 const GraphicsPoint3D& direction() const { return m_direction; }
4444 bool setPointsAtX(float);
4545 bool setPointsAtY(float);
4646 bool setPointsAtZ(float);

5656 virtual TextStream& externalRepresentation(TextStream&) const;
5757
5858private:
59  SpotLightSource(const FloatPoint3D& position, const FloatPoint3D& direction,
 59 SpotLightSource(const GraphicsPoint3D& position, const GraphicsPoint3D& direction,
6060 float specularExponent, float limitingConeAngle)
6161 : LightSource(LS_SPOT)
6262 , m_position(position)

6666 {
6767 }
6868
69  FloatPoint3D m_position;
70  FloatPoint3D m_direction;
 69 GraphicsPoint3D m_position;
 70 GraphicsPoint3D m_direction;
7171
7272 float m_specularExponent;
7373 float m_limitingConeAngle;
90929

Source/WebCore/platform/graphics/filters/PointLightSource.h

3030
3131class PointLightSource : public LightSource {
3232public:
33  static PassRefPtr<PointLightSource> create(const FloatPoint3D& position)
 33 static PassRefPtr<PointLightSource> create(const GraphicsPoint3D& position)
3434 {
3535 return adoptRef(new PointLightSource(position));
3636 }
3737
38  const FloatPoint3D& position() const { return m_position; }
 38 const GraphicsPoint3D& position() const { return m_position; }
3939 bool setX(float);
4040 bool setY(float);
4141 bool setZ(float);

4646 virtual TextStream& externalRepresentation(TextStream&) const;
4747
4848private:
49  PointLightSource(const FloatPoint3D& position)
 49 PointLightSource(const GraphicsPoint3D& position)
5050 : LightSource(LS_POINT)
5151 , m_position(position)
5252 {
5353 }
5454
55  FloatPoint3D m_position;
 55 GraphicsPoint3D m_position;
5656};
5757
5858} // namespace WebCore
90929

Source/WebCore/platform/graphics/filters/FilterEffect.h

2323#define FilterEffect_h
2424
2525#if ENABLE(FILTERS)
26 #include "FloatRect.h"
 26#include "GraphicsRect.h"
2727#include "IntRect.h"
2828
2929#include <wtf/ByteArray.h>

7676 IntRect absolutePaintRect() const { return m_absolutePaintRect; }
7777 void setAbsolutePaintRect(const IntRect& absolutePaintRect) { m_absolutePaintRect = absolutePaintRect; }
7878
79  FloatRect maxEffectRect() const { return m_maxEffectRect; }
80  void setMaxEffectRect(const FloatRect& maxEffectRect) { m_maxEffectRect = maxEffectRect; }
 79 GraphicsRect maxEffectRect() const { return m_maxEffectRect; }
 80 void setMaxEffectRect(const GraphicsRect& maxEffectRect) { m_maxEffectRect = maxEffectRect; }
8181
8282 virtual void apply() = 0;
8383 virtual void dump() = 0;

103103 bool hasHeight() const { return m_hasHeight; }
104104 void setHasHeight(bool value) { m_hasHeight = value; }
105105
106  FloatRect filterPrimitiveSubregion() const { return m_filterPrimitiveSubregion; }
107  void setFilterPrimitiveSubregion(const FloatRect& filterPrimitiveSubregion) { m_filterPrimitiveSubregion = filterPrimitiveSubregion; }
 106 GraphicsRect filterPrimitiveSubregion() const { return m_filterPrimitiveSubregion; }
 107 void setFilterPrimitiveSubregion(const GraphicsRect& filterPrimitiveSubregion) { m_filterPrimitiveSubregion = filterPrimitiveSubregion; }
108108
109  FloatRect effectBoundaries() const { return m_effectBoundaries; }
110  void setEffectBoundaries(const FloatRect& effectBoundaries) { m_effectBoundaries = effectBoundaries; }
 109 GraphicsRect effectBoundaries() const { return m_effectBoundaries; }
 110 void setEffectBoundaries(const GraphicsRect& effectBoundaries) { m_effectBoundaries = effectBoundaries; }
111111
112112 Filter* filter() { return m_filter; }
113113

130130
131131 // The maximum size of a filter primitive. In SVG this is the primitive subregion in absolute coordinate space.
132132 // The absolute paint rect should never be bigger than m_maxEffectRect.
133  FloatRect m_maxEffectRect;
 133 GraphicsRect m_maxEffectRect;
134134 Filter* m_filter;
135135
136136private:

141141
142142 // The subregion of a filter primitive according to the SVG Filter specification in local coordinates.
143143 // This is SVG specific and needs to move to RenderSVGResourceFilterPrimitive.
144  FloatRect m_filterPrimitiveSubregion;
 144 GraphicsRect m_filterPrimitiveSubregion;
145145
146146 // x, y, width and height of the actual SVGFE*Element. Is needed to determine the subregion of the
147147 // filter primitive on a later step.
148  FloatRect m_effectBoundaries;
 148 GraphicsRect m_effectBoundaries;
149149 bool m_hasX;
150150 bool m_hasY;
151151 bool m_hasWidth;
90929

Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp

245245
246246void FEGaussianBlur::determineAbsolutePaintRect()
247247{
248  FloatRect absolutePaintRect = inputEffect(0)->absolutePaintRect();
 248 GraphicsRect absolutePaintRect = inputEffect(0)->absolutePaintRect();
249249 absolutePaintRect.intersect(maxEffectRect());
250250
251251 unsigned kernelSizeX = 0;
90929

Source/WebCore/platform/graphics/filters/FEMorphology.cpp

8585
8686void FEMorphology::determineAbsolutePaintRect()
8787{
88  FloatRect paintRect = inputEffect(0)->absolutePaintRect();
 88 GraphicsRect paintRect = inputEffect(0)->absolutePaintRect();
8989 Filter* filter = this->filter();
9090 paintRect.inflateX(filter->applyHorizontalScale(m_radiusX));
9191 paintRect.inflateY(filter->applyVerticalScale(m_radiusY));
90929

Source/WebCore/platform/graphics/filters/FEFlood.cpp

7979 return;
8080
8181 Color color = colorWithOverrideAlpha(floodColor().rgb(), floodOpacity());
82  resultImage->context()->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), color, ColorSpaceDeviceRGB);
 82 resultImage->context()->fillRect(GraphicsRect(GraphicsPoint(), absolutePaintRect().size()), color, ColorSpaceDeviceRGB);
8383}
8484
8585void FEFlood::dump()
90929

Source/WebCore/platform/graphics/filters/FETurbulence.cpp

225225 noiseValue -= newValue - 1;
226226}
227227
228 float FETurbulence::noise2D(int channel, PaintingData& paintingData, const FloatPoint& noiseVector)
 228float FETurbulence::noise2D(int channel, PaintingData& paintingData, const GraphicsPoint& noiseVector)
229229{
230230 struct Noise {
231231 int noisePositionIntegerValue;

276276 return linearInterpolation(sy, a, b);
277277}
278278
279 unsigned char FETurbulence::calculateTurbulenceValueForPoint(int channel, PaintingData& paintingData, const FloatPoint& point)
 279unsigned char FETurbulence::calculateTurbulenceValueForPoint(int channel, PaintingData& paintingData, const GraphicsPoint& point)
280280{
281281 float tileWidth = paintingData.filterSize.width();
282282 ASSERT(tileWidth > 0);

310310 paintingData.wrapY = s_perlinNoise + paintingData.height;
311311 }
312312 float turbulenceFunctionResult = 0;
313  FloatPoint noiseVector(point.x() * m_baseFrequencyX, point.y() * m_baseFrequencyY);
 313 GraphicsPoint noiseVector(point.x() * m_baseFrequencyX, point.y() * m_baseFrequencyY);
314314 float ratio = 1;
315315 for (int octave = 0; octave < m_numOctaves; ++octave) {
316316 if (m_type == FETURBULENCE_TYPE_FRACTALNOISE)
90929

Source/WebCore/platform/graphics/filters/FEDropShadow.cpp

5757 Filter* filter = this->filter();
5858 ASSERT(filter);
5959
60  FloatRect absolutePaintRect = inputEffect(0)->absolutePaintRect();
61  FloatRect absoluteOffsetPaintRect(absolutePaintRect);
 60 GraphicsRect absolutePaintRect = inputEffect(0)->absolutePaintRect();
 61 GraphicsRect absoluteOffsetPaintRect(absolutePaintRect);
6262 absoluteOffsetPaintRect.move(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
6363 absolutePaintRect.unite(absoluteOffsetPaintRect);
6464 absolutePaintRect.intersect(maxEffectRect());

8888 return;
8989
9090 Filter* filter = this->filter();
91  FloatSize blurRadius(filter->applyHorizontalScale(m_stdX), filter->applyVerticalScale(m_stdY));
92  FloatSize offset(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
 91 GraphicsSize blurRadius(filter->applyHorizontalScale(m_stdX), filter->applyVerticalScale(m_stdY));
 92 GraphicsSize offset(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
9393
94  FloatRect drawingRegion = drawingRegionOfInputImage(in->absolutePaintRect());
95  FloatRect drawingRegionWithOffset(drawingRegion);
 94 GraphicsRect drawingRegion = drawingRegionOfInputImage(in->absolutePaintRect());
 95 GraphicsRect drawingRegionWithOffset(drawingRegion);
9696 drawingRegionWithOffset.move(offset);
9797
9898 ImageBuffer* sourceImage = in->asImageBuffer();

114114 resultImage->putPremultipliedImageData(srcPixelArray.get(), shadowArea.size(), shadowArea, IntPoint());
115115
116116 resultContext->setCompositeOperation(CompositeSourceIn);
117  resultContext->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), m_shadowColor, ColorSpaceDeviceRGB);
 117 resultContext->fillRect(GraphicsRect(GraphicsPoint(), absolutePaintRect().size()), m_shadowColor, ColorSpaceDeviceRGB);
118118 resultContext->setCompositeOperation(CompositeDestinationOver);
119119
120120 resultImage->context()->drawImageBuffer(sourceImage, ColorSpaceDeviceRGB, drawingRegion);
90929

Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp

3737
3838FEConvolveMatrix::FEConvolveMatrix(Filter* filter, const IntSize& kernelSize,
3939 float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMode,
40  const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
 40 const GraphicsPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
4141 : FilterEffect(filter)
4242 , m_kernelSize(kernelSize)
4343 , m_divisor(divisor)

5252
5353PassRefPtr<FEConvolveMatrix> FEConvolveMatrix::create(Filter* filter, const IntSize& kernelSize,
5454 float divisor, float bias, const IntPoint& targetOffset, EdgeModeType edgeMode,
55  const FloatPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
 55 const GraphicsPoint& kernelUnitLength, bool preserveAlpha, const Vector<float>& kernelMatrix)
5656{
5757 return adoptRef(new FEConvolveMatrix(filter, kernelSize, divisor, bias, targetOffset, edgeMode, kernelUnitLength,
5858 preserveAlpha, kernelMatrix));

131131 return true;
132132}
133133
134 FloatPoint FEConvolveMatrix::kernelUnitLength() const
 134GraphicsPoint FEConvolveMatrix::kernelUnitLength() const
135135{
136136 return m_kernelUnitLength;
137137}
138138
139 bool FEConvolveMatrix::setKernelUnitLength(const FloatPoint& kernelUnitLength)
 139bool FEConvolveMatrix::setKernelUnitLength(const GraphicsPoint& kernelUnitLength)
140140{
141141 if (m_kernelUnitLength == kernelUnitLength)
142142 return false;
90929

Source/WebCore/platform/graphics/filters/LightSource.h

2525#define LightSource_h
2626
2727#if ENABLE(FILTERS)
28 #include "FloatPoint3D.h"
 28#include "GraphicsPoint3D.h"
2929#include <wtf/PassRefPtr.h>
3030#include <wtf/RefCounted.h>
3131

4949 // a reference to the following structure
5050 struct PaintingData {
5151 // SVGFELighting also use them
52  FloatPoint3D lightVector;
53  FloatPoint3D colorVector;
 52 GraphicsPoint3D lightVector;
 53 GraphicsPoint3D colorVector;
5454 float lightVectorLength;
5555 // Private members
56  FloatPoint3D directionVector;
57  FloatPoint3D privateColorVector;
 56 GraphicsPoint3D directionVector;
 57 GraphicsPoint3D privateColorVector;
5858 float coneCutOffLimit;
5959 float coneFullLight;
6060 int specularExponent;
90929

Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm

369369 [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:[NSValue valueWithCATransform3D:value]];
370370}
371371
372 void PlatformCAAnimation::setFromValue(const FloatPoint3D& value)
 372void PlatformCAAnimation::setFromValue(const GraphicsPoint3D& value)
373373{
374374 if (animationType() != Basic)
375375 return;

420420 [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:[NSValue valueWithCATransform3D:value]];
421421}
422422
423 void PlatformCAAnimation::setToValue(const FloatPoint3D& value)
 423void PlatformCAAnimation::setToValue(const GraphicsPoint3D& value)
424424{
425425 if (animationType() != Basic)
426426 return;

482482 [static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:array];
483483}
484484
485 void PlatformCAAnimation::setValues(const Vector<FloatPoint3D>& value)
 485void PlatformCAAnimation::setValues(const Vector<GraphicsPoint3D>& value)
486486{
487487 if (animationType() != Keyframe)
488488 return;
90929

Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm

243243 m_owner->platformCALayerAnimationStarted(beginTime);
244244}
245245
246 void PlatformCALayer::setNeedsDisplay(const FloatRect* dirtyRect)
 246void PlatformCALayer::setNeedsDisplay(const GraphicsRect* dirtyRect)
247247{
248248 BEGIN_BLOCK_OBJC_EXCEPTIONS
249249 if (dirtyRect)

404404 END_BLOCK_OBJC_EXCEPTIONS
405405}
406406
407 FloatRect PlatformCALayer::bounds() const
 407GraphicsRect PlatformCALayer::bounds() const
408408{
409409 return [m_layer.get() bounds];
410410}
411411
412 void PlatformCALayer::setBounds(const FloatRect& value)
 412void PlatformCALayer::setBounds(const GraphicsRect& value)
413413{
414414 BEGIN_BLOCK_OBJC_EXCEPTIONS
415415 [m_layer.get() setBounds:value];
416416 END_BLOCK_OBJC_EXCEPTIONS
417417}
418418
419 FloatPoint3D PlatformCALayer::position() const
 419GraphicsPoint3D PlatformCALayer::position() const
420420{
421421 CGPoint point = [m_layer.get() position];
422  return FloatPoint3D(point.x, point.y, [m_layer.get() zPosition]);
 422 return GraphicsPoint3D(point.x, point.y, [m_layer.get() zPosition]);
423423}
424424
425 void PlatformCALayer::setPosition(const FloatPoint3D& value)
 425void PlatformCALayer::setPosition(const GraphicsPoint3D& value)
426426{
427427 BEGIN_BLOCK_OBJC_EXCEPTIONS
428428 [m_layer.get() setPosition:CGPointMake(value.x(), value.y())];

430430 END_BLOCK_OBJC_EXCEPTIONS
431431}
432432
433 FloatPoint3D PlatformCALayer::anchorPoint() const
 433GraphicsPoint3D PlatformCALayer::anchorPoint() const
434434{
435435 CGPoint point = [m_layer.get() anchorPoint];
436436 float z = 0;
437437#if HAVE_MODERN_QUARTZCORE
438438 z = [m_layer.get() anchorPointZ];
439439#endif
440  return FloatPoint3D(point.x, point.y, z);
 440 return GraphicsPoint3D(point.x, point.y, z);
441441}
442442
443 void PlatformCALayer::setAnchorPoint(const FloatPoint3D& value)
 443void PlatformCALayer::setAnchorPoint(const GraphicsPoint3D& value)
444444{
445445 BEGIN_BLOCK_OBJC_EXCEPTIONS
446446 [m_layer.get() setAnchorPoint:CGPointMake(value.x(), value.y())];

588588 END_BLOCK_OBJC_EXCEPTIONS
589589}
590590
591 FloatRect PlatformCALayer::contentsRect() const
 591GraphicsRect PlatformCALayer::contentsRect() const
592592{
593593 return [m_layer.get() contentsRect];
594594}
595595
596 void PlatformCALayer::setContentsRect(const FloatRect& value)
 596void PlatformCALayer::setContentsRect(const GraphicsRect& value)
597597{
598598 BEGIN_BLOCK_OBJC_EXCEPTIONS
599599 [m_layer.get() setContentsRect:value];

694694 END_BLOCK_OBJC_EXCEPTIONS
695695}
696696
697 FloatRect PlatformCALayer::frame() const
 697GraphicsRect PlatformCALayer::frame() const
698698{
699699 return [m_layer.get() frame];
700700}
701701
702 void PlatformCALayer::setFrame(const FloatRect& value)
 702void PlatformCALayer::setFrame(const GraphicsRect& value)
703703{
704704 BEGIN_BLOCK_OBJC_EXCEPTIONS
705705 [m_layer.get() setFrame:value];
90929

Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

3131
3232#include "Animation.h"
3333#include "FloatConversion.h"
34 #include "FloatRect.h"
 34#include "GraphicsRect.h"
3535#include "PlatformCALayer.h"
3636#include "RotateTransformOperation.h"
3737#include "ScaleTransformOperation.h"

7979 }
8080}
8181
82 static bool isTransformTypeFloatPoint3D(TransformOperation::OperationType transformType)
 82static bool isTransformTypeGraphicsPoint3D(TransformOperation::OperationType transformType)
8383{
8484 switch (transformType) {
8585 case TransformOperation::SCALE:

9494
9595static bool isTransformTypeNumber(TransformOperation::OperationType transformType)
9696{
97  return !isTransformTypeTransformationMatrix(transformType) && !isTransformTypeFloatPoint3D(transformType);
 97 return !isTransformTypeTransformationMatrix(transformType) && !isTransformTypeGraphicsPoint3D(transformType);
9898}
9999
100100static void getTransformFunctionValue(const TransformOperation* transformOp, TransformOperation::OperationType transformType, const IntSize& size, float& value)

128128 }
129129}
130130
131 static void getTransformFunctionValue(const TransformOperation* transformOp, TransformOperation::OperationType transformType, const IntSize& size, FloatPoint3D& value)
 131static void getTransformFunctionValue(const TransformOperation* transformOp, TransformOperation::OperationType transformType, const IntSize& size, GraphicsPoint3D& value)
132132{
133133 switch (transformType) {
134134 case TransformOperation::SCALE:

375375 noteLayerPropertyChanged(ReplicatedLayerChanged);
376376}
377377
378 void GraphicsLayerCA::setPosition(const FloatPoint& point)
 378void GraphicsLayerCA::setPosition(const GraphicsPoint& point)
379379{
380380 if (point == m_position)
381381 return;

384384 noteLayerPropertyChanged(GeometryChanged);
385385}
386386
387 void GraphicsLayerCA::setAnchorPoint(const FloatPoint3D& point)
 387void GraphicsLayerCA::setAnchorPoint(const GraphicsPoint3D& point)
388388{
389389 if (point == m_anchorPoint)
390390 return;

393393 noteLayerPropertyChanged(GeometryChanged);
394394}
395395
396 void GraphicsLayerCA::setSize(const FloatSize& size)
 396void GraphicsLayerCA::setSize(const GraphicsSize& size)
397397{
398398 if (size == m_size)
399399 return;

402402 noteLayerPropertyChanged(GeometryChanged);
403403}
404404
405 void GraphicsLayerCA::setBoundsOrigin(const FloatPoint& origin)
 405void GraphicsLayerCA::setBoundsOrigin(const GraphicsPoint& origin)
406406{
407407 if (origin == m_boundsOrigin)
408408 return;

561561
562562void GraphicsLayerCA::setNeedsDisplay()
563563{
564  FloatRect hugeRect(-numeric_limits<float>::max() / 2, -numeric_limits<float>::max() / 2,
 564 GraphicsRect hugeRect(-numeric_limits<float>::max() / 2, -numeric_limits<float>::max() / 2,
565565 numeric_limits<float>::max(), numeric_limits<float>::max());
566566
567567 setNeedsDisplayInRect(hugeRect);
568568}
569569
570 void GraphicsLayerCA::setNeedsDisplayInRect(const FloatRect& r)
 570void GraphicsLayerCA::setNeedsDisplayInRect(const GraphicsRect& r)
571571{
572572 if (!drawsContent())
573573 return;
574574
575  FloatRect rect(r);
576  FloatRect layerBounds(FloatPoint(), m_size);
 575 GraphicsRect rect(r);
 576 GraphicsRect layerBounds(GraphicsPoint(), m_size);
577577 rect.intersect(layerBounds);
578578 if (rect.isEmpty())
579579 return;

976976 if (needTiledLayer != m_usingTiledLayer)
977977 swapFromOrToTiledLayer(needTiledLayer);
978978
979  FloatSize usedSize = m_usingTiledLayer ? constrainedSize() : m_size;
980  FloatRect boundsRect(m_boundsOrigin, usedSize);
 979 GraphicsSize usedSize = m_usingTiledLayer ? constrainedSize() : m_size;
 980 GraphicsRect boundsRect(m_boundsOrigin, usedSize);
981981
982982 // Update position.
983983 // Position is offset on the layer by the layer anchor point.
984  FloatPoint posPoint(m_position.x() + m_anchorPoint.x() * usedSize.width(), m_position.y() + m_anchorPoint.y() * usedSize.height());
 984 GraphicsPoint posPoint(m_position.x() + m_anchorPoint.x() * usedSize.width(), m_position.y() + m_anchorPoint.y() * usedSize.height());
985985 primaryLayer()->setPosition(posPoint);
986986
987987 if (LayerMap* layerCloneMap = primaryLayerClones()) {
988988 LayerMap::const_iterator end = layerCloneMap->end();
989989 for (LayerMap::const_iterator it = layerCloneMap->begin(); it != end; ++it) {
990  FloatPoint clonePosition = posPoint;
 990 GraphicsPoint clonePosition = posPoint;
991991 if (m_replicaLayer && isReplicatedRootClone(it->first)) {
992992 // Maintain the special-case position for the root of a clone subtree,
993993 // which we set up in replicatedLayerRoot().

11811181 updateBackfaceVisibility();
11821182
11831183 // Set properties of m_layer to their default values, since these are expressed on on the structural layer.
1184  FloatPoint point(m_size.width() / 2.0f, m_size.height() / 2.0f);
1185  FloatPoint3D anchorPoint(0.5f, 0.5f, 0);
 1184 GraphicsPoint point(m_size.width() / 2.0f, m_size.height() / 2.0f);
 1185 GraphicsPoint3D anchorPoint(0.5f, 0.5f, 0);
11861186 m_layer->setPosition(point);
11871187 m_layer->setAnchorPoint(anchorPoint);
11881188 m_layer->setTransform(TransformationMatrix());

13111311 if (!m_contentsLayer)
13121312 return;
13131313
1314  FloatPoint point(m_contentsRect.x(), m_contentsRect.y());
1315  FloatRect rect(0, 0, m_contentsRect.width(), m_contentsRect.height());
 1314 GraphicsPoint point(m_contentsRect.x(), m_contentsRect.y());
 1315 GraphicsRect rect(0, 0, m_contentsRect.width(), m_contentsRect.height());
13161316
13171317 m_contentsLayer->setPosition(point);
13181318 m_contentsLayer->setBounds(rect);

13871387 GraphicsLayerCA* replicatedLayer = static_cast<GraphicsLayerCA*>(m_replicatedLayer);
13881388
13891389 RefPtr<PlatformCALayer> clonedLayerRoot = replicatedLayer->fetchCloneLayers(this, replicaState, RootCloneLevel);
1390  FloatPoint cloneRootPosition = replicatedLayer->positionForCloneRootLayer();
 1390 GraphicsPoint cloneRootPosition = replicatedLayer->positionForCloneRootLayer();
13911391
13921392 // Replica root has no offset or transform
13931393 clonedLayerRoot->setPosition(cloneRootPosition);

17891789 float toValue;
17901790 getTransformFunctionValue(endValue->value()->at(functionIndex), transformOpType, boxSize, toValue);
17911791 basicAnim->setToValue(toValue);
1792  } else if (isTransformTypeFloatPoint3D(transformOpType)) {
1793  FloatPoint3D fromValue;
 1792 } else if (isTransformTypeGraphicsPoint3D(transformOpType)) {
 1793 GraphicsPoint3D fromValue;
17941794 getTransformFunctionValue(startValue->value()->at(functionIndex), transformOpType, boxSize, fromValue);
17951795 basicAnim->setFromValue(fromValue);
17961796
1797  FloatPoint3D toValue;
 1797 GraphicsPoint3D toValue;
17981798 getTransformFunctionValue(endValue->value()->at(functionIndex), transformOpType, boxSize, toValue);
17991799 basicAnim->setToValue(toValue);
18001800 } else {

18261826{
18271827 Vector<float> keyTimes;
18281828 Vector<float> floatValues;
1829  Vector<FloatPoint3D> floatPoint3DValues;
 1829 Vector<GraphicsPoint3D> floatPoint3DValues;
18301830 Vector<TransformationMatrix> transformationMatrixValues;
18311831 Vector<const TimingFunction*> timingFunctions;
18321832

18491849 float value;
18501850 getTransformFunctionValue(transformOp, transformOpType, boxSize, value);
18511851 floatValues.append(value);
1852  } else if (isTransformTypeFloatPoint3D(transformOpType)) {
1853  FloatPoint3D value;
 1852 } else if (isTransformTypeGraphicsPoint3D(transformOpType)) {
 1853 GraphicsPoint3D value;
18541854 getTransformFunctionValue(transformOp, transformOpType, boxSize, value);
18551855 floatPoint3DValues.append(value);
18561856 } else {

18711871
18721872 if (isTransformTypeNumber(transformOpType))
18731873 keyframeAnim->setValues(floatValues);
1874  else if (isTransformTypeFloatPoint3D(transformOpType))
 1874 else if (isTransformTypeGraphicsPoint3D(transformOpType))
18751875 keyframeAnim->setValues(floatPoint3DValues);
18761876 else
18771877 keyframeAnim->setValues(transformationMatrixValues);

19941994 }
19951995}
19961996
1997 FloatSize GraphicsLayerCA::constrainedSize() const
 1997GraphicsSize GraphicsLayerCA::constrainedSize() const
19981998{
1999  FloatSize constrainedSize = m_size;
 1999 GraphicsSize constrainedSize = m_size;
20002000#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
20012001 float tileColumns = ceilf(m_size.width() / kTiledLayerTileSize);
20022002 float tileRows = ceilf(m_size.height() / kTiledLayerTileSize);

20182018 return constrainedSize;
20192019}
20202020
2021 bool GraphicsLayerCA::requiresTiledLayer(const FloatSize& size) const
 2021bool GraphicsLayerCA::requiresTiledLayer(const GraphicsSize& size) const
20222022{
20232023 if (!m_drawsContent || !m_allowTiledLayer)
20242024 return false;

21192119 0.0f, 0.0f, 1.0f, 0.0f,
21202120 0.0f, 0.0f, 0.0f, 1.0f);
21212121 contentsLayer->setTransform(flipper);
2122  contentsLayer->setAnchorPoint(FloatPoint3D(0, 1, 0));
 2122 contentsLayer->setAnchorPoint(GraphicsPoint3D(0, 1, 0));
21232123 } else
2124  contentsLayer->setAnchorPoint(FloatPoint3D());
 2124 contentsLayer->setAnchorPoint(GraphicsPoint3D());
21252125
21262126 if (showDebugBorders()) {
21272127 contentsLayer->setBorderColor(Color(0, 0, 128, 180));

21802180 m_contentsLayerClones = nullptr;
21812181}
21822182
2183 FloatPoint GraphicsLayerCA::positionForCloneRootLayer() const
 2183GraphicsPoint GraphicsLayerCA::positionForCloneRootLayer() const
21842184{
21852185 // This can get called during a sync when we've just removed the m_replicaLayer.
21862186 if (!m_replicaLayer)
2187  return FloatPoint();
 2187 return GraphicsPoint();
21882188
2189  FloatPoint replicaPosition = m_replicaLayer->replicatedLayerPosition();
2190  return FloatPoint(replicaPosition.x() + m_anchorPoint.x() * m_size.width(),
 2189 GraphicsPoint replicaPosition = m_replicaLayer->replicatedLayerPosition();
 2190 return GraphicsPoint(replicaPosition.x() + m_anchorPoint.x() * m_size.width(),
21912191 replicaPosition.y() + m_anchorPoint.y() * m_size.height());
21922192}
21932193
90929

Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h

7171 virtual void setMaskLayer(GraphicsLayer*);
7272 virtual void setReplicatedLayer(GraphicsLayer*);
7373
74  virtual void setPosition(const FloatPoint&);
75  virtual void setAnchorPoint(const FloatPoint3D&);
76  virtual void setSize(const FloatSize&);
77  virtual void setBoundsOrigin(const FloatPoint&);
 74 virtual void setPosition(const GraphicsPoint&);
 75 virtual void setAnchorPoint(const GraphicsPoint3D&);
 76 virtual void setSize(const GraphicsSize&);
 77 virtual void setBoundsOrigin(const GraphicsPoint&);
7878
7979 virtual void setTransform(const TransformationMatrix&);
8080

9595 virtual void setOpacity(float);
9696
9797 virtual void setNeedsDisplay();
98  virtual void setNeedsDisplayInRect(const FloatRect&);
 98 virtual void setNeedsDisplayInRect(const GraphicsRect&);
9999 virtual void setContentsNeedsDisplay();
100100
101101 virtual void setContentsRect(const IntRect&);

184184 void commitLayerChangesBeforeSublayers();
185185 void commitLayerChangesAfterSublayers();
186186
187  FloatSize constrainedSize() const;
 187 GraphicsSize constrainedSize() const;
188188
189  bool requiresTiledLayer(const FloatSize&) const;
 189 bool requiresTiledLayer(const GraphicsSize&) const;
190190 void swapFromOrToTiledLayer(bool useTiledLayer);
191191
192192 CompositingCoordinatesOrientation defaultContentsOrientation() const;

257257
258258 bool hasCloneLayers() const { return m_layerClones; }
259259 void removeCloneLayers();
260  FloatPoint positionForCloneRootLayer() const;
 260 GraphicsPoint positionForCloneRootLayer() const;
261261
262262 void propagateLayerChangeToReplicas();
263263

395395 typedef HashMap<String, Vector<LayerPropertyAnimation> > AnimationsMap;
396396 AnimationsMap m_runningAnimations;
397397
398  Vector<FloatRect> m_dirtyRects;
 398 Vector<GraphicsRect> m_dirtyRects;
399399
400400 LayerChangeFlags m_uncommittedChanges;
401401
90929

Source/WebCore/platform/graphics/ca/PlatformCALayer.h

8585 void setNeedsLayout();
8686
8787
88  void setNeedsDisplay(const FloatRect* dirtyRect = 0);
 88 void setNeedsDisplay(const GraphicsRect* dirtyRect = 0);
8989
9090 // This tells the layer tree to commit changes and perform a render, without do a setNeedsDisplay on any layer.
9191 void setNeedsCommit();

117117 bool isOpaque() const;
118118 void setOpaque(bool);
119119
120  FloatRect bounds() const;
121  void setBounds(const FloatRect&);
 120 GraphicsRect bounds() const;
 121 void setBounds(const GraphicsRect&);
122122
123  FloatPoint3D position() const;
124  void setPosition(const FloatPoint3D&);
125  void setPosition(const FloatPoint& pos) { setPosition(FloatPoint3D(pos.x(), pos.y(), 0)); }
 123 GraphicsPoint3D position() const;
 124 void setPosition(const GraphicsPoint3D&);
 125 void setPosition(const GraphicsPoint& pos) { setPosition(GraphicsPoint3D(pos.x(), pos.y(), 0)); }
126126
127  FloatPoint3D anchorPoint() const;
128  void setAnchorPoint(const FloatPoint3D&);
 127 GraphicsPoint3D anchorPoint() const;
 128 void setAnchorPoint(const GraphicsPoint3D&);
129129
130130 TransformationMatrix transform() const;
131131 void setTransform(const TransformationMatrix&);

154154 CFTypeRef contents() const;
155155 void setContents(CFTypeRef);
156156
157  FloatRect contentsRect() const;
158  void setContentsRect(const FloatRect&);
 157 GraphicsRect contentsRect() const;
 158 void setContentsRect(const GraphicsRect&);
159159
160160 void setMinificationFilter(FilterType);
161161 void setMagnificationFilter(FilterType);

175175 String name() const;
176176 void setName(const String&);
177177
178  FloatRect frame() const;
179  void setFrame(const FloatRect&);
 178 GraphicsRect frame() const;
 179 void setFrame(const GraphicsRect&);
180180
181181 float speed() const;
182182 void setSpeed(float);
90929

Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h

2929#if USE(ACCELERATED_COMPOSITING)
3030
3131#include "Color.h"
32 #include "FloatPoint3D.h"
 32#include "GraphicsPoint3D.h"
3333#include "TransformationMatrix.h"
3434#include <wtf/RefCounted.h>
3535#include <wtf/RetainPtr.h>

4949
5050namespace WebCore {
5151
52 class FloatRect;
 52class GraphicsRect;
5353class PlatformCAAnimation;
5454class TimingFunction;
5555

111111 // Basic-animation properties.
112112 void setFromValue(float);
113113 void setFromValue(const WebCore::TransformationMatrix&);
114  void setFromValue(const FloatPoint3D&);
 114 void setFromValue(const GraphicsPoint3D&);
115115 void setFromValue(const WebCore::Color&);
116116 void copyFromValueFrom(const PlatformCAAnimation*);
117117
118118 void setToValue(float);
119119 void setToValue(const WebCore::TransformationMatrix&);
120  void setToValue(const FloatPoint3D&);
 120 void setToValue(const GraphicsPoint3D&);
121121 void setToValue(const WebCore::Color&);
122122 void copyToValueFrom(const PlatformCAAnimation*);
123123
124124 // Keyframe-animation properties.
125125 void setValues(const Vector<float>&);
126126 void setValues(const Vector<WebCore::TransformationMatrix>&);
127  void setValues(const Vector<FloatPoint3D>&);
 127 void setValues(const Vector<GraphicsPoint3D>&);
128128 void setValues(const Vector<WebCore::Color>&);
129129 void copyValuesFrom(const PlatformCAAnimation*);
130130
90929

Source/WebCore/platform/graphics/GeneratedImage.h

5757 virtual unsigned decodedSize() const { return 0; }
5858
5959protected:
60  virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
61  virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
62  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
 60 virtual void draw(GraphicsContext*, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
 61 virtual void drawPattern(GraphicsContext*, const GraphicsRect& srcRect, const AffineTransform& patternTransform,
 62 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const GraphicsRect& destRect);
6363
6464 GeneratedImage(PassRefPtr<Generator> generator, const IntSize& size)
6565 : m_generator(generator)
90929

Source/WebCore/platform/graphics/cg/PathCG.cpp

3030#if USE(CG)
3131
3232#include "AffineTransform.h"
33 #include "FloatRect.h"
 33#include "GraphicsRect.h"
3434#include "GraphicsContext.h"
3535#include "IntRect.h"
3636#include "PlatformString.h"

122122 return path;
123123}
124124
125 bool Path::contains(const FloatPoint &point, WindRule rule) const
 125bool Path::contains(const GraphicsPoint &point, WindRule rule) const
126126{
127127 if (!boundingRect().contains(point))
128128 return false;

133133 return ret;
134134}
135135
136 bool Path::strokeContains(StrokeStyleApplier* applier, const FloatPoint& point) const
 136bool Path::strokeContains(StrokeStyleApplier* applier, const GraphicsPoint& point) const
137137{
138138 ASSERT(applier);
139139

152152 return hitSuccess;
153153}
154154
155 void Path::translate(const FloatSize& size)
 155void Path::translate(const GraphicsSize& size)
156156{
157157 CGAffineTransform translation = CGAffineTransformMake(1, 0, 0, 1, size.width(), size.height());
158158 CGMutablePathRef newPath = CGPathCreateMutable();

161161 m_path = newPath;
162162}
163163
164 FloatRect Path::boundingRect() const
 164GraphicsRect Path::boundingRect() const
165165{
166166 return CGPathGetBoundingBox(m_path);
167167}
168168
169 FloatRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
 169GraphicsRect Path::strokeBoundingRect(StrokeStyleApplier* applier) const
170170{
171171 CGContextRef context = scratchContext();
172172

186186 return box;
187187}
188188
189 void Path::moveTo(const FloatPoint& point)
 189void Path::moveTo(const GraphicsPoint& point)
190190{
191191 CGPathMoveToPoint(m_path, 0, point.x(), point.y());
192192}
193193
194 void Path::addLineTo(const FloatPoint& p)
 194void Path::addLineTo(const GraphicsPoint& p)
195195{
196196 CGPathAddLineToPoint(m_path, 0, p.x(), p.y());
197197}
198198
199 void Path::addQuadCurveTo(const FloatPoint& cp, const FloatPoint& p)
 199void Path::addQuadCurveTo(const GraphicsPoint& cp, const GraphicsPoint& p)
200200{
201201 CGPathAddQuadCurveToPoint(m_path, 0, cp.x(), cp.y(), p.x(), p.y());
202202}
203203
204 void Path::addBezierCurveTo(const FloatPoint& cp1, const FloatPoint& cp2, const FloatPoint& p)
 204void Path::addBezierCurveTo(const GraphicsPoint& cp1, const GraphicsPoint& cp2, const GraphicsPoint& p)
205205{
206206 CGPathAddCurveToPoint(m_path, 0, cp1.x(), cp1.y(), cp2.x(), cp2.y(), p.x(), p.y());
207207}
208208
209 void Path::addArcTo(const FloatPoint& p1, const FloatPoint& p2, float radius)
 209void Path::addArcTo(const GraphicsPoint& p1, const GraphicsPoint& p2, float radius)
210210{
211211 CGPathAddArcToPoint(m_path, 0, p1.x(), p1.y(), p2.x(), p2.y(), radius);
212212}

216216 CGPathCloseSubpath(m_path);
217217}
218218
219 void Path::addArc(const FloatPoint& p, float r, float sa, float ea, bool clockwise)
 219void Path::addArc(const GraphicsPoint& p, float r, float sa, float ea, bool clockwise)
220220{
221221 // Workaround for <rdar://problem/5189233> CGPathAddArc hangs or crashes when passed inf as start or end angle
222222 if (isfinite(sa) && isfinite(ea))
223223 CGPathAddArc(m_path, 0, p.x(), p.y(), r, sa, ea, clockwise);
224224}
225225
226 void Path::addRect(const FloatRect& r)
 226void Path::addRect(const GraphicsRect& r)
227227{
228228 CGPathAddRect(m_path, 0, r);
229229}
230230
231 void Path::addEllipse(const FloatRect& r)
 231void Path::addEllipse(const GraphicsRect& r)
232232{
233233 CGPathAddEllipseInRect(m_path, 0, r);
234234}

249249 return !isEmpty();
250250}
251251
252 FloatPoint Path::currentPoint() const
 252GraphicsPoint Path::currentPoint() const
253253{
254254 return CGPathGetCurrentPoint(m_path);
255255}

265265static void CGPathApplierToPathApplier(void *info, const CGPathElement *element)
266266{
267267 PathApplierInfo* pinfo = (PathApplierInfo*)info;
268  FloatPoint points[3];
 268 GraphicsPoint points[3];
269269 PathElement pelement;
270270 pelement.type = (PathElementType)element->type;
271271 pelement.points = points;
90929

Source/WebCore/platform/graphics/cg/GradientCG.cpp

103103}
104104#endif
105105
106 void Gradient::fill(GraphicsContext* context, const FloatRect& rect)
 106void Gradient::fill(GraphicsContext* context, const GraphicsRect& rect)
107107{
108108 context->clip(rect);
109109 paint(context);
90929

Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp

155155 return m_document ? CGPDFDocumentGetNumberOfPages(m_document) : 0;
156156}
157157
158 void PDFDocumentImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator op)
 158void PDFDocumentImage::draw(GraphicsContext* context, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace, CompositeOperator op)
159159{
160160 if (!m_document || m_currentPage == -1)
161161 return;
90929

Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

170170 if (oldFillColor != strokeColor())
171171 setCGFillColor(context, strokeColor(), strokeColorSpace());
172172 CGRect rects[4] = {
173  FloatRect(rect.x(), rect.y(), rect.width(), 1),
174  FloatRect(rect.x(), rect.maxY() - 1, rect.width(), 1),
175  FloatRect(rect.x(), rect.y() + 1, 1, rect.height() - 2),
176  FloatRect(rect.maxX() - 1, rect.y() + 1, 1, rect.height() - 2)
 173 GraphicsRect(rect.x(), rect.y(), rect.width(), 1),
 174 GraphicsRect(rect.x(), rect.maxY() - 1, rect.width(), 1),
 175 GraphicsRect(rect.x(), rect.y() + 1, 1, rect.height() - 2),
 176 GraphicsRect(rect.maxX() - 1, rect.y() + 1, 1, rect.height() - 2)
177177 };
178178 CGContextFillRects(context, rects, 4);
179179 if (oldFillColor != strokeColor())

192192
193193 float width = strokeThickness();
194194
195  FloatPoint p1 = point1;
196  FloatPoint p2 = point2;
 195 GraphicsPoint p1 = point1;
 196 GraphicsPoint p2 = point2;
197197 bool isVerticalLine = (p1.x() == p2.x());
198198
199199 // For odd widths, we add in 0.5 to the appropriate x/y so that the float arithmetic

247247 // appearance of being a border. We then draw the actual dotted/dashed line.
248248 setCGFillColor(context, strokeColor(), strokeColorSpace()); // The save/restore make it safe to mutate the fill color here without setting it back to the old color.
249249 if (isVerticalLine) {
250  CGContextFillRect(context, FloatRect(p1.x() - width / 2, p1.y() - width, width, width));
251  CGContextFillRect(context, FloatRect(p2.x() - width / 2, p2.y(), width, width));
 250 CGContextFillRect(context, GraphicsRect(p1.x() - width / 2, p1.y() - width, width, width));
 251 CGContextFillRect(context, GraphicsRect(p2.x() - width / 2, p2.y(), width, width));
252252 } else {
253  CGContextFillRect(context, FloatRect(p1.x() - width, p1.y() - width / 2, width, width));
254  CGContextFillRect(context, FloatRect(p2.x(), p2.y() - width / 2, width, width));
 253 CGContextFillRect(context, GraphicsRect(p1.x() - width, p1.y() - width / 2, width, width));
 254 CGContextFillRect(context, GraphicsRect(p2.x(), p2.y() - width / 2, width, width));
255255 }
256256
257257 // Example: 80 pixels with a width of 30 pixels.

329329 float reverseScaleFactor = w / h;
330330
331331 if (w != h)
332  scale(FloatSize(1, scaleFactor));
 332 scale(GraphicsSize(1, scaleFactor));
333333
334334 float hRadius = w / 2;
335335 float vRadius = h / 2;

340340 CGContextAddArc(context, x + hRadius, (y + vRadius) * reverseScaleFactor, hRadius, start, end, true);
341341
342342 if (w != h)
343  scale(FloatSize(1, reverseScaleFactor));
 343 scale(GraphicsSize(1, reverseScaleFactor));
344344
345345 float width = strokeThickness();
346346 int patWidth = 0;

399399 CGContextRestoreGState(context);
400400}
401401
402 static void addConvexPolygonToPath(Path& path, size_t numberOfPoints, const FloatPoint* points)
 402static void addConvexPolygonToPath(Path& path, size_t numberOfPoints, const GraphicsPoint* points)
403403{
404404 ASSERT(numberOfPoints > 0);
405405

409409 path.closeSubpath();
410410}
411411
412 void GraphicsContext::drawConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialiased)
 412void GraphicsContext::drawConvexPolygon(size_t numberOfPoints, const GraphicsPoint* points, bool antialiased)
413413{
414414 if (paintingDisabled())
415415 return;

430430 CGContextSetShouldAntialias(context, shouldAntialias());
431431}
432432
433 void GraphicsContext::clipConvexPolygon(size_t numberOfPoints, const FloatPoint* points, bool antialias)
 433void GraphicsContext::clipConvexPolygon(size_t numberOfPoints, const GraphicsPoint* points, bool antialias)
434434{
435435 if (paintingDisabled())
436436 return;

554554
555555 if (m_state.fillGradient) {
556556 if (hasShadow()) {
557  FloatRect rect = path.boundingRect();
 557 GraphicsRect rect = path.boundingRect();
558558 CGLayerRef layer = CGLayerCreateWithContext(context, CGSizeMake(rect.width(), rect.height()), 0);
559559 CGContextRef layerContext = CGLayerGetContext(layer);
560560

609609
610610 if (m_state.strokeGradient) {
611611 if (hasShadow()) {
612  FloatRect rect = path.boundingRect();
 612 GraphicsRect rect = path.boundingRect();
613613 float lineWidth = strokeThickness();
614614 float doubleLineWidth = lineWidth * 2;
615615 float layerWidth = ceilf(rect.width() + doubleLineWidth);

662662 return state.shadowColor.isValid() && state.shadowColor.alpha() && state.shadowBlur;
663663}
664664
665 void GraphicsContext::fillRect(const FloatRect& rect)
 665void GraphicsContext::fillRect(const GraphicsRect& rect)
666666{
667667 if (paintingDisabled())
668668 return;

702702 CGContextSaveGState(context);
703703 CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
704704
705  ShadowBlur contextShadow(FloatSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
 705 ShadowBlur contextShadow(GraphicsSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
706706 contextShadow.drawRectShadow(this, rect, RoundedRect::Radii());
707707 }
708708

712712 CGContextRestoreGState(context);
713713}
714714
715 void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace colorSpace)
 715void GraphicsContext::fillRect(const GraphicsRect& rect, const Color& color, ColorSpace colorSpace)
716716{
717717 if (paintingDisabled())
718718 return;

731731 CGContextSaveGState(context);
732732 CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
733733
734  ShadowBlur contextShadow(FloatSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
 734 ShadowBlur contextShadow(GraphicsSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
735735 contextShadow.drawRectShadow(this, rect, RoundedRect::Radii());
736736 }
737737

764764 CGContextSaveGState(context);
765765 CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
766766
767  ShadowBlur contextShadow(FloatSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
 767 ShadowBlur contextShadow(GraphicsSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
768768 contextShadow.drawRectShadow(this, rect, RoundedRect::Radii(topLeft, topRight, bottomLeft, bottomRight));
769769 }
770770

817817 CGContextSaveGState(context);
818818 CGContextSetShadowWithColor(platformContext(), CGSizeZero, 0, 0);
819819
820  ShadowBlur contextShadow(FloatSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
 820 ShadowBlur contextShadow(GraphicsSize(shadowBlur, shadowBlur), m_state.shadowOffset, m_state.shadowColor, m_state.shadowColorSpace);
821821 contextShadow.drawInsetShadow(this, rect, roundedHoleRect.rect(), roundedHoleRect.radii());
822822 }
823823

830830 setFillColor(oldFillColor, oldFillColorSpace);
831831}
832832
833 void GraphicsContext::clip(const FloatRect& rect)
 833void GraphicsContext::clip(const GraphicsRect& rect)
834834{
835835 if (paintingDisabled())
836836 return;

915915 restore();
916916}
917917
918 void GraphicsContext::setPlatformShadow(const FloatSize& offset, float blur, const Color& color, ColorSpace colorSpace)
 918void GraphicsContext::setPlatformShadow(const GraphicsSize& offset, float blur, const Color& color, ColorSpace colorSpace)
919919{
920920 if (paintingDisabled())
921921 return;

990990 CGContextSetAlpha(platformContext(), alpha);
991991}
992992
993 void GraphicsContext::clearRect(const FloatRect& r)
 993void GraphicsContext::clearRect(const GraphicsRect& r)
994994{
995995 if (paintingDisabled())
996996 return;
997997 CGContextClearRect(platformContext(), r);
998998}
999999
1000 void GraphicsContext::strokeRect(const FloatRect& rect, float lineWidth)
 1000void GraphicsContext::strokeRect(const GraphicsRect& rect, float lineWidth)
10011001{
10021002 if (paintingDisabled())
10031003 return;

11241124 CGContextEOClip(platformContext());
11251125}
11261126
1127 void GraphicsContext::scale(const FloatSize& size)
 1127void GraphicsContext::scale(const GraphicsSize& size)
11281128{
11291129 if (paintingDisabled())
11301130 return;

11751175 return AffineTransform(t.a, t.b, t.c, t.d, t.tx, t.ty);
11761176}
11771177
1178 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect, RoundingMode roundingMode)
 1178GraphicsRect GraphicsContext::roundToDevicePixels(const GraphicsRect& rect, RoundingMode roundingMode)
11791179{
11801180#if PLATFORM(CHROMIUM)
11811181 return rect;

12171217 if (deviceOrigin.x == deviceLowerRight.x && rect.width())
12181218 deviceLowerRight.x += 1;
12191219
1220  FloatPoint roundedOrigin = FloatPoint(deviceOrigin.x / deviceScaleX, deviceOrigin.y / deviceScaleY);
1221  FloatPoint roundedLowerRight = FloatPoint(deviceLowerRight.x / deviceScaleX, deviceLowerRight.y / deviceScaleY);
1222  return FloatRect(roundedOrigin, roundedLowerRight - roundedOrigin);
 1220 GraphicsPoint roundedOrigin = GraphicsPoint(deviceOrigin.x / deviceScaleX, deviceOrigin.y / deviceScaleY);
 1221 GraphicsPoint roundedLowerRight = GraphicsPoint(deviceLowerRight.x / deviceScaleX, deviceLowerRight.y / deviceScaleY);
 1222 return GraphicsRect(roundedOrigin, roundedLowerRight - roundedOrigin);
12231223#endif
12241224}
12251225
1226 void GraphicsContext::drawLineForText(const FloatPoint& point, float width, bool printing)
 1226void GraphicsContext::drawLineForText(const GraphicsPoint& point, float width, bool printing)
12271227{
12281228 if (paintingDisabled())
12291229 return;

12491249 // We try to round all parameters to integer boundaries in device space. If rounding pixels in device space
12501250 // makes our thickness more than double, then there must be a shrinking-scale factor and rounding to pixels
12511251 // in device space will make the underlines too thick.
1252  CGRect lineRect = roundToDevicePixels(FloatRect(x, y, lineLength, adjustedThickness), RoundOriginAndDimensions);
 1252 CGRect lineRect = roundToDevicePixels(GraphicsRect(x, y, lineLength, adjustedThickness), RoundOriginAndDimensions);
12531253 if (lineRect.size.height < thickness * 2.0) {
12541254 x = lineRect.origin.x;
12551255 y = lineRect.origin.y;
90929

Source/WebCore/platform/graphics/cg/PDFDocumentImage.h

2626#ifndef PDFDocumentImage_h
2727#define PDFDocumentImage_h
2828
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "GraphicsTypes.h"
3131#include "Image.h"
3232

6262 virtual IntSize size() const;
6363
6464 PDFDocumentImage();
65  virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
 65 virtual void draw(GraphicsContext*, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
6666
6767 void setCurrentPage(int);
6868 int pageCount() const;
6969 void adjustCTM(GraphicsContext*) const;
7070
7171 CGPDFDocumentRef m_document;
72  FloatRect m_mediaBox;
73  FloatRect m_cropBox;
 72 GraphicsRect m_mediaBox;
 73 GraphicsRect m_cropBox;
7474 float m_rotation;
7575 int m_currentPage;
7676 };
90929

Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h

6464 void save() {}
6565 void restore() {}
6666 void flush() {}
67  void clip(const FloatRect&) {}
 67 void clip(const GraphicsRect&) {}
6868 void clip(const Path&) {}
69  void scale(const FloatSize&) {}
 69 void scale(const GraphicsSize&) {}
7070 void rotate(float) {}
7171 void translate(float, float) {}
7272 void concatCTM(const AffineTransform&) {}

7878 void save();
7979 void restore();
8080 void flush();
81  void clip(const FloatRect&);
 81 void clip(const GraphicsRect&);
8282 void clip(const Path&);
83  void scale(const FloatSize&);
 83 void scale(const GraphicsSize&);
8484 void rotate(float);
8585 void translate(float, float);
8686 void concatCTM(const AffineTransform&);
90929

Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp

158158 return;
159159
160160 m_context= adoptPtr(new GraphicsContext(cgContext.get()));
161  m_context->scale(FloatSize(1, -1));
 161 m_context->scale(GraphicsSize(1, -1));
162162 m_context->translate(0, -size.height());
163163 success = true;
164164}

201201 data.m_colorSpace, data.m_bitmapInfo, data.m_dataProvider.get(), 0, true, kCGRenderingIntentDefault);
202202}
203203
204 void ImageBuffer::draw(GraphicsContext* destContext, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
 204void ImageBuffer::draw(GraphicsContext* destContext, ColorSpace styleColorSpace, const GraphicsRect& destRect, const GraphicsRect& srcRect,
205205 CompositeOperator op, bool useLowQualityScale)
206206{
207207 if (!m_accelerateRendering) {

220220 }
221221}
222222
223 void ImageBuffer::drawPattern(GraphicsContext* destContext, const FloatRect& srcRect, const AffineTransform& patternTransform,
224  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
 223void ImageBuffer::drawPattern(GraphicsContext* destContext, const GraphicsRect& srcRect, const AffineTransform& patternTransform,
 224 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const GraphicsRect& destRect)
225225{
226226 if (!m_accelerateRendering) {
227227 if (destContext == context()) {

238238 }
239239}
240240
241 void ImageBuffer::clip(GraphicsContext* contextToClip, const FloatRect& rect) const
 241void ImageBuffer::clip(GraphicsContext* contextToClip, const GraphicsRect& rect) const
242242{
243243 CGContextRef platformContextToClip = contextToClip->platformContext();
244244 RetainPtr<CGImageRef> image;

250250#endif
251251 CGContextTranslateCTM(platformContextToClip, rect.x(), rect.y() + rect.height());
252252 CGContextScaleCTM(platformContextToClip, 1, -1);
253  CGContextClipToMask(platformContextToClip, FloatRect(FloatPoint(), rect.size()), image.get());
 253 CGContextClipToMask(platformContextToClip, GraphicsRect(GraphicsPoint(), rect.size()), image.get());
254254 CGContextScaleCTM(platformContextToClip, 1, -1);
255255 CGContextTranslateCTM(platformContextToClip, -rect.x(), -rect.y() - rect.height());
256256}
90929

Source/WebCore/platform/graphics/cg/PatternCG.cpp

4141 return;
4242
4343 CGRect rect = GraphicsContext(context).roundToDevicePixels(
44  FloatRect(0, 0, CGImageGetWidth(platformImage), CGImageGetHeight(platformImage)));
 44 GraphicsRect(0, 0, CGImageGetWidth(platformImage), CGImageGetHeight(platformImage)));
4545 CGContextDrawImage(context, rect, platformImage);
4646}
4747
90929

Source/WebCore/platform/graphics/cg/ImageCG.cpp

3030
3131#include "AffineTransform.h"
3232#include "FloatConversion.h"
33 #include "FloatRect.h"
 33#include "GraphicsRect.h"
3434#include "GraphicsContextCG.h"
3535#include "ImageObserver.h"
3636#include "PDFDocumentImage.h"

182182 return RetainPtr<CFArrayRef>(AdoptCF, array);
183183}
184184
185 void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& destRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp)
 185void BitmapImage::draw(GraphicsContext* ctxt, const GraphicsRect& destRect, const GraphicsRect& srcRect, ColorSpace styleColorSpace, CompositeOperator compositeOp)
186186{
187187 startAnimation();
188188

195195 return;
196196 }
197197
198  float currHeight = CGImageGetHeight(image.get());
 198 GraphicsUnit currHeight = CGImageGetHeight(image.get());
199199 if (currHeight <= srcRect.y())
200200 return;
201201

206206
207207 // If the source rect is a subportion of the image, then we compute an inflated destination rect that will hold the entire image
208208 // and then set a clip to the portion that we want to display.
209  FloatRect adjustedDestRect = destRect;
210  FloatSize selfSize = currentFrameSize();
 209 GraphicsRect adjustedDestRect = destRect;
 210 GraphicsSize selfSize = currentFrameSize();
211211 if (srcRect.size() != selfSize) {
212212 CGInterpolationQuality interpolationQuality = CGContextGetInterpolationQuality(context);
213213 // When the image is scaled using high-quality interpolation, we create a temporary CGImage

215215 // interpolation smoothes sharp edges, causing pixels from outside the source rect to bleed
216216 // into the destination rect. See <rdar://problem/6112909>.
217217 shouldUseSubimage = (interpolationQuality != kCGInterpolationNone) && (srcRect.size() != destRect.size() || !ctxt->getCTM().isIdentityOrTranslationOrFlipped());
218  float xScale = srcRect.width() / destRect.width();
219  float yScale = srcRect.height() / destRect.height();
 218 GraphicsUnit xScale = srcRect.width() / destRect.width();
 219 GraphicsUnit yScale = srcRect.height() / destRect.height();
220220 if (shouldUseSubimage) {
221  FloatRect subimageRect = srcRect;
222  float leftPadding = srcRect.x() - floorf(srcRect.x());
223  float topPadding = srcRect.y() - floorf(srcRect.y());
 221 GraphicsRect subimageRect = srcRect;
 222 GraphicsUnit leftPadding = srcRect.x() - floor(srcRect.x());
 223 GraphicsUnit topPadding = srcRect.y() - floor(srcRect.y());
224224
225225 subimageRect.move(-leftPadding, -topPadding);
226226 adjustedDestRect.move(-leftPadding / xScale, -topPadding / yScale);

237237 adjustedDestRect.setHeight(CGImageGetHeight(image.get()) / yScale);
238238 }
239239 } else {
240  adjustedDestRect.setLocation(FloatPoint(destRect.x() - srcRect.x() / xScale, destRect.y() - srcRect.y() / yScale));
241  adjustedDestRect.setSize(FloatSize(selfSize.width() / xScale, selfSize.height() / yScale));
 240 adjustedDestRect.setLocation(GraphicsPoint(destRect.x() - srcRect.x() / xScale, destRect.y() - srcRect.y() / yScale));
 241 adjustedDestRect.setSize(GraphicsSize(selfSize.width() / xScale, selfSize.height() / yScale));
242242 }
243243
244244 if (!destRect.contains(adjustedDestRect))

270270static void drawPatternCallback(void* info, CGContextRef context)
271271{
272272 CGImageRef image = (CGImageRef)info;
273  CGContextDrawImage(context, GraphicsContext(context).roundToDevicePixels(FloatRect(0, 0, CGImageGetWidth(image), CGImageGetHeight(image))), image);
 273 CGContextDrawImage(context, GraphicsContext(context).roundToDevicePixels(GraphicsRect(0, 0, CGImageGetWidth(image), CGImageGetHeight(image))), image);
274274}
275275
276 void Image::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRect, const AffineTransform& patternTransform,
277  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
 276void Image::drawPattern(GraphicsContext* ctxt, const GraphicsRect& tileRect, const AffineTransform& patternTransform,
 277 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const GraphicsRect& destRect)
278278{
279279 if (!nativeImageForCurrentFrame())
280280 return;

292292 CGContextScaleCTM(context, 1, -1);
293293
294294 // Compute the scaled tile size.
295  float scaledTileHeight = tileRect.height() * narrowPrecisionToFloat(patternTransform.d());
 295 GraphicsUnit scaledTileHeight = tileRect.height() * narrowPrecisionToGraphicsUnit(patternTransform.d());
296296
297297 // We have to adjust the phase to deal with the fact we're in Cartesian space now (with the bottom left corner of destRect being
298298 // the origin).
299  float adjustedX = phase.x() - destRect.x() + tileRect.x() * narrowPrecisionToFloat(patternTransform.a()); // We translated the context so that destRect.x() is the origin, so subtract it out.
300  float adjustedY = destRect.height() - (phase.y() - destRect.y() + tileRect.y() * narrowPrecisionToFloat(patternTransform.d()) + scaledTileHeight);
 299 GraphicsUnit adjustedX = phase.x() - destRect.x() + tileRect.x() * narrowPrecisionToGraphicsUnit(patternTransform.a()); // We translated the context so that destRect.x() is the origin, so subtract it out.
 300 GraphicsUnit adjustedY = destRect.height() - (phase.y() - destRect.y() + tileRect.y() * narrowPrecisionToGraphicsUnit(patternTransform.d()) + scaledTileHeight);
301301
302302 CGImageRef tileImage = nativeImageForCurrentFrame();
303  float h = CGImageGetHeight(tileImage);
 303 GraphicsUnit h = CGImageGetHeight(tileImage);
304304
305305 RetainPtr<CGImageRef> subImage;
306306 if (tileRect.size() == size())

319319 // its buffer is the same size as the overall image. Because a partially decoded CGImageRef with a smaller width or height than the
320320 // overall image buffer needs to tile with "gaps", we can't use the optimized tiling call in that case.
321321 // FIXME: We cannot use CGContextDrawTiledImage with scaled tiles on Leopard, because it suffers from rounding errors. Snow Leopard is ok.
322  float scaledTileWidth = tileRect.width() * narrowPrecisionToFloat(patternTransform.a());
323  float w = CGImageGetWidth(tileImage);
 322 GraphicsUnit scaledTileWidth = tileRect.width() * narrowPrecisionToGraphicsUnit(patternTransform.a());
 323 GraphicsUnit w = CGImageGetWidth(tileImage);
324324#ifdef BUILDING_ON_LEOPARD
325325 if (w == size().width() && h == size().height() && scaledTileWidth == tileRect.width() && scaledTileHeight == tileRect.height())
326326#else
327327 if (w == size().width() && h == size().height())
328328#endif
329  CGContextDrawTiledImage(context, FloatRect(adjustedX, adjustedY, scaledTileWidth, scaledTileHeight), subImage.get());
 329 CGContextDrawTiledImage(context, GraphicsRect(adjustedX, adjustedY, scaledTileWidth, scaledTileHeight), subImage.get());
330330 else {
331331
332332 // On Leopard and newer, this code now only runs for partially decoded images whose buffers do not yet match the overall size of the image.
90929

Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h

2828
2929#if ENABLE(VIDEO) && USE(AVFOUNDATION)
3030
31 #include "FloatSize.h"
 31#include "GraphicsSize.h"
3232#include "MediaPlayerPrivate.h"
3333#include "Timer.h"
3434#include <wtf/RetainPtr.h>

251251
252252 String m_assetURL;
253253 MediaPlayer::Preload m_preload;
254  FloatSize m_scaleFactor;
 254 GraphicsSize m_scaleFactor;
255255
256256 IntSize m_cachedNaturalSize;
257257 mutable float m_cachedMaxTimeLoaded;
90929

Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm

607607 if (image) {
608608 GraphicsContextStateSaver stateSaver(*context);
609609 context->translate(rect.x(), rect.y() + rect.height());
610  context->scale(FloatSize(1.0f, -1.0f));
 610 context->scale(GraphicsSize(1.0f, -1.0f));
611611 context->setImageInterpolationQuality(InterpolationLow);
612612 IntRect paintRect(IntPoint(0, 0), IntSize(rect.width(), rect.height()));
613613 CGContextDrawImage(context->platformContext(), CGRectMake(0, 0, paintRect.width(), paintRect.height()), image.get());
90929

Source/WebCore/platform/graphics/IntRect.h

7272
7373namespace WebCore {
7474
75 class FloatRect;
 75class GraphicsRect;
7676
7777class IntRect {
7878public:

8282 IntRect(int x, int y, int width, int height)
8383 : m_location(IntPoint(x, y)), m_size(IntSize(width, height)) { }
8484
85  explicit IntRect(const FloatRect& rect); // don't do this implicitly since it's lossy
 85 explicit IntRect(const GraphicsRect& rect); // don't do this implicitly since it's lossy
8686
8787 IntPoint location() const { return m_location; }
8888 IntSize size() const { return m_size; }
90929

Source/WebCore/platform/graphics/PathTraversalState.h

2626#ifndef PathTraversalState_h
2727#define PathTraversalState_h
2828
29 #include "FloatPoint.h"
 29#include "GraphicsPoint.h"
3030
3131namespace WebCore {
3232

4242 PathTraversalState(PathTraversalAction);
4343
4444 float closeSubpath();
45  float moveTo(const FloatPoint&);
46  float lineTo(const FloatPoint&);
47  float quadraticBezierTo(const FloatPoint& newControl, const FloatPoint& newEnd);
48  float cubicBezierTo(const FloatPoint& newControl1, const FloatPoint& newControl2, const FloatPoint& newEnd);
 45 float moveTo(const GraphicsPoint&);
 46 float lineTo(const GraphicsPoint&);
 47 float quadraticBezierTo(const GraphicsPoint& newControl, const GraphicsPoint& newEnd);
 48 float cubicBezierTo(const GraphicsPoint& newControl1, const GraphicsPoint& newControl2, const GraphicsPoint& newEnd);
4949
5050 void processSegment();
5151

5353 PathTraversalAction m_action;
5454 bool m_success;
5555
56  FloatPoint m_current;
57  FloatPoint m_start;
58  FloatPoint m_control1;
59  FloatPoint m_control2;
 56 GraphicsPoint m_current;
 57 GraphicsPoint m_start;
 58 GraphicsPoint m_control1;
 59 GraphicsPoint m_control2;
6060
6161 float m_totalLength;
6262 unsigned m_segmentIndex;
6363 float m_desiredLength;
6464
6565 // For normal calculations
66  FloatPoint m_previous;
 66 GraphicsPoint m_previous;
6767 float m_normalAngle; // degrees
6868};
6969}
90929

Source/WebCore/platform/graphics/Path.cpp

2929#include "config.h"
3030#include "Path.h"
3131
32 #include "FloatPoint.h"
33 #include "FloatRect.h"
 32#include "GraphicsPoint.h"
 33#include "GraphicsRect.h"
3434#include "PathTraversalState.h"
3535#include <math.h>
3636#include <wtf/MathExtras.h>

4343 PathTraversalState& traversalState = *static_cast<PathTraversalState*>(info);
4444 if (traversalState.m_success)
4545 return;
46  FloatPoint* points = element->points;
 46 GraphicsPoint* points = element->points;
4747 float segmentLength = 0;
4848 switch (element->type) {
4949 case PathElementMoveToPoint:

7373 return traversalState.m_totalLength;
7474}
7575
76 FloatPoint Path::pointAtLength(float length, bool& ok) const
 76GraphicsPoint Path::pointAtLength(float length, bool& ok) const
7777{
7878 PathTraversalState traversalState(PathTraversalState::TraversalPointAtLength);
7979 traversalState.m_desiredLength = length;

9797 addRoundedRect(r.rect(), r.radii().topLeft(), r.radii().topRight(), r.radii().bottomLeft(), r.radii().bottomRight());
9898}
9999
100 void Path::addRoundedRect(const FloatRect& rect, const FloatSize& roundingRadii)
 100void Path::addRoundedRect(const GraphicsRect& rect, const GraphicsSize& roundingRadii)
101101{
102102 if (rect.isEmpty())
103103 return;
104104
105  FloatSize radius(roundingRadii);
106  FloatSize halfSize(rect.width() / 2, rect.height() / 2);
 105 GraphicsSize radius(roundingRadii);
 106 GraphicsSize halfSize(rect.width() / 2, rect.height() / 2);
107107
108108 // If rx is greater than half of the width of the rectangle
109109 // then set rx to half of the width (required in SVG spec)

118118 addBeziersForRoundedRect(rect, radius, radius, radius, radius);
119119}
120120
121 void Path::addRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius)
 121void Path::addRoundedRect(const GraphicsRect& rect, const GraphicsSize& topLeftRadius, const GraphicsSize& topRightRadius, const GraphicsSize& bottomLeftRadius, const GraphicsSize& bottomRightRadius)
122122{
123123 if (rect.isEmpty())
124124 return;

139139// This is 1-kappa, where kappa = 4 * (sqrt(2) - 1) / 3
140140static const float gCircleControlPoint = 0.447715f;
141141
142 void Path::addBeziersForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius)
 142void Path::addBeziersForRoundedRect(const GraphicsRect& rect, const GraphicsSize& topLeftRadius, const GraphicsSize& topRightRadius, const GraphicsSize& bottomLeftRadius, const GraphicsSize& bottomRightRadius)
143143{
144  moveTo(FloatPoint(rect.x() + topLeftRadius.width(), rect.y()));
 144 moveTo(GraphicsPoint(rect.x() + topLeftRadius.width(), rect.y()));
145145
146  addLineTo(FloatPoint(rect.maxX() - topRightRadius.width(), rect.y()));
147  addBezierCurveTo(FloatPoint(rect.maxX() - topRightRadius.width() * gCircleControlPoint, rect.y()),
148  FloatPoint(rect.maxX(), rect.y() + topRightRadius.height() * gCircleControlPoint),
149  FloatPoint(rect.maxX(), rect.y() + topRightRadius.height()));
150  addLineTo(FloatPoint(rect.maxX(), rect.maxY() - bottomRightRadius.height()));
151  addBezierCurveTo(FloatPoint(rect.maxX(), rect.maxY() - bottomRightRadius.height() * gCircleControlPoint),
152  FloatPoint(rect.maxX() - bottomRightRadius.width() * gCircleControlPoint, rect.maxY()),
153  FloatPoint(rect.maxX() - bottomRightRadius.width(), rect.maxY()));
154  addLineTo(FloatPoint(rect.x() + bottomLeftRadius.width(), rect.maxY()));
155  addBezierCurveTo(FloatPoint(rect.x() + bottomLeftRadius.width() * gCircleControlPoint, rect.maxY()),
156  FloatPoint(rect.x(), rect.maxY() - bottomLeftRadius.height() * gCircleControlPoint),
157  FloatPoint(rect.x(), rect.maxY() - bottomLeftRadius.height()));
158  addLineTo(FloatPoint(rect.x(), rect.y() + topLeftRadius.height()));
159  addBezierCurveTo(FloatPoint(rect.x(), rect.y() + topLeftRadius.height() * gCircleControlPoint),
160  FloatPoint(rect.x() + topLeftRadius.width() * gCircleControlPoint, rect.y()),
161  FloatPoint(rect.x() + topLeftRadius.width(), rect.y()));
 146 addLineTo(GraphicsPoint(rect.maxX() - topRightRadius.width(), rect.y()));
 147 addBezierCurveTo(GraphicsPoint(rect.maxX() - topRightRadius.width() * gCircleControlPoint, rect.y()),
 148 GraphicsPoint(rect.maxX(), rect.y() + topRightRadius.height() * gCircleControlPoint),
 149 GraphicsPoint(rect.maxX(), rect.y() + topRightRadius.height()));
 150 addLineTo(GraphicsPoint(rect.maxX(), rect.maxY() - bottomRightRadius.height()));
 151 addBezierCurveTo(GraphicsPoint(rect.maxX(), rect.maxY() - bottomRightRadius.height() * gCircleControlPoint),
 152 GraphicsPoint(rect.maxX() - bottomRightRadius.width() * gCircleControlPoint, rect.maxY()),
 153 GraphicsPoint(rect.maxX() - bottomRightRadius.width(), rect.maxY()));
 154 addLineTo(GraphicsPoint(rect.x() + bottomLeftRadius.width(), rect.maxY()));
 155 addBezierCurveTo(GraphicsPoint(rect.x() + bottomLeftRadius.width() * gCircleControlPoint, rect.maxY()),
 156 GraphicsPoint(rect.x(), rect.maxY() - bottomLeftRadius.height() * gCircleControlPoint),
 157 GraphicsPoint(rect.x(), rect.maxY() - bottomLeftRadius.height()));
 158 addLineTo(GraphicsPoint(rect.x(), rect.y() + topLeftRadius.height()));
 159 addBezierCurveTo(GraphicsPoint(rect.x(), rect.y() + topLeftRadius.height() * gCircleControlPoint),
 160 GraphicsPoint(rect.x() + topLeftRadius.width() * gCircleControlPoint, rect.y()),
 161 GraphicsPoint(rect.x() + topLeftRadius.width(), rect.y()));
162162
163163 closeSubpath();
164164}
90929

Source/WebCore/platform/graphics/Gradient.cpp

2828#include "Gradient.h"
2929
3030#include "Color.h"
31 #include "FloatRect.h"
 31#include "GraphicsRect.h"
3232#include <wtf/UnusedParam.h>
3333
3434namespace WebCore {
3535
36 Gradient::Gradient(const FloatPoint& p0, const FloatPoint& p1)
 36Gradient::Gradient(const GraphicsPoint& p0, const GraphicsPoint& p1)
3737 : m_radial(false)
3838 , m_p0(p0)
3939 , m_p1(p1)

4747 platformInit();
4848}
4949
50 Gradient::Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, float aspectRatio)
 50Gradient::Gradient(const GraphicsPoint& p0, float r0, const GraphicsPoint& p1, float r1, float aspectRatio)
5151 : m_radial(true)
5252 , m_p0(p0)
5353 , m_p1(p1)

6666 platformDestroy();
6767}
6868
69 void Gradient::adjustParametersForTiledDrawing(IntSize& size, FloatRect& srcRect)
 69void Gradient::adjustParametersForTiledDrawing(IntSize& size, GraphicsRect& srcRect)
7070{
7171 if (m_radial)
7272 return;
90929

Source/WebCore/platform/graphics/Font.cpp

2424#include "config.h"
2525#include "Font.h"
2626
27 #include "FloatRect.h"
 27#include "GraphicsRect.h"
2828#include "FontCache.h"
2929#include "FontTranscoder.h"
3030#if PLATFORM(QT) && HAVE(QRAWFONT)

138138 m_fontList->invalidate(fontSelector);
139139}
140140
141 void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
 141void Font::drawText(GraphicsContext* context, const TextRun& run, const GraphicsPoint& point, int from, int to) const
142142{
143143 // Don't draw anything while we are using custom fonts that are in the process of loading.
144144 if (loadingCustomFonts())

159159 return drawComplexText(context, run, point, from, to);
160160}
161161
162 void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
 162void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const GraphicsPoint& point, int from, int to) const
163163{
164164 if (loadingCustomFonts())
165165 return;

202202 return floatWidthForComplexText(run);
203203}
204204
205 FloatRect Font::selectionRectForText(const TextRun& run, const FloatPoint& point, int h, int from, int to) const
 205GraphicsRect Font::selectionRectForText(const TextRun& run, const GraphicsPoint& point, int h, int from, int to) const
206206{
207207 to = (to == -1 ? run.length() : to);
208208
90929

Source/WebCore/platform/graphics/Image.cpp

7676 return dataChanged(allDataReceived);
7777}
7878
79 void Image::fillWithSolidColor(GraphicsContext* ctxt, const FloatRect& dstRect, const Color& color, ColorSpace styleColorSpace, CompositeOperator op)
 79void Image::fillWithSolidColor(GraphicsContext* ctxt, const GraphicsRect& dstRect, const Color& color, ColorSpace styleColorSpace, CompositeOperator op)
8080{
8181 if (color.alpha() <= 0)
8282 return;

8787 ctxt->setCompositeOperation(previousOperator);
8888}
8989
90 static inline FloatSize calculatePatternScale(const FloatRect& dstRect, const FloatRect& srcRect, Image::TileRule hRule, Image::TileRule vRule)
 90static inline GraphicsSize calculatePatternScale(const GraphicsRect& dstRect, const GraphicsRect& srcRect, Image::TileRule hRule, Image::TileRule vRule)
9191{
9292 float scaleX = 1.0f, scaleY = 1.0f;
9393

101101 if (vRule == Image::RepeatTile)
102102 scaleY = scaleX;
103103
104  return FloatSize(scaleX, scaleY);
 104 return GraphicsSize(scaleX, scaleY);
105105}
106106
107107
108 void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& destRect, const FloatPoint& srcPoint, const FloatSize& scaledTileSize, ColorSpace styleColorSpace, CompositeOperator op)
 108void Image::drawTiled(GraphicsContext* ctxt, const GraphicsRect& destRect, const GraphicsPoint& srcPoint, const GraphicsSize& scaledTileSize, ColorSpace styleColorSpace, CompositeOperator op)
109109{
110110 if (mayFillWithSolidColor()) {
111111 fillWithSolidColor(ctxt, destRect, solidColor(), styleColorSpace, op);

117117 ASSERT(!isBitmapImage() || static_cast<BitmapImage*>(this)->notSolidColor());
118118#endif
119119
120  FloatSize intrinsicTileSize = size();
 120 GraphicsSize intrinsicTileSize = size();
121121 if (hasRelativeWidth())
122122 intrinsicTileSize.setWidth(scaledTileSize.width());
123123 if (hasRelativeHeight())
124124 intrinsicTileSize.setHeight(scaledTileSize.height());
125125
126  FloatSize scale(scaledTileSize.width() / intrinsicTileSize.width(),
 126 GraphicsSize scale(scaledTileSize.width() / intrinsicTileSize.width(),
127127 scaledTileSize.height() / intrinsicTileSize.height());
128128
129  FloatRect oneTileRect;
 129 GraphicsRect oneTileRect;
130130 oneTileRect.setX(destRect.x() + fmodf(fmodf(-srcPoint.x(), scaledTileSize.width()) - scaledTileSize.width(), scaledTileSize.width()));
131131 oneTileRect.setY(destRect.y() + fmodf(fmodf(-srcPoint.y(), scaledTileSize.height()) - scaledTileSize.height(), scaledTileSize.height()));
132132 oneTileRect.setSize(scaledTileSize);
133133
134134 // Check and see if a single draw of the image can cover the entire area we are supposed to tile.
135135 if (oneTileRect.contains(destRect)) {
136  FloatRect visibleSrcRect;
 136 GraphicsRect visibleSrcRect;
137137 visibleSrcRect.setX((destRect.x() - oneTileRect.x()) / scale.width());
138138 visibleSrcRect.setY((destRect.y() - oneTileRect.y()) / scale.height());
139139 visibleSrcRect.setWidth(destRect.width() / scale.width());

143143 }
144144
145145 AffineTransform patternTransform = AffineTransform().scaleNonUniform(scale.width(), scale.height());
146  FloatRect tileRect(FloatPoint(), intrinsicTileSize);
 146 GraphicsRect tileRect(GraphicsPoint(), intrinsicTileSize);
147147 drawPattern(ctxt, tileRect, patternTransform, oneTileRect.location(), styleColorSpace, op, destRect);
148148
149149 startAnimation();
150150}
151151
152152// FIXME: Merge with the other drawTiled eventually, since we need a combination of both for some things.
153 void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator op)
 153void Image::drawTiled(GraphicsContext* ctxt, const GraphicsRect& dstRect, const GraphicsRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator op)
154154{
155155 if (mayFillWithSolidColor()) {
156156 fillWithSolidColor(ctxt, dstRect, solidColor(), styleColorSpace, op);

163163 if (vRule == RoundTile)
164164 vRule = RepeatTile;
165165
166  FloatSize scale = calculatePatternScale(dstRect, srcRect, hRule, vRule);
 166 GraphicsSize scale = calculatePatternScale(dstRect, srcRect, hRule, vRule);
167167 AffineTransform patternTransform = AffineTransform().scaleNonUniform(scale.width(), scale.height());
168168
169169 // We want to construct the phase such that the pattern is centered (when stretch is not

174174 hPhase -= fmodf(dstRect.width(), scale.width() * srcRect.width()) / 2.0f;
175175 if (vRule == Image::RepeatTile)
176176 vPhase -= fmodf(dstRect.height(), scale.height() * srcRect.height()) / 2.0f;
177  FloatPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase);
 177 GraphicsPoint patternPhase(dstRect.x() - hPhase, dstRect.y() - vPhase);
178178
179179 drawPattern(ctxt, srcRect, patternTransform, patternPhase, styleColorSpace, op, dstRect);
180180
90929

Source/WebCore/platform/graphics/WidthIterator.cpp

9999 widthSinceLastRounding -= m_runWidthSoFar;
100100
101101 float lastRoundingWidth = m_finalRoundingWidth;
102  FloatRect bounds;
 102 GraphicsRect bounds;
103103
104104 const SimpleFontData* primaryFont = m_font->primaryFont();
105105 const SimpleFontData* lastFontData = primaryFont;

238238 lastRoundingWidth = width - oldWidth;
239239
240240 if (m_accountForGlyphBounds) {
241  m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, bounds.maxY());
242  m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, bounds.y());
243  m_lastGlyphOverflow = max<float>(0, bounds.maxX() - width);
 241 m_maxGlyphBoundingBoxY = max(m_maxGlyphBoundingBoxY, static_cast<float>(bounds.maxY()));
 242 m_minGlyphBoundingBoxY = min(m_minGlyphBoundingBoxY, static_cast<float>(bounds.y()));
 243 m_lastGlyphOverflow = max<float>(0, static_cast<float>(bounds.maxX()) - width);
244244 }
245245 }
246246
90929

Source/WebCore/platform/graphics/GraphicsLayer.cpp

2929
3030#include "GraphicsLayer.h"
3131
32 #include "FloatPoint.h"
 32#include "GraphicsPoint.h"
3333#include "RotateTransformOperation.h"
3434#include "TextStream.h"
3535#include <wtf/text/CString.h>

430430
431431void GraphicsLayer::dumpProperties(TextStream& ts, int indent, LayerTreeAsTextBehavior behavior) const
432432{
433  if (m_position != FloatPoint()) {
 433 if (m_position != GraphicsPoint()) {
434434 writeIndent(ts, indent + 1);
435435 ts << "(position " << m_position.x() << " " << m_position.y() << ")\n";
436436 }
437437
438  if (m_boundsOrigin != FloatPoint()) {
 438 if (m_boundsOrigin != GraphicsPoint()) {
439439 writeIndent(ts, indent + 1);
440440 ts << "(bounds origin " << m_boundsOrigin.x() << " " << m_boundsOrigin.y() << ")\n";
441441 }
442442
443  if (m_anchorPoint != FloatPoint3D(0.5f, 0.5f, 0)) {
 443 if (m_anchorPoint != GraphicsPoint3D(0.5f, 0.5f, 0)) {
444444 writeIndent(ts, indent + 1);
445445 ts << "(anchor " << m_anchorPoint.x() << " " << m_anchorPoint.y() << ")\n";
446446 }
90929

Source/WebCore/platform/graphics/ShadowBlur.cpp

3030#include "ShadowBlur.h"
3131
3232#include "AffineTransform.h"
33 #include "FloatQuad.h"
 33#include "GraphicsQuad.h"
3434#include "GraphicsContext.h"
3535#include "ImageBuffer.h"
3636#include "Timer.h"

8383 return m_imageBuffer.get();
8484 }
8585
86  void setLastShadowValues(const FloatSize& radius, const Color& color, ColorSpace colorSpace, const FloatRect& shadowRect, const RoundedRect::Radii& radii)
 86 void setLastShadowValues(const GraphicsSize& radius, const Color& color, ColorSpace colorSpace, const GraphicsRect& shadowRect, const RoundedRect::Radii& radii)
8787 {
8888 m_lastWasInset = false;
8989 m_lastRadius = radius;

9393 m_lastRadii = radii;
9494 }
9595
96  void setLastInsetShadowValues(const FloatSize& radius, const Color& color, ColorSpace colorSpace, const FloatRect& bounds, const FloatRect& shadowRect, const RoundedRect::Radii& radii)
 96 void setLastInsetShadowValues(const GraphicsSize& radius, const Color& color, ColorSpace colorSpace, const GraphicsRect& bounds, const GraphicsRect& shadowRect, const RoundedRect::Radii& radii)
9797 {
9898 m_lastWasInset = true;
9999 m_lastInsetBounds = bounds;

104104 m_lastRadii = radii;
105105 }
106106
107  bool matchesLastShadow(const FloatSize& radius, const Color& color, ColorSpace colorSpace, const FloatRect& shadowRect, const RoundedRect::Radii& radii) const
 107 bool matchesLastShadow(const GraphicsSize& radius, const Color& color, ColorSpace colorSpace, const GraphicsRect& shadowRect, const RoundedRect::Radii& radii) const
108108 {
109109 if (m_lastWasInset)
110110 return false;
111111 return m_lastRadius == radius && m_lastColor == color && m_lastColorSpace == colorSpace && shadowRect == m_lastShadowRect && radii == m_lastRadii;
112112 }
113113
114  bool matchesLastInsetShadow(const FloatSize& radius, const Color& color, ColorSpace colorSpace, const FloatRect& bounds, const FloatRect& shadowRect, const RoundedRect::Radii& radii) const
 114 bool matchesLastInsetShadow(const GraphicsSize& radius, const Color& color, ColorSpace colorSpace, const GraphicsRect& bounds, const GraphicsRect& shadowRect, const RoundedRect::Radii& radii) const
115115 {
116116 if (!m_lastWasInset)
117117 return false;

141141 void clearScratchBuffer()
142142 {
143143 m_imageBuffer = nullptr;
144  m_lastRadius = FloatSize();
 144 m_lastRadius = GraphicsSize();
145145 }
146146
147147 OwnPtr<ImageBuffer> m_imageBuffer;
148148 Timer<ScratchBuffer> m_purgeTimer;
149149
150  FloatRect m_lastInsetBounds;
151  FloatRect m_lastShadowRect;
 150 GraphicsRect m_lastInsetBounds;
 151 GraphicsRect m_lastShadowRect;
152152 RoundedRect::Radii m_lastRadii;
153153 Color m_lastColor;
154154 ColorSpace m_lastColorSpace;
155  FloatSize m_lastRadius;
 155 GraphicsSize m_lastRadius;
156156 bool m_lastWasInset;
157157
158158#if !ASSERT_DISABLED

168168
169169static const int templateSideLength = 1;
170170
171 ShadowBlur::ShadowBlur(const FloatSize& radius, const FloatSize& offset, const Color& color, ColorSpace colorSpace)
 171ShadowBlur::ShadowBlur(const GraphicsSize& radius, const GraphicsSize& offset, const Color& color, ColorSpace colorSpace)
172172 : m_color(color)
173173 , m_colorSpace(colorSpace)
174174 , m_blurRadius(radius)

186186{
187187}
188188
189 void ShadowBlur::setShadowValues(const FloatSize& radius, const FloatSize& offset, const Color& color, ColorSpace colorSpace, bool ignoreTransforms)
 189void ShadowBlur::setShadowValues(const GraphicsSize& radius, const GraphicsSize& offset, const Color& color, ColorSpace colorSpace, bool ignoreTransforms)
190190{
191191 m_blurRadius = radius;
192192 m_offset = offset;

200200void ShadowBlur::updateShadowBlurValues()
201201{
202202 // Limit blur radius to 128 to avoid lots of very expensive blurring.
203  m_blurRadius = m_blurRadius.shrunkTo(FloatSize(128, 128));
 203 m_blurRadius = m_blurRadius.shrunkTo(GraphicsSize(128, 128));
204204
205205 // The type of shadow is decided by the blur radius, shadow offset, and shadow color.
206206 if (!m_color.isValid() || !m_color.alpha()) {

264264{
265265 m_type = NoShadow;
266266 m_color = Color();
267  m_blurRadius = FloatSize();
268  m_offset = FloatSize();
 267 m_blurRadius = GraphicsSize();
 268 m_offset = GraphicsSize();
269269}
270270
271271void ShadowBlur::blurLayerImage(unsigned char* imageData, const IntSize& size, int rowStride)

363363 return;
364364
365365 // Calculate transformed unit vectors.
366  const FloatQuad unitQuad(FloatPoint(0, 0), FloatPoint(1, 0),
367  FloatPoint(0, 1), FloatPoint(1, 1));
368  const FloatQuad transformedUnitQuad = transform.mapQuad(unitQuad);
 366 const GraphicsQuad unitQuad(GraphicsPoint(0, 0), GraphicsPoint(1, 0),
 367 GraphicsPoint(0, 1), GraphicsPoint(1, 1));
 368 const GraphicsQuad transformedUnitQuad = transform.mapQuad(unitQuad);
369369
370370 // Calculate X axis scale factor.
371  const FloatSize xUnitChange = transformedUnitQuad.p2() - transformedUnitQuad.p1();
 371 const GraphicsSize xUnitChange = transformedUnitQuad.p2() - transformedUnitQuad.p1();
372372 const float xAxisScale = sqrtf(xUnitChange.width() * xUnitChange.width()
373373 + xUnitChange.height() * xUnitChange.height());
374374
375375 // Calculate Y axis scale factor.
376  const FloatSize yUnitChange = transformedUnitQuad.p3() - transformedUnitQuad.p1();
 376 const GraphicsSize yUnitChange = transformedUnitQuad.p3() - transformedUnitQuad.p1();
377377 const float yAxisScale = sqrtf(yUnitChange.width() * yUnitChange.width()
378378 + yUnitChange.height() * yUnitChange.height());
379379

395395 return edgeSize;
396396}
397397
398 IntRect ShadowBlur::calculateLayerBoundingRect(GraphicsContext* context, const FloatRect& shadowedRect, const IntRect& clipRect)
 398IntRect ShadowBlur::calculateLayerBoundingRect(GraphicsContext* context, const GraphicsRect& shadowedRect, const IntRect& clipRect)
399399{
400400 IntSize edgeSize = blurredEdgeSize();
401401
402402 // Calculate the destination of the blurred and/or transformed layer.
403  FloatRect layerRect;
 403 GraphicsRect layerRect;
404404 IntSize inflation;
405405
406406 const AffineTransform transform = context->getCTM();
407407 if (m_shadowsIgnoreTransforms && !transform.isIdentity()) {
408  FloatQuad transformedPolygon = transform.mapQuad(FloatQuad(shadowedRect));
 408 GraphicsQuad transformedPolygon = transform.mapQuad(GraphicsQuad(shadowedRect));
409409 transformedPolygon.move(m_offset);
410410 layerRect = transform.inverse().mapQuad(transformedPolygon).boundingBox();
411411 } else {

420420 inflation = edgeSize;
421421 }
422422
423  FloatRect unclippedLayerRect = layerRect;
 423 GraphicsRect unclippedLayerRect = layerRect;
424424
425425 if (!clipRect.contains(enclosingIntRect(layerRect))) {
426426 // If we are totally outside the clip region, we aren't painting at all.

440440
441441 IntSize frameSize = inflation;
442442 frameSize.scale(2);
443  m_sourceRect = FloatRect(0, 0, shadowedRect.width() + frameSize.width(), shadowedRect.height() + frameSize.height());
444  m_layerOrigin = FloatPoint(layerRect.x(), layerRect.y());
 443 m_sourceRect = GraphicsRect(0, 0, shadowedRect.width() + frameSize.width(), shadowedRect.height() + frameSize.height());
 444 m_layerOrigin = GraphicsPoint(layerRect.x(), layerRect.y());
445445 m_layerSize = layerRect.size();
446446
447  const FloatPoint unclippedLayerOrigin = FloatPoint(unclippedLayerRect.x(), unclippedLayerRect.y());
448  const FloatSize clippedOut = unclippedLayerOrigin - m_layerOrigin;
 447 const GraphicsPoint unclippedLayerOrigin = GraphicsPoint(unclippedLayerRect.x(), unclippedLayerRect.y());
 448 const GraphicsSize clippedOut = unclippedLayerOrigin - m_layerOrigin;
449449
450450 // Set the origin as the top left corner of the scratch image, or, in case there's a clipped
451451 // out region, set the origin accordingly to the full bounding rect's top-left corner.
452452 float translationX = -shadowedRect.x() + inflation.width() - fabsf(clippedOut.width());
453453 float translationY = -shadowedRect.y() + inflation.height() - fabsf(clippedOut.height());
454  m_layerContextTranslation = FloatSize(translationX, translationY);
 454 m_layerContextTranslation = GraphicsSize(translationX, translationY);
455455
456456 return enclosingIntRect(layerRect);
457457}

467467 if (bufferSize != m_layerSize) {
468468 // The rect passed to clipToImageBuffer() has to be the size of the entire buffer,
469469 // but we may not have cleared it all, so clip to the filled part first.
470  graphicsContext->clip(FloatRect(m_layerOrigin, m_layerSize));
 470 graphicsContext->clip(GraphicsRect(m_layerOrigin, m_layerSize));
471471 }
472  graphicsContext->clipToImageBuffer(m_layerImage, FloatRect(m_layerOrigin, bufferSize));
 472 graphicsContext->clipToImageBuffer(m_layerImage, GraphicsRect(m_layerOrigin, bufferSize));
473473 graphicsContext->setFillColor(m_color, m_colorSpace);
474474
475475 graphicsContext->clearShadow();
476  graphicsContext->fillRect(FloatRect(m_layerOrigin, m_sourceRect.size()));
 476 graphicsContext->fillRect(GraphicsRect(m_layerOrigin, m_sourceRect.size()));
477477}
478478
479479static void computeSliceSizesFromRadii(const IntSize& twiceRadius, const RoundedRect::Radii& radii, int& leftSlice, int& rightSlice, int& topSlice, int& bottomSlice)

503503 templateSideLength + topSlice + bottomSlice);
504504}
505505
506 void ShadowBlur::drawRectShadow(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const RoundedRect::Radii& radii)
 506void ShadowBlur::drawRectShadow(GraphicsContext* graphicsContext, const GraphicsRect& shadowedRect, const RoundedRect::Radii& radii)
507507{
508508 IntRect layerRect = calculateLayerBoundingRect(graphicsContext, shadowedRect, graphicsContext->clipBounds());
509509 if (layerRect.isEmpty())

530530 drawRectShadowWithTiling(graphicsContext, shadowedRect, radii, templateSize, edgeSize);
531531}
532532
533 void ShadowBlur::drawInsetShadow(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const RoundedRect::Radii& holeRadii)
 533void ShadowBlur::drawInsetShadow(GraphicsContext* graphicsContext, const GraphicsRect& rect, const GraphicsRect& holeRect, const RoundedRect::Radii& holeRadii)
534534{
535535 IntRect layerRect = calculateLayerBoundingRect(graphicsContext, rect, graphicsContext->clipBounds());
536536 if (layerRect.isEmpty())

557557 drawInsetShadowWithTiling(graphicsContext, rect, holeRect, holeRadii, templateSize, edgeSize);
558558}
559559
560 void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const RoundedRect::Radii& radii, const IntRect& layerRect)
 560void ShadowBlur::drawRectShadowWithoutTiling(GraphicsContext* graphicsContext, const GraphicsRect& shadowedRect, const RoundedRect::Radii& radii, const IntRect& layerRect)
561561{
562562 m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
563563 if (!m_layerImage)
564564 return;
565565
566  FloatRect bufferRelativeShadowedRect = shadowedRect;
 566 GraphicsRect bufferRelativeShadowedRect = shadowedRect;
567567 bufferRelativeShadowedRect.move(m_layerContextTranslation);
568568 if (!ScratchBuffer::shared().matchesLastShadow(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeShadowedRect, radii)) {
569569 GraphicsContext* shadowContext = m_layerImage->context();
570570 GraphicsContextStateSaver stateSaver(*shadowContext);
571571
572572 // Add a pixel to avoid later edge aliasing when rotated.
573  shadowContext->clearRect(FloatRect(0, 0, m_layerSize.width() + 1, m_layerSize.height() + 1));
 573 shadowContext->clearRect(GraphicsRect(0, 0, m_layerSize.width() + 1, m_layerSize.height() + 1));
574574 shadowContext->translate(m_layerContextTranslation);
575575 shadowContext->setFillColor(Color::black, ColorSpaceDeviceRGB);
576576 if (radii.isZero())

591591 ScratchBuffer::shared().scheduleScratchBufferPurge();
592592}
593593
594 void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const RoundedRect::Radii& holeRadii, const IntRect& layerRect)
 594void ShadowBlur::drawInsetShadowWithoutTiling(GraphicsContext* graphicsContext, const GraphicsRect& rect, const GraphicsRect& holeRect, const RoundedRect::Radii& holeRadii, const IntRect& layerRect)
595595{
596596 m_layerImage = ScratchBuffer::shared().getScratchBuffer(layerRect.size());
597597 if (!m_layerImage)
598598 return;
599599
600  FloatRect bufferRelativeRect = rect;
 600 GraphicsRect bufferRelativeRect = rect;
601601 bufferRelativeRect.move(m_layerContextTranslation);
602602
603  FloatRect bufferRelativeHoleRect = holeRect;
 603 GraphicsRect bufferRelativeHoleRect = holeRect;
604604 bufferRelativeHoleRect.move(m_layerContextTranslation);
605605
606606 if (!ScratchBuffer::shared().matchesLastInsetShadow(m_blurRadius, Color::black, ColorSpaceDeviceRGB, bufferRelativeRect, bufferRelativeHoleRect, holeRadii)) {

608608 GraphicsContextStateSaver stateSaver(*shadowContext);
609609
610610 // Add a pixel to avoid later edge aliasing when rotated.
611  shadowContext->clearRect(FloatRect(0, 0, m_layerSize.width() + 1, m_layerSize.height() + 1));
 611 shadowContext->clearRect(GraphicsRect(0, 0, m_layerSize.width() + 1, m_layerSize.height() + 1));
612612 shadowContext->translate(m_layerContextTranslation);
613613
614614 Path path;

664664 the shadow.
665665 */
666666
667 void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& rect, const FloatRect& holeRect, const RoundedRect::Radii& radii, const IntSize& templateSize, const IntSize& edgeSize)
 667void ShadowBlur::drawInsetShadowWithTiling(GraphicsContext* graphicsContext, const GraphicsRect& rect, const GraphicsRect& holeRect, const RoundedRect::Radii& radii, const IntSize& templateSize, const IntSize& edgeSize)
668668{
669669 GraphicsContextStateSaver stateSaver(*graphicsContext);
670670 graphicsContext->clearShadow();

674674 return;
675675
676676 // Draw the rectangle with hole.
677  FloatRect templateBounds(0, 0, templateSize.width(), templateSize.height());
678  FloatRect templateHole = FloatRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
 677 GraphicsRect templateBounds(0, 0, templateSize.width(), templateSize.height());
 678 GraphicsRect templateHole = GraphicsRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
679679
680680 if (!ScratchBuffer::shared().matchesLastInsetShadow(m_blurRadius, m_color, m_colorSpace, templateBounds, templateHole, radii)) {
681681 // Draw shadow into a new ImageBuffer.

699699 ScratchBuffer::shared().setLastInsetShadowValues(m_blurRadius, m_color, m_colorSpace, templateBounds, templateHole, radii);
700700 }
701701
702  FloatRect boundingRect = rect;
 702 GraphicsRect boundingRect = rect;
703703 boundingRect.move(m_offset);
704704
705  FloatRect destHoleRect = holeRect;
 705 GraphicsRect destHoleRect = holeRect;
706706 destHoleRect.move(m_offset);
707  FloatRect destHoleBounds = destHoleRect;
 707 GraphicsRect destHoleBounds = destHoleRect;
708708 destHoleBounds.inflateX(edgeSize.width());
709709 destHoleBounds.inflateY(edgeSize.height());
710710

726726 ScratchBuffer::shared().scheduleScratchBufferPurge();
727727}
728728
729 void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, const FloatRect& shadowedRect, const RoundedRect::Radii& radii, const IntSize& templateSize, const IntSize& edgeSize)
 729void ShadowBlur::drawRectShadowWithTiling(GraphicsContext* graphicsContext, const GraphicsRect& shadowedRect, const RoundedRect::Radii& radii, const IntSize& templateSize, const IntSize& edgeSize)
730730{
731731 GraphicsContextStateSaver stateSaver(*graphicsContext);
732732 graphicsContext->clearShadow();

735735 if (!m_layerImage)
736736 return;
737737
738  FloatRect templateShadow = FloatRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
 738 GraphicsRect templateShadow = GraphicsRect(edgeSize.width(), edgeSize.height(), templateSize.width() - 2 * edgeSize.width(), templateSize.height() - 2 * edgeSize.height());
739739
740740 if (!ScratchBuffer::shared().matchesLastShadow(m_blurRadius, m_color, m_colorSpace, templateShadow, radii)) {
741741 // Draw shadow into the ImageBuffer.
742742 GraphicsContext* shadowContext = m_layerImage->context();
743743 GraphicsContextStateSaver shadowStateSaver(*shadowContext);
744744
745  shadowContext->clearRect(FloatRect(0, 0, templateSize.width(), templateSize.height()));
 745 shadowContext->clearRect(GraphicsRect(0, 0, templateSize.width(), templateSize.height()));
746746 shadowContext->setFillColor(Color::black, ColorSpaceDeviceRGB);
747747
748748 if (radii.isZero())

758758 ScratchBuffer::shared().setLastShadowValues(m_blurRadius, m_color, m_colorSpace, templateShadow, radii);
759759 }
760760
761  FloatRect shadowBounds = shadowedRect;
 761 GraphicsRect shadowBounds = shadowedRect;
762762 shadowBounds.move(m_offset.width(), m_offset.height());
763763 shadowBounds.inflateX(edgeSize.width());
764764 shadowBounds.inflateY(edgeSize.height());

769769 ScratchBuffer::shared().scheduleScratchBufferPurge();
770770}
771771
772 void ShadowBlur::drawLayerPieces(GraphicsContext* graphicsContext, const FloatRect& shadowBounds, const RoundedRect::Radii& radii, const IntSize& bufferPadding, const IntSize& templateSize, ShadowDirection direction)
 772void ShadowBlur::drawLayerPieces(GraphicsContext* graphicsContext, const GraphicsRect& shadowBounds, const RoundedRect::Radii& radii, const IntSize& bufferPadding, const IntSize& templateSize, ShadowDirection direction)
773773{
774774 const IntSize twiceRadius = IntSize(bufferPadding.width() * 2, bufferPadding.height() * 2);
775775

783783 int centerHeight = shadowBounds.height() - topSlice - bottomSlice;
784784
785785 if (direction == OuterShadow) {
786  FloatRect shadowInterior(shadowBounds.x() + leftSlice, shadowBounds.y() + topSlice, centerWidth, centerHeight);
 786 GraphicsRect shadowInterior(shadowBounds.x() + leftSlice, shadowBounds.y() + topSlice, centerWidth, centerHeight);
787787 if (!shadowInterior.isEmpty()) {
788788 GraphicsContextStateSaver stateSaver(*graphicsContext);
789789 graphicsContext->setFillColor(m_color, m_colorSpace);

793793
794794 // Note that drawing the ImageBuffer is faster than creating a Image and drawing that,
795795 // because ImageBuffer::draw() knows that it doesn't have to copy the image bits.
796  FloatRect centerRect(shadowBounds.x() + leftSlice, shadowBounds.y() + topSlice, centerWidth, centerHeight);
 796 GraphicsRect centerRect(shadowBounds.x() + leftSlice, shadowBounds.y() + topSlice, centerWidth, centerHeight);
797797 centerRect = graphicsContext->roundToDevicePixels(centerRect);
798798
799799 // Top side.
800  FloatRect tileRect = FloatRect(leftSlice, 0, templateSideLength, topSlice);
801  FloatRect destRect = FloatRect(centerRect.x(), centerRect.y() - topSlice, centerRect.width(), topSlice);
 800 GraphicsRect tileRect = GraphicsRect(leftSlice, 0, templateSideLength, topSlice);
 801 GraphicsRect destRect = GraphicsRect(centerRect.x(), centerRect.y() - topSlice, centerRect.width(), topSlice);
802802 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
803803
804804 // Draw the bottom side.

809809 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
810810
811811 // Left side.
812  tileRect = FloatRect(0, topSlice, leftSlice, templateSideLength);
813  destRect = FloatRect(centerRect.x() - leftSlice, centerRect.y(), leftSlice, centerRect.height());
 812 tileRect = GraphicsRect(0, topSlice, leftSlice, templateSideLength);
 813 destRect = GraphicsRect(centerRect.x() - leftSlice, centerRect.y(), leftSlice, centerRect.height());
814814 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
815815
816816 // Right side.

821821 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
822822
823823 // Top left corner.
824  tileRect = FloatRect(0, 0, leftSlice, topSlice);
825  destRect = FloatRect(centerRect.x() - leftSlice, centerRect.y() - topSlice, leftSlice, topSlice);
 824 tileRect = GraphicsRect(0, 0, leftSlice, topSlice);
 825 destRect = GraphicsRect(centerRect.x() - leftSlice, centerRect.y() - topSlice, leftSlice, topSlice);
826826 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
827827
828828 // Top right corner.
829  tileRect = FloatRect(templateSize.width() - rightSlice, 0, rightSlice, topSlice);
830  destRect = FloatRect(centerRect.maxX(), centerRect.y() - topSlice, rightSlice, topSlice);
 829 tileRect = GraphicsRect(templateSize.width() - rightSlice, 0, rightSlice, topSlice);
 830 destRect = GraphicsRect(centerRect.maxX(), centerRect.y() - topSlice, rightSlice, topSlice);
831831 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
832832
833833 // Bottom right corner.
834  tileRect = FloatRect(templateSize.width() - rightSlice, templateSize.height() - bottomSlice, rightSlice, bottomSlice);
835  destRect = FloatRect(centerRect.maxX(), centerRect.maxY(), rightSlice, bottomSlice);
 834 tileRect = GraphicsRect(templateSize.width() - rightSlice, templateSize.height() - bottomSlice, rightSlice, bottomSlice);
 835 destRect = GraphicsRect(centerRect.maxX(), centerRect.maxY(), rightSlice, bottomSlice);
836836 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
837837
838838 // Bottom left corner.
839  tileRect = FloatRect(0, templateSize.height() - bottomSlice, leftSlice, bottomSlice);
840  destRect = FloatRect(centerRect.x() - leftSlice, centerRect.maxY(), leftSlice, bottomSlice);
 839 tileRect = GraphicsRect(0, templateSize.height() - bottomSlice, leftSlice, bottomSlice);
 840 destRect = GraphicsRect(centerRect.x() - leftSlice, centerRect.maxY(), leftSlice, bottomSlice);
841841 graphicsContext->drawImageBuffer(m_layerImage, ColorSpaceDeviceRGB, destRect, tileRect);
842842}
843843

862862 GraphicsContextStateSaver stateSaver(*shadowContext);
863863 shadowContext->setCompositeOperation(CompositeSourceIn);
864864 shadowContext->setFillColor(m_color, m_colorSpace);
865  shadowContext->fillRect(FloatRect(0, 0, templateSize.width(), templateSize.height()));
 865 shadowContext->fillRect(GraphicsRect(0, 0, templateSize.width(), templateSize.height()));
866866}
867867
868 GraphicsContext* ShadowBlur::beginShadowLayer(GraphicsContext *context, const FloatRect& layerArea)
 868GraphicsContext* ShadowBlur::beginShadowLayer(GraphicsContext *context, const GraphicsRect& layerArea)
869869{
870870 adjustBlurRadius(context);
871871

878878
879879 GraphicsContext* shadowContext = m_layerImage->context();
880880 shadowContext->save();
881  shadowContext->clearRect(FloatRect(0, 0, m_layerSize.width(), m_layerSize.height()));
 881 shadowContext->clearRect(GraphicsRect(0, 0, m_layerSize.width(), m_layerSize.height()));
882882
883883 shadowContext->translate(m_layerContextTranslation);
884884 return shadowContext;
90929

Source/WebCore/platform/graphics/Font.h

4141
4242namespace WebCore {
4343
44 class FloatPoint;
45 class FloatRect;
 44class GraphicsPoint;
 45class GraphicsRect;
4646class FontData;
4747class FontMetrics;
4848class FontPlatformData;

9393
9494 void update(PassRefPtr<FontSelector>) const;
9595
96  void drawText(GraphicsContext*, const TextRun&, const FloatPoint&, int from = 0, int to = -1) const;
97  void drawEmphasisMarks(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from = 0, int to = -1) const;
 96 void drawText(GraphicsContext*, const TextRun&, const GraphicsPoint&, int from = 0, int to = -1) const;
 97 void drawEmphasisMarks(GraphicsContext*, const TextRun&, const AtomicString& mark, const GraphicsPoint&, int from = 0, int to = -1) const;
9898
9999 float width(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
100100 float width(const TextRun&, int& charsConsumed, String& glyphName) const;
101101
102102 int offsetForPosition(const TextRun&, float position, bool includePartialGlyphs) const;
103  FloatRect selectionRectForText(const TextRun&, const FloatPoint&, int h, int from = 0, int to = -1) const;
 103 GraphicsRect selectionRectForText(const TextRun&, const GraphicsPoint&, int h, int from = 0, int to = -1) const;
104104
105105 bool isSmallCaps() const { return m_fontDescription.smallCaps(); }
106106

161161
162162 // Returns the initial in-stream advance.
163163 float getGlyphsAndAdvancesForSimpleText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
164  void drawSimpleText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const;
165  void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const;
166  void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const;
167  void drawGlyphBuffer(GraphicsContext*, const TextRun&, const GlyphBuffer&, const FloatPoint&) const;
168  void drawEmphasisMarks(GraphicsContext*, const TextRun&, const GlyphBuffer&, const AtomicString&, const FloatPoint&) const;
 164 void drawSimpleText(GraphicsContext*, const TextRun&, const GraphicsPoint&, int from, int to) const;
 165 void drawEmphasisMarksForSimpleText(GraphicsContext*, const TextRun&, const AtomicString& mark, const GraphicsPoint&, int from, int to) const;
 166 void drawGlyphs(GraphicsContext*, const SimpleFontData*, const GlyphBuffer&, int from, int to, const GraphicsPoint&) const;
 167 void drawGlyphBuffer(GraphicsContext*, const TextRun&, const GlyphBuffer&, const GraphicsPoint&) const;
 168 void drawEmphasisMarks(GraphicsContext*, const TextRun&, const GlyphBuffer&, const AtomicString&, const GraphicsPoint&) const;
169169 float floatWidthForSimpleText(const TextRun&, GlyphBuffer*, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
170170 int offsetForPositionForSimpleText(const TextRun&, float position, bool includePartialGlyphs) const;
171  FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to) const;
 171 GraphicsRect selectionRectForSimpleText(const TextRun&, const GraphicsPoint&, int h, int from, int to) const;
172172
173173 bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const;
174174

179179
180180 // Returns the initial in-stream advance.
181181 float getGlyphsAndAdvancesForComplexText(const TextRun&, int from, int to, GlyphBuffer&, ForTextEmphasisOrNot = NotForTextEmphasis) const;
182  void drawComplexText(GraphicsContext*, const TextRun&, const FloatPoint&, int from, int to) const;
183  void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&, const AtomicString& mark, const FloatPoint&, int from, int to) const;
 182 void drawComplexText(GraphicsContext*, const TextRun&, const GraphicsPoint&, int from, int to) const;
 183 void drawEmphasisMarksForComplexText(GraphicsContext*, const TextRun&, const AtomicString& mark, const GraphicsPoint&, int from, int to) const;
184184 float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, GlyphOverflow* = 0) const;
185185 int offsetForPositionForComplexText(const TextRun&, float position, bool includePartialGlyphs) const;
186  FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int h, int from, int to) const;
 186 GraphicsRect selectionRectForComplexText(const TextRun&, const GraphicsPoint&, int h, int from, int to) const;
187187
188188 friend struct WidthIterator;
189189 friend class SVGTextRunRenderingContext;
90929

Source/WebCore/platform/graphics/TextRun.h

3030
3131namespace WebCore {
3232
33 class FloatPoint;
34 class FloatRect;
 33class GraphicsPoint;
 34class GraphicsRect;
3535class Font;
3636class GraphicsContext;
3737class GlyphBuffer;

137137
138138#if ENABLE(SVG_FONTS)
139139 virtual GlyphData glyphDataForCharacter(const Font&, const TextRun&, WidthIterator&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength) = 0;
140  virtual void drawSVGGlyphs(GraphicsContext*, const TextRun&, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const = 0;
 140 virtual void drawSVGGlyphs(GraphicsContext*, const TextRun&, const SimpleFontData*, const GlyphBuffer&, int from, int to, const GraphicsPoint&) const = 0;
141141 virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, int& charsConsumed, String& glyphName) const = 0;
142142#endif
143143 };
90929

Source/WebCore/platform/graphics/Image.h

6666
6767namespace WebCore {
6868
69 class FloatPoint;
70 class FloatRect;
71 class FloatSize;
 69class GraphicsPoint;
 70class GraphicsRect;
 71class GraphicsSize;
7272class GraphicsContext;
7373class SharedBuffer;
7474class AffineTransform;

153153 static PassRefPtr<Image> loadPlatformThemeIcon(const char* name, int size);
154154#endif
155155
156  virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
157  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
 156 virtual void drawPattern(GraphicsContext*, const GraphicsRect& srcRect, const AffineTransform& patternTransform,
 157 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const GraphicsRect& destRect);
158158
159159protected:
160160 Image(ImageObserver* = 0);
161161
162  static void fillWithSolidColor(GraphicsContext*, const FloatRect& dstRect, const Color&, ColorSpace styleColorSpace, CompositeOperator);
 162 static void fillWithSolidColor(GraphicsContext*, const GraphicsRect& dstRect, const Color&, ColorSpace styleColorSpace, CompositeOperator);
163163
164164 // The ColorSpace parameter will only be used for untagged images.
165165#if PLATFORM(WIN)
166  virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator) { }
 166 virtual void drawFrameMatchingSourceSize(GraphicsContext*, const GraphicsRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator) { }
167167#endif
168  virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator) = 0;
169  void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatPoint& srcPoint, const FloatSize& tileSize, ColorSpace styleColorSpace, CompositeOperator);
170  void drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator);
 168 virtual void draw(GraphicsContext*, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace styleColorSpace, CompositeOperator) = 0;
 169 void drawTiled(GraphicsContext*, const GraphicsRect& dstRect, const GraphicsPoint& srcPoint, const GraphicsSize& tileSize, ColorSpace styleColorSpace, CompositeOperator);
 170 void drawTiled(GraphicsContext*, const GraphicsRect& dstRect, const GraphicsRect& srcRect, TileRule hRule, TileRule vRule, ColorSpace styleColorSpace, CompositeOperator);
171171
172172 // Supporting tiled drawing
173173 virtual bool mayFillWithSolidColor() { return false; }
90929

Source/WebCore/platform/graphics/FontFastPath.cpp

2323#include "config.h"
2424#include "Font.h"
2525
26 #include "FloatRect.h"
 26#include "GraphicsRect.h"
2727#include "FontCache.h"
2828#include "FontFallbackList.h"
2929#include "GlyphBuffer.h"

351351 return initialAdvance;
352352}
353353
354 void Font::drawSimpleText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
 354void Font::drawSimpleText(GraphicsContext* context, const TextRun& run, const GraphicsPoint& point, int from, int to) const
355355{
356356 // This glyph buffer holds our glyphs+advances+font data for each glyph.
357357 GlyphBuffer glyphBuffer;

361361 if (glyphBuffer.isEmpty())
362362 return;
363363
364  FloatPoint startPoint(startX, point.y());
 364 GraphicsPoint startPoint(startX, point.y());
365365 drawGlyphBuffer(context, run, glyphBuffer, startPoint);
366366}
367367
368 void Font::drawEmphasisMarksForSimpleText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
 368void Font::drawEmphasisMarksForSimpleText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const GraphicsPoint& point, int from, int to) const
369369{
370370 GlyphBuffer glyphBuffer;
371371 float initialAdvance = getGlyphsAndAdvancesForSimpleText(run, from, to, glyphBuffer, ForTextEmphasis);

373373 if (glyphBuffer.isEmpty())
374374 return;
375375
376  drawEmphasisMarks(context, run, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y()));
 376 drawEmphasisMarks(context, run, glyphBuffer, mark, GraphicsPoint(point.x() + initialAdvance, point.y()));
377377}
378378
379 void Font::drawGlyphBuffer(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, const FloatPoint& point) const
 379void Font::drawGlyphBuffer(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, const GraphicsPoint& point) const
380380{
381381 // Draw each contiguous run of glyphs that use the same font data.
382382 const SimpleFontData* fontData = glyphBuffer.fontDataAt(0);
383  FloatSize offset = glyphBuffer.offsetAt(0);
384  FloatPoint startPoint(point);
 383 GraphicsSize offset = glyphBuffer.offsetAt(0);
 384 GraphicsPoint startPoint(point);
385385 float nextX = startPoint.x();
386386 int lastFrom = 0;
387387 int nextGlyph = 0;

390390#endif
391391 while (nextGlyph < glyphBuffer.size()) {
392392 const SimpleFontData* nextFontData = glyphBuffer.fontDataAt(nextGlyph);
393  FloatSize nextOffset = glyphBuffer.offsetAt(nextGlyph);
 393 GraphicsSize nextOffset = glyphBuffer.offsetAt(nextGlyph);
394394
395395 if (nextFontData != fontData || nextOffset != offset) {
396396#if ENABLE(SVG_FONTS)

420420inline static float offsetToMiddleOfGlyph(const SimpleFontData* fontData, Glyph glyph)
421421{
422422 if (fontData->platformData().orientation() == Horizontal) {
423  FloatRect bounds = fontData->boundsForGlyph(glyph);
 423 GraphicsRect bounds = fontData->boundsForGlyph(glyph);
424424 return bounds.x() + bounds.width() / 2;
425425 }
426426 // FIXME: Use glyph bounds once they make sense for vertical fonts.

432432 return offsetToMiddleOfGlyph(glyphBuffer.fontDataAt(i), glyphBuffer.glyphAt(i));
433433}
434434
435 void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, const AtomicString& mark, const FloatPoint& point) const
 435void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const GlyphBuffer& glyphBuffer, const AtomicString& mark, const GraphicsPoint& point) const
436436{
437437 GlyphData markGlyphData;
438438 if (!getEmphasisMarkGlyphData(mark, markGlyphData))

447447 Glyph spaceGlyph = markFontData->spaceGlyph();
448448
449449 float middleOfLastGlyph = offsetToMiddleOfGlyphAtIndex(glyphBuffer, 0);
450  FloatPoint startPoint(point.x() + middleOfLastGlyph - offsetToMiddleOfGlyph(markFontData, markGlyph), point.y());
 450 GraphicsPoint startPoint(point.x() + middleOfLastGlyph - offsetToMiddleOfGlyph(markFontData, markGlyph), point.y());
451451
452452 GlyphBuffer markBuffer;
453453 for (int i = 0; i + 1 < glyphBuffer.size(); ++i) {

476476 return it.m_runWidthSoFar;
477477}
478478
479 FloatRect Font::selectionRectForSimpleText(const TextRun& run, const FloatPoint& point, int h, int from, int to) const
 479GraphicsRect Font::selectionRectForSimpleText(const TextRun& run, const GraphicsPoint& point, int h, int from, int to) const
480480{
481481 WidthIterator it(this, run);
482482 it.advance(from);

488488 if (run.rtl()) {
489489 it.advance(run.length());
490490 float totalWidth = it.m_runWidthSoFar;
491  return FloatRect(floorf(point.x() + totalWidth - afterWidth), point.y(), roundf(point.x() + totalWidth - beforeWidth) - floorf(point.x() + totalWidth - afterWidth), h);
 491 return GraphicsRect(floorf(point.x() + totalWidth - afterWidth), point.y(), roundf(point.x() + totalWidth - beforeWidth) - floorf(point.x() + totalWidth - afterWidth), h);
492492 }
493493
494  return FloatRect(floorf(point.x() + beforeWidth), point.y(), roundf(point.x() + afterWidth) - floorf(point.x() + beforeWidth), h);
 494 return GraphicsRect(floorf(point.x() + beforeWidth), point.y(), roundf(point.x() + afterWidth) - floorf(point.x() + beforeWidth), h);
495495}
496496
497497int Font::offsetForPositionForSimpleText(const TextRun& run, float x, bool includePartialGlyphs) const
90929

Source/WebCore/platform/graphics/IntRect.cpp

2626#include "config.h"
2727#include "IntRect.h"
2828
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include <algorithm>
3131
3232using std::max;

3434
3535namespace WebCore {
3636
37 IntRect::IntRect(const FloatRect& r)
 37IntRect::IntRect(const GraphicsRect& r)
3838 : m_location(IntPoint(static_cast<int>(r.x()), static_cast<int>(r.y())))
3939 , m_size(IntSize(static_cast<int>(r.width()), static_cast<int>(r.height())))
4040{
90929

Source/WebCore/platform/graphics/ShadowBlur.h

3131
3232#include "Color.h"
3333#include "ColorSpace.h"
34 #include "FloatRect.h"
 34#include "GraphicsRect.h"
3535#include "RoundedRect.h"
3636#include <wtf/Noncopyable.h>
3737

5050 BlurShadow
5151 };
5252
53  ShadowBlur(const FloatSize& radius, const FloatSize& offset, const Color&, ColorSpace);
 53 ShadowBlur(const GraphicsSize& radius, const GraphicsSize& offset, const Color&, ColorSpace);
5454 ShadowBlur();
5555
56  void setShadowValues(const FloatSize&, const FloatSize& , const Color&, ColorSpace, bool ignoreTransforms = false);
 56 void setShadowValues(const GraphicsSize&, const GraphicsSize& , const Color&, ColorSpace, bool ignoreTransforms = false);
5757
5858 void setShadowsIgnoreTransforms(bool ignoreTransforms) { m_shadowsIgnoreTransforms = ignoreTransforms; }
5959 bool shadowsIgnoreTransforms() const { return m_shadowsIgnoreTransforms; }
6060
61  GraphicsContext* beginShadowLayer(GraphicsContext*, const FloatRect& layerArea);
 61 GraphicsContext* beginShadowLayer(GraphicsContext*, const GraphicsRect& layerArea);
6262 void endShadowLayer(GraphicsContext*);
6363
64  void drawRectShadow(GraphicsContext*, const FloatRect&, const RoundedRect::Radii&);
65  void drawInsetShadow(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const RoundedRect::Radii& holeRadii);
 64 void drawRectShadow(GraphicsContext*, const GraphicsRect&, const RoundedRect::Radii&);
 65 void drawInsetShadow(GraphicsContext*, const GraphicsRect&, const GraphicsRect& holeRect, const RoundedRect::Radii& holeRadii);
6666
6767 void blurLayerImage(unsigned char*, const IntSize&, int stride);
6868

8181 InnerShadow
8282 };
8383
84  IntRect calculateLayerBoundingRect(GraphicsContext*, const FloatRect& layerArea, const IntRect& clipRect);
 84 IntRect calculateLayerBoundingRect(GraphicsContext*, const GraphicsRect& layerArea, const IntRect& clipRect);
8585 IntSize templateSize(const IntSize& blurredEdgeSize, const RoundedRect::Radii&) const;
8686
87  void drawRectShadowWithoutTiling(GraphicsContext*, const FloatRect&, const RoundedRect::Radii&, const IntRect& layerRect);
88  void drawRectShadowWithTiling(GraphicsContext*, const FloatRect&, const RoundedRect::Radii&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
 87 void drawRectShadowWithoutTiling(GraphicsContext*, const GraphicsRect&, const RoundedRect::Radii&, const IntRect& layerRect);
 88 void drawRectShadowWithTiling(GraphicsContext*, const GraphicsRect&, const RoundedRect::Radii&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
8989
90  void drawInsetShadowWithoutTiling(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const RoundedRect::Radii&, const IntRect& layerRect);
91  void drawInsetShadowWithTiling(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const RoundedRect::Radii&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
 90 void drawInsetShadowWithoutTiling(GraphicsContext*, const GraphicsRect&, const GraphicsRect& holeRect, const RoundedRect::Radii&, const IntRect& layerRect);
 91 void drawInsetShadowWithTiling(GraphicsContext*, const GraphicsRect&, const GraphicsRect& holeRect, const RoundedRect::Radii&, const IntSize& shadowTemplateSize, const IntSize& blurredEdgeSize);
9292
93  void drawLayerPieces(GraphicsContext*, const FloatRect& shadowBounds, const RoundedRect::Radii&, const IntSize& roundedRadius, const IntSize& templateSize, ShadowDirection);
 93 void drawLayerPieces(GraphicsContext*, const GraphicsRect& shadowBounds, const RoundedRect::Radii&, const IntSize& roundedRadius, const IntSize& templateSize, ShadowDirection);
9494
9595 void blurShadowBuffer(const IntSize& templateSize);
9696 void blurAndColorShadowBuffer(const IntSize& templateSize);

102102
103103 Color m_color;
104104 ColorSpace m_colorSpace;
105  FloatSize m_blurRadius;
106  FloatSize m_offset;
 105 GraphicsSize m_blurRadius;
 106 GraphicsSize m_offset;
107107
108108 ImageBuffer* m_layerImage; // Buffer to where the temporary shadow will be drawn to.
109109
110  FloatRect m_sourceRect; // Sub-rect of m_layerImage that contains the shadow pixels.
111  FloatPoint m_layerOrigin; // Top-left corner of the (possibly clipped) bounding rect to draw the shadow to.
112  FloatSize m_layerSize; // Size of m_layerImage pixels that need blurring.
113  FloatSize m_layerContextTranslation; // Translation to apply to m_layerContext for the shadow to be correctly clipped.
 110 GraphicsRect m_sourceRect; // Sub-rect of m_layerImage that contains the shadow pixels.
 111 GraphicsPoint m_layerOrigin; // Top-left corner of the (possibly clipped) bounding rect to draw the shadow to.
 112 GraphicsSize m_layerSize; // Size of m_layerImage pixels that need blurring.
 113 GraphicsSize m_layerContextTranslation; // Translation to apply to m_layerContext for the shadow to be correctly clipped.
114114
115115 bool m_shadowsIgnoreTransforms;
116116};
90929

Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h

3030
3131#include "MediaPlayerPrivate.h"
3232#include "Timer.h"
33 #include "FloatSize.h"
 33#include "GraphicsSize.h"
3434#include <wtf/RetainPtr.h>
3535
3636#ifdef __OBJC__

200200 MediaPlayer::NetworkState m_networkState;
201201 MediaPlayer::ReadyState m_readyState;
202202 IntRect m_rect;
203  FloatSize m_scaleFactor;
 203 GraphicsSize m_scaleFactor;
204204 unsigned m_enabledTrackCount;
205205 unsigned m_totalTrackCount;
206206 float m_reportedDuration;

220220 double m_timeStartedPlaying;
221221 double m_timeStoppedPlaying;
222222#endif
223  mutable FloatSize m_cachedNaturalSize;
 223 mutable GraphicsSize m_cachedNaturalSize;
224224};
225225
226226}
90929

Source/WebCore/platform/graphics/mac/FontMac.mm

7878#endif
7979}
8080
81 static void showGlyphsWithAdvances(const FloatPoint& point, const SimpleFontData* font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, size_t count)
 81static void showGlyphsWithAdvances(const GraphicsPoint& point, const SimpleFontData* font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, size_t count)
8282{
8383 CGContextSetTextPosition(context, point.x(), point.y());
8484

106106
107107 CGAffineTransform transform = CGAffineTransformInvert(CGContextGetTextMatrix(context));
108108
109  CGPoint position = FloatPoint(point.x(), point.y() + font->fontMetrics().floatAscent(IdeographicBaseline) - font->fontMetrics().floatAscent());
 109 CGPoint position = GraphicsPoint(point.x(), point.y() + font->fontMetrics().floatAscent(IdeographicBaseline) - font->fontMetrics().floatAscent());
110110 Vector<CGPoint, 256> positions(count);
111111 for (size_t i = 0; i < count; ++i) {
112112 CGSize translation = CGSizeApplyAffineTransform(translations[i], translationsTransform);

137137#endif
138138}
139139
140 void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point) const
 140void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const GraphicsPoint& point) const
141141{
142142 CGContextRef cgContext = context->platformContext();
143143

215215 CGContextSetFontSize(cgContext, platformData.m_size);
216216
217217
218  FloatSize shadowOffset;
 218 GraphicsSize shadowOffset;
219219 float shadowBlur;
220220 Color shadowColor;
221221 ColorSpace shadowColorSpace;

232232 float shadowTextX = point.x() + shadowOffset.width();
233233 // If shadows are ignoring transforms, then we haven't applied the Y coordinate flip yet, so down is negative.
234234 float shadowTextY = point.y() + shadowOffset.height() * (context->shadowsIgnoreTransforms() ? -1 : 1);
235  showGlyphsWithAdvances(FloatPoint(shadowTextX, shadowTextY), font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
 235 showGlyphsWithAdvances(GraphicsPoint(shadowTextX, shadowTextY), font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
236236 if (font->syntheticBoldOffset())
237  showGlyphsWithAdvances(FloatPoint(shadowTextX + font->syntheticBoldOffset(), shadowTextY), font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
 237 showGlyphsWithAdvances(GraphicsPoint(shadowTextX + font->syntheticBoldOffset(), shadowTextY), font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
238238 context->setFillColor(fillColor, fillColorSpace);
239239 }
240240
241241 showGlyphsWithAdvances(point, font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
242242 if (font->syntheticBoldOffset())
243  showGlyphsWithAdvances(FloatPoint(point.x() + font->syntheticBoldOffset(), point.y()), font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
 243 showGlyphsWithAdvances(GraphicsPoint(point.x() + font->syntheticBoldOffset(), point.y()), font, cgContext, glyphBuffer.glyphs(from), glyphBuffer.advances(from), numGlyphs);
244244
245245 if (hasSimpleShadow)
246246 context->setShadow(shadowOffset, shadowBlur, shadowColor, shadowColorSpace);
90929

Source/WebCore/platform/graphics/mac/ComplexTextController.cpp

2525#include "config.h"
2626#include "ComplexTextController.h"
2727
28 #include "FloatSize.h"
 28#include "GraphicsSize.h"
2929#include "Font.h"
3030#include "TextBreakIterator.h"
3131#include "TextRun.h"

489489 if (treatAsSpace || Font::isCJKIdeographOrSymbol(ch)) {
490490 // Distribute the run's total expansion evenly over all expansion opportunities in the run.
491491 if (m_expansion) {
492  float previousExpansion = m_expansion;
 492 GraphicsUnit previousExpansion = m_expansion;
493493 if (!treatAsSpace && !m_afterExpansion) {
494494 // Take the expansion opportunity before this ideograph.
495495 m_expansion -= m_expansionPerOpportunity;

551551 m_adjustedAdvances.append(advance);
552552 m_adjustedGlyphs.append(glyph);
553553
554  FloatRect glyphBounds = fontData->boundsForGlyph(glyph);
 554 GraphicsRect glyphBounds = fontData->boundsForGlyph(glyph);
555555 glyphBounds.move(glyphOrigin.x, glyphOrigin.y);
556556 m_minGlyphBoundingBoxX = min(m_minGlyphBoundingBoxX, glyphBounds.x());
557557 m_maxGlyphBoundingBoxX = max(m_maxGlyphBoundingBoxX, glyphBounds.maxX());
90929

Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp

3838
3939namespace WebCore {
4040
41 FloatRect Font::selectionRectForComplexText(const TextRun& run, const FloatPoint& point, int h,
 41GraphicsRect Font::selectionRectForComplexText(const TextRun& run, const GraphicsPoint& point, int h,
4242 int from, int to) const
4343{
4444 ComplexTextController controller(this, run);

5050 // Using roundf() rather than ceilf() for the right edge as a compromise to ensure correct caret positioning
5151 if (run.rtl()) {
5252 float totalWidth = controller.totalWidth();
53  return FloatRect(floorf(point.x() + totalWidth - afterWidth), point.y(), roundf(point.x() + totalWidth - beforeWidth) - floorf(point.x() + totalWidth - afterWidth), h);
 53 return GraphicsRect(floorf(point.x() + totalWidth - afterWidth), point.y(), roundf(point.x() + totalWidth - beforeWidth) - floorf(point.x() + totalWidth - afterWidth), h);
5454 }
5555
56  return FloatRect(floorf(point.x() + beforeWidth), point.y(), roundf(point.x() + afterWidth) - floorf(point.x() + beforeWidth), h);
 56 return GraphicsRect(floorf(point.x() + beforeWidth), point.y(), roundf(point.x() + afterWidth) - floorf(point.x() + beforeWidth), h);
5757}
5858
5959float Font::getGlyphsAndAdvancesForComplexText(const TextRun& run, int from, int to, GlyphBuffer& glyphBuffer, ForTextEmphasisOrNot forTextEmphasis) const

8080 return initialAdvance;
8181}
8282
83 void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to) const
 83void Font::drawComplexText(GraphicsContext* context, const TextRun& run, const GraphicsPoint& point, int from, int to) const
8484{
8585 // This glyph buffer holds our glyphs + advances + font data for each glyph.
8686 GlyphBuffer glyphBuffer;

9292 return;
9393
9494 // Draw the glyph buffer now at the starting point returned in startX.
95  FloatPoint startPoint(startX, point.y());
 95 GraphicsPoint startPoint(startX, point.y());
9696 drawGlyphBuffer(context, run, glyphBuffer, startPoint);
9797}
9898
99 void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
 99void Font::drawEmphasisMarksForComplexText(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const GraphicsPoint& point, int from, int to) const
100100{
101101 GlyphBuffer glyphBuffer;
102102 float initialAdvance = getGlyphsAndAdvancesForComplexText(run, from, to, glyphBuffer, ForTextEmphasis);

104104 if (glyphBuffer.isEmpty())
105105 return;
106106
107  drawEmphasisMarks(context, run, glyphBuffer, mark, FloatPoint(point.x() + initialAdvance, point.y()));
 107 drawEmphasisMarks(context, run, glyphBuffer, mark, GraphicsPoint(point.x() + initialAdvance, point.y()));
108108}
109109
110110float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const
90929

Source/WebCore/platform/graphics/mac/ImageMac.mm

2626#import "config.h"
2727#import "BitmapImage.h"
2828
29 #import "FloatRect.h"
 29#import "GraphicsRect.h"
3030#import "GraphicsContext.h"
3131#import "PlatformString.h"
3232#import "SharedBuffer.h"
90929

Source/WebCore/platform/graphics/mac/GraphicsContextMac.mm

9595}
9696
9797// WebKit on Mac is a standard platform component, so it must use the standard platform artwork for underline.
98 void GraphicsContext::drawLineForTextChecking(const FloatPoint& point, float width, TextCheckingLineStyle style)
 98void GraphicsContext::drawLineForTextChecking(const GraphicsPoint& point, float width, TextCheckingLineStyle style)
9999{
100100 if (paintingDisabled())
101101 return;
90929

Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm

3232
3333#import "BlockExceptions.h"
3434#import "Color.h"
35 #import "FloatRect.h"
 35#import "GraphicsRect.h"
3636#import "Font.h"
3737#import "FontCache.h"
3838#import "FontDescription.h"

386386 [name caseInsensitiveCompare:@"MonotypeCorsiva"] != NSOrderedSame;
387387}
388388
389 FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
 389GraphicsRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
390390{
391  FloatRect boundingBox;
 391 GraphicsRect boundingBox;
392392 boundingBox = CTFontGetBoundingRectsForGlyphs(m_platformData.ctFont(), platformData().orientation() == Vertical ? kCTFontVerticalOrientation : kCTFontHorizontalOrientation, &glyph, 0, 1);
393393 boundingBox.setY(-boundingBox.maxY());
394394 if (m_syntheticBoldOffset)
90929

Source/WebCore/platform/graphics/mac/ComplexTextController.h

185185 size_t m_currentRun;
186186 unsigned m_glyphInCurrentRun;
187187 unsigned m_characterInCurrentGlyph;
188  float m_finalRoundingWidth;
189  float m_expansion;
190  float m_expansionPerOpportunity;
191  float m_leadingExpansion;
 188 GraphicsUnit m_finalRoundingWidth;
 189 GraphicsUnit m_expansion;
 190 GraphicsUnit m_expansionPerOpportunity;
 191 GraphicsUnit m_leadingExpansion;
192192 bool m_afterExpansion;
193193
194194 HashSet<const SimpleFontData*>* m_fallbackFonts;
195195
196  float m_minGlyphBoundingBoxX;
197  float m_maxGlyphBoundingBoxX;
198  float m_minGlyphBoundingBoxY;
199  float m_maxGlyphBoundingBoxY;
 196 GraphicsUnit m_minGlyphBoundingBoxX;
 197 GraphicsUnit m_maxGlyphBoundingBoxX;
 198 GraphicsUnit m_minGlyphBoundingBoxY;
 199 GraphicsUnit m_maxGlyphBoundingBoxY;
200200
201201 unsigned m_lastRoundingGlyph;
202202};
90929

Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm

826826 // dimensions, aspect ratio, clean aperture, resolution, and so forth, as defined for the
827827 // format used by the resource
828828
829  FloatSize naturalSize([[m_qtMovie.get() attributeForKey:QTMovieNaturalSizeAttribute] sizeValue]);
 829 GraphicsSize naturalSize([[m_qtMovie.get() attributeForKey:QTMovieNaturalSizeAttribute] sizeValue]);
830830 if (naturalSize.isEmpty() && m_isStreaming) {
831831 // HTTP Live Streams will occasionally return {0,0} natural sizes while scrubbing.
832832 // Work around this problem (<rdar://problem/9078563>) by returning the last valid

13061306 [m_objcObserver.get() setDelayCallbacks:YES];
13071307 BEGIN_BLOCK_OBJC_EXCEPTIONS;
13081308 NSGraphicsContext* newContext;
1309  FloatSize scaleFactor(1.0f, -1.0f);
 1309 GraphicsSize scaleFactor(1.0f, -1.0f);
13101310 IntRect paintRect(IntPoint(0, 0), IntSize(r.width(), r.height()));
13111311
13121312#if PLATFORM(QT) && USE(QTKIT)

13711371 String text = String::format("%1.2f", frameRate);
13721372 TextRun textRun(text.characters(), text.length());
13731373 const Color color(255, 0, 0);
1374  context->scale(FloatSize(1.0f, -1.0f));
 1374 context->scale(GraphicsSize(1.0f, -1.0f));
13751375 context->setStrokeColor(color, styleToUse->colorSpace());
13761376 context->setStrokeStyle(SolidStroke);
13771377 context->setStrokeThickness(1.0f);
90929

Source/WebCore/platform/graphics/GlyphBuffer.h

3030#ifndef GlyphBuffer_h
3131#define GlyphBuffer_h
3232
33 #include "FloatSize.h"
 33#include "GraphicsSize.h"
3434#include "Glyph.h"
3535#include <wtf/UnusedParam.h>
3636#include <wtf/Vector.h>

6060typedef Glyph GlyphBufferGlyph;
6161#endif
6262
63 // CG uses CGSize instead of FloatSize so that the result of advances()
 63// CG uses CGSize instead of GraphicsSize so that the result of advances()
6464// can be passed directly to CGContextShowGlyphsWithAdvances in FontMac.mm
6565#if USE(CG) || (PLATFORM(WX) && OS(DARWIN)) || USE(SKIA_ON_MAC_CHROMIUM)
6666typedef CGSize GlyphBufferAdvance;

6969// so we can save memory space on embedded devices by storing only the width
7070typedef float GlyphBufferAdvance;
7171#else
72 typedef FloatSize GlyphBufferAdvance;
 72typedef GraphicsSize GlyphBufferAdvance;
7373#endif
7474
7575class GlyphBuffer {

109109 m_advances[index2] = s;
110110
111111#if PLATFORM(WIN)
112  FloatSize offset = m_offsets[index1];
 112 GraphicsSize offset = m_offsets[index1];
113113 m_offsets[index1] = m_offsets[index2];
114114 m_offsets[index2] = offset;
115115#endif

135135#endif
136136 }
137137
138  FloatSize offsetAt(int index) const
 138 GraphicsSize offsetAt(int index) const
139139 {
140140#if PLATFORM(WIN)
141141 return m_offsets[index];
142142#else
143143 UNUSED_PARAM(index);
144  return FloatSize();
 144 return GraphicsSize();
145145#endif
146146 }
147147
148  void add(Glyph glyph, const SimpleFontData* font, float width, const FloatSize* offset = 0)
 148 void add(Glyph glyph, const SimpleFontData* font, float width, const GraphicsSize* offset = 0)
149149 {
150150 m_fontData.append(font);
151151

163163#elif OS(WINCE)
164164 m_advances.append(width);
165165#else
166  m_advances.append(FloatSize(width, 0));
 166 m_advances.append(GraphicsSize(width, 0));
167167#endif
168168
169169#if PLATFORM(WIN)
170170 if (offset)
171171 m_offsets.append(*offset);
172172 else
173  m_offsets.append(FloatSize());
 173 m_offsets.append(GraphicsSize());
174174#else
175175 UNUSED_PARAM(offset);
176176#endif

201201#elif OS(WINCE)
202202 lastAdvance += width;
203203#else
204  lastAdvance += FloatSize(width, 0);
 204 lastAdvance += GraphicsSize(width, 0);
205205#endif
206206 }
207207

210210 Vector<GlyphBufferGlyph, 2048> m_glyphs;
211211 Vector<GlyphBufferAdvance, 2048> m_advances;
212212#if PLATFORM(WIN)
213  Vector<FloatSize, 2048> m_offsets;
 213 Vector<GraphicsSize, 2048> m_offsets;
214214#endif
215215};
216216
90929

Source/WebCore/platform/graphics/GraphicsLayerClient.h

3434class GraphicsLayer;
3535class IntPoint;
3636class IntRect;
37 class FloatPoint;
 37class GraphicsPoint;
3838
3939enum GraphicsLayerPaintingPhase {
4040 GraphicsLayerPaintBackground = (1 << 0),
90929

Source/WebCore/platform/graphics/Gradient.h

2929#define Gradient_h
3030
3131#include "AffineTransform.h"
32 #include "FloatPoint.h"
 32#include "GraphicsPoint.h"
3333#include "Generator.h"
3434#include "GraphicsTypes.h"
3535#include <wtf/PassRefPtr.h>

7474
7575 class Gradient : public Generator {
7676 public:
77  static PassRefPtr<Gradient> create(const FloatPoint& p0, const FloatPoint& p1)
 77 static PassRefPtr<Gradient> create(const GraphicsPoint& p0, const GraphicsPoint& p1)
7878 {
7979 return adoptRef(new Gradient(p0, p1));
8080 }
81  static PassRefPtr<Gradient> create(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, float aspectRatio = 1)
 81 static PassRefPtr<Gradient> create(const GraphicsPoint& p0, float r0, const GraphicsPoint& p1, float r1, float aspectRatio = 1)
8282 {
8383 return adoptRef(new Gradient(p0, r0, p1, r1, aspectRatio));
8484 }

9494 bool isRadial() const { return m_radial; }
9595 bool isZeroSize() const { return m_p0.x() == m_p1.x() && m_p0.y() == m_p1.y() && (!m_radial || m_r0 == m_r1); }
9696
97  const FloatPoint& p0() const { return m_p0; }
98  const FloatPoint& p1() const { return m_p1; }
 97 const GraphicsPoint& p0() const { return m_p0; }
 98 const GraphicsPoint& p1() const { return m_p1; }
9999
100  void setP0(const FloatPoint& p) { m_p0 = p; }
101  void setP1(const FloatPoint& p) { m_p1 = p; }
 100 void setP0(const GraphicsPoint& p) { m_p0 = p; }
 101 void setP1(const GraphicsPoint& p) { m_p1 = p; }
102102
103103 float startRadius() const { return m_r0; }
104104 float endRadius() const { return m_r1; }

133133 // Qt and CG transform the gradient at draw time
134134 AffineTransform gradientSpaceTransform() { return m_gradientSpaceTransformation; }
135135
136  virtual void fill(GraphicsContext*, const FloatRect&);
137  virtual void adjustParametersForTiledDrawing(IntSize& size, FloatRect& srcRect);
 136 virtual void fill(GraphicsContext*, const GraphicsRect&);
 137 virtual void adjustParametersForTiledDrawing(IntSize& size, GraphicsRect& srcRect);
138138
139139 void setPlatformGradientSpaceTransform(const AffineTransform& gradientSpaceTransformation);
140140

144144#endif
145145
146146 private:
147  Gradient(const FloatPoint& p0, const FloatPoint& p1);
148  Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, float aspectRatio);
 147 Gradient(const GraphicsPoint& p0, const GraphicsPoint& p1);
 148 Gradient(const GraphicsPoint& p0, float r0, const GraphicsPoint& p1, float r1, float aspectRatio);
149149
150150 void platformInit() { m_gradient = 0; }
151151 void platformDestroy();

154154 void sortStopsIfNecessary();
155155
156156 bool m_radial;
157  FloatPoint m_p0;
158  FloatPoint m_p1;
 157 GraphicsPoint m_p0;
 158 GraphicsPoint m_p1;
159159 float m_r0;
160160 float m_r1;
161161 float m_aspectRatio; // For elliptical gradient, width / height.
90929

Source/WebCore/platform/graphics/GraphicsContext.cpp

134134 setPlatformStrokeColor(color, colorSpace);
135135}
136136
137 void GraphicsContext::setShadow(const FloatSize& offset, float blur, const Color& color, ColorSpace colorSpace)
 137void GraphicsContext::setShadow(const GraphicsSize& offset, float blur, const Color& color, ColorSpace colorSpace)
138138{
139139 m_state.shadowOffset = offset;
140140 m_state.shadowBlur = blur;

143143 setPlatformShadow(offset, blur, color, colorSpace);
144144}
145145
146 void GraphicsContext::setLegacyShadow(const FloatSize& offset, float blur, const Color& color, ColorSpace colorSpace)
 146void GraphicsContext::setLegacyShadow(const GraphicsSize& offset, float blur, const Color& color, ColorSpace colorSpace)
147147{
148148 m_state.shadowOffset = offset;
149149 m_state.shadowBlur = blur;

157157
158158void GraphicsContext::clearShadow()
159159{
160  m_state.shadowOffset = FloatSize();
 160 m_state.shadowOffset = GraphicsSize();
161161 m_state.shadowBlur = 0;
162162 m_state.shadowColor = Color();
163163 m_state.shadowColorSpace = ColorSpaceDeviceRGB;

170170 && (m_state.shadowBlur || m_state.shadowOffset.width() || m_state.shadowOffset.height());
171171}
172172
173 bool GraphicsContext::getShadow(FloatSize& offset, float& blur, Color& color, ColorSpace& colorSpace) const
 173bool GraphicsContext::getShadow(GraphicsSize& offset, float& blur, Color& color, ColorSpace& colorSpace) const
174174{
175175 offset = m_state.shadowOffset;
176176 blur = m_state.shadowBlur;

368368
369369void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, bool useLowQualityScale)
370370{
371  drawImage(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale);
 371 drawImage(image, styleColorSpace, GraphicsRect(dest), srcRect, op, useLowQualityScale);
372372}
373373
374374#if !OS(WINCE) || (PLATFORM(QT) && !HAVE(QRAWFONT))
375 void GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, int from, int to)
 375void GraphicsContext::drawText(const Font& font, const TextRun& run, const GraphicsPoint& point, int from, int to)
376376{
377377 if (paintingDisabled())
378378 return;

381381}
382382#endif
383383
384 void GraphicsContext::drawEmphasisMarks(const Font& font, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to)
 384void GraphicsContext::drawEmphasisMarks(const Font& font, const TextRun& run, const AtomicString& mark, const GraphicsPoint& point, int from, int to)
385385{
386386 if (paintingDisabled())
387387 return;

389389 font.drawEmphasisMarks(this, run, mark, point, from, to);
390390}
391391
392 void GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const FloatPoint& point)
 392void GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const GraphicsPoint& point)
393393{
394394 if (paintingDisabled())
395395 return;

405405 if (!bidiRuns.runCount())
406406 return;
407407
408  FloatPoint currPoint = point;
 408 GraphicsPoint currPoint = point;
409409 BidiCharacterRun* bidiRun = bidiRuns.firstRun();
410410 while (bidiRun) {
411411 TextRun subrun = run;

425425 bidiRuns.deleteRuns();
426426}
427427
428 void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run, const FloatPoint& point, int h, const Color& backgroundColor, ColorSpace colorSpace, int from, int to)
 428void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run, const GraphicsPoint& point, int h, const Color& backgroundColor, ColorSpace colorSpace, int from, int to)
429429{
430430 if (paintingDisabled())
431431 return;

433433 fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor, colorSpace);
434434}
435435
436 void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale)
 436void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const GraphicsRect& dest, const GraphicsRect& src, CompositeOperator op, bool useLowQualityScale)
437437{
438438 if (paintingDisabled() || !image)
439439 return;

457457 InterpolationQuality previousInterpolationQuality = imageInterpolationQuality();
458458 // FIXME: Should be InterpolationLow
459459 setImageInterpolationQuality(InterpolationNone);
460  image->draw(this, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), styleColorSpace, op);
 460 image->draw(this, GraphicsRect(dest.location(), GraphicsSize(tw, th)), GraphicsRect(src.location(), GraphicsSize(tsw, tsh)), styleColorSpace, op);
461461 setImageInterpolationQuality(previousInterpolationQuality);
462462 } else
463  image->draw(this, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), styleColorSpace, op);
 463 image->draw(this, GraphicsRect(dest.location(), GraphicsSize(tw, th)), GraphicsRect(src.location(), GraphicsSize(tsw, tsh)), styleColorSpace, op);
464464}
465465
466466void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, const IntRect& rect, const IntPoint& srcPoint, const IntSize& tileSize, CompositeOperator op, bool useLowQualityScale)

514514
515515void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const IntRect& dest, const IntRect& srcRect, CompositeOperator op, bool useLowQualityScale)
516516{
517  drawImageBuffer(image, styleColorSpace, FloatRect(dest), srcRect, op, useLowQualityScale);
 517 drawImageBuffer(image, styleColorSpace, GraphicsRect(dest), srcRect, op, useLowQualityScale);
518518}
519519
520 void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale)
 520void GraphicsContext::drawImageBuffer(ImageBuffer* image, ColorSpace styleColorSpace, const GraphicsRect& dest, const GraphicsRect& src, CompositeOperator op, bool useLowQualityScale)
521521{
522522 if (paintingDisabled() || !image)
523523 return;

541541 InterpolationQuality previousInterpolationQuality = imageInterpolationQuality();
542542 // FIXME: Should be InterpolationLow
543543 setImageInterpolationQuality(InterpolationNone);
544  image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, useLowQualityScale);
 544 image->draw(this, styleColorSpace, GraphicsRect(dest.location(), GraphicsSize(tw, th)), GraphicsRect(src.location(), GraphicsSize(tsw, tsh)), op, useLowQualityScale);
545545 setImageInterpolationQuality(previousInterpolationQuality);
546546 } else
547  image->draw(this, styleColorSpace, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op, useLowQualityScale);
 547 image->draw(this, styleColorSpace, GraphicsRect(dest.location(), GraphicsSize(tw, th)), GraphicsRect(src.location(), GraphicsSize(tsw, tsh)), op, useLowQualityScale);
548548}
549549
550550#if !PLATFORM(QT)
551551void GraphicsContext::clip(const IntRect& rect)
552552{
553  clip(FloatRect(rect));
 553 clip(GraphicsRect(rect));
554554}
555555#endif
556556

574574 clipOut(path);
575575}
576576
577 void GraphicsContext::clipToImageBuffer(ImageBuffer* buffer, const FloatRect& rect)
 577void GraphicsContext::clipToImageBuffer(ImageBuffer* buffer, const GraphicsRect& rect)
578578{
579579 if (paintingDisabled())
580580 return;

602602 setPlatformTextDrawingMode(mode);
603603}
604604
605 void GraphicsContext::fillRect(const FloatRect& rect, Generator& generator)
 605void GraphicsContext::fillRect(const GraphicsRect& rect, Generator& generator)
606606{
607607 if (paintingDisabled())
608608 return;
609609 generator.fill(this, rect);
610610}
611611
612 void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace styleColorSpace, CompositeOperator op)
 612void GraphicsContext::fillRect(const GraphicsRect& rect, const Color& color, ColorSpace styleColorSpace, CompositeOperator op)
613613{
614614 if (paintingDisabled())
615615 return;

691691#endif
692692
693693
694 void GraphicsContext::adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2, float strokeWidth, StrokeStyle penStyle)
 694void GraphicsContext::adjustLineToPixelBoundaries(GraphicsPoint& p1, GraphicsPoint& p2, float strokeWidth, StrokeStyle penStyle)
695695{
696696 // For odd widths, we add in 0.5 to the appropriate x/y so that the float arithmetic
697697 // works out. For example, with a border width of 3, WebKit will pass us (y1+y2)/2, e.g.,
90929

Source/WebCore/platform/graphics/ImageBuffer.h

3030
3131#include "AffineTransform.h"
3232#include "ColorSpace.h"
33 #include "FloatRect.h"
 33#include "GraphicsRect.h"
3434#include "GraphicsTypes.h"
3535#include "IntSize.h"
3636#include "ImageBufferData.h"

104104#endif
105105
106106 private:
107  void clip(GraphicsContext*, const FloatRect&) const;
 107 void clip(GraphicsContext*, const GraphicsRect&) const;
108108
109109 // The draw method draws the contents of the buffer without copying it.
110  void draw(GraphicsContext*, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect = FloatRect(0, 0, -1, -1),
 110 void draw(GraphicsContext*, ColorSpace styleColorSpace, const GraphicsRect& destRect, const GraphicsRect& srcRect = GraphicsRect(0, 0, -1, -1),
111111 CompositeOperator = CompositeSourceOver, bool useLowQualityScale = false);
112  void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
113  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
 112 void drawPattern(GraphicsContext*, const GraphicsRect& srcRect, const AffineTransform& patternTransform,
 113 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const GraphicsRect& destRect);
114114
115115 inline void genericConvertToLuminanceMask();
116116
90929

Source/WebCore/platform/graphics/GeneratedImage.cpp

2626#include "config.h"
2727#include "GeneratedImage.h"
2828
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "GraphicsContext.h"
3131#include "ImageBuffer.h"
3232

3434
3535namespace WebCore {
3636
37 void GeneratedImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp)
 37void GeneratedImage::draw(GraphicsContext* context, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace, CompositeOperator compositeOp)
3838{
3939 GraphicsContextStateSaver stateSaver(*context);
4040 context->setCompositeOperation(compositeOp);
4141 context->clip(dstRect);
4242 context->translate(dstRect.x(), dstRect.y());
4343 if (dstRect.size() != srcRect.size())
44  context->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
 44 context->scale(GraphicsSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
4545 context->translate(-srcRect.x(), -srcRect.y());
46  context->fillRect(FloatRect(FloatPoint(), m_size), *m_generator.get());
 46 context->fillRect(GraphicsRect(GraphicsPoint(), m_size), *m_generator.get());
4747}
4848
49 void GeneratedImage::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
50  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const FloatRect& destRect)
 49void GeneratedImage::drawPattern(GraphicsContext* context, const GraphicsRect& srcRect, const AffineTransform& patternTransform,
 50 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator compositeOp, const GraphicsRect& destRect)
5151{
5252 // Allow the generator to provide visually-equivalent tiling parameters for better performance.
5353 IntSize adjustedSize = m_size;
54  FloatRect adjustedSrcRect = srcRect;
 54 GraphicsRect adjustedSrcRect = srcRect;
5555 m_generator->adjustParametersForTiledDrawing(adjustedSize, adjustedSrcRect);
5656
5757 // Create a BitmapImage and call drawPattern on it.

6161
6262 // Fill with the gradient.
6363 GraphicsContext* graphicsContext = imageBuffer->context();
64  graphicsContext->fillRect(FloatRect(FloatPoint(), adjustedSize), *m_generator.get());
 64 graphicsContext->fillRect(GraphicsRect(GraphicsPoint(), adjustedSize), *m_generator.get());
6565
6666 // Tile the image buffer into the context.
6767 imageBuffer->drawPattern(context, adjustedSrcRect, patternTransform, phase, styleColorSpace, compositeOp, destRect);
90929

Source/WebCore/platform/graphics/GraphicsLayer.h

3030
3131#include "Animation.h"
3232#include "Color.h"
33 #include "FloatPoint.h"
34 #include "FloatPoint3D.h"
35 #include "FloatSize.h"
 33#include "GraphicsPoint.h"
 34#include "GraphicsPoint3D.h"
 35#include "GraphicsSize.h"
3636#include "GraphicsLayerClient.h"
3737#include "IntRect.h"
3838#include "TransformationMatrix.h"

8080
8181namespace WebCore {
8282
83 class FloatPoint3D;
 83class GraphicsPoint3D;
8484class GraphicsContext;
8585class Image;
8686class TextStream;

225225 // The layer that replicates this layer (if any).
226226 GraphicsLayer* replicaLayer() const { return m_replicaLayer; }
227227
228  const FloatPoint& replicatedLayerPosition() const { return m_replicatedLayerPosition; }
229  void setReplicatedLayerPosition(const FloatPoint& p) { m_replicatedLayerPosition = p; }
 228 const GraphicsPoint& replicatedLayerPosition() const { return m_replicatedLayerPosition; }
 229 void setReplicatedLayerPosition(const GraphicsPoint& p) { m_replicatedLayerPosition = p; }
230230
231231 // Offset is origin of the renderer minus origin of the graphics layer (so either zero or negative).
232232 IntSize offsetFromRenderer() const { return m_offsetFromRenderer; }
233233 void setOffsetFromRenderer(const IntSize& offset) { m_offsetFromRenderer = offset; }
234234
235235 // The position of the layer (the location of its top-left corner in its parent)
236  const FloatPoint& position() const { return m_position; }
237  virtual void setPosition(const FloatPoint& p) { m_position = p; }
 236 const GraphicsPoint& position() const { return m_position; }
 237 virtual void setPosition(const GraphicsPoint& p) { m_position = p; }
238238
239239 // Anchor point: (0, 0) is top left, (1, 1) is bottom right. The anchor point
240240 // affects the origin of the transforms.
241  const FloatPoint3D& anchorPoint() const { return m_anchorPoint; }
242  virtual void setAnchorPoint(const FloatPoint3D& p) { m_anchorPoint = p; }
 241 const GraphicsPoint3D& anchorPoint() const { return m_anchorPoint; }
 242 virtual void setAnchorPoint(const GraphicsPoint3D& p) { m_anchorPoint = p; }
243243
244244 // The size of the layer.
245  const FloatSize& size() const { return m_size; }
246  virtual void setSize(const FloatSize& size) { m_size = size; }
 245 const GraphicsSize& size() const { return m_size; }
 246 virtual void setSize(const GraphicsSize& size) { m_size = size; }
247247
248248 // The boundOrigin affects the offset at which content is rendered, and sublayers are positioned.
249  const FloatPoint& boundsOrigin() const { return m_boundsOrigin; }
250  virtual void setBoundsOrigin(const FloatPoint& origin) { m_boundsOrigin = origin; }
 249 const GraphicsPoint& boundsOrigin() const { return m_boundsOrigin; }
 250 virtual void setBoundsOrigin(const GraphicsPoint& origin) { m_boundsOrigin = origin; }
251251
252252 const TransformationMatrix& transform() const { return m_transform; }
253253 virtual void setTransform(const TransformationMatrix& t) { m_transform = t; }

289289
290290 virtual void setNeedsDisplay() = 0;
291291 // mark the given rect (in layer coords) as needing dispay. Never goes deep.
292  virtual void setNeedsDisplayInRect(const FloatRect&) = 0;
 292 virtual void setNeedsDisplayInRect(const GraphicsRect&) = 0;
293293
294294 virtual void setContentsNeedsDisplay() { };
295295

398398 IntSize m_offsetFromRenderer;
399399
400400 // Position is relative to the parent GraphicsLayer
401  FloatPoint m_position;
402  FloatPoint3D m_anchorPoint;
403  FloatSize m_size;
404  FloatPoint m_boundsOrigin;
 401 GraphicsPoint m_position;
 402 GraphicsPoint3D m_anchorPoint;
 403 GraphicsSize m_size;
 404 GraphicsPoint m_boundsOrigin;
405405
406406 TransformationMatrix m_transform;
407407 TransformationMatrix m_childrenTransform;

430430 GraphicsLayer* m_replicaLayer; // A layer that replicates this layer. We only allow one, for now.
431431 // The replica is not parented; this is the primary reference to it.
432432 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the original layer.
433  FloatPoint m_replicatedLayerPosition; // For a replica layer, the position of the replica.
 433 GraphicsPoint m_replicatedLayerPosition; // For a replica layer, the position of the replica.
434434
435435 IntRect m_contentsRect;
436436
90929

Source/WebCore/platform/graphics/transforms/TransformationMatrix.h

2626#ifndef TransformationMatrix_h
2727#define TransformationMatrix_h
2828
29 #include "FloatPoint.h"
 29#include "GraphicsPoint.h"
3030#include "IntPoint.h"
3131#include <string.h> //for memcpy
3232#include <wtf/FastAllocBase.h>

6060
6161class AffineTransform;
6262class IntRect;
63 class FloatPoint3D;
64 class FloatRect;
65 class FloatQuad;
 63class GraphicsPoint3D;
 64class GraphicsRect;
 65class GraphicsQuad;
6666
6767class TransformationMatrix {
6868 WTF_MAKE_FAST_ALLOCATED;

123123 void map(double x, double y, double& x2, double& y2) const { multVecMatrix(x, y, x2, y2); }
124124
125125 // Map a 3D point through the transform, returning a 3D point.
126  FloatPoint3D mapPoint(const FloatPoint3D&) const;
 126 GraphicsPoint3D mapPoint(const GraphicsPoint3D&) const;
127127
128128 // Map a 2D point through the transform, returning a 2D point.
129129 // Note that this ignores the z component, effectively projecting the point into the z=0 plane.
130  FloatPoint mapPoint(const FloatPoint&) const;
 130 GraphicsPoint mapPoint(const GraphicsPoint&) const;
131131
132132 // Like the version above, except that it rounds the mapped point to the nearest integer value.
133133 IntPoint mapPoint(const IntPoint& p) const
134134 {
135  return roundedIntPoint(mapPoint(FloatPoint(p)));
 135 return roundedIntPoint(mapPoint(GraphicsPoint(p)));
136136 }
137137
138138 // If the matrix has 3D components, the z component of the result is
139139 // dropped, effectively projecting the rect into the z=0 plane
140  FloatRect mapRect(const FloatRect&) const;
 140 GraphicsRect mapRect(const GraphicsRect&) const;
141141
142142 // Rounds the resulting mapped rectangle out. This is helpful for bounding
143143 // box computations but may not be what is wanted in other contexts.

145145
146146 // If the matrix has 3D components, the z component of the result is
147147 // dropped, effectively projecting the quad into the z=0 plane
148  FloatQuad mapQuad(const FloatQuad&) const;
 148 GraphicsQuad mapQuad(const GraphicsQuad&) const;
149149
150150 // Map a point on the z=0 plane into a point on
151151 // the plane with with the transform applied, by extending
152152 // a ray perpendicular to the source plane and computing
153153 // the local x,y position of the point where that ray intersects
154154 // with the destination plane.
155  FloatPoint projectPoint(const FloatPoint&) const;
 155 GraphicsPoint projectPoint(const GraphicsPoint&) const;
156156 // Projects the four corners of the quad
157  FloatQuad projectQuad(const FloatQuad&) const;
 157 GraphicsQuad projectQuad(const GraphicsQuad&) const;
158158
159159 double m11() const { return m_matrix[0][0]; }
160160 void setM11(double f) { m_matrix[0][0] = f; }

239239 bool hasPerspective() const { return m_matrix[2][3] != 0.0f; }
240240
241241 // returns a transformation that maps a rect to a rect
242  static TransformationMatrix rectToRect(const FloatRect&, const FloatRect&);
 242 static TransformationMatrix rectToRect(const GraphicsRect&, const GraphicsRect&);
243243
244244 bool isInvertible() const;
245245
90929

Source/WebCore/platform/graphics/transforms/AffineTransform.cpp

2828#include "AffineTransform.h"
2929
3030#include "FloatConversion.h"
31 #include "FloatQuad.h"
32 #include "FloatRect.h"
 31#include "GraphicsQuad.h"
 32#include "GraphicsRect.h"
3333#include "IntRect.h"
3434
3535#include <wtf/MathExtras.h>

270270 return shear(0, tan(deg2rad(angle)));
271271}
272272
273 AffineTransform makeMapBetweenRects(const FloatRect& source, const FloatRect& dest)
 273AffineTransform makeMapBetweenRects(const GraphicsRect& source, const GraphicsRect& dest)
274274{
275275 AffineTransform transform;
276276 transform.translate(dest.x() - source.x(), dest.y() - source.y());

293293 return IntPoint(lround(x2), lround(y2));
294294}
295295
296 FloatPoint AffineTransform::mapPoint(const FloatPoint& point) const
 296GraphicsPoint AffineTransform::mapPoint(const GraphicsPoint& point) const
297297{
298298 double x2, y2;
299299 map(point.x(), point.y(), x2, y2);
300300
301  return FloatPoint(narrowPrecisionToFloat(x2), narrowPrecisionToFloat(y2));
 301 return GraphicsPoint(narrowPrecisionToGraphicsUnit(x2), narrowPrecisionToGraphicsUnit(y2));
302302}
303303
304304IntRect AffineTransform::mapRect(const IntRect &rect) const
305305{
306  return enclosingIntRect(mapRect(FloatRect(rect)));
 306 return enclosingIntRect(mapRect(GraphicsRect(rect)));
307307}
308308
309 FloatRect AffineTransform::mapRect(const FloatRect& rect) const
 309GraphicsRect AffineTransform::mapRect(const GraphicsRect& rect) const
310310{
311311 if (isIdentityOrTranslation()) {
312  FloatRect mappedRect(rect);
313  mappedRect.move(narrowPrecisionToFloat(m_transform[4]), narrowPrecisionToFloat(m_transform[5]));
 312 GraphicsRect mappedRect(rect);
 313 mappedRect.move(narrowPrecisionToGraphicsUnit(m_transform[4]), narrowPrecisionToGraphicsUnit(m_transform[5]));
314314 return mappedRect;
315315 }
316316
317  FloatQuad result;
 317 GraphicsQuad result;
318318 result.setP1(mapPoint(rect.location()));
319  result.setP2(mapPoint(FloatPoint(rect.maxX(), rect.y())));
320  result.setP3(mapPoint(FloatPoint(rect.maxX(), rect.maxY())));
321  result.setP4(mapPoint(FloatPoint(rect.x(), rect.maxY())));
 319 result.setP2(mapPoint(GraphicsPoint(rect.maxX(), rect.y())));
 320 result.setP3(mapPoint(GraphicsPoint(rect.maxX(), rect.maxY())));
 321 result.setP4(mapPoint(GraphicsPoint(rect.x(), rect.maxY())));
322322 return result.boundingBox();
323323}
324324
325 FloatQuad AffineTransform::mapQuad(const FloatQuad& q) const
 325GraphicsQuad AffineTransform::mapQuad(const GraphicsQuad& q) const
326326{
327327 if (isIdentityOrTranslation()) {
328  FloatQuad mappedQuad(q);
329  mappedQuad.move(narrowPrecisionToFloat(m_transform[4]), narrowPrecisionToFloat(m_transform[5]));
 328 GraphicsQuad mappedQuad(q);
 329 mappedQuad.move(narrowPrecisionToGraphicsUnit(m_transform[4]), narrowPrecisionToGraphicsUnit(m_transform[5]));
330330 return mappedQuad;
331331 }
332332
333  FloatQuad result;
 333 GraphicsQuad result;
334334 result.setP1(mapPoint(q.p1()));
335335 result.setP2(mapPoint(q.p2()));
336336 result.setP3(mapPoint(q.p3()));
90929

Source/WebCore/platform/graphics/transforms/AffineTransform.h

4848
4949namespace WebCore {
5050
51 class FloatPoint;
52 class FloatQuad;
53 class FloatRect;
 51class GraphicsPoint;
 52class GraphicsQuad;
 53class GraphicsRect;
5454class IntPoint;
5555class IntRect;
5656class TransformationMatrix;

7070 // Rounds the mapped point to the nearest integer value.
7171 IntPoint mapPoint(const IntPoint&) const;
7272
73  FloatPoint mapPoint(const FloatPoint&) const;
 73 GraphicsPoint mapPoint(const GraphicsPoint&) const;
7474
7575 // Rounds the resulting mapped rectangle out. This is helpful for bounding
7676 // box computations but may not be what is wanted in other contexts.
7777 IntRect mapRect(const IntRect&) const;
7878
79  FloatRect mapRect(const FloatRect&) const;
80  FloatQuad mapQuad(const FloatQuad&) const;
 79 GraphicsRect mapRect(const GraphicsRect&) const;
 80 GraphicsQuad mapQuad(const GraphicsQuad&) const;
8181
8282 bool isIdentity() const;
8383

191191 Transform m_transform;
192192};
193193
194 AffineTransform makeMapBetweenRects(const FloatRect& source, const FloatRect& dest);
 194AffineTransform makeMapBetweenRects(const GraphicsRect& source, const GraphicsRect& dest);
195195
196196}
197197
90929

Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp

2828#include "TransformationMatrix.h"
2929
3030#include "AffineTransform.h"
31 #include "FloatPoint3D.h"
32 #include "FloatRect.h"
33 #include "FloatQuad.h"
 31#include "GraphicsPoint3D.h"
 32#include "GraphicsRect.h"
 33#include "GraphicsQuad.h"
3434#include "IntRect.h"
3535
3636#include <wtf/Assertions.h>

528528 return scaleNonUniform(1.0f, -1.0f);
529529}
530530
531 FloatPoint TransformationMatrix::projectPoint(const FloatPoint& p) const
 531GraphicsPoint TransformationMatrix::projectPoint(const GraphicsPoint& p) const
532532{
533533 // This is basically raytracing. We have a point in the destination
534534 // plane with z=0, and we cast a ray parallel to the z-axis from that

556556 outY /= w;
557557 }
558558
559  return FloatPoint(static_cast<float>(outX), static_cast<float>(outY));
 559 return GraphicsPoint(static_cast<GraphicsUnit>(outX), static_cast<GraphicsUnit>(outY));
560560}
561561
562 FloatQuad TransformationMatrix::projectQuad(const FloatQuad& q) const
 562GraphicsQuad TransformationMatrix::projectQuad(const GraphicsQuad& q) const
563563{
564  FloatQuad projectedQuad;
 564 GraphicsQuad projectedQuad;
565565 projectedQuad.setP1(projectPoint(q.p1()));
566566 projectedQuad.setP2(projectPoint(q.p2()));
567567 projectedQuad.setP3(projectPoint(q.p3()));

569569 return projectedQuad;
570570}
571571
572 FloatPoint TransformationMatrix::mapPoint(const FloatPoint& p) const
 572GraphicsPoint TransformationMatrix::mapPoint(const GraphicsPoint& p) const
573573{
574574 if (isIdentityOrTranslation())
575  return FloatPoint(p.x() + static_cast<float>(m_matrix[3][0]), p.y() + static_cast<float>(m_matrix[3][1]));
 575 return GraphicsPoint(p.x() + static_cast<GraphicsUnit>(m_matrix[3][0]), p.y() + static_cast<GraphicsUnit>(m_matrix[3][1]));
576576
577577 double x, y;
578578 multVecMatrix(p.x(), p.y(), x, y);
579  return FloatPoint(static_cast<float>(x), static_cast<float>(y));
 579 return GraphicsPoint(static_cast<GraphicsUnit>(x), static_cast<GraphicsUnit>(y));
580580}
581581
582 FloatPoint3D TransformationMatrix::mapPoint(const FloatPoint3D& p) const
 582GraphicsPoint3D TransformationMatrix::mapPoint(const GraphicsPoint3D& p) const
583583{
584584 if (isIdentityOrTranslation())
585  return FloatPoint3D(p.x() + static_cast<float>(m_matrix[3][0]),
586  p.y() + static_cast<float>(m_matrix[3][1]),
587  p.z() + static_cast<float>(m_matrix[3][2]));
 585 return GraphicsPoint3D(p.x() + static_cast<GraphicsUnit>(m_matrix[3][0]),
 586 p.y() + static_cast<GraphicsUnit>(m_matrix[3][1]),
 587 p.z() + static_cast<GraphicsUnit>(m_matrix[3][2]));
588588
589589 double x, y, z;
590590 multVecMatrix(p.x(), p.y(), p.z(), x, y, z);
591  return FloatPoint3D(static_cast<float>(x), static_cast<float>(y), static_cast<float>(z));
 591 return GraphicsPoint3D(static_cast<GraphicsUnit>(x), static_cast<GraphicsUnit>(y), static_cast<GraphicsUnit>(z));
592592}
593593
594594IntRect TransformationMatrix::mapRect(const IntRect &rect) const
595595{
596  return enclosingIntRect(mapRect(FloatRect(rect)));
 596 return enclosingIntRect(mapRect(GraphicsRect(rect)));
597597}
598598
599 FloatRect TransformationMatrix::mapRect(const FloatRect& r) const
 599GraphicsRect TransformationMatrix::mapRect(const GraphicsRect& r) const
600600{
601601 if (isIdentityOrTranslation()) {
602  FloatRect mappedRect(r);
603  mappedRect.move(static_cast<float>(m_matrix[3][0]), static_cast<float>(m_matrix[3][1]));
 602 GraphicsRect mappedRect(r);
 603 mappedRect.move(static_cast<GraphicsUnit>(m_matrix[3][0]), static_cast<GraphicsUnit>(m_matrix[3][1]));
604604 return mappedRect;
605605 }
606606
607  FloatQuad resultQuad = mapQuad(FloatQuad(r));
 607 GraphicsQuad resultQuad = mapQuad(GraphicsQuad(r));
608608 return resultQuad.boundingBox();
609609}
610610
611 FloatQuad TransformationMatrix::mapQuad(const FloatQuad& q) const
 611GraphicsQuad TransformationMatrix::mapQuad(const GraphicsQuad& q) const
612612{
613613 if (isIdentityOrTranslation()) {
614  FloatQuad mappedQuad(q);
615  mappedQuad.move(static_cast<float>(m_matrix[3][0]), static_cast<float>(m_matrix[3][1]));
 614 GraphicsQuad mappedQuad(q);
 615 mappedQuad.move(static_cast<GraphicsUnit>(m_matrix[3][0]), static_cast<GraphicsUnit>(m_matrix[3][1]));
616616 return mappedQuad;
617617 }
618618
619  FloatQuad result;
 619 GraphicsQuad result;
620620 result.setP1(mapPoint(q.p1()));
621621 result.setP2(mapPoint(q.p2()));
622622 result.setP3(mapPoint(q.p3()));

879879 return *this;
880880}
881881
882 TransformationMatrix TransformationMatrix::rectToRect(const FloatRect& from, const FloatRect& to)
 882TransformationMatrix TransformationMatrix::rectToRect(const GraphicsRect& from, const GraphicsRect& to)
883883{
884884 ASSERT(!from.isEmpty());
885885 return TransformationMatrix(to.width() / from.width(),
90929

Source/WebCore/platform/graphics/SimpleFontData.h

2828#include "FontData.h"
2929#include "FontMetrics.h"
3030#include "FontPlatformData.h"
31 #include "FloatRect.h"
 31#include "GraphicsRect.h"
3232#include "GlyphMetricsMap.h"
3333#include "GlyphPageTreeNode.h"
3434#include "TypesettingFeatures.h"

128128 float avgCharWidth() const { return m_avgCharWidth; }
129129 void setAvgCharWidth(float avgCharWidth) { m_avgCharWidth = avgCharWidth; }
130130
131  FloatRect boundsForGlyph(Glyph) const;
 131 GraphicsRect boundsForGlyph(Glyph) const;
132132 float widthForGlyph(Glyph glyph) const;
133  FloatRect platformBoundsForGlyph(Glyph) const;
 133 GraphicsRect platformBoundsForGlyph(Glyph) const;
134134 float platformWidthForGlyph(Glyph) const;
135135
136136 float spaceWidth() const { return m_spaceWidth; }

220220 || (OS(WINDOWS) && PLATFORM(WX))
221221 void initGDIFont();
222222 void platformCommonDestroy();
223  FloatRect boundsForGDIGlyph(Glyph glyph) const;
 223 GraphicsRect boundsForGDIGlyph(Glyph glyph) const;
224224 float widthForGDIGlyph(Glyph glyph) const;
225225#endif
226226

231231 FontPlatformData m_platformData;
232232 OwnPtr<AdditionalFontData> m_fontData;
233233
234  mutable OwnPtr<GlyphMetricsMap<FloatRect> > m_glyphToBoundsMap;
 234 mutable OwnPtr<GlyphMetricsMap<GraphicsRect> > m_glyphToBoundsMap;
235235 mutable GlyphMetricsMap<float> m_glyphToWidthMap;
236236
237237 bool m_treatAsFixedPitch;

299299};
300300
301301#if !(PLATFORM(QT) && !HAVE(QRAWFONT))
302 ALWAYS_INLINE FloatRect SimpleFontData::boundsForGlyph(Glyph glyph) const
 302ALWAYS_INLINE GraphicsRect SimpleFontData::boundsForGlyph(Glyph glyph) const
303303{
304304 if (isZeroWidthSpaceGlyph(glyph))
305  return FloatRect();
 305 return GraphicsRect();
306306
307  FloatRect bounds;
 307 GraphicsRect bounds;
308308 if (m_glyphToBoundsMap) {
309309 bounds = m_glyphToBoundsMap->metricsForGlyph(glyph);
310310 if (bounds.width() != cGlyphSizeUnknown)

313313
314314 bounds = platformBoundsForGlyph(glyph);
315315 if (!m_glyphToBoundsMap)
316  m_glyphToBoundsMap = adoptPtr(new GlyphMetricsMap<FloatRect>);
 316 m_glyphToBoundsMap = adoptPtr(new GlyphMetricsMap<GraphicsRect>);
317317 m_glyphToBoundsMap->setMetricsForGlyph(glyph, bounds);
318318 return bounds;
319319}
90929

Source/WebCore/platform/graphics/PathTraversalState.cpp

2727
2828static const float kPathSegmentLengthTolerance = 0.00001f;
2929
30 static inline FloatPoint midPoint(const FloatPoint& first, const FloatPoint& second)
 30static inline GraphicsPoint midPoint(const GraphicsPoint& first, const GraphicsPoint& second)
3131{
32  return FloatPoint((first.x() + second.x()) / 2.0f, (first.y() + second.y()) / 2.0f);
 32 return GraphicsPoint((first.x() + second.x()) / 2.0f, (first.y() + second.y()) / 2.0f);
3333}
3434
35 static inline float distanceLine(const FloatPoint& start, const FloatPoint& end)
 35static inline float distanceLine(const GraphicsPoint& start, const GraphicsPoint& end)
3636{
3737 return sqrtf((end.x() - start.x()) * (end.x() - start.x()) + (end.y() - start.y()) * (end.y() - start.y()));
3838}
3939
4040struct QuadraticBezier {
4141 QuadraticBezier() { }
42  QuadraticBezier(const FloatPoint& s, const FloatPoint& c, const FloatPoint& e)
 42 QuadraticBezier(const GraphicsPoint& s, const GraphicsPoint& c, const GraphicsPoint& e)
4343 : start(s)
4444 , control(c)
4545 , end(e)

5656 left.control = midPoint(start, control);
5757 right.control = midPoint(control, end);
5858
59  FloatPoint leftControlToRightControl = midPoint(left.control, right.control);
 59 GraphicsPoint leftControlToRightControl = midPoint(left.control, right.control);
6060 left.end = leftControlToRightControl;
6161 right.start = leftControlToRightControl;
6262

6464 right.end = end;
6565 }
6666
67  FloatPoint start;
68  FloatPoint control;
69  FloatPoint end;
 67 GraphicsPoint start;
 68 GraphicsPoint control;
 69 GraphicsPoint end;
7070};
7171
7272struct CubicBezier {
7373 CubicBezier() { }
74  CubicBezier(const FloatPoint& s, const FloatPoint& c1, const FloatPoint& c2, const FloatPoint& e)
 74 CubicBezier(const GraphicsPoint& s, const GraphicsPoint& c1, const GraphicsPoint& c2, const GraphicsPoint& e)
7575 : start(s)
7676 , control1(c1)
7777 , control2(c2)

8686
8787 void split(CubicBezier& left, CubicBezier& right) const
8888 {
89  FloatPoint startToControl1 = midPoint(control1, control2);
 89 GraphicsPoint startToControl1 = midPoint(control1, control2);
9090
9191 left.start = start;
9292 left.control1 = midPoint(start, control1);

9696 right.control1 = midPoint(right.control2, startToControl1);
9797 right.end = end;
9898
99  FloatPoint leftControl2ToRightControl1 = midPoint(left.control2, right.control1);
 99 GraphicsPoint leftControl2ToRightControl1 = midPoint(left.control2, right.control1);
100100 left.end = leftControl2ToRightControl1;
101101 right.start = leftControl2ToRightControl1;
102102 }
103103
104  FloatPoint start;
105  FloatPoint control1;
106  FloatPoint control2;
107  FloatPoint end;
 104 GraphicsPoint start;
 105 GraphicsPoint control1;
 106 GraphicsPoint control2;
 107 GraphicsPoint end;
108108};
109109
110110// FIXME: This function is possibly very slow due to the ifs required for proper path measuring

164164 return distance;
165165}
166166
167 float PathTraversalState::moveTo(const FloatPoint& point)
 167float PathTraversalState::moveTo(const GraphicsPoint& point)
168168{
169169 m_current = m_start = m_control1 = m_control2 = point;
170170 return 0;
171171}
172172
173 float PathTraversalState::lineTo(const FloatPoint& point)
 173float PathTraversalState::lineTo(const GraphicsPoint& point)
174174{
175175 float distance = distanceLine(m_current, point);
176176 m_current = m_control1 = m_control2 = point;
177177 return distance;
178178}
179179
180 float PathTraversalState::quadraticBezierTo(const FloatPoint& newControl, const FloatPoint& newEnd)
 180float PathTraversalState::quadraticBezierTo(const GraphicsPoint& newControl, const GraphicsPoint& newEnd)
181181{
182182 float distance = curveLength<QuadraticBezier>(*this, QuadraticBezier(m_current, newControl, newEnd));
183183

190190 return distance;
191191}
192192
193 float PathTraversalState::cubicBezierTo(const FloatPoint& newControl1, const FloatPoint& newControl2, const FloatPoint& newEnd)
 193float PathTraversalState::cubicBezierTo(const GraphicsPoint& newControl1, const GraphicsPoint& newControl2, const GraphicsPoint& newEnd)
194194{
195195 float distance = curveLength<CubicBezier>(*this, CubicBezier(m_current, newControl1, newControl2, newEnd));
196196

209209 m_success = true;
210210
211211 if ((m_action == TraversalPointAtLength || m_action == TraversalNormalAngleAtLength) && m_totalLength >= m_desiredLength) {
212  FloatSize change = m_current - m_previous;
 212 GraphicsSize change = m_current - m_previous;
213213 float slope = atan2f(change.height(), change.width());
214214 if (m_action == TraversalPointAtLength) {
215215 float offset = m_desiredLength - m_totalLength;
90929

Source/WebCore/platform/graphics/BitmapImage.h

178178 BitmapImage(ImageObserver* = 0);
179179
180180#if PLATFORM(WIN)
181  virtual void drawFrameMatchingSourceSize(GraphicsContext*, const FloatRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator);
 181 virtual void drawFrameMatchingSourceSize(GraphicsContext*, const GraphicsRect& dstRect, const IntSize& srcSize, ColorSpace styleColorSpace, CompositeOperator);
182182#endif
183  virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
 183 virtual void draw(GraphicsContext*, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace styleColorSpace, CompositeOperator);
184184
185185#if (OS(WINCE) && !PLATFORM(QT))
186  virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform,
187  const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const FloatRect& destRect);
 186 virtual void drawPattern(GraphicsContext*, const GraphicsRect& srcRect, const AffineTransform& patternTransform,
 187 const GraphicsPoint& phase, ColorSpace styleColorSpace, CompositeOperator, const GraphicsRect& destRect);
188188#endif
189189
190190#if PLATFORM(HAIKU)
90929

Source/WebCore/platform/graphics/Path.h

7676namespace WebCore {
7777
7878 class AffineTransform;
79  class FloatPoint;
80  class FloatRect;
81  class FloatSize;
 79 class GraphicsPoint;
 80 class GraphicsRect;
 81 class GraphicsSize;
8282 class GraphicsContext;
8383 class StrokeStyleApplier;
8484

9292
9393 struct PathElement {
9494 PathElementType type;
95  FloatPoint* points;
 95 GraphicsPoint* points;
9696 };
9797
9898 typedef void (*PathApplierFunction)(void* info, const PathElement*);

106106 Path(const Path&);
107107 Path& operator=(const Path&);
108108
109  bool contains(const FloatPoint&, WindRule rule = RULE_NONZERO) const;
110  bool strokeContains(StrokeStyleApplier*, const FloatPoint&) const;
111  FloatRect boundingRect() const;
112  FloatRect strokeBoundingRect(StrokeStyleApplier* = 0) const;
 109 bool contains(const GraphicsPoint&, WindRule rule = RULE_NONZERO) const;
 110 bool strokeContains(StrokeStyleApplier*, const GraphicsPoint&) const;
 111 GraphicsRect boundingRect() const;
 112 GraphicsRect strokeBoundingRect(StrokeStyleApplier* = 0) const;
113113
114114 float length() const;
115  FloatPoint pointAtLength(float length, bool& ok) const;
 115 GraphicsPoint pointAtLength(float length, bool& ok) const;
116116 float normalAngleAtLength(float length, bool& ok) const;
117117
118118 void clear();

120120 // Gets the current point of the current path, which is conceptually the final point reached by the path so far.
121121 // Note the Path can be empty (isEmpty() == true) and still have a current point.
122122 bool hasCurrentPoint() const;
123  FloatPoint currentPoint() const;
 123 GraphicsPoint currentPoint() const;
124124
125  void moveTo(const FloatPoint&);
126  void addLineTo(const FloatPoint&);
127  void addQuadCurveTo(const FloatPoint& controlPoint, const FloatPoint& endPoint);
128  void addBezierCurveTo(const FloatPoint& controlPoint1, const FloatPoint& controlPoint2, const FloatPoint& endPoint);
129  void addArcTo(const FloatPoint&, const FloatPoint&, float radius);
 125 void moveTo(const GraphicsPoint&);
 126 void addLineTo(const GraphicsPoint&);
 127 void addQuadCurveTo(const GraphicsPoint& controlPoint, const GraphicsPoint& endPoint);
 128 void addBezierCurveTo(const GraphicsPoint& controlPoint1, const GraphicsPoint& controlPoint2, const GraphicsPoint& endPoint);
 129 void addArcTo(const GraphicsPoint&, const GraphicsPoint&, float radius);
130130 void closeSubpath();
131131
132  void addArc(const FloatPoint&, float radius, float startAngle, float endAngle, bool anticlockwise);
133  void addRect(const FloatRect&);
134  void addEllipse(const FloatRect&);
135  void addRoundedRect(const FloatRect&, const FloatSize& roundingRadii);
136  void addRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
 132 void addArc(const GraphicsPoint&, float radius, float startAngle, float endAngle, bool anticlockwise);
 133 void addRect(const GraphicsRect&);
 134 void addEllipse(const GraphicsRect&);
 135 void addRoundedRect(const GraphicsRect&, const GraphicsSize& roundingRadii);
 136 void addRoundedRect(const GraphicsRect&, const GraphicsSize& topLeftRadius, const GraphicsSize& topRightRadius, const GraphicsSize& bottomLeftRadius, const GraphicsSize& bottomRightRadius);
137137 void addRoundedRect(const RoundedRect&);
138138
139  void translate(const FloatSize&);
 139 void translate(const GraphicsSize&);
140140
141141 PlatformPathPtr platformPath() const { return m_path; }
142142

144144 void transform(const AffineTransform&);
145145
146146 private:
147  void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
 147 void addBeziersForRoundedRect(const GraphicsRect&, const GraphicsSize& topLeftRadius, const GraphicsSize& topRightRadius, const GraphicsSize& bottomLeftRadius, const GraphicsSize& bottomRightRadius);
148148
149149 PlatformPathPtr m_path;
150150 };
90929

Source/WebCore/platform/graphics/BitmapImage.cpp

2727#include "config.h"
2828#include "BitmapImage.h"
2929
30 #include "FloatRect.h"
 30#include "GraphicsRect.h"
3131#include "ImageObserver.h"
3232#include "IntRect.h"
3333#include "MIMETypeRegistry.h"
90929

Source/WebCore/platform/graphics/Generator.h

3030
3131namespace WebCore {
3232
33 class FloatRect;
 33class GraphicsRect;
3434class GraphicsContext;
3535
3636class Generator : public RefCounted<Generator> {
3737public:
3838 virtual ~Generator() {};
3939
40  virtual void fill(GraphicsContext*, const FloatRect&) = 0;
41  virtual void adjustParametersForTiledDrawing(IntSize& /* size */, FloatRect& /* srcRect */) { }
 40 virtual void fill(GraphicsContext*, const GraphicsRect&) = 0;
 41 virtual void adjustParametersForTiledDrawing(IntSize& /* size */, GraphicsRect& /* srcRect */) { }
4242};
4343
4444} //namespace
90929

Source/WebCore/platform/ScrollAnimator.cpp

3131#include "config.h"
3232#include "ScrollAnimator.h"
3333
34 #include "FloatPoint.h"
 34#include "GraphicsPoint.h"
3535#include "PlatformWheelEvent.h"
3636#include "ScrollableArea.h"
3737#include <algorithm>

7272 return true;
7373}
7474
75 void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
 75void ScrollAnimator::scrollToOffsetWithoutAnimation(const GraphicsPoint& offset)
7676{
7777 if (m_currentPosX != offset.x() || m_currentPosY != offset.y()) {
7878 m_currentPosX = offset.x();

119119}
120120#endif
121121
122 FloatPoint ScrollAnimator::currentPosition() const
 122GraphicsPoint ScrollAnimator::currentPosition() const
123123{
124  return FloatPoint(m_currentPosX, m_currentPosY);
 124 return GraphicsPoint(m_currentPosX, m_currentPosY);
125125}
126126
127127void ScrollAnimator::notityPositionChanged()
90929

Source/WebCore/platform/DragImage.h

2727#define DragImage_h
2828
2929#include "IntSize.h"
30 #include "FloatSize.h"
 30#include "GraphicsSize.h"
3131#include <wtf/Forward.h>
3232
3333#if PLATFORM(MAC)

9090 //they should release the input image. As a corollary these methods don't guarantee
9191 //the input image ref will still be valid after they have been called
9292 DragImageRef fitDragImageToMaxSize(DragImageRef image, const IntSize& srcSize, const IntSize& size);
93  DragImageRef scaleDragImage(DragImageRef, FloatSize scale);
 93 DragImageRef scaleDragImage(DragImageRef, GraphicsSize scale);
9494 DragImageRef dissolveDragImageToFraction(DragImageRef image, float delta);
9595
9696 DragImageRef createDragImageFromImage(Image*);
90929

Source/WebCore/platform/mac/ScrollViewMac.mm

2727#import "ScrollView.h"
2828
2929#import "BlockExceptions.h"
30 #import "FloatRect.h"
 30#import "GraphicsRect.h"
3131#import "IntRect.h"
3232#import "Logging.h"
3333#import "NotImplemented.h"
90929

Source/WebCore/platform/mac/ThemeMac.mm

272272 inflatedRect.setWidth(inflatedRect.width() / zoomFactor);
273273 inflatedRect.setHeight(inflatedRect.height() / zoomFactor);
274274 context->translate(inflatedRect.x(), inflatedRect.y());
275  context->scale(FloatSize(zoomFactor, zoomFactor));
 275 context->scale(GraphicsSize(zoomFactor, zoomFactor));
276276 context->translate(-inflatedRect.x(), -inflatedRect.y());
277277 }
278278

348348 inflatedRect.setWidth(inflatedRect.width() / zoomFactor);
349349 inflatedRect.setHeight(inflatedRect.height() / zoomFactor);
350350 context->translate(inflatedRect.x(), inflatedRect.y());
351  context->scale(FloatSize(zoomFactor, zoomFactor));
 351 context->scale(GraphicsSize(zoomFactor, zoomFactor));
352352 context->translate(-inflatedRect.x(), -inflatedRect.y());
353353 }
354354

466466 inflatedRect.setWidth(inflatedRect.width() / zoomFactor);
467467 inflatedRect.setHeight(inflatedRect.height() / zoomFactor);
468468 context->translate(inflatedRect.x(), inflatedRect.y());
469  context->scale(FloatSize(zoomFactor, zoomFactor));
 469 context->scale(GraphicsSize(zoomFactor, zoomFactor));
470470 context->translate(-inflatedRect.x(), -inflatedRect.y());
471471 }
472472 }

533533 rect.setWidth(rect.width() / zoomFactor);
534534 rect.setHeight(rect.height() / zoomFactor);
535535 context->translate(rect.x(), rect.y());
536  context->scale(FloatSize(zoomFactor, zoomFactor));
 536 context->scale(GraphicsSize(zoomFactor, zoomFactor));
537537 context->translate(-rect.x(), -rect.y());
538538 }
539539 CGRect bounds(rect);
90929

Source/WebCore/platform/mac/ScrollAnimatorMac.h

2929#if ENABLE(SMOOTH_SCROLLING)
3030
3131#include "IntRect.h"
32 #include "FloatPoint.h"
33 #include "FloatSize.h"
 32#include "GraphicsPoint.h"
 33#include "GraphicsSize.h"
3434#include "ScrollAnimator.h"
3535#include "Timer.h"
3636#include <wtf/RetainPtr.h>

6161 virtual ~ScrollAnimatorMac();
6262
6363 virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
64  virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
 64 virtual void scrollToOffsetWithoutAnimation(const GraphicsPoint&);
6565
6666#if ENABLE(RUBBER_BANDING)
6767 virtual void handleWheelEvent(PlatformWheelEvent&);

7272
7373 virtual void cancelAnimations();
7474
75  void immediateScrollToPoint(const FloatPoint& newPosition);
 75 void immediateScrollToPoint(const GraphicsPoint& newPosition);
7676 void immediateScrollByDeltaX(float deltaX);
7777 void immediateScrollByDeltaY(float deltaY);
7878
79  void immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition);
 79 void immediateScrollToPointForScrollAnimation(const GraphicsPoint& newPosition);
8080
8181 void setIsDrawingIntoLayer(bool b) { m_drawingIntoLayer = b; }
8282 bool isDrawingIntoLayer() const { return m_drawingIntoLayer; }

131131
132132 float adjustScrollXPositionIfNecessary(float) const;
133133 float adjustScrollYPositionIfNecessary(float) const;
134  FloatPoint adjustScrollPositionIfNecessary(const FloatPoint&) const;
 134 GraphicsPoint adjustScrollPositionIfNecessary(const GraphicsPoint&) const;
135135
136136#if ENABLE(RUBBER_BANDING)
137137 bool allowsVerticalStretching() const;

152152 bool m_didCumulativeHorizontalScrollEverSwitchToOppositeDirectionOfPin;
153153
154154 CFTimeInterval m_lastMomentumScrollTimestamp;
155  FloatSize m_overflowScrollDelta;
156  FloatSize m_stretchScrollForce;
157  FloatSize m_momentumVelocity;
 155 GraphicsSize m_overflowScrollDelta;
 156 GraphicsSize m_stretchScrollForce;
 157 GraphicsSize m_momentumVelocity;
158158
159159 // Rubber band state.
160160 CFTimeInterval m_startTime;
161  FloatSize m_startStretch;
162  FloatPoint m_origOrigin;
163  FloatSize m_origVelocity;
 161 GraphicsSize m_startStretch;
 162 GraphicsPoint m_origOrigin;
 163 GraphicsSize m_origVelocity;
164164 Timer<ScrollAnimatorMac> m_snapRubberBandTimer;
165165#endif
166166 bool m_drawingIntoLayer;
90929

Source/WebCore/platform/mac/ScrollAnimatorMac.mm

2929
3030#include "ScrollAnimatorMac.h"
3131
32 #include "FloatPoint.h"
 32#include "GraphicsPoint.h"
3333#include "PlatformGestureEvent.h"
3434#include "PlatformWheelEvent.h"
3535#include "ScrollView.h"

9090 if (!_animator)
9191 return NSZeroRect;
9292
93  WebCore::FloatPoint currentPosition = _animator->currentPosition();
 93 WebCore::GraphicsPoint currentPosition = _animator->currentPosition();
9494 return NSMakeRect(currentPosition.x(), currentPosition.y(), 0, 0);
9595}
9696

516516 return true;
517517}
518518
519 void ScrollAnimatorMac::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
 519void ScrollAnimatorMac::scrollToOffsetWithoutAnimation(const GraphicsPoint& offset)
520520{
521521 [m_scrollAnimationHelper.get() _stopRun];
522522 immediateScrollToPoint(offset);

538538 return max<float>(min<float>(position, m_scrollableArea->contentsSize().height() - m_scrollableArea->visibleHeight()), 0);
539539}
540540
541 FloatPoint ScrollAnimatorMac::adjustScrollPositionIfNecessary(const FloatPoint& position) const
 541GraphicsPoint ScrollAnimatorMac::adjustScrollPositionIfNecessary(const GraphicsPoint& position) const
542542{
543543 if (!m_scrollableArea->constrainsScrollingToContentEdge())
544544 return position;

546546 float newX = max<float>(min<float>(position.x(), m_scrollableArea->contentsSize().width() - m_scrollableArea->visibleWidth()), 0);
547547 float newY = max<float>(min<float>(position.y(), m_scrollableArea->contentsSize().height() - m_scrollableArea->visibleHeight()), 0);
548548
549  return FloatPoint(newX, newY);
 549 return GraphicsPoint(newX, newY);
550550}
551551
552 void ScrollAnimatorMac::immediateScrollToPoint(const FloatPoint& newPosition)
 552void ScrollAnimatorMac::immediateScrollToPoint(const GraphicsPoint& newPosition)
553553{
554  FloatPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
 554 GraphicsPoint adjustedPosition = adjustScrollPositionIfNecessary(newPosition);
555555
556556 if (adjustedPosition.x() == m_currentPosX && adjustedPosition.y() == m_currentPosY)
557557 return;

583583 notityPositionChanged();
584584}
585585
586 void ScrollAnimatorMac::immediateScrollToPointForScrollAnimation(const FloatPoint& newPosition)
 586void ScrollAnimatorMac::immediateScrollToPointForScrollAnimation(const GraphicsPoint& newPosition)
587587{
588588 ASSERT(m_scrollAnimationHelper);
589589 CGFloat progress = [m_scrollAnimationHelper.get() _progress];

865865
866866bool ScrollAnimatorMac::pinnedInDirection(float deltaX, float deltaY)
867867{
868  FloatSize limitDelta;
 868 GraphicsSize limitDelta;
869869 if (fabsf(deltaY) >= fabsf(deltaX)) {
870870 if (deltaY < 0) {
871871 // We are trying to scroll up. Make sure we are not pinned to the top

933933 float deltaY = m_overflowScrollDelta.height();
934934
935935 // Reset overflow values because we may decide to remove delta at various points and put it into overflow.
936  m_overflowScrollDelta = FloatSize();
 936 m_overflowScrollDelta = GraphicsSize();
937937
938938 float eventCoalescedDeltaX = -wheelEvent.deltaX();
939939 float eventCoalescedDeltaY = -wheelEvent.deltaY();

970970 m_lastMomentumScrollTimestamp = wheelEvent.timestamp();
971971 } else {
972972 m_lastMomentumScrollTimestamp = wheelEvent.timestamp();
973  m_momentumVelocity = FloatSize();
 973 m_momentumVelocity = GraphicsSize();
974974 }
975975
976976 if (isVerticallyStretched) {

10601060 m_stretchScrollForce.setWidth(m_stretchScrollForce.width() + deltaX);
10611061 m_stretchScrollForce.setHeight(m_stretchScrollForce.height() + deltaY);
10621062
1063  FloatSize dampedDelta(ceilf(elasticDeltaForReboundDelta(m_stretchScrollForce.width())), ceilf(elasticDeltaForReboundDelta(m_stretchScrollForce.height())));
1064  FloatPoint origOrigin = (m_scrollableArea->visibleContentRect().location() + m_scrollableArea->scrollOrigin()) - stretchAmount;
1065  FloatPoint newOrigin = origOrigin + dampedDelta;
 1063 GraphicsSize dampedDelta(ceilf(elasticDeltaForReboundDelta(m_stretchScrollForce.width())), ceilf(elasticDeltaForReboundDelta(m_stretchScrollForce.height())));
 1064 GraphicsPoint origOrigin = (m_scrollableArea->visibleContentRect().location() + m_scrollableArea->scrollOrigin()) - stretchAmount;
 1065 GraphicsPoint newOrigin = origOrigin + dampedDelta;
10661066
10671067 if (origOrigin != newOrigin) {
10681068 m_scrollableArea->setConstrainsScrollingToContentEdge(false);

10881088 m_momentumScrollInProgress = false;
10891089 m_ignoreMomentumScrolls = false;
10901090 m_lastMomentumScrollTimestamp = 0;
1091  m_momentumVelocity = FloatSize();
 1091 m_momentumVelocity = GraphicsSize();
10921092 m_scrollerInitiallyPinnedOnLeft = m_scrollableArea->isHorizontalScrollerPinnedToMinimumPosition();
10931093 m_scrollerInitiallyPinnedOnRight = m_scrollableArea->isHorizontalScrollerPinnedToMaximumPosition();
10941094 m_cumulativeHorizontalScroll = 0;

10981098 m_stretchScrollForce.setWidth(reboundDeltaForElasticDelta(stretchAmount.width()));
10991099 m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(stretchAmount.height()));
11001100
1101  m_overflowScrollDelta = FloatSize();
 1101 m_overflowScrollDelta = GraphicsSize();
11021102
11031103 if (m_snapRubberBandTimer.isActive())
11041104 m_snapRubberBandTimer.stop();

11151115{
11161116 CFTimeInterval timeDelta = [[NSProcessInfo processInfo] systemUptime] - m_lastMomentumScrollTimestamp;
11171117 if (m_lastMomentumScrollTimestamp && timeDelta >= scrollVelocityZeroingTimeout)
1118  m_momentumVelocity = FloatSize();
 1118 m_momentumVelocity = GraphicsSize();
11191119
11201120 m_inScrollGesture = false;
11211121

11231123 return;
11241124
11251125 m_startTime = [NSDate timeIntervalSinceReferenceDate];
1126  m_startStretch = FloatSize();
1127  m_origOrigin = FloatPoint();
1128  m_origVelocity = FloatSize();
 1126 m_startStretch = GraphicsSize();
 1127 m_origOrigin = GraphicsPoint();
 1128 m_origVelocity = GraphicsSize();
11291129
11301130 m_snapRubberBandTimer.startRepeating(1.0/60.0);
11311131}

11491149 if (!m_momentumScrollInProgress || m_ignoreMomentumScrolls) {
11501150 CFTimeInterval timeDelta = [NSDate timeIntervalSinceReferenceDate] - m_startTime;
11511151
1152  if (m_startStretch == FloatSize()) {
 1152 if (m_startStretch == GraphicsSize()) {
11531153 m_startStretch = m_scrollableArea->overhangAmount();
1154  if (m_startStretch == FloatSize()) {
 1154 if (m_startStretch == GraphicsSize()) {
11551155 m_snapRubberBandTimer.stop();
1156  m_stretchScrollForce = FloatSize();
 1156 m_stretchScrollForce = GraphicsSize();
11571157 m_startTime = 0;
1158  m_startStretch = FloatSize();
1159  m_origOrigin = FloatPoint();
1160  m_origVelocity = FloatSize();
 1158 m_startStretch = GraphicsSize();
 1159 m_origOrigin = GraphicsPoint();
 1160 m_origVelocity = GraphicsSize();
11611161
11621162 return;
11631163 }

11821182 m_origVelocity.setHeight(0);
11831183 }
11841184
1185  FloatPoint delta(roundToDevicePixelTowardZero(elasticDeltaForTimeDelta(m_startStretch.width(), -m_origVelocity.width(), (float)timeDelta)),
 1185 GraphicsPoint delta(roundToDevicePixelTowardZero(elasticDeltaForTimeDelta(m_startStretch.width(), -m_origVelocity.width(), (float)timeDelta)),
11861186 roundToDevicePixelTowardZero(elasticDeltaForTimeDelta(m_startStretch.height(), -m_origVelocity.height(), (float)timeDelta)));
11871187
11881188 if (fabs(delta.x()) >= 1 || fabs(delta.y()) >= 1) {
1189  FloatPoint newOrigin = m_origOrigin + delta;
 1189 GraphicsPoint newOrigin = m_origOrigin + delta;
11901190
11911191 m_scrollableArea->setConstrainsScrollingToContentEdge(false);
11921192 immediateScrollToPoint(newOrigin);
11931193 m_scrollableArea->setConstrainsScrollingToContentEdge(true);
11941194
1195  FloatSize newStretch = m_scrollableArea->overhangAmount();
 1195 GraphicsSize newStretch = m_scrollableArea->overhangAmount();
11961196
11971197 m_stretchScrollForce.setWidth(reboundDeltaForElasticDelta(newStretch.width()));
11981198 m_stretchScrollForce.setHeight(reboundDeltaForElasticDelta(newStretch.height()));

12021202 m_scrollableArea->didCompleteRubberBand(roundedIntSize(m_startStretch));
12031203
12041204 m_snapRubberBandTimer.stop();
1205  m_stretchScrollForce = FloatSize();
 1205 m_stretchScrollForce = GraphicsSize();
12061206
12071207 m_startTime = 0;
1208  m_startStretch = FloatSize();
1209  m_origOrigin = FloatPoint();
1210  m_origVelocity = FloatSize();
 1208 m_startStretch = GraphicsSize();
 1209 m_origOrigin = GraphicsPoint();
 1210 m_origVelocity = GraphicsSize();
12111211 }
12121212 } else {
12131213 m_startTime = [NSDate timeIntervalSinceReferenceDate];
1214  m_startStretch = FloatSize();
 1214 m_startStretch = GraphicsSize();
12151215 }
12161216}
12171217#endif
90929

Source/WebCore/platform/mac/DragImageMac.mm

5353 // delete it. It will be released when it falls out of scope.
5454}
5555
56 RetainPtr<NSImage> scaleDragImage(RetainPtr<NSImage> image, FloatSize scale)
 56RetainPtr<NSImage> scaleDragImage(RetainPtr<NSImage> image, GraphicsSize scale)
5757{
5858 NSSize originalSize = [image.get() size];
5959 NSSize newSize = NSMakeSize((originalSize.width * scale.width()), (originalSize.height * scale.height()));

211211 [[textColor colorUsingColorSpaceName:NSDeviceRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
212212 graphicsContext.setFillColor(makeRGBA(red * 255, green * 255, blue * 255, alpha * 255), ColorSpaceDeviceRGB);
213213
214  webCoreFont.drawText(&graphicsContext, run, FloatPoint(point.x, (flipped ? point.y : (-1 * point.y))));
 214 webCoreFont.drawText(&graphicsContext, run, GraphicsPoint(point.x, (flipped ? point.y : (-1 * point.y))));
215215
216216 if (!flipped)
217217 CGContextScaleCTM(cgContext, 1, -1);
90929

Source/WebCore/platform/mac/PlatformScreenMac.mm

2626#import "config.h"
2727#import "PlatformScreen.h"
2828
29 #import "FloatRect.h"
 29#import "GraphicsRect.h"
3030#import "Frame.h"
3131#import "FrameView.h"
3232#import "Page.h"

5151// These functions scale between screen and page coordinates because JavaScript/DOM operations
5252// assume that the screen and the page share the same coordinate system.
5353
54 FloatRect screenRect(Widget* widget)
 54GraphicsRect screenRect(Widget* widget)
5555{
5656 NSWindow *window = widget ? [widget->platformWidget() window] : nil;
5757 return toUserSpace([screenForWindow(window) frame], window);
5858}
5959
60 FloatRect screenAvailableRect(Widget* widget)
 60GraphicsRect screenAvailableRect(Widget* widget)
6161{
6262 NSWindow *window = widget ? [widget->platformWidget() window] : nil;
6363 return toUserSpace([screenForWindow(window) visibleFrame], window);

8585#endif
8686}
8787
88 FloatRect toUserSpace(const NSRect& rect, NSWindow *destination)
 88GraphicsRect toUserSpace(const NSRect& rect, NSWindow *destination)
8989{
90  FloatRect userRect = rect;
 90 GraphicsRect userRect = rect;
9191 userRect.setY(NSMaxY([screenForWindow(destination) frame]) - (userRect.y() + userRect.height())); // flip
9292 if (destination)
9393 userRect.scale(1 / windowScaleFactor(destination)); // scale down
9494 return userRect;
9595}
9696
97 NSRect toDeviceSpace(const FloatRect& rect, NSWindow *source)
 97NSRect toDeviceSpace(const GraphicsRect& rect, NSWindow *source)
9898{
99  FloatRect deviceRect = rect;
 99 GraphicsRect deviceRect = rect;
100100 if (source)
101101 deviceRect.scale(windowScaleFactor(source)); // scale up
102102 deviceRect.setY(NSMaxY([screenForWindow(source) frame]) - (deviceRect.y() + deviceRect.height())); // flip
90929

Source/WebCore/platform/audio/Cone.cpp

4242{
4343}
4444
45 double ConeEffect::gain(FloatPoint3D sourcePosition, FloatPoint3D sourceOrientation, FloatPoint3D listenerPosition)
 45double ConeEffect::gain(GraphicsPoint3D sourcePosition, GraphicsPoint3D sourceOrientation, GraphicsPoint3D listenerPosition)
4646{
4747 if (sourceOrientation.isZero() || ((m_innerAngle == 360.0) && (m_outerAngle == 360.0)))
4848 return 1.0; // no cone specified - unity gain
4949
5050 // Normalized source-listener vector
51  FloatPoint3D sourceToListener = listenerPosition - sourcePosition;
 51 GraphicsPoint3D sourceToListener = listenerPosition - sourcePosition;
5252 sourceToListener.normalize();
5353
54  FloatPoint3D normalizedSourceOrientation = sourceOrientation;
 54 GraphicsPoint3D normalizedSourceOrientation = sourceOrientation;
5555 normalizedSourceOrientation.normalize();
5656
5757 // Angle between the source orientation vector and the source-listener vector
90929

Source/WebCore/platform/audio/Cone.h

2929#ifndef Cone_h
3030#define Cone_h
3131
32 #include "FloatPoint3D.h"
 32#include "GraphicsPoint3D.h"
3333
3434namespace WebCore {
3535

4040 ConeEffect();
4141
4242 // Returns scalar gain for the given source/listener positions/orientations
43  double gain(FloatPoint3D sourcePosition, FloatPoint3D sourceOrientation, FloatPoint3D listenerPosition);
 43 double gain(GraphicsPoint3D sourcePosition, GraphicsPoint3D sourceOrientation, GraphicsPoint3D listenerPosition);
4444
4545 // Angles in degrees
4646 void setInnerAngle(double innerAngle) { m_innerAngle = innerAngle; }
90929

Source/WebCore/platform/ScrollAnimator.h

3636
3737namespace WebCore {
3838
39 class FloatPoint;
 39class GraphicsPoint;
4040class PlatformWheelEvent;
4141class ScrollableArea;
4242class Scrollbar;

5757 // The base class implementation always scrolls immediately, never animates.
5858 virtual bool scroll(ScrollbarOrientation, ScrollGranularity, float step, float multiplier);
5959
60  virtual void scrollToOffsetWithoutAnimation(const FloatPoint&);
 60 virtual void scrollToOffsetWithoutAnimation(const GraphicsPoint&);
6161
6262 ScrollableArea* scrollableArea() const { return m_scrollableArea; }
6363

6868 virtual void handleGestureEvent(const PlatformGestureEvent&);
6969#endif
7070
71  FloatPoint currentPosition() const;
 71 GraphicsPoint currentPosition() const;
7272
7373 virtual void cancelAnimations() { }
7474

9393 virtual void notityPositionChanged();
9494
9595 ScrollableArea* m_scrollableArea;
96  float m_currentPosX; // We avoid using a FloatPoint in order to reduce
 96 float m_currentPosX; // We avoid using a GraphicsPoint in order to reduce
9797 float m_currentPosY; // subclass code complexity.
9898};
9999
90929

Source/WebCore/platform/DragImage.cpp

5252 }
5353
5454 if (srcSize == originalSize)
55  return resizeRatio > 0.0f ? scaleDragImage(image, FloatSize(resizeRatio, resizeRatio)) : image;
 55 return resizeRatio > 0.0f ? scaleDragImage(image, GraphicsSize(resizeRatio, resizeRatio)) : image;
5656
5757 // The image was scaled in the webpage so at minimum we must account for that scaling
5858 float scalex = srcSize.width() / (float)originalSize.width();

6262 scaley *= resizeRatio;
6363 }
6464
65  return scaleDragImage(image, FloatSize(scalex, scaley));
 65 return scaleDragImage(image, GraphicsSize(scalex, scaley));
6666}
6767
6868DragImageRef createDragImageForSelection(Frame* frame)
90929

Source/WebCore/platform/Scrollbar.cpp

269269 if (m_draggingDocument)
270270 delta = pos - m_documentDragPos;
271271 m_draggingDocument = true;
272  FloatPoint currentPosition = m_scrollableArea->scrollAnimator()->currentPosition();
 272 GraphicsPoint currentPosition = m_scrollableArea->scrollAnimator()->currentPosition();
273273 int destinationPosition = (m_orientation == HorizontalScrollbar ? currentPosition.x() : currentPosition.y()) + delta;
274274 if (delta > 0)
275275 destinationPosition = min(destinationPosition + delta, maximum());
90929

Source/WebCore/platform/PlatformScreen.h

2626#ifndef PlatformScreen_h
2727#define PlatformScreen_h
2828
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include <wtf/Forward.h>
3131#include <wtf/RefPtr.h>
3232

4242
4343namespace WebCore {
4444
45  class FloatRect;
 45 class GraphicsRect;
4646 class Widget;
4747
4848 int screenDepth(Widget*);
4949 int screenDepthPerComponent(Widget*);
5050 bool screenIsMonochrome(Widget*);
5151
52  FloatRect screenRect(Widget*);
53  FloatRect screenAvailableRect(Widget*);
 52 GraphicsRect screenRect(Widget*);
 53 GraphicsRect screenAvailableRect(Widget*);
5454
5555#if PLATFORM(MAC)
5656 NSScreen *screenForWindow(NSWindow *);
5757
58  FloatRect toUserSpace(const NSRect&, NSWindow *destination);
59  NSRect toDeviceSpace(const FloatRect&, NSWindow *source);
 58 GraphicsRect toUserSpace(const NSRect&, NSWindow *destination);
 59 NSRect toDeviceSpace(const GraphicsRect&, NSWindow *source);
6060
6161 NSPoint flipScreenPoint(const NSPoint&, NSScreen *);
6262#endif
90929

Source/WebCore/platform/PlatformWheelEvent.h

6060
6161namespace WebCore {
6262
63  class FloatPoint;
64  class FloatSize;
 63 class GraphicsPoint;
 64 class GraphicsSize;
6565
6666 // Wheel events come in two flavors:
6767 // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precise number of pixels to scroll. It is sent directly by MacBook touchpads on OS X,

189189
190190#if PLATFORM(WIN)
191191 PlatformWheelEvent(HWND, WPARAM, LPARAM, bool isMouseHWheel);
192  PlatformWheelEvent(HWND, const FloatSize& delta, const FloatPoint& location);
 192 PlatformWheelEvent(HWND, const GraphicsSize& delta, const GraphicsPoint& location);
193193#endif
194194
195195#if PLATFORM(WX)
90929

Source/WebCore/accessibility/AccessibilityRenderObject.cpp

3333#include "AccessibilityImageMapLink.h"
3434#include "AccessibilityListBox.h"
3535#include "EventNames.h"
36 #include "FloatRect.h"
 36#include "GraphicsRect.h"
3737#include "Frame.h"
3838#include "FrameLoader.h"
3939#include "FrameSelection.h"

686686 ASSERT(m_renderer);
687687 IntRect contentRect = m_renderer->absoluteClippedOverflowRect();
688688 FrameView* view = m_renderer->frame()->view();
689  FloatRect viewRect = view->visibleContentRect();
 689 GraphicsRect viewRect = view->visibleContentRect();
690690 viewRect.intersect(contentRect);
691691 return viewRect.isEmpty();
692692}

14261426
14271427 // absoluteFocusRingQuads will query the hierarchy below this element, which for large webpages can be very slow.
14281428 // For a web area, which will have the most elements of any element, absoluteQuads should be used.
1429  Vector<FloatQuad> quads;
 1429 Vector<GraphicsQuad> quads;
14301430 if (obj->isText())
14311431 toRenderText(obj)->absoluteQuads(quads, RenderText::ClipToEllipsis);
14321432 else if (isWebArea())
90929

Source/WebCore/accessibility/AccessibilityObject.cpp

3131
3232#include "AXObjectCache.h"
3333#include "AccessibilityRenderObject.h"
34 #include "FloatRect.h"
 34#include "GraphicsRect.h"
3535#include "FocusController.h"
3636#include "Frame.h"
3737#include "FrameLoader.h"
90929

Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

286286 $type =~ s/SVGAnimated//;
287287
288288 if ($type eq "Point" or $type eq "Rect") {
289  $implIncludes{"Float$type.h"} = 1;
 289 $implIncludes{"Graphics$type.h"} = 1;
290290 } elsif ($type eq "String") {
291291 $implIncludes{"PlatformString.h"} = 1;
292292 }
90929

Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

213213 }
214214
215215 if ($svgPropertyType) {
216  $svgPropertyType = "SVGPoint" if $svgPropertyType eq "FloatPoint";
 216 $svgPropertyType = "SVGPoint" if $svgPropertyType eq "GraphicsPoint";
217217 }
218218
219219 return ($svgPropertyType, $svgListPropertyType, $svgNativeType);

275275 push(@headerContent, "\ntemplate<typename PropertyType> class SVGListPropertyTearOff;\n");
276276 }
277277 }
278  push(@headerContent, "\nclass FloatRect;\n") if $svgPropertyType && $svgPropertyType eq "FloatRect";
 278 push(@headerContent, "\nclass GraphicsRect;\n") if $svgPropertyType && $svgPropertyType eq "GraphicsRect";
279279 push(@headerContent, "\nclass $className {\n");
280280 push(@headerContent, "public:\n");
281281
90929

Source/WebCore/bindings/scripts/CodeGenerator.pm

7676 "SVGNumber" => "SVGPropertyTearOff<float>",
7777 "SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
7878 "SVGPathSegList" => "SVGPathSegListPropertyTearOff",
79  "SVGPoint" => "SVGPropertyTearOff<FloatPoint>",
 79 "SVGPoint" => "SVGPropertyTearOff<GraphicsPoint>",
8080 "SVGPointList" => "SVGListPropertyTearOff<SVGPointList>",
8181 "SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
82  "SVGRect" => "SVGPropertyTearOff<FloatRect>",
 82 "SVGRect" => "SVGPropertyTearOff<GraphicsRect>",
8383 "SVGStringList" => "SVGStaticListPropertyTearOff<SVGStringList>",
8484 "SVGTransform" => "SVGPropertyTearOff<SVGTransform>",
8585 "SVGTransformList" => "SVGTransformListPropertyTearOff"
90929

Source/WebCore/svg/SVGStyledLocatableElement.h

3535 virtual SVGElement* nearestViewportElement() const;
3636 virtual SVGElement* farthestViewportElement() const;
3737
38  virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
 38 virtual GraphicsRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
3939 virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
4040 virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
4141
90929

Source/WebCore/svg/SVGPreserveAspectRatio.cpp

2525#include "SVGPreserveAspectRatio.h"
2626
2727#include "AffineTransform.h"
28 #include "FloatRect.h"
 28#include "GraphicsRect.h"
2929#include "SVGParserUtilities.h"
3030#include <wtf/text/WTFString.h>
3131

156156 return aspectRatio;
157157}
158158
159 void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRect)
 159void SVGPreserveAspectRatio::transformRect(GraphicsRect& destRect, GraphicsRect& srcRect)
160160{
161  FloatSize imageSize = srcRect.size();
 161 GraphicsSize imageSize = srcRect.size();
162162 float origDestWidth = destRect.width();
163163 float origDestHeight = destRect.height();
164164 switch (m_meetOrSlice) {
90929

Source/WebCore/svg/SVGPathStringBuilder.cpp

3535 return m_stringBuilder.toString();
3636}
3737
38 void SVGPathStringBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode mode)
 38void SVGPathStringBuilder::moveTo(const GraphicsPoint& targetPoint, bool, PathCoordinateMode mode)
3939{
4040 if (mode == AbsoluteCoordinates)
4141 m_stringBuilder.append(String::format("M %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));

4343 m_stringBuilder.append(String::format("m %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
4444}
4545
46 void SVGPathStringBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
 46void SVGPathStringBuilder::lineTo(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
4747{
4848 if (mode == AbsoluteCoordinates)
4949 m_stringBuilder.append(String::format("L %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));

6767 m_stringBuilder.append(String::format("v %.6lg ", y));
6868}
6969
70 void SVGPathStringBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 70void SVGPathStringBuilder::curveToCubic(const GraphicsPoint& point1, const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
7171{
7272 if (mode == AbsoluteCoordinates)
7373 m_stringBuilder.append(String::format("C %.6lg %.6lg %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));

7575 m_stringBuilder.append(String::format("c %.6lg %.6lg %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));
7676}
7777
78 void SVGPathStringBuilder::curveToCubicSmooth(const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 78void SVGPathStringBuilder::curveToCubicSmooth(const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
7979{
8080 if (mode == AbsoluteCoordinates)
8181 m_stringBuilder.append(String::format("S %.6lg %.6lg %.6lg %.6lg ", point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));

8383 m_stringBuilder.append(String::format("s %.6lg %.6lg %.6lg %.6lg ", point2.x(), point2.y(), targetPoint.x(), targetPoint.y()));
8484}
8585
86 void SVGPathStringBuilder::curveToQuadratic(const FloatPoint& point1, const FloatPoint& targetPoint, PathCoordinateMode mode)
 86void SVGPathStringBuilder::curveToQuadratic(const GraphicsPoint& point1, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
8787{
8888 if (mode == AbsoluteCoordinates)
8989 m_stringBuilder.append(String::format("Q %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), targetPoint.x(), targetPoint.y()));

9191 m_stringBuilder.append(String::format("q %.6lg %.6lg %.6lg %.6lg ", point1.x(), point1.y(), targetPoint.x(), targetPoint.y()));
9292}
9393
94 void SVGPathStringBuilder::curveToQuadraticSmooth(const FloatPoint& targetPoint, PathCoordinateMode mode)
 94void SVGPathStringBuilder::curveToQuadraticSmooth(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
9595{
9696 if (mode == AbsoluteCoordinates)
9797 m_stringBuilder.append(String::format("T %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));

9999 m_stringBuilder.append(String::format("t %.6lg %.6lg ", targetPoint.x(), targetPoint.y()));
100100}
101101
102 void SVGPathStringBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const FloatPoint& targetPoint, PathCoordinateMode mode)
 102void SVGPathStringBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
103103{
104104 if (mode == AbsoluteCoordinates)
105105 m_stringBuilder.append(String::format("A %.6lg %.6lg %.6lg %d %d %.6lg %.6lg ", r1, r2, angle, largeArcFlag, sweepFlag, targetPoint.x(), targetPoint.y()));
90929

Source/WebCore/svg/SVGParserUtilities.h

3030
3131namespace WebCore {
3232
33 class FloatRect;
 33class GraphicsRect;
3434class SVGPointList;
3535
3636bool parseNumber(const UChar*& ptr, const UChar* end, float& number, bool skip = true);
3737bool parseNumberFromString(const String&, float& number, bool skip = true);
3838bool parseNumberOptionalNumber(const String& s, float& h, float& v);
3939bool parseArcFlag(const UChar*& ptr, const UChar* end, bool& flag);
40 bool parseRect(const String&, FloatRect&);
 40bool parseRect(const String&, GraphicsRect&);
4141
4242// SVG allows several different whitespace characters:
4343// http://www.w3.org/TR/SVG/paths.html#PathDataBNF
90929

Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp

154154 if (this->hasAttribute(SVGNames::heightAttr))
155155 filterEffect->setHasHeight(true);
156156
157  FloatRect effectBBox;
 157 GraphicsRect effectBBox;
158158 if (primitiveBoundingBoxMode)
159  effectBBox = FloatRect(x().valueAsPercentage(),
 159 effectBBox = GraphicsRect(x().valueAsPercentage(),
160160 y().valueAsPercentage(),
161161 width().valueAsPercentage(),
162162 height().valueAsPercentage());
163163 else
164  effectBBox = FloatRect(x().value(this),
 164 effectBBox = GraphicsRect(x().value(this),
165165 y().value(this),
166166 width().value(this),
167167 height().value(this));
90929

Source/WebCore/svg/SVGPathParserFactory.h

5555 bool buildAnimatedSVGPathByteStream(SVGPathByteStream*, SVGPathByteStream*, OwnPtr<SVGPathByteStream>&, float);
5656 bool getSVGPathSegAtLengthFromSVGPathByteStream(SVGPathByteStream*, float length, unsigned long& pathSeg);
5757 bool getTotalLengthOfSVGPathByteStream(SVGPathByteStream*, float& totalLength);
58  bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream*, float length, FloatPoint&);
 58 bool getPointAtLengthOfSVGPathByteStream(SVGPathByteStream*, float length, GraphicsPoint&);
5959
6060private:
6161 SVGPathParserFactory();
90929

Source/WebCore/svg/SVGSVGElement.h

6161 const AtomicString& contentStyleType() const;
6262 void setContentStyleType(const AtomicString& type);
6363
64  FloatRect viewport() const;
 64 GraphicsRect viewport() const;
6565
6666 void setContainerSize(const IntSize& containerSize) { m_containerSize = containerSize; m_hasSetContainerSize = true; }
6767 IntSize containerSize() const { return m_containerSize; }

7878 void setUseCurrentView(bool currentView);
7979
8080 SVGViewSpec* currentView() const;
81  FloatRect currentViewBoxRect() const;
 81 GraphicsRect currentViewBoxRect() const;
8282
8383 float currentScale() const;
8484 void setCurrentScale(float scale);
8585
86  FloatPoint& currentTranslate() { return m_translation; }
87  void setCurrentTranslate(const FloatPoint&);
 86 GraphicsPoint& currentTranslate() { return m_translation; }
 87 void setCurrentTranslate(const GraphicsPoint&);
8888
8989 // Only used from the bindings.
9090 void updateCurrentTranslate();

103103 void unsuspendRedrawAll();
104104 void forceRedraw();
105105
106  NodeList* getIntersectionList(const FloatRect&, SVGElement* referenceElement);
107  NodeList* getEnclosureList(const FloatRect&, SVGElement* referenceElement);
108  bool checkIntersection(SVGElement*, const FloatRect&);
109  bool checkEnclosure(SVGElement*, const FloatRect&);
 106 NodeList* getIntersectionList(const GraphicsRect&, SVGElement* referenceElement);
 107 NodeList* getEnclosureList(const GraphicsRect&, SVGElement* referenceElement);
 108 bool checkIntersection(SVGElement*, const GraphicsRect&);
 109 bool checkEnclosure(SVGElement*, const GraphicsRect&);
110110 void deselectAll();
111111
112112 static float createSVGNumber();
113113 static SVGLength createSVGLength();
114114 static SVGAngle createSVGAngle();
115  static FloatPoint createSVGPoint();
 115 static GraphicsPoint createSVGPoint();
116116 static SVGMatrix createSVGMatrix();
117  static FloatRect createSVGRect();
 117 static GraphicsRect createSVGRect();
118118 static SVGTransform createSVGTransform();
119119 static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&);
120120

172172
173173 bool m_useCurrentView;
174174 RefPtr<SMILTimeContainer> m_timeContainer;
175  FloatPoint m_translation;
 175 GraphicsPoint m_translation;
176176 mutable OwnPtr<SVGViewSpec> m_viewSpec;
177177 IntSize m_containerSize;
178178 bool m_hasSetContainerSize;
90929

Source/WebCore/svg/SVGPathTraversalStateBuilder.h

2222#define SVGPathTraversalStateBuilder_h
2323
2424#if ENABLE(SVG)
25 #include "FloatPoint.h"
 25#include "GraphicsPoint.h"
2626#include "PathTraversalState.h"
2727#include "SVGPathConsumer.h"
2828

3434
3535 unsigned long pathSegmentIndex();
3636 float totalLength();
37  FloatPoint currentPoint();
 37 GraphicsPoint currentPoint();
3838
3939 void setCurrentTraversalState(PathTraversalState* traversalState) { m_traversalState = traversalState; }
4040 void setDesiredLength(float);

4444
4545private:
4646 // Used in UnalteredParisng/NormalizedParsing modes.
47  virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
48  virtual void lineTo(const FloatPoint&, PathCoordinateMode);
49  virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
 47 virtual void moveTo(const GraphicsPoint&, bool closed, PathCoordinateMode);
 48 virtual void lineTo(const GraphicsPoint&, PathCoordinateMode);
 49 virtual void curveToCubic(const GraphicsPoint&, const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
5050 virtual void closePath();
5151
5252private:
5353 // Not used for PathTraversalState.
5454 virtual void lineToHorizontal(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
5555 virtual void lineToVertical(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
56  virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
57  virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
58  virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
59  virtual void arcTo(float, float, float, bool, bool, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 56 virtual void curveToCubicSmooth(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 57 virtual void curveToQuadratic(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 58 virtual void curveToQuadraticSmooth(const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 59 virtual void arcTo(float, float, float, bool, bool, const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
6060
6161 PathTraversalState* m_traversalState;
6262 float m_desiredLength;
90929

Source/WebCore/svg/SVGPreserveAspectRatio.h

2828namespace WebCore {
2929
3030class AffineTransform;
31 class FloatRect;
 31class GraphicsRect;
3232
3333class SVGPreserveAspectRatio {
3434public:

6060 void setMeetOrSlice(unsigned short, ExceptionCode&);
6161 unsigned short meetOrSlice() const { return m_meetOrSlice; }
6262
63  void transformRect(FloatRect& destRect, FloatRect& srcRect);
 63 void transformRect(GraphicsRect& destRect, GraphicsRect& srcRect);
6464
6565 AffineTransform getCTM(float logicX, float logicY,
6666 float logicWidth, float logicHeight,
90929

Source/WebCore/svg/SVGPathStringBuilder.h

2121#define SVGPathStringBuilder_h
2222
2323#if ENABLE(SVG)
24 #include "FloatPoint.h"
 24#include "GraphicsPoint.h"
2525#include "SVGPathConsumer.h"
2626#include <wtf/text/StringBuilder.h>
2727

3737 virtual bool continueConsuming() { return true; }
3838
3939 // Used in UnalteredParsing/NormalizedParsing modes.
40  virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
41  virtual void lineTo(const FloatPoint&, PathCoordinateMode);
42  virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
 40 virtual void moveTo(const GraphicsPoint&, bool closed, PathCoordinateMode);
 41 virtual void lineTo(const GraphicsPoint&, PathCoordinateMode);
 42 virtual void curveToCubic(const GraphicsPoint&, const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
4343 virtual void closePath();
4444
4545 // Only used in UnalteredParsing mode.
4646 virtual void lineToHorizontal(float, PathCoordinateMode);
4747 virtual void lineToVertical(float, PathCoordinateMode);
48  virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
49  virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
50  virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
51  virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode);
 48 virtual void curveToCubicSmooth(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
 49 virtual void curveToQuadratic(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
 50 virtual void curveToQuadraticSmooth(const GraphicsPoint&, PathCoordinateMode);
 51 virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const GraphicsPoint&, PathCoordinateMode);
5252
5353 StringBuilder m_stringBuilder;
5454};
90929

Source/WebCore/svg/SVGRect.h

2121#define SVGRect_h
2222
2323#if ENABLE(SVG)
24 #include "FloatRect.h"
 24#include "GraphicsRect.h"
2525#include "SVGPropertyTraits.h"
2626#include <wtf/text/StringBuilder.h>
2727
2828namespace WebCore {
2929
3030template<>
31 struct SVGPropertyTraits<FloatRect> {
32  static FloatRect initialValue() { return FloatRect(); }
33  static String toString(const FloatRect& type)
 31struct SVGPropertyTraits<GraphicsRect> {
 32 static GraphicsRect initialValue() { return GraphicsRect(); }
 33 static String toString(const GraphicsRect& type)
3434 {
3535 StringBuilder builder;
3636 builder.append(String::number(type.x()));
90929

Source/WebCore/svg/SVGFEPointLightElement.cpp

4040
4141PassRefPtr<LightSource> SVGFEPointLightElement::lightSource() const
4242{
43  return PointLightSource::create(FloatPoint3D(x(), y(), z()));
 43 return PointLightSource::create(GraphicsPoint3D(x(), y(), z()));
4444}
4545
4646}
90929

Source/WebCore/svg/SVGPathByteStreamBuilder.h

2121#define SVGPathByteStreamBuilder_h
2222
2323#if ENABLE(SVG)
24 #include "FloatPoint.h"
 24#include "FloatConversion.h"
 25#include "GraphicsPoint.h"
2526#include "PlatformString.h"
2627#include "SVGPathByteStream.h"
2728#include "SVGPathConsumer.h"

4142 virtual void cleanup() { m_byteStream = 0; }
4243
4344 // Used in UnalteredParsing/NormalizedParsing modes.
44  virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
45  virtual void lineTo(const FloatPoint&, PathCoordinateMode);
46  virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
 45 virtual void moveTo(const GraphicsPoint&, bool closed, PathCoordinateMode);
 46 virtual void lineTo(const GraphicsPoint&, PathCoordinateMode);
 47 virtual void curveToCubic(const GraphicsPoint&, const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
4748 virtual void closePath();
4849
4950 // Only used in UnalteredParsing mode.
5051 virtual void lineToHorizontal(float, PathCoordinateMode);
5152 virtual void lineToVertical(float, PathCoordinateMode);
52  virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
53  virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
54  virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
55  virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode);
 53 virtual void curveToCubicSmooth(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
 54 virtual void curveToQuadratic(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
 55 virtual void curveToQuadraticSmooth(const GraphicsPoint&, PathCoordinateMode);
 56 virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const GraphicsPoint&, PathCoordinateMode);
5657
5758 template<typename ByteType>
5859 void writeType(const ByteType& type)

7677 writeType(data);
7778 }
7879
79  void writeFloatPoint(const FloatPoint& point)
 80 void writeGraphicsPoint(const GraphicsPoint& point)
8081 {
81  writeFloat(point.x());
82  writeFloat(point.y());
 82 writeFloat(narrowPrecisionToFloat(point.x()));
 83 writeFloat(narrowPrecisionToFloat(point.y()));
8384 }
8485
8586 void writeSegmentType(unsigned short value)
90929

Source/WebCore/svg/SVGMaskElement.h

3939public:
4040 static PassRefPtr<SVGMaskElement> create(const QualifiedName&, Document*);
4141
42  FloatRect maskBoundingBox(const FloatRect&) const;
 42 GraphicsRect maskBoundingBox(const GraphicsRect&) const;
4343
4444private:
4545 SVGMaskElement(const QualifiedName&, Document*);
90929

Source/WebCore/svg/SVGPathByteStreamSource.cpp

4848 return static_cast<SVGPathSegType>(readSVGSegmentType());
4949}
5050
51 bool SVGPathByteStreamSource::parseMoveToSegment(FloatPoint& targetPoint)
 51bool SVGPathByteStreamSource::parseMoveToSegment(GraphicsPoint& targetPoint)
5252{
53  targetPoint = readFloatPoint();
 53 targetPoint = readGraphicsPoint();
5454 return true;
5555}
5656
57 bool SVGPathByteStreamSource::parseLineToSegment(FloatPoint& targetPoint)
 57bool SVGPathByteStreamSource::parseLineToSegment(GraphicsPoint& targetPoint)
5858{
59  targetPoint = readFloatPoint();
 59 targetPoint = readGraphicsPoint();
6060 return true;
6161}
6262

7272 return true;
7373}
7474
75 bool SVGPathByteStreamSource::parseCurveToCubicSegment(FloatPoint& point1, FloatPoint& point2, FloatPoint& targetPoint)
 75bool SVGPathByteStreamSource::parseCurveToCubicSegment(GraphicsPoint& point1, GraphicsPoint& point2, GraphicsPoint& targetPoint)
7676{
77  point1 = readFloatPoint();
78  point2 = readFloatPoint();
79  targetPoint = readFloatPoint();
 77 point1 = readGraphicsPoint();
 78 point2 = readGraphicsPoint();
 79 targetPoint = readGraphicsPoint();
8080 return true;
8181}
8282
83 bool SVGPathByteStreamSource::parseCurveToCubicSmoothSegment(FloatPoint& point2, FloatPoint& targetPoint)
 83bool SVGPathByteStreamSource::parseCurveToCubicSmoothSegment(GraphicsPoint& point2, GraphicsPoint& targetPoint)
8484{
85  point2 = readFloatPoint();
86  targetPoint = readFloatPoint();
 85 point2 = readGraphicsPoint();
 86 targetPoint = readGraphicsPoint();
8787 return true;
8888}
8989
90 bool SVGPathByteStreamSource::parseCurveToQuadraticSegment(FloatPoint& point1, FloatPoint& targetPoint)
 90bool SVGPathByteStreamSource::parseCurveToQuadraticSegment(GraphicsPoint& point1, GraphicsPoint& targetPoint)
9191{
92  point1 = readFloatPoint();
93  targetPoint = readFloatPoint();
 92 point1 = readGraphicsPoint();
 93 targetPoint = readGraphicsPoint();
9494 return true;
9595}
9696
97 bool SVGPathByteStreamSource::parseCurveToQuadraticSmoothSegment(FloatPoint& targetPoint)
 97bool SVGPathByteStreamSource::parseCurveToQuadraticSmoothSegment(GraphicsPoint& targetPoint)
9898{
99  targetPoint = readFloatPoint();
 99 targetPoint = readGraphicsPoint();
100100 return true;
101101}
102102
103 bool SVGPathByteStreamSource::parseArcToSegment(float& rx, float& ry, float& angle, bool& largeArc, bool& sweep, FloatPoint& targetPoint)
 103bool SVGPathByteStreamSource::parseArcToSegment(float& rx, float& ry, float& angle, bool& largeArc, bool& sweep, GraphicsPoint& targetPoint)
104104{
105105 rx = readFloat();
106106 ry = readFloat();
107107 angle = readFloat();
108108 largeArc = readFlag();
109109 sweep = readFlag();
110  targetPoint = readFloatPoint();
 110 targetPoint = readGraphicsPoint();
111111 return true;
112112}
113113
90929

Source/WebCore/svg/SVGPointList.cpp

2323#if ENABLE(SVG)
2424#include "SVGPointList.h"
2525
26 #include "FloatPoint.h"
 26#include "GraphicsPoint.h"
2727#include <wtf/text/StringBuilder.h>
2828#include <wtf/text/WTFString.h>
2929

3838 if (i > 0)
3939 builder.append(" "); // FIXME: Shouldn't we use commas to seperate?
4040
41  const FloatPoint& point = at(i);
 41 const GraphicsPoint& point = at(i);
4242 builder.append(String::number(point.x()) + ' ' + String::number(point.y()));
4343 }
4444

5656 if (!itemCount || itemCount != toList.size())
5757 return false;
5858 for (unsigned n = 0; n < itemCount; ++n) {
59  const FloatPoint& from = fromList.at(n);
60  const FloatPoint& to = toList.at(n);
61  FloatPoint segment = FloatPoint(adjustAnimatedValue(from.x(), to.x(), progress),
 59 const GraphicsPoint& from = fromList.at(n);
 60 const GraphicsPoint& to = toList.at(n);
 61 GraphicsPoint segment = GraphicsPoint(adjustAnimatedValue(from.x(), to.x(), progress),
6262 adjustAnimatedValue(from.y(), to.y(), progress));
6363 resultList.append(segment);
6464 }
90929

Source/WebCore/svg/SVGFitToViewBox.cpp

2626#include "AffineTransform.h"
2727#include "Attr.h"
2828#include "Document.h"
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "SVGDocumentExtensions.h"
3131#include "SVGNames.h"
3232#include "SVGParserUtilities.h"

3535
3636namespace WebCore {
3737
38 bool SVGFitToViewBox::parseViewBox(Document* doc, const String& s, FloatRect& viewBox)
 38bool SVGFitToViewBox::parseViewBox(Document* doc, const String& s, GraphicsRect& viewBox)
3939{
4040 const UChar* c = s.characters();
4141 const UChar* end = c + s.length();
4242 return parseViewBox(doc, c, end, viewBox, true);
4343}
4444
45 bool SVGFitToViewBox::parseViewBox(Document* doc, const UChar*& c, const UChar* end, FloatRect& viewBox, bool validate)
 45bool SVGFitToViewBox::parseViewBox(Document* doc, const UChar*& c, const UChar* end, GraphicsRect& viewBox, bool validate)
4646{
4747 String str(c, end - c);
4848

5454 float height = 0.0f;
5555 bool valid = parseNumber(c, end, x) && parseNumber(c, end, y) && parseNumber(c, end, width) && parseNumber(c, end, height, false);
5656 if (!validate) {
57  viewBox = FloatRect(x, y, width, height);
 57 viewBox = GraphicsRect(x, y, width, height);
5858 return true;
5959 }
6060 if (!valid) {

7676 return false;
7777 }
7878
79  viewBox = FloatRect(x, y, width, height);
 79 viewBox = GraphicsRect(x, y, width, height);
8080 return true;
8181}
8282
83 AffineTransform SVGFitToViewBox::viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio& preserveAspectRatio, float viewWidth, float viewHeight)
 83AffineTransform SVGFitToViewBox::viewBoxToViewTransform(const GraphicsRect& viewBoxRect, const SVGPreserveAspectRatio& preserveAspectRatio, float viewWidth, float viewHeight)
8484{
8585 if (!viewBoxRect.width() || !viewBoxRect.height())
8686 return AffineTransform();

9191bool SVGFitToViewBox::parseMappedAttribute(Document* document, Attribute* attr)
9292{
9393 if (attr->name() == SVGNames::viewBoxAttr) {
94  FloatRect viewBox;
 94 GraphicsRect viewBox;
9595 if (!attr->value().isNull())
9696 parseViewBox(document, attr->value(), viewBox);
9797 setViewBoxBaseValue(viewBox);
90929

Source/WebCore/svg/SVGStyledTransformableElement.cpp

135135 return SVGTransformable::farthestViewportElement(this);
136136}
137137
138 FloatRect SVGStyledTransformableElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
 138GraphicsRect SVGStyledTransformableElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
139139{
140140 return SVGTransformable::getBBox(this, styleUpdateStrategy);
141141}
90929

Source/WebCore/svg/SVGFilterElement.cpp

211211 object->setNeedsLayout(true);
212212}
213213
214 FloatRect SVGFilterElement::filterBoundingBox(const FloatRect& objectBoundingBox) const
 214GraphicsRect SVGFilterElement::filterBoundingBox(const GraphicsRect& objectBoundingBox) const
215215{
216  FloatRect filterBBox;
 216 GraphicsRect filterBBox;
217217 if (filterUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
218  filterBBox = FloatRect(x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
 218 filterBBox = GraphicsRect(x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
219219 y().valueAsPercentage() * objectBoundingBox.height() + objectBoundingBox.y(),
220220 width().valueAsPercentage() * objectBoundingBox.width(),
221221 height().valueAsPercentage() * objectBoundingBox.height());
222222 else
223  filterBBox = FloatRect(x().value(this),
 223 filterBBox = GraphicsRect(x().value(this),
224224 y().value(this),
225225 width().value(this),
226226 height().value(this));
90929

Source/WebCore/svg/SVGLineElement.cpp

2424#include "SVGLineElement.h"
2525
2626#include "Attribute.h"
27 #include "FloatPoint.h"
 27#include "GraphicsPoint.h"
2828#include "RenderSVGPath.h"
2929#include "RenderSVGResource.h"
3030#include "SVGElementInstance.h"

160160{
161161 ASSERT(path.isEmpty());
162162
163  path.moveTo(FloatPoint(x1().value(this), y1().value(this)));
164  path.addLineTo(FloatPoint(x2().value(this), y2().value(this)));
 163 path.moveTo(GraphicsPoint(x1().value(this), y1().value(this)));
 164 path.addLineTo(GraphicsPoint(x2().value(this), y2().value(this)));
165165}
166166
167167bool SVGLineElement::selfHasRelativeLengths() const
90929

Source/WebCore/svg/SVGPathByteStreamBuilder.cpp

3434{
3535}
3636
37 void SVGPathByteStreamBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode mode)
 37void SVGPathByteStreamBuilder::moveTo(const GraphicsPoint& targetPoint, bool, PathCoordinateMode mode)
3838{
3939 ASSERT(m_byteStream);
4040 writeSegmentType(mode == RelativeCoordinates ? PathSegMoveToRel : PathSegMoveToAbs);
41  writeFloatPoint(targetPoint);
 41 writeGraphicsPoint(targetPoint);
4242}
4343
44 void SVGPathByteStreamBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
 44void SVGPathByteStreamBuilder::lineTo(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
4545{
4646 ASSERT(m_byteStream);
4747 writeSegmentType(mode == RelativeCoordinates ? PathSegLineToRel : PathSegLineToAbs);
48  writeFloatPoint(targetPoint);
 48 writeGraphicsPoint(targetPoint);
4949}
5050
5151void SVGPathByteStreamBuilder::lineToHorizontal(float x, PathCoordinateMode mode)

6262 writeFloat(y);
6363}
6464
65 void SVGPathByteStreamBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 65void SVGPathByteStreamBuilder::curveToCubic(const GraphicsPoint& point1, const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
6666{
6767 ASSERT(m_byteStream);
6868 writeSegmentType(mode == RelativeCoordinates ? PathSegCurveToCubicRel : PathSegCurveToCubicAbs);
69  writeFloatPoint(point1);
70  writeFloatPoint(point2);
71  writeFloatPoint(targetPoint);
 69 writeGraphicsPoint(point1);
 70 writeGraphicsPoint(point2);
 71 writeGraphicsPoint(targetPoint);
7272}
7373
74 void SVGPathByteStreamBuilder::curveToCubicSmooth(const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 74void SVGPathByteStreamBuilder::curveToCubicSmooth(const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
7575{
7676 ASSERT(m_byteStream);
7777 writeSegmentType(mode == RelativeCoordinates ? PathSegCurveToCubicSmoothRel : PathSegCurveToCubicSmoothAbs);
78  writeFloatPoint(point2);
79  writeFloatPoint(targetPoint);
 78 writeGraphicsPoint(point2);
 79 writeGraphicsPoint(targetPoint);
8080}
8181
82 void SVGPathByteStreamBuilder::curveToQuadratic(const FloatPoint& point1, const FloatPoint& targetPoint, PathCoordinateMode mode)
 82void SVGPathByteStreamBuilder::curveToQuadratic(const GraphicsPoint& point1, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
8383{
8484 ASSERT(m_byteStream);
8585 writeSegmentType(mode == RelativeCoordinates ? PathSegCurveToQuadraticRel : PathSegCurveToQuadraticAbs);
86  writeFloatPoint(point1);
87  writeFloatPoint(targetPoint);
 86 writeGraphicsPoint(point1);
 87 writeGraphicsPoint(targetPoint);
8888}
8989
90 void SVGPathByteStreamBuilder::curveToQuadraticSmooth(const FloatPoint& targetPoint, PathCoordinateMode mode)
 90void SVGPathByteStreamBuilder::curveToQuadraticSmooth(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
9191{
9292 ASSERT(m_byteStream);
9393 writeSegmentType(mode == RelativeCoordinates ? PathSegCurveToQuadraticSmoothRel : PathSegCurveToQuadraticSmoothAbs);
94  writeFloatPoint(targetPoint);
 94 writeGraphicsPoint(targetPoint);
9595}
9696
97 void SVGPathByteStreamBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const FloatPoint& targetPoint, PathCoordinateMode mode)
 97void SVGPathByteStreamBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
9898{
9999 ASSERT(m_byteStream);
100100 writeSegmentType(mode == RelativeCoordinates ? PathSegArcRel : PathSegArcAbs);

103103 writeFloat(angle);
104104 writeFlag(largeArcFlag);
105105 writeFlag(sweepFlag);
106  writeFloatPoint(targetPoint);
 106 writeGraphicsPoint(targetPoint);
107107}
108108
109109void SVGPathByteStreamBuilder::closePath()
90929

Source/WebCore/svg/SVGEllipseElement.cpp

2424#include "SVGEllipseElement.h"
2525
2626#include "Attribute.h"
27 #include "FloatPoint.h"
 27#include "GraphicsPoint.h"
2828#include "RenderSVGPath.h"
2929#include "RenderSVGResource.h"
3030#include "SVGElementInstance.h"

172172 if (radiusY <= 0)
173173 return;
174174
175  path.addEllipse(FloatRect(cx().value(this) - radiusX, cy().value(this) - radiusY, radiusX * 2, radiusY * 2));
 175 path.addEllipse(GraphicsRect(cx().value(this) - radiusX, cy().value(this) - radiusY, radiusX * 2, radiusY * 2));
176176}
177177
178178bool SVGEllipseElement::selfHasRelativeLengths() const
90929

Source/WebCore/svg/SVGPathParser.h

4444 void cleanup();
4545
4646private:
47  bool decomposeArcToCubic(float, float, float, FloatPoint&, FloatPoint&, bool largeArcFlag, bool sweepFlag);
 47 bool decomposeArcToCubic(float, float, float, GraphicsPoint&, GraphicsPoint&, bool largeArcFlag, bool sweepFlag);
4848 void parseClosePathSegment();
4949 bool parseMoveToSegment();
5050 bool parseLineToSegment();

6262 PathParsingMode m_pathParsingMode;
6363 SVGPathSegType m_lastCommand;
6464 bool m_closePath;
65  FloatPoint m_controlPoint;
66  FloatPoint m_currentPoint;
67  FloatPoint m_subPathPoint;
 65 GraphicsPoint m_controlPoint;
 66 GraphicsPoint m_currentPoint;
 67 GraphicsPoint m_subPathPoint;
6868};
6969
7070} // namespace WebCore
90929

Source/WebCore/svg/SVGAnimateTransformElement.cpp

251251 if (!to.isValid() || from.type() != to.type())
252252 return -1;
253253 if (to.type() == SVGTransform::SVG_TRANSFORM_TRANSLATE) {
254  FloatSize diff = to.translate() - from.translate();
 254 GraphicsSize diff = to.translate() - from.translate();
255255 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height());
256256 }
257257 if (to.type() == SVGTransform::SVG_TRANSFORM_ROTATE)
258258 return fabsf(to.angle() - from.angle());
259259 if (to.type() == SVGTransform::SVG_TRANSFORM_SCALE) {
260  FloatSize diff = to.scale() - from.scale();
 260 GraphicsSize diff = to.scale() - from.scale();
261261 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height());
262262 }
263263 return -1;
90929

Source/WebCore/svg/SVGViewSpec.cpp

5353
5454void SVGViewSpec::setViewBoxString(const String& viewBoxStr)
5555{
56  FloatRect viewBox;
 56 GraphicsRect viewBox;
5757 const UChar* c = viewBoxStr.characters();
5858 const UChar* end = c + viewBoxStr.length();
5959 if (!parseViewBox(m_contextElement->document(), c, end, viewBox, false))

104104 if (currViewSpec >= end || *currViewSpec != '(')
105105 return false;
106106 currViewSpec++;
107  FloatRect viewBox;
 107 GraphicsRect viewBox;
108108 if (!parseViewBox(m_contextElement->document(), currViewSpec, end, viewBox, false))
109109 return false;
110110 setViewBoxBaseValue(viewBox);
90929

Source/WebCore/svg/SVGLocatable.h

2828
2929namespace WebCore {
3030
31 class FloatRect;
 31class GraphicsRect;
3232class SVGElement;
3333
3434class SVGLocatable {

4141
4242 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate };
4343
44  virtual FloatRect getBBox(StyleUpdateStrategy) const = 0;
 44 virtual GraphicsRect getBBox(StyleUpdateStrategy) const = 0;
4545 virtual AffineTransform getCTM(StyleUpdateStrategy) const = 0;
4646 virtual AffineTransform getScreenCTM(StyleUpdateStrategy) const = 0;
4747 AffineTransform getTransformToElement(SVGElement*, ExceptionCode&, StyleUpdateStrategy = AllowStyleUpdate) const;

5757protected:
5858 virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const { return AffineTransform(); }
5959
60  static FloatRect getBBox(const SVGElement*, StyleUpdateStrategy);
 60 static GraphicsRect getBBox(const SVGElement*, StyleUpdateStrategy);
6161 static AffineTransform computeCTM(const SVGElement*, CTMScope, StyleUpdateStrategy);
6262};
6363
90929

Source/WebCore/svg/SVGZoomEvent.h

2323#define SVGZoomEvent_h
2424#if ENABLE(SVG)
2525
26 #include "FloatRect.h"
 26#include "GraphicsRect.h"
2727#include "UIEvent.h"
2828
2929namespace WebCore {

3333 static PassRefPtr<SVGZoomEvent> create() { return adoptRef(new SVGZoomEvent); }
3434
3535 // 'SVGZoomEvent' functions
36  FloatRect zoomRectScreen() const;
 36 GraphicsRect zoomRectScreen() const;
3737
3838 float previousScale() const;
3939 void setPreviousScale(float);
4040
41  FloatPoint previousTranslate() const;
 41 GraphicsPoint previousTranslate() const;
4242
4343 float newScale() const;
4444 void setNewScale(float);
4545
46  FloatPoint newTranslate() const;
 46 GraphicsPoint newTranslate() const;
4747
4848private:
4949 SVGZoomEvent();

5353 float m_newScale;
5454 float m_previousScale;
5555
56  FloatRect m_zoomRectScreen;
 56 GraphicsRect m_zoomRectScreen;
5757
58  FloatPoint m_newTranslate;
59  FloatPoint m_previousTranslate;
 58 GraphicsPoint m_newTranslate;
 59 GraphicsPoint m_previousTranslate;
6060};
6161
6262} // namespace WebCore
90929

Source/WebCore/svg/SVGAnimatedRect.cpp

3434
3535PassOwnPtr<SVGAnimatedType> SVGAnimatedRectAnimator::constructFromString(const String& string)
3636{
37  OwnPtr<SVGAnimatedType> animatedType = SVGAnimatedType::createRect(new FloatRect);
 37 OwnPtr<SVGAnimatedType> animatedType = SVGAnimatedType::createRect(new GraphicsRect);
3838 parseRect(string, animatedType->rect());
3939 return animatedType.release();
4040}

6464 SVGAnimateElement* animationElement = static_cast<SVGAnimateElement*>(m_animationElement);
6565 AnimationMode animationMode = animationElement->animationMode();
6666 // To animation uses contributions from the lower priority animations as the base value.
67  FloatRect& animatedRect = animated->rect();
 67 GraphicsRect& animatedRect = animated->rect();
6868 if (animationMode == ToAnimation)
6969 from->rect() = animatedRect;
7070
71  const FloatRect& fromRect = from->rect();
72  const FloatRect& toRect = to->rect();
73  FloatRect newRect;
 71 const GraphicsRect& fromRect = from->rect();
 72 const GraphicsRect& toRect = to->rect();
 73 GraphicsRect newRect;
7474 if (animationElement->calcMode() == CalcModeDiscrete)
7575 newRect = percentage < 0.5 ? fromRect : toRect;
7676 else
77  newRect = FloatRect((toRect.x() - fromRect.x()) * percentage + fromRect.x(),
 77 newRect = GraphicsRect((toRect.x() - fromRect.x()) * percentage + fromRect.x(),
7878 (toRect.y() - fromRect.y()) * percentage + fromRect.y(),
7979 (toRect.width() - fromRect.width()) * percentage + fromRect.width(),
8080 (toRect.height() - fromRect.height()) * percentage + fromRect.height());
90929

Source/WebCore/svg/SVGRectElement.cpp

198198 float xValue = x().value(this);
199199 float yValue = y().value(this);
200200
201  FloatRect rect(xValue, yValue, widthValue, heightValue);
 201 GraphicsRect rect(xValue, yValue, widthValue, heightValue);
202202
203203 bool hasRx = hasAttribute(SVGNames::rxAttr);
204204 bool hasRy = hasAttribute(SVGNames::ryAttr);

209209 rxValue = ryValue;
210210 else if (!hasRy)
211211 ryValue = rxValue;
212  path.addRoundedRect(rect, FloatSize(rxValue, ryValue));
 212 path.addRoundedRect(rect, GraphicsSize(rxValue, ryValue));
213213 return;
214214 }
215215
90929

Source/WebCore/svg/SVGTransform.h

2222#define SVGTransform_h
2323
2424#if ENABLE(SVG)
25 #include "FloatPoint.h"
 25#include "GraphicsPoint.h"
2626#include "SVGMatrix.h"
2727
2828namespace WebCore {
2929
30 class FloatSize;
 30class GraphicsSize;
3131
3232class SVGTransform {
3333public:

5252 void updateMatrix();
5353
5454 float angle() const { return m_angle; }
55  FloatPoint rotationCenter() const { return m_center; }
 55 GraphicsPoint rotationCenter() const { return m_center; }
5656
5757 void setMatrix(const AffineTransform&);
5858 void setTranslate(float tx, float ty);

6262 void setSkewY(float angle);
6363
6464 // Internal use only (animation system)
65  FloatPoint translate() const;
66  FloatSize scale() const;
 65 GraphicsPoint translate() const;
 66 GraphicsSize scale() const;
6767
6868 bool isValid() const { return m_type != SVG_TRANSFORM_UNKNOWN; }
6969 String valueAsString() const;

7373
7474 SVGTransformType m_type;
7575 float m_angle;
76  FloatPoint m_center;
 76 GraphicsPoint m_center;
7777 AffineTransform m_matrix;
7878};
7979
90929

Source/WebCore/svg/SVGTransform.cpp

2424#include "SVGTransform.h"
2525
2626#include "FloatConversion.h"
27 #include "FloatPoint.h"
28 #include "FloatSize.h"
 27#include "GraphicsPoint.h"
 28#include "GraphicsSize.h"
2929#include "SVGAngle.h"
3030#include "SVGSVGElement.h"
3131#include <wtf/MathExtras.h>

7878 m_matrix.translate(tx, ty);
7979}
8080
81 FloatPoint SVGTransform::translate() const
 81GraphicsPoint SVGTransform::translate() const
8282{
83  return FloatPoint::narrowPrecision(m_matrix.e(), m_matrix.f());
 83 return GraphicsPoint::narrowPrecision(m_matrix.e(), m_matrix.f());
8484}
8585
8686void SVGTransform::setScale(float sx, float sy)
8787{
8888 m_type = SVG_TRANSFORM_SCALE;
8989 m_angle = 0;
90  m_center = FloatPoint();
 90 m_center = GraphicsPoint();
9191
9292 m_matrix.makeIdentity();
9393 m_matrix.scaleNonUniform(sx, sy);
9494}
9595
96 FloatSize SVGTransform::scale() const
 96GraphicsSize SVGTransform::scale() const
9797{
98  return FloatSize::narrowPrecision(m_matrix.a(), m_matrix.d());
 98 return GraphicsSize::narrowPrecision(m_matrix.a(), m_matrix.d());
9999}
100100
101101void SVGTransform::setRotate(float angle, float cx, float cy)
102102{
103103 m_type = SVG_TRANSFORM_ROTATE;
104104 m_angle = angle;
105  m_center = FloatPoint(cx, cy);
 105 m_center = GraphicsPoint(cx, cy);
106106
107107 // TODO: toString() implementation, which can show cx, cy (need to be stored?)
108108 m_matrix.makeIdentity();
90929

Source/WebCore/svg/SVGPathElement.h

6161 static PassRefPtr<SVGPathElement> create(const QualifiedName&, Document*);
6262
6363 float getTotalLength();
64  FloatPoint getPointAtLength(float distance);
 64 GraphicsPoint getPointAtLength(float distance);
6565 unsigned long getPathSegAtLength(float distance);
6666
6767 PassRefPtr<SVGPathSegClosePath> createSVGPathSegClosePath(SVGPathSegRole role = PathSegUndefinedRole);
90929

Source/WebCore/svg/SVGAnimateMotionElement.h

5454 };
5555 RotateMode rotateMode() const;
5656
57  FloatSize m_animatedTranslation;
 57 GraphicsSize m_animatedTranslation;
5858 float m_animatedAngle;
5959
6060 // Note: we do not support percentage values for to/from coords as the spec implies we should (opera doesn't either)
61  FloatPoint m_fromPoint;
 61 GraphicsPoint m_fromPoint;
6262 float m_fromAngle;
63  FloatPoint m_toPoint;
 63 GraphicsPoint m_toPoint;
6464 float m_toAngle;
6565
6666 unsigned m_baseIndexInTransformList;
90929

Source/WebCore/svg/SVGStyledLocatableElement.cpp

4444 return SVGLocatable::farthestViewportElement(this);
4545}
4646
47 FloatRect SVGStyledLocatableElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
 47GraphicsRect SVGStyledLocatableElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
4848{
4949 return SVGLocatable::getBBox(this, styleUpdateStrategy);
5050}
90929

Source/WebCore/svg/SVGFitToViewBox.h

3030class AffineTransform;
3131class Attribute;
3232class Document;
33 class FloatRect;
 33class GraphicsRect;
3434class SVGPreserveAspectRatio;
3535
3636class SVGFitToViewBox {
3737public:
3838 virtual ~SVGFitToViewBox() { }
3939
40  bool parseViewBox(Document*, const UChar*& start, const UChar* end, FloatRect& viewBox, bool validate = true);
41  static AffineTransform viewBoxToViewTransform(const FloatRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
 40 bool parseViewBox(Document*, const UChar*& start, const UChar* end, GraphicsRect& viewBox, bool validate = true);
 41 static AffineTransform viewBoxToViewTransform(const GraphicsRect& viewBoxRect, const SVGPreserveAspectRatio&, float viewWidth, float viewHeight);
4242
4343 bool parseMappedAttribute(Document*, Attribute*);
4444 bool isKnownAttribute(const QualifiedName&);
4545 void addSupportedAttributes(HashSet<QualifiedName>&);
4646
47  virtual void setViewBoxBaseValue(const FloatRect&) = 0;
 47 virtual void setViewBoxBaseValue(const GraphicsRect&) = 0;
4848 virtual void setPreserveAspectRatioBaseValue(const SVGPreserveAspectRatio&) = 0;
4949
5050private:
51  bool parseViewBox(Document*, const String&, FloatRect&);
 51 bool parseViewBox(Document*, const String&, GraphicsRect&);
5252};
5353
5454} // namespace WebCore
90929

Source/WebCore/svg/SVGTextElement.h

3636 virtual SVGElement* nearestViewportElement() const;
3737 virtual SVGElement* farthestViewportElement() const;
3838
39  virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
 39 virtual GraphicsRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
4040 virtual AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
4141 virtual AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate) const;
4242 virtual AffineTransform animatedLocalTransform() const;
90929

Source/WebCore/svg/SVGPathStringSource.h

2121#define SVGPathStringSource_h
2222
2323#if ENABLE(SVG)
24 #include "FloatPoint.h"
 24#include "GraphicsPoint.h"
2525#include "PlatformString.h"
2626#include "SVGPathSource.h"
2727#include <wtf/PassOwnPtr.h>

4343 virtual bool parseSVGSegmentType(SVGPathSegType&);
4444 virtual SVGPathSegType nextCommand(SVGPathSegType previousCommand);
4545
46  virtual bool parseMoveToSegment(FloatPoint&);
47  virtual bool parseLineToSegment(FloatPoint&);
 46 virtual bool parseMoveToSegment(GraphicsPoint&);
 47 virtual bool parseLineToSegment(GraphicsPoint&);
4848 virtual bool parseLineToHorizontalSegment(float&);
4949 virtual bool parseLineToVerticalSegment(float&);
50  virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&);
51  virtual bool parseCurveToCubicSmoothSegment(FloatPoint&, FloatPoint&);
52  virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&);
53  virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
54  virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
 50 virtual bool parseCurveToCubicSegment(GraphicsPoint&, GraphicsPoint&, GraphicsPoint&);
 51 virtual bool parseCurveToCubicSmoothSegment(GraphicsPoint&, GraphicsPoint&);
 52 virtual bool parseCurveToQuadraticSegment(GraphicsPoint&, GraphicsPoint&);
 53 virtual bool parseCurveToQuadraticSmoothSegment(GraphicsPoint&);
 54 virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, GraphicsPoint&);
5555
5656 String m_string;
5757
90929

Source/WebCore/svg/SVGDocument.h

2323#if ENABLE(SVG)
2424
2525#include "Document.h"
26 #include "FloatPoint.h"
 26#include "GraphicsPoint.h"
2727
2828namespace WebCore {
2929

4545
4646 bool zoomAndPanEnabled() const;
4747
48  void startPan(const FloatPoint& start);
49  void updatePan(const FloatPoint& pos) const;
 48 void startPan(const GraphicsPoint& start);
 49 void updatePan(const GraphicsPoint& pos) const;
5050
5151private:
5252 SVGDocument(Frame*, const KURL&);

5555
5656 virtual bool childShouldCreateRenderer(Node*) const;
5757
58  FloatPoint m_translate;
 58 GraphicsPoint m_translate;
5959};
6060
6161} // namespace WebCore
90929

Source/WebCore/svg/SVGRadialGradientElement.h

3434 static PassRefPtr<SVGRadialGradientElement> create(const QualifiedName&, Document*);
3535
3636 bool collectGradientAttributes(RadialGradientAttributes&);
37  void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius);
 37 void calculateFocalCenterPointsAndRadius(const RadialGradientAttributes&, GraphicsPoint& focalPoint, GraphicsPoint& centerPoint, float& radius);
3838
3939private:
4040 SVGRadialGradientElement(const QualifiedName&, Document*);
90929

Source/WebCore/svg/SVGPathSegListBuilder.cpp

4949{
5050}
5151
52 void SVGPathSegListBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode mode)
 52void SVGPathSegListBuilder::moveTo(const GraphicsPoint& targetPoint, bool, PathCoordinateMode mode)
5353{
5454 ASSERT(m_pathElement);
5555 ASSERT(m_pathSegList);

5959 m_pathSegList->append(m_pathElement->createSVGPathSegMovetoRel(targetPoint.x(), targetPoint.y(), m_pathSegRole));
6060}
6161
62 void SVGPathSegListBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
 62void SVGPathSegListBuilder::lineTo(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
6363{
6464 ASSERT(m_pathElement);
6565 ASSERT(m_pathSegList);

8989 m_pathSegList->append(m_pathElement->createSVGPathSegLinetoVerticalRel(y, m_pathSegRole));
9090}
9191
92 void SVGPathSegListBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 92void SVGPathSegListBuilder::curveToCubic(const GraphicsPoint& point1, const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
9393{
9494 ASSERT(m_pathElement);
9595 ASSERT(m_pathSegList);

9999 m_pathSegList->append(m_pathElement->createSVGPathSegCurvetoCubicRel(targetPoint.x(), targetPoint.y(), point1.x(), point1.y(), point2.x(), point2.y(), m_pathSegRole));
100100}
101101
102 void SVGPathSegListBuilder::curveToCubicSmooth(const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 102void SVGPathSegListBuilder::curveToCubicSmooth(const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
103103{
104104 ASSERT(m_pathElement);
105105 ASSERT(m_pathSegList);

109109 m_pathSegList->append(m_pathElement->createSVGPathSegCurvetoCubicSmoothRel(targetPoint.x(), targetPoint.y(), point2.x(), point2.y(), m_pathSegRole));
110110}
111111
112 void SVGPathSegListBuilder::curveToQuadratic(const FloatPoint& point1, const FloatPoint& targetPoint, PathCoordinateMode mode)
 112void SVGPathSegListBuilder::curveToQuadratic(const GraphicsPoint& point1, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
113113{
114114 ASSERT(m_pathElement);
115115 ASSERT(m_pathSegList);

119119 m_pathSegList->append(m_pathElement->createSVGPathSegCurvetoQuadraticRel(targetPoint.x(), targetPoint.y(), point1.x(), point1.y(), m_pathSegRole));
120120}
121121
122 void SVGPathSegListBuilder::curveToQuadraticSmooth(const FloatPoint& targetPoint, PathCoordinateMode mode)
 122void SVGPathSegListBuilder::curveToQuadraticSmooth(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
123123{
124124 ASSERT(m_pathElement);
125125 ASSERT(m_pathSegList);

129129 m_pathSegList->append(m_pathElement->createSVGPathSegCurvetoQuadraticSmoothRel(targetPoint.x(), targetPoint.y(), m_pathSegRole));
130130}
131131
132 void SVGPathSegListBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const FloatPoint& targetPoint, PathCoordinateMode mode)
 132void SVGPathSegListBuilder::arcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
133133{
134134 ASSERT(m_pathElement);
135135 ASSERT(m_pathSegList);
90929

Source/WebCore/svg/SVGMaskElement.cpp

175175 object->setNeedsLayout(true);
176176}
177177
178 FloatRect SVGMaskElement::maskBoundingBox(const FloatRect& objectBoundingBox) const
 178GraphicsRect SVGMaskElement::maskBoundingBox(const GraphicsRect& objectBoundingBox) const
179179{
180  FloatRect maskBBox;
 180 GraphicsRect maskBBox;
181181 if (maskUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
182  maskBBox = FloatRect(x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
 182 maskBBox = GraphicsRect(x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
183183 y().valueAsPercentage() * objectBoundingBox.height() + objectBoundingBox.y(),
184184 width().valueAsPercentage() * objectBoundingBox.width(),
185185 height().valueAsPercentage() * objectBoundingBox.height());
186186 else
187  maskBBox = FloatRect(x().value(this),
 187 maskBBox = GraphicsRect(x().value(this),
188188 y().value(this),
189189 width().value(this),
190190 height().value(this));
90929

Source/WebCore/svg/SVGPathSource.h

3636 virtual bool parseSVGSegmentType(SVGPathSegType&) = 0;
3737 virtual SVGPathSegType nextCommand(SVGPathSegType previousCommand) = 0;
3838
39  virtual bool parseMoveToSegment(FloatPoint&) = 0;
40  virtual bool parseLineToSegment(FloatPoint&) = 0;
 39 virtual bool parseMoveToSegment(GraphicsPoint&) = 0;
 40 virtual bool parseLineToSegment(GraphicsPoint&) = 0;
4141 virtual bool parseLineToHorizontalSegment(float&) = 0;
4242 virtual bool parseLineToVerticalSegment(float&) = 0;
43  virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&) = 0;
44  virtual bool parseCurveToCubicSmoothSegment(FloatPoint&, FloatPoint&) = 0;
45  virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&) = 0;
46  virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&) = 0;
47  virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&) = 0;
 43 virtual bool parseCurveToCubicSegment(GraphicsPoint&, GraphicsPoint&, GraphicsPoint&) = 0;
 44 virtual bool parseCurveToCubicSmoothSegment(GraphicsPoint&, GraphicsPoint&) = 0;
 45 virtual bool parseCurveToQuadraticSegment(GraphicsPoint&, GraphicsPoint&) = 0;
 46 virtual bool parseCurveToQuadraticSmoothSegment(GraphicsPoint&) = 0;
 47 virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, GraphicsPoint&) = 0;
4848};
4949
5050} // namespace WebCore
90929

Source/WebCore/svg/SVGTextContentElement.cpp

130130 return SVGTextQuery(renderer()).subStringLength(charnum, nchars);
131131}
132132
133 FloatPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionCode& ec) const
 133GraphicsPoint SVGTextContentElement::getStartPositionOfChar(unsigned charnum, ExceptionCode& ec) const
134134{
135135 document()->updateLayoutIgnorePendingStylesheets();
136136
137137 if (charnum > getNumberOfChars()) {
138138 ec = INDEX_SIZE_ERR;
139  return FloatPoint();
 139 return GraphicsPoint();
140140 }
141141
142142 return SVGTextQuery(renderer()).startPositionOfCharacter(charnum);
143143}
144144
145 FloatPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionCode& ec) const
 145GraphicsPoint SVGTextContentElement::getEndPositionOfChar(unsigned charnum, ExceptionCode& ec) const
146146{
147147 document()->updateLayoutIgnorePendingStylesheets();
148148
149149 if (charnum > getNumberOfChars()) {
150150 ec = INDEX_SIZE_ERR;
151  return FloatPoint();
 151 return GraphicsPoint();
152152 }
153153
154154 return SVGTextQuery(renderer()).endPositionOfCharacter(charnum);
155155}
156156
157 FloatRect SVGTextContentElement::getExtentOfChar(unsigned charnum, ExceptionCode& ec) const
 157GraphicsRect SVGTextContentElement::getExtentOfChar(unsigned charnum, ExceptionCode& ec) const
158158{
159159 document()->updateLayoutIgnorePendingStylesheets();
160160
161161 if (charnum > getNumberOfChars()) {
162162 ec = INDEX_SIZE_ERR;
163  return FloatRect();
 163 return GraphicsRect();
164164 }
165165
166166 return SVGTextQuery(renderer()).extentOfCharacter(charnum);

178178 return SVGTextQuery(renderer()).rotationOfCharacter(charnum);
179179}
180180
181 int SVGTextContentElement::getCharNumAtPosition(const FloatPoint& point) const
 181int SVGTextContentElement::getCharNumAtPosition(const GraphicsPoint& point) const
182182{
183183 document()->updateLayoutIgnorePendingStylesheets();
184184 return SVGTextQuery(renderer()).characterNumberAtPosition(point);
90929

Source/WebCore/svg/SVGPathStringSource.cpp

127127 return nextCommand;
128128}
129129
130 bool SVGPathStringSource::parseMoveToSegment(FloatPoint& targetPoint)
 130bool SVGPathStringSource::parseMoveToSegment(GraphicsPoint& targetPoint)
131131{
132132 float toX;
133133 float toY;
134134 if (!parseNumber(m_current, m_end, toX) || !parseNumber(m_current, m_end, toY))
135135 return false;
136  targetPoint = FloatPoint(toX, toY);
 136 targetPoint = GraphicsPoint(toX, toY);
137137 return true;
138138}
139139
140 bool SVGPathStringSource::parseLineToSegment(FloatPoint& targetPoint)
 140bool SVGPathStringSource::parseLineToSegment(GraphicsPoint& targetPoint)
141141{
142142 float toX;
143143 float toY;
144144 if (!parseNumber(m_current, m_end, toX) || !parseNumber(m_current, m_end, toY))
145145 return false;
146  targetPoint = FloatPoint(toX, toY);
 146 targetPoint = GraphicsPoint(toX, toY);
147147 return true;
148148}
149149

157157 return parseNumber(m_current, m_end, y);
158158}
159159
160 bool SVGPathStringSource::parseCurveToCubicSegment(FloatPoint& point1, FloatPoint& point2, FloatPoint& targetPoint)
 160bool SVGPathStringSource::parseCurveToCubicSegment(GraphicsPoint& point1, GraphicsPoint& point2, GraphicsPoint& targetPoint)
161161{
162162 float x1;
163163 float y1;

172172 || !parseNumber(m_current, m_end, toX)
173173 || !parseNumber(m_current, m_end, toY))
174174 return false;
175  point1 = FloatPoint(x1, y1);
176  point2 = FloatPoint(x2, y2);
177  targetPoint = FloatPoint(toX, toY);
 175 point1 = GraphicsPoint(x1, y1);
 176 point2 = GraphicsPoint(x2, y2);
 177 targetPoint = GraphicsPoint(toX, toY);
178178 return true;
179179}
180180
181 bool SVGPathStringSource::parseCurveToCubicSmoothSegment(FloatPoint& point1, FloatPoint& targetPoint)
 181bool SVGPathStringSource::parseCurveToCubicSmoothSegment(GraphicsPoint& point1, GraphicsPoint& targetPoint)
182182{
183183 float x1;
184184 float y1;

189189 || !parseNumber(m_current, m_end, toX)
190190 || !parseNumber(m_current, m_end, toY))
191191 return false;
192  point1 = FloatPoint(x1, y1);
193  targetPoint = FloatPoint(toX, toY);
 192 point1 = GraphicsPoint(x1, y1);
 193 targetPoint = GraphicsPoint(toX, toY);
194194 return true;
195195}
196196
197 bool SVGPathStringSource::parseCurveToQuadraticSegment(FloatPoint& point2, FloatPoint& targetPoint)
 197bool SVGPathStringSource::parseCurveToQuadraticSegment(GraphicsPoint& point2, GraphicsPoint& targetPoint)
198198{
199199 float x2;
200200 float y2;

205205 || !parseNumber(m_current, m_end, toX)
206206 || !parseNumber(m_current, m_end, toY))
207207 return false;
208  point2 = FloatPoint(x2, y2);
209  targetPoint = FloatPoint(toX, toY);
 208 point2 = GraphicsPoint(x2, y2);
 209 targetPoint = GraphicsPoint(toX, toY);
210210 return true;
211211}
212212
213 bool SVGPathStringSource::parseCurveToQuadraticSmoothSegment(FloatPoint& targetPoint)
 213bool SVGPathStringSource::parseCurveToQuadraticSmoothSegment(GraphicsPoint& targetPoint)
214214{
215215 float toX;
216216 float toY;
217217 if (!parseNumber(m_current, m_end, toX)
218218 || !parseNumber(m_current, m_end, toY))
219219 return false;
220  targetPoint = FloatPoint(toX, toY);
 220 targetPoint = GraphicsPoint(toX, toY);
221221 return true;
222222}
223223
224 bool SVGPathStringSource::parseArcToSegment(float& rx, float& ry, float& angle, bool& largeArc, bool& sweep, FloatPoint& targetPoint)
 224bool SVGPathStringSource::parseArcToSegment(float& rx, float& ry, float& angle, bool& largeArc, bool& sweep, GraphicsPoint& targetPoint)
225225{
226226 float toX;
227227 float toY;

233233 || !parseNumber(m_current, m_end, toX)
234234 || !parseNumber(m_current, m_end, toY))
235235 return false;
236  targetPoint = FloatPoint(toX, toY);
 236 targetPoint = GraphicsPoint(toX, toY);
237237 return true;
238238}
239239
90929

Source/WebCore/svg/SVGAnimatedRect.h

2828
2929namespace WebCore {
3030
31 typedef SVGAnimatedPropertyTearOff<FloatRect> SVGAnimatedRect;
 31typedef SVGAnimatedPropertyTearOff<GraphicsRect> SVGAnimatedRect;
3232
3333// Helper macros to declare/define a SVGAnimatedRect object
3434#define DECLARE_ANIMATED_RECT(UpperProperty, LowerProperty) \
35 DECLARE_ANIMATED_PROPERTY(SVGAnimatedRect, FloatRect, UpperProperty, LowerProperty)
 35DECLARE_ANIMATED_PROPERTY(SVGAnimatedRect, GraphicsRect, UpperProperty, LowerProperty)
3636
3737#define DEFINE_ANIMATED_RECT(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
3838DEFINE_ANIMATED_PROPERTY(AnimatedRect, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty)

5454 OwnPtr<SVGAnimatedType>& fromValue, OwnPtr<SVGAnimatedType>& toValue, OwnPtr<SVGAnimatedType>& animatedValue);
5555 virtual float calculateDistance(const String& fromString, const String& toString);
5656
57  static bool parseSVGRect(const String&, FloatRect&);
 57 static bool parseSVGRect(const String&, GraphicsRect&);
5858};
5959#endif // ENABLE(SVG_ANIMATION)
6060
90929

Source/WebCore/svg/SVGRadialGradientElement.cpp

2828
2929#include "Attribute.h"
3030#include "FloatConversion.h"
31 #include "FloatPoint.h"
 31#include "GraphicsPoint.h"
3232#include "RadialGradientAttributes.h"
3333#include "RenderSVGResourceRadialGradient.h"
3434#include "SVGElementInstance.h"

220220 return true;
221221}
222222
223 void SVGRadialGradientElement::calculateFocalCenterPointsAndRadius(const RadialGradientAttributes& attributes, FloatPoint& focalPoint, FloatPoint& centerPoint, float& radius)
 223void SVGRadialGradientElement::calculateFocalCenterPointsAndRadius(const RadialGradientAttributes& attributes, GraphicsPoint& focalPoint, GraphicsPoint& centerPoint, float& radius)
224224{
225225 // Determine gradient focal/center points and radius
226226 if (attributes.boundingBoxMode()) {
227  focalPoint = FloatPoint(attributes.fx().valueAsPercentage(), attributes.fy().valueAsPercentage());
228  centerPoint = FloatPoint(attributes.cx().valueAsPercentage(), attributes.cy().valueAsPercentage());
 227 focalPoint = GraphicsPoint(attributes.fx().valueAsPercentage(), attributes.fy().valueAsPercentage());
 228 centerPoint = GraphicsPoint(attributes.cx().valueAsPercentage(), attributes.cy().valueAsPercentage());
229229 radius = attributes.r().valueAsPercentage();
230230 } else {
231  focalPoint = FloatPoint(attributes.fx().value(this), attributes.fy().value(this));
232  centerPoint = FloatPoint(attributes.cx().value(this), attributes.cy().value(this));
 231 focalPoint = GraphicsPoint(attributes.fx().value(this), attributes.fy().value(this));
 232 centerPoint = GraphicsPoint(attributes.cx().value(this), attributes.cy().value(this));
233233 radius = attributes.r().value(this);
234234 }
235235

246246
247247 deltaX = cosf(angle) * radiusMax;
248248 deltaY = sinf(angle) * radiusMax;
249  focalPoint = FloatPoint(deltaX + centerPoint.x(), deltaY + centerPoint.y());
 249 focalPoint = GraphicsPoint(deltaX + centerPoint.x(), deltaY + centerPoint.y());
250250 }
251251}
252252
90929

Source/WebCore/svg/SVGPathBlender.cpp

3535}
3636
3737// Helper functions
38 static inline FloatPoint blendFloatPoint(const FloatPoint& a, const FloatPoint& b, float progress)
 38static inline GraphicsPoint blendGraphicsPoint(const GraphicsPoint& a, const GraphicsPoint& b, float progress)
3939{
40  return FloatPoint((b.x() - a.x()) * progress + a.x(), (b.y() - a.y()) * progress + a.y());
 40 return GraphicsPoint((b.x() - a.x()) * progress + a.x(), (b.y() - a.y()) * progress + a.y());
4141}
4242
4343static inline float blendAnimatedFloat(float from, float to, float progress)

6464 return m_toMode == AbsoluteCoordinates ? animValue + currentValue : animValue - currentValue;
6565}
6666
67 FloatPoint SVGPathBlender::blendAnimatedFloatPoint(const FloatPoint& fromPoint, const FloatPoint& toPoint)
 67GraphicsPoint SVGPathBlender::blendAnimatedGraphicsPoint(const GraphicsPoint& fromPoint, const GraphicsPoint& toPoint)
6868{
6969 if (m_fromMode == m_toMode)
70  return blendFloatPoint(fromPoint, toPoint, m_progress);
 70 return blendGraphicsPoint(fromPoint, toPoint, m_progress);
7171
7272 // Transform toPoint to the coordinate mode of fromPoint
73  FloatPoint animatedPoint = toPoint;
 73 GraphicsPoint animatedPoint = toPoint;
7474 if (m_fromMode == AbsoluteCoordinates)
7575 animatedPoint += m_toCurrentPoint;
7676 else
7777 animatedPoint.move(-m_toCurrentPoint.x(), -m_toCurrentPoint.y());
7878
79  animatedPoint = blendFloatPoint(fromPoint, animatedPoint, m_progress);
 79 animatedPoint = blendGraphicsPoint(fromPoint, animatedPoint, m_progress);
8080
8181 if (m_isInFirstHalfOfAnimation)
8282 return animatedPoint;
8383
8484 // Transform the animated point to the coordinate mode, needed for the current progress.
85  FloatPoint currentPoint = blendFloatPoint(m_fromCurrentPoint, m_toCurrentPoint, m_progress);
 85 GraphicsPoint currentPoint = blendGraphicsPoint(m_fromCurrentPoint, m_toCurrentPoint, m_progress);
8686 if (m_toMode == AbsoluteCoordinates)
8787 return animatedPoint + currentPoint;
8888

9292
9393bool SVGPathBlender::blendMoveToSegment()
9494{
95  FloatPoint fromTargetPoint;
96  FloatPoint toTargetPoint;
 95 GraphicsPoint fromTargetPoint;
 96 GraphicsPoint toTargetPoint;
9797 if (!m_fromSource->parseMoveToSegment(fromTargetPoint)
9898 || !m_toSource->parseMoveToSegment(toTargetPoint))
9999 return false;
100100
101  m_consumer->moveTo(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint), false, m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
 101 m_consumer->moveTo(blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint), false, m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
102102 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
103103 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;
104104 return true;

106106
107107bool SVGPathBlender::blendLineToSegment()
108108{
109  FloatPoint fromTargetPoint;
110  FloatPoint toTargetPoint;
 109 GraphicsPoint fromTargetPoint;
 110 GraphicsPoint toTargetPoint;
111111 if (!m_fromSource->parseLineToSegment(fromTargetPoint)
112112 || !m_toSource->parseLineToSegment(toTargetPoint))
113113 return false;
114114
115  m_consumer->lineTo(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint), m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
 115 m_consumer->lineTo(blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint), m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
116116 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
117117 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;
118118 return true;

148148
149149bool SVGPathBlender::blendCurveToCubicSegment()
150150{
151  FloatPoint fromTargetPoint;
152  FloatPoint fromPoint1;
153  FloatPoint fromPoint2;
154  FloatPoint toTargetPoint;
155  FloatPoint toPoint1;
156  FloatPoint toPoint2;
 151 GraphicsPoint fromTargetPoint;
 152 GraphicsPoint fromPoint1;
 153 GraphicsPoint fromPoint2;
 154 GraphicsPoint toTargetPoint;
 155 GraphicsPoint toPoint1;
 156 GraphicsPoint toPoint2;
157157 if (!m_fromSource->parseCurveToCubicSegment(fromPoint1, fromPoint2, fromTargetPoint)
158158 || !m_toSource->parseCurveToCubicSegment(toPoint1, toPoint2, toTargetPoint))
159159 return false;
160160
161  m_consumer->curveToCubic(blendAnimatedFloatPoint(fromPoint1, toPoint1),
162  blendAnimatedFloatPoint(fromPoint2, toPoint2),
163  blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint),
 161 m_consumer->curveToCubic(blendAnimatedGraphicsPoint(fromPoint1, toPoint1),
 162 blendAnimatedGraphicsPoint(fromPoint2, toPoint2),
 163 blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint),
164164 m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
165165 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
166166 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;

169169
170170bool SVGPathBlender::blendCurveToCubicSmoothSegment()
171171{
172  FloatPoint fromTargetPoint;
173  FloatPoint fromPoint2;
174  FloatPoint toTargetPoint;
175  FloatPoint toPoint2;
 172 GraphicsPoint fromTargetPoint;
 173 GraphicsPoint fromPoint2;
 174 GraphicsPoint toTargetPoint;
 175 GraphicsPoint toPoint2;
176176 if (!m_fromSource->parseCurveToCubicSmoothSegment(fromPoint2, fromTargetPoint)
177177 || !m_toSource->parseCurveToCubicSmoothSegment(toPoint2, toTargetPoint))
178178 return false;
179179
180  m_consumer->curveToCubicSmooth(blendAnimatedFloatPoint(fromPoint2, toPoint2),
181  blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint),
 180 m_consumer->curveToCubicSmooth(blendAnimatedGraphicsPoint(fromPoint2, toPoint2),
 181 blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint),
182182 m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
183183 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
184184 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;

187187
188188bool SVGPathBlender::blendCurveToQuadraticSegment()
189189{
190  FloatPoint fromTargetPoint;
191  FloatPoint fromPoint1;
192  FloatPoint toTargetPoint;
193  FloatPoint toPoint1;
 190 GraphicsPoint fromTargetPoint;
 191 GraphicsPoint fromPoint1;
 192 GraphicsPoint toTargetPoint;
 193 GraphicsPoint toPoint1;
194194 if (!m_fromSource->parseCurveToQuadraticSegment(fromPoint1, fromTargetPoint)
195195 || !m_toSource->parseCurveToQuadraticSegment(toPoint1, toTargetPoint))
196196 return false;
197197
198  m_consumer->curveToQuadratic(blendAnimatedFloatPoint(fromPoint1, toPoint1),
199  blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint),
 198 m_consumer->curveToQuadratic(blendAnimatedGraphicsPoint(fromPoint1, toPoint1),
 199 blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint),
200200 m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
201201 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
202202 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;

205205
206206bool SVGPathBlender::blendCurveToQuadraticSmoothSegment()
207207{
208  FloatPoint fromTargetPoint;
209  FloatPoint toTargetPoint;
 208 GraphicsPoint fromTargetPoint;
 209 GraphicsPoint toTargetPoint;
210210 if (!m_fromSource->parseCurveToQuadraticSmoothSegment(fromTargetPoint)
211211 || !m_toSource->parseCurveToQuadraticSmoothSegment(toTargetPoint))
212212 return false;
213213
214  m_consumer->curveToQuadraticSmooth(blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint), m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
 214 m_consumer->curveToQuadraticSmooth(blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint), m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
215215 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
216216 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;
217217 return true;

224224 float fromAngle;
225225 bool fromLargeArc;
226226 bool fromSweep;
227  FloatPoint fromTargetPoint;
 227 GraphicsPoint fromTargetPoint;
228228 float toRx;
229229 float toRy;
230230 float toAngle;
231231 bool toLargeArc;
232232 bool toSweep;
233  FloatPoint toTargetPoint;
 233 GraphicsPoint toTargetPoint;
234234 if (!m_fromSource->parseArcToSegment(fromRx, fromRy, fromAngle, fromLargeArc, fromSweep, fromTargetPoint)
235235 || !m_toSource->parseArcToSegment(toRx, toRy, toAngle, toLargeArc, toSweep, toTargetPoint))
236236 return false;

240240 blendAnimatedFloat(fromAngle, toAngle, m_progress),
241241 m_isInFirstHalfOfAnimation ? fromLargeArc : toLargeArc,
242242 m_isInFirstHalfOfAnimation ? fromSweep : toSweep,
243  blendAnimatedFloatPoint(fromTargetPoint, toTargetPoint),
 243 blendAnimatedGraphicsPoint(fromTargetPoint, toTargetPoint),
244244 m_isInFirstHalfOfAnimation ? m_fromMode : m_toMode);
245245 m_fromCurrentPoint = m_fromMode == AbsoluteCoordinates ? fromTargetPoint : m_fromCurrentPoint + fromTargetPoint;
246246 m_toCurrentPoint = m_toMode == AbsoluteCoordinates ? toTargetPoint : m_toCurrentPoint + toTargetPoint;

365365 m_toSource = 0;
366366 m_fromSource = 0;
367367 m_consumer = 0;
368  m_fromCurrentPoint = FloatPoint();
369  m_toCurrentPoint = FloatPoint();
 368 m_fromCurrentPoint = GraphicsPoint();
 369 m_toCurrentPoint = GraphicsPoint();
370370}
371371
372372}
90929

Source/WebCore/svg/graphics/SVGImage.cpp

3232#include "DocumentLoader.h"
3333#include "FileChooser.h"
3434#include "FileIconLoader.h"
35 #include "FloatRect.h"
 35#include "GraphicsRect.h"
3636#include "Frame.h"
3737#include "FrameLoader.h"
3838#include "FrameView.h"

176176 return rootElement->height().unitType() == LengthTypePercentage;
177177}
178178
179 void SVGImage::draw(GraphicsContext* context, const FloatRect& dstRect, const FloatRect& srcRect, ColorSpace, CompositeOperator compositeOp)
 179void SVGImage::draw(GraphicsContext* context, const GraphicsRect& dstRect, const GraphicsRect& srcRect, ColorSpace, CompositeOperator compositeOp)
180180{
181181 if (!m_page)
182182 return;

189189 if (compositeOp != CompositeSourceOver)
190190 context->beginTransparencyLayer(1);
191191
192  FloatSize scale(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height());
 192 GraphicsSize scale(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height());
193193
194194 // We can only draw the entire frame, clipped to the rect we want. So compute where the top left
195195 // of the image would be if we were drawing without clipping, and translate accordingly.
196  FloatSize topLeftOffset(srcRect.location().x() * scale.width(), srcRect.location().y() * scale.height());
197  FloatPoint destOffset = dstRect.location() - topLeftOffset;
 196 GraphicsSize topLeftOffset(srcRect.location().x() * scale.width(), srcRect.location().y() * scale.height());
 197 GraphicsPoint destOffset = dstRect.location() - topLeftOffset;
198198
199199 context->translate(destOffset.x(), destOffset.y());
200200 context->scale(scale);
90929

Source/WebCore/svg/graphics/filters/SVGFEImage.h

3535public:
3636 static PassRefPtr<FEImage> create(Filter*, PassRefPtr<Image>, const SVGPreserveAspectRatio&);
3737
38  void setAbsoluteSubregion(const FloatRect& absoluteSubregion) { m_absoluteSubregion = absoluteSubregion; }
 38 void setAbsoluteSubregion(const GraphicsRect& absoluteSubregion) { m_absoluteSubregion = absoluteSubregion; }
3939
4040 virtual void apply();
4141 virtual void dump();

5151
5252 RefPtr<Image> m_image;
5353 SVGPreserveAspectRatio m_preserveAspectRatio;
54  FloatRect m_absoluteSubregion;
 54 GraphicsRect m_absoluteSubregion;
5555};
5656
5757} // namespace WebCore
90929

Source/WebCore/svg/graphics/filters/SVGFilter.cpp

2525
2626namespace WebCore {
2727
28 SVGFilter::SVGFilter(const AffineTransform& absoluteTransform, const FloatRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
 28SVGFilter::SVGFilter(const AffineTransform& absoluteTransform, const GraphicsRect& absoluteSourceDrawingRegion, const GraphicsRect& targetBoundingBox, const GraphicsRect& filterRegion, bool effectBBoxMode)
2929 : Filter()
3030 , m_absoluteTransform(absoluteTransform)
3131 , m_absoluteSourceDrawingRegion(absoluteSourceDrawingRegion)

5050 return Filter::applyVerticalScale(value) * m_absoluteFilterRegion.height() / m_filterRegion.height();
5151}
5252
53 PassRefPtr<SVGFilter> SVGFilter::create(const AffineTransform& absoluteTransform, const FloatRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode)
 53PassRefPtr<SVGFilter> SVGFilter::create(const AffineTransform& absoluteTransform, const GraphicsRect& absoluteSourceDrawingRegion, const GraphicsRect& targetBoundingBox, const GraphicsRect& filterRegion, bool effectBBoxMode)
5454{
5555 return adoptRef(new SVGFilter(absoluteTransform, absoluteSourceDrawingRegion, targetBoundingBox, filterRegion, effectBBoxMode));
5656}
90929

Source/WebCore/svg/graphics/filters/SVGFilter.h

2424#include "AffineTransform.h"
2525#include "Filter.h"
2626#include "FilterEffect.h"
27 #include "FloatRect.h"
28 #include "FloatSize.h"
 27#include "GraphicsRect.h"
 28#include "GraphicsSize.h"
2929
3030#include <wtf/PassRefPtr.h>
3131#include <wtf/RefCounted.h>

3535
3636class SVGFilter : public Filter {
3737public:
38  static PassRefPtr<SVGFilter> create(const AffineTransform&, const FloatRect&, const FloatRect&, const FloatRect&, bool);
 38 static PassRefPtr<SVGFilter> create(const AffineTransform&, const GraphicsRect&, const GraphicsRect&, const GraphicsRect&, bool);
3939
4040 virtual bool effectBoundingBoxMode() const { return m_effectBBoxMode; }
4141
42  virtual FloatRect filterRegionInUserSpace() const { return m_filterRegion; }
43  virtual FloatRect filterRegion() const { return m_absoluteFilterRegion; }
 42 virtual GraphicsRect filterRegionInUserSpace() const { return m_filterRegion; }
 43 virtual GraphicsRect filterRegion() const { return m_absoluteFilterRegion; }
4444
45  virtual FloatPoint mapAbsolutePointToLocalPoint(const FloatPoint& point) const { return m_absoluteTransform.inverse().mapPoint(point); }
46  FloatRect mapLocalRectToAbsoluteRect(const FloatRect& rect) const { return m_absoluteTransform.mapRect(rect); }
 45 virtual GraphicsPoint mapAbsolutePointToLocalPoint(const GraphicsPoint& point) const { return m_absoluteTransform.inverse().mapPoint(point); }
 46 GraphicsRect mapLocalRectToAbsoluteRect(const GraphicsRect& rect) const { return m_absoluteTransform.mapRect(rect); }
4747
4848 virtual float applyHorizontalScale(float value) const;
4949 virtual float applyVerticalScale(float value) const;
5050
51  virtual FloatRect sourceImageRect() const { return m_absoluteSourceDrawingRegion; }
52  FloatRect targetBoundingBox() const { return m_targetBoundingBox; }
 51 virtual GraphicsRect sourceImageRect() const { return m_absoluteSourceDrawingRegion; }
 52 GraphicsRect targetBoundingBox() const { return m_targetBoundingBox; }
5353
5454private:
55  SVGFilter(const AffineTransform& absoluteTransform, const FloatRect& absoluteSourceDrawingRegion, const FloatRect& targetBoundingBox, const FloatRect& filterRegion, bool effectBBoxMode);
 55 SVGFilter(const AffineTransform& absoluteTransform, const GraphicsRect& absoluteSourceDrawingRegion, const GraphicsRect& targetBoundingBox, const GraphicsRect& filterRegion, bool effectBBoxMode);
5656
5757 AffineTransform m_absoluteTransform;
58  FloatRect m_absoluteSourceDrawingRegion;
59  FloatRect m_targetBoundingBox;
60  FloatRect m_absoluteFilterRegion;
61  FloatRect m_filterRegion;
 58 GraphicsRect m_absoluteSourceDrawingRegion;
 59 GraphicsRect m_targetBoundingBox;
 60 GraphicsRect m_absoluteFilterRegion;
 61 GraphicsRect m_filterRegion;
6262 bool m_effectBBoxMode;
6363};
6464
90929

Source/WebCore/svg/graphics/filters/SVGFEImage.cpp

4949void FEImage::determineAbsolutePaintRect()
5050{
5151 ASSERT(m_image);
52  FloatRect srcRect(FloatPoint(), m_image->size());
53  FloatRect paintRect(m_absoluteSubregion);
 52 GraphicsRect srcRect(GraphicsPoint(), m_image->size());
 53 GraphicsRect paintRect(m_absoluteSubregion);
5454 m_preserveAspectRatio.transformRect(paintRect, srcRect);
5555 paintRect.intersect(maxEffectRect());
5656 setAbsolutePaintRect(enclosingIntRect(paintRect));

6565 if (!resultImage)
6666 return;
6767
68  FloatRect srcRect(FloatPoint(), m_image->size());
69  FloatRect destRect(m_absoluteSubregion);
 68 GraphicsRect srcRect(GraphicsPoint(), m_image->size());
 69 GraphicsRect destRect(m_absoluteSubregion);
7070 m_preserveAspectRatio.transformRect(destRect, srcRect);
7171
7272 IntPoint paintLocation = absolutePaintRect().location();
90929

Source/WebCore/svg/graphics/SVGImage.h

6565 virtual NativeImagePtr frameAtIndex(size_t) { return 0; }
6666
6767 SVGImage(ImageObserver*);
68  virtual void draw(GraphicsContext*, const FloatRect& fromRect, const FloatRect& toRect, ColorSpace styleColorSpace, CompositeOperator);
 68 virtual void draw(GraphicsContext*, const GraphicsRect& fromRect, const GraphicsRect& toRect, ColorSpace styleColorSpace, CompositeOperator);
6969
7070 virtual NativeImagePtr nativeImageForCurrentFrame();
7171
90929

Source/WebCore/svg/SVGFilterElement.h

4444 static PassRefPtr<SVGFilterElement> create(const QualifiedName&, Document*);
4545
4646 void setFilterRes(unsigned long filterResX, unsigned long filterResY);
47  FloatRect filterBoundingBox(const FloatRect&) const;
 47 GraphicsRect filterBoundingBox(const GraphicsRect&) const;
4848
4949private:
5050 SVGFilterElement(const QualifiedName&, Document*);
90929

Source/WebCore/svg/SVGLocatable.cpp

6464 return farthest;
6565}
6666
67 FloatRect SVGLocatable::getBBox(const SVGElement* element, StyleUpdateStrategy styleUpdateStrategy)
 67GraphicsRect SVGLocatable::getBBox(const SVGElement* element, StyleUpdateStrategy styleUpdateStrategy)
6868{
6969 ASSERT(element);
7070 if (styleUpdateStrategy == AllowStyleUpdate)

7272
7373 // FIXME: Eventually we should support getBBox for detached elements.
7474 if (!element->renderer())
75  return FloatRect();
 75 return GraphicsRect();
7676
7777 return element->renderer()->objectBoundingBox();
7878}
90929

Source/WebCore/svg/SVGZoomEvent.cpp

3131{
3232}
3333
34 FloatRect SVGZoomEvent::zoomRectScreen() const
 34GraphicsRect SVGZoomEvent::zoomRectScreen() const
3535{
3636 return m_zoomRectScreen;
3737}

4646 m_previousScale = scale;
4747}
4848
49 FloatPoint SVGZoomEvent::previousTranslate() const
 49GraphicsPoint SVGZoomEvent::previousTranslate() const
5050{
5151 return m_previousTranslate;
5252}

6161 m_newScale = scale;
6262}
6363
64 FloatPoint SVGZoomEvent::newTranslate() const
 64GraphicsPoint SVGZoomEvent::newTranslate() const
6565{
6666 return m_newTranslate;
6767}
90929

Source/WebCore/svg/SVGElement.cpp

211211 return rareSVGData()->elementInstances();
212212}
213213
214 bool SVGElement::boundingBox(FloatRect& rect, SVGLocatable::StyleUpdateStrategy styleUpdateStrategy) const
 214bool SVGElement::boundingBox(GraphicsRect& rect, SVGLocatable::StyleUpdateStrategy styleUpdateStrategy) const
215215{
216216 if (isStyledLocatable()) {
217217 rect = static_cast<const SVGStyledLocatableElement*>(this)->getBBox(styleUpdateStrategy);
90929

Source/WebCore/svg/SVGPathSegListSource.cpp

5959 return pathSegType;
6060}
6161
62 bool SVGPathSegListSource::parseMoveToSegment(FloatPoint& targetPoint)
 62bool SVGPathSegListSource::parseMoveToSegment(GraphicsPoint& targetPoint)
6363{
6464 ASSERT(m_segment);
6565 ASSERT(m_segment->pathSegType() == PathSegMoveToAbs || m_segment->pathSegType() == PathSegMoveToRel);
6666 SVGPathSegSingleCoordinate* moveTo = static_cast<SVGPathSegSingleCoordinate*>(m_segment.get());
67  targetPoint = FloatPoint(moveTo->x(), moveTo->y());
 67 targetPoint = GraphicsPoint(moveTo->x(), moveTo->y());
6868 return true;
6969}
7070
71 bool SVGPathSegListSource::parseLineToSegment(FloatPoint& targetPoint)
 71bool SVGPathSegListSource::parseLineToSegment(GraphicsPoint& targetPoint)
7272{
7373 ASSERT(m_segment);
7474 ASSERT(m_segment->pathSegType() == PathSegLineToAbs || m_segment->pathSegType() == PathSegLineToRel);
7575 SVGPathSegSingleCoordinate* lineTo = static_cast<SVGPathSegSingleCoordinate*>(m_segment.get());
76  targetPoint = FloatPoint(lineTo->x(), lineTo->y());
 76 targetPoint = GraphicsPoint(lineTo->x(), lineTo->y());
7777 return true;
7878}
7979

9595 return true;
9696}
9797
98 bool SVGPathSegListSource::parseCurveToCubicSegment(FloatPoint& point1, FloatPoint& point2, FloatPoint& targetPoint)
 98bool SVGPathSegListSource::parseCurveToCubicSegment(GraphicsPoint& point1, GraphicsPoint& point2, GraphicsPoint& targetPoint)
9999{
100100 ASSERT(m_segment);
101101 ASSERT(m_segment->pathSegType() == PathSegCurveToCubicAbs || m_segment->pathSegType() == PathSegCurveToCubicRel);
102102 SVGPathSegCurvetoCubic* cubic = static_cast<SVGPathSegCurvetoCubic*>(m_segment.get());
103  point1 = FloatPoint(cubic->x1(), cubic->y1());
104  point2 = FloatPoint(cubic->x2(), cubic->y2());
105  targetPoint = FloatPoint(cubic->x(), cubic->y());
 103 point1 = GraphicsPoint(cubic->x1(), cubic->y1());
 104 point2 = GraphicsPoint(cubic->x2(), cubic->y2());
 105 targetPoint = GraphicsPoint(cubic->x(), cubic->y());
106106 return true;
107107}
108108
109 bool SVGPathSegListSource::parseCurveToCubicSmoothSegment(FloatPoint& point2, FloatPoint& targetPoint)
 109bool SVGPathSegListSource::parseCurveToCubicSmoothSegment(GraphicsPoint& point2, GraphicsPoint& targetPoint)
110110{
111111 ASSERT(m_segment);
112112 ASSERT(m_segment->pathSegType() == PathSegCurveToCubicSmoothAbs || m_segment->pathSegType() == PathSegCurveToCubicSmoothRel);
113113 SVGPathSegCurvetoCubicSmooth* cubicSmooth = static_cast<SVGPathSegCurvetoCubicSmooth*>(m_segment.get());
114  point2 = FloatPoint(cubicSmooth->x2(), cubicSmooth->y2());
115  targetPoint = FloatPoint(cubicSmooth->x(), cubicSmooth->y());
 114 point2 = GraphicsPoint(cubicSmooth->x2(), cubicSmooth->y2());
 115 targetPoint = GraphicsPoint(cubicSmooth->x(), cubicSmooth->y());
116116 return true;
117117}
118118
119 bool SVGPathSegListSource::parseCurveToQuadraticSegment(FloatPoint& point1, FloatPoint& targetPoint)
 119bool SVGPathSegListSource::parseCurveToQuadraticSegment(GraphicsPoint& point1, GraphicsPoint& targetPoint)
120120{
121121 ASSERT(m_segment);
122122 ASSERT(m_segment->pathSegType() == PathSegCurveToQuadraticAbs || m_segment->pathSegType() == PathSegCurveToQuadraticRel);
123123 SVGPathSegCurvetoQuadratic* quadratic = static_cast<SVGPathSegCurvetoQuadratic*>(m_segment.get());
124  point1 = FloatPoint(quadratic->x1(), quadratic->y1());
125  targetPoint = FloatPoint(quadratic->x(), quadratic->y());
 124 point1 = GraphicsPoint(quadratic->x1(), quadratic->y1());
 125 targetPoint = GraphicsPoint(quadratic->x(), quadratic->y());
126126 return true;
127127}
128128
129 bool SVGPathSegListSource::parseCurveToQuadraticSmoothSegment(FloatPoint& targetPoint)
 129bool SVGPathSegListSource::parseCurveToQuadraticSmoothSegment(GraphicsPoint& targetPoint)
130130{
131131 ASSERT(m_segment);
132132 ASSERT(m_segment->pathSegType() == PathSegCurveToQuadraticSmoothAbs || m_segment->pathSegType() == PathSegCurveToQuadraticSmoothRel);
133133 SVGPathSegSingleCoordinate* quadraticSmooth = static_cast<SVGPathSegSingleCoordinate*>(m_segment.get());
134  targetPoint = FloatPoint(quadraticSmooth->x(), quadraticSmooth->y());
 134 targetPoint = GraphicsPoint(quadraticSmooth->x(), quadraticSmooth->y());
135135 return true;
136136}
137137
138 bool SVGPathSegListSource::parseArcToSegment(float& rx, float& ry, float& angle, bool& largeArc, bool& sweep, FloatPoint& targetPoint)
 138bool SVGPathSegListSource::parseArcToSegment(float& rx, float& ry, float& angle, bool& largeArc, bool& sweep, GraphicsPoint& targetPoint)
139139{
140140 ASSERT(m_segment);
141141 ASSERT(m_segment->pathSegType() == PathSegArcAbs || m_segment->pathSegType() == PathSegArcRel);

145145 angle = arcTo->angle();
146146 largeArc = arcTo->largeArcFlag();
147147 sweep = arcTo->sweepFlag();
148  targetPoint = FloatPoint(arcTo->x(), arcTo->y());
 148 targetPoint = GraphicsPoint(arcTo->x(), arcTo->y());
149149 return true;
150150}
151151
90929

Source/WebCore/svg/SVGParserUtilities.cpp

2626#include "SVGParserUtilities.h"
2727
2828#include "Document.h"
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "SVGPointList.h"
3131
3232#include <limits>

189189 return cur == end;
190190}
191191
192 bool parseRect(const String& string, FloatRect& rect)
 192bool parseRect(const String& string, GraphicsRect& rect)
193193{
194194 const UChar* ptr = string.characters();
195195 const UChar* end = ptr + string.length();

200200 float width = 0;
201201 float height = 0;
202202 bool valid = parseNumber(ptr, end, x) && parseNumber(ptr, end, y) && parseNumber(ptr, end, width) && parseNumber(ptr, end, height, false);
203  rect = FloatRect(x, y, width, height);
 203 rect = GraphicsRect(x, y, width, height);
204204 return valid;
205205}
206206

232232 }
233233 skipOptionalSpaces(cur, end);
234234
235  pointsList.append(FloatPoint(xPos, yPos));
 235 pointsList.append(GraphicsPoint(xPos, yPos));
236236 }
237237 return cur == end && !delimParsed;
238238}
90929

Source/WebCore/svg/SVGTextContentElement.h

8282 unsigned getNumberOfChars() const;
8383 float getComputedTextLength() const;
8484 float getSubStringLength(unsigned charnum, unsigned nchars, ExceptionCode&) const;
85  FloatPoint getStartPositionOfChar(unsigned charnum, ExceptionCode&) const;
86  FloatPoint getEndPositionOfChar(unsigned charnum, ExceptionCode&) const;
87  FloatRect getExtentOfChar(unsigned charnum, ExceptionCode&) const;
 85 GraphicsPoint getStartPositionOfChar(unsigned charnum, ExceptionCode&) const;
 86 GraphicsPoint getEndPositionOfChar(unsigned charnum, ExceptionCode&) const;
 87 GraphicsRect getExtentOfChar(unsigned charnum, ExceptionCode&) const;
8888 float getRotationOfChar(unsigned charnum, ExceptionCode&) const;
89  int getCharNumAtPosition(const FloatPoint&) const;
 89 int getCharNumAtPosition(const GraphicsPoint&) const;
9090 void selectSubString(unsigned charnum, unsigned nchars, ExceptionCode&) const;
9191
9292 static SVGTextContentElement* elementFromRenderer(RenderObject*);
90929

Source/WebCore/svg/SVGLinearGradientElement.cpp

2828
2929#include "Attribute.h"
3030#include "Document.h"
31 #include "FloatPoint.h"
 31#include "GraphicsPoint.h"
3232#include "LinearGradientAttributes.h"
3333#include "RenderSVGResourceLinearGradient.h"
3434#include "SVGElementInstance.h"

199199 return true;
200200}
201201
202 void SVGLinearGradientElement::calculateStartEndPoints(const LinearGradientAttributes& attributes, FloatPoint& startPoint, FloatPoint& endPoint)
 202void SVGLinearGradientElement::calculateStartEndPoints(const LinearGradientAttributes& attributes, GraphicsPoint& startPoint, GraphicsPoint& endPoint)
203203{
204204 // Determine gradient start/end points
205205 if (attributes.boundingBoxMode()) {
206  startPoint = FloatPoint(attributes.x1().valueAsPercentage(), attributes.y1().valueAsPercentage());
207  endPoint = FloatPoint(attributes.x2().valueAsPercentage(), attributes.y2().valueAsPercentage());
 206 startPoint = GraphicsPoint(attributes.x1().valueAsPercentage(), attributes.y1().valueAsPercentage());
 207 endPoint = GraphicsPoint(attributes.x2().valueAsPercentage(), attributes.y2().valueAsPercentage());
208208 } else {
209  startPoint = FloatPoint(attributes.x1().value(this), attributes.y1().value(this));
210  endPoint = FloatPoint(attributes.x2().value(this), attributes.y2().value(this));
 209 startPoint = GraphicsPoint(attributes.x1().value(this), attributes.y1().value(this));
 210 endPoint = GraphicsPoint(attributes.x2().value(this), attributes.y2().value(this));
211211 }
212212}
213213
90929

Source/WebCore/svg/SVGStyledTransformableElement.h

4545 virtual AffineTransform animatedLocalTransform() const;
4646 virtual AffineTransform* supplementalTransform();
4747
48  virtual FloatRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
 48 virtual GraphicsRect getBBox(StyleUpdateStrategy = AllowStyleUpdate) const;
4949
5050 // "base class" methods for all the elements which render as paths
5151 virtual void toPathData(Path&) const { }
90929

Source/WebCore/svg/SVGPathElement.cpp

9393 return totalLength;
9494}
9595
96 FloatPoint SVGPathElement::getPointAtLength(float length)
 96GraphicsPoint SVGPathElement::getPointAtLength(float length)
9797{
98  FloatPoint point;
 98 GraphicsPoint point;
9999 SVGPathParserFactory::self()->getPointAtLengthOfSVGPathByteStream(m_pathByteStream.get(), length, point);
100100 return point;
101101}
90929

Source/WebCore/svg/SVGPathBuilder.h

2525#define SVGPathBuilder_h
2626
2727#if ENABLE(SVG)
28 #include "FloatPoint.h"
 28#include "GraphicsPoint.h"
2929#include "Path.h"
3030#include "SVGPathConsumer.h"
3131

4343 virtual void cleanup() { m_path = 0; }
4444
4545 // Used in UnalteredParisng/NormalizedParsing modes.
46  virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
47  virtual void lineTo(const FloatPoint&, PathCoordinateMode);
48  virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
 46 virtual void moveTo(const GraphicsPoint&, bool closed, PathCoordinateMode);
 47 virtual void lineTo(const GraphicsPoint&, PathCoordinateMode);
 48 virtual void curveToCubic(const GraphicsPoint&, const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
4949 virtual void closePath();
5050
5151 // Only used in UnalteredParsing mode.
5252 virtual void lineToHorizontal(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
5353 virtual void lineToVertical(float, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
54  virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
55  virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
56  virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
57  virtual void arcTo(float, float, float, bool, bool, const FloatPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 54 virtual void curveToCubicSmooth(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 55 virtual void curveToQuadratic(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 56 virtual void curveToQuadraticSmooth(const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
 57 virtual void arcTo(float, float, float, bool, bool, const GraphicsPoint&, PathCoordinateMode) { ASSERT_NOT_REACHED(); }
5858
5959 Path* m_path;
60  FloatPoint m_current;
 60 GraphicsPoint m_current;
6161};
6262
6363} // namespace WebCore
90929

Source/WebCore/svg/SVGPathConsumer.h

2525#define SVGPathConsumer_h
2626
2727#if ENABLE(SVG)
28 #include "FloatPoint.h"
 28#include "GraphicsPoint.h"
2929#include <wtf/FastAllocBase.h>
3030#include <wtf/Noncopyable.h>
3131

5050 virtual void cleanup() = 0;
5151
5252 // Used in UnalteredParisng/NormalizedParsing modes.
53  virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode) = 0;
54  virtual void lineTo(const FloatPoint&, PathCoordinateMode) = 0;
55  virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
 53 virtual void moveTo(const GraphicsPoint&, bool closed, PathCoordinateMode) = 0;
 54 virtual void lineTo(const GraphicsPoint&, PathCoordinateMode) = 0;
 55 virtual void curveToCubic(const GraphicsPoint&, const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) = 0;
5656 virtual void closePath() = 0;
5757
5858 // Only used in UnalteredParsing mode.
5959 virtual void lineToHorizontal(float, PathCoordinateMode) = 0;
6060 virtual void lineToVertical(float, PathCoordinateMode) = 0;
61  virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
62  virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode) = 0;
63  virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode) = 0;
64  virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode) = 0;
 61 virtual void curveToCubicSmooth(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) = 0;
 62 virtual void curveToQuadratic(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode) = 0;
 63 virtual void curveToQuadraticSmooth(const GraphicsPoint&, PathCoordinateMode) = 0;
 64 virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const GraphicsPoint&, PathCoordinateMode) = 0;
6565
6666protected:
6767 virtual ~SVGPathConsumer() { }
90929

Source/WebCore/svg/SVGAnimateMotionElement.cpp

143143 return Path();
144144}
145145
146 static bool parsePoint(const String& s, FloatPoint& point)
 146static bool parsePoint(const String& s, GraphicsPoint& point)
147147{
148148 if (s.isEmpty())
149149 return false;

161161 if (!parseNumber(cur, end, y))
162162 return false;
163163
164  point = FloatPoint(x, y);
 164 point = GraphicsPoint(x, y);
165165
166166 // disallow anything except spaces at the end
167167 return !skipOptionalSpaces(cur, end);

187187bool SVGAnimateMotionElement::calculateFromAndByValues(const String& fromString, const String& byString)
188188{
189189 parsePoint(fromString, m_fromPoint);
190  FloatPoint byPoint;
 190 GraphicsPoint byPoint;
191191 parsePoint(byString, byPoint);
192  m_toPoint = FloatPoint(m_fromPoint.x() + byPoint.x(), m_fromPoint.y() + byPoint.y());
 192 m_toPoint = GraphicsPoint(m_fromPoint.x() + byPoint.x(), m_fromPoint.y() + byPoint.y());
193193 return true;
194194}
195195

215215 Path path = animationPath();
216216 float positionOnPath = path.length() * percentage;
217217 bool ok;
218  FloatPoint position = path.pointAtLength(positionOnPath, ok);
 218 GraphicsPoint position = path.pointAtLength(positionOnPath, ok);
219219 if (ok) {
220220 transform->translate(position.x(), position.y());
221221 RotateMode rotateMode = this->rotateMode();

228228 }
229229 return;
230230 }
231  FloatSize diff = m_toPoint - m_fromPoint;
 231 GraphicsSize diff = m_toPoint - m_fromPoint;
232232 transform->translate(diff.width() * percentage + m_fromPoint.x(), diff.height() * percentage + m_fromPoint.y());
233233}
234234

265265
266266float SVGAnimateMotionElement::calculateDistance(const String& fromString, const String& toString)
267267{
268  FloatPoint from;
269  FloatPoint to;
 268 GraphicsPoint from;
 269 GraphicsPoint to;
270270 if (!parsePoint(fromString, from))
271271 return -1;
272272 if (!parsePoint(toString, to))
273273 return -1;
274  FloatSize diff = to - from;
 274 GraphicsSize diff = to - from;
275275 return sqrtf(diff.width() * diff.width() + diff.height() * diff.height());
276276}
277277
90929

Source/WebCore/svg/SVGPathTraversalStateBuilder.cpp

3333{
3434}
3535
36 void SVGPathTraversalStateBuilder::moveTo(const FloatPoint& targetPoint, bool, PathCoordinateMode)
 36void SVGPathTraversalStateBuilder::moveTo(const GraphicsPoint& targetPoint, bool, PathCoordinateMode)
3737{
3838 ASSERT(m_traversalState);
3939 m_traversalState->m_totalLength += m_traversalState->moveTo(targetPoint);
4040}
4141
42 void SVGPathTraversalStateBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode)
 42void SVGPathTraversalStateBuilder::lineTo(const GraphicsPoint& targetPoint, PathCoordinateMode)
4343{
4444 ASSERT(m_traversalState);
4545 m_traversalState->m_totalLength += m_traversalState->lineTo(targetPoint);
4646}
4747
48 void SVGPathTraversalStateBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode)
 48void SVGPathTraversalStateBuilder::curveToCubic(const GraphicsPoint& point1, const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode)
4949{
5050 ASSERT(m_traversalState);
5151 m_traversalState->m_totalLength += m_traversalState->cubicBezierTo(point1, point2, targetPoint);

8888 return m_traversalState->m_totalLength;
8989}
9090
91 FloatPoint SVGPathTraversalStateBuilder::currentPoint()
 91GraphicsPoint SVGPathTraversalStateBuilder::currentPoint()
9292{
9393 ASSERT(m_traversalState);
9494 return m_traversalState->m_current;
90929

Source/WebCore/svg/SVGAnimatedType.h

2626namespace WebCore {
2727
2828class Color;
29 class FloatRect;
 29class GraphicsRect;
3030class SVGAngle;
3131class SVGLength;
3232class SVGLengthList;

5252 static PassOwnPtr<SVGAnimatedType> createPath(PassOwnPtr<SVGPathByteStream>);
5353 static PassOwnPtr<SVGAnimatedType> createPointList(SVGPointList*);
5454 static PassOwnPtr<SVGAnimatedType> createPreserveAspectRatio(SVGPreserveAspectRatio*);
55  static PassOwnPtr<SVGAnimatedType> createRect(FloatRect*);
 55 static PassOwnPtr<SVGAnimatedType> createRect(GraphicsRect*);
5656 static PassOwnPtr<SVGAnimatedType> createString(String*);
5757
5858 AnimatedPropertyType type() const { return m_type; }

6969 SVGPathByteStream* path();
7070 SVGPointList& pointList();
7171 SVGPreserveAspectRatio& preserveAspectRatio();
72  FloatRect& rect();
 72 GraphicsRect& rect();
7373 String& string();
7474
7575 String valueAsString();

101101 SVGPathByteStream* path;
102102 SVGPreserveAspectRatio* preserveAspectRatio;
103103 SVGPointList* pointList;
104  FloatRect* rect;
 104 GraphicsRect* rect;
105105 String* string;
106106 } m_data;
107107};
90929

Source/WebCore/svg/SVGTextElement.cpp

2525
2626#include "AffineTransform.h"
2727#include "Attribute.h"
28 #include "FloatRect.h"
 28#include "GraphicsRect.h"
2929#include "RenderSVGResource.h"
3030#include "RenderSVGText.h"
3131#include "SVGElementInstance.h"

9393 return SVGTransformable::farthestViewportElement(this);
9494}
9595
96 FloatRect SVGTextElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
 96GraphicsRect SVGTextElement::getBBox(StyleUpdateStrategy styleUpdateStrategy) const
9797{
9898 return SVGTransformable::getBBox(this, styleUpdateStrategy);
9999}
90929

Source/WebCore/svg/SVGPathBuilder.cpp

3333{
3434}
3535
36 void SVGPathBuilder::moveTo(const FloatPoint& targetPoint, bool closed, PathCoordinateMode mode)
 36void SVGPathBuilder::moveTo(const GraphicsPoint& targetPoint, bool closed, PathCoordinateMode mode)
3737{
3838 ASSERT(m_path);
3939 m_current = mode == AbsoluteCoordinates ? targetPoint : m_current + targetPoint;

4242 m_path->moveTo(m_current);
4343}
4444
45 void SVGPathBuilder::lineTo(const FloatPoint& targetPoint, PathCoordinateMode mode)
 45void SVGPathBuilder::lineTo(const GraphicsPoint& targetPoint, PathCoordinateMode mode)
4646{
4747 ASSERT(m_path);
4848 m_current = mode == AbsoluteCoordinates ? targetPoint : m_current + targetPoint;
4949 m_path->addLineTo(m_current);
5050}
5151
52 void SVGPathBuilder::curveToCubic(const FloatPoint& point1, const FloatPoint& point2, const FloatPoint& targetPoint, PathCoordinateMode mode)
 52void SVGPathBuilder::curveToCubic(const GraphicsPoint& point1, const GraphicsPoint& point2, const GraphicsPoint& targetPoint, PathCoordinateMode mode)
5353{
5454 ASSERT(m_path);
5555 if (mode == RelativeCoordinates) {
90929

Source/WebCore/svg/SVGLinearGradientElement.h

3434 static PassRefPtr<SVGLinearGradientElement> create(const QualifiedName&, Document*);
3535
3636 bool collectGradientAttributes(LinearGradientAttributes&);
37  void calculateStartEndPoints(const LinearGradientAttributes&, FloatPoint& startPoint, FloatPoint& endPoint);
 37 void calculateStartEndPoints(const LinearGradientAttributes&, GraphicsPoint& startPoint, GraphicsPoint& endPoint);
3838
3939private:
4040 SVGLinearGradientElement(const QualifiedName&, Document*);
90929

Source/WebCore/svg/SVGDocument.cpp

8080 return false;
8181}
8282
83 void SVGDocument::startPan(const FloatPoint& start)
 83void SVGDocument::startPan(const GraphicsPoint& start)
8484{
8585 if (rootElement())
86  m_translate = FloatPoint(start.x() - rootElement()->currentTranslate().x(), rootElement()->currentTranslate().y() + start.y());
 86 m_translate = GraphicsPoint(start.x() - rootElement()->currentTranslate().x(), rootElement()->currentTranslate().y() + start.y());
8787}
8888
89 void SVGDocument::updatePan(const FloatPoint& pos) const
 89void SVGDocument::updatePan(const GraphicsPoint& pos) const
9090{
9191 if (rootElement()) {
92  rootElement()->setCurrentTranslate(FloatPoint(pos.x() - m_translate.x(), m_translate.y() - pos.y()));
 92 rootElement()->setCurrentTranslate(GraphicsPoint(pos.x() - m_translate.x(), m_translate.y() - pos.y()));
9393 if (renderer())
9494 renderer()->repaint();
9595 }
90929

Source/WebCore/svg/SVGPathByteStreamSource.h

2121#define SVGPathByteStreamSource_h
2222
2323#if ENABLE(SVG)
24 #include "FloatPoint.h"
 24#include "GraphicsPoint.h"
2525#include "SVGPathByteStream.h"
2626#include "SVGPathSource.h"
2727#include <wtf/PassOwnPtr.h>

4343 virtual bool parseSVGSegmentType(SVGPathSegType&);
4444 virtual SVGPathSegType nextCommand(SVGPathSegType);
4545
46  virtual bool parseMoveToSegment(FloatPoint&);
47  virtual bool parseLineToSegment(FloatPoint&);
 46 virtual bool parseMoveToSegment(GraphicsPoint&);
 47 virtual bool parseLineToSegment(GraphicsPoint&);
4848 virtual bool parseLineToHorizontalSegment(float&);
4949 virtual bool parseLineToVerticalSegment(float&);
50  virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&);
51  virtual bool parseCurveToCubicSmoothSegment(FloatPoint&, FloatPoint&);
52  virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&);
53  virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
54  virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
 50 virtual bool parseCurveToCubicSegment(GraphicsPoint&, GraphicsPoint&, GraphicsPoint&);
 51 virtual bool parseCurveToCubicSmoothSegment(GraphicsPoint&, GraphicsPoint&);
 52 virtual bool parseCurveToQuadraticSegment(GraphicsPoint&, GraphicsPoint&);
 53 virtual bool parseCurveToQuadraticSmoothSegment(GraphicsPoint&);
 54 virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, GraphicsPoint&);
5555
5656#if COMPILER(MSVC)
5757#pragma warning(disable: 4701)

8686 return readType<unsigned short, UnsignedShortByte>();
8787 }
8888
89  FloatPoint readFloatPoint()
 89 GraphicsPoint readGraphicsPoint()
9090 {
9191 float x = readType<float, FloatByte>();
9292 float y = readType<float, FloatByte>();
93  return FloatPoint(x, y);
 93 return GraphicsPoint(x, y);
9494 }
9595
9696 SVGPathByteStream* m_stream;
90929

Source/WebCore/svg/SVGTransformDistance.cpp

2222#include "SVGTransformDistance.h"
2323
2424#include "FloatConversion.h"
25 #include "FloatPoint.h"
26 #include "FloatSize.h"
 25#include "GraphicsPoint.h"
 26#include "GraphicsSize.h"
2727#include "SVGTransform.h"
2828
2929#include <math.h>

6262 // FIXME: need to be able to subtract to matrices
6363 return;
6464 case SVGTransform::SVG_TRANSFORM_ROTATE: {
65  FloatSize centerDistance = toSVGTransform.rotationCenter() - fromSVGTransform.rotationCenter();
 65 GraphicsSize centerDistance = toSVGTransform.rotationCenter() - fromSVGTransform.rotationCenter();
6666 m_angle = toSVGTransform.angle() - fromSVGTransform.angle();
6767 m_cx = centerDistance.width();
6868 m_cy = centerDistance.height();
6969 return;
7070 }
7171 case SVGTransform::SVG_TRANSFORM_TRANSLATE: {
72  FloatSize translationDistance = toSVGTransform.translate() - fromSVGTransform.translate();
 72 GraphicsSize translationDistance = toSVGTransform.translate() - fromSVGTransform.translate();
7373 m_transform.translate(translationDistance.width(), translationDistance.height());
7474 return;
7575 }

135135 return transform;
136136 }
137137 case SVGTransform::SVG_TRANSFORM_SCALE: {
138  FloatSize scale = first.scale() + second.scale();
 138 GraphicsSize scale = first.scale() + second.scale();
139139 transform.setScale(scale.width(), scale.height());
140140 return transform;
141141 }

204204 case SVGTransform::SVG_TRANSFORM_MATRIX:
205205 return SVGTransform(transform.matrix() * m_transform);
206206 case SVGTransform::SVG_TRANSFORM_TRANSLATE: {
207  FloatPoint translation = transform.translate();
208  translation += FloatSize::narrowPrecision(m_transform.e(), m_transform.f());
 207 GraphicsPoint translation = transform.translate();
 208 translation += GraphicsSize::narrowPrecision(m_transform.e(), m_transform.f());
209209 newTransform.setTranslate(translation.x(), translation.y());
210210 return newTransform;
211211 }
212212 case SVGTransform::SVG_TRANSFORM_SCALE: {
213  FloatSize scale = transform.scale();
214  scale += FloatSize::narrowPrecision(m_transform.a(), m_transform.d());
 213 GraphicsSize scale = transform.scale();
 214 scale += GraphicsSize::narrowPrecision(m_transform.a(), m_transform.d());
215215 newTransform.setScale(scale.width(), scale.height());
216216 return newTransform;
217217 }
218218 case SVGTransform::SVG_TRANSFORM_ROTATE: {
219219 // FIXME: I'm not certain the translation is calculated correctly here
220  FloatPoint center = transform.rotationCenter();
 220 GraphicsPoint center = transform.rotationCenter();
221221 newTransform.setRotate(transform.angle() + m_angle,
222222 center.x() + m_cx,
223223 center.y() + m_cy);
90929

Source/WebCore/svg/SVGPointList.h

2828
2929namespace WebCore {
3030
31 class FloatPoint;
 31class GraphicsPoint;
3232
33 class SVGPointList : public Vector<FloatPoint> {
 33class SVGPointList : public Vector<GraphicsPoint> {
3434public:
3535 SVGPointList() { }
3636

4242template<>
4343struct SVGPropertyTraits<SVGPointList> {
4444 static SVGPointList initialValue() { return SVGPointList(); }
45  typedef FloatPoint ListItemType;
 45 typedef GraphicsPoint ListItemType;
4646};
4747
4848} // namespace WebCore
90929

Source/WebCore/svg/SVGPolyElement.cpp

2525
2626#include "Attribute.h"
2727#include "Document.h"
28 #include "FloatPoint.h"
 28#include "GraphicsPoint.h"
2929#include "RenderSVGPath.h"
3030#include "RenderSVGResource.h"
3131#include "SVGElementInstance.h"
90929

Source/WebCore/svg/SVGElement.h

8282
8383 const HashSet<SVGElementInstance*>& instancesForElement() const;
8484
85  bool boundingBox(FloatRect&, SVGLocatable::StyleUpdateStrategy = SVGLocatable::AllowStyleUpdate) const;
 85 bool boundingBox(GraphicsRect&, SVGLocatable::StyleUpdateStrategy = SVGLocatable::AllowStyleUpdate) const;
8686
8787 void setCursorElement(SVGCursorElement*);
8888 void cursorElementRemoved();
90929

Source/WebCore/svg/SVGPathParserFactory.cpp

296296 return ok;
297297}
298298
299 bool SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream(SVGPathByteStream* stream, float length, FloatPoint& point)
 299bool SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream(SVGPathByteStream* stream, float length, GraphicsPoint& point)
300300{
301301 ASSERT(stream);
302302 if (stream->isEmpty())
90929

Source/WebCore/svg/SVGSVGElement.cpp

3232#include "EventListener.h"
3333#include "EventNames.h"
3434#include "FloatConversion.h"
35 #include "FloatRect.h"
 35#include "GraphicsRect.h"
3636#include "Frame.h"
3737#include "FrameTree.h"
3838#include "FrameSelection.h"

142142 setAttribute(SVGNames::contentStyleTypeAttr, type);
143143}
144144
145 FloatRect SVGSVGElement::viewport() const
 145GraphicsRect SVGSVGElement::viewport() const
146146{
147  FloatRect viewRectangle;
 147 GraphicsRect viewRectangle;
148148 if (!isOutermostSVG())
149  viewRectangle.setLocation(FloatPoint(x().value(this), y().value(this)));
 149 viewRectangle.setLocation(GraphicsPoint(x().value(this), y().value(this)));
150150
151  viewRectangle.setSize(FloatSize(width().value(this), height().value(this)));
 151 viewRectangle.setSize(GraphicsSize(width().value(this), height().value(this)));
152152 return viewBoxToViewTransform(viewRectangle.width(), viewRectangle.height()).mapRect(viewRectangle);
153153}
154154

248248 frame->setPageZoomFactor(scale);
249249}
250250
251 void SVGSVGElement::setCurrentTranslate(const FloatPoint& translation)
 251void SVGSVGElement::setCurrentTranslate(const GraphicsPoint& translation)
252252{
253253 m_translation = translation;
254254 updateCurrentTranslate();

389389 // FIXME: Implement me (see bug 11275)
390390}
391391
392 NodeList* SVGSVGElement::getIntersectionList(const FloatRect&, SVGElement*)
 392NodeList* SVGSVGElement::getIntersectionList(const GraphicsRect&, SVGElement*)
393393{
394394 // FIXME: Implement me (see bug 11274)
395395 return 0;
396396}
397397
398 NodeList* SVGSVGElement::getEnclosureList(const FloatRect&, SVGElement*)
 398NodeList* SVGSVGElement::getEnclosureList(const GraphicsRect&, SVGElement*)
399399{
400400 // FIXME: Implement me (see bug 11274)
401401 return 0;
402402}
403403
404 bool SVGSVGElement::checkIntersection(SVGElement*, const FloatRect& rect)
 404bool SVGSVGElement::checkIntersection(SVGElement*, const GraphicsRect& rect)
405405{
406406 // TODO : take into account pointer-events?
407407 // FIXME: Why is element ignored??

409409 return rect.intersects(getBBox());
410410}
411411
412 bool SVGSVGElement::checkEnclosure(SVGElement*, const FloatRect& rect)
 412bool SVGSVGElement::checkEnclosure(SVGElement*, const GraphicsRect& rect)
413413{
414414 // TODO : take into account pointer-events?
415415 // FIXME: Why is element ignored??

438438 return SVGAngle();
439439}
440440
441 FloatPoint SVGSVGElement::createSVGPoint()
 441GraphicsPoint SVGSVGElement::createSVGPoint()
442442{
443  return FloatPoint();
 443 return GraphicsPoint();
444444}
445445
446446SVGMatrix SVGSVGElement::createSVGMatrix()

448448 return SVGMatrix();
449449}
450450
451 FloatRect SVGSVGElement::createSVGRect()
 451GraphicsRect SVGSVGElement::createSVGRect()
452452{
453  return FloatRect();
 453 return GraphicsRect();
454454}
455455
456456SVGTransform SVGSVGElement::createSVGTransform()

476476 if (RenderObject* renderer = this->renderer()) {
477477 // Translate in our CSS parent coordinate space
478478 // FIXME: This doesn't work correctly with CSS transforms.
479  FloatPoint location = renderer->localToAbsolute(FloatPoint(), false, true);
 479 GraphicsPoint location = renderer->localToAbsolute(GraphicsPoint(), false, true);
480480
481481 // Be careful here! localToAbsolute() includes the x/y offset coming from the viewBoxToViewTransform(), because
482482 // RenderSVGRoot::localToBorderBoxTransform() (called through mapLocalToContainer(), called from localToAbsolute())

566566 return !parentNode()->isSVGElement();
567567}
568568
569 FloatRect SVGSVGElement::currentViewBoxRect() const
 569GraphicsRect SVGSVGElement::currentViewBoxRect() const
570570{
571571 if (useCurrentView()) {
572572 if (SVGViewSpec* view = currentView()) // what if we should use it but it is not set?
573573 return view->viewBox();
574  return FloatRect();
 574 return GraphicsRect();
575575 }
576576
577577 return viewBox();
90929

Source/WebCore/svg/SVGCircleElement.cpp

2424#include "SVGCircleElement.h"
2525
2626#include "Attribute.h"
27 #include "FloatPoint.h"
 27#include "GraphicsPoint.h"
2828#include "RenderSVGPath.h"
2929#include "RenderSVGResource.h"
3030#include "SVGElementInstance.h"

157157 if (radius <= 0)
158158 return;
159159
160  path.addEllipse(FloatRect(cx().value(this) - radius, cy().value(this) - radius, radius * 2, radius * 2));
 160 path.addEllipse(GraphicsRect(cx().value(this) - radius, cy().value(this) - radius, radius * 2, radius * 2));
161161}
162162
163163bool SVGCircleElement::selfHasRelativeLengths() const
90929

Source/WebCore/svg/SVGAnimatedPointList.cpp

5757 if (!itemCount || itemCount != toPointList.size())
5858 return;
5959 for (unsigned n = 0; n < itemCount; ++n) {
60  FloatPoint& to = toPointList.at(n);
 60 GraphicsPoint& to = toPointList.at(n);
6161 to += fromPointList.at(n);
6262 }
6363}
90929

Source/WebCore/svg/SVGPathBlender.h

5151 bool blendArcToSegment();
5252
5353 float blendAnimatedDimensonalFloat(float, float, FloatBlendMode);
54  FloatPoint blendAnimatedFloatPoint(const FloatPoint& from, const FloatPoint& to);
 54 GraphicsPoint blendAnimatedGraphicsPoint(const GraphicsPoint& from, const GraphicsPoint& to);
5555
5656 SVGPathSource* m_fromSource;
5757 SVGPathSource* m_toSource;
5858 SVGPathConsumer* m_consumer;
5959
60  FloatPoint m_fromCurrentPoint;
61  FloatPoint m_toCurrentPoint;
 60 GraphicsPoint m_fromCurrentPoint;
 61 GraphicsPoint m_toCurrentPoint;
6262
6363 PathCoordinateMode m_fromMode;
6464 PathCoordinateMode m_toMode;
90929

Source/WebCore/svg/SVGFESpotLightElement.cpp

4040
4141PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const
4242{
43  FloatPoint3D pos(x(), y(), z());
44  FloatPoint3D direction(pointsAtX(), pointsAtY(), pointsAtZ());
 43 GraphicsPoint3D pos(x(), y(), z());
 44 GraphicsPoint3D direction(pointsAtX(), pointsAtY(), pointsAtZ());
4545
4646 return SpotLightSource::create(pos, direction, specularExponent(), limitingConeAngle());
4747}
90929

Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp

2424
2525#include "Attr.h"
2626#include "FilterEffect.h"
27 #include "FloatPoint.h"
 27#include "GraphicsPoint.h"
2828#include "IntPoint.h"
2929#include "IntSize.h"
3030#include "SVGElementInstance.h"

210210 if (attrName == SVGNames::targetYAttr)
211211 return convolveMatrix->setTargetOffset(IntPoint(targetX(), targetY()));
212212 if (attrName == SVGNames::kernelUnitLengthAttr)
213  return convolveMatrix->setKernelUnitLength(FloatPoint(kernelUnitLengthX(), kernelUnitLengthY()));
 213 return convolveMatrix->setKernelUnitLength(GraphicsPoint(kernelUnitLengthX(), kernelUnitLengthY()));
214214 if (attrName == SVGNames::preserveAlphaAttr)
215215 return convolveMatrix->setPreserveAlpha(preserveAlpha());
216216

307307 RefPtr<FilterEffect> effect = FEConvolveMatrix::create(filter,
308308 IntSize(orderXValue, orderYValue), divisorValue,
309309 bias(), IntPoint(targetXValue, targetYValue), edgeMode(),
310  FloatPoint(kernelUnitLengthX(), kernelUnitLengthX()), preserveAlpha(), kernelMatrix);
 310 GraphicsPoint(kernelUnitLengthX(), kernelUnitLengthX()), preserveAlpha(), kernelMatrix);
311311 effect->inputEffects().append(input1);
312312 return effect.release();
313313}
90929

Source/WebCore/svg/SVGAnimatedType.cpp

2222#if ENABLE(SVG) && ENABLE(SVG_ANIMATION)
2323#include "SVGAnimatedType.h"
2424
25 #include "FloatRect.h"
 25#include "GraphicsRect.h"
2626#include "SVGAngle.h"
2727#include "SVGColor.h"
2828#include "SVGLength.h"

189189 return animatedType.release();
190190}
191191
192 PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createRect(FloatRect* rect)
 192PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createRect(GraphicsRect* rect)
193193{
194194 ASSERT(rect);
195195 OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(AnimatedRect));

277277 return *m_data.preserveAspectRatio;
278278}
279279
280 FloatRect& SVGAnimatedType::rect()
 280GraphicsRect& SVGAnimatedType::rect()
281281{
282282 ASSERT(m_type == AnimatedRect);
283283 return *m_data.rect;
90929

Source/WebCore/svg/SVGPathSegListBuilder.h

2525#define SVGPathSegListBuilder_h
2626
2727#if ENABLE(SVG)
28 #include "FloatPoint.h"
 28#include "GraphicsPoint.h"
2929#include "SVGPathConsumer.h"
3030#include "SVGPathElement.h"
3131#include "SVGPathSegList.h"

5151 }
5252
5353 // Used in UnalteredParisng/NormalizedParsing modes.
54  virtual void moveTo(const FloatPoint&, bool closed, PathCoordinateMode);
55  virtual void lineTo(const FloatPoint&, PathCoordinateMode);
56  virtual void curveToCubic(const FloatPoint&, const FloatPoint&, const FloatPoint&, PathCoordinateMode);
 54 virtual void moveTo(const GraphicsPoint&, bool closed, PathCoordinateMode);
 55 virtual void lineTo(const GraphicsPoint&, PathCoordinateMode);
 56 virtual void curveToCubic(const GraphicsPoint&, const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
5757 virtual void closePath();
5858
5959 // Only used in UnalteredParsing mode.
6060 virtual void lineToHorizontal(float, PathCoordinateMode);
6161 virtual void lineToVertical(float, PathCoordinateMode);
62  virtual void curveToCubicSmooth(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
63  virtual void curveToQuadratic(const FloatPoint&, const FloatPoint&, PathCoordinateMode);
64  virtual void curveToQuadraticSmooth(const FloatPoint&, PathCoordinateMode);
65  virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const FloatPoint&, PathCoordinateMode);
 62 virtual void curveToCubicSmooth(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
 63 virtual void curveToQuadratic(const GraphicsPoint&, const GraphicsPoint&, PathCoordinateMode);
 64 virtual void curveToQuadraticSmooth(const GraphicsPoint&, PathCoordinateMode);
 65 virtual void arcTo(float, float, float, bool largeArcFlag, bool sweepFlag, const GraphicsPoint&, PathCoordinateMode);
6666
6767 SVGPathElement* m_pathElement;
6868 SVGPathSegList* m_pathSegList;
90929

Source/WebCore/svg/SVGUseElement.cpp

699699 document()->accessSVGExtensions()->reportError("Not allowed to use indirect reference in <clip-path>");
700700 else {
701701 static_cast<SVGStyledTransformableElement*>(n)->toClipPath(path);
702  path.translate(FloatSize(x().value(this), y().value(this)));
 702 path.translate(GraphicsSize(x().value(this), y().value(this)));
703703 path.transform(animatedLocalTransform());
704704 }
705705 }
90929

Source/WebCore/svg/PatternAttributes.h

5656 SVGLength y() const { return m_y; }
5757 SVGLength width() const { return m_width; }
5858 SVGLength height() const { return m_height; }
59  FloatRect viewBox() const { return m_viewBox; }
 59 GraphicsRect viewBox() const { return m_viewBox; }
6060 SVGPreserveAspectRatio preserveAspectRatio() const { return m_preserveAspectRatio; }
6161 bool boundingBoxMode() const { return m_boundingBoxMode; }
6262 bool boundingBoxModeContent() const { return m_boundingBoxModeContent; }

8787 m_heightSet = true;
8888 }
8989
90  void setViewBox(const FloatRect& value)
 90 void setViewBox(const GraphicsRect& value)
9191 {
9292 m_viewBox = value;
9393 m_viewBoxSet = true;

140140 SVGLength m_y;
141141 SVGLength m_width;
142142 SVGLength m_height;
143  FloatRect m_viewBox;
 143 GraphicsRect m_viewBox;
144144 SVGPreserveAspectRatio m_preserveAspectRatio;
145145 bool m_boundingBoxMode;
146146 bool m_boundingBoxModeContent;
90929

Source/WebCore/svg/SVGPathParser.cpp

4949
5050bool SVGPathParser::parseMoveToSegment()
5151{
52  FloatPoint targetPoint;
 52 GraphicsPoint targetPoint;
5353 if (!m_source->parseMoveToSegment(targetPoint))
5454 return false;
5555

6868
6969bool SVGPathParser::parseLineToSegment()
7070{
71  FloatPoint targetPoint;
 71 GraphicsPoint targetPoint;
7272 if (!m_source->parseLineToSegment(targetPoint))
7373 return false;
7474

119119
120120bool SVGPathParser::parseCurveToCubicSegment()
121121{
122  FloatPoint point1;
123  FloatPoint point2;
124  FloatPoint targetPoint;
 122 GraphicsPoint point1;
 123 GraphicsPoint point2;
 124 GraphicsPoint targetPoint;
125125 if (!m_source->parseCurveToCubicSegment(point1, point2, targetPoint))
126126 return false;
127127

142142
143143bool SVGPathParser::parseCurveToCubicSmoothSegment()
144144{
145  FloatPoint point2;
146  FloatPoint targetPoint;
 145 GraphicsPoint point2;
 146 GraphicsPoint targetPoint;
147147 if (!m_source->parseCurveToCubicSmoothSegment(point2, targetPoint))
148148 return false;
149149

154154 m_controlPoint = m_currentPoint;
155155
156156 if (m_pathParsingMode == NormalizedParsing) {
157  FloatPoint point1 = m_currentPoint;
 157 GraphicsPoint point1 = m_currentPoint;
158158 point1.scale(2, 2);
159159 point1.move(-m_controlPoint.x(), -m_controlPoint.y());
160160 if (m_mode == RelativeCoordinates) {

173173
174174bool SVGPathParser::parseCurveToQuadraticSegment()
175175{
176  FloatPoint point1;
177  FloatPoint targetPoint;
 176 GraphicsPoint point1;
 177 GraphicsPoint targetPoint;
178178 if (!m_source->parseCurveToQuadraticSegment(point1, targetPoint))
179179 return false;
180180
181181 if (m_pathParsingMode == NormalizedParsing) {
182182 m_controlPoint = point1;
183  FloatPoint point1 = m_currentPoint;
 183 GraphicsPoint point1 = m_currentPoint;
184184 point1.move(2 * m_controlPoint.x(), 2 * m_controlPoint.y());
185  FloatPoint point2(targetPoint.x() + 2 * m_controlPoint.x(), targetPoint.y() + 2 * m_controlPoint.y());
 185 GraphicsPoint point2(targetPoint.x() + 2 * m_controlPoint.x(), targetPoint.y() + 2 * m_controlPoint.y());
186186 if (m_mode == RelativeCoordinates) {
187187 point1.move(2 * m_currentPoint.x(), 2 * m_currentPoint.y());
188188 point2.move(3 * m_currentPoint.x(), 3 * m_currentPoint.y());

203203
204204bool SVGPathParser::parseCurveToQuadraticSmoothSegment()
205205{
206  FloatPoint targetPoint;
 206 GraphicsPoint targetPoint;
207207 if (!m_source->parseCurveToQuadraticSmoothSegment(targetPoint))
208208 return false;
209209

214214 m_controlPoint = m_currentPoint;
215215
216216 if (m_pathParsingMode == NormalizedParsing) {
217  FloatPoint cubicPoint = m_currentPoint;
 217 GraphicsPoint cubicPoint = m_currentPoint;
218218 cubicPoint.scale(2, 2);
219219 cubicPoint.move(-m_controlPoint.x(), -m_controlPoint.y());
220  FloatPoint point1(m_currentPoint.x() + 2 * cubicPoint.x(), m_currentPoint.y() + 2 * cubicPoint.y());
221  FloatPoint point2(targetPoint.x() + 2 * cubicPoint.x(), targetPoint.y() + 2 * cubicPoint.y());
 220 GraphicsPoint point1(m_currentPoint.x() + 2 * cubicPoint.x(), m_currentPoint.y() + 2 * cubicPoint.y());
 221 GraphicsPoint point2(targetPoint.x() + 2 * cubicPoint.x(), targetPoint.y() + 2 * cubicPoint.y());
222222 if (m_mode == RelativeCoordinates) {
223223 point2 += m_currentPoint;
224224 targetPoint += m_currentPoint;

242242 float angle;
243243 bool largeArc;
244244 bool sweep;
245  FloatPoint targetPoint;
 245 GraphicsPoint targetPoint;
246246 if (!m_source->parseArcToSegment(rx, ry, angle, largeArc, sweep, targetPoint))
247247 return false;
248248

263263 }
264264
265265 if (m_pathParsingMode == NormalizedParsing) {
266  FloatPoint point1 = m_currentPoint;
 266 GraphicsPoint point1 = m_currentPoint;
267267 if (m_mode == RelativeCoordinates)
268268 targetPoint += m_currentPoint;
269269 m_currentPoint = targetPoint;

280280
281281 m_pathParsingMode = pathParsingMode;
282282
283  m_controlPoint = FloatPoint();
284  m_currentPoint = FloatPoint();
285  m_subPathPoint = FloatPoint();
 283 m_controlPoint = GraphicsPoint();
 284 m_currentPoint = GraphicsPoint();
 285 m_subPathPoint = GraphicsPoint();
286286 m_closePath = true;
287287
288288 // Skip any leading spaces.

401401// This works by converting the SVG arc to "simple" beziers.
402402// Partly adapted from Niko's code in kdelibs/kdecore/svgicons.
403403// See also SVG implementation notes: http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter
404 bool SVGPathParser::decomposeArcToCubic(float angle, float rx, float ry, FloatPoint& point1, FloatPoint& point2, bool largeArcFlag, bool sweepFlag)
 404bool SVGPathParser::decomposeArcToCubic(float angle, float rx, float ry, GraphicsPoint& point1, GraphicsPoint& point2, bool largeArcFlag, bool sweepFlag)
405405{
406  FloatSize midPointDistance = point1 - point2;
 406 GraphicsSize midPointDistance = point1 - point2;
407407 midPointDistance.scale(0.5f);
408408
409409 AffineTransform pointTransform;
410410 pointTransform.rotate(-angle);
411411
412  FloatPoint transformedMidPoint = pointTransform.mapPoint(FloatPoint(midPointDistance.width(), midPointDistance.height()));
 412 GraphicsPoint transformedMidPoint = pointTransform.mapPoint(GraphicsPoint(midPointDistance.width(), midPointDistance.height()));
413413 float squareRx = rx * rx;
414414 float squareRy = ry * ry;
415415 float squareX = transformedMidPoint.x() * transformedMidPoint.x();

429429
430430 point1 = pointTransform.mapPoint(point1);
431431 point2 = pointTransform.mapPoint(point2);
432  FloatSize delta = point2 - point1;
 432 GraphicsSize delta = point2 - point1;
433433
434434 float d = delta.width() * delta.width() + delta.height() * delta.height();
435435 float scaleFactorSquared = std::max(1 / d - 0.25f, 0.f);

439439 scaleFactor = -scaleFactor;
440440
441441 delta.scale(scaleFactor);
442  FloatPoint centerPoint = FloatPoint(0.5f * (point1.x() + point2.x()) - delta.height(),
 442 GraphicsPoint centerPoint = GraphicsPoint(0.5f * (point1.x() + point2.x()) - delta.height(),
443443 0.5f * (point1.y() + point2.y()) + delta.width());
444444
445445 float theta1 = atan2f(point1.y() - centerPoint.y(), point1.x() - centerPoint.x());

470470 float sinEndTheta = sinf(endTheta);
471471 float cosEndTheta = cosf(endTheta);
472472
473  point1 = FloatPoint(cosStartTheta - t * sinStartTheta, sinStartTheta + t * cosStartTheta);
 473 point1 = GraphicsPoint(cosStartTheta - t * sinStartTheta, sinStartTheta + t * cosStartTheta);
474474 point1.move(centerPoint.x(), centerPoint.y());
475  FloatPoint targetPoint = FloatPoint(cosEndTheta, sinEndTheta);
 475 GraphicsPoint targetPoint = GraphicsPoint(cosEndTheta, sinEndTheta);
476476 targetPoint.move(centerPoint.x(), centerPoint.y());
477477 point2 = targetPoint;
478478 point2.move(t * sinEndTheta, -t * cosEndTheta);
90929

Source/WebCore/svg/SVGPathSegListSource.h

2121#define SVGPathSegListSource_h
2222
2323#if ENABLE(SVG)
24 #include "FloatPoint.h"
 24#include "GraphicsPoint.h"
2525#include "SVGPathSeg.h"
2626#include "SVGPathSegList.h"
2727#include "SVGPathSource.h"

4545 virtual bool parseSVGSegmentType(SVGPathSegType&);
4646 virtual SVGPathSegType nextCommand(SVGPathSegType);
4747
48  virtual bool parseMoveToSegment(FloatPoint&);
49  virtual bool parseLineToSegment(FloatPoint&);
 48 virtual bool parseMoveToSegment(GraphicsPoint&);
 49 virtual bool parseLineToSegment(GraphicsPoint&);
5050 virtual bool parseLineToHorizontalSegment(float&);
5151 virtual bool parseLineToVerticalSegment(float&);
52  virtual bool parseCurveToCubicSegment(FloatPoint&, FloatPoint&, FloatPoint&);
53  virtual bool parseCurveToCubicSmoothSegment(FloatPoint&, FloatPoint&);
54  virtual bool parseCurveToQuadraticSegment(FloatPoint&, FloatPoint&);
55  virtual bool parseCurveToQuadraticSmoothSegment(FloatPoint&);
56  virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, FloatPoint&);
 52 virtual bool parseCurveToCubicSegment(GraphicsPoint&, GraphicsPoint&, GraphicsPoint&);
 53 virtual bool parseCurveToCubicSmoothSegment(GraphicsPoint&, GraphicsPoint&);
 54 virtual bool parseCurveToQuadraticSegment(GraphicsPoint&, GraphicsPoint&);
 55 virtual bool parseCurveToQuadraticSmoothSegment(GraphicsPoint&);
 56 virtual bool parseArcToSegment(float&, float&, float&, bool&, bool&, GraphicsPoint&);
5757
5858 const SVGPathSegList& m_pathSegList;
5959 RefPtr<SVGPathSeg> m_segment;
90929

Source/WebCore/html/HTMLImageElement.cpp

365365 return 0;
366366
367367 // FIXME: This doesn't work correctly with transforms.
368  FloatPoint absPos = r->localToAbsolute();
 368 GraphicsPoint absPos = r->localToAbsolute();
369369 return absPos.x();
370370}
371371

376376 return 0;
377377
378378 // FIXME: This doesn't work correctly with transforms.
379  FloatPoint absPos = r->localToAbsolute();
 379 GraphicsPoint absPos = r->localToAbsolute();
380380 return absPos.y();
381381}
382382
90929

Source/WebCore/html/HTMLAreaElement.cpp

9999 return Path();
100100
101101 // FIXME: This doesn't work correctly with transforms.
102  FloatPoint absPos = obj->localToAbsolute();
 102 GraphicsPoint absPos = obj->localToAbsolute();
103103
104104 // Default should default to the size of the containing object.
105105 IntSize size = m_lastSize;

114114 p.transform(zoomTransform);
115115 }
116116
117  p.translate(absPos - FloatPoint());
 117 p.translate(absPos - GraphicsPoint());
118118 return p;
119119}
120120

147147 case Poly:
148148 if (m_coordsLen >= 6) {
149149 int numPoints = m_coordsLen / 2;
150  path.moveTo(FloatPoint(m_coords[0].calcMinValue(width), m_coords[1].calcMinValue(height)));
 150 path.moveTo(GraphicsPoint(m_coords[0].calcMinValue(width), m_coords[1].calcMinValue(height)));
151151 for (int i = 1; i < numPoints; ++i)
152  path.addLineTo(FloatPoint(m_coords[i * 2].calcMinValue(width), m_coords[i * 2 + 1].calcMinValue(height)));
 152 path.addLineTo(GraphicsPoint(m_coords[i * 2].calcMinValue(width), m_coords[i * 2 + 1].calcMinValue(height)));
153153 path.closeSubpath();
154154 }
155155 break;

157157 if (m_coordsLen >= 3) {
158158 Length radius = m_coords[2];
159159 int r = min(radius.calcMinValue(width), radius.calcMinValue(height));
160  path.addEllipse(FloatRect(m_coords[0].calcMinValue(width) - r, m_coords[1].calcMinValue(height) - r, 2 * r, 2 * r));
 160 path.addEllipse(GraphicsRect(m_coords[0].calcMinValue(width) - r, m_coords[1].calcMinValue(height) - r, 2 * r, 2 * r));
161161 }
162162 break;
163163 case Rect:

166166 int y0 = m_coords[1].calcMinValue(height);
167167 int x1 = m_coords[2].calcMinValue(width);
168168 int y1 = m_coords[3].calcMinValue(height);
169  path.addRect(FloatRect(x0, y0, x1 - x0, y1 - y0));
 169 path.addRect(GraphicsRect(x0, y0, x1 - x0, y1 - y0));
170170 }
171171 break;
172172 case Default:
173  path.addRect(FloatRect(0, 0, width, height));
 173 path.addRect(GraphicsRect(0, 0, width, height));
174174 break;
175175 case Unknown:
176176 break;
90929

Source/WebCore/html/HTMLAnchorElement.cpp

128128 return;
129129
130130 // FIXME: This should probably pass true for useTransforms.
131  FloatPoint absolutePosition = renderer->absoluteToLocal(FloatPoint(static_cast<MouseEvent*>(event)->pageX(), static_cast<MouseEvent*>(event)->pageY()));
 131 GraphicsPoint absolutePosition = renderer->absoluteToLocal(GraphicsPoint(static_cast<MouseEvent*>(event)->pageX(), static_cast<MouseEvent*>(event)->pageY()));
132132 int x = absolutePosition.x();
133133 int y = absolutePosition.y();
134134 url += "?";
90929

Source/WebCore/html/HTMLCanvasElement.cpp

203203 return 0;
204204}
205205
206 void HTMLCanvasElement::didDraw(const FloatRect& rect)
 206void HTMLCanvasElement::didDraw(const GraphicsRect& rect)
207207{
208208 m_copiedImage.clear(); // Clear our image snapshot if we have one.
209209
210210 if (RenderBox* ro = renderBox()) {
211  FloatRect destRect = ro->contentBoxRect();
212  FloatRect r = mapRect(rect, FloatRect(0, 0, size().width(), size().height()), destRect);
 211 GraphicsRect destRect = ro->contentBoxRect();
 212 GraphicsRect r = mapRect(rect, GraphicsRect(0, 0, size().width(), size().height()), destRect);
213213 r.intersect(destRect);
214214 if (r.isEmpty() || m_dirtyRect.contains(r))
215215 return;

265265void HTMLCanvasElement::paint(GraphicsContext* context, const IntRect& r, bool useLowQualityScale)
266266{
267267 // Clear the dirty rect
268  m_dirtyRect = FloatRect();
 268 m_dirtyRect = GraphicsRect();
269269
270270 if (context->paintingDisabled())
271271 return;

371371#endif
372372}
373373
374 IntRect HTMLCanvasElement::convertLogicalToDevice(const FloatRect& logicalRect) const
 374IntRect HTMLCanvasElement::convertLogicalToDevice(const GraphicsRect& logicalRect) const
375375{
376376 // Prevent under/overflow by ensuring the rect's bounds stay within integer-expressible range
377377 int left = clampToInteger(floorf(logicalRect.x() * m_pageScaleFactor));

382382 return IntRect(IntPoint(left, top), convertToValidDeviceSize(right - left, bottom - top));
383383}
384384
385 IntSize HTMLCanvasElement::convertLogicalToDevice(const FloatSize& logicalSize) const
 385IntSize HTMLCanvasElement::convertLogicalToDevice(const GraphicsSize& logicalSize) const
386386{
387387 // Prevent overflow by ensuring the rect's bounds stay within integer-expressible range
388388 float width = clampToInteger(ceilf(logicalSize.width() * m_pageScaleFactor));

422422
423423 m_hasCreatedImageBuffer = true;
424424
425  FloatSize unscaledSize(width(), height());
 425 GraphicsSize unscaledSize(width(), height());
426426 IntSize size = convertLogicalToDevice(unscaledSize);
427427 if (!size.width() || !size.height())
428428 return;

439439 // where ImageBuffer::create() returns 0, however we could still be low on memory.
440440 if (!m_imageBuffer)
441441 return;
442  m_imageBuffer->context()->scale(FloatSize(size.width() / unscaledSize.width(), size.height() / unscaledSize.height()));
 442 m_imageBuffer->context()->scale(GraphicsSize(size.width() / unscaledSize.width(), size.height() / unscaledSize.height()));
443443 m_imageBuffer->context()->setShadowsIgnoreTransforms(true);
444444 m_imageBuffer->context()->setImageInterpolationQuality(DefaultInterpolationQuality);
445445

487487AffineTransform HTMLCanvasElement::baseTransform() const
488488{
489489 ASSERT(m_hasCreatedImageBuffer);
490  FloatSize unscaledSize(width(), height());
 490 GraphicsSize unscaledSize(width(), height());
491491 IntSize size = convertLogicalToDevice(unscaledSize);
492492 AffineTransform transform;
493493 if (size.width() && size.height())
90929

Source/WebCore/html/HTMLCanvasElement.h

2828#ifndef HTMLCanvasElement_h
2929#define HTMLCanvasElement_h
3030
31 #include "FloatRect.h"
 31#include "GraphicsRect.h"
3232#include "HTMLElement.h"
3333#include "IntSize.h"
3434

5555public:
5656 virtual ~CanvasObserver() { }
5757
58  virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect) = 0;
 58 virtual void canvasChanged(HTMLCanvasElement*, const GraphicsRect& changedRect) = 0;
5959 virtual void canvasResized(HTMLCanvasElement*) = 0;
6060 virtual void canvasDestroyed(HTMLCanvasElement*) = 0;
6161};

9595 String toDataURL(const String& mimeType, ExceptionCode& ec) { return toDataURL(mimeType, 0, ec); }
9696
9797 // Used for rendering
98  void didDraw(const FloatRect&);
 98 void didDraw(const GraphicsRect&);
9999
100100 void paint(GraphicsContext*, const IntRect&, bool useLowQualityScale = false);
101101

111111 void makePresentationCopy();
112112 void clearPresentationCopy();
113113
114  IntRect convertLogicalToDevice(const FloatRect&) const;
115  IntSize convertLogicalToDevice(const FloatSize&) const;
 114 IntRect convertLogicalToDevice(const GraphicsRect&) const;
 115 IntSize convertLogicalToDevice(const GraphicsSize&) const;
116116 IntSize convertToValidDeviceSize(float width, float height) const;
117117
118118 SecurityOrigin* securityOrigin() const;

151151 bool m_rendererIsCanvas;
152152
153153 bool m_ignoreReset;
154  FloatRect m_dirtyRect;
 154 GraphicsRect m_dirtyRect;
155155
156156 float m_pageScaleFactor;
157157 bool m_originClean;
90929

Source/WebCore/html/shadow/SliderThumbElement.h

3232#ifndef SliderThumbElement_h
3333#define SliderThumbElement_h
3434
35 #include "FloatPoint.h"
 35#include "GraphicsPoint.h"
3636#include "HTMLDivElement.h"
3737#include "HTMLNames.h"
3838#include "RenderStyleConstants.h"

4343class HTMLElement;
4444class HTMLInputElement;
4545class Event;
46 class FloatPoint;
 46class GraphicsPoint;
4747
4848class SliderThumbElement : public HTMLDivElement {
4949public:
90929

Source/WebCore/html/canvas/WebGLRenderingContext.cpp

505505 else {
506506#endif
507507 if (!m_markedCanvasDirty)
508  canvas()->didDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
 508 canvas()->didDraw(GraphicsRect(0, 0, canvas()->width(), canvas()->height()));
509509#if USE(ACCELERATED_COMPOSITING)
510510 }
511511#endif
90929

Source/WebCore/html/canvas/CanvasGradient.h

3838
3939 class CanvasGradient : public RefCounted<CanvasGradient> {
4040 public:
41  static PassRefPtr<CanvasGradient> create(const FloatPoint& p0, const FloatPoint& p1)
 41 static PassRefPtr<CanvasGradient> create(const GraphicsPoint& p0, const GraphicsPoint& p1)
4242 {
4343 return adoptRef(new CanvasGradient(p0, p1));
4444 }
45  static PassRefPtr<CanvasGradient> create(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
 45 static PassRefPtr<CanvasGradient> create(const GraphicsPoint& p0, float r0, const GraphicsPoint& p1, float r1)
4646 {
4747 return adoptRef(new CanvasGradient(p0, r0, p1, r1));
4848 }

5858#endif
5959
6060 private:
61  CanvasGradient(const FloatPoint& p0, const FloatPoint& p1);
62  CanvasGradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1);
 61 CanvasGradient(const GraphicsPoint& p0, const GraphicsPoint& p1);
 62 CanvasGradient(const GraphicsPoint& p0, float r0, const GraphicsPoint& p1, float r1);
6363
6464 RefPtr<Gradient> m_gradient;
6565 bool m_dashbardCompatibilityMode;
90929

Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

345345void CanvasRenderingContext2D::setAllAttributesToDefault()
346346{
347347 state().m_globalAlpha = 1;
348  state().m_shadowOffset = FloatSize();
 348 state().m_shadowOffset = GraphicsSize();
349349 state().m_shadowBlur = 0;
350350 state().m_shadowColor = Color::transparent;
351351 state().m_globalComposite = CompositeSourceOver;

354354 if (!context)
355355 return;
356356
357  context->setLegacyShadow(FloatSize(), 0, Color::transparent, ColorSpaceDeviceRGB);
 357 context->setLegacyShadow(GraphicsSize(), 0, Color::transparent, ColorSpaceDeviceRGB);
358358 context->setAlpha(1);
359359 context->setCompositeOperation(CompositeSourceOver);
360360}

591591 }
592592
593593 state().m_transform = newTransform;
594  c->scale(FloatSize(sx, sy));
 594 c->scale(GraphicsSize(sx, sy));
595595 m_path.transform(AffineTransform().scaleNonUniform(1.0 / sx, 1.0 / sy));
596596}
597597

777777 if (m_path.isEmpty())
778778 return;
779779
780  FloatRect boundRect = m_path.boundingRect();
 780 GraphicsRect boundRect = m_path.boundingRect();
781781 if (boundRect.width() || boundRect.height())
782782 m_path.closeSubpath();
783783}

788788 return;
789789 if (!state().m_invertibleCTM)
790790 return;
791  m_path.moveTo(FloatPoint(x, y));
 791 m_path.moveTo(GraphicsPoint(x, y));
792792}
793793
794794void CanvasRenderingContext2D::lineTo(float x, float y)

798798 if (!state().m_invertibleCTM)
799799 return;
800800
801  FloatPoint p1 = FloatPoint(x, y);
 801 GraphicsPoint p1 = GraphicsPoint(x, y);
802802 if (!m_path.hasCurrentPoint())
803803 m_path.moveTo(p1);
804804 else if (p1 != m_path.currentPoint())
805  m_path.addLineTo(FloatPoint(x, y));
 805 m_path.addLineTo(GraphicsPoint(x, y));
806806}
807807
808808void CanvasRenderingContext2D::quadraticCurveTo(float cpx, float cpy, float x, float y)

812812 if (!state().m_invertibleCTM)
813813 return;
814814 if (!m_path.hasCurrentPoint())
815  m_path.moveTo(FloatPoint(cpx, cpy));
 815 m_path.moveTo(GraphicsPoint(cpx, cpy));
816816
817  FloatPoint p1 = FloatPoint(x, y);
 817 GraphicsPoint p1 = GraphicsPoint(x, y);
818818 if (p1 != m_path.currentPoint())
819  m_path.addQuadCurveTo(FloatPoint(cpx, cpy), p1);
 819 m_path.addQuadCurveTo(GraphicsPoint(cpx, cpy), p1);
820820}
821821
822822void CanvasRenderingContext2D::bezierCurveTo(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)

826826 if (!state().m_invertibleCTM)
827827 return;
828828 if (!m_path.hasCurrentPoint())
829  m_path.moveTo(FloatPoint(cp1x, cp1y));
 829 m_path.moveTo(GraphicsPoint(cp1x, cp1y));
830830
831  FloatPoint p1 = FloatPoint(x, y);
 831 GraphicsPoint p1 = GraphicsPoint(x, y);
832832 if (p1 != m_path.currentPoint())
833  m_path.addBezierCurveTo(FloatPoint(cp1x, cp1y), FloatPoint(cp2x, cp2y), p1);
 833 m_path.addBezierCurveTo(GraphicsPoint(cp1x, cp1y), GraphicsPoint(cp2x, cp2y), p1);
834834}
835835
836836void CanvasRenderingContext2D::arcTo(float x1, float y1, float x2, float y2, float r, ExceptionCode& ec)

847847 if (!state().m_invertibleCTM)
848848 return;
849849
850  FloatPoint p1 = FloatPoint(x1, y1);
851  FloatPoint p2 = FloatPoint(x2, y2);
 850 GraphicsPoint p1 = GraphicsPoint(x1, y1);
 851 GraphicsPoint p2 = GraphicsPoint(x2, y2);
852852
853853 if (!m_path.hasCurrentPoint())
854854 m_path.moveTo(p1);

877877
878878 // If 'sa' and 'ea' differ by more than 2Pi, just add a circle starting/ending at 'sa'
879879 if (anticlockwise && sa - ea >= 2 * piFloat) {
880  m_path.addArc(FloatPoint(x, y), r, sa, sa - 2 * piFloat, anticlockwise);
 880 m_path.addArc(GraphicsPoint(x, y), r, sa, sa - 2 * piFloat, anticlockwise);
881881 return;
882882 }
883883 if (!anticlockwise && ea - sa >= 2 * piFloat) {
884  m_path.addArc(FloatPoint(x, y), r, sa, sa + 2 * piFloat, anticlockwise);
 884 m_path.addArc(GraphicsPoint(x, y), r, sa, sa + 2 * piFloat, anticlockwise);
885885 return;
886886 }
887887
888  m_path.addArc(FloatPoint(x, y), r, sa, ea, anticlockwise);
 888 m_path.addArc(GraphicsPoint(x, y), r, sa, ea, anticlockwise);
889889}
890890
891891static bool validateRectForCanvas(float& x, float& y, float& width, float& height)

918918 return;
919919
920920 if (!width && !height) {
921  m_path.moveTo(FloatPoint(x, y));
 921 m_path.moveTo(GraphicsPoint(x, y));
922922 return;
923923 }
924924
925  m_path.addRect(FloatRect(x, y, width, height));
 925 m_path.addRect(GraphicsRect(x, y, width, height));
926926}
927927
928928#if ENABLE(DASHBOARD_SUPPORT)

964964
965965 if (!m_path.isEmpty()) {
966966#if PLATFORM(QT)
967  FloatRect dirtyRect = m_path.platformPath().controlPointRect();
 967 GraphicsRect dirtyRect = m_path.platformPath().controlPointRect();
968968#else
969  FloatRect dirtyRect = m_path.boundingRect();
 969 GraphicsRect dirtyRect = m_path.boundingRect();
970970#endif
971971 // Fast approximation of the stroke's bounding rect.
972972 // This yields a slightly oversized rect but is very fast

10031003 if (!state().m_invertibleCTM)
10041004 return false;
10051005
1006  FloatPoint point(x, y);
 1006 GraphicsPoint point(x, y);
10071007 AffineTransform ctm = state().m_transform;
1008  FloatPoint transformedPoint = ctm.inverse().mapPoint(point);
 1008 GraphicsPoint transformedPoint = ctm.inverse().mapPoint(point);
10091009 if (!isfinite(transformedPoint.x()) || !isfinite(transformedPoint.y()))
10101010 return false;
10111011 return m_path.contains(transformedPoint);

10201020 return;
10211021 if (!state().m_invertibleCTM)
10221022 return;
1023  FloatRect rect(x, y, width, height);
 1023 GraphicsRect rect(x, y, width, height);
10241024
10251025 save();
10261026 setAllAttributesToDefault();

10471047 if (gradient && gradient->isZeroSize())
10481048 return;
10491049
1050  FloatRect rect(x, y, width, height);
 1050 GraphicsRect rect(x, y, width, height);
10511051
10521052 if (shouldDisplayTransparencyElsewhere())
10531053 displayTransparencyElsewhere<IntRect>(enclosingIntRect(rect));

10771077 if (!state().m_invertibleCTM)
10781078 return;
10791079
1080  FloatRect rect(x, y, width, height);
 1080 GraphicsRect rect(x, y, width, height);
10811081
1082  FloatRect boundingRect = rect;
 1082 GraphicsRect boundingRect = rect;
10831083 boundingRect.inflate(lineWidth / 2);
10841084
10851085 c->strokeRect(rect, lineWidth);

11081108
11091109void CanvasRenderingContext2D::setShadow(float width, float height, float blur)
11101110{
1111  state().m_shadowOffset = FloatSize(width, height);
 1111 state().m_shadowOffset = GraphicsSize(width, height);
11121112 state().m_shadowBlur = blur;
11131113 state().m_shadowColor = Color::transparent;
11141114 applyShadow();

11191119 if (!parseColorOrCurrentColor(state().m_shadowColor, color, canvas()))
11201120 return;
11211121
1122  state().m_shadowOffset = FloatSize(width, height);
 1122 state().m_shadowOffset = GraphicsSize(width, height);
11231123 state().m_shadowBlur = blur;
11241124 applyShadow();
11251125}
11261126
11271127void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel)
11281128{
1129  state().m_shadowOffset = FloatSize(width, height);
 1129 state().m_shadowOffset = GraphicsSize(width, height);
11301130 state().m_shadowBlur = blur;
11311131 state().m_shadowColor = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, 1.0f);
11321132

11341134 if (!c)
11351135 return;
11361136
1137  c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
 1137 c->setLegacyShadow(GraphicsSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
11381138}
11391139
11401140void CanvasRenderingContext2D::setShadow(float width, float height, float blur, const String& color, float alpha)

11451145 return;
11461146
11471147 state().m_shadowColor = colorWithOverrideAlpha(rgba, alpha);
1148  state().m_shadowOffset = FloatSize(width, height);
 1148 state().m_shadowOffset = GraphicsSize(width, height);
11491149 state().m_shadowBlur = blur;
11501150
11511151 GraphicsContext* c = drawingContext();
11521152 if (!c)
11531153 return;
11541154
1155  c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
 1155 c->setLegacyShadow(GraphicsSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
11561156}
11571157
11581158void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float grayLevel, float alpha)
11591159{
1160  state().m_shadowOffset = FloatSize(width, height);
 1160 state().m_shadowOffset = GraphicsSize(width, height);
11611161 state().m_shadowBlur = blur;
11621162 state().m_shadowColor = makeRGBA32FromFloats(grayLevel, grayLevel, grayLevel, alpha);
11631163

11651165 if (!c)
11661166 return;
11671167
1168  c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
 1168 c->setLegacyShadow(GraphicsSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
11691169}
11701170
11711171void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float r, float g, float b, float a)
11721172{
1173  state().m_shadowOffset = FloatSize(width, height);
 1173 state().m_shadowOffset = GraphicsSize(width, height);
11741174 state().m_shadowBlur = blur;
11751175 state().m_shadowColor = makeRGBA32FromFloats(r, g, b, a);
11761176

11781178 if (!c)
11791179 return;
11801180
1181  c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
 1181 c->setLegacyShadow(GraphicsSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
11821182}
11831183
11841184void CanvasRenderingContext2D::setShadow(float width, float height, float blur, float c, float m, float y, float k, float a)
11851185{
1186  state().m_shadowOffset = FloatSize(width, height);
 1186 state().m_shadowOffset = GraphicsSize(width, height);
11871187 state().m_shadowBlur = blur;
11881188 state().m_shadowColor = makeRGBAFromCMYKA(c, m, y, k, a);
11891189

11981198 CGContextSetShadowWithColor(dc->platformContext(), adjustedShadowSize(width, -height), blur, shadowColor);
11991199 CGColorRelease(shadowColor);
12001200#else
1201  dc->setLegacyShadow(FloatSize(width, -height), blur, state().m_shadowColor, ColorSpaceDeviceRGB);
 1201 dc->setLegacyShadow(GraphicsSize(width, -height), blur, state().m_shadowColor, ColorSpaceDeviceRGB);
12021202#endif
12031203}
12041204
12051205void CanvasRenderingContext2D::clearShadow()
12061206{
1207  state().m_shadowOffset = FloatSize();
 1207 state().m_shadowOffset = GraphicsSize();
12081208 state().m_shadowBlur = 0;
12091209 state().m_shadowColor = Color::transparent;
12101210 applyShadow();

12181218
12191219 float width = state().m_shadowOffset.width();
12201220 float height = state().m_shadowOffset.height();
1221  c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
 1221 c->setLegacyShadow(GraphicsSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
12221222}
12231223
12241224static IntSize size(HTMLImageElement* image)

12371237}
12381238#endif
12391239
1240 static inline FloatRect normalizeRect(const FloatRect& rect)
 1240static inline GraphicsRect normalizeRect(const GraphicsRect& rect)
12411241{
1242  return FloatRect(min(rect.x(), rect.maxX()),
 1242 return GraphicsRect(min(rect.x(), rect.maxX()),
12431243 min(rect.y(), rect.maxY()),
12441244 max(rect.width(), -rect.width()),
12451245 max(rect.height(), -rect.height()));

12631263 return;
12641264 }
12651265 IntSize s = size(image);
1266  drawImage(image, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
 1266 drawImage(image, GraphicsRect(0, 0, s.width(), s.height()), GraphicsRect(x, y, width, height), ec);
12671267}
12681268
12691269void CanvasRenderingContext2D::drawImage(HTMLImageElement* image,

12741274 ec = TYPE_MISMATCH_ERR;
12751275 return;
12761276 }
1277  drawImage(image, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec);
 1277 drawImage(image, GraphicsRect(sx, sy, sw, sh), GraphicsRect(dx, dy, dw, dh), ec);
12781278}
12791279
1280 void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode& ec)
 1280void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const GraphicsRect& srcRect, const GraphicsRect& dstRect, ExceptionCode& ec)
12811281{
12821282 drawImage(image, srcRect, dstRect, state().m_globalComposite, ec);
12831283}
12841284
1285 void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator& op, ExceptionCode& ec)
 1285void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const GraphicsRect& srcRect, const GraphicsRect& dstRect, const CompositeOperator& op, ExceptionCode& ec)
12861286{
12871287 if (!image) {
12881288 ec = TYPE_MISMATCH_ERR;

13011301 if (!image->complete())
13021302 return;
13031303
1304  FloatRect normalizedSrcRect = normalizeRect(srcRect);
1305  FloatRect normalizedDstRect = normalizeRect(dstRect);
 1304 GraphicsRect normalizedSrcRect = normalizeRect(srcRect);
 1305 GraphicsRect normalizedDstRect = normalizeRect(dstRect);
13061306
1307  FloatRect imageRect = FloatRect(FloatPoint(), size(image));
 1307 GraphicsRect imageRect = GraphicsRect(GraphicsPoint(), size(image));
13081308 if (!imageRect.contains(normalizedSrcRect) || !srcRect.width() || !srcRect.height()) {
13091309 ec = INDEX_SIZE_ERR;
13101310 return;

13421342 ec = TYPE_MISMATCH_ERR;
13431343 return;
13441344 }
1345  drawImage(canvas, FloatRect(0, 0, canvas->width(), canvas->height()), FloatRect(x, y, width, height), ec);
 1345 drawImage(canvas, GraphicsRect(0, 0, canvas->width(), canvas->height()), GraphicsRect(x, y, width, height), ec);
13461346}
13471347
13481348void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* canvas,
13491349 float sx, float sy, float sw, float sh,
13501350 float dx, float dy, float dw, float dh, ExceptionCode& ec)
13511351{
1352  drawImage(canvas, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec);
 1352 drawImage(canvas, GraphicsRect(sx, sy, sw, sh), GraphicsRect(dx, dy, dw, dh), ec);
13531353}
13541354
1355 void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const FloatRect& srcRect,
1356  const FloatRect& dstRect, ExceptionCode& ec)
 1355void CanvasRenderingContext2D::drawImage(HTMLCanvasElement* sourceCanvas, const GraphicsRect& srcRect,
 1356 const GraphicsRect& dstRect, ExceptionCode& ec)
13571357{
13581358 if (!sourceCanvas) {
13591359 ec = TYPE_MISMATCH_ERR;
13601360 return;
13611361 }
13621362
1363  FloatRect srcCanvasRect = FloatRect(FloatPoint(), sourceCanvas->size());
 1363 GraphicsRect srcCanvasRect = GraphicsRect(GraphicsPoint(), sourceCanvas->size());
13641364
13651365 if (!srcCanvasRect.width() || !srcCanvasRect.height()) {
13661366 ec = INVALID_STATE_ERR;

14241424 return;
14251425 }
14261426 IntSize s = size(video);
1427  drawImage(video, FloatRect(0, 0, s.width(), s.height()), FloatRect(x, y, width, height), ec);
 1427 drawImage(video, GraphicsRect(0, 0, s.width(), s.height()), GraphicsRect(x, y, width, height), ec);
14281428}
14291429
14301430void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video,
14311431 float sx, float sy, float sw, float sh,
14321432 float dx, float dy, float dw, float dh, ExceptionCode& ec)
14331433{
1434  drawImage(video, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), ec);
 1434 drawImage(video, GraphicsRect(sx, sy, sw, sh), GraphicsRect(dx, dy, dw, dh), ec);
14351435}
14361436
1437 void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const FloatRect& srcRect, const FloatRect& dstRect,
 1437void CanvasRenderingContext2D::drawImage(HTMLVideoElement* video, const GraphicsRect& srcRect, const GraphicsRect& dstRect,
14381438 ExceptionCode& ec)
14391439{
14401440 if (!video) {

14471447 if (video->readyState() == HTMLMediaElement::HAVE_NOTHING || video->readyState() == HTMLMediaElement::HAVE_METADATA)
14481448 return;
14491449
1450  FloatRect videoRect = FloatRect(FloatPoint(), size(video));
 1450 GraphicsRect videoRect = GraphicsRect(GraphicsPoint(), size(video));
14511451 if (!videoRect.contains(normalizeRect(srcRect)) || !srcRect.width() || !srcRect.height()) {
14521452 ec = INDEX_SIZE_ERR;
14531453 return;

14671467 GraphicsContextStateSaver stateSaver(*c);
14681468 c->clip(dstRect);
14691469 c->translate(dstRect.x(), dstRect.y());
1470  c->scale(FloatSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
 1470 c->scale(GraphicsSize(dstRect.width() / srcRect.width(), dstRect.height() / srcRect.height()));
14711471 c->translate(-srcRect.x(), -srcRect.y());
14721472 video->paintCurrentFrameInContext(c, IntRect(IntPoint(), size(video)));
14731473 stateSaver.restore();

14851485 op = CompositeSourceOver;
14861486
14871487 ExceptionCode ec;
1488  drawImage(image, FloatRect(sx, sy, sw, sh), FloatRect(dx, dy, dw, dh), op, ec);
 1488 drawImage(image, GraphicsRect(sx, sy, sw, sh), GraphicsRect(dx, dy, dw, dh), op, ec);
14891489}
14901490
14911491void CanvasRenderingContext2D::setAlpha(float alpha)

15111511{
15121512 ASSERT(shouldDisplayTransparencyElsewhere());
15131513
1514  FloatRect canvasRect(0, 0, canvas()->width(), canvas()->height());
 1514 GraphicsRect canvasRect(0, 0, canvas()->width(), canvas()->height());
15151515 canvasRect = state().m_transform.inverse().mapRect(canvasRect);
15161516
15171517 GraphicsContext* c = drawingContext();

15391539 return 0;
15401540 }
15411541
1542  RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0), FloatPoint(x1, y1));
 1542 RefPtr<CanvasGradient> gradient = CanvasGradient::create(GraphicsPoint(x0, y0), GraphicsPoint(x1, y1));
15431543 prepareGradientForDashboard(gradient.get());
15441544 return gradient.release();
15451545}

15561556 return 0;
15571557 }
15581558
1559  RefPtr<CanvasGradient> gradient = CanvasGradient::create(FloatPoint(x0, y0), r0, FloatPoint(x1, y1), r1);
 1559 RefPtr<CanvasGradient> gradient = CanvasGradient::create(GraphicsPoint(x0, y0), r0, GraphicsPoint(x1, y1), r1);
15601560 prepareGradientForDashboard(gradient.get());
15611561 return gradient.release();
15621562}

16051605 return CanvasPattern::create(canvas->copiedImage(), repeatX, repeatY, canvas->originClean());
16061606}
16071607
1608 void CanvasRenderingContext2D::didDraw(const FloatRect& r, unsigned options)
 1608void CanvasRenderingContext2D::didDraw(const GraphicsRect& r, unsigned options)
16091609{
16101610 GraphicsContext* c = drawingContext();
16111611 if (!c)

16131613 if (!state().m_invertibleCTM)
16141614 return;
16151615
1616  FloatRect dirtyRect = r;
 1616 GraphicsRect dirtyRect = r;
16171617 if (options & CanvasDidDrawApplyTransform) {
16181618 AffineTransform ctm = state().m_transform;
16191619 dirtyRect = ctm.mapRect(r);

16211621
16221622 if (options & CanvasDidDrawApplyShadow && alphaChannel(state().m_shadowColor)) {
16231623 // The shadow gets applied after transformation
1624  FloatRect shadowRect(dirtyRect);
 1624 GraphicsRect shadowRect(dirtyRect);
16251625 shadowRect.move(state().m_shadowOffset);
16261626 shadowRect.inflate(state().m_shadowBlur);
16271627 dirtyRect.unite(shadowRect);

16771677 return 0;
16781678 }
16791679
1680  FloatSize unscaledSize(fabs(sw), fabs(sh));
 1680 GraphicsSize unscaledSize(fabs(sw), fabs(sh));
16811681 IntSize scaledSize = canvas()->convertLogicalToDevice(unscaledSize);
16821682 if (scaledSize.width() < 1)
16831683 scaledSize.setWidth(1);

17151715 sh = -sh;
17161716 }
17171717
1718  FloatRect unscaledRect(sx, sy, sw, sh);
 1718 GraphicsRect unscaledRect(sx, sy, sw, sh);
17191719 IntRect scaledRect = canvas()->convertLogicalToDevice(unscaledRect);
17201720 if (scaledRect.width() < 1)
17211721 scaledRect.setWidth(1);

17671767 dirtyHeight = -dirtyHeight;
17681768 }
17691769
1770  FloatRect clipRect(dirtyX, dirtyY, dirtyWidth, dirtyHeight);
 1770 GraphicsRect clipRect(dirtyX, dirtyY, dirtyWidth, dirtyHeight);
17711771 clipRect.intersect(IntRect(0, 0, data->width(), data->height()));
17721772 IntSize destOffset(static_cast<int>(dx), static_cast<int>(dy));
17731773 IntRect destRect = enclosingIntRect(clipRect);

19131913 TextRun textRun(string, length, false, 0, 0, TextRun::AllowTrailingExpansion, direction, override, TextRun::NoRounding);
19141914
19151915 // Draw the item text at the correct point.
1916  FloatPoint location(x, y);
 1916 GraphicsPoint location(x, y);
19171917 switch (state().m_textBaseline) {
19181918 case TopTextBaseline:
19191919 case HangingTextBaseline:

19521952 }
19531953
19541954 // The slop built in to this mask rect matches the heuristic used in FontCGWin.cpp for GDI text.
1955  FloatRect textRect = FloatRect(location.x() - fontMetrics.height() / 2, location.y() - fontMetrics.ascent() - fontMetrics.lineGap(),
 1955 GraphicsRect textRect = GraphicsRect(location.x() - fontMetrics.height() / 2, location.y() - fontMetrics.ascent() - fontMetrics.lineGap(),
19561956 width + fontMetrics.height(), fontMetrics.lineSpacing());
19571957 if (!fill)
19581958 textRect.inflate(c->strokeThickness() / 2);

20062006 else {
20072007 // When stroking text, pointy miters can extend outside of textRect, so we
20082008 // punt and dirty the whole canvas.
2009  didDraw(FloatRect(0, 0, canvas()->width(), canvas()->height()));
 2009 didDraw(GraphicsRect(0, 0, canvas()->width(), canvas()->height()));
20102010 }
20112011
20122012#if PLATFORM(QT)
90929

Source/WebCore/html/canvas/CanvasGradient.cpp

3434
3535namespace WebCore {
3636
37 CanvasGradient::CanvasGradient(const FloatPoint& p0, const FloatPoint& p1)
 37CanvasGradient::CanvasGradient(const GraphicsPoint& p0, const GraphicsPoint& p1)
3838 : m_gradient(Gradient::create(p0, p1))
3939 , m_dashbardCompatibilityMode(false)
4040{
4141}
4242
43 CanvasGradient::CanvasGradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1)
 43CanvasGradient::CanvasGradient(const GraphicsPoint& p0, float r0, const GraphicsPoint& p1, float r1)
4444 : m_gradient(Gradient::create(p0, r0, p1, r1))
4545 , m_dashbardCompatibilityMode(false)
4646{
90929

Source/WebCore/html/canvas/CanvasRenderingContext2D.h

2929#include "AffineTransform.h"
3030#include "CanvasRenderingContext.h"
3131#include "Color.h"
32 #include "FloatSize.h"
 32#include "GraphicsSize.h"
3333#include "Font.h"
3434#include "GraphicsTypes.h"
3535#include "Path.h"

4646class CanvasGradient;
4747class CanvasPattern;
4848class CanvasStyle;
49 class FloatRect;
 49class GraphicsRect;
5050class GraphicsContext;
5151class HTMLCanvasElement;
5252class HTMLImageElement;

168168 void drawImage(HTMLImageElement*, float x, float y, ExceptionCode&);
169169 void drawImage(HTMLImageElement*, float x, float y, float width, float height, ExceptionCode&);
170170 void drawImage(HTMLImageElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
171  void drawImage(HTMLImageElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
 171 void drawImage(HTMLImageElement*, const GraphicsRect& srcRect, const GraphicsRect& dstRect, ExceptionCode&);
172172 void drawImage(HTMLCanvasElement*, float x, float y, ExceptionCode&);
173173 void drawImage(HTMLCanvasElement*, float x, float y, float width, float height, ExceptionCode&);
174174 void drawImage(HTMLCanvasElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
175  void drawImage(HTMLCanvasElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
176  void drawImage(HTMLImageElement*, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator&, ExceptionCode&);
 175 void drawImage(HTMLCanvasElement*, const GraphicsRect& srcRect, const GraphicsRect& dstRect, ExceptionCode&);
 176 void drawImage(HTMLImageElement*, const GraphicsRect& srcRect, const GraphicsRect& dstRect, const CompositeOperator&, ExceptionCode&);
177177#if ENABLE(VIDEO)
178178 void drawImage(HTMLVideoElement*, float x, float y, ExceptionCode&);
179179 void drawImage(HTMLVideoElement*, float x, float y, float width, float height, ExceptionCode&);
180180 void drawImage(HTMLVideoElement*, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh, ExceptionCode&);
181  void drawImage(HTMLVideoElement*, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode&);
 181 void drawImage(HTMLVideoElement*, const GraphicsRect& srcRect, const GraphicsRect& dstRect, ExceptionCode&);
182182#endif
183183
184184 void drawImageFromRect(HTMLImageElement*, float sx = 0, float sy = 0, float sw = 0, float sh = 0,

241241 LineCap m_lineCap;
242242 LineJoin m_lineJoin;
243243 float m_miterLimit;
244  FloatSize m_shadowOffset;
 244 GraphicsSize m_shadowOffset;
245245 float m_shadowBlur;
246246 RGBA32 m_shadowColor;
247247 float m_globalAlpha;

275275
276276 void applyShadow();
277277
278  void didDraw(const FloatRect&, unsigned options = CanvasDidDrawApplyAll);
 278 void didDraw(const GraphicsRect&, unsigned options = CanvasDidDrawApplyAll);
279279
280280 GraphicsContext* drawingContext() const;
281281
90929

Source/WebCore/inspector/InspectorFrontendClientLocal.cpp

3434#if ENABLE(INSPECTOR)
3535
3636#include "Chrome.h"
37 #include "FloatRect.h"
 37#include "GraphicsRect.h"
3838#include "Frame.h"
3939#include "FrameView.h"
4040#include "InspectorBackendDispatcher.h"

126126
127127void InspectorFrontendClientLocal::moveWindowBy(float x, float y)
128128{
129  FloatRect frameRect = m_frontendPage->chrome()->windowRect();
 129 GraphicsRect frameRect = m_frontendPage->chrome()->windowRect();
130130 frameRect.move(x, y);
131131 m_frontendPage->chrome()->setWindowRect(frameRect);
132132}
90929

Source/WebCore/inspector/DOMNodeHighlighter.cpp

4747
4848namespace {
4949
50 Path quadToPath(const FloatQuad& quad)
 50Path quadToPath(const GraphicsQuad& quad)
5151{
5252 Path quadPath;
5353 quadPath.moveTo(quad.p1());

5858 return quadPath;
5959}
6060
61 void drawOutlinedQuad(GraphicsContext& context, const FloatQuad& quad, const Color& fillColor)
 61void drawOutlinedQuad(GraphicsContext& context, const GraphicsQuad& quad, const Color& fillColor)
6262{
6363 static const int outlineThickness = 2;
6464 static const Color outlineColor(62, 86, 180, 228);

8383 context.fillPath(quadPath);
8484}
8585
86 void drawOutlinedQuadWithClip(GraphicsContext& context, const FloatQuad& quad, const FloatQuad& clipQuad, const Color& fillColor)
 86void drawOutlinedQuadWithClip(GraphicsContext& context, const GraphicsQuad& quad, const GraphicsQuad& clipQuad, const Color& fillColor)
8787{
8888 context.save();
8989 Path clipQuadPath = quadToPath(clipQuad);

9292 context.restore();
9393}
9494
95 void drawHighlightForBox(GraphicsContext& context, const FloatQuad& contentQuad, const FloatQuad& paddingQuad, const FloatQuad& borderQuad, const FloatQuad& marginQuad, DOMNodeHighlighter::HighlightMode mode)
 95void drawHighlightForBox(GraphicsContext& context, const GraphicsQuad& contentQuad, const GraphicsQuad& paddingQuad, const GraphicsQuad& borderQuad, const GraphicsQuad& marginQuad, DOMNodeHighlighter::HighlightMode mode)
9696{
9797 static const Color contentBoxColor(125, 173, 217, 128);
9898 static const Color paddingBoxColor(125, 173, 217, 160);
9999 static const Color borderBoxColor(125, 173, 217, 192);
100100 static const Color marginBoxColor(125, 173, 217, 228);
101101
102  FloatQuad clipQuad;
 102 GraphicsQuad clipQuad;
103103 if (mode == DOMNodeHighlighter::HighlightMargin || (mode == DOMNodeHighlighter::HighlightAll && marginQuad != borderQuad)) {
104104 drawOutlinedQuadWithClip(context, marginQuad, borderQuad, marginBoxColor);
105105 clipQuad = borderQuad;

118118 drawOutlinedQuadWithClip(context, clipQuad, clipQuad, contentBoxColor);
119119}
120120
121 void drawHighlightForLineBoxesOrSVGRenderer(GraphicsContext& context, const Vector<FloatQuad>& lineBoxQuads)
 121void drawHighlightForLineBoxesOrSVGRenderer(GraphicsContext& context, const Vector<GraphicsQuad>& lineBoxQuads)
122122{
123123 static const Color lineBoxColor(125, 173, 217, 128);
124124

132132 return mainFramePoint - IntPoint();
133133}
134134
135 void drawElementTitle(GraphicsContext& context, Node* node, const IntRect& boundingBox, const IntRect& anchorBox, const FloatRect& overlayRect, WebCore::Settings* settings)
 135void drawElementTitle(GraphicsContext& context, Node* node, const IntRect& boundingBox, const IntRect& anchorBox, const GraphicsRect& overlayRect, WebCore::Settings* settings)
136136{
137137 static const int rectInflatePx = 4;
138138 static const int fontHeightPx = 12;

239239 IntRect titleAnchorBox = boundingBox;
240240
241241 FrameView* view = containingFrame->page()->mainFrame()->view();
242  FloatRect overlayRect = view->visibleContentRect();
 242 GraphicsRect overlayRect = view->visibleContentRect();
243243 if (!overlayRect.contains(boundingBox) && !boundingBox.contains(enclosingIntRect(overlayRect)))
244244 overlayRect = view->visibleContentRect();
245245 context.translate(-overlayRect.x(), -overlayRect.y());

267267 borderBox.width() + renderBox->marginLeft() + renderBox->marginRight(), borderBox.height() + renderBox->marginTop() + renderBox->marginBottom());
268268
269269
270  FloatQuad absContentQuad = renderBox->localToAbsoluteQuad(FloatRect(contentBox));
271  FloatQuad absPaddingQuad = renderBox->localToAbsoluteQuad(FloatRect(paddingBox));
272  FloatQuad absBorderQuad = renderBox->localToAbsoluteQuad(FloatRect(borderBox));
273  FloatQuad absMarginQuad = renderBox->localToAbsoluteQuad(FloatRect(marginBox));
 270 GraphicsQuad absContentQuad = renderBox->localToAbsoluteQuad(GraphicsRect(contentBox));
 271 GraphicsQuad absPaddingQuad = renderBox->localToAbsoluteQuad(GraphicsRect(paddingBox));
 272 GraphicsQuad absBorderQuad = renderBox->localToAbsoluteQuad(GraphicsRect(borderBox));
 273 GraphicsQuad absMarginQuad = renderBox->localToAbsoluteQuad(GraphicsRect(marginBox));
274274
275275 absContentQuad.move(mainFrameOffset);
276276 absPaddingQuad.move(mainFrameOffset);

282282 drawHighlightForBox(context, absContentQuad, absPaddingQuad, absBorderQuad, absMarginQuad, mode);
283283 } else if (renderer->isRenderInline() || isSVGRenderer) {
284284 // FIXME: We should show margins/padding/border for inlines.
285  Vector<FloatQuad> lineBoxQuads;
 285 Vector<GraphicsQuad> lineBoxQuads;
286286 renderer->absoluteQuads(lineBoxQuads);
287287 for (unsigned i = 0; i < lineBoxQuads.size(); ++i)
288288 lineBoxQuads[i] += mainFrameOffset;
90929

Source/WebCore/CMakeLists.txt

10561056 platform/graphics/BitmapImage.cpp
10571057 platform/graphics/Color.cpp
10581058 platform/graphics/ContextShadow.cpp
1059  platform/graphics/FloatPoint.cpp
1060  platform/graphics/FloatPoint3D.cpp
1061  platform/graphics/FloatQuad.cpp
1062  platform/graphics/FloatRect.cpp
1063  platform/graphics/FloatSize.cpp
10641059 platform/graphics/Font.cpp
10651060 platform/graphics/FontCache.cpp
10661061 platform/graphics/FontData.cpp

10731068 platform/graphics/Gradient.cpp
10741069 platform/graphics/GraphicsContext.cpp
10751070 platform/graphics/GraphicsLayer.cpp
 1071 platform/graphics/GraphicsPoint.cpp
 1072 platform/graphics/GraphicsPoint3D.cpp
 1073 platform/graphics/GraphicsQuad.cpp
 1074 platform/graphics/GraphicsRect.cpp
 1075 platform/graphics/GraphicsSize.cpp
10761076 platform/graphics/GraphicsTypes.cpp
10771077 platform/graphics/Image.cpp
10781078 platform/graphics/ImageBuffer.cpp
90929

Source/WebCore/rendering/InlineTextBox.h

152152 bool containsCaretOffset(int offset) const; // false for offset after line break
153153
154154 // Needs to be public, so the static paintTextWithShadows() function can use it.
155  static FloatSize applyShadowToGraphicsContext(GraphicsContext*, const ShadowData*, const FloatRect& textRect, bool stroked, bool opaque, bool horizontal);
 155 static GraphicsSize applyShadowToGraphicsContext(GraphicsContext*, const ShadowData*, const GraphicsRect& textRect, bool stroked, bool opaque, bool horizontal);
156156
157157private:
158158 InlineTextBox* m_prevTextBox; // The previous box that also uses our RenderObject

165165 // denote no truncation (the whole run paints) and full truncation (nothing paints at all).
166166
167167protected:
168  void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, int startPos, int endPos);
169  void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, bool background);
170  void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin, const CompositionUnderline&);
 168 void paintCompositionBackground(GraphicsContext*, const GraphicsPoint& boxOrigin, RenderStyle*, const Font&, int startPos, int endPos);
 169 void paintDocumentMarkers(GraphicsContext*, const GraphicsPoint& boxOrigin, RenderStyle*, const Font&, bool background);
 170 void paintCompositionUnderline(GraphicsContext*, const GraphicsPoint& boxOrigin, const CompositionUnderline&);
171171#if PLATFORM(MAC)
172172 void paintCustomHighlight(const LayoutPoint&, const AtomicString& type);
173173#endif
174174
175175private:
176  void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, int decoration, const ShadowData*);
177  void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&);
178  void paintSpellingOrGrammarMarker(GraphicsContext*, const FloatPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&, bool grammar);
179  void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&);
 176 void paintDecoration(GraphicsContext*, const GraphicsPoint& boxOrigin, int decoration, const ShadowData*);
 177 void paintSelection(GraphicsContext*, const GraphicsPoint& boxOrigin, RenderStyle*, const Font&);
 178 void paintSpellingOrGrammarMarker(GraphicsContext*, const GraphicsPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&, bool grammar);
 179 void paintTextMatchMarker(GraphicsContext*, const GraphicsPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&);
180180 void computeRectForReplacementMarker(DocumentMarker*, RenderStyle*, const Font&);
181181
182182 TextRun::ExpansionBehavior expansionBehavior() const
90929

Source/WebCore/rendering/RenderBoxModelObject.h

182182
183183 void calculateBackgroundImageGeometry(const FillLayer*, const IntRect& paintRect, BackgroundImageGeometry&);
184184 void getBorderEdgeInfo(class BorderEdge[], bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
185  bool borderObscuresBackgroundEdge(const FloatSize& contextScale) const;
 185 bool borderObscuresBackgroundEdge(const GraphicsSize& contextScale) const;
186186
187187 bool shouldPaintAtLowQuality(GraphicsContext*, Image*, const void*, const IntSize&);
188188
90929

Source/WebCore/rendering/RenderObject.cpp

3434#include "CursorList.h"
3535#include "DashArray.h"
3636#include "EditingBoundary.h"
37 #include "FloatQuad.h"
 37#include "GraphicsQuad.h"
3838#include "Frame.h"
3939#include "FrameView.h"
4040#include "GraphicsContext.h"

869869 graphicsContext->setStrokeStyle(oldStrokeStyle);
870870 return;
871871 }
872  FloatPoint quad[4];
 872 GraphicsPoint quad[4];
873873 switch (side) {
874874 case BSTop:
875  quad[0] = FloatPoint(x1 + max(-adjacentWidth1, 0), y1);
876  quad[1] = FloatPoint(x1 + max(adjacentWidth1, 0), y2);
877  quad[2] = FloatPoint(x2 - max(adjacentWidth2, 0), y2);
878  quad[3] = FloatPoint(x2 - max(-adjacentWidth2, 0), y1);
 875 quad[0] = GraphicsPoint(x1 + max(-adjacentWidth1, 0), y1);
 876 quad[1] = GraphicsPoint(x1 + max(adjacentWidth1, 0), y2);
 877 quad[2] = GraphicsPoint(x2 - max(adjacentWidth2, 0), y2);
 878 quad[3] = GraphicsPoint(x2 - max(-adjacentWidth2, 0), y1);
879879 break;
880880 case BSBottom:
881  quad[0] = FloatPoint(x1 + max(adjacentWidth1, 0), y1);
882  quad[1] = FloatPoint(x1 + max(-adjacentWidth1, 0), y2);
883  quad[2] = FloatPoint(x2 - max(-adjacentWidth2, 0), y2);
884  quad[3] = FloatPoint(x2 - max(adjacentWidth2, 0), y1);
 881 quad[0] = GraphicsPoint(x1 + max(adjacentWidth1, 0), y1);
 882 quad[1] = GraphicsPoint(x1 + max(-adjacentWidth1, 0), y2);
 883 quad[2] = GraphicsPoint(x2 - max(-adjacentWidth2, 0), y2);
 884 quad[3] = GraphicsPoint(x2 - max(adjacentWidth2, 0), y1);
885885 break;
886886 case BSLeft:
887  quad[0] = FloatPoint(x1, y1 + max(-adjacentWidth1, 0));
888  quad[1] = FloatPoint(x1, y2 - max(-adjacentWidth2, 0));
889  quad[2] = FloatPoint(x2, y2 - max(adjacentWidth2, 0));
890  quad[3] = FloatPoint(x2, y1 + max(adjacentWidth1, 0));
 887 quad[0] = GraphicsPoint(x1, y1 + max(-adjacentWidth1, 0));
 888 quad[1] = GraphicsPoint(x1, y2 - max(-adjacentWidth2, 0));
 889 quad[2] = GraphicsPoint(x2, y2 - max(adjacentWidth2, 0));
 890 quad[3] = GraphicsPoint(x2, y1 + max(adjacentWidth1, 0));
891891 break;
892892 case BSRight:
893  quad[0] = FloatPoint(x1, y1 + max(adjacentWidth1, 0));
894  quad[1] = FloatPoint(x1, y2 - max(adjacentWidth2, 0));
895  quad[2] = FloatPoint(x2, y2 - max(-adjacentWidth2, 0));
896  quad[3] = FloatPoint(x2, y1 + max(-adjacentWidth1, 0));
 893 quad[0] = GraphicsPoint(x1, y1 + max(adjacentWidth1, 0));
 894 quad[1] = GraphicsPoint(x1, y2 - max(adjacentWidth2, 0));
 895 quad[2] = GraphicsPoint(x2, y2 - max(-adjacentWidth2, 0));
 896 quad[3] = GraphicsPoint(x2, y1 + max(-adjacentWidth1, 0));
897897 break;
898898 }
899899

10851085IntRect RenderObject::absoluteBoundingBoxRect(bool useTransforms)
10861086{
10871087 if (useTransforms) {
1088  Vector<FloatQuad> quads;
 1088 Vector<GraphicsQuad> quads;
10891089 absoluteQuads(quads);
10901090
10911091 size_t n = quads.size();

10981098 return result;
10991099 }
11001100
1101  FloatPoint absPos = localToAbsolute();
 1101 GraphicsPoint absPos = localToAbsolute();
11021102 Vector<IntRect> rects;
11031103 absoluteRects(rects, flooredLayoutPoint(absPos));
11041104

11121112 return result;
11131113}
11141114
1115 void RenderObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
 1115void RenderObject::absoluteFocusRingQuads(Vector<GraphicsQuad>& quads)
11161116{
11171117 Vector<IntRect> rects;
11181118 // FIXME: addFocusRingRects() needs to be passed this transform-unaware
11191119 // localToAbsolute() offset here because RenderInline::addFocusRingRects()
11201120 // implicitly assumes that. This doesn't work correctly with transformed
11211121 // descendants.
1122  FloatPoint absolutePoint = localToAbsolute();
 1122 GraphicsPoint absolutePoint = localToAbsolute();
11231123 addFocusRingRects(rects, flooredIntPoint(absolutePoint));
11241124 size_t count = rects.size();
11251125 for (size_t i = 0; i < count; ++i) {
11261126 IntRect rect = rects[i];
11271127 rect.move(-absolutePoint.x(), -absolutePoint.y());
1128  quads.append(localToAbsoluteQuad(FloatQuad(rect)));
 1128 quads.append(localToAbsoluteQuad(GraphicsQuad(rect)));
11291129 }
11301130}
11311131

18231823 return view()->viewRect();
18241824}
18251825
1826 FloatPoint RenderObject::localToAbsolute(const FloatPoint& localPoint, bool fixed, bool useTransforms) const
 1826GraphicsPoint RenderObject::localToAbsolute(const GraphicsPoint& localPoint, bool fixed, bool useTransforms) const
18271827{
18281828 TransformState transformState(TransformState::ApplyTransformDirection, localPoint);
18291829 mapLocalToContainer(0, fixed, useTransforms, transformState);

18321832 return transformState.lastPlanarPoint();
18331833}
18341834
1835 FloatPoint RenderObject::absoluteToLocal(const FloatPoint& containerPoint, bool fixed, bool useTransforms) const
 1835GraphicsPoint RenderObject::absoluteToLocal(const GraphicsPoint& containerPoint, bool fixed, bool useTransforms) const
18361836{
18371837 TransformState transformState(TransformState::UnapplyInverseTransformDirection, containerPoint);
18381838 mapAbsoluteToLocalPoint(fixed, useTransforms, transformState);

18991899 if (containerObject && containerObject->hasLayer() && containerObject->style()->hasPerspective()) {
19001900 // Perpsective on the container affects us, so we have to factor it in here.
19011901 ASSERT(containerObject->hasLayer());
1902  FloatPoint perspectiveOrigin = toRenderBoxModelObject(containerObject)->layer()->perspectiveOrigin();
 1902 GraphicsPoint perspectiveOrigin = toRenderBoxModelObject(containerObject)->layer()->perspectiveOrigin();
19031903
19041904 TransformationMatrix perspectiveMatrix;
19051905 perspectiveMatrix.applyPerspective(containerObject->style()->perspective());

19131913#endif
19141914}
19151915
1916 FloatQuad RenderObject::localToContainerQuad(const FloatQuad& localQuad, RenderBoxModelObject* repaintContainer, bool fixed) const
 1916GraphicsQuad RenderObject::localToContainerQuad(const GraphicsQuad& localQuad, RenderBoxModelObject* repaintContainer, bool fixed) const
19171917{
19181918 // Track the point at the center of the quad's bounding box. As mapLocalToContainer() calls offsetFromContainer(),
19191919 // it will use that point as the reference point to decide which column's transform to apply in multiple-column blocks.

23712371 region.clip.setWidth(0);
23722372 }
23732373
2374  FloatPoint absPos = localToAbsolute();
 2374 GraphicsPoint absPos = localToAbsolute();
23752375 region.bounds.setX(absPos.x() + styleRegion.offset.left().value());
23762376 region.bounds.setY(absPos.y() + styleRegion.offset.top().value());
23772377

25872587 renderer->setNeedsBoundariesUpdate();
25882588}
25892589
2590 FloatRect RenderObject::objectBoundingBox() const
 2590GraphicsRect RenderObject::objectBoundingBox() const
25912591{
25922592 ASSERT_NOT_REACHED();
2593  return FloatRect();
 2593 return GraphicsRect();
25942594}
25952595
2596 FloatRect RenderObject::strokeBoundingBox() const
 2596GraphicsRect RenderObject::strokeBoundingBox() const
25972597{
25982598 ASSERT_NOT_REACHED();
2599  return FloatRect();
 2599 return GraphicsRect();
26002600}
26012601
26022602// Returns the smallest rectangle enclosing all of the painted content
26032603// respecting clipping, masking, filters, opacity, stroke-width and markers
2604 FloatRect RenderObject::repaintRectInLocalCoordinates() const
 2604GraphicsRect RenderObject::repaintRectInLocalCoordinates() const
26052605{
26062606 ASSERT_NOT_REACHED();
2607  return FloatRect();
 2607 return GraphicsRect();
26082608}
26092609
26102610AffineTransform RenderObject::localTransform() const

26192619 return identity;
26202620}
26212621
2622 bool RenderObject::nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint&, HitTestAction)
 2622bool RenderObject::nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint&, HitTestAction)
26232623{
26242624 ASSERT_NOT_REACHED();
26252625 return false;
90929

Source/WebCore/rendering/RenderThemeMac.mm

545545 return result;
546546}
547547
548 FloatRect RenderThemeMac::convertToPaintingRect(const RenderObject* inputRenderer, const RenderObject* partRenderer, const FloatRect& inputRect, const IntRect& r) const
 548GraphicsRect RenderThemeMac::convertToPaintingRect(const RenderObject* inputRenderer, const RenderObject* partRenderer, const GraphicsRect& inputRect, const IntRect& r) const
549549{
550  FloatRect partRect(inputRect);
 550 GraphicsRect partRect(inputRect);
551551
552552 // Compute an offset between the part renderer and the input renderer
553  FloatSize offsetFromInputRenderer;
 553 GraphicsSize offsetFromInputRenderer;
554554 const RenderObject* renderer = partRenderer;
555555 while (renderer && renderer != inputRenderer) {
556556 RenderObject* containingRenderer = renderer->container();

793793 inflatedRect.setWidth(inflatedRect.width() / zoomLevel);
794794 inflatedRect.setHeight(inflatedRect.height() / zoomLevel);
795795 paintInfo.context->translate(inflatedRect.x(), inflatedRect.y());
796  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 796 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
797797 paintInfo.context->translate(-inflatedRect.x(), -inflatedRect.y());
798798 }
799799

954954
955955 if (!renderProgress->style()->isLeftToRightDirection()) {
956956 paintInfo.context->translate(2 * rect.x() + rect.width(), 0);
957  paintInfo.context->scale(FloatSize(-1, 1));
 957 paintInfo.context->scale(GraphicsSize(-1, 1));
958958 }
959959
960960 paintInfo.context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, rect.location());

10291029
10301030 CGColorSpaceRef cspace = deviceRGBColorSpaceRef();
10311031
1032  FloatRect topGradient(r.x(), r.y(), r.width(), r.height() / 2.0f);
 1032 GraphicsRect topGradient(r.x(), r.y(), r.width(), r.height() / 2.0f);
10331033 struct CGFunctionCallbacks topCallbacks = { 0, TopGradientInterpolate, NULL };
10341034 RetainPtr<CGFunctionRef> topFunction(AdoptCF, CGFunctionCreate(NULL, 1, NULL, 4, NULL, &topCallbacks));
10351035 RetainPtr<CGShadingRef> topShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(topGradient.x(), topGradient.y()), CGPointMake(topGradient.x(), topGradient.maxY()), topFunction.get(), false, false));
10361036
1037  FloatRect bottomGradient(r.x() + radius, r.y() + r.height() / 2.0f, r.width() - 2.0f * radius, r.height() / 2.0f);
 1037 GraphicsRect bottomGradient(r.x() + radius, r.y() + r.height() / 2.0f, r.width() - 2.0f * radius, r.height() / 2.0f);
10381038 struct CGFunctionCallbacks bottomCallbacks = { 0, BottomGradientInterpolate, NULL };
10391039 RetainPtr<CGFunctionRef> bottomFunction(AdoptCF, CGFunctionCreate(NULL, 1, NULL, 4, NULL, &bottomCallbacks));
10401040 RetainPtr<CGShadingRef> bottomShading(AdoptCF, CGShadingCreateAxial(cspace, CGPointMake(bottomGradient.x(), bottomGradient.y()), CGPointMake(bottomGradient.x(), bottomGradient.maxY()), bottomFunction.get(), false, false));

11061106 paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropertyColor), o->style()->colorSpace());
11071107 paintInfo.context->setStrokeStyle(NoStroke);
11081108
1109  FloatPoint arrow1[3];
1110  arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0f);
1111  arrow1[1] = FloatPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows / 2.0f);
1112  arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenArrows / 2.0f - arrowHeight);
 1109 GraphicsPoint arrow1[3];
 1110 arrow1[0] = GraphicsPoint(leftEdge, centerY - spaceBetweenArrows / 2.0f);
 1111 arrow1[1] = GraphicsPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows / 2.0f);
 1112 arrow1[2] = GraphicsPoint(leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenArrows / 2.0f - arrowHeight);
11131113
11141114 // Draw the top arrow
11151115 paintInfo.context->drawConvexPolygon(3, arrow1, true);
11161116
1117  FloatPoint arrow2[3];
1118  arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0f);
1119  arrow2[1] = FloatPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows / 2.0f);
1120  arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenArrows / 2.0f + arrowHeight);
 1117 GraphicsPoint arrow2[3];
 1118 arrow2[0] = GraphicsPoint(leftEdge, centerY + spaceBetweenArrows / 2.0f);
 1119 arrow2[1] = GraphicsPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows / 2.0f);
 1120 arrow2[2] = GraphicsPoint(leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenArrows / 2.0f + arrowHeight);
11211121
11221122 // Draw the bottom arrow
11231123 paintInfo.context->drawConvexPolygon(3, arrow2, true);

13411341 [sliderThumbCell stopTracking:NSPoint() at:NSPoint() inView:nil mouseIsUp:YES];
13421342 }
13431343
1344  FloatRect bounds = r;
 1344 GraphicsRect bounds = r;
13451345 // Make the height of the vertical slider slightly larger so NSSliderCell will draw a vertical slider.
13461346 if (o->style()->appearance() == SliderThumbVerticalPart)
13471347 bounds.setHeight(bounds.height() + verticalSliderHeightPadding * o->style()->effectiveZoom());

13491349 GraphicsContextStateSaver stateSaver(*paintInfo.context);
13501350 float zoomLevel = o->style()->effectiveZoom();
13511351
1352  FloatRect unzoomedRect = bounds;
 1352 GraphicsRect unzoomedRect = bounds;
13531353 if (zoomLevel != 1.0f) {
13541354 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
13551355 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
13561356 paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
1357  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 1357 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
13581358 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
13591359 }
13601360

13621362 // Workaround for <rdar://problem/9421781>.
13631363 if (!o->view()->frameView()->documentView()) {
13641364 paintInfo.context->translate(0, unzoomedRect.y());
1365  paintInfo.context->scale(FloatSize(1, -1));
 1365 paintInfo.context->scale(GraphicsSize(1, -1));
13661366 paintInfo.context->translate(0, -(unzoomedRect.y() + unzoomedRect.height()));
13671367 }
13681368#elif PLATFORM(CHROMIUM)
13691369 paintInfo.context->translate(0, unzoomedRect.y());
1370  paintInfo.context->scale(FloatSize(1, -1));
 1370 paintInfo.context->scale(GraphicsSize(1, -1));
13711371 paintInfo.context->translate(0, -(unzoomedRect.y() + unzoomedRect.height()));
13721372#endif
13731373

13941394 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
13951395 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
13961396 paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
1397  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 1397 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
13981398 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
13991399 }
14001400

14861486
14871487 float zoomLevel = o->style()->effectiveZoom();
14881488
1489  FloatRect localBounds = [search cancelButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
 1489 GraphicsRect localBounds = [search cancelButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
14901490
14911491#if ENABLE(INPUT_SPEECH)
14921492 // Take care of cases where the cancel button was not aligned with the right border of the input element (for e.g.

14991499
15001500 localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
15011501
1502  FloatRect unzoomedRect(localBounds);
 1502 GraphicsRect unzoomedRect(localBounds);
15031503 if (zoomLevel != 1.0f) {
15041504 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
15051505 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
15061506 paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
1507  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 1507 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
15081508 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
15091509 }
15101510

15711571
15721572 updateActiveState([search searchButtonCell], o);
15731573
1574  FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
 1574 GraphicsRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
15751575 localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
15761576
15771577 [[search searchButtonCell] drawWithFrame:localBounds inView:documentViewFor(o)];

16071607 GraphicsContextStateSaver stateSaver(*paintInfo.context);
16081608 float zoomLevel = o->style()->effectiveZoom();
16091609
1610  FloatRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
 1610 GraphicsRect localBounds = [search searchButtonRectForBounds:NSRect(input->renderBox()->borderBoxRect())];
16111611 localBounds = convertToPaintingRect(input->renderer(), o, localBounds, r);
16121612
16131613 IntRect unzoomedRect(localBounds);

16151615 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
16161616 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
16171617 paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
1618  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 1618 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
16191619 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
16201620 }
16211621

17111711}
17121712
17131713// Utility to scale when the UI part are not scaled by wkDrawMediaUIPart
1714 static FloatRect getUnzoomedRectAndAdjustCurrentContext(RenderObject* o, const PaintInfo& paintInfo, const IntRect &originalRect)
 1714static GraphicsRect getUnzoomedRectAndAdjustCurrentContext(RenderObject* o, const PaintInfo& paintInfo, const IntRect &originalRect)
17151715{
17161716 float zoomLevel = o->style()->effectiveZoom();
1717  FloatRect unzoomedRect(originalRect);
 1717 GraphicsRect unzoomedRect(originalRect);
17181718 if (zoomLevel != 1.0f && mediaControllerTheme() == MediaControllerThemeQuickTime) {
17191719 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
17201720 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
17211721 paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
1722  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 1722 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
17231723 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
17241724 }
17251725 return unzoomedRect;

18101810 ContextContainer cgContextContainer(paintInfo.context);
18111811 CGContextRef context = cgContextContainer.context();
18121812 GraphicsContextStateSaver stateSaver(*paintInfo.context);
1813  FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
 1813 GraphicsRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
18141814 wkDrawMediaSliderTrack(mediaControllerTheme(), context, unzoomedRect,
18151815 timeLoaded, currentTime, duration, getMediaUIPartStateFlags(node));
18161816 return false;

18841884
18851885 ContextContainer cgContextContainer(paintInfo.context);
18861886 GraphicsContextStateSaver stateSaver(*paintInfo.context);
1887  FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
 1887 GraphicsRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
18881888 wkDrawMediaUIPart(MediaCurrentTimeDisplay, mediaControllerTheme(), cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
18891889 return false;
18901890}

18971897
18981898 ContextContainer cgContextContainer(paintInfo.context);
18991899 GraphicsContextStateSaver stateSaver(*paintInfo.context);
1900  FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
 1900 GraphicsRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
19011901 wkDrawMediaUIPart(MediaTimeRemainingDisplay, mediaControllerTheme(), cgContextContainer.context(), unzoomedRect, getMediaUIPartStateFlags(node));
19021902 return false;
19031903}
90929

Source/WebCore/rendering/RenderTableCell.cpp

2626#include "RenderTableCell.h"
2727
2828#include "CollapsedBorderValue.h"
29 #include "FloatQuad.h"
 29#include "GraphicsQuad.h"
3030#include "GraphicsContext.h"
3131#include "HTMLNames.h"
3232#include "HTMLTableCellElement.h"
90929

Source/WebCore/rendering/RenderDetailsMarker.cpp

4444 return false;
4545}
4646
47 static Path createPath(const FloatPoint* path)
 47static Path createPath(const GraphicsPoint* path)
4848{
4949 Path result;
50  result.moveTo(FloatPoint(path[0].x(), path[0].y()));
 50 result.moveTo(GraphicsPoint(path[0].x(), path[0].y()));
5151 for (int i = 1; i < 4; ++i)
52  result.addLineTo(FloatPoint(path[i].x(), path[i].y()));
 52 result.addLineTo(GraphicsPoint(path[i].x(), path[i].y()));
5353 return result;
5454}
5555
5656static Path createDownArrowPath()
5757{
58  FloatPoint points[4] = { FloatPoint(0.0f, 0.07f), FloatPoint(0.5f, 0.93f), FloatPoint(1.0f, 0.07f), FloatPoint(0.0f, 0.07f) };
 58 GraphicsPoint points[4] = { GraphicsPoint(0.0f, 0.07f), GraphicsPoint(0.5f, 0.93f), GraphicsPoint(1.0f, 0.07f), GraphicsPoint(0.0f, 0.07f) };
5959 return createPath(points);
6060}
6161
6262static Path createUpArrowPath()
6363{
64  FloatPoint points[4] = { FloatPoint(0.0f, 0.93f), FloatPoint(0.5f, 0.07f), FloatPoint(1.0f, 0.93f), FloatPoint(0.0f, 0.93f) };
 64 GraphicsPoint points[4] = { GraphicsPoint(0.0f, 0.93f), GraphicsPoint(0.5f, 0.07f), GraphicsPoint(1.0f, 0.93f), GraphicsPoint(0.0f, 0.93f) };
6565 return createPath(points);
6666}
6767
6868static Path createLeftArrowPath()
6969{
70  FloatPoint points[4] = { FloatPoint(1.0f, 0.0f), FloatPoint(0.14f, 0.5f), FloatPoint(1.0f, 1.0f), FloatPoint(1.0f, 0.0f) };
 70 GraphicsPoint points[4] = { GraphicsPoint(1.0f, 0.0f), GraphicsPoint(0.14f, 0.5f), GraphicsPoint(1.0f, 1.0f), GraphicsPoint(1.0f, 0.0f) };
7171 return createPath(points);
7272}
7373
7474static Path createRightArrowPath()
7575{
76  FloatPoint points[4] = { FloatPoint(0.0f, 0.0f), FloatPoint(0.86f, 0.5f), FloatPoint(0.0f, 1.0f), FloatPoint(0.0f, 0.0f) };
 76 GraphicsPoint points[4] = { GraphicsPoint(0.0f, 0.0f), GraphicsPoint(0.86f, 0.5f), GraphicsPoint(0.0f, 1.0f), GraphicsPoint(0.0f, 0.0f) };
7777 return createPath(points);
7878}
7979

116116{
117117 Path result = getCanonicalPath();
118118 result.transform(AffineTransform().scale(logicalHeight()));
119  result.translate(FloatSize(origin.x(), origin.y()));
 119 result.translate(GraphicsSize(origin.x(), origin.y()));
120120 return result;
121121}
122122
90929

Source/WebCore/rendering/InlineBox.cpp

327327 parent()->clearKnownToHaveNoOverflow();
328328}
329329
330 FloatPoint InlineBox::locationIncludingFlipping()
 330GraphicsPoint InlineBox::locationIncludingFlipping()
331331{
332332 if (!renderer()->style()->isFlippedBlocksWritingMode())
333  return FloatPoint(x(), y());
 333 return GraphicsPoint(x(), y());
334334 RenderBlock* block = root()->block();
335335 if (block->style()->isHorizontalWritingMode())
336  return FloatPoint(x(), block->height() - height() - y());
 336 return GraphicsPoint(x(), block->height() - height() - y());
337337 else
338  return FloatPoint(block->width() - width() - x(), y());
 338 return GraphicsPoint(block->width() - width() - x(), y());
339339}
340340
341 void InlineBox::flipForWritingMode(FloatRect& rect)
 341void InlineBox::flipForWritingMode(GraphicsRect& rect)
342342{
343343 if (!renderer()->style()->isFlippedBlocksWritingMode())
344344 return;
345345 root()->block()->flipForWritingMode(rect);
346346}
347347
348 FloatPoint InlineBox::flipForWritingMode(const FloatPoint& point)
 348GraphicsPoint InlineBox::flipForWritingMode(const GraphicsPoint& point)
349349{
350350 if (!renderer()->style()->isFlippedBlocksWritingMode())
351351 return point;
90929

Source/WebCore/rendering/RenderBox.h

124124 // The content box in absolute coords. Ignores transforms.
125125 LayoutRect absoluteContentBox() const;
126126 // The content box converted to absolute coords (taking transforms into account).
127  FloatQuad absoluteContentQuad() const;
 127 GraphicsQuad absoluteContentQuad() const;
128128
129129 // Bounds of the outline box in absolute coords. Respects transforms
130130 virtual IntRect outlineBoundsForRepaint(RenderBoxModelObject* /*repaintContainer*/, IntPoint* cachedOffsetToRepaintContainer) const;

228228 virtual LayoutUnit collapsedMarginAfter() const { return marginAfter(); }
229229
230230 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset);
231  virtual void absoluteQuads(Vector<FloatQuad>&);
 231 virtual void absoluteQuads(Vector<GraphicsQuad>&);
232232
233233 IntRect reflectionBox() const;
234234 int reflectionOffset() const;

394394 LayoutPoint flipForWritingModeIncludingColumns(const LayoutPoint&) const;
395395 IntSize flipForWritingMode(const IntSize&) const;
396396 void flipForWritingMode(IntRect&) const;
397  FloatPoint flipForWritingMode(const FloatPoint&) const;
398  void flipForWritingMode(FloatRect&) const;
 397 GraphicsPoint flipForWritingMode(const GraphicsPoint&) const;
 398 void flipForWritingMode(GraphicsRect&) const;
399399 IntSize locationOffsetIncludingFlipping() const;
400400
401401 IntRect logicalVisualOverflowRectForPropagation(RenderStyle*) const;

406406 RenderOverflow* hasRenderOverflow() const { return m_overflow.get(); }
407407
408408 virtual bool needsPreferredWidthsRecalculation() const;
409  virtual void computeIntrinsicRatioInformation(FloatSize& /* intrinsicRatio */, bool& /* isPercentageIntrinsicSize */) const { }
 409 virtual void computeIntrinsicRatioInformation(GraphicsSize& /* intrinsicRatio */, bool& /* isPercentageIntrinsicSize */) const { }
410410
411411protected:
412412 virtual void willBeDestroyed();
90929

Source/WebCore/rendering/RenderFrameSet.cpp

692692 if (needsLayout())
693693 return false;
694694 if (evt->type() == eventNames().mousedownEvent && evt->button() == LeftButton) {
695  FloatPoint pos = localToAbsolute();
 695 GraphicsPoint pos = localToAbsolute();
696696 startResizing(m_cols, evt->absoluteLocation().x() - pos.x());
697697 startResizing(m_rows, evt->absoluteLocation().y() - pos.y());
698698 if (m_cols.m_splitBeingResized != noSplit || m_rows.m_splitBeingResized != noSplit) {

702702 }
703703 } else {
704704 if (evt->type() == eventNames().mousemoveEvent || (evt->type() == eventNames().mouseupEvent && evt->button() == LeftButton)) {
705  FloatPoint pos = localToAbsolute();
 705 GraphicsPoint pos = localToAbsolute();
706706 continueResizing(m_cols, evt->absoluteLocation().x() - pos.x());
707707 continueResizing(m_rows, evt->absoluteLocation().y() - pos.y());
708708 if (evt->type() == eventNames().mouseupEvent && evt->button() == LeftButton) {
90929

Source/WebCore/rendering/LayoutTypes.h

3636#ifndef LayoutTypes_h
3737#define LayoutTypes_h
3838
39 #include "FloatRect.h"
 39#include "GraphicsRect.h"
4040#include "IntRect.h"
4141
4242namespace WebCore {

4646typedef IntSize LayoutSize;
4747typedef IntRect LayoutRect;
4848
49 inline LayoutRect enclosingLayoutRect(const FloatRect& rect)
 49inline LayoutRect enclosingLayoutRect(const GraphicsRect& rect)
5050{
5151 return enclosingIntRect(rect);
5252}
5353
54 inline LayoutPoint roundedLayoutPoint(const FloatPoint& p)
 54inline LayoutPoint roundedLayoutPoint(const GraphicsPoint& p)
5555{
5656 return roundedIntPoint(p);
5757}
5858
59 inline LayoutPoint flooredLayoutPoint(const FloatPoint& p)
 59inline LayoutPoint flooredLayoutPoint(const GraphicsPoint& p)
6060{
6161 return flooredIntPoint(p);
6262}
6363
64 inline LayoutPoint flooredLayoutPoint(const FloatSize& s)
 64inline LayoutPoint flooredLayoutPoint(const GraphicsSize& s)
6565{
6666 return flooredIntPoint(s);
6767}
90929

Source/WebCore/rendering/RenderObject.h

2929#include "CachedResourceClient.h"
3030#include "Document.h"
3131#include "Element.h"
32 #include "FloatQuad.h"
 32#include "GraphicsQuad.h"
3333#include "LayoutTypes.h"
3434#include "PaintPhase.h"
3535#include "RenderObjectChildList.h"

372372 // since stroke-width is ignored (and marker size can depend on stroke-width).
373373 // objectBoundingBox is returned local coordinates.
374374 // The name objectBoundingBox is taken from the SVG 1.1 spec.
375  virtual FloatRect objectBoundingBox() const;
376  virtual FloatRect strokeBoundingBox() const;
 375 virtual GraphicsRect objectBoundingBox() const;
 376 virtual GraphicsRect strokeBoundingBox() const;
377377
378378 // Returns the smallest rectangle enclosing all of the painted content
379379 // respecting clipping, masking, filters, opacity, stroke-width and markers
380  virtual FloatRect repaintRectInLocalCoordinates() const;
 380 virtual GraphicsRect repaintRectInLocalCoordinates() const;
381381
382382 // This only returns the transform="" value from the element
383383 // most callsites want localToParentTransform() instead.

387387 // This includes any viewport transforms and x/y offsets as well as the transform="" value off the element.
388388 virtual const AffineTransform& localToParentTransform() const;
389389
390  // SVG uses FloatPoint precise hit testing, and passes the point in parent
 390 // SVG uses GraphicsPoint precise hit testing, and passes the point in parent
391391 // coordinates instead of in repaint container coordinates. Eventually the
392392 // rest of the rendering tree will move to a similar model.
393  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 393 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
394394#endif
395395
396396 bool isAnonymous() const { return m_isAnonymous; }

575575
576576 // Convert the given local point to absolute coordinates
577577 // FIXME: Temporary. If useTransforms is true, take transforms into account. Eventually localToAbsolute() will always be transform-aware.
578  FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), bool fixed = false, bool useTransforms = false) const;
579  FloatPoint absoluteToLocal(const FloatPoint&, bool fixed = false, bool useTransforms = false) const;
 578 GraphicsPoint localToAbsolute(const GraphicsPoint& localPoint = GraphicsPoint(), bool fixed = false, bool useTransforms = false) const;
 579 GraphicsPoint absoluteToLocal(const GraphicsPoint&, bool fixed = false, bool useTransforms = false) const;
580580
581581 // Convert a local quad to absolute coordinates, taking transforms into account.
582  FloatQuad localToAbsoluteQuad(const FloatQuad& quad, bool fixed = false) const
 582 GraphicsQuad localToAbsoluteQuad(const GraphicsQuad& quad, bool fixed = false) const
583583 {
584584 return localToContainerQuad(quad, 0, fixed);
585585 }
586586 // Convert a local quad into the coordinate system of container, taking transforms into account.
587  FloatQuad localToContainerQuad(const FloatQuad&, RenderBoxModelObject* repaintContainer, bool fixed = false) const;
 587 GraphicsQuad localToContainerQuad(const GraphicsQuad&, RenderBoxModelObject* repaintContainer, bool fixed = false) const;
588588
589589 // Return the offset from the container() renderer (excluding transforms). In multi-column layout,
590590 // different offsets apply at different points, so return the offset that applies to the given point.

597597 IntRect absoluteBoundingBoxRect(bool useTransforms = false);
598598
599599 // Build an array of quads in absolute coords for line boxes
600  virtual void absoluteQuads(Vector<FloatQuad>&) { }
 600 virtual void absoluteQuads(Vector<GraphicsQuad>&) { }
601601
602  void absoluteFocusRingQuads(Vector<FloatQuad>&);
 602 void absoluteFocusRingQuads(Vector<GraphicsQuad>&);
603603
604604 // the rect that will be painted if this object is passed as the paintingRoot
605605 LayoutRect paintingRootRect(LayoutRect& topLevelRect);

10791079 return adjustForAbsoluteZoom(value, renderer->style());
10801080}
10811081
1082 inline void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject* renderer)
 1082inline void adjustGraphicsQuadForAbsoluteZoom(GraphicsQuad& quad, RenderObject* renderer)
10831083{
10841084 float zoom = renderer->style()->effectiveZoom();
10851085 if (zoom != 1)
10861086 quad.scale(1 / zoom, 1 / zoom);
10871087}
10881088
1089 inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject* renderer)
 1089inline void adjustGraphicsRectForAbsoluteZoom(GraphicsRect& rect, RenderObject* renderer)
10901090{
10911091 float zoom = renderer->style()->effectiveZoom();
10921092 if (zoom != 1)
10931093 rect.scale(1 / zoom, 1 / zoom);
10941094}
10951095
1096 inline void adjustFloatQuadForPageScale(FloatQuad& quad, float pageScale)
 1096inline void adjustGraphicsQuadForPageScale(GraphicsQuad& quad, float pageScale)
10971097{
10981098 if (pageScale != 1)
10991099 quad.scale(1 / pageScale, 1 / pageScale);
11001100}
11011101
1102 inline void adjustFloatRectForPageScale(FloatRect& rect, float pageScale)
 1102inline void adjustGraphicsRectForPageScale(GraphicsRect& rect, float pageScale)
11031103{
11041104 if (pageScale != 1)
11051105 rect.scale(1 / pageScale, 1 / pageScale);
90929

Source/WebCore/rendering/RenderLayer.cpp

5252#include "Document.h"
5353#include "EventHandler.h"
5454#include "EventQueue.h"
55 #include "FloatPoint3D.h"
56 #include "FloatRect.h"
 55#include "GraphicsPoint3D.h"
 56#include "GraphicsRect.h"
5757#include "FocusController.h"
5858#include "Frame.h"
5959#include "FrameSelection.h"

742742 return t;
743743}
744744
745 FloatPoint RenderLayer::perspectiveOrigin() const
 745GraphicsPoint RenderLayer::perspectiveOrigin() const
746746{
747747 if (!renderer()->hasTransform())
748  return FloatPoint();
 748 return GraphicsPoint();
749749
750750 const IntRect borderBox = toRenderBox(renderer())->borderBoxRect();
751751 RenderStyle* style = renderer()->style();
752752
753  return FloatPoint(style->perspectiveOriginX().calcFloatValue(borderBox.width()),
 753 return GraphicsPoint(style->perspectiveOriginX().calcFloatValue(borderBox.width()),
754754 style->perspectiveOriginY().calcFloatValue(borderBox.height()));
755755}
756756

11241124 if (position == FixedPosition && (!ancestorLayer || ancestorLayer == renderer()->view()->layer())) {
11251125 // If the fixed layer's container is the root, just add in the offset of the view. We can obtain this by calling
11261126 // localToAbsolute() on the RenderView.
1127  FloatPoint absPos = renderer()->localToAbsolute(FloatPoint(), true);
 1127 GraphicsPoint absPos = renderer()->localToAbsolute(GraphicsPoint(), true);
11281128 location += flooredIntSize(absPos);
11291129 return;
11301130 }

13651365 // The caret rect needs to be invalidated after scrolling
13661366 frame->selection()->setCaretRectNeedsUpdate();
13671367
1368  FloatQuad quadForFakeMouseMoveEvent = FloatQuad(rectForRepaint);
 1368 GraphicsQuad quadForFakeMouseMoveEvent = GraphicsQuad(rectForRepaint);
13691369 if (repaintContainer)
13701370 quadForFakeMouseMoveEvent = repaintContainer->localToAbsoluteQuad(quadForFakeMouseMoveEvent);
13711371 frame->eventHandler()->dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseMoveEvent);

14011401 // This will prevent us from revealing text hidden by the slider in Safari RSS.
14021402 RenderBox* box = renderBox();
14031403 ASSERT(box);
1404  FloatPoint absPos = box->localToAbsolute();
 1404 GraphicsPoint absPos = box->localToAbsolute();
14051405 absPos.move(box->borderLeft(), box->borderTop());
14061406
14071407 IntRect layerBounds = IntRect(absPos.x() + scrollXOffset(), absPos.y() + scrollYOffset(), box->clientWidth(), box->clientHeight());

29042904 return 0;
29052905
29062906 // Flatten the point into the target plane
2907  FloatPoint targetPoint = transformState.mappedPoint();
 2907 GraphicsPoint targetPoint = transformState.mappedPoint();
29082908
29092909 // Now map the point back through the transform, which computes Z.
2910  FloatPoint3D backmappedPoint = transformState.m_accumulatedTransform.mapPoint(FloatPoint3D(targetPoint));
 2910 GraphicsPoint3D backmappedPoint = transformState.m_accumulatedTransform.mapPoint(GraphicsPoint3D(targetPoint));
29112911 return backmappedPoint.z();
29122912}
29132913

29242924 } else {
29252925 // If this is the first time we need to make transform state, then base it off of hitTestPoint,
29262926 // which is relative to rootLayer.
2927  transformState = HitTestingTransformState::create(hitTestPoint, FloatQuad(hitTestRect));
 2927 transformState = HitTestingTransformState::create(hitTestPoint, GraphicsQuad(hitTestRect));
29282928 convertToLayerCoords(rootLayer, offset);
29292929 }
29302930

34913491 RenderLayer* clippingRootLayer = clippingRoot();
34923492 IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
34933493 calculateRects(clippingRootLayer, renderView->documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
3494  return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(foregroundRect)).enclosingBoundingBox();
 3494 return clippingRootLayer->renderer()->localToAbsoluteQuad(GraphicsQuad(foregroundRect)).enclosingBoundingBox();
34953495}
34963496
34973497IntRect RenderLayer::selfClipRect() const

35003500 RenderLayer* clippingRootLayer = clippingRoot();
35013501 IntRect layerBounds, backgroundRect, foregroundRect, outlineRect;
35023502 calculateRects(clippingRootLayer, renderView->documentRect(), layerBounds, backgroundRect, foregroundRect, outlineRect);
3503  return clippingRootLayer->renderer()->localToAbsoluteQuad(FloatQuad(backgroundRect)).enclosingBoundingBox();
 3503 return clippingRootLayer->renderer()->localToAbsoluteQuad(GraphicsQuad(backgroundRect)).enclosingBoundingBox();
35043504}
35053505
35063506void RenderLayer::addBlockSelectionGapsBounds(const IntRect& bounds)
90929

Source/WebCore/rendering/InlineFlowBox.h

252252 void setLayoutOverflow(const LayoutRect&, LayoutUnit lineTop, LayoutUnit lineBottom);
253253 void setVisualOverflow(const LayoutRect&, LayoutUnit lineTop, LayoutUnit lineBottom);
254254
255  FloatRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
 255 GraphicsRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
256256 {
257257 if (isHorizontal())
258  return FloatRect(m_topLeft.x(), lineTop, width(), lineBottom - lineTop);
259  return FloatRect(lineTop, m_topLeft.y(), lineBottom - lineTop, height());
 258 return GraphicsRect(m_topLeft.x(), lineTop, width(), lineBottom - lineTop);
 259 return GraphicsRect(lineTop, m_topLeft.y(), lineBottom - lineTop, height());
260260 }
261261
262  FloatRect logicalFrameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
 262 GraphicsRect logicalFrameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
263263 {
264  return FloatRect(logicalLeft(), lineTop, logicalWidth(), lineBottom - lineTop);
 264 return GraphicsRect(logicalLeft(), lineTop, logicalWidth(), lineBottom - lineTop);
265265 }
266266
267267 bool descendantsHaveSameLineHeightAndBaseline() const { return m_descendantsHaveSameLineHeightAndBaseline; }
90929

Source/WebCore/rendering/RenderEmbeddedObject.h

6868
6969 void setMissingPluginIndicatorIsPressed(bool);
7070 bool isInMissingPluginIndicator(MouseEvent*);
71  bool getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, Path&, FloatRect& replacementTextRect, Font&, TextRun&, float& textWidth);
 71 bool getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, GraphicsRect& contentRect, Path&, GraphicsRect& replacementTextRect, Font&, TextRun&, float& textWidth);
7272
7373 String m_replacementText;
7474 bool m_hasFallbackContent; // FIXME: This belongs on HTMLObjectElement.
90929

Source/WebCore/rendering/mathml/RenderMathMLSquareRoot.cpp

108108
109109 width += topStartShift;
110110
111  FloatPoint topStart(adjustedPaintOffset.x() + frontWidth - topStartShift, adjustedPaintOffset.y());
112  FloatPoint bottomLeft(adjustedPaintOffset.x() + frontWidth * gRadicalBottomPointXPos , adjustedPaintOffset.y() + maxHeight + gRadicalBasePad);
113  FloatPoint topLeft(adjustedPaintOffset.x() + frontWidth * gRadicalTopLeftPointXPos , adjustedPaintOffset.y() + gRadicalTopLeftPointYPos * maxHeight);
114  FloatPoint leftEnd(adjustedPaintOffset.x() , topLeft.y() + gRadicalLeftEndYShift * style()->fontSize());
 111 GraphicsPoint topStart(adjustedPaintOffset.x() + frontWidth - topStartShift, adjustedPaintOffset.y());
 112 GraphicsPoint bottomLeft(adjustedPaintOffset.x() + frontWidth * gRadicalBottomPointXPos , adjustedPaintOffset.y() + maxHeight + gRadicalBasePad);
 113 GraphicsPoint topLeft(adjustedPaintOffset.x() + frontWidth * gRadicalTopLeftPointXPos , adjustedPaintOffset.y() + gRadicalTopLeftPointYPos * maxHeight);
 114 GraphicsPoint leftEnd(adjustedPaintOffset.x() , topLeft.y() + gRadicalLeftEndYShift * style()->fontSize());
115115
116116 GraphicsContextStateSaver stateSaver(*info.context);
117117

123123
124124 Path root;
125125
126  root.moveTo(FloatPoint(topStart.x() + width , adjustedPaintOffset.y()));
 126 root.moveTo(GraphicsPoint(topStart.x() + width , adjustedPaintOffset.y()));
127127 // draw top
128128 root.addLineTo(topStart);
129129 // draw from top left corner to bottom point of radical

143143 mask.moveTo(topStart);
144144 mask.addLineTo(bottomLeft);
145145 mask.addLineTo(topLeft);
146  mask.addLineTo(FloatPoint(2 * topLeft.x() - leftEnd.x(), 2 * topLeft.y() - leftEnd.y()));
 146 mask.addLineTo(GraphicsPoint(2 * topLeft.x() - leftEnd.x(), 2 * topLeft.y() - leftEnd.y()));
147147
148148 info.context->clip(mask);
149149
90929

Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

142142 LayoutUnit start = adjustedPaintOffset.x() + indexWidth + gRadicalLeftMargin + style()->paddingLeft().value() - rootPad;
143143 adjustedPaintOffset.setY(adjustedPaintOffset.y() + style()->paddingTop().value() - rootPad);
144144
145  FloatPoint topStart(start - topStartShift, paintOffset.y());
146  FloatPoint bottomLeft(start - gRadicalBottomPointXPos * frontWidth , adjustedPaintOffset.y() + maxHeight + gRadicalBasePad);
147  FloatPoint topLeft(start - gRadicalTopLeftPointXPos * frontWidth , adjustedPaintOffset.y() + gRadicalTopLeftPointYPos * maxHeight);
148  FloatPoint leftEnd(start - frontWidth , topLeft.y() + gRadicalLeftEndYShift * style()->fontSize());
 145 GraphicsPoint topStart(start - topStartShift, paintOffset.y());
 146 GraphicsPoint bottomLeft(start - gRadicalBottomPointXPos * frontWidth , adjustedPaintOffset.y() + maxHeight + gRadicalBasePad);
 147 GraphicsPoint topLeft(start - gRadicalTopLeftPointXPos * frontWidth , adjustedPaintOffset.y() + gRadicalTopLeftPointYPos * maxHeight);
 148 GraphicsPoint leftEnd(start - frontWidth , topLeft.y() + gRadicalLeftEndYShift * style()->fontSize());
149149
150150 GraphicsContextStateSaver stateSaver(*info.context);
151151

157157
158158 Path root;
159159
160  root.moveTo(FloatPoint(topStart.x() + width, adjustedPaintOffset.y()));
 160 root.moveTo(GraphicsPoint(topStart.x() + width, adjustedPaintOffset.y()));
161161 // draw top
162162 root.addLineTo(topStart);
163163 // draw from top left corner to bottom point of radical

177177 mask.moveTo(topStart);
178178 mask.addLineTo(bottomLeft);
179179 mask.addLineTo(topLeft);
180  mask.addLineTo(FloatPoint(2 * topLeft.x() - leftEnd.x(), 2 * topLeft.y() - leftEnd.y()));
 180 mask.addLineTo(GraphicsPoint(2 * topLeft.x() - leftEnd.x(), 2 * topLeft.y() - leftEnd.y()));
181181
182182 info.context->clip(mask);
183183
90929

Source/WebCore/rendering/RenderListMarker.cpp

17111711 if (clipToVisibleContent)
17121712 computeRectForRepaint(repaintContainer, rect);
17131713 else
1714  rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
 1714 rect = localToContainerQuad(GraphicsRect(rect), repaintContainer).enclosingBoundingBox();
17151715
17161716 return rect;
17171717}
90929

Source/WebCore/rendering/RenderImage.cpp

199199 if (rect) {
200200 // The image changed rect is in source image coordinates (pre-zooming),
201201 // so map from the bounds of the image to the contentsBox.
202  repaintRect = enclosingIntRect(mapRect(*rect, FloatRect(FloatPoint(), m_imageResource->imageSize(1.0f)), contentBoxRect()));
 202 repaintRect = enclosingIntRect(mapRect(*rect, GraphicsRect(GraphicsPoint(), m_imageResource->imageSize(1.0f)), contentBoxRect()));
203203 // Guard against too-large changed rects.
204204 repaintRect.intersect(contentBoxRect());
205205 } else
90929

Source/WebCore/rendering/RenderText.cpp

2727
2828#include "AXObjectCache.h"
2929#include "EllipsisBox.h"
30 #include "FloatQuad.h"
 30#include "GraphicsQuad.h"
3131#include "FontTranscoder.h"
3232#include "FrameView.h"
3333#include "InlineTextBox.h"

269269void RenderText::absoluteRects(Vector<LayoutRect>& rects, const LayoutPoint& accumulatedOffset)
270270{
271271 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox())
272  rects.append(enclosingLayoutRect(FloatRect(accumulatedOffset + box->topLeft(), box->size())));
 272 rects.append(enclosingLayoutRect(GraphicsRect(accumulatedOffset + box->topLeft(), box->size())));
273273}
274274
275275void RenderText::absoluteRectsForRange(Vector<IntRect>& rects, unsigned start, unsigned end, bool useSelectionHeight)

298298 r.setX(selectionRect.x());
299299 }
300300 }
301  rects.append(localToAbsoluteQuad(FloatQuad(r)).enclosingBoundingBox());
 301 rects.append(localToAbsoluteQuad(GraphicsQuad(r)).enclosingBoundingBox());
302302 } else {
303303 unsigned realEnd = min(box->end() + 1, end);
304304 IntRect r = box->selectionRect(start, realEnd);

313313 r.setX(box->x());
314314 }
315315 }
316  rects.append(localToAbsoluteQuad(FloatQuad(r)).enclosingBoundingBox());
 316 rects.append(localToAbsoluteQuad(GraphicsQuad(r)).enclosingBoundingBox());
317317 }
318318 }
319319 }

343343 return IntRect();
344344}
345345
346 void RenderText::absoluteQuads(Vector<FloatQuad>& quads, ClippingOption option)
 346void RenderText::absoluteQuads(Vector<GraphicsQuad>& quads, ClippingOption option)
347347{
348348 for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
349349 IntRect boundaries = box->calculateBoundaries();

356356 else
357357 boundaries.setHeight(ellipsisRect.maxY() - boundaries.y());
358358 }
359  quads.append(localToAbsoluteQuad(FloatRect(boundaries)));
 359 quads.append(localToAbsoluteQuad(GraphicsRect(boundaries)));
360360 }
361361}
362362
363 void RenderText::absoluteQuads(Vector<FloatQuad>& quads)
 363void RenderText::absoluteQuads(Vector<GraphicsQuad>& quads)
364364{
365365 absoluteQuads(quads, NoClipping);
366366}
367367
368 void RenderText::absoluteQuadsForRange(Vector<FloatQuad>& quads, unsigned start, unsigned end, bool useSelectionHeight)
 368void RenderText::absoluteQuadsForRange(Vector<GraphicsQuad>& quads, unsigned start, unsigned end, bool useSelectionHeight)
369369{
370370 // Work around signed/unsigned issues. This function takes unsigneds, and is often passed UINT_MAX
371371 // to mean "all the way to the end". InlineTextBox coordinates are unsigneds, so changing this

391391 r.setX(selectionRect.x());
392392 }
393393 }
394  quads.append(localToAbsoluteQuad(FloatRect(r)));
 394 quads.append(localToAbsoluteQuad(GraphicsRect(r)));
395395 } else {
396396 unsigned realEnd = min(box->end() + 1, end);
397397 IntRect r = box->selectionRect(start, realEnd);

406406 r.setX(box->x());
407407 }
408408 }
409  quads.append(localToAbsoluteQuad(FloatRect(r)));
 409 quads.append(localToAbsoluteQuad(GraphicsRect(r)));
410410 }
411411 }
412412 }

976976 return currPos >= (from + len);
977977}
978978
979 FloatPoint RenderText::firstRunOrigin() const
 979GraphicsPoint RenderText::firstRunOrigin() const
980980{
981981 return IntPoint(firstRunX(), firstRunY());
982982}

13331333 float y = isHorizontal ? firstTextBox()->y() : logicalLeftSide;
13341334 float width = isHorizontal ? logicalRightSide - logicalLeftSide : lastTextBox()->logicalBottom() - x;
13351335 float height = isHorizontal ? lastTextBox()->logicalBottom() - y : logicalRightSide - logicalLeftSide;
1336  result = enclosingIntRect(FloatRect(x, y, width, height));
 1336 result = enclosingIntRect(GraphicsRect(x, y, width, height));
13371337 }
13381338
13391339 return result;

14181418 if (cb->hasColumns())
14191419 cb->adjustRectForColumns(rect);
14201420
1421  rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
 1421 rect = localToContainerQuad(GraphicsRect(rect), repaintContainer).enclosingBoundingBox();
14221422 }
14231423
14241424 return rect;
90929

Source/WebCore/rendering/RenderCombineText.h

3030 RenderCombineText(Node*, PassRefPtr<StringImpl>);
3131
3232 void combineText();
33  void adjustTextOrigin(FloatPoint& textOrigin, const FloatRect& boxRect) const;
 33 void adjustTextOrigin(GraphicsPoint& textOrigin, const GraphicsRect& boxRect) const;
3434 void charactersToRender(int start, const UChar*& characters, int& length) const;
3535 bool isCombined() const { return m_isCombined; }
3636 float combinedTextWidth(const Font& font) const { return font.size(); }
90929

Source/WebCore/rendering/RenderTreeAsText.cpp

9494 return ts << "(" << p.x() << "," << p.y() << ")";
9595}
9696
97 TextStream& operator<<(TextStream& ts, const FloatPoint& p)
 97TextStream& operator<<(TextStream& ts, const GraphicsPoint& p)
9898{
9999 ts << "(";
100100 if (hasFractions(p.x()))

109109 return ts << ")";
110110}
111111
112 TextStream& operator<<(TextStream& ts, const FloatSize& s)
 112TextStream& operator<<(TextStream& ts, const GraphicsSize& s)
113113{
114114 ts << "width=";
115115 if (hasFractions(s.width()))
90929

Source/WebCore/rendering/InlineTextBox.cpp

195195 if (respectHyphen)
196196 endPos = textRun.length();
197197
198  IntRect r = enclosingIntRect(font.selectionRectForText(textRun, FloatPoint(logicalLeft(), selTop), selHeight, sPos, ePos));
 198 IntRect r = enclosingIntRect(font.selectionRectForText(textRun, GraphicsPoint(logicalLeft(), selTop), selHeight, sPos, ePos));
199199
200200 int logicalWidth = r.width();
201201 if (r.x() > logicalRight())

350350 if (isLineBreak())
351351 return false;
352352
353  FloatPoint boxOrigin = locationIncludingFlipping();
 353 GraphicsPoint boxOrigin = locationIncludingFlipping();
354354 boxOrigin.moveBy(accumulatedOffset);
355  FloatRect rect(boxOrigin, size());
 355 GraphicsRect rect(boxOrigin, size());
356356 if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(pointInContainer))) {
357357 renderer()->updateHitTestResult(result, flipForWritingMode(pointInContainer - toLayoutSize(accumulatedOffset)));
358358 if (!result.addNodeToRectBasedTestResult(renderer()->node(), pointInContainer, rect))

361361 return false;
362362}
363363
364 FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context, const ShadowData* shadow, const FloatRect& textRect, bool stroked, bool opaque, bool horizontal)
 364GraphicsSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context, const ShadowData* shadow, const GraphicsRect& textRect, bool stroked, bool opaque, bool horizontal)
365365{
366366 if (!shadow)
367  return FloatSize();
 367 return GraphicsSize();
368368
369  FloatSize extraOffset;
 369 GraphicsSize extraOffset;
370370 int shadowX = horizontal ? shadow->x() : shadow->y();
371371 int shadowY = horizontal ? shadow->y() : -shadow->x();
372  FloatSize shadowOffset(shadowX, shadowY);
 372 GraphicsSize shadowOffset(shadowX, shadowY);
373373 int shadowBlur = shadow->blur();
374374 const Color& shadowColor = shadow->color();
375375
376376 if (shadow->next() || stroked || !opaque) {
377  FloatRect shadowRect(textRect);
 377 GraphicsRect shadowRect(textRect);
378378 shadowRect.inflate(shadowBlur);
379379 shadowRect.move(shadowOffset);
380380 context->save();
381381 context->clip(shadowRect);
382382
383  extraOffset = FloatSize(0, 2 * textRect.height() + max(0.0f, shadowOffset.height()) + shadowBlur);
 383 extraOffset = GraphicsSize(0, 2 * textRect.height() + max<GraphicsUnit>(0.0f, shadowOffset.height()) + shadowBlur);
384384 shadowOffset -= extraOffset;
385385 }
386386

388388 return extraOffset;
389389}
390390
391 static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, const AtomicString& emphasisMark, int emphasisMarkOffset, int startOffset, int endOffset, int truncationPoint, const FloatPoint& textOrigin,
392  const FloatRect& boxRect, const ShadowData* shadow, bool stroked, bool horizontal)
 391static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, const AtomicString& emphasisMark, int emphasisMarkOffset, int startOffset, int endOffset, int truncationPoint, const GraphicsPoint& textOrigin,
 392 const GraphicsRect& boxRect, const ShadowData* shadow, bool stroked, bool horizontal)
393393{
394394 Color fillColor = context->fillColor();
395395 ColorSpace fillColorSpace = context->fillColorSpace();

460460
461461enum RotationDirection { Counterclockwise, Clockwise };
462462
463 static inline AffineTransform rotation(const FloatRect& boxRect, RotationDirection clockwise)
 463static inline AffineTransform rotation(const GraphicsRect& boxRect, RotationDirection clockwise)
464464{
465465 return clockwise ? AffineTransform(0, 1, -1, 0, boxRect.x() + boxRect.maxY(), boxRect.maxY() - boxRect.x())
466466 : AffineTransform(0, -1, 1, 0, boxRect.x() - boxRect.maxY(), boxRect.x() + boxRect.maxY());

519519
520520 adjustedPaintOffset.move(0, styleToUse->isHorizontalWritingMode() ? 0 : -logicalHeight());
521521
522  FloatPoint boxOrigin = locationIncludingFlipping();
 522 GraphicsPoint boxOrigin = locationIncludingFlipping();
523523 boxOrigin.move(adjustedPaintOffset.x(), adjustedPaintOffset.y());
524  FloatRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight()));
 524 GraphicsRect boxRect(boxOrigin, LayoutSize(logicalWidth(), logicalHeight()));
525525
526526 RenderCombineText* combinedText = styleToUse->hasTextCombine() && textRenderer()->isCombineText() && toRenderCombineText(textRenderer())->isCombined() ? toRenderCombineText(textRenderer()) : 0;
527527

536536 // Set our font.
537537 const Font& font = styleToUse->font();
538538
539  FloatPoint textOrigin = FloatPoint(boxOrigin.x(), boxOrigin.y() + font.fontMetrics().ascent());
 539 GraphicsPoint textOrigin = GraphicsPoint(boxOrigin.x(), boxOrigin.y() + font.fontMetrics().ascent());
540540
541541 if (combinedText)
542542 combinedText->adjustTextOrigin(textOrigin, boxRect);

691691
692692 DEFINE_STATIC_LOCAL(TextRun, objectReplacementCharacterTextRun, (&objectReplacementCharacter, 1));
693693 TextRun& emphasisMarkTextRun = combinedText ? objectReplacementCharacterTextRun : textRun;
694  FloatPoint emphasisMarkTextOrigin = combinedText ? FloatPoint(boxOrigin.x() + boxRect.width() / 2, boxOrigin.y() + font.fontMetrics().ascent()) : textOrigin;
 694 GraphicsPoint emphasisMarkTextOrigin = combinedText ? GraphicsPoint(boxOrigin.x() + boxRect.width() / 2, boxOrigin.y() + font.fontMetrics().ascent()) : textOrigin;
695695 if (combinedText)
696696 context->concatCTM(rotation(boxRect, Clockwise));
697697

717717
718718 DEFINE_STATIC_LOCAL(TextRun, objectReplacementCharacterTextRun, (&objectReplacementCharacter, 1));
719719 TextRun& emphasisMarkTextRun = combinedText ? objectReplacementCharacterTextRun : textRun;
720  FloatPoint emphasisMarkTextOrigin = combinedText ? FloatPoint(boxOrigin.x() + boxRect.width() / 2, boxOrigin.y() + font.fontMetrics().ascent()) : textOrigin;
 720 GraphicsPoint emphasisMarkTextOrigin = combinedText ? GraphicsPoint(boxOrigin.x() + boxRect.width() / 2, boxOrigin.y() + font.fontMetrics().ascent()) : textOrigin;
721721 if (combinedText)
722722 context->concatCTM(rotation(boxRect, Clockwise));
723723

786786 ePos = min(endPos - m_start, (int)m_len);
787787}
788788
789 void InlineTextBox::paintSelection(GraphicsContext* context, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font)
 789void InlineTextBox::paintSelection(GraphicsContext* context, const GraphicsPoint& boxOrigin, RenderStyle* style, const Font& font)
790790{
791791 if (context->paintingDisabled())
792792 return;

823823
824824 int deltaY = renderer()->style()->isFlippedLinesWritingMode() ? selectionBottom() - logicalBottom() : logicalTop() - selectionTop();
825825 int selHeight = selectionHeight();
826  FloatPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY);
 826 GraphicsPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY);
827827
828  FloatRect clipRect(localOrigin, FloatSize(m_logicalWidth, selHeight));
 828 GraphicsRect clipRect(localOrigin, GraphicsSize(m_logicalWidth, selHeight));
829829 float maxX = floorf(clipRect.maxX());
830830 clipRect.setX(floorf(clipRect.x()));
831831 clipRect.setWidth(maxX - clipRect.x());

834834 context->drawHighlightForText(font, textRun, localOrigin, selHeight, c, style->colorSpace(), sPos, ePos);
835835}
836836
837 void InlineTextBox::paintCompositionBackground(GraphicsContext* context, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, int startPos, int endPos)
 837void InlineTextBox::paintCompositionBackground(GraphicsContext* context, const GraphicsPoint& boxOrigin, RenderStyle* style, const Font& font, int startPos, int endPos)
838838{
839839 int offset = m_start;
840840 int sPos = max(startPos - offset, 0);

851851
852852 int deltaY = renderer()->style()->isFlippedLinesWritingMode() ? selectionBottom() - logicalBottom() : logicalTop() - selectionTop();
853853 int selHeight = selectionHeight();
854  FloatPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY);
 854 GraphicsPoint localOrigin(boxOrigin.x(), boxOrigin.y() - deltaY);
855855 context->drawHighlightForText(font, constructTextRun(style, font), localOrigin, selHeight, c, style->colorSpace(), sPos, ePos);
856856}
857857

867867 return;
868868
869869 RootInlineBox* r = root();
870  FloatRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + selectionTop(), r->logicalWidth(), selectionHeight());
871  FloatRect textRect(paintOffset.x() + x(), rootRect.y(), logicalWidth(), rootRect.height());
 870 GraphicsRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + selectionTop(), r->logicalWidth(), selectionHeight());
 871 GraphicsRect textRect(paintOffset.x() + x(), rootRect.y(), logicalWidth(), rootRect.height());
872872
873873 page->chrome()->client()->paintCustomHighlight(renderer()->node(), type, textRect, rootRect, true, false);
874874}
875875
876876#endif
877877
878 void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint& boxOrigin, int deco, const ShadowData* shadow)
 878void InlineTextBox::paintDecoration(GraphicsContext* context, const GraphicsPoint& boxOrigin, int deco, const ShadowData* shadow)
879879{
880880 if (m_truncation == cFullTruncation)
881881 return;
882882
883  FloatPoint localOrigin = boxOrigin;
 883 GraphicsPoint localOrigin = boxOrigin;
884884
885885 float width = m_logicalWidth;
886886 if (m_truncation != cNoTruncation) {

905905 bool setClip = false;
906906 int extraOffset = 0;
907907 if (!linesAreOpaque && shadow && shadow->next()) {
908  FloatRect clipRect(localOrigin, FloatSize(width, baseline + 2));
 908 GraphicsRect clipRect(localOrigin, GraphicsSize(width, baseline + 2));
909909 for (const ShadowData* s = shadow; s; s = s->next()) {
910  FloatRect shadowRect(localOrigin, FloatSize(width, baseline + 2));
 910 GraphicsRect shadowRect(localOrigin, GraphicsSize(width, baseline + 2));
911911 shadowRect.inflate(s->blur());
912912 int shadowX = isHorizontal() ? s->x() : s->y();
913913 int shadowY = isHorizontal() ? s->y() : -s->x();

934934 }
935935 int shadowX = isHorizontal() ? shadow->x() : shadow->y();
936936 int shadowY = isHorizontal() ? shadow->y() : -shadow->x();
937  context->setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->blur(), shadow->color(), colorSpace);
 937 context->setShadow(GraphicsSize(shadowX, shadowY - extraOffset), shadow->blur(), shadow->color(), colorSpace);
938938 setShadow = true;
939939 shadow = shadow->next();
940940 }

943943 context->setStrokeColor(underline, colorSpace);
944944 context->setStrokeStyle(SolidStroke);
945945 // Leave one pixel of white between the baseline and the underline.
946  context->drawLineForText(FloatPoint(localOrigin.x(), localOrigin.y() + baseline + 1), width, isPrinting);
 946 context->drawLineForText(GraphicsPoint(localOrigin.x(), localOrigin.y() + baseline + 1), width, isPrinting);
947947 }
948948 if (deco & OVERLINE) {
949949 context->setStrokeColor(overline, colorSpace);

953953 if (deco & LINE_THROUGH) {
954954 context->setStrokeColor(linethrough, colorSpace);
955955 context->setStrokeStyle(SolidStroke);
956  context->drawLineForText(FloatPoint(localOrigin.x(), localOrigin.y() + 2 * baseline / 3), width, isPrinting);
 956 context->drawLineForText(GraphicsPoint(localOrigin.x(), localOrigin.y() + 2 * baseline / 3), width, isPrinting);
957957 }
958958 } while (shadow);
959959

978978 }
979979}
980980
981 void InlineTextBox::paintSpellingOrGrammarMarker(GraphicsContext* pt, const FloatPoint& boxOrigin, DocumentMarker* marker, RenderStyle* style, const Font& font, bool grammar)
 981void InlineTextBox::paintSpellingOrGrammarMarker(GraphicsContext* pt, const GraphicsPoint& boxOrigin, DocumentMarker* marker, RenderStyle* style, const Font& font, bool grammar)
982982{
983983 // Never print spelling/grammar markers (5327887)
984984 if (textRenderer()->document()->printing())

10091009 // Calculate start & width
10101010 int deltaY = renderer()->style()->isFlippedLinesWritingMode() ? selectionBottom() - logicalBottom() : logicalTop() - selectionTop();
10111011 int selHeight = selectionHeight();
1012  FloatPoint startPoint(boxOrigin.x(), boxOrigin.y() - deltaY);
 1012 GraphicsPoint startPoint(boxOrigin.x(), boxOrigin.y() - deltaY);
10131013 TextRun run = constructTextRun(style, font);
10141014
10151015 // FIXME: Convert the document markers to float rects.

10211021 // display a toolTip. We don't do this for misspelling markers.
10221022 if (grammar) {
10231023 markerRect.move(-boxOrigin.x(), -boxOrigin.y());
1024  markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
 1024 markerRect = renderer()->localToAbsoluteQuad(GraphicsRect(markerRect)).enclosingBoundingBox();
10251025 toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
10261026 }
10271027 }

10431043 // In larger fonts, though, place the underline up near the baseline to prevent a big gap.
10441044 underlineOffset = baseline + 2;
10451045 }
1046  pt->drawLineForTextChecking(FloatPoint(boxOrigin.x() + start, boxOrigin.y() + underlineOffset), width, textCheckingLineStyleForMarkerType(marker->type()));
 1046 pt->drawLineForTextChecking(GraphicsPoint(boxOrigin.x() + start, boxOrigin.y() + underlineOffset), width, textCheckingLineStyleForMarkerType(marker->type()));
10471047}
10481048
1049 void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, const FloatPoint& boxOrigin, DocumentMarker* marker, RenderStyle* style, const Font& font)
 1049void InlineTextBox::paintTextMatchMarker(GraphicsContext* pt, const GraphicsPoint& boxOrigin, DocumentMarker* marker, RenderStyle* style, const Font& font)
10501050{
10511051 // Use same y positioning and height as for selection, so that when the selection and this highlight are on
10521052 // the same word there are no pieces sticking out.

10591059
10601060 // Always compute and store the rect associated with this marker. The computed rect is in absolute coordinates.
10611061 IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, IntPoint(x(), selectionTop()), selHeight, sPos, ePos));
1062  markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
 1062 markerRect = renderer()->localToAbsoluteQuad(GraphicsRect(markerRect)).enclosingBoundingBox();
10631063 toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
10641064
10651065 // Optionally highlight the text

10691069 renderer()->theme()->platformInactiveTextSearchHighlightColor();
10701070 GraphicsContextStateSaver stateSaver(*pt);
10711071 updateGraphicsContext(pt, color, color, 0, style->colorSpace()); // Don't draw text at all!
1072  pt->clip(FloatRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_logicalWidth, selHeight));
1073  pt->drawHighlightForText(font, run, FloatPoint(boxOrigin.x(), boxOrigin.y() - deltaY), selHeight, color, style->colorSpace(), sPos, ePos);
 1072 pt->clip(GraphicsRect(boxOrigin.x(), boxOrigin.y() - deltaY, m_logicalWidth, selHeight));
 1073 pt->drawHighlightForText(font, run, GraphicsPoint(boxOrigin.x(), boxOrigin.y() - deltaY), selHeight, color, style->colorSpace(), sPos, ePos);
10741074 }
10751075}
10761076

10871087
10881088 // Compute and store the rect associated with this marker.
10891089 IntRect markerRect = enclosingIntRect(font.selectionRectForText(run, startPoint, h, sPos, ePos));
1090  markerRect = renderer()->localToAbsoluteQuad(FloatRect(markerRect)).enclosingBoundingBox();
 1090 markerRect = renderer()->localToAbsoluteQuad(GraphicsRect(markerRect)).enclosingBoundingBox();
10911091 toRenderedDocumentMarker(marker)->setRenderedRect(markerRect);
10921092}
10931093
1094 void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const FloatPoint& boxOrigin, RenderStyle* style, const Font& font, bool background)
 1094void InlineTextBox::paintDocumentMarkers(GraphicsContext* pt, const GraphicsPoint& boxOrigin, RenderStyle* style, const Font& font, bool background)
10951095{
10961096 if (!renderer()->node())
10971097 return;

11541154 }
11551155}
11561156
1157 void InlineTextBox::paintCompositionUnderline(GraphicsContext* ctx, const FloatPoint& boxOrigin, const CompositionUnderline& underline)
 1157void InlineTextBox::paintCompositionUnderline(GraphicsContext* ctx, const GraphicsPoint& boxOrigin, const CompositionUnderline& underline)
11581158{
11591159 if (m_truncation == cFullTruncation)
11601160 return;

11961196
11971197 ctx->setStrokeColor(underline.color, renderer()->style()->colorSpace());
11981198 ctx->setStrokeThickness(lineThickness);
1199  ctx->drawLineForText(FloatPoint(boxOrigin.x() + start, boxOrigin.y() + logicalHeight() - lineThickness), width, textRenderer()->document()->printing());
 1199 ctx->drawLineForText(GraphicsPoint(boxOrigin.x() + start, boxOrigin.y() + logicalHeight() - lineThickness), width, textRenderer()->document()->printing());
12001200}
12011201
12021202int InlineTextBox::caretMinOffset() const
90929

Source/WebCore/rendering/RenderBoxModelObject.cpp

583583 IntRect adjustedRect = borderRect;
584584 // We need to shrink the border by one device pixel on each side.
585585 AffineTransform ctm = context->getCTM();
586  FloatSize contextScale(static_cast<float>(ctm.xScale()), static_cast<float>(ctm.yScale()));
 586 GraphicsSize contextScale(static_cast<float>(ctm.xScale()), static_cast<float>(ctm.yScale()));
587587 adjustedRect.inflateX(-ceilf(1 / contextScale.width()));
588588 adjustedRect.inflateY(-ceilf(1 / contextScale.height()));
589589 return adjustedRect;

19361936}
19371937#endif
19381938
1939 static void findInnerVertex(const FloatPoint& outerCorner, const FloatPoint& innerCorner, const FloatPoint& centerPoint, FloatPoint& result)
 1939static void findInnerVertex(const GraphicsPoint& outerCorner, const GraphicsPoint& innerCorner, const GraphicsPoint& centerPoint, GraphicsPoint& result)
19401940{
19411941 // If the line between outer and inner corner is towards the horizontal, intersect with a vertical line through the center,
19421942 // otherwise with a horizontal line through the center. The points that form this line are arbitrary (we use 0, 100).
19431943 // Note that if findIntersection fails, it will leave result untouched.
19441944 if (fabs(outerCorner.x() - innerCorner.x()) > fabs(outerCorner.y() - innerCorner.y()))
1945  findIntersection(outerCorner, innerCorner, FloatPoint(centerPoint.x(), 0), FloatPoint(centerPoint.x(), 100), result);
 1945 findIntersection(outerCorner, innerCorner, GraphicsPoint(centerPoint.x(), 0), GraphicsPoint(centerPoint.x(), 100), result);
19461946 else
1947  findIntersection(outerCorner, innerCorner, FloatPoint(0, centerPoint.y()), FloatPoint(100, centerPoint.y()), result);
 1947 findIntersection(outerCorner, innerCorner, GraphicsPoint(0, centerPoint.y()), GraphicsPoint(100, centerPoint.y()), result);
19481948}
19491949
19501950void RenderBoxModelObject::clipBorderSidePolygon(GraphicsContext* graphicsContext, const RoundedRect& outerBorder, const RoundedRect& innerBorder,
19511951 BoxSide side, bool firstEdgeMatches, bool secondEdgeMatches)
19521952{
1953  FloatPoint quad[4];
 1953 GraphicsPoint quad[4];
19541954
19551955 const IntRect& outerRect = outerBorder.rect();
19561956 const IntRect& innerRect = innerBorder.rect();
19571957
1958  FloatPoint centerPoint(innerRect.location().x() + static_cast<float>(innerRect.width()) / 2, innerRect.location().y() + static_cast<float>(innerRect.height()) / 2);
 1958 GraphicsPoint centerPoint(innerRect.location().x() + static_cast<float>(innerRect.width()) / 2, innerRect.location().y() + static_cast<float>(innerRect.height()) / 2);
19591959
19601960 // For each side, create a quad that encompasses all parts of that side that may draw,
19611961 // including areas inside the innerBorder.

20332033 }
20342034
20352035 // Square off the end which shouldn't be affected by antialiasing, and clip.
2036  FloatPoint firstQuad[4];
 2036 GraphicsPoint firstQuad[4];
20372037 firstQuad[0] = quad[0];
20382038 firstQuad[1] = quad[1];
2039  firstQuad[2] = side == BSTop || side == BSBottom ? FloatPoint(quad[3].x(), quad[2].y())
2040  : FloatPoint(quad[2].x(), quad[3].y());
 2039 firstQuad[2] = side == BSTop || side == BSBottom ? GraphicsPoint(quad[3].x(), quad[2].y())
 2040 : GraphicsPoint(quad[2].x(), quad[3].y());
20412041 firstQuad[3] = quad[3];
20422042 graphicsContext->clipConvexPolygon(4, firstQuad, !firstEdgeMatches);
20432043
2044  FloatPoint secondQuad[4];
 2044 GraphicsPoint secondQuad[4];
20452045 secondQuad[0] = quad[0];
2046  secondQuad[1] = side == BSTop || side == BSBottom ? FloatPoint(quad[0].x(), quad[1].y())
2047  : FloatPoint(quad[1].x(), quad[0].y());
 2046 secondQuad[1] = side == BSTop || side == BSBottom ? GraphicsPoint(quad[0].x(), quad[1].y())
 2047 : GraphicsPoint(quad[1].x(), quad[0].y());
20482048 secondQuad[2] = quad[2];
20492049 secondQuad[3] = quad[3];
20502050 // Antialiasing affects the second side.

20812081 !horizontal || includeLogicalLeftEdge);
20822082}
20832083
2084 bool RenderBoxModelObject::borderObscuresBackgroundEdge(const FloatSize& contextScale) const
 2084bool RenderBoxModelObject::borderObscuresBackgroundEdge(const GraphicsSize& contextScale) const
20852085{
20862086 BorderEdge edges[4];
20872087 getBorderEdgeInfo(edges);
90929

Source/WebCore/rendering/RenderLayerBacking.h

2828
2929#if USE(ACCELERATED_COMPOSITING)
3030
31 #include "FloatPoint.h"
32 #include "FloatPoint3D.h"
 31#include "GraphicsPoint.h"
 32#include "GraphicsPoint3D.h"
3333#include "GraphicsLayer.h"
3434#include "GraphicsLayerClient.h"
3535#include "RenderLayer.h"

162162
163163 IntSize contentOffsetInCompostingLayer() const;
164164 // Result is transform origin in pixels.
165  FloatPoint3D computeTransformOrigin(const IntRect& borderBox) const;
 165 GraphicsPoint3D computeTransformOrigin(const IntRect& borderBox) const;
166166 // Result is perspective origin in pixels.
167  FloatPoint computePerspectiveOrigin(const IntRect& borderBox) const;
 167 GraphicsPoint computePerspectiveOrigin(const IntRect& borderBox) const;
168168
169169 void updateLayerOpacity(const RenderStyle*);
170170 void updateLayerTransform(const RenderStyle*);
90929

Source/WebCore/rendering/RenderInline.cpp

2424#include "RenderInline.h"
2525
2626#include "Chrome.h"
27 #include "FloatQuad.h"
 27#include "GraphicsQuad.h"
2828#include "GraphicsContext.h"
2929#include "HitTestResult.h"
3030#include "InlineTextBox.h"

471471 culledInlineAbsoluteRects(this, rects, toLayoutSize(accumulatedOffset));
472472 else if (InlineFlowBox* curr = firstLineBox()) {
473473 for (; curr; curr = curr->nextLineBox())
474  rects.append(enclosingLayoutRect(FloatRect(accumulatedOffset + curr->topLeft(), curr->size())));
 474 rects.append(enclosingLayoutRect(GraphicsRect(accumulatedOffset + curr->topLeft(), curr->size())));
475475 } else
476476 rects.append(LayoutRect(accumulatedOffset, LayoutSize()));
477477

499499 RootInlineBox* rootBox = currBox->inlineBoxWrapper()->root();
500500 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
501501 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
502  FloatRect result;
 502 GraphicsRect result;
503503 if (isHorizontal)
504  result = FloatRect(offset.width() + currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), offset.height() + logicalTop, currBox->width() + currBox->marginLeft() + currBox->marginRight(), logicalHeight);
 504 result = GraphicsRect(offset.width() + currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), offset.height() + logicalTop, currBox->width() + currBox->marginLeft() + currBox->marginRight(), logicalHeight);
505505 else
506  result = FloatRect(offset.width() + logicalTop, offset.height() + currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginTop() + currBox->marginBottom());
 506 result = GraphicsRect(offset.width() + logicalTop, offset.height() + currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginTop() + currBox->marginBottom());
507507 rects.append(enclosingIntRect(result));
508508 }
509509 } else if (curr->isRenderInline()) {

516516 RootInlineBox* rootBox = childLine->root();
517517 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
518518 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
519  FloatRect result;
 519 GraphicsRect result;
520520 if (isHorizontal)
521  result = FloatRect(offset.width() + childLine->x() - childLine->marginLogicalLeft(),
 521 result = GraphicsRect(offset.width() + childLine->x() - childLine->marginLogicalLeft(),
522522 offset.height() + logicalTop,
523523 childLine->logicalWidth() + childLine->marginLogicalLeft() + childLine->marginLogicalRight(),
524524 logicalHeight);
525525 else
526  result = FloatRect(offset.width() + logicalTop,
 526 result = GraphicsRect(offset.width() + logicalTop,
527527 offset.height() + childLine->y() - childLine->marginLogicalLeft(),
528528 logicalHeight,
529529 childLine->logicalWidth() + childLine->marginLogicalLeft() + childLine->marginLogicalRight());

536536 RootInlineBox* rootBox = childText->root();
537537 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
538538 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
539  FloatRect result;
 539 GraphicsRect result;
540540 if (isHorizontal)
541  result = FloatRect(offset.width() + childText->x(), offset.height() + logicalTop, childText->logicalWidth(), logicalHeight);
 541 result = GraphicsRect(offset.width() + childText->x(), offset.height() + logicalTop, childText->logicalWidth(), logicalHeight);
542542 else
543  result = FloatRect(offset.width() + logicalTop, offset.height() + childText->y(), logicalHeight, childText->logicalWidth());
 543 result = GraphicsRect(offset.width() + logicalTop, offset.height() + childText->y(), logicalHeight, childText->logicalWidth());
544544 rects.append(enclosingIntRect(result));
545545 }
546546 }
547547 }
548548}
549549
550 void RenderInline::absoluteQuads(Vector<FloatQuad>& quads)
 550void RenderInline::absoluteQuads(Vector<GraphicsQuad>& quads)
551551{
552552 if (!alwaysCreateLineBoxes())
553553 culledInlineAbsoluteQuads(this, quads);
554554 else if (InlineFlowBox* curr = firstLineBox()) {
555555 for (; curr; curr = curr->nextLineBox()) {
556  FloatRect localRect(curr->x(), curr->y(), curr->width(), curr->height());
 556 GraphicsRect localRect(curr->x(), curr->y(), curr->width(), curr->height());
557557 quads.append(localToAbsoluteQuad(localRect));
558558 }
559559 } else
560  quads.append(localToAbsoluteQuad(FloatRect()));
 560 quads.append(localToAbsoluteQuad(GraphicsRect()));
561561
562562 if (continuation())
563563 continuation()->absoluteQuads(quads);
564564}
565565
566 void RenderInline::culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>& quads)
 566void RenderInline::culledInlineAbsoluteQuads(const RenderInline* container, Vector<GraphicsQuad>& quads)
567567{
568568 if (!culledInlineFirstLineBox()) {
569  quads.append(localToAbsoluteQuad(FloatRect()));
 569 quads.append(localToAbsoluteQuad(GraphicsRect()));
570570 return;
571571 }
572572

583583 RootInlineBox* rootBox = currBox->inlineBoxWrapper()->root();
584584 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
585585 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
586  FloatRect result;
 586 GraphicsRect result;
587587 if (isHorizontal)
588  result = FloatRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->marginLeft() + currBox->marginRight(), logicalHeight);
 588 result = GraphicsRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->marginLeft() + currBox->marginRight(), logicalHeight);
589589 else
590  result = FloatRect(logicalTop, currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginTop() + currBox->marginBottom());
 590 result = GraphicsRect(logicalTop, currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginTop() + currBox->marginBottom());
591591 quads.append(localToAbsoluteQuad(result));
592592 }
593593 } else if (curr->isRenderInline()) {

600600 RootInlineBox* rootBox = childLine->root();
601601 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
602602 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
603  FloatRect result;
 603 GraphicsRect result;
604604 if (isHorizontal)
605  result = FloatRect(childLine->x() - childLine->marginLogicalLeft(),
 605 result = GraphicsRect(childLine->x() - childLine->marginLogicalLeft(),
606606 logicalTop,
607607 childLine->logicalWidth() + childLine->marginLogicalLeft() + childLine->marginLogicalRight(),
608608 logicalHeight);
609609 else
610  result = FloatRect(logicalTop,
 610 result = GraphicsRect(logicalTop,
611611 childLine->y() - childLine->marginLogicalLeft(),
612612 logicalHeight,
613613 childLine->logicalWidth() + childLine->marginLogicalLeft() + childLine->marginLogicalRight());

620620 RootInlineBox* rootBox = childText->root();
621621 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
622622 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
623  FloatRect result;
 623 GraphicsRect result;
624624 if (isHorizontal)
625  result = FloatRect(childText->x(), logicalTop, childText->logicalWidth(), logicalHeight);
 625 result = GraphicsRect(childText->x(), logicalTop, childText->logicalWidth(), logicalHeight);
626626 else
627  result = FloatRect(logicalTop, childText->y(), logicalHeight, childText->logicalWidth());
 627 result = GraphicsRect(logicalTop, childText->y(), logicalHeight, childText->logicalWidth());
628628 quads.append(localToAbsoluteQuad(result));
629629 }
630630 }

768768 float y = isHorizontal ? firstLineBox()->y() : logicalLeftSide;
769769 float width = isHorizontal ? logicalRightSide - logicalLeftSide : lastLineBox()->logicalBottom() - x;
770770 float height = isHorizontal ? lastLineBox()->logicalBottom() - y : logicalRightSide - logicalLeftSide;
771  result = enclosingLayoutRect(FloatRect(x, y, width, height));
 771 result = enclosingLayoutRect(GraphicsRect(x, y, width, height));
772772 }
773773
774774 return result;
775775}
776776
777 FloatRect RenderInline::culledInlineBoundingBox(const RenderInline* container) const
 777GraphicsRect RenderInline::culledInlineBoundingBox(const RenderInline* container) const
778778{
779  FloatRect result;
 779 GraphicsRect result;
780780 bool isHorizontal = style()->isHorizontalWritingMode();
781781 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
782782 if (curr->isFloatingOrPositioned())

791791 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
792792 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
793793 if (isHorizontal)
794  result.uniteIfNonZero(FloatRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->marginLeft() + currBox->marginRight(), logicalHeight));
 794 result.uniteIfNonZero(GraphicsRect(currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), logicalTop, currBox->width() + currBox->marginLeft() + currBox->marginRight(), logicalHeight));
795795 else
796  result.uniteIfNonZero(FloatRect(logicalTop, currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginTop() + currBox->marginBottom()));
 796 result.uniteIfNonZero(GraphicsRect(logicalTop, currBox->inlineBoxWrapper()->y() - currBox->marginTop(), logicalHeight, currBox->height() + currBox->marginTop() + currBox->marginBottom()));
797797 }
798798 } else if (curr->isRenderInline()) {
799799 // If the child doesn't need line boxes either, then we can recur.

806806 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
807807 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
808808 if (isHorizontal)
809  result.uniteIfNonZero(FloatRect(childLine->x() - childLine->marginLogicalLeft(),
 809 result.uniteIfNonZero(GraphicsRect(childLine->x() - childLine->marginLogicalLeft(),
810810 logicalTop,
811811 childLine->logicalWidth() + childLine->marginLogicalLeft() + childLine->marginLogicalRight(),
812812 logicalHeight));
813813 else
814  result.uniteIfNonZero(FloatRect(logicalTop,
 814 result.uniteIfNonZero(GraphicsRect(logicalTop,
815815 childLine->y() - childLine->marginLogicalLeft(),
816816 logicalHeight,
817817 childLine->logicalWidth() + childLine->marginLogicalLeft() + childLine->marginLogicalRight()));

825825 int logicalTop = rootBox->logicalTop() + (rootBox->renderer()->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent() - container->style(rootBox->isFirstLineStyle())->font().fontMetrics().ascent());
826826 int logicalHeight = container->style(rootBox->isFirstLineStyle())->font().fontMetrics().height();
827827 if (isHorizontal)
828  result.uniteIfNonZero(FloatRect(childText->x(), logicalTop, childText->logicalWidth(), logicalHeight));
 828 result.uniteIfNonZero(GraphicsRect(childText->x(), logicalTop, childText->logicalWidth(), logicalHeight));
829829 else
830  result.uniteIfNonZero(FloatRect(logicalTop, childText->y(), logicalHeight, childText->logicalWidth()));
 830 result.uniteIfNonZero(GraphicsRect(logicalTop, childText->y(), logicalHeight, childText->logicalWidth()));
831831 }
832832 }
833833 }

13401340 culledInlineAbsoluteRects(this, rects, toLayoutSize(additionalOffset));
13411341 else {
13421342 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
1343  rects.append(enclosingLayoutRect(FloatRect(additionalOffset.x() + curr->x(), additionalOffset.y() + curr->y(), curr->width(), curr->height())));
 1343 rects.append(enclosingLayoutRect(GraphicsRect(additionalOffset.x() + curr->x(), additionalOffset.y() + curr->y(), curr->width(), curr->height())));
13441344 }
13451345
13461346 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
13471347 if (!curr->isText() && !curr->isListMarker()) {
1348  FloatPoint pos(additionalOffset);
 1348 GraphicsPoint pos(additionalOffset);
13491349 // FIXME: This doesn't work correctly with transforms.
13501350 if (curr->hasLayer())
13511351 pos = curr->localToAbsolute();

15361536 region.clip.setWidth(0);
15371537 }
15381538
1539  FloatPoint absPos = container->localToAbsolute();
 1539 GraphicsPoint absPos = container->localToAbsolute();
15401540 region.bounds.setX(absPos.x() + region.bounds.x());
15411541 region.bounds.setY(absPos.y() + region.bounds.y());
15421542
90929

Source/WebCore/rendering/RenderBox.cpp

3636#include "HTMLElement.h"
3737#include "HTMLNames.h"
3838#include "ImageBuffer.h"
39 #include "FloatQuad.h"
 39#include "GraphicsQuad.h"
4040#include "Frame.h"
4141#include "Page.h"
4242#include "PaintInfo.h"

461461 rects.append(LayoutRect(accumulatedOffset, size()));
462462}
463463
464 void RenderBox::absoluteQuads(Vector<FloatQuad>& quads)
 464void RenderBox::absoluteQuads(Vector<GraphicsQuad>& quads)
465465{
466  quads.append(localToAbsoluteQuad(FloatRect(0, 0, width(), height())));
 466 quads.append(localToAbsoluteQuad(GraphicsRect(0, 0, width(), height())));
467467}
468468
469469void RenderBox::updateLayerTransform()

476476IntRect RenderBox::absoluteContentBox() const
477477{
478478 IntRect rect = contentBoxRect();
479  FloatPoint absPos = localToAbsolute(FloatPoint());
 479 GraphicsPoint absPos = localToAbsolute(GraphicsPoint());
480480 rect.move(absPos.x(), absPos.y());
481481 return rect;
482482}
483483
484 FloatQuad RenderBox::absoluteContentQuad() const
 484GraphicsQuad RenderBox::absoluteContentQuad() const
485485{
486486 IntRect rect = contentBoxRect();
487  return localToAbsoluteQuad(FloatRect(rect));
 487 return localToAbsoluteQuad(GraphicsRect(rect));
488488}
489489
490490IntRect RenderBox::outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, IntPoint* cachedOffsetToRepaintContainer) const

492492 IntRect box = borderBoundingBox();
493493 adjustRectForOutlineAndShadow(box);
494494
495  FloatQuad containerRelativeQuad = FloatRect(box);
 495 GraphicsQuad containerRelativeQuad = GraphicsRect(box);
496496 if (cachedOffsetToRepaintContainer)
497497 containerRelativeQuad.move(cachedOffsetToRepaintContainer->x(), cachedOffsetToRepaintContainer->y());
498498 else

817817 return BackgroundBleedNone;
818818
819819 AffineTransform ctm = context->getCTM();
820  FloatSize contextScaling(static_cast<float>(ctm.xScale()), static_cast<float>(ctm.yScale()));
 820 GraphicsSize contextScaling(static_cast<float>(ctm.xScale()), static_cast<float>(ctm.yScale()));
821821 if (borderObscuresBackgroundEdge(contextScaling))
822822 return BackgroundBleedShrinkBackground;
823823

10851085 InlineBox* boxWrap = inlineBoxWrapper();
10861086 RootInlineBox* r = boxWrap ? boxWrap->root() : 0;
10871087 if (r) {
1088  FloatRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + r->selectionTop(), r->logicalWidth(), r->selectionHeight());
1089  FloatRect imageRect(paintOffset.x() + x(), rootRect.y(), width(), rootRect.height());
 1088 GraphicsRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + r->selectionTop(), r->logicalWidth(), r->selectionHeight());
 1089 GraphicsRect imageRect(paintOffset.x() + x(), rootRect.y(), width(), rootRect.height());
10901090 page->chrome()->client()->paintCustomHighlight(node(), type, imageRect, rootRect, behindText, false);
10911091 } else {
1092  FloatRect imageRect(paintOffset.x() + x(), paintOffset.y() + y(), width(), height());
 1092 GraphicsRect imageRect(paintOffset.x() + x(), paintOffset.y() + y(), width(), height());
10931093 page->chrome()->client()->paintCustomHighlight(node(), type, imageRect, imageRect, behindText, false);
10941094 }
10951095}

13551355 box->remove();
13561356 box->destroy(renderArena());
13571357 } else if (isReplaced()) {
1358  setLocation(roundedIntPoint(FloatPoint(box->x(), box->y())));
 1358 setLocation(roundedIntPoint(GraphicsPoint(box->x(), box->y())));
13591359 m_inlineBoxWrapper = box;
13601360 }
13611361}

34403440 return isHorizontalWritingMode() ? IntSize(offset.width(), height() - offset.height()) : IntSize(width() - offset.width(), offset.height());
34413441}
34423442
3443 FloatPoint RenderBox::flipForWritingMode(const FloatPoint& position) const
 3443GraphicsPoint RenderBox::flipForWritingMode(const GraphicsPoint& position) const
34443444{
34453445 if (!style()->isFlippedBlocksWritingMode())
34463446 return position;
3447  return isHorizontalWritingMode() ? FloatPoint(position.x(), height() - position.y()) : FloatPoint(width() - position.x(), position.y());
 3447 return isHorizontalWritingMode() ? GraphicsPoint(position.x(), height() - position.y()) : GraphicsPoint(width() - position.x(), position.y());
34483448}
34493449
3450 void RenderBox::flipForWritingMode(FloatRect& rect) const
 3450void RenderBox::flipForWritingMode(GraphicsRect& rect) const
34513451{
34523452 if (!style()->isFlippedBlocksWritingMode())
34533453 return;
90929

Source/WebCore/rendering/RenderBlock.cpp

2727#include "ColumnInfo.h"
2828#include "Document.h"
2929#include "Element.h"
30 #include "FloatQuad.h"
 30#include "GraphicsQuad.h"
3131#include "Frame.h"
3232#include "FrameSelection.h"
3333#include "FrameView.h"

27472747 return GapRects();
27482748
27492749 // FIXME: this is broken with transforms
2750  TransformState transformState(TransformState::ApplyTransformDirection, FloatPoint());
 2750 TransformState transformState(TransformState::ApplyTransformDirection, GraphicsPoint());
27512751 mapLocalToContainer(repaintContainer, false, false, transformState);
27522752 IntPoint offsetFromRepaintContainer = roundedIntPoint(transformState.mappedPoint());
27532753

27762776 if (!hasLayer()) {
27772777 LayoutRect localBounds(gapRectsBounds);
27782778 flipForWritingMode(localBounds);
2779  gapRectsBounds = localToContainerQuad(FloatRect(localBounds), layer->renderer()).enclosingBoundingBox();
 2779 gapRectsBounds = localToContainerQuad(GraphicsRect(localBounds), layer->renderer()).enclosingBoundingBox();
27802780 gapRectsBounds.move(layer->scrolledContentOffset());
27812781 }
27822782 layer->addBlockSelectionGapsBounds(gapRectsBounds);

57335733 rects.append(LayoutRect(accumulatedOffset, size()));
57345734}
57355735
5736 void RenderBlock::absoluteQuads(Vector<FloatQuad>& quads)
 5736void RenderBlock::absoluteQuads(Vector<GraphicsQuad>& quads)
57375737{
57385738 // For blocks inside inlines, we go ahead and include margins so that we run right up to the
57395739 // inline boxes above and below us (thus getting merged with them to form a single irregular

57415741 if (isAnonymousBlockContinuation()) {
57425742 // FIXME: This is wrong for block-flows that are horizontal.
57435743 // https://bugs.webkit.org/show_bug.cgi?id=46781
5744  FloatRect localRect(0, -collapsedMarginBefore(),
 5744 GraphicsRect localRect(0, -collapsedMarginBefore(),
57455745 width(), height() + collapsedMarginBefore() + collapsedMarginAfter());
57465746 quads.append(localToAbsoluteQuad(localRect));
57475747 continuation()->absoluteQuads(quads);
57485748 } else
5749  quads.append(RenderBox::localToAbsoluteQuad(FloatRect(0, 0, width(), height())));
 5749 quads.append(RenderBox::localToAbsoluteQuad(GraphicsRect(0, 0, width(), height())));
57505750}
57515751
57525752IntRect RenderBlock::rectWithOutlineForRepaint(RenderBoxModelObject* repaintContainer, int outlineWidth)

58745874
58755875 int myRight = x + caretWidth;
58765876 // FIXME: why call localToAbsoluteForContent() twice here, too?
5877  FloatPoint absRightPoint = localToAbsolute(FloatPoint(myRight, 0));
 5877 GraphicsPoint absRightPoint = localToAbsolute(GraphicsPoint(myRight, 0));
58785878
58795879 int containerRight = containingBlock()->x() + containingBlockLogicalWidthForContent();
5880  FloatPoint absContainerPoint = localToAbsolute(FloatPoint(containerRight, 0));
 5880 GraphicsPoint absContainerPoint = localToAbsolute(GraphicsPoint(containerRight, 0));
58815881
58825882 *extraWidthToEndOfLine = absContainerPoint.x() - absRightPoint.x();
58835883 }

59205920 for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
59215921 if (!curr->isText() && !curr->isListMarker() && curr->isBox()) {
59225922 RenderBox* box = toRenderBox(curr);
5923  FloatPoint pos;
 5923 GraphicsPoint pos;
59245924 // FIXME: This doesn't work correctly with transforms.
59255925 if (box->layer())
59265926 pos = curr->localToAbsolute();
59275927 else
5928  pos = FloatPoint(additionalOffset.x() + box->x(), additionalOffset.y() + box->y());
 5928 pos = GraphicsPoint(additionalOffset.x() + box->x(), additionalOffset.y() + box->y());
59295929 box->addFocusRingRects(rects, flooredIntPoint(pos));
59305930 }
59315931 }
90929

Source/WebCore/rendering/RenderLayerBacking.cpp

386386 // for a compositing layer, rootLayer is the layer itself.
387387 IntRect parentClipRect = m_owningLayer->backgroundClipRect(compAncestor, true);
388388 ASSERT(parentClipRect != PaintInfo::infiniteRect());
389  m_ancestorClippingLayer->setPosition(FloatPoint() + (parentClipRect.location() - graphicsLayerParentLocation));
 389 m_ancestorClippingLayer->setPosition(GraphicsPoint() + (parentClipRect.location() - graphicsLayerParentLocation));
390390 m_ancestorClippingLayer->setSize(parentClipRect.size());
391391
392392 // backgroundRect is relative to compAncestor, so subtract deltaX/deltaY to get back to local coords.

396396 graphicsLayerParentLocation = parentClipRect.location();
397397 }
398398
399  m_graphicsLayer->setPosition(FloatPoint() + (relativeCompositingBounds.location() - graphicsLayerParentLocation));
 399 m_graphicsLayer->setPosition(GraphicsPoint() + (relativeCompositingBounds.location() - graphicsLayerParentLocation));
400400
401401 IntSize oldOffsetFromRenderer = m_graphicsLayer->offsetFromRenderer();
402402 m_graphicsLayer->setOffsetFromRenderer(localCompositingBounds.location() - IntPoint());

405405 if (oldOffsetFromRenderer != m_graphicsLayer->offsetFromRenderer())
406406 m_graphicsLayer->setNeedsDisplay();
407407
408  FloatSize oldSize = m_graphicsLayer->size();
409  FloatSize newSize = relativeCompositingBounds.size();
 408 GraphicsSize oldSize = m_graphicsLayer->size();
 409 GraphicsSize newSize = relativeCompositingBounds.size();
410410 if (oldSize != newSize) {
411411 m_graphicsLayer->setSize(newSize);
412412 // A bounds change will almost always require redisplay. Usually that redisplay

419419 IntRect clippingBox;
420420 if (m_clippingLayer) {
421421 clippingBox = clipBox(toRenderBox(renderer()));
422  m_clippingLayer->setPosition(FloatPoint() + (clippingBox.location() - localCompositingBounds.location()));
 422 m_clippingLayer->setPosition(GraphicsPoint() + (clippingBox.location() - localCompositingBounds.location()));
423423 m_clippingLayer->setSize(clippingBox.size());
424424 m_clippingLayer->setOffsetFromRenderer(clippingBox.location() - IntPoint());
425425 }

429429 m_maskLayer->setSize(m_graphicsLayer->size());
430430 m_maskLayer->setNeedsDisplay();
431431 }
432  m_maskLayer->setPosition(FloatPoint());
 432 m_maskLayer->setPosition(GraphicsPoint());
433433 m_maskLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer());
434434 }
435435

440440 IntRect layerBounds = IntRect(delta, borderBox.size());
441441
442442 // Update properties that depend on layer dimensions
443  FloatPoint3D transformOrigin = computeTransformOrigin(borderBox);
 443 GraphicsPoint3D transformOrigin = computeTransformOrigin(borderBox);
444444 // Compute the anchor point, which is in the center of the renderer box unless transform-origin is set.
445  FloatPoint3D anchor(relativeCompositingBounds.width() != 0.0f ? ((layerBounds.x() - relativeCompositingBounds.x()) + transformOrigin.x()) / relativeCompositingBounds.width() : 0.5f,
 445 GraphicsPoint3D anchor(relativeCompositingBounds.width() != 0.0f ? ((layerBounds.x() - relativeCompositingBounds.x()) + transformOrigin.x()) / relativeCompositingBounds.width() : 0.5f,
446446 relativeCompositingBounds.height() != 0.0f ? ((layerBounds.y() - relativeCompositingBounds.y()) + transformOrigin.y()) / relativeCompositingBounds.height() : 0.5f,
447447 transformOrigin.z());
448448 m_graphicsLayer->setAnchorPoint(anchor);

464464 m_graphicsLayer->setChildrenTransform(TransformationMatrix());
465465 }
466466 } else {
467  m_graphicsLayer->setAnchorPoint(FloatPoint3D(0.5f, 0.5f, 0));
 467 m_graphicsLayer->setAnchorPoint(GraphicsPoint3D(0.5f, 0.5f, 0));
468468 }
469469
470470 if (m_foregroundLayer) {
471  FloatPoint foregroundPosition;
472  FloatSize foregroundSize = newSize;
 471 GraphicsPoint foregroundPosition;
 472 GraphicsSize foregroundSize = newSize;
473473 IntSize foregroundOffset = m_graphicsLayer->offsetFromRenderer();
474474 if (m_clippingLayer) {
475475 // If we have a clipping layer (which clips descendants), then the foreground layer is a child of it,
476476 // so that it gets correctly sorted with children. In that case, position relative to the clipping layer.
477  foregroundSize = FloatSize(clippingBox.size());
 477 foregroundSize = GraphicsSize(clippingBox.size());
478478 foregroundOffset = clippingBox.location() - IntPoint();
479479 }
480480

489489
490490 // The reflection layer has the bounds of m_owningLayer->reflectionLayer(),
491491 // but the reflected layer is the bounds of this layer, so we need to position it appropriately.
492  FloatRect layerBounds = compositedBounds();
493  FloatRect reflectionLayerBounds = reflectionBacking->compositedBounds();
494  reflectionBacking->graphicsLayer()->setReplicatedLayerPosition(FloatPoint() + (layerBounds.location() - reflectionLayerBounds.location()));
 492 GraphicsRect layerBounds = compositedBounds();
 493 GraphicsRect reflectionLayerBounds = reflectionBacking->compositedBounds();
 494 reflectionBacking->graphicsLayer()->setReplicatedLayerPosition(GraphicsPoint() + (layerBounds.location() - reflectionLayerBounds.location()));
495495 }
496496
497497 m_graphicsLayer->setContentsRect(contentsBox());

993993 image->startAnimation();
994994}
995995
996 FloatPoint3D RenderLayerBacking::computeTransformOrigin(const IntRect& borderBox) const
 996GraphicsPoint3D RenderLayerBacking::computeTransformOrigin(const IntRect& borderBox) const
997997{
998998 RenderStyle* style = renderer()->style();
999999
1000  FloatPoint3D origin;
 1000 GraphicsPoint3D origin;
10011001 origin.setX(style->transformOriginX().calcFloatValue(borderBox.width()));
10021002 origin.setY(style->transformOriginY().calcFloatValue(borderBox.height()));
10031003 origin.setZ(style->transformOriginZ());

10051005 return origin;
10061006}
10071007
1008 FloatPoint RenderLayerBacking::computePerspectiveOrigin(const IntRect& borderBox) const
 1008GraphicsPoint RenderLayerBacking::computePerspectiveOrigin(const IntRect& borderBox) const
10091009{
10101010 RenderStyle* style = renderer()->style();
10111011
10121012 float boxWidth = borderBox.width();
10131013 float boxHeight = borderBox.height();
10141014
1015  FloatPoint origin;
 1015 GraphicsPoint origin;
10161016 origin.setX(style->perspectiveOriginX().calcFloatValue(boxWidth));
10171017 origin.setY(style->perspectiveOriginY().calcFloatValue(boxHeight));
10181018
90929

Source/WebCore/rendering/RenderEmbeddedObject.cpp

157157 if (context->paintingDisabled())
158158 return;
159159
160  FloatRect contentRect;
 160 GraphicsRect contentRect;
161161 Path path;
162  FloatRect replacementTextRect;
 162 GraphicsRect replacementTextRect;
163163 Font font;
164164 TextRun run("");
165165 float textWidth;

177177 float labelY = roundf(replacementTextRect.location().y() + (replacementTextRect.size().height() - fontMetrics.height()) / 2 + fontMetrics.ascent());
178178 context->setAlpha(m_missingPluginIndicatorIsPressed ? replacementTextPressedTextOpacity : replacementTextTextOpacity);
179179 context->setFillColor(Color::black, style()->colorSpace());
180  context->drawBidiText(font, run, FloatPoint(labelX, labelY));
 180 context->drawBidiText(font, run, GraphicsPoint(labelX, labelY));
181181}
182182
183 bool RenderEmbeddedObject::getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, Path& path, FloatRect& replacementTextRect, Font& font, TextRun& run, float& textWidth)
 183bool RenderEmbeddedObject::getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, GraphicsRect& contentRect, Path& path, GraphicsRect& replacementTextRect, Font& font, TextRun& run, float& textWidth)
184184{
185185 contentRect = contentBoxRect();
186186 contentRect.moveBy(accumulatedOffset);

200200 run = TextRun(m_replacementText);
201201 textWidth = font.width(run);
202202
203  replacementTextRect.setSize(FloatSize(textWidth + replacementTextRoundedRectLeftRightTextMargin * 2, replacementTextRoundedRectHeight));
 203 replacementTextRect.setSize(GraphicsSize(textWidth + replacementTextRoundedRectLeftRightTextMargin * 2, replacementTextRoundedRectHeight));
204204 float x = (contentRect.size().width() / 2 - replacementTextRect.size().width() / 2) + contentRect.location().x();
205205 float y = (contentRect.size().height() / 2 - replacementTextRect.size().height() / 2) + contentRect.location().y();
206  replacementTextRect.setLocation(FloatPoint(x, y));
 206 replacementTextRect.setLocation(GraphicsPoint(x, y));
207207
208  path.addRoundedRect(replacementTextRect, FloatSize(replacementTextRoundedRectRadius, replacementTextRoundedRectRadius));
 208 path.addRoundedRect(replacementTextRect, GraphicsSize(replacementTextRoundedRectRadius, replacementTextRoundedRectRadius));
209209
210210 return true;
211211}

251251
252252bool RenderEmbeddedObject::isInMissingPluginIndicator(MouseEvent* event)
253253{
254  FloatRect contentRect;
 254 GraphicsRect contentRect;
255255 Path path;
256  FloatRect replacementTextRect;
 256 GraphicsRect replacementTextRect;
257257 Font font;
258258 TextRun run("");
259259 float textWidth;
90929

Source/WebCore/rendering/TransformState.h

2727#define TransformState_h
2828
2929#include "AffineTransform.h"
30 #include "FloatPoint.h"
31 #include "FloatQuad.h"
 30#include "GraphicsPoint.h"
 31#include "GraphicsQuad.h"
3232#include "IntSize.h"
3333#include "TransformationMatrix.h"
3434#include <wtf/PassRefPtr.h>

4444 enum TransformAccumulation { FlattenTransform, AccumulateTransform };
4545
4646 // If quad is non-null, it will be mapped
47  TransformState(TransformDirection mappingDirection, const FloatPoint& p, const FloatQuad* quad = 0)
 47 TransformState(TransformDirection mappingDirection, const GraphicsPoint& p, const GraphicsQuad* quad = 0)
4848 : m_lastPlanarPoint(p)
4949 , m_accumulatingTransform(false)
5050 , m_mapQuad(quad != 0)

6565 void flatten();
6666
6767 // Return the coords of the point or quad in the last flattened layer
68  FloatPoint lastPlanarPoint() const { return m_lastPlanarPoint; }
69  FloatQuad lastPlanarQuad() const { return m_lastPlanarQuad; }
 68 GraphicsPoint lastPlanarPoint() const { return m_lastPlanarPoint; }
 69 GraphicsQuad lastPlanarQuad() const { return m_lastPlanarQuad; }
7070
7171 // Return the point or quad mapped through the current transform
72  FloatPoint mappedPoint() const;
73  FloatQuad mappedQuad() const;
 72 GraphicsPoint mappedPoint() const;
 73 GraphicsQuad mappedQuad() const;
7474
7575private:
7676 void flattenWithTransform(const TransformationMatrix&);
7777
78  FloatPoint m_lastPlanarPoint;
79  FloatQuad m_lastPlanarQuad;
 78 GraphicsPoint m_lastPlanarPoint;
 79 GraphicsQuad m_lastPlanarQuad;
8080
8181 // We only allocate the transform if we need to
8282 OwnPtr<TransformationMatrix> m_accumulatedTransform;

8787
8888class HitTestingTransformState : public RefCounted<HitTestingTransformState> {
8989public:
90  static PassRefPtr<HitTestingTransformState> create(const FloatPoint& p, const FloatQuad& quad)
 90 static PassRefPtr<HitTestingTransformState> create(const GraphicsPoint& p, const GraphicsQuad& quad)
9191 {
9292 return adoptRef(new HitTestingTransformState(p, quad));
9393 }

101101 void translate(int x, int y, TransformAccumulation);
102102 void applyTransform(const TransformationMatrix& transformFromContainer, TransformAccumulation);
103103
104  FloatPoint mappedPoint() const;
105  FloatQuad mappedQuad() const;
 104 GraphicsPoint mappedPoint() const;
 105 GraphicsQuad mappedQuad() const;
106106 void flatten();
107107
108  FloatPoint m_lastPlanarPoint;
109  FloatQuad m_lastPlanarQuad;
 108 GraphicsPoint m_lastPlanarPoint;
 109 GraphicsQuad m_lastPlanarQuad;
110110 TransformationMatrix m_accumulatedTransform;
111111 bool m_accumulatingTransform;
112112
113113private:
114  HitTestingTransformState(const FloatPoint& p, const FloatQuad& quad)
 114 HitTestingTransformState(const GraphicsPoint& p, const GraphicsQuad& quad)
115115 : m_lastPlanarPoint(p)
116116 , m_lastPlanarQuad(quad)
117117 , m_accumulatingTransform(false)
90929

Source/WebCore/rendering/RenderWidget.cpp

186186 // style pointer).
187187 if (style()) {
188188 if (!needsLayout())
189  setWidgetGeometry(IntRect(localToAbsoluteQuad(FloatQuad(contentBoxRect())).boundingBox()), contentBoxRect().size());
 189 setWidgetGeometry(IntRect(localToAbsoluteQuad(GraphicsQuad(contentBoxRect())).boundingBox()), contentBoxRect().size());
190190 if (style()->visibility() != VISIBLE)
191191 m_widget->hide();
192192 else {

327327 return;
328328
329329 IntRect contentBox = contentBoxRect();
330  IntRect absoluteContentBox = IntRect(localToAbsoluteQuad(FloatQuad(contentBox)).boundingBox());
 330 IntRect absoluteContentBox = IntRect(localToAbsoluteQuad(GraphicsQuad(contentBox)).boundingBox());
331331 bool boundsChanged = setWidgetGeometry(absoluteContentBox, contentBox.size());
332332
333333 // if the frame bounds got changed, or if view needs layout (possibly indicating
90929

Source/WebCore/rendering/RenderInline.h

4747 virtual LayoutUnit marginEnd() const;
4848
4949 virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
50  virtual void absoluteQuads(Vector<FloatQuad>&);
 50 virtual void absoluteQuads(Vector<GraphicsQuad>&);
5151
5252 virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&) const;
5353

9898
9999 virtual bool isRenderInline() const { return true; }
100100
101  FloatRect culledInlineBoundingBox(const RenderInline* container) const;
 101 GraphicsRect culledInlineBoundingBox(const RenderInline* container) const;
102102 IntRect culledInlineVisualOverflowBoundingBox() const;
103103 InlineBox* culledInlineFirstLineBox() const;
104104 InlineBox* culledInlineLastLineBox() const;
105105 void culledInlineAbsoluteRects(const RenderInline* container, Vector<IntRect>&, const IntSize&);
106  void culledInlineAbsoluteQuads(const RenderInline* container, Vector<FloatQuad>&);
 106 void culledInlineAbsoluteQuads(const RenderInline* container, Vector<GraphicsQuad>&);
107107
108108 void addChildToContinuation(RenderObject* newChild, RenderObject* beforeChild);
109109 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObject* beforeChild = 0);
90929

Source/WebCore/rendering/RootInlineBox.cpp

152152 return;
153153
154154 // Highlight acts as a selection inflation.
155  FloatRect rootRect(0, selectionTop(), logicalWidth(), selectionHeight());
 155 GraphicsRect rootRect(0, selectionTop(), logicalWidth(), selectionHeight());
156156 IntRect inflatedRect = enclosingIntRect(page->chrome()->client()->customHighlightRect(renderer()->node(), renderer()->style()->highlight(), rootRect));
157157 setOverflowFromLogicalRects(inflatedRect, inflatedRect, lineTop(), lineBottom());
158158}

170170 return;
171171
172172 // Get the inflated rect so that we can properly hit test.
173  FloatRect rootRect(paintOffset.x() + x(), paintOffset.y() + selectionTop(), logicalWidth(), selectionHeight());
174  FloatRect inflatedRect = page->chrome()->client()->customHighlightRect(renderer()->node(), highlightType, rootRect);
 173 GraphicsRect rootRect(paintOffset.x() + x(), paintOffset.y() + selectionTop(), logicalWidth(), selectionHeight());
 174 GraphicsRect inflatedRect = page->chrome()->client()->customHighlightRect(renderer()->node(), highlightType, rootRect);
175175 if (inflatedRect.intersects(paintInfo.rect))
176176 page->chrome()->client()->paintCustomHighlight(renderer()->node(), highlightType, rootRect, rootRect, false, true);
177177}
90929

Source/WebCore/rendering/RenderBlock.h

632632 LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, LayoutUnit position);
633633
634634 virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
635  virtual void absoluteQuads(Vector<FloatQuad>&);
 635 virtual void absoluteQuads(Vector<GraphicsQuad>&);
636636
637637 LayoutUnit desiredColumnWidth() const;
638638 unsigned desiredColumnCount() const;
90929

Source/WebCore/rendering/RenderMenuList.cpp

299299
300300 // Compute the top left taking transforms into account, but use
301301 // the actual width of the element to size the popup.
302  FloatPoint absTopLeft = localToAbsolute(FloatPoint(), false, true);
 302 GraphicsPoint absTopLeft = localToAbsolute(GraphicsPoint(), false, true);
303303 IntRect absBounds = absoluteBoundingBoxRect();
304304 absBounds.setLocation(roundedIntPoint(absTopLeft));
305305 m_popup->show(absBounds, document()->view(),
90929

Source/WebCore/rendering/RenderView.cpp

2323
2424#include "Document.h"
2525#include "Element.h"
26 #include "FloatQuad.h"
 26#include "GraphicsQuad.h"
2727#include "Frame.h"
2828#include "FrameView.h"
2929#include "GraphicsContext.h"

331331 rects.append(LayoutRect(accumulatedOffset, m_layer->size()));
332332}
333333
334 void RenderView::absoluteQuads(Vector<FloatQuad>& quads)
 334void RenderView::absoluteQuads(Vector<GraphicsQuad>& quads)
335335{
336  quads.append(FloatRect(FloatPoint(), m_layer->size()));
 336 quads.append(GraphicsRect(GraphicsPoint(), m_layer->size()));
337337}
338338
339339static RenderObject* rendererAfterPosition(RenderObject* object, unsigned offset)

379379 // RenderSelectionInfo::rect() is in the coordinates of the repaintContainer, so map to page coordinates.
380380 IntRect currRect = info->rect();
381381 if (RenderBoxModelObject* repaintContainer = info->repaintContainer()) {
382  FloatQuad absQuad = repaintContainer->localToAbsoluteQuad(FloatRect(currRect));
 382 GraphicsQuad absQuad = repaintContainer->localToAbsoluteQuad(GraphicsRect(currRect));
383383 currRect = absQuad.enclosingBoundingBox();
384384 }
385385 selRect.unite(currRect);
90929

Source/WebCore/rendering/LayoutState.cpp

4646 bool fixed = renderer->isPositioned() && renderer->style()->position() == FixedPosition;
4747 if (fixed) {
4848 // FIXME: This doesn't work correctly with transforms.
49  FloatPoint fixedOffset = renderer->view()->localToAbsolute(FloatPoint(), true);
 49 GraphicsPoint fixedOffset = renderer->view()->localToAbsolute(GraphicsPoint(), true);
5050 m_paintOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset;
5151 } else
5252 m_paintOffset = prev->m_paintOffset + offset;

117117#endif
118118{
119119 RenderObject* container = root->container();
120  FloatPoint absContentPoint = container->localToAbsolute(FloatPoint(), false, true);
 120 GraphicsPoint absContentPoint = container->localToAbsolute(GraphicsPoint(), false, true);
121121 m_paintOffset = LayoutSize(absContentPoint.x(), absContentPoint.y());
122122
123123 if (container->hasOverflowClip()) {
90929

Source/WebCore/rendering/RenderListBox.cpp

479479 const int speedReducer = 4;
480480
481481 // FIXME: This doesn't work correctly with transforms.
482  FloatPoint absOffset = localToAbsolute();
 482 GraphicsPoint absOffset = localToAbsolute();
483483
484484 IntPoint currentMousePosition = frame()->eventHandler()->currentMousePosition();
485485 // We need to check if the current mouse position is out of the window. When the mouse is out of the window, the position is incoherent

521521int RenderListBox::scrollToward(const IntPoint& destination)
522522{
523523 // FIXME: This doesn't work correctly with transforms.
524  FloatPoint absPos = localToAbsolute();
 524 GraphicsPoint absPos = localToAbsolute();
525525 int offsetX = destination.x() - absPos.x();
526526 int offsetY = destination.y() - absPos.y();
527527
90929

Source/WebCore/rendering/HitTestResult.h

2020#ifndef HitTestResult_h
2121#define HitTestResult_h
2222
23 #include "FloatRect.h"
 23#include "GraphicsRect.h"
2424#include "LayoutTypes.h"
2525#include "TextDirection.h"
2626#include <wtf/Forward.h>

110110 // Returns true if it is rect-based hit test and needs to continue until the rect is fully
111111 // enclosed by the boundaries of a node.
112112 bool addNodeToRectBasedTestResult(Node*, const LayoutPoint& pointInContainer, const LayoutRect& = IntRect());
113  bool addNodeToRectBasedTestResult(Node*, const LayoutPoint& pointInContainer, const FloatRect&);
 113 bool addNodeToRectBasedTestResult(Node*, const LayoutPoint& pointInContainer, const GraphicsRect&);
114114 void append(const HitTestResult&);
115115
116116 // If m_rectBasedTestResult is 0 then set it to a new NodeSet. Return *m_rectBasedTestResult. Lazy allocation makes
90929

Source/WebCore/rendering/RenderThemeMac.h

181181
182182 IntRect inflateRect(const IntRect&, const IntSize&, const int* margins, float zoomLevel = 1.0f) const;
183183
184  FloatRect convertToPaintingRect(const RenderObject* inputRenderer, const RenderObject* partRenderer, const FloatRect& inputRect, const IntRect& r) const;
 184 GraphicsRect convertToPaintingRect(const RenderObject* inputRenderer, const RenderObject* partRenderer, const GraphicsRect& inputRect, const IntRect& r) const;
185185
186186 // Get the control size based off the font. Used by some of the controls (like buttons).
187187 NSControlSize controlSizeForFont(RenderStyle*) const;
90929

Source/WebCore/rendering/EllipsisBox.h

3131public:
3232 EllipsisBox(RenderObject* obj, const AtomicString& ellipsisStr, InlineFlowBox* parent,
3333 int width, int height, int y, bool firstLine, bool isVertical, InlineBox* markupBox)
34  : InlineBox(obj, FloatPoint(0, y), width, firstLine, true, false, false, isVertical, 0, 0, parent)
 34 : InlineBox(obj, GraphicsPoint(0, y), width, firstLine, true, false, false, isVertical, 0, 0, parent)
3535 , m_height(height)
3636 , m_str(ellipsisStr)
3737 , m_markupBox(markupBox)
90929

Source/WebCore/rendering/RenderTheme.cpp

503503IntPoint RenderTheme::volumeSliderOffsetFromMuteButton(RenderBox* muteButtonBox, const IntSize& size) const
504504{
505505 int y = -size.height();
506  FloatPoint absPoint = muteButtonBox->localToAbsolute(FloatPoint(muteButtonBox->offsetLeft(), y), true, true);
 506 GraphicsPoint absPoint = muteButtonBox->localToAbsolute(GraphicsPoint(muteButtonBox->offsetLeft(), y), true, true);
507507 if (absPoint.y() < 0)
508508 y = muteButtonBox->height();
509509 return IntPoint(0, y);
90929

Source/WebCore/rendering/RenderMediaControls.cpp

7171}
7272
7373// Utility to scale when the UI part are not scaled by wkDrawMediaUIPart
74 static FloatRect getUnzoomedRectAndAdjustCurrentContext(RenderObject* o, const PaintInfo& paintInfo, const IntRect &originalRect)
 74static GraphicsRect getUnzoomedRectAndAdjustCurrentContext(RenderObject* o, const PaintInfo& paintInfo, const IntRect &originalRect)
7575{
7676 float zoomLevel = o->style()->effectiveZoom();
77  FloatRect unzoomedRect(originalRect);
 77 GraphicsRect unzoomedRect(originalRect);
7878 if (zoomLevel != 1.0f) {
7979 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
8080 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
8181 paintInfo.context->translate(unzoomedRect.x(), unzoomedRect.y());
82  paintInfo.context->scale(FloatSize(zoomLevel, zoomLevel));
 82 paintInfo.context->scale(GraphicsSize(zoomLevel, zoomLevel));
8383 paintInfo.context->translate(-unzoomedRect.x(), -unzoomedRect.y());
8484 }
8585 return unzoomedRect;

146146 break;
147147 case MediaSlider: {
148148 if (HTMLMediaElement* mediaElement = toParentMediaElement(o)) {
149  FloatRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
 149 GraphicsRect unzoomedRect = getUnzoomedRectAndAdjustCurrentContext(o, paintInfo, r);
150150 wkDrawMediaSliderTrack(themeStyle, paintInfo.context->platformContext(), unzoomedRect, mediaElement->percentLoaded() * mediaElement->duration(), mediaElement->currentTime(), mediaElement->duration(), determineState(o));
151151 }
152152 break;

189189
190190 float zoomLevel = muteButtonBox->style()->effectiveZoom();
191191 int y = yOffset * zoomLevel + muteButtonBox->offsetHeight() - size.height();
192  FloatPoint absPoint = muteButtonBox->localToAbsolute(FloatPoint(muteButtonBox->offsetLeft(), y), true, true);
 192 GraphicsPoint absPoint = muteButtonBox->localToAbsolute(GraphicsPoint(muteButtonBox->offsetLeft(), y), true, true);
193193 if (absPoint.y() < 0)
194194 y = muteButtonBox->height();
195195 return IntPoint(xOffset * zoomLevel, y);
90929

Source/WebCore/rendering/svg/SVGTextQuery.h

2121#define SVGTextQuery_h
2222
2323#if ENABLE(SVG)
24 #include "FloatRect.h"
 24#include "GraphicsRect.h"
2525#include "SVGTextFragment.h"
2626#include <wtf/Vector.h>
2727

3838 unsigned numberOfCharacters() const;
3939 float textLength() const;
4040 float subStringLength(unsigned startPosition, unsigned length) const;
41  FloatPoint startPositionOfCharacter(unsigned position) const;
42  FloatPoint endPositionOfCharacter(unsigned position) const;
 41 GraphicsPoint startPositionOfCharacter(unsigned position) const;
 42 GraphicsPoint endPositionOfCharacter(unsigned position) const;
4343 float rotationOfCharacter(unsigned position) const;
44  FloatRect extentOfCharacter(unsigned position) const;
45  int characterNumberAtPosition(const FloatPoint&) const;
 44 GraphicsRect extentOfCharacter(unsigned position) const;
 45 int characterNumberAtPosition(const GraphicsPoint&) const;
4646
4747 // Public helper struct. Private classes in SVGTextQuery inherit from it.
4848 struct Data;
90929

Source/WebCore/rendering/svg/RenderSVGResourceRadialGradient.cpp

5050 SVGRadialGradientElement* radialGradientElement = static_cast<SVGRadialGradientElement*>(gradientElement);
5151
5252 // Determine gradient focal/center points and radius
53  FloatPoint focalPoint;
54  FloatPoint centerPoint;
 53 GraphicsPoint focalPoint;
 54 GraphicsPoint centerPoint;
5555 float radius;
5656 radialGradientElement->calculateFocalCenterPointsAndRadius(m_attributes, focalPoint, centerPoint, radius);
5757
90929

Source/WebCore/rendering/svg/RenderSVGInline.h

4141 // We search for the root text element and take its bounding box.
4242 // It is also necessary to take the stroke and repaint rect of
4343 // this element, since we need it for filters.
44  virtual FloatRect objectBoundingBox() const;
45  virtual FloatRect strokeBoundingBox() const;
46  virtual FloatRect repaintRectInLocalCoordinates() const;
 44 virtual GraphicsRect objectBoundingBox() const;
 45 virtual GraphicsRect strokeBoundingBox() const;
 46 virtual GraphicsRect repaintRectInLocalCoordinates() const;
4747
4848 virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
4949 virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
5050 virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
51  virtual void absoluteQuads(Vector<FloatQuad>&);
 51 virtual void absoluteQuads(Vector<GraphicsQuad>&);
5252
5353private:
5454 virtual InlineFlowBox* createInlineFlowBox();
90929

Source/WebCore/rendering/svg/SVGImageBufferTools.cpp

5050 }
5151}
5252
53 bool SVGImageBufferTools::createImageBuffer(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace)
 53bool SVGImageBufferTools::createImageBuffer(const GraphicsRect& absoluteTargetRect, const GraphicsRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace)
5454{
5555 IntSize imageSize(roundedImageBufferSize(clampedAbsoluteTargetRect.size()));
5656 IntSize unclampedImageSize(SVGImageBufferTools::roundedImageBufferSize(absoluteTargetRect.size()));

6767 ASSERT(imageContext);
6868
6969 // Compensate rounding effects, as the absolute target rect is using floating-point numbers and the image buffer size is integer.
70  imageContext->scale(FloatSize(unclampedImageSize.width() / absoluteTargetRect.width(), unclampedImageSize.height() / absoluteTargetRect.height()));
 70 imageContext->scale(GraphicsSize(unclampedImageSize.width() / absoluteTargetRect.width(), unclampedImageSize.height() / absoluteTargetRect.height()));
7171
7272 imageBuffer = image.release();
7373 return true;

9191 contentTransformation = savedContentTransformation;
9292}
9393
94 void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer)
 94void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const GraphicsRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer)
9595{
9696 ASSERT(context);
9797 ASSERT(imageBuffer);

108108 imageBuffer.clear();
109109}
110110
111 IntSize SVGImageBufferTools::roundedImageBufferSize(const FloatSize& size)
 111IntSize SVGImageBufferTools::roundedImageBufferSize(const GraphicsSize& size)
112112{
113113 return IntSize(static_cast<int>(lroundf(size.width())), static_cast<int>(lroundf(size.height())));
114114}
115115
116 FloatRect SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(const RenderObject* renderer, const FloatRect& absoluteTargetRect)
 116GraphicsRect SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(const RenderObject* renderer, const GraphicsRect& absoluteTargetRect)
117117{
118118 ASSERT(renderer);
119119
120120 const RenderSVGRoot* svgRoot = SVGRenderSupport::findTreeRootObject(renderer);
121  FloatRect clampedAbsoluteTargetRect = absoluteTargetRect;
 121 GraphicsRect clampedAbsoluteTargetRect = absoluteTargetRect;
122122 clampedAbsoluteTargetRect.intersect(svgRoot->frameRect());
123123 return clampedAbsoluteTargetRect;
124124}
90929

Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp

2828
2929#include "AffineTransform.h"
3030#include "FilterEffect.h"
31 #include "FloatPoint.h"
32 #include "FloatRect.h"
 31#include "GraphicsPoint.h"
 32#include "GraphicsRect.h"
3333#include "GraphicsContext.h"
3434#include "Image.h"
3535#include "ImageBuffer.h"

121121 return builder.release();
122122}
123123
124 bool RenderSVGResourceFilter::fitsInMaximumImageSize(const FloatSize& size, FloatSize& scale)
 124bool RenderSVGResourceFilter::fitsInMaximumImageSize(const GraphicsSize& size, GraphicsSize& scale)
125125{
126126 bool matchesFilterSize = true;
127127 if (size.width() > kMaxFilterSize) {

157157 }
158158
159159 OwnPtr<FilterData> filterData(adoptPtr(new FilterData));
160  FloatRect targetBoundingBox = object->objectBoundingBox();
 160 GraphicsRect targetBoundingBox = object->objectBoundingBox();
161161
162162 SVGFilterElement* filterElement = static_cast<SVGFilterElement*>(node());
163163 filterData->boundaries = filterElement->filterBoundingBox(targetBoundingBox);

174174 filterData->shearFreeAbsoluteTransform = AffineTransform(absoluteTransform.xScale(), 0, 0, absoluteTransform.yScale(), absoluteTransform.e(), absoluteTransform.f());
175175
176176 // Determine absolute boundaries of the filter and the drawing region.
177  FloatRect absoluteFilterBoundaries = filterData->shearFreeAbsoluteTransform.mapRect(filterData->boundaries);
178  FloatRect drawingRegion = object->strokeBoundingBox();
 177 GraphicsRect absoluteFilterBoundaries = filterData->shearFreeAbsoluteTransform.mapRect(filterData->boundaries);
 178 GraphicsRect drawingRegion = object->strokeBoundingBox();
179179 drawingRegion.intersect(filterData->boundaries);
180  FloatRect absoluteDrawingRegion = filterData->shearFreeAbsoluteTransform.mapRect(drawingRegion);
 180 GraphicsRect absoluteDrawingRegion = filterData->shearFreeAbsoluteTransform.mapRect(drawingRegion);
181181
182182 // Create the SVGFilter object.
183183 bool primitiveBoundingBoxMode = filterElement->primitiveUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;

190190
191191 // Calculate the scale factor for the use of filterRes.
192192 // Also see http://www.w3.org/TR/SVG/filters.html#FilterEffectsRegion
193  FloatSize scale(1, 1);
 193 GraphicsSize scale(1, 1);
194194 if (filterElement->hasAttribute(SVGNames::filterResAttr)) {
195195 scale.setWidth(filterElement->filterResX() / absoluteFilterBoundaries.width());
196196 scale.setHeight(filterElement->filterResY() / absoluteFilterBoundaries.height());

200200 return false;
201201
202202 // Determine scale factor for filter. The size of intermediate ImageBuffers shouldn't be bigger than kMaxFilterSize.
203  FloatRect tempSourceRect = absoluteDrawingRegion;
 203 GraphicsRect tempSourceRect = absoluteDrawingRegion;
204204 tempSourceRect.scale(scale.width(), scale.height());
205205 fitsInMaximumImageSize(tempSourceRect.size(), scale);
206206

212212 return false;
213213
214214 RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion(lastEffect);
215  FloatRect subRegion = lastEffect->maxEffectRect();
 215 GraphicsRect subRegion = lastEffect->maxEffectRect();
216216 // At least one FilterEffect has a too big image size,
217217 // recalculate the effect sizes with new scale factors.
218218 if (!fitsInMaximumImageSize(subRegion.size(), scale)) {

247247 sourceGraphicContext->scale(scale);
248248
249249 sourceGraphicContext->concatCTM(filterData->shearFreeAbsoluteTransform);
250  sourceGraphicContext->clearRect(FloatRect(FloatPoint(), absoluteDrawingRegion.size()));
 250 sourceGraphicContext->clearRect(GraphicsRect(GraphicsPoint(), absoluteDrawingRegion.size()));
251251 filterData->sourceGraphicBuffer = sourceGraphic.release();
252252 filterData->savedContext = context;
253253

316316 if (resultImage) {
317317 context->concatCTM(filterData->shearFreeAbsoluteTransform.inverse());
318318
319  context->scale(FloatSize(1 / filterData->filter->filterResolution().width(), 1 / filterData->filter->filterResolution().height()));
 319 context->scale(GraphicsSize(1 / filterData->filter->filterResolution().width(), 1 / filterData->filter->filterResolution().height()));
320320 context->clip(lastEffect->maxEffectRect());
321321 context->drawImageBuffer(resultImage, object->style()->colorSpace(), lastEffect->absolutePaintRect());
322322 context->scale(filterData->filter->filterResolution());

327327 filterData->sourceGraphicBuffer.clear();
328328}
329329
330 FloatRect RenderSVGResourceFilter::resourceBoundingBox(RenderObject* object)
 330GraphicsRect RenderSVGResourceFilter::resourceBoundingBox(RenderObject* object)
331331{
332332 if (SVGFilterElement* element = static_cast<SVGFilterElement*>(node()))
333333 return element->filterBoundingBox(object->objectBoundingBox());
334334
335  return FloatRect();
 335 return GraphicsRect();
336336}
337337
338338void RenderSVGResourceFilter::primitiveAttributeChanged(RenderObject* object, const QualifiedName& attribute)
90929

Source/WebCore/rendering/svg/RenderSVGHiddenContainer.cpp

4444 // This subtree does not paint.
4545}
4646
47 void RenderSVGHiddenContainer::absoluteQuads(Vector<FloatQuad>&)
 47void RenderSVGHiddenContainer::absoluteQuads(Vector<GraphicsQuad>&)
4848{
4949 // This subtree does not take up space or paint
5050}
5151
52 bool RenderSVGHiddenContainer::nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint&, HitTestAction)
 52bool RenderSVGHiddenContainer::nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint&, HitTestAction)
5353{
5454 return false;
5555}
90929

Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp

5050 SVGLinearGradientElement* linearGradientElement = static_cast<SVGLinearGradientElement*>(gradientElement);
5151
5252 // Determine gradient start/end points
53  FloatPoint startPoint;
54  FloatPoint endPoint;
 53 GraphicsPoint startPoint;
 54 GraphicsPoint endPoint;
5555 linearGradientElement->calculateStartEndPoints(m_attributes, startPoint, endPoint);
5656
5757 gradientData->gradient = Gradient::create(startPoint, endPoint);
90929

Source/WebCore/rendering/svg/RenderSVGTextPath.cpp

2222#if ENABLE(SVG)
2323#include "RenderSVGTextPath.h"
2424
25 #include "FloatQuad.h"
 25#include "GraphicsQuad.h"
2626#include "RenderBlock.h"
2727#include "SVGInlineTextBox.h"
2828#include "SVGNames.h"
90929

Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp

8585 AffineTransform absoluteTransform;
8686 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(textRootBlock, absoluteTransform);
8787
88  FloatRect absoluteTargetRect = absoluteTransform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
89  FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(textRootBlock, absoluteTargetRect);
 88 GraphicsRect absoluteTargetRect = absoluteTransform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
 89 GraphicsRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(textRootBlock, absoluteTargetRect);
9090 if (clampedAbsoluteTargetRect.isEmpty())
9191 return false;
9292

109109
110110static inline AffineTransform clipToTextMask(GraphicsContext* context,
111111 OwnPtr<ImageBuffer>& imageBuffer,
112  FloatRect& targetRect,
 112 GraphicsRect& targetRect,
113113 RenderObject* object,
114114 bool boundingBoxMode,
115115 const AffineTransform& gradientTransform)

122122 AffineTransform absoluteTransform;
123123 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(textRootBlock, absoluteTransform);
124124
125  FloatRect absoluteTargetRect = absoluteTransform.mapRect(targetRect);
126  FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(textRootBlock, absoluteTargetRect);
 125 GraphicsRect absoluteTargetRect = absoluteTransform.mapRect(targetRect);
 126 GraphicsRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(textRootBlock, absoluteTargetRect);
127127
128128 SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, imageBuffer);
129129
130130 AffineTransform matrix;
131131 if (boundingBoxMode) {
132  FloatRect maskBoundingBox = textRootBlock->objectBoundingBox();
 132 GraphicsRect maskBoundingBox = textRootBlock->objectBoundingBox();
133133 matrix.translate(maskBoundingBox.x(), maskBoundingBox.y());
134134 matrix.scaleNonUniform(maskBoundingBox.width(), maskBoundingBox.height());
135135 }

163163
164164 // Spec: When the geometry of the applicable element has no width or height and objectBoundingBox is specified,
165165 // then the given effect (e.g. a gradient or a filter) will be ignored.
166  FloatRect objectBoundingBox = object->objectBoundingBox();
 166 GraphicsRect objectBoundingBox = object->objectBoundingBox();
167167 if (boundingBoxMode() && objectBoundingBox.isEmpty())
168168 return false;
169169

249249 AffineTransform gradientTransform;
250250 calculateGradientTransform(gradientTransform);
251251
252  FloatRect targetRect;
 252 GraphicsRect targetRect;
253253 gradientData->gradient->setGradientSpaceTransform(clipToTextMask(context, m_imageBuffer, targetRect, object, boundingBoxMode(), gradientTransform));
254254 context->setFillGradient(gradientData->gradient);
255255
90929

Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp

565565 break;
566566
567567 bool ok = false;
568  FloatPoint point = m_textPath.pointAtLength(textPathOffset, ok);
 568 GraphicsPoint point = m_textPath.pointAtLength(textPathOffset, ok);
569569 ASSERT(ok);
570570
571571 x = point.x();
90929

Source/WebCore/rendering/svg/RenderSVGResourceClipper.h

2121#define RenderSVGResourceClipper_h
2222
2323#if ENABLE(SVG)
24 #include "FloatRect.h"
 24#include "GraphicsRect.h"
2525#include "GraphicsContext.h"
2626#include "ImageBuffer.h"
2727#include "IntSize.h"

5252 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true);
5353
5454 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
55  virtual FloatRect resourceBoundingBox(RenderObject*);
 55 virtual GraphicsRect resourceBoundingBox(RenderObject*);
5656
5757 virtual RenderSVGResourceType resourceType() const { return ClipperResourceType; }
5858
59  bool hitTestClipContent(const FloatRect&, const FloatPoint&);
 59 bool hitTestClipContent(const GraphicsRect&, const GraphicsPoint&);
6060
6161 SVGUnitTypes::SVGUnitType clipPathUnits() const { return static_cast<SVGClipPathElement*>(node())->clipPathUnits(); }
6262

6464private:
6565 // clipPath can be clipped too, but don't have a boundingBox or repaintRect. So we can't call
6666 // applyResource directly and use the rects from the object, since they are empty for RenderSVGResources
67  bool applyClippingToContext(RenderObject*, const FloatRect&, const FloatRect&, GraphicsContext*);
68  bool pathOnlyClipping(GraphicsContext*, const FloatRect&);
69  bool drawContentIntoMaskImage(ClipperData*, const FloatRect& objectBoundingBox);
 67 bool applyClippingToContext(RenderObject*, const GraphicsRect&, const GraphicsRect&, GraphicsContext*);
 68 bool pathOnlyClipping(GraphicsContext*, const GraphicsRect&);
 69 bool drawContentIntoMaskImage(ClipperData*, const GraphicsRect& objectBoundingBox);
7070 void calculateClipContentRepaintRect();
7171
7272 bool m_invalidationBlocked;
73  FloatRect m_clipBoundaries;
 73 GraphicsRect m_clipBoundaries;
7474 HashMap<RenderObject*, ClipperData*> m_clipper;
7575};
7676
90929

Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp

112112 updateCachedBoundariesInParents = true;
113113 }
114114
115  FloatRect oldViewport = m_viewport;
 115 GraphicsRect oldViewport = m_viewport;
116116
117117 // Cache viewport boundaries
118  FloatPoint viewportLocation(foreign->x().value(foreign), foreign->y().value(foreign));
119  m_viewport = FloatRect(viewportLocation, FloatSize(foreign->width().value(foreign), foreign->height().value(foreign)));
 118 GraphicsPoint viewportLocation(foreign->x().value(foreign), foreign->y().value(foreign));
 119 m_viewport = GraphicsRect(viewportLocation, GraphicsSize(foreign->width().value(foreign), foreign->height().value(foreign)));
120120 if (!updateCachedBoundariesInParents)
121121 updateCachedBoundariesInParents = oldViewport != m_viewport;
122122

142142 repainter.repaintAfterLayout();
143143}
144144
145 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
 145bool RenderSVGForeignObject::nodeAtGraphicsPoint(const HitTestRequest& request, HitTestResult& result, const GraphicsPoint& pointInParent, HitTestAction hitTestAction)
146146{
147  FloatPoint localPoint = localTransform().inverse().mapPoint(pointInParent);
 147 GraphicsPoint localPoint = localTransform().inverse().mapPoint(pointInParent);
148148
149149 // Early exit if local point is not contained in clipped viewport area
150150 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPoint))
90929

Source/WebCore/rendering/svg/SVGMarkerData.h

4444 {
4545 }
4646
47  FloatPoint origin() const { return m_origin; }
 47 GraphicsPoint origin() const { return m_origin; }
4848 RenderSVGResourceMarker* marker() const { return m_marker; }
4949
5050 float currentAngle() const
5151 {
52  FloatSize inslopeChange = m_inslopePoints[1] - m_inslopePoints[0];
53  FloatSize outslopeChange = m_outslopePoints[1] - m_outslopePoints[0];
 52 GraphicsSize inslopeChange = m_inslopePoints[1] - m_inslopePoints[0];
 53 GraphicsSize outslopeChange = m_outslopePoints[1] - m_outslopePoints[0];
5454
5555 double inslope = rad2deg(atan2(inslopeChange.height(), inslopeChange.width()));
5656 double outslope = rad2deg(atan2(outslopeChange.height(), outslopeChange.width()));

8080 m_marker = marker;
8181 }
8282
83  void updateOutslope(const FloatPoint& point)
 83 void updateOutslope(const GraphicsPoint& point)
8484 {
8585 m_outslopePoints[0] = m_origin;
8686 m_outslopePoints[1] = point;

8888
8989 void updateMarkerDataForPathElement(const PathElement* element)
9090 {
91  FloatPoint* points = element->points;
 91 GraphicsPoint* points = element->points;
9292
9393 switch (element->type) {
9494 case PathElementAddQuadCurveToPoint:

109109 case PathElementCloseSubpath:
110110 updateInslope(points[0]);
111111 m_origin = m_subpathStart;
112  m_subpathStart = FloatPoint();
 112 m_subpathStart = GraphicsPoint();
113113 }
114114 }
115115
116116private:
117  void updateInslope(const FloatPoint& point)
 117 void updateInslope(const GraphicsPoint& point)
118118 {
119119 m_inslopePoints[0] = m_origin;
120120 m_inslopePoints[1] = point;

122122
123123 Type m_type;
124124 RenderSVGResourceMarker* m_marker;
125  FloatPoint m_origin;
126  FloatPoint m_subpathStart;
127  FloatPoint m_inslopePoints[2];
128  FloatPoint m_outslopePoints[2];
 125 GraphicsPoint m_origin;
 126 GraphicsPoint m_subpathStart;
 127 GraphicsPoint m_inslopePoints[2];
 128 GraphicsPoint m_outslopePoints[2];
129129};
130130
131131}
90929

Source/WebCore/rendering/svg/RenderSVGViewportContainer.cpp

4949 if (element->hasTagName(SVGNames::svgTag)) {
5050 SVGSVGElement* svg = static_cast<SVGSVGElement*>(element);
5151
52  FloatRect oldViewport = m_viewport;
53  m_viewport = FloatRect(svg->x().value(svg)
 52 GraphicsRect oldViewport = m_viewport;
 53 m_viewport = GraphicsRect(svg->x().value(svg)
5454 , svg->y().value(svg)
5555 , svg->width().value(svg)
5656 , svg->height().value(svg));

7878 // return viewportTranslation * localTransform() * viewportTransform()
7979}
8080
81 bool RenderSVGViewportContainer::pointIsInsideViewportClip(const FloatPoint& pointInParent)
 81bool RenderSVGViewportContainer::pointIsInsideViewportClip(const GraphicsPoint& pointInParent)
8282{
8383 // Respect the viewport clip (which is in parent coords)
8484 if (!SVGRenderSupport::isOverflowHidden(this))
90929

Source/WebCore/rendering/svg/RenderSVGContainer.cpp

100100 if (!firstChild() && !selfWillPaint())
101101 return;
102102
103  FloatRect repaintRect = repaintRectInLocalCoordinates();
 103 GraphicsRect repaintRect = repaintRectInLocalCoordinates();
104104 if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(repaintRect, localToParentTransform(), paintInfo))
105105 return;
106106

148148
149149void RenderSVGContainer::updateCachedBoundaries()
150150{
151  m_objectBoundingBox = FloatRect();
152  m_strokeBoundingBox = FloatRect();
153  m_repaintBoundingBox = FloatRect();
 151 m_objectBoundingBox = GraphicsRect();
 152 m_strokeBoundingBox = GraphicsRect();
 153 m_repaintBoundingBox = GraphicsRect();
154154
155155 SVGRenderSupport::computeContainerBoundingBoxes(this, m_objectBoundingBox, m_strokeBoundingBox, m_repaintBoundingBox);
156156 SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingBox);
157157}
158158
159 bool RenderSVGContainer::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
 159bool RenderSVGContainer::nodeAtGraphicsPoint(const HitTestRequest& request, HitTestResult& result, const GraphicsPoint& pointInParent, HitTestAction hitTestAction)
160160{
161161 // Give RenderSVGViewportContainer a chance to apply its viewport clip
162162 if (!pointIsInsideViewportClip(pointInParent))
163163 return false;
164164
165  FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
 165 GraphicsPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
166166
167167 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
168168 return false;
169169
170170 for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
171  if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) {
 171 if (child->nodeAtGraphicsPoint(request, result, localPoint, hitTestAction)) {
172172 updateHitTestResult(result, roundedLayoutPoint(localPoint));
173173 return true;
174174 }
90929

Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp

6262 }
6363}
6464
65 FloatRect RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion(FilterEffect* effect)
 65GraphicsRect RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion(FilterEffect* effect)
6666{
67  FloatRect uniteRect;
68  FloatRect subregionBoundingBox = effect->effectBoundaries();
69  FloatRect subregion = subregionBoundingBox;
 67 GraphicsRect uniteRect;
 68 GraphicsRect subregionBoundingBox = effect->effectBoundaries();
 69 GraphicsRect subregion = subregionBoundingBox;
7070 SVGFilter* filter = static_cast<SVGFilter*>(effect->filter());
7171 ASSERT(filter);
7272

8585 if (filter->effectBoundingBoxMode()) {
8686 subregion = uniteRect;
8787 // Avoid the calling of a virtual method several times.
88  FloatRect targetBoundingBox = filter->targetBoundingBox();
 88 GraphicsRect targetBoundingBox = filter->targetBoundingBox();
8989
9090 if (effect->hasX())
9191 subregion.setX(targetBoundingBox.x() + subregionBoundingBox.x() * targetBoundingBox.width());

114114
115115 effect->setFilterPrimitiveSubregion(subregion);
116116
117  FloatRect absoluteSubregion = filter->mapLocalRectToAbsoluteRect(subregion);
118  FloatSize filterResolution = filter->filterResolution();
 117 GraphicsRect absoluteSubregion = filter->mapLocalRectToAbsoluteRect(subregion);
 118 GraphicsSize filterResolution = filter->filterResolution();
119119 absoluteSubregion.scale(filterResolution.width(), filterResolution.height());
120120
121121 // FEImage needs the unclipped subregion in absolute coordinates to determine the correct

124124 static_cast<FEImage*>(effect)->setAbsoluteSubregion(absoluteSubregion);
125125
126126 // Clip every filter effect to the filter region.
127  FloatRect absoluteScaledFilterRegion = filter->filterRegion();
 127 GraphicsRect absoluteScaledFilterRegion = filter->filterRegion();
128128 absoluteScaledFilterRegion.scale(filterResolution.width(), filterResolution.height());
129129 absoluteSubregion.intersect(absoluteScaledFilterRegion);
130130
90929

Source/WebCore/rendering/svg/RenderSVGInlineText.h

5353
5454 // FIXME: We need objectBoundingBox for DRT results and filters at the moment.
5555 // This should be fixed to give back the objectBoundingBox of the text root.
56  virtual FloatRect objectBoundingBox() const { return FloatRect(); }
 56 virtual GraphicsRect objectBoundingBox() const { return GraphicsRect(); }
5757
5858 virtual bool requiresLayer() const { return false; }
5959 virtual bool isSVGInlineText() const { return true; }
90929

Source/WebCore/rendering/svg/RenderSVGResourcePattern.h

2323
2424#if ENABLE(SVG)
2525#include "AffineTransform.h"
26 #include "FloatRect.h"
 26#include "GraphicsRect.h"
2727#include "ImageBuffer.h"
2828#include "Pattern.h"
2929#include "PatternAttributes.h"

5353
5454 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
5555 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode, const Path*);
56  virtual FloatRect resourceBoundingBox(RenderObject*) { return FloatRect(); }
 56 virtual GraphicsRect resourceBoundingBox(RenderObject*) { return GraphicsRect(); }
5757
5858 virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
5959 static RenderSVGResourceType s_resourceType;
6060
6161private:
62  bool buildTileImageTransform(RenderObject*, const PatternAttributes&, const SVGPatternElement*, FloatRect& patternBoundaries, AffineTransform& tileImageTransform) const;
 62 bool buildTileImageTransform(RenderObject*, const PatternAttributes&, const SVGPatternElement*, GraphicsRect& patternBoundaries, AffineTransform& tileImageTransform) const;
6363
64  PassOwnPtr<ImageBuffer> createTileImage(RenderObject*, const PatternAttributes&, const FloatRect& tileBoundaries,
65  const FloatRect& absoluteTileBoundaries, const AffineTransform& tileImageTransform) const;
 64 PassOwnPtr<ImageBuffer> createTileImage(RenderObject*, const PatternAttributes&, const GraphicsRect& tileBoundaries,
 65 const GraphicsRect& absoluteTileBoundaries, const AffineTransform& tileImageTransform) const;
6666
6767 bool m_shouldCollectPatternAttributes : 1;
6868 PatternAttributes m_attributes;
90929

Source/WebCore/rendering/svg/RenderSVGPath.cpp

2828#if ENABLE(SVG)
2929#include "RenderSVGPath.h"
3030
31 #include "FloatPoint.h"
32 #include "FloatQuad.h"
 31#include "GraphicsPoint.h"
 32#include "GraphicsQuad.h"
3333#include "GraphicsContext.h"
3434#include "HitTestRequest.h"
3535#include "PointerEventsHitRules.h"

7878{
7979}
8080
81 bool RenderSVGPath::fillContains(const FloatPoint& point, bool requiresFill, WindRule fillRule)
 81bool RenderSVGPath::fillContains(const GraphicsPoint& point, bool requiresFill, WindRule fillRule)
8282{
8383 if (!m_fillBoundingBox.contains(point))
8484 return false;

9090 return m_path.contains(point, fillRule);
9191}
9292
93 bool RenderSVGPath::strokeContains(const FloatPoint& point, bool requiresStroke)
 93bool RenderSVGPath::strokeContains(const GraphicsPoint& point, bool requiresStroke)
9494{
9595 if (!m_strokeAndMarkerBoundingBox.contains(point))
9696 return false;

202202 if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || m_path.isEmpty())
203203 return;
204204
205  FloatRect boundingBox = repaintRectInLocalCoordinates();
 205 GraphicsRect boundingBox = repaintRectInLocalCoordinates();
206206 if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo))
207207 return;
208208

243243 rects.append(rect);
244244}
245245
246 bool RenderSVGPath::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
 246bool RenderSVGPath::nodeAtGraphicsPoint(const HitTestRequest& request, HitTestResult& result, const GraphicsPoint& pointInParent, HitTestAction hitTestAction)
247247{
248248 // We only draw in the forground phase, so we only hit-test then.
249249 if (hitTestAction != HitTestForeground)
250250 return false;
251251
252  FloatPoint localPoint = m_localTransform.inverse().mapPoint(pointInParent);
 252 GraphicsPoint localPoint = m_localTransform.inverse().mapPoint(pointInParent);
253253
254254 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
255255 return false;

270270 return false;
271271}
272272
273 FloatRect RenderSVGPath::calculateMarkerBoundsIfNeeded()
 273GraphicsRect RenderSVGPath::calculateMarkerBoundsIfNeeded()
274274{
275275 SVGElement* svgElement = static_cast<SVGElement*>(node());
276276 ASSERT(svgElement && svgElement->document());
277277 if (!svgElement->isStyled())
278  return FloatRect();
 278 return GraphicsRect();
279279
280280 SVGStyledElement* styledElement = static_cast<SVGStyledElement*>(svgElement);
281281 if (!styledElement->supportsMarkers())
282  return FloatRect();
 282 return GraphicsRect();
283283
284284 const SVGRenderStyle* svgStyle = style()->svgStyle();
285285 ASSERT(svgStyle->hasMarkers());
286286
287287 SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this);
288288 if (!resources)
289  return FloatRect();
 289 return GraphicsRect();
290290
291291 RenderSVGResourceMarker* markerStart = resources->markerStart();
292292 RenderSVGResourceMarker* markerMid = resources->markerMid();
293293 RenderSVGResourceMarker* markerEnd = resources->markerEnd();
294294 if (!markerStart && !markerMid && !markerEnd)
295  return FloatRect();
 295 return GraphicsRect();
296296
297297 return m_markerLayoutInfo.calculateBoundaries(markerStart, markerMid, markerEnd, svgStyle->strokeWidth().value(svgElement), m_path);
298298}

300300void RenderSVGPath::updateCachedBoundaries()
301301{
302302 if (m_path.isEmpty()) {
303  m_fillBoundingBox = FloatRect();
304  m_strokeAndMarkerBoundingBox = FloatRect();
305  m_repaintBoundingBox = FloatRect();
 303 m_fillBoundingBox = GraphicsRect();
 304 m_strokeAndMarkerBoundingBox = GraphicsRect();
 305 m_repaintBoundingBox = GraphicsRect();
306306 return;
307307 }
308308

319319 }
320320
321321 if (svgStyle->hasMarkers()) {
322  FloatRect markerBounds = calculateMarkerBoundsIfNeeded();
 322 GraphicsRect markerBounds = calculateMarkerBoundsIfNeeded();
323323 if (!markerBounds.isEmpty())
324324 m_strokeAndMarkerBoundingBox.unite(markerBounds);
325325 }
90929

Source/WebCore/rendering/svg/RenderSVGResource.h

4545};
4646
4747class Color;
48 class FloatRect;
 48class GraphicsRect;
4949class GraphicsContext;
5050class Path;
5151class RenderObject;

6262
6363 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode) = 0;
6464 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short, const Path*) { }
65  virtual FloatRect resourceBoundingBox(RenderObject*) = 0;
 65 virtual GraphicsRect resourceBoundingBox(RenderObject*) = 0;
6666
6767 virtual RenderSVGResourceType resourceType() const = 0;
6868
90929

Source/WebCore/rendering/svg/SVGShadowTreeElements.cpp

2323#include "SVGShadowTreeElements.h"
2424
2525#include "Document.h"
26 #include "FloatSize.h"
 26#include "GraphicsSize.h"
2727#include "RenderObject.h"
2828#include "SVGNames.h"
2929#include "SVGUseElement.h"

4242 return adoptRef(new SVGShadowTreeContainerElement(document));
4343}
4444
45 FloatSize SVGShadowTreeContainerElement::containerTranslation() const
 45GraphicsSize SVGShadowTreeContainerElement::containerTranslation() const
4646{
47  return FloatSize(m_xOffset.value(this), m_yOffset.value(this));
 47 return GraphicsSize(m_xOffset.value(this), m_yOffset.value(this));
4848}
4949
5050PassRefPtr<Element> SVGShadowTreeContainerElement::cloneElementWithoutAttributesAndChildren() const
90929

Source/WebCore/rendering/svg/RenderSVGHiddenContainer.h

4444 virtual void paint(PaintInfo&, const LayoutPoint&);
4545
4646 virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject*) { return IntRect(); }
47  virtual void absoluteQuads(Vector<FloatQuad>&);
 47 virtual void absoluteQuads(Vector<GraphicsQuad>&);
4848
49  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 49 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
5050};
5151}
5252
90929

Source/WebCore/rendering/svg/RenderSVGGradientStop.h

4444 // RenderObject's default implementations ASSERT_NOT_REACHED()
4545 // https://bugs.webkit.org/show_bug.cgi?id=20400
4646 virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject*) { return IntRect(); }
47  virtual FloatRect objectBoundingBox() const { return FloatRect(); }
48  virtual FloatRect strokeBoundingBox() const { return FloatRect(); }
49  virtual FloatRect repaintRectInLocalCoordinates() const { return FloatRect(); }
 47 virtual GraphicsRect objectBoundingBox() const { return GraphicsRect(); }
 48 virtual GraphicsRect strokeBoundingBox() const { return GraphicsRect(); }
 49 virtual GraphicsRect repaintRectInLocalCoordinates() const { return GraphicsRect(); }
5050
5151protected:
5252 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
90929

Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp

8181 return it.runWidthSoFar();
8282}
8383
84 void SVGTextRunRenderingContext::drawSVGGlyphs(GraphicsContext* context, const TextRun& run, const SimpleFontData* fontData, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const FloatPoint& point) const
 84void SVGTextRunRenderingContext::drawSVGGlyphs(GraphicsContext* context, const TextRun& run, const SimpleFontData* fontData, const GlyphBuffer& glyphBuffer, int from, int numGlyphs, const GraphicsPoint& point) const
8585{
8686 SVGFontElement* fontElement = 0;
8787 SVGFontFaceElement* fontFaceElement = 0;

114114 float scale = scaleEmToUnits(fontData->platformData().size(), fontFaceElement->unitsPerEm());
115115 ASSERT(activePaintingResource);
116116
117  FloatPoint glyphOrigin;
 117 GraphicsPoint glyphOrigin;
118118 glyphOrigin.setX(svgFontData->horizontalOriginX() * scale);
119119 glyphOrigin.setY(svgFontData->horizontalOriginY() * scale);
120120
121  FloatPoint currentPoint = point;
 121 GraphicsPoint currentPoint = point;
122122 RenderSVGResourceMode resourceMode = context->textDrawingMode() == TextModeStroke ? ApplyToStrokeMode : ApplyToFillMode;
123123 for (int i = 0; i < numGlyphs; ++i) {
124124 Glyph glyph = glyphBuffer.glyphAt(from + i);
90929

Source/WebCore/rendering/svg/SVGRenderSupport.cpp

9292 float opacity = style->opacity();
9393 const ShadowData* shadow = svgStyle->shadow();
9494 if (opacity < 1 || shadow) {
95  FloatRect repaintRect = object->repaintRectInLocalCoordinates();
 95 GraphicsRect repaintRect = object->repaintRectInLocalCoordinates();
9696
9797 if (opacity < 1) {
9898 paintInfo.context->clip(repaintRect);

166166 paintInfo.context->endTransparencyLayer();
167167}
168168
169 void SVGRenderSupport::computeContainerBoundingBoxes(const RenderObject* container, FloatRect& objectBoundingBox, FloatRect& strokeBoundingBox, FloatRect& repaintBoundingBox)
 169void SVGRenderSupport::computeContainerBoundingBoxes(const RenderObject* container, GraphicsRect& objectBoundingBox, GraphicsRect& strokeBoundingBox, GraphicsRect& repaintBoundingBox)
170170{
171171 for (RenderObject* current = container->firstChild(); current; current = current->nextSibling()) {
172172 if (current->isSVGHiddenContainer())

185185 }
186186}
187187
188 bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo& paintInfo)
 188bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const GraphicsRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo& paintInfo)
189189{
190190 if (localTransform.isIdentity())
191191 return localRepaintRect.intersects(paintInfo.rect);

272272 return object->style()->overflowX() == OHIDDEN;
273273}
274274
275 void SVGRenderSupport::intersectRepaintRectWithResources(const RenderObject* object, FloatRect& repaintRect)
 275void SVGRenderSupport::intersectRepaintRectWithResources(const RenderObject* object, GraphicsRect& repaintRect)
276276{
277277 ASSERT(object);
278278

305305 shadow->adjustRectForShadow(repaintRect);
306306}
307307
308 bool SVGRenderSupport::pointInClippingArea(RenderObject* object, const FloatPoint& point)
 308bool SVGRenderSupport::pointInClippingArea(RenderObject* object, const GraphicsPoint& point)
309309{
310310 ASSERT(object);
311311
90929

Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp

106106 if (marker->type() != DocumentMarker::TextMatch)
107107 continue;
108108
109  FloatRect markerRect;
 109 GraphicsRect markerRect;
110110 for (InlineTextBox* box = textRenderer->firstTextBox(); box; box = box->nextTextBox()) {
111111 if (!box->isSVGInlineTextBox())
112112 continue;

132132 if (!textBox->mapStartEndPositionsIntoFragmentCoordinates(fragment, fragmentStartPosition, fragmentEndPosition))
133133 continue;
134134
135  FloatRect fragmentRect = textBox->selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, style);
 135 GraphicsRect fragmentRect = textBox->selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, style);
136136 fragment.buildFragmentTransform(fragmentTransform);
137137 if (!fragmentTransform.isIdentity())
138138 fragmentRect = fragmentTransform.mapRect(fragmentRect);
90929

Source/WebCore/rendering/svg/RenderSVGImage.cpp

3030
3131#include "Attr.h"
3232#include "FloatConversion.h"
33 #include "FloatQuad.h"
 33#include "GraphicsQuad.h"
3434#include "GraphicsContext.h"
3535#include "PointerEventsHitRules.h"
3636#include "RenderImageResource.h"

9494{
9595 SVGImageElement* image = static_cast<SVGImageElement*>(node());
9696
97  FloatRect oldBoundaries = m_objectBoundingBox;
98  m_objectBoundingBox = FloatRect(image->x().value(image), image->y().value(image), image->width().value(image), image->height().value(image));
 97 GraphicsRect oldBoundaries = m_objectBoundingBox;
 98 m_objectBoundingBox = GraphicsRect(image->x().value(image), image->y().value(image), image->width().value(image), image->height().value(image));
9999 if (m_objectBoundingBox != oldBoundaries) {
100100 m_updateCachedRepaintRect = true;
101101 setNeedsLayout(true);

108108 if (paintInfo.context->paintingDisabled() || style()->visibility() == HIDDEN || !m_imageResource->hasImage())
109109 return;
110110
111  FloatRect boundingBox = repaintRectInLocalCoordinates();
 111 GraphicsRect boundingBox = repaintRectInLocalCoordinates();
112112 if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo))
113113 return;
114114

123123
124124 if (SVGRenderSupport::prepareToRenderSVGContent(this, childPaintInfo)) {
125125 RefPtr<Image> image = m_imageResource->image();
126  FloatRect destRect = m_objectBoundingBox;
127  FloatRect srcRect(0, 0, image->width(), image->height());
 126 GraphicsRect destRect = m_objectBoundingBox;
 127 GraphicsRect srcRect(0, 0, image->width(), image->height());
128128
129129 SVGImageElement* imageElement = static_cast<SVGImageElement*>(node());
130130 if (imageElement->preserveAspectRatio().align() != SVGPreserveAspectRatio::SVG_PRESERVEASPECTRATIO_NONE)

141141 }
142142}
143143
144 bool RenderSVGImage::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
 144bool RenderSVGImage::nodeAtGraphicsPoint(const HitTestRequest& request, HitTestResult& result, const GraphicsPoint& pointInParent, HitTestAction hitTestAction)
145145{
146146 // We only draw in the forground phase, so we only hit-test then.
147147 if (hitTestAction != HitTestForeground)

150150 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, request, style()->pointerEvents());
151151 bool isVisible = (style()->visibility() == VISIBLE);
152152 if (isVisible || !hitRules.requireVisible) {
153  FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
 153 GraphicsPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
154154
155155 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
156156 return false;
90929

Source/WebCore/rendering/svg/RenderSVGInlineText.cpp

2929#include "CSSFontSelector.h"
3030#include "CSSStyleSelector.h"
3131#include "FloatConversion.h"
32 #include "FloatQuad.h"
 32#include "GraphicsQuad.h"
3333#include "RenderBlock.h"
3434#include "RenderSVGRoot.h"
3535#include "RenderSVGText.h"

180180 ASSERT(containingBlock);
181181
182182 // Map local point to absolute point, as the character origins stored in the text fragments use absolute coordinates.
183  FloatPoint absolutePoint(point);
 183 GraphicsPoint absolutePoint(point);
184184 absolutePoint.moveBy(containingBlock->location());
185185
186186 float closestDistance = std::numeric_limits<float>::max();

199199 unsigned textFragmentsSize = fragments.size();
200200 for (unsigned i = 0; i < textFragmentsSize; ++i) {
201201 const SVGTextFragment& fragment = fragments.at(i);
202  FloatRect fragmentRect(fragment.x, fragment.y - baseline, fragment.width, fragment.height);
 202 GraphicsRect fragmentRect(fragment.x, fragment.y - baseline, fragment.width, fragment.height);
203203 fragment.buildFragmentTransform(fragmentTransform);
204204 if (!fragmentTransform.isIdentity())
205205 fragmentRect = fragmentTransform.mapRect(fragmentRect);
90929

Source/WebCore/rendering/svg/RenderSVGText.cpp

2929#include "RenderSVGText.h"
3030
3131#include "FloatConversion.h"
32 #include "FloatQuad.h"
 32#include "GraphicsQuad.h"
3333#include "GraphicsContext.h"
3434#include "HitTestRequest.h"
3535#include "PointerEventsHitRules.h"

153153 setChildrenInline(true);
154154
155155 // FIXME: We need to find a way to only layout the child boxes, if needed.
156  FloatRect oldBoundaries = objectBoundingBox();
 156 GraphicsRect oldBoundaries = objectBoundingBox();
157157 ASSERT(childrenInline());
158158 forceLayoutInlineChildren();
159159

182182 return box;
183183}
184184
185 bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
 185bool RenderSVGText::nodeAtGraphicsPoint(const HitTestRequest& request, HitTestResult& result, const GraphicsPoint& pointInParent, HitTestAction hitTestAction)
186186{
187187 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, request, style()->pointerEvents());
188188 bool isVisible = (style()->visibility() == VISIBLE);
189189 if (isVisible || !hitRules.requireVisible) {
190190 if ((hitRules.canHitStroke && (style()->svgStyle()->hasStroke() || !hitRules.requireStroke))
191191 || (hitRules.canHitFill && (style()->svgStyle()->hasFill() || !hitRules.requireFill))) {
192  FloatPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
 192 GraphicsPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
193193
194194 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
195195 return false;

224224 return closestBox->renderer()->positionForPoint(LayoutPoint(pointInContents.x(), closestBox->y()));
225225}
226226
227 void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads)
 227void RenderSVGText::absoluteQuads(Vector<GraphicsQuad>& quads)
228228{
229229 quads.append(localToAbsoluteQuad(strokeBoundingBox()));
230230}

245245 RenderBlock::paint(blockInfo, IntPoint());
246246}
247247
248 FloatRect RenderSVGText::strokeBoundingBox() const
 248GraphicsRect RenderSVGText::strokeBoundingBox() const
249249{
250  FloatRect strokeBoundaries = objectBoundingBox();
 250 GraphicsRect strokeBoundaries = objectBoundingBox();
251251 const SVGRenderStyle* svgStyle = style()->svgStyle();
252252 if (!svgStyle->hasStroke())
253253 return strokeBoundaries;

258258 return strokeBoundaries;
259259}
260260
261 FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
 261GraphicsRect RenderSVGText::repaintRectInLocalCoordinates() const
262262{
263  FloatRect repaintRect = strokeBoundingBox();
 263 GraphicsRect repaintRect = strokeBoundingBox();
264264 SVGRenderSupport::intersectRepaintRectWithResources(this, repaintRect);
265265
266266 if (const ShadowData* textShadow = style()->textShadow())
90929

Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp

9595
9696 // Spec: When the geometry of the applicable element has no width or height and objectBoundingBox is specified,
9797 // then the given effect (e.g. a gradient or a filter) will be ignored.
98  FloatRect objectBoundingBox = object->objectBoundingBox();
 98 GraphicsRect objectBoundingBox = object->objectBoundingBox();
9999 if (m_attributes.boundingBoxMode() && objectBoundingBox.isEmpty())
100100 return false;
101101

109109 return false;
110110
111111 // Compute all necessary transformations to build the tile image & the pattern.
112  FloatRect tileBoundaries;
 112 GraphicsRect tileBoundaries;
113113 AffineTransform tileImageTransform;
114114 if (!buildTileImageTransform(object, m_attributes, patternElement, tileBoundaries, tileImageTransform))
115115 return false;

117117 AffineTransform absoluteTransform;
118118 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
119119
120  FloatRect absoluteTileBoundaries = absoluteTransform.mapRect(tileBoundaries);
 120 GraphicsRect absoluteTileBoundaries = absoluteTransform.mapRect(tileBoundaries);
121121
122122 // Build tile image.
123123 OwnPtr<ImageBuffer> tileImage = createTileImage(object, m_attributes, tileBoundaries, absoluteTileBoundaries, tileImageTransform);

196196 context->restore();
197197}
198198
199 static inline FloatRect calculatePatternBoundaries(const PatternAttributes& attributes,
200  const FloatRect& objectBoundingBox,
 199static inline GraphicsRect calculatePatternBoundaries(const PatternAttributes& attributes,
 200 const GraphicsRect& objectBoundingBox,
201201 const SVGPatternElement* patternElement)
202202{
203203 ASSERT(patternElement);
204204
205205 if (attributes.boundingBoxMode())
206  return FloatRect(attributes.x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
 206 return GraphicsRect(attributes.x().valueAsPercentage() * objectBoundingBox.width() + objectBoundingBox.x(),
207207 attributes.y().valueAsPercentage() * objectBoundingBox.height() + objectBoundingBox.y(),
208208 attributes.width().valueAsPercentage() * objectBoundingBox.width(),
209209 attributes.height().valueAsPercentage() * objectBoundingBox.height());
210210
211  return FloatRect(attributes.x().value(patternElement),
 211 return GraphicsRect(attributes.x().value(patternElement),
212212 attributes.y().value(patternElement),
213213 attributes.width().value(patternElement),
214214 attributes.height().value(patternElement));

217217bool RenderSVGResourcePattern::buildTileImageTransform(RenderObject* renderer,
218218 const PatternAttributes& attributes,
219219 const SVGPatternElement* patternElement,
220  FloatRect& patternBoundaries,
 220 GraphicsRect& patternBoundaries,
221221 AffineTransform& tileImageTransform) const
222222{
223223 ASSERT(renderer);
224224 ASSERT(patternElement);
225225
226  FloatRect objectBoundingBox = renderer->objectBoundingBox();
 226 GraphicsRect objectBoundingBox = renderer->objectBoundingBox();
227227 patternBoundaries = calculatePatternBoundaries(attributes, objectBoundingBox, patternElement);
228228 if (patternBoundaries.width() <= 0 || patternBoundaries.height() <= 0)
229229 return false;

241241
242242PassOwnPtr<ImageBuffer> RenderSVGResourcePattern::createTileImage(RenderObject* object,
243243 const PatternAttributes& attributes,
244  const FloatRect& tileBoundaries,
245  const FloatRect& absoluteTileBoundaries,
 244 const GraphicsRect& tileBoundaries,
 245 const GraphicsRect& absoluteTileBoundaries,
246246 const AffineTransform& tileImageTransform) const
247247{
248248 ASSERT(object);
249249
250250 // Clamp tile image size against SVG viewport size, as last resort, to avoid allocating huge image buffers.
251  FloatRect contentBoxRect = SVGRenderSupport::findTreeRootObject(object)->contentBoxRect();
 251 GraphicsRect contentBoxRect = SVGRenderSupport::findTreeRootObject(object)->contentBoxRect();
252252
253  FloatRect clampedAbsoluteTileBoundaries = absoluteTileBoundaries;
 253 GraphicsRect clampedAbsoluteTileBoundaries = absoluteTileBoundaries;
254254 if (clampedAbsoluteTileBoundaries.width() > contentBoxRect.width())
255255 clampedAbsoluteTileBoundaries.setWidth(contentBoxRect.width());
256256

266266 ASSERT(tileImageContext);
267267
268268 // The image buffer represents the final rendered size, so the content has to be scaled (to avoid pixelation).
269  tileImageContext->scale(FloatSize(absoluteTileBoundaries.width() / tileBoundaries.width(),
 269 tileImageContext->scale(GraphicsSize(absoluteTileBoundaries.width() / tileBoundaries.width(),
270270 absoluteTileBoundaries.height() / tileBoundaries.height()));
271271
272272 // Apply tile image transformations.
90929

Source/WebCore/rendering/svg/RenderSVGForeignObject.h

2323
2424#if ENABLE(SVG) && ENABLE(SVG_FOREIGN_OBJECT)
2525#include "AffineTransform.h"
26 #include "FloatPoint.h"
 26#include "GraphicsPoint.h"
2727#include "RenderSVGBlock.h"
2828
2929namespace WebCore {

4545 virtual bool requiresLayer() const { return false; }
4646 virtual void layout();
4747
48  virtual FloatRect objectBoundingBox() const { return m_viewport; }
49  virtual FloatRect strokeBoundingBox() const { return m_viewport; }
50  virtual FloatRect repaintRectInLocalCoordinates() const { return m_viewport; }
 48 virtual GraphicsRect objectBoundingBox() const { return m_viewport; }
 49 virtual GraphicsRect strokeBoundingBox() const { return m_viewport; }
 50 virtual GraphicsRect repaintRectInLocalCoordinates() const { return m_viewport; }
5151
52  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 52 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
5353 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
5454 virtual bool isSVGForeignObject() const { return true; }
5555

6464 virtual AffineTransform localTransform() const { return m_localTransform; }
6565
6666 bool m_needsTransformUpdate : 1;
67  FloatRect m_viewport;
 67 GraphicsRect m_viewport;
6868 AffineTransform m_localTransform;
6969 mutable AffineTransform m_localToParentTransform;
7070};
90929

Source/WebCore/rendering/svg/RenderSVGResourceSolidColor.h

2222
2323#if ENABLE(SVG)
2424#include "Color.h"
25 #include "FloatRect.h"
 25#include "GraphicsRect.h"
2626#include "RenderSVGResource.h"
2727
2828namespace WebCore {

3737
3838 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
3939 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode, const Path*);
40  virtual FloatRect resourceBoundingBox(RenderObject*) { return FloatRect(); }
 40 virtual GraphicsRect resourceBoundingBox(RenderObject*) { return GraphicsRect(); }
4141
4242 virtual RenderSVGResourceType resourceType() const { return s_resourceType; }
4343 static RenderSVGResourceType s_resourceType;
90929

Source/WebCore/rendering/svg/RenderSVGViewportContainer.h

4545 virtual void calcViewport();
4646
4747 virtual void applyViewportClip(PaintInfo&);
48  virtual bool pointIsInsideViewportClip(const FloatPoint& pointInParent);
 48 virtual bool pointIsInsideViewportClip(const GraphicsPoint& pointInParent);
4949
50  FloatRect m_viewport;
 50 GraphicsRect m_viewport;
5151 mutable AffineTransform m_localToParentTransform;
5252};
5353
90929

Source/WebCore/rendering/svg/RenderSVGContainer.h

5353
5454 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
5555
56  virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; }
57  virtual FloatRect strokeBoundingBox() const { return m_strokeBoundingBox; }
58  virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
 56 virtual GraphicsRect objectBoundingBox() const { return m_objectBoundingBox; }
 57 virtual GraphicsRect strokeBoundingBox() const { return m_strokeBoundingBox; }
 58 virtual GraphicsRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
5959
60  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 60 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
6161
6262 // Allow RenderSVGTransformableContainer to hook in at the right time in layout()
6363 virtual bool calculateLocalTransform() { return false; }
6464
65  // Allow RenderSVGViewportContainer to hook in at the right times in layout(), paint() and nodeAtFloatPoint()
 65 // Allow RenderSVGViewportContainer to hook in at the right times in layout(), paint() and nodeAtGraphicsPoint()
6666 virtual void calcViewport() { }
6767 virtual void applyViewportClip(PaintInfo&) { }
68  virtual bool pointIsInsideViewportClip(const FloatPoint& /*pointInParent*/) { return true; }
 68 virtual bool pointIsInsideViewportClip(const GraphicsPoint& /*pointInParent*/) { return true; }
6969
7070 bool selfWillPaint();
7171 void updateCachedBoundaries();
7272
7373private:
7474 RenderObjectChildList m_children;
75  FloatRect m_objectBoundingBox;
76  FloatRect m_strokeBoundingBox;
77  FloatRect m_repaintBoundingBox;
 75 GraphicsRect m_objectBoundingBox;
 76 GraphicsRect m_strokeBoundingBox;
 77 GraphicsRect m_repaintBoundingBox;
7878 bool m_needsBoundariesUpdate : 1;
7979};
8080
90929

Source/WebCore/rendering/svg/RenderSVGRoot.h

2424#define RenderSVGRoot_h
2525
2626#if ENABLE(SVG)
27 #include "FloatRect.h"
 27#include "GraphicsRect.h"
2828#include "RenderBox.h"
2929
3030#include "SVGRenderSupport.h"

3939 explicit RenderSVGRoot(SVGStyledElement*);
4040 virtual ~RenderSVGRoot();
4141
42  virtual void computeIntrinsicRatioInformation(FloatSize& intrinsicRatio, bool& isPercentageIntrinsicSize) const;
 42 virtual void computeIntrinsicRatioInformation(GraphicsSize& intrinsicRatio, bool& isPercentageIntrinsicSize) const;
4343 const RenderObjectChildList* children() const { return &m_children; }
4444 RenderObjectChildList* children() { return &m_children; }
4545

7171
7272 virtual const AffineTransform& localToParentTransform() const;
7373
74  bool fillContains(const FloatPoint&) const;
75  bool strokeContains(const FloatPoint&) const;
 74 bool fillContains(const GraphicsPoint&) const;
 75 bool strokeContains(const GraphicsPoint&) const;
7676
77  virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; }
78  virtual FloatRect strokeBoundingBox() const { return m_strokeBoundingBox; }
79  virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
 77 virtual GraphicsRect objectBoundingBox() const { return m_objectBoundingBox; }
 78 virtual GraphicsRect strokeBoundingBox() const { return m_strokeBoundingBox; }
 79 virtual GraphicsRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
8080
8181 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
8282

9696 AffineTransform localToBorderBoxTransform() const;
9797
9898 RenderObjectChildList m_children;
99  FloatSize m_viewportSize;
100  FloatRect m_objectBoundingBox;
101  FloatRect m_strokeBoundingBox;
102  FloatRect m_repaintBoundingBox;
 99 GraphicsSize m_viewportSize;
 100 GraphicsRect m_objectBoundingBox;
 101 GraphicsRect m_strokeBoundingBox;
 102 GraphicsRect m_repaintBoundingBox;
103103 mutable AffineTransform m_localToParentTransform;
104104 bool m_isLayoutSizeChanged : 1;
105105 bool m_needsBoundariesOrTransformUpdate : 1;
90929

Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp

131131 writeNameValuePair(ts, name, value);
132132}
133133
134 TextStream& operator<<(TextStream& ts, const FloatRect &r)
 134TextStream& operator<<(TextStream& ts, const GraphicsRect &r)
135135{
136136 ts << "at (";
137137 if (hasFractions(r.x()))

534534 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits());
535535 ts << "\n";
536536 // Creating a placeholder filter which is passed to the builder.
537  FloatRect dummyRect;
 537 GraphicsRect dummyRect;
538538 RefPtr<SVGFilter> dummyFilter = SVGFilter::create(AffineTransform(), dummyRect, dummyRect, dummyRect, true);
539539 if (RefPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilter.get())) {
540540 if (FilterEffect* lastEffect = builder->lastEffect())

580580 linearGradientElement->collectGradientAttributes(attributes);
581581 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.gradientTransform(), attributes.boundingBoxMode());
582582
583  FloatPoint startPoint;
584  FloatPoint endPoint;
 583 GraphicsPoint startPoint;
 584 GraphicsPoint endPoint;
585585 linearGradientElement->calculateStartEndPoints(attributes, startPoint, endPoint);
586586
587587 ts << " [start=" << startPoint << "] [end=" << endPoint << "]\n";

596596 radialGradientElement->collectGradientAttributes(attributes);
597597 writeCommonGradientProperties(ts, attributes.spreadMethod(), attributes.gradientTransform(), attributes.boundingBoxMode());
598598
599  FloatPoint focalPoint;
600  FloatPoint centerPoint;
 599 GraphicsPoint focalPoint;
 600 GraphicsPoint centerPoint;
601601 float radius;
602602 radialGradientElement->calculateFocalCenterPointsAndRadius(attributes, focalPoint, centerPoint, radius);
603603

640640 writeStandardPrefix(ts, text, indent);
641641
642642 // Why not just linesBoundingBox()?
643  ts << " " << FloatRect(text.firstRunOrigin(), text.linesBoundingBox().size()) << "\n";
 643 ts << " " << GraphicsRect(text.firstRunOrigin(), text.linesBoundingBox().size()) << "\n";
644644 writeResources(ts, text, indent);
645645 writeSVGInlineTextBoxes(ts, text, indent);
646646}
90929

Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp

2424
2525#include "AffineTransform.h"
2626#include "Element.h"
27 #include "FloatPoint.h"
28 #include "FloatRect.h"
 27#include "GraphicsPoint.h"
 28#include "GraphicsRect.h"
2929#include "GraphicsContext.h"
3030#include "Image.h"
3131#include "ImageBuffer.h"

6161
6262void RenderSVGResourceMasker::removeAllClientsFromCache(bool markForInvalidation)
6363{
64  m_maskContentBoundaries = FloatRect();
 64 m_maskContentBoundaries = GraphicsRect();
6565 if (!m_masker.isEmpty()) {
6666 deleteAllValues(m_masker);
6767 m_masker.clear();

9898 AffineTransform absoluteTransform;
9999 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
100100
101  FloatRect absoluteTargetRect = absoluteTransform.mapRect(object->repaintRectInLocalCoordinates());
102  FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(object, absoluteTargetRect);
 101 GraphicsRect absoluteTargetRect = absoluteTransform.mapRect(object->repaintRectInLocalCoordinates());
 102 GraphicsRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(object, absoluteTargetRect);
103103
104104 if (!maskerData->maskImage && !clampedAbsoluteTargetRect.isEmpty()) {
105105 SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());

135135 // Eventually adjust the mask image context according to the target objectBoundingBox.
136136 AffineTransform maskContentTransformation;
137137 if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
138  FloatRect objectBoundingBox = object->objectBoundingBox();
 138 GraphicsRect objectBoundingBox = object->objectBoundingBox();
139139 maskContentTransformation.translate(objectBoundingBox.x(), objectBoundingBox.y());
140140 maskContentTransformation.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
141141 maskImageContext->concatCTM(maskContentTransformation);

175175 }
176176}
177177
178 FloatRect RenderSVGResourceMasker::resourceBoundingBox(RenderObject* object)
 178GraphicsRect RenderSVGResourceMasker::resourceBoundingBox(RenderObject* object)
179179{
180180 SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
181181 ASSERT(maskElement);
182182
183  FloatRect objectBoundingBox = object->objectBoundingBox();
184  FloatRect maskBoundaries = maskElement->maskBoundingBox(objectBoundingBox);
 183 GraphicsRect objectBoundingBox = object->objectBoundingBox();
 184 GraphicsRect maskBoundaries = maskElement->maskBoundingBox(objectBoundingBox);
185185
186186 // Resource was not layouted yet. Give back clipping rect of the mask.
187187 if (selfNeedsLayout())

190190 if (m_maskContentBoundaries.isEmpty())
191191 calculateMaskContentRepaintRect();
192192
193  FloatRect maskRect = m_maskContentBoundaries;
 193 GraphicsRect maskRect = m_maskContentBoundaries;
194194 if (maskElement->maskContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
195195 AffineTransform transform;
196196 transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
90929

Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.h

4949 virtual bool isSVGResourceFilterPrimitive() const { return true; }
5050
5151 // They depend on the RenderObject argument of RenderSVGResourceFilter::applyResource.
52  static FloatRect determineFilterPrimitiveSubregion(FilterEffect*);
 52 static GraphicsRect determineFilterPrimitiveSubregion(FilterEffect*);
5353
5454 inline void primitiveAttributeChanged(const QualifiedName& attribute)
5555 {
90929

Source/WebCore/rendering/svg/SVGInlineTextBox.cpp

8888 return 0;
8989}
9090
91 FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, int startPosition, int endPosition, RenderStyle* style)
 91GraphicsRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, int startPosition, int endPosition, RenderStyle* style)
9292{
9393 ASSERT(startPosition < endPosition);
9494 ASSERT(style);

103103
104104 const Font& scaledFont = textRenderer->scaledFont();
105105 const FontMetrics& scaledFontMetrics = scaledFont.fontMetrics();
106  FloatPoint textOrigin(fragment.x, fragment.y);
 106 GraphicsPoint textOrigin(fragment.x, fragment.y);
107107 if (scalingFactor != 1)
108108 textOrigin.scale(scalingFactor, scalingFactor);
109109
110110 textOrigin.move(0, -scaledFontMetrics.floatAscent());
111111
112  FloatRect selectionRect = scaledFont.selectionRectForText(constructTextRun(style, fragment), textOrigin, fragment.height * scalingFactor, startPosition, endPosition);
 112 GraphicsRect selectionRect = scaledFont.selectionRectForText(constructTextRun(style, fragment), textOrigin, fragment.height * scalingFactor, startPosition, endPosition);
113113 if (scalingFactor == 1)
114114 return selectionRect;
115115

132132 ASSERT(style);
133133
134134 AffineTransform fragmentTransform;
135  FloatRect selectionRect;
 135 GraphicsRect selectionRect;
136136 int fragmentStartPosition = 0;
137137 int fragmentEndPosition = 0;
138138

145145 if (!mapStartEndPositionsIntoFragmentCoordinates(fragment, fragmentStartPosition, fragmentEndPosition))
146146 continue;
147147
148  FloatRect fragmentRect = selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, style);
 148 GraphicsRect fragmentRect = selectionRectForTextFragment(fragment, fragmentStartPosition, fragmentEndPosition, style);
149149 fragment.buildFragmentTransform(fragmentTransform);
150150 if (!fragmentTransform.isIdentity())
151151 fragmentRect = fragmentTransform.mapRect(fragmentRect);

579579 if (fragment.width <= 0 && thickness <= 0)
580580 return;
581581
582  FloatPoint decorationOrigin(fragment.x, fragment.y);
 582 GraphicsPoint decorationOrigin(fragment.x, fragment.y);
583583 float width = fragment.width;
584584 const FontMetrics& scaledFontMetrics = scaledFont.fontMetrics();
585585

598598 decorationOrigin.move(0, -scaledFontMetrics.floatAscent() + positionOffsetForDecoration(decoration, scaledFontMetrics, thickness));
599599
600600 Path path;
601  path.addRect(FloatRect(decorationOrigin, FloatSize(width, thickness)));
 601 path.addRect(GraphicsRect(decorationOrigin, GraphicsSize(width, thickness)));
602602
603603 if (acquirePaintingResource(context, scalingFactor, decorationRenderer, decorationStyle))
604604 releasePaintingResource(context, &path);

615615 const Font& scaledFont = textRenderer->scaledFont();
616616 const ShadowData* shadow = style->textShadow();
617617
618  FloatPoint textOrigin(fragment.x, fragment.y);
619  FloatSize textSize(fragment.width, fragment.height);
 618 GraphicsPoint textOrigin(fragment.x, fragment.y);
 619 GraphicsSize textSize(fragment.width, fragment.height);
620620
621621 if (scalingFactor != 1) {
622622 textOrigin.scale(scalingFactor, scalingFactor);
623623 textSize.scale(scalingFactor);
624624 }
625625
626  FloatRect shadowRect(FloatPoint(textOrigin.x(), textOrigin.y() - scaledFont.fontMetrics().floatAscent()), textSize);
 626 GraphicsRect shadowRect(GraphicsPoint(textOrigin.x(), textOrigin.y() - scaledFont.fontMetrics().floatAscent()), textSize);
627627
628628 do {
629629 if (!prepareGraphicsContextForTextPainting(context, scalingFactor, textRun, style))
630630 break;
631631
632  FloatSize extraOffset;
 632 GraphicsSize extraOffset;
633633 if (shadow)
634634 extraOffset = applyShadowToGraphicsContext(context, shadow, shadowRect, false /* stroked */, true /* opaque */, true /* horizontal */);
635635

703703
704704IntRect SVGInlineTextBox::calculateBoundaries() const
705705{
706  FloatRect textRect;
 706 GraphicsRect textRect;
707707
708708 RenderSVGInlineText* textRenderer = toRenderSVGInlineText(this->textRenderer());
709709 ASSERT(textRenderer);

717717 unsigned textFragmentsSize = m_textFragments.size();
718718 for (unsigned i = 0; i < textFragmentsSize; ++i) {
719719 const SVGTextFragment& fragment = m_textFragments.at(i);
720  FloatRect fragmentRect(fragment.x, fragment.y - baseline, fragment.width, fragment.height);
 720 GraphicsRect fragmentRect(fragment.x, fragment.y - baseline, fragment.width, fragment.height);
721721 fragment.buildFragmentTransform(fragmentTransform);
722722 if (!fragmentTransform.isIdentity())
723723 fragmentRect = fragmentTransform.mapRect(fragmentRect);

738738 if (isVisible || !hitRules.requireVisible) {
739739 if ((hitRules.canHitStroke && (renderer()->style()->svgStyle()->hasStroke() || !hitRules.requireStroke))
740740 || (hitRules.canHitFill && (renderer()->style()->svgStyle()->hasFill() || !hitRules.requireFill))) {
741  FloatPoint boxOrigin(x(), y());
 741 GraphicsPoint boxOrigin(x(), y());
742742 boxOrigin.moveBy(accumulatedOffset);
743  FloatRect rect(boxOrigin, size());
 743 GraphicsRect rect(boxOrigin, size());
744744 if (rect.intersects(result.rectForPoint(pointInContainer))) {
745745 renderer()->updateHitTestResult(result, pointInContainer - toLayoutSize(accumulatedOffset));
746746 if (!result.addNodeToRectBasedTestResult(renderer()->node(), pointInContainer, rect))
90929

Source/WebCore/rendering/svg/RenderSVGModelObject.h

5656 virtual IntRect outlineBoundsForRepaint(RenderBoxModelObject* repaintContainer, IntPoint*) const;
5757
5858 virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
59  virtual void absoluteQuads(Vector<FloatQuad>&);
 59 virtual void absoluteQuads(Vector<GraphicsQuad>&);
6060
6161 virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
6262 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle);
90929

Source/WebCore/rendering/svg/RenderSVGResourceMarker.h

2121#define RenderSVGResourceMarker_h
2222
2323#if ENABLE(SVG)
24 #include "FloatRect.h"
 24#include "GraphicsRect.h"
2525#include "RenderObject.h"
2626#include "RenderSVGResourceContainer.h"
2727#include "SVGMarkerElement.h"

4646 void draw(PaintInfo&, const AffineTransform&);
4747
4848 // Calculates marker boundaries, mapped to the target element's coordinate space
49  FloatRect markerBoundaries(const AffineTransform& markerTransformation) const;
 49 GraphicsRect markerBoundaries(const AffineTransform& markerTransformation) const;
5050
5151 virtual void applyViewportClip(PaintInfo&);
5252 virtual void layout();
5353 virtual void calcViewport();
5454
5555 virtual const AffineTransform& localToParentTransform() const;
56  AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
 56 AffineTransform markerTransformation(const GraphicsPoint& origin, float angle, float strokeWidth) const;
5757
5858 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short) { return false; }
59  virtual FloatRect resourceBoundingBox(RenderObject*) { return FloatRect(); }
 59 virtual GraphicsRect resourceBoundingBox(RenderObject*) { return GraphicsRect(); }
6060
61  FloatPoint referencePoint() const;
 61 GraphicsPoint referencePoint() const;
6262 float angle() const;
6363 SVGMarkerUnitsType markerUnits() const { return static_cast<SVGMarkerElement*>(node())->markerUnits(); }
6464

6868private:
6969 // Generates a transformation matrix usable to render marker content. Handles scaling the marker content
7070 // acording to SVGs markerUnits="strokeWidth" concept, when a strokeWidth value != -1 is passed in.
71  AffineTransform markerContentTransformation(const AffineTransform& contentTransformation, const FloatPoint& origin, float strokeWidth = -1) const;
 71 AffineTransform markerContentTransformation(const AffineTransform& contentTransformation, const GraphicsPoint& origin, float strokeWidth = -1) const;
7272
7373 AffineTransform viewportTransform() const;
7474
7575 mutable AffineTransform m_localToParentTransform;
76  FloatRect m_viewport;
 76 GraphicsRect m_viewport;
7777};
7878
7979}
90929

Source/WebCore/rendering/svg/SVGMarkerLayoutInfo.h

4949 SVGMarkerLayoutInfo();
5050 ~SVGMarkerLayoutInfo();
5151
52  FloatRect calculateBoundaries(RenderSVGResourceMarker* startMarker, RenderSVGResourceMarker* midMarker, RenderSVGResourceMarker* endMarker, float strokeWidth, const Path&);
 52 GraphicsRect calculateBoundaries(RenderSVGResourceMarker* startMarker, RenderSVGResourceMarker* midMarker, RenderSVGResourceMarker* endMarker, float strokeWidth, const Path&);
5353 void drawMarkers(PaintInfo&);
5454
5555 // Used by static inline helper functions in SVGMarkerLayoutInfo.cpp
5656 SVGMarkerData& markerData() { return m_markerData; }
5757 RenderSVGResourceMarker* midMarker() const { return m_midMarker; }
5858 int& elementIndex() { return m_elementIndex; }
59  void addLayoutedMarker(RenderSVGResourceMarker*, const FloatPoint& origin, float angle);
 59 void addLayoutedMarker(RenderSVGResourceMarker*, const GraphicsPoint& origin, float angle);
6060 void clear();
6161
6262private:
90929

Source/WebCore/rendering/svg/RenderSVGPath.h

2626
2727#if ENABLE(SVG)
2828#include "AffineTransform.h"
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "RenderSVGModelObject.h"
3131#include "SVGMarkerLayoutInfo.h"
3232
3333namespace WebCore {
3434
35 class FloatPoint;
 35class GraphicsPoint;
3636class RenderSVGContainer;
3737class SVGStyledTransformableElement;
3838

4848
4949private:
5050 // Hit-detection seperated for the fill and the stroke
51  bool fillContains(const FloatPoint&, bool requiresFill = true, WindRule fillRule = RULE_NONZERO);
52  bool strokeContains(const FloatPoint&, bool requiresStroke = true);
 51 bool fillContains(const GraphicsPoint&, bool requiresFill = true, WindRule fillRule = RULE_NONZERO);
 52 bool strokeContains(const GraphicsPoint&, bool requiresStroke = true);
5353
54  virtual FloatRect objectBoundingBox() const { return m_fillBoundingBox; }
55  virtual FloatRect strokeBoundingBox() const { return m_strokeAndMarkerBoundingBox; }
56  virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
 54 virtual GraphicsRect objectBoundingBox() const { return m_fillBoundingBox; }
 55 virtual GraphicsRect strokeBoundingBox() const { return m_strokeAndMarkerBoundingBox; }
 56 virtual GraphicsRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
5757 virtual const AffineTransform& localToParentTransform() const { return m_localTransform; }
5858
5959 virtual bool isSVGPath() const { return true; }

6363 virtual void paint(PaintInfo&, const LayoutPoint&);
6464 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
6565
66  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 66 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
6767
68  FloatRect calculateMarkerBoundsIfNeeded();
 68 GraphicsRect calculateMarkerBoundsIfNeeded();
6969 void updateCachedBoundaries();
7070
7171private:

7777 bool m_needsTransformUpdate : 1;
7878
7979 mutable Path m_path;
80  FloatRect m_fillBoundingBox;
81  FloatRect m_strokeAndMarkerBoundingBox;
82  FloatRect m_repaintBoundingBox;
 80 GraphicsRect m_fillBoundingBox;
 81 GraphicsRect m_strokeAndMarkerBoundingBox;
 82 GraphicsRect m_repaintBoundingBox;
8383 SVGMarkerLayoutInfo m_markerLayoutInfo;
8484 AffineTransform m_localTransform;
8585};
90929

Source/WebCore/rendering/svg/RenderSVGTransformableContainer.cpp

4949 if (!element->hasTagName(SVGNames::gTag) || !static_cast<SVGGElement*>(element)->isShadowTreeContainerElement())
5050 return needsUpdate;
5151
52  FloatSize translation = static_cast<SVGShadowTreeContainerElement*>(element)->containerTranslation();
 52 GraphicsSize translation = static_cast<SVGShadowTreeContainerElement*>(element)->containerTranslation();
5353 if (!translation.width() && !translation.height())
5454 return needsUpdate;
5555
90929

Source/WebCore/rendering/svg/SVGShadowTreeElements.h

2626
2727namespace WebCore {
2828
29 class FloatSize;
 29class GraphicsSize;
3030class SVGUseElement;
3131
3232class SVGShadowTreeContainerElement : public SVGGElement {
3333public:
3434 static PassRefPtr<SVGShadowTreeContainerElement> create(Document*);
3535
36  FloatSize containerTranslation() const;
 36 GraphicsSize containerTranslation() const;
3737 void setContainerOffset(const SVGLength& x, const SVGLength& y)
3838 {
3939 m_xOffset = x;
90929

Source/WebCore/rendering/svg/SVGTextQuery.cpp

323323 }
324324
325325 unsigned position;
326  FloatPoint startPosition;
 326 GraphicsPoint startPosition;
327327};
328328
329329bool SVGTextQuery::startPositionOfCharacterCallback(Data* queryData, const SVGTextFragment& fragment) const

335335 if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
336336 return false;
337337
338  data->startPosition = FloatPoint(fragment.x, fragment.y);
 338 data->startPosition = GraphicsPoint(fragment.x, fragment.y);
339339
340340 if (startPosition) {
341341 SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset, startPosition);

354354 return true;
355355}
356356
357 FloatPoint SVGTextQuery::startPositionOfCharacter(unsigned position) const
 357GraphicsPoint SVGTextQuery::startPositionOfCharacter(unsigned position) const
358358{
359359 if (m_textBoxes.isEmpty())
360  return FloatPoint();
 360 return GraphicsPoint();
361361
362362 StartPositionOfCharacterData data(position);
363363 executeQuery(&data, &SVGTextQuery::startPositionOfCharacterCallback);

372372 }
373373
374374 unsigned position;
375  FloatPoint endPosition;
 375 GraphicsPoint endPosition;
376376};
377377
378378bool SVGTextQuery::endPositionOfCharacterCallback(Data* queryData, const SVGTextFragment& fragment) const

384384 if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startPosition, endPosition))
385385 return false;
386386
387  data->endPosition = FloatPoint(fragment.x, fragment.y);
 387 data->endPosition = GraphicsPoint(fragment.x, fragment.y);
388388
389389 SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset, startPosition + 1);
390390 if (queryData->isVerticalText)

401401 return true;
402402}
403403
404 FloatPoint SVGTextQuery::endPositionOfCharacter(unsigned position) const
 404GraphicsPoint SVGTextQuery::endPositionOfCharacter(unsigned position) const
405405{
406406 if (m_textBoxes.isEmpty())
407  return FloatPoint();
 407 return GraphicsPoint();
408408
409409 EndPositionOfCharacterData data(position);
410410 executeQuery(&data, &SVGTextQuery::endPositionOfCharacterCallback);

462462 }
463463
464464 unsigned position;
465  FloatRect extent;
 465 GraphicsRect extent;
466466};
467467
468 static inline void calculateGlyphBoundaries(SVGTextQuery::Data* queryData, const SVGTextFragment& fragment, int startPosition, FloatRect& extent)
 468static inline void calculateGlyphBoundaries(SVGTextQuery::Data* queryData, const SVGTextFragment& fragment, int startPosition, GraphicsRect& extent)
469469{
470470 float scalingFactor = queryData->textRenderer->scalingFactor();
471471 ASSERT(scalingFactor);
472472
473  extent.setLocation(FloatPoint(fragment.x, fragment.y - queryData->textRenderer->scaledFont().fontMetrics().floatAscent() / scalingFactor));
 473 extent.setLocation(GraphicsPoint(fragment.x, fragment.y - queryData->textRenderer->scaledFont().fontMetrics().floatAscent() / scalingFactor));
474474
475475 if (startPosition) {
476476 SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset, startPosition);

481481 }
482482
483483 SVGTextMetrics metrics = SVGTextMetrics::measureCharacterRange(queryData->textRenderer, fragment.characterOffset + startPosition, 1);
484  extent.setSize(FloatSize(metrics.width(), metrics.height()));
 484 extent.setSize(GraphicsSize(metrics.width(), metrics.height()));
485485
486486 AffineTransform fragmentTransform;
487487 fragment.buildFragmentTransform(fragmentTransform, SVGTextFragment::TransformIgnoringTextLength);

504504 return true;
505505}
506506
507 FloatRect SVGTextQuery::extentOfCharacter(unsigned position) const
 507GraphicsRect SVGTextQuery::extentOfCharacter(unsigned position) const
508508{
509509 if (m_textBoxes.isEmpty())
510  return FloatRect();
 510 return GraphicsRect();
511511
512512 ExtentOfCharacterData data(position);
513513 executeQuery(&data, &SVGTextQuery::extentOfCharacterCallback);

516516
517517// characterNumberAtPosition() implementation
518518struct CharacterNumberAtPositionData : SVGTextQuery::Data {
519  CharacterNumberAtPositionData(const FloatPoint& queryPosition)
 519 CharacterNumberAtPositionData(const GraphicsPoint& queryPosition)
520520 : position(queryPosition)
521521 {
522522 }
523523
524  FloatPoint position;
 524 GraphicsPoint position;
525525};
526526
527527bool SVGTextQuery::characterNumberAtPositionCallback(Data* queryData, const SVGTextFragment& fragment) const
528528{
529529 CharacterNumberAtPositionData* data = static_cast<CharacterNumberAtPositionData*>(queryData);
530530
531  FloatRect extent;
 531 GraphicsRect extent;
532532 for (unsigned i = 0; i < fragment.length; ++i) {
533533 int startPosition = data->processedCharacters + i;
534534 int endPosition = startPosition + 1;

545545 return false;
546546}
547547
548 int SVGTextQuery::characterNumberAtPosition(const FloatPoint& position) const
 548int SVGTextQuery::characterNumberAtPosition(const GraphicsPoint& position) const
549549{
550550 if (m_textBoxes.isEmpty())
551551 return -1;
90929

Source/WebCore/rendering/svg/RenderSVGInline.cpp

4343 return box;
4444}
4545
46 FloatRect RenderSVGInline::objectBoundingBox() const
 46GraphicsRect RenderSVGInline::objectBoundingBox() const
4747{
4848 if (const RenderObject* object = RenderSVGText::locateRenderSVGTextAncestor(this))
4949 return object->objectBoundingBox();
5050
51  return FloatRect();
 51 return GraphicsRect();
5252}
5353
54 FloatRect RenderSVGInline::strokeBoundingBox() const
 54GraphicsRect RenderSVGInline::strokeBoundingBox() const
5555{
5656 if (const RenderObject* object = RenderSVGText::locateRenderSVGTextAncestor(this))
5757 return object->strokeBoundingBox();
5858
59  return FloatRect();
 59 return GraphicsRect();
6060}
6161
62 FloatRect RenderSVGInline::repaintRectInLocalCoordinates() const
 62GraphicsRect RenderSVGInline::repaintRectInLocalCoordinates() const
6363{
6464 if (const RenderObject* object = RenderSVGText::locateRenderSVGTextAncestor(this))
6565 return object->repaintRectInLocalCoordinates();
6666
67  return FloatRect();
 67 return GraphicsRect();
6868}
6969
7070IntRect RenderSVGInline::clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer)

8282 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, useTransforms, fixed, transformState);
8383}
8484
85 void RenderSVGInline::absoluteQuads(Vector<FloatQuad>& quads)
 85void RenderSVGInline::absoluteQuads(Vector<GraphicsQuad>& quads)
8686{
8787 RenderObject* object = RenderSVGText::locateRenderSVGTextAncestor(this);
8888 if (!object)
8989 return;
9090
91  FloatRect textBoundingBox = object->strokeBoundingBox();
 91 GraphicsRect textBoundingBox = object->strokeBoundingBox();
9292 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox())
93  quads.append(localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x(), textBoundingBox.y() + box->y(), box->logicalWidth(), box->logicalHeight())));
 93 quads.append(localToAbsoluteQuad(GraphicsRect(textBoundingBox.x() + box->x(), textBoundingBox.y() + box->y(), box->logicalWidth(), box->logicalHeight())));
9494}
9595
9696void RenderSVGInline::willBeDestroyed()
90929

Source/WebCore/rendering/svg/SVGRenderSupport.h

2929
3030namespace WebCore {
3131
32 class FloatPoint;
33 class FloatRect;
 32class GraphicsPoint;
 33class GraphicsRect;
3434class ImageBuffer;
3535class RenderBoxModelObject;
3636class RenderObject;

5252 static bool isOverflowHidden(const RenderObject*);
5353
5454 // Calculates the repaintRect in combination with filter, clipper and masker in local coordinates.
55  static void intersectRepaintRectWithResources(const RenderObject*, FloatRect&);
 55 static void intersectRepaintRectWithResources(const RenderObject*, GraphicsRect&);
5656
5757 // Determines whether the passed point lies in a clipping area
58  static bool pointInClippingArea(RenderObject*, const FloatPoint&);
 58 static bool pointInClippingArea(RenderObject*, const GraphicsPoint&);
5959
60  static void computeContainerBoundingBoxes(const RenderObject* container, FloatRect& objectBoundingBox, FloatRect& strokeBoundingBox, FloatRect& repaintBoundingBox);
61  static bool paintInfoIntersectsRepaintRect(const FloatRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo&);
 60 static void computeContainerBoundingBoxes(const RenderObject* container, GraphicsRect& objectBoundingBox, GraphicsRect& strokeBoundingBox, GraphicsRect& repaintBoundingBox);
 61 static bool paintInfoIntersectsRepaintRect(const GraphicsRect& localRepaintRect, const AffineTransform& localTransform, const PaintInfo&);
6262
6363 // Important functions used by nearly all SVG renderers centralizing coordinate transformations / repaint rect calculations
6464 static IntRect clippedOverflowRectForRepaint(RenderObject*, RenderBoxModelObject* repaintContainer);
90929

Source/WebCore/rendering/svg/SVGTextRunRenderingContext.h

4343 void setActivePaintingResource(RenderSVGResource* object) { m_activePaintingResource = object; }
4444
4545 virtual GlyphData glyphDataForCharacter(const Font&, const TextRun&, WidthIterator&, UChar32 character, bool mirror, int currentCharacter, unsigned& advanceLength);
46  virtual void drawSVGGlyphs(GraphicsContext*, const TextRun&, const SimpleFontData*, const GlyphBuffer&, int from, int to, const FloatPoint&) const;
 46 virtual void drawSVGGlyphs(GraphicsContext*, const TextRun&, const SimpleFontData*, const GlyphBuffer&, int from, int to, const GraphicsPoint&) const;
4747 virtual float floatWidthUsingSVGFont(const Font&, const TextRun&, int& charsConsumed, String& glyphName) const;
4848#endif
4949
90929

Source/WebCore/rendering/svg/RenderSVGRoot.cpp

6262{
6363}
6464
65 void RenderSVGRoot::computeIntrinsicRatioInformation(FloatSize& intrinsicRatio, bool& isPercentageIntrinsicSize) const
 65void RenderSVGRoot::computeIntrinsicRatioInformation(GraphicsSize& intrinsicRatio, bool& isPercentageIntrinsicSize) const
6666{
6767 // Spec: http://dev.w3.org/SVG/profiles/1.1F2/publish/coords.html#IntrinsicSizing
6868 // The intrinsic aspect ratio of the viewport of SVG content is necessary for example, when including

7676 // ‘width’ and ‘height’ attributes after resolving both values to user units.
7777 isPercentageIntrinsicSize = false;
7878 if (style()->width().isFixed() && style()->height().isFixed()) {
79  intrinsicRatio = FloatSize(width(), height());
 79 intrinsicRatio = GraphicsSize(width(), height());
8080 return;
8181 }
8282

9090 // account for certain cases of the intrinsic width/height calculation in RenderPart::computeReplacedLogicalWidth/Height.
9191 if (intrinsicRatio.isEmpty() && style()->width().isPercent() && style()->height().isPercent()) {
9292 isPercentageIntrinsicSize = true;
93  intrinsicRatio = FloatSize(style()->width().percent(), style()->height().percent());
 93 intrinsicRatio = GraphicsSize(style()->width().percent(), style()->height().percent());
9494 }
9595}
9696

345345 if (!svg->hasSetContainerSize()) {
346346 // In the normal case of <svg> being stand-alone or in a CSSBoxModel object we use
347347 // RenderBox::width()/height() (which pulls data from RenderStyle)
348  m_viewportSize = FloatSize(width(), height());
 348 m_viewportSize = GraphicsSize(width(), height());
349349 return;
350350 }
351351

354354 // FIXME: Check how SVGImage + zooming is supposed to be handled?
355355 SVGLength width = svg->width();
356356 SVGLength height = svg->height();
357  m_viewportSize = FloatSize(width.unitType() == LengthTypePercentage ? svg->relativeWidthValue() : width.value(svg),
 357 m_viewportSize = GraphicsSize(width.unitType() == LengthTypePercentage ? svg->relativeWidthValue() : width.value(svg),
358358 height.unitType() == LengthTypePercentage ? svg->relativeHeightValue() : height.value(svg));
359359}
360360

365365 IntSize borderAndPadding = borderOriginToContentBox();
366366 SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
367367 float scale = style()->effectiveZoom();
368  FloatPoint translate = svg->currentTranslate();
 368 GraphicsPoint translate = svg->currentTranslate();
369369 AffineTransform ctm(scale, 0, 0, scale, borderAndPadding.width() + translate.x(), borderAndPadding.height() + translate.y());
370370 return ctm * svg->viewBoxToViewTransform(width() / scale, height() / scale);
371371}

406406 repaintRect = localToBorderBoxTransform().mapRect(repaintRect);
407407
408408 // Apply initial viewport clip - not affected by overflow settings
409  repaintRect.intersect(enclosingIntRect(FloatRect(FloatPoint(), m_viewportSize)));
 409 repaintRect.intersect(enclosingIntRect(GraphicsRect(GraphicsPoint(), m_viewportSize)));
410410
411411 const SVGRenderStyle* svgStyle = style()->svgStyle();
412412 if (const ShadowData* shadow = svgStyle->shadow())

427427
428428void RenderSVGRoot::updateCachedBoundaries()
429429{
430  m_objectBoundingBox = FloatRect();
431  m_strokeBoundingBox = FloatRect();
432  m_repaintBoundingBox = FloatRect();
 430 m_objectBoundingBox = GraphicsRect();
 431 m_strokeBoundingBox = GraphicsRect();
 432 m_repaintBoundingBox = GraphicsRect();
433433
434434 SVGRenderSupport::computeContainerBoundingBoxes(this, m_objectBoundingBox, m_strokeBoundingBox, m_repaintBoundingBox);
435435 SVGRenderSupport::intersectRepaintRectWithResources(this, m_repaintBoundingBox);

449449 LayoutPoint localPoint = localToParentTransform().inverse().mapPoint(pointInParent);
450450
451451 for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
452  if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) {
 452 if (child->nodeAtGraphicsPoint(request, result, localPoint, hitTestAction)) {
453453 // FIXME: CSS/HTML assumes the local point is relative to the border box, right?
454454 updateHitTestResult(result, pointInBorderBox);
455  // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet.
 455 // FIXME: nodeAtGraphicsPoint() doesn't handle rect-based hit tests yet.
456456 result.addNodeToRectBasedTestResult(child->node(), pointInContainer);
457457 return true;
458458 }
90929

Source/WebCore/rendering/svg/RenderSVGImage.h

2626
2727#if ENABLE(SVG)
2828#include "AffineTransform.h"
29 #include "FloatRect.h"
 29#include "GraphicsRect.h"
3030#include "RenderSVGModelObject.h"
3131#include "SVGPreserveAspectRatio.h"
3232#include "SVGRenderSupport.h"

5353
5454 virtual const AffineTransform& localToParentTransform() const { return m_localTransform; }
5555
56  virtual FloatRect objectBoundingBox() const { return m_objectBoundingBox; }
57  virtual FloatRect strokeBoundingBox() const { return m_objectBoundingBox; }
58  virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
 56 virtual GraphicsRect objectBoundingBox() const { return m_objectBoundingBox; }
 57 virtual GraphicsRect strokeBoundingBox() const { return m_objectBoundingBox; }
 58 virtual GraphicsRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
5959
6060 virtual void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint&);
6161

6464 virtual void layout();
6565 virtual void paint(PaintInfo&, const LayoutPoint&);
6666
67  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 67 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
6868
6969 virtual AffineTransform localTransform() const { return m_localTransform; }
7070
7171 bool m_updateCachedRepaintRect : 1;
7272 bool m_needsTransformUpdate : 1;
7373 AffineTransform m_localTransform;
74  FloatRect m_objectBoundingBox;
75  FloatRect m_repaintBoundingBox;
 74 GraphicsRect m_objectBoundingBox;
 75 GraphicsRect m_repaintBoundingBox;
7676 OwnPtr<RenderImageResource> m_imageResource;
7777};
7878
90929

Source/WebCore/rendering/svg/RenderSVGModelObject.cpp

6666 IntRect box = enclosingIntRect(repaintRectInLocalCoordinates());
6767 adjustRectForOutlineAndShadow(box);
6868
69  FloatQuad containerRelativeQuad = localToContainerQuad(FloatRect(box), repaintContainer);
 69 GraphicsQuad containerRelativeQuad = localToContainerQuad(GraphicsRect(box), repaintContainer);
7070 return containerRelativeQuad.enclosingBoundingBox();
7171}
7272

7676 ASSERT_NOT_REACHED();
7777}
7878
79 void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads)
 79void RenderSVGModelObject::absoluteQuads(Vector<GraphicsQuad>& quads)
8080{
8181 quads.append(localToAbsoluteQuad(strokeBoundingBox()));
8282}
90929

Source/WebCore/rendering/svg/RenderSVGText.h

4040
4141 void setNeedsPositioningValuesUpdate() { m_needsPositioningValuesUpdate = true; }
4242 virtual void setNeedsTransformUpdate() { m_needsTransformUpdate = true; }
43  virtual FloatRect repaintRectInLocalCoordinates() const;
 43 virtual GraphicsRect repaintRectInLocalCoordinates() const;
4444
4545 static RenderSVGText* locateRenderSVGTextAncestor(RenderObject*);
4646 static const RenderSVGText* locateRenderSVGTextAncestor(const RenderObject*);

5454
5555 virtual void paint(PaintInfo&, const LayoutPoint&);
5656 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
57  virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
 57 virtual bool nodeAtGraphicsPoint(const HitTestRequest&, HitTestResult&, const GraphicsPoint& pointInParent, HitTestAction);
5858 virtual VisiblePosition positionForPoint(const LayoutPoint&);
5959
6060 virtual bool requiresLayer() const { return false; }
6161 virtual void layout();
6262
63  virtual void absoluteQuads(Vector<FloatQuad>&);
 63 virtual void absoluteQuads(Vector<GraphicsQuad>&);
6464
6565 virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
6666 virtual void computeRectForRepaint(RenderBoxModelObject* repaintContainer, IntRect&, bool fixed = false);
6767
6868 virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool useTransforms, bool fixed, TransformState&) const;
6969
70  virtual FloatRect objectBoundingBox() const { return frameRect(); }
71  virtual FloatRect strokeBoundingBox() const;
 70 virtual GraphicsRect objectBoundingBox() const { return frameRect(); }
 71 virtual GraphicsRect strokeBoundingBox() const;
7272
7373 virtual const AffineTransform& localToParentTransform() const { return m_localTransform; }
7474 virtual AffineTransform localTransform() const { return m_localTransform; }
90929

Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp

7474 paintInfo.context->clip(m_viewport);
7575}
7676
77 FloatRect RenderSVGResourceMarker::markerBoundaries(const AffineTransform& markerTransformation) const
 77GraphicsRect RenderSVGResourceMarker::markerBoundaries(const AffineTransform& markerTransformation) const
7878{
79  FloatRect coordinates = RenderSVGContainer::repaintRectInLocalCoordinates();
 79 GraphicsRect coordinates = RenderSVGContainer::repaintRectInLocalCoordinates();
8080
8181 // Map repaint rect into parent coordinate space, in which the marker boundaries have to be evaluated
8282 coordinates = localToParentTransform().mapRect(coordinates);

9292 // return viewportTranslation * localTransform() * viewportTransform();
9393}
9494
95 FloatPoint RenderSVGResourceMarker::referencePoint() const
 95GraphicsPoint RenderSVGResourceMarker::referencePoint() const
9696{
9797 SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
9898 ASSERT(marker);
9999
100  return FloatPoint(marker->refX().value(marker), marker->refY().value(marker));
 100 return GraphicsPoint(marker->refX().value(marker), marker->refY().value(marker));
101101}
102102
103103float RenderSVGResourceMarker::angle() const

112112 return angle;
113113}
114114
115 AffineTransform RenderSVGResourceMarker::markerTransformation(const FloatPoint& origin, float autoAngle, float strokeWidth) const
 115AffineTransform RenderSVGResourceMarker::markerTransformation(const GraphicsPoint& origin, float autoAngle, float strokeWidth) const
116116{
117117 SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(node());
118118 ASSERT(marker);

135135 RenderSVGContainer::paint(info, IntPoint());
136136}
137137
138 AffineTransform RenderSVGResourceMarker::markerContentTransformation(const AffineTransform& contentTransformation, const FloatPoint& origin, float strokeWidth) const
 138AffineTransform RenderSVGResourceMarker::markerContentTransformation(const AffineTransform& contentTransformation, const GraphicsPoint& origin, float strokeWidth) const
139139{
140140 // The 'origin' coordinate maps to SVGs refX/refY, given in coordinates relative to the viewport established by the marker
141  FloatPoint mappedOrigin = viewportTransform().mapPoint(origin);
 141 GraphicsPoint mappedOrigin = viewportTransform().mapPoint(origin);
142142
143143 AffineTransform transformation = contentTransformation;
144144 if (strokeWidth != -1)

166166
167167 float w = marker->markerWidth().value(marker);
168168 float h = marker->markerHeight().value(marker);
169  m_viewport = FloatRect(0, 0, w, h);
 169 m_viewport = GraphicsRect(0, 0, w, h);
170170}
171171
172172}
90929

Source/WebCore/rendering/svg/SVGMarkerLayoutInfo.cpp

6565 ++elementIndex;
6666}
6767
68 FloatRect SVGMarkerLayoutInfo::calculateBoundaries(RenderSVGResourceMarker* startMarker, RenderSVGResourceMarker* midMarker, RenderSVGResourceMarker* endMarker, float strokeWidth, const Path& path)
 68GraphicsRect SVGMarkerLayoutInfo::calculateBoundaries(RenderSVGResourceMarker* startMarker, RenderSVGResourceMarker* midMarker, RenderSVGResourceMarker* endMarker, float strokeWidth, const Path& path)
6969{
7070 m_layout.clear();
7171 m_midMarker = midMarker;

8080 }
8181
8282 if (m_layout.isEmpty())
83  return FloatRect();
 83 return GraphicsRect();
8484
8585 Vector<MarkerLayout>::iterator it = m_layout.begin();
8686 Vector<MarkerLayout>::iterator end = m_layout.end();
8787
88  FloatRect bounds;
 88 GraphicsRect bounds;
8989 for (; it != end; ++it) {
9090 MarkerLayout& layout = *it;
9191

121121 }
122122}
123123
124 void SVGMarkerLayoutInfo::addLayoutedMarker(RenderSVGResourceMarker* marker, const FloatPoint& origin, float angle)
 124void SVGMarkerLayoutInfo::addLayoutedMarker(RenderSVGResourceMarker* marker, const GraphicsPoint& origin, float angle)
125125{
126126 ASSERT(marker);
127127 m_layout.append(MarkerLayout(marker, marker->markerTransformation(origin, angle, m_strokeWidth)));
90929

Source/WebCore/rendering/svg/SVGRenderTreeAsText.h

3333namespace WebCore {
3434
3535class Color;
36 class FloatRect;
37 class FloatSize;
 36class GraphicsRect;
 37class GraphicsSize;
3838class Node;
3939class RenderBlock;
4040class RenderImage;

6161// helper operators defined used in various classes to dump the render tree.
6262TextStream& operator<<(TextStream&, const AffineTransform&);
6363TextStream& operator<<(TextStream&, const Color&);
64 TextStream& operator<<(TextStream&, const FloatRect&);
 64TextStream& operator<<(TextStream&, const GraphicsRect&);
6565
6666// helper operators specific to dumping the render tree. these are used in various classes to dump the render tree
6767// these could be defined in separate namespace to avoid matching these generic signatures unintentionally.
90929

Source/WebCore/rendering/svg/RenderSVGResourceMasker.h

2121#define RenderSVGResourceMasker_h
2222
2323#if ENABLE(SVG)
24 #include "FloatRect.h"
 24#include "GraphicsRect.h"
2525#include "GraphicsContext.h"
2626#include "ImageBuffer.h"
2727#include "IntSize.h"

4848 virtual void removeAllClientsFromCache(bool markForInvalidation = true);
4949 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true);
5050 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
51  virtual FloatRect resourceBoundingBox(RenderObject*);
 51 virtual GraphicsRect resourceBoundingBox(RenderObject*);
5252
5353 SVGUnitTypes::SVGUnitType maskUnits() const { return static_cast<SVGMaskElement*>(node())->maskUnits(); }
5454 SVGUnitTypes::SVGUnitType maskContentUnits() const { return static_cast<SVGMaskElement*>(node())->maskContentUnits(); }

6060 void drawContentIntoMaskImage(MaskerData*, const SVGMaskElement*, RenderObject*);
6161 void calculateMaskContentRepaintRect();
6262
63  FloatRect m_maskContentBoundaries;
 63 GraphicsRect m_maskContentBoundaries;
6464 HashMap<RenderObject*, MaskerData*> m_masker;
6565};
6666
90929

Source/WebCore/rendering/svg/SVGRootInlineBox.h

4949
5050 void computePerCharacterLayoutInformation();
5151
52  virtual FloatRect objectBoundingBox() const { return FloatRect(); }
53  virtual FloatRect repaintRectInLocalCoordinates() const { return FloatRect(); }
 52 virtual GraphicsRect objectBoundingBox() const { return GraphicsRect(); }
 53 virtual GraphicsRect repaintRectInLocalCoordinates() const { return GraphicsRect(); }
5454
5555 InlineBox* closestLeafChildForPosition(const IntPoint&);
5656
90929

Source/WebCore/rendering/svg/SVGInlineTextBox.h

6161 void setStartsNewTextChunk(bool newTextChunk) { m_startsNewTextChunk = newTextChunk; }
6262
6363 int offsetForPositionInFragment(const SVGTextFragment&, float position, bool includePartialGlyphs) const;
64  FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentStartPosition, int fragmentEndPosition, RenderStyle*);
 64 GraphicsRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentStartPosition, int fragmentEndPosition, RenderStyle*);
6565
6666private:
6767 TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const;
90929

Source/WebCore/rendering/svg/SVGImageBufferTools.h

2727namespace WebCore {
2828
2929class AffineTransform;
30 class FloatRect;
31 class FloatSize;
 30class GraphicsRect;
 31class GraphicsSize;
3232class GraphicsContext;
3333class RenderObject;
3434
3535class SVGImageBufferTools {
3636 WTF_MAKE_NONCOPYABLE(SVGImageBufferTools);
3737public:
38  static bool createImageBuffer(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace);
 38 static bool createImageBuffer(const GraphicsRect& absoluteTargetRect, const GraphicsRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace);
3939 static void renderSubtreeToImageBuffer(ImageBuffer*, RenderObject*, const AffineTransform&);
40  static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&);
 40 static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const GraphicsRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&);
4141
4242 static void calculateTransformationToOutermostSVGCoordinateSystem(const RenderObject*, AffineTransform& absoluteTransform);
43  static FloatRect clampedAbsoluteTargetRectForRenderer(const RenderObject*, const FloatRect& absoluteTargetRect);
44  static IntSize roundedImageBufferSize(const FloatSize&);
 43 static GraphicsRect clampedAbsoluteTargetRectForRenderer(const RenderObject*, const GraphicsRect& absoluteTargetRect);
 44 static IntSize roundedImageBufferSize(const GraphicsSize&);
4545
4646private:
4747 SVGImageBufferTools() { }
90929

Source/WebCore/rendering/svg/RenderSVGResourceFilter.h

2525#define RenderSVGResourceFilter_h
2626
2727#if ENABLE(SVG) && ENABLE(FILTERS)
28 #include "FloatRect.h"
 28#include "GraphicsRect.h"
2929#include "ImageBuffer.h"
3030#include "RenderSVGResourceContainer.h"
3131#include "SVGFilter.h"

5252 OwnPtr<ImageBuffer> sourceGraphicBuffer;
5353 GraphicsContext* savedContext;
5454 AffineTransform shearFreeAbsoluteTransform;
55  FloatRect boundaries;
56  FloatSize scale;
 55 GraphicsRect boundaries;
 56 GraphicsSize scale;
5757 bool builded : 1;
5858 bool markedForRemoval : 1;
5959};

7474 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
7575 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode, const Path*);
7676
77  virtual FloatRect resourceBoundingBox(RenderObject*);
 77 virtual GraphicsRect resourceBoundingBox(RenderObject*);
7878
7979 PassRefPtr<SVGFilterBuilder> buildPrimitives(Filter*);
8080

8787 static RenderSVGResourceType s_resourceType;
8888
8989private:
90  bool fitsInMaximumImageSize(const FloatSize&, FloatSize&);
 90 bool fitsInMaximumImageSize(const GraphicsSize&, GraphicsSize&);
9191
9292 HashMap<RenderObject*, FilterData*> m_filter;
9393};
90929

Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp

2525#include "RenderSVGResourceClipper.h"
2626
2727#include "AffineTransform.h"
28 #include "FloatRect.h"
 28#include "GraphicsRect.h"
2929#include "GraphicsContext.h"
3030#include "HitTestRequest.h"
3131#include "HitTestResult.h"

7070 if (m_invalidationBlocked)
7171 return;
7272
73  m_clipBoundaries = FloatRect();
 73 m_clipBoundaries = GraphicsRect();
7474 if (!m_clipper.isEmpty()) {
7575 deleteAllValues(m_clipper);
7676 m_clipper.clear();

104104 return applyClippingToContext(object, object->objectBoundingBox(), object->repaintRectInLocalCoordinates(), context);
105105}
106106
107 bool RenderSVGResourceClipper::pathOnlyClipping(GraphicsContext* context, const FloatRect& objectBoundingBox)
 107bool RenderSVGResourceClipper::pathOnlyClipping(GraphicsContext* context, const GraphicsRect& objectBoundingBox)
108108{
109109 // If the current clip-path gets clipped itself, we have to fallback to masking.
110110 if (!style()->svgStyle()->clipperResource().isEmpty())

150150 }
151151 // The SVG specification wants us to clip everything, if clip-path doesn't have a child.
152152 if (clipPath.isEmpty())
153  clipPath.addRect(FloatRect());
 153 clipPath.addRect(GraphicsRect());
154154 context->clipPath(clipPath, clipRule);
155155 return true;
156156}
157157
158 bool RenderSVGResourceClipper::applyClippingToContext(RenderObject* object, const FloatRect& objectBoundingBox,
159  const FloatRect& repaintRect, GraphicsContext* context)
 158bool RenderSVGResourceClipper::applyClippingToContext(RenderObject* object, const GraphicsRect& objectBoundingBox,
 159 const GraphicsRect& repaintRect, GraphicsContext* context)
160160{
161161 if (!m_clipper.contains(object))
162162 m_clipper.set(object, new ClipperData);

172172 AffineTransform absoluteTransform;
173173 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
174174
175  FloatRect absoluteTargetRect = absoluteTransform.mapRect(repaintRect);
176  FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(object, absoluteTargetRect);
 175 GraphicsRect absoluteTargetRect = absoluteTransform.mapRect(repaintRect);
 176 GraphicsRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRectForRenderer(object, absoluteTargetRect);
177177
178178 if (shouldCreateClipData && !clampedAbsoluteTargetRect.isEmpty()) {
179179 if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, clipperData->clipMaskImage, ColorSpaceDeviceRGB))

205205 return true;
206206}
207207
208 bool RenderSVGResourceClipper::drawContentIntoMaskImage(ClipperData* clipperData, const FloatRect& objectBoundingBox)
 208bool RenderSVGResourceClipper::drawContentIntoMaskImage(ClipperData* clipperData, const GraphicsRect& objectBoundingBox)
209209{
210210 ASSERT(clipperData);
211211 ASSERT(clipperData->clipMaskImage);

293293 }
294294}
295295
296 bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundingBox, const FloatPoint& nodeAtPoint)
 296bool RenderSVGResourceClipper::hitTestClipContent(const GraphicsRect& objectBoundingBox, const GraphicsPoint& nodeAtPoint)
297297{
298  FloatPoint point = nodeAtPoint;
 298 GraphicsPoint point = nodeAtPoint;
299299 if (!SVGRenderSupport::pointInClippingArea(this, point))
300300 return false;
301301

314314 continue;
315315 IntPoint hitPoint;
316316 HitTestResult result(hitPoint);
317  if (renderer->nodeAtFloatPoint(HitTestRequest(HitTestRequest::SVGClipContent), result, point, HitTestForeground))
 317 if (renderer->nodeAtGraphicsPoint(HitTestRequest(HitTestRequest::SVGClipContent), result, point, HitTestForeground))
318318 return true;
319319 }
320320
321321 return false;
322322}
323323
324 FloatRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object)
 324GraphicsRect RenderSVGResourceClipper::resourceBoundingBox(RenderObject* object)
325325{
326326 // Resource was not layouted yet. Give back the boundingBox of the object.
327327 if (selfNeedsLayout())

331331 calculateClipContentRepaintRect();
332332
333333 if (static_cast<SVGClipPathElement*>(node())->clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
334  FloatRect objectBoundingBox = object->objectBoundingBox();
 334 GraphicsRect objectBoundingBox = object->objectBoundingBox();
335335 AffineTransform transform;
336336 transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
337337 transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
90929

Source/WebCore/rendering/svg/RenderSVGResourceGradient.h

2424
2525#if ENABLE(SVG)
2626#include "AffineTransform.h"
27 #include "FloatRect.h"
 27#include "GraphicsRect.h"
2828#include "Gradient.h"
2929#include "ImageBuffer.h"
3030#include "RenderSVGResourceContainer.h"

5151
5252 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, unsigned short resourceMode);
5353 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned short resourceMode, const Path*);
54  virtual FloatRect resourceBoundingBox(RenderObject*) { return FloatRect(); }
 54 virtual GraphicsRect resourceBoundingBox(RenderObject*) { return GraphicsRect(); }
5555
5656protected:
5757 void addStops(GradientData*, const Vector<Gradient::ColorStop>&) const;
90929

Source/WebCore/rendering/RenderReplaced.cpp

229229
230230 // 10.3.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width
231231 bool isPercentageIntrinsicSize = false;
232  FloatSize intrinsicRatio;
 232 GraphicsSize intrinsicRatio;
233233 if (contentRenderer) {
234234 contentRenderer->computeIntrinsicRatioInformation(intrinsicRatio, isPercentageIntrinsicSize);
235235 contentRenderStyle = contentRenderer->style();

326326
327327 // 10.6.2 Inline, replaced elements: http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height
328328 bool isPercentageIntrinsicSize = false;
329  FloatSize intrinsicRatio;
 329 GraphicsSize intrinsicRatio;
330330 if (contentRenderer) {
331331 contentRenderer->computeIntrinsicRatioInformation(intrinsicRatio, isPercentageIntrinsicSize);
332332 contentRenderStyle = contentRenderer->style();

442442 if (clipToVisibleContent)
443443 computeRectForRepaint(repaintContainer, rect);
444444 else
445  rect = localToContainerQuad(FloatRect(rect), repaintContainer).enclosingBoundingBox();
 445 rect = localToContainerQuad(GraphicsRect(rect), repaintContainer).enclosingBoundingBox();
446446
447447 return rect;
448448}
90929

Source/WebCore/rendering/RenderView.h

8383 bool printing() const;
8484
8585 virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
86  virtual void absoluteQuads(Vector<FloatQuad>&);
 86 virtual void absoluteQuads(Vector<GraphicsQuad>&);
8787
8888#if USE(ACCELERATED_COMPOSITING)
8989 void setMaximalOutlineSize(int o);
90929

Source/WebCore/rendering/RenderLayer.h

425425 // Returns true if the layer has a -webkit-perspective.
426426 // Note that this transform has the perspective-origin baked in.
427427 TransformationMatrix perspectiveTransform() const;
428  FloatPoint perspectiveOrigin() const;
 428 GraphicsPoint perspectiveOrigin() const;
429429 bool preserves3D() const { return renderer()->style()->transformStyle3D() == TransformStyle3DPreserve3D; }
430430 bool has3DTransform() const { return m_transform && !m_transform->isAffine(); }
431431
90929

Source/WebCore/rendering/HitTestResult.cpp

539539 return !rect.contains(rectForPoint(pointInContainer));
540540}
541541
542 bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const LayoutPoint& pointInContainer, const FloatRect& rect)
 542bool HitTestResult::addNodeToRectBasedTestResult(Node* node, const LayoutPoint& pointInContainer, const GraphicsRect& rect)
543543{
544544 // If it is not a rect-based hit test, this method has to be no-op.
545545 // Return false, so the hit test stops.
90929

Source/WebCore/rendering/TransformState.cpp

8787 flattenWithTransform(*m_accumulatedTransform);
8888}
8989
90 FloatPoint TransformState::mappedPoint() const
 90GraphicsPoint TransformState::mappedPoint() const
9191{
9292 if (!m_accumulatedTransform)
9393 return m_lastPlanarPoint;

9898 return m_accumulatedTransform->inverse().projectPoint(m_lastPlanarPoint);
9999}
100100
101 FloatQuad TransformState::mappedQuad() const
 101GraphicsQuad TransformState::mappedQuad() const
102102{
103103 if (!m_accumulatedTransform)
104104 return m_lastPlanarQuad;

164164 m_accumulatingTransform = false;
165165}
166166
167 FloatPoint HitTestingTransformState::mappedPoint() const
 167GraphicsPoint HitTestingTransformState::mappedPoint() const
168168{
169169 return m_accumulatedTransform.inverse().projectPoint(m_lastPlanarPoint);
170170}
171171
172 FloatQuad HitTestingTransformState::mappedQuad() const
 172GraphicsQuad HitTestingTransformState::mappedQuad() const
173173{
174174 return m_accumulatedTransform.inverse().projectQuad(m_lastPlanarQuad);
175175}
90929

Source/WebCore/rendering/style/ShadowData.h

8080 void setNext(PassOwnPtr<ShadowData> shadow) { m_next = shadow; }
8181
8282 void adjustRectForShadow(IntRect&, int additionalOutlineSize = 0) const;
83  void adjustRectForShadow(FloatRect&, int additionalOutlineSize = 0) const;
 83 void adjustRectForShadow(GraphicsRect&, int additionalOutlineSize = 0) const;
8484
8585private:
8686 LayoutUnit m_x;
90929

Source/WebCore/rendering/style/SVGRenderStyle.h

3434
3535namespace WebCore {
3636
37 class FloatRect;
 37class GraphicsRect;
3838class IntRect;
3939class RenderObject;
4040
90929

Source/WebCore/rendering/style/ShadowData.cpp

8181 rect.setHeight(rect.height() - shadowTop + shadowBottom);
8282}
8383
84 void ShadowData::adjustRectForShadow(FloatRect& rect, int additionalOutlineSize) const
 84void ShadowData::adjustRectForShadow(GraphicsRect& rect, int additionalOutlineSize) const
8585{
8686 LayoutUnit shadowLeft = 0;
8787 LayoutUnit shadowRight = 0;
90929

Source/WebCore/rendering/RenderCombineText.cpp

6464 return RenderText::width(from, length, font, xPosition, fallbackFonts, glyphOverflow);
6565}
6666
67 void RenderCombineText::adjustTextOrigin(FloatPoint& textOrigin, const FloatRect& boxRect) const
 67void RenderCombineText::adjustTextOrigin(GraphicsPoint& textOrigin, const GraphicsRect& boxRect) const
6868{
6969 if (m_isCombined)
7070 textOrigin.move(boxRect.height() / 2 - ceilf(m_combinedTextWidth) / 2, style()->font().pixelSize());
90929

Source/WebCore/rendering/RenderText.h

5757 virtual void absoluteRects(Vector<LayoutRect>&, const LayoutPoint& accumulatedOffset);
5858 void absoluteRectsForRange(Vector<IntRect>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false);
5959
60  virtual void absoluteQuads(Vector<FloatQuad>&);
61  void absoluteQuadsForRange(Vector<FloatQuad>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false);
 60 virtual void absoluteQuads(Vector<GraphicsQuad>&);
 61 void absoluteQuadsForRange(Vector<GraphicsQuad>&, unsigned startOffset = 0, unsigned endOffset = UINT_MAX, bool useSelectionHeight = false);
6262
6363 enum ClippingOption { NoClipping, ClipToEllipsis };
64  void absoluteQuads(Vector<FloatQuad>&, ClippingOption option = NoClipping);
 64 void absoluteQuads(Vector<GraphicsQuad>&, ClippingOption option = NoClipping);
6565
6666 virtual VisiblePosition positionForPoint(const LayoutPoint&);
6767

8585 virtual IntRect linesBoundingBox() const;
8686 IntRect linesVisualOverflowBoundingBox() const;
8787
88  FloatPoint firstRunOrigin() const;
 88 GraphicsPoint firstRunOrigin() const;
8989 float firstRunX() const;
9090 float firstRunY() const;
9191
90929

Source/WebCore/rendering/RenderLayerCompositor.cpp

559559 return;
560560
561561 if (!boundsComputed) {
562  layerBounds = layer->renderer()->localToAbsoluteQuad(FloatRect(layer->localBoundingBox())).enclosingBoundingBox();
 562 layerBounds = layer->renderer()->localToAbsoluteQuad(GraphicsRect(layer->localBoundingBox())).enclosingBoundingBox();
563563 // Empty rects never intersect, but we need them to for the purposes of overlap testing.
564564 if (layerBounds.isEmpty())
565565 layerBounds.setSize(IntSize(1, 1));

644644 IntRect absBounds;
645645 if (overlapMap && !overlapMap->isEmpty()) {
646646 // If we're testing for overlap, we only need to composite if we overlap something that is already composited.
647  absBounds = layer->renderer()->localToAbsoluteQuad(FloatRect(layer->localBoundingBox())).enclosingBoundingBox();
 647 absBounds = layer->renderer()->localToAbsoluteQuad(GraphicsRect(layer->localBoundingBox())).enclosingBoundingBox();
648648 // Empty rects never intersect, but we need them to for the purposes of overlap testing.
649649 if (absBounds.isEmpty())
650650 absBounds.setSize(IntSize(1, 1));

945945 m_clipLayer->setSize(frameView->visibleContentRect(false /* exclude scrollbars */).size());
946946
947947 IntPoint scrollPosition = frameView->scrollPosition();
948  m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
 948 m_scrollLayer->setPosition(GraphicsPoint(-scrollPosition.x(), -scrollPosition.y()));
949949 updateOverflowControlsLayers();
950950 }
951951}

953953void RenderLayerCompositor::frameViewDidScroll(const IntPoint& scrollPosition)
954954{
955955 if (m_scrollLayer)
956  m_scrollLayer->setPosition(FloatPoint(-scrollPosition.x(), -scrollPosition.y()));
 956 m_scrollLayer->setPosition(GraphicsPoint(-scrollPosition.x(), -scrollPosition.y()));
957957}
958958
959959String RenderLayerCompositor::layerTreeAsText(bool showDebugInfo)

16171617#ifndef NDEBUG
16181618 m_rootContentLayer->setName("Root platform");
16191619#endif
1620  m_rootContentLayer->setSize(FloatSize(m_renderView->maxXLayoutOverflow(), m_renderView->maxYLayoutOverflow()));
1621  m_rootContentLayer->setPosition(FloatPoint());
 1620 m_rootContentLayer->setSize(GraphicsSize(m_renderView->maxXLayoutOverflow(), m_renderView->maxYLayoutOverflow()));
 1621 m_rootContentLayer->setPosition(GraphicsPoint());
16221622
16231623 // Need to clip to prevent transformed content showing outside this frame
16241624 m_rootContentLayer->setMasksToBounds(true);
90929

Source/WebCore/rendering/InlineBox.h

6666 {
6767 }
6868
69  InlineBox(RenderObject* obj, FloatPoint topLeft, float logicalWidth, bool firstLine, bool constructed,
 69 InlineBox(RenderObject* obj, GraphicsPoint topLeft, float logicalWidth, bool firstLine, bool constructed,
7070 bool dirty, bool extracted, bool isHorizontal, InlineBox* next, InlineBox* prev, InlineFlowBox* parent)
7171 : m_next(next)
7272 , m_prev(prev)

232232 float y() const { return m_topLeft.y(); }
233233 float top() const { return m_topLeft.y(); }
234234
235  const FloatPoint& topLeft() const { return m_topLeft; }
 235 const GraphicsPoint& topLeft() const { return m_topLeft; }
236236
237237 float width() const { return isHorizontal() ? logicalWidth() : logicalHeight(); }
238238 float height() const { return isHorizontal() ? logicalHeight() : logicalWidth(); }
239  FloatSize size() const { return IntSize(width(), height()); }
 239 GraphicsSize size() const { return IntSize(width(), height()); }
240240 float right() const { return left() + width(); }
241241 float bottom() const { return top() + height(); }
242242

271271 // The logical height is our extent in the block flow direction, i.e., height for horizontal text and width for vertical text.
272272 LayoutUnit logicalHeight() const;
273273
274  FloatRect logicalFrameRect() const { return isHorizontal() ? IntRect(m_topLeft.x(), m_topLeft.y(), m_logicalWidth, logicalHeight()) : IntRect(m_topLeft.y(), m_topLeft.x(), m_logicalWidth, logicalHeight()); }
 274 GraphicsRect logicalFrameRect() const { return isHorizontal() ? IntRect(m_topLeft.x(), m_topLeft.y(), m_logicalWidth, logicalHeight()) : IntRect(m_topLeft.y(), m_topLeft.x(), m_logicalWidth, logicalHeight()); }
275275
276276 virtual int baselinePosition(FontBaseline baselineType) const { return boxModelObject()->baselinePosition(baselineType, m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }
277277 virtual int lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); }

316316 return 0;
317317 }
318318
319  FloatPoint locationIncludingFlipping();
320  void flipForWritingMode(FloatRect&);
321  FloatPoint flipForWritingMode(const FloatPoint&);
 319 GraphicsPoint locationIncludingFlipping();
 320 void flipForWritingMode(GraphicsRect&);
 321 GraphicsPoint flipForWritingMode(const GraphicsPoint&);
322322 void flipForWritingMode(IntRect&);
323323 IntPoint flipForWritingMode(const IntPoint&);
324324

334334public:
335335 RenderObject* m_renderer;
336336
337  FloatPoint m_topLeft;
 337 GraphicsPoint m_topLeft;
338338 float m_logicalWidth;
339339
340340 // Some of these bits are actually for subclasses and moved here to compact the structures.
90929

Source/WebCore/rendering/RenderTreeAsText.h

3333namespace WebCore {
3434
3535class Element;
36 class FloatPoint;
37 class FloatSize;
 36class GraphicsPoint;
 37class GraphicsSize;
3838class Frame;
3939class IntPoint;
4040class IntRect;

7070
7171TextStream& operator<<(TextStream&, const IntPoint&);
7272TextStream& operator<<(TextStream&, const IntRect&);
73 TextStream& operator<<(TextStream&, const FloatPoint&);
74 TextStream& operator<<(TextStream&, const FloatSize&);
 73TextStream& operator<<(TextStream&, const GraphicsPoint&);
 74TextStream& operator<<(TextStream&, const GraphicsSize&);
7575
7676template<typename Item>
7777TextStream& operator<<(TextStream& ts, const Vector<Item>& vector)
90929

Source/WebCore/WebCore.xcodeproj/project.pbxproj

220220 0FD3080F117CF7E700A791F7 /* RenderFrameBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3080D117CF7E700A791F7 /* RenderFrameBase.h */; };
221221 0FD308D5117D168500A791F7 /* RenderIFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD308D3117D168400A791F7 /* RenderIFrame.cpp */; };
222222 0FD308D6117D168500A791F7 /* RenderIFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD308D4117D168400A791F7 /* RenderIFrame.h */; };
223  0FD723820EC8BD9300CA5DD7 /* FloatQuad.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD723800EC8BD9300CA5DD7 /* FloatQuad.h */; settings = {ATTRIBUTES = (Private, ); }; };
224  0FD723830EC8BD9300CA5DD7 /* FloatQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD723810EC8BD9300CA5DD7 /* FloatQuad.cpp */; };
 223 0FD723820EC8BD9300CA5DD7 /* GraphicsQuad.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD723800EC8BD9300CA5DD7 /* GraphicsQuad.h */; settings = {ATTRIBUTES = (Private, ); }; };
 224 0FD723830EC8BD9300CA5DD7 /* GraphicsQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FD723810EC8BD9300CA5DD7 /* GraphicsQuad.cpp */; };
225225 0FF5025B102BA9010066F39A /* DOMStyleMedia.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF50259102BA9010066F39A /* DOMStyleMedia.h */; };
226226 0FF5025C102BA9010066F39A /* DOMStyleMedia.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FF5025A102BA9010066F39A /* DOMStyleMedia.mm */; };
227227 0FF50263102BA92C0066F39A /* DOMStyleMediaInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FF50262102BA92B0066F39A /* DOMStyleMediaInternal.h */; };

43284328 B266CD4D0C3AEC6500EB08D2 /* JSSVGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */; };
43294329 B266CD4E0C3AEC6500EB08D2 /* JSSVGException.h in Headers */ = {isa = PBXBuildFile; fileRef = B266CD4C0C3AEC6500EB08D2 /* JSSVGException.h */; };
43304330 B27535580B053814002CE64F /* TransformationMatrixCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352A0B053814002CE64F /* TransformationMatrixCG.cpp */; };
4331  B27535590B053814002CE64F /* FloatPointCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352B0B053814002CE64F /* FloatPointCG.cpp */; };
4332  B275355A0B053814002CE64F /* FloatRectCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352C0B053814002CE64F /* FloatRectCG.cpp */; };
4333  B275355B0B053814002CE64F /* FloatSizeCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352D0B053814002CE64F /* FloatSizeCG.cpp */; };
 4331 B27535590B053814002CE64F /* GraphicsPointCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352B0B053814002CE64F /* GraphicsPointCG.cpp */; };
 4332 B275355A0B053814002CE64F /* GraphicsRectCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352C0B053814002CE64F /* GraphicsRectCG.cpp */; };
 4333 B275355B0B053814002CE64F /* GraphicsSizeCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275352D0B053814002CE64F /* GraphicsSizeCG.cpp */; };
43344334 B275355E0B053814002CE64F /* ImageCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535300B053814002CE64F /* ImageCG.cpp */; };
43354335 B275355F0B053814002CE64F /* ImageSourceCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535310B053814002CE64F /* ImageSourceCG.cpp */; };
43364336 B27535600B053814002CE64F /* IntPointCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535320B053814002CE64F /* IntPointCG.cpp */; };

43414341 B27535650B053814002CE64F /* PDFDocumentImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535370B053814002CE64F /* PDFDocumentImage.h */; };
43424342 B27535660B053814002CE64F /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535380B053814002CE64F /* Color.cpp */; };
43434343 B27535670B053814002CE64F /* Color.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535390B053814002CE64F /* Color.h */; settings = {ATTRIBUTES = (Private, ); }; };
4344  B27535680B053814002CE64F /* FloatPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275353A0B053814002CE64F /* FloatPoint.cpp */; };
4345  B27535690B053814002CE64F /* FloatPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B275353B0B053814002CE64F /* FloatPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
4346  B275356A0B053814002CE64F /* FloatRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275353C0B053814002CE64F /* FloatRect.cpp */; };
4347  B275356B0B053814002CE64F /* FloatRect.h in Headers */ = {isa = PBXBuildFile; fileRef = B275353D0B053814002CE64F /* FloatRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
4348  B275356C0B053814002CE64F /* FloatSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275353E0B053814002CE64F /* FloatSize.cpp */; };
4349  B275356D0B053814002CE64F /* FloatSize.h in Headers */ = {isa = PBXBuildFile; fileRef = B275353F0B053814002CE64F /* FloatSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
 4344 B27535680B053814002CE64F /* GraphicsPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275353A0B053814002CE64F /* GraphicsPoint.cpp */; };
 4345 B27535690B053814002CE64F /* GraphicsPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B275353B0B053814002CE64F /* GraphicsPoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
 4346 B275356A0B053814002CE64F /* GraphicsRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275353C0B053814002CE64F /* GraphicsRect.cpp */; };
 4347 B275356B0B053814002CE64F /* GraphicsRect.h in Headers */ = {isa = PBXBuildFile; fileRef = B275353D0B053814002CE64F /* GraphicsRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
 4348 B275356C0B053814002CE64F /* GraphicsSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B275353E0B053814002CE64F /* GraphicsSize.cpp */; };
 4349 B275356D0B053814002CE64F /* GraphicsSize.h in Headers */ = {isa = PBXBuildFile; fileRef = B275353F0B053814002CE64F /* GraphicsSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
43504350 B275356E0B053814002CE64F /* Icon.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535400B053814002CE64F /* Icon.h */; settings = {ATTRIBUTES = (Private, ); }; };
43514351 B275356F0B053814002CE64F /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27535410B053814002CE64F /* Image.cpp */; };
43524352 B27535700B053814002CE64F /* Image.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535420B053814002CE64F /* Image.h */; settings = {ATTRIBUTES = (Private, ); }; };

43574357 B27535750B053814002CE64F /* IntSize.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535470B053814002CE64F /* IntSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
43584358 B27535760B053814002CE64F /* IntSizeHash.h in Headers */ = {isa = PBXBuildFile; fileRef = B27535480B053814002CE64F /* IntSizeHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
43594359 B27535770B053814002CE64F /* ColorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354A0B053814002CE64F /* ColorMac.mm */; };
4360  B27535780B053814002CE64F /* FloatPointMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354B0B053814002CE64F /* FloatPointMac.mm */; };
4361  B27535790B053814002CE64F /* FloatRectMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354C0B053814002CE64F /* FloatRectMac.mm */; };
4362  B275357A0B053814002CE64F /* FloatSizeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354D0B053814002CE64F /* FloatSizeMac.mm */; };
 4360 B27535780B053814002CE64F /* GraphicsPointMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354B0B053814002CE64F /* GraphicsPointMac.mm */; };
 4361 B27535790B053814002CE64F /* GraphicsRectMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354C0B053814002CE64F /* GraphicsRectMac.mm */; };
 4362 B275357A0B053814002CE64F /* GraphicsSizeMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354D0B053814002CE64F /* GraphicsSizeMac.mm */; };
43634363 B275357B0B053814002CE64F /* ImageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354E0B053814002CE64F /* ImageMac.mm */; };
43644364 B275357C0B053814002CE64F /* IntPointMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B275354F0B053814002CE64F /* IntPointMac.mm */; };
43654365 B275357D0B053814002CE64F /* IntRectMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = B27535500B053814002CE64F /* IntRectMac.mm */; };

44804480 B2CB92620B5BDA02009BAA78 /* DOMSVGElementInstance.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2CB925E0B5BDA02009BAA78 /* DOMSVGElementInstance.mm */; };
44814481 B2CB92630B5BDA02009BAA78 /* DOMSVGElementInstanceList.h in Headers */ = {isa = PBXBuildFile; fileRef = B2CB925F0B5BDA02009BAA78 /* DOMSVGElementInstanceList.h */; };
44824482 B2CB92640B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2CB92600B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm */; };
4483  B2E27C9F0B0F2B0900F17C7B /* FloatPoint3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */; };
4484  B2E27CA00B0F2B0900F17C7B /* FloatPoint3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */; settings = {ATTRIBUTES = (Private, ); }; };
 4483 B2E27C9F0B0F2B0900F17C7B /* GraphicsPoint3D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E27C9D0B0F2B0900F17C7B /* GraphicsPoint3D.cpp */; };
 4484 B2E27CA00B0F2B0900F17C7B /* GraphicsPoint3D.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E27C9E0B0F2B0900F17C7B /* GraphicsPoint3D.h */; settings = {ATTRIBUTES = (Private, ); }; };
44854485 B2E4EC970D00C22B00432643 /* SVGZoomEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */; };
44864486 B2E4EC980D00C22B00432643 /* SVGZoomEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E4EC950D00C22B00432643 /* SVGZoomEvent.h */; };
44874487 B2ED97710B1F55CE00257D0F /* GraphicsContextCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */; };

65956595 0FD3080D117CF7E700A791F7 /* RenderFrameBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFrameBase.h; sourceTree = "<group>"; };
65966596 0FD308D3117D168400A791F7 /* RenderIFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderIFrame.cpp; sourceTree = "<group>"; };
65976597 0FD308D4117D168400A791F7 /* RenderIFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderIFrame.h; sourceTree = "<group>"; };
6598  0FD723800EC8BD9300CA5DD7 /* FloatQuad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FloatQuad.h; sourceTree = "<group>"; };
6599  0FD723810EC8BD9300CA5DD7 /* FloatQuad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FloatQuad.cpp; sourceTree = "<group>"; };
 6598 0FD723800EC8BD9300CA5DD7 /* GraphicsQuad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsQuad.h; sourceTree = "<group>"; };
 6599 0FD723810EC8BD9300CA5DD7 /* GraphicsQuad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsQuad.cpp; sourceTree = "<group>"; };
66006600 0FF50259102BA9010066F39A /* DOMStyleMedia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStyleMedia.h; sourceTree = "<group>"; };
66016601 0FF5025A102BA9010066F39A /* DOMStyleMedia.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMStyleMedia.mm; sourceTree = "<group>"; };
66026602 0FF50262102BA92B0066F39A /* DOMStyleMediaInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMStyleMediaInternal.h; sourceTree = "<group>"; };

1091410914 B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGException.cpp; sourceTree = "<group>"; };
1091510915 B266CD4C0C3AEC6500EB08D2 /* JSSVGException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGException.h; sourceTree = "<group>"; };
1091610916 B275352A0B053814002CE64F /* TransformationMatrixCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TransformationMatrixCG.cpp; sourceTree = "<group>"; };
10917  B275352B0B053814002CE64F /* FloatPointCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPointCG.cpp; sourceTree = "<group>"; };
10918  B275352C0B053814002CE64F /* FloatRectCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatRectCG.cpp; sourceTree = "<group>"; };
10919  B275352D0B053814002CE64F /* FloatSizeCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatSizeCG.cpp; sourceTree = "<group>"; };
 10917 B275352B0B053814002CE64F /* GraphicsPointCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsPointCG.cpp; sourceTree = "<group>"; };
 10918 B275352C0B053814002CE64F /* GraphicsRectCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsRectCG.cpp; sourceTree = "<group>"; };
 10919 B275352D0B053814002CE64F /* GraphicsSizeCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsSizeCG.cpp; sourceTree = "<group>"; };
1092010920 B27535300B053814002CE64F /* ImageCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageCG.cpp; sourceTree = "<group>"; };
1092110921 B27535310B053814002CE64F /* ImageSourceCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSourceCG.cpp; sourceTree = "<group>"; };
1092210922 B27535320B053814002CE64F /* IntPointCG.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IntPointCG.cpp; sourceTree = "<group>"; };

1092710927 B27535370B053814002CE64F /* PDFDocumentImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PDFDocumentImage.h; sourceTree = "<group>"; };
1092810928 B27535380B053814002CE64F /* Color.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = "<group>"; };
1092910929 B27535390B053814002CE64F /* Color.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Color.h; sourceTree = "<group>"; };
10930  B275353A0B053814002CE64F /* FloatPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPoint.cpp; sourceTree = "<group>"; };
10931  B275353B0B053814002CE64F /* FloatPoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatPoint.h; sourceTree = "<group>"; };
10932  B275353C0B053814002CE64F /* FloatRect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatRect.cpp; sourceTree = "<group>"; };
10933  B275353D0B053814002CE64F /* FloatRect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatRect.h; sourceTree = "<group>"; };
10934  B275353E0B053814002CE64F /* FloatSize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatSize.cpp; sourceTree = "<group>"; };
10935  B275353F0B053814002CE64F /* FloatSize.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatSize.h; sourceTree = "<group>"; };
 10930 B275353A0B053814002CE64F /* GraphicsPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsPoint.cpp; sourceTree = "<group>"; };
 10931 B275353B0B053814002CE64F /* GraphicsPoint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsPoint.h; sourceTree = "<group>"; };
 10932 B275353C0B053814002CE64F /* GraphicsRect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsRect.cpp; sourceTree = "<group>"; };
 10933 B275353D0B053814002CE64F /* GraphicsRect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsRect.h; sourceTree = "<group>"; };
 10934 B275353E0B053814002CE64F /* GraphicsSize.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsSize.cpp; sourceTree = "<group>"; };
 10935 B275353F0B053814002CE64F /* GraphicsSize.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsSize.h; sourceTree = "<group>"; };
1093610936 B27535400B053814002CE64F /* Icon.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Icon.h; sourceTree = "<group>"; };
1093710937 B27535410B053814002CE64F /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = "<group>"; };
1093810938 B27535420B053814002CE64F /* Image.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = "<group>"; };

1094310943 B27535470B053814002CE64F /* IntSize.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntSize.h; sourceTree = "<group>"; };
1094410944 B27535480B053814002CE64F /* IntSizeHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IntSizeHash.h; sourceTree = "<group>"; };
1094510945 B275354A0B053814002CE64F /* ColorMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ColorMac.mm; sourceTree = "<group>"; };
10946  B275354B0B053814002CE64F /* FloatPointMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FloatPointMac.mm; sourceTree = "<group>"; };
10947  B275354C0B053814002CE64F /* FloatRectMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FloatRectMac.mm; sourceTree = "<group>"; };
10948  B275354D0B053814002CE64F /* FloatSizeMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FloatSizeMac.mm; sourceTree = "<group>"; };
 10946 B275354B0B053814002CE64F /* GraphicsPointMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsPointMac.mm; sourceTree = "<group>"; };
 10947 B275354C0B053814002CE64F /* GraphicsRectMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsRectMac.mm; sourceTree = "<group>"; };
 10948 B275354D0B053814002CE64F /* GraphicsSizeMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsSizeMac.mm; sourceTree = "<group>"; };
1094910949 B275354E0B053814002CE64F /* ImageMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ImageMac.mm; sourceTree = "<group>"; };
1095010950 B275354F0B053814002CE64F /* IntPointMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = IntPointMac.mm; sourceTree = "<group>"; };
1095110951 B27535500B053814002CE64F /* IntRectMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = IntRectMac.mm; sourceTree = "<group>"; };

1107011070 B2CB925E0B5BDA02009BAA78 /* DOMSVGElementInstance.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGElementInstance.mm; sourceTree = "<group>"; };
1107111071 B2CB925F0B5BDA02009BAA78 /* DOMSVGElementInstanceList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMSVGElementInstanceList.h; sourceTree = "<group>"; };
1107211072 B2CB92600B5BDA02009BAA78 /* DOMSVGElementInstanceList.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGElementInstanceList.mm; sourceTree = "<group>"; };
11073  B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FloatPoint3D.cpp; sourceTree = "<group>"; };
11074  B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FloatPoint3D.h; sourceTree = "<group>"; };
 11073 B2E27C9D0B0F2B0900F17C7B /* GraphicsPoint3D.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsPoint3D.cpp; sourceTree = "<group>"; };
 11074 B2E27C9E0B0F2B0900F17C7B /* GraphicsPoint3D.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GraphicsPoint3D.h; sourceTree = "<group>"; };
1107511075 B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGZoomEvent.cpp; sourceTree = "<group>"; };
1107611076 B2E4EC950D00C22B00432643 /* SVGZoomEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGZoomEvent.h; sourceTree = "<group>"; };
1107711077 B2E4EC960D00C22B00432643 /* SVGZoomEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGZoomEvent.idl; sourceTree = "<group>"; };

1787917879 isa = PBXGroup;
1788017880 children = (
1788117881 0FCF33230F2B9715004B6795 /* ColorCG.cpp */,
17882  B275352B0B053814002CE64F /* FloatPointCG.cpp */,
17883  B275352C0B053814002CE64F /* FloatRectCG.cpp */,
17884  B275352D0B053814002CE64F /* FloatSizeCG.cpp */,
1788517882 BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */,
1788617883 6E21C6C11126339900A7BE02 /* GraphicsContext3DCG.cpp */,
1788717884 B2ED97700B1F55CE00257D0F /* GraphicsContextCG.cpp */,
1788817885 934907E3125BBBC8007F23A0 /* GraphicsContextCG.h */,
1788917886 A80D67070E9E9DEB00E420F0 /* GraphicsContextPlatformPrivateCG.h */,
 17887 B275352B0B053814002CE64F /* GraphicsPointCG.cpp */,
 17888 B275352C0B053814002CE64F /* GraphicsRectCG.cpp */,
 17889 B275352D0B053814002CE64F /* GraphicsSizeCG.cpp */,
1789017890 B2A10B930B3818D700099AA4 /* ImageBufferCG.cpp */,
1789117891 2292B27B1356669400CF11EF /* ImageBufferDataCG.cpp */,
1789217892 22BD9F80135364FE009BD102 /* ImageBufferDataCG.h */,

1791517915 37C2360F1097EE7700EF9F72 /* ComplexTextController.h */,
1791617916 37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */,
1791717917 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */,
17918  B275354B0B053814002CE64F /* FloatPointMac.mm */,
17919  B275354C0B053814002CE64F /* FloatRectMac.mm */,
17920  B275354D0B053814002CE64F /* FloatSizeMac.mm */,
1792117918 B2AFFC740D00A5C10030074D /* FontCacheMac.mm */,
1792217919 37C2360A1097EDED00EF9F72 /* FontComplexTextMac.cpp */,
1792317920 B2AFFC750D00A5C10030074D /* FontCustomPlatformData.cpp */,

1792617923 B2AFFC7B0D00A5C10030074D /* GlyphPageTreeNodeMac.cpp */,
1792717924 49FFBF1C11C8550E006A7118 /* GraphicsContext3DMac.mm */,
1792817925 B277B4030B22F37C0004BEC6 /* GraphicsContextMac.mm */,
 17926 B275354B0B053814002CE64F /* GraphicsPointMac.mm */,
 17927 B275354C0B053814002CE64F /* GraphicsRectMac.mm */,
 17928 B275354D0B053814002CE64F /* GraphicsSizeMac.mm */,
1792917929 B275358D0B053A66002CE64F /* IconMac.mm */,
1793017930 B275354E0B053814002CE64F /* ImageMac.mm */,
1793117931 B275354F0B053814002CE64F /* IntPointMac.mm */,

1797017970 9382DF5710A8D5C900925652 /* ColorSpace.h */,
1797117971 A8CB41020E85B8A50032C4F0 /* DashArray.h */,
1797217972 6E67D2A81280E8BD008758F7 /* Extensions3D.h */,
17973  B275353A0B053814002CE64F /* FloatPoint.cpp */,
17974  B275353B0B053814002CE64F /* FloatPoint.h */,
17975  B2E27C9D0B0F2B0900F17C7B /* FloatPoint3D.cpp */,
17976  B2E27C9E0B0F2B0900F17C7B /* FloatPoint3D.h */,
17977  0FD723810EC8BD9300CA5DD7 /* FloatQuad.cpp */,
17978  0FD723800EC8BD9300CA5DD7 /* FloatQuad.h */,
17979  B275353C0B053814002CE64F /* FloatRect.cpp */,
17980  B275353D0B053814002CE64F /* FloatRect.h */,
17981  B275353E0B053814002CE64F /* FloatSize.cpp */,
17982  B275353F0B053814002CE64F /* FloatSize.h */,
1798317973 B2C3DA4F0D006CD600EF6F26 /* Font.cpp */,
1798417974 B2C3DA500D006CD600EF6F26 /* Font.h */,
1798517975 BCB92D4E1293550B00C8387F /* FontBaseline.h */,

1802118011 0F580B090F12A2690051D689 /* GraphicsLayer.cpp */,
1802218012 0F580B0A0F12A2690051D689 /* GraphicsLayer.h */,
1802318013 0F580B0B0F12A2690051D689 /* GraphicsLayerClient.h */,
 18014 B275353A0B053814002CE64F /* GraphicsPoint.cpp */,
 18015 B275353B0B053814002CE64F /* GraphicsPoint.h */,
 18016 B2E27C9D0B0F2B0900F17C7B /* GraphicsPoint3D.cpp */,
 18017 B2E27C9E0B0F2B0900F17C7B /* GraphicsPoint3D.h */,
 18018 0FD723810EC8BD9300CA5DD7 /* GraphicsQuad.cpp */,
 18019 0FD723800EC8BD9300CA5DD7 /* GraphicsQuad.h */,
 18020 B275353C0B053814002CE64F /* GraphicsRect.cpp */,
 18021 B275353D0B053814002CE64F /* GraphicsRect.h */,
 18022 B275353E0B053814002CE64F /* GraphicsSize.cpp */,
 18023 B275353F0B053814002CE64F /* GraphicsSize.h */,
1802418024 B2A015940AF6CD53006BCE0E /* GraphicsTypes.cpp */,
1802518025 B2A015950AF6CD53006BCE0E /* GraphicsTypes.h */,
1802618026 77A17A7A12F2890B004E02F6 /* GraphicsTypes3D.h */,

2118021180 49EECDE610503C2400099FAB /* Float32Array.h in Headers */,
2118121181 6EBC5D82138B4C4E00A0CF8A /* Float64Array.h in Headers */,
2118221182 BC073BAA0C399B1F000F5979 /* FloatConversion.h in Headers */,
21183  B27535690B053814002CE64F /* FloatPoint.h in Headers */,
21184  B2E27CA00B0F2B0900F17C7B /* FloatPoint3D.h in Headers */,
21185  0FD723820EC8BD9300CA5DD7 /* FloatQuad.h in Headers */,
21186  B275356B0B053814002CE64F /* FloatRect.h in Headers */,
21187  B275356D0B053814002CE64F /* FloatSize.h in Headers */,
 21183 B27535690B053814002CE64F /* GraphicsPoint.h in Headers */,
 21184 B2E27CA00B0F2B0900F17C7B /* GraphicsPoint3D.h in Headers */,
 21185 0FD723820EC8BD9300CA5DD7 /* GraphicsQuad.h in Headers */,
 21186 B275356B0B053814002CE64F /* GraphicsRect.h in Headers */,
 21187 B275356D0B053814002CE64F /* GraphicsSize.h in Headers */,
2118821188 14993BE60B2F2B1C0050497F /* FocusController.h in Headers */,
2118921189 062287840B4DB322000C34DF /* FocusDirection.h in Headers */,
2119021190 B2C3DA610D006CD600EF6F26 /* Font.h in Headers */,

2408824088 A8CFF04D0A154F09000A4234 /* FixedTableLayout.cpp in Sources */,
2408924089 49EECDE510503C2400099FAB /* Float32Array.cpp in Sources */,
2409024090 6EBC5D81138B4C4E00A0CF8A /* Float64Array.cpp in Sources */,
24091  B27535680B053814002CE64F /* FloatPoint.cpp in Sources */,
24092  B2E27C9F0B0F2B0900F17C7B /* FloatPoint3D.cpp in Sources */,
24093  B27535590B053814002CE64F /* FloatPointCG.cpp in Sources */,
24094  B27535780B053814002CE64F /* FloatPointMac.mm in Sources */,
24095  0FD723830EC8BD9300CA5DD7 /* FloatQuad.cpp in Sources */,
24096  B275356A0B053814002CE64F /* FloatRect.cpp in Sources */,
24097  B275355A0B053814002CE64F /* FloatRectCG.cpp in Sources */,
24098  B27535790B053814002CE64F /* FloatRectMac.mm in Sources */,
24099  B275356C0B053814002CE64F /* FloatSize.cpp in Sources */,
24100  B275355B0B053814002CE64F /* FloatSizeCG.cpp in Sources */,
24101  B275357A0B053814002CE64F /* FloatSizeMac.mm in Sources */,
 24091 B27535680B053814002CE64F /* GraphicsPoint.cpp in Sources */,
 24092 B2E27C9F0B0F2B0900F17C7B /* GraphicsPoint3D.cpp in Sources */,
 24093 B27535590B053814002CE64F /* GraphicsPointCG.cpp in Sources */,
 24094 B27535780B053814002CE64F /* GraphicsPointMac.mm in Sources */,
 24095 0FD723830EC8BD9300CA5DD7 /* GraphicsQuad.cpp in Sources */,
 24096 B275356A0B053814002CE64F /* GraphicsRect.cpp in Sources */,
 24097 B275355A0B053814002CE64F /* GraphicsRectCG.cpp in Sources */,
 24098 B27535790B053814002CE64F /* GraphicsRectMac.mm in Sources */,
 24099 B275356C0B053814002CE64F /* GraphicsSize.cpp in Sources */,
 24100 B275355B0B053814002CE64F /* GraphicsSizeCG.cpp in Sources */,
 24101 B275357A0B053814002CE64F /* GraphicsSizeMac.mm in Sources */,
2410224102 14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */,
2410324103 B2C3DA600D006CD600EF6F26 /* Font.cpp in Sources */,
2410424104 B2C3DA620D006CD600EF6F26 /* FontCache.cpp in Sources */,
90929

Source/WebCore/css/CSSCanvasValue.h

5252 {
5353 }
5454
55  virtual void canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect);
 55 virtual void canvasChanged(HTMLCanvasElement*, const GraphicsRect& changedRect);
5656 virtual void canvasResized(HTMLCanvasElement*);
5757 virtual void canvasDestroyed(HTMLCanvasElement*);
5858
90929

Source/WebCore/css/CSSGradientValue.h

3333
3434namespace WebCore {
3535
36 class FloatPoint;
 36class GraphicsPoint;
3737class Gradient;
3838
3939enum CSSGradientType { CSSLinearGradient, CSSRadialGradient };

8080 virtual PassRefPtr<Gradient> createGradient(RenderObject*, const IntSize&) = 0;
8181
8282 // Resolve points/radii to front end values.
83  FloatPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, const IntSize&);
 83 GraphicsPoint computeEndPoint(CSSPrimitiveValue*, CSSPrimitiveValue*, RenderStyle*, RenderStyle* rootStyle, const IntSize&);
8484
8585 bool isCacheable() const;
8686
90929

Source/WebCore/css/CSSGradientValue.cpp

142142 float gradientLength = 0;
143143 bool computedGradientLength = false;
144144
145  FloatPoint gradientStart = gradient->p0();
146  FloatPoint gradientEnd;
 145 GraphicsPoint gradientStart = gradient->p0();
 146 GraphicsPoint gradientEnd;
147147 if (isLinearGradient())
148148 gradientEnd = gradient->p1();
149149 else if (isRadialGradient())
150  gradientEnd = gradientStart + FloatSize(gradient->endRadius(), 0);
 150 gradientEnd = gradientStart + GraphicsSize(gradient->endRadius(), 0);
151151
152152 for (size_t i = 0; i < numStops; ++i) {
153153 const CSSGradientColorStop& stop = m_stops[i];

161161 else if (CSSPrimitiveValue::isUnitTypeLength(type)) {
162162 float length = stop.m_position->computeLength<float>(style, rootStyle, style->effectiveZoom());
163163 if (!computedGradientLength) {
164  FloatSize gradientSize(gradientStart - gradientEnd);
 164 GraphicsSize gradientSize(gradientStart - gradientEnd);
165165 gradientLength = gradientSize.diagonalLength();
166166 }
167167 stops[i].offset = (gradientLength > 0) ? length / gradientLength : 0;

246246 // to repeat out to the corners of the box.
247247 if (isRadialGradient()) {
248248 if (!computedGradientLength) {
249  FloatSize gradientSize(gradientStart - gradientEnd);
 249 GraphicsSize gradientSize(gradientStart - gradientEnd);
250250 gradientLength = gradientSize.diagonalLength();
251251 }
252252

310310 for (size_t i = 0; i < numStops; ++i)
311311 stops[i].offset = (stops[i].offset - firstOffset) / scale;
312312
313  FloatPoint p0 = gradient->p0();
314  FloatPoint p1 = gradient->p1();
315  gradient->setP0(FloatPoint(p0.x() + firstOffset * (p1.x() - p0.x()), p0.y() + firstOffset * (p1.y() - p0.y())));
316  gradient->setP1(FloatPoint(p1.x() + (lastOffset - 1) * (p1.x() - p0.x()), p1.y() + (lastOffset - 1) * (p1.y() - p0.y())));
 313 GraphicsPoint p0 = gradient->p0();
 314 GraphicsPoint p1 = gradient->p1();
 315 gradient->setP0(GraphicsPoint(p0.x() + firstOffset * (p1.x() - p0.x()), p0.y() + firstOffset * (p1.y() - p0.y())));
 316 gradient->setP1(GraphicsPoint(p1.x() + (lastOffset - 1) * (p1.x() - p0.x()), p1.y() + (lastOffset - 1) * (p1.y() - p0.y())));
317317 } else if (isRadialGradient()) {
318318 // Rather than scaling the points < 0, we truncate them, so only scale according to the largest point.
319319 float firstOffset = 0;

395395 }
396396}
397397
398 FloatPoint CSSGradientValue::computeEndPoint(CSSPrimitiveValue* first, CSSPrimitiveValue* second, RenderStyle* style, RenderStyle* rootStyle, const IntSize& size)
 398GraphicsPoint CSSGradientValue::computeEndPoint(CSSPrimitiveValue* first, CSSPrimitiveValue* second, RenderStyle* style, RenderStyle* rootStyle, const IntSize& size)
399399{
400  FloatPoint result;
 400 GraphicsPoint result;
401401
402402 if (first)
403403 result.setX(positionFromValue(first, style, rootStyle, size, true));

473473}
474474
475475// Compute the endpoints so that a gradient of the given angle covers a box of the given size.
476 static void endPointsFromAngle(float angleDeg, const IntSize& size, FloatPoint& firstPoint, FloatPoint& secondPoint)
 476static void endPointsFromAngle(float angleDeg, const IntSize& size, GraphicsPoint& firstPoint, GraphicsPoint& secondPoint)
477477{
478478 angleDeg = fmodf(angleDeg, 360);
479479 if (angleDeg < 0)

512512 // Compute start corner relative to center.
513513 float halfHeight = size.height() / 2;
514514 float halfWidth = size.width() / 2;
515  FloatPoint endCorner;
 515 GraphicsPoint endCorner;
516516 if (angleDeg < 90)
517517 endCorner.set(halfWidth, halfHeight);
518518 else if (angleDeg < 180)

539539
540540 RenderStyle* rootStyle = renderer->document()->documentElement()->renderStyle();
541541
542  FloatPoint firstPoint;
543  FloatPoint secondPoint;
 542 GraphicsPoint firstPoint;
 543 GraphicsPoint secondPoint;
544544 if (m_angle) {
545545 float angle = m_angle->getFloatValue(CSSPrimitiveValue::CSS_DEG);
546546 endPointsFromAngle(angle, size, firstPoint, secondPoint);

649649 return result;
650650}
651651
652 static float distanceToClosestCorner(const FloatPoint& p, const FloatSize& size, FloatPoint& corner)
 652static float distanceToClosestCorner(const GraphicsPoint& p, const GraphicsSize& size, GraphicsPoint& corner)
653653{
654  FloatPoint topLeft;
655  float topLeftDistance = FloatSize(p - topLeft).diagonalLength();
 654 GraphicsPoint topLeft;
 655 float topLeftDistance = GraphicsSize(p - topLeft).diagonalLength();
656656
657  FloatPoint topRight(size.width(), 0);
658  float topRightDistance = FloatSize(p - topRight).diagonalLength();
 657 GraphicsPoint topRight(size.width(), 0);
 658 float topRightDistance = GraphicsSize(p - topRight).diagonalLength();
659659
660  FloatPoint bottomLeft(0, size.height());
661  float bottomLeftDistance = FloatSize(p - bottomLeft).diagonalLength();
 660 GraphicsPoint bottomLeft(0, size.height());
 661 float bottomLeftDistance = GraphicsSize(p - bottomLeft).diagonalLength();
662662
663  FloatPoint bottomRight(size.width(), size.height());
664  float bottomRightDistance = FloatSize(p - bottomRight).diagonalLength();
 663 GraphicsPoint bottomRight(size.width(), size.height());
 664 float bottomRightDistance = GraphicsSize(p - bottomRight).diagonalLength();
665665
666666 corner = topLeft;
667667 float minDistance = topLeftDistance;

682682 return minDistance;
683683}
684684
685 static float distanceToFarthestCorner(const FloatPoint& p, const FloatSize& size, FloatPoint& corner)
 685static float distanceToFarthestCorner(const GraphicsPoint& p, const GraphicsSize& size, GraphicsPoint& corner)
686686{
687  FloatPoint topLeft;
688  float topLeftDistance = FloatSize(p - topLeft).diagonalLength();
 687 GraphicsPoint topLeft;
 688 float topLeftDistance = GraphicsSize(p - topLeft).diagonalLength();
689689
690  FloatPoint topRight(size.width(), 0);
691  float topRightDistance = FloatSize(p - topRight).diagonalLength();
 690 GraphicsPoint topRight(size.width(), 0);
 691 float topRightDistance = GraphicsSize(p - topRight).diagonalLength();
692692
693  FloatPoint bottomLeft(0, size.height());
694  float bottomLeftDistance = FloatSize(p - bottomLeft).diagonalLength();
 693 GraphicsPoint bottomLeft(0, size.height());
 694 float bottomLeftDistance = GraphicsSize(p - bottomLeft).diagonalLength();
695695
696  FloatPoint bottomRight(size.width(), size.height());
697  float bottomRightDistance = FloatSize(p - bottomRight).diagonalLength();
 696 GraphicsPoint bottomRight(size.width(), size.height());
 697 float bottomRightDistance = GraphicsSize(p - bottomRight).diagonalLength();
698698
699699 corner = topLeft;
700700 float maxDistance = topLeftDistance;

717717
718718// Compute horizontal radius of ellipse with center at 0,0 which passes through p, and has
719719// width/height given by aspectRatio.
720 static inline float horizontalEllipseRadius(const FloatSize& p, float aspectRatio)
 720static inline float horizontalEllipseRadius(const GraphicsSize& p, float aspectRatio)
721721{
722722 // x^2/a^2 + y^2/b^2 = 1
723723 // a/b = aspectRatio, b = a/aspectRatio

732732
733733 RenderStyle* rootStyle = renderer->document()->documentElement()->renderStyle();
734734
735  FloatPoint firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, size);
 735 GraphicsPoint firstPoint = computeEndPoint(m_firstX.get(), m_firstY.get(), renderer->style(), rootStyle, size);
736736 if (!m_firstX)
737737 firstPoint.setX(size.width() / 2);
738738 if (!m_firstY)
739739 firstPoint.setY(size.height() / 2);
740740
741  FloatPoint secondPoint = computeEndPoint(m_secondX.get(), m_secondY.get(), renderer->style(), rootStyle, size);
 741 GraphicsPoint secondPoint = computeEndPoint(m_secondX.get(), m_secondY.get(), renderer->style(), rootStyle, size);
742742 if (!m_secondX)
743743 secondPoint.setX(size.width() / 2);
744744 if (!m_secondY)

814814 break;
815815 }
816816 case ClosestCorner: {
817  FloatPoint corner;
 817 GraphicsPoint corner;
818818 float distance = distanceToClosestCorner(secondPoint, size, corner);
819819 if (shape == Circle)
820820 secondRadius = distance;

831831 }
832832
833833 case FarthestCorner: {
834  FloatPoint corner;
 834 GraphicsPoint corner;
835835 float distance = distanceToFarthestCorner(secondPoint, size, corner);
836836 if (shape == Circle)
837837 secondRadius = distance;

854854 // addStops() only uses maxExtent for repeating gradients.
855855 float maxExtent = 0;
856856 if (m_repeating) {
857  FloatPoint corner;
 857 GraphicsPoint corner;
858858 maxExtent = distanceToFarthestCorner(secondPoint, size, corner);
859859 }
860860
90929

Source/WebCore/css/CSSCanvasValue.cpp

4444 return result;
4545}
4646
47 void CSSCanvasValue::canvasChanged(HTMLCanvasElement*, const FloatRect& changedRect)
 47void CSSCanvasValue::canvasChanged(HTMLCanvasElement*, const GraphicsRect& changedRect)
4848{
4949 IntRect imageChangeRect = enclosingIntRect(changedRect);
5050 RenderObjectSizeCountMap::const_iterator end = m_clients.end();
90929

Source/WebCore/css/MediaQueryEvaluator.cpp

3333#include "CSSPrimitiveValue.h"
3434#include "CSSStyleSelector.h"
3535#include "CSSValueList.h"
36 #include "FloatRect.h"
 36#include "GraphicsRect.h"
3737#include "Frame.h"
3838#include "FrameView.h"
3939#include "IntRect.h"

275275static bool device_aspect_ratioMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix op)
276276{
277277 if (value) {
278  FloatRect sg = screenRect(frame->page()->mainFrame()->view());
 278 GraphicsRect sg = screenRect(frame->page()->mainFrame()->view());
279279 int h = 0;
280280 int v = 0;
281281 if (parseAspectRatio(value, h, v))

309309static bool device_heightMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op)
310310{
311311 if (value) {
312  FloatRect sg = screenRect(frame->page()->mainFrame()->view());
 312 GraphicsRect sg = screenRect(frame->page()->mainFrame()->view());
313313 RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
314314 return value->isPrimitiveValue() && compareValue(static_cast<int>(sg.height()), static_cast<CSSPrimitiveValue*>(value)->computeLength<int>(style, rootStyle), op);
315315 }

321321static bool device_widthMediaFeatureEval(CSSValue* value, RenderStyle* style, Frame* frame, MediaFeaturePrefix op)
322322{
323323 if (value) {
324  FloatRect sg = screenRect(frame->page()->mainFrame()->view());
 324 GraphicsRect sg = screenRect(frame->page()->mainFrame()->view());
325325 RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
326326 return value->isPrimitiveValue() && compareValue(static_cast<int>(sg.width()), static_cast<CSSPrimitiveValue*>(value)->computeLength<int>(style, rootStyle), op);
327327 }
90929

Source/WebCore/webaudio/AudioPannerNode.h

3131#include "AudioNode.h"
3232#include "Cone.h"
3333#include "Distance.h"
34 #include "FloatPoint3D.h"
 34#include "GraphicsPoint3D.h"
3535#include "Panner.h"
3636#include <wtf/OwnPtr.h>
3737

7575 void setPanningModel(unsigned short);
7676
7777 // Position
78  FloatPoint3D position() const { return m_position; }
79  void setPosition(float x, float y, float z) { m_position = FloatPoint3D(x, y, z); }
 78 GraphicsPoint3D position() const { return m_position; }
 79 void setPosition(float x, float y, float z) { m_position = GraphicsPoint3D(x, y, z); }
8080
8181 // Orientation
82  FloatPoint3D orientation() const { return m_position; }
83  void setOrientation(float x, float y, float z) { m_orientation = FloatPoint3D(x, y, z); }
 82 GraphicsPoint3D orientation() const { return m_position; }
 83 void setOrientation(float x, float y, float z) { m_orientation = GraphicsPoint3D(x, y, z); }
8484
8585 // Velocity
86  FloatPoint3D velocity() const { return m_velocity; }
87  void setVelocity(float x, float y, float z) { m_velocity = FloatPoint3D(x, y, z); }
 86 GraphicsPoint3D velocity() const { return m_velocity; }
 87 void setVelocity(float x, float y, float z) { m_velocity = GraphicsPoint3D(x, y, z); }
8888
8989 // Distance parameters
9090 unsigned short distanceModel() { return m_distanceEffect.model(); }

129129 OwnPtr<Panner> m_panner;
130130 unsigned m_panningModel;
131131
132  FloatPoint3D m_position;
133  FloatPoint3D m_orientation;
134  FloatPoint3D m_velocity;
 132 GraphicsPoint3D m_position;
 133 GraphicsPoint3D m_orientation;
 134 GraphicsPoint3D m_velocity;
135135
136136 // Gain
137137 RefPtr<AudioGain> m_distanceGain;
90929

Source/WebCore/webaudio/AudioPannerNode.cpp

5858 m_distanceGain = AudioGain::create("distanceGain", 1.0, 0.0, 1.0);
5959 m_coneGain = AudioGain::create("coneGain", 1.0, 0.0, 1.0);
6060
61  m_position = FloatPoint3D(0, 0, 0);
62  m_orientation = FloatPoint3D(1, 0, 0);
63  m_velocity = FloatPoint3D(0, 0, 0);
 61 m_position = GraphicsPoint3D(0, 0, 0);
 62 m_orientation = GraphicsPoint3D(1, 0, 0);
 63 m_velocity = GraphicsPoint3D(0, 0, 0);
6464
6565 setType(NodeTypePanner);
6666

165165 double azimuth = 0.0;
166166
167167 // Calculate the source-listener vector
168  FloatPoint3D listenerPosition = listener()->position();
169  FloatPoint3D sourceListener = m_position - listenerPosition;
 168 GraphicsPoint3D listenerPosition = listener()->position();
 169 GraphicsPoint3D sourceListener = m_position - listenerPosition;
170170
171171 if (sourceListener.isZero()) {
172172 // degenerate case if source and listener are at the same point

178178 sourceListener.normalize();
179179
180180 // Align axes
181  FloatPoint3D listenerFront = listener()->orientation();
182  FloatPoint3D listenerUp = listener()->upVector();
183  FloatPoint3D listenerRight = listenerFront.cross(listenerUp);
 181 GraphicsPoint3D listenerFront = listener()->orientation();
 182 GraphicsPoint3D listenerUp = listener()->upVector();
 183 GraphicsPoint3D listenerRight = listenerFront.cross(listenerUp);
184184 listenerRight.normalize();
185185
186  FloatPoint3D listenerFrontNorm = listenerFront;
 186 GraphicsPoint3D listenerFrontNorm = listenerFront;
187187 listenerFrontNorm.normalize();
188188
189  FloatPoint3D up = listenerRight.cross(listenerFrontNorm);
 189 GraphicsPoint3D up = listenerRight.cross(listenerFrontNorm);
190190
191191 double upProjection = sourceListener.dot(up);
192192
193  FloatPoint3D projectedSource = sourceListener - upProjection * up;
 193 GraphicsPoint3D projectedSource = sourceListener - upProjection * up;
194194 projectedSource.normalize();
195195
196196 azimuth = 180.0 * acos(projectedSource.dot(listenerRight)) / piDouble;

232232 if (dopplerFactor > 0.0) {
233233 double speedOfSound = listener()->speedOfSound();
234234
235  const FloatPoint3D &sourceVelocity = m_velocity;
236  const FloatPoint3D &listenerVelocity = listener()->velocity();
 235 const GraphicsPoint3D &sourceVelocity = m_velocity;
 236 const GraphicsPoint3D &listenerVelocity = listener()->velocity();
237237
238238 // Don't bother if both source and listener have no velocity
239239 bool sourceHasVelocity = !sourceVelocity.isZero();

241241
242242 if (sourceHasVelocity || listenerHasVelocity) {
243243 // Calculate the source to listener vector
244  FloatPoint3D listenerPosition = listener()->position();
245  FloatPoint3D sourceToListener = m_position - listenerPosition;
 244 GraphicsPoint3D listenerPosition = listener()->position();
 245 GraphicsPoint3D sourceToListener = m_position - listenerPosition;
246246
247247 double sourceListenerMagnitude = sourceToListener.length();
248248

272272
273273float AudioPannerNode::distanceConeGain()
274274{
275  FloatPoint3D listenerPosition = listener()->position();
 275 GraphicsPoint3D listenerPosition = listener()->position();
276276
277277 double listenerDistance = m_position.distanceTo(listenerPosition);
278278 double distanceGain = m_distanceEffect.gain(listenerDistance);
90929

Source/WebCore/webaudio/AudioListener.h

2929#ifndef AudioListener_h
3030#define AudioListener_h
3131
32 #include "FloatPoint3D.h"
 32#include "GraphicsPoint3D.h"
3333#include <wtf/PassRefPtr.h>
3434#include <wtf/RefCounted.h>
3535

4545 }
4646
4747 // Position
48  void setPosition(double x, double y, double z) { setPosition(FloatPoint3D(x, y, z)); }
49  void setPosition(const FloatPoint3D &position) { m_position = position; }
50  const FloatPoint3D& position() const { return m_position; }
 48 void setPosition(double x, double y, double z) { setPosition(GraphicsPoint3D(x, y, z)); }
 49 void setPosition(const GraphicsPoint3D &position) { m_position = position; }
 50 const GraphicsPoint3D& position() const { return m_position; }
5151
5252 // Orientation
5353 void setOrientation(double x, double y, double z, double upX, double upY, double upZ)
5454 {
55  setOrientation(FloatPoint3D(x, y, z));
56  setUpVector(FloatPoint3D(upX, upY, upZ));
 55 setOrientation(GraphicsPoint3D(x, y, z));
 56 setUpVector(GraphicsPoint3D(upX, upY, upZ));
5757 }
58  void setOrientation(const FloatPoint3D &orientation) { m_orientation = orientation; }
59  const FloatPoint3D& orientation() const { return m_orientation; }
 58 void setOrientation(const GraphicsPoint3D &orientation) { m_orientation = orientation; }
 59 const GraphicsPoint3D& orientation() const { return m_orientation; }
6060
6161 // Up-vector
62  void setUpVector(const FloatPoint3D &upVector) { m_upVector = upVector; }
63  const FloatPoint3D& upVector() const { return m_upVector; }
 62 void setUpVector(const GraphicsPoint3D &upVector) { m_upVector = upVector; }
 63 const GraphicsPoint3D& upVector() const { return m_upVector; }
6464
6565 // Velocity
66  void setVelocity(double x, double y, double z) { setVelocity(FloatPoint3D(x, y, z)); }
67  void setVelocity(const FloatPoint3D &velocity) { m_velocity = velocity; }
68  const FloatPoint3D& velocity() const { return m_velocity; }
 66 void setVelocity(double x, double y, double z) { setVelocity(GraphicsPoint3D(x, y, z)); }
 67 void setVelocity(const GraphicsPoint3D &velocity) { m_velocity = velocity; }
 68 const GraphicsPoint3D& velocity() const { return m_velocity; }
6969
7070 // Doppler factor
7171 void setDopplerFactor(double dopplerFactor) { m_dopplerFactor = dopplerFactor; }

7979 AudioListener();
8080
8181 // Position / Orientation
82  FloatPoint3D m_position;
83  FloatPoint3D m_orientation;
84  FloatPoint3D m_upVector;
 82 GraphicsPoint3D m_position;
 83 GraphicsPoint3D m_orientation;
 84 GraphicsPoint3D m_upVector;
8585
86  FloatPoint3D m_velocity;
 86 GraphicsPoint3D m_velocity;
8787
8888 double m_dopplerFactor;
8989 double m_speedOfSound;
90929

Source/WebCore/loader/FrameLoader.cpp

5454#include "Element.h"
5555#include "Event.h"
5656#include "EventNames.h"
57 #include "FloatRect.h"
 57#include "GraphicsRect.h"
5858#include "FormState.h"
5959#include "FormSubmission.h"
6060#include "Frame.h"

32623262 // specify the size of the page. We can only resize the window, so
32633263 // adjust for the difference between the window size and the page size.
32643264
3265  FloatRect windowRect = page->chrome()->windowRect();
3266  FloatSize pageSize = page->chrome()->pageRect().size();
 3265 GraphicsRect windowRect = page->chrome()->windowRect();
 3266 GraphicsSize pageSize = page->chrome()->pageRect().size();
32673267 if (features.xSet)
32683268 windowRect.setX(features.x);
32693269 if (features.ySet)
90929

Source/WebCore/loader/EmptyClients.h

3737#include "EditCommand.h"
3838#include "EditorClient.h"
3939#include "TextCheckerClient.h"
40 #include "FloatRect.h"
 40#include "GraphicsRect.h"
4141#include "FocusDirection.h"
4242#include "FrameLoaderClient.h"
4343#include "FrameNetworkingContext.h"

8989 virtual void chromeDestroyed() { }
9090
9191 virtual void* webView() const { return 0; }
92  virtual void setWindowRect(const FloatRect&) { }
93  virtual FloatRect windowRect() { return FloatRect(); }
 92 virtual void setWindowRect(const GraphicsRect&) { }
 93 virtual GraphicsRect windowRect() { return GraphicsRect(); }
9494
95  virtual FloatRect pageRect() { return FloatRect(); }
 95 virtual GraphicsRect pageRect() { return GraphicsRect(); }
9696
9797 virtual float scaleFactor() { return 1.f; }
9898

517517 TextCheckerClient* textChecker() { return &m_textCheckerClient; }
518518
519519#if USE(AUTOCORRECTION_PANEL)
520  virtual void showCorrectionPanel(CorrectionPanelInfo::PanelType, const FloatRect&, const String&, const String&, const Vector<String>&) { }
 520 virtual void showCorrectionPanel(CorrectionPanelInfo::PanelType, const GraphicsRect&, const String&, const String&, const Vector<String>&) { }
521521 virtual void dismissCorrectionPanel(ReasonForDismissingCorrectionPanel) { }
522522 virtual String dismissCorrectionPanelSoon(ReasonForDismissingCorrectionPanel) { return String(); }
523523 virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const String&, const String&) { }
90929

Source/WebKit2/UIProcess/WebPageProxy.cpp

7272#include "WebSecurityOrigin.h"
7373#include "WebURLRequest.h"
7474#include <WebCore/DragData.h>
75 #include <WebCore/FloatRect.h>
 75#include <WebCore/GraphicsRect.h>
7676#include <WebCore/FocusDirection.h>
7777#include <WebCore/MIMETypeRegistry.h>
7878#include <WebCore/TextCheckerClient.h>

21022102 isResizable = m_uiClient.isResizable(this);
21032103}
21042104
2105 void WebPageProxy::setWindowFrame(const FloatRect& newWindowFrame)
 2105void WebPageProxy::setWindowFrame(const GraphicsRect& newWindowFrame)
21062106{
21072107 m_uiClient.setWindowFrame(this, m_pageClient->convertToDeviceSpace(newWindowFrame));
21082108}
21092109
2110 void WebPageProxy::getWindowFrame(FloatRect& newWindowFrame)
 2110void WebPageProxy::getWindowFrame(GraphicsRect& newWindowFrame)
21112111{
21122112 newWindowFrame = m_pageClient->convertToUserSpace(m_uiClient.windowFrame(this));
21132113}

23272327 m_findClient.didCountStringMatches(this, string, matchCount);
23282328}
23292329
2330 void WebPageProxy::setFindIndicator(const FloatRect& selectionRectInWindowCoordinates, const Vector<FloatRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut)
 2330void WebPageProxy::setFindIndicator(const GraphicsRect& selectionRectInWindowCoordinates, const Vector<GraphicsRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut)
23312331{
23322332 RefPtr<FindIndicator> findIndicator = FindIndicator::create(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, contentImageHandle);
23332333 m_pageClient->setFindIndicator(findIndicator.release(), fadeOut);

26822682{
26832683 ASSERT(canCoalesce(a, b));
26842684
2685  FloatSize mergedDelta = a.delta() + b.delta();
2686  FloatSize mergedWheelTicks = a.wheelTicks() + b.wheelTicks();
 2685 GraphicsSize mergedDelta = a.delta() + b.delta();
 2686 GraphicsSize mergedWheelTicks = a.wheelTicks() + b.wheelTicks();
26872687
26882688#if PLATFORM(MAC)
26892689 return WebWheelEvent(WebEvent::Wheel, b.position(), b.globalPosition(), mergedDelta, mergedWheelTicks, b.granularity(), b.phase(), b.momentumPhase(), b.hasPreciseScrollingDeltas(), b.modifiers(), b.timestamp());

31443144 return m_uiClient.footerHeight(this, frame);
31453145}
31463146
3147 void WebPageProxy::drawHeader(WebFrameProxy* frame, const FloatRect& rect)
 3147void WebPageProxy::drawHeader(WebFrameProxy* frame, const GraphicsRect& rect)
31483148{
31493149 m_uiClient.drawHeader(this, frame, rect);
31503150}
31513151
3152 void WebPageProxy::drawFooter(WebFrameProxy* frame, const FloatRect& rect)
 3152void WebPageProxy::drawFooter(WebFrameProxy* frame, const GraphicsRect& rect)
31533153{
31543154 m_uiClient.drawFooter(this, frame, rect);
31553155}

33283328}
33293329
33303330#if !defined(BUILDING_ON_SNOW_LEOPARD)
3331 void WebPageProxy::showCorrectionPanel(int32_t panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 3331void WebPageProxy::showCorrectionPanel(int32_t panelType, const GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
33323332{
33333333 m_pageClient->showCorrectionPanel((CorrectionPanelInfo::PanelType)panelType, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings);
33343334}
90929

Source/WebKit2/UIProcess/FindIndicator.cpp

7777
7878namespace WebKit {
7979
80 PassRefPtr<FindIndicator> FindIndicator::create(const FloatRect& selectionRectInWindowCoordinates, const Vector<FloatRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle)
 80PassRefPtr<FindIndicator> FindIndicator::create(const GraphicsRect& selectionRectInWindowCoordinates, const Vector<GraphicsRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle)
8181{
8282 RefPtr<ShareableBitmap> contentImage = ShareableBitmap::create(contentImageHandle);
8383 if (!contentImage)

8787 return adoptRef(new FindIndicator(selectionRectInWindowCoordinates, textRectsInSelectionRectCoordinates, contentImage.release()));
8888}
8989
90 FindIndicator::FindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, PassRefPtr<ShareableBitmap> contentImage)
 90FindIndicator::FindIndicator(const WebCore::GraphicsRect& selectionRectInWindowCoordinates, const Vector<WebCore::GraphicsRect>& textRectsInSelectionRectCoordinates, PassRefPtr<ShareableBitmap> contentImage)
9191 : m_selectionRectInWindowCoordinates(selectionRectInWindowCoordinates)
9292 , m_textRectsInSelectionRectCoordinates(textRectsInSelectionRectCoordinates)
9393 , m_contentImage(contentImage)

9898{
9999}
100100
101 static FloatRect inflateRect(const FloatRect& rect, float inflateX, float inflateY)
 101static GraphicsRect inflateRect(const GraphicsRect& rect, float inflateX, float inflateY)
102102{
103  FloatRect inflatedRect = rect;
 103 GraphicsRect inflatedRect = rect;
104104 inflatedRect.inflateX(inflateX);
105105 inflatedRect.inflateY(inflateY);
106106
107107 return inflatedRect;
108108}
109109
110 FloatRect FindIndicator::frameRect() const
 110GraphicsRect FindIndicator::frameRect() const
111111{
112  return FloatRect(m_selectionRectInWindowCoordinates.x() - leftBorderThickness, m_selectionRectInWindowCoordinates.y() - topBorderThickness,
 112 return GraphicsRect(m_selectionRectInWindowCoordinates.x() - leftBorderThickness, m_selectionRectInWindowCoordinates.y() - topBorderThickness,
113113 m_selectionRectInWindowCoordinates.width() + rightBorderThickness + leftBorderThickness,
114114 m_selectionRectInWindowCoordinates.height() + topBorderThickness + bottomBorderThickness);
115115}

134134 return Color(gradientDarkRed, gradientDarkGreen, gradientDarkBlue, gradientDarkAlpha);
135135}
136136
137 static Path pathWithRoundedRect(const FloatRect& pathRect, float radius)
 137static Path pathWithRoundedRect(const GraphicsRect& pathRect, float radius)
138138{
139139 Path path;
140  path.addRoundedRect(pathRect, FloatSize(radius, radius));
 140 path.addRoundedRect(pathRect, GraphicsSize(radius, radius));
141141
142142 return path;
143143}

145145void FindIndicator::draw(GraphicsContext& graphicsContext, const IntRect& dirtyRect)
146146{
147147 for (size_t i = 0; i < m_textRectsInSelectionRectCoordinates.size(); ++i) {
148  FloatRect textRect = m_textRectsInSelectionRectCoordinates[i];
 148 GraphicsRect textRect = m_textRectsInSelectionRectCoordinates[i];
149149 textRect.move(leftBorderThickness, topBorderThickness);
150150
151  FloatRect outerPathRect = inflateRect(textRect, horizontalOutsetToCenterOfLightBorder, verticalOutsetToCenterOfLightBorder);
152  FloatRect innerPathRect = inflateRect(textRect, horizontalPaddingInsideLightBorder, verticalPaddingInsideLightBorder);
 151 GraphicsRect outerPathRect = inflateRect(textRect, horizontalOutsetToCenterOfLightBorder, verticalOutsetToCenterOfLightBorder);
 152 GraphicsRect innerPathRect = inflateRect(textRect, horizontalPaddingInsideLightBorder, verticalPaddingInsideLightBorder);
153153
154154 {
155155 GraphicsContextStateSaver stateSaver(graphicsContext);
156  graphicsContext.setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, shadowColor(), ColorSpaceSRGB);
 156 graphicsContext.setShadow(GraphicsSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, shadowColor(), ColorSpaceSRGB);
157157 graphicsContext.setFillColor(lightBorderColor(), ColorSpaceDeviceRGB);
158158 graphicsContext.fillPath(pathWithRoundedRect(outerPathRect, cornerRadius));
159159 }

161161 {
162162 GraphicsContextStateSaver stateSaver(graphicsContext);
163163 graphicsContext.clip(pathWithRoundedRect(innerPathRect, cornerRadius));
164  RefPtr<Gradient> gradient = Gradient::create(FloatPoint(innerPathRect.x(), innerPathRect.y()), FloatPoint(innerPathRect.x(), innerPathRect.maxY()));
 164 RefPtr<Gradient> gradient = Gradient::create(GraphicsPoint(innerPathRect.x(), innerPathRect.y()), GraphicsPoint(innerPathRect.x(), innerPathRect.maxY()));
165165 gradient->addColorStop(0, gradientLightColor());
166166 gradient->addColorStop(1, gradientDarkColor());
167167 graphicsContext.setFillGradient(gradient);

170170
171171 {
172172 GraphicsContextStateSaver stateSaver(graphicsContext);
173  graphicsContext.translate(FloatSize(roundf(leftBorderThickness), roundf(topBorderThickness)));
 173 graphicsContext.translate(GraphicsSize(roundf(leftBorderThickness), roundf(topBorderThickness)));
174174 m_contentImage->paint(graphicsContext, IntPoint(0, 0), m_contentImage->bounds());
175175 }
176176 }
90929

Source/WebKit2/UIProcess/mac/CorrectionPanel.mm

6060 dismissInternal(ReasonForDismissingCorrectionPanelIgnored, false);
6161}
6262
63 void CorrectionPanel::show(WKView* view, CorrectionPanelInfo::PanelType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 63void CorrectionPanel::show(WKView* view, CorrectionPanelInfo::PanelType type, const GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
6464{
6565 dismissInternal(ReasonForDismissingCorrectionPanelIgnored, false);
6666
90929

Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm

268268 m_pageClient->setDragImage(clientPosition, dragImage.release(), isLinkDrag);
269269}
270270
271 void WebPageProxy::performDictionaryLookupAtLocation(const WebCore::FloatPoint& point)
 271void WebPageProxy::performDictionaryLookupAtLocation(const WebCore::GraphicsPoint& point)
272272{
273273 if (!isValid())
274274 return;
90929

Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm

3737#import <Carbon/Carbon.h> // For SetSystemUIMode()
3838#import <IOKit/pwr_mgt/IOPMLib.h> // For IOPMAssertionCreate()
3939#import <QuartzCore/QuartzCore.h>
40 #import <WebCore/FloatRect.h>
 40#import <WebCore/GraphicsRect.h>
4141#import <WebCore/IntRect.h>
4242#import <WebKit/WebNSWindowExtras.h>
4343#import <WebKitSystemInterface.h>
90929

Source/WebKit2/UIProcess/mac/CorrectionPanel.h

3939public:
4040 CorrectionPanel();
4141 ~CorrectionPanel();
42  void show(WKView*, WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
 42 void show(WKView*, WebCore::CorrectionPanelInfo::PanelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
4343 String dismiss(WebCore::ReasonForDismissingCorrectionPanel);
4444 static void recordAutocorrectionResponse(WKView*, NSCorrectionResponse, const String& replacedString, const String& replacementString);
4545
90929

Source/WebKit2/UIProcess/API/mac/PageClientImpl.h

7777 virtual void updateTextInputState(bool updateSecureInputState);
7878 virtual void resetTextInputState();
7979
80  virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&);
81  virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&);
 80 virtual WebCore::GraphicsRect convertToDeviceSpace(const WebCore::GraphicsRect&);
 81 virtual WebCore::GraphicsRect convertToUserSpace(const WebCore::GraphicsRect&);
8282 virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&);
8383 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&);
8484

114114 virtual void didPerformDictionaryLookup(const String&, double scaleFactor, const DictionaryPopupInfo&);
115115 virtual void dismissDictionaryLookupPanel();
116116
117  virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
 117 virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
118118 virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel);
119119 virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingCorrectionPanel);
120120 virtual void recordAutocorrectionResponse(WebCore::EditorClient::AutocorrectionResponseType, const String& replacedString, const String& replacementString);
90929

Source/WebKit2/UIProcess/API/mac/WKView.mm

6363#import <WebCore/DragController.h>
6464#import <WebCore/DragData.h>
6565#import <WebCore/LocalizedStrings.h>
66 #import <WebCore/FloatRect.h>
 66#import <WebCore/GraphicsRect.h>
6767#import <WebCore/IntRect.h>
6868#import <WebCore/KeyboardEvent.h>
6969#import <WebCore/PlatformMouseEvent.h>

24902490 thePoint = [[self window] convertScreenToBase:thePoint];
24912491 thePoint = [self convertPoint:thePoint fromView:nil];
24922492
2493  _data->_page->performDictionaryLookupAtLocation(FloatPoint(thePoint.x, thePoint.y));
 2493 _data->_page->performDictionaryLookupAtLocation(GraphicsPoint(thePoint.x, thePoint.y));
24942494}
24952495
24962496- (NSInteger)spellCheckerDocumentTag
90929

Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm

3737#import "WebEditCommandProxy.h"
3838#import "WebPopupMenuProxyMac.h"
3939#import <WebCore/Cursor.h>
40 #import <WebCore/FloatRect.h>
 40#import <WebCore/GraphicsRect.h>
4141#import <WebCore/FoundationExtras.h>
4242#import <WebCore/GraphicsContext.h>
4343#import <WebCore/KeyboardEvent.h>

269269 [m_wkView _resetTextInputState];
270270}
271271
272 FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& rect)
 272GraphicsRect PageClientImpl::convertToDeviceSpace(const GraphicsRect& rect)
273273{
274274 return [m_wkView _convertToDeviceSpace:rect];
275275}
276276
277 FloatRect PageClientImpl::convertToUserSpace(const FloatRect& rect)
 277GraphicsRect PageClientImpl::convertToUserSpace(const GraphicsRect& rect)
278278{
279279 return [m_wkView _convertToUserSpace:rect];
280280}

424424#endif
425425}
426426
427 void PageClientImpl::showCorrectionPanel(CorrectionPanelInfo::PanelType type, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 427void PageClientImpl::showCorrectionPanel(CorrectionPanelInfo::PanelType type, const GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
428428{
429429#if !defined(BUILDING_ON_SNOW_LEOPARD)
430430 if (!isViewVisible() || !isViewInWindow())
90929

Source/WebKit2/UIProcess/WebPageProxy.h

7777 class AuthenticationChallenge;
7878 class Cursor;
7979 class DragData;
80  class FloatRect;
 80 class GraphicsRect;
8181 class IntSize;
8282 class ProtectionSpace;
8383 struct TextCheckingResult;

415415 void hideFindUI();
416416 void countStringMatches(const String&, FindOptions, unsigned maxMatchCount);
417417 void didCountStringMatches(const String&, uint32_t matchCount);
418  void setFindIndicator(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut);
 418 void setFindIndicator(const WebCore::GraphicsRect& selectionRectInWindowCoordinates, const Vector<WebCore::GraphicsRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle, bool fadeOut);
419419 void didFindString(const String&, uint32_t matchCount);
420420 void didFailToFindString(const String&);
421421#if PLATFORM(WIN)

434434
435435 float headerHeight(WebFrameProxy*);
436436 float footerHeight(WebFrameProxy*);
437  void drawHeader(WebFrameProxy*, const WebCore::FloatRect&);
438  void drawFooter(WebFrameProxy*, const WebCore::FloatRect&);
 437 void drawHeader(WebFrameProxy*, const WebCore::GraphicsRect&);
 438 void drawFooter(WebFrameProxy*, const WebCore::GraphicsRect&);
439439
440440#if PLATFORM(MAC)
441441 // Dictionary.
442  void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
 442 void performDictionaryLookupAtLocation(const WebCore::GraphicsPoint&);
443443#endif
444444
445445 void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID);

632632 void getStatusBarIsVisible(bool& statusBarIsVisible);
633633 void setIsResizable(bool isResizable);
634634 void getIsResizable(bool& isResizable);
635  void setWindowFrame(const WebCore::FloatRect&);
636  void getWindowFrame(WebCore::FloatRect&);
 635 void setWindowFrame(const WebCore::GraphicsRect&);
 636 void getWindowFrame(WebCore::GraphicsRect&);
637637 void screenToWindow(const WebCore::IntPoint& screenPoint, WebCore::IntPoint& windowPoint);
638638 void windowToScreen(const WebCore::IntRect& viewRect, WebCore::IntRect& result);
639639 void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);

769769#if PLATFORM(MAC)
770770 void substitutionsPanelIsShowing(bool&);
771771#if !defined(BUILDING_ON_SNOW_LEOPARD)
772  void showCorrectionPanel(int32_t panelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
 772 void showCorrectionPanel(int32_t panelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
773773 void dismissCorrectionPanel(int32_t reason);
774774 void dismissCorrectionPanelSoon(int32_t reason, String& result);
775775 void recordAutocorrectionResponse(int32_t responseType, const String& replacedString, const String& replacementString);
90929

Source/WebKit2/UIProcess/WebPageProxy.messages.in

5050 GetStatusBarIsVisible() -> (bool statusBarIsVisible)
5151 SetIsResizable(bool isResizable)
5252 GetIsResizable() -> (bool isResizable)
53  SetWindowFrame(WebCore::FloatRect windowFrame)
54  GetWindowFrame() -> (WebCore::FloatRect windowFrame)
 53 SetWindowFrame(WebCore::GraphicsRect windowFrame)
 54 GetWindowFrame() -> (WebCore::GraphicsRect windowFrame)
5555 ScreenToWindow(WebCore::IntPoint screenPoint) -> (WebCore::IntPoint windowPoint)
5656 WindowToScreen(WebCore::IntRect rect) -> (WebCore::IntRect screenFrame)
5757 RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)

164164
165165 # Find messages
166166 DidCountStringMatches(WTF::String string, uint32_t matchCount)
167  SetFindIndicator(WebCore::FloatRect selectionRect, Vector<WebCore::FloatRect> textRects, WebKit::ShareableBitmap::Handle contentImageHandle, bool fadeOut)
 167 SetFindIndicator(WebCore::GraphicsRect selectionRect, Vector<WebCore::GraphicsRect> textRects, WebKit::ShareableBitmap::Handle contentImageHandle, bool fadeOut)
168168 DidFindString(WTF::String string, uint32_t matchCount)
169169 DidFailToFindString(WTF::String string)
170170#if PLATFORM(WIN)

246246#endif
247247#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
248248 # Autocorrection messages
249  ShowCorrectionPanel(int32_t panelType, WebCore::FloatRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings)
 249 ShowCorrectionPanel(int32_t panelType, WebCore::GraphicsRect boundingBoxOfReplacedString, String replacedString, String replacementString, Vector<String> alternativeReplacementStrings)
250250 DismissCorrectionPanel(int32_t reason)
251251 DismissCorrectionPanelSoon(int32_t reason) -> (String result)
252252 RecordAutocorrectionResponse(int32_t responseType, String replacedString, String replacementString);
90929

Source/WebKit2/UIProcess/WebUIClient.cpp

3333#include "WebNumber.h"
3434#include "WebOpenPanelResultListenerProxy.h"
3535#include "WebPageProxy.h"
36 #include <WebCore/FloatRect.h>
 36#include <WebCore/GraphicsRect.h>
3737#include <WebCore/IntSize.h>
3838#include <WebCore/WindowFeatures.h>
3939#include <string.h>

244244 m_client.setIsResizable(toAPI(page), resizable, m_client.clientInfo);
245245}
246246
247 void WebUIClient::setWindowFrame(WebPageProxy* page, const FloatRect& frame)
 247void WebUIClient::setWindowFrame(WebPageProxy* page, const GraphicsRect& frame)
248248{
249249 if (!m_client.setWindowFrame)
250250 return;

252252 m_client.setWindowFrame(toAPI(page), toAPI(frame), m_client.clientInfo);
253253}
254254
255 FloatRect WebUIClient::windowFrame(WebPageProxy* page)
 255GraphicsRect WebUIClient::windowFrame(WebPageProxy* page)
256256{
257257 if (!m_client.getWindowFrame)
258  return FloatRect();
 258 return GraphicsRect();
259259
260  return toFloatRect(m_client.getWindowFrame(toAPI(page), m_client.clientInfo));
 260 return toGraphicsRect(m_client.getWindowFrame(toAPI(page), m_client.clientInfo));
261261}
262262
263263bool WebUIClient::canRunBeforeUnloadConfirmPanel() const

332332 return m_client.footerHeight(toAPI(page), toAPI(frame), m_client.clientInfo);
333333}
334334
335 void WebUIClient::drawHeader(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect)
 335void WebUIClient::drawHeader(WebPageProxy* page, WebFrameProxy* frame, const WebCore::GraphicsRect& rect)
336336{
337337 if (!m_client.drawHeader)
338338 return;

340340 m_client.drawHeader(toAPI(page), toAPI(frame), toAPI(rect), m_client.clientInfo);
341341}
342342
343 void WebUIClient::drawFooter(WebPageProxy* page, WebFrameProxy* frame, const WebCore::FloatRect& rect)
 343void WebUIClient::drawFooter(WebPageProxy* page, WebFrameProxy* frame, const WebCore::GraphicsRect& rect)
344344{
345345 if (!m_client.drawFooter)
346346 return;
90929

Source/WebKit2/UIProcess/PageClient.h

131131#if PLATFORM(GTK)
132132 virtual void getEditorCommandsForKeyEvent(const NativeWebKeyboardEvent&, Vector<WTF::String>&) = 0;
133133#endif
134  virtual WebCore::FloatRect convertToDeviceSpace(const WebCore::FloatRect&) = 0;
135  virtual WebCore::FloatRect convertToUserSpace(const WebCore::FloatRect&) = 0;
 134 virtual WebCore::GraphicsRect convertToDeviceSpace(const WebCore::GraphicsRect&) = 0;
 135 virtual WebCore::GraphicsRect convertToUserSpace(const WebCore::GraphicsRect&) = 0;
136136 virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) = 0;
137137 virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) = 0;
138138

165165 virtual CGContextRef containingWindowGraphicsContext() = 0;
166166 virtual void didPerformDictionaryLookup(const String&, double scaleFactor, const DictionaryPopupInfo&) = 0;
167167 virtual void dismissDictionaryLookupPanel() = 0;
168  virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) = 0;
 168 virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings) = 0;
169169 virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel) = 0;
170170 virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingCorrectionPanel) = 0;
171171 virtual void recordAutocorrectionResponse(WebCore::EditorClient::AutocorrectionResponseType, const String& replacedString, const String& replacementString) = 0;
90929

Source/WebKit2/UIProcess/WebUIClient.h

3434#include <wtf/PassRefPtr.h>
3535
3636namespace WebCore {
37  class FloatRect;
 37 class GraphicsRect;
3838 class IntSize;
3939 struct WindowFeatures;
4040}

8484 bool isResizable(WebPageProxy*);
8585 void setIsResizable(WebPageProxy*, bool);
8686
87  void setWindowFrame(WebPageProxy*, const WebCore::FloatRect&);
88  WebCore::FloatRect windowFrame(WebPageProxy*);
 87 void setWindowFrame(WebPageProxy*, const WebCore::GraphicsRect&);
 88 WebCore::GraphicsRect windowFrame(WebPageProxy*);
8989
9090 bool canRunBeforeUnloadConfirmPanel() const;
9191 bool runBeforeUnloadConfirmPanel(WebPageProxy*, const String&, WebFrameProxy*);

101101 // Printing.
102102 float headerHeight(WebPageProxy*, WebFrameProxy*);
103103 float footerHeight(WebPageProxy*, WebFrameProxy*);
104  void drawHeader(WebPageProxy*, WebFrameProxy*, const WebCore::FloatRect&);
105  void drawFooter(WebPageProxy*, WebFrameProxy*, const WebCore::FloatRect&);
 104 void drawHeader(WebPageProxy*, WebFrameProxy*, const WebCore::GraphicsRect&);
 105 void drawFooter(WebPageProxy*, WebFrameProxy*, const WebCore::GraphicsRect&);
106106 void printFrame(WebPageProxy*, WebFrameProxy*);
107107
108108 bool canRunModal() const;
90929

Source/WebKit2/UIProcess/FindIndicator.h

2727#define FindIndicator_h
2828
2929#include "ShareableBitmap.h"
30 #include <WebCore/FloatRect.h>
 30#include <WebCore/GraphicsRect.h>
3131#include <wtf/PassRefPtr.h>
3232#include <wtf/RefCounted.h>
3333#include <wtf/Vector.h>

4040
4141class FindIndicator : public RefCounted<FindIndicator> {
4242public:
43  static PassRefPtr<FindIndicator> create(const WebCore::FloatRect& selectionRectInWindowCoordinates, const Vector<WebCore::FloatRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle);
 43 static PassRefPtr<FindIndicator> create(const WebCore::GraphicsRect& selectionRectInWindowCoordinates, const Vector<WebCore::GraphicsRect>& textRectsInSelectionRectCoordinates, const ShareableBitmap::Handle& contentImageHandle);
4444 ~FindIndicator();
4545
46  WebCore::FloatRect selectionRectInWindowCoordinates() const { return m_selectionRectInWindowCoordinates; }
47  WebCore::FloatRect frameRect() const;
 46 WebCore::GraphicsRect selectionRectInWindowCoordinates() const { return m_selectionRectInWindowCoordinates; }
 47 WebCore::GraphicsRect frameRect() const;
4848
49  const Vector<WebCore::FloatRect>& textRects() const { return m_textRectsInSelectionRectCoordinates; }
 49 const Vector<WebCore::GraphicsRect>& textRects() const { return m_textRectsInSelectionRectCoordinates; }
5050
5151 ShareableBitmap* contentImage() const { return m_contentImage.get(); }
5252
5353 void draw(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
5454
5555private:
56  FindIndicator(const WebCore::FloatRect& selectionRect, const Vector<WebCore::FloatRect>& textRects, PassRefPtr<ShareableBitmap> contentImage);
 56 FindIndicator(const WebCore::GraphicsRect& selectionRect, const Vector<WebCore::GraphicsRect>& textRects, PassRefPtr<ShareableBitmap> contentImage);
5757
58  WebCore::FloatRect m_selectionRectInWindowCoordinates;
59  Vector<WebCore::FloatRect> m_textRectsInSelectionRectCoordinates;
 58 WebCore::GraphicsRect m_selectionRectInWindowCoordinates;
 59 Vector<WebCore::GraphicsRect> m_textRectsInSelectionRectCoordinates;
6060 RefPtr<ShareableBitmap> m_contentImage;
6161};
6262
90929

Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

193193 if (!pageHeightInPixels)
194194 pageHeightInPixels = coreFrame->view()->height();
195195
196  return PrintContext::numberOfPages(coreFrame, FloatSize(pageWidthInPixels, pageHeightInPixels));
 196 return PrintContext::numberOfPages(coreFrame, GraphicsSize(pageWidthInPixels, pageHeightInPixels));
197197}
198198
199199int InjectedBundle::pageNumberForElementById(WebFrame* frame, const String& id, double pageWidthInPixels, double pageHeightInPixels)

211211 if (!pageHeightInPixels)
212212 pageHeightInPixels = coreFrame->view()->height();
213213
214  return PrintContext::pageNumberForElement(element, FloatSize(pageWidthInPixels, pageHeightInPixels));
 214 return PrintContext::pageNumberForElement(element, GraphicsSize(pageWidthInPixels, pageHeightInPixels));
215215}
216216
217217String InjectedBundle::pageSizeAndMarginsInPixels(WebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
90929

Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp

135135
136136void WKBundlePageOverlaySetNeedsDisplay(WKBundlePageOverlayRef bundlePageOverlayRef, WKRect rect)
137137{
138  toImpl(bundlePageOverlayRef)->setNeedsDisplay(enclosingIntRect(toFloatRect(rect)));
 138 toImpl(bundlePageOverlayRef)->setNeedsDisplay(enclosingIntRect(toGraphicsRect(rect)));
139139}
140140
141141float WKBundlePageOverlayFractionFadedIn(WKBundlePageOverlayRef bundlePageOverlayRef)
90929

Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm

104104 double sourceXInScreenSpace;
105105 double sourceYInScreenSpace;
106106
107  FloatPoint sourceInScreenSpace;
 107 GraphicsPoint sourceInScreenSpace;
108108 switch (sourceSpace) {
109109 case NPCoordinateSpacePlugin:
110110 sourceXInScreenSpace = sourceX + m_windowFrameInScreenCoordinates.x() + m_viewFrameInWindowCoordinates.x() + m_npWindow.x;
90929

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

5252private:
5353 virtual void chromeDestroyed();
5454
55  virtual void setWindowRect(const WebCore::FloatRect&);
56  virtual WebCore::FloatRect windowRect();
 55 virtual void setWindowRect(const WebCore::GraphicsRect&);
 56 virtual WebCore::GraphicsRect windowRect();
5757
58  virtual WebCore::FloatRect pageRect();
 58 virtual WebCore::GraphicsRect pageRect();
5959
6060 virtual float scaleFactor();
6161

149149
150150 virtual void populateVisitedLinks();
151151
152  virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type, const WebCore::FloatRect& lineRect);
153  virtual void paintCustomHighlight(WebCore::Node*, const WTF::AtomicString& type, const WebCore::FloatRect& boxRect, const WebCore::FloatRect& lineRect,
 152 virtual WebCore::GraphicsRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type, const WebCore::GraphicsRect& lineRect);
 153 virtual void paintCustomHighlight(WebCore::Node*, const WTF::AtomicString& type, const WebCore::GraphicsRect& boxRect, const WebCore::GraphicsRect& lineRect,
154154 bool behindText, bool entireLine);
155155
156156 virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename);
157157 virtual String generateReplacementFile(const String& path);
158158
159  virtual bool paintCustomScrollbar(WebCore::GraphicsContext*, const WebCore::FloatRect&, WebCore::ScrollbarControlSize,
 159 virtual bool paintCustomScrollbar(WebCore::GraphicsContext*, const WebCore::GraphicsRect&, WebCore::ScrollbarControlSize,
160160 WebCore::ScrollbarControlState, WebCore::ScrollbarPart pressedPart, bool vertical,
161161 float value, float proportion, WebCore::ScrollbarControlPartMask);
162  virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&);
 162 virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::GraphicsRect&);
163163
164164 virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
165165
90929

Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm

238238}
239239
240240#if !defined(BUILDING_ON_SNOW_LEOPARD)
241 void WebEditorClient::showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType type, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
 241void WebEditorClient::showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType type, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings)
242242{
243243 m_page->send(Messages::WebPageProxy::ShowCorrectionPanel(type, boundingBoxOfReplacedString, replacedString, replacementString, alternativeReplacementStrings));
244244}
90929

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

9595 delete this;
9696}
9797
98 void WebChromeClient::setWindowRect(const FloatRect& windowFrame)
 98void WebChromeClient::setWindowRect(const GraphicsRect& windowFrame)
9999{
100100 m_page->send(Messages::WebPageProxy::SetWindowFrame(windowFrame));
101101}
102102
103 FloatRect WebChromeClient::windowRect()
 103GraphicsRect WebChromeClient::windowRect()
104104{
105  FloatRect newWindowFrame;
 105 GraphicsRect newWindowFrame;
106106
107107 if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::GetWindowFrame(), Messages::WebPageProxy::GetWindowFrame::Reply(newWindowFrame), m_page->pageID()))
108  return FloatRect();
 108 return GraphicsRect();
109109
110110 return newWindowFrame;
111111}
112112
113 FloatRect WebChromeClient::pageRect()
 113GraphicsRect WebChromeClient::pageRect()
114114{
115  return FloatRect(FloatPoint(), m_page->size());
 115 return GraphicsRect(GraphicsPoint(), m_page->size());
116116}
117117
118118float WebChromeClient::scaleFactor()

559559{
560560}
561561
562 FloatRect WebChromeClient::customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect)
 562GraphicsRect WebChromeClient::customHighlightRect(Node*, const AtomicString& type, const GraphicsRect& lineRect)
563563{
564564 notImplemented();
565  return FloatRect();
 565 return GraphicsRect();
566566}
567567
568 void WebChromeClient::paintCustomHighlight(Node*, const AtomicString& type, const FloatRect& boxRect, const FloatRect& lineRect,
 568void WebChromeClient::paintCustomHighlight(Node*, const AtomicString& type, const GraphicsRect& boxRect, const GraphicsRect& lineRect,
569569 bool behindText, bool entireLine)
570570{
571571 notImplemented();

582582 return m_page->injectedBundleUIClient().generateFileForUpload(m_page, path);
583583}
584584
585 bool WebChromeClient::paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize,
 585bool WebChromeClient::paintCustomScrollbar(GraphicsContext*, const GraphicsRect&, ScrollbarControlSize,
586586 ScrollbarControlState, ScrollbarPart pressedPart, bool vertical,
587587 float value, float proportion, ScrollbarControlPartMask)
588588{

590590 return false;
591591}
592592
593 bool WebChromeClient::paintCustomScrollCorner(GraphicsContext*, const FloatRect&)
 593bool WebChromeClient::paintCustomScrollCorner(GraphicsContext*, const GraphicsRect&)
594594{
595595 notImplemented();
596596 return false;
90929

Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h

144144 virtual void setInputMethodState(bool enabled);
145145 virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&);
146146#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
147  virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
 147 virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::GraphicsRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings);
148148 virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel);
149149 virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingCorrectionPanel);
150150 virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const String& replacedString, const String& replacementString);
90929

Source/WebKit2/WebProcess/WebPage/WebPage.messages.in

8383
8484#if PLATFORM(MAC)
8585 # Dictionary support.
86  PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
 86 PerformDictionaryLookupAtLocation(WebCore::GraphicsPoint point)
8787#endif
8888
8989 PreferencesDidChange(WebKit::WebPreferencesStore store)
90929

Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

644644 m_scrollOffset = IntSize();
645645
646646 OwnPtr<GraphicsContext> graphicsContext = createGraphicsContext(bitmap.get());
647  graphicsContext->scale(FloatSize(m_webPage->userSpaceScaleFactor(), m_webPage->userSpaceScaleFactor()));
 647 graphicsContext->scale(GraphicsSize(m_webPage->userSpaceScaleFactor(), m_webPage->userSpaceScaleFactor()));
648648
649649 updateInfo.updateRectBounds = bounds;
650650
90929

Source/WebKit2/WebProcess/WebPage/WebPage.cpp

914914 graphicsContext->save();
915915
916916 if (scale)
917  graphicsContext->scale(FloatSize(scaleFactor, scaleFactor));
 917 graphicsContext->scale(GraphicsSize(scaleFactor, scaleFactor));
918918
919919 graphicsContext->translate(-rect.x(), -rect.y());
920920 frameView->paintContents(graphicsContext.get(), rect);

22822282 m_printContext->begin(printInfo.availablePaperWidth, printInfo.availablePaperHeight);
22832283
22842284 float fullPageHeight;
2285  m_printContext->computePageRects(FloatRect(0, 0, printInfo.availablePaperWidth, printInfo.availablePaperHeight), 0, 0, printInfo.pageSetupScaleFactor, fullPageHeight, true);
 2285 m_printContext->computePageRects(GraphicsRect(0, 0, printInfo.availablePaperWidth, printInfo.availablePaperHeight), 0, 0, printInfo.pageSetupScaleFactor, fullPageHeight, true);
22862286}
22872287
22882288void WebPage::endPrinting()

22992299
23002300 if (m_printContext) {
23012301 resultPageRects = m_printContext->pageRects();
2302  resultTotalScaleFactorForPrinting = m_printContext->computeAutomaticScaleFactor(FloatSize(printInfo.availablePaperWidth, printInfo.availablePaperHeight)) * printInfo.pageSetupScaleFactor;
 2302 resultTotalScaleFactorForPrinting = m_printContext->computeAutomaticScaleFactor(GraphicsSize(printInfo.availablePaperWidth, printInfo.availablePaperHeight)) * printInfo.pageSetupScaleFactor;
23032303 }
23042304
23052305 // If we're asked to print, we should actually print at least a blank page.

23302330 CGPDFContextBeginPage(context.get(), pageInfo.get());
23312331
23322332 GraphicsContext ctx(context.get());
2333  ctx.scale(FloatSize(1, -1));
 2333 ctx.scale(GraphicsSize(1, -1));
23342334 ctx.translate(0, -rect.height());
23352335 m_printContext->spoolRect(ctx, rect);
23362336

23662366 CGPDFContextBeginPage(context.get(), pageInfo.get());
23672367
23682368 GraphicsContext ctx(context.get());
2369  ctx.scale(FloatSize(1, -1));
 2369 ctx.scale(GraphicsSize(1, -1));
23702370 ctx.translate(0, -m_printContext->pageRect(page).height());
23712371 m_printContext->spoolPage(ctx, page, m_printContext->pageRect(page).width());
23722372
90929

Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm

434434 return isPositionInRange(position, selectedRange.get());
435435}
436436
437 void WebPage::performDictionaryLookupAtLocation(const FloatPoint& floatPoint)
 437void WebPage::performDictionaryLookupAtLocation(const GraphicsPoint& floatPoint)
438438{
439439 Frame* frame = m_page->mainFrame();
440440 if (!frame)

529529 if (!fontDescriptorAttributes)
530530 return;
531531
532  Vector<FloatQuad> quads;
 532 Vector<GraphicsQuad> quads;
533533 range->textQuads(quads);
534534 if (quads.isEmpty())
535535 return;

538538
539539 DictionaryPopupInfo dictionaryPopupInfo;
540540 dictionaryPopupInfo.type = type;
541  dictionaryPopupInfo.origin = FloatPoint(rangeRect.x(), rangeRect.y());
 541 dictionaryPopupInfo.origin = GraphicsPoint(rangeRect.x(), rangeRect.y());
542542 dictionaryPopupInfo.fontInfo.fontAttributeDictionary = fontDescriptorAttributes;
543543#if !defined(BUILDING_ON_SNOW_LEOPARD)
544544 dictionaryPopupInfo.options = (CFDictionaryRef)options;
90929

Source/WebKit2/WebProcess/WebPage/FindController.cpp

172172 // We want the selection rect in window coordinates.
173173 IntRect selectionRectInWindowCoordinates = selectedFrame->view()->contentsToWindow(selectionRect);
174174
175  Vector<FloatRect> textRects;
 175 Vector<GraphicsRect> textRects;
176176 selectedFrame->selection()->getClippedVisibleTextRectangles(textRects);
177177
178178 // Create a backing store and paint the find indicator text into it.

198198 return false;
199199
200200 // We want the text rects in selection rect coordinates.
201  Vector<FloatRect> textRectsInSelectionRectCoordinates;
 201 Vector<GraphicsRect> textRectsInSelectionRectCoordinates;
202202
203203 for (size_t i = 0; i < textRects.size(); ++i) {
204204 IntRect textRectInSelectionRectCoordinates = selectedFrame->view()->contentsToWindow(enclosingIntRect(textRects[i]));

219219 return;
220220
221221 ShareableBitmap::Handle handle;
222  m_webPage->send(Messages::WebPageProxy::SetFindIndicator(FloatRect(), Vector<FloatRect>(), handle, false));
 222 m_webPage->send(Messages::WebPageProxy::SetFindIndicator(GraphicsRect(), Vector<GraphicsRect>(), handle, false));
223223 m_isShowingFindIndicator = false;
224224}
225225

302302 {
303303 GraphicsContextStateSaver stateSaver(graphicsContext);
304304
305  graphicsContext.setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, holeShadowColor(fractionFadedIn), ColorSpaceSRGB);
 305 graphicsContext.setShadow(GraphicsSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, holeShadowColor(fractionFadedIn), ColorSpaceSRGB);
306306 graphicsContext.setFillColor(holeFillColor(fractionFadedIn), ColorSpaceSRGB);
307307
308308 // Draw white frames around the holes.
90929

Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.cpp

133133
134134 // If the newSize exposes new areas of the non-composited content a setNeedsDisplay is needed
135135 // for those newly exposed areas.
136  FloatSize oldSize = m_nonCompositedContentLayer->size();
 136 GraphicsSize oldSize = m_nonCompositedContentLayer->size();
137137 m_nonCompositedContentLayer->setSize(newSize);
138138
139139 if (newSize.width() > oldSize.width()) {
140  float height = std::min(static_cast<float>(newSize.height()), oldSize.height());
141  m_nonCompositedContentLayer->setNeedsDisplayInRect(FloatRect(oldSize.width(), 0, newSize.width() - oldSize.width(), height));
 140 float height = std::min(static_cast<GraphicsUnit>(newSize.height()), oldSize.height());
 141 m_nonCompositedContentLayer->setNeedsDisplayInRect(GraphicsRect(oldSize.width(), 0, newSize.width() - oldSize.width(), height));
142142 }
143143
144144 if (newSize.height() > oldSize.height())
145  m_nonCompositedContentLayer->setNeedsDisplayInRect(FloatRect(0, oldSize.height(), newSize.width(), newSize.height() - oldSize.height()));
 145 m_nonCompositedContentLayer->setNeedsDisplayInRect(GraphicsRect(0, oldSize.height(), newSize.width(), newSize.height() - oldSize.height()));
146146
147147 if (m_pageOverlayLayer)
148148 m_pageOverlayLayer->setSize(newSize);
90929

Source/WebKit2/WebProcess/WebPage/WebPage.h

520520 void setCustomTextEncodingName(const String&);
521521
522522#if PLATFORM(MAC)
523  void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
 523 void performDictionaryLookupAtLocation(const WebCore::GraphicsPoint&);
524524 void performDictionaryLookupForRange(DictionaryPopupInfo::Type, WebCore::Frame*, WebCore::Range*, NSDictionary *options);
525525
526526 void setWindowIsVisible(bool windowIsVisible);
90929

Source/WebKit2/Scripts/webkit2/messages.py

255255 'WebCore::Animation',
256256 'WebCore::EditorCommandsForKeyEvent',
257257 'WebCore::CompositionUnderline',
258  'WebCore::FloatPoint3D',
 258 'WebCore::GraphicsPoint3D',
259259 'WebCore::GrammarDetail',
260260 'WebCore::IdentityTransformOperation',
261261 'WebCore::KeypressCommand',
90929

Source/WebKit2/Shared/mac/WebEventFactory.mm

10971097 WebEvent::Modifiers modifiers = modifiersForEvent(event);
10981098 double timestamp = [event timestamp];
10991099
1100  return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, phase, momentumPhase, hasPreciseScrollingDeltas, modifiers, timestamp);
 1100 return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), GraphicsSize(deltaX, deltaY), GraphicsSize(wheelTicksX, wheelTicksY), granularity, phase, momentumPhase, hasPreciseScrollingDeltas, modifiers, timestamp);
11011101}
11021102
11031103WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(NSEvent *event, NSView *)
90929

Source/WebKit2/Shared/API/c/WKSharedAPICast.h

4444#include "WebURLRequest.h"
4545#include "WebURLResponse.h"
4646#include <WebCore/ContextMenuItem.h>
47 #include <WebCore/FloatRect.h>
 47#include <WebCore/GraphicsRect.h>
4848#include <WebCore/FrameLoaderTypes.h>
4949#include <WebCore/IntRect.h>
5050#include <wtf/TypeTraits.h>

188188
189189/* Geometry conversions */
190190
191 inline WebCore::FloatRect toFloatRect(const WKRect& wkRect)
 191inline WebCore::GraphicsRect toGraphicsRect(const WKRect& wkRect)
192192{
193  return WebCore::FloatRect(static_cast<float>(wkRect.origin.x), static_cast<float>(wkRect.origin.y),
 193 return WebCore::GraphicsRect(static_cast<float>(wkRect.origin.x), static_cast<float>(wkRect.origin.y),
194194 static_cast<float>(wkRect.size.width), static_cast<float>(wkRect.size.height));
195195}
196196

210210 static_cast<int>(wkRect.size.width), static_cast<int>(wkRect.size.height));
211211}
212212
213 inline WKRect toAPI(const WebCore::FloatRect& rect)
 213inline WKRect toAPI(const WebCore::GraphicsRect& rect)
214214{
215215 WKRect wkRect;
216216 wkRect.origin.x = rect.x();
90929

Source/WebKit2/Shared/WebCoreArgumentCoders.h

3434 class Credential;
3535 class Cursor;
3636 class DatabaseDetails;
37  class FloatPoint;
38  class FloatRect;
39  class FloatSize;
 37 class GraphicsPoint;
 38 class GraphicsRect;
 39 class GraphicsSize;
4040 class HTTPHeaderMap;
4141 class IntPoint;
4242 class IntRect;

6363#if PLATFORM(QT)
6464namespace WebCore {
6565 class Animation;
66  class FloatPoint3D;
 66 class GraphicsPoint3D;
6767 class Matrix3DTransformOperation;
6868 class MatrixTransformOperation;
6969 class PerspectiveTransformOperation;

8181
8282namespace CoreIPC {
8383
84 template<> struct ArgumentCoder<WebCore::FloatPoint> {
85  static void encode(ArgumentEncoder*, const WebCore::FloatPoint&);
86  static bool decode(ArgumentDecoder*, WebCore::FloatPoint&);
 84template<> struct ArgumentCoder<WebCore::GraphicsPoint> {
 85 static void encode(ArgumentEncoder*, const WebCore::GraphicsPoint&);
 86 static bool decode(ArgumentDecoder*, WebCore::GraphicsPoint&);
8787};
8888
89 template<> struct ArgumentCoder<WebCore::FloatRect> {
90  static void encode(ArgumentEncoder*, const WebCore::FloatRect&);
91  static bool decode(ArgumentDecoder*, WebCore::FloatRect&);
 89template<> struct ArgumentCoder<WebCore::GraphicsRect> {
 90 static void encode(ArgumentEncoder*, const WebCore::GraphicsRect&);
 91 static bool decode(ArgumentDecoder*, WebCore::GraphicsRect&);
9292};
9393
94 template<> struct ArgumentCoder<WebCore::FloatSize> {
95  static void encode(ArgumentEncoder*, const WebCore::FloatSize&);
96  static bool decode(ArgumentDecoder*, WebCore::FloatSize&);
 94template<> struct ArgumentCoder<WebCore::GraphicsSize> {
 95 static void encode(ArgumentEncoder*, const WebCore::GraphicsSize&);
 96 static bool decode(ArgumentDecoder*, WebCore::GraphicsSize&);
9797};
9898
9999template<> struct ArgumentCoder<WebCore::IntPoint> {

203203};
204204
205205#if PLATFORM(QT)
206 template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
207  static void encode(ArgumentEncoder*, const WebCore::FloatPoint3D&);
208  static bool decode(ArgumentDecoder*, WebCore::FloatPoint3D&);
 206template<> struct ArgumentCoder<WebCore::GraphicsPoint3D> {
 207 static void encode(ArgumentEncoder*, const WebCore::GraphicsPoint3D&);
 208 static bool decode(ArgumentDecoder*, WebCore::GraphicsPoint3D&);
209209};
210210
211211template<> struct ArgumentCoder<WebCore::Length> {
90929

Source/WebKit2/Shared/WebWheelEvent.cpp

3333
3434namespace WebKit {
3535
36 WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Modifiers modifiers, double timestamp)
 36WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const GraphicsSize& delta, const GraphicsSize& wheelTicks, Granularity granularity, Modifiers modifiers, double timestamp)
3737 : WebEvent(type, modifiers, timestamp)
3838 , m_position(position)
3939 , m_globalPosition(globalPosition)

4949}
5050
5151#if PLATFORM(MAC)
52 WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Phase phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, Modifiers modifiers, double timestamp)
 52WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const GraphicsSize& delta, const GraphicsSize& wheelTicks, Granularity granularity, Phase phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, Modifiers modifiers, double timestamp)
5353 : WebEvent(type, modifiers, timestamp)
5454 , m_position(position)
5555 , m_globalPosition(globalPosition)
90929

Source/WebKit2/Shared/DictionaryPopupInfo.h

2727#define DictionaryPopupInfo_h
2828
2929#include "FontInfo.h"
30 #include <WebCore/FloatPoint.h>
 30#include <WebCore/GraphicsPoint.h>
3131
3232#if PLATFORM(MAC)
3333#include <wtf/RetainPtr.h>

4949 HotKey
5050 };
5151
52  WebCore::FloatPoint origin;
 52 WebCore::GraphicsPoint origin;
5353 FontInfo fontInfo;
5454 Type type;
5555#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
90929

Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

4343
4444#if PLATFORM(QT)
4545#include <WebCore/Animation.h>
46 #include <WebCore/FloatPoint3D.h>
 46#include <WebCore/GraphicsPoint3D.h>
4747#include <WebCore/IdentityTransformOperation.h>
4848#include <WebCore/Matrix3DTransformOperation.h>
4949#include <WebCore/MatrixTransformOperation.h>

6262
6363namespace CoreIPC {
6464
65 void ArgumentCoder<FloatPoint>::encode(ArgumentEncoder* encoder, const FloatPoint& floatPoint)
 65void ArgumentCoder<GraphicsPoint>::encode(ArgumentEncoder* encoder, const GraphicsPoint& floatPoint)
6666{
67  SimpleArgumentCoder<FloatPoint>::encode(encoder, floatPoint);
 67 SimpleArgumentCoder<GraphicsPoint>::encode(encoder, floatPoint);
6868}
6969
70 bool ArgumentCoder<FloatPoint>::decode(ArgumentDecoder* decoder, FloatPoint& floatPoint)
 70bool ArgumentCoder<GraphicsPoint>::decode(ArgumentDecoder* decoder, GraphicsPoint& floatPoint)
7171{
72  return SimpleArgumentCoder<FloatPoint>::decode(decoder, floatPoint);
 72 return SimpleArgumentCoder<GraphicsPoint>::decode(decoder, floatPoint);
7373}
7474
7575
76 void ArgumentCoder<FloatRect>::encode(ArgumentEncoder* encoder, const FloatRect& floatRect)
 76void ArgumentCoder<GraphicsRect>::encode(ArgumentEncoder* encoder, const GraphicsRect& floatRect)
7777{
78  SimpleArgumentCoder<FloatRect>::encode(encoder, floatRect);
 78 SimpleArgumentCoder<GraphicsRect>::encode(encoder, floatRect);
7979}
8080
81 bool ArgumentCoder<FloatRect>::decode(ArgumentDecoder* decoder, FloatRect& floatRect)
 81bool ArgumentCoder<GraphicsRect>::decode(ArgumentDecoder* decoder, GraphicsRect& floatRect)
8282{
83  return SimpleArgumentCoder<FloatRect>::decode(decoder, floatRect);
 83 return SimpleArgumentCoder<GraphicsRect>::decode(decoder, floatRect);
8484}
8585
8686
87 void ArgumentCoder<FloatSize>::encode(ArgumentEncoder* encoder, const FloatSize& floatSize)
 87void ArgumentCoder<GraphicsSize>::encode(ArgumentEncoder* encoder, const GraphicsSize& floatSize)
8888{
89  SimpleArgumentCoder<FloatSize>::encode(encoder, floatSize);
 89 SimpleArgumentCoder<GraphicsSize>::encode(encoder, floatSize);
9090}
9191
92 bool ArgumentCoder<FloatSize>::decode(ArgumentDecoder* decoder, FloatSize& floatSize)
 92bool ArgumentCoder<GraphicsSize>::decode(ArgumentDecoder* decoder, GraphicsSize& floatSize)
9393{
94  return SimpleArgumentCoder<FloatSize>::decode(decoder, floatSize);
 94 return SimpleArgumentCoder<GraphicsSize>::decode(decoder, floatSize);
9595}
9696
9797

552552
553553#if PLATFORM(QT)
554554
555 void ArgumentCoder<FloatPoint3D>::encode(ArgumentEncoder* encoder, const FloatPoint3D& floatPoint3D)
 555void ArgumentCoder<GraphicsPoint3D>::encode(ArgumentEncoder* encoder, const GraphicsPoint3D& floatPoint3D)
556556{
557  SimpleArgumentCoder<FloatPoint3D>::encode(encoder, floatPoint3D);
 557 SimpleArgumentCoder<GraphicsPoint3D>::encode(encoder, floatPoint3D);
558558}
559559
560 bool ArgumentCoder<FloatPoint3D>::decode(ArgumentDecoder* decoder, FloatPoint3D& floatPoint3D)
 560bool ArgumentCoder<GraphicsPoint3D>::decode(ArgumentDecoder* decoder, GraphicsPoint3D& floatPoint3D)
561561{
562  return SimpleArgumentCoder<FloatPoint3D>::decode(decoder, floatPoint3D);
 562 return SimpleArgumentCoder<GraphicsPoint3D>::decode(decoder, floatPoint3D);
563563}
564564
565565
90929

Source/WebKit2/Shared/WebEvent.h

2929// FIXME: We should probably move to makeing the WebCore/PlatformFooEvents trivial classes so that
3030// we can use them as the event type.
3131
32 #include <WebCore/FloatSize.h>
 32#include <WebCore/GraphicsSize.h>
3333#include <WebCore/IntPoint.h>
3434#include <wtf/text/WTFString.h>
3535

177177
178178 WebWheelEvent() { }
179179
180  WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Modifiers, double timestamp);
 180 WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::GraphicsSize& delta, const WebCore::GraphicsSize& wheelTicks, Granularity, Modifiers, double timestamp);
181181#if PLATFORM(MAC)
182  WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Phase phase, Phase momentumPhase,bool hasPreciseScrollingDeltas, Modifiers, double timestamp);
 182 WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::GraphicsSize& delta, const WebCore::GraphicsSize& wheelTicks, Granularity, Phase phase, Phase momentumPhase,bool hasPreciseScrollingDeltas, Modifiers, double timestamp);
183183#endif
184184
185185 const WebCore::IntPoint position() const { return m_position; }
186186 const WebCore::IntPoint globalPosition() const { return m_globalPosition; }
187  const WebCore::FloatSize delta() const { return m_delta; }
188  const WebCore::FloatSize wheelTicks() const { return m_wheelTicks; }
 187 const WebCore::GraphicsSize delta() const { return m_delta; }
 188 const WebCore::GraphicsSize wheelTicks() const { return m_wheelTicks; }
189189 Granularity granularity() const { return static_cast<Granularity>(m_granularity); }
190190#if PLATFORM(MAC)
191191 Phase phase() const { return static_cast<Phase>(m_phase); }

201201
202202 WebCore::IntPoint m_position;
203203 WebCore::IntPoint m_globalPosition;
204  WebCore::FloatSize m_delta;
205  WebCore::FloatSize m_wheelTicks;
 204 WebCore::GraphicsSize m_delta;
 205 WebCore::GraphicsSize m_wheelTicks;
206206 uint32_t m_granularity; // Granularity
207207#if PLATFORM(MAC)
208208 uint32_t m_phase; // Phase
90929