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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 { | 822 { |
823 return node && node->layoutObject() && !node->layoutObject()->isInline() &&
!node->layoutObject()->isRubyText(); | 823 return node && node->layoutObject() && !node->layoutObject()->isInline() &&
!node->layoutObject()->isRubyText(); |
824 } | 824 } |
825 | 825 |
826 bool isInline(const Node* node) | 826 bool isInline(const Node* node) |
827 { | 827 { |
828 if (!node) | 828 if (!node) |
829 return false; | 829 return false; |
830 | 830 |
831 const ComputedStyle* style = node->computedStyle(); | 831 const ComputedStyle* style = node->computedStyle(); |
832 return style && style->display() == INLINE; | 832 return style && style->display() == EDisplay::Inline; |
833 } | 833 } |
834 | 834 |
835 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and | 835 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and |
836 // |enclosingBlockFlowOrTableElement()| are used. | 836 // |enclosingBlockFlowOrTableElement()| are used. |
837 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use | 837 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use |
838 // |Position| version The enclosing block of [table, x] for example, should be | 838 // |Position| version The enclosing block of [table, x] for example, should be |
839 // the block that contains the table and not the table, and this function should | 839 // the block that contains the table and not the table, and this function should |
840 // be the only one responsible for knowing about these kinds of special cases. | 840 // be the only one responsible for knowing about these kinds of special cases. |
841 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) | 841 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) |
842 { | 842 { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 if (!n.isHTMLElement()) | 973 if (!n.isHTMLElement()) |
974 return false; | 974 return false; |
975 | 975 |
976 if (n.isLink()) | 976 if (n.isLink()) |
977 return true; | 977 return true; |
978 | 978 |
979 LayoutObject* layoutObject = n.layoutObject(); | 979 LayoutObject* layoutObject = n.layoutObject(); |
980 if (!layoutObject) | 980 if (!layoutObject) |
981 return false; | 981 return false; |
982 | 982 |
983 if (layoutObject->style()->display() == TABLE || layoutObject->style()->disp
lay() == INLINE_TABLE) | 983 if (layoutObject->style()->display() == EDisplay::Table || layoutObject->sty
le()->display() == EDisplay::InlineTable) |
984 return true; | 984 return true; |
985 | 985 |
986 if (layoutObject->style()->isFloating()) | 986 if (layoutObject->style()->isFloating()) |
987 return true; | 987 return true; |
988 | 988 |
989 return false; | 989 return false; |
990 } | 990 } |
991 | 991 |
992 static HTMLElement* firstInSpecialElement(const Position& pos) | 992 static HTMLElement* firstInSpecialElement(const Position& pos) |
993 { | 993 { |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 return InputType::DeleteWordBackward; | 1938 return InputType::DeleteWordBackward; |
1939 if (granularity == LineBoundary) | 1939 if (granularity == LineBoundary) |
1940 return InputType::DeleteLineBackward; | 1940 return InputType::DeleteLineBackward; |
1941 return InputType::DeleteContentBackward; | 1941 return InputType::DeleteContentBackward; |
1942 default: | 1942 default: |
1943 return InputType::None; | 1943 return InputType::None; |
1944 } | 1944 } |
1945 } | 1945 } |
1946 | 1946 |
1947 } // namespace blink | 1947 } // namespace blink |
OLD | NEW |