| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 { | 807 { |
| 808 return node && node->layoutObject() && !node->layoutObject()->isInline() &&
!node->layoutObject()->isRubyText(); | 808 return node && node->layoutObject() && !node->layoutObject()->isInline() &&
!node->layoutObject()->isRubyText(); |
| 809 } | 809 } |
| 810 | 810 |
| 811 bool isInline(const Node* node) | 811 bool isInline(const Node* node) |
| 812 { | 812 { |
| 813 if (!node) | 813 if (!node) |
| 814 return false; | 814 return false; |
| 815 | 815 |
| 816 const ComputedStyle* style = node->computedStyle(); | 816 const ComputedStyle* style = node->computedStyle(); |
| 817 return style && style->display() == INLINE; | 817 return style && style->display() == EDisplay::Inline; |
| 818 } | 818 } |
| 819 | 819 |
| 820 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and | 820 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and |
| 821 // |enclosingBlockFlowOrTableElement()| are used. | 821 // |enclosingBlockFlowOrTableElement()| are used. |
| 822 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use | 822 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use |
| 823 // |Position| version The enclosing block of [table, x] for example, should be | 823 // |Position| version The enclosing block of [table, x] for example, should be |
| 824 // the block that contains the table and not the table, and this function should | 824 // the block that contains the table and not the table, and this function should |
| 825 // be the only one responsible for knowing about these kinds of special cases. | 825 // be the only one responsible for knowing about these kinds of special cases. |
| 826 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) | 826 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) |
| 827 { | 827 { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 if (!n.isHTMLElement()) | 958 if (!n.isHTMLElement()) |
| 959 return false; | 959 return false; |
| 960 | 960 |
| 961 if (n.isLink()) | 961 if (n.isLink()) |
| 962 return true; | 962 return true; |
| 963 | 963 |
| 964 LayoutObject* layoutObject = n.layoutObject(); | 964 LayoutObject* layoutObject = n.layoutObject(); |
| 965 if (!layoutObject) | 965 if (!layoutObject) |
| 966 return false; | 966 return false; |
| 967 | 967 |
| 968 if (layoutObject->style()->display() == TABLE || layoutObject->style()->disp
lay() == INLINE_TABLE) | 968 if (layoutObject->style()->display() == EDisplay::Table || layoutObject->sty
le()->display() == EDisplay::InlineTable) |
| 969 return true; | 969 return true; |
| 970 | 970 |
| 971 if (layoutObject->style()->isFloating()) | 971 if (layoutObject->style()->isFloating()) |
| 972 return true; | 972 return true; |
| 973 | 973 |
| 974 return false; | 974 return false; |
| 975 } | 975 } |
| 976 | 976 |
| 977 static HTMLElement* firstInSpecialElement(const Position& pos) | 977 static HTMLElement* firstInSpecialElement(const Position& pos) |
| 978 { | 978 { |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 return InputType::DeleteWordBackward; | 1918 return InputType::DeleteWordBackward; |
| 1919 if (granularity == LineBoundary) | 1919 if (granularity == LineBoundary) |
| 1920 return InputType::DeleteLineBackward; | 1920 return InputType::DeleteLineBackward; |
| 1921 return InputType::DeleteContentBackward; | 1921 return InputType::DeleteContentBackward; |
| 1922 default: | 1922 default: |
| 1923 return InputType::None; | 1923 return InputType::None; |
| 1924 } | 1924 } |
| 1925 } | 1925 } |
| 1926 | 1926 |
| 1927 } // namespace blink | 1927 } // namespace blink |
| OLD | NEW |