Bug 21300
Summary: | REGRESSION: Qt Mac scrollbars should avoid scroll corner resizers | ||
---|---|---|---|
Product: | WebKit | Reporter: | Dave Hyatt <hyatt> |
Component: | Platform | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dave Hyatt
"This could was misplaced. "
I meant to say "This code was misplaced." :)
Tor Arne Vestbø
Fix landed in r56552
Simon Hausmann
Revision r56552 cherry-picked into qtwebkit-2.0 with commit e506553e355d1d2a2144d316914b0e44450e4405
Kenneth Rohde Christiansen
(In reply to comment #2)
> Fix landed in r56552
This fix seems to have caused https://bugs.webkit.org/show_bug.cgi?id=36853