1 | /* |
2 | * Copyright (C) 2017 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
7 | * 1. Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. |
9 | * 2. Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. |
12 | * |
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 | * THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ |
25 | |
26 | #pragma once |
27 | |
28 | namespace WebCore { |
29 | namespace SimpleLineLayout { |
30 | |
31 | #ifndef NDEBUG |
32 | void printSimpleLineLayoutCoverage(); |
33 | void printSimpleLineLayoutBlockList(); |
34 | void toggleSimpleLineLayout(); |
35 | #endif |
36 | |
37 | enum AvoidanceReason_ : uint64_t { |
38 | FlowIsInsideANonMultiColumnThread = 1LLU << 0, |
39 | FlowHasHorizonalWritingMode = 1LLU << 1, |
40 | FlowHasOutline = 1LLU << 2, |
41 | FlowIsRuby = 1LLU << 3, |
42 | FlowIsPaginated = 1LLU << 4, |
43 | FlowHasTextOverflow = 1LLU << 5, |
44 | FlowIsDepricatedFlexBox = 1LLU << 6, |
45 | FlowParentIsPlaceholderElement = 1LLU << 7, |
46 | FlowParentIsTextAreaWithWrapping = 1LLU << 8, |
47 | FlowHasNonSupportedChild = 1LLU << 9, |
48 | FlowHasUnsupportedFloat = 1LLU << 10, |
49 | FlowHasUnsupportedUnderlineDecoration = 1LLU << 11, |
50 | FlowHasJustifiedNonLatinText = 1LLU << 12, |
51 | FlowHasOverflowNotVisible = 1LLU << 13, |
52 | FlowHasWebKitNBSPMode = 1LLU << 14, |
53 | FlowIsNotLTR = 1LLU << 15, |
54 | FlowHasLineBoxContainProperty = 1LLU << 16, |
55 | FlowIsNotTopToBottom = 1LLU << 17, |
56 | FlowHasLineBreak = 1LLU << 18, |
57 | FlowHasNonNormalUnicodeBiDi = 1LLU << 19, |
58 | FlowHasRTLOrdering = 1LLU << 20, |
59 | FlowHasLineAlignEdges = 1LLU << 21, |
60 | FlowHasLineSnap = 1LLU << 22, |
61 | FlowHasTextEmphasisFillOrMark = 1LLU << 23, |
62 | FlowHasTextShadow = 1LLU << 24, |
63 | FlowHasPseudoFirstLine = 1LLU << 25, |
64 | FlowHasPseudoFirstLetter = 1LLU << 26, |
65 | FlowHasTextCombine = 1LLU << 27, |
66 | FlowHasTextFillBox = 1LLU << 28, |
67 | FlowHasBorderFitLines = 1LLU << 29, |
68 | FlowHasNonAutoLineBreak = 1LLU << 30, |
69 | FlowHasSVGFont = 1LLU << 32, |
70 | FlowTextIsEmpty = 1LLU << 33, |
71 | FlowTextHasSoftHyphen = 1LLU << 34, |
72 | FlowTextHasDirectionCharacter = 1LLU << 35, |
73 | FlowIsMissingPrimaryFont = 1LLU << 36, |
74 | FlowPrimaryFontIsInsufficient = 1LLU << 37, |
75 | FlowTextIsCombineText = 1LLU << 38, |
76 | FlowTextIsRenderCounter = 1LLU << 39, |
77 | FlowTextIsRenderQuote = 1LLU << 40, |
78 | FlowTextIsTextFragment = 1LLU << 41, |
79 | FlowTextIsSVGInlineText = 1LLU << 42, |
80 | FlowHasComplexFontCodePath = 1LLU << 43, |
81 | FeatureIsDisabled = 1LLU << 44, |
82 | FlowHasNoParent = 1LLU << 45, |
83 | FlowHasNoChild = 1LLU << 46, |
84 | FlowChildIsSelected = 1LLU << 47, |
85 | FlowHasHangingPunctuation = 1LLU << 48, |
86 | FlowFontHasOverflowGlyph = 1LLU << 49, |
87 | FlowTextHasSurrogatePair = 1LLU << 50, |
88 | MultiColumnFlowIsNotTopLevel = 1LLU << 51, |
89 | MultiColumnFlowHasColumnSpanner = 1LLU << 52, |
90 | MultiColumnFlowVerticalAlign = 1LLU << 53, |
91 | MultiColumnFlowIsFloating = 1LLU << 54, |
92 | FlowIncludesDocumentMarkers = 1LLU << 55, |
93 | EndOfReasons = 1LLU << 56 |
94 | }; |
95 | const unsigned NoReason = 0; |
96 | |
97 | typedef uint64_t AvoidanceReason; |
98 | typedef uint64_t AvoidanceReasonFlags; |
99 | |
100 | enum class IncludeReasons { First , All }; |
101 | |
102 | } |
103 | } |
104 | |