Move ExpansionBehaviorFlags and TextDirection to their own file
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Mar 2015 21:34:33 +0000 (21:34 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 31 Mar 2015 21:34:33 +0000 (21:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143273

Reviewed by Simon Fraser.

This is a mechanical change. It just moves code around.

This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608

Source/WebCore:

No new tests because there is no behavior change.

* Modules/notifications/Notification.h:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSPrimitiveValueMappings.h:
* css/CSSProperty.h:
* dom/Position.h:
* editing/VisiblePosition.h:
* editing/VisibleUnits.h:
* editing/htmlediting.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
* platform/LengthBox.h:
* platform/PopupMenuStyle.h:
* platform/graphics/FontCascade.h:
* platform/graphics/LayoutBoxExtent.h:
* platform/graphics/TextRun.h:
* platform/ios/SelectionRect.h:
* platform/text/BidiResolver.h:
* platform/text/StringWithDirection.h:
* platform/text/TextHelpers.h: Renamed from Source/WebCore/platform/text/TextDirection.h.
(WebCore::isLeftToRightDirection):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
* rendering/HitTestLocation.h:
* rendering/HitTestResult.h:
* rendering/InlineBox.h:
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::expansionBehavior):
* rendering/RenderBlock.cpp:
(WebCore::constructTextRunInternal):
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAverageCharWidth):
* rendering/RenderThemeIOS.mm:
* rendering/style/RenderStyle.h:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::constructTextRun):
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::constructTextRun):

Source/WebKit/ios:

* WebCoreSupport/WebFrameIOS.mm:
* WebCoreSupport/WebVisiblePosition.mm:

Source/WebKit2:

* Shared/WebPopupItem.h:
* UIProcess/API/C/efl/WKAPICastEfl.h:
* UIProcess/API/efl/EwkView.h:
* UIProcess/WebPopupMenuProxy.h:
* UIProcess/efl/WebUIPopupMenuClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182207 268f45cc-cd09-0410-ab3c-d52691b4dbfc

48 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/notifications/Notification.h
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperty.h
Source/WebCore/dom/Position.h
Source/WebCore/editing/VisiblePosition.h
Source/WebCore/editing/VisibleUnits.h
Source/WebCore/editing/htmlediting.h
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.h
Source/WebCore/platform/LengthBox.h
Source/WebCore/platform/PopupMenuStyle.h
Source/WebCore/platform/graphics/FontCascade.h
Source/WebCore/platform/graphics/LayoutBoxExtent.h
Source/WebCore/platform/graphics/TextRun.h
Source/WebCore/platform/ios/SelectionRect.h
Source/WebCore/platform/text/BidiResolver.h
Source/WebCore/platform/text/StringWithDirection.h
Source/WebCore/platform/text/TextFlags.h [moved from Source/WebCore/platform/text/TextDirection.h with 85% similarity]
Source/WebCore/platform/win/PopupMenuWin.cpp
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebCore/rendering/HitTestLocation.h
Source/WebCore/rendering/HitTestResult.h
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineTextBox.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderTextControl.cpp
Source/WebCore/rendering/RenderThemeIOS.mm
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/rendering/svg/SVGTextMetrics.cpp
Source/WebKit/ios/ChangeLog
Source/WebKit/ios/WebCoreSupport/WebFrameIOS.mm
Source/WebKit/ios/WebCoreSupport/WebVisiblePosition.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPopupItem.h
Source/WebKit2/UIProcess/API/C/efl/WKAPICastEfl.h
Source/WebKit2/UIProcess/API/efl/EwkView.h
Source/WebKit2/UIProcess/WebPopupMenuProxy.h
Source/WebKit2/UIProcess/efl/WebUIPopupMenuClient.h

index fd1223cd18e3381a964d44d27d0d15094cc80ddd..873f685056bb7e477b6b695dfacb0aeba58ea447 100644 (file)
@@ -1,3 +1,74 @@
+2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Move ExpansionBehaviorFlags and TextDirection to their own file
+        https://bugs.webkit.org/show_bug.cgi?id=143273
+
+        Reviewed by Simon Fraser.
+
+        This is a mechanical change. It just moves code around.
+
+        This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
+
+        No new tests because there is no behavior change.
+
+        * Modules/notifications/Notification.h:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSPrimitiveValueMappings.h:
+        * css/CSSProperty.h:
+        * dom/Position.h:
+        * editing/VisiblePosition.h:
+        * editing/VisibleUnits.h:
+        * editing/htmlediting.h:
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::drawTextInternal):
+        * html/canvas/CanvasRenderingContext2D.h:
+        * platform/LengthBox.h:
+        * platform/PopupMenuStyle.h:
+        * platform/graphics/FontCascade.h:
+        * platform/graphics/LayoutBoxExtent.h:
+        * platform/graphics/TextRun.h:
+        * platform/ios/SelectionRect.h:
+        * platform/text/BidiResolver.h:
+        * platform/text/StringWithDirection.h:
+        * platform/text/TextHelpers.h: Renamed from Source/WebCore/platform/text/TextDirection.h.
+        (WebCore::isLeftToRightDirection):
+        * platform/win/PopupMenuWin.cpp:
+        (WebCore::PopupMenuWin::paint):
+        * rendering/EllipsisBox.cpp:
+        (WebCore::EllipsisBox::paint):
+        (WebCore::EllipsisBox::selectionRect):
+        (WebCore::EllipsisBox::paintSelection):
+        * rendering/HitTestLocation.h:
+        * rendering/HitTestResult.h:
+        * rendering/InlineBox.h:
+        * rendering/InlineTextBox.h:
+        (WebCore::InlineTextBox::expansionBehavior):
+        * rendering/RenderBlock.cpp:
+        (WebCore::constructTextRunInternal):
+        (WebCore::RenderBlock::constructTextRun):
+        * rendering/RenderBlock.h:
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::updateFromElement):
+        (WebCore::RenderListBox::paintItemForeground):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::RenderListMarker::computePreferredLogicalWidths):
+        (WebCore::RenderListMarker::getRelativeMarkerRect):
+        * rendering/RenderMenuList.cpp:
+        (RenderMenuList::updateOptionsWidth):
+        * rendering/RenderTextControl.cpp:
+        (WebCore::RenderTextControl::getAverageCharWidth):
+        * rendering/RenderThemeIOS.mm:
+        * rendering/style/RenderStyle.h:
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::constructTextRun):
+        * rendering/svg/SVGTextMetrics.cpp:
+        (WebCore::SVGTextMetrics::constructTextRun):
+
 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Clean up Identifier factories to clarify the meaning of StringImpl*
