static const TimeStamp kTypeAheadTimeout
Source/WebCore/platform/chromium/PopupMenuChromium.cpp_sec1
|
78 |
// The settings used for the drop down menu. |
78 |
// The settings used for the drop down menu. |
79 |
// This is the delegate used if none is provided. |
79 |
// This is the delegate used if none is provided. |
80 |
static const PopupContainerSettings dropDownSettings = { |
80 |
static const PopupContainerSettings dropDownSettings = { |
81 |
true, // setTextOnIndexChange |
81 |
true, // setTextOnIndexChange |
82 |
true, // acceptOnAbandon |
82 |
true, // acceptOnAbandon |
83 |
false, // loopSelectionNavigation |
83 |
false, // loopSelectionNavigation |
84 |
false, // restrictWidthOfListBox |
84 |
false // restrictWidthOfListBox |
85 |
// display item text in its first strong directional character's directionality. |
|
|
86 |
PopupContainerSettings::FirstStrongDirectionalCharacterDirection, |
87 |
}; |
85 |
}; |
88 |
|
86 |
|
89 |
// This class uses WebCore code to paint and handle events for a drop-down list |
87 |
// This class uses WebCore code to paint and handle events for a drop-down list |
void PopupListBox::paintRow(GraphicsCont
Source/WebCore/platform/chromium/PopupMenuChromium.cpp_sec2
|
966 |
} |
964 |
} |
967 |
|
965 |
|
968 |
// Prepare the directionality to draw text. |
966 |
// Prepare the directionality to draw text. |
969 |
bool rtl = false; |
967 |
bool rtl = style.textDirection() == RTL; |
970 |
if (m_settings.itemTextDirectionalityHint == PopupContainerSettings::DOMElementDirection) |
968 |
TextRun textRun(itemText.characters(), itemText.length(), false, 0, 0, TextRun::AllowTrailingExpansion, rtl, style.hasTextDirectionOverride()); |
971 |
rtl = style.textDirection() == RTL; |
|
|
972 |
else if (m_settings.itemTextDirectionalityHint == |
973 |
PopupContainerSettings::FirstStrongDirectionalCharacterDirection) |
974 |
rtl = itemText.defaultWritingDirection() == WTF::Unicode::RightToLeft; |
975 |
TextRun textRun(itemText.characters(), itemText.length(), false, 0, 0, TextRun::AllowTrailingExpansion, rtl); |
976 |
// If the text is right-to-left, make it right-aligned by adjusting its |
969 |
// If the text is right-to-left, make it right-aligned by adjusting its |
977 |
// beginning position. |
970 |
// beginning position. |
978 |
if (rightAligned) |
971 |
if (rightAligned) |
void PopupListBox::paintRow(GraphicsCont
Source/WebCore/platform/chromium/PopupMenuChromium.cpp_sec3
|
1000 |
// Draw the the label if applicable. |
993 |
// Draw the the label if applicable. |
1001 |
if (itemLabel.isEmpty()) |
994 |
if (itemLabel.isEmpty()) |
1002 |
return; |
995 |
return; |
1003 |
TextRun labelTextRun(itemLabel.characters(), itemLabel.length(), false, 0, 0, TextRun::AllowTrailingExpansion, rtl); |
996 |
TextRun labelTextRun(itemLabel.characters(), itemLabel.length(), false, 0, 0, TextRun::AllowTrailingExpansion, rtl, style.hasTextDirectionOverride()); |
1004 |
if (rightAligned) |
997 |
if (rightAligned) |
1005 |
textX = max(0, m_popupClient->clientPaddingLeft() - m_popupClient->clientInsetLeft()); |
998 |
textX = max(0, m_popupClient->clientPaddingLeft() - m_popupClient->clientInsetLeft()); |
1006 |
else |
999 |
else |