| 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 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1684 bool InspectorStyleSheet::inlineStyleSheetText(String* result) const | 1684 bool InspectorStyleSheet::inlineStyleSheetText(String* result) const |
| 1685 { | 1685 { |
| 1686 if (!m_pageStyleSheet) | 1686 if (!m_pageStyleSheet) |
| 1687 return false; | 1687 return false; |
| 1688 | 1688 |
| 1689 Node* ownerNode = m_pageStyleSheet->ownerNode(); | 1689 Node* ownerNode = m_pageStyleSheet->ownerNode(); |
| 1690 if (!ownerNode || ownerNode->nodeType() != Node::ELEMENT_NODE) | 1690 if (!ownerNode || ownerNode->nodeType() != Node::ELEMENT_NODE) |
| 1691 return false; | 1691 return false; |
| 1692 Element* ownerElement = toElement(ownerNode); | 1692 Element* ownerElement = toElement(ownerNode); |
| 1693 | 1693 |
| 1694 if (!ownerElement->hasTagName(HTMLNames::styleTag) && !ownerElement->hasTagN
ame(SVGNames::styleTag)) | 1694 // FIXME: Handle @viewport rules. |
| 1695 if (!ownerElement->hasTagName(HTMLNames::styleTag) && !ownerElement->hasTagN
ame(SVGNames::styleTag) && !ownerElement->hasTagName(HTMLNames::metaTag)) |
| 1695 return false; | 1696 return false; |
| 1696 *result = ownerElement->textContent(); | 1697 *result = ownerElement->textContent(); |
| 1697 return true; | 1698 return true; |
| 1698 } | 1699 } |
| 1699 | 1700 |
| 1700 PassRefPtr<InspectorStyleSheetForInlineStyle> InspectorStyleSheetForInlineStyle:
:create(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<Element> ele
ment, TypeBuilder::CSS::StyleSheetOrigin::Enum origin, Listener* listener) | 1701 PassRefPtr<InspectorStyleSheetForInlineStyle> InspectorStyleSheetForInlineStyle:
:create(InspectorPageAgent* pageAgent, const String& id, PassRefPtr<Element> ele
ment, TypeBuilder::CSS::StyleSheetOrigin::Enum origin, Listener* listener) |
| 1701 { | 1702 { |
| 1702 return adoptRef(new InspectorStyleSheetForInlineStyle(pageAgent, id, element
, origin, listener)); | 1703 return adoptRef(new InspectorStyleSheetForInlineStyle(pageAgent, id, element
, origin, listener)); |
| 1703 } | 1704 } |
| 1704 | 1705 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 | 1812 |
| 1812 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); | 1813 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); |
| 1813 RuleSourceDataList ruleSourceDataResult; | 1814 RuleSourceDataList ruleSourceDataResult; |
| 1814 StyleSheetHandler handler(m_styleText, m_element->document(), m_element->doc
ument()->elementSheet()->contents(), &ruleSourceDataResult); | 1815 StyleSheetHandler handler(m_styleText, m_element->document(), m_element->doc
ument()->elementSheet()->contents(), &ruleSourceDataResult); |
| 1815 createCSSParser(m_element->document())->parseDeclaration(tempDeclaration.get
(), m_styleText, &handler, m_element->document()->elementSheet()->contents()); | 1816 createCSSParser(m_element->document())->parseDeclaration(tempDeclaration.get
(), m_styleText, &handler, m_element->document()->elementSheet()->contents()); |
| 1816 return ruleSourceDataResult.first().release(); | 1817 return ruleSourceDataResult.first().release(); |
| 1817 } | 1818 } |
| 1818 | 1819 |
| 1819 } // namespace WebCore | 1820 } // namespace WebCore |
| 1820 | 1821 |
| OLD | NEW |