Use a 1-byte enum class for TextDirection
[WebKit-https.git] / Source / WebKit / WebProcess / WebCoreSupport / win / WebPopupMenuWin.cpp
index 9a917ed..d05e3d7 100644 (file)
@@ -112,7 +112,7 @@ void WebPopupMenu::setUpPlatformData(const WebCore::IntRect& pageCoordinates, Pl
 
         String itemText = m_popupClient->itemText(index);
 
-        TextDirection direction = itemText.defaultWritingDirection() == U_RIGHT_TO_LEFT ? RTL : LTR;
+        TextDirection direction = itemText.defaultWritingDirection() == U_RIGHT_TO_LEFT ? TextDirection::RTL : TextDirection::LTR;
         TextRun textRun(itemText, 0, 0, AllowTrailingExpansion, itemStyle.textDirection(), itemStyle.hasTextDirectionOverride());
 
         notSelectedBackingStoreContext->setFillColor(optionTextColor);
@@ -129,7 +129,7 @@ void WebPopupMenu::setUpPlatformData(const WebCore::IntRect& pageCoordinates, Pl
         // Draw the item text
         if (itemStyle.isVisible()) {
             int textX = 0;
-            if (m_popupClient->menuStyle().textDirection() == LTR) {
+            if (m_popupClient->menuStyle().textDirection() == TextDirection::LTR) {
                 textX = std::max<int>(0, m_popupClient->clientPaddingLeft() - m_popupClient->clientInsetLeft());
                 if (RenderTheme::singleton().popupOptionSupportsTextIndent())
                     textX += minimumIntValueForLength(itemStyle.textIndent(), itemRect.width());