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

Side by Side Diff: Source/core/editing/Editor.h

Issue 1171223004: Sanitize SVG animation attributes which could set JavaScript URL values. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | Annotate | Revision Log
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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 24 matching lines...) Expand all
35 #include "core/editing/FrameSelection.h" 35 #include "core/editing/FrameSelection.h"
36 #include "core/editing/VisibleSelection.h" 36 #include "core/editing/VisibleSelection.h"
37 #include "core/editing/WritingDirection.h" 37 #include "core/editing/WritingDirection.h"
38 #include "core/editing/iterators/TextIterator.h" 38 #include "core/editing/iterators/TextIterator.h"
39 #include "platform/PasteMode.h" 39 #include "platform/PasteMode.h"
40 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class CompositeEditCommand; 44 class CompositeEditCommand;
45 class DummyPageHolder;
45 class EditCommandComposition; 46 class EditCommandComposition;
46 class EditorClient; 47 class EditorClient;
47 class EditorInternalCommand; 48 class EditorInternalCommand;
48 class LocalFrame; 49 class LocalFrame;
49 class HitTestResult; 50 class HitTestResult;
50 class KillRing; 51 class KillRing;
51 class Pasteboard; 52 class Pasteboard;
52 class SpellChecker; 53 class SpellChecker;
53 class StylePropertySet; 54 class StylePropertySet;
54 class TextEvent; 55 class TextEvent;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions); 273 void changeSelectionAfterCommand(const VisibleSelection& newSelection, Frame Selection::SetSelectionOptions);
273 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection , FrameSelection::SetSelectionOptions); 274 void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection , FrameSelection::SetSelectionOptions);
274 275
275 Element* findEventTargetFromSelection() const; 276 Element* findEventTargetFromSelection() const;
276 277
277 PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptio ns); 278 PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptio ns);
278 279
279 SpellChecker& spellChecker() const; 280 SpellChecker& spellChecker() const;
280 281
281 bool handleEditingKeyboardEvent(KeyboardEvent*); 282 bool handleEditingKeyboardEvent(KeyboardEvent*);
283
284 // contentAfterPastingHTML is a helper function for unit tests.
285 friend String contentAfterPastingHTML(DummyPageHolder*, const char*);
282 }; 286 };
283 287
284 inline void Editor::setStartNewKillRingSequence(bool flag) 288 inline void Editor::setStartNewKillRingSequence(bool flag)
285 { 289 {
286 m_shouldStartNewKillRingSequence = flag; 290 m_shouldStartNewKillRingSequence = flag;
287 } 291 }
288 292
289 inline const VisibleSelection& Editor::mark() const 293 inline const VisibleSelection& Editor::mark() const
290 { 294 {
291 return m_mark; 295 return m_mark;
292 } 296 }
293 297
294 inline void Editor::setMark(const VisibleSelection& selection) 298 inline void Editor::setMark(const VisibleSelection& selection)
295 { 299 {
296 m_mark = selection; 300 m_mark = selection;
297 } 301 }
298 302
299 inline bool Editor::markedTextMatchesAreHighlighted() const 303 inline bool Editor::markedTextMatchesAreHighlighted() const
300 { 304 {
301 return m_areMarkedTextMatchesHighlighted; 305 return m_areMarkedTextMatchesHighlighted;
302 } 306 }
303 307
304 308
305 } // namespace blink 309 } // namespace blink
306 310
307 #endif // Editor_h 311 #endif // Editor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698