Changeset 30687 in webkit
- Timestamp:
- Feb 29, 2008 4:29:22 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r30679 r30687 1 2008-02-29 Brent Fulgham <bfulgham@gmail.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=17483 4 Implement scrollbars on Windows (Cairo) 5 6 Reviewed by Adam Roben. 7 8 * wtf/Platform.h: 9 1 10 2008-02-29 Adam Roben <aroben@apple.com> 2 11 -
trunk/JavaScriptCore/wtf/Platform.h
r29663 r30687 113 113 #endif 114 114 115 #if PLATFORM(WIN)&& PLATFORM(CG) 116 #define WTF_USE_SAFARI_THEME 1 117 #endif 115 118 116 119 #ifdef __S60__ -
trunk/WebCore/ChangeLog
r30680 r30687 1 2008-02-29 Brent Fulgham <bfulgham@gmail.com> 2 3 http://bugs.webkit.org/show_bug.cgi?id=17483 4 Implement scrollbars on Windows (Cairo) 5 6 Reviewed by Adam Roben. 7 8 * platform/win/PlatfromScrollBarWin.cpp: Duplicate implementation 9 from PlatformScrollBarWinSafari.cpp, then modify to use the 10 native Windows theme engine. Use SOFT_LINK. Use platform 11 'GetSystemMetrics' call to decide size of scrollbars and buttons. 12 1 13 2008-02-29 Adam Roben <aroben@apple.com> 2 14 -
trunk/WebCore/platform/win/PlatformScrollBarWin.cpp
r30685 r30687 1 1 /* 2 2 * Copyright (C) 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Brent Fulgham 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 26 27 #include "config.h" 27 28 28 #ifdef USE_SAFARI_THEME29 30 29 #include "PlatformScrollBar.h" 31 30 … … 38 37 #include "SoftLinking.h" 39 38 40 #include <CoreGraphics/CoreGraphics.h> 41 #include <SafariTheme/SafariTheme.h> 42 43 // FIXME: There are repainting problems due to Aqua scroll bar buttons' visual overflow. 39 #include <windows.h> 40 #include "RenderThemeWin.h" 41 42 // Generic state constants 43 #define TS_NORMAL 1 44 #define TS_HOVER 2 45 #define TS_ACTIVE 3 46 #define TS_DISABLED 4 47 #define TS_FOCUSED 5 48 49 #define ABS_UPNORMAL 1 50 #define ABS_DOWNNORMAL 5 51 #define ABS_LEFTNORMAL 9 52 #define ABS_RIGHTNORMAL 13 53 54 static const unsigned SP_ABS_HOT_MODIFIER = 1; 55 static const unsigned SP_ABS_PRESSED_MODIFIER = 2; 56 static const unsigned SP_ABS_DISABLE_MODIFIER = 3; 57 58 // Scrollbar constants 59 #define SP_BUTTON 1 60 #define SP_THUMBHOR 2 61 #define SP_THUMBVERT 3 62 #define SP_TRACKSTARTHOR 4 63 #define SP_TRACKENDHOR 5 64 #define SP_TRACKSTARTVERT 6 65 #define SP_TRACKENDVERT 7 66 #define SP_GRIPPERHOR 8 67 #define SP_GRIPPERVERT 9 44 68 45 69 using namespace std; … … 47 71 namespace WebCore { 48 72 49 using namespace SafariTheme;50 51 73 // FIXME: We should get these numbers from SafariTheme 52 static int cHorizontalWidth[] = { 15, 11 }; 53 static int cHorizontalHeight[] = { 15, 11 }; 54 static int cVerticalWidth[] = { 15, 11 }; 55 static int cVerticalHeight[] = { 15, 11 }; 56 static int cRealButtonLength[] = { 28, 21 }; 57 static int cButtonInset[] = { 14, 11 }; 58 static int cButtonHitInset[] = { 3, 2 }; 74 static int cHorizontalWidth; 75 static int cHorizontalHeight; 76 static int cVerticalWidth; 77 static int cVerticalHeight; 78 static int cHorizontalButtonWidth; 79 static int cVerticalButtonHeight; 80 static int cRealButtonLength = 28; 81 static int cButtonInset = 14; 82 static int cButtonHitInset = 3; 59 83 // cRealButtonLength - cButtonInset 60 static int cButtonLength[] = { 14, 10 }; 61 static int cThumbWidth[] = { 15, 11 }; 62 static int cThumbHeight[] = { 15, 11 }; 63 static int cThumbMinLength[] = { 26, 20 }; 64 65 #if !defined(NDEBUG) && defined(USE_DEBUG_SAFARI_THEME) 66 SOFT_LINK_DEBUG_LIBRARY(SafariTheme) 67 #else 68 SOFT_LINK_LIBRARY(SafariTheme) 69 #endif 70 71 SOFT_LINK(SafariTheme, paintThemePart, void, __stdcall, (ThemePart part, CGContextRef context, const CGRect& rect, NSControlSize size, ThemeControlState state), (part, context, rect, size, state)) 84 static int cThumbWidth; 85 static int cThumbHeight; 86 static int cThumbMinLength = 26; 87 88 static HANDLE cScrollBarTheme = 0; 89 90 // FIXME: Refactor the soft-linking code so that it can be shared with RenderThemeWin 91 SOFT_LINK_LIBRARY(uxtheme) 92 SOFT_LINK(uxtheme, OpenThemeData, HANDLE, WINAPI, (HWND hwnd, LPCWSTR pszClassList), (hwnd, pszClassList)) 93 SOFT_LINK(uxtheme, CloseThemeData, HRESULT, WINAPI, (HANDLE hTheme), (hTheme)) 94 SOFT_LINK(uxtheme, DrawThemeBackground, HRESULT, WINAPI, (HANDLE hTheme, HDC hdc, int iPartId, int iStateId, const RECT* pRect, const RECT* pClipRect), (hTheme, hdc, iPartId, iStateId, pRect, pClipRect)) 95 SOFT_LINK(uxtheme, DrawThemeEdge, HRESULT, WINAPI, (HANDLE hTheme, HDC hdc, int iPartId, int iStateId, const RECT* pRect, unsigned uEdge, unsigned uFlags, const RECT* pClipRect), (hTheme, hdc, iPartId, iStateId, pRect, uEdge, uFlags, pClipRect)) 96 SOFT_LINK(uxtheme, GetThemeContentRect, HRESULT, WINAPI, (HANDLE hTheme, HDC hdc, int iPartId, int iStateId, const RECT* pRect, const RECT* pContentRect), (hTheme, hdc, iPartId, iStateId, pRect, pContentRect)) 97 SOFT_LINK(uxtheme, GetThemePartSize, HRESULT, WINAPI, (HANDLE hTheme, HDC hdc, int iPartId, int iStateId, RECT* pRect, int ts, SIZE* psz), (hTheme, hdc, iPartId, iStateId, pRect, ts, psz)) 98 SOFT_LINK(uxtheme, GetThemeSysFont, HRESULT, WINAPI, (HANDLE hTheme, int iFontId, OUT LOGFONT* pFont), (hTheme, iFontId, pFont)) 99 SOFT_LINK(uxtheme, GetThemeColor, HRESULT, WINAPI, (HANDLE hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, OUT COLORREF* pColor), (hTheme, hdc, iPartId, iStateId, iPropId, pColor)) 100 101 static void checkAndInitScrollbarTheme() 102 { 103 if (uxthemeLibrary() && !cScrollBarTheme) 104 cScrollBarTheme = OpenThemeData(0, L"Scrollbar"); 105 } 106 107 // May need to add stuff to these later, so keep the graphics context retrieval/release in some helpers. 108 static HDC prepareForDrawing(GraphicsContext* g, const IntRect& r) 109 { 110 return g->getWindowsContext(r); 111 } 112 113 static void doneDrawing(GraphicsContext* g, HDC hdc, const IntRect& r) 114 { 115 g->releaseWindowsContext(hdc, r); 116 } 117 // End Copied from RenderThemeWin 72 118 73 119 const double cInitialTimerDelay = 0.25; … … 75 121 76 122 PlatformScrollbar::PlatformScrollbar(ScrollbarClient* client, ScrollbarOrientation orientation, ScrollbarControlSize size) 77 : Scrollbar(client, orientation, size), m_hoveredPart(NoPart), m_pressedPart(NoPart), m_pressedPos(0), 78 m_scrollTimer(this, &PlatformScrollbar::autoscrollTimerFired), 79 m_overlapsResizer(false) 123 : Scrollbar(client, orientation, size) 124 , m_hoveredPart(NoPart) 125 , m_pressedPart(NoPart) 126 , m_pressedPos(0) 127 , m_scrollTimer(this, &PlatformScrollbar::autoscrollTimerFired) 128 , m_overlapsResizer(false) 80 129 { 81 130 // Obtain the correct scrollbar sizes from the system. 82 if (!cHorizontalWidth) { 83 // FIXME: Get metics from SafariTheme 131 // FIXME: We should update these on a WM_SETTINGSCHANGE, too. 132 if (!cHorizontalHeight) { 133 cHorizontalHeight = ::GetSystemMetrics(SM_CYHSCROLL); 134 cHorizontalWidth = ::GetSystemMetrics(SM_CXHSCROLL); 135 cVerticalHeight = ::GetSystemMetrics(SM_CYVSCROLL); 136 cVerticalWidth = ::GetSystemMetrics(SM_CXVSCROLL); 137 cThumbWidth = ::GetSystemMetrics(SM_CXHTHUMB); 138 cThumbHeight = ::GetSystemMetrics(SM_CYVTHUMB); 139 cHorizontalButtonWidth = ::GetSystemMetrics(SM_CYVSCROLL); 140 cVerticalButtonHeight = ::GetSystemMetrics(SM_CXHSCROLL); 84 141 } 85 142 86 143 if (orientation == VerticalScrollbar) 87 setFrameGeometry(IntRect(0, 0, cVerticalWidth [controlSize()], cVerticalHeight[controlSize()]));144 setFrameGeometry(IntRect(0, 0, cVerticalWidth, cVerticalHeight)); 88 145 else 89 setFrameGeometry(IntRect(0, 0, cHorizontalWidth [controlSize()], cHorizontalHeight[controlSize()]));146 setFrameGeometry(IntRect(0, 0, cHorizontalWidth, cHorizontalHeight)); 90 147 } 91 148 … … 107 164 static IntRect trackRepaintRect(const IntRect& trackRect, ScrollbarOrientation orientation, ScrollbarControlSize controlSize) 108 165 { 166 const int cButtonLength = (orientation == VerticalScrollbar) ? cVerticalButtonHeight : cHorizontalButtonWidth; 167 109 168 IntRect paintRect(trackRect); 110 169 if (orientation == HorizontalScrollbar) 111 paintRect.inflateX(cButtonLength [controlSize]);170 paintRect.inflateX(cButtonLength); 112 171 else 113 paintRect.inflateY(cButtonLength [controlSize]);172 paintRect.inflateY(cButtonLength); 114 173 115 174 return paintRect; … … 120 179 IntRect paintRect(buttonRect); 121 180 if (orientation == HorizontalScrollbar) { 122 paintRect.setWidth(cRealButtonLength [controlSize]);181 paintRect.setWidth(cRealButtonLength); 123 182 if (!start) 124 paintRect.setX(buttonRect.x() - (cRealButtonLength [controlSize]- buttonRect.width()));183 paintRect.setX(buttonRect.x() - (cRealButtonLength - buttonRect.width())); 125 184 } else { 126 paintRect.setHeight(cRealButtonLength [controlSize]);185 paintRect.setHeight(cRealButtonLength); 127 186 if (!start) 128 paintRect.setY(buttonRect.y() - (cRealButtonLength [controlSize]- buttonRect.height()));187 paintRect.setY(buttonRect.y() - (cRealButtonLength - buttonRect.height())); 129 188 } 130 189 … … 258 317 bool PlatformScrollbar::hasButtons() const 259 318 { 260 return isEnabled() && (m_orientation == HorizontalScrollbar ? width() : height()) >= 2 * (cRealButtonLength [controlSize()] - cButtonHitInset[controlSize()]);319 return isEnabled() && (m_orientation == HorizontalScrollbar ? width() : height()) >= 2 * (cRealButtonLength - cButtonHitInset); 261 320 } 262 321 263 322 bool PlatformScrollbar::hasThumb() const 264 323 { 265 return isEnabled() && (m_orientation == HorizontalScrollbar ? width() : height()) >= 2 * cButtonInset [controlSize()] + cThumbMinLength[controlSize()]+ 1;324 return isEnabled() && (m_orientation == HorizontalScrollbar ? width() : height()) >= 2 * cButtonInset + cThumbMinLength + 1; 266 325 } 267 326 268 327 IntRect PlatformScrollbar::backButtonRect() const 328 { 329 // Our actual rect will shrink to half the available space when 330 // we have < 34 pixels left. This allows the scrollbar 331 // to scale down and function even at tiny sizes. 332 if (m_orientation == HorizontalScrollbar) 333 return IntRect(x(), y(), cHorizontalButtonWidth, cHorizontalHeight); 334 return IntRect(x(), y(), cVerticalWidth, cVerticalButtonHeight); 335 } 336 337 IntRect PlatformScrollbar::forwardButtonRect() const 269 338 { 270 339 // Our desired rect is essentially 17x17. … … 274 343 // to scale down and function even at tiny sizes. 275 344 if (m_orientation == HorizontalScrollbar) 276 return IntRect(x(), y(), cButtonLength[controlSize()], cHorizontalHeight[controlSize()]); 277 return IntRect(x(), y(), cVerticalWidth[controlSize()], cButtonLength[controlSize()]); 278 } 279 280 IntRect PlatformScrollbar::forwardButtonRect() const 281 { 282 // Our desired rect is essentially 17x17. 283 284 // Our actual rect will shrink to half the available space when 285 // we have < 34 pixels left. This allows the scrollbar 286 // to scale down and function even at tiny sizes. 287 288 if (m_orientation == HorizontalScrollbar) 289 return IntRect(x() + width() - cButtonLength[controlSize()], y(), cButtonLength[controlSize()], cHorizontalHeight[controlSize()]); 290 return IntRect(x(), y() + height() - cButtonLength[controlSize()], cVerticalWidth[controlSize()], cButtonLength[controlSize()]); 345 return IntRect(x() + width() - cHorizontalButtonWidth, y(), cHorizontalButtonWidth, cHorizontalHeight); 346 return IntRect(x(), y() + height() - cVerticalButtonHeight, cVerticalWidth, cVerticalButtonHeight); 291 347 } 292 348 … … 295 351 if (m_orientation == HorizontalScrollbar) { 296 352 if (!hasButtons()) 297 return IntRect(x(), y(), width(), cHorizontalHeight [controlSize()]);298 return IntRect(x() + c ButtonLength[controlSize()], y(), width() - 2 * cButtonLength[controlSize()], cHorizontalHeight[controlSize()]);353 return IntRect(x(), y(), width(), cHorizontalHeight); 354 return IntRect(x() + cHorizontalButtonWidth, y(), width() - 2 * cHorizontalButtonWidth, cHorizontalHeight); 299 355 } 300 356 301 357 if (!hasButtons()) 302 return IntRect(x(), y(), cVerticalWidth [controlSize()], height());303 return IntRect(x(), y() + c ButtonLength[controlSize()], cVerticalWidth[controlSize()], height() - 2 * cButtonLength[controlSize()]);358 return IntRect(x(), y(), cVerticalWidth, height()); 359 return IntRect(x(), y() + cVerticalButtonHeight, cVerticalWidth, height() - 2 * cVerticalButtonHeight); 304 360 } 305 361 … … 309 365 splitTrack(trackRect(), beforeThumbRect, thumbRect, afterThumbRect); 310 366 return thumbRect; 367 } 368 369 IntRect PlatformScrollbar::gripperRect(const IntRect& thumbRect) const 370 { 371 return IntRect(); 311 372 } 312 373 … … 317 378 int thumbPos = thumbPosition(); 318 379 if (m_orientation == HorizontalScrollbar) { 319 thumbRect = IntRect(trackRect.x() + thumbPos, trackRect.y() + (trackRect.height() - cThumbHeight [controlSize()]) / 2, thumbLength(), cThumbHeight[controlSize()]);380 thumbRect = IntRect(trackRect.x() + thumbPos, trackRect.y() + (trackRect.height() - cThumbHeight) / 2, thumbLength(), cThumbHeight); 320 381 beforeThumbRect = IntRect(trackRect.x(), trackRect.y(), thumbPos, trackRect.height()); 321 382 afterThumbRect = IntRect(thumbRect.x() + thumbRect.width(), trackRect.y(), trackRect.right() - thumbRect.right(), trackRect.height()); 322 383 } else { 323 thumbRect = IntRect(trackRect.x() + (trackRect.width() - cThumbWidth [controlSize()]) / 2, trackRect.y() + thumbPos, cThumbWidth[controlSize()], thumbLength());384 thumbRect = IntRect(trackRect.x() + (trackRect.width() - cThumbWidth) / 2, trackRect.y() + thumbPos, cThumbWidth, thumbLength()); 324 385 beforeThumbRect = IntRect(trackRect.x(), trackRect.y(), trackRect.width(), thumbPos); 325 386 afterThumbRect = IntRect(trackRect.x(), thumbRect.y() + thumbRect.height(), trackRect.width(), trackRect.bottom() - thumbRect.bottom()); … … 342 403 int trackLen = trackLength(); 343 404 int length = proportion * trackLen; 344 int minLength = cThumbMinLength [controlSize()];405 int minLength = cThumbMinLength; 345 406 length = max(length, minLength); 346 407 if (length > trackLen) … … 356 417 void PlatformScrollbar::paintButton(GraphicsContext* context, const IntRect& rect, bool start, const IntRect& damageRect) const 357 418 { 358 if (!SafariThemeLibrary())359 return;360 361 419 IntRect paintRect = buttonRepaintRect(rect, m_orientation, controlSize(), start); 362 420 … … 364 422 return; 365 423 366 ThemePart part; 367 ThemeControlState state = 0; 368 if (m_client->isActive()) 369 state |= ActiveState; 370 if (m_orientation == HorizontalScrollbar) 371 part = start ? ScrollLeftArrowPart : ScrollRightArrowPart; 424 unsigned part = 0; 425 unsigned state = 0; 426 unsigned classicPart = 0; 427 unsigned classicState = 0; 428 429 if (m_orientation == HorizontalScrollbar) { 430 state = start ? ABS_LEFTNORMAL : ABS_RIGHTNORMAL; 431 classicPart = start ? DFCS_SCROLLLEFT : DFCS_SCROLLRIGHT; 432 } else { 433 state = start ? ABS_UPNORMAL : ABS_DOWNNORMAL; 434 classicPart = start ? DFCS_SCROLLUP : DFCS_SCROLLDOWN; 435 } 436 437 if (!isEnabled()) { 438 state += SP_ABS_DISABLE_MODIFIER; 439 classicState |= DFCS_INACTIVE; 440 } else if ((m_pressedPart == BackButtonPart && start) 441 || (m_pressedPart == ForwardButtonPart && !start)) { 442 state += SP_ABS_PRESSED_MODIFIER; 443 classicState |= DFCS_PUSHED | DFCS_FLAT; 444 } else if (m_client->isActive()) { 445 state += SP_ABS_HOT_MODIFIER; 446 classicState |= DFCS_HOT; 447 } 448 449 HDC hdc = prepareForDrawing(context, rect); 450 RECT widgetRect = rect; 451 checkAndInitScrollbarTheme(); 452 453 if (cScrollBarTheme) 454 DrawThemeBackground(cScrollBarTheme, hdc, SP_BUTTON, state, &widgetRect, NULL); 372 455 else 373 part = start ? ScrollUpArrowPart : ScrollDownArrowPart; 374 375 if (isEnabled()) 376 state |= EnabledState; 377 if ((m_pressedPart == BackButtonPart && start) 378 || (m_pressedPart == ForwardButtonPart && !start)) 379 state |= PressedState; 380 381 paintThemePart(part, context->platformContext(), paintRect, controlSize() == SmallScrollbar ? NSSmallControlSize : NSRegularControlSize, state); 456 DrawFrameControl(hdc, &widgetRect, classicPart, classicState); 457 458 doneDrawing(context, hdc, rect); 382 459 } 383 460 384 461 void PlatformScrollbar::paintTrack(GraphicsContext* context, const IntRect& rect, bool start, const IntRect& damageRect) const 385 462 { 386 if (!SafariThemeLibrary())387 return;388 389 463 IntRect paintRect = hasButtons() ? trackRepaintRect(rect, m_orientation, controlSize()) : rect; 390 464 … … 392 466 return; 393 467 394 ThemePart part = m_orientation == HorizontalScrollbar ? HScrollTrackPart : VScrollTrackPart; 395 ThemeControlState state = 0; 468 unsigned part = 0; 469 unsigned classicPart = DFC_SCROLL; 470 if (m_orientation == HorizontalScrollbar) 471 part = start ? SP_TRACKSTARTHOR : SP_TRACKENDHOR; 472 else 473 part = start ? SP_TRACKSTARTVERT : SP_TRACKENDVERT; 474 475 unsigned state = TS_DISABLED; 476 unsigned classicState = DFCS_MONO; 396 477 if (m_client->isActive()) 397 state |= ActiveState; 478 state |= TS_ACTIVE; 479 else 480 classicState |= DFCS_INACTIVE; 481 398 482 if (hasButtons()) 399 state |= EnabledState; 400 401 paintThemePart(part, context->platformContext(), paintRect, controlSize() == SmallScrollbar ? NSSmallControlSize : NSRegularControlSize, state); 483 state |= TS_NORMAL; 484 485 HDC hdc = prepareForDrawing(context, rect); 486 RECT widgetRect = rect; 487 checkAndInitScrollbarTheme(); 488 489 if (cScrollBarTheme) 490 DrawThemeBackground(cScrollBarTheme, hdc, part, state, &widgetRect, NULL); 491 else 492 DrawFrameControl(hdc, &widgetRect, DFC_SCROLL, classicState); 493 494 doneDrawing(context, hdc, rect); 402 495 } 403 496 404 497 void PlatformScrollbar::paintThumb(GraphicsContext* context, const IntRect& rect, const IntRect& damageRect) const 405 498 { 406 if (!SafariThemeLibrary())407 return;408 409 499 if (!damageRect.intersects(rect)) 410 500 return; 411 501 412 ThemePart part = m_orientation == HorizontalScrollbar ? HScrollThumbPart : VScrollThumbPart; 413 ThemeControlState state = 0; 502 unsigned part = (m_orientation == HorizontalScrollbar) ? SP_THUMBHOR : SP_THUMBVERT; 503 unsigned state = 0; 504 505 if (!isEnabled()) 506 state += SP_ABS_DISABLE_MODIFIER; 507 else if (m_client->isActive()) 508 state += SP_ABS_HOT_MODIFIER; 509 510 HDC hdc = prepareForDrawing(context, rect); 511 RECT widgetRect = rect; 512 checkAndInitScrollbarTheme(); 513 514 if (cScrollBarTheme) { 515 DrawThemeBackground(cScrollBarTheme, hdc, part, state, &widgetRect, NULL); 516 paintGripper(hdc, widgetRect); 517 } else { 518 HGDIOBJ hSaveBrush = SelectObject(hdc, GetSysColorBrush(COLOR_BTNFACE)); 519 DrawEdge(hdc, &widgetRect, EDGE_RAISED, BF_RECT); 520 SelectObject(hdc,hSaveBrush); 521 } 522 523 doneDrawing(context, hdc, rect); 524 } 525 526 void PlatformScrollbar::paintGripper(HDC hdc, const IntRect& rect) const 527 { 528 unsigned part = (m_orientation == HorizontalScrollbar) ? SP_GRIPPERHOR : SP_GRIPPERVERT; 529 unsigned state = 0; 530 414 531 if (m_client->isActive()) 415 state |= ActiveState; 416 if (isEnabled()) 417 state |= EnabledState; 418 419 paintThemePart(part, context->platformContext(), rect, controlSize() == SmallScrollbar ? NSSmallControlSize : NSRegularControlSize, state); 532 state |= TS_ACTIVE; 533 534 RECT widgetRect = rect; 535 checkAndInitScrollbarTheme(); 536 537 if (cScrollBarTheme) 538 DrawThemeBackground(cScrollBarTheme, hdc, part, state, &widgetRect, NULL); 420 539 } 421 540 … … 449 568 return ForwardTrackPart; 450 569 } 570 451 571 return NoPart; 452 572 } … … 477 597 m_pressedPos += thumbPosition() - thumbPos; 478 598 } 479 599 480 600 return true; 481 601 } … … 626 746 int PlatformScrollbar::horizontalScrollbarHeight(ScrollbarControlSize controlSize) 627 747 { 628 return cHorizontalWidth [controlSize];748 return cHorizontalWidth; 629 749 } 630 750 631 751 int PlatformScrollbar::verticalScrollbarWidth(ScrollbarControlSize controlSize) 632 752 { 633 return cVerticalHeight [controlSize];753 return cVerticalHeight; 634 754 } 635 755 … … 637 757 { 638 758 IntRect clipRect(0, 0, width(), height()); 759 639 760 clipRect = convertToContainingWindow(clipRect); 640 761 if (m_client) 641 762 clipRect.intersect(m_client->windowClipRect()); 763 642 764 return clipRect; 643 765 } 644 766 645 void PlatformScrollbar::paintGripper(HDC hdc, const IntRect& rect) const646 {647 }648 649 IntRect PlatformScrollbar::gripperRect(const IntRect& thumbRect) const650 {651 return IntRect();652 }653 654 767 void PlatformScrollbar::themeChanged() 655 768 { … … 658 771 } 659 772 660 #endif // defined(USE_SAFARI_THEME)
Note: See TracChangeset
for help on using the changeset viewer.