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

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

Issue 5701007: Merge 74020 - 2010-12-14 Alexander Pavlov <apavlov@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 | « LayoutTests/inspector/styles-new-API-expected.txt ('k') | no next file » | 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 String InspectorStyleSheet::finalURL() const 579 String InspectorStyleSheet::finalURL() const
580 { 580 {
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(0);
590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing()); 590 m_pageStyleSheet->parseString(text, m_pageStyleSheet->useStrictParsing());
591 m_pageStyleSheet->styleSheetChanged(); 591 m_pageStyleSheet->styleSheetChanged();
592 m_inspectorStyles.clear(); 592 m_inspectorStyles.clear();
593 } 593 }
594 594
595 bool InspectorStyleSheet::setText(const String& text) 595 bool InspectorStyleSheet::setText(const String& text)
596 { 596 {
597 if (!m_parsedStyleSheet) 597 if (!m_parsedStyleSheet)
598 return false; 598 return false;
599 599
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 1161
1162 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat ion::create(); 1162 RefPtr<CSSMutableStyleDeclaration> tempDeclaration = CSSMutableStyleDeclarat ion::create();
1163 CSSParser p; 1163 CSSParser p;
1164 p.parseDeclaration(tempDeclaration.get(), styleText, result); 1164 p.parseDeclaration(tempDeclaration.get(), styleText, result);
1165 return true; 1165 return true;
1166 } 1166 }
1167 1167
1168 } // namespace WebCore 1168 } // namespace WebCore
1169 1169
1170 #endif // ENABLE(INSPECTOR) 1170 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « LayoutTests/inspector/styles-new-API-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698