| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 m_endOfInsertedContent = m_startOfInsertedContent; | 482 m_endOfInsertedContent = m_startOfInsertedContent; |
| 483 } | 483 } |
| 484 } | 484 } |
| 485 | 485 |
| 486 static bool isInlineHTMLElementWithStyle(const Node* node) | 486 static bool isInlineHTMLElementWithStyle(const Node* node) |
| 487 { | 487 { |
| 488 // We don't want to skip over any block elements. | 488 // We don't want to skip over any block elements. |
| 489 if (isBlock(node)) | 489 if (isBlock(node)) |
| 490 return false; | 490 return false; |
| 491 | 491 |
| 492 if (!node->isHTMLElement()) | 492 if (!node->isElementNode()) |
| 493 return false; | 493 return false; |
| 494 | 494 |
| 495 // We can skip over elements whose class attribute is | 495 // We can skip over elements whose class attribute is |
| 496 // one of our internal classes. | 496 // one of our internal classes. |
| 497 const HTMLElement* element = toHTMLElement(node); | 497 const Element* element = toElement(node); |
| 498 const AtomicString& classAttributeValue = element->getAttribute(HTMLNames::c
lassAttr); | 498 const AtomicString& classAttributeValue = element->getAttribute(HTMLNames::c
lassAttr); |
| 499 if (classAttributeValue == AppleTabSpanClass) | 499 if (classAttributeValue == AppleTabSpanClass) |
| 500 return true; | 500 return true; |
| 501 if (classAttributeValue == AppleConvertedSpace) | 501 if (classAttributeValue == AppleConvertedSpace) |
| 502 return true; | 502 return true; |
| 503 if (classAttributeValue == ApplePasteAsQuotation) | 503 if (classAttributeValue == ApplePasteAsQuotation) |
| 504 return true; | 504 return true; |
| 505 | 505 |
| 506 return EditingStyle::elementIsStyledSpanOrHTMLEquivalent(element); | 506 return EditingStyle::elementIsStyledSpanOrHTMLEquivalent(element); |
| 507 } | 507 } |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 return false; | 998 return false; |
| 999 | 999 |
| 1000 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); | 1000 VisibleSelection selectionAfterReplace(m_selectReplacement ? start : end, en
d); |
| 1001 | 1001 |
| 1002 setEndingSelection(selectionAfterReplace); | 1002 setEndingSelection(selectionAfterReplace); |
| 1003 | 1003 |
| 1004 return true; | 1004 return true; |
| 1005 } | 1005 } |
| 1006 | 1006 |
| 1007 } // namespace blink | 1007 } // namespace blink |
| OLD | NEW |