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 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 return true; | 1723 return true; |
1724 } | 1724 } |
1725 | 1725 |
1726 bool InspectorStyleSheetForInlineStyle::setStyleText(CSSStyleDeclaration* style,
const String& text) | 1726 bool InspectorStyleSheetForInlineStyle::setStyleText(CSSStyleDeclaration* style,
const String& text) |
1727 { | 1727 { |
1728 ASSERT_UNUSED(style, style == inlineStyle()); | 1728 ASSERT_UNUSED(style, style == inlineStyle()); |
1729 TrackExceptionState exceptionState; | 1729 TrackExceptionState exceptionState; |
1730 | 1730 |
1731 { | 1731 { |
1732 InspectorCSSAgent::InlineStyleOverrideScope overrideScope(m_element->own
erDocument()); | 1732 InspectorCSSAgent::InlineStyleOverrideScope overrideScope(m_element->own
erDocument()); |
1733 m_element->setAttribute("style", text, exceptionState); | 1733 m_element->setAttribute("style", AtomicString(text), exceptionState); |
1734 } | 1734 } |
1735 | 1735 |
1736 m_styleText = text; | 1736 m_styleText = text; |
1737 m_isStyleTextValid = true; | 1737 m_isStyleTextValid = true; |
1738 m_ruleSourceData.clear(); | 1738 m_ruleSourceData.clear(); |
1739 return !exceptionState.hadException(); | 1739 return !exceptionState.hadException(); |
1740 } | 1740 } |
1741 | 1741 |
1742 PassOwnPtr<Vector<unsigned> > InspectorStyleSheetForInlineStyle::lineEndings() c
onst | 1742 PassOwnPtr<Vector<unsigned> > InspectorStyleSheetForInlineStyle::lineEndings() c
onst |
1743 { | 1743 { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 | 1803 |
1804 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); | 1804 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); |
1805 RuleSourceDataList ruleSourceDataResult; | 1805 RuleSourceDataList ruleSourceDataResult; |
1806 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do
cument().elementSheet()->contents(), &ruleSourceDataResult); | 1806 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do
cument().elementSheet()->contents(), &ruleSourceDataResult); |
1807 createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.ge
t(), m_styleText, &handler, m_element->document().elementSheet()->contents()); | 1807 createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.ge
t(), m_styleText, &handler, m_element->document().elementSheet()->contents()); |
1808 return ruleSourceDataResult.first().release(); | 1808 return ruleSourceDataResult.first().release(); |
1809 } | 1809 } |
1810 | 1810 |
1811 } // namespace WebCore | 1811 } // namespace WebCore |
1812 | 1812 |
OLD | NEW |