Commit 8fe65866 authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

JavaScriptCore:

2008-04-29  Greg Bolsinga  <bolsinga@apple.com>

        Reviewed by Darin.

        Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)

        * wtf/Platform.h:

WebCore:

2008-04-29  Greg Bolsinga  <bolsinga@apple.com>

        Reviewed by Darin.

        Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)

        * DerivedSources.make:
        * WebCore.DashboardSupport.exp: Added.
        * WebCore.base.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::setLocation):
        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSParser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::cleanup):
        (WebCore::CSSPrimitiveValue::cssText):
        * css/CSSPropertyNames.in:
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * css/DashboardRegion.h:
        * css/DashboardSupportCSSPropertyNames.in: Added.
        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createDocument):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        (WebCore::Document::importNode):
        * dom/Document.h:
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::fill):
        (WebCore::CanvasRenderingContext2D::stroke):
        (WebCore::CanvasRenderingContext2D::clip):
        * html/CanvasRenderingContext2D.h:
        * html/HTMLCanvasElement.cpp:
        * html/HTMLCanvasElement.h:
        * page/Chrome.cpp:
        * page/ChromeClient.h:
        * page/Frame.cpp:
        (WebCore::Frame::paint):
        * page/Frame.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        * page/FrameView.h:
        * page/Settings.cpp:
        (WebCore::Settings::Settings):
        * page/Settings.h:
        * page/mac/EventHandlerMac.mm:
        (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
        * page/mac/FrameMac.mm:
        * page/mac/WebDashboardRegion.h:
        * page/mac/WebDashboardRegion.m:
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::setStyle):
        * rendering/RenderObject.h:
        * rendering/RenderStyle.cpp:
        (WebCore::StyleRareNonInheritedData::operator==):
        (WebCore::RenderStyle::diff):
        * rendering/RenderStyle.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):
        (WebCore::XMLHttpRequest::setRequestHeader):

WebKit/mac:

2008-04-29  Greg Bolsinga  <bolsinga@apple.com>

        Reviewed by Darin.

        Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)

        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        * WebView/WebClipView.m:
        (-[WebClipView scrollWheel:]):
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView addMouseMovedObserver]):
        (-[WebHTMLView removeMouseMovedObserver]):
        (-[WebHTMLView acceptsFirstMouse:]):
        * WebView/WebUIDelegatePrivate.h:
        * WebView/WebView.mm:
        (-[WebViewPrivate init]):
        * WebView/WebViewPrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 82f2c022
