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

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

Issue 294343007: Oilpan: transition types for remaining Node hierarchy object occurrences. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (newSelection.isNone()) 78 if (newSelection.isNone())
79 return; 79 return;
80 setEndingSelection(newSelection); 80 setEndingSelection(newSelection);
81 } 81 }
82 82
83 VisibleSelection selection = selectionForParagraphIteration(endingSelection( )); 83 VisibleSelection selection = selectionForParagraphIteration(endingSelection( ));
84 VisiblePosition startOfSelection = selection.visibleStart(); 84 VisiblePosition startOfSelection = selection.visibleStart();
85 VisiblePosition endOfSelection = selection.visibleEnd(); 85 VisiblePosition endOfSelection = selection.visibleEnd();
86 ASSERT(!startOfSelection.isNull()); 86 ASSERT(!startOfSelection.isNull());
87 ASSERT(!endOfSelection.isNull()); 87 ASSERT(!endOfSelection.isNull());
88 RefPtr<ContainerNode> startScope; 88 RefPtrWillBeRawPtr<ContainerNode> startScope = nullptr;
89 int startIndex = indexForVisiblePosition(startOfSelection, startScope); 89 int startIndex = indexForVisiblePosition(startOfSelection, startScope);
90 RefPtr<ContainerNode> endScope; 90 RefPtrWillBeRawPtr<ContainerNode> endScope = nullptr;
91 int endIndex = indexForVisiblePosition(endOfSelection, endScope); 91 int endIndex = indexForVisiblePosition(endOfSelection, endScope);
92 92
93 formatSelection(startOfSelection, endOfSelection); 93 formatSelection(startOfSelection, endOfSelection);
94 94
95 document().updateLayoutIgnorePendingStylesheets(); 95 document().updateLayoutIgnorePendingStylesheets();
96 96
97 ASSERT(startScope == endScope); 97 ASSERT(startScope == endScope);
98 ASSERT(startIndex >= 0); 98 ASSERT(startIndex >= 0);
99 ASSERT(startIndex <= endIndex); 99 ASSERT(startIndex <= endIndex);
100 if (startScope == endScope && startIndex >= 0 && startIndex <= endIndex) { 100 if (startScope == endScope && startIndex >= 0 && startIndex <= endIndex) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const 283 PassRefPtr<Element> ApplyBlockElementCommand::createBlockElement() const
284 { 284 {
285 RefPtr<Element> element = createHTMLElement(document(), m_tagName); 285 RefPtr<Element> element = createHTMLElement(document(), m_tagName);
286 if (m_inlineStyle.length()) 286 if (m_inlineStyle.length())
287 element->setAttribute(styleAttr, m_inlineStyle); 287 element->setAttribute(styleAttr, m_inlineStyle);
288 return element.release(); 288 return element.release();
289 } 289 }
290 290
291 } 291 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/InsertListCommand.cpp » ('j') | Source/core/editing/htmlediting.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698