index cd26d05dad643945cba6a3e229baf688143f450a..473ad09b7f544faaff923b0c98e077021e18ec97 100644 (file)
@@ -37,7 +37,7 @@
 #include "EventTarget.h"
 #include "URL.h"
 #include "NotificationClient.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "ThreadableLoaderClient.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
index ac90d0de33af1e3dccf33d063a502e4096f00eb8..2039fea7be4c64d5c93d53baefe294e38ef4c4c3 100644 (file)
     <ClInclude Include="..\platform\text\TextCodecUserDefined.h" />
     <ClInclude Include="..\platform\text\TextCodecUTF16.h" />
     <ClInclude Include="..\platform\text\TextCodecUTF8.h" />
-    <ClInclude Include="..\platform\text\TextDirection.h" />
+    <ClInclude Include="..\platform\text\TextFlags.h" />
     <ClInclude Include="..\platform\text\TextEncoding.h" />
     <ClInclude Include="..\platform\text\TextEncodingDetector.h" />
     <ClInclude Include="..\platform\text\TextEncodingRegistry.h" />
index f5fd123427728bc9fdef3b46be75422447c30985..05a14cc4593048e1329575bab11bdc14969a5b1b 100644 (file)
     <ClInclude Include="..\platform\text\TextCodecUTF8.h">
       <Filter>platform\text</Filter>
     </ClInclude>
-    <ClInclude Include="..\platform\text\TextDirection.h">
+    <ClInclude Include="..\platform\text\TextFlags.h">
       <Filter>platform\text</Filter>
     </ClInclude>
     <ClInclude Include="..\platform\text\TextEncoding.h">
index 0ec629e29c1693f533094b1745c891d5b2df31e3..a871dd9582283ba507b264ee163b240a377666c4 100644 (file)
                B2C3DA400D006C1D00EF6F26 /* TextCodecUserDefined.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA100D006C1D00EF6F26 /* TextCodecUserDefined.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B2C3DA410D006C1D00EF6F26 /* TextCodecUTF16.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA110D006C1D00EF6F26 /* TextCodecUTF16.cpp */; };
                B2C3DA420D006C1D00EF6F26 /* TextCodecUTF16.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA120D006C1D00EF6F26 /* TextCodecUTF16.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               B2C3DA450D006C1D00EF6F26 /* TextDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA150D006C1D00EF6F26 /* TextDirection.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               B2C3DA450D006C1D00EF6F26 /* TextFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA150D006C1D00EF6F26 /* TextFlags.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B2C3DA460D006C1D00EF6F26 /* TextEncoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA160D006C1D00EF6F26 /* TextEncoding.cpp */; };
                B2C3DA470D006C1D00EF6F26 /* TextEncoding.h in Headers */ = {isa = PBXBuildFile; fileRef = B2C3DA170D006C1D00EF6F26 /* TextEncoding.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B2C3DA480D006C1D00EF6F26 /* TextEncodingRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2C3DA180D006C1D00EF6F26 /* TextEncodingRegistry.cpp */; };
                B2C3DA100D006C1D00EF6F26 /* TextCodecUserDefined.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextCodecUserDefined.h; sourceTree = "<group>"; };
                B2C3DA110D006C1D00EF6F26 /* TextCodecUTF16.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TextCodecUTF16.cpp; sourceTree = "<group>"; };
                B2C3DA120D006C1D00EF6F26 /* TextCodecUTF16.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextCodecUTF16.h; sourceTree = "<group>"; };
-               B2C3DA150D006C1D00EF6F26 /* TextDirection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextDirection.h; sourceTree = "<group>"; };
+               B2C3DA150D006C1D00EF6F26 /* TextFlags.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextFlags.h; sourceTree = "<group>"; };
                B2C3DA160D006C1D00EF6F26 /* TextEncoding.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncoding.cpp; sourceTree = "<group>"; };
                B2C3DA170D006C1D00EF6F26 /* TextEncoding.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TextEncoding.h; sourceTree = "<group>"; };
                B2C3DA180D006C1D00EF6F26 /* TextEncodingRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingRegistry.cpp; sourceTree = "<group>"; };
                                B2C3DA120D006C1D00EF6F26 /* TextCodecUTF16.h */,
                                9343CB7F12F25E510033C5EE /* TextCodecUTF8.cpp */,
                                9343CB8012F25E510033C5EE /* TextCodecUTF8.h */,
