| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the select element layoutObject in WebCore. | 2 * This file is part of the select element layoutObject 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 bool hasControlClip() const override { return true; } | 74 bool hasControlClip() const override { return true; } |
| 75 | 75 |
| 76 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit&
maxLogicalWidth) const override; | 76 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit&
maxLogicalWidth) const override; |
| 77 | 77 |
| 78 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | 78 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; |
| 79 | 79 |
| 80 // PopupMenuClient methods | 80 // PopupMenuClient methods |
| 81 void valueChanged(unsigned listIndex, bool fireOnChange = true) override; | 81 void valueChanged(unsigned listIndex, bool fireOnChange = true) override; |
| 82 void selectionChanged(unsigned, bool) override { } | 82 void selectionChanged(unsigned, bool) override { } |
| 83 void selectionCleared() override { } | 83 void selectionCleared() override { } |
| 84 Element& itemElement(unsigned listIndex) const override; |
| 84 String itemText(unsigned listIndex) const override; | 85 String itemText(unsigned listIndex) const override; |
| 85 String itemToolTip(unsigned listIndex) const override; | 86 String itemToolTip(unsigned listIndex) const override; |
| 86 String itemAccessibilityText(unsigned listIndex) const override; | 87 String itemAccessibilityText(unsigned listIndex) const override; |
| 87 bool itemIsEnabled(unsigned listIndex) const override; | 88 bool itemIsEnabled(unsigned listIndex) const override; |
| 88 bool itemIsDisplayNone(unsigned listIndex) const override; | 89 bool itemIsDisplayNone(unsigned listIndex) const override; |
| 89 LayoutUnit clientPaddingLeft() const override; | 90 LayoutUnit clientPaddingLeft() const override; |
| 90 LayoutUnit clientPaddingRight() const override; | 91 LayoutUnit clientPaddingRight() const override; |
| 91 int listSize() const override; | 92 int listSize() const override; |
| 92 int selectedIndex() const override; | 93 int selectedIndex() const override; |
| 93 void popupDidHide() override; | 94 void popupDidHide() override; |
| 94 void popupDidCancel() override; | 95 void popupDidCancel() override; |
| 95 bool itemIsSeparator(unsigned listIndex) const override; | 96 bool itemIsSeparator(unsigned listIndex) const override; |
| 96 bool itemIsLabel(unsigned listIndex) const override; | 97 bool itemIsLabel(unsigned listIndex) const override; |
| 97 bool itemIsSelected(unsigned listIndex) const override; | 98 bool itemIsSelected(unsigned listIndex) const override; |
| 98 void provisionalSelectionChanged(unsigned) override; | 99 void provisionalSelectionChanged(unsigned) override; |
| 99 void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shi
ft, bool fireOnChangeNow = true) override; | 100 void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shi
ft, bool fireOnChangeNow = true) override; |
| 100 bool multiple() const override; | 101 bool multiple() const override; |
| 101 IntRect elementRectRelativeToViewport() const override; | 102 IntRect elementRectRelativeToViewport() const override; |
| 102 Element& ownerElement() const override; | 103 Element& ownerElement() const override; |
| 103 const ComputedStyle* computedStyleForItem(Element&) const override; | |
| 104 | 104 |
| 105 bool hasLineIfEmpty() const override { return true; } | 105 bool hasLineIfEmpty() const override { return true; } |
| 106 | 106 |
| 107 // Flexbox defines baselines differently than regular blocks. | 107 // Flexbox defines baselines differently than regular blocks. |
| 108 // For backwards compatibility, menulists need to do the regular block behav
ior. | 108 // For backwards compatibility, menulists need to do the regular block behav
ior. |
| 109 int baselinePosition(FontBaseline baseline, bool firstLine, LineDirectionMod
e direction, LinePositionMode position) const override | 109 int baselinePosition(FontBaseline baseline, bool firstLine, LineDirectionMod
e direction, LinePositionMode position) const override |
| 110 { | 110 { |
| 111 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos
ition); | 111 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos
ition); |
| 112 } | 112 } |
| 113 int firstLineBoxBaseline() const override { return LayoutBlock::firstLineBox
Baseline(); } | 113 int firstLineBoxBaseline() const override { return LayoutBlock::firstLineBox
Baseline(); } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 141 | 141 |
| 142 // TODO(tkent): Use FRIEND_TEST macro provided by gtest_prod.h | 142 // TODO(tkent): Use FRIEND_TEST macro provided by gtest_prod.h |
| 143 friend class LayoutMenuListTest_ElementRectRelativeToViewport_Test; | 143 friend class LayoutMenuListTest_ElementRectRelativeToViewport_Test; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMenuList, isMenuList()); | 146 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutMenuList, isMenuList()); |
| 147 | 147 |
| 148 } | 148 } |
| 149 | 149 |
| 150 #endif | 150 #endif |
| OLD | NEW |