[Webkit-unassigned] [Bug 21300] New: REGRESSION: Qt Mac scrollbars should avoid scroll corner resizers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 2 00:22:32 PDT 2008


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

           Summary: REGRESSION: Qt Mac scrollbars should avoid scroll corner
                    resizers
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hyatt at apple.com


When making ScrollView cross-platform I removed the following code from
updateScrollbars in ScrollViewQt:

#if defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA)
    // On Mac, offset the scrollbars so they don't cover the grow box. Check if
the window 
    // has a grow box, and then check if the bottom-right corner of the scroll
view 
    // intersercts it. The calculations are done in global coordinates.
    QWidget* contentWidget = containingWindow();
    if (contentWidget) {
        QWidget* windowWidget = contentWidget->window();
        if (windowWidget) {
            HIViewRef growBox = 0;
           
HIViewFindByID(HIViewGetRoot(HIViewGetWindow(HIViewRef(contentWidget->winId()))),
kHIViewWindowGrowBoxID, &growBox);
            const QPoint contentBr = contentWidget->mapToGlobal(QPoint(0,0)) +
contentWidget->size();
            const QPoint windowBr = windowWidget->mapToGlobal(QPoint(0,0)) +
windowWidget->size();
            const QPoint contentOffset = (windowBr - contentBr);
            const int growBoxSize = 15;
            const bool enableOffset = (growBox != 0 && contentOffset.x() >= 0
&& contentOffset. y() >= 0);
            scrollbarOffset = enableOffset ? QPoint(growBoxSize -
qMin(contentOffset.x(), growBoxSize),
                                                    growBoxSize -
qMin(contentOffset.y(), growBoxSize))
                                           : QPoint(0,0);
        }
    }
#endif

This could was misplaced.  There is an actual API called windowResizerRect on
the chrome client that can be used to return the rect of the resizer box (in
Cocoa obtainable via [NSWIndow _growBoxRect].  Qt Mac should be implementing
this API rather than injecting code into the ScrollView.  

In order for updateScrollers to be cross-platform, I removed this code.


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



More information about the webkit-unassigned mailing list