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

Side by Side Diff: Source/WebCore/testing/Internals.cpp

Issue 11471034: Merge 136878 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "Page.h" 64 #include "Page.h"
65 #include "PrintContext.h" 65 #include "PrintContext.h"
66 #include "Range.h" 66 #include "Range.h"
67 #include "RenderObject.h" 67 #include "RenderObject.h"
68 #include "RenderTreeAsText.h" 68 #include "RenderTreeAsText.h"
69 #include "RuntimeEnabledFeatures.h" 69 #include "RuntimeEnabledFeatures.h"
70 #include "SchemeRegistry.h" 70 #include "SchemeRegistry.h"
71 #include "Settings.h" 71 #include "Settings.h"
72 #include "ShadowRoot.h" 72 #include "ShadowRoot.h"
73 #include "SpellChecker.h" 73 #include "SpellChecker.h"
74 #include "StyleSheetContents.h"
74 #include "TextIterator.h" 75 #include "TextIterator.h"
75 #include "TreeScope.h" 76 #include "TreeScope.h"
76 #include "ViewportArguments.h" 77 #include "ViewportArguments.h"
77 78
78 #if ENABLE(INPUT_TYPE_COLOR) 79 #if ENABLE(INPUT_TYPE_COLOR)
79 #include "ColorChooser.h" 80 #include "ColorChooser.h"
80 #endif 81 #endif
81 82
82 #if ENABLE(BATTERY_STATUS) 83 #if ENABLE(BATTERY_STATUS)
83 #include "BatteryController.h" 84 #include "BatteryController.h"
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 if (!cachedResourceLoader) 1275 if (!cachedResourceLoader)
1275 return; 1276 return;
1276 cachedResourceLoader->garbageCollectDocumentResources(); 1277 cachedResourceLoader->garbageCollectDocumentResources();
1277 } 1278 }
1278 1279
1279 void Internals::allowRoundingHacks() const 1280 void Internals::allowRoundingHacks() const
1280 { 1281 {
1281 settings()->allowRoundingHacks(); 1282 settings()->allowRoundingHacks();
1282 } 1283 }
1283 1284
1285 void Internals::insertAuthorCSS(Document* document, const String& css) const
1286 {
1287 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document );
1288 parsedSheet->setIsUserStyleSheet(false);
1289 parsedSheet->parseString(css);
1290 document->styleSheetCollection()->addAuthorSheet(parsedSheet);
1291 }
1292
1293 void Internals::insertUserCSS(Document* document, const String& css) const
1294 {
1295 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document );
1296 parsedSheet->setIsUserStyleSheet(true);
1297 parsedSheet->parseString(css);
1298 document->styleSheetCollection()->addUserSheet(parsedSheet);
1299 }
1300
1284 String Internals::counterValue(Element* element) 1301 String Internals::counterValue(Element* element)
1285 { 1302 {
1286 if (!element) 1303 if (!element)
1287 return String(); 1304 return String();
1288 1305
1289 return counterValueForElement(element); 1306 return counterValueForElement(element);
1290 } 1307 }
1291 1308
1292 int Internals::pageNumber(Element* element, float pageWidth, float pageHeight) 1309 int Internals::pageNumber(Element* element, float pageWidth, float pageHeight)
1293 { 1310 {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 { 1403 {
1387 RefPtr<DOMStringList> stringList = DOMStringList::create(); 1404 RefPtr<DOMStringList> stringList = DOMStringList::create();
1388 frame()->loader()->history()->saveDocumentAndScrollState(); 1405 frame()->loader()->history()->saveDocumentAndScrollState();
1389 const Vector<String>& filePaths = FormController::getReferencedFilePaths(fra me()->loader()->history()->currentItem()->documentState()); 1406 const Vector<String>& filePaths = FormController::getReferencedFilePaths(fra me()->loader()->history()->currentItem()->documentState());
1390 for (size_t i = 0; i < filePaths.size(); ++i) 1407 for (size_t i = 0; i < filePaths.size(); ++i)
1391 stringList->append(filePaths[i]); 1408 stringList->append(filePaths[i]);
1392 return stringList.release(); 1409 return stringList.release();
1393 } 1410 }
1394 1411
1395 } 1412 }
OLDNEW
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698