| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r)); | 427 r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r)); |
| 428 | 428 |
| 429 if (element->hasTagName(optgroupTag)) { | 429 if (element->hasTagName(optgroupTag)) { |
| 430 FontDescription d = itemFont.fontDescription(); | 430 FontDescription d = itemFont.fontDescription(); |
| 431 d.setWeight(d.bolderWeight()); | 431 d.setWeight(d.bolderWeight()); |
| 432 itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing()); | 432 itemFont = Font(d, itemFont.letterSpacing(), itemFont.wordSpacing()); |
| 433 itemFont.update(document()->styleResolver()->fontSelector()); | 433 itemFont.update(document()->styleResolver()->fontSelector()); |
| 434 } | 434 } |
| 435 | 435 |
| 436 // Draw the item text | 436 // Draw the item text |
| 437 paintInfo.context->drawBidiText(itemFont, textRun, roundedIntPoint(r.locatio
n())); | 437 paintInfo.context->drawBidiText(itemFont, textRun, roundedIntPoint(r.locatio
n()), r); |
| 438 } | 438 } |
| 439 | 439 |
| 440 void RenderListBox::paintItemBackground(PaintInfo& paintInfo, const LayoutPoint&
paintOffset, int listIndex) | 440 void RenderListBox::paintItemBackground(PaintInfo& paintInfo, const LayoutPoint&
paintOffset, int listIndex) |
| 441 { | 441 { |
| 442 const Vector<HTMLElement*>& listItems = selectElement()->listItems(); | 442 const Vector<HTMLElement*>& listItems = selectElement()->listItems(); |
| 443 HTMLElement* element = listItems[listIndex]; | 443 HTMLElement* element = listItems[listIndex]; |
| 444 | 444 |
| 445 Color backColor; | 445 Color backColor; |
| 446 if (element->hasTagName(optionTag) && toHTMLOptionElement(element)->selected
()) { | 446 if (element->hasTagName(optionTag) && toHTMLOptionElement(element)->selected
()) { |
| 447 if (frame()->selection()->isFocusedAndActive() && document()->focusedNod
e() == node()) | 447 if (frame()->selection()->isFocusedAndActive() && document()->focusedNod
e() == node()) |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 879 |
| 880 if (m_vBar) | 880 if (m_vBar) |
| 881 m_vBar->styleChanged(); | 881 m_vBar->styleChanged(); |
| 882 | 882 |
| 883 // Force an update since we know the scrollbars have changed things. | 883 // Force an update since we know the scrollbars have changed things. |
| 884 if (document()->hasAnnotatedRegions()) | 884 if (document()->hasAnnotatedRegions()) |
| 885 document()->setAnnotatedRegionsDirty(true); | 885 document()->setAnnotatedRegionsDirty(true); |
| 886 } | 886 } |
| 887 | 887 |
| 888 } // namespace WebCore | 888 } // namespace WebCore |
| OLD | NEW |