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

Side by Side Diff: webkit/port/rendering/RenderThemeWin.cpp

Issue 14110: Move the "platform" wrappers in skia/ext to the skia namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * This file is part of the WebKit project. 2 * This file is part of the WebKit project.
3 * 3 *
4 * Copyright (C) 2006 Apple Computer, Inc. 4 * Copyright (C) 2006 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 setCheckboxSize(style); 359 setCheckboxSize(style);
360 } 360 }
361 361
362 bool RenderThemeWin::paintButton(RenderObject* o, 362 bool RenderThemeWin::paintButton(RenderObject* o,
363 const RenderObject::PaintInfo& i, 363 const RenderObject::PaintInfo& i,
364 const IntRect& r) 364 const IntRect& r)
365 { 365 {
366 const ThemeData& themeData = getThemeData(o); 366 const ThemeData& themeData = getThemeData(o);
367 367
368 WebCore::ThemeHelperWin helper(i.context, r); 368 WebCore::ThemeHelperWin helper(i.context, r);
369 gfx::PlatformCanvas* canvas = helper.context()->platformContext()->canvas(); 369 skia::PlatformCanvas* canvas = helper.context()->platformContext()->canvas() ;
370 370
371 HDC hdc = canvas->beginPlatformPaint(); 371 HDC hdc = canvas->beginPlatformPaint();
372 int state = themeData.m_state; 372 int state = themeData.m_state;
373 RECT renderRect = helper.rect(); 373 RECT renderRect = helper.rect();
374 374
375 gfx::NativeTheme::instance()->PaintButton(hdc, 375 gfx::NativeTheme::instance()->PaintButton(hdc,
376 themeData.m_part, 376 themeData.m_part,
377 state, 377 state,
378 themeData.m_classicState, 378 themeData.m_classicState,
379 &renderRect); 379 &renderRect);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 436
437 // Compute the rectangle of the button in the destination image. 437 // Compute the rectangle of the button in the destination image.
438 IntRect rect(buttonX, 438 IntRect rect(buttonX,
439 r.y() + spacingTop, 439 r.y() + spacingTop,
440 std::min(buttonWidth, r.right() - r.x()), 440 std::min(buttonWidth, r.right() - r.x()),
441 r.height() - (spacingTop + spacingBottom)); 441 r.height() - (spacingTop + spacingBottom));
442 442
443 // Get the correct theme data for a textfield and paint the menu. 443 // Get the correct theme data for a textfield and paint the menu.
444 WebCore::ThemeHelperWin helper(i.context, rect); 444 WebCore::ThemeHelperWin helper(i.context, rect);
445 gfx::PlatformCanvas* canvas = helper.context()->platformContext()->canvas(); 445 skia::PlatformCanvas* canvas = helper.context()->platformContext()->canvas() ;
446 HDC hdc = canvas->beginPlatformPaint(); 446 HDC hdc = canvas->beginPlatformPaint();
447 RECT renderRect = helper.rect(); 447 RECT renderRect = helper.rect();
448 gfx::NativeTheme::instance()->PaintMenuList(hdc, 448 gfx::NativeTheme::instance()->PaintMenuList(hdc,
449 CP_DROPDOWNBUTTON, 449 CP_DROPDOWNBUTTON,
450 determineState(o), 450 determineState(o),
451 determineClassicState(o), 451 determineClassicState(o),
452 &renderRect); 452 &renderRect);
453 canvas->endPlatformPaint(); 453 canvas->endPlatformPaint();
454 return false; 454 return false;
455 } 455 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // TODO(ojan): Get rid of this if-check once we can properly clip rounded 576 // TODO(ojan): Get rid of this if-check once we can properly clip rounded
577 // borders: http://b/1112604 and http://b/1108635 577 // borders: http://b/1112604 and http://b/1108635
578 // TODO(ojan): make sure we do the right thing if css background-clip is 578 // TODO(ojan): make sure we do the right thing if css background-clip is
579 // set. 579 // set.
580 if (o->style()->hasBorderRadius()) 580 if (o->style()->hasBorderRadius())
581 return false; 581 return false;
582 582
583 const ThemeData& themeData = getThemeData(o); 583 const ThemeData& themeData = getThemeData(o);
584 584
585 WebCore::ThemeHelperWin helper(i.context, r); 585 WebCore::ThemeHelperWin helper(i.context, r);
586 gfx::PlatformCanvas* canvas = helper.context()->platformContext()->canvas(); 586 skia::PlatformCanvas* canvas = helper.context()->platformContext()->canvas() ;
587 587
588 HDC hdc = canvas->beginPlatformPaint(); 588 HDC hdc = canvas->beginPlatformPaint();
589 COLORREF clr = skia::SkColorToCOLORREF(o->style()->backgroundColor().rgb()); 589 COLORREF clr = skia::SkColorToCOLORREF(o->style()->backgroundColor().rgb());
590 RECT renderRect = helper.rect(); 590 RECT renderRect = helper.rect();
591 591
592 gfx::NativeTheme::instance()->PaintTextField(hdc, 592 gfx::NativeTheme::instance()->PaintTextField(hdc,
593 themeData.m_part, 593 themeData.m_part,
594 themeData.m_state, 594 themeData.m_state,
595 themeData.m_classicState, 595 themeData.m_classicState,
596 &renderRect, 596 &renderRect,
(...skipping 25 matching lines...) Expand all
622 // static 622 // static
623 void RenderThemeWin::setFindInPageMode(bool enable) { 623 void RenderThemeWin::setFindInPageMode(bool enable) {
624 if (m_findInPageMode == enable) 624 if (m_findInPageMode == enable)
625 return; 625 return;
626 626
627 m_findInPageMode = enable; 627 m_findInPageMode = enable;
628 theme()->platformColorsDidChange(); 628 theme()->platformColorsDidChange();
629 } 629 }
630 630
631 } // namespace WebCore 631 } // namespace WebCore
OLDNEW
« no previous file with comments | « webkit/port/platform/graphics/skia/PlatformContextSkia.cpp ('k') | webkit/tools/test_shell/mac/webwidget_host.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698