Chromium Code Reviews| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 #include "core/css/StyleSheetContents.h" | 47 #include "core/css/StyleSheetContents.h" |
| 48 #include "core/css/StyleSheetList.h" | 48 #include "core/css/StyleSheetList.h" |
| 49 #include "core/css/resolver/StyleResolver.h" | 49 #include "core/css/resolver/StyleResolver.h" |
| 50 #include "core/dom/Node.h" | 50 #include "core/dom/Node.h" |
| 51 #include "core/dom/StyleEngine.h" | 51 #include "core/dom/StyleEngine.h" |
| 52 #include "core/dom/Text.h" | 52 #include "core/dom/Text.h" |
| 53 #include "core/frame/LocalFrame.h" | 53 #include "core/frame/LocalFrame.h" |
| 54 #include "core/html/HTMLHeadElement.h" | 54 #include "core/html/HTMLHeadElement.h" |
| 55 #include "core/html/VoidCallback.h" | 55 #include "core/html/VoidCallback.h" |
| 56 #include "core/inspector/InspectorHistory.h" | 56 #include "core/inspector/InspectorHistory.h" |
| 57 #include "core/inspector/InspectorOverlay.h" | |
|
dgozman
2015/06/25 10:10:38
Not used.
sergeyv
2015/06/25 12:19:16
Done.
| |
| 57 #include "core/inspector/InspectorPageAgent.h" | 58 #include "core/inspector/InspectorPageAgent.h" |
| 58 #include "core/inspector/InspectorResourceAgent.h" | 59 #include "core/inspector/InspectorResourceAgent.h" |
| 59 #include "core/inspector/InspectorResourceContentLoader.h" | 60 #include "core/inspector/InspectorResourceContentLoader.h" |
| 60 #include "core/inspector/InspectorState.h" | 61 #include "core/inspector/InspectorState.h" |
| 61 #include "core/inspector/InstrumentingAgents.h" | 62 #include "core/inspector/InstrumentingAgents.h" |
| 62 #include "core/layout/LayoutObject.h" | 63 #include "core/layout/LayoutObject.h" |
| 63 #include "core/layout/LayoutObjectInlines.h" | 64 #include "core/layout/LayoutObjectInlines.h" |
| 64 #include "core/layout/LayoutText.h" | 65 #include "core/layout/LayoutText.h" |
| 65 #include "core/layout/LayoutTextFragment.h" | 66 #include "core/layout/LayoutTextFragment.h" |
| 66 #include "core/layout/line/InlineTextBox.h" | 67 #include "core/layout/line/InlineTextBox.h" |
| (...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1510 Element* element = toElement(m_domAgent->nodeForId(state.key)); | 1511 Element* element = toElement(m_domAgent->nodeForId(state.key)); |
| 1511 if (element && element->ownerDocument()) | 1512 if (element && element->ownerDocument()) |
| 1512 documentsToChange.add(element->ownerDocument()); | 1513 documentsToChange.add(element->ownerDocument()); |
| 1513 } | 1514 } |
| 1514 | 1515 |
| 1515 m_nodeIdToForcedPseudoState.clear(); | 1516 m_nodeIdToForcedPseudoState.clear(); |
| 1516 for (auto& document : documentsToChange) | 1517 for (auto& document : documentsToChange) |
| 1517 document->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::Inspector)); | 1518 document->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTr acing::create(StyleChangeReason::Inspector)); |
| 1518 } | 1519 } |
| 1519 | 1520 |
| 1521 void InspectorCSSAgent::updateCSSProperty(Node* node, CSSPropertyID propertyId, float newValue) | |
| 1522 { | |
| 1523 Element* element = toElement(node); | |
| 1524 if (element) { | |
| 1525 TrackExceptionState exceptionState; | |
| 1526 String newText = getPropertyNameString(propertyId) + " : " + String::nu mber(newValue) + "px"; | |
| 1527 element->style()->setCSSText(newText, exceptionState); | |
| 1528 } | |
| 1529 } | |
| 1530 | |
| 1520 DEFINE_TRACE(InspectorCSSAgent) | 1531 DEFINE_TRACE(InspectorCSSAgent) |
| 1521 { | 1532 { |
| 1522 visitor->trace(m_domAgent); | 1533 visitor->trace(m_domAgent); |
| 1523 visitor->trace(m_pageAgent); | 1534 visitor->trace(m_pageAgent); |
| 1524 visitor->trace(m_resourceAgent); | 1535 visitor->trace(m_resourceAgent); |
| 1525 #if ENABLE(OILPAN) | 1536 #if ENABLE(OILPAN) |
| 1526 visitor->trace(m_idToInspectorStyleSheet); | 1537 visitor->trace(m_idToInspectorStyleSheet); |
| 1527 visitor->trace(m_idToInspectorStyleSheetForInlineStyle); | 1538 visitor->trace(m_idToInspectorStyleSheetForInlineStyle); |
| 1528 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); | 1539 visitor->trace(m_cssStyleSheetToInspectorStyleSheet); |
| 1529 visitor->trace(m_documentToCSSStyleSheets); | 1540 visitor->trace(m_documentToCSSStyleSheets); |
| 1530 visitor->trace(m_invalidatedDocuments); | 1541 visitor->trace(m_invalidatedDocuments); |
| 1531 visitor->trace(m_nodeToInspectorStyleSheet); | 1542 visitor->trace(m_nodeToInspectorStyleSheet); |
| 1532 visitor->trace(m_documentToViaInspectorStyleSheet); | 1543 visitor->trace(m_documentToViaInspectorStyleSheet); |
| 1533 #endif | 1544 #endif |
| 1534 visitor->trace(m_inspectorUserAgentStyleSheet); | 1545 visitor->trace(m_inspectorUserAgentStyleSheet); |
| 1535 InspectorBaseAgent::trace(visitor); | 1546 InspectorBaseAgent::trace(visitor); |
| 1536 } | 1547 } |
| 1537 | 1548 |
| 1538 } // namespace blink | 1549 } // namespace blink |
| OLD | NEW |