Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: Source/core/rendering/RenderListBox.cpp

Issue 120373005: OnChange event should fire if the multiple selection changes in listbox using mouse (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed unnecessary blank lines in layout test Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« Source/core/html/HTMLSelectElement.cpp ('K') | « Source/core/page/AutoscrollController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698