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

Unified Diff: Source/core/rendering/RenderMenuList.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/RenderMenuList.h ('k') | Source/core/rendering/RenderSearchField.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMenuList.cpp
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp
index 03b69e73f899e4f3a9628bd35470d968f7ab65e8..b7830ddb73a471f707b1493205d5f90fbc21e1d0 100644
--- a/Source/core/rendering/RenderMenuList.cpp
+++ b/Source/core/rendering/RenderMenuList.cpp
@@ -131,7 +131,7 @@ void RenderMenuList::adjustInnerStyle()
}
}
-inline HTMLSelectElement* RenderMenuList::selectElement() const
+inline Result<HTMLSelectElement> RenderMenuList::selectElement() const
{
return toHTMLSelectElement(node());
}
@@ -219,7 +219,7 @@ void RenderMenuList::updateFromElement()
void RenderMenuList::setTextFromOption(int optionIndex)
{
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
const Vector<HTMLElement*>& listItems = select->listItems();
int size = listItems.size();
@@ -339,7 +339,7 @@ void RenderMenuList::showPopup()
FloatPoint absTopLeft = localToAbsolute(FloatPoint(), UseTransforms);
IntRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();
absBounds.setLocation(roundedIntPoint(absTopLeft));
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
m_popup->show(absBounds, document()->view(), select->optionToListIndex(select->selectedIndex()));
}
@@ -357,7 +357,7 @@ void RenderMenuList::valueChanged(unsigned listIndex, bool fireOnChange)
if (!doc || doc != doc->frame()->document())
return;
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
select->optionSelectedByUser(select->listToOptionIndex(listIndex), fireOnChange);
}
@@ -385,7 +385,7 @@ void RenderMenuList::didUpdateActiveOption(int optionIndex)
return;
m_lastActiveIndex = optionIndex;
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
int listIndex = select->optionToListIndex(optionIndex);
if (listIndex < 0 || listIndex >= static_cast<int>(select->listItems().size()))
return;
@@ -398,7 +398,7 @@ void RenderMenuList::didUpdateActiveOption(int optionIndex)
String RenderMenuList::itemText(unsigned listIndex) const
{
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
const Vector<HTMLElement*>& listItems = select->listItems();
if (listIndex >= listItems.size())
return String();
@@ -578,7 +578,7 @@ int RenderMenuList::listSize() const
int RenderMenuList::selectedIndex() const
{
- HTMLSelectElement* select = selectElement();
+ Handle<HTMLSelectElement> select = selectElement();
return select->optionToListIndex(select->selectedIndex());
}
« no previous file with comments | « Source/core/rendering/RenderMenuList.h ('k') | Source/core/rendering/RenderSearchField.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698