JavaScriptCore:
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Apr 2008 21:31:09 +0000 (21:31 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Apr 2008 21:31:09 +0000 (21:31 +0000)
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: https://svn.webkit.org/repository/webkit/trunk@32700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

48 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.DashboardSupport.exp [new file with mode: 0644]
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSDOMWindowCustom.cpp
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSParser.cpp
WebCore/css/CSSPrimitiveValue.cpp
WebCore/css/CSSPropertyNames.in
WebCore/css/CSSStyleSelector.cpp
WebCore/css/DashboardRegion.h
WebCore/css/DashboardSupportCSSPropertyNames.in [new file with mode: 0644]
WebCore/dom/DOMImplementation.cpp
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/html/CanvasRenderingContext2D.cpp
WebCore/html/CanvasRenderingContext2D.h
WebCore/html/HTMLCanvasElement.cpp
WebCore/html/HTMLCanvasElement.h
WebCore/page/Chrome.cpp
WebCore/page/ChromeClient.h
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FrameView.cpp
WebCore/page/FrameView.h
WebCore/page/Settings.cpp
WebCore/page/Settings.h
WebCore/page/mac/EventHandlerMac.mm
WebCore/page/mac/FrameMac.mm
WebCore/page/mac/WebDashboardRegion.h
WebCore/page/mac/WebDashboardRegion.m
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderStyle.cpp
WebCore/rendering/RenderStyle.h
WebCore/xml/XMLHttpRequest.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebChromeClient.h
WebKit/mac/WebCoreSupport/WebChromeClient.mm
WebKit/mac/WebView/WebClipView.m
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebUIDelegatePrivate.h
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewPrivate.h

index 049292d..478bc55 100644 (file)
@@ -1,3 +1,11 @@
+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.
index b9e250c..36b96de 100644 (file)
 #define ENABLE_NETSCAPE_PLUGIN_API 0
 #endif
 
+#if !defined(ENABLE_DASHBOARD_SUPPORT)
+#define ENABLE_DASHBOARD_SUPPORT 1
+#endif
+
 #endif /* WTF_Platform_h */
index d90ac36..916633b 100644 (file)
@@ -1,3 +1,73 @@
+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
index 4f25634..fe55d01 100644 (file)
@@ -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
diff --git a/WebCore/WebCore.DashboardSupport.exp b/WebCore/WebCore.DashboardSupport.exp
new file mode 100644 (file)
index 0000000..70fed73
--- /dev/null
@@ -0,0 +1,3 @@
+.objc_class_name_WebDashboardRegion
+__ZN7WebCore5Frame26dashboardRegionsDictionaryEv
+__ZN7WebCore8Settings41setUsesDashboardBackwardCompatibilityModeEb
index 28d4a90..552169d 100644 (file)
 .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
index 1a8de48..bcaad63 100644 (file)
                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 */
                                A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */,
                                A8D0651C0A23C1FE005E7203 /* CSSValueList.idl */,
                                A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */,
+                               FE49EF970DC51462004266E1 /* DashboardSupportCSSPropertyNames.in */,
                                A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */,
                                A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */,
                                A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */,
index 2e201f9..512a992 100644 (file)
@@ -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;
index bca2bdf..61e33ff 100644 (file)
 #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:
index ee4f482..5077140 100644 (file)
@@ -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"
 #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();
index 5462e99..06a76c3 100644 (file)
 #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;
 }
index 6f7eb91..4892ae1 100644 (file)
@@ -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
index 5fc9299..2a7f2b3 100644 (file)
@@ -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"
 #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())
