| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 RevalidateStyleAttributeTask::RevalidateStyleAttributeTask(InspectorDOMAgent* do
mAgent) | 196 RevalidateStyleAttributeTask::RevalidateStyleAttributeTask(InspectorDOMAgent* do
mAgent) |
| 197 : m_domAgent(domAgent) | 197 : m_domAgent(domAgent) |
| 198 , m_timer(this, &RevalidateStyleAttributeTask::onTimer) | 198 , m_timer(this, &RevalidateStyleAttributeTask::onTimer) |
| 199 { | 199 { |
| 200 } | 200 } |
| 201 | 201 |
| 202 void RevalidateStyleAttributeTask::scheduleFor(Element* element) | 202 void RevalidateStyleAttributeTask::scheduleFor(Element* element) |
| 203 { | 203 { |
| 204 m_elements.add(element); | 204 m_elements.add(element); |
| 205 if (!m_timer.isActive()) | 205 if (!m_timer.isActive()) |
| 206 m_timer.startOneShot(0); | 206 m_timer.startOneShot(0, FROM_HERE); |
| 207 } | 207 } |
| 208 | 208 |
| 209 void RevalidateStyleAttributeTask::onTimer(Timer<RevalidateStyleAttributeTask>*) | 209 void RevalidateStyleAttributeTask::onTimer(Timer<RevalidateStyleAttributeTask>*) |
| 210 { | 210 { |
| 211 // The timer is stopped on m_domAgent destruction, so this method will never
be called after m_domAgent has been destroyed. | 211 // The timer is stopped on m_domAgent destruction, so this method will never
be called after m_domAgent has been destroyed. |
| 212 Vector<Element*> elements; | 212 Vector<Element*> elements; |
| 213 for (HashSet<RefPtr<Element> >::iterator it = m_elements.begin(), end = m_el
ements.end(); it != end; ++it) | 213 for (HashSet<RefPtr<Element> >::iterator it = m_elements.begin(), end = m_el
ements.end(); it != end; ++it) |
| 214 elements.append(it->get()); | 214 elements.append(it->get()); |
| 215 m_domAgent->styleAttributeInvalidated(elements); | 215 m_domAgent->styleAttributeInvalidated(elements); |
| 216 | 216 |
| (...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 if (!m_documentNodeToIdMap.contains(m_document)) { | 2051 if (!m_documentNodeToIdMap.contains(m_document)) { |
| 2052 RefPtr<TypeBuilder::DOM::Node> root; | 2052 RefPtr<TypeBuilder::DOM::Node> root; |
| 2053 getDocument(errorString, root); | 2053 getDocument(errorString, root); |
| 2054 return errorString->isEmpty(); | 2054 return errorString->isEmpty(); |
| 2055 } | 2055 } |
| 2056 return true; | 2056 return true; |
| 2057 } | 2057 } |
| 2058 | 2058 |
| 2059 } // namespace WebCore | 2059 } // namespace WebCore |
| 2060 | 2060 |
| OLD | NEW |