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

Side by Side Diff: Source/core/layout/LayoutMenuList.h

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutMediaControls.cpp ('k') | Source/core/layout/LayoutMenuList.cpp » ('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 * This file is part of the select element renderer in WebCore. 2 * This file is part of the select element renderer in WebCore.
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 String text() const; 53 String text() const;
54 54
55 virtual PopupMenuStyle itemStyle(unsigned listIndex) const override; 55 virtual PopupMenuStyle itemStyle(unsigned listIndex) const override;
56 56
57 virtual const char* name() const override { return "LayoutMenuList"; } 57 virtual const char* name() const override { return "LayoutMenuList"; }
58 58
59 private: 59 private:
60 HTMLSelectElement* selectElement() const; 60 HTMLSelectElement* selectElement() const;
61 61
62 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectMenuList || LayoutFlexibleBox::isOfType(type); } 62 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectMenuList || LayoutFlexibleBox::isOfType(type); }
63 virtual bool isChildAllowed(LayoutObject*, const LayoutStyle&) const overrid e; 63 virtual bool isChildAllowed(LayoutObject*, const ComputedStyle&) const overr ide;
64 64
65 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0) override; 65 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0) override;
66 virtual void removeChild(LayoutObject*) override; 66 virtual void removeChild(LayoutObject*) override;
67 virtual bool createsAnonymousWrapper() const override { return true; } 67 virtual bool createsAnonymousWrapper() const override { return true; }
68 68
69 virtual void updateFromElement() override; 69 virtual void updateFromElement() override;
70 70
71 virtual LayoutRect controlClipRect(const LayoutPoint&) const override; 71 virtual LayoutRect controlClipRect(const LayoutPoint&) const override;
72 virtual bool hasControlClip() const override { return true; } 72 virtual bool hasControlClip() const override { return true; }
73 virtual bool canHaveGeneratedChildren() const override { return false; } 73 virtual bool canHaveGeneratedChildren() const override { return false; }
74 74
75 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override; 75 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const override;
76 76
77 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 77 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
78 78
79 // PopupMenuClient methods 79 // PopupMenuClient methods
80 virtual void valueChanged(unsigned listIndex, bool fireOnChange = true) over ride; 80 virtual void valueChanged(unsigned listIndex, bool fireOnChange = true) over ride;
81 virtual void selectionChanged(unsigned, bool) override { } 81 virtual void selectionChanged(unsigned, bool) override { }
82 virtual void selectionCleared() override { } 82 virtual void selectionCleared() override { }
83 virtual String itemText(unsigned listIndex) const override; 83 virtual String itemText(unsigned listIndex) const override;
84 virtual String itemToolTip(unsigned listIndex) const override; 84 virtual String itemToolTip(unsigned listIndex) const override;
85 virtual String itemAccessibilityText(unsigned listIndex) const override; 85 virtual String itemAccessibilityText(unsigned listIndex) const override;
86 virtual bool itemIsEnabled(unsigned listIndex) const override; 86 virtual bool itemIsEnabled(unsigned listIndex) const override;
87 virtual PopupMenuStyle menuStyle() const override; 87 virtual PopupMenuStyle menuStyle() const override;
88 virtual LayoutUnit clientPaddingLeft() const override; 88 virtual LayoutUnit clientPaddingLeft() const override;
89 virtual LayoutUnit clientPaddingRight() const override; 89 virtual LayoutUnit clientPaddingRight() const override;
90 virtual int listSize() const override; 90 virtual int listSize() const override;
91 virtual int selectedIndex() const override; 91 virtual int selectedIndex() const override;
92 virtual void popupDidHide() override; 92 virtual void popupDidHide() override;
93 virtual bool itemIsSeparator(unsigned listIndex) const override; 93 virtual bool itemIsSeparator(unsigned listIndex) const override;
94 virtual bool itemIsLabel(unsigned listIndex) const override; 94 virtual bool itemIsLabel(unsigned listIndex) const override;
95 virtual bool itemIsSelected(unsigned listIndex) const override; 95 virtual bool itemIsSelected(unsigned listIndex) const override;
96 virtual void setTextFromItem(unsigned listIndex) override; 96 virtual void setTextFromItem(unsigned listIndex) override;
97 virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true) override; 97 virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true) override;
98 virtual bool multiple() const override; 98 virtual bool multiple() const override;
99 virtual IntRect elementRectRelativeToViewport() const override; 99 virtual IntRect elementRectRelativeToViewport() const override;
100 virtual Element& ownerElement() const override; 100 virtual Element& ownerElement() const override;
101 virtual const LayoutStyle* layoutStyleForItem(Element&) const override; 101 virtual const ComputedStyle* computedStyleForItem(Element&) const override;
102 102
103 virtual bool hasLineIfEmpty() const override { return true; } 103 virtual bool hasLineIfEmpty() const override { return true; }
104 104
105 // Flexbox defines baselines differently than regular blocks. 105 // Flexbox defines baselines differently than regular blocks.
106 // For backwards compatibility, menulists need to do the regular block behav ior. 106 // For backwards compatibility, menulists need to do the regular block behav ior.
107 virtual int baselinePosition(FontBaseline baseline, bool firstLine, LineDire ctionMode direction, LinePositionMode position) const override 107 virtual int baselinePosition(FontBaseline baseline, bool firstLine, LineDire ctionMode direction, LinePositionMode position) const override
108 { 108 {
109 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos ition); 109 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos ition);
110 } 110 }
111 virtual int firstLineBoxBaseline() const override { return LayoutBlock::firs tLineBoxBaseline(); } 111 virtual int firstLineBoxBaseline() const override { return LayoutBlock::firs tLineBoxBaseline(); }
(...skipping 10 matching lines...) Expand all
122 void didUpdateActiveOption(int optionIndex); 122 void didUpdateActiveOption(int optionIndex);
123 123
124 LayoutText* m_buttonText; 124 LayoutText* m_buttonText;
125 LayoutBlock* m_innerBlock; 125 LayoutBlock* m_innerBlock;
126 126
127 bool m_optionsChanged; 127 bool m_optionsChanged;
128 int m_optionsWidth; 128 int m_optionsWidth;
129 129
130 int m_lastActiveIndex; 130 int m_lastActiveIndex;
131 131
132 RefPtr<LayoutStyle> m_optionStyle; 132 RefPtr<ComputedStyle> m_optionStyle;
133 133
134 RefPtrWillBePersistent<PopupMenu> m_popup; 134 RefPtrWillBePersistent<PopupMenu> m_popup;
135 bool m_popupIsVisible; 135 bool m_popupIsVisible;
136 }; 136 };
137 137
138 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMenuList, isMenuList()); 138 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMenuList, isMenuList());
139 139
140 } 140 }
141 141
142 #endif 142 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutMediaControls.cpp ('k') | Source/core/layout/LayoutMenuList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698