Changeset 267468 in webkit
- Timestamp:
- Sep 23, 2020, 5:03:57 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 added
- 6 edited
-
ChangeLog (modified) (1 diff)
-
Sources.txt (modified) (1 diff)
-
WebCore.xcodeproj/project.pbxproj (modified) (5 diffs)
-
layout/integration/LayoutIntegrationCoverage.cpp (added)
-
layout/integration/LayoutIntegrationCoverage.h (added)
-
layout/integration/LayoutIntegrationLineLayout.cpp (modified) (2 diffs)
-
layout/integration/LayoutIntegrationLineLayout.h (modified) (1 diff)
-
rendering/RenderBlockFlow.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r267465 r267468 1 2020-09-23 Antti Koivisto <antti@apple.com> 2 3 [LFC][Integration] Add canUseFor functions 4 https://bugs.webkit.org/show_bug.cgi?id=216869 5 6 Reviewed by Zalan Bujtas. 7 8 Copy the SLL canUseFor code. 9 10 * Sources.txt: 11 * WebCore.xcodeproj/project.pbxproj: 12 * layout/integration/LayoutIntegrationCoverage.cpp: Added. 13 (WebCore::LayoutIntegration::canUseForCharacter): 14 (WebCore::LayoutIntegration::canUseForText): 15 (WebCore::LayoutIntegration::canUseForFontAndText): 16 (WebCore::LayoutIntegration::canUseForStyle): 17 (WebCore::LayoutIntegration::canUseForLineLayoutWithReason): 18 (WebCore::LayoutIntegration::canUseForLineLayout): 19 (WebCore::LayoutIntegration::canUseForLineLayoutAfterStyleChange): 20 * layout/integration/LayoutIntegrationCoverage.h: Added. 21 22 Also switch to OptionSet. 23 24 * layout/integration/LayoutIntegrationLineLayout.cpp: 25 (WebCore::LayoutIntegration::LineLayout::isEnabled): 26 (WebCore::LayoutIntegration::LineLayout::canUseFor): 27 (WebCore::LayoutIntegration::LineLayout::canUseForAfterStyleChange): 28 * layout/integration/LayoutIntegrationLineLayout.h: 29 (WebCore::LayoutIntegration::LineLayout::canUseFor): Deleted. 30 * rendering/RenderBlockFlow.cpp: 31 (WebCore::RenderBlockFlow::layoutInlineChildren): 32 1 33 2020-09-23 Zalan Bujtas <zalan@apple.com> 2 34 -
trunk/Source/WebCore/Sources.txt
r267463 r267468 1456 1456 layout/inlineformatting/text/TextUtil.cpp 1457 1457 layout/integration/LayoutIntegrationBoxTree.cpp 1458 layout/integration/LayoutIntegrationCoverage.cpp 1458 1459 layout/integration/LayoutIntegrationLineLayout.cpp 1459 1460 layout/integration/LayoutIntegrationPagination.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r267463 r267468 4976 4976 E401C27517CE53EC00C41A35 /* ElementIteratorAssertions.h in Headers */ = {isa = PBXBuildFile; fileRef = E401C27417CE53EC00C41A35 /* ElementIteratorAssertions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4977 4977 E401E0A41C3C0B8300F34D10 /* StyleChange.h in Headers */ = {isa = PBXBuildFile; fileRef = E401E0A31C3C0B8300F34D10 /* StyleChange.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4978 E403B7A2251B11930019E800 /* LayoutIntegrationCoverage.h in Headers */ = {isa = PBXBuildFile; fileRef = E403B7A1251B11930019E800 /* LayoutIntegrationCoverage.h */; }; 4979 E403B7A3251B11C10019E800 /* LayoutIntegrationPagination.h in Headers */ = {isa = PBXBuildFile; fileRef = E4312AB724B3265600678349 /* LayoutIntegrationPagination.h */; }; 4978 4980 E418025523D4549B00FFB071 /* LayoutIntegrationBoxTree.h in Headers */ = {isa = PBXBuildFile; fileRef = E418025323D4549A00FFB071 /* LayoutIntegrationBoxTree.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4979 4981 E419041F1CC6486B00C35F5D /* FontSelectorClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E419041E1CC6486B00C35F5D /* FontSelectorClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 15815 15817 E401E0A31C3C0B8300F34D10 /* StyleChange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleChange.h; sourceTree = "<group>"; }; 15816 15818 E401E0A51C3C0CF700F34D10 /* StyleChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleChange.cpp; sourceTree = "<group>"; }; 15819 E403B79F251B118B0019E800 /* LayoutIntegrationCoverage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutIntegrationCoverage.cpp; sourceTree = "<group>"; }; 15820 E403B7A1251B11930019E800 /* LayoutIntegrationCoverage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationCoverage.h; sourceTree = "<group>"; }; 15817 15821 E406F3FB1198307D009D59D6 /* ColorData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorData.cpp; path = DerivedSources/WebCore/ColorData.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; 15818 15822 E418025323D4549A00FFB071 /* LayoutIntegrationBoxTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutIntegrationBoxTree.h; sourceTree = "<group>"; }; … … 28444 28448 isa = PBXGroup; 28445 28449 children = ( 28450 E418025623D454B500FFB071 /* LayoutIntegrationBoxTree.cpp */, 28451 E418025323D4549A00FFB071 /* LayoutIntegrationBoxTree.h */, 28452 E403B79F251B118B0019E800 /* LayoutIntegrationCoverage.cpp */, 28453 E403B7A1251B11930019E800 /* LayoutIntegrationCoverage.h */, 28454 E4ABABDE2360893D00FA4345 /* LayoutIntegrationLineLayout.cpp */, 28455 E4ABABDB236088FD00FA4345 /* LayoutIntegrationLineLayout.h */, 28446 28456 E4312AB524B3265600678349 /* LayoutIntegrationPagination.cpp */, 28447 28457 E4312AB724B3265600678349 /* LayoutIntegrationPagination.h */, 28448 E418025623D454B500FFB071 /* LayoutIntegrationBoxTree.cpp */,28449 E418025323D4549A00FFB071 /* LayoutIntegrationBoxTree.h */,28450 E4ABABDE2360893D00FA4345 /* LayoutIntegrationLineLayout.cpp */,28451 E4ABABDB236088FD00FA4345 /* LayoutIntegrationLineLayout.h */,28452 28458 ); 28453 28459 path = integration; … … 32784 32790 AB31C91E10AE1B8E000C7B92 /* LineClampValue.h in Headers */, 32785 32791 FFEFAB2A18380DA000514534 /* LineLayoutState.h in Headers */, 32792 E403B7A2251B11930019E800 /* LayoutIntegrationCoverage.h in Headers */, 32786 32793 E484A33E23055325009ADE6A /* LineLayoutTraversal.h in Headers */, 32787 32794 E4343D252392779000EBBB66 /* LineLayoutTraversalComplexPath.h in Headers */, … … 33652 33659 1400D7A817136EA70077CE05 /* ScriptWrappableInlines.h in Headers */, 33653 33660 BC8AE34F12EA096A00EB3AE6 /* ScrollableArea.h in Headers */, 33661 E403B7A3251B11C10019E800 /* LayoutIntegrationPagination.h in Headers */, 33654 33662 5D925B680F64D4DD00B847F0 /* ScrollAlignment.h in Headers */, 33655 33663 CA3BF67E10D99BAE00E6CE53 /* ScrollAnimator.h in Headers */, -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp
r267463 r267468 38 38 #include "InvalidationState.h" 39 39 #include "LayoutBoxGeometry.h" 40 #include "LayoutIntegrationCoverage.h" 40 41 #include "LayoutIntegrationPagination.h" 41 42 #include "LayoutTreeBuilder.h" … … 66 67 LineLayout::~LineLayout() = default; 67 68 68 bool LineLayout::canUseFor(const RenderBlockFlow& flow, Optional<bool> couldUseSimpleLineLayout) 69 { 70 if (!RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled()) 69 bool LineLayout::isEnabled() 70 { 71 return RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled(); 72 } 73 74 bool LineLayout::canUseFor(const RenderBlockFlow& flow) 75 { 76 if (!isEnabled()) 71 77 return false; 72 78 73 // Initially only a subset of SLL features is supported. 74 auto passesSimpleLineLayoutTest = valueOrCompute(couldUseSimpleLineLayout, [&] { 75 return SimpleLineLayout::canUseFor(flow); 76 }); 77 78 return passesSimpleLineLayoutTest; 79 return canUseForLineLayout(flow); 79 80 } 80 81 81 82 bool LineLayout::canUseForAfterStyleChange(const RenderBlockFlow& flow, StyleDifference diff) 82 83 { 83 ASSERT( RuntimeEnabledFeatures::sharedFeatures().layoutFormattingContextIntegrationEnabled());84 return SimpleLineLayout::canUseForAfterStyleChange(flow, diff);84 ASSERT(isEnabled()); 85 return canUseForLineLayoutAfterStyleChange(flow, diff); 85 86 } 86 87 -
trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h
r267463 r267468 56 56 ~LineLayout(); 57 57 58 static bool canUseFor(const RenderBlockFlow&, Optional<bool> couldUseSimpleLineLayout = { }); 58 static bool isEnabled(); 59 static bool canUseFor(const RenderBlockFlow&); 59 60 static bool canUseForAfterStyleChange(const RenderBlockFlow&, StyleDifference); 60 61 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r267463 r267468 670 670 { 671 671 auto computeLineLayoutPath = [&] { 672 bool canUseSimpleLines = SimpleLineLayout::canUseFor(*this);672 bool isIntegrationEnabled = false; 673 673 #if ENABLE(LAYOUT_FORMATTING_CONTEXT) 674 if (LayoutIntegration::LineLayout::canUseFor(*this , canUseSimpleLines))674 if (LayoutIntegration::LineLayout::canUseFor(*this)) 675 675 return LayoutFormattingContextPath; 676 isIntegrationEnabled = LayoutIntegration::LineLayout::isEnabled(); 676 677 #endif 677 if ( canUseSimpleLines)678 if (!isIntegrationEnabled && SimpleLineLayout::canUseFor(*this)) 678 679 return SimpleLinesPath; 679 680
Note:
See TracChangeset
for help on using the changeset viewer.