Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: third_party/WebKit/Source/core/editing/EditingUtilities.cpp

Issue 2670643004: Rename EDisplay values with k prefix. (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 bool isEnclosingBlock(const Node* node) { 911 bool isEnclosingBlock(const Node* node) {
912 return node && node->layoutObject() && !node->layoutObject()->isInline() && 912 return node && node->layoutObject() && !node->layoutObject()->isInline() &&
913 !node->layoutObject()->isRubyText(); 913 !node->layoutObject()->isRubyText();
914 } 914 }
915 915
916 bool isInline(const Node* node) { 916 bool isInline(const Node* node) {
917 if (!node) 917 if (!node)
918 return false; 918 return false;
919 919
920 const ComputedStyle* style = node->computedStyle(); 920 const ComputedStyle* style = node->computedStyle();
921 return style && style->display() == EDisplay::Inline; 921 return style && style->display() == EDisplay::kInline;
922 } 922 }
923 923
924 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and 924 // TODO(yosin) Deploy this in all of the places where |enclosingBlockFlow()| and
925 // |enclosingBlockFlowOrTableElement()| are used. 925 // |enclosingBlockFlowOrTableElement()| are used.
926 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use 926 // TODO(yosin) Callers of |Node| version of |enclosingBlock()| should use
927 // |Position| version The enclosing block of [table, x] for example, should be 927 // |Position| version The enclosing block of [table, x] for example, should be
928 // the block that contains the table and not the table, and this function should 928 // the block that contains the table and not the table, and this function should
929 // be the only one responsible for knowing about these kinds of special cases. 929 // be the only one responsible for knowing about these kinds of special cases.
930 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) { 930 Element* enclosingBlock(Node* node, EditingBoundaryCrossingRule rule) {
931 return enclosingBlock(firstPositionInOrBeforeNode(node), rule); 931 return enclosingBlock(firstPositionInOrBeforeNode(node), rule);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 if (!n.isHTMLElement()) 1059 if (!n.isHTMLElement())
1060 return false; 1060 return false;
1061 1061
1062 if (n.isLink()) 1062 if (n.isLink())
1063 return true; 1063 return true;
1064 1064
1065 LayoutObject* layoutObject = n.layoutObject(); 1065 LayoutObject* layoutObject = n.layoutObject();
1066 if (!layoutObject) 1066 if (!layoutObject)
1067 return false; 1067 return false;
1068 1068
1069 if (layoutObject->style()->display() == EDisplay::Table || 1069 if (layoutObject->style()->display() == EDisplay::kTable ||
1070 layoutObject->style()->display() == EDisplay::InlineTable) 1070 layoutObject->style()->display() == EDisplay::kInlineTable)
1071 return true; 1071 return true;
1072 1072
1073 if (layoutObject->style()->isFloating()) 1073 if (layoutObject->style()->isFloating())
1074 return true; 1074 return true;
1075 1075
1076 return false; 1076 return false;
1077 } 1077 }
1078 1078
1079 static HTMLElement* firstInSpecialElement(const Position& pos) { 1079 static HTMLElement* firstInSpecialElement(const Position& pos) {
1080 DCHECK(!needsLayoutTreeUpdate(pos)); 1080 DCHECK(!needsLayoutTreeUpdate(pos));
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 return InputType::DeleteWordBackward; 2177 return InputType::DeleteWordBackward;
2178 if (granularity == LineBoundary) 2178 if (granularity == LineBoundary)
2179 return InputType::DeleteLineBackward; 2179 return InputType::DeleteLineBackward;
2180 return InputType::DeleteContentBackward; 2180 return InputType::DeleteContentBackward;
2181 default: 2181 default:
2182 return InputType::None; 2182 return InputType::None;
2183 } 2183 }
2184 } 2184 }
2185 2185
2186 } // namespace blink 2186 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698