Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: sky/engine/core/editing/EditorCommand.cpp

Issue 681553003: Remove a bunch of unused or never-set settings. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/editing/Caret.cpp ('k') | sky/engine/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2009 Igalia S.L. 4 * Copyright (C) 2009 Igalia S.L.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 return true; 400 return true;
401 } 401 }
402 402
403 static bool enabledVisibleSelection(LocalFrame& frame, Event* event, EditorComma ndSource) 403 static bool enabledVisibleSelection(LocalFrame& frame, Event* event, EditorComma ndSource)
404 { 404 {
405 // The term "visible" here includes a caret in editable text or a range in a ny text. 405 // The term "visible" here includes a caret in editable text or a range in a ny text.
406 const VisibleSelection& selection = frame.editor().selectionForCommand(event ); 406 const VisibleSelection& selection = frame.editor().selectionForCommand(event );
407 return (selection.isCaret() && selection.isContentEditable()) || selection.i sRange(); 407 return (selection.isCaret() && selection.isContentEditable()) || selection.i sRange();
408 } 408 }
409 409
410 static bool caretBrowsingEnabled(LocalFrame& frame)
411 {
412 return frame.settings() && frame.settings()->caretBrowsingEnabled();
413 }
414
415 static EditorCommandSource dummyEditorCommandSource = static_cast<EditorCommandS ource>(0);
416
417 static bool enabledVisibleSelectionOrCaretBrowsing(LocalFrame& frame, Event* eve nt, EditorCommandSource)
418 {
419 // The EditorCommandSource parameter is unused in enabledVisibleSelection, s o just pass a dummy variable
420 return caretBrowsingEnabled(frame) || enabledVisibleSelection(frame, event, dummyEditorCommandSource);
421 }
422
423 static bool enabledCopy(LocalFrame& frame, Event*, EditorCommandSource) 410 static bool enabledCopy(LocalFrame& frame, Event*, EditorCommandSource)
424 { 411 {
425 return frame.editor().canDHTMLCopy() || frame.editor().canCopy(); 412 return frame.editor().canDHTMLCopy() || frame.editor().canCopy();
426 } 413 }
427 414
428 static bool enabledCut(LocalFrame& frame, Event*, EditorCommandSource) 415 static bool enabledCut(LocalFrame& frame, Event*, EditorCommandSource)
429 { 416 {
430 return frame.editor().canDHTMLCut() || frame.editor().canCut(); 417 return frame.editor().canDHTMLCut() || frame.editor().canCut();
431 } 418 }
432 419
433 static bool enabledInEditableText(LocalFrame& frame, Event* event, EditorCommand Source) 420 static bool enabledInEditableText(LocalFrame& frame, Event* event, EditorCommand Source)
434 { 421 {
435 return frame.editor().selectionForCommand(event).rootEditableElement(); 422 return frame.editor().selectionForCommand(event).rootEditableElement();
436 } 423 }
437 424
438 static bool enabledInEditableTextOrCaretBrowsing(LocalFrame& frame, Event* event , EditorCommandSource)
439 {
440 // The EditorCommandSource parameter is unused in enabledInEditableText, so just pass a dummy variable
441 return caretBrowsingEnabled(frame) || enabledInEditableText(frame, event, du mmyEditorCommandSource);
442 }
443
444 static bool enabledInRichlyEditableText(LocalFrame& frame, Event*, EditorCommand Source) 425 static bool enabledInRichlyEditableText(LocalFrame& frame, Event*, EditorCommand Source)
445 { 426 {
446 return frame.selection().isCaretOrRange() && frame.selection().isContentRich lyEditable() && frame.selection().rootEditableElement(); 427 return frame.selection().isCaretOrRange() && frame.selection().isContentRich lyEditable() && frame.selection().rootEditableElement();
447 } 428 }
448 429
449 static bool enabledPaste(LocalFrame& frame, Event*, EditorCommandSource) 430 static bool enabledPaste(LocalFrame& frame, Event*, EditorCommandSource)
450 { 431 {
451 return frame.editor().canPaste(); 432 return frame.editor().canPaste();
452 } 433 }
453 434
(...skipping 19 matching lines...) Expand all
473 // If you add new commands, you should assign new Id to each idForUserMetric s and update MappedEditingCommands 454 // If you add new commands, you should assign new Id to each idForUserMetric s and update MappedEditingCommands
474 // in chrome/trunk/src/tools/metrics/histograms/histograms.xml. 455 // in chrome/trunk/src/tools/metrics/histograms/histograms.xml.
475 static const CommandEntry commands[] = { 456 static const CommandEntry commands[] = {
476 { "Copy", {7, executeCopy, supportedCopyCut, enabledCopy, stateNone, val ueNull, notTextInsertion, allowExecutionWhenDisabled } }, 457 { "Copy", {7, executeCopy, supportedCopyCut, enabledCopy, stateNone, val ueNull, notTextInsertion, allowExecutionWhenDisabled } },
477 { "Cut", {9, executeCut, supportedCopyCut, enabledCut, stateNone, valueN ull, notTextInsertion, allowExecutionWhenDisabled } }, 458 { "Cut", {9, executeCut, supportedCopyCut, enabledCut, stateNone, valueN ull, notTextInsertion, allowExecutionWhenDisabled } },
478 { "DeleteBackward", {12, executeDeleteBackward, supportedFromMenuOrKeyBi nding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllow ExecutionWhenDisabled } }, 459 { "DeleteBackward", {12, executeDeleteBackward, supportedFromMenuOrKeyBi nding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllow ExecutionWhenDisabled } },
479 { "DeleteForward", {14, executeDeleteForward, supportedFromMenuOrKeyBind ing, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowEx ecutionWhenDisabled } }, 460 { "DeleteForward", {14, executeDeleteForward, supportedFromMenuOrKeyBind ing, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowEx ecutionWhenDisabled } },
480 { "DeleteWordBackward", {20, executeDeleteWordBackward, supportedFromMen uOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, do NotAllowExecutionWhenDisabled } }, 461 { "DeleteWordBackward", {20, executeDeleteWordBackward, supportedFromMen uOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, do NotAllowExecutionWhenDisabled } },
481 { "DeleteWordForward", {21, executeDeleteWordForward, supportedFromMenuO rKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNo tAllowExecutionWhenDisabled } }, 462 { "DeleteWordForward", {21, executeDeleteWordForward, supportedFromMenuO rKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNo tAllowExecutionWhenDisabled } },
482 { "InsertNewline", {37, executeInsertNewline, supportedFromMenuOrKeyBind ing, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExe cutionWhenDisabled } }, 463 { "InsertNewline", {37, executeInsertNewline, supportedFromMenuOrKeyBind ing, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExe cutionWhenDisabled } },
483 { "MoveDown", {55, executeMoveDown, supportedFromMenuOrKeyBinding, enabl edInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAl lowExecutionWhenDisabled } }, 464 { "MoveDown", {55, executeMoveDown, supportedFromMenuOrKeyBinding, enabl edInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhe nDisabled } },
484 { "MoveDownAndModifySelection", {56, executeMoveDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone , valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 465 { "MoveDownAndModifySelection", {56, executeMoveDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, no tTextInsertion, doNotAllowExecutionWhenDisabled } },
485 { "MoveLeft", {59, executeMoveLeft, supportedFromMenuOrKeyBinding, enabl edInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAl lowExecutionWhenDisabled } }, 466 { "MoveLeft", {59, executeMoveLeft, supportedFromMenuOrKeyBinding, enabl edInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhe nDisabled } },
486 { "MoveLeftAndModifySelection", {60, executeMoveLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone , valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 467 { "MoveLeftAndModifySelection", {60, executeMoveLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, no tTextInsertion, doNotAllowExecutionWhenDisabled } },
487 { "MovePageDown", {61, executeMovePageDown, supportedFromMenuOrKeyBindin g, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExec utionWhenDisabled } }, 468 { "MovePageDown", {61, executeMovePageDown, supportedFromMenuOrKeyBindin g, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExec utionWhenDisabled } },
488 { "MovePageDownAndModifySelection", {62, executeMovePageDownAndModifySel ection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 469 { "MovePageDownAndModifySelection", {62, executeMovePageDownAndModifySel ection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } },
489 { "MovePageUp", {63, executeMovePageUp, supportedFromMenuOrKeyBinding, e nabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutio nWhenDisabled } }, 470 { "MovePageUp", {63, executeMovePageUp, supportedFromMenuOrKeyBinding, e nabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutio nWhenDisabled } },
490 { "MovePageUpAndModifySelection", {64, executeMovePageUpAndModifySelecti on, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull , notTextInsertion, doNotAllowExecutionWhenDisabled } }, 471 { "MovePageUpAndModifySelection", {64, executeMovePageUpAndModifySelecti on, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull , notTextInsertion, doNotAllowExecutionWhenDisabled } },
491 { "MoveParagraphBackward", {65, executeMoveParagraphBackward, supportedF romMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 472 { "MoveParagraphBackward", {65, executeMoveParagraphBackward, supportedF romMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInserti on, doNotAllowExecutionWhenDisabled } },
492 { "MoveParagraphBackwardAndModifySelection", {66, executeMoveParagraphBa ckwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection OrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhen Disabled } }, 473 { "MoveParagraphBackwardAndModifySelection", {66, executeMoveParagraphBa ckwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection , stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
493 { "MoveParagraphForward", {67, executeMoveParagraphForward, supportedFro mMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, n otTextInsertion, doNotAllowExecutionWhenDisabled } }, 474 { "MoveParagraphForward", {67, executeMoveParagraphForward, supportedFro mMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion , doNotAllowExecutionWhenDisabled } },
494 { "MoveParagraphForwardAndModifySelection", {68, executeMoveParagraphFor wardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOr CaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDi sabled } }, 475 { "MoveParagraphForwardAndModifySelection", {68, executeMoveParagraphFor wardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
495 { "MoveRight", {69, executeMoveRight, supportedFromMenuOrKeyBinding, ena bledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNot AllowExecutionWhenDisabled } }, 476 { "MoveRight", {69, executeMoveRight, supportedFromMenuOrKeyBinding, ena bledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionW henDisabled } },
496 { "MoveRightAndModifySelection", {70, executeMoveRightAndModifySelection , supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNo ne, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 477 { "MoveRightAndModifySelection", {70, executeMoveRightAndModifySelection , supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
497 { "MoveToBeginningOfDocument", {71, executeMoveToBeginningOfDocument, su pportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, va lueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 478 { "MoveToBeginningOfDocument", {71, executeMoveToBeginningOfDocument, su pportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTex tInsertion, doNotAllowExecutionWhenDisabled } },
498 { "MoveToBeginningOfDocumentAndModifySelection", {72, executeMoveToBegin ningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleS electionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecu tionWhenDisabled } }, 479 { "MoveToBeginningOfDocumentAndModifySelection", {72, executeMoveToBegin ningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleS election, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisable d } },
499 { "MoveToBeginningOfLine", {73, executeMoveToBeginningOfLine, supportedF romMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 480 { "MoveToBeginningOfLine", {73, executeMoveToBeginningOfLine, supportedF romMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInserti on, doNotAllowExecutionWhenDisabled } },
500 { "MoveToBeginningOfLineAndModifySelection", {74, executeMoveToBeginning OfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection OrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhen Disabled } }, 481 { "MoveToBeginningOfLineAndModifySelection", {74, executeMoveToBeginning OfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection , stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
501 { "MoveToEndOfDocument", {79, executeMoveToEndOfDocument, supportedFromM enuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, not TextInsertion, doNotAllowExecutionWhenDisabled } }, 482 { "MoveToEndOfDocument", {79, executeMoveToEndOfDocument, supportedFromM enuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
502 { "MoveToEndOfDocumentAndModifySelection", {80, executeMoveToEndOfDocume ntAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCa retBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisa bled } }, 483 { "MoveToEndOfDocumentAndModifySelection", {80, executeMoveToEndOfDocume ntAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, st ateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
503 { "MoveToEndOfLine", {81, executeMoveToEndOfLine, supportedFromMenuOrKey Binding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInse rtion, doNotAllowExecutionWhenDisabled } }, 484 { "MoveToEndOfLine", {81, executeMoveToEndOfLine, supportedFromMenuOrKey Binding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAll owExecutionWhenDisabled } },
504 { "MoveToEndOfLineAndModifySelection", {82, executeMoveToEndOfLineAndMod ifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrows ing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } } , 485 { "MoveToEndOfLineAndModifySelection", {82, executeMoveToEndOfLineAndMod ifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
505 { "MoveToLeftEndOfLine", {87, executeMoveToLeftEndOfLine, supportedFromM enuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 486 { "MoveToLeftEndOfLine", {87, executeMoveToLeftEndOfLine, supportedFromM enuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
506 { "MoveToLeftEndOfLineAndModifySelection", {88, executeMoveToLeftEndOfLi neAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stat eNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 487 { "MoveToLeftEndOfLineAndModifySelection", {88, executeMoveToLeftEndOfLi neAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stat eNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
507 { "MoveUp", {91, executeMoveUp, supportedFromMenuOrKeyBinding, enabledIn EditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowE xecutionWhenDisabled } }, 488 { "MoveUp", {91, executeMoveUp, supportedFromMenuOrKeyBinding, enabledIn EditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDis abled } },
508 { "MoveUpAndModifySelection", {92, executeMoveUpAndModifySelection, supp ortedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, va lueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 489 { "MoveUpAndModifySelection", {92, executeMoveUpAndModifySelection, supp ortedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTex tInsertion, doNotAllowExecutionWhenDisabled } },
509 { "MoveWordLeft", {97, executeMoveWordLeft, supportedFromMenuOrKeyBindin g, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 490 { "MoveWordLeft", {97, executeMoveWordLeft, supportedFromMenuOrKeyBindin g, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExec utionWhenDisabled } },
510 { "MoveWordLeftAndModifySelection", {98, executeMoveWordLeftAndModifySel ection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, s tateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 491 { "MoveWordLeftAndModifySelection", {98, executeMoveWordLeftAndModifySel ection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, value Null, notTextInsertion, doNotAllowExecutionWhenDisabled } },
511 { "MoveWordRight", {99, executeMoveWordRight, supportedFromMenuOrKeyBind ing, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertio n, doNotAllowExecutionWhenDisabled } }, 492 { "MoveWordRight", {99, executeMoveWordRight, supportedFromMenuOrKeyBind ing, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowEx ecutionWhenDisabled } },
512 { "MoveWordRightAndModifySelection", {100, executeMoveWordRightAndModify Selection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing , stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 493 { "MoveWordRightAndModifySelection", {100, executeMoveWordRightAndModify Selection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, va lueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
513 { "OverWrite", {102, executeToggleOverwrite, supportedFromMenuOrKeyBindi ng, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAl lowExecutionWhenDisabled } }, 494 { "OverWrite", {102, executeToggleOverwrite, supportedFromMenuOrKeyBindi ng, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAl lowExecutionWhenDisabled } },
514 { "Paste", {103, executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } }, 495 { "Paste", {103, executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
515 { "PasteAndMatchStyle", {104, executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisable d } }, 496 { "PasteAndMatchStyle", {104, executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisable d } },
516 { "SelectAll", {115, executeSelectAll, supported, enabled, stateNone, va lueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, 497 { "SelectAll", {115, executeSelectAll, supported, enabled, stateNone, va lueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
517 }; 498 };
518 499
519 CommandMap& commandMap = *new CommandMap; 500 CommandMap& commandMap = *new CommandMap;
520 #if ENABLE(ASSERT) 501 #if ENABLE(ASSERT)
521 HashSet<int> idSet; 502 HashSet<int> idSet;
522 #endif 503 #endif
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 { 648 {
668 return m_command && m_command->isTextInsertion; 649 return m_command && m_command->isTextInsertion;
669 } 650 }
670 651
671 int Editor::Command::idForHistogram() const 652 int Editor::Command::idForHistogram() const
672 { 653 {
673 return isSupported() ? m_command->idForUserMetrics : 0; 654 return isSupported() ? m_command->idForUserMetrics : 0;
674 } 655 }
675 656
676 } // namespace blink 657 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/editing/Caret.cpp ('k') | sky/engine/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698