Reviewed by Hyatt.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2006 08:12:37 +0000 (08:12 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 13 Jan 2006 08:12:37 +0000 (08:12 +0000)
        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6508
          retire APPLE_CHANGES

        * WebCore.vcproj/WebCore/WebCore.vcproj: Don't set APPLE_CHANGES or
        HAVE_CONFIG_H any more.

        * WebCore.xcodeproj/project.pbxproj: Don't set APPLE_CHANGES or
        KHTML_NO_CPLUSPLUS_DOM any more.

        * kcanvas/KCanvasFilters.h:
        Use __APPLE__ instead of APPLE_CHANGES.

        * bridge/mac/MacFrame.mm: (MacFrame::respondToChangedContents):
        * kcanvas/KCanvasTreeDebug.cpp:
        * ksvg2/svg/SVGAElementImpl.cpp: (SVGAElementImpl::defaultEventHandler):
        * ksvg2/svg/SVGElementImpl.h: (KSVG::svg_dynamic_cast):
        * ksvg2/svg/SVGScriptElementImpl.cpp: (SVGScriptElementImpl::executeScript):
        * page/Frame.cpp: (Frame::paint):
        Make some APPLE_CHANGES code unconditional.

        * WebCore+SVG/kdom.h:
        * ksvg2/ecma/Ecma.cpp: (Ecma::setupDocument):
        * ksvg2/svg/SVGCursorElementImpl.cpp:
        * ksvg2/svg/SVGImageElementImpl.cpp:
        Remove some !APPLE_CHANGES code.

        * ksvg2/svg/SVGDocumentImpl.h:
        Remove some unneeded APPLE_CHANGES code.

        * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox):
        Remove a misleading mention of APPLE_CHANGES in a comment.

        Also changed tabs to spaces in files I am committing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12062 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
WebCore/ChangeLog
WebCore/WebCore+SVG/kdom.h
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCorePrefix.h
WebCore/bridge/mac/MacFrame.mm
WebCore/kcanvas/KCanvasFilters.h
WebCore/kcanvas/KCanvasTreeDebug.cpp
WebCore/khtml/rendering/render_flexbox.cpp
WebCore/ksvg2/ecma/Ecma.cpp
WebCore/ksvg2/svg/SVGAElementImpl.cpp
WebCore/ksvg2/svg/SVGCursorElementImpl.cpp
WebCore/ksvg2/svg/SVGDOMImplementationImpl.h
WebCore/ksvg2/svg/SVGDocumentImpl.h
WebCore/ksvg2/svg/SVGElementImpl.h
WebCore/ksvg2/svg/SVGImageElementImpl.cpp
WebCore/ksvg2/svg/SVGScriptElementImpl.cpp
WebCore/page/Frame.cpp

index 073f93b..6bf31a3 100644 (file)
@@ -1,3 +1,41 @@
+2006-01-13  Darin Adler  <darin@apple.com>
+
+        Reviewed by Hyatt.
+
+        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6508
+          retire APPLE_CHANGES
+
+        * WebCore.vcproj/WebCore/WebCore.vcproj: Don't set APPLE_CHANGES or
+        HAVE_CONFIG_H any more.
+
+        * WebCore.xcodeproj/project.pbxproj: Don't set APPLE_CHANGES or
+        KHTML_NO_CPLUSPLUS_DOM any more.
+
+        * kcanvas/KCanvasFilters.h:
+        Use __APPLE__ instead of APPLE_CHANGES.
+
+        * bridge/mac/MacFrame.mm: (MacFrame::respondToChangedContents):
+        * kcanvas/KCanvasTreeDebug.cpp:
+        * ksvg2/svg/SVGAElementImpl.cpp: (SVGAElementImpl::defaultEventHandler):
+        * ksvg2/svg/SVGElementImpl.h: (KSVG::svg_dynamic_cast):
+        * ksvg2/svg/SVGScriptElementImpl.cpp: (SVGScriptElementImpl::executeScript):
+        * page/Frame.cpp: (Frame::paint):
+        Make some APPLE_CHANGES code unconditional.
+
+        * WebCore+SVG/kdom.h:
+        * ksvg2/ecma/Ecma.cpp: (Ecma::setupDocument):
+        * ksvg2/svg/SVGCursorElementImpl.cpp:
+        * ksvg2/svg/SVGImageElementImpl.cpp:
+        Remove some !APPLE_CHANGES code.
+
+        * ksvg2/svg/SVGDocumentImpl.h:
+        Remove some unneeded APPLE_CHANGES code.
+
+        * khtml/rendering/render_flexbox.cpp: (khtml::RenderFlexibleBox::layoutVerticalBox):
+        Remove a misleading mention of APPLE_CHANGES in a comment.
+
+        Also changed tabs to spaces in files I am committing.
+
 2006-01-12  David Hyatt <hyatt@apple.com>
 
        Get the misc directory compiling on Win32.
index b7c1222..1f98657 100644 (file)
@@ -127,9 +127,6 @@ namespace KDOM
     typedef unsigned long long DOMTimeStamp;
 
     // Debugging helper
-#ifndef APPLE_CHANGES
-    inline kndbgstream &operator<<(kndbgstream &stream, const DOMString &string) { return (stream << string.qstring()); }
-#endif
     inline kdbgstream  &operator<<(kdbgstream  &stream, const DOMString &string) { return (stream << string.qstring()); }
 };
 
