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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp

Issue 2534873004: Avoid unchecked casts in UA shadow DOM. (Closed)
Patch Set: Created 4 years 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) 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 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 void HTMLOptGroupElement::updateGroupLabel() { 176 void HTMLOptGroupElement::updateGroupLabel() {
177 const String& labelText = groupLabelText(); 177 const String& labelText = groupLabelText();
178 HTMLDivElement& label = optGroupLabelElement(); 178 HTMLDivElement& label = optGroupLabelElement();
179 label.setTextContent(labelText); 179 label.setTextContent(labelText);
180 label.setAttribute(aria_labelAttr, AtomicString(labelText)); 180 label.setAttribute(aria_labelAttr, AtomicString(labelText));
181 } 181 }
182 182
183 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const { 183 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const {
184 return *toHTMLDivElement(userAgentShadowRoot()->getElementById( 184 return *toHTMLDivElementOrDie(userAgentShadowRoot()->getElementById(
185 ShadowElementNames::optGroupLabel())); 185 ShadowElementNames::optGroupLabel()));
186 } 186 }
187 187
188 } // namespace blink 188 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp ('k') | third_party/WebKit/Source/core/html/TextControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698