コード例 #1
0
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;
}
コード例 #2
0
ファイル: EditCommand.cpp プロジェクト: biddyweb/switch-oss
bool EditCommand::shouldPostAccessibilityNotification() const
{
    return AXObjectCache::accessibilityEnabled() && editingAction() != EditActionUnspecified;
}
コード例 #3
0
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()));
}