Bug 22137 - PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
Summary: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-08 04:49 PST by David Kilzer (:ddkilzer)
Modified: 2008-11-09 11:51 PST (History)
1 user (show)

See Also:


Attachments
Patch v1 (5.32 KB, patch)
2008-11-08 04:54 PST, David Kilzer (:ddkilzer)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2008-11-08 04:49:23 PST
If HAVE(ACCESSIBILITY) is set to zero in JavaScriptCore/wtf/Platform.h, the PLATFORM(MAC) build will fail.  I have a patch to fix this.
Comment 1 David Kilzer (:ddkilzer) 2008-11-08 04:54:59 PST
Created attachment 24985 [details]
Patch v1

Proposed fix.
Comment 2 Darin Adler 2008-11-08 09:12:59 PST
Comment on attachment 24985 [details]
Patch v1

> +#if HAVE(ACCESSIBILITY)
>      bool accessibilityIgnoreAttachment() const;
> +#else
> +    bool accessibilityIgnoreAttachment() const { return true; }
> +#endif

In cases like this I prefer to leave the class definition cleaner by putting the inline function definition after it. Like this:

    #if !HAVE(ACCESSIBILITY)
    inline bool AccessibilityObject::accessibilityIgnoreAttachment() const
    {
        return true;
    }
    #endif

This patch seems fine as-is.

r=me
Comment 3 David Kilzer (:ddkilzer) 2008-11-08 11:15:07 PST
(In reply to comment #2)
> (From update of attachment 24985 [details] [edit])
> > +#if HAVE(ACCESSIBILITY)
> >      bool accessibilityIgnoreAttachment() const;
> > +#else
> > +    bool accessibilityIgnoreAttachment() const { return true; }
> > +#endif
> 
> In cases like this I prefer to leave the class definition cleaner by putting
> the inline function definition after it. Like this:
> 
>     #if !HAVE(ACCESSIBILITY)
>     inline bool AccessibilityObject::accessibilityIgnoreAttachment() const
>     {
>         return true;
>     }
>     #endif

That doesn't work:

/Volumes/Data/WebKit.git/WebCore/page/AccessibilityObject.h:398: error: ‘bool WebCore::AccessibilityObject::accessibilityIgnoreAttachment() const’ and ‘bool WebCore::AccessibilityObject::accessibilityIgnoreAttachment() const’ cannot be overloaded
Comment 4 David Kilzer (:ddkilzer) 2008-11-08 11:55:28 PST
$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/page/AccessibilityObject.h
	M	WebCore/page/mac/AXObjectCacheMac.mm
	M	WebCore/page/mac/AccessibilityObjectMac.mm
	M	WebCore/page/mac/AccessibilityObjectWrapper.mm
	M	WebKit/mac/ChangeLog
	M	WebKit/mac/WebView/WebFrame.mm
Committed r38235

Comment 5 Darin Adler 2008-11-08 13:59:35 PST
(In reply to comment #3)
> > In cases like this I prefer to leave the class definition cleaner by putting
> > the inline function definition after it. Like this:
> > 
> >     #if !HAVE(ACCESSIBILITY)
> >     inline bool AccessibilityObject::accessibilityIgnoreAttachment() const
> >     {
> >         return true;
> >     }
> >     #endif
> 
> That doesn't work:
> 
> /Volumes/Data/WebKit.git/WebCore/page/AccessibilityObject.h:398: error: ‘bool
> WebCore::AccessibilityObject::accessibilityIgnoreAttachment() const’ and ‘bool
> WebCore::AccessibilityObject::accessibilityIgnoreAttachment() const’ cannot be
> overloaded

I've done it before, so I know it works. I think there was some other small mistake that caused this. I'll try it myself later.
Comment 6 David Kilzer (:ddkilzer) 2008-11-08 14:15:14 PST
(In reply to comment #5)
> > That doesn't work:
> > 
> > /Volumes/Data/WebKit.git/WebCore/page/AccessibilityObject.h:398: error: ‘bool
> > WebCore::AccessibilityObject::accessibilityIgnoreAttachment() const’ and ‘bool
> > WebCore::AccessibilityObject::accessibilityIgnoreAttachment() const’ cannot be
> > overloaded
> 
> I've done it before, so I know it works. I think there was some other small
> mistake that caused this. I'll try it myself later.

I think it would work to add the function definition to WebCore/page/AccessibilityObject.cpp instead.  Was that what you meant?

Comment 7 Darin Adler 2008-11-08 19:04:34 PST
(In reply to comment #6)
> I think it would work to add the function definition to
> WebCore/page/AccessibilityObject.cpp instead.  Was that what you meant?

I agree that would also work, but the function wouldn't be inline in that case.

No, it was not what I meant.
Comment 8 David Kilzer (:ddkilzer) 2008-11-09 11:51:42 PST
Follow-up fix for Qt build failure:

$ git svn dcommit
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/page/gtk/AccessibilityObjectAtk.cpp
	M	WebCore/page/gtk/AccessibilityObjectWrapperAtk.cpp
	M	WebCore/page/qt/AccessibilityObjectQt.cpp
	M	WebCore/page/win/AccessibilityObjectWin.cpp
	M	WebCore/page/wx/AccessibilityObjectWx.cpp
Committed r38244