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

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

Issue 66383005: Remove the concept of user stylesheets. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WebFrameCSSCallbackTest tests Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/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 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 void Internals::evictAllResources() const 1871 void Internals::evictAllResources() const
1872 { 1872 {
1873 memoryCache()->evictResources(); 1873 memoryCache()->evictResources();
1874 } 1874 }
1875 1875
1876 void Internals::allowRoundingHacks() const 1876 void Internals::allowRoundingHacks() const
1877 { 1877 {
1878 TextRun::setAllowsRoundingHacks(true); 1878 TextRun::setAllowsRoundingHacks(true);
1879 } 1879 }
1880 1880
1881 void Internals::insertAuthorCSS(Document* document, const String& css) const
1882 {
1883 if (!document)
1884 return;
1885
1886 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*documen t);
1887 parsedSheet->setIsUserStyleSheet(false);
1888 parsedSheet->parseString(css);
1889 document->styleEngine()->addAuthorSheet(parsedSheet);
1890 }
1891
1892 void Internals::insertUserCSS(Document* document, const String& css) const
1893 {
1894 if (!document)
1895 return;
1896
1897 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*documen t);
1898 parsedSheet->setIsUserStyleSheet(true);
1899 parsedSheet->parseString(css);
1900 document->styleEngine()->addUserSheet(parsedSheet);
1901 }
1902
1903 String Internals::counterValue(Element* element) 1881 String Internals::counterValue(Element* element)
1904 { 1882 {
1905 if (!element) 1883 if (!element)
1906 return String(); 1884 return String();
1907 1885
1908 return counterValueForElement(element); 1886 return counterValueForElement(element);
1909 } 1887 }
1910 1888
1911 int Internals::pageNumber(Element* element, float pageWidth, float pageHeight) 1889 int Internals::pageNumber(Element* element, float pageWidth, float pageHeight)
1912 { 1890 {
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 } 2248 }
2271 2249
2272 document->updateLayout(); 2250 document->updateLayout();
2273 2251
2274 RenderView* view = document->renderView(); 2252 RenderView* view = document->renderView();
2275 if (view->compositor()) 2253 if (view->compositor())
2276 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork); 2254 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe ferredWork);
2277 } 2255 }
2278 2256
2279 } 2257 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698