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

Unified Diff: Source/core/rendering/RenderListBox.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderListBox.h ('k') | Source/core/rendering/RenderMenuList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderListBox.cpp
diff --git a/Source/core/rendering/RenderListBox.cpp b/Source/core/rendering/RenderListBox.cpp
index 15eed0c8c1e4d2353c3367eff1dc4268c8086ca4..98a0d202ef5600a22513c36d2be205f285ef9b76 100644
--- a/Source/core/rendering/RenderListBox.cpp
+++ b/Source/core/rendering/RenderListBox.cpp
@@ -105,7 +105,7 @@ RenderListBox::~RenderListBox()
frameView->removeScrollableArea(this);
}
-inline HTMLSelectElement* RenderListBox::selectElement() const
+inline Result<HTMLSelectElement> RenderListBox::selectElement() const
{
return toHTMLSelectElement(node());
}
@@ -194,7 +194,7 @@ void RenderListBox::layout()
void RenderListBox::scrollToRevealSelection()
{
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
m_scrollToRevealSelectionAfterLayout = false;
@@ -332,7 +332,7 @@ void RenderListBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint&
if (!isSpatialNavigationEnabled(frame()))
return RenderBlock::addFocusRingRects(rects, additionalOffset, paintContainer);
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
// Focus the last selected item.
int selectedItem = select->activeSelectionEndListIndex();
@@ -389,7 +389,7 @@ void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const LayoutPoint&
{
FontCachePurgePreventer fontCachePurgePreventer;
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
const Vector<HTMLElement*>& listItems = select->listItems();
HTMLElement* element = listItems[listIndex];
@@ -534,7 +534,7 @@ void RenderListBox::panScroll(const IntPoint& panStartMousePosition)
return;
m_inAutoscroll = true;
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
select->updateListBoxSelection(!select->multiple());
m_inAutoscroll = false;
}
@@ -563,7 +563,7 @@ void RenderListBox::autoscroll(const IntPoint&)
int endIndex = scrollToward(pos);
if (endIndex >= 0) {
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
m_inAutoscroll = true;
if (!select->multiple())
@@ -613,7 +613,7 @@ bool RenderListBox::logicalScroll(ScrollLogicalDirection direction, ScrollGranul
void RenderListBox::valueChanged(unsigned listIndex)
{
- HTMLSelectElement* element = selectElement();
+ Handle<HTMLSelectElement> element = selectElement();
element->setSelectedIndex(element->listToOptionIndex(listIndex));
element->dispatchFormControlChangeEvent();
}
« no previous file with comments | « Source/core/rendering/RenderListBox.h ('k') | Source/core/rendering/RenderMenuList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698