OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1224 NodeIdToForcedPseudoState::iterator it = m_nodeIdToForcedPseudoState.find(no
deId); | 1224 NodeIdToForcedPseudoState::iterator it = m_nodeIdToForcedPseudoState.find(no
deId); |
1225 unsigned currentForcedPseudoState = it == m_nodeIdToForcedPseudoState.end()
? 0 : it->value; | 1225 unsigned currentForcedPseudoState = it == m_nodeIdToForcedPseudoState.end()
? 0 : it->value; |
1226 bool needStyleRecalc = forcedPseudoState != currentForcedPseudoState; | 1226 bool needStyleRecalc = forcedPseudoState != currentForcedPseudoState; |
1227 if (!needStyleRecalc) | 1227 if (!needStyleRecalc) |
1228 return; | 1228 return; |
1229 | 1229 |
1230 if (forcedPseudoState) | 1230 if (forcedPseudoState) |
1231 m_nodeIdToForcedPseudoState.set(nodeId, forcedPseudoState); | 1231 m_nodeIdToForcedPseudoState.set(nodeId, forcedPseudoState); |
1232 else | 1232 else |
1233 m_nodeIdToForcedPseudoState.remove(nodeId); | 1233 m_nodeIdToForcedPseudoState.remove(nodeId); |
1234 element->ownerDocument()->setNeedsStyleRecalc(); | 1234 element->ownerDocument()->setNeedsStyleRecalc(SubtreeStyleChange); |
1235 } | 1235 } |
1236 | 1236 |
1237 void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int doc
umentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result) | 1237 void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int doc
umentNodeId, RefPtr<TypeBuilder::Array<TypeBuilder::CSS::NamedFlow> >& result) |
1238 { | 1238 { |
1239 Document* document = m_domAgent->assertDocument(errorString, documentNodeId)
; | 1239 Document* document = m_domAgent->assertDocument(errorString, documentNodeId)
; |
1240 if (!document) | 1240 if (!document) |
1241 return; | 1241 return; |
1242 | 1242 |
1243 m_namedFlowCollectionsRequested.add(documentNodeId); | 1243 m_namedFlowCollectionsRequested.add(documentNodeId); |
1244 | 1244 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 { | 1732 { |
1733 HashSet<Document*> documentsToChange; | 1733 HashSet<Document*> documentsToChange; |
1734 for (NodeIdToForcedPseudoState::iterator it = m_nodeIdToForcedPseudoState.be
gin(), end = m_nodeIdToForcedPseudoState.end(); it != end; ++it) { | 1734 for (NodeIdToForcedPseudoState::iterator it = m_nodeIdToForcedPseudoState.be
gin(), end = m_nodeIdToForcedPseudoState.end(); it != end; ++it) { |
1735 Element* element = toElement(m_domAgent->nodeForId(it->key)); | 1735 Element* element = toElement(m_domAgent->nodeForId(it->key)); |
1736 if (element && element->ownerDocument()) | 1736 if (element && element->ownerDocument()) |
1737 documentsToChange.add(element->ownerDocument()); | 1737 documentsToChange.add(element->ownerDocument()); |
1738 } | 1738 } |
1739 | 1739 |
1740 m_nodeIdToForcedPseudoState.clear(); | 1740 m_nodeIdToForcedPseudoState.clear(); |
1741 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1741 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
1742 (*it)->setNeedsStyleRecalc(); | 1742 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); |
1743 } | 1743 } |
1744 | 1744 |
1745 } // namespace WebCore | 1745 } // namespace WebCore |
1746 | 1746 |
OLD | NEW |