1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
/*
* Copyright (C) 2012 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "config.h"
#include "WebOverlayOverride.h"
#if USE(ACCELERATED_COMPOSITING)
#include "WebAnimation.h"
#include "WebAnimation_p.h"
#include "WebOverlay_p.h"
#include "WebString.h"
#include <BlackBerryPlatformMessageClient.h>
namespace BlackBerry {
namespace WebKit {
using namespace WebCore;
WebOverlayOverride::WebOverlayOverride(WebOverlayPrivate* d, bool owned)
: d(d)
, m_owned(owned)
{
}
WebOverlayOverride::~WebOverlayOverride()
{
if (m_owned)
delete d;
}
void WebOverlayOverride::setPosition(const Platform::FloatPoint& position)
{
d->setPosition(position);
}
void WebOverlayOverride::setAnchorPoint(const Platform::FloatPoint& anchor)
{
d->setAnchorPoint(anchor);
}
void WebOverlayOverride::setSize(const Platform::FloatSize& size)
{
d->setSize(size);
}
void WebOverlayOverride::setTransform(const Platform::TransformationMatrix& transform)
{
d->setTransform(reinterpret_cast<const TransformationMatrix&>(transform));
}
void WebOverlayOverride::setOpacity(float opacity)
{
d->setOpacity(opacity);
}
void WebOverlayOverride::addAnimation(const WebAnimation& animation)
{
d->addAnimation(animation.d->name, animation.d->animation.get(), animation.d->keyframes);
}
void WebOverlayOverride::removeAnimation(const WebString& name)
{
d->removeAnimation(String(PassRefPtr<StringImpl>(name.impl())));
}
}
}
#else // USE(ACCELERATED_COMPOSITING)
namespace BlackBerry {
namespace WebKit {
WebOverlayOverride::WebOverlayOverride(WebOverlayPrivate*, bool)
{
}
WebOverlayOverride::~WebOverlayOverride()
{
}
void WebOverlayOverride::setPosition(const Platform::FloatPoint&)
{
}
void WebOverlayOverride::setAnchorPoint(const Platform::FloatPoint&)
{
}
void WebOverlayOverride::setSize(const Platform::FloatSize&)
{
}
void WebOverlayOverride::setTransform(const Platform::TransformationMatrix&)
{
}
void WebOverlayOverride::setOpacity(float)
{
}
void WebOverlayOverride::addAnimation(const WebAnimation&)
{
}
void WebOverlayOverride::removeAnimation(const WebString&)
{
}
}
}
#endif // USE(ACCELERATED_COMPOSITING)
|