+2006-11-06 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ Make sure that alerts and delegate output made after notifyDone() are ignored, rather than
+ being attributed to the next test.
+
+ * DumpRenderTree/EditingDelegate.m:
+ (-[EditingDelegate webView:shouldBeginEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldEndEditingInDOMRange:]):
+ (-[EditingDelegate webView:shouldInsertNode:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldInsertText:replacingDOMRange:givenAction:]):
+ (-[EditingDelegate webView:shouldDeleteDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
+ (-[EditingDelegate webView:shouldApplyStyle:toElementsInDOMRange:]):
+ (-[EditingDelegate webView:shouldChangeTypingStyle:toStyle:]):
+ (-[EditingDelegate webViewDidBeginEditing:]):
+ (-[EditingDelegate webViewDidChange:]):
+ (-[EditingDelegate webViewDidEndEditing:]):
+ (-[EditingDelegate webViewDidChangeTypingStyle:]):
+ (-[EditingDelegate webViewDidChangeSelection:]):
+ * DumpRenderTree/UIDelegate.m:
+ (-[UIDelegate webView:runJavaScriptAlertPanelWithMessage:]):
+
2006-11-06 Mark Rowe <bdash@webkit.org>
Reviewed by Alexey.
- (BOOL)webView:(WebView *)webView shouldBeginEditingInDOMRange:(DOMRange *)range
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldBeginEditingInDOMRange:%s\n", [[range dump] UTF8String]);
return acceptsEditing;
}
- (BOOL)webView:(WebView *)webView shouldEndEditingInDOMRange:(DOMRange *)range
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldEndEditingInDOMRange:%s\n", [[range dump] UTF8String]);
return acceptsEditing;
}
"WebViewInsertActionDropped",
};
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldInsertNode:%s replacingDOMRange:%s givenAction:%s\n", [[node dumpPath] UTF8String], [[range dump] UTF8String], insertactionstring[action]);
return acceptsEditing;
}
"WebViewInsertActionDropped",
};
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:%s givenAction:%s\n", [[text description] UTF8String], [[range dump] UTF8String], insertactionstring[action]);
return acceptsEditing;
}
- (BOOL)webView:(WebView *)webView shouldDeleteDOMRange:(DOMRange *)range
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldDeleteDOMRange:%s\n", [[range dump] UTF8String]);
return acceptsEditing;
}
"TRUE"
};
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldChangeSelectedDOMRange:%s toDOMRange:%s affinity:%s stillSelecting:%s\n", [[currentRange dump] UTF8String], [[proposedRange dump] UTF8String], affinitystring[selectionAffinity], boolstring[flag]);
return acceptsEditing;
}
- (BOOL)webView:(WebView *)webView shouldApplyStyle:(DOMCSSStyleDeclaration *)style toElementsInDOMRange:(DOMRange *)range
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:%s\n", [[style description] UTF8String], [[range dump] UTF8String]);
return acceptsEditing;
}
- (BOOL)webView:(WebView *)webView shouldChangeTypingStyle:(DOMCSSStyleDeclaration *)currentStyle toStyle:(DOMCSSStyleDeclaration *)proposedStyle
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: shouldChangeTypingStyle:%s toStyle:%s\n", [[currentStyle description] UTF8String], [[proposedStyle description] UTF8String]);
return acceptsEditing;
}
- (void)webViewDidBeginEditing:(NSNotification *)notification
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: webViewDidBeginEditing:%s\n", [[notification name] UTF8String]);
}
- (void)webViewDidChange:(NSNotification *)notification
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: webViewDidChange:%s\n", [[notification name] UTF8String]);
}
- (void)webViewDidEndEditing:(NSNotification *)notification
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: webViewDidEndEditing:%s\n", [[notification name] UTF8String]);
}
- (void)webViewDidChangeTypingStyle:(NSNotification *)notification
{
- if (shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: webViewDidChangeTypingStyle:%s\n", [[notification name] UTF8String]);
}
- (void)webViewDidChangeSelection:(NSNotification *)notification
{
- if (!doneLoading() && shouldDumpEditingCallbacks)
+ if (shouldDumpEditingCallbacks && !doneLoading())
printf("EDITING DELEGATE: webViewDidChangeSelection:%s\n", [[notification name] UTF8String]);
}