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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 425 } |
426 | 426 |
427 void InspectorCSSAgent::didMutateRules(CSSStyleSheet* styleSheet) | 427 void InspectorCSSAgent::didMutateRules(CSSStyleSheet* styleSheet) |
428 { | 428 { |
429 --m_styleSheetsPendingMutation; | 429 --m_styleSheetsPendingMutation; |
430 ASSERT(m_styleSheetsPendingMutation >= 0); | 430 ASSERT(m_styleSheetsPendingMutation >= 0); |
431 | 431 |
432 if (!styleSheetEditInProgress()) { | 432 if (!styleSheetEditInProgress()) { |
433 Document* owner = styleSheet->ownerDocument(); | 433 Document* owner = styleSheet->ownerDocument(); |
434 if (owner) | 434 if (owner) |
435 owner->modifiedStyleSheet(styleSheet, RecalcStyleDeferred, FullStyle
Update); | 435 owner->modifiedStyleSheet(styleSheet, FullStyleUpdate); |
436 } | 436 } |
437 } | 437 } |
438 | 438 |
439 void InspectorCSSAgent::willMutateStyle() | 439 void InspectorCSSAgent::willMutateStyle() |
440 { | 440 { |
441 m_styleDeclarationPendingMutation = true; | 441 m_styleDeclarationPendingMutation = true; |
442 } | 442 } |
443 | 443 |
444 void InspectorCSSAgent::didMutateStyle(CSSStyleDeclaration* style, bool isInline
Style) | 444 void InspectorCSSAgent::didMutateStyle(CSSStyleDeclaration* style, bool isInline
Style) |
445 { | 445 { |
446 ASSERT(m_styleDeclarationPendingMutation); | 446 ASSERT(m_styleDeclarationPendingMutation); |
447 m_styleDeclarationPendingMutation = false; | 447 m_styleDeclarationPendingMutation = false; |
448 if (!styleSheetEditInProgress() && !isInlineStyle) { | 448 if (!styleSheetEditInProgress() && !isInlineStyle) { |
449 CSSStyleSheet* parentSheet = style->parentStyleSheet(); | 449 CSSStyleSheet* parentSheet = style->parentStyleSheet(); |
450 Document* owner = parentSheet ? parentSheet->ownerDocument() : 0; | 450 Document* owner = parentSheet ? parentSheet->ownerDocument() : 0; |
451 if (owner) | 451 if (owner) |
452 owner->modifiedStyleSheet(parentSheet, RecalcStyleDeferred, FullStyl
eUpdate); | 452 owner->modifiedStyleSheet(parentSheet, FullStyleUpdate); |
453 } | 453 } |
454 } | 454 } |
455 | 455 |
456 void InspectorCSSAgent::activeStyleSheetsUpdated(Document* document) | 456 void InspectorCSSAgent::activeStyleSheetsUpdated(Document* document) |
457 { | 457 { |
458 if (styleSheetEditInProgress()) | 458 if (styleSheetEditInProgress()) |
459 return; | 459 return; |
460 m_invalidatedDocuments.add(document); | 460 m_invalidatedDocuments.add(document); |
461 if (m_creatingViaInspectorStyleSheet) | 461 if (m_creatingViaInspectorStyleSheet) |
462 flushPendingFrontendMessages(); | 462 flushPendingFrontendMessages(); |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 documentsToChange.add(element->ownerDocument()); | 1309 documentsToChange.add(element->ownerDocument()); |
1310 } | 1310 } |
1311 | 1311 |
1312 m_nodeIdToForcedPseudoState.clear(); | 1312 m_nodeIdToForcedPseudoState.clear(); |
1313 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1313 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
1314 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); | 1314 (*it)->setNeedsStyleRecalc(SubtreeStyleChange); |
1315 } | 1315 } |
1316 | 1316 |
1317 } // namespace WebCore | 1317 } // namespace WebCore |
1318 | 1318 |
OLD | NEW |