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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 bool LayoutTheme::IsFocused(const LayoutObject& o) { | 515 bool LayoutTheme::IsFocused(const LayoutObject& o) { |
516 Node* node = o.GetNode(); | 516 Node* node = o.GetNode(); |
517 if (!node) | 517 if (!node) |
518 return false; | 518 return false; |
519 | 519 |
520 node = node->FocusDelegate(); | 520 node = node->FocusDelegate(); |
521 Document& document = node->GetDocument(); | 521 Document& document = node->GetDocument(); |
522 LocalFrame* frame = document.GetFrame(); | 522 LocalFrame* frame = document.GetFrame(); |
523 return node == document.FocusedElement() && node->IsFocused() && | 523 return node == document.FocusedElement() && node->IsFocused() && |
524 node->ShouldHaveFocusAppearance() && frame && | 524 node->ShouldHaveFocusAppearance() && frame && |
525 frame->Selection().IsFocusedAndActive(); | 525 frame->Selection().FrameIsFocusedAndActive(); |
526 } | 526 } |
527 | 527 |
528 bool LayoutTheme::IsPressed(const LayoutObject& o) { | 528 bool LayoutTheme::IsPressed(const LayoutObject& o) { |
529 if (!o.GetNode()) | 529 if (!o.GetNode()) |
530 return false; | 530 return false; |
531 return o.GetNode()->IsActive(); | 531 return o.GetNode()->IsActive(); |
532 } | 532 } |
533 | 533 |
534 bool LayoutTheme::IsSpinUpButtonPartPressed(const LayoutObject& o) { | 534 bool LayoutTheme::IsSpinUpButtonPartPressed(const LayoutObject& o) { |
535 Node* node = o.GetNode(); | 535 Node* node = o.GetNode(); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 // padding - not honored by WinIE, needs to be removed. | 913 // padding - not honored by WinIE, needs to be removed. |
914 style.ResetPadding(); | 914 style.ResetPadding(); |
915 | 915 |
916 // border - honored by WinIE, but looks terrible (just paints in the control | 916 // border - honored by WinIE, but looks terrible (just paints in the control |
917 // box and turns off the Windows XP theme) | 917 // box and turns off the Windows XP theme) |
918 // for now, we will not honor it. | 918 // for now, we will not honor it. |
919 style.ResetBorder(); | 919 style.ResetBorder(); |
920 } | 920 } |
921 | 921 |
922 } // namespace blink | 922 } // namespace blink |
OLD | NEW |