index 445fd4e..d5e08ad 100644 (file)
@@ -42,7 +42,7 @@
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
                                AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\iconv\include&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\libxml\include&quot;;&quot;$(SolutionDir)\..\..\libxslt\include&quot;;&quot;$(SolutionDir)\..\bridge\mac&quot;;&quot;$(SolutionDir)\..\khtml\css&quot;;&quot;$(SolutionDir)\..\khtml\dom&quot;;&quot;$(SolutionDir)\..\khtml\ecma&quot;;&quot;$(SolutionDir)\..\khtml\editing&quot;;&quot;$(SolutionDir)\..\khtml\html&quot;;&quot;$(SolutionDir)\..\khtml\misc&quot;;&quot;$(SolutionDir)\..\khtml\rendering&quot;;&quot;$(SolutionDir)\..\khtml\xml&quot;;&quot;$(SolutionDir)\..\khtml\xsl&quot;;&quot;$(SolutionDir)\..\khtml&quot;;&quot;$(SolutionDir)\..\kwq&quot;;&quot;$(SolutionDir)\..\page&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\DerivedSources&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\kjs&quot;"\r
-                               PreprocessorDefinitions="HAVE_CONFIG_H; WIN32; APPLE_CHANGES; KHTML_NO_XBL; KHTML_XSLT"\r
+                               PreprocessorDefinitions="WIN32; KHTML_NO_XBL; KHTML_XSLT"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\iconv\include&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\libxml\include&quot;;&quot;$(SolutionDir)\..\..\libxslt\include&quot;;&quot;$(SolutionDir)\..\bridge\mac&quot;;&quot;$(SolutionDir)\..\khtml\css&quot;;&quot;$(SolutionDir)\..\khtml\dom&quot;;&quot;$(SolutionDir)\..\khtml\ecma&quot;;&quot;$(SolutionDir)\..\khtml\editing&quot;;&quot;$(SolutionDir)\..\khtml\html&quot;;&quot;$(SolutionDir)\..\khtml\misc&quot;;&quot;$(SolutionDir)\..\khtml\rendering&quot;;&quot;$(SolutionDir)\..\khtml\xml&quot;;&quot;$(SolutionDir)\..\khtml\xsl&quot;;&quot;$(SolutionDir)\..\khtml&quot;;&quot;$(SolutionDir)\..\kwq&quot;;&quot;$(SolutionDir)\..\page&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\ForwardingHeaders&quot;;&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\DerivedSources&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\kjs&quot;"\r
-                               PreprocessorDefinitions="HAVE_CONFIG_H; WIN32; APPLE_CHANGES; KHTML_NO_XBL; KHTML_XSLT"\r
+                               PreprocessorDefinitions="WIN32; KHTML_NO_XBL; KHTML_XSLT"\r
                                RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                                WarningLevel="1"\r
index d655936..549fa09 100644 (file)
                                GCC_OPTIMIZATION_LEVEL = s;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
-                                       KHTML_NO_CPLUSPLUS_DOM,
-                               );
+                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
                                GCC_OPTIMIZATION_LEVEL = s;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
-                                       KHTML_NO_CPLUSPLUS_DOM,
-                               );
+                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
                                        SVG_SUPPORT,
                                );
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
                                        SVG_SUPPORT,
                                );
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
                                        SVG_SUPPORT,
                                );
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
                                        SVG_SUPPORT,
                                );
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_OPTIMIZATION_LEVEL = 0;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
-                                       KHTML_NO_CPLUSPLUS_DOM,
-                               );
+                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
                                GCC_OPTIMIZATION_LEVEL = s;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
-                                       KHTML_NO_CPLUSPLUS_DOM,
-                               );
+                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
                                GCC_OPTIMIZATION_LEVEL = s;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
-                                       KHTML_NO_CPLUSPLUS_DOM,
-                               );
+                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
                                GCC_OPTIMIZATION_LEVEL = s;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = WebCorePrefix.h;
-                               GCC_PREPROCESSOR_DEFINITIONS = (
-                                       "$(DEBUG_DEFINES)",
-                                       APPLE_CHANGES,
-                                       KHTML_NO_CPLUSPLUS_DOM,
-                               );
+                               GCC_PREPROCESSOR_DEFINITIONS = "$(DEBUG_DEFINES)";
                                GCC_TREAT_WARNINGS_AS_ERRORS = YES;
                                GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
index 60a8159..1ec7aae 100644 (file)
 #define isalnum(c)      __istype((c), (_CTYPE_A|_CTYPE_D))
 #define isalpha(c)      __istype((c), _CTYPE_A)
 #define iscntrl(c)      __istype((c), _CTYPE_C)
-#define isdigit(c)      __isctype((c), _CTYPE_D)       /* ANSI -- locale independent */
+#define isdigit(c)      __isctype((c), _CTYPE_D)        /* ANSI -- locale independent */
 #define isgraph(c)      __istype((c), _CTYPE_G)
 #define islower(c)      __istype((c), _CTYPE_L)
 #define isprint(c)      __istype((c), _CTYPE_R)
 #define ispunct(c)      __istype((c), _CTYPE_P)
 #define isspace(c)      __istype((c), _CTYPE_S)
 #define isupper(c)      __istype((c), _CTYPE_U)
