| OLD | NEW |
| 1 /** | 1 /** |
| 2 * This file is part of the theme implementation for form controls in WebCore. | 2 * This file is part of the theme implementation for form controls in WebCore. |
| 3 * | 3 * |
| 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 } | 325 } |
| 326 | 326 |
| 327 Color LayoutTheme::ActiveListBoxSelectionForegroundColor() const { | 327 Color LayoutTheme::ActiveListBoxSelectionForegroundColor() const { |
| 328 return PlatformActiveListBoxSelectionForegroundColor(); | 328 return PlatformActiveListBoxSelectionForegroundColor(); |
| 329 } | 329 } |
| 330 | 330 |
| 331 Color LayoutTheme::InactiveListBoxSelectionForegroundColor() const { | 331 Color LayoutTheme::InactiveListBoxSelectionForegroundColor() const { |
| 332 return PlatformInactiveListBoxSelectionForegroundColor(); | 332 return PlatformInactiveListBoxSelectionForegroundColor(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 Color LayoutTheme::SpellingMarkerUnderlineColor() const { |
| 336 return PlatformSpellingMarkerUnderlineColor(); |
| 337 } |
| 338 |
| 339 Color LayoutTheme::GrammarMarkerUnderlineColor() const { |
| 340 return PlatformGrammarMarkerUnderlineColor(); |
| 341 } |
| 342 |
| 335 Color LayoutTheme::PlatformActiveSelectionBackgroundColor() const { | 343 Color LayoutTheme::PlatformActiveSelectionBackgroundColor() const { |
| 336 // Use a blue color by default if the platform theme doesn't define anything. | 344 // Use a blue color by default if the platform theme doesn't define anything. |
| 337 return Color(0, 0, 255); | 345 return Color(0, 0, 255); |
| 338 } | 346 } |
| 339 | 347 |
| 340 Color LayoutTheme::PlatformActiveSelectionForegroundColor() const { | 348 Color LayoutTheme::PlatformActiveSelectionForegroundColor() const { |
| 341 // Use a white color by default if the platform theme doesn't define anything. | 349 // Use a white color by default if the platform theme doesn't define anything. |
| 342 return Color::kWhite; | 350 return Color::kWhite; |
| 343 } | 351 } |
| 344 | 352 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 362 } | 370 } |
| 363 | 371 |
| 364 Color LayoutTheme::PlatformInactiveListBoxSelectionBackgroundColor() const { | 372 Color LayoutTheme::PlatformInactiveListBoxSelectionBackgroundColor() const { |
| 365 return PlatformInactiveSelectionBackgroundColor(); | 373 return PlatformInactiveSelectionBackgroundColor(); |
| 366 } | 374 } |
| 367 | 375 |
| 368 Color LayoutTheme::PlatformInactiveListBoxSelectionForegroundColor() const { | 376 Color LayoutTheme::PlatformInactiveListBoxSelectionForegroundColor() const { |
| 369 return PlatformInactiveSelectionForegroundColor(); | 377 return PlatformInactiveSelectionForegroundColor(); |
| 370 } | 378 } |
| 371 | 379 |
| 380 Color LayoutTheme::PlatformSpellingMarkerUnderlineColor() const { |
| 381 return Color(255, 0, 0); |
| 382 } |
| 383 |
| 384 Color LayoutTheme::PlatformGrammarMarkerUnderlineColor() const { |
| 385 return Color(192, 192, 192); |
| 386 } |
| 387 |
| 372 int LayoutTheme::BaselinePosition(const LayoutObject* o) const { | 388 int LayoutTheme::BaselinePosition(const LayoutObject* o) const { |
| 373 if (!o->IsBox()) | 389 if (!o->IsBox()) |
| 374 return 0; | 390 return 0; |
| 375 | 391 |
| 376 const LayoutBox* box = ToLayoutBox(o); | 392 const LayoutBox* box = ToLayoutBox(o); |
| 377 | 393 |
| 378 if (platform_theme_) | 394 if (platform_theme_) |
| 379 return box->Size().Height() + box->MarginTop() + | 395 return box->Size().Height() + box->MarginTop() + |
| 380 platform_theme_->BaselinePositionAdjustment( | 396 platform_theme_->BaselinePositionAdjustment( |
| 381 o->Style()->Appearance()) * | 397 o->Style()->Appearance()) * |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 // padding - not honored by WinIE, needs to be removed. | 926 // padding - not honored by WinIE, needs to be removed. |
| 911 style.ResetPadding(); | 927 style.ResetPadding(); |
| 912 | 928 |
| 913 // border - honored by WinIE, but looks terrible (just paints in the control | 929 // border - honored by WinIE, but looks terrible (just paints in the control |
| 914 // box and turns off the Windows XP theme) | 930 // box and turns off the Windows XP theme) |
| 915 // for now, we will not honor it. | 931 // for now, we will not honor it. |
| 916 style.ResetBorder(); | 932 style.ResetBorder(); |
| 917 } | 933 } |
| 918 | 934 |
| 919 } // namespace blink | 935 } // namespace blink |
| OLD | NEW |