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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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
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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 document().updateStyleAndLayoutTree(); 318 document().updateStyleAndLayoutTree();
319 319
320 if (isStartAndEndOnSameNode) 320 if (isStartAndEndOnSameNode)
321 start = firstPositionInOrBeforeNode(endContainer->previousSibling()); 321 start = firstPositionInOrBeforeNode(endContainer->previousSibling());
322 if (isEndAndEndOfLastParagraphOnSameNode) { 322 if (isEndAndEndOfLastParagraphOnSameNode) {
323 if (endOfLastParagraph.offsetInContainerNode() == 323 if (endOfLastParagraph.offsetInContainerNode() ==
324 end.offsetInContainerNode()) 324 end.offsetInContainerNode())
325 endOfLastParagraph = 325 endOfLastParagraph =
326 lastPositionInOrAfterNode(endContainer->previousSibling()); 326 lastPositionInOrAfterNode(endContainer->previousSibling());
327 else 327 else
328 endOfLastParagraph = Position( 328 endOfLastParagraph =
329 endContainer, endOfLastParagraph.offsetInContainerNode() - 329 Position(endContainer,
330 end.offsetInContainerNode()); 330 endOfLastParagraph.offsetInContainerNode() -
331 end.offsetInContainerNode());
331 } 332 }
332 end = Position::lastPositionInNode(endContainer->previousSibling()); 333 end = Position::lastPositionInNode(endContainer->previousSibling());
333 } 334 }
334 } 335 }
335 } 336 }
336 337
337 VisiblePosition 338 VisiblePosition
338 ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded( 339 ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded(
339 VisiblePosition& endOfCurrentParagraph, 340 VisiblePosition& endOfCurrentParagraph,
340 Position& endOfLastParagraph, 341 Position& endOfLastParagraph,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 403 }
403 404
404 HTMLElement* ApplyBlockElementCommand::createBlockElement() const { 405 HTMLElement* ApplyBlockElementCommand::createBlockElement() const {
405 HTMLElement* element = createHTMLElement(document(), m_tagName); 406 HTMLElement* element = createHTMLElement(document(), m_tagName);
406 if (m_inlineStyle.length()) 407 if (m_inlineStyle.length())
407 element->setAttribute(styleAttr, m_inlineStyle); 408 element->setAttribute(styleAttr, m_inlineStyle);
408 return element; 409 return element;
409 } 410 }
410 411
411 } // namespace blink 412 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698