Commit ec144f13 authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

Remove NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES

Remove the NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES define and the Mac
OS specific code guarded by it as it is no longer used.

Bug: 740391
Change-Id: If7320d4bf9ec359fb437df644440d4df0e3e3318
Reviewed-on: https://chromium-review.googlesource.com/565464Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485368}
parent 689e3bdc
...@@ -814,12 +814,6 @@ component("platform") { ...@@ -814,12 +814,6 @@ component("platform") {
"geometry/cg/IntPointCG.cpp", "geometry/cg/IntPointCG.cpp",
"geometry/cg/IntRectCG.cpp", "geometry/cg/IntRectCG.cpp",
"geometry/cg/IntSizeCG.cpp", "geometry/cg/IntSizeCG.cpp",
"geometry/mac/FloatPointMac.mm",
"geometry/mac/FloatRectMac.mm",
"geometry/mac/FloatSizeMac.mm",
"geometry/mac/IntPointMac.mm",
"geometry/mac/IntRectMac.mm",
"geometry/mac/IntSizeMac.mm",
"graphics/AcceleratedStaticBitmapImage.cpp", "graphics/AcceleratedStaticBitmapImage.cpp",
"graphics/AcceleratedStaticBitmapImage.h", "graphics/AcceleratedStaticBitmapImage.h",
"graphics/BitmapImage.cpp", "graphics/BitmapImage.cpp",
......
...@@ -133,10 +133,6 @@ class PLATFORM_EXPORT FloatPoint { ...@@ -133,10 +133,6 @@ class PLATFORM_EXPORT FloatPoint {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
FloatPoint(const CGPoint&); FloatPoint(const CGPoint&);
operator CGPoint() const; operator CGPoint() const;
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
FloatPoint(const NSPoint&);
operator NSPoint() const;
#endif
#endif #endif
// Can we remove this one? // Can we remove this one?
......
...@@ -190,10 +190,6 @@ class PLATFORM_EXPORT FloatRect { ...@@ -190,10 +190,6 @@ class PLATFORM_EXPORT FloatRect {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
FloatRect(const CGRect&); FloatRect(const CGRect&);
operator CGRect() const; operator CGRect() const;
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
FloatRect(const NSRect&);
operator NSRect() const;
#endif
#endif #endif
operator SkRect() const { operator SkRect() const {
......
...@@ -120,11 +120,6 @@ class PLATFORM_EXPORT FloatSize { ...@@ -120,11 +120,6 @@ class PLATFORM_EXPORT FloatSize {
explicit FloatSize( explicit FloatSize(
const CGSize&); // don't do this implicitly since it's lossy const CGSize&); // don't do this implicitly since it's lossy
operator CGSize() const; operator CGSize() const;
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
explicit FloatSize(
const NSSize&); // don't do this implicitly since it's lossy
operator NSSize() const;
#endif
#endif #endif
operator SkSize() const { return SkSize::Make(width_, height_); } operator SkSize() const { return SkSize::Make(width_, height_); }
......
...@@ -98,12 +98,6 @@ class PLATFORM_EXPORT IntPoint { ...@@ -98,12 +98,6 @@ class PLATFORM_EXPORT IntPoint {
explicit IntPoint( explicit IntPoint(
const CGPoint&); // don't do this implicitly since it's lossy const CGPoint&); // don't do this implicitly since it's lossy
operator CGPoint() const; operator CGPoint() const;
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
explicit IntPoint(
const NSPoint&); // don't do this implicitly since it's lossy
operator NSPoint() const;
#endif
#endif #endif
String ToString() const; String ToString() const;
......
...@@ -191,9 +191,6 @@ class PLATFORM_EXPORT IntRect { ...@@ -191,9 +191,6 @@ class PLATFORM_EXPORT IntRect {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
operator CGRect() const; operator CGRect() const;
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
operator NSRect() const;
#endif
#endif #endif
operator SkRect() const; operator SkRect() const;
...@@ -238,13 +235,6 @@ inline bool operator!=(const IntRect& a, const IntRect& b) { ...@@ -238,13 +235,6 @@ inline bool operator!=(const IntRect& a, const IntRect& b) {
return a.Location() != b.Location() || a.Size() != b.Size(); return a.Location() != b.Location() || a.Size() != b.Size();
} }
#if defined(OS_MACOSX)
PLATFORM_EXPORT IntRect EnclosingIntRect(const CGRect&);
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
PLATFORM_EXPORT IntRect enclosingIntRect(const NSRect&);
#endif
#endif
// Redeclared here to avoid ODR issues. // Redeclared here to avoid ODR issues.
// See platform/testing/GeometryPrinters.h. // See platform/testing/GeometryPrinters.h.
void PrintTo(const IntRect&, std::ostream*); void PrintTo(const IntRect&, std::ostream*);
......
...@@ -111,11 +111,6 @@ class PLATFORM_EXPORT IntSize { ...@@ -111,11 +111,6 @@ class PLATFORM_EXPORT IntSize {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
explicit IntSize(const CGSize&); // don't do this implicitly since it's lossy explicit IntSize(const CGSize&); // don't do this implicitly since it's lossy
operator CGSize() const; operator CGSize() const;
#if defined(__OBJC__) && !defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)
explicit IntSize(const NSSize&); // don't do this implicitly since it's lossy
operator NSSize() const;
#endif
#endif #endif
operator gfx::Size() const; operator gfx::Size() const;
......
/*
* Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2005 Nokia. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "platform/geometry/FloatPoint.h"
namespace blink {
#ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
FloatPoint::FloatPoint(const NSPoint& p) : m_x(p.x), m_y(p.y) {}
FloatPoint::operator NSPoint() const {
return NSMakePoint(m_x, m_y);
}
#endif
}
/*
* Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2005 Nokia. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "platform/geometry/FloatRect.h"
namespace blink {
#ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
FloatRect::FloatRect(const NSRect& r) : m_location(r.origin), m_size(r.size) {}
FloatRect::operator NSRect() const {
return NSMakeRect(x(), y(), width(), height());
}
#endif
}
/*
* Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2005 Nokia. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "platform/geometry/FloatSize.h"
namespace blink {
#ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
FloatSize::FloatSize(const NSSize& s) : m_width(s.width), m_height(s.height) {}
FloatSize::operator NSSize() const {
return NSMakeSize(m_width, m_height);
}
#endif
}
/*
* Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "platform/geometry/IntPoint.h"
namespace blink {
#ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
IntPoint::IntPoint(const NSPoint& p)
: m_x(static_cast<int>(p.x)), m_y(static_cast<int>(p.y)) {}
IntPoint::operator NSPoint() const {
return NSMakePoint(m_x, m_y);
}
#endif
}
/*
* Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "platform/geometry/IntRect.h"
namespace blink {
#ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
IntRect::operator NSRect() const {
return NSMakeRect(x(), y(), width(), height());
}
IntRect enclosingIntRect(const NSRect& rect) {
int l = static_cast<int>(floorf(rect.origin.x));
int t = static_cast<int>(floorf(rect.origin.y));
int r = static_cast<int>(ceilf(NSMaxX(rect)));
int b = static_cast<int>(ceilf(NSMaxY(rect)));
return IntRect(l, t, r - l, b - t);
}
#endif
}
/*
* Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "platform/geometry/IntSize.h"
namespace blink {
#ifndef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
IntSize::IntSize(const NSSize& s)
: m_width(static_cast<int>(s.width)),
m_height(static_cast<int>(s.height)) {}
IntSize::operator NSSize() const {
return NSMakeSize(m_width, m_height);
}
#endif
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment