Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 758 return nextPositionOfAlgorithm<EditingInFlatTreeStrategy>(position, moveType ); | 758 return nextPositionOfAlgorithm<EditingInFlatTreeStrategy>(position, moveType ); |
| 759 } | 759 } |
| 760 | 760 |
| 761 bool isEnclosingBlock(const Node* node) | 761 bool isEnclosingBlock(const Node* node) |
| 762 { | 762 { |
| 763 return node && node->layoutObject() && !node->layoutObject()->isInline() && !node->layoutObject()->isRubyText(); | 763 return node && node->layoutObject() && !node->layoutObject()->isInline() && !node->layoutObject()->isRubyText(); |
| 764 } | 764 } |
| 765 | 765 |
| 766 bool isInline(const Node* node) | 766 bool isInline(const Node* node) |
| 767 { | 767 { |
| 768 return node && node->computedStyle()->display() == INLINE; | 768 return node && node->computedStyle() && node->computedStyle()->display() == INLINE; |
|
yosin_UTC9
2016/07/14 01:08:52
Since |Node::computedStyle()| isn't simple getter,
joone
2016/07/14 07:06:54
Done.
| |
| 769 } | 769 } |
| 770 | 770 |
| 771 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and | 771 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and |
| 772 // |enclosingBlockFlowOrTableElement()| are used. | 772 // |enclosingBlockFlowOrTableElement()| are used. |
| 773 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use | 773 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use |
| 774 // |Position| version The enclosing block of [table, x] for example, should be | 774 // |Position| version The enclosing block of [table, x] for example, should be |
| 775 // the block that contains the table and not the table, and this function should | 775 // the block that contains the table and not the table, and this function should |
| 776 // be the only one responsible for knowing about these kinds of special cases. | 776 // be the only one responsible for knowing about these kinds of special cases. |
| 777 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) | 777 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) |
| 778 { | 778 { |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1812 { | 1812 { |
| 1813 if (!RuntimeEnabledFeatures::inputEventEnabled()) | 1813 if (!RuntimeEnabledFeatures::inputEventEnabled()) |
| 1814 return DispatchEventResult::NotCanceled; | 1814 return DispatchEventResult::NotCanceled; |
| 1815 if (!target) | 1815 if (!target) |
| 1816 return DispatchEventResult::NotCanceled; | 1816 return DispatchEventResult::NotCanceled; |
| 1817 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data , InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo mposing, ranges); | 1817 InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data , InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotCo mposing, ranges); |
| 1818 return target->dispatchEvent(beforeInputEvent); | 1818 return target->dispatchEvent(beforeInputEvent); |
| 1819 } | 1819 } |
| 1820 | 1820 |
| 1821 } // namespace blink | 1821 } // namespace blink |
| OLD | NEW |