Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: WebCore/platform/qt/ScrollbarQt.cpp

Issue 3364013: Merge 67001 - 2010-09-08 Peter Kasting <pkasting@google.com>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « WebCore/platform/gtk/ScrollbarGtk.cpp ('k') | WebCore/platform/win/PopupMenuWin.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Staikos Computing Services Inc. <info@staikos.net> 3 * Copyright (C) 2007 Staikos Computing Services Inc. <info@staikos.net>
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 QAction* actScrollUp = menu.addAction(horizontal ? QCoreApplication::transla te("QWebPage", "Scroll left") : QCoreApplication::translate("QWebPage", "Scroll up")); 69 QAction* actScrollUp = menu.addAction(horizontal ? QCoreApplication::transla te("QWebPage", "Scroll left") : QCoreApplication::translate("QWebPage", "Scroll up"));
70 QAction* actScrollDown = menu.addAction(horizontal ? QCoreApplication::trans late("QWebPage", "Scroll right") : QCoreApplication::translate("QWebPage", "Scro ll down")); 70 QAction* actScrollDown = menu.addAction(horizontal ? QCoreApplication::trans late("QWebPage", "Scroll right") : QCoreApplication::translate("QWebPage", "Scro ll down"));
71 71
72 const QPoint globalPos = QPoint(event.globalX(), event.globalY()); 72 const QPoint globalPos = QPoint(event.globalX(), event.globalY());
73 QAction* actionSelected = menu.exec(globalPos); 73 QAction* actionSelected = menu.exec(globalPos);
74 74
75 if (actionSelected == actScrollHere) { 75 if (actionSelected == actScrollHere) {
76 const QPoint pos = convertFromContainingWindow(event.pos()); 76 const QPoint pos = convertFromContainingWindow(event.pos());
77 moveThumb(horizontal ? pos.x() : pos.y()); 77 moveThumb(horizontal ? pos.x() : pos.y());
78 } else if (actionSelected == actScrollTop) 78 } else if (actionSelected == actScrollTop)
79 setValue(0); 79 scroll(horizontal ? ScrollLeft : ScrollUp, ScrollByDocument);
80 else if (actionSelected == actScrollBottom) 80 else if (actionSelected == actScrollBottom)
81 setValue(maximum()); 81 scroll(horizontal ? ScrollRight : ScrollDown, ScrollByDocument);
82 else if (actionSelected == actPageUp) 82 else if (actionSelected == actPageUp)
83 scroll(horizontal ? ScrollLeft: ScrollUp, ScrollByPage); 83 scroll(horizontal ? ScrollLeft : ScrollUp, ScrollByPage);
84 else if (actionSelected == actPageDown) 84 else if (actionSelected == actPageDown)
85 scroll(horizontal ? ScrollRight : ScrollDown, ScrollByPage); 85 scroll(horizontal ? ScrollRight : ScrollDown, ScrollByPage);
86 else if (actionSelected == actScrollUp) 86 else if (actionSelected == actScrollUp)
87 scroll(horizontal ? ScrollLeft : ScrollUp, ScrollByLine); 87 scroll(horizontal ? ScrollLeft : ScrollUp, ScrollByLine);
88 else if (actionSelected == actScrollDown) 88 else if (actionSelected == actScrollDown)
89 scroll(horizontal ? ScrollRight : ScrollDown, ScrollByLine); 89 scroll(horizontal ? ScrollRight : ScrollDown, ScrollByLine);
90 #endif // QT_NO_CONTEXTMENU 90 #endif // QT_NO_CONTEXTMENU
91 return true; 91 return true;
92 } 92 }
93 93
94 } 94 }
95 95
96 // vim: ts=4 sw=4 et 96 // vim: ts=4 sw=4 et
OLDNEW
« no previous file with comments | « WebCore/platform/gtk/ScrollbarGtk.cpp ('k') | WebCore/platform/win/PopupMenuWin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698