| 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 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 | 1076 |
| 1077 platformFonts = TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage>::cre
ate(); | 1077 platformFonts = TypeBuilder::Array<TypeBuilder::CSS::PlatformFontUsage>::cre
ate(); |
| 1078 for (HashCountedSet<String>::iterator it = fontStats.begin(), end = fontStat
s.end(); it != end; ++it) { | 1078 for (HashCountedSet<String>::iterator it = fontStats.begin(), end = fontStat
s.end(); it != end; ++it) { |
| 1079 RefPtr<TypeBuilder::CSS::PlatformFontUsage> platformFont = TypeBuilder::
CSS::PlatformFontUsage::create() | 1079 RefPtr<TypeBuilder::CSS::PlatformFontUsage> platformFont = TypeBuilder::
CSS::PlatformFontUsage::create() |
| 1080 .setFamilyName(it->key) | 1080 .setFamilyName(it->key) |
| 1081 .setGlyphCount(it->value); | 1081 .setGlyphCount(it->value); |
| 1082 platformFonts->addItem(platformFont); | 1082 platformFonts->addItem(platformFont); |
| 1083 } | 1083 } |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 void InspectorCSSAgent::getAllStyleSheets(ErrorString*, RefPtr<TypeBuilder::Arra
y<TypeBuilder::CSS::CSSStyleSheetHeader> >& styleInfos) | |
| 1087 { | |
| 1088 styleInfos = TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader>::crea
te(); | |
| 1089 Vector<InspectorStyleSheet*> styleSheets; | |
| 1090 collectAllStyleSheets(styleSheets); | |
| 1091 for (size_t i = 0; i < styleSheets.size(); ++i) | |
| 1092 styleInfos->addItem(styleSheets.at(i)->buildObjectForStyleSheetInfo()); | |
| 1093 } | |
| 1094 | |
| 1095 void InspectorCSSAgent::getStyleSheet(ErrorString* errorString, const String& st
yleSheetId, RefPtr<TypeBuilder::CSS::CSSStyleSheetBody>& styleSheetObject) | 1086 void InspectorCSSAgent::getStyleSheet(ErrorString* errorString, const String& st
yleSheetId, RefPtr<TypeBuilder::CSS::CSSStyleSheetBody>& styleSheetObject) |
| 1096 { | 1087 { |
| 1097 InspectorStyleSheet* inspectorStyleSheet = assertStyleSheetForId(errorString
, styleSheetId); | 1088 InspectorStyleSheet* inspectorStyleSheet = assertStyleSheetForId(errorString
, styleSheetId); |
| 1098 if (!inspectorStyleSheet) | 1089 if (!inspectorStyleSheet) |
| 1099 return; | 1090 return; |
| 1100 | 1091 |
| 1101 Document* doc = inspectorStyleSheet->pageStyleSheet() ? inspectorStyleSheet-
>pageStyleSheet()->ownerDocument() : 0; | 1092 Document* doc = inspectorStyleSheet->pageStyleSheet() ? inspectorStyleSheet-
>pageStyleSheet()->ownerDocument() : 0; |
| 1102 if (!doc) | 1093 if (!doc) |
| 1103 return; | 1094 return; |
| 1104 | 1095 |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 documentsToChange.add(element->ownerDocument()); | 1762 documentsToChange.add(element->ownerDocument()); |
| 1772 } | 1763 } |
| 1773 | 1764 |
| 1774 m_nodeIdToForcedPseudoState.clear(); | 1765 m_nodeIdToForcedPseudoState.clear(); |
| 1775 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) | 1766 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu
mentsToChange.end(); it != end; ++it) |
| 1776 (*it)->setNeedsStyleRecalc(); | 1767 (*it)->setNeedsStyleRecalc(); |
| 1777 } | 1768 } |
| 1778 | 1769 |
| 1779 } // namespace WebCore | 1770 } // namespace WebCore |
| 1780 | 1771 |
| OLD | NEW |