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

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp

Issue 2448833003: Sandbox should prevent 'execCommand("print", ...)'. (Closed)
Patch Set: Created 4 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
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 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 return true; 1531 return true;
1532 } 1532 }
1533 1533
1534 static bool executePrint(LocalFrame& frame, 1534 static bool executePrint(LocalFrame& frame,
1535 Event*, 1535 Event*,
1536 EditorCommandSource, 1536 EditorCommandSource,
1537 const String&) { 1537 const String&) {
1538 FrameHost* host = frame.host(); 1538 FrameHost* host = frame.host();
1539 if (!host) 1539 if (!host)
1540 return false; 1540 return false;
1541 host->chromeClient().print(&frame); 1541 return host->chromeClient().print(&frame);
1542 return true;
1543 } 1542 }
1544 1543
1545 static bool executeRedo(LocalFrame& frame, 1544 static bool executeRedo(LocalFrame& frame,
1546 Event*, 1545 Event*,
1547 EditorCommandSource, 1546 EditorCommandSource,
1548 const String&) { 1547 const String&) {
1549 frame.editor().redo(); 1548 frame.editor().redo();
1550 return true; 1549 return true;
1551 } 1550 }
1552 1551
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2736 *m_frame, DirectionBackward, WordGranularity); 2735 *m_frame, DirectionBackward, WordGranularity);
2737 case WebEditingCommandType::DeleteWordForward: 2736 case WebEditingCommandType::DeleteWordForward:
2738 return RangesFromCurrentSelectionOrExtendCaret(*m_frame, DirectionForward, 2737 return RangesFromCurrentSelectionOrExtendCaret(*m_frame, DirectionForward,
2739 WordGranularity); 2738 WordGranularity);
2740 default: 2739 default:
2741 return nullptr; 2740 return nullptr;
2742 } 2741 }
2743 } 2742 }
2744 2743
2745 } // namespace blink 2744 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698