index 338b6aa..e0b8555 100644 (file)
@@ -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
diff --git a/WebCore/css/DashboardSupportCSSPropertyNames.in b/WebCore/css/DashboardSupportCSSPropertyNames.in
new file mode 100644 (file)
index 0000000..615bd6c
--- /dev/null
@@ -0,0 +1 @@
+-webkit-dashboard-region
index b313305..5554316 100644 (file)
@@ -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
index 7d50823..4edf7b3 100644 (file)
@@ -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)
 {    
index 61b6690..d9a7198 100644 (file)
@@ -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;
 
index 9ba27e7..a70bcd1 100644 (file)
@@ -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)
index fc18208..8707aa4 100644 (file)
@@ -211,7 +211,9 @@ namespace WebCore {
         void applyStrokePattern();
         void applyFillPattern();
 
+#if ENABLE(DASHBOARD_SUPPORT)
         void clearPathForDashboardBackwardCompatibilityMode();
+#endif
 
         void checkOrigin(const KURL&);
 
index a209218..d353a59 100644 (file)
@@ -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();
index 8471b76..ee2c250 100644 (file)
@@ -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(); }
index ca1a0cb..52d8f90 100644 (file)
@@ -349,9 +349,11 @@ void Chrome::print(Frame* frame)
 
 // --------
 
+#if ENABLE(DASHBOARD_SUPPORT)
 void ChromeClient::dashboardRegionsChanged()
 {
 }
+#endif
 
 void ChromeClient::populateVisitedLinks()
 {
index 8c751b5..78421e2 100644 (file)
@@ -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();
 
index a8b943c..380821d 100644 (file)
@@ -1364,9 +1364,11 @@ void Frame::paint(GraphicsContext* p, const IntRect& rect)
         
         d->m_isPainting = false;
 
+#if ENABLE(DASHBOARD_SUPPORT)
         // Regions may have changed as a result of the visibility/z-index of element changing.
         if (document()->dashboardRegionsDirty())
             view()->updateDashboardRegions();
+#endif
     } else
         LOG_ERROR("called Frame::paint with nil renderer");
         
index 612ecc9..5e20271 100644 (file)
@@ -329,7 +329,9 @@ public:
     NSString* searchForLabelsBeforeElement(NSArray* labels, Element*);
     NSString* matchLabelsAgainstElement(NSArray* labels, Element*);
 
+#if ENABLE(DASHBOARD_SUPPORT)
     NSMutableDictionary* dashboardRegionsDictionary();
+#endif
 
     NSImage* selectionImage(bool forceBlackText = false) const;
     NSImage* snapshotDragImage(Node*, NSRect* imageRect, NSRect* elementRect) const;
index 5c3e907..86dfe97 100644 (file)
@@ -504,7 +504,9 @@ void FrameView::layout(bool allowSubtree)
     if (AXObjectCache::accessibilityEnabled())
         root->document()->axObjectCache()->postNotificationToElement(root, "AXLayoutComplete");
 #endif
+#if ENABLE(DASHBOARD_SUPPORT)
     updateDashboardRegions();
+#endif
 
     if (didFirstLayout)
         m_frame->loader()->didFirstLayout();