-                               B2C3DA150D006C1D00EF6F26 /* TextDirection.h */,
+                               B2C3DA150D006C1D00EF6F26 /* TextFlags.h */,
                                B2C3DA160D006C1D00EF6F26 /* TextEncoding.cpp */,
                                B2C3DA170D006C1D00EF6F26 /* TextEncoding.h */,
                                C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */,
                                B2C3DA420D006C1D00EF6F26 /* TextCodecUTF16.h in Headers */,
                                9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */,
                                142B97CA13138943008BEF4B /* TextControlInnerElements.h in Headers */,
-                               B2C3DA450D006C1D00EF6F26 /* TextDirection.h in Headers */,
+                               B2C3DA450D006C1D00EF6F26 /* TextFlags.h in Headers */,
                                97BC84B412371180000C6161 /* TextDocument.h in Headers */,
                                97BC84841236FD93000C6161 /* TextDocumentParser.h in Headers */,
                                B2C3DA470D006C1D00EF6F26 /* TextEncoding.h in Headers */,
index 58807fcf7889086387597e474de0ca834b5584c3..60d802fe82b4de8b833d0b61a4e574664f170cac 100644 (file)
@@ -45,7 +45,7 @@
 #include "Path.h"
 #include "RenderStyleConstants.h"
 #include "SVGRenderStyleDefs.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "TextRenderingMode.h"
 #include "ThemeTypes.h"
 #include "UnicodeBidi.h"
index 522627ebce5d871afa0b095f8c3a7c10a63cd478..19c44896c1e6b3503faf9b6ce9502ed2be32b07a 100644 (file)
@@ -25,7 +25,7 @@
 #include "CSSPropertyNames.h"
 #include "CSSValue.h"
 #include "RenderStyleConstants.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "WritingMode.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
index 9d6bd2eab39884bccdbf453c9b0f6d659194ce49..cb35e22e51413b1c8e84758d319eb70a4f278191 100644 (file)
@@ -29,7 +29,7 @@
 #include "ContainerNode.h"
 #include "EditingBoundary.h"
 #include "TextAffinity.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/Assertions.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
