| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011, Google Inc. All rights reserved. | 2 * Copyright (c) 2011, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // Paint background | 399 // Paint background |
| 400 Color backColor, textColor, labelColor; | 400 Color backColor, textColor, labelColor; |
| 401 if (rowIndex == m_selectedIndex) { | 401 if (rowIndex == m_selectedIndex) { |
| 402 backColor = RenderTheme::theme().activeListBoxSelectionBackgroundColor()
; | 402 backColor = RenderTheme::theme().activeListBoxSelectionBackgroundColor()
; |
| 403 textColor = RenderTheme::theme().activeListBoxSelectionForegroundColor()
; | 403 textColor = RenderTheme::theme().activeListBoxSelectionForegroundColor()
; |
| 404 labelColor = textColor; | 404 labelColor = textColor; |
| 405 } else { | 405 } else { |
| 406 backColor = style.backgroundColor(); | 406 backColor = style.backgroundColor(); |
| 407 textColor = style.foregroundColor(); | 407 textColor = style.foregroundColor(); |
| 408 | 408 |
| 409 #if OS(LINUX) | 409 #if OS(LINUX) || OS(ANDROID) |
| 410 // On other platforms, the <option> background color is the same as the | 410 // On other platforms, the <option> background color is the same as the |
| 411 // <select> background color. On Linux, that makes the <option> | 411 // <select> background color. On Linux, that makes the <option> |
| 412 // background color very dark, so by default, try to use a lighter | 412 // background color very dark, so by default, try to use a lighter |
| 413 // background color for <option>s. | 413 // background color for <option>s. |
| 414 if (style.backgroundColorType() == PopupMenuStyle::DefaultBackgroundColo
r && RenderTheme::theme().systemColor(CSSValueButtonface) == backColor) | 414 if (style.backgroundColorType() == PopupMenuStyle::DefaultBackgroundColo
r && RenderTheme::theme().systemColor(CSSValueButtonface) == backColor) |
| 415 backColor = RenderTheme::theme().systemColor(CSSValueMenu); | 415 backColor = RenderTheme::theme().systemColor(CSSValueMenu); |
| 416 #endif | 416 #endif |
| 417 | 417 |
| 418 // FIXME: for now the label color is hard-coded. It should be added to | 418 // FIXME: for now the label color is hard-coded. It should be added to |
| 419 // the PopupMenuStyle. | 419 // the PopupMenuStyle. |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 { | 929 { |
| 930 return numItems() && IntRect(0, 0, width(), height()).contains(point); | 930 return numItems() && IntRect(0, 0, width(), height()).contains(point); |
| 931 } | 931 } |
| 932 | 932 |
| 933 int PopupListBox::popupContentHeight() const | 933 int PopupListBox::popupContentHeight() const |
| 934 { | 934 { |
| 935 return height(); | 935 return height(); |
| 936 } | 936 } |
| 937 | 937 |
| 938 } // namespace WebCore | 938 } // namespace WebCore |
| OLD | NEW |