Changeset 293233 in webkit


Ignore:
Timestamp:
Apr 22, 2022, 11:25:20 AM (3 years ago)
Author:
Alan Bujtas
Message:

[LFC][Integration] Add FlexFormattingContextIntegrationEnabled setting
https://bugs.webkit.org/show_bug.cgi?id=239654

Reviewed by Antti Koivisto.

Source/WebCore:

This is in preparation for supporting flex formatting context through integration.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForFlexLayout):

  • layout/integration/LayoutIntegrationCoverage.h:
  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::layoutUsingFlexFormattingContext):

  • rendering/RenderFlexibleBox.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:
Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r293202 r293233  
     12022-04-22  Alan Bujtas  <zalan@apple.com>
     2
     3        [LFC][Integration] Add FlexFormattingContextIntegrationEnabled setting
     4        https://bugs.webkit.org/show_bug.cgi?id=239654
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * Scripts/Preferences/WebPreferencesInternal.yaml:
     9
    1102022-04-20  Yusuke Suzuki  <ysuzuki@apple.com>
    211
  • trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml

    r293114 r293233  
    304304      default: true
    305305
     306FlexFormattingContextIntegrationEnabled:
     307  type: bool
     308  humanReadableName: "Next-generation flex layout integration (FFC)"
     309  humanReadableDescription: "Enable next-generation flex layout integration (FFC)"
     310  condition: ENABLE(LAYOUT_FORMATTING_CONTEXT)
     311  defaultValue:
     312    WebKitLegacy:
     313      default: false
     314    WebKit:
     315      default: false
     316    WebCore:
     317      default: false
     318
    306319# FIXME: This should be reconciled with 'FrameFlattening' in WebPreferences.yaml .
    307320FrameFlatteningEnabled:
  • trunk/Source/WebCore/ChangeLog

    r293232 r293233  
     12022-04-22  Alan Bujtas  <zalan@apple.com>
     2
     3        [LFC][Integration] Add FlexFormattingContextIntegrationEnabled setting
     4        https://bugs.webkit.org/show_bug.cgi?id=239654
     5
     6        Reviewed by Antti Koivisto.
     7
     8        This is in preparation for supporting flex formatting context through integration.
     9
     10        * layout/integration/LayoutIntegrationCoverage.cpp:
     11        (WebCore::LayoutIntegration::canUseForFlexLayout):
     12        * layout/integration/LayoutIntegrationCoverage.h:
     13        * rendering/RenderFlexibleBox.cpp:
     14        (WebCore::RenderFlexibleBox::layoutFlexItems):
     15        (WebCore::RenderFlexibleBox::layoutUsingFlexFormattingContext):
     16        * rendering/RenderFlexibleBox.h:
     17
    1182022-04-22  Brandon Stewart  <brandonstewart@apple.com>
    219
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp

    r293114 r293233  
    675675}
    676676
    677 }
    678 }
    679 
    680 #endif
     677bool canUseForFlexLayout(const RenderFlexibleBox& flexBox)
     678{
     679    if (!flexBox.document().settings().flexFormattingContextIntegrationEnabled())
     680        return false;
     681    ASSERT_NOT_IMPLEMENTED_YET();
     682    return false;
     683}
     684
     685}
     686}
     687
     688#endif
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.h

    r291134 r293233  
    3434
    3535class RenderBlockFlow;
     36class RenderFlexibleBox;
    3637class RenderInline;
    3738
     
    108109bool canUseForLineLayoutAfterInlineBoxStyleChange(const RenderInline&, StyleDifference);
    109110
     111bool canUseForFlexLayout(const RenderFlexibleBox&);
     112
    110113enum class IncludeReasons { First , All };
    111114OptionSet<AvoidanceReason> canUseForLineLayoutWithReason(const RenderBlockFlow&, IncludeReasons);
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp

    r292416 r293233  
    3535#include "HitTestResult.h"
    3636#include "InspectorInstrumentation.h"
     37#include "LayoutIntegrationCoverage.h"
    3738#include "LayoutRepainter.h"
    3839#include "RenderChildIterator.h"
     
    11231124void RenderFlexibleBox::layoutFlexItems(bool relayoutChildren)
    11241125{
     1126#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     1127    if (LayoutIntegration::canUseForFlexLayout(*this))
     1128        return layoutUsingFlexFormattingContext();
     1129#endif
    11251130    Vector<LineContext> lineContexts;
    11261131    LayoutUnit sumFlexBaseSize;
     
    23362341    return minimumValueForLength(gapLength.length(), availableSize);
    23372342}
    2338 }
     2343
     2344#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     2345void RenderFlexibleBox::layoutUsingFlexFormattingContext()
     2346{
     2347}
     2348#endif
     2349
     2350}
  • trunk/Source/WebCore/rendering/RenderFlexibleBox.h

    r291992 r293233  
    209209    void resetHasDefiniteHeight() { m_hasDefiniteHeight = SizeDefiniteness::Unknown; }
    210210
     211#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     212    void layoutUsingFlexFormattingContext();
     213#endif
     214
    211215    // This is used to cache the preferred size for orthogonal flow children so we
    212216    // don't have to relayout to get it
Note: See TracChangeset for help on using the changeset viewer.