⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283356 in webkit


Ignore:
Timestamp:
Sep 30, 2021, 8:24:27 PM (5 years ago)
Author:
weinig@apple.com
Message:

Add dumping for UIViews with separated layers
https://bugs.webkit.org/show_bug.cgi?id=231056

Reviewed by Tim Horton.

  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(allowListedClassToString):
Fix typo from previous patch where a comma was missed
and remove unnecessary assertion.

(dumpUIView):
Use the new dumpSeparatedLayerProperties when separated layers
are present.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r283353 r283356  
     12021-09-30  Sam Weinig  <weinig@apple.com>
     2
     3        Add dumping for UIViews with separated layers
     4        https://bugs.webkit.org/show_bug.cgi?id=231056
     5
     6        Reviewed by Tim Horton.
     7
     8        * UIProcess/API/ios/WKWebViewTestingIOS.mm:
     9        (allowListedClassToString):
     10        Fix typo from previous patch where a comma was missed
     11        and remove unnecessary assertion.
     12
     13        (dumpUIView):
     14        Use the new dumpSeparatedLayerProperties when separated layers
     15        are present.
     16
    1172021-09-30  Simon Fraser  <simon.fraser@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm

    r281825 r283356  
    11/*
    2  * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2021 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4545#import <wtf/text/TextStream.h>
    4646
     47#if HAVE(CORE_ANIMATION_SEPARATED_LAYERS)
     48#if USE(APPLE_INTERNAL_SDK)
     49#import <WebKitAdditions/SeparatedLayerAdditions.h>
     50#else
     51static void dumpSeparatedLayerProperties(TextStream&, CALayer *) { }
     52#endif
     53#endif
     54
    4755@implementation WKWebView (WKTestingIOS)
    4856
     
    235243        "WKRemoteView",
    236244        "WKScrollView",
    237         "WKSeparatedModelView"
     245        "WKSeparatedModelView",
    238246        "WKShapeView",
    239247        "WKSimpleBackdropView",
     
    248256    if (allowedClasses.contains(classString))
    249257        return classString;
    250    
    251     ASSERT(classString != "WKCompositingView");
     258
    252259    return makeString("<class not in allowed list of classes>");
    253260}
     
    279286    if (view.layer.anchorPointZ != 0)
    280287        ts.dumpProperty("layer anchorPointZ", makeString(view.layer.anchorPointZ));
     288
     289#if HAVE(CORE_ANIMATION_SEPARATED_LAYERS)
     290    if (view.layer.separated) {
     291        TextStream::GroupScope scope(ts);
     292        ts << "separated";
     293        dumpSeparatedLayerProperties(ts, view.layer);
     294    }
     295#endif
    281296
    282297    if (view.subviews.count > 0) {
Note: See TracChangeset for help on using the changeset viewer.