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

Side by Side Diff: sky/engine/core/editing/ApplyBlockElementCommand.cpp

Issue 942933003: Remove almost all clients of isHTMLElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (text->previousSibling()->isTextNode() 223 if (text->previousSibling()->isTextNode()
224 && static_cast<unsigned>(m_endOfLastParagraph.offsetInContainerN ode()) <= toText(text->previousSibling())->length()) 224 && static_cast<unsigned>(m_endOfLastParagraph.offsetInContainerN ode()) <= toText(text->previousSibling())->length())
225 m_endOfLastParagraph = Position(toText(text->previousSibling()), m_endOfLastParagraph.offsetInContainerNode()); 225 m_endOfLastParagraph = Position(toText(text->previousSibling()), m_endOfLastParagraph.offsetInContainerNode());
226 } else 226 } else
227 m_endOfLastParagraph = Position(text.get(), m_endOfLastParagraph.off setInContainerNode() - 1); 227 m_endOfLastParagraph = Position(text.get(), m_endOfLastParagraph.off setInContainerNode() - 1);
228 } 228 }
229 229
230 return VisiblePosition(Position(text.get(), position.offsetInContainerNode() - 1)); 230 return VisiblePosition(Position(text.get(), position.offsetInContainerNode() - 1));
231 } 231 }
232 232
233 PassRefPtr<HTMLElement> ApplyBlockElementCommand::createBlockElement() const
234 {
235 RefPtr<HTMLElement> element = createHTMLElement(document(), m_tagName);
236 if (m_inlineStyle.length())
237 element->setAttribute(HTMLNames::styleAttr, m_inlineStyle);
238 return element.release();
239 } 233 }
240
241 }
OLDNEW
« no previous file with comments | « sky/engine/core/editing/ApplyBlockElementCommand.h ('k') | sky/engine/core/editing/EditingStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698