Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 1374233003: Remove SVGSVGElement.pixelUnitToMillimeterX and friends (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2007 Apple Inc. All rights reserved.
5 * Copyright (C) 2014 Google, Inc. 5 * Copyright (C) 2014 Google, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #endif 99 #endif
100 } 100 }
101 101
102 PassRefPtrWillBeRawPtr<SVGRectTearOff> SVGSVGElement::viewport() const 102 PassRefPtrWillBeRawPtr<SVGRectTearOff> SVGSVGElement::viewport() const
103 { 103 {
104 // FIXME: This method doesn't follow the spec and is basically untested. Par ent documents are not considered here. 104 // FIXME: This method doesn't follow the spec and is basically untested. Par ent documents are not considered here.
105 // As we have no test coverage for this, we're going to disable it completly for now. 105 // As we have no test coverage for this, we're going to disable it completly for now.
106 return SVGRectTearOff::create(SVGRect::create(), 0, PropertyIsNotAnimVal); 106 return SVGRectTearOff::create(SVGRect::create(), 0, PropertyIsNotAnimVal);
107 } 107 }
108 108
109 float SVGSVGElement::pixelUnitToMillimeterX() const
110 {
111 return 1 / cssPixelsPerMillimeter;
112 }
113
114 float SVGSVGElement::pixelUnitToMillimeterY() const
115 {
116 return 1 / cssPixelsPerMillimeter;
117 }
118
119 float SVGSVGElement::screenPixelToMillimeterX() const
120 {
121 return pixelUnitToMillimeterX();
122 }
123
124 float SVGSVGElement::screenPixelToMillimeterY() const
125 {
126 return pixelUnitToMillimeterY();
127 }
128
129 SVGViewSpec* SVGSVGElement::currentView() 109 SVGViewSpec* SVGSVGElement::currentView()
130 { 110 {
131 if (!m_viewSpec) 111 if (!m_viewSpec)
132 m_viewSpec = SVGViewSpec::create(this); 112 m_viewSpec = SVGViewSpec::create(this);
133 return m_viewSpec.get(); 113 return m_viewSpec.get();
134 } 114 }
135 115
136 float SVGSVGElement::currentScale() const 116 float SVGSVGElement::currentScale() const
137 { 117 {
138 if (!inDocument() || !isOutermostSVGSVGElement()) 118 if (!inDocument() || !isOutermostSVGSVGElement())
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 visitor->trace(m_width); 768 visitor->trace(m_width);
789 visitor->trace(m_height); 769 visitor->trace(m_height);
790 visitor->trace(m_translation); 770 visitor->trace(m_translation);
791 visitor->trace(m_timeContainer); 771 visitor->trace(m_timeContainer);
792 visitor->trace(m_viewSpec); 772 visitor->trace(m_viewSpec);
793 SVGGraphicsElement::trace(visitor); 773 SVGGraphicsElement::trace(visitor);
794 SVGFitToViewBox::trace(visitor); 774 SVGFitToViewBox::trace(visitor);
795 } 775 }
796 776
797 } // namespace blink 777 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGSVGElement.h ('k') | third_party/WebKit/Source/core/svg/SVGSVGElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698