Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2069 static String valueForeColor(LocalFrame& frame, Event*) { | 2069 static String valueForeColor(LocalFrame& frame, Event*) { |
| 2070 return valueStyle(frame, CSSPropertyColor); | 2070 return valueStyle(frame, CSSPropertyColor); |
| 2071 } | 2071 } |
| 2072 | 2072 |
| 2073 static String valueFormatBlock(LocalFrame& frame, Event*) { | 2073 static String valueFormatBlock(LocalFrame& frame, Event*) { |
| 2074 const VisibleSelection& selection = | 2074 const VisibleSelection& selection = |
| 2075 frame.selection().computeVisibleSelectionInDOMTreeDeprecated(); | 2075 frame.selection().computeVisibleSelectionInDOMTreeDeprecated(); |
| 2076 if (!selection.isNonOrphanedCaretOrRange() || !selection.isContentEditable()) | 2076 if (!selection.isNonOrphanedCaretOrRange() || !selection.isContentEditable()) |
| 2077 return ""; | 2077 return ""; |
| 2078 Element* formatBlockElement = | 2078 Element* formatBlockElement = |
| 2079 FormatBlockCommand::elementForFormatBlockCommand(firstRangeOf(selection)); | 2079 FormatBlockCommand::elementForFormatBlockCommand( |
|
Xiaocheng
2017/03/02 20:21:05
This patch has conflict with https://codereview.ch
yosin_UTC9
2017/03/09 05:18:40
The patch is committed. There is no conflict anymo
| |
| 2080 firstEphemeralRangeOf(selection)); | |
| 2080 if (!formatBlockElement) | 2081 if (!formatBlockElement) |
| 2081 return ""; | 2082 return ""; |
| 2082 return formatBlockElement->localName(); | 2083 return formatBlockElement->localName(); |
| 2083 } | 2084 } |
| 2084 | 2085 |
| 2085 // Map of functions | 2086 // Map of functions |
| 2086 | 2087 |
| 2087 static const EditorInternalCommand* internalCommand(const String& commandName) { | 2088 static const EditorInternalCommand* internalCommand(const String& commandName) { |
| 2088 static const EditorInternalCommand kEditorCommands[] = { | 2089 static const EditorInternalCommand kEditorCommands[] = { |
| 2089 // Lists all commands in blink::WebEditingCommandType. | 2090 // Lists all commands in blink::WebEditingCommandType. |
| (...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2751 *m_frame, DirectionBackward, WordGranularity); | 2752 *m_frame, DirectionBackward, WordGranularity); |
| 2752 case WebEditingCommandType::DeleteWordForward: | 2753 case WebEditingCommandType::DeleteWordForward: |
| 2753 return RangesFromCurrentSelectionOrExtendCaret(*m_frame, DirectionForward, | 2754 return RangesFromCurrentSelectionOrExtendCaret(*m_frame, DirectionForward, |
| 2754 WordGranularity); | 2755 WordGranularity); |
| 2755 default: | 2756 default: |
| 2756 return targetRangesForInputEvent(*target); | 2757 return targetRangesForInputEvent(*target); |
| 2757 } | 2758 } |
| 2758 } | 2759 } |
| 2759 | 2760 |
| 2760 } // namespace blink | 2761 } // namespace blink |
| OLD | NEW |