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

Unified Diff: third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.cpp

Issue 56198: Roll out dominantScript, getGenericFontForScript patches to unfork a bunch of... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months 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 | « third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.cpp
===================================================================
--- third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.cpp (revision 13094)
+++ third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.cpp (working copy)
@@ -31,7 +31,6 @@
#include "ChromiumBridge.h"
#include "CSSStyleSheet.h"
#include "CSSValueKeywords.h"
-#include "Document.h"
#include "FontSelector.h"
#include "FontUtilsChromiumWin.h"
#include "GraphicsContext.h"
@@ -206,23 +205,8 @@
// FIXME: The only case where we know we don't match IE is for ANSI encodings.
// IE uses MS Shell Dlg there, which we render incorrectly at certain pixel
// sizes (e.g. 15px). So, for now we just use Arial.
-static wchar_t* defaultGUIFont(Document* document)
+static wchar_t* defaultGUIFont()
{
- UScriptCode dominantScript = document->dominantScript();
- const wchar_t* family = NULL;
-
- // FIXME: Special-casing of Latin/Greeek/Cyrillic should go away once
- // GetFontFamilyForScript is enhanced to support GenericFamilyType for
- // real. For now, we make sure that we use Arial to match IE for those
- // scripts.
- if (dominantScript != USCRIPT_LATIN &&
- dominantScript != USCRIPT_CYRILLIC &&
- dominantScript != USCRIPT_GREEK &&
- dominantScript != USCRIPT_INVALID_CODE) {
- family = getFontFamilyForScript(dominantScript, FontDescription::NoFamily);
- if (family)
- return const_cast<wchar_t*>(family);
- }
return L"Arial";
}
@@ -338,7 +322,7 @@
return blinkInterval;
}
-void RenderThemeChromiumWin::systemFont(int propId, Document* document, FontDescription& fontDescription) const
+void RenderThemeChromiumWin::systemFont(int propId, FontDescription& fontDescription) const
{
// This logic owes much to RenderThemeSafari.cpp.
FontDescription* cachedDesc = NULL;
@@ -375,12 +359,12 @@
case CSSValueWebkitMiniControl:
case CSSValueWebkitSmallControl:
case CSSValueWebkitControl:
- faceName = defaultGUIFont(document);
+ faceName = defaultGUIFont();
// Why 2 points smaller? Because that's what Gecko does.
fontSize = defaultFontSize - pointsToPixels(2);
break;
default:
- faceName = defaultGUIFont(document);
+ faceName = defaultGUIFont();
fontSize = defaultFontSize;
break;
}
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderThemeChromiumWin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698