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

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

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Support display: contents for elements, first-line and first-letter pseudos. Created 3 years, 10 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 11 matching lines...) Expand all
22 */ 22 */
23 23
24 #ifndef HTMLOptGroupElement_h 24 #ifndef HTMLOptGroupElement_h
25 #define HTMLOptGroupElement_h 25 #define HTMLOptGroupElement_h
26 26
27 #include "core/CoreExport.h" 27 #include "core/CoreExport.h"
28 #include "core/html/HTMLElement.h" 28 #include "core/html/HTMLElement.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class ComputedStyle;
33 class HTMLSelectElement; 32 class HTMLSelectElement;
34 class HTMLDivElement; 33 class HTMLDivElement;
35 34
36 class CORE_EXPORT HTMLOptGroupElement final : public HTMLElement { 35 class CORE_EXPORT HTMLOptGroupElement final : public HTMLElement {
37 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
38 37
39 public: 38 public:
40 static HTMLOptGroupElement* create(Document&); 39 static HTMLOptGroupElement* create(Document&);
41 40
42 bool isDisabledFormControl() const override; 41 bool isDisabledFormControl() const override;
43 String defaultToolTip() const override; 42 String defaultToolTip() const override;
44 HTMLSelectElement* ownerSelectElement() const; 43 HTMLSelectElement* ownerSelectElement() const;
45 44
46 String groupLabelText() const; 45 String groupLabelText() const;
47 HTMLDivElement& optGroupLabelElement() const; 46 HTMLDivElement& optGroupLabelElement() const;
48 47
49 private: 48 private:
50 explicit HTMLOptGroupElement(Document&); 49 explicit HTMLOptGroupElement(Document&);
51 ~HTMLOptGroupElement(); 50 ~HTMLOptGroupElement();
52 51
53 bool supportsFocus() const override; 52 bool supportsFocus() const override;
54 void parseAttribute(const AttributeModificationParams&) override; 53 void parseAttribute(const AttributeModificationParams&) override;
55 void accessKeyAction(bool sendMouseEvents) override; 54 void accessKeyAction(bool sendMouseEvents) override;
56 void didAddUserAgentShadowRoot(ShadowRoot&) override; 55 void didAddUserAgentShadowRoot(ShadowRoot&) override;
57 void attachLayoutTree(const AttachContext& = AttachContext()) override;
58 void detachLayoutTree(const AttachContext& = AttachContext()) override;
59 bool matchesEnabledPseudoClass() const override; 56 bool matchesEnabledPseudoClass() const override;
60 InsertionNotificationRequest insertedInto(ContainerNode*) override; 57 InsertionNotificationRequest insertedInto(ContainerNode*) override;
61 void removedFrom(ContainerNode*) override; 58 void removedFrom(ContainerNode*) override;
62 59
63 // <optgroup> might not have a layoutObject so we manually manage a cached
64 // style.
65 void updateNonComputedStyle();
66 ComputedStyle* nonLayoutObjectComputedStyle() const override;
67 PassRefPtr<ComputedStyle> customStyleForLayoutObject() override;
68
69 void updateGroupLabel(); 60 void updateGroupLabel();
70
71 RefPtr<ComputedStyle> m_style;
72 }; 61 };
73 62
74 } // namespace blink 63 } // namespace blink
75 64
76 #endif // HTMLOptGroupElement_h 65 #endif // HTMLOptGroupElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698