[chromium] Move geometry headers in Platform API to Platform directory

https://bugs.webkit.org/show_bug.cgi?id=78067

Patch by James Robinson <jamesr@chromium.org> on 2012-02-07
Reviewed by Adam Barth.

Source/Platform:

This moves several geometry-related headers in the chromium WebKit platform API to Platform/chromium/public.
These require a bit of extra work since when WEBKIT_IMPLEMENTATION is set they #include headers from
WebCore/platform such as IntPoint so that the implementations of several functions can be inlined. Since we do
not want to add anything in WebCore to the include path of projects that depend on the Platform API this poses a
bit of an issue. I've added an extra build step to copy the specific headers used into the
SHARED_INTERMEDIATE_DIR to preserve this inlining.

Eventually we'll move the cross-platform code, including these headers, into somewhere under Platform/, but doing
that requires non-trivial modifications to every build system in WebKit.

* Platform.gyp/Platform.gyp:
* Platform.gyp/copy_webcore_headers.py: Added.
(CopyHeaders):
(Main):
* chromium/public/WebFloatPoint.h: Copied from Source/WebKit/chromium/public/platform/WebFloatPoint.h.
(WebKit):
(WebFloatPoint):
(WebKit::WebFloatPoint::WebFloatPoint):
(WebKit::WebFloatPoint::operator=):
(WebKit::WebFloatPoint::operator WebCore::FloatPoint):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebFloatQuad.h: Copied from Source/WebKit/chromium/public/platform/WebFloatQuad.h.
(WebKit):
(WebFloatQuad):
(WebKit::WebFloatQuad::WebFloatQuad):
(WebKit::WebFloatQuad::operator=):
* chromium/public/WebFloatRect.h: Copied from Source/WebKit/chromium/public/platform/WebFloatRect.h.
(WebKit):
(WebFloatRect):
(WebKit::WebFloatRect::isEmpty):
(WebKit::WebFloatRect::WebFloatRect):
(WebKit::WebFloatRect::operator=):
(WebKit::WebFloatRect::operator WebCore::FloatRect):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebPoint.h: Copied from Source/WebKit/chromium/public/platform/WebPoint.h.
(WebKit):
(WebPoint):
(WebKit::WebPoint::WebPoint):
(WebKit::WebPoint::operator=):
(WebKit::WebPoint::operator WebCore::IntPoint):
(WebKit::WebPoint::operator gfx::Point):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebRect.h: Copied from Source/WebKit/chromium/public/platform/WebRect.h.
(WebKit):
(WebRect):
(WebKit::WebRect::isEmpty):
(WebKit::WebRect::WebRect):
(WebKit::WebRect::operator=):
(WebKit::WebRect::operator WebCore::IntRect):
(WebKit::WebRect::operator gfx::Rect):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebSize.h: Copied from Source/WebKit/chromium/public/platform/WebSize.h.
(WebKit):
(WebSize):
(WebKit::WebSize::isEmpty):
(WebKit::WebSize::WebSize):
(WebKit::WebSize::operator=):
(WebKit::WebSize::operator WebCore::IntSize):
(WebKit::WebSize::operator gfx::Size):
(WebKit::operator==):
(WebKit::operator!=):

Source/WebKit/chromium:

Add forwarding headers for several API types moved into Platform.