-#define isxdigit(c)     __isctype((c), _CTYPE_X)       /* ANSI -- locale independent */
+#define isxdigit(c)     __isctype((c), _CTYPE_X)        /* ANSI -- locale independent */
 #define tolower(c)      __tolower(c)
 #define toupper(c)      __toupper(c)
 
@@ -70,9 +70,6 @@
 #endif
 
 #define KDOM DOM
-#define KSVGView KHTMLView
-#define KDOMView KHTMLView
-#define KDOMPart KHTMLPart
 
 #undef try
 #undef catch
index 59a6125..b0124ca 100644 (file)
@@ -85,9 +85,7 @@
 #import <JavaScriptCore/WebScriptObjectPrivate.h>
 #import <JavaScriptCore/NP_jsobject.h>
 
-#if APPLE_CHANGES
 #import "KWQAccObjectCache.h"
-#endif
 
 #undef _KWQ_TIMING
 
@@ -178,7 +176,7 @@ void MacFrame::freeClipboard()
 {
     if (_dragClipboard) {
         _dragClipboard->setAccessPolicy(KWQClipboard::Numb);
-       _dragClipboard->deref();
+        _dragClipboard->deref();
         _dragClipboard = 0;
     }
 }
@@ -544,17 +542,17 @@ void MacFrame::submitForm(const KURL &url, const URLArgs &args)
 
     if (!args.doPost()) {
         [_bridge loadURL:url.getNSURL()
-               referrer:[_bridge referrer] 
+                referrer:[_bridge referrer] 
                   reload:args.reload
              userGesture:true
-                 target:args.frameName.getNSString()
+                  target:args.frameName.getNSString()
          triggeringEvent:_currentEvent
                     form:_formAboutToBeSubmitted
               formValues:_formValuesAboutToBeSubmitted];
     } else {
         ASSERT(args.contentType().startsWith("Content-Type: "));
         [_bridge postWithURL:url.getNSURL()
-                   referrer:[_bridge referrer] 
+                    referrer:[_bridge referrer] 
                       target:args.frameName.getNSString()
                         data:arrayFromFormData(args.postData)
                  contentType:args.contentType().mid(14).getNSString()
@@ -662,8 +660,8 @@ ObjectContents *MacFrame::createPart(const ChildFrame &child, const KURL &url, c
                                                     allowsScrolling:allowsScrolling
                                                         marginWidth:marginWidth
                                                        marginHeight:marginHeight];
-       // This call needs to return an object with a ref, since the caller will expect to own it.
-       // childBridge owns the only ref so far.
+        // This call needs to return an object with a ref, since the caller will expect to own it.
+        // childBridge owns the only ref so far.
         part = [childBridge part];
         if (part)
             part->ref();
@@ -682,12 +680,12 @@ void MacFrame::setView(KHTMLView *view)
     // we wait until the view is destroyed, then things won't be
     // hooked up enough for some JavaScript calls to work.
     if (d->m_doc && view == 0)
-       d->m_doc->detach();
+        d->m_doc->detach();
     
     if (view)
-       view->ref();
+        view->ref();
     if (d->m_view)
-       d->m_view->deref();
+        d->m_view->deref();
     d->m_view = view;
     setWidget(view);
     
@@ -1290,9 +1288,9 @@ void MacFrame::saveDocumentState()
     // Do not save doc state if the page has a password field and a form that would be submitted
     // via https
     if (!(d->m_doc && d->m_doc->hasPasswordField() && d->m_doc->hasSecureForm())) {
-       KWQ_BLOCK_EXCEPTIONS;
+        KWQ_BLOCK_EXCEPTIONS;
         [_bridge saveDocumentState];
-       KWQ_UNBLOCK_EXCEPTIONS;
+        KWQ_UNBLOCK_EXCEPTIONS;
     }
 }
 
@@ -1354,7 +1352,7 @@ bool MacFrame::runJavaScriptPrompt(const DOMString& prompt, const DOMString& def
     NSString *returnedText = nil;
 
     ok = [_bridge runJavaScriptTextInputPanelWithPrompt:prompt
-              defaultText:defaultValue returningText:&returnedText];
+        defaultText:defaultValue returningText:&returnedText];
 
     if (ok) {
         result = DOMString(returnedText);
@@ -1409,14 +1407,14 @@ void MacFrame::createEmptyDocument()
     // it does nothing if we already have a document, and just creates an
     // empty one if we have no document at all.
     if (!d->m_doc) {
-       KWQ_BLOCK_EXCEPTIONS;
+        KWQ_BLOCK_EXCEPTIONS;
         [_bridge loadEmptyDocumentSynchronously];
-       KWQ_UNBLOCK_EXCEPTIONS;
+        KWQ_UNBLOCK_EXCEPTIONS;
 
-       if (parentFrame() && (parentFrame()->childFrame(this)->m_type == ChildFrame::IFrame ||
-                            parentFrame()->childFrame(this)->m_type == ChildFrame::Object)) {
-           d->m_doc->setBaseURL(parentFrame()->d->m_doc->baseURL());
-       }
+        if (parentFrame() && (parentFrame()->childFrame(this)->m_type == ChildFrame::IFrame ||
+                parentFrame()->childFrame(this)->m_type == ChildFrame::Object)) {
+            d->m_doc->setBaseURL(parentFrame()->d->m_doc->baseURL());
+        }
     }
 }
 
@@ -1435,7 +1433,7 @@ bool MacFrame::keyEvent(NSEvent *event)
     }
     NodeImpl *node = doc->focusNode();
     if (!node) {
-       node = doc->body();
+        node = doc->body();
         if (!node) {
             return false;
         }
@@ -1456,10 +1454,10 @@ bool MacFrame::keyEvent(NSEvent *event)
     // which causes it to send a press to the DOM.
     // That's not a great hack; it would be good to do this in a better way.
     if ([event type] == NSKeyDown && ![event isARepeat]) {
-       QKeyEvent repeatEvent(event, true);
+        QKeyEvent repeatEvent(event, true);
         if (!node->dispatchKeyEvent(&repeatEvent)) {
-           result = true;
-       }
+            result = true;
+        }
     }
 
     ASSERT(_currentEvent == event);
