[BlackBerry] WebOverlay build fixes and bug fixes

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

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-29
Reviewed by Rob Buis.

Fix build when accelerated compositing disabled, or debug build.

Also fix a bug where the selection overlay would not disappear properly
because of a typo in WebPage::removeOverlay(). Also convert said method
to early return style.

Debug build fixes contributed by Ming Xie.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlay::addAnimation):
(BlackBerry::WebKit::WebOverlay::setContentsToImage):
(WebKit):
(BlackBerry::WebKit::WebOverlay::setContentsToColor):
(BlackBerry::WebKit::WebOverlay::setDrawsContent):
(BlackBerry::WebKit::WebOverlay::invalidate):
(BlackBerry::WebKit::WebOverlay::setClient):
(BlackBerry::WebKit::WebOverlay::override):
(BlackBerry::WebKit::WebOverlay::resetOverrides):
* Api/WebOverlayOverride.cpp:
(BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
* Api/WebOverlay_p.h:
(BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::removeOverlay):
(BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
(BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@118850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9dc2ac24
......@@ -734,7 +734,7 @@ void WebOverlay::removeFromParent()
{
}
void WebOverlay::addAnimation(WebAnimation*)
void WebOverlay::addAnimation(const WebAnimation&)
{
}
......@@ -742,6 +742,34 @@ void WebOverlay::removeAnimation(const WebString&)
{
}
void WebOverlay::setContentsToImage(const unsigned char*, const Platform::IntSize&)
{
}
void WebOverlay::setContentsToColor(int, int, int, int)
{
}
void WebOverlay::setDrawsContent(bool)
{
}
void WebOverlay::invalidate()
{
}
void WebOverlay::setClient(WebOverlayClient*)
{
}
WebOverlayOverride* WebOverlay::override()
{
}
void WebOverlay::resetOverrides()
{
}
}
}
#endif // USE(ACCELERATED_COMPOSITING)
......@@ -86,7 +86,7 @@ void WebOverlayOverride::removeAnimation(const WebString& name)
namespace BlackBerry {
namespace WebKit {
WebOverlayOverride::WebOverlayOverride(WebOverlayPrivate*)
WebOverlayOverride::WebOverlayOverride(WebOverlayPrivate*, bool)
{
}
......
......@@ -61,7 +61,7 @@ public:
virtual ~WebOverlayPrivate()
{
ASSERT(pthread_self() == d->nativeThread);
ASSERT(pthread_self() == nativeThread);
}
WebPagePrivate* page() const;
......
......@@ -6228,18 +6228,19 @@ void WebPage::addOverlay(WebOverlay* overlay)
void WebPage::removeOverlay(WebOverlay* overlay)
{
#if USE(ACCELERATED_COMPOSITING)
if (overlay->d->graphicsLayer() == d->overlayLayer()) {
overlay->removeFromParent();
overlay->d->clear();
overlay->d->setPage(0);
}
if (overlay->d->graphicsLayer()->parent() != d->overlayLayer())
return;
overlay->removeFromParent();
overlay->d->clear();
overlay->d->setPage(0);
#endif
}
void WebPage::addCompositingThreadOverlay(WebOverlay* overlay)
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(userInterfaceThreadMessageClient()->isCurrentThread());
ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
overlay->d->setPage(d);
d->compositor()->addOverlay(overlay->d->layerCompositingThread());
#endif
......@@ -6248,7 +6249,7 @@ void WebPage::addCompositingThreadOverlay(WebOverlay* overlay)
void WebPage::removeCompositingThreadOverlay(WebOverlay* overlay)
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(userInterfaceThreadMessageClient()->isCurrentThread());
ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
d->compositor()->removeOverlay(overlay->d->layerCompositingThread());
overlay->d->clear();
overlay->d->setPage(0);
......
2012-05-29 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] WebOverlay build fixes and bug fixes
https://bugs.webkit.org/show_bug.cgi?id=87780
Reviewed by Rob Buis.
Fix build when accelerated compositing disabled, or debug build.
Also fix a bug where the selection overlay would not disappear properly
because of a typo in WebPage::removeOverlay(). Also convert said method
to early return style.
Debug build fixes contributed by Ming Xie.
* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlay::addAnimation):
(BlackBerry::WebKit::WebOverlay::setContentsToImage):
(WebKit):
(BlackBerry::WebKit::WebOverlay::setContentsToColor):
(BlackBerry::WebKit::WebOverlay::setDrawsContent):
(BlackBerry::WebKit::WebOverlay::invalidate):
(BlackBerry::WebKit::WebOverlay::setClient):
(BlackBerry::WebKit::WebOverlay::override):
(BlackBerry::WebKit::WebOverlay::resetOverrides):
* Api/WebOverlayOverride.cpp:
(BlackBerry::WebKit::WebOverlayOverride::WebOverlayOverride):
* Api/WebOverlay_p.h:
(BlackBerry::WebKit::WebOverlayPrivate::~WebOverlayPrivate):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::removeOverlay):
(BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
(BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
2012-05-29 Yong Li <yoli@rim.com>
[BlackBerry] Add malloc info to about:memory page
......
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