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

Side by Side Diff: Source/core/editing/ApplyBlockElementCommand.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 } 152 }
153 } 153 }
154 154
155 static bool isNewLineAtPosition(const Position& position) 155 static bool isNewLineAtPosition(const Position& position)
156 { 156 {
157 Node* textNode = position.containerNode(); 157 Node* textNode = position.containerNode();
158 int offset = position.offsetInContainerNode(); 158 int offset = position.offsetInContainerNode();
159 if (!textNode || !textNode->isTextNode() || offset < 0 || offset >= textNode ->maxCharacterOffset()) 159 if (!textNode || !textNode->isTextNode() || offset < 0 || offset >= textNode ->maxCharacterOffset())
160 return false; 160 return false;
161 161
162 TrackExceptionState es; 162 TrackExceptionState exceptionState;
163 String textAtPosition = toText(textNode)->substringData(offset, 1, es); 163 String textAtPosition = toText(textNode)->substringData(offset, 1, exception State);
164 if (es.hadException()) 164 if (exceptionState.hadException())
165 return false; 165 return false;
166 166
167 return textAtPosition[0] == '\n'; 167 return textAtPosition[0] == '\n';
168 } 168 }
169 169
170 static RenderStyle* renderStyleOfEnclosingTextNode(const Position& position) 170 static RenderStyle* renderStyleOfEnclosingTextNode(const Position& position)
171 { 171 {
172 if (position.anchorType() != Position::PositionIsOffsetInAnchor || !position .containerNode() || !position.containerNode()->isTextNode()) 172 if (position.anchorType() != Position::PositionIsOffsetInAnchor || !position .containerNode() || !position.containerNode()->isTextNode())
173 return 0; 173 return 0;
174 return position.containerNode()->renderStyle(); 174 return position.containerNode()->renderStyle();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const 278 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const
279 { 279 {
280 RefPtr<Element> element = createHTMLElement(document(), m_tagName); 280 RefPtr<Element> element = createHTMLElement(document(), m_tagName);
281 if (m_inlineStyle.length()) 281 if (m_inlineStyle.length())
282 element->setAttribute(styleAttr, m_inlineStyle); 282 element->setAttribute(styleAttr, m_inlineStyle);
283 return element.release(); 283 return element.release();
284 } 284 }
285 285
286 } 286 }
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | Source/core/editing/DeleteFromTextNodeCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698