@@ -1611,7 +1609,7 @@ static bool findViewInSubviews(NSView *superview, NSView *target)
     while ((subview = [e nextObject])) {
         if (subview == target || findViewInSubviews(subview, target)) {
             return true;
-       }
+        }
     }
     KWQ_UNBLOCK_EXCEPTIONS;
     
@@ -1693,7 +1691,7 @@ void MacFrame::khtmlMouseMoveEvent(MouseMoveEvent *event)
     KWQ_BLOCK_EXCEPTIONS;
 
     if ([_currentEvent type] == NSLeftMouseDragged) {
-       NSView *view = mouseDownViewIfStillGood();
+        NSView *view = mouseDownViewIfStillGood();
 
         if (view) {
             _sendingEventToSubview = true;
@@ -1704,7 +1702,7 @@ void MacFrame::khtmlMouseMoveEvent(MouseMoveEvent *event)
 
         // Careful that the drag starting logic stays in sync with eventMayStartDrag()
     
-       if (_mouseDownMayStartDrag && !_dragSrc) {
+        if (_mouseDownMayStartDrag && !_dragSrc) {
             BOOL tempFlag1, tempFlag2;
             [_bridge allowDHTMLDrag:&tempFlag1 UADrag:&tempFlag2];
             _dragSrcMayBeDHTML = tempFlag1;
@@ -1818,7 +1816,7 @@ void MacFrame::khtmlMouseMoveEvent(MouseMoveEvent *event)
 
             // No more default handling (like selection), whether we're past the hysteresis bounds or not
             return;
-       }
+        }
         if (!_mouseDownMayStartSelect) {
             return;
         }
@@ -1830,11 +1828,11 @@ void MacFrame::khtmlMouseMoveEvent(MouseMoveEvent *event)
         // We use khtml's selection but our own autoscrolling.
         [_bridge handleAutoscrollForMouseDragged:_currentEvent];
     } else {
-       // If we allowed the other side of the bridge to handle a drag
-       // last time, then m_bMousePressed might still be set. So we
-       // clear it now to make sure the next move after a drag
-       // doesn't look like a drag.
-       d->m_bMousePressed = false;
+        // If we allowed the other side of the bridge to handle a drag
+        // last time, then m_bMousePressed might still be set. So we
+        // clear it now to make sure the next move after a drag
+        // doesn't look like a drag.
+        d->m_bMousePressed = false;
     }
 
     Frame::khtmlMouseMoveEvent(event);
@@ -1958,7 +1956,7 @@ bool MacFrame::passSubframeEventToSubframe(NodeImpl::MouseEvent &event)
             return true;
         }
         
-       case NSLeftMouseDown: {
+        case NSLeftMouseDown: {
             NodeImpl *node = event.innerNode.get();
             if (!node) {
                 return false;
@@ -1986,8 +1984,8 @@ bool MacFrame::passSubframeEventToSubframe(NodeImpl::MouseEvent &event)
             }
             ASSERT(!_sendingEventToSubview);
             _sendingEventToSubview = true;
-           [view mouseUp:_currentEvent];
-           _sendingEventToSubview = false;
+            [view mouseUp:_currentEvent];
+            _sendingEventToSubview = false;
             return true;
         }
         case NSLeftMouseDragged: {
@@ -2000,8 +1998,8 @@ bool MacFrame::passSubframeEventToSubframe(NodeImpl::MouseEvent &event)
             }
             ASSERT(!_sendingEventToSubview);
             _sendingEventToSubview = true;
-           [view mouseDragged:_currentEvent];
-           _sendingEventToSubview = false;
+            [view mouseDragged:_currentEvent];
+            _sendingEventToSubview = false;
             return true;
         }
         default:
