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

Unified Diff: third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Rebased Created 3 years, 11 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
Index: third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
index 666919516288a88e6f76a536bdc695e1b6d262d6..6ab1479222e72940eeb9ed24cb78fbfd64b4288b 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
@@ -75,19 +75,6 @@ void HTMLOptGroupElement::parseAttribute(
}
}
-void HTMLOptGroupElement::attachLayoutTree(const AttachContext& context) {
- if (context.resolvedStyle) {
- DCHECK(!m_style || m_style == context.resolvedStyle);
- m_style = context.resolvedStyle;
- }
- HTMLElement::attachLayoutTree(context);
-}
-
-void HTMLOptGroupElement::detachLayoutTree(const AttachContext& context) {
- m_style.clear();
- HTMLElement::detachLayoutTree(context);
-}
-
bool HTMLOptGroupElement::supportsFocus() const {
HTMLSelectElement* select = ownerSelectElement();
if (select && select->usesMenuList())
@@ -117,23 +104,13 @@ void HTMLOptGroupElement::removedFrom(ContainerNode* insertionPoint) {
HTMLElement::removedFrom(insertionPoint);
}
-void HTMLOptGroupElement::updateNonComputedStyle() {
- m_style = originalStyleForLayoutObject();
- if (layoutObject()) {
+void HTMLOptGroupElement::willRecalcStyle(StyleRecalcChange change) {
+ if (layoutObject() && (change >= IndependentInherit || needsStyleRecalc())) {
rune 2017/01/27 13:09:23 I don't think I understand this test completely. A
emilio 2017/01/27 22:13:15 These were the conditions that gated the customSty
rune 2017/02/06 22:40:44 I cannot make sense of this at all. layoutObject()
emilio 2017/02/08 10:59:24 So I experimented with this, and this condition is
if (HTMLSelectElement* select = ownerSelectElement())
select->updateListOnLayoutObject();
}
}
-ComputedStyle* HTMLOptGroupElement::nonLayoutObjectComputedStyle() const {
- return m_style.get();
-}
-
-PassRefPtr<ComputedStyle> HTMLOptGroupElement::customStyleForLayoutObject() {
- updateNonComputedStyle();
- return m_style;
-}
-
String HTMLOptGroupElement::groupLabelText() const {
String itemText = getAttribute(labelAttr);

Powered by Google App Engine
This is Rietveld 408576698