index ff851cace2c1ce47b8948c8e1d1cb7d6f2e426c9..d0042513bed7a22b356500eeb87190710867e6da 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "EditingBoundary.h"
 #include "Position.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 
 namespace WebCore {
 
index ed9655f8211fe238f06a76465e6b5a2055e3a707..1f081d5efcb6e01cf2e47443c5a05ce2f63ab2af 100644 (file)
@@ -27,7 +27,7 @@
 #define VisibleUnits_h
 
 #include "EditingBoundary.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "VisibleSelection.h"
 
 namespace WebCore {
index 947c57c307c2ddfa5c305cd12cc9055bca12b4a2..788af3fcfb95e7d2d228762a515561ef0893d0ee 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "EditingBoundary.h"
 #include "Position.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/Forward.h>
 #include <wtf/unicode/CharacterNames.h>
 
index 0fbe2a5a19d9283aa0e9d60f60867038741a7d7f..cb70846b5701958d07d7efa6319d4dd9146955b0 100755 (executable)
@@ -2305,7 +2305,7 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
     bool isRTL = direction == RTL;
     bool override = computedStyle ? isOverride(computedStyle->unicodeBidi()) : false;
 
-    TextRun textRun(normalizedText, 0, 0, TextRun::AllowTrailingExpansion, direction, override, true, TextRun::NoRounding);
+    TextRun textRun(normalizedText, 0, 0, AllowTrailingExpansion, direction, override, true, TextRun::NoRounding);
     // Draw the item text at the correct point.
     FloatPoint location(x, y);
     switch (state().m_textBaseline) {
@@ -2326,7 +2326,7 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
         break;
     }
 
-    float fontWidth = font.width(TextRun(normalizedText, 0, 0, TextRun::AllowTrailingExpansion, direction, override));
+    float fontWidth = font.width(TextRun(normalizedText, 0, 0, AllowTrailingExpansion, direction, override));
 
     useMaxWidth = (useMaxWidth && maxWidth < fontWidth);
     float width = useMaxWidth ? maxWidth : fontWidth;
index 49c44cb9f0f00eb12fc93c039b5683a45d665ccc..92f0b3f0a3e6536ca59dd6026064708a8e6b38c3 100644 (file)
@@ -38,7 +38,7 @@
 #include "ImageBuffer.h"
 #include "Path.h"
 #include "PlatformLayer.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
index af9ecfb61012a97cf823f52b4a848e9e9b79b662..105f07986ca62b0b4dbc5da0d1c1463667b3bb4c 100644 (file)
@@ -23,7 +23,7 @@
 #define LengthBox_h
 
 #include "Length.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "WritingMode.h"
 
 namespace WebCore {
index cd672a61753efa150f474747c28aa5735a800a9c..379aa219a3752d9d00f6ec7caf1d4ab68f8339e7 100644 (file)
@@ -29,7 +29,7 @@
 #include "Color.h"
 #include "FontCascade.h"
 #include "Length.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 
 namespace WebCore {
 
index 7a481d2e72333e6da645689e2443b6f7a6534942..67d3e384f95e59acf31a487af31c2c41dd3d1ec7 100644 (file)
@@ -30,7 +30,7 @@
 #include "FontCascadeFonts.h"
 #include "FontDescription.h"
 #include "Path.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "TypesettingFeatures.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
index 1c57275b72e7d7487bafbbdecbbc7d298155a6a2..093c4a2e9b9998e4fb5db3225652d7b012ab927e 100644 (file)
@@ -32,7 +32,7 @@
 #define LayoutBoxExtent_h
 
 #include "LayoutUnit.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "WritingMode.h"
 
 namespace WebCore {
index 2b0a343731018e773be8a054c772b429f8f4f6f9..3728e55eed31a1992abc106bd893797319a869cc 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef TextRun_h
 #define TextRun_h
 
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/RefCounted.h>
 #include <wtf/text/StringView.h>
 
@@ -44,15 +44,6 @@ struct WidthIterator;
 class TextRun {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    enum ExpansionBehaviorFlags {
-        ForbidTrailingExpansion = 0 << 0,
-        AllowTrailingExpansion = 1 << 0,
-        ForbidLeadingExpansion = 0 << 1,
-        AllowLeadingExpansion = 1 << 1,
-    };
-
-    typedef unsigned ExpansionBehavior;
-
     enum RoundingHackFlags {
         NoRounding = 0,
         RunRounding = 1 << 0,
index 7e5d69f8a7be446dc648b9cc2cc95008ed99c27c..2d98ef657832d214e2904e7f0eba53410fb19f4c 100644 (file)
@@ -27,7 +27,7 @@
 #define SelectionRect_h
 
 #include "IntRect.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/FastMalloc.h>
 
 namespace WebCore {
index c90c4dc40b2041c83848578c718ecbf8c7a3f72d..3d35023b5d12022d76a19a0554dd0048c65631a4 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "BidiContext.h"
 #include "BidiRunList.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/Vector.h>
index 3833b1cdcfd134c87338b41ca674f0994afd60b7..88f8b7a8833b78c62efc24c12e86a3034e36b513 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef StringWithDirection_h
 #define StringWithDirection_h
 
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
similarity index 85%
rename from Source/WebCore/platform/text/TextDirection.h
rename to Source/WebCore/platform/text/TextFlags.h
index d0f2fe814afcde2ff1bb2e3cf186d2b1cdd919ba..560b102f5e9ee0ae22398d38c817bca6e0e19aa0 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef TextDirection_h
-#define TextDirection_h
+#ifndef TextFlags_h
+#define TextFlags_h
 
 namespace WebCore {
 
@@ -32,6 +32,15 @@ enum TextDirection { RTL, LTR };
 
 inline bool isLeftToRightDirection(TextDirection direction) { return direction == LTR; }
 
+enum ExpansionBehaviorFlags {
+    ForbidTrailingExpansion = 0 << 0,
+    AllowTrailingExpansion = 1 << 0,
+    ForbidLeadingExpansion = 0 << 1,
+    AllowLeadingExpansion = 1 << 1,
+};
+
+typedef unsigned ExpansionBehavior;
+
 }
 
 #endif
index 55a8c4bd61877c71856a8a53712233cf17ccc1f6..8d199c9dacb9cace6045176db881892a34094b11 100644 (file)
@@ -638,7 +638,7 @@ void PopupMenuWin::paint(const IntRect& damageRect, HDC hdc)
 
         String itemText = client()->itemText(index);
 
-        TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, itemStyle.textDirection(), itemStyle.hasTextDirectionOverride());
+        TextRun textRun(itemText, 0, 0, AllowTrailingExpansion, itemStyle.textDirection(), itemStyle.hasTextDirectionOverride());
         context.setFillColor(optionTextColor, ColorSpaceDeviceRGB);
         
         FontCascade itemFont = client()->menuStyle().font();
index 955271e82d7c853b96e993792cb51da56f024629..66eaabb1afbea0620c0ccff04127d3c4a1602921 100644 (file)
@@ -65,7 +65,7 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, La
     }
 
     // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
-    context->drawText(font, RenderBlock::constructTextRun(&blockFlow(), font, m_str, lineStyle, TextRun::AllowTrailingExpansion), LayoutPoint(x() + paintOffset.x(), y() + paintOffset.y() + lineStyle.fontMetrics().ascent()));
+    context->drawText(font, RenderBlock::constructTextRun(&blockFlow(), font, m_str, lineStyle, AllowTrailingExpansion), LayoutPoint(x() + paintOffset.x(), y() + paintOffset.y() + lineStyle.fontMetrics().ascent()));
 
     // Restore the regular fill color.
     if (textColor != context->fillColor())
@@ -114,7 +114,7 @@ IntRect EllipsisBox::selectionRect()
     const RootInlineBox& rootBox = root();
     // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
     LayoutRect selectionRect = LayoutRect(x(), y() + rootBox.selectionTopAdjustedForPrecedingBlock(), 0, rootBox.selectionHeightAdjustedForPrecedingBlock());
-    font.adjustSelectionRectForText(RenderBlock::constructTextRun(&blockFlow(), font, m_str, lineStyle, TextRun::AllowTrailingExpansion), selectionRect);
+    font.adjustSelectionRectForText(RenderBlock::constructTextRun(&blockFlow(), font, m_str, lineStyle, AllowTrailingExpansion), selectionRect);
     // FIXME: use directional pixel snapping instead.
     return enclosingIntRect(selectionRect);
 }
@@ -135,7 +135,7 @@ void EllipsisBox::paintSelection(GraphicsContext* context, const LayoutPoint& pa
     GraphicsContextStateSaver stateSaver(*context);
     // FIXME: Why is this always LTR? Fix by passing correct text run flags below.
     LayoutRect selectionRect = LayoutRect(x() + paintOffset.x(), y() + paintOffset.y() + rootBox.selectionTop(), 0, rootBox.selectionHeight());
-    TextRun run = RenderBlock::constructTextRun(&blockFlow(), font, m_str, style, TextRun::AllowTrailingExpansion);
+    TextRun run = RenderBlock::constructTextRun(&blockFlow(), font, m_str, style, AllowTrailingExpansion);
     font.adjustSelectionRectForText(run, selectionRect, 0, -1);
     context->fillRect(snapRectToDevicePixelsWithWritingDirection(selectionRect, renderer().document().deviceScaleFactor(), run.ltr()), c, style.colorSpace());
 }
index d075e9748ad0ed1e528965d6adad56cea785e846..b788eae14d27e77b456100d1cea6999306c8055d 100644 (file)
@@ -27,7 +27,7 @@
 #include "HitTestRequest.h"
 #include "LayoutRect.h"
 #include "RoundedRect.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/Forward.h>
 #include <wtf/ListHashSet.h>
 #include <wtf/RefPtr.h>
index 3dc7c81216fb34edc8238cfdb171bf89e9d6fcbb..1494c1168178c48fe4e31c8a3a8c6d2ae11c3c9d 100644 (file)
@@ -27,7 +27,7 @@
 #include "HitTestLocation.h"
 #include "HitTestRequest.h"
 #include "LayoutRect.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <memory>
 #include <wtf/Forward.h>
 #include <wtf/ListHashSet.h>
index 46e68afe9b0996693cb29885f0d8392a268201c4..c352c626365f96e77e697f361f1d03379f780808 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "RenderBoxModelObject.h"
 #include "RenderText.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include <wtf/TypeCasts.h>
 
 namespace WebCore {
index b193348cee1053060ad5babd90a01813c8bc1d48..456e6e6fe8e03dcc1691554934447342a8a5e8b6 100644 (file)
@@ -160,10 +160,10 @@ private:
 
     void computeRectForReplacementMarker(RenderedDocumentMarker&, const RenderStyle&, const FontCascade&);
 
-    TextRun::ExpansionBehavior expansionBehavior() const
+    ExpansionBehavior expansionBehavior() const
     {
-        return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : TextRun::ForbidLeadingExpansion)
-            | (renderer().contentIsKnownToFollow() || (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak()) ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
+        return (canHaveLeadingExpansion() ? AllowLeadingExpansion : ForbidLeadingExpansion)
+            | (renderer().contentIsKnownToFollow() || (expansion() && nextLeafChild() && !nextLeafChild()->isLineBreak()) ? AllowTrailingExpansion : ForbidTrailingExpansion);
     }
 
     void behavesLikeText() const = delete;
index 3e58a6bffacfc9f88be19360ecb030f4a0fe1df0..4567f92d4c3338aed4ecdcdb86360cb205b3fae2 100644 (file)
@@ -3671,7 +3671,7 @@ const char* RenderBlock::renderName() const
 }
 
 template <typename CharacterType>
-static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade& font, const CharacterType* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
+static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade& font, const CharacterType* characters, int length, const RenderStyle& style, ExpansionBehavior expansion)
 {
     TextDirection textDirection = LTR;
     bool directionalOverride = style.rtlOrdering() == VisualOrder;
@@ -3686,7 +3686,7 @@ static inline TextRun constructTextRunInternal(RenderObject* context, const Font
 }
 
 template <typename CharacterType>
-static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade& font, const CharacterType* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
+static inline TextRun constructTextRunInternal(RenderObject* context, const FontCascade& font, const CharacterType* characters, int length, const RenderStyle& style, ExpansionBehavior expansion, TextRunFlags flags)
 {
     TextDirection textDirection = LTR;
     bool directionalOverride = style.rtlOrdering() == VisualOrder;
@@ -3705,24 +3705,24 @@ static inline TextRun constructTextRunInternal(RenderObject* context, const Font
     return run;
 }
 
-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const LChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const LChar* characters, int length, const RenderStyle& style, ExpansionBehavior expansion)
 {
     return constructTextRunInternal(context, font, characters, length, style, expansion);
 }
 
-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const UChar* characters, int length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const UChar* characters, int length, const RenderStyle& style, ExpansionBehavior expansion)
 {
     return constructTextRunInternal(context, font, characters, length, style, expansion);
 }
 
-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const RenderText* text, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const RenderText* text, const RenderStyle& style, ExpansionBehavior expansion)
 {
     if (text->is8Bit())
         return constructTextRunInternal(context, font, text->characters8(), text->textLength(), style, expansion);
     return constructTextRunInternal(context, font, text->characters16(), text->textLength(), style, expansion);
 }
 
-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const RenderText* text, unsigned offset, unsigned length, const RenderStyle& style, TextRun::ExpansionBehavior expansion)
+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const RenderText* text, unsigned offset, unsigned length, const RenderStyle& style, ExpansionBehavior expansion)
 {
     ASSERT(offset + length <= text->textLength());
     if (text->is8Bit())
@@ -3730,7 +3730,7 @@ TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade&
     return constructTextRunInternal(context, font, text->characters16() + offset, length, style, expansion);
 }
 
-TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const String& string, const RenderStyle& style, TextRun::ExpansionBehavior expansion, TextRunFlags flags)
+TextRun RenderBlock::constructTextRun(RenderObject* context, const FontCascade& font, const String& string, const RenderStyle& style, ExpansionBehavior expansion, TextRunFlags flags)
 {
     unsigned length = string.length();
 
index 6941a4ccfd678ebb432eb06995c85a3da1e7dfa5..a7f4e229dd7e2c1fe507ff6c88cb2c93d7549317 100644 (file)
@@ -205,22 +205,22 @@ public:
     }
 
     static TextRun constructTextRun(RenderObject* context, const FontCascade&, const String&, const RenderStyle&,
-        TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextRunFlags = DefaultTextRunFlags);
 
     static TextRun constructTextRun(RenderObject* context, const FontCascade&, const RenderText*, const RenderStyle&,
-        TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
 
     static TextRun constructTextRun(RenderObject* context, const FontCascade&, const RenderText*, unsigned offset, unsigned length, const RenderStyle&,
-        TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
 
     static TextRun constructTextRun(RenderObject* context, const FontCascade&, const RenderText*, unsigned offset, const RenderStyle&,
-        TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
 
     static TextRun constructTextRun(RenderObject* context, const FontCascade&, const LChar* characters, int length, const RenderStyle&,
-        TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
 
     static TextRun constructTextRun(RenderObject* context, const FontCascade&, const UChar* characters, int length, const RenderStyle&,
-        TextRun::ExpansionBehavior = TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion);
+        ExpansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion);
     
     LayoutUnit paginationStrut() const;
     void setPaginationStrut(LayoutUnit);
index cbb1a7385bef6e0bef65fecd0990d87cec44c556..d7b75d8ea559f834e4e04e9bed7539c8934c347d 100644 (file)
@@ -133,7 +133,7 @@ void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoin
     if (paintInfo.phase == PaintPhaseForeground) {
         const String& displayedFilename = fileTextValue();
         const FontCascade& font = style().fontCascade();
-        TextRun textRun = constructTextRun(this, font, displayedFilename, style(), TextRun::AllowTrailingExpansion, RespectDirection | RespectDirectionOverride);
+        TextRun textRun = constructTextRun(this, font, displayedFilename, style(), AllowTrailingExpansion, RespectDirection | RespectDirectionOverride);
         textRun.disableRoundingHacks();
 
 #if PLATFORM(IOS)
@@ -204,10 +204,10 @@ void RenderFileUploadControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogic
     const FontCascade& font = style().fontCascade();
     // FIXME: Remove the need for this const_cast by making constructTextRun take a const RenderObject*.
     RenderFileUploadControl* renderer = const_cast<RenderFileUploadControl*>(this);
-    float minDefaultLabelWidth = defaultWidthNumChars * font.width(constructTextRun(renderer, font, characterAsString, style(), TextRun::AllowTrailingExpansion));
+    float minDefaultLabelWidth = defaultWidthNumChars * font.width(constructTextRun(renderer, font, characterAsString, style(), AllowTrailingExpansion));
 
     const String label = theme().fileListDefaultLabel(inputElement().multiple());
-    float defaultLabelWidth = font.width(constructTextRun(renderer, font, label, style(), TextRun::AllowTrailingExpansion));
+    float defaultLabelWidth = font.width(constructTextRun(renderer, font, label, style(), AllowTrailingExpansion));
     if (HTMLInputElement* button = uploadButton())
         if (RenderObject* buttonRenderer = button->renderer())
             defaultLabelWidth += buttonRenderer->maxPreferredLogicalWidth() + afterButtonSpacing;
index 7e387bd9fa9edc25aa3d3e40b1a095a9ef590b13..c09f7b01fe59d55f19fa829412ac302732a0ee14 100644 (file)
@@ -126,7 +126,7 @@ void RenderListBox::updateFromElement()
             if (!text.isEmpty()) {
                 applyTextTransform(style(), text, ' ');
                 // FIXME: Why is this always LTR? Can't text direction affect the width?
-                TextRun textRun = constructTextRun(this, itemFont, text, style(), TextRun::AllowTrailingExpansion);
+                TextRun textRun = constructTextRun(this, itemFont, text, style(), AllowTrailingExpansion);
                 textRun.disableRoundingHacks();
                 float textWidth = itemFont.width(textRun);
                 width = std::max(width, textWidth);
@@ -399,7 +399,7 @@ void RenderListBox::paintItemForeground(PaintInfo& paintInfo, const LayoutPoint&
     ColorSpace colorSpace = itemStyle->colorSpace();
     paintInfo.context->setFillColor(textColor, colorSpace);
 
-    TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), isOverride(itemStyle->unicodeBidi()), true, TextRun::NoRounding);
+    TextRun textRun(itemText, 0, 0, AllowTrailingExpansion, itemStyle->direction(), isOverride(itemStyle->unicodeBidi()), true, TextRun::NoRounding);
     FontCascade itemFont = style().fontCascade();
     LayoutRect r = itemBoundingBoxRect(paintOffset, listIndex);
     r.move(itemOffsetForAlignment(textRun, itemStyle, itemFont, r));
index ad42e825798045635f236a60d41019a229cab161..375a7178b16e725f0703c25f87305678f11a7cbc 100644 (file)
@@ -1542,7 +1542,7 @@ void RenderListMarker::computePreferredLogicalWidths()
             break;
         case Asterisks:
         case Footnotes: {
-            TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+            TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
             logicalWidth = font.width(run); // no suffix for these types
         }
             break;
@@ -1629,7 +1629,7 @@ void RenderListMarker::computePreferredLogicalWidths()
             if (m_text.isEmpty())
                 logicalWidth = 0;
             else {
-                TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+                TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
                 LayoutUnit itemWidth = font.width(run);
                 UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' };
                 LayoutUnit suffixSpaceWidth = font.width(RenderBlock::constructTextRun(this, font, suffixSpace, 2, style()));
@@ -1762,7 +1762,7 @@ FloatRect RenderListMarker::getRelativeMarkerRect()
         case Asterisks:
         case Footnotes: {
             const FontCascade& font = style().fontCascade();
-            TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+            TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
             relativeRect = FloatRect(0, 0, font.width(run), font.fontMetrics().height());
             break;
         }
@@ -1856,7 +1856,7 @@ FloatRect RenderListMarker::getRelativeMarkerRect()
             if (m_text.isEmpty())
                 return FloatRect();
             const FontCascade& font = style().fontCascade();
-            TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+            TextRun run = RenderBlock::constructTextRun(this, font, m_text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
             float itemWidth = font.width(run);
             UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' };
             float suffixSpaceWidth = font.width(RenderBlock::constructTextRun(this, font, suffixSpace, 2, style()));
index 45f860c1262db351b3777f0c6f42953e9e36a47a..ddbf0504db0587506e57a358639363b5961b9a9e 100644 (file)
@@ -223,13 +223,13 @@ void RenderMenuList::updateOptionsWidth()
                 optionWidth += minimumValueForLength(optionStyle->textIndent(), 0);
             if (!text.isEmpty()) {
                 const FontCascade& font = style().fontCascade();
-                TextRun run = RenderBlock::constructTextRun(this, font, text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+                TextRun run = RenderBlock::constructTextRun(this, font, text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
                 optionWidth += font.width(run);
             }
             maxOptionWidth = std::max(maxOptionWidth, optionWidth);
         } else if (!text.isEmpty()) {
             const FontCascade& font = style().fontCascade();
-            TextRun run = RenderBlock::constructTextRun(this, font, text, style(), TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+            TextRun run = RenderBlock::constructTextRun(this, font, text, style(), AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
             maxOptionWidth = std::max(maxOptionWidth, font.width(run));
         }
     }
index c934f6efc3fc465a60c6a845c57d4864fc3c0a5a..5d78eb3d990a65acb1e06f17953cbf95755edfa0 100644 (file)
@@ -180,7 +180,7 @@ float RenderTextControl::getAverageCharWidth()
     const UChar ch = '0';
     const String str = String(&ch, 1);
     const FontCascade& font = style().fontCascade();
-    TextRun textRun = constructTextRun(this, font, str, style(), TextRun::AllowTrailingExpansion);
+    TextRun textRun = constructTextRun(this, font, str, style(), AllowTrailingExpansion);
     textRun.disableRoundingHacks();
     return font.width(textRun);
 }
index 0ee92ed31954b39f93770b093237772aa04bd7b9..6928a3a312e0feaae0d6cc3bd5583c637b8d4760 100644 (file)
@@ -553,7 +553,7 @@ public:
     }
     virtual float measureText(const String& string) const override
     {
-        TextRun run = RenderBlock::constructTextRun(&m_renderObject, m_font, string, m_style, TextRun::AllowTrailingExpansion | TextRun::ForbidLeadingExpansion, DefaultTextRunFlags);
+        TextRun run = RenderBlock::constructTextRun(&m_renderObject, m_font, string, m_style, AllowTrailingExpansion | ForbidLeadingExpansion, DefaultTextRunFlags);
         return m_font.width(run);
     }
 private:
index 7f5d9a623d7243aa5f184973849068785fb619e7..449225a7116c7a86fff2a2a0a24662549dd1d8b1 100644 (file)
@@ -65,7 +65,7 @@
 #include "StyleSurroundData.h"
 #include "StyleTransformData.h"
 #include "StyleVisualData.h"
-#include "TextDirection.h"
+#include "TextFlags.h"
 #include "ThemeTypes.h"
 #include "TransformOperations.h"
 #include "UnicodeBidi.h"
index e91fbb978dd7f4cd38bca62e4692ac89a0e4e9af..14b1464ecea21a36cb00c29cdbf5b9cb9c3716a8 100644 (file)
@@ -415,7 +415,7 @@ TextRun SVGInlineTextBox::constructTextRun(RenderStyle* style, const SVGTextFrag
     TextRun run(StringView(renderer().text()).substring(fragment.characterOffset, fragment.length)
                 , 0 /* xPos, only relevant with allowTabs=true */
                 , 0 /* padding, only relevant for justified text, not relevant for SVG */
-                , TextRun::AllowTrailingExpansion
+                , AllowTrailingExpansion
                 , direction()
                 , dirOverride() || style->rtlOrdering() == VisualOrder /* directionalOverride */);
 
index 19a26fbf461101553ba6073fbceb35ac78e36371..27d4e48595799444497d7b8f38ecf31ed263c652 100644 (file)
@@ -66,7 +66,7 @@ TextRun SVGTextMetrics::constructTextRun(RenderSVGInlineText& text, unsigned pos
     TextRun run(StringView(text.text()).substring(position, length)
                 , 0 /* xPos, only relevant with allowTabs=true */
                 , 0 /* padding, only relevant for justified text, not relevant for SVG */
-                , TextRun::AllowTrailingExpansion
+                , AllowTrailingExpansion
                 , style.direction()
                 , isOverride(style.unicodeBidi()) /* directionalOverride */);
 
index 5315307a406f249efc76a49f4cffb1554a3c4b77..1c264a09492f37c70ea2f635d81138c438a27b5f 100644 (file)
@@ -1,3 +1,17 @@
+2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Move ExpansionBehaviorFlags and TextDirection to their own file
+        https://bugs.webkit.org/show_bug.cgi?id=143273
+
+        Reviewed by Simon Fraser.
+
+        This is a mechanical change. It just moves code around.
+
+        This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
+
+        * WebCoreSupport/WebFrameIOS.mm:
+        * WebCoreSupport/WebVisiblePosition.mm:
+
 2015-03-09  David Kilzer  <ddkilzer@apple.com>
 
         [iOS] Fix build when compiling with dead code stripping disabled
index e4f483c2446e379198650a06b86d95edf66e9154..111786d0be6d79af3188ac2d0e58d3be096cec55 100644 (file)
@@ -45,7 +45,7 @@
 #import <WebCore/RenderedDocumentMarker.h>
 #import <WebCore/SelectionRect.h>
 #import <WebCore/TextBoundaries.h>
-#import <WebCore/TextDirection.h>
+#import <WebCore/TextFlags.h>
 #import <WebCore/VisiblePosition.h>
 #import <WebCore/VisibleUnits.h>
 #import <WebKitLegacy/DOM.h>
index cec81a11b3f3f22da550613285816722c7b27cca..2bd3480149baed01065d30356f35cc0d8ec8a60e 100644 (file)
@@ -37,8 +37,8 @@
 #import <WebCore/RenderTextControl.h>
 #import <WebCore/RenderedDocumentMarker.h>
 #import <WebCore/TextBoundaries.h>
-#import <WebCore/TextDirection.h>
 #import <WebCore/TextGranularity.h>
+#import <WebCore/TextFlags.h>
 #import <WebCore/TextIterator.h>
 #import <WebCore/VisiblePosition.h>
 #import <WebCore/VisibleUnits.h>
index 34e4daf2afa2476767ee89541f430395cee71253..c653bae593a1bace41ee58c473cb87105386dc95 100644 (file)
@@ -1,3 +1,20 @@
+2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        Move ExpansionBehaviorFlags and TextDirection to their own file
+        https://bugs.webkit.org/show_bug.cgi?id=143273
+
+        Reviewed by Simon Fraser.
+
+        This is a mechanical change. It just moves code around.
+
+        This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
+
+        * Shared/WebPopupItem.h:
+        * UIProcess/API/C/efl/WKAPICastEfl.h:
+        * UIProcess/API/efl/EwkView.h:
+        * UIProcess/WebPopupMenuProxy.h:
+        * UIProcess/efl/WebUIPopupMenuClient.h:
+
 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Clean up Identifier factories to clarify the meaning of StringImpl*
index 58c2766300c0fca3d239191907e89dd223a88954..f59b8297589b526dbccaa5fd54b42c0c610fe12b 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef WebPopupItem_h
 #define WebPopupItem_h
 
-#include <WebCore/TextDirection.h>
+#include <WebCore/TextFlags.h>
 #include <wtf/text/WTFString.h>
 
 namespace IPC {
index 0328bc1489bb1bd081495fc851bf06ef4c1d99e0..07c3bef0d12dac4863704d9c0a61f5bbd211b77b 100644 (file)
@@ -24,7 +24,7 @@
 #error "Please #include \"WKAPICast.h\" instead of this file directly."
 #endif
 
-#include <WebCore/TextDirection.h>
+#include <WebCore/TextFlags.h>
 #include <WebKit/WKPopupItem.h>
 
 #if ENABLE(TOUCH_EVENTS)
index 414eabf67ae3cfa36f1543b6fc1ec7bc78d10d84..edfb081c84f8fb262ed5c1e2fb7cf2aa18d0266d 100644 (file)
@@ -29,7 +29,7 @@
 #include "WKRetainPtr.h"
 #include "WebViewEfl.h"
 #include <WebCore/RefPtrCairo.h>
-#include <WebCore/TextDirection.h>
+#include <WebCore/TextFlags.h>
 #include <WebCore/Timer.h>
 #include <WebKit/WKBase.h>
 
index 892fa8ece4f36e67b21af6e898b5aacf2f0dcdec..b9b7d2b9dbf23b0ef0dcdd8caea1ebc7f18728e7 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef WebPopupMenuProxy_h
 #define WebPopupMenuProxy_h
 
-#include <WebCore/TextDirection.h>
+#include <WebCore/TextFlags.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/Vector.h>
index f8e4b3f00557ef26a10cfca62ec7ed0f1f83a6ab..280025a6535548cffbbf84d1b834b41939024acb 100644 (file)
@@ -31,7 +31,7 @@
 #include "WKPageEfl.h"
 #include "WebPopupItem.h"
 #include <WebCore/IntRect.h>
-#include <WebCore/TextDirection.h>
+#include <WebCore/TextFlags.h>
 
 namespace API {
 template<> struct ClientTraits<WKPageUIPopupMenuClientBase> {