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

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

Issue 2718543003: Remove EditingAppleTabSpan class handling (Closed)
Patch Set: Make editing/inserting/5549929-2.html pass Created 3 years, 9 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) 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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 if (isEnclosingBlock(node)) 990 if (isEnclosingBlock(node))
991 return false; 991 return false;
992 992
993 if (!node->isHTMLElement()) 993 if (!node->isHTMLElement())
994 return false; 994 return false;
995 995
996 // We can skip over elements whose class attribute is 996 // We can skip over elements whose class attribute is
997 // one of our internal classes. 997 // one of our internal classes.
998 const HTMLElement* element = toHTMLElement(node); 998 const HTMLElement* element = toHTMLElement(node);
999 const AtomicString& classAttributeValue = element->getAttribute(classAttr); 999 const AtomicString& classAttributeValue = element->getAttribute(classAttr);
1000 if (classAttributeValue == AppleTabSpanClass) {
1001 UseCounter::count(element->document(),
1002 UseCounter::EditingAppleTabSpanClass);
1003 return true;
1004 }
1005 if (classAttributeValue == AppleConvertedSpace) { 1000 if (classAttributeValue == AppleConvertedSpace) {
1006 UseCounter::count(element->document(), 1001 UseCounter::count(element->document(),
1007 UseCounter::EditingAppleConvertedSpace); 1002 UseCounter::EditingAppleConvertedSpace);
1008 return true; 1003 return true;
1009 } 1004 }
1010 1005
1011 return EditingStyle::elementIsStyledSpanOrHTMLEquivalent(element); 1006 return EditingStyle::elementIsStyledSpanOrHTMLEquivalent(element);
1012 } 1007 }
1013 1008
1014 static inline HTMLElement* 1009 static inline HTMLElement*
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 visitor->trace(m_startOfInsertedContent); 2008 visitor->trace(m_startOfInsertedContent);
2014 visitor->trace(m_endOfInsertedContent); 2009 visitor->trace(m_endOfInsertedContent);
2015 visitor->trace(m_insertionStyle); 2010 visitor->trace(m_insertionStyle);
2016 visitor->trace(m_documentFragment); 2011 visitor->trace(m_documentFragment);
2017 visitor->trace(m_startOfInsertedRange); 2012 visitor->trace(m_startOfInsertedRange);
2018 visitor->trace(m_endOfInsertedRange); 2013 visitor->trace(m_endOfInsertedRange);
2019 CompositeEditCommand::trace(visitor); 2014 CompositeEditCommand::trace(visitor);
2020 } 2015 }
2021 2016
2022 } // namespace blink 2017 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698