@@ -2152,46 +2150,46 @@ void MacFrame::sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent)
     _sendingEventToSubview = false;
     int eventType = [initiatingEvent type];
     if (eventType == NSLeftMouseDown || eventType == NSKeyDown) {
-       NSEvent *fakeEvent = nil;
-       if (eventType == NSLeftMouseDown) {
-           fakeEvent = [NSEvent mouseEventWithType:NSLeftMouseUp
-                                   location:[initiatingEvent locationInWindow]
-                               modifierFlags:[initiatingEvent modifierFlags]
-                                   timestamp:[initiatingEvent timestamp]
-                               windowNumber:[initiatingEvent windowNumber]
-                                       context:[initiatingEvent context]
-                                   eventNumber:[initiatingEvent eventNumber]
-                                   clickCount:[initiatingEvent clickCount]
-                                   pressure:[initiatingEvent pressure]];
-       
-           mouseUp(fakeEvent);
-       }
-       else { // eventType == NSKeyDown
-           fakeEvent = [NSEvent keyEventWithType:NSKeyUp
-                                   location:[initiatingEvent locationInWindow]
-                              modifierFlags:[initiatingEvent modifierFlags]
-                                  timestamp:[initiatingEvent timestamp]
-                               windowNumber:[initiatingEvent windowNumber]
-                                    context:[initiatingEvent context]
-                                 characters:[initiatingEvent characters] 
-                charactersIgnoringModifiers:[initiatingEvent charactersIgnoringModifiers] 
-                                  isARepeat:[initiatingEvent isARepeat] 
-                                    keyCode:[initiatingEvent keyCode]];
-           keyEvent(fakeEvent);
-       }
-       // FIXME:  We should really get the current modifierFlags here, but there's no way to poll
-       // them in Cocoa, and because the event stream was stolen by the Carbon menu code we have
-       // no up-to-date cache of them anywhere.
-       fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
-                                      location:[[_bridge window] convertScreenToBase:[NSEvent mouseLocation]]
-                                 modifierFlags:[initiatingEvent modifierFlags]
-                                     timestamp:[initiatingEvent timestamp]
-                                  windowNumber:[initiatingEvent windowNumber]
-                                       context:[initiatingEvent context]
-                                   eventNumber:0
-                                    clickCount:0
-                                      pressure:0];
-       mouseMoved(fakeEvent);
+        NSEvent *fakeEvent = nil;
+        if (eventType == NSLeftMouseDown) {
+            fakeEvent = [NSEvent mouseEventWithType:NSLeftMouseUp
+                                    location:[initiatingEvent locationInWindow]
+                                modifierFlags:[initiatingEvent modifierFlags]
+                                    timestamp:[initiatingEvent timestamp]
+                                windowNumber:[initiatingEvent windowNumber]
+                                        context:[initiatingEvent context]
+                                    eventNumber:[initiatingEvent eventNumber]
+                                    clickCount:[initiatingEvent clickCount]
+                                    pressure:[initiatingEvent pressure]];
+        
+            mouseUp(fakeEvent);
+        }
+        else { // eventType == NSKeyDown
+            fakeEvent = [NSEvent keyEventWithType:NSKeyUp
+                                    location:[initiatingEvent locationInWindow]
+                               modifierFlags:[initiatingEvent modifierFlags]
+                                   timestamp:[initiatingEvent timestamp]
+                                windowNumber:[initiatingEvent windowNumber]
+                                     context:[initiatingEvent context]
+                                  characters:[initiatingEvent characters] 
+                 charactersIgnoringModifiers:[initiatingEvent charactersIgnoringModifiers] 
+                                   isARepeat:[initiatingEvent isARepeat] 
+                                     keyCode:[initiatingEvent keyCode]];
+            keyEvent(fakeEvent);
+        }
+        // FIXME:  We should really get the current modifierFlags here, but there's no way to poll
+        // them in Cocoa, and because the event stream was stolen by the Carbon menu code we have
+        // no up-to-date cache of them anywhere.
+        fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
+                                       location:[[_bridge window] convertScreenToBase:[NSEvent mouseLocation]]
+                                  modifierFlags:[initiatingEvent modifierFlags]
+                                      timestamp:[initiatingEvent timestamp]
+                                   windowNumber:[initiatingEvent windowNumber]
+                                        context:[initiatingEvent context]
+                                    eventNumber:0
+                                     clickCount:0
+                                       pressure:0];
+        mouseMoved(fakeEvent);
     }
     
     KWQ_UNBLOCK_EXCEPTIONS;
@@ -2999,9 +2997,8 @@ void MacFrame::tokenizerProcessedData()
 
 void MacFrame::setBridge(WebCoreBridge *p)
 { 
-    if (_bridge != p) {
-       delete _windowWidget;
-    }
+    if (_bridge != p)
+        delete _windowWidget;
     _bridge = p;
     _windowWidget = new KWQWindowWidget(_bridge);
 }
@@ -3135,16 +3132,16 @@ static KJS::Bindings::Instance *getInstanceForView(NSView *aView)
     if ([aView respondsToSelector:@selector(objectForWebScript)]){
         id object = [aView objectForWebScript];
         if (object) {
-           KJS::Bindings::RootObject *executionContext = KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction ()(aView);
+            KJS::Bindings::RootObject *executionContext = KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction ()(aView);
             return KJS::Bindings::Instance::createBindingForLanguageInstance (KJS::Bindings::Instance::ObjectiveCLanguage, object, executionContext);
-       }
+        }
     }
     else if ([aView respondsToSelector:@selector(pluginScriptableObject)]){
         void *object = [aView pluginScriptableObject];
         if (object) {
-           KJS::Bindings::RootObject *executionContext = KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction ()(aView);
+            KJS::Bindings::RootObject *executionContext = KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction ()(aView);
             return KJS::Bindings::Instance::createBindingForLanguageInstance (KJS::Bindings::Instance::CLanguage, object, executionContext);
-       }
+        }
     }
     return 0;
 }
