| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 m_frontend->childNodeRemoved(parentId, m_documentNodeToIdMap->get(node))
; | 1999 m_frontend->childNodeRemoved(parentId, m_documentNodeToIdMap->get(node))
; |
| 2000 } | 2000 } |
| 2001 unbind(node, m_documentNodeToIdMap.get()); | 2001 unbind(node, m_documentNodeToIdMap.get()); |
| 2002 } | 2002 } |
| 2003 | 2003 |
| 2004 void InspectorDOMAgent::willModifyDOMAttr(Element*, const AtomicString& oldValue
, const AtomicString& newValue) | 2004 void InspectorDOMAgent::willModifyDOMAttr(Element*, const AtomicString& oldValue
, const AtomicString& newValue) |
| 2005 { | 2005 { |
| 2006 m_suppressAttributeModifiedEvent = (oldValue == newValue); | 2006 m_suppressAttributeModifiedEvent = (oldValue == newValue); |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 void InspectorDOMAgent::didModifyDOMAttr(Element* element, const String& name, c
onst AtomicString& value) | 2009 void InspectorDOMAgent::didModifyDOMAttr(Element* element, const QualifiedName&
name, const AtomicString& value) |
| 2010 { | 2010 { |
| 2011 bool shouldSuppressEvent = m_suppressAttributeModifiedEvent; | 2011 bool shouldSuppressEvent = m_suppressAttributeModifiedEvent; |
| 2012 m_suppressAttributeModifiedEvent = false; | 2012 m_suppressAttributeModifiedEvent = false; |
| 2013 if (shouldSuppressEvent) | 2013 if (shouldSuppressEvent) |
| 2014 return; | 2014 return; |
| 2015 | 2015 |
| 2016 int id = boundNodeId(element); | 2016 int id = boundNodeId(element); |
| 2017 // If node is not mapped yet -> ignore the event. | 2017 // If node is not mapped yet -> ignore the event. |
| 2018 if (!id) | 2018 if (!id) |
| 2019 return; | 2019 return; |
| 2020 | 2020 |
| 2021 if (m_domListener) | 2021 if (m_domListener) |
| 2022 m_domListener->didModifyDOMAttr(element); | 2022 m_domListener->didModifyDOMAttr(element); |
| 2023 | 2023 |
| 2024 m_frontend->attributeModified(id, name, value); | 2024 m_frontend->attributeModified(id, name.toString(), value); |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 void InspectorDOMAgent::didRemoveDOMAttr(Element* element, const String& name) | 2027 void InspectorDOMAgent::didRemoveDOMAttr(Element* element, const QualifiedName&
name) |
| 2028 { | 2028 { |
| 2029 int id = boundNodeId(element); | 2029 int id = boundNodeId(element); |
| 2030 // If node is not mapped yet -> ignore the event. | 2030 // If node is not mapped yet -> ignore the event. |
| 2031 if (!id) | 2031 if (!id) |
| 2032 return; | 2032 return; |
| 2033 | 2033 |
| 2034 if (m_domListener) | 2034 if (m_domListener) |
| 2035 m_domListener->didModifyDOMAttr(element); | 2035 m_domListener->didModifyDOMAttr(element); |
| 2036 | 2036 |
| 2037 m_frontend->attributeRemoved(id, name); | 2037 m_frontend->attributeRemoved(id, name.toString()); |
| 2038 } | 2038 } |
| 2039 | 2039 |
| 2040 void InspectorDOMAgent::styleAttributeInvalidated(const WillBeHeapVector<RawPtrW
illBeMember<Element> >& elements) | 2040 void InspectorDOMAgent::styleAttributeInvalidated(const WillBeHeapVector<RawPtrW
illBeMember<Element> >& elements) |
| 2041 { | 2041 { |
| 2042 RefPtr<TypeBuilder::Array<int> > nodeIds = TypeBuilder::Array<int>::create()
; | 2042 RefPtr<TypeBuilder::Array<int> > nodeIds = TypeBuilder::Array<int>::create()
; |
| 2043 for (unsigned i = 0, size = elements.size(); i < size; ++i) { | 2043 for (unsigned i = 0, size = elements.size(); i < size; ++i) { |
| 2044 Element* element = elements.at(i); | 2044 Element* element = elements.at(i); |
| 2045 int id = boundNodeId(element); | 2045 int id = boundNodeId(element); |
| 2046 // If node is not mapped yet -> ignore the event. | 2046 // If node is not mapped yet -> ignore the event. |
| 2047 if (!id) | 2047 if (!id) |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2303 visitor->trace(m_revalidateTask); | 2303 visitor->trace(m_revalidateTask); |
| 2304 visitor->trace(m_searchResults); | 2304 visitor->trace(m_searchResults); |
| 2305 #endif | 2305 #endif |
| 2306 visitor->trace(m_history); | 2306 visitor->trace(m_history); |
| 2307 visitor->trace(m_domEditor); | 2307 visitor->trace(m_domEditor); |
| 2308 visitor->trace(m_listener); | 2308 visitor->trace(m_listener); |
| 2309 InspectorBaseAgent::trace(visitor); | 2309 InspectorBaseAgent::trace(visitor); |
| 2310 } | 2310 } |
| 2311 | 2311 |
| 2312 } // namespace blink | 2312 } // namespace blink |
| OLD | NEW |