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

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

Issue 333173002: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/TextIterator.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 #include "core/page/Page.h" 81 #include "core/page/Page.h"
82 #include "core/rendering/HitTestResult.h" 82 #include "core/rendering/HitTestResult.h"
83 #include "core/rendering/RenderImage.h" 83 #include "core/rendering/RenderImage.h"
84 #include "core/svg/SVGImageElement.h" 84 #include "core/svg/SVGImageElement.h"
85 #include "platform/KillRing.h" 85 #include "platform/KillRing.h"
86 #include "platform/weborigin/KURL.h" 86 #include "platform/weborigin/KURL.h"
87 #include "wtf/unicode/CharacterNames.h" 87 #include "wtf/unicode/CharacterNames.h"
88 88
89 namespace WebCore { 89 namespace WebCore {
90 90
91 using namespace std;
92 using namespace HTMLNames; 91 using namespace HTMLNames;
93 using namespace WTF; 92 using namespace WTF;
94 using namespace Unicode; 93 using namespace Unicode;
95 94
96 Editor::RevealSelectionScope::RevealSelectionScope(Editor* editor) 95 Editor::RevealSelectionScope::RevealSelectionScope(Editor* editor)
97 : m_editor(editor) 96 : m_editor(editor)
98 { 97 {
99 ++m_editor->m_preventRevealSelection; 98 ++m_editor->m_preventRevealSelection;
100 } 99 }
101 100
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 IntRect startCaretRect = RenderedPosition(VisiblePosition(range->startPositi on()).deepEquivalent(), DOWNSTREAM).absoluteRect(&extraWidthToEndOfLine); 1123 IntRect startCaretRect = RenderedPosition(VisiblePosition(range->startPositi on()).deepEquivalent(), DOWNSTREAM).absoluteRect(&extraWidthToEndOfLine);
1125 if (startCaretRect == LayoutRect()) 1124 if (startCaretRect == LayoutRect())
1126 return IntRect(); 1125 return IntRect();
1127 1126
1128 IntRect endCaretRect = RenderedPosition(VisiblePosition(range->endPosition() ).deepEquivalent(), UPSTREAM).absoluteRect(); 1127 IntRect endCaretRect = RenderedPosition(VisiblePosition(range->endPosition() ).deepEquivalent(), UPSTREAM).absoluteRect();
1129 if (endCaretRect == LayoutRect()) 1128 if (endCaretRect == LayoutRect())
1130 return IntRect(); 1129 return IntRect();
1131 1130
1132 if (startCaretRect.y() == endCaretRect.y()) { 1131 if (startCaretRect.y() == endCaretRect.y()) {
1133 // start and end are on the same line 1132 // start and end are on the same line
1134 return IntRect(min(startCaretRect.x(), endCaretRect.x()), 1133 return IntRect(std::min(startCaretRect.x(), endCaretRect.x()),
1135 startCaretRect.y(), 1134 startCaretRect.y(),
1136 abs(endCaretRect.x() - startCaretRect.x()), 1135 abs(endCaretRect.x() - startCaretRect.x()),
1137 max(startCaretRect.height(), endCaretRect.height())); 1136 std::max(startCaretRect.height(), endCaretRect.height()));
1138 } 1137 }
1139 1138
1140 // start and end aren't on the same line, so go from start to the end of its line 1139 // start and end aren't on the same line, so go from start to the end of its line
1141 return IntRect(startCaretRect.x(), 1140 return IntRect(startCaretRect.x(),
1142 startCaretRect.y(), 1141 startCaretRect.y(),
1143 startCaretRect.width() + extraWidthToEndOfLine, 1142 startCaretRect.width() + extraWidthToEndOfLine,
1144 startCaretRect.height()); 1143 startCaretRect.height());
1145 } 1144 }
1146 1145
1147 void Editor::computeAndSetTypingStyle(StylePropertySet* style, EditAction editin gAction) 1146 void Editor::computeAndSetTypingStyle(StylePropertySet* style, EditAction editin gAction)
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled); 1303 frame().selection().setShouldShowBlockCursor(m_overwriteModeEnabled);
1305 } 1304 }
1306 1305
1307 void Editor::trace(Visitor* visitor) 1306 void Editor::trace(Visitor* visitor)
1308 { 1307 {
1309 visitor->trace(m_lastEditCommand); 1308 visitor->trace(m_lastEditCommand);
1310 visitor->trace(m_mark); 1309 visitor->trace(m_mark);
1311 } 1310 }
1312 1311
1313 } // namespace WebCore 1312 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698