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

Side by Side Diff: Source/core/html/HTMLOptGroupElement.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLOptionElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 String itemText = document()->displayStringModifiedByEncoding(getAttribute(l abelAttr)); 136 String itemText = document()->displayStringModifiedByEncoding(getAttribute(l abelAttr));
137 137
138 // In WinIE, leading and trailing whitespace is ignored in options and optgr oups. We match this behavior. 138 // In WinIE, leading and trailing whitespace is ignored in options and optgr oups. We match this behavior.
139 itemText = itemText.stripWhiteSpace(); 139 itemText = itemText.stripWhiteSpace();
140 // We want to collapse our whitespace too. This will match other browsers. 140 // We want to collapse our whitespace too. This will match other browsers.
141 itemText = itemText.simplifyWhiteSpace(); 141 itemText = itemText.simplifyWhiteSpace();
142 142
143 return itemText; 143 return itemText;
144 } 144 }
145 145
146 HTMLSelectElement* HTMLOptGroupElement::ownerSelectElement() const 146 Result<HTMLSelectElement> HTMLOptGroupElement::ownerSelectElement() const
147 { 147 {
148 ContainerNode* select = parentNode(); 148 ContainerNode* select = parentNode();
149 while (select && !select->hasTagName(selectTag)) 149 while (select && !select->hasTagName(selectTag))
150 select = select->parentNode(); 150 select = select->parentNode();
151 151
152 if (!select) 152 if (!select)
153 return 0; 153 return nullptr;
154 154
155 return toHTMLSelectElement(select); 155 return toHTMLSelectElement(select);
156 } 156 }
157 157
158 void HTMLOptGroupElement::accessKeyAction(bool) 158 void HTMLOptGroupElement::accessKeyAction(bool)
159 { 159 {
160 HTMLSelectElement* select = ownerSelectElement(); 160 Handle<HTMLSelectElement> select = ownerSelectElement();
161 // send to the parent to bring focus to the list box 161 // send to the parent to bring focus to the list box
162 if (select && !select->focused()) 162 if (select && !select->focused())
163 select->accessKeyAction(false); 163 select->accessKeyAction(false);
164 } 164 }
165 165
166 } // namespace 166 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLOptionElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698