2008-04-29 Greg Bolsinga <bolsinga@apple.com>
Reviewed by Darin.
Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
* wtf/Platform.h:
2008-04-29 Kevin McCullough <kmccullough@apple.com>
Reviewed by Geoff.
......
......@@ -262,4 +262,8 @@
#define ENABLE_NETSCAPE_PLUGIN_API 0
#endif
#if !defined(ENABLE_DASHBOARD_SUPPORT)
#define ENABLE_DASHBOARD_SUPPORT 1
#endif
#endif /* WTF_Platform_h */
2008-04-29 Greg Bolsinga <bolsinga@apple.com>
Reviewed by Darin.
Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
* DerivedSources.make:
* WebCore.DashboardSupport.exp: Added.
* WebCore.base.exp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setLocation):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::cssText):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/DashboardRegion.h:
* css/DashboardSupportCSSPropertyNames.in: Added.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::importNode):
* dom/Document.h:
* html/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::fill):
(WebCore::CanvasRenderingContext2D::stroke):
(WebCore::CanvasRenderingContext2D::clip):
* html/CanvasRenderingContext2D.h:
* html/HTMLCanvasElement.cpp:
* html/HTMLCanvasElement.h:
* page/Chrome.cpp:
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::paint):
* page/Frame.h:
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/FrameView.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
* page/mac/FrameMac.mm:
* page/mac/WebDashboardRegion.h:
* page/mac/WebDashboardRegion.m:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollToOffset):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
* rendering/RenderObject.h:
* rendering/RenderStyle.cpp:
(WebCore::StyleRareNonInheritedData::operator==):
(WebCore::RenderStyle::diff):
* rendering/RenderStyle.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
(WebCore::XMLHttpRequest::setRequestHeader):
2008-04-29 Adam Roben <aroben@apple.com>
Windows build fix
......@@ -379,13 +379,39 @@ all : \
# --------
ifeq ($(OS),MACOS)
FRAMEWORK_FLAGS = $(shell echo $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DASHBOARD_SUPPORT | cut -d' ' -f3), 1)
ENABLE_DASHBOARD_SUPPORT = 1
else
ENABLE_DASHBOARD_SUPPORT = 0
endif
else
ENABLE_DASHBOARD_SUPPORT = 1
endif
# CSS property names and value keywords
WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/SVGCSSPropertyNames.in
endif
CSSPropertyNames.h : css/CSSPropertyNames.in css/SVGCSSPropertyNames.in css/makeprop.pl
if sort $< $(WebCore)/css/SVGCSSPropertyNames.in | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
cat $< $(WebCore)/css/SVGCSSPropertyNames.in > CSSPropertyNames.in
ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1)
WEBCORE_CSS_PROPERTY_NAMES := $(WEBCORE_CSS_PROPERTY_NAMES) $(WebCore)/css/DashboardSupportCSSPropertyNames.in
endif
ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
CSSPropertyNames.h : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl
if sort $(WEBCORE_CSS_PROPERTY_NAMES) | uniq -d | grep -E '^[^#]'; then echo 'Duplicate value!'; exit 1; fi
cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
perl "$(WebCore)/css/makeprop.pl"
CSSValueKeywords.h : css/CSSValueKeywords.in css/SVGCSSValueKeywords.in css/makevalues.pl
......@@ -397,8 +423,8 @@ CSSValueKeywords.h : css/CSSValueKeywords.in css/SVGCSSValueKeywords.in css/make
else
CSSPropertyNames.h : css/CSSPropertyNames.in css/makeprop.pl
cp $< CSSPropertyNames.in
CSSPropertyNames.h : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl
cat $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
perl "$(WebCore)/css/makeprop.pl"
CSSValueKeywords.h : css/CSSValueKeywords.in css/makevalues.pl
......@@ -597,8 +623,6 @@ CharsetData.cpp : platform/text/mac/make-charset-table.pl platform/text/mac/char
# export file
FRAMEWORK_FLAGS = $(shell echo $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_MAC_JAVA_BRIDGE | cut -d' ' -f3), 1)
WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.JNI.exp
endif
......@@ -608,6 +632,10 @@ ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/
WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.NPAPI.exp
endif
ifeq ($(ENABLE_DASHBOARD_SUPPORT), 1)
WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.DashboardSupport.exp
endif
ifeq ($(findstring 10.4,$(MACOSX_DEPLOYMENT_TARGET)), 10.4)
WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Tiger.exp
endif
......
.objc_class_name_WebDashboardRegion
__ZN7WebCore5Frame26dashboardRegionsDictionaryEv
__ZN7WebCore8Settings41setUsesDashboardBackwardCompatibilityModeEb
......@@ -107,7 +107,6 @@
.objc_class_name_DOMWheelEvent
.objc_class_name_WebCoreKeyGenerator
.objc_class_name_WebCoreViewFactory
.objc_class_name_WebDashboardRegion
.objc_class_name_WebScriptObject
.objc_class_name_WebScriptObjectPrivate
.objc_class_name_WebUndefined
......@@ -452,7 +451,6 @@ __ZN7WebCore5Frame21markAllMatchesForTextERKNS_6StringEbj
__ZN7WebCore5Frame21setProhibitsScrollingEb
__ZN7WebCore5Frame24computeAndSetTypingStyleEPNS_19CSSStyleDeclarationENS_10EditActionE
__ZN7WebCore5Frame25matchLabelsAgainstElementEP7NSArrayPNS_7ElementE
__ZN7WebCore5Frame26dashboardRegionsDictionaryEv
__ZN7WebCore5Frame28searchForLabelsBeforeElementEP7NSArrayPNS_7ElementE
__ZN7WebCore5Frame29cleanupScriptObjectsForPluginEPv
__ZN7WebCore5Frame29forceLayoutWithPageWidthRangeEffb
......@@ -565,7 +563,6 @@ __ZN7WebCore8Settings32setNeedsAdobeFrameReloadingQuirkEb
__ZN7WebCore8Settings36setOfflineWebApplicationCacheEnabledEb
__ZN7WebCore8Settings40setJavaScriptCanOpenWindowsAutomaticallyEb
__ZN7WebCore8Settings41setNeedsKeyboardEventDisambiguationQuirksEb
__ZN7WebCore8Settings41setUsesDashboardBackwardCompatibilityModeEb
__ZN7WebCore8blankURLEv
__ZN7WebCore8parseURLERKNS_6StringE
__ZN7WebCore9FloatRectC1ERK7_NSRect
......
......@@ -8303,6 +8303,7 @@
F9F0ED760DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequestProgressEvent.cpp; sourceTree = "<group>"; };
F9F0ED770DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestProgressEvent.h; sourceTree = "<group>"; };
F9F0ED780DB50CA200D16DB9 /* XMLHttpRequestProgressEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = XMLHttpRequestProgressEvent.idl; sourceTree = "<group>"; };
FE49EF970DC51462004266E1 /* DashboardSupportCSSPropertyNames.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DashboardSupportCSSPropertyNames.in; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -12588,6 +12589,7 @@
A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */,
A8D0651C0A23C1FE005E7203 /* CSSValueList.idl */,
A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */,
FE49EF970DC51462004266E1 /* DashboardSupportCSSPropertyNames.in */,
A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */,
A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */,
A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */,
......@@ -181,6 +181,7 @@ void JSDOMWindow::setLocation(ExecState* exec, JSValue* value)
if (!activeFrame)
return;
#if ENABLE(DASHBOARD_SUPPORT)
// To avoid breaking old widgets, make "var location =" in a top-level frame create
// a property named "location" instead of performing a navigation (<rdar://problem/5688039>).
if (Settings* settings = activeFrame->settings()) {
......@@ -190,6 +191,7 @@ void JSDOMWindow::setLocation(ExecState* exec, JSValue* value)
return;
}
}
#endif
if (!activeFrame->loader()->shouldAllowNavigation(impl()->frame()))
return;
......
......@@ -31,13 +31,17 @@
#include "CSSPropertyNames.h"
#include "CSSValueList.h"
#include "CachedImage.h"
#include "DashboardRegion.h"
#include "Document.h"
#include "ExceptionCode.h"
#include "Pair.h"
#include "Rect.h"
#include "RenderObject.h"
#include "ShadowValue.h"
#if ENABLE(DASHBOARD_SUPPORT)
#include "DashboardRegion.h"
#endif
namespace WebCore {
// List of all properties we know how to compute, omitting shorthands.
......@@ -182,7 +186,9 @@ static const int computedProperties[] = {
CSSPropertyWebkitUserDrag,
CSSPropertyWebkitUserModify,
CSSPropertyWebkitUserSelect,
#if ENABLE(DASHBOARD_SUPPORT)
CSSPropertyWebkitDashboardRegion,
#endif
CSSPropertyWebkitBorderBottomLeftRadius,
CSSPropertyWebkitBorderBottomRightRadius,
CSSPropertyWebkitBorderTopLeftRadius,
......@@ -936,6 +942,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
if (style->boxSizing() == CONTENT_BOX)
return new CSSPrimitiveValue(CSSValueContentBox);
return new CSSPrimitiveValue(CSSValueBorderBox);
#if ENABLE(DASHBOARD_SUPPORT)
case CSSPropertyWebkitDashboardRegion:
{
const Vector<StyleDashboardRegion>& regions = style->dashboardRegions();
......@@ -966,6 +973,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
}
return new CSSPrimitiveValue(firstRegion.release());
}
#endif
case CSSPropertyWebkitAppearance:
return new CSSPrimitiveValue(style->appearance());
case CSSPropertyWebkitBorderImage:
......
......@@ -53,7 +53,6 @@
#include "CSSValueKeywords.h"
#include "CSSValueList.h"
#include "Counter.h"
#include "DashboardRegion.h"
#include "Document.h"
#include "FloatConversion.h"
#include "FontFamilyValue.h"
......@@ -61,9 +60,14 @@
#include "MediaList.h"
#include "MediaQueryExp.h"
#include "Pair.h"
#include "Rect.h"
#include "ShadowValue.h"
#include <kjs/dtoa.h>
#if ENABLE(DASHBOARD_SUPPORT)
#include "DashboardRegion.h"
#endif
#define YYDEBUG 0
#if YYDEBUG > 0
......@@ -1451,10 +1455,12 @@ bool CSSParser::parseValue(int propId, bool important)
valid_primitive = true;
break;
#if ENABLE(DASHBOARD_SUPPORT)
case CSSPropertyWebkitDashboardRegion: // <dashboard-region> | <dashboard-region>
if (value->unit == Value::Function || id == CSSValueNone)
return parseDashboardRegions(propId, important);
break;
#endif
// End Apple-specific properties
/* shorthand properties */
......@@ -2387,6 +2393,8 @@ bool CSSParser::parseTransitionProperty(int propId, RefPtr<CSSValue>& result)
return false;
}
#if ENABLE(DASHBOARD_SUPPORT)
#define DASHBOARD_REGION_NUM_PARAMETERS 6
#define DASHBOARD_REGION_SHORT_NUM_PARAMETERS 2
......@@ -2525,6 +2533,8 @@ bool CSSParser::parseDashboardRegions(int propId, bool important)
return valid;
}
#endif /* ENABLE(DASHBOARD_SUPPORT) */
PassRefPtr<CSSValue> CSSParser::parseCounterContent(ValueList* args, bool counters)
{
unsigned numArgs = args->size();
......
......@@ -25,12 +25,16 @@
#include "CSSValueKeywords.h"
#include "Color.h"
#include "Counter.h"
#include "DashboardRegion.h"
#include "ExceptionCode.h"
#include "Pair.h"
#include "Rect.h"
#include "RenderStyle.h"
#include <wtf/ASCIICType.h>
#if ENABLE(DASHBOARD_SUPPORT)
#include "DashboardRegion.h"
#endif
using namespace WTF;
namespace WebCore {
......@@ -179,11 +183,13 @@ void CSSPrimitiveValue::init(PassRefPtr<Rect> r)
m_value.rect = r.releaseRef();
}
#if ENABLE(DASHBOARD_SUPPORT)
void CSSPrimitiveValue::init(PassRefPtr<DashboardRegion> r)
{
m_type = CSS_DASHBOARD_REGION;
m_value.region = r.releaseRef();
}
#endif
void CSSPrimitiveValue::init(PassRefPtr<Pair> p)
{
......@@ -214,10 +220,12 @@ void CSSPrimitiveValue::cleanup()
case CSS_PAIR:
m_value.pair->deref();
break;
#if ENABLE(DASHBOARD_SUPPORT)
case CSS_DASHBOARD_REGION:
if (m_value.region)
m_value.region->deref();
break;
#endif
default:
break;
}
......@@ -689,6 +697,7 @@ String CSSPrimitiveValue::cssText() const
text += " ";
text += m_value.pair->second()->cssText();
break;
#if ENABLE(DASHBOARD_SUPPORT)
case CSS_DASHBOARD_REGION:
for (DashboardRegion* region = getDashboardRegionValue(); region; region = region->m_next.get()) {
if (!text.isEmpty())
......@@ -718,6 +727,7 @@ String CSSPrimitiveValue::cssText() const
text += ")";
}
break;
#endif
}
return text;
}
......
......@@ -184,7 +184,6 @@ zoom
-webkit-column-rule-width
-webkit-column-width
-webkit-columns
-webkit-dashboard-region
-webkit-font-size-delta
-webkit-highlight
-webkit-line-break
......
......@@ -45,7 +45,6 @@
#include "CSSValueList.h"
#include "CachedImage.h"
#include "Counter.h"
#include "DashboardRegion.h"
#include "FontFamilyValue.h"
#include "FontValue.h"
#include "Frame.h"
......@@ -76,6 +75,10 @@
#include "SVGNames.h"
#endif
#if ENABLE(DASHBOARD_SUPPORT)
#include "DashboardRegion.h"
#endif
using namespace std;
namespace WebCore {
......@@ -4409,6 +4412,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
m_style->setTextSecurity(*primitiveValue);
return;
}
#if ENABLE(DASHBOARD_SUPPORT)
case CSSPropertyWebkitDashboardRegion: {
HANDLE_INHERIT_AND_INITIAL(dashboardRegions, DashboardRegions)
if (!primitiveValue)
......@@ -4440,6 +4444,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
return;
}
#endif
case CSSPropertyWebkitRtlOrdering:
HANDLE_INHERIT_AND_INITIAL(visuallyOrdered, VisuallyOrdered)
if (!primitiveValue || !primitiveValue->getIdent())
......
......@@ -23,6 +23,9 @@
#ifndef DashboardRegion_h
#define DashboardRegion_h
#include <wtf/Platform.h>
#if ENABLE(DASHBOARD_SUPPORT)
#include "Rect.h"
namespace WebCore {
......@@ -39,5 +42,6 @@ public:
};
} // namespace
#endif
#endif
......@@ -341,8 +341,10 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame
#if ENABLE(SVG)
if (type == "image/svg+xml") {
#if ENABLE(DASHBOARD_SUPPORT)
Settings* settings = frame ? frame->settings() : 0;
if (!settings || !settings->usesDashboardBackwardCompatibilityMode())
#endif
return new SVGDocument(this, frame);
}
#endif
......
......@@ -286,8 +286,10 @@ Document::Document(DOMImplementation* impl, Frame* frame, bool isXHTML)
#if ENABLE(SVG)
, m_svgExtensions(0)
#endif
#if ENABLE(DASHBOARD_SUPPORT)
, m_hasDashboardRegions(false)
, m_dashboardRegionsDirty(false)
#endif
, m_accessKeyMapValid(false)
, m_createRenderers(true)
, m_inPageCache(false)
......@@ -588,7 +590,7 @@ PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionCo
ec = 0;
if (!importedNode
#if ENABLE(SVG)
#if ENABLE(SVG) && ENABLE(DASHBOARD_SUPPORT)
|| (importedNode->isSVGElement() && page() && page()->settings()->usesDashboardBackwardCompatibilityMode())
#endif
) {
......@@ -2344,6 +2346,7 @@ void Document::activeChainNodeDetached(Node* node)
m_activeNode = m_activeNode->parent();
}
#if ENABLE(DASHBOARD_SUPPORT)
const Vector<DashboardRegionValue>& Document::dashboardRegions() const
{
return m_dashboardRegions;
......@@ -2354,6 +2357,7 @@ void Document::setDashboardRegions(const Vector<DashboardRegionValue>& regions)
m_dashboardRegions = regions;
setDashboardRegionsDirty(false);
}
#endif
bool Document::setFocusedNode(PassRefPtr<Node> newFocusedNode)
{
......
......@@ -118,7 +118,9 @@ namespace WebCore {
class XPathResult;
#endif
#if ENABLE(DASHBOARD_SUPPORT)
struct DashboardRegionValue;
#endif
struct HitTestRequest;
typedef int ExceptionCode;
......@@ -883,12 +885,14 @@ public:
UChar backslashAsCurrencySymbol() const;
#if ENABLE(DASHBOARD_SUPPORT)
void setDashboardRegionsDirty(bool f) { m_dashboardRegionsDirty = f; }
bool dashboardRegionsDirty() const { return m_dashboardRegionsDirty; }
bool hasDashboardRegions () const { return m_hasDashboardRegions; }
void setHasDashboardRegions (bool f) { m_hasDashboardRegions = f; }
const Vector<DashboardRegionValue>& dashboardRegions() const;
void setDashboardRegions(const Vector<DashboardRegionValue>&);
#endif
void removeAllEventListenersFromAllNodes();
......@@ -964,9 +968,11 @@ private:
SVGDocumentExtensions* m_svgExtensions;
#endif
#if ENABLE(DASHBOARD_SUPPORT)
Vector<DashboardRegionValue> m_dashboardRegions;
bool m_hasDashboardRegions;
bool m_dashboardRegionsDirty;
#endif
HashMap<String, RefPtr<HTMLCanvasElement> > m_cssCanvasElements;
......
......@@ -517,6 +517,7 @@ void CanvasRenderingContext2D::rect(float x, float y, float width, float height)
m_path.addRect(FloatRect(x, y, width, height));
}
#if ENABLE(DASHBOARD_SUPPORT)
void CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode()
{
if (m_canvas)
......@@ -524,6 +525,7 @@ void CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode()
if (settings->usesDashboardBackwardCompatibilityMode())
m_path.clear();
}
#endif
void CanvasRenderingContext2D::fill()
{
......@@ -573,7 +575,9 @@ void CanvasRenderingContext2D::fill()
cairo_restore(cr);
#endif
#if ENABLE(DASHBOARD_SUPPORT)
clearPathForDashboardBackwardCompatibilityMode();
#endif
}
void CanvasRenderingContext2D::stroke()
......@@ -636,7 +640,9 @@ void CanvasRenderingContext2D::stroke()
cairo_restore(cr);
#endif
#if ENABLE(DASHBOARD_SUPPORT)
clearPathForDashboardBackwardCompatibilityMode();
#endif
}
void CanvasRenderingContext2D::clip()
......@@ -645,7 +651,9 @@ void CanvasRenderingContext2D::clip()
if (!c)
return;
c->clip(m_path);
#if ENABLE(DASHBOARD_SUPPORT)
clearPathForDashboardBackwardCompatibilityMode();
#endif
}
bool CanvasRenderingContext2D::isPointInPath(const float x, const float y)
......
......@@ -211,7 +211,9 @@ namespace WebCore {
void applyStrokePattern();
void applyFillPattern();
#if ENABLE(DASHBOARD_SUPPORT)
void clearPathForDashboardBackwardCompatibilityMode();
#endif
void checkOrigin(const KURL&);
......
......@@ -82,6 +82,8 @@ HTMLCanvasElement::~HTMLCanvasElement()
m_2DContext->detachCanvas();
}
#if ENABLE(DASHBOARD_SUPPORT)
HTMLTagStatus HTMLCanvasElement::endTagRequirement() const
{
Settings* settings = document()->settings();
......@@ -100,6 +102,8 @@ int HTMLCanvasElement::tagPriority() const
return HTMLElement::tagPriority();
}
#endif
void HTMLCanvasElement::parseMappedAttribute(MappedAttribute* attr)
{
const QualifiedName& attrName = attr->name();
......
......@@ -70,8 +70,10 @@ public:
HTMLCanvasElement(Document*);
virtual ~HTMLCanvasElement();
#if ENABLE(DASHBOARD_SUPPORT)
virtual HTMLTagStatus endTagRequirement() const;
virtual int tagPriority() const;
#endif
int width() const { return m_size.width(); }
int height() const { return m_size.height(); }
......
......@@ -349,9 +349,11 @@ void Chrome::print(Frame* frame)
// --------
#if ENABLE(DASHBOARD_SUPPORT)
void ChromeClient::dashboardRegionsChanged()
{
}
#endif
void ChromeClient::populateVisitedLinks()
{
......
......@@ -47,7 +47,6 @@ namespace WebCore {
class String;
class Widget;
struct DashboardRegionValue;
struct FrameLoadRequest;
struct WindowFeatures;
......@@ -120,7 +119,9 @@ namespace WebCore {
virtual void exceededDatabaseQuota(Frame*, const String& databaseName) = 0;
#if ENABLE(DASHBOARD_SUPPORT)
virtual void dashboardRegionsChanged();
#endif
virtual void populateVisitedLinks();
......
......@@ -1364,9 +1364,11 @@ void Frame::paint(GraphicsContext* p, const IntRect& rect)