예제 #1
0
int Screen::availTop() const
{
    if (!m_frame)
        return 0;
    FrameHost* host = m_frame->host();
    if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
        return lroundf(screenAvailableRect(m_frame->view()).y() * host->deviceScaleFactor());
    return static_cast<int>(screenAvailableRect(m_frame->view()).y());
}
예제 #2
0
unsigned Screen::width() const
{
    if (!m_frame)
        return 0;
    FrameHost* host = m_frame->host();
    if (host && host->settings().reportScreenSizeInPhysicalPixelsQuirk())
        return lroundf(screenRect(m_frame->view()).width() * host->deviceScaleFactor());
    return static_cast<unsigned>(screenRect(m_frame->view()).width());
}
예제 #3
0
int Screen::availTop() const
{
    if (!m_frame)
        return 0;
    FrameHost* host = m_frame->host();
    if (!host)
        return 0;
    if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
        return lroundf(host->chromeClient().screenInfo().availableRect.y * host->deviceScaleFactor());
    return static_cast<int>(host->chromeClient().screenInfo().availableRect.y);
}
예제 #4
0
int Screen::width() const
{
    if (!m_frame)
        return 0;
    FrameHost* host = m_frame->host();
    if (!host)
        return 0;
    if (host->settings().reportScreenSizeInPhysicalPixelsQuirk())
        return lroundf(host->chromeClient().screenInfo().rect.width * host->deviceScaleFactor());
    return host->chromeClient().screenInfo().rect.width;
}