-
rniwa@webkit.org authored
Reviewed by Darin Adler. selectionHasStyle and selectionStartHasStyle should use EditingStyle https://bugs.webkit.org/show_bug.cgi?id=55902 selectionHasStyle now takes a property id and a value instead of a CSSMutableStyleDeclaration. * src/ContextMenuClientImpl.cpp: (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems): Calls selectionHasStyle. 2011-03-07 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. selectionHasStyle and selectionStartHasStyle should use EditingStyle https://bugs.webkit.org/show_bug.cgi?id=55902 selectionHasStyle now takes a property id and a value instead of a CSSMutableStyleDeclaration. * WebView/WebHTMLView.mm: Removed unused selectionHasStyle. (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Calls Editor::selectionHasStyle. 2011-03-07 Ryosuke Niwa <rniwa@webkit.org> Reviewed by Darin Adler. selectionHasStyle and selectionStartHasStyle should use EditingStyle https://bugs.webkit.org/show_bug.cgi?id=55902 Deployed EditingStyle in selectionHasStyle and selectionStartHasStyle. This allowed us to move triStateOfStyle from Editor.cpp to EditingStyle.cpp. Also changed the argument lists of selectionHasStyle and selectionStartHasStyle to take a property id and a value instead of a CSSMutableStyleDeclaration to cleanup call sites of these two functions. * WebCore.exp.in: Updated the signature of selectionHasStyle. No longer exports selectionStartHasStyle because it's not called anywhere outside of WebCore. * WebCore.order: Ditto. * editing/EditingStyle.cpp: (WebCore::EditingStyle::EditingStyle): Added a new constructor that takes a property id and a property value. (WebCore::EditingStyle::triStateOfStyle): Moved from Editor.cpp. * editing/EditingStyle.h: (WebCore::EditingStyle::create): Added. * editing/Editor.cpp: (WebCore::Editor::selectionStartHasStyle): Takes a property id and a value instead of a CSSStyleDeclaration. (WebCore::Editor::selectionHasStyle): Ditto. * editing/Editor.h: Updated the signatures of selectionStartHasStyle and selectionHasStyle. * editing/EditorCommand.cpp: (WebCore::executeToggleStyle): Calls selectionStartHasStyle and selectionHasStyle. (WebCore::stateStyle): Ditto. * page/ContextMenuController.cpp: (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80528 268f45cc-cd09-0410-ab3c-d52691b4dbfc
f9c8d307