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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 501 |
502 InspectorStyle::InspectorStyle(const InspectorCSSId& styleId, PassRefPtr<CSSStyl
eDeclaration> style, InspectorStyleSheet* parentStyleSheet) | 502 InspectorStyle::InspectorStyle(const InspectorCSSId& styleId, PassRefPtr<CSSStyl
eDeclaration> style, InspectorStyleSheet* parentStyleSheet) |
503 : m_styleId(styleId) | 503 : m_styleId(styleId) |
504 , m_style(style) | 504 , m_style(style) |
505 , m_parentStyleSheet(parentStyleSheet) | 505 , m_parentStyleSheet(parentStyleSheet) |
506 , m_formatAcquired(false) | 506 , m_formatAcquired(false) |
507 { | 507 { |
508 ASSERT(m_style); | 508 ASSERT(m_style); |
509 } | 509 } |
510 | 510 |
511 InspectorStyle::~InspectorStyle() | |
512 { | |
513 } | |
514 | |
515 PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::buildObjectForStyle() con
st | 511 PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorStyle::buildObjectForStyle() con
st |
516 { | 512 { |
517 RefPtr<TypeBuilder::CSS::CSSStyle> result = styleWithProperties(); | 513 RefPtr<TypeBuilder::CSS::CSSStyle> result = styleWithProperties(); |
518 if (!m_styleId.isEmpty()) | 514 if (!m_styleId.isEmpty()) |
519 result->setStyleId(m_styleId.asProtocolValue<TypeBuilder::CSS::CSSStyleI
d>()); | 515 result->setStyleId(m_styleId.asProtocolValue<TypeBuilder::CSS::CSSStyleI
d>()); |
520 | 516 |
521 result->setWidth(m_style->getPropertyValue("width")); | 517 result->setWidth(m_style->getPropertyValue("width")); |
522 result->setHeight(m_style->getPropertyValue("height")); | 518 result->setHeight(m_style->getPropertyValue("height")); |
523 | 519 |
524 RefPtr<CSSRuleSourceData> sourceData = extractSourceData(); | 520 RefPtr<CSSRuleSourceData> sourceData = extractSourceData(); |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1819 | 1815 |
1820 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); | 1816 RefPtr<MutableStylePropertySet> tempDeclaration = MutableStylePropertySet::c
reate(); |
1821 RuleSourceDataList ruleSourceDataResult; | 1817 RuleSourceDataList ruleSourceDataResult; |
1822 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do
cument().elementSheet()->contents(), &ruleSourceDataResult); | 1818 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do
cument().elementSheet()->contents(), &ruleSourceDataResult); |
1823 createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.ge
t(), m_styleText, &handler, m_element->document().elementSheet()->contents()); | 1819 createCSSParser(&m_element->document())->parseDeclaration(tempDeclaration.ge
t(), m_styleText, &handler, m_element->document().elementSheet()->contents()); |
1824 return ruleSourceDataResult.first().release(); | 1820 return ruleSourceDataResult.first().release(); |
1825 } | 1821 } |
1826 | 1822 |
1827 } // namespace WebCore | 1823 } // namespace WebCore |
1828 | 1824 |
OLD | NEW |