Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: Source/core/inspector/InspectorStyleSheet.cpp

Issue 315213006: Oilpan: Remove RefPtrs to Node and its subclasses in core/inspector/ with Oilpan transition types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 if (!ownerNode || !ownerNode->isElementNode()) 1540 if (!ownerNode || !ownerNode->isElementNode())
1541 return false; 1541 return false;
1542 Element& ownerElement = toElement(*ownerNode); 1542 Element& ownerElement = toElement(*ownerNode);
1543 1543
1544 if (!isHTMLStyleElement(ownerElement) && !isSVGStyleElement(ownerElement)) 1544 if (!isHTMLStyleElement(ownerElement) && !isSVGStyleElement(ownerElement))
1545 return false; 1545 return false;
1546 *result = ownerElement.textContent(); 1546 *result = ownerElement.textContent();
1547 return true; 1547 return true;
1548 } 1548 }
1549 1549
1550 PassRefPtr<InspectorStyleSheetForInlineStyle> InspectorStyleSheetForInlineStyle: :create(const String& id, PassRefPtr<Element> element, Listener* listener) 1550 PassRefPtr<InspectorStyleSheetForInlineStyle> InspectorStyleSheetForInlineStyle: :create(const String& id, PassRefPtrWillBeRawPtr<Element> element, Listener* lis tener)
1551 { 1551 {
1552 return adoptRef(new InspectorStyleSheetForInlineStyle(id, element, listener) ); 1552 return adoptRef(new InspectorStyleSheetForInlineStyle(id, element, listener) );
1553 } 1553 }
1554 1554
1555 InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle(const Strin g& id, PassRefPtr<Element> element, Listener* listener) 1555 InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle(const Strin g& id, PassRefPtrWillBeRawPtr<Element> element, Listener* listener)
1556 : InspectorStyleSheetBase(id, listener) 1556 : InspectorStyleSheetBase(id, listener)
1557 , m_element(element) 1557 , m_element(element)
1558 , m_ruleSourceData(nullptr) 1558 , m_ruleSourceData(nullptr)
1559 , m_isStyleTextValid(false) 1559 , m_isStyleTextValid(false)
1560 { 1560 {
1561 ASSERT(m_element); 1561 ASSERT(m_element);
1562 m_inspectorStyle = InspectorStyle::create(InspectorCSSId(id, 0), inlineStyle (), this); 1562 m_inspectorStyle = InspectorStyle::create(InspectorCSSId(id, 0), inlineStyle (), this);
1563 m_styleText = m_element->isStyledElement() ? m_element->getAttribute("style" ).string() : String(); 1563 m_styleText = m_element->isStyledElement() ? m_element->getAttribute("style" ).string() : String();
1564 } 1564 }
1565 1565
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 1671
1672 RefPtrWillBeRawPtr<MutableStylePropertySet> tempDeclaration = MutableStylePr opertySet::create(); 1672 RefPtrWillBeRawPtr<MutableStylePropertySet> tempDeclaration = MutableStylePr opertySet::create();
1673 RuleSourceDataList ruleSourceDataResult; 1673 RuleSourceDataList ruleSourceDataResult;
1674 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do cument().elementSheet().contents(), &ruleSourceDataResult); 1674 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do cument().elementSheet().contents(), &ruleSourceDataResult);
1675 BisonCSSParser(parserContextForDocument(&m_element->document())).parseDeclar ation(tempDeclaration.get(), m_styleText, &handler, m_element->document().elemen tSheet().contents()); 1675 BisonCSSParser(parserContextForDocument(&m_element->document())).parseDeclar ation(tempDeclaration.get(), m_styleText, &handler, m_element->document().elemen tSheet().contents());
1676 return ruleSourceDataResult.first().release(); 1676 return ruleSourceDataResult.first().release();
1677 } 1677 }
1678 1678
1679 } // namespace WebCore 1679 } // namespace WebCore
1680 1680
OLDNEW
« Source/core/inspector/InspectorDOMAgent.cpp ('K') | « Source/core/inspector/InspectorStyleSheet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698