| OLD | NEW |
| 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 // start and end are on the same line | 1166 // start and end are on the same line |
| 1167 return IntRect(std::min(startCaretRect.x(), endCaretRect.x()), | 1167 return IntRect(std::min(startCaretRect.x(), endCaretRect.x()), |
| 1168 startCaretRect.y(), | 1168 startCaretRect.y(), |
| 1169 abs(endCaretRect.x() - startCaretRect.x()), | 1169 abs(endCaretRect.x() - startCaretRect.x()), |
| 1170 std::max(startCaretRect.height(), endCaretRect.height())); | 1170 std::max(startCaretRect.height(), endCaretRect.height())); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 // start and end aren't on the same line, so go from start to the end of its
line | 1173 // start and end aren't on the same line, so go from start to the end of its
line |
| 1174 return IntRect(startCaretRect.x(), | 1174 return IntRect(startCaretRect.x(), |
| 1175 startCaretRect.y(), | 1175 startCaretRect.y(), |
| 1176 startCaretRect.width() + extraWidthToEndOfLine, | 1176 (startCaretRect.width() + extraWidthToEndOfLine).toInt(), |
| 1177 startCaretRect.height()); | 1177 startCaretRect.height()); |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 IntRect Editor::firstRectForRange(const Range* range) const | 1180 IntRect Editor::firstRectForRange(const Range* range) const |
| 1181 { | 1181 { |
| 1182 DCHECK(range); | 1182 DCHECK(range); |
| 1183 return firstRectForRange(EphemeralRange(range)); | 1183 return firstRectForRange(EphemeralRange(range)); |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 void Editor::computeAndSetTypingStyle(StylePropertySet* style, InputEvent::Input
Type inputType) | 1186 void Editor::computeAndSetTypingStyle(StylePropertySet* style, InputEvent::Input
Type inputType) |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 | 1408 |
| 1409 DEFINE_TRACE(Editor) | 1409 DEFINE_TRACE(Editor) |
| 1410 { | 1410 { |
| 1411 visitor->trace(m_frame); | 1411 visitor->trace(m_frame); |
| 1412 visitor->trace(m_lastEditCommand); | 1412 visitor->trace(m_lastEditCommand); |
| 1413 visitor->trace(m_undoStack); | 1413 visitor->trace(m_undoStack); |
| 1414 visitor->trace(m_mark); | 1414 visitor->trace(m_mark); |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 } // namespace blink | 1417 } // namespace blink |
| OLD | NEW |