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

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

Issue 2001453002: Set ComputedStyle on Node and use that in buildOwnLayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@storage
Patch Set: Created 4 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
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 if (isHTMLSelectElement(*insertionPoint)) { 112 if (isHTMLSelectElement(*insertionPoint)) {
113 if (!parentNode()) 113 if (!parentNode())
114 toHTMLSelectElement(insertionPoint)->optGroupInsertedOrRemoved(*this ); 114 toHTMLSelectElement(insertionPoint)->optGroupInsertedOrRemoved(*this );
115 } 115 }
116 HTMLElement::removedFrom(insertionPoint); 116 HTMLElement::removedFrom(insertionPoint);
117 } 117 }
118 118
119 void HTMLOptGroupElement::updateNonComputedStyle() 119 void HTMLOptGroupElement::updateNonComputedStyle()
120 { 120 {
121 m_style = originalStyleForLayoutObject(); 121 m_style = originalStyleForLayoutObject();
122 if (layoutObject()) { 122 if (hasLayoutObject()) {
123 if (HTMLSelectElement* select = ownerSelectElement()) 123 if (HTMLSelectElement* select = ownerSelectElement())
124 select->updateListOnLayoutObject(); 124 select->updateListOnLayoutObject();
125 } 125 }
126 } 126 }
127 127
128 ComputedStyle* HTMLOptGroupElement::nonLayoutObjectComputedStyle() const 128 ComputedStyle* HTMLOptGroupElement::nonLayoutObjectComputedStyle() const
129 { 129 {
130 return m_style.get(); 130 return m_style.get();
131 } 131 }
132 132
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 label.setTextContent(labelText); 193 label.setTextContent(labelText);
194 label.setAttribute(aria_labelAttr, AtomicString(labelText)); 194 label.setAttribute(aria_labelAttr, AtomicString(labelText));
195 } 195 }
196 196
197 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const 197 HTMLDivElement& HTMLOptGroupElement::optGroupLabelElement() const
198 { 198 {
199 return *toHTMLDivElement(userAgentShadowRoot()->getElementById(ShadowElement Names::optGroupLabel())); 199 return *toHTMLDivElement(userAgentShadowRoot()->getElementById(ShadowElement Names::optGroupLabel()));
200 } 200 }
201 201
202 } // namespace blink 202 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698