Commit b66c8115 authored by kpiascik@rim.com's avatar kpiascik@rim.com
Browse files

[BlackBerry] InspectorOverlay class duplicated in WebCore

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

Reviewed by Rob Buis.

Changed namespace of InspectorOverlay from WebCore to
BlackBerry::WebKit

* Api/WebPage.cpp:
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/InspectorClientBlackBerry.h:
* WebCoreSupport/InspectorOverlay.cpp:
(BlackBerry::WebKit::InspectorOverlay::create):
(BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
(BlackBerry::WebKit::InspectorOverlay::paintContents):
(BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
(BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
(BlackBerry::WebKit::InspectorOverlay::contentsVisible):
(BlackBerry::WebKit::InspectorOverlay::update):
* WebCoreSupport/InspectorOverlay.h:
(WebKit):
(InspectorOverlayClient):
(InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1409abac
......@@ -6431,11 +6431,11 @@ PagePopupBlackBerry* WebPage::popup()
return d->m_selectPopup;
}
void WebPagePrivate::setInspectorOverlayClient(WebCore::InspectorOverlay::InspectorOverlayClient* inspectorOverlayClient)
void WebPagePrivate::setInspectorOverlayClient(InspectorOverlay::InspectorOverlayClient* inspectorOverlayClient)
{
if (inspectorOverlayClient) {
if (!m_inspectorOverlay)
m_inspectorOverlay = WebCore::InspectorOverlay::create(this, inspectorOverlayClient);
m_inspectorOverlay = InspectorOverlay::create(this, inspectorOverlayClient);
else
m_inspectorOverlay->setClient(inspectorOverlayClient);
m_inspectorOverlay->update();
......
......@@ -454,7 +454,7 @@ public:
void deferredTasksTimerFired(WebCore::Timer<WebPagePrivate>*);
void setInspectorOverlayClient(WebCore::InspectorOverlay::InspectorOverlayClient*);
void setInspectorOverlayClient(InspectorOverlay::InspectorOverlayClient*);
void applySizeOverride(int overrideWidth, int overrideHeight);
void setTextZoomFactor(float);
......@@ -595,7 +595,7 @@ public:
RefPtr<WebCore::DOMWrapperWorld> m_isolatedWorld;
bool m_hasInRegionScrollableAreas;
bool m_updateDelegatedOverlaysDispatched;
OwnPtr<WebCore::InspectorOverlay> m_inspectorOverlay;
OwnPtr<InspectorOverlay> m_inspectorOverlay;
// There is no need to initialize the following members in WebPagePrivate's constructor,
// because they are only used by WebPageTasks and the tasks will initialize them when
......
2012-08-03 Konrad Piascik <kpiascik@rim.com>
[BlackBerry] InspectorOverlay class duplicated in WebCore
https://bugs.webkit.org/show_bug.cgi?id=93124
Reviewed by Rob Buis.
Changed namespace of InspectorOverlay from WebCore to
BlackBerry::WebKit
* Api/WebPage.cpp:
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/InspectorClientBlackBerry.h:
* WebCoreSupport/InspectorOverlay.cpp:
(BlackBerry::WebKit::InspectorOverlay::create):
(BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
(BlackBerry::WebKit::InspectorOverlay::paintContents):
(BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
(BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
(BlackBerry::WebKit::InspectorOverlay::contentsVisible):
(BlackBerry::WebKit::InspectorOverlay::update):
* WebCoreSupport/InspectorOverlay.h:
(WebKit):
(InspectorOverlayClient):
(InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):
2012-08-03 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Overlays display checkerboard that doesn't resolve
......
......@@ -34,7 +34,7 @@ class WebPagePrivate;
namespace WebCore {
class InspectorClientBlackBerry : public InspectorClient, public InspectorFrontendChannel, public InspectorOverlay::InspectorOverlayClient {
class InspectorClientBlackBerry : public InspectorClient, public InspectorFrontendChannel, public BlackBerry::WebKit::InspectorOverlay::InspectorOverlayClient {
public:
InspectorClientBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
virtual void inspectorDestroyed();
......
......@@ -27,40 +27,41 @@
#include "WebPage_p.h"
namespace WebCore {
namespace BlackBerry {
namespace WebKit {
PassOwnPtr<InspectorOverlay> InspectorOverlay::create(BlackBerry::WebKit::WebPagePrivate* page, InspectorOverlayClient* client)
PassOwnPtr<InspectorOverlay> InspectorOverlay::create(WebPagePrivate* page, InspectorOverlayClient* client)
{
return adoptPtr(new InspectorOverlay(page, client));
}
InspectorOverlay::InspectorOverlay(BlackBerry::WebKit::WebPagePrivate* page, InspectorOverlayClient* client)
InspectorOverlay::InspectorOverlay(WebPagePrivate* page, InspectorOverlayClient* client)
: m_webPage(page)
, m_client(client)
{
}
#if USE(ACCELERATED_COMPOSITING)
void InspectorOverlay::notifySyncRequired(const GraphicsLayer* layer)
void InspectorOverlay::notifySyncRequired(const WebCore::GraphicsLayer* layer)
{
m_webPage->notifySyncRequired(layer);
}
void InspectorOverlay::paintContents(const GraphicsLayer*, GraphicsContext& context, GraphicsLayerPaintingPhase, const IntRect& inClip)
void InspectorOverlay::paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext& context, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip)
{
context.save();
IntPoint scrollPosition = m_webPage->focusedOrMainFrame()->view()->scrollPosition();
WebCore::IntPoint scrollPosition = m_webPage->focusedOrMainFrame()->view()->scrollPosition();
context.translate(scrollPosition.x(), scrollPosition.y());
m_client->paintInspectorOverlay(context);
context.restore();
}
bool InspectorOverlay::showDebugBorders(const GraphicsLayer* layer) const
bool InspectorOverlay::showDebugBorders(const WebCore::GraphicsLayer* layer) const
{
return m_webPage->showDebugBorders(layer);
}
bool InspectorOverlay::showRepaintCounter(const GraphicsLayer* layer) const
bool InspectorOverlay::showRepaintCounter(const WebCore::GraphicsLayer* layer) const
{
return m_webPage->showRepaintCounter(layer);
}
......@@ -82,9 +83,9 @@ void InspectorOverlay::update()
{
#if USE(ACCELERATED_COMPOSITING)
if (!m_overlay) {
m_overlay = adoptPtr(new BlackBerry::WebKit::WebOverlay(this));
const IntSize size = m_webPage->contentsSize();
m_overlay->setSize(FloatSize(size.width(), size.height()));
m_overlay = adoptPtr(new WebOverlay(this));
const WebCore::IntSize size = m_webPage->contentsSize();
m_overlay->setSize(WebCore::FloatSize(size.width(), size.height()));
m_webPage->m_webPage->addOverlay(m_overlay.get());
}
......@@ -95,3 +96,4 @@ void InspectorOverlay::update()
}
}
}
......@@ -24,25 +24,23 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
namespace BlackBerry {
namespace WebKit {
class WebPagePrivate;
}
}
namespace WebCore {
class GraphicsContext;
class GraphicsLayer;
}
namespace BlackBerry {
namespace WebKit {
class WebPagePrivate;
class InspectorOverlay : public WebCore::GraphicsLayerClient {
public:
class InspectorOverlayClient {
public:
virtual void paintInspectorOverlay(GraphicsContext&) = 0;
virtual void paintInspectorOverlay(WebCore::GraphicsContext&) = 0;
};
static PassOwnPtr<InspectorOverlay> create(BlackBerry::WebKit::WebPagePrivate*, InspectorOverlayClient*);
static PassOwnPtr<InspectorOverlay> create(WebPagePrivate*, InspectorOverlayClient*);
~InspectorOverlay();
......@@ -50,26 +48,26 @@ public:
void clear();
void update();
void paintWebFrame(GraphicsContext&);
void paintWebFrame(WebCore::GraphicsContext&);
#if USE(ACCELERATED_COMPOSITING)
virtual void notifyAnimationStarted(const GraphicsLayer*, double time) { }
virtual void notifySyncRequired(const GraphicsLayer*);
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip);
virtual bool showDebugBorders(const GraphicsLayer*) const;
virtual bool showRepaintCounter(const GraphicsLayer*) const;
virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) { }
virtual void notifySyncRequired(const WebCore::GraphicsLayer*);
virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip);
virtual bool showDebugBorders(const WebCore::GraphicsLayer*) const;
virtual bool showRepaintCounter(const WebCore::GraphicsLayer*) const;
#endif
private:
InspectorOverlay(BlackBerry::WebKit::WebPagePrivate*, InspectorOverlayClient*);
InspectorOverlay(WebPagePrivate*, InspectorOverlayClient*);
void invalidateWebFrame();
BlackBerry::WebKit::WebPagePrivate* m_webPage;
WebPagePrivate* m_webPage;
InspectorOverlayClient* m_client;
OwnPtr<BlackBerry::WebKit::WebOverlay> m_overlay;
OwnPtr<WebOverlay> m_overlay;
};
} // namespace WebCore
} // namespace WebKit
} // namespace BlackBerry
#endif /* InspectorOverlay_h */
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