Title: [213144] releases/WebKitGTK/webkit-2.16/Source/WebCore
Revision
213144
Author
carlo...@webkit.org
Date
2017-02-28 01:53:01 -0800 (Tue, 28 Feb 2017)

Log Message

Merge r213009 - Simple line layout: Move coverage functions out of SimpleLineLayout.cpp
https://bugs.webkit.org/show_bug.cgi?id=168872

Reviewed by Simon Fraser.

SimpleLineLayout.cpp is for core functions only.

No change in functionality.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderingAllInOne.cpp:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForWithReason):
(WebCore::SimpleLineLayout::printReason): Deleted.
(WebCore::SimpleLineLayout::printReasons): Deleted.
(WebCore::SimpleLineLayout::printTextForSubtree): Deleted.
(WebCore::SimpleLineLayout::textLengthForSubtree): Deleted.
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows): Deleted.
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage): Deleted.
(WebCore::SimpleLineLayout::toggleSimpleLineLayout): Deleted.
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList): Deleted.
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage): Deleted.
* rendering/SimpleLineLayout.h:
* rendering/SimpleLineLayoutCoverage.cpp: Added.
(WebCore::SimpleLineLayout::printReason):
(WebCore::SimpleLineLayout::printReasons):
(WebCore::SimpleLineLayout::printTextForSubtree):
(WebCore::SimpleLineLayout::textLengthForSubtree):
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows):
(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
(WebCore::SimpleLineLayout::toggleSimpleLineLayout):
(WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
* rendering/SimpleLineLayoutCoverage.h: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/CMakeLists.txt (213143 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/CMakeLists.txt	2017-02-28 09:48:50 UTC (rev 213143)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/CMakeLists.txt	2017-02-28 09:53:01 UTC (rev 213144)
@@ -2477,6 +2477,7 @@
     rendering/ScrollAlignment.cpp
     rendering/SelectionSubtreeRoot.cpp
     rendering/SimpleLineLayout.cpp
+    rendering/SimpleLineLayoutCoverage.cpp
     rendering/SimpleLineLayoutFlowContents.cpp
     rendering/SimpleLineLayoutFunctions.cpp
     rendering/SimpleLineLayoutPagination.cpp

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (213143 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-02-28 09:48:50 UTC (rev 213143)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog	2017-02-28 09:53:01 UTC (rev 213144)
@@ -1,5 +1,43 @@
 2017-02-25  Zalan Bujtas  <za...@apple.com>
 
+        Simple line layout: Move coverage functions out of SimpleLineLayout.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=168872
+        
+        Reviewed by Simon Fraser.
+
+        SimpleLineLayout.cpp is for core functions only.
+
+        No change in functionality.
+
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/RenderingAllInOne.cpp:
+        * rendering/SimpleLineLayout.cpp:
+        (WebCore::SimpleLineLayout::canUseForWithReason):
+        (WebCore::SimpleLineLayout::printReason): Deleted.
+        (WebCore::SimpleLineLayout::printReasons): Deleted.
+        (WebCore::SimpleLineLayout::printTextForSubtree): Deleted.
+        (WebCore::SimpleLineLayout::textLengthForSubtree): Deleted.
+        (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows): Deleted.
+        (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage): Deleted.
+        (WebCore::SimpleLineLayout::toggleSimpleLineLayout): Deleted.
+        (WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList): Deleted.
+        (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage): Deleted.
+        * rendering/SimpleLineLayout.h:
+        * rendering/SimpleLineLayoutCoverage.cpp: Added.
+        (WebCore::SimpleLineLayout::printReason):
+        (WebCore::SimpleLineLayout::printReasons):
+        (WebCore::SimpleLineLayout::printTextForSubtree):
+        (WebCore::SimpleLineLayout::textLengthForSubtree):
+        (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows):
+        (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
+        (WebCore::SimpleLineLayout::toggleSimpleLineLayout):
+        (WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
+        (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
+        * rendering/SimpleLineLayoutCoverage.h: Added.
+
+2017-02-25  Zalan Bujtas  <za...@apple.com>
+
         Text might wrap when its preferred logical width is used for sizing the containing block.
         https://bugs.webkit.org/show_bug.cgi?id=168864
         <rdar://problem/30690734>

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/WebCore.xcodeproj/project.pbxproj (213143 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-02-28 09:48:50 UTC (rev 213143)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-02-28 09:53:01 UTC (rev 213144)
@@ -569,6 +569,8 @@
 		10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */; };
 		112B34D21E60B8A700BB310A /* SimpleLineLayoutPagination.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 112B34D01E60B8A700BB310A /* SimpleLineLayoutPagination.cpp */; };
 		112B34D51E60B98300BB310A /* SimpleLineLayoutPagination.h in Headers */ = {isa = PBXBuildFile; fileRef = 112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */; };
+		11E067EC1E62461300162D16 /* SimpleLineLayoutCoverage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11E067EB1E62461300162D16 /* SimpleLineLayoutCoverage.cpp */; };
+		11E067EE1E6246E500162D16 /* SimpleLineLayoutCoverage.h in Headers */ = {isa = PBXBuildFile; fileRef = 11E067ED1E6246E500162D16 /* SimpleLineLayoutCoverage.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		120DE3ED1C86CA3E00B6D4DD /* WebAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 120DE3EA1C80161C00B6D4DD /* WebAnimation.cpp */; };
 		120DE3F11C86CCC600B6D4DD /* AnimationEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 120DE3EE1C86CCBD00B6D4DD /* AnimationEffect.cpp */; };
 		120DE3F81C87C5A800B6D4DD /* JSWebAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 120DE3F51C87C58E00B6D4DD /* JSWebAnimation.h */; };
@@ -7680,6 +7682,8 @@
 		10FB084A14E15C7E00A3DB98 /* PublicURLManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PublicURLManager.h; sourceTree = "<group>"; };
 		112B34D01E60B8A700BB310A /* SimpleLineLayoutPagination.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleLineLayoutPagination.cpp; sourceTree = "<group>"; };
 		112B34D41E60B98300BB310A /* SimpleLineLayoutPagination.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutPagination.h; sourceTree = "<group>"; };
+		11E067EB1E62461300162D16 /* SimpleLineLayoutCoverage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleLineLayoutCoverage.cpp; sourceTree = "<group>"; };
+		11E067ED1E6246E500162D16 /* SimpleLineLayoutCoverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleLineLayoutCoverage.h; sourceTree = "<group>"; };
 		120DE3EA1C80161C00B6D4DD /* WebAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAnimation.cpp; sourceTree = "<group>"; };
 		120DE3EB1C80161C00B6D4DD /* WebAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAnimation.h; sourceTree = "<group>"; };
 		120DE3EC1C80161C00B6D4DD /* WebAnimation.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebAnimation.idl; sourceTree = "<group>"; };
@@ -24309,6 +24313,8 @@
 				CDCFABBB18C0AE31006F8450 /* SelectionSubtreeRoot.h */,
 				E48944A0180B57D800F165D8 /* SimpleLineLayout.cpp */,
 				E48944A1180B57D800F165D8 /* SimpleLineLayout.h */,
+				11E067EB1E62461300162D16 /* SimpleLineLayoutCoverage.cpp */,
+				11E067ED1E6246E500162D16 /* SimpleLineLayoutCoverage.h */,
 				585D6E011A1A792E00FA4F12 /* SimpleLineLayoutFlowContents.cpp */,
 				585D6E021A1A792E00FA4F12 /* SimpleLineLayoutFlowContents.h */,
 				E4E9B11A18145692003ACCDF /* SimpleLineLayoutFunctions.cpp */,
@@ -25918,6 +25924,7 @@
 				97B38E27151C4271004622E9 /* DOMWindowNotifications.h in Headers */,
 				97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */,
 				89F60B11157F686E0075E157 /* DOMWindowQuota.h in Headers */,
+				11E067EE1E6246E500162D16 /* SimpleLineLayoutCoverage.h in Headers */,
 				AA2A5AD616A4861600975A25 /* DOMWindowSpeechSynthesis.h in Headers */,
 				A8CCBB49151F831600AB7CE9 /* DOMWindowWebDatabase.h in Headers */,
 				BC53DA2E1143121E000D817E /* DOMWrapperWorld.h in Headers */,
@@ -32083,6 +32090,7 @@
 				9759E94214EF1CF80026A2DD /* TextTrackCue.cpp in Sources */,
 				071A9EC2168FBC43002629F9 /* TextTrackCueGeneric.cpp in Sources */,
 				9759E94514EF1CF80026A2DD /* TextTrackCueList.cpp in Sources */,
+				11E067EC1E62461300162D16 /* SimpleLineLayoutCoverage.cpp in Sources */,
 				076970861463AD8700F502CF /* TextTrackList.cpp in Sources */,
 				B1AD4E7313A12A4600846B27 /* TextTrackLoader.cpp in Sources */,
 				CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */,

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderingAllInOne.cpp (213143 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderingAllInOne.cpp	2017-02-28 09:48:50 UTC (rev 213143)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderingAllInOne.cpp	2017-02-28 09:53:01 UTC (rev 213144)
@@ -142,6 +142,7 @@
 #include "ScrollAlignment.cpp"
 #include "SelectionSubtreeRoot.cpp"
 #include "SimpleLineLayout.cpp"
+#include "SimpleLineLayoutCoverage.cpp"
 #include "SimpleLineLayoutFlowContents.cpp"
 #include "SimpleLineLayoutFunctions.cpp"
 #include "SimpleLineLayoutPagination.cpp"

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayout.cpp (213143 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayout.cpp	2017-02-28 09:48:50 UTC (rev 213143)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayout.cpp	2017-02-28 09:53:01 UTC (rev 213144)
@@ -44,7 +44,6 @@
 #include "RenderStyle.h"
 #include "RenderText.h"
 #include "RenderTextControl.h"
-#include "RenderView.h"
 #include "Settings.h"
 #include "SimpleLineLayoutFlowContents.h"
 #include "SimpleLineLayoutFunctions.h"
@@ -51,79 +50,11 @@
 #include "SimpleLineLayoutTextFragmentIterator.h"
 #include "Text.h"
 #include "TextPaintStyle.h"
-#include "TextStream.h"
 
 namespace WebCore {
 namespace SimpleLineLayout {
 
 #ifndef NDEBUG
-void printSimpleLineLayoutCoverage();
-void printSimpleLineLayoutBlockList();
-void toggleSimpleLineLayout();
-#endif
-
-enum AvoidanceReason_ : uint64_t {
-    FlowIsInsideRegion                    = 1LLU  << 0,
-    FlowHasHorizonalWritingMode           = 1LLU  << 1,
-    FlowHasOutline                        = 1LLU  << 2,
-    FlowIsRuby                            = 1LLU  << 3,
-    FlowIsPaginated                       = 1LLU  << 4,
-    FlowHasTextOverflow                   = 1LLU  << 5,
-    FlowIsDepricatedFlexBox               = 1LLU  << 6,
-    FlowParentIsPlaceholderElement        = 1LLU  << 7,
-    FlowParentIsTextAreaWithWrapping      = 1LLU  << 8,
-    FlowHasNonSupportedChild              = 1LLU  << 9,
-    FlowHasUnsupportedFloat               = 1LLU  << 10,
-    FlowHasUnsupportedUnderlineDecoration = 1LLU  << 11,
-    FlowHasJustifiedNonLatinText          = 1LLU  << 12,
-    FlowHasOverflowNotVisible             = 1LLU  << 13,
-    FlowHasWebKitNBSPMode                 = 1LLU  << 14,
-    FlowIsNotLTR                          = 1LLU  << 15,
-    FlowHasLineBoxContainProperty         = 1LLU  << 16,
-    FlowIsNotTopToBottom                  = 1LLU  << 17,
-    FlowHasLineBreak                      = 1LLU  << 18,
-    FlowHasNonNormalUnicodeBiDi           = 1LLU  << 19,
-    FlowHasRTLOrdering                    = 1LLU  << 20,
-    FlowHasLineAlignEdges                 = 1LLU  << 21,
-    FlowHasLineSnap                       = 1LLU  << 22,
-    FlowHasTextEmphasisFillOrMark         = 1LLU  << 23,
-    FlowHasTextShadow                     = 1LLU  << 24,
-    FlowHasPseudoFirstLine                = 1LLU  << 25,
-    FlowHasPseudoFirstLetter              = 1LLU  << 26,
-    FlowHasTextCombine                    = 1LLU  << 27,
-    FlowHasTextFillBox                    = 1LLU  << 28,
-    FlowHasBorderFitLines                 = 1LLU  << 29,
-    FlowHasNonAutoLineBreak               = 1LLU  << 30,
-    FlowHasNonAutoTrailingWord            = 1LLU  << 31,
-    FlowHasSVGFont                        = 1LLU  << 32,
-    FlowTextIsEmpty                       = 1LLU  << 33,
-    FlowTextHasSoftHyphen                 = 1LLU  << 34,
-    FlowTextHasDirectionCharacter         = 1LLU  << 35,
-    FlowIsMissingPrimaryFont              = 1LLU  << 36,
-    FlowPrimaryFontIsInsufficient         = 1LLU  << 37,
-    FlowTextIsCombineText                 = 1LLU  << 38,
-    FlowTextIsRenderCounter               = 1LLU  << 39,
-    FlowTextIsRenderQuote                 = 1LLU  << 40,
-    FlowTextIsTextFragment                = 1LLU  << 41,
-    FlowTextIsSVGInlineText               = 1LLU  << 42,
-    FlowHasComplexFontCodePath            = 1LLU  << 43,
-    FeatureIsDisabled                     = 1LLU  << 44,
-    FlowHasNoParent                       = 1LLU  << 45,
-    FlowHasNoChild                        = 1LLU  << 46,
-    FlowChildIsSelected                   = 1LLU  << 47,
-    FlowHasHangingPunctuation             = 1LLU  << 48,
-    FlowFontHasOverflowGlyph              = 1LLU  << 49,
-    FlowTextHasSurrogatePair              = 1LLU  << 50,
-    EndOfReasons                          = 1LLU  << 51
-};
-const unsigned NoReason = 0;
-
-typedef uint64_t AvoidanceReason;
-typedef uint64_t AvoidanceReasonFlags;
-
-enum class IncludeReasons { First , All };
-
-#ifndef NDEBUG
 #define SET_REASON_AND_RETURN_IF_NEEDED(reason, reasons, includeReasons) { \
         reasons |= reason; \
         if (includeReasons == IncludeReasons::First) \
@@ -298,7 +229,7 @@
     return reasons;
 }
 
-static AvoidanceReasonFlags canUseForWithReason(const RenderBlockFlow& flow, IncludeReasons includeReasons)
+AvoidanceReasonFlags canUseForWithReason(const RenderBlockFlow& flow, IncludeReasons includeReasons)
 {
 #ifndef NDEBUG
     static std::once_flag onceFlag;
@@ -948,319 +879,5 @@
     memcpy(m_runs, runVector.data(), m_runCount * sizeof(Run));
 }
 
-#ifndef NDEBUG
-static void printReason(AvoidanceReason reason, TextStream& stream)
-{
-    switch (reason) {
-    case FlowIsInsideRegion:
-        stream << "flow is inside region";
-        break;
-    case FlowHasHorizonalWritingMode:
-        stream << "horizontal writing mode";
-        break;
-    case FlowHasOutline:
-        stream << "outline";
-        break;
-    case FlowIsRuby:
-        stream << "ruby";
-        break;
-    case FlowHasHangingPunctuation:
-        stream << "hanging punctuation";
-        break;
-    case FlowIsPaginated:
-        stream << "paginated";
-        break;
-    case FlowHasTextOverflow:
-        stream << "text-overflow";
-        break;
-    case FlowIsDepricatedFlexBox:
-        stream << "depricatedFlexBox";
-        break;
-    case FlowParentIsPlaceholderElement:
-        stream << "placeholder element";
-        break;
-    case FlowParentIsTextAreaWithWrapping:
-        stream << "wrapping textarea";
-        break;
-    case FlowHasNonSupportedChild:
-        stream << "nested renderers";
-        break;
-    case FlowHasUnsupportedFloat:
-        stream << "complicated float";
-        break;
-    case FlowHasUnsupportedUnderlineDecoration:
-        stream << "text-underline-position: under";
-        break;
-    case FlowHasJustifiedNonLatinText:
-        stream << "text-align: justify with non-latin text";
-        break;
-    case FlowHasOverflowNotVisible:
-        stream << "overflow: hidden | scroll | auto";
-        break;
-    case FlowHasWebKitNBSPMode:
-        stream << "-webkit-nbsp-mode: space";
-        break;
-    case FlowIsNotLTR:
-        stream << "dir is not LTR";
-        break;
-    case FlowHasLineBoxContainProperty:
-        stream << "line-box-contain value indicates variable line height";
-        break;
-    case FlowIsNotTopToBottom:
-        stream << "non top-to-bottom flow";
-        break;
-    case FlowHasLineBreak:
-        stream << "line-break property";
-        break;
-    case FlowHasNonNormalUnicodeBiDi:
-        stream << "non-normal Unicode bidi";
-        break;
-    case FlowHasRTLOrdering:
-        stream << "-webkit-rtl-ordering";
-        break;
-    case FlowHasLineAlignEdges:
-        stream << "-webkit-line-align edges";
-        break;
-    case FlowHasLineSnap:
-        stream << "-webkit-line-snap property";
-        break;
-    case FlowHasTextEmphasisFillOrMark:
-        stream << "text-emphasis (fill/mark)";
-        break;
-    case FlowHasPseudoFirstLine:
-        stream << "first-line";
-        break;
-    case FlowHasPseudoFirstLetter:
-        stream << "first-letter";
-        break;
-    case FlowHasTextCombine:
-        stream << "text combine";
-        break;
-    case FlowHasTextFillBox:
-        stream << "background-color (text-fill)";
-        break;
-    case FlowHasBorderFitLines:
-        stream << "-webkit-border-fit";
-        break;
-    case FlowHasNonAutoLineBreak:
-        stream << "line-break is not auto";
-        break;
-    case FlowHasNonAutoTrailingWord:
-        stream << "-apple-trailing-word is not auto";
-        break;
-    case FlowHasSVGFont:
-        stream << "SVG font";
-        break;
-    case FlowTextHasSoftHyphen:
-        stream << "soft hyphen character";
-        break;
-    case FlowTextHasDirectionCharacter:
-        stream << "direction character";
-        break;
-    case FlowIsMissingPrimaryFont:
-        stream << "missing primary font";
-        break;
-    case FlowPrimaryFontIsInsufficient:
-        stream << "missing glyph or glyph needs another font";
-        break;
-    case FlowTextIsCombineText:
-        stream << "text is combine";
-        break;
-    case FlowTextIsRenderCounter:
-        stream << "unsupported RenderCounter";
-        break;
-    case FlowTextIsRenderQuote:
-        stream << "unsupported RenderQuote";
-        break;
-    case FlowTextIsTextFragment:
-        stream << "unsupported TextFragment";
-        break;
-    case FlowTextIsSVGInlineText:
-        stream << "unsupported SVGInlineText";
-        break;
-    case FlowHasComplexFontCodePath:
-        stream << "text with complex font codepath";
-        break;
-    case FlowHasTextShadow:
-        stream << "text-shadow";
-        break;
-    case FlowChildIsSelected:
-        stream << "selected content";
-        break;
-    case FlowFontHasOverflowGlyph:
-        stream << "-webkit-line-box-contain: glyphs with overflowing text.";
-        break;
-    case FlowTextHasSurrogatePair:
-        stream << "surrogate pair";
-        break;
-    case FlowTextIsEmpty:
-    case FlowHasNoChild:
-    case FlowHasNoParent:
-    case FeatureIsDisabled:
-    default:
-        break;
-    }
 }
-
-static void printReasons(AvoidanceReasonFlags reasons, TextStream& stream)
-{
-    bool first = true;
-    for (auto reasonItem = EndOfReasons >> 1; reasonItem != NoReason; reasonItem >>= 1) {
-        if (!(reasons & reasonItem))
-            continue;
-        stream << (first ? " " : ", ");
-        first = false;
-        printReason(reasonItem, stream);
-    }
 }
-
-static void printTextForSubtree(const RenderObject& renderer, unsigned& charactersLeft, TextStream& stream)
-{
-    if (!charactersLeft)
-        return;
-    if (is<RenderText>(renderer)) {
-        String text = downcast<RenderText>(renderer).text();
-        text = text.stripWhiteSpace();
-        unsigned len = std::min(charactersLeft, text.length());
-        stream << text.left(len);
-        charactersLeft -= len;
-        return;
-    }
-    if (!is<RenderElement>(renderer))
-        return;
-    for (const auto* child = downcast<RenderElement>(renderer).firstChild(); child; child = child->nextSibling())
-        printTextForSubtree(*child, charactersLeft, stream);
-}
-
-static unsigned textLengthForSubtree(const RenderObject& renderer)
-{
-    if (is<RenderText>(renderer))
-        return downcast<RenderText>(renderer).textLength();
-    if (!is<RenderElement>(renderer))
-        return 0;
-    unsigned textLength = 0;
-    for (const auto* child = downcast<RenderElement>(renderer).firstChild(); child; child = child->nextSibling())
-        textLength += textLengthForSubtree(*child);
-    return textLength;
-}
-
-static void collectNonEmptyLeafRenderBlockFlows(const RenderObject& renderer, HashSet<const RenderBlockFlow*>& leafRenderers)
-{
-    if (is<RenderText>(renderer)) {
-        if (!downcast<RenderText>(renderer).textLength())
-            return;
-        // Find RenderBlockFlow ancestor.
-        for (const auto* current = renderer.parent(); current; current = current->parent()) {
-            if (!is<RenderBlockFlow>(current))
-                continue;
-            leafRenderers.add(downcast<RenderBlockFlow>(current));
-            break;
-        }
-        return;
-    }
-    if (!is<RenderElement>(renderer))
-        return;
-    for (const auto* child = downcast<RenderElement>(renderer).firstChild(); child; child = child->nextSibling())
-        collectNonEmptyLeafRenderBlockFlows(*child, leafRenderers);
-}
-
-static void collectNonEmptyLeafRenderBlockFlowsForCurrentPage(HashSet<const RenderBlockFlow*>& leafRenderers)
-{
-    for (const auto* document : Document::allDocuments()) {
-        if (!document->renderView() || document->pageCacheState() != Document::NotInPageCache)
-            continue;
-        if (!document->isHTMLDocument() && !document->isXHTMLDocument())
-            continue;
-        collectNonEmptyLeafRenderBlockFlows(*document->renderView(), leafRenderers);
-    }
-}
-
-void toggleSimpleLineLayout()
-{
-    for (auto* document : Document::allDocuments()) {
-        auto& settings = document->mutableSettings();
-        settings.setSimpleLineLayoutEnabled(!settings.simpleLineLayoutEnabled());
-    }
-}
-
-void printSimpleLineLayoutBlockList()
-{
-    HashSet<const RenderBlockFlow*> leafRenderers;
-    collectNonEmptyLeafRenderBlockFlowsForCurrentPage(leafRenderers);
-    if (!leafRenderers.size()) {
-        WTFLogAlways("No text found in this document\n");
-        return;
-    }
-    TextStream stream;
-    stream << "---------------------------------------------------\n";
-    for (const auto* flow : leafRenderers) {
-        auto reason = canUseForWithReason(*flow, IncludeReasons::All);
-        if (reason == NoReason)
-            continue;
-        unsigned printedLength = 30;
-        stream << "\"";
-        printTextForSubtree(*flow, printedLength, stream);
-        for (;printedLength > 0; --printedLength)
-            stream << " ";
-        stream << "\"(" << textLengthForSubtree(*flow) << "):";
-        printReasons(reason, stream);
-        stream << "\n";
-    }
-    stream << "---------------------------------------------------\n";
-    WTFLogAlways("%s", stream.release().utf8().data());
-}
-
-void printSimpleLineLayoutCoverage()
-{
-    HashSet<const RenderBlockFlow*> leafRenderers;
-    collectNonEmptyLeafRenderBlockFlowsForCurrentPage(leafRenderers);
-    if (!leafRenderers.size()) {
-        WTFLogAlways("No text found in this document\n");
-        return;
-    }
-    TextStream stream;
-    HashMap<AvoidanceReason, unsigned> flowStatistics;
-    unsigned textLength = 0;
-    unsigned unsupportedTextLength = 0;
-    unsigned numberOfUnsupportedLeafBlocks = 0;
-    unsigned supportedButForcedToLineLayoutTextLength = 0;
-    unsigned numberOfSupportedButForcedToLineLayoutLeafBlocks = 0;
-    for (const auto* flow : leafRenderers) {
-        auto flowLength = textLengthForSubtree(*flow);
-        textLength += flowLength;
-        auto reasons = canUseForWithReason(*flow, IncludeReasons::All);
-        if (reasons == NoReason) {
-            if (flow->lineLayoutPath() == RenderBlockFlow::ForceLineBoxesPath) {
-                supportedButForcedToLineLayoutTextLength += flowLength;
-                ++numberOfSupportedButForcedToLineLayoutLeafBlocks;
-            }
-            continue;
-        }
-        ++numberOfUnsupportedLeafBlocks;
-        unsupportedTextLength += flowLength;
-        for (auto reasonItem = EndOfReasons >> 1; reasonItem != NoReason; reasonItem >>= 1) {
-            if (!(reasons & reasonItem))
-                continue;
-            auto result = flowStatistics.add(reasonItem, flowLength);
-            if (!result.isNewEntry)
-                result.iterator->value += flowLength;
-        }
-    }
-    stream << "---------------------------------------------------\n";
-    stream << "Number of blocks: total(" <<  leafRenderers.size() << ") non-simple(" << numberOfUnsupportedLeafBlocks << ")\nContent length: total(" <<
-        textLength << ") non-simple(" << unsupportedTextLength << ")\n";
-    for (const auto reasonEntry : flowStatistics) {
-        printReason(reasonEntry.key, stream);
-        stream << ": " << (float)reasonEntry.value / (float)textLength * 100 << "%\n";
-    }
-    if (supportedButForcedToLineLayoutTextLength) {
-        stream << "Simple line layout potential coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%\n\n";
-        stream << "Simple line layout actual coverage: " << (float)(textLength - unsupportedTextLength - supportedButForcedToLineLayoutTextLength) / (float)textLength * 100 << "%\nForced line layout blocks: " << numberOfSupportedButForcedToLineLayoutLeafBlocks << " content length: " << supportedButForcedToLineLayoutTextLength << "(" << (float)supportedButForcedToLineLayoutTextLength / (float)textLength * 100 << "%)";
-    } else
-        stream << "Simple line layout coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%";
-    stream << "\n---------------------------------------------------\n";
-    WTFLogAlways("%s", stream.release().utf8().data());
-}
-#endif
-}
-}

Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayout.h (213143 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayout.h	2017-02-28 09:48:50 UTC (rev 213143)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayout.h	2017-02-28 09:53:01 UTC (rev 213144)
@@ -25,6 +25,7 @@
 
 #pragma once
 
+#include "SimpleLineLayoutCoverage.h"
 #include "TextFlags.h"
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
@@ -41,7 +42,9 @@
 namespace SimpleLineLayout {
 
 bool canUseFor(const RenderBlockFlow&);
+AvoidanceReasonFlags canUseForWithReason(const RenderBlockFlow&, IncludeReasons);
 
+
 struct Run {
 #if COMPILER(MSVC)
     Run() { }

Added: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp (0 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp	2017-02-28 09:53:01 UTC (rev 213144)
@@ -0,0 +1,357 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SimpleLineLayoutCoverage.h"
+
+#include "Logging.h"
+#include "RenderBlockFlow.h"
+#include "RenderChildIterator.h"
+#include "RenderStyle.h"
+#include "RenderView.h"
+#include "Settings.h"
+#include "SimpleLineLayout.h"
+#include "TextStream.h"
+
+namespace WebCore {
+namespace SimpleLineLayout {
+
+#ifndef NDEBUG
+static void printReason(AvoidanceReason reason, TextStream& stream)
+{
+    switch (reason) {
+    case FlowIsInsideRegion:
+        stream << "flow is inside region";
+        break;
+    case FlowHasHorizonalWritingMode:
+        stream << "horizontal writing mode";
+        break;
+    case FlowHasOutline:
+        stream << "outline";
+        break;
+    case FlowIsRuby:
+        stream << "ruby";
+        break;
+    case FlowHasHangingPunctuation:
+        stream << "hanging punctuation";
+        break;
+    case FlowIsPaginated:
+        stream << "paginated";
+        break;
+    case FlowHasTextOverflow:
+        stream << "text-overflow";
+        break;
+    case FlowIsDepricatedFlexBox:
+        stream << "depricatedFlexBox";
+        break;
+    case FlowParentIsPlaceholderElement:
+        stream << "placeholder element";
+        break;
+    case FlowParentIsTextAreaWithWrapping:
+        stream << "wrapping textarea";
+        break;
+    case FlowHasNonSupportedChild:
+        stream << "nested renderers";
+        break;
+    case FlowHasUnsupportedFloat:
+        stream << "complicated float";
+        break;
+    case FlowHasUnsupportedUnderlineDecoration:
+        stream << "text-underline-position: under";
+        break;
+    case FlowHasJustifiedNonLatinText:
+        stream << "text-align: justify with non-latin text";
+        break;
+    case FlowHasOverflowNotVisible:
+        stream << "overflow: hidden | scroll | auto";
+        break;
+    case FlowHasWebKitNBSPMode:
+        stream << "-webkit-nbsp-mode: space";
+        break;
+    case FlowIsNotLTR:
+        stream << "dir is not LTR";
+        break;
+    case FlowHasLineBoxContainProperty:
+        stream << "line-box-contain value indicates variable line height";
+        break;
+    case FlowIsNotTopToBottom:
+        stream << "non top-to-bottom flow";
+        break;
+    case FlowHasLineBreak:
+        stream << "line-break property";
+        break;
+    case FlowHasNonNormalUnicodeBiDi:
+        stream << "non-normal Unicode bidi";
+        break;
+    case FlowHasRTLOrdering:
+        stream << "-webkit-rtl-ordering";
+        break;
+    case FlowHasLineAlignEdges:
+        stream << "-webkit-line-align edges";
+        break;
+    case FlowHasLineSnap:
+        stream << "-webkit-line-snap property";
+        break;
+    case FlowHasTextEmphasisFillOrMark:
+        stream << "text-emphasis (fill/mark)";
+        break;
+    case FlowHasPseudoFirstLine:
+        stream << "first-line";
+        break;
+    case FlowHasPseudoFirstLetter:
+        stream << "first-letter";
+        break;
+    case FlowHasTextCombine:
+        stream << "text combine";
+        break;
+    case FlowHasTextFillBox:
+        stream << "background-color (text-fill)";
+        break;
+    case FlowHasBorderFitLines:
+        stream << "-webkit-border-fit";
+        break;
+    case FlowHasNonAutoLineBreak:
+        stream << "line-break is not auto";
+        break;
+    case FlowHasNonAutoTrailingWord:
+        stream << "-apple-trailing-word is not auto";
+        break;
+    case FlowHasSVGFont:
+        stream << "SVG font";
+        break;
+    case FlowTextHasSoftHyphen:
+        stream << "soft hyphen character";
+        break;
+    case FlowTextHasDirectionCharacter:
+        stream << "direction character";
+        break;
+    case FlowIsMissingPrimaryFont:
+        stream << "missing primary font";
+        break;
+    case FlowPrimaryFontIsInsufficient:
+        stream << "missing glyph or glyph needs another font";
+        break;
+    case FlowTextIsCombineText:
+        stream << "text is combine";
+        break;
+    case FlowTextIsRenderCounter:
+        stream << "unsupported RenderCounter";
+        break;
+    case FlowTextIsRenderQuote:
+        stream << "unsupported RenderQuote";
+        break;
+    case FlowTextIsTextFragment:
+        stream << "unsupported TextFragment";
+        break;
+    case FlowTextIsSVGInlineText:
+        stream << "unsupported SVGInlineText";
+        break;
+    case FlowHasComplexFontCodePath:
+        stream << "text with complex font codepath";
+        break;
+    case FlowHasTextShadow:
+        stream << "text-shadow";
+        break;
+    case FlowChildIsSelected:
+        stream << "selected content";
+        break;
+    case FlowFontHasOverflowGlyph:
+        stream << "-webkit-line-box-contain: glyphs with overflowing text.";
+        break;
+    case FlowTextHasSurrogatePair:
+        stream << "surrogate pair";
+        break;
+    case FlowTextIsEmpty:
+    case FlowHasNoChild:
+    case FlowHasNoParent:
+    case FeatureIsDisabled:
+    default:
+        break;
+    }
+}
+
+static void printReasons(AvoidanceReasonFlags reasons, TextStream& stream)
+{
+    bool first = true;
+    for (auto reasonItem = EndOfReasons >> 1; reasonItem != NoReason; reasonItem >>= 1) {
+        if (!(reasons & reasonItem))
+            continue;
+        stream << (first ? " " : ", ");
+        first = false;
+        printReason(reasonItem, stream);
+    }
+}
+
+static void printTextForSubtree(const RenderObject& renderer, unsigned& charactersLeft, TextStream& stream)
+{
+    if (!charactersLeft)
+        return;
+    if (is<RenderText>(renderer)) {
+        String text = downcast<RenderText>(renderer).text();
+        text = text.stripWhiteSpace();
+        unsigned len = std::min(charactersLeft, text.length());
+        stream << text.left(len);
+        charactersLeft -= len;
+        return;
+    }
+    if (!is<RenderElement>(renderer))
+        return;
+    for (const auto* child = downcast<RenderElement>(renderer).firstChild(); child; child = child->nextSibling())
+        printTextForSubtree(*child, charactersLeft, stream);
+}
+
+static unsigned textLengthForSubtree(const RenderObject& renderer)
+{
+    if (is<RenderText>(renderer))
+        return downcast<RenderText>(renderer).textLength();
+    if (!is<RenderElement>(renderer))
+        return 0;
+    unsigned textLength = 0;
+    for (const auto* child = downcast<RenderElement>(renderer).firstChild(); child; child = child->nextSibling())
+        textLength += textLengthForSubtree(*child);
+    return textLength;
+}
+
+static void collectNonEmptyLeafRenderBlockFlows(const RenderObject& renderer, HashSet<const RenderBlockFlow*>& leafRenderers)
+{
+    if (is<RenderText>(renderer)) {
+        if (!downcast<RenderText>(renderer).textLength())
+            return;
+        // Find RenderBlockFlow ancestor.
+        for (const auto* current = renderer.parent(); current; current = current->parent()) {
+            if (!is<RenderBlockFlow>(current))
+                continue;
+            leafRenderers.add(downcast<RenderBlockFlow>(current));
+            break;
+        }
+        return;
+    }
+    if (!is<RenderElement>(renderer))
+        return;
+    for (const auto* child = downcast<RenderElement>(renderer).firstChild(); child; child = child->nextSibling())
+        collectNonEmptyLeafRenderBlockFlows(*child, leafRenderers);
+}
+
+static void collectNonEmptyLeafRenderBlockFlowsForCurrentPage(HashSet<const RenderBlockFlow*>& leafRenderers)
+{
+    for (const auto* document : Document::allDocuments()) {
+        if (!document->renderView() || document->pageCacheState() != Document::NotInPageCache)
+            continue;
+        if (!document->isHTMLDocument() && !document->isXHTMLDocument())
+            continue;
+        collectNonEmptyLeafRenderBlockFlows(*document->renderView(), leafRenderers);
+    }
+}
+
+void toggleSimpleLineLayout()
+{
+    for (auto* document : Document::allDocuments()) {
+        auto& settings = document->mutableSettings();
+        settings.setSimpleLineLayoutEnabled(!settings.simpleLineLayoutEnabled());
+    }
+}
+
+void printSimpleLineLayoutBlockList()
+{
+    HashSet<const RenderBlockFlow*> leafRenderers;
+    collectNonEmptyLeafRenderBlockFlowsForCurrentPage(leafRenderers);
+    if (!leafRenderers.size()) {
+        WTFLogAlways("No text found in this document\n");
+        return;
+    }
+    TextStream stream;
+    stream << "---------------------------------------------------\n";
+    for (const auto* flow : leafRenderers) {
+        auto reason = canUseForWithReason(*flow, IncludeReasons::All);
+        if (reason == NoReason)
+            continue;
+        unsigned printedLength = 30;
+        stream << "\"";
+        printTextForSubtree(*flow, printedLength, stream);
+        for (;printedLength > 0; --printedLength)
+            stream << " ";
+        stream << "\"(" << textLengthForSubtree(*flow) << "):";
+        printReasons(reason, stream);
+        stream << "\n";
+    }
+    stream << "---------------------------------------------------\n";
+    WTFLogAlways("%s", stream.release().utf8().data());
+}
+
+void printSimpleLineLayoutCoverage()
+{
+    HashSet<const RenderBlockFlow*> leafRenderers;
+    collectNonEmptyLeafRenderBlockFlowsForCurrentPage(leafRenderers);
+    if (!leafRenderers.size()) {
+        WTFLogAlways("No text found in this document\n");
+        return;
+    }
+    TextStream stream;
+    HashMap<AvoidanceReason, unsigned> flowStatistics;
+    unsigned textLength = 0;
+    unsigned unsupportedTextLength = 0;
+    unsigned numberOfUnsupportedLeafBlocks = 0;
+    unsigned supportedButForcedToLineLayoutTextLength = 0;
+    unsigned numberOfSupportedButForcedToLineLayoutLeafBlocks = 0;
+    for (const auto* flow : leafRenderers) {
+        auto flowLength = textLengthForSubtree(*flow);
+        textLength += flowLength;
+        auto reasons = canUseForWithReason(*flow, IncludeReasons::All);
+        if (reasons == NoReason) {
+            if (flow->lineLayoutPath() == RenderBlockFlow::ForceLineBoxesPath) {
+                supportedButForcedToLineLayoutTextLength += flowLength;
+                ++numberOfSupportedButForcedToLineLayoutLeafBlocks;
+            }
+            continue;
+        }
+        ++numberOfUnsupportedLeafBlocks;
+        unsupportedTextLength += flowLength;
+        for (auto reasonItem = EndOfReasons >> 1; reasonItem != NoReason; reasonItem >>= 1) {
+            if (!(reasons & reasonItem))
+                continue;
+            auto result = flowStatistics.add(reasonItem, flowLength);
+            if (!result.isNewEntry)
+                result.iterator->value += flowLength;
+        }
+    }
+    stream << "---------------------------------------------------\n";
+    stream << "Number of blocks: total(" <<  leafRenderers.size() << ") non-simple(" << numberOfUnsupportedLeafBlocks << ")\nContent length: total(" <<
+        textLength << ") non-simple(" << unsupportedTextLength << ")\n";
+    for (const auto reasonEntry : flowStatistics) {
+        printReason(reasonEntry.key, stream);
+        stream << ": " << (float)reasonEntry.value / (float)textLength * 100 << "%\n";
+    }
+    if (supportedButForcedToLineLayoutTextLength) {
+        stream << "Simple line layout potential coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%\n\n";
+        stream << "Simple line layout actual coverage: " << (float)(textLength - unsupportedTextLength - supportedButForcedToLineLayoutTextLength) / (float)textLength * 100 << "%\nForced line layout blocks: " << numberOfSupportedButForcedToLineLayoutLeafBlocks << " content length: " << supportedButForcedToLineLayoutTextLength << "(" << (float)supportedButForcedToLineLayoutTextLength / (float)textLength * 100 << "%)";
+    } else
+        stream << "Simple line layout coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%";
+    stream << "\n---------------------------------------------------\n";
+    WTFLogAlways("%s", stream.release().utf8().data());
+}
+#endif
+
+}
+}

Added: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayoutCoverage.h (0 => 213144)


--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayoutCoverage.h	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/SimpleLineLayoutCoverage.h	2017-02-28 09:53:01 UTC (rev 213144)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+namespace SimpleLineLayout {
+
+#ifndef NDEBUG
+void printSimpleLineLayoutCoverage();
+void printSimpleLineLayoutBlockList();
+void toggleSimpleLineLayout();
+#endif
+
+enum AvoidanceReason_ : uint64_t {
+    FlowIsInsideRegion                    = 1LLU  << 0,
+    FlowHasHorizonalWritingMode           = 1LLU  << 1,
+    FlowHasOutline                        = 1LLU  << 2,
+    FlowIsRuby                            = 1LLU  << 3,
+    FlowIsPaginated                       = 1LLU  << 4,
+    FlowHasTextOverflow                   = 1LLU  << 5,
+    FlowIsDepricatedFlexBox               = 1LLU  << 6,
+    FlowParentIsPlaceholderElement        = 1LLU  << 7,
+    FlowParentIsTextAreaWithWrapping      = 1LLU  << 8,
+    FlowHasNonSupportedChild              = 1LLU  << 9,
+    FlowHasUnsupportedFloat               = 1LLU  << 10,
+    FlowHasUnsupportedUnderlineDecoration = 1LLU  << 11,
+    FlowHasJustifiedNonLatinText          = 1LLU  << 12,
+    FlowHasOverflowNotVisible             = 1LLU  << 13,
+    FlowHasWebKitNBSPMode                 = 1LLU  << 14,
+    FlowIsNotLTR                          = 1LLU  << 15,
+    FlowHasLineBoxContainProperty         = 1LLU  << 16,
+    FlowIsNotTopToBottom                  = 1LLU  << 17,
+    FlowHasLineBreak                      = 1LLU  << 18,
+    FlowHasNonNormalUnicodeBiDi           = 1LLU  << 19,
+    FlowHasRTLOrdering                    = 1LLU  << 20,
+    FlowHasLineAlignEdges                 = 1LLU  << 21,
+    FlowHasLineSnap                       = 1LLU  << 22,
+    FlowHasTextEmphasisFillOrMark         = 1LLU  << 23,
+    FlowHasTextShadow                     = 1LLU  << 24,
+    FlowHasPseudoFirstLine                = 1LLU  << 25,
+    FlowHasPseudoFirstLetter              = 1LLU  << 26,
+    FlowHasTextCombine                    = 1LLU  << 27,
+    FlowHasTextFillBox                    = 1LLU  << 28,
+    FlowHasBorderFitLines                 = 1LLU  << 29,
+    FlowHasNonAutoLineBreak               = 1LLU  << 30,
+    FlowHasNonAutoTrailingWord            = 1LLU  << 31,
+    FlowHasSVGFont                        = 1LLU  << 32,
+    FlowTextIsEmpty                       = 1LLU  << 33,
+    FlowTextHasSoftHyphen                 = 1LLU  << 34,
+    FlowTextHasDirectionCharacter         = 1LLU  << 35,
+    FlowIsMissingPrimaryFont              = 1LLU  << 36,
+    FlowPrimaryFontIsInsufficient         = 1LLU  << 37,
+    FlowTextIsCombineText                 = 1LLU  << 38,
+    FlowTextIsRenderCounter               = 1LLU  << 39,
+    FlowTextIsRenderQuote                 = 1LLU  << 40,
+    FlowTextIsTextFragment                = 1LLU  << 41,
+    FlowTextIsSVGInlineText               = 1LLU  << 42,
+    FlowHasComplexFontCodePath            = 1LLU  << 43,
+    FeatureIsDisabled                     = 1LLU  << 44,
+    FlowHasNoParent                       = 1LLU  << 45,
+    FlowHasNoChild                        = 1LLU  << 46,
+    FlowChildIsSelected                   = 1LLU  << 47,
+    FlowHasHangingPunctuation             = 1LLU  << 48,
+    FlowFontHasOverflowGlyph              = 1LLU  << 49,
+    FlowTextHasSurrogatePair              = 1LLU  << 50,
+    EndOfReasons                          = 1LLU  << 51
+};
+const unsigned NoReason = 0;
+
+typedef uint64_t AvoidanceReason;
+typedef uint64_t AvoidanceReasonFlags;
+
+enum class IncludeReasons { First , All };
+
+}
+}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to