Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: Source/WebCore/accessibility/AccessibilityObject.h

Issue 13529026: Removing a bunch of unused platform code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace and compiler error on Mac. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WTF/wtf/text/WTFString.cpp ('k') | Source/WebCore/accessibility/AccessibilityObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nuanti Ltd. 3 * Copyright (C) 2008 Nuanti Ltd.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 21 matching lines...) Expand all
32 32
33 #include "FloatQuad.h" 33 #include "FloatQuad.h"
34 #include "LayoutRect.h" 34 #include "LayoutRect.h"
35 #include "TextIterator.h" 35 #include "TextIterator.h"
36 #include "VisiblePosition.h" 36 #include "VisiblePosition.h"
37 #include "VisibleSelection.h" 37 #include "VisibleSelection.h"
38 #include <wtf/Forward.h> 38 #include <wtf/Forward.h>
39 #include <wtf/RefPtr.h> 39 #include <wtf/RefPtr.h>
40 #include <wtf/Vector.h> 40 #include <wtf/Vector.h>
41 41
42 #if PLATFORM(MAC)
43 #include <wtf/RetainPtr.h>
44 #elif PLATFORM(WIN) && !OS(WINCE)
45 #include "AccessibilityObjectWrapperWin.h"
46 #include "COMPtr.h"
47 #endif
48
49 #if PLATFORM(MAC)
50
51 typedef struct _NSRange NSRange;
52
53 OBJC_CLASS NSArray;
54 OBJC_CLASS NSAttributedString;
55 OBJC_CLASS NSData;
56 OBJC_CLASS NSMutableAttributedString;
57 OBJC_CLASS NSString;
58 OBJC_CLASS NSValue;
59 OBJC_CLASS NSView;
60 OBJC_CLASS WebAccessibilityObjectWrapper;
61
62 typedef WebAccessibilityObjectWrapper AccessibilityObjectWrapper;
63
64 #elif PLATFORM(GTK)
65 typedef struct _AtkObject AtkObject;
66 typedef struct _AtkObject AccessibilityObjectWrapper;
67 #elif PLATFORM(CHROMIUM)
68 // Chromium does not use a wrapper.
69 #else
70 class AccessibilityObjectWrapper;
71 #endif
72
73 namespace WebCore { 42 namespace WebCore {
74 43
75 class AccessibilityObject; 44 class AccessibilityObject;
76 class AXObjectCache; 45 class AXObjectCache;
77 class Element; 46 class Element;
78 class Frame; 47 class Frame;
79 class FrameView; 48 class FrameView;
80 class HTMLAnchorElement; 49 class HTMLAnchorElement;
81 class HTMLAreaElement; 50 class HTMLAreaElement;
82 class IntPoint; 51 class IntPoint;
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 // Subscript/superscript components. 772 // Subscript/superscript components.
804 virtual AccessibilityObject* mathBaseObject() { return 0; } 773 virtual AccessibilityObject* mathBaseObject() { return 0; }
805 virtual AccessibilityObject* mathSubscriptObject() { return 0; } 774 virtual AccessibilityObject* mathSubscriptObject() { return 0; }
806 virtual AccessibilityObject* mathSuperscriptObject() { return 0; } 775 virtual AccessibilityObject* mathSuperscriptObject() { return 0; }
807 776
808 // Fenced components. 777 // Fenced components.
809 virtual String mathFencedOpenString() const { return String(); } 778 virtual String mathFencedOpenString() const { return String(); }
810 virtual String mathFencedCloseString() const { return String(); } 779 virtual String mathFencedCloseString() const { return String(); }
811 virtual int mathLineThickness() const { return 0; } 780 virtual int mathLineThickness() const { return 0; }
812 781
813 #if HAVE(ACCESSIBILITY)
814 #if PLATFORM(GTK)
815 AccessibilityObjectWrapper* wrapper() const;
816 void setWrapper(AccessibilityObjectWrapper*);
817 #elif !PLATFORM(CHROMIUM)
818 AccessibilityObjectWrapper* wrapper() const { return m_wrapper.get(); }
819 void setWrapper(AccessibilityObjectWrapper* wrapper)
820 {
821 m_wrapper = wrapper;
822 }
823 #endif
824 #endif
825
826 #if PLATFORM(MAC)
827 void overrideAttachmentParent(AccessibilityObject* parent);
828 #else
829 void overrideAttachmentParent(AccessibilityObject*) { } 782 void overrideAttachmentParent(AccessibilityObject*) { }
830 #endif
831 783
832 #if HAVE(ACCESSIBILITY) 784 #if HAVE(ACCESSIBILITY)
833 // a platform-specific method for determining if an attachment is ignored 785 // a platform-specific method for determining if an attachment is ignored
834 bool accessibilityIgnoreAttachment() const; 786 bool accessibilityIgnoreAttachment() const;
835 // gives platforms the opportunity to indicate if and how an object should b e included 787 // gives platforms the opportunity to indicate if and how an object should b e included
836 AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const; 788 AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const;
837 #else 789 #else
838 bool accessibilityIgnoreAttachment() const { return true; } 790 bool accessibilityIgnoreAttachment() const { return true; }
839 AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const { r eturn DefaultBehavior; } 791 AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const { r eturn DefaultBehavior; }
840 #endif 792 #endif
(...skipping 15 matching lines...) Expand all
856 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; } 808 virtual ScrollableArea* getScrollableAreaIfScrollable() const { return 0; }
857 virtual void scrollTo(const IntPoint&) const { } 809 virtual void scrollTo(const IntPoint&) const { }
858 810
859 static bool isAccessibilityObjectSearchMatchAtIndex(AccessibilityObject*, Ac cessibilitySearchCriteria*, size_t); 811 static bool isAccessibilityObjectSearchMatchAtIndex(AccessibilityObject*, Ac cessibilitySearchCriteria*, size_t);
860 static bool isAccessibilityObjectSearchMatch(AccessibilityObject*, Accessibi litySearchCriteria*); 812 static bool isAccessibilityObjectSearchMatch(AccessibilityObject*, Accessibi litySearchCriteria*);
861 static bool isAccessibilityTextSearchMatch(AccessibilityObject*, Accessibili tySearchCriteria*); 813 static bool isAccessibilityTextSearchMatch(AccessibilityObject*, Accessibili tySearchCriteria*);
862 static bool objectMatchesSearchCriteriaWithResultLimit(AccessibilityObject*, AccessibilitySearchCriteria*, AccessibilityChildrenVector&); 814 static bool objectMatchesSearchCriteriaWithResultLimit(AccessibilityObject*, AccessibilitySearchCriteria*, AccessibilityChildrenVector&);
863 virtual AccessibilityRole buttonRoleType() const; 815 virtual AccessibilityRole buttonRoleType() const;
864 bool ariaIsHidden() const; 816 bool ariaIsHidden() const;
865 817
866 #if PLATFORM(GTK)
867 bool allowsTextRanges() const;
868 unsigned getLengthForTextRange() const;
869 #else
870 bool allowsTextRanges() const { return isTextControl(); } 818 bool allowsTextRanges() const { return isTextControl(); }
871 unsigned getLengthForTextRange() const { return text().length(); } 819 unsigned getLengthForTextRange() const { return text().length(); }
872 #endif
873 820
874 #if PLATFORM(MAC)
875 RetainPtr<WebAccessibilityObjectWrapper> m_wrapper;
876 #elif PLATFORM(WIN) && !OS(WINCE)
877 COMPtr<AccessibilityObjectWrapper> m_wrapper;
878 #elif PLATFORM(GTK)
879 AtkObject* m_wrapper;
880 #elif PLATFORM(CHROMIUM)
881 bool m_detached; 821 bool m_detached;
882 #endif
883 }; 822 };
884 823
885 #if !HAVE(ACCESSIBILITY) 824 #if !HAVE(ACCESSIBILITY)
886 inline const AccessibilityObject::AccessibilityChildrenVector& AccessibilityObje ct::children() { return m_children; } 825 inline const AccessibilityObject::AccessibilityChildrenVector& AccessibilityObje ct::children() { return m_children; }
887 inline const String& AccessibilityObject::actionVerb() const { return emptyStrin g(); } 826 inline const String& AccessibilityObject::actionVerb() const { return emptyStrin g(); }
888 inline int AccessibilityObject::lineForPosition(const VisiblePosition&) const { return -1; } 827 inline int AccessibilityObject::lineForPosition(const VisiblePosition&) const { return -1; }
889 inline void AccessibilityObject::updateBackingStore() { } 828 inline void AccessibilityObject::updateBackingStore() { }
890 #endif 829 #endif
891 830
892 } // namespace WebCore 831 } // namespace WebCore
893 832
894 #endif // AccessibilityObject_h 833 #endif // AccessibilityObject_h
OLDNEW
« no previous file with comments | « Source/WTF/wtf/text/WTFString.cpp ('k') | Source/WebCore/accessibility/AccessibilityObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698