summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/win/PopupMenuWin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/win/PopupMenuWin.cpp')
-rw-r--r--WebCore/platform/win/PopupMenuWin.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/WebCore/platform/win/PopupMenuWin.cpp b/WebCore/platform/win/PopupMenuWin.cpp
index 59ea563..52f2eb9 100644
--- a/WebCore/platform/win/PopupMenuWin.cpp
+++ b/WebCore/platform/win/PopupMenuWin.cpp
@@ -527,6 +527,8 @@ void PopupMenu::paint(const IntRect& damageRect, HDC hdc)
// Draw the item text
if (itemStyle.isVisible()) {
int textX = max(0, client()->clientPaddingLeft() - client()->clientInsetLeft());
+ if (theme()->popupOptionSupportsTextIndent() && itemStyle.textDirection() == LTR)
+ textX += itemStyle.textIndent().calcMinValue(itemRect.width());
int textY = itemRect.y() + itemFont.ascent() + (itemRect.height() - itemFont.height()) / 2;
context.drawBidiText(itemFont, textRun, IntPoint(textX, textY));
}
@@ -683,6 +685,9 @@ static LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA
::SendMessage(popup->client()->hostWindow()->platformWindow(), message, wParam, lParam);
popup->client()->hidePopup();
break;
+ case VK_ESCAPE:
+ popup->client()->hidePopup();
+ break;
default:
if (isASCIIPrintable(wParam))
// Send the keydown to the WebView so it can be used for type-to-select.