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

Side by Side Diff: Source/core/rendering/RenderTreeAsText.cpp

Issue 171773008: Rename childNodeCount() / childNode() methods for clarity (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Further renaming for consistency Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderReplaced.cpp ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 static bool isEmptyOrUnstyledAppleStyleSpan(const Node* node) 115 static bool isEmptyOrUnstyledAppleStyleSpan(const Node* node)
116 { 116 {
117 if (!node || !node->isHTMLElement() || !node->hasTagName(spanTag)) 117 if (!node || !node->isHTMLElement() || !node->hasTagName(spanTag))
118 return false; 118 return false;
119 119
120 const HTMLElement* elem = toHTMLElement(node); 120 const HTMLElement* elem = toHTMLElement(node);
121 if (elem->getAttribute(classAttr) != "Apple-style-span") 121 if (elem->getAttribute(classAttr) != "Apple-style-span")
122 return false; 122 return false;
123 123
124 if (!node->hasChildNodes()) 124 if (!node->hasChildren())
125 return true; 125 return true;
126 126
127 const StylePropertySet* inlineStyleDecl = elem->inlineStyle(); 127 const StylePropertySet* inlineStyleDecl = elem->inlineStyle();
128 return (!inlineStyleDecl || inlineStyleDecl->isEmpty()); 128 return (!inlineStyleDecl || inlineStyleDecl->isEmpty());
129 } 129 }
130 130
131 String quoteAndEscapeNonPrintables(const String& s) 131 String quoteAndEscapeNonPrintables(const String& s)
132 { 132 {
133 StringBuilder result; 133 StringBuilder result;
134 result.append('"'); 134 result.append('"');
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 element->document().updateLayout(); 763 element->document().updateLayout();
764 764
765 RenderObject* renderer = element->renderer(); 765 RenderObject* renderer = element->renderer();
766 if (!renderer || !renderer->isListItem()) 766 if (!renderer || !renderer->isListItem())
767 return String(); 767 return String();
768 768
769 return toRenderListItem(renderer)->markerText(); 769 return toRenderListItem(renderer)->markerText();
770 } 770 }
771 771
772 } // namespace WebCore 772 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderReplaced.cpp ('k') | Source/core/rendering/TextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698