| 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 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 } | 1448 } |
| 1449 | 1449 |
| 1450 return result; | 1450 return result; |
| 1451 } | 1451 } |
| 1452 | 1452 |
| 1453 PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorCSSAgent::buildObjectForAttribut
esStyle(Element* element) | 1453 PassRefPtr<TypeBuilder::CSS::CSSStyle> InspectorCSSAgent::buildObjectForAttribut
esStyle(Element* element) |
| 1454 { | 1454 { |
| 1455 if (!element->isStyledElement()) | 1455 if (!element->isStyledElement()) |
| 1456 return 0; | 1456 return 0; |
| 1457 | 1457 |
| 1458 const StylePropertySet* attributeStyle = static_cast<StyledElement*>(element
)->presentationAttributeStyle(); | 1458 // FIXME: Ugliness below. |
| 1459 StylePropertySet* attributeStyle = const_cast<StylePropertySet*>(static_cast
<StyledElement*>(element)->presentationAttributeStyle()); |
| 1459 if (!attributeStyle) | 1460 if (!attributeStyle) |
| 1460 return 0; | 1461 return 0; |
| 1461 | 1462 |
| 1462 RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSI
d(), const_cast<StylePropertySet*>(attributeStyle)->ensureCSSStyleDeclaration(),
0); | 1463 ASSERT(attributeStyle->isMutable()); |
| 1464 MutableStylePropertySet* mutableAttributeStyle = static_cast<MutableStylePro
pertySet*>(attributeStyle); |
| 1465 |
| 1466 RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSI
d(), mutableAttributeStyle->ensureCSSStyleDeclaration(), 0); |
| 1463 return inspectorStyle->buildObjectForStyle(); | 1467 return inspectorStyle->buildObjectForStyle(); |
| 1464 } | 1468 } |
| 1465 | 1469 |
| 1466 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > InspectorCSSAgent::bui
ldArrayForRegions(ErrorString* errorString, PassRefPtr<NodeList> regionList, int
documentNodeId) | 1470 PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > InspectorCSSAgent::bui
ldArrayForRegions(ErrorString* errorString, PassRefPtr<NodeList> regionList, int
documentNodeId) |
| 1467 { | 1471 { |
| 1468 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > regions = TypeBuilder:
:Array<TypeBuilder::CSS::Region>::create(); | 1472 RefPtr<TypeBuilder::Array<TypeBuilder::CSS::Region> > regions = TypeBuilder:
:Array<TypeBuilder::CSS::Region>::create(); |
| 1469 | 1473 |
| 1470 for (unsigned i = 0; i < regionList->length(); ++i) { | 1474 for (unsigned i = 0; i < regionList->length(); ++i) { |
| 1471 TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset; | 1475 TypeBuilder::CSS::Region::RegionOverset::Enum regionOverset; |
| 1472 | 1476 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 documentsToChange.add(element->ownerDocument()); | 1572 documentsToChange.add(element->ownerDocument()); |
| 1569 } | 1573 } |
| 1570 | 1574 |
| 1571 m_nodeIdToForcedPseudoState.clear(); | 1575 m_nodeIdToForcedPseudoState.clear(); |
| 1572 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1576 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
| 1573 (*it)->styleResolverChanged(RecalcStyleImmediately); | 1577 (*it)->styleResolverChanged(RecalcStyleImmediately); |
| 1574 } | 1578 } |
| 1575 | 1579 |
| 1576 } // namespace WebCore | 1580 } // namespace WebCore |
| 1577 | 1581 |
| OLD | NEW |