Cache module-removal descriptor ownership and verify hidden shared skin shortcut

这个提交包含在:
mac 于 2026-11-02 23:41:24 +08:00 提交
1 父节点 72a0269fe7
当前提交 c18a0890ed
2 个文件已更改
+14 -4

没有与搜索条件相匹配的文件

@@ -2,7 +2,7 @@
// actual header actions on isolated hosts, then feed stale state to rendering.
{
auto pumpDeletion=[](){double end=NSProcessInfo.processInfo.systemUptime+.035;while(NSProcessInfo.processInfo.systemUptime<end)[[NSRunLoop mainRunLoop]runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.002]];};
BOOL everyButton=YES,everyReset=YES,everyAsset=YES,everyUndo=YES,everyReopen=YES,everyFresh=YES,everyExtra=YES,everyLayout=YES,sharedSkin=YES;
BOOL everyButton=YES,everyReset=YES,everyAsset=YES,everyUndo=YES,everyReopen=YES,everyFresh=YES,everyExtra=YES,everyLayout=YES,sharedSkin=YES,skinShortcut=YES;
for(NSString *type in DYToolTypes()){@autoreleasepool{
DYDiagnosticManager *host=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(host,nil);
NSArray *owned=DYBaseToolDescriptors(type);NSMutableSet *ownedIDs=[NSMutableSet set];
@@ -22,6 +22,7 @@
everyReset&=[host->_values[neighbor[@"pid"]]doubleValue]==19&&[host->_keyframes[neighbor[@"pid"]]intValue]==2&&DYBaseToolRemoved(deleted,type)&&[(NSView *)card[@"view"]isHidden]&&![DYMasksForTool(deleted,[@"base:" stringByAppendingString:type])count]&&[deleted[@"baseMasks"][other]isEqual:doc[@"baseMasks"][other]]&&DYToolWithID(deleted,siblingID)!=nil;
everyUndo&=host->_undoStarts==undo+1&&host->_undoStarts==host->_undoEnds&&!host->_undoActive;
if([type isEqual:@"base"])sharedSkin&=[host->_values[skinPID]intValue]==0&&[host->_keyframes[skinPID]intValue]==4;
if([type isEqual:@"skin"])skinShortcut&=[(NSView *)[view valueForKey:@"controls"][skinPID][@"row"]isHidden];
DYAssetState *cleared=DYReadAssets(host,kCMTimeZero);NSMutableDictionary *expected=[[assets.paths mutableCopy]autorelease];if([type isEqual:@"primary"])[expected removeObjectForKey:@"input"];if([type isEqual:@"look"]){[expected removeObjectForKey:@"look0"];[expected removeObjectForKey:@"look4"];}
everyAsset&=[cleared.paths isEqual:expected]&&([type isEqual:@"spider"]?cleared.spiderMesh==nil&&cleared.spiderLinked:[cleared.spiderMesh isEqual:assets.spiderMesh]&&!cleared.spiderLinked);
NSDictionary *preset=[view presetSnapshot];NSData *toolData=[[[NSData alloc]initWithBase64EncodedString:preset[@"tools"] options:0]autorelease];NSDictionary *presetDoc=[NSPropertyListSerialization propertyListWithData:toolData options:0 format:NULL error:nil];
@@ -43,6 +44,7 @@
run.record(@"deleting-extra-layer-removes-its-state-and-keeps-child-and-neighbor",everyExtra);
run.record(@"narrow-header-keeps-mask-add-delete-and-reset-within-card",everyLayout);
run.record(@"deleting-basic-adjustment-preserves-independent-skin-switch-and-animation",sharedSkin);
run.record(@"deleted-skin-module-hides-its-shared-basic-adjustment-shortcut",skinShortcut);
DYDiagnosticManager *failureHost=[[[DYDiagnosticManager alloc]init]autorelease];DYCreateParameters(failureHost,nil);failureHost->_keyframeQueryFailure=YES;failureHost->_values[@2000]=@2;NSError *resetFailure=nil;run.record(@"keyframe-query-failure-leaves-author-parameters-unchanged",!DYResetToolParameters(failureHost,DYBaseToolDescriptors(@"base"),kCMTimeZero,&resetFailure)&&resetFailure&&[failureHost->_values[@2000]intValue]==2);
NSMutableDictionary *bad=DYMutablePlist([[[DYToolDocument alloc]init]autorelease].document);bad[@"removedBase"]=@[@"hsl",@"hsl"];run.record(@"removed-base-document-rejects-duplicates",!DYValidToolDocument(bad));bad[@"removedBase"]=@[@"unknown"];run.record(@"removed-base-document-rejects-unknown-modules",!DYValidToolDocument(bad));
// A stale host value from another time must not affect a deleted module.