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

Side by Side Diff: WebCore/inspector/InspectorStyleSheet.cpp

Issue 5446003: Merge 72938 - 2010-11-30 Pavel Feldman <pfeldman@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years 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
« no previous file with comments | « WebCore/inspector/InspectorCSSAgent.cpp ('k') | WebCore/inspector/front-end/CSSStyleModel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 if (m_pageStyleSheet && !m_pageStyleSheet->finalURL().isEmpty()) 581 if (m_pageStyleSheet && !m_pageStyleSheet->finalURL().isEmpty())
582 return m_pageStyleSheet->finalURL().string(); 582 return m_pageStyleSheet->finalURL().string();
583 return m_documentURL; 583 return m_documentURL;
584 } 584 }
585 585
586 void InspectorStyleSheet::reparseStyleSheet(const String& text) 586 void InspectorStyleSheet::reparseStyleSheet(const String& text)
587 { 587 {
588 for (unsigned i = 0, size = m_pageStyleSheet->length(); i < size; ++i) 588 for (unsigned i = 0, size = m_pageStyleSheet->length(); i < size; ++i)
589 m_pageStyleSheet->remove(i); 589 m_pageStyleSheet->remove(i);
590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); 590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing());
591 m_pageStyleSheet->styleSheetChanged();
591 m_inspectorStyles.clear(); 592 m_inspectorStyles.clear();
592 } 593 }
593 594
594 bool InspectorStyleSheet::setText(const String& text) 595 bool InspectorStyleSheet::setText(const String& text)
595 { 596 {
596 if (!m_parsedStyleSheet) 597 if (!m_parsedStyleSheet)
597 return false; 598 return false;
598 599
599 m_parsedStyleSheet->setText(text); 600 m_parsedStyleSheet->setText(text);
600 m_flatRules.clear(); 601 m_flatRules.clear();
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1158
1158 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat ion::create(); 1159 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat ion::create();
1159 CSSParser p; 1160 CSSParser p;
1160 p.parseDeclaration(tempDeclaration.get(), styleText, result); 1161 p.parseDeclaration(tempDeclaration.get(), styleText, result);
1161 return true; 1162 return true;
1162 } 1163 }
1163 1164
1164 } // namespace WebCore 1165 } // namespace WebCore
1165 1166
1166 #endif // ENABLE(INSPECTOR) 1167 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « WebCore/inspector/InspectorCSSAgent.cpp ('k') | WebCore/inspector/front-end/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698