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

Side by Side Diff: Source/core/editing/InputMethodController.cpp

Issue 23464095: WTF::notFound looks too much like a local variable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/core/editing/InputMethodController.h ('k') | Source/core/editing/InsertTextCommand.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, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 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 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 26 matching lines...) Expand all
37 #include "core/editing/TypingCommand.h" 37 #include "core/editing/TypingCommand.h"
38 #include "core/html/HTMLTextAreaElement.h" 38 #include "core/html/HTMLTextAreaElement.h"
39 #include "core/page/EditorClient.h" 39 #include "core/page/EditorClient.h"
40 #include "core/page/EventHandler.h" 40 #include "core/page/EventHandler.h"
41 #include "core/page/Frame.h" 41 #include "core/page/Frame.h"
42 #include "core/rendering/RenderObject.h" 42 #include "core/rendering/RenderObject.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 PlainTextOffsets::PlainTextOffsets() 46 PlainTextOffsets::PlainTextOffsets()
47 : m_start(notFound) 47 : m_start(kNotFound)
48 , m_end(notFound) 48 , m_end(kNotFound)
49 { 49 {
50 } 50 }
51 51
52 PlainTextOffsets::PlainTextOffsets(int start, int end) 52 PlainTextOffsets::PlainTextOffsets(int start, int end)
53 : m_start(start) 53 : m_start(start)
54 , m_end(end) 54 , m_end(end)
55 { 55 {
56 ASSERT(start != notFound); 56 ASSERT(start != kNotFound);
57 ASSERT(end != notFound); 57 ASSERT(end != kNotFound);
58 ASSERT(start <= end); 58 ASSERT(start <= end);
59 } 59 }
60 60
61 // ---------------------------- 61 // ----------------------------
62 62
63 InputMethodController::SelectionOffsetsScope::SelectionOffsetsScope(InputMethodC ontroller* inputMethodController) 63 InputMethodController::SelectionOffsetsScope::SelectionOffsetsScope(InputMethodC ontroller* inputMethodController)
64 : m_inputMethodController(inputMethodController) 64 : m_inputMethodController(inputMethodController)
65 , m_offsets(inputMethodController->getSelectionOffsets()) 65 , m_offsets(inputMethodController->getSelectionOffsets())
66 { 66 {
67 } 67 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 bool InputMethodController::setSelectionOffsets(const PlainTextOffsets& selectio nOffsets) 376 bool InputMethodController::setSelectionOffsets(const PlainTextOffsets& selectio nOffsets)
377 { 377 {
378 if (selectionOffsets.isNull()) 378 if (selectionOffsets.isNull())
379 return false; 379 return false;
380 // FIXME: We should move Editor::setSelectionOffsets() into InputMethodContr oller class. 380 // FIXME: We should move Editor::setSelectionOffsets() into InputMethodContr oller class.
381 return editor().setSelectionOffsets(selectionOffsets.start(), selectionOffse ts.end()); 381 return editor().setSelectionOffsets(selectionOffsets.start(), selectionOffse ts.end());
382 } 382 }
383 383
384 } // namespace WebCore 384 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/InputMethodController.h ('k') | Source/core/editing/InsertTextCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698