Bug 21300

Summary: REGRESSION: Qt Mac scrollbars should avoid scroll corner resizers
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: PlatformAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Status: CLOSED FIXED    
Severity: Normal CC: hausmann, kenneth, kent.hansen, tonikitoo
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 35784    

Dave Hyatt
Reported 2008-10-02 00:22:32 PDT
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.
Attachments
Dave Hyatt
Comment 1 2008-10-03 12:05:37 PDT
"This could was misplaced. " I meant to say "This code was misplaced." :)
Tor Arne Vestbø
Comment 2 2010-03-25 10:11:38 PDT
Fix landed in r56552
Simon Hausmann
Comment 3 2010-03-26 07:12:43 PDT
Revision r56552 cherry-picked into qtwebkit-2.0 with commit e506553e355d1d2a2144d316914b0e44450e4405
Kenneth Rohde Christiansen
Comment 4 2010-04-09 12:13:10 PDT
(In reply to comment #2) > Fix landed in r56552 This fix seems to have caused https://bugs.webkit.org/show_bug.cgi?id=36853
Note You need to log in before you can comment on or make changes to this bug.