@@ -1070,6 +1072,7 @@ IntRect FrameView::windowClipRectForLayer(const RenderLayer* layer, bool clipToL
     return intersection(clipRect, windowClipRect());
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
 void FrameView::updateDashboardRegions()
 {
     Document* document = m_frame->document();
@@ -1085,6 +1088,7 @@ void FrameView::updateDashboardRegions()
         return;
     page->chrome()->client()->dashboardRegionsChanged();
 }
+#endif
 
 void FrameView::updateControlTints()
 {
index 7e25894..0dc74a7 100644 (file)
@@ -124,7 +124,9 @@ public:
     void beginDeferredRepaints();
     void endDeferredRepaints();
 
+#if ENABLE(DASHBOARD_SUPPORT)
     void updateDashboardRegions();
+#endif
     void updateControlTints();
 
     void restoreScrollbar();
index ecf9983..b88ccd7 100644 (file)
@@ -59,7 +59,9 @@ Settings::Settings(Page* page)
     , m_javaScriptCanOpenWindowsAutomatically(false)
     , m_shouldPrintBackgrounds(false)
     , m_textAreasAreResizable(false)
+#if ENABLE(DASHBOARD_SUPPORT)
     , m_usesDashboardBackwardCompatibilityMode(false)
+#endif
     , m_needsAdobeFrameReloadingQuirk(false)
     , m_needsKeyboardEventDisambiguationQuirks(false)
     , m_isDOMPasteAllowed(false)
@@ -234,10 +236,12 @@ void Settings::setEditableLinkBehavior(EditableLinkBehavior editableLinkBehavior
     m_editableLinkBehavior = editableLinkBehavior;
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
 void Settings::setUsesDashboardBackwardCompatibilityMode(bool usesDashboardBackwardCompatibilityMode)
 {
     m_usesDashboardBackwardCompatibilityMode = usesDashboardBackwardCompatibilityMode;
 }
+#endif
 
 // FIXME: This quirk is needed because of Radar 4674537 and 5211271. We need to phase it out once Adobe
 // can fix the bug from their end.
index 2f8d42a..259353f 100644 (file)
@@ -110,8 +110,10 @@ namespace WebCore {
         void setEditableLinkBehavior(EditableLinkBehavior);
         EditableLinkBehavior editableLinkBehavior() const { return m_editableLinkBehavior; }
         
+#if ENABLE(DASHBOARD_SUPPORT)
         void setUsesDashboardBackwardCompatibilityMode(bool);
         bool usesDashboardBackwardCompatibilityMode() const { return m_usesDashboardBackwardCompatibilityMode; }
+#endif
         
         void setNeedsAdobeFrameReloadingQuirk(bool);
         bool needsAcrobatFrameReloadingQuirk() const { return m_needsAdobeFrameReloadingQuirk; }
@@ -183,7 +185,9 @@ namespace WebCore {
         bool m_javaScriptCanOpenWindowsAutomatically : 1;
         bool m_shouldPrintBackgrounds : 1;
         bool m_textAreasAreResizable : 1;
+#if ENABLE(DASHBOARD_SUPPORT)
         bool m_usesDashboardBackwardCompatibilityMode : 1;
+#endif
         bool m_needsAdobeFrameReloadingQuirk : 1;
         bool m_needsKeyboardEventDisambiguationQuirks : 1;
         bool m_isDOMPasteAllowed : 1;
index 7026335..2a99351 100644 (file)
@@ -149,7 +149,16 @@ bool EventHandler::needsKeyboardEventDisambiguationQuirks() const
     Settings* settings = m_frame->settings();
     if (!settings)
         return false;
-    return settings->usesDashboardBackwardCompatibilityMode() || settings->needsKeyboardEventDisambiguationQuirks();
+
+#if ENABLE(DASHBOARD_SUPPORT)
+    if (settings->usesDashboardBackwardCompatibilityMode())
+        return true;
+#endif
+        
+    if (settings->needsKeyboardEventDisambiguationQuirks())
+        return true;
+
+    return false;
 }
 
 bool EventHandler::keyEvent(NSEvent *event)
index 5aee223..6efe0e3 100644 (file)
@@ -85,7 +85,6 @@
 #import "TextResourceDecoder.h"
 #import "UserStyleSheetLoader.h"
 #import "WebCoreViewFactory.h"
-#import "WebDashboardRegion.h"
 #import "WebScriptObjectPrivate.h"
 #import "kjs_proxy.h"
 #import "visible_units.h"
 #if ENABLE(MAC_JAVA_BRIDGE)
 #import "jni_instance.h"
 #endif
+#if ENABLE(DASHBOARD_SUPPORT)
+#import "WebDashboardRegion.h"
+#endif
 
 @interface NSObject (WebPlugin)
 - (id)objectForWebScript;
@@ -505,6 +507,7 @@ void Frame::setUseSecureKeyboardEntry(bool enable)
     }
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
 NSMutableDictionary* Frame::dashboardRegionsDictionary()
 {
     Document* doc = document();
@@ -542,6 +545,7 @@ NSMutableDictionary* Frame::dashboardRegionsDictionary()
     
     return webRegions;
 }
+#endif
 
 DragImageRef Frame::dragImageForSelection() 
 {
index 81113e9..7f46658 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include <wtf/Platform.h>
+
+#if ENABLE(DASHBOARD_SUPPORT)
+
 typedef enum {
     WebDashboardRegionTypeNone,
     WebDashboardRegionTypeCircle,
@@ -41,3 +45,5 @@ typedef enum {
 - (NSRect)dashboardRegionRect;
 - (WebDashboardRegionType)dashboardRegionType;
 @end
+
+#endif
index 958e599..d2eb07f 100644 (file)
@@ -25,6 +25,7 @@
 #include "config.h"
 #import "WebDashboardRegion.h"
 
+#if ENABLE(DASHBOARD_SUPPORT)
 @implementation WebDashboardRegion
 - initWithRect:(NSRect)r clip:(NSRect)c type:(WebDashboardRegionType)t
 {
@@ -73,3 +74,4 @@
 }
 
 @end
+#endif
index 029b8c7..ae8afef 100644 (file)
@@ -736,9 +736,11 @@ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repai
     // We should have a RenderView if we're trying to scroll.
     ASSERT(view);
     if (view) {
+#if ENABLE(DASHBOARD_SUPPORT)
         // Update dashboard regions, scrolling may change the clip of a
         // particular region.
         view->frameView()->updateDashboardRegions();
+#endif
 
         view->updateWidgetPositions();
     }
@@ -1083,9 +1085,11 @@ void RenderLayer::setHasHorizontalScrollbar(bool hasScrollbar)
     else
         destroyScrollbar(HorizontalScrollbar);
 
+#if ENABLE(DASHBOARD_SUPPORT)
     // Force an update since we know the scrollbars have changed things.
     if (m_object->document()->hasDashboardRegions())
         m_object->document()->setDashboardRegionsDirty(true);
+#endif
 }
 
 void RenderLayer::setHasVerticalScrollbar(bool hasScrollbar)
@@ -1098,9 +1102,11 @@ void RenderLayer::setHasVerticalScrollbar(bool hasScrollbar)
     else
         destroyScrollbar(VerticalScrollbar);
 
+#if ENABLE(DASHBOARD_SUPPORT)
     // Force an update since we know the scrollbars have changed things.
     if (m_object->document()->hasDashboardRegions())
         m_object->document()->setDashboardRegionsDirty(true);
+#endif
 }
 
 int RenderLayer::verticalScrollbarWidth() const
@@ -1279,9 +1285,11 @@ RenderLayer::updateScrollInfoAfterLayout()
         if (m_object->hasAutoVerticalScrollbar())
             setHasVerticalScrollbar(verticalOverflow);
 
+#if ENABLE(DASHBOARD_SUPPORT)
         // Force an update since we know the scrollbars have changed things.
         if (m_object->document()->hasDashboardRegions())
             m_object->document()->setDashboardRegionsDirty(true);
+#endif
 
         m_object->repaint();
 
index 8a267f3..b91ca5a 100644 (file)
@@ -2162,10 +2162,12 @@ void RenderObject::setStyle(RenderStyle* style)
         // If our z-index changes value or our visibility changes,
         // we need to dirty our stacking context's z-order list.
         if (style) {
+#if ENABLE(DASHBOARD_SUPPORT)
             if (m_style->visibility() != style->visibility() ||
                     m_style->zIndex() != style->zIndex() ||
                     m_style->hasAutoZIndex() != style->hasAutoZIndex())
                 document()->setDashboardRegionsDirty(true);
+#endif
 
             if ((m_style->hasAutoZIndex() != style->hasAutoZIndex() ||
                     m_style->zIndex() != style->zIndex() ||
@@ -2877,6 +2879,7 @@ void RenderObject::updateWidgetPosition()
 {
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
 void RenderObject::addDashboardRegions(Vector<DashboardRegionValue>& regions)
 {
     // Convert the style regions to absolute coordinates.
@@ -2934,6 +2937,7 @@ void RenderObject::collectDashboardRegions(Vector<DashboardRegionValue>& regions
     for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling())
         curr->collectDashboardRegions(regions);
 }
+#endif
 
 bool RenderObject::avoidsFloats() const
 {
index a67bf1a..45e99dd 100644 (file)
@@ -110,6 +110,7 @@ enum VerticalPositionHint {
     PositionUndefined = 0x1fff
 };
 
+#if ENABLE(DASHBOARD_SUPPORT)
 struct DashboardRegionValue {
     bool operator==(const DashboardRegionValue& o) const
     {
@@ -125,6 +126,7 @@ struct DashboardRegionValue {
     IntRect clip;
     int type;
 };
+#endif
 
 // FIXME: This should be a HashSequencedSet, but we don't have that data structure yet.
 // This means the paint order of outlines will be wrong, although this is a minor issue.
@@ -517,8 +519,10 @@ public:
 
     virtual void updateWidgetPosition();
 
+#if ENABLE(DASHBOARD_SUPPORT)
     void addDashboardRegions(Vector<DashboardRegionValue>&);
     void collectDashboardRegions(Vector<DashboardRegionValue>&);
+#endif
 
     // Used to signal a specific subrect within an object that must be repainted after
     // layout is complete.
index 1898d78..90638d1 100644 (file)
@@ -845,7 +845,9 @@ bool StyleRareNonInheritedData::bindingsEquivalent(const StyleRareNonInheritedDa
 bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) const
 {
     return lineClamp == o.lineClamp
+#if ENABLE(DASHBOARD_SUPPORT)
         && m_dashboardRegions == o.m_dashboardRegions
+#endif
         && opacity == o.opacity
         && flexibleBox == o.flexibleBox
         && marquee == o.marquee
@@ -1349,9 +1351,11 @@ RenderStyle::Diff RenderStyle::diff(const RenderStyle* other) const
             *rareNonInheritedData->m_transform.get() != *other->rareNonInheritedData->m_transform.get())
             return Layout;
 
+#if ENABLE(DASHBOARD_SUPPORT)
         // If regions change, trigger a relayout to re-calc regions.
         if (rareNonInheritedData->m_dashboardRegions != other->rareNonInheritedData->m_dashboardRegions)
             return Layout;
+#endif
     }
 
     if (rareInheritedData.get() != other->rareInheritedData.get()) {
@@ -1835,6 +1839,7 @@ CounterDirectiveMap& RenderStyle::accessCounterDirectives()
     return *map;
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
 const Vector<StyleDashboardRegion>& RenderStyle::initialDashboardRegions()
 { 
     static Vector<StyleDashboardRegion> emptyList;
@@ -1859,6 +1864,7 @@ const Vector<StyleDashboardRegion>& RenderStyle::noneDashboardRegions()
     }
     return noneList;
 }
+#endif
 
 void RenderStyle::adjustTransitions()
 {
index 2b9d561..19e1a93 100644 (file)
@@ -463,6 +463,7 @@ private:
     StyleBoxData(const StyleBoxData&);
 };
 
+#if ENABLE(DASHBOARD_SUPPORT)
 //------------------------------------------------
 // Dashboard region attributes. Not inherited.
 
@@ -487,6 +488,7 @@ struct StyleDashboardRegion {
        return !(*this == o);
    }
 };
+#endif
 
 //------------------------------------------------
 // Random visual rendering model attributes. Not inherited.
@@ -1334,7 +1336,9 @@ public:
     bool transitionDataEquivalent(const StyleRareNonInheritedData&) const;
 
     int lineClamp; // An Apple extension.
+#if ENABLE(DASHBOARD_SUPPORT)
     Vector<StyleDashboardRegion> m_dashboardRegions;
+#endif
     float opacity; // Whether or not we're transparent.
 
     DataRef<StyleFlexibleBoxData> flexibleBox; // Flexible box properties 
@@ -2075,6 +2079,7 @@ public:
     void setMinHeight(Length v) { SET_VAR(box,min_height,v) }
     void setMaxHeight(Length v) { SET_VAR(box,max_height,v) }
 
+#if ENABLE(DASHBOARD_SUPPORT)
     Vector<StyleDashboardRegion> dashboardRegions() const { return rareNonInheritedData->m_dashboardRegions; }
     void setDashboardRegions(Vector<StyleDashboardRegion> regions) { SET_VAR(rareNonInheritedData,m_dashboardRegions,regions); }
     void setDashboardRegion(int type, const String& label, Length t, Length r, Length b, Length l, bool append) {
@@ -2089,6 +2094,7 @@ public:
             rareNonInheritedData.access()->m_dashboardRegions.clear();
         rareNonInheritedData.access()->m_dashboardRegions.append(region);
     }
+#endif
 
     void resetBorder() { resetBorderImage(); resetBorderTop(); resetBorderRight(); resetBorderBottom(); resetBorderLeft(); resetBorderRadius(); }
     void resetBorderTop() { SET_VAR(surround, border.top, BorderValue()) }
@@ -2478,8 +2484,10 @@ public:
     static int initialLineClamp() { return -1; }
     static bool initialTextSizeAdjust() { return true; }
     static ETextSecurity initialTextSecurity() { return TSNONE; }
+#if ENABLE(DASHBOARD_SUPPORT)
     static const Vector<StyleDashboardRegion>& initialDashboardRegions();
     static const Vector<StyleDashboardRegion>& noneDashboardRegions();
+#endif
 };
 
 } // namespace WebCore
index 9277e20..38b97b0 100644 (file)
@@ -425,10 +425,12 @@ void XMLHttpRequest::send(const String& body, ExceptionCode& ec)
         String contentType = getRequestHeader("Content-Type");
         if (contentType.isEmpty()) {
             ExceptionCode ec = 0;
+#if ENABLE(DASHBOARD_SUPPORT)
             Settings* settings = m_doc->settings();
             if (settings && settings->usesDashboardBackwardCompatibilityMode())
                 setRequestHeader("Content-Type", "application/x-www-form-urlencoded", ec);
             else
+#endif
                 setRequestHeader("Content-Type", "application/xml", ec);
             ASSERT(ec == 0);
         }
@@ -555,9 +557,11 @@ void XMLHttpRequest::overrideMimeType(const String& override)
 void XMLHttpRequest::setRequestHeader(const String& name, const String& value, ExceptionCode& ec)
 {
     if (m_state != Open || m_loader) {
+#if ENABLE(DASHBOARD_SUPPORT)
         Settings* settings = m_doc ? m_doc->settings() : 0;
         if (settings && settings->usesDashboardBackwardCompatibilityMode())
             return;
+#endif
 
         ec = INVALID_STATE_ERR;
         return;
index 429396d..86936fe 100644 (file)
@@ -1,3 +1,22 @@
+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:
+
 2008-04-28  Rob Buis  <buis@kde.org>
 
         Reviewed by Maciej.
index d22662b..de8ab1b 100644 (file)
@@ -104,7 +104,9 @@ public:
 
     virtual void populateVisitedLinks();
 
+#if ENABLE(DASHBOARD_SUPPORT)
     virtual void dashboardRegionsChanged();
+#endif
 
     virtual void runOpenPanel(PassRefPtr<WebCore::FileChooser>);
 
index 898ec02..3667eee 100644 (file)
@@ -450,6 +450,7 @@ void WebChromeClient::populateVisitedLinks()
     END_BLOCK_OBJC_EXCEPTIONS;
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
 void WebChromeClient::dashboardRegionsChanged()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -461,6 +462,7 @@ void WebChromeClient::dashboardRegionsChanged()
 
     END_BLOCK_OBJC_EXCEPTIONS;
 }
+#endif
 
 FloatRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& type, const FloatRect& lineRect)
 {
index 9231932..cb2dede 100644 (file)
 {
     NSView *docView = [self documentView];
     if ([docView respondsToSelector:@selector(_webView)]) {
+#if ENABLE(DASHBOARD_SUPPORT)
         WebView *wv = [docView _webView];
         if ([wv _dashboardBehavior:WebDashboardBehaviorAllowWheelScrolling]) {
             [super scrollWheel:event];
         }
+#endif
         return;
     }
     [super scrollWheel:event];
index 99eb6d7..61382ce 100644 (file)
@@ -2479,7 +2479,11 @@ WEBCORE_COMMAND(yankAndSelect)
         return;
 
     // Unless the Dashboard asks us to do this for all windows, keep an observer going only for the key window.
-    if (!([[self window] isKeyWindow] || [[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows]))
+    if (!([[self window] isKeyWindow] 
+#if ENABLE(DASHBOARD_SUPPORT)
+            || [[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows]
+#endif
+        ))
         return;
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mouseMovedNotification:)
@@ -2495,9 +2499,11 @@ WEBCORE_COMMAND(yankAndSelect)
 
 - (void)removeMouseMovedObserver
 {
+#if ENABLE(DASHBOARD_SUPPORT)
     // Don't remove the observer if we're running the Dashboard.
     if ([[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows])
         return;
+#endif
 
     [[self _webView] _mouseDidMoveOverElement:nil modifierFlags:0];
     [self removeMouseMovedObserverUnconditionally];
@@ -2977,8 +2983,10 @@ static void _updateFocusedAndActiveStateTimerCallback(CFRunLoopTimerRef timer, v
     NSView *hitView = [self _hitViewForEvent:event];
     WebHTMLView *hitHTMLView = [hitView isKindOfClass:[self class]] ? (WebHTMLView *)hitView : nil;
     
+#if ENABLE(DASHBOARD_SUPPORT)
     if ([[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysAcceptsFirstMouse])
         return YES;
+#endif
     
     if (hitHTMLView) {
         bool result = false;
index 72c66c7..6a3c32f 100644 (file)
 
 #import <WebKit/WebUIDelegate.h>
 
+#if !defined(ENABLE_DASHBOARD_SUPPORT)
+#define ENABLE_DASHBOARD_SUPPORT 1
+#endif
+
 // Mail on Tiger expects the old value for WebMenuItemTagSearchInGoogle
 #define WebMenuItemTagSearchInGoogle OldWebMenuItemTagSearchWeb
 
@@ -74,8 +78,10 @@ enum {
 
 - (NSView *)webView:(WebView *)webView plugInViewWithArguments:(NSDictionary *)arguments;
 
+#if ENABLE_DASHBOARD_SUPPORT
 // regions is an dictionary whose keys are regions label and values are arrays of WebDashboardRegions.
 - (void)webView:(WebView *)webView dashboardRegionsChanged:(NSDictionary *)regions;
+#endif
 
 - (void)webView:(WebView *)sender dragImage:(NSImage *)anImage at:(NSPoint)viewLocation offset:(NSSize)initialOffset event:(NSEvent *)event pasteboard:(NSPasteboard *)pboard source:(id)sourceObj slideBack:(BOOL)slideFlag forView:(NSView *)view;
 - (void)webView:(WebView *)sender didDrawRect:(NSRect)rect;
index 6c4fb0c..f0a7f90 100644 (file)
 #import <WebKit/DOM.h>
 #import <WebKit/DOMExtensions.h>
 #import <WebKit/DOMPrivate.h>
-#import <WebKit/WebDashboardRegion.h>
 #import <WebKitSystemInterface.h>
 #import <kjs/InitializeThreading.h>
 #import <mach-o/dyld.h>
 #import <objc/objc-runtime.h>
 #import <sys/param.h>
 
+#if ENABLE(DASHBOARD_SUPPORT)
+#import <WebKit/WebDashboardRegion.h>
+#endif
+
 using namespace WebCore;
 using namespace KJS;
 
@@ -361,10 +364,12 @@ static int pluginDatabaseClientCount = 0;
 
     BOOL smartInsertDeleteEnabled;
         
+#if ENABLE(DASHBOARD_SUPPORT)
     BOOL dashboardBehaviorAlwaysSendMouseEventsToAllWindows;
     BOOL dashboardBehaviorAlwaysSendActiveNullEventsToPlugIns;
     BOOL dashboardBehaviorAlwaysAcceptsFirstMouse;
     BOOL dashboardBehaviorAllowWheelScrolling;
+#endif
     
     // WebKit has both a global plug-in database and a separate, per WebView plug-in database. Dashboard uses the per WebView database.
     WebPluginDatabase *pluginDatabase;
@@ -464,7 +469,9 @@ static BOOL grammarCheckingEnabled;
     allowsUndo = YES;
     zoomMultiplier = 1;
     zoomMultiplierIsTextOnly = YES;
+#if ENABLE(DASHBOARD_SUPPORT)
     dashboardBehaviorAllowWheelScrolling = YES;
+#endif
     shouldCloseWithWindow = objc_collecting_enabled();
     continuousSpellCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
 
@@ -1332,6 +1339,8 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
     _private->page->dragController()->setDidInitiateDrag(initiatedDrag);
 }
 
+#if ENABLE(DASHBOARD_SUPPORT)
+
 #define DASHBOARD_CONTROL_LABEL @"control"
 
 - (void)_addScrollerDashboardRegions:(NSMutableDictionary *)regions from:(NSArray *)views
@@ -1443,6 +1452,8 @@ WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementati
     return NO;
 }
 
+#endif /* ENABLE(DASHBOARD_SUPPORT) */
+
 + (void)_setShouldUseFontSmoothing:(BOOL)f
 {
     WebCoreSetShouldUseFontSmoothing(f);
index d8ddd01..8f3757a 100644 (file)
 #import <WebKit/WebView.h>
 #import <WebKit/WebFramePrivate.h>
 
+#if !defined(ENABLE_DASHBOARD_SUPPORT)
+#define ENABLE_DASHBOARD_SUPPORT 1
+#endif
+
 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
 #define WebNSInteger int
 #define WebNSUInteger unsigned int
@@ -61,6 +65,7 @@ extern NSString *WebElementIsContentEditableKey; // NSNumber indicating whether
 // other WebElementDictionary keys
 extern NSString *WebElementLinkIsLiveKey;        // NSNumber of BOOL indictating whether the link is live or not
 
+#if ENABLE_DASHBOARD_SUPPORT
 typedef enum {
     WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows,
     WebDashboardBehaviorAlwaysSendActiveNullEventsToPlugIns,
@@ -68,6 +73,7 @@ typedef enum {
     WebDashboardBehaviorAllowWheelScrolling,
     WebDashboardBehaviorUseBackwardCompatibilityMode
 } WebDashboardBehavior;
+#endif
 
 @interface WebController : NSTreeController {
     IBOutlet WebView *webView;
@@ -260,11 +266,13 @@ Could be worth adding to the API.
 
 - (NSCachedURLResponse *)_cachedResponseForURL:(NSURL *)URL;
 
+#if ENABLE_DASHBOARD_SUPPORT
 - (void)_addScrollerDashboardRegions:(NSMutableDictionary *)regions;
 - (NSDictionary *)_dashboardRegions;
 
 - (void)_setDashboardBehavior:(WebDashboardBehavior)behavior to:(BOOL)flag;
 - (BOOL)_dashboardBehavior:(WebDashboardBehavior)behavior;
+#endif
 
 + (void)_setShouldUseFontSmoothing:(BOOL)f;
 + (BOOL)_shouldUseFontSmoothing;
@@ -348,9 +356,11 @@ Could be worth adding to the API.
 - (BOOL)usesPageCache;
 - (void)setUsesPageCache:(BOOL)usesPageCache;
 
+#if ENABLE_DASHBOARD_SUPPORT
 // <rdar://problem/5217124> Clients other than dashboard, don't use this.
 // Do not remove until Dashboard has moved off it
 - (void)handleAuthenticationForResource:(id)identifier challenge:(NSURLAuthenticationChallenge *)challenge fromDataSource:(WebDataSource *)dataSource;
+#endif
 
 - (void)_clearUndoRedoOperations;