[Webkit-unassigned] [Bug 46258] [EFL] Add support for scaling the contents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 17 13:13:15 PST 2010


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





--- Comment #8 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2010-11-17 13:13:15 PST ---
(From update of attachment 68367)
View in context: https://bugs.webkit.org/attachment.cgi?id=68367&action=review

> WebCore/platform/ScrollView.cpp:148
> -        updateScrollbars(scrollOffset());
> +        updateScrollbars(m_scrollOffset);

scrollOffset should be inline anyway, I do not really like this change

> WebCore/platform/ScrollView.cpp:223
> -    return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()),
> -                   IntSize(max(0, width() - (verticalScrollbar() && !includeScrollbars ? verticalScrollbar()->width() : 0)), 
> -                           max(0, height() - (horizontalScrollbar() && !includeScrollbars ? horizontalScrollbar()->height() : 0))));
> +
> +    int w = width() - (verticalScrollbar() && !includeScrollbars ? verticalScrollbar()->width() : 0);
> +    int h = height() - (horizontalScrollbar() && !includeScrollbars ? horizontalScrollbar()->height() : 0);
> +
> +    if (useScale) {
> +        float scale = (this == root()) ? scaleFactor() : 1.0f;
> +        return IntRect(static_cast<int>(ceil(m_scrollOffset.width() / scale)),
> +                       static_cast<int>(ceil(m_scrollOffset.height() / scale)),
> +                       max(0, static_cast<int>(ceil(w / scale))),
> +                       max(0, static_cast<int>(ceil(h / scale))));
> +    } else {
> +        return IntRect(m_scrollOffset.width(), m_scrollOffset.height(),
> +                       max(0, w), max(0, h));
> +    }

Hyatt needs to look at this. This probably also wont work for webkit2. I think you need something like the setActualVisibleContentRect that we introduced a little while ago. I will have some patches soon that makes that actually work 100%.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list