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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
993 m_pageStyleSheet->clearChildRuleCSSOMWrappers(); | 993 m_pageStyleSheet->clearChildRuleCSSOMWrappers(); |
994 } | 994 } |
995 { | 995 { |
996 CSSStyleSheet::RuleMutationScope mutationScope(m_pageStyleSheet.get()); | 996 CSSStyleSheet::RuleMutationScope mutationScope(m_pageStyleSheet.get()); |
997 m_pageStyleSheet->contents()->parseString(text); | 997 m_pageStyleSheet->contents()->parseString(text); |
998 } | 998 } |
999 | 999 |
1000 if (listener()) | 1000 if (listener()) |
1001 listener()->didReparseStyleSheet(); | 1001 listener()->didReparseStyleSheet(); |
1002 fireStyleSheetChanged(); | 1002 fireStyleSheetChanged(); |
1003 m_pageStyleSheet->ownerDocument()->styleResolverChanged(RecalcStyleImmediate ly, FullStyleUpdate); | 1003 m_pageStyleSheet->ownerDocument()->styleResolverChanged(RecalcStyleDeferred, FullStyleUpdate); |
vsevik
2014/05/19 09:32:39
This is needed to make sure StyleSheetAdded/Remove
| |
1004 return true; | 1004 return true; |
1005 } | 1005 } |
1006 | 1006 |
1007 String InspectorStyleSheet::ruleSelector(const InspectorCSSId& id, ExceptionStat e& exceptionState) | 1007 String InspectorStyleSheet::ruleSelector(const InspectorCSSId& id, ExceptionStat e& exceptionState) |
1008 { | 1008 { |
1009 CSSStyleRule* rule = ruleForId(id); | 1009 CSSStyleRule* rule = ruleForId(id); |
1010 if (!rule) { | 1010 if (!rule) { |
1011 exceptionState.throwDOMException(NotFoundError, "No rule was found for t he given ID."); | 1011 exceptionState.throwDOMException(NotFoundError, "No rule was found for t he given ID."); |
1012 return ""; | 1012 return ""; |
1013 } | 1013 } |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1665 | 1665 |
1666 RefPtrWillBeRawPtr<MutableStylePropertySet> tempDeclaration = MutableStylePr opertySet::create(); | 1666 RefPtrWillBeRawPtr<MutableStylePropertySet> tempDeclaration = MutableStylePr opertySet::create(); |
1667 RuleSourceDataList ruleSourceDataResult; | 1667 RuleSourceDataList ruleSourceDataResult; |
1668 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do cument().elementSheet().contents(), &ruleSourceDataResult); | 1668 StyleSheetHandler handler(m_styleText, &m_element->document(), m_element->do cument().elementSheet().contents(), &ruleSourceDataResult); |
1669 BisonCSSParser(parserContextForDocument(&m_element->document())).parseDeclar ation(tempDeclaration.get(), m_styleText, &handler, m_element->document().elemen tSheet().contents()); | 1669 BisonCSSParser(parserContextForDocument(&m_element->document())).parseDeclar ation(tempDeclaration.get(), m_styleText, &handler, m_element->document().elemen tSheet().contents()); |
1670 return ruleSourceDataResult.first().release(); | 1670 return ruleSourceDataResult.first().release(); |
1671 } | 1671 } |
1672 | 1672 |
1673 } // namespace WebCore | 1673 } // namespace WebCore |
1674 | 1674 |
OLD | NEW |