PlatformScreenBlackBerry.cpp [plain text]
#include "config.h"
#include "PlatformScreen.h"
#include "FloatRect.h"
#include "Frame.h"
#include "FrameView.h"
#include "NotImplemented.h"
#include "Page.h"
#include "Settings.h"
#include "Widget.h"
#include <BlackBerryPlatformScreen.h>
namespace WebCore {
bool screenIsMonochrome(Widget*)
{
return false;
}
int screenDepthPerComponent(Widget*)
{
return 8;
}
int screenDepth(Widget*)
{
return 24;
}
static FloatRect toUserSpace(FloatRect rect, Widget* widget)
{
if (widget->isFrameView()) {
Page* page = toFrameView(widget)->frame()->page();
if (page && !page->settings()->applyDeviceScaleFactorInCompositor()) {
rect.scale(1 / page->deviceScaleFactor());
rect.setSize(expandedIntSize(rect.size()));
}
}
return rect;
}
FloatRect screenAvailableRect(Widget* widget)
{
if (!widget)
return FloatRect();
return toUserSpace(IntRect(IntPoint::zero(), IntSize(BlackBerry::Platform::Graphics::Screen::primaryScreen()->size())), widget);
}
FloatRect screenRect(Widget* widget)
{
if (!widget)
return FloatRect();
return toUserSpace(IntRect(IntPoint::zero(), IntSize(BlackBerry::Platform::Graphics::Screen::primaryScreen()->size())), widget);
}
void screenColorProfile(ColorProfile&)
{
notImplemented();
}
}