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

Side by Side Diff: Source/core/accessibility/AXNodeObject.cpp

Issue 275573003: Oilpan: Prepare to move select and option elements to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 staticText = textUnderElement(); 1006 staticText = textUnderElement();
1007 return staticText; 1007 return staticText;
1008 } 1008 }
1009 1009
1010 if (node->isTextNode()) 1010 if (node->isTextNode())
1011 return textUnderElement(); 1011 return textUnderElement();
1012 1012
1013 if (isHTMLSelectElement(*node)) { 1013 if (isHTMLSelectElement(*node)) {
1014 HTMLSelectElement& selectElement = toHTMLSelectElement(*node); 1014 HTMLSelectElement& selectElement = toHTMLSelectElement(*node);
1015 int selectedIndex = selectElement.selectedIndex(); 1015 int selectedIndex = selectElement.selectedIndex();
1016 const Vector<HTMLElement*> listItems = selectElement.listItems(); 1016 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& listItems = se lectElement.listItems();
1017 if (selectedIndex >= 0 && static_cast<size_t>(selectedIndex) < listItems .size()) { 1017 if (selectedIndex >= 0 && static_cast<size_t>(selectedIndex) < listItems .size()) {
1018 const AtomicString& overriddenDescription = listItems[selectedIndex] ->fastGetAttribute(aria_labelAttr); 1018 const AtomicString& overriddenDescription = listItems[selectedIndex] ->fastGetAttribute(aria_labelAttr);
1019 if (!overriddenDescription.isNull()) 1019 if (!overriddenDescription.isNull())
1020 return overriddenDescription; 1020 return overriddenDescription;
1021 } 1021 }
1022 if (!selectElement.multiple()) 1022 if (!selectElement.multiple())
1023 return selectElement.value(); 1023 return selectElement.value();
1024 return String(); 1024 return String();
1025 } 1025 }
1026 1026
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 float range = maxValueForRange() - minValueForRange(); 1681 float range = maxValueForRange() - minValueForRange();
1682 float value = valueForRange(); 1682 float value = valueForRange();
1683 1683
1684 value += range * (percentChange / 100); 1684 value += range * (percentChange / 100);
1685 setValue(String::number(value)); 1685 setValue(String::number(value));
1686 1686
1687 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e); 1687 axObjectCache()->postNotification(node(), AXObjectCache::AXValueChanged, tru e);
1688 } 1688 }
1689 1689
1690 } // namespace WebCore 1690 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698