AXTextEditType EditCommand::applyEditType() const { switch (editingAction()) { case EditActionCut: return AXTextEditTypeCut; case EditActionDelete: return AXTextEditTypeDelete; case EditActionDictation: return AXTextEditTypeDictation; case EditActionInsert: return AXTextEditTypeInsert; case EditActionPaste: return AXTextEditTypePaste; case EditActionTyping: return AXTextEditTypeTyping; // Include default case for unhandled EditAction cases. default: break; } return AXTextEditTypeUnknown; }
bool EditCommand::shouldPostAccessibilityNotification() const { return AXObjectCache::accessibilityEnabled() && editingAction() != EditActionUnspecified; }
void RemoveFormatCommand::doApply() { LocalFrame* frame = document().frame(); if (!frame->selection().selection().isNonOrphanedCaretOrRange()) return; // Get the default style for this editable root, it's the style that we'll give the // content that we're operating on. Element* root = frame->selection().rootEditableElement(); RefPtrWillBeRawPtr<EditingStyle> defaultStyle = EditingStyle::create(root); // We want to remove everything but transparent background. // FIXME: We shouldn't access style(). defaultStyle->style()->setProperty(CSSPropertyBackgroundColor, CSSValueTransparent); applyCommandToComposite(ApplyStyleCommand::create(document(), defaultStyle.get(), isElementForRemoveFormatCommand, editingAction())); }