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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 18970003: Introduce isHTMLOptGroupElement and toHTMLOptGroupElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/html/HTMLOptGroupElement.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) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "core/css/resolver/ViewportStyleResolver.h" 74 #include "core/css/resolver/ViewportStyleResolver.h"
75 #include "core/dom/DocumentStyleSheetCollection.h" 75 #include "core/dom/DocumentStyleSheetCollection.h"
76 #include "core/dom/FullscreenController.h" 76 #include "core/dom/FullscreenController.h"
77 #include "core/dom/NodeRenderStyle.h" 77 #include "core/dom/NodeRenderStyle.h"
78 #include "core/dom/NodeRenderingContext.h" 78 #include "core/dom/NodeRenderingContext.h"
79 #include "core/dom/Text.h" 79 #include "core/dom/Text.h"
80 #include "core/dom/WebCoreMemoryInstrumentation.h" 80 #include "core/dom/WebCoreMemoryInstrumentation.h"
81 #include "core/dom/shadow/ShadowRoot.h" 81 #include "core/dom/shadow/ShadowRoot.h"
82 #include "core/html/HTMLIFrameElement.h" 82 #include "core/html/HTMLIFrameElement.h"
83 #include "core/html/HTMLInputElement.h" 83 #include "core/html/HTMLInputElement.h"
84 #include "core/html/HTMLOptGroupElement.h"
84 #include "core/html/track/WebVTTElement.h" 85 #include "core/html/track/WebVTTElement.h"
85 #include "core/inspector/InspectorInstrumentation.h" 86 #include "core/inspector/InspectorInstrumentation.h"
86 #include "core/loader/cache/CachedDocument.h" 87 #include "core/loader/cache/CachedDocument.h"
87 #include "core/loader/cache/CachedSVGDocumentReference.h" 88 #include "core/loader/cache/CachedSVGDocumentReference.h"
88 #include "core/page/Frame.h" 89 #include "core/page/Frame.h"
89 #include "core/page/FrameView.h" 90 #include "core/page/FrameView.h"
90 #include "core/page/Page.h" 91 #include "core/page/Page.h"
91 #include "core/page/Settings.h" 92 #include "core/page/Settings.h"
92 #include "core/platform/LinkHash.h" 93 #include "core/platform/LinkHash.h"
93 #include "core/platform/graphics/filters/custom/CustomFilterConstants.h" 94 #include "core/platform/graphics/filters/custom/CustomFilterConstants.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 return false; 741 return false;
741 742
742 if (element->hasID() && m_features.idsInRules.contains(element->idForStyleRe solution().impl())) 743 if (element->hasID() && m_features.idsInRules.contains(element->idForStyleRe solution().impl()))
743 return false; 744 return false;
744 if (element->hasScopedHTMLStyleChild()) 745 if (element->hasScopedHTMLStyleChild())
745 return false; 746 return false;
746 747
747 // FIXME: We should share style for option and optgroup whenever possible. 748 // FIXME: We should share style for option and optgroup whenever possible.
748 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems 749 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi stItems
749 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405 750 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg i?id=88405
750 if (element->hasTagName(optionTag) || element->hasTagName(optgroupTag)) 751 if (element->hasTagName(optionTag) || isHTMLOptGroupElement(element))
751 return false; 752 return false;
752 753
753 bool isControl = element->isFormControlElement(); 754 bool isControl = element->isFormControlElement();
754 755
755 if (isControl != state.element()->isFormControlElement()) 756 if (isControl != state.element()->isFormControlElement())
756 return false; 757 return false;
757 758
758 if (isControl && !canShareStyleWithControl(element)) 759 if (isControl && !canShareStyleWithControl(element))
759 return false; 760 return false;
760 761
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 info.addMember(m_state, "state"); 3429 info.addMember(m_state, "state");
3429 3430
3430 // FIXME: move this to a place where it would be called only once? 3431 // FIXME: move this to a place where it would be called only once?
3431 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle"); 3432 info.addMember(CSSDefaultStyleSheets::defaultStyle, "defaultStyle");
3432 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e"); 3433 info.addMember(CSSDefaultStyleSheets::defaultQuirksStyle, "defaultQuirksStyl e");
3433 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle" ); 3434 info.addMember(CSSDefaultStyleSheets::defaultPrintStyle, "defaultPrintStyle" );
3434 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle"); 3435 info.addMember(CSSDefaultStyleSheets::defaultViewSourceStyle, "defaultViewSo urceStyle");
3435 } 3436 }
3436 3437
3437 } // namespace WebCore 3438 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/html/HTMLOptGroupElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698