OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 case CSSRule::kStyleRule: | 404 case CSSRule::kStyleRule: |
405 retrieveResourcesForProperties( | 405 retrieveResourcesForProperties( |
406 &toCSSStyleRule(rule)->styleRule()->properties(), document); | 406 &toCSSStyleRule(rule)->styleRule()->properties(), document); |
407 break; | 407 break; |
408 | 408 |
409 case CSSRule::kImportRule: { | 409 case CSSRule::kImportRule: { |
410 CSSImportRule* importRule = toCSSImportRule(rule); | 410 CSSImportRule* importRule = toCSSImportRule(rule); |
411 KURL sheetBaseURL = rule->parentStyleSheet()->baseURL(); | 411 KURL sheetBaseURL = rule->parentStyleSheet()->baseURL(); |
412 ASSERT(sheetBaseURL.isValid()); | 412 ASSERT(sheetBaseURL.isValid()); |
413 KURL importURL = KURL(sheetBaseURL, importRule->href()); | 413 KURL importURL = KURL(sheetBaseURL, importRule->href()); |
414 if (m_resourceURLs.contains(importURL)) | |
415 break; | |
416 if (importRule->styleSheet()) | 414 if (importRule->styleSheet()) |
417 serializeCSSStyleSheet(*importRule->styleSheet(), importURL); | 415 serializeCSSStyleSheet(*importRule->styleSheet(), importURL); |
418 break; | 416 break; |
419 } | 417 } |
420 | 418 |
421 // Rules inheriting CSSGroupingRule | 419 // Rules inheriting CSSGroupingRule |
422 case CSSRule::kMediaRule: | 420 case CSSRule::kMediaRule: |
423 case CSSRule::kSupportsRule: { | 421 case CSSRule::kSupportsRule: { |
424 CSSRuleList* ruleList = rule->cssRules(); | 422 CSSRuleList* ruleList = rule->cssRules(); |
425 for (unsigned i = 0; i < ruleList->length(); ++i) | 423 for (unsigned i = 0; i < ruleList->length(); ++i) |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 emitsMinus = ch == '-'; | 557 emitsMinus = ch == '-'; |
560 builder.append(ch); | 558 builder.append(ch); |
561 } | 559 } |
562 CString escapedUrl = builder.toString().ascii(); | 560 CString escapedUrl = builder.toString().ascii(); |
563 return String::format("saved from url=(%04d)%s", | 561 return String::format("saved from url=(%04d)%s", |
564 static_cast<int>(escapedUrl.length()), | 562 static_cast<int>(escapedUrl.length()), |
565 escapedUrl.data()); | 563 escapedUrl.data()); |
566 } | 564 } |
567 | 565 |
568 } // namespace blink | 566 } // namespace blink |
OLD | NEW |