| 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 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 select->updateListBoxSelection(!select->multiple()); | 584 select->updateListBoxSelection(!select->multiple()); |
| 585 m_inAutoscroll = false; | 585 m_inAutoscroll = false; |
| 586 } | 586 } |
| 587 } | 587 } |
| 588 | 588 |
| 589 void RenderListBox::stopAutoscroll() | 589 void RenderListBox::stopAutoscroll() |
| 590 { | 590 { |
| 591 if (selectElement()->isDisabledFormControl()) | 591 if (selectElement()->isDisabledFormControl()) |
| 592 return; | 592 return; |
| 593 | 593 |
| 594 selectElement()->listBoxOnChange(); | 594 if (!selectElement()->isOnChangeFired() && !selectElement()->isLastOnChangeS
electionEmpty()) { |
| 595 selectElement()->listBoxOnChange(); |
| 596 selectElement()->setOnChangeFired(true); |
| 597 } |
| 595 } | 598 } |
| 596 | 599 |
| 597 bool RenderListBox::scrollToRevealElementAtListIndex(int index) | 600 bool RenderListBox::scrollToRevealElementAtListIndex(int index) |
| 598 { | 601 { |
| 599 if (index < 0 || index >= numItems() || listIndexIsVisible(index)) | 602 if (index < 0 || index >= numItems() || listIndexIsVisible(index)) |
| 600 return false; | 603 return false; |
| 601 | 604 |
| 602 int newOffset; | 605 int newOffset; |
| 603 if (index < m_indexOffset) | 606 if (index < m_indexOffset) |
| 604 newOffset = index; | 607 newOffset = index; |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 | 928 |
| 926 if (m_vBar) | 929 if (m_vBar) |
| 927 m_vBar->styleChanged(); | 930 m_vBar->styleChanged(); |
| 928 | 931 |
| 929 // Force an update since we know the scrollbars have changed things. | 932 // Force an update since we know the scrollbars have changed things. |
| 930 if (document().hasAnnotatedRegions()) | 933 if (document().hasAnnotatedRegions()) |
| 931 document().setAnnotatedRegionsDirty(true); | 934 document().setAnnotatedRegionsDirty(true); |
| 932 } | 935 } |
| 933 | 936 |
| 934 } // namespace WebCore | 937 } // namespace WebCore |
| OLD | NEW |