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

Unified Diff: Source/core/page/Page.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 208c072983bc56fc2acafa50127c6d1160705431..5647f16d2a728a451da45a1dbb47f774f987e9b3 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -116,7 +116,6 @@ Page::Page(PageClients& pageClients)
, m_defersLoading(false)
, m_pageScaleFactor(1)
, m_deviceScaleFactor(1)
- , m_didLoadUserStyleSheet(false)
, m_group(0)
, m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval())
, m_visibilityState(PageVisibilityStateVisible)
@@ -387,36 +386,6 @@ void Page::setPagination(const Pagination& pagination)
setNeedsRecalcStyleInAllFrames();
}
-void Page::userStyleSheetLocationChanged()
-{
- // FIXME: Eventually we will move to a model of just being handed the sheet
- // text instead of loading the URL ourselves.
- KURL url = m_settings->userStyleSheetLocation();
-
- m_didLoadUserStyleSheet = false;
- m_userStyleSheet = String();
-
- // Data URLs with base64-encoded UTF-8 style sheets are common. We can process them
- // synchronously and avoid using a loader.
- if (url.protocolIsData() && url.string().startsWith("data:text/css;charset=utf-8;base64,")) {
- m_didLoadUserStyleSheet = true;
-
- Vector<char> styleSheetAsUTF8;
- if (base64Decode(decodeURLEscapeSequences(url.string().substring(35)), styleSheetAsUTF8, isSpaceOrNewline))
- m_userStyleSheet = String::fromUTF8(styleSheetAsUTF8.data(), styleSheetAsUTF8.size());
- }
-
- for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->document())
- frame->document()->styleEngine()->updatePageUserSheet();
- }
-}
-
-const String& Page::userStyleSheet() const
-{
- return m_userStyleSheet;
-}
-
void Page::allVisitedStateChanged(PageGroup* group)
{
ASSERT(group);
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/core/page/Settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698