summaryrefslogtreecommitdiffstats
path: root/WebCore/css
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/css')
-rw-r--r--WebCore/css/CSSFontFaceSrcValue.cpp8
-rw-r--r--WebCore/css/CSSStyleSelector.cpp10
-rw-r--r--WebCore/css/MediaFeatureNames.h9
-rw-r--r--WebCore/css/MediaQueryEvaluator.cpp23
4 files changed, 18 insertions, 32 deletions
diff --git a/WebCore/css/CSSFontFaceSrcValue.cpp b/WebCore/css/CSSFontFaceSrcValue.cpp
index 21eea04..5b204d7 100644
--- a/WebCore/css/CSSFontFaceSrcValue.cpp
+++ b/WebCore/css/CSSFontFaceSrcValue.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,6 +26,7 @@
#include "config.h"
#include "CSSFontFaceSrcValue.h"
#include "CSSStyleSheet.h"
+#include "FontCustomPlatformData.h"
#include "Node.h"
namespace WebCore {
@@ -48,10 +49,7 @@ bool CSSFontFaceSrcValue::isSupportedFormat() const
return true;
}
- return equalIgnoringCase(m_format, "truetype") || equalIgnoringCase(m_format, "opentype")
-#if ENABLE(OPENTYPE_SANITIZER)
- || equalIgnoringCase(m_format, "woff")
-#endif
+ return FontCustomPlatformData::supportsFormat(m_format)
#if ENABLE(SVG_FONTS)
|| isSVGFontFaceSrc()
#endif
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index 89d4f3e..6f64235 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -97,6 +97,11 @@
#include <wtf/StdLibExtras.h>
#include <wtf/Vector.h>
+#if USE(PLATFORM_STRATEGIES)
+#include "PlatformStrategies.h"
+#include "VisitedLinkStrategy.h"
+#endif
+
#if ENABLE(DASHBOARD_SUPPORT)
#include "DashboardRegion.h"
#endif
@@ -929,7 +934,12 @@ EInsideLink CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase(Elemen
return InsideUnvisitedLink;
m_linksCheckedForVisitedState.add(hash);
+
+#if USE(PLATFORM_STRATEGIES)
+ return platformStrategies()->visitedLinkStrategy()->isLinkVisited(page, hash) ? InsideVisitedLink : InsideUnvisitedLink;
+#else
return page->group().isLinkVisited(hash) ? InsideVisitedLink : InsideUnvisitedLink;
+#endif
}
bool CSSStyleSelector::SelectorChecker::checkSelector(CSSSelector* sel, Element* element) const
diff --git a/WebCore/css/MediaFeatureNames.h b/WebCore/css/MediaFeatureNames.h
index 8aaedb2..b8f2720 100644
--- a/WebCore/css/MediaFeatureNames.h
+++ b/WebCore/css/MediaFeatureNames.h
@@ -25,13 +25,6 @@
namespace WebCore {
namespace MediaFeatureNames {
-#if ENABLE(WIDGETS_10_SUPPORT)
-#define CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro) \
- macro(view_mode, "-webkit-view-mode")
-#else
-#define CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro)
-#endif
-
#define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
macro(color, "color") \
macro(grid, "grid") \
@@ -66,7 +59,7 @@ namespace WebCore {
macro(transform_3d, "-webkit-transform-3d") \
macro(transition, "-webkit-transition") \
macro(animation, "-webkit-animation") \
- CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro)
+ macro(view_mode, "-webkit-view-mode")
// end of macro
diff --git a/WebCore/css/MediaQueryEvaluator.cpp b/WebCore/css/MediaQueryEvaluator.cpp
index 9d5822f..0b5507e 100644
--- a/WebCore/css/MediaQueryEvaluator.cpp
+++ b/WebCore/css/MediaQueryEvaluator.cpp
@@ -498,28 +498,13 @@ static bool transform_3dMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* f
return returnValueIfNoParameter;
}
-#if ENABLE(WIDGETS_10_SUPPORT)
static bool view_modeMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix op)
{
- if (value) {
- String mode = static_cast<CSSPrimitiveValue*>(value)->getStringValue();
- if (ChromeClient* client = frame->page()->chrome()->client()) {
- if (mode == "windowed" && client->isWindowed())
- return true;
- if (mode == "floating" && client->isFloating())
- return true;
- if (mode == "fullscreen" && client->isFullscreen())
- return true;
- if (mode == "maximized" && client->isMaximized())
- return true;
- if (mode == "minimized" && client->isMinimized())
- return true;
- return false;
- }
- }
- return true;
+ UNUSED_PARAM(op);
+ if (!value)
+ return true;
+ return Page::stringToViewMode(static_cast<CSSPrimitiveValue*>(value)->getStringValue()) == frame->page()->viewMode();
}
-#endif
static void createFunctionMap()
{