* public/platform/WebFloatPoint.h:
* public/platform/WebFloatQuad.h:
* public/platform/WebFloatRect.h:
* public/platform/WebPoint.h:
* public/platform/WebRect.h:
* public/platform/WebSize.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent efee39f4
2012-02-07 James Robinson <jamesr@chromium.org>
[chromium] Move geometry headers in Platform API to Platform directory
https://bugs.webkit.org/show_bug.cgi?id=78067
Reviewed by Adam Barth.
This moves several geometry-related headers in the chromium WebKit platform API to Platform/chromium/public.
These require a bit of extra work since when WEBKIT_IMPLEMENTATION is set they #include headers from
WebCore/platform such as IntPoint so that the implementations of several functions can be inlined. Since we do
not want to add anything in WebCore to the include path of projects that depend on the Platform API this poses a
bit of an issue. I've added an extra build step to copy the specific headers used into the
SHARED_INTERMEDIATE_DIR to preserve this inlining.
Eventually we'll move the cross-platform code, including these headers, into somewhere under Platform/, but doing
that requires non-trivial modifications to every build system in WebKit.
* Platform.gyp/Platform.gyp:
* Platform.gyp/copy_webcore_headers.py: Added.
(CopyHeaders):
(Main):
* chromium/public/WebFloatPoint.h: Copied from Source/WebKit/chromium/public/platform/WebFloatPoint.h.
(WebKit):
(WebFloatPoint):
(WebKit::WebFloatPoint::WebFloatPoint):
(WebKit::WebFloatPoint::operator=):
(WebKit::WebFloatPoint::operator WebCore::FloatPoint):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebFloatQuad.h: Copied from Source/WebKit/chromium/public/platform/WebFloatQuad.h.
(WebKit):
(WebFloatQuad):
(WebKit::WebFloatQuad::WebFloatQuad):
(WebKit::WebFloatQuad::operator=):
* chromium/public/WebFloatRect.h: Copied from Source/WebKit/chromium/public/platform/WebFloatRect.h.
(WebKit):
(WebFloatRect):
(WebKit::WebFloatRect::isEmpty):
(WebKit::WebFloatRect::WebFloatRect):
(WebKit::WebFloatRect::operator=):
(WebKit::WebFloatRect::operator WebCore::FloatRect):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebPoint.h: Copied from Source/WebKit/chromium/public/platform/WebPoint.h.
(WebKit):
(WebPoint):
(WebKit::WebPoint::WebPoint):
(WebKit::WebPoint::operator=):
(WebKit::WebPoint::operator WebCore::IntPoint):
(WebKit::WebPoint::operator gfx::Point):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebRect.h: Copied from Source/WebKit/chromium/public/platform/WebRect.h.
(WebKit):
(WebRect):
(WebKit::WebRect::isEmpty):
(WebKit::WebRect::WebRect):
(WebKit::WebRect::operator=):
(WebKit::WebRect::operator WebCore::IntRect):
(WebKit::WebRect::operator gfx::Rect):
(WebKit::operator==):
(WebKit::operator!=):
* chromium/public/WebSize.h: Copied from Source/WebKit/chromium/public/platform/WebSize.h.
(WebKit):
(WebSize):
(WebKit::WebSize::isEmpty):
(WebKit::WebSize::WebSize):
(WebKit::WebSize::operator=):
(WebKit::WebSize::operator WebCore::IntSize):
(WebKit::WebSize::operator gfx::Size):
(WebKit::operator==):
(WebKit::operator!=):
2012-01-19 Joi Sigurdsson <joi@chromium.org>
Enable use of precompiled headers in Chromium port on Windows.
......
......@@ -43,6 +43,7 @@
],
'include_dirs': [
'../chromium',
'<(output_dir)',
],
'defines': [
'WEBKIT_IMPLEMENTATION=1',
......@@ -50,9 +51,28 @@
'sources': [
'<@(platform_files)',
],
'variables': {
# List of headers that are #included in Platform API headers that exist inside
# the WebCore directory. These are only included when WEBKIT_IMPLEMENTATION=1.
# Since Platform/ can't add WebCore/* to the include path, this build step
# copies these headers into the shared intermediate directory and adds that to the include path.
# This is temporary, the better solution is to move these headers into the Platform
# directory for all ports and just use them as normal.
'webcore_headers': [
'../../WebCore/platform/graphics/FloatPoint.h',
'../../WebCore/platform/graphics/FloatQuad.h',
'../../WebCore/platform/graphics/FloatRect.h',
'../../WebCore/platform/graphics/FloatSize.h',
'../../WebCore/platform/graphics/IntPoint.h',
'../../WebCore/platform/graphics/IntRect.h',
'../../WebCore/platform/graphics/IntSize.h',
],
'output_dir': '<(SHARED_INTERMEDIATE_DIR)/webcore_headers'
},
'direct_dependent_settings': {
'include_dirs': [
'../chromium',
'<(output_dir)'
],
},
'conditions': [
......@@ -65,6 +85,24 @@
}],
],
}],
],
'actions': [
{
'action_name': 'platform_api_copy_webcore_headers',
'inputs': [
'<@(webcore_headers)'
],
'outputs': [
'<(output_dir)/IntPoint.h' # Just have to depend on any one copied header
],
'action': [
'python',
'copy_webcore_headers.py',
'<(SHARED_INTERMEDIATE_DIR)/webcore_headers',
'<@(webcore_headers)'
],
'message': 'Copying WebCore headers needed by Platform API'
}
]
}
]
......
#!/usr/bin/env python
# Copyright (c) 2012 Google 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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.
"""A helper script for copying WebCore/platform headers into a location the WebKit Platform API headers can include"""
import errno
import os
import shutil
import sys
def CopyHeaders(dest_dir, headers):
try:
os.makedirs(dest_dir)
except OSError, e:
if e.errno != errno.EEXIST:
raise
for header in headers:
dest_filename = dest_dir + os.sep + header.split('/')[-1]
shutil.copyfile(header, dest_filename)
def Main(argv):
dest_dir = argv[1]
headers = argv[2:]
CopyHeaders(dest_dir, headers)
if __name__ == '__main__':
sys.exit(Main(sys.argv))
......@@ -33,9 +33,16 @@
'platform_files': [
'chromium/public/WebCString.h',
'chromium/public/WebCommon.h',
'chromium/public/WebString.h',
'chromium/public/WebFloatPoint.h',
'chromium/public/WebFloatQuad.h',
'chromium/public/WebFloatRect.h',
'chromium/public/WebMimeRegistry.h',
'chromium/public/WebPoint.h',
'chromium/public/WebRect.h',
'chromium/public/WebSize.h',
'chromium/public/WebString.h',
'chromium/src/WebCString.cpp',
'chromium/src/WebFloatQuad.cpp',
'chromium/src/WebString.cpp',
]
}
......
/*
* Copyright (C) 2010 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "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 THE COPYRIGHT
* OWNER 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.
*/
#ifndef WebFloatPoint_h
#define WebFloatPoint_h
#include "WebCommon.h"
#if WEBKIT_IMPLEMENTATION
#include "FloatPoint.h"
#endif
namespace WebKit {
struct WebFloatPoint {
float x;
float y;
WebFloatPoint()
: x(0.0f)
, y(0.0f)
{
}
WebFloatPoint(float x, float y)
: x(x)
, y(y)
{
}
#if WEBKIT_IMPLEMENTATION
WebFloatPoint(const WebCore::FloatPoint& p)
: x(p.x())
, y(p.y())
{
}
WebFloatPoint& operator=(const WebCore::FloatPoint& p)
{
x = p.x();
y = p.y();
return *this;
}
operator WebCore::FloatPoint() const
{
return WebCore::FloatPoint(x, y);
}
#endif
};
inline bool operator==(const WebFloatPoint& a, const WebFloatPoint& b)
{
return a.x == b.x && a.y == b.y;
}
inline bool operator!=(const WebFloatPoint& a, const WebFloatPoint& b)
{
return !(a == b);
}
} // namespace WebKit
#endif
/*
* Copyright (C) 2011 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "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 THE COPYRIGHT
* OWNER 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.
*/
#ifndef WebFloatQuad_h
#define WebFloatQuad_h
#include "WebCommon.h"
#include "WebFloatPoint.h"
#include "WebRect.h"
#include <algorithm>
#include <cmath>
#if WEBKIT_IMPLEMENTATION
#include "FloatQuad.h"
#endif
namespace WebKit {
struct WebFloatQuad {
WebFloatPoint p[4];
WebFloatQuad()
{
}
WebFloatQuad(const WebFloatPoint& p0, const WebFloatPoint& p1, const WebFloatPoint& p2, const WebFloatPoint& p3)
{
p[0] = p0;
p[1] = p1;
p[2] = p2;
p[3] = p3;
}
WEBKIT_EXPORT WebRect enclosingRect() const;
#if WEBKIT_IMPLEMENTATION
WebFloatQuad& operator=(const WebCore::FloatQuad& q)
{
p[0] = q.p1();
p[1] = q.p2();
p[2] = q.p3();
p[3] = q.p4();
return *this;
}
WebFloatQuad(const WebCore::FloatQuad& q)
{
*this = q;
}
#endif
};
} // namespace WebKit
#endif
/*
* Copyright (C) 2010 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "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 THE COPYRIGHT
* OWNER 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.
*/
#ifndef WebFloatRect_h
#define WebFloatRect_h
#include "WebCommon.h"
#if WEBKIT_IMPLEMENTATION
#include "FloatRect.h"
#endif
namespace WebKit {
struct WebFloatRect {
float x;
float y;
float width;
float height;
bool isEmpty() const { return width <= 0 || height <= 0; }
WebFloatRect()
: x(0.0f)
, y(0.0f)
, width(0.0f)
, height(0.0f)
{
}
WebFloatRect(float x, float y, float width, float height)
: x(x)
, y(y)
, width(width)
, height(height)
{
}
#if WEBKIT_IMPLEMENTATION
WebFloatRect(const WebCore::FloatRect& r)
: x(r.x())
, y(r.y())
, width(r.width())
, height(r.height())
{
}
WebFloatRect& operator=(const WebCore::FloatRect& r)
{
x = r.x();
y = r.y();
width = r.width();
height = r.height();
return *this;
}
operator WebCore::FloatRect() const
{
return WebCore::FloatRect(x, y, width, height);
}
#endif
};
inline bool operator==(const WebFloatRect& a, const WebFloatRect& b)
{
return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height;
}
inline bool operator!=(const WebFloatRect& a, const WebFloatRect& b)
{
return !(a == b);
}
} // namespace WebKit
#endif
/*
* Copyright (C) 2009 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "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 THE COPYRIGHT
* OWNER 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.
*/
#ifndef WebPoint_h
#define WebPoint_h
#include "WebCommon.h"
#if WEBKIT_IMPLEMENTATION
#include "IntPoint.h"
#else
#include <ui/gfx/point.h>
#endif
namespace WebKit {
struct WebPoint {
int x;
int y;
WebPoint()
: x(0)
, y(0)
{
}
WebPoint(int x, int y)
: x(x)
, y(y)
{
}
#if WEBKIT_IMPLEMENTATION
WebPoint(const WebCore::IntPoint& p)
: x(p.x())
, y(p.y())
{
}
WebPoint& operator=(const WebCore::IntPoint& p)
{
x = p.x();
y = p.y();
return *this;
}
operator WebCore::IntPoint() const
{
return WebCore::IntPoint(x, y);
}
#else
WebPoint(const gfx::Point& p)
: x(p.x())
, y(p.y())
{
}
WebPoint& operator=(const gfx::Point& p)
{
x = p.x();
y = p.y();
return *this;
}
operator gfx::Point() const
{
return gfx::Point(x, y);
}
#endif
};
inline bool operator==(const WebPoint& a, const WebPoint& b)
{
return a.x == b.x && a.y == b.y;
}
inline bool operator!=(const WebPoint& a, const WebPoint& b)
{
return !(a == b);
}
} // namespace WebKit
#endif
/*
* Copyright (C) 2009 Google 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:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "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 THE COPYRIGHT
* OWNER 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.
*/
#ifndef WebRect_h
#define WebRect_h
#include "WebCommon.h"
#if WEBKIT_IMPLEMENTATION
#include "IntRect.h"
#else
#include <ui/gfx/rect.h>
#endif
namespace WebKit {