| OLD | NEW |
| 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 Loading... |
| 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 } | |
| OLD | NEW |