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 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 } | 1546 } |
1547 | 1547 |
1548 bool InspectorStyleSheet::resourceStyleSheetText(String* result) const | 1548 bool InspectorStyleSheet::resourceStyleSheetText(String* result) const |
1549 { | 1549 { |
1550 if (m_origin == TypeBuilder::CSS::StyleSheetOrigin::User || m_origin == Type
Builder::CSS::StyleSheetOrigin::User_agent) | 1550 if (m_origin == TypeBuilder::CSS::StyleSheetOrigin::User || m_origin == Type
Builder::CSS::StyleSheetOrigin::User_agent) |
1551 return false; | 1551 return false; |
1552 | 1552 |
1553 if (!ownerDocument()) | 1553 if (!ownerDocument()) |
1554 return false; | 1554 return false; |
1555 | 1555 |
| 1556 KURL url(ParsedURLString, m_pageStyleSheet->href()); |
| 1557 if (m_pageAgent->getEditedResourceContent(url, result)) |
| 1558 return true; |
| 1559 |
1556 bool base64Encoded; | 1560 bool base64Encoded; |
1557 bool success = m_resourceAgent->fetchResourceContent(ownerDocument(), KURL(P
arsedURLString, m_pageStyleSheet->href()), result, &base64Encoded) && !base64Enc
oded; | 1561 bool success = m_resourceAgent->fetchResourceContent(ownerDocument(), url, r
esult, &base64Encoded); |
1558 return success; | 1562 return success && !base64Encoded; |
1559 } | 1563 } |
1560 | 1564 |
1561 Element* InspectorStyleSheet::ownerStyleElement() const | 1565 Element* InspectorStyleSheet::ownerStyleElement() const |
1562 { | 1566 { |
1563 Node* ownerNode = m_pageStyleSheet->ownerNode(); | 1567 Node* ownerNode = m_pageStyleSheet->ownerNode(); |
1564 if (!ownerNode || !ownerNode->isElementNode()) | 1568 if (!ownerNode || !ownerNode->isElementNode()) |
1565 return 0; | 1569 return 0; |
1566 Element* ownerElement = toElement(ownerNode); | 1570 Element* ownerElement = toElement(ownerNode); |
1567 | 1571 |
1568 if (!isHTMLStyleElement(ownerElement) && !isSVGStyleElement(ownerElement)) | 1572 if (!isHTMLStyleElement(ownerElement) && !isSVGStyleElement(ownerElement)) |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 void InspectorStyleSheetForInlineStyle::trace(Visitor* visitor) | 1715 void InspectorStyleSheetForInlineStyle::trace(Visitor* visitor) |
1712 { | 1716 { |
1713 visitor->trace(m_element); | 1717 visitor->trace(m_element); |
1714 visitor->trace(m_ruleSourceData); | 1718 visitor->trace(m_ruleSourceData); |
1715 visitor->trace(m_inspectorStyle); | 1719 visitor->trace(m_inspectorStyle); |
1716 InspectorStyleSheetBase::trace(visitor); | 1720 InspectorStyleSheetBase::trace(visitor); |
1717 } | 1721 } |
1718 | 1722 |
1719 } // namespace blink | 1723 } // namespace blink |
1720 | 1724 |
OLD | NEW |