Changeset 57111 in webkit
- Timestamp:
- Apr 5, 2010 6:45:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57109 r57111 1 2010-04-05 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Adele Peterson. 4 5 Test case for <http://webkit.org/b/37115> / <rdar://problem/7829331>. 6 REGRESSION(r56989): Crash in Mail in WebCore::Position::isCandidate when deleting block using block deletion UI 7 8 * platform/mac/editing/deleting/deletionUI-successful-deletion-expected.txt: Added. 9 * platform/mac/editing/deleting/deletionUI-successful-deletion.html: Added. 10 * platform/mac/editing/deleting/resources/deletionUI-helpers.js: 11 (deletionUIDeleteButtonForElement): 12 (determineDeletionUIExistence): 13 1 14 2010-04-05 Darin Adler <darin@apple.com> 2 15 -
trunk/LayoutTests/platform/mac/editing/deleting/resources/deletionUI-helpers.js
r42812 r57111 9 9 } 10 10 11 function determineDeletionUIExistence(id) { 11 function deletionUIDeleteButtonForElement(id) 12 { 12 13 var sel = window.getSelection(); 13 14 var selElement = document.getElementById(id); 14 15 sel.setPosition(selElement, 0); 15 16 var deleteButton = document.getElementById("WebKit-Editing-Delete-Button"); 17 return deleteButton; 18 } 19 20 function determineDeletionUIExistence(id) 21 { 22 var deleteButton = deletionUIDeleteButtonForElement(id); 16 23 debug(id + (deleteButton ? " HAS " : " has NO ") + "deletion UI"); 17 24 } -
trunk/WebKit/mac/ChangeLog
r57095 r57111 1 2010-04-05 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Adele Peterson. 4 5 Test case for <http://webkit.org/b/37115> / <rdar://problem/7829331>. 6 REGRESSION(r56989): Crash in Mail in WebCore::Position::isCandidate when deleting block using block deletion UI 7 8 * WebView/WebHTMLView.mm: 9 (-[WebHTMLView _updateFontPanel]): Ask the window whether it is the key window rather than doing the comparison 10 manually. This allows DumpRenderTree's override of isKeyWindow to force this code path to be taken during tests. 11 1 12 2010-04-05 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/WebKit/mac/WebView/WebHTMLView.mm
r56806 r57111 5028 5028 // FIXME: NSTextView bails out if becoming or resigning first responder, for which it has ivar flags. Not 5029 5029 // sure if we need to do something similar. 5030 5030 5031 5031 if (![self _canEdit]) 5032 5032 return; 5033 5033 5034 5034 NSWindow *window = [self window]; 5035 5035 // FIXME: is this first-responder check correct? What happens if a subframe is editable and is first responder? 5036 if ( [NSApp keyWindow] != window|| [window firstResponder] != self)5037 return; 5038 5036 if (![window isKeyWindow] || [window firstResponder] != self) 5037 return; 5038 5039 5039 bool multipleFonts = false; 5040 5040 NSFont *font = nil; … … 5043 5043 font = fd->getNSFont(); 5044 5044 } 5045 5046 5045 5047 5046 // FIXME: for now, return a bogus font that distinguishes the empty selection from the non-empty -
trunk/WebKitTools/ChangeLog
r57102 r57111 1 2010-04-05 Mark Rowe <mrowe@apple.com> 2 3 Reviewed by Adele Peterson. 4 5 Test case for <http://webkit.org/b/37115> / <rdar://problem/7829331>. 6 REGRESSION(r56989): Crash in Mail in WebCore::Position::isCandidate when deleting block using block deletion UI 7 8 Add a JavaScript hook in DRT to call through to WebView's -setEditable:. This is required in order to reproduce 9 the crash. 10 11 * DumpRenderTree/LayoutTestController.cpp: 12 (setWebViewEditableCallback): 13 (LayoutTestController::staticFunctions): 14 * DumpRenderTree/LayoutTestController.h: 15 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 16 (LayoutTestController::setWebViewEditable): 17 * DumpRenderTree/mac/DumpRenderTree.mm: 18 (resetWebViewToConsistentStateBeforeTesting): 19 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 20 (LayoutTestController::setWebViewEditable): 21 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 22 (LayoutTestController::setWebViewEditable): 23 * DumpRenderTree/wx/LayoutTestControllerWx.cpp: 24 (LayoutTestController::setWebViewEditable): 25 (LayoutTestController::layerTreeAsText): 26 1 27 2010-04-05 Darin Adler <darin@apple.com> 2 28 -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r56934 r57111 1331 1331 return JSValueMakeUndefined(context); 1332 1332 } 1333 1334 static JSValueRef setWebViewEditableCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1335 { 1336 // Has Mac implementation 1337 if (argumentCount < 1) 1338 return JSValueMakeUndefined(context); 1339 1340 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1341 controller->setWebViewEditable(JSValueToBoolean(context, arguments[0])); 1342 1343 return JSValueMakeUndefined(context); 1344 } 1345 1333 1346 1334 1347 // Static Values … … 1470 1483 { "setAuthenticationUsername", setAuthenticationUsernameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1471 1484 { "setAuthorAndUserStylesEnabled", setAuthorAndUserStylesEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1485 { "setCacheModel", setCacheModelCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1472 1486 { "setCallCloseOnWebViews", setCallCloseOnWebViewsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1473 1487 { "setCanOpenWindows", setCanOpenWindowsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1474 { "setCacheModel", setCacheModelCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1475 1488 { "setCloseRemainingWindowsWhenComplete", setCloseRemainingWindowsWhenCompleteCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1476 1489 { "setCustomPolicyDelegate", setCustomPolicyDelegateCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1477 1490 { "setDatabaseQuota", setDatabaseQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1478 1491 { "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1492 { "setFrameFlatteningEnabled", setFrameFlatteningEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1479 1493 { "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1480 1494 { "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1481 { "setPOSIXLocale", setPOSIXLocaleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1482 1495 { "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1483 1496 { "setJavaScriptProfilingEnabled", setJavaScriptProfilingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1484 1497 { "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1498 { "setMockGeolocationError", setMockGeolocationErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1485 1499 { "setMockGeolocationPosition", setMockGeolocationPositionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1486 { "setMockGeolocationError", setMockGeolocationErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1487 1500 { "setNewWindowsCopyBackForwardList", setNewWindowsCopyBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1501 { "setPOSIXLocale", setPOSIXLocaleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1488 1502 { "setPersistentUserStyleSheetLocation", setPersistentUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1489 1503 { "setPopupBlockingEnabled", setPopupBlockingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1490 1504 { "setPrivateBrowsingEnabled", setPrivateBrowsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1491 { "setXSSAuditorEnabled", setXSSAuditorEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1492 { "setSpatialNavigationEnabled", setSpatialNavigationEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1493 { "setFrameFlatteningEnabled", setFrameFlatteningEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },1494 1505 { "setSelectTrailingWhitespaceEnabled", setSelectTrailingWhitespaceEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1495 1506 { "setSmartInsertDeleteEnabled", setSmartInsertDeleteEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1507 { "setSpatialNavigationEnabled", setSpatialNavigationEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1496 1508 { "setStopProvisionalFrameLoads", setStopProvisionalFrameLoadsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1497 1509 { "setTabKeyCyclesThroughElements", setTabKeyCyclesThroughElementsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 1500 1512 { "setUserStyleSheetEnabled", setUserStyleSheetEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1501 1513 { "setUserStyleSheetLocation", setUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1514 { "setWebViewEditable", setWebViewEditableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1502 1515 { "setWillSendRequestClearHeader", setWillSendRequestClearHeaderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1503 1516 { "setWillSendRequestReturnsNull", setWillSendRequestReturnsNullCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1504 1517 { "setWillSendRequestReturnsNullOnRedirect", setWillSendRequestReturnsNullOnRedirectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1505 1518 { "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1519 { "setXSSAuditorEnabled", setXSSAuditorEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1506 1520 { "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1507 1521 { "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r56934 r57111 241 241 242 242 void setPOSIXLocale(JSStringRef locale); 243 243 244 void setWebViewEditable(bool); 245 244 246 // The following API test functions should probably be moved to platform-specific 245 247 // unit tests outside of DRT once they exist. -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r56952 r57111 644 644 645 645 } 646 647 void LayoutTestController::setWebViewEditable(bool) 648 { 649 } -
trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
r56718 r57111 1143 1143 { 1144 1144 WebView *webView = [mainFrame webView]; 1145 [webView setEditable:NO]; 1145 1146 [(EditingDelegate *)[webView editingDelegate] setAcceptsEditing:YES]; 1146 1147 [webView makeTextStandardSize:nil]; -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r56934 r57111 712 712 [view goToBackForwardItem:[[view backForwardList] currentItem]]; 713 713 } 714 715 void LayoutTestController::setWebViewEditable(bool editable) 716 { 717 WebView *view = [mainFrame webView]; 718 [view setEditable:editable]; 719 } -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r56934 r57111 1212 1212 webView->goToBackForwardItem(item.get(), &success); 1213 1213 } 1214 1215 void LayoutTestController::setWebViewEditable(bool) 1216 { 1217 } -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r57005 r57111 398 398 } 399 399 400 void LayoutTestController::setWebViewEditable(bool) 401 { 402 } 403 400 404 bool LayoutTestController::callShouldCloseOnWebView() 401 405 { … … 407 411 return 0; 408 412 } 409
Note: See TracChangeset
for help on using the changeset viewer.