@@ -3201,8 +3198,8 @@ void MacFrame::registerCommandForRedo(const EditCommandPtr &cmd)
 void MacFrame::clearUndoRedoOperations()
 {
     if (_haveUndoRedoOperations) {
-       [[_bridge undoManager] removeAllActionsWithTarget:_bridge];
-       _haveUndoRedoOperations = NO;
+        [[_bridge undoManager] removeAllActionsWithTarget:_bridge];
+        _haveUndoRedoOperations = NO;
     }
 }
 
@@ -3375,11 +3372,8 @@ bool MacFrame::shouldChangeSelection(const SelectionController &oldSelection, co
 
 void MacFrame::respondToChangedContents()
 {
-#if APPLE_CHANGES
-    if (KWQAccObjectCache::accessibilityEnabled()) {
+    if (KWQAccObjectCache::accessibilityEnabled())
         renderer()->document()->getAccObjectCache()->postNotificationToTopWebArea(renderer(), "AXValueChanged");
-    }
-#endif
     [_bridge respondToChangedContents];
 }
 
@@ -3449,9 +3443,8 @@ void MacFrame::setMarkedTextRange(const RangeImpl *range, NSArray *attributes, N
         m_markedTextUnderlines = convertAttributesToUnderlines(range, attributes, ranges);
     }
 
-    if (m_markedTextRange.get() && xmlDocImpl() && m_markedTextRange->startContainer(exception)->renderer()) {
-       m_markedTextRange->startContainer(exception)->renderer()->repaint();
-    }
+    if (m_markedTextRange.get() && xmlDocImpl() && m_markedTextRange->startContainer(exception)->renderer())
+        m_markedTextRange->startContainer(exception)->renderer()->repaint();
 
     if ( range && range->collapsed(exception) ) {
         m_markedTextRange = 0;
@@ -3460,7 +3453,7 @@ void MacFrame::setMarkedTextRange(const RangeImpl *range, NSArray *attributes, N
     }
 
     if (m_markedTextRange.get() && xmlDocImpl() && m_markedTextRange->startContainer(exception)->renderer()) {
-       m_markedTextRange->startContainer(exception)->renderer()->repaint();
+        m_markedTextRange->startContainer(exception)->renderer()->repaint();
     }
 }
 
@@ -3556,7 +3549,7 @@ bool MacFrame::shouldClose()
     int exception = 0;
     body->dispatchGenericEvent(event.get(), exception);
     if (!event->defaultPrevented() && document)
-       document->defaultEventHandler(event.get());
+        document->defaultEventHandler(event.get());
     if (event->result().isNull())
         return true;
 
@@ -3595,4 +3588,3 @@ bool MacFrame::dispatchDragSrcEvent(const AtomicString &eventType, const QPoint
     bool noDefaultProc = d->m_view->dispatchDragEvent(eventType, _dragSrc.get(), loc, _dragClipboard);
     return !noDefaultProc;
 }
-
index f4f6ea3..a48c86b 100644 (file)
 
 #include "KCanvasResources.h"
 #include <QSizeF>
+#include <qcolor.h>
+#include <qstringlist.h>
+
+#ifdef __OBJC__
+@class CIFilter;
+#else
+class CIFilter;
+#endif
+class KCanvasFilterQuartz;
+
 // Enumerations
 typedef enum
 {
@@ -50,9 +60,6 @@ typedef enum
     FE_TURBULENCE = 18
 } KCFilterEffectType;
 
-#include <qcolor.h>
-#include <qstringlist.h>
-
 class KCanvasPoint3F {
 public:
     KCanvasPoint3F() : m_x(0), m_y(0), m_z(0) { }
@@ -111,16 +118,6 @@ protected:
 
 KCanvasFilter *getFilterById(KDOM::DocumentImpl *document, const KDOM::DOMString &id);
 
-#ifdef APPLE_CHANGES
-// FIXME: this strikes me as a total hack...
-#ifdef __OBJC__
-@class CIFilter;
-#else
-class CIFilter;
-#endif
-class KCanvasFilterQuartz;
-#endif
-
 class KCanvasFilterEffect
 {
 public:
@@ -138,9 +135,9 @@ public:
 
     QString result() const;
     void setResult(const QString &result);
-    
-#ifdef APPLE_CHANGES
-    virtual CIFilter *getCIFilter(KCanvasFilterQuartz *quartzFilter) const = 0;
+
+#if __APPLE__
+    virtual CIFilter* getCIFilter(KCanvasFilterQuartz*) const = 0;
 #endif
 
     virtual QTextStream &externalRepresentation(QTextStream &) const;
index 7289291..80189a6 100644 (file)
@@ -44,9 +44,7 @@
 #include <kcanvas/KCanvasResources.h>
 #include <kcanvas/KCanvasFilters.h>
 
-#ifdef APPLE_CHANGES
 #include "KWQRenderTreeDebug.h"
-#endif
 
 #include <kxmlcore/Assertions.h>
 
@@ -403,4 +401,3 @@ QTextStream &operator<<(QTextStream &ts, const QStringList &l)
     
     return ts;
 }
-
index 234ee89..d42487f 100644 (file)
@@ -691,8 +691,7 @@ void RenderFlexibleBox::layoutVerticalBox(bool relayoutChildren)
     }
 
     // We confine the line clamp ugliness to vertical flexible boxes (thus keeping it out of
-    // mainstream block layout) and put it all inside APPLE_CHANGES to denote that this is not
-    // really part of the XUL box model.
+    // mainstream block layout); this is not really part of the XUL box model.
     bool haveLineClamp = style()->lineClamp() >= 0 && style()->lineClamp() <= 100;
     if (haveLineClamp) {
         int maxLineCount = 0;
index 9c1b5bb..74c6f76 100644 (file)
@@ -116,9 +116,6 @@ void Ecma::setupDocument(KDOM::DocumentImpl *document)
     SVGDocument docObj(svgDocument);
 
     KJS::JSObject *kjsObj = docObj.bridge(interpreter()->globalExec());
-#ifndef APPLE_CHANGES
-    kjsObj->ref();
-#endif
 
     interpreter()->putDOMObject(svgDocument, kjsObj);
     svgDocument->deref();
index e4ecf74..87c8f95 100644 (file)
@@ -94,11 +94,7 @@ void SVGAElementImpl::defaultEventHandler(KDOM::EventImpl *evt)
             KDOM::EventTargetImpl::defaultEventHandler(evt);
             return;
         }
-#if APPLE_CHANGES
         url = khtml::parseURL(href()->baseVal()).qstring();
-#else
-        url = KDOM::DOMString(KDOM::Helper::parseURL(href()->baseVal())).qstring();
-#endif
         kdDebug() << "url : " << url << endl;
         utarget = KDOM::DOMString(getAttribute(SVGNames::targetAttr)).qstring();
         kdDebug() << "utarget : " << utarget << endl;
index 669c04c..6bff917 100644 (file)
 #include "SVGAnimatedLengthImpl.h"
 #include "SVGAnimatedStringImpl.h"
 
-#ifndef APPLE_CHANGES
-#include "imload/imagepainter.h"
-#endif
-
 using namespace KSVG;
-#ifndef APPLE_CHANGES
-using namespace khtmlImLoad;
-#endif
 
 SVGCursorElementImpl::SVGCursorElementImpl(const KDOM::QualifiedName& tagName, KDOM::DocumentImpl *doc)
 : SVGElementImpl(tagName, doc), SVGTestsImpl(), SVGExternalResourcesRequiredImpl(), SVGURIReferenceImpl(), KDOM::CachedObjectClient()
index 5939b25..fc0db88 100644 (file)
 #include "DOMImplementationImpl.h"
 #include <qstringlist.h>
 
-class KHTMLView;
-
 namespace KDOM
 {
     class DOMString;
     class DocumentImpl;
     class DocumentTypeImpl;
     class CSSStyleSheetImpl;
-    using ::KHTMLView;
-};
+
+    typedef KHTMLView KDOMView;
+}
 
 namespace KSVG
 {
@@ -66,7 +65,7 @@ namespace KSVG
         static SVGDOMImplementationImpl *s_instance;
         static QStringList s_features;
     };
-};
+}
 
 #endif
 
index d3c8f82..08473ff 100644 (file)
 
 #include <ksvg2/misc/KSVGTimeScheduler.h>
 
-#ifdef APPLE_CHANGES
-class KHTMLView;
+typedef KHTMLView KSVGView;
 namespace KDOM {
-    using ::KHTMLView;
+    typedef KHTMLView KDOMView;
 }
-#endif
 
 namespace KSVG
 {
index 3199c04..6139cbd 100644 (file)
@@ -94,16 +94,8 @@ namespace KSVG
 namespace KSVG {
     static inline SVGElementImpl *svg_dynamic_cast(KDOM::NodeImpl *node) {
         SVGElementImpl *svgElement = NULL;
-#if APPLE_CHANGES
         if (node && node->isSVGElement())
             svgElement = static_cast<SVGElementImpl *>(node);
-#else
-        if (node && (node->nodeType() == KDOM::ELEMENT_NODE)) {
-            KDOM::ElementImpl *element = static_cast<KDOM::ElementImpl *>(node);
-            if (element && (KDOM::DOMString(element->namespaceURI()) == KDOM::NS_SVG))
-                svgElement = static_cast<SVGElementImpl *>(element);
-        }
-#endif
         return svgElement;
     }
 };
index ffc9809..21cff9d 100644 (file)
@@ -35,9 +35,6 @@
 #include "SVGAnimatedStringImpl.h"
 #include "KCanvasRenderingStyle.h"
 #include "SVGAnimatedPreserveAspectRatioImpl.h"
-#ifndef APPLE_CHANGES
-#include "KSVGDocumentBuilder.h"
-#endif
 #include "SVGDocumentImpl.h"
 #include <ksvg2/KSVGView.h>
 
@@ -48,9 +45,6 @@
 #include <kcanvas/KCanvasPath.h>
 
 #include <kdom/parser/KDOMParser.h>
-#ifndef APPLE_CHANGES
-#include <kdom/parser/KDOMParserFactory.h>
-#endif
 #include <kdom/core/DOMConfigurationImpl.h>
 
 #include <kxmlcore/Assertions.h>
index 39db577..1c36e58 100644 (file)
@@ -72,9 +72,7 @@ void SVGScriptElementImpl::executeScript(KDOM::DocumentImpl *document, KDOM::DOM
     if(!ecmaEngine)
         return;
                 
-#ifdef APPLE_CHANGES
     KJS::Interpreter::lock();
-#endif
 
     // Run script
     KJS::Completion comp = ecmaEngine->evaluate(jsCode.qstring(), ecmaEngine->globalObject());
@@ -107,9 +105,7 @@ void SVGScriptElementImpl::executeScript(KDOM::DocumentImpl *document, KDOM::DOM
     else if(comp.complType() == KJS::Normal)
         kdDebug() << "[SVGScriptElement] Evaluated ecma script!" << endl;
     
-#ifdef APPLE_CHANGES
     KJS::Interpreter::unlock();
-#endif
 #else
     if (jsCode)
         // Hack to close memory leak due to #if 0
index 967e788..eca9657 100644 (file)
@@ -108,7 +108,7 @@ namespace khtml {
             m_frame = frame;
             m_cachedSheet = Cache::requestStyleSheet(dl, url );
             if (m_cachedSheet)
-               m_cachedSheet->ref( this );
+                m_cachedSheet->ref( this );
         }
         virtual ~PartStyleSheetLoader()
         {
@@ -2361,8 +2361,8 @@ void Frame::handleMouseMoveEventSelection(khtml::MouseMoveEvent *event)
     NodeImpl *innerNode = event->innerNode();
 
     if (mouse->state() != LeftButton || !innerNode || !innerNode->renderer() ||
-        !mouseDownMayStartSelect() || !innerNode->renderer()->shouldSelect())
-       return;
+            !mouseDownMayStartSelect() || !innerNode->renderer()->shouldSelect())
+        return;
 
     // handle making selection
     VisiblePosition pos(innerNode->renderer()->positionForCoordinates(event->x(), event->y()));
@@ -2391,7 +2391,7 @@ void Frame::handleMouseMoveEventSelection(khtml::MouseMoveEvent *event)
 
 void Frame::khtmlMouseMoveEvent(khtml::MouseMoveEvent *event)
 {
-    handleMouseMoveEventSelection(event);              
+    handleMouseMoveEventSelection(event);
 }
 
 void Frame::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
@@ -3309,11 +3309,9 @@ void Frame::paint(QPainter *p, const QRect& rect)
         RenderObject *eltRenderer = _elementToDraw ? _elementToDraw->renderer() : 0;
         renderer()->layer()->paint(p, rect, _drawSelectionOnly, eltRenderer);
         
-#if APPLE_CHANGES
         // Regions may have changed as a result of the visibility/z-index of element changing.
         if (renderer()->document()->dashboardRegionsDirty())
             renderer()->canvas()->view()->updateDashboardRegions();
-#endif
     } else
         ERROR("called Frame::paint with nil renderer");
 }
@@ -3367,9 +3365,9 @@ bool Frame::canCachePage()
     if (d->m_frames.count() ||
         parentFrame() ||
         m_url.protocol().startsWith("https") || 
-       (d->m_doc && (d->m_doc->applets()->length() != 0 ||
+        (d->m_doc && (d->m_doc->applets()->length() != 0 ||
                       d->m_doc->hasWindowEventListener(unloadEvent) ||
-                     d->m_doc->hasPasswordField()))) {
+                      d->m_doc->hasPasswordField()))) {
         return false;
     }
     return true;
@@ -3412,13 +3410,13 @@ void Frame::restoreLocationProperties(SavedProperties *locationProperties)
 void Frame::saveInterpreterBuiltins(SavedBuiltins &interpreterBuiltins)
 {
     if (jScript() && jScript()->interpreter())
-       jScript()->interpreter()->saveBuiltins(interpreterBuiltins);
+        jScript()->interpreter()->saveBuiltins(interpreterBuiltins);
 }
 
 void Frame::restoreInterpreterBuiltins(const SavedBuiltins &interpreterBuiltins)
 {
     if (jScript() && jScript()->interpreter())
-       jScript()->interpreter()->restoreBuiltins(interpreterBuiltins);
+        jScript()->interpreter()->restoreBuiltins(interpreterBuiltins);
 }
 
 Frame *Frame::frameForWidget(const QWidget *widget)
@@ -3426,9 +3424,8 @@ Frame *Frame::frameForWidget(const QWidget *widget)
     ASSERT_ARG(widget, widget);
     
     NodeImpl *node = nodeForWidget(widget);
-    if (node) {
-       return frameForNode(node);
-    }
+    if (node)
+        return frameForNode(node);
     
     // Assume all widgets are either form controls, or KHTMLViews.
     ASSERT(widget->isKHTMLView());
@@ -3531,8 +3528,8 @@ void Frame::sendResizeEvent()
 {
     KHTMLView *v = d->m_view;
     if (v) {
-       QResizeEvent e;
-       v->resizeEvent(&e);
+        QResizeEvent e;
+        v->resizeEvent(&e);
     }
 }
 
@@ -3550,10 +3547,10 @@ void Frame::sendScrollEvent()
 bool Frame::scrollbarsVisible()
 {
     if (!view())
-       return false;
+        return false;
     
     if (view()->hScrollBarMode() == QScrollView::AlwaysOff || view()->vScrollBarMode() == QScrollView::AlwaysOff)
-       return false;
+        return false;
     
     return true;
 }
@@ -3791,7 +3788,7 @@ void Frame::setName(const QString &name)
     
     // FIXME: is the blank rule needed or useful?
     if (parent && (name.isEmpty() || parent->frameExists(name) || name == "_blank"))
-       n = parent->requestFrameName();
+        n = parent->requestFrameName();
     
     ObjectContents::setName(n);
 }