Replaced 0 with nullptr in WebCore/accessibility.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 May 2015 04:53:35 +0000 (04:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 May 2015 04:53:35 +0000 (04:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145309

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-05-28
Reviewed by Chris Fleizach.

No new tests, no behavior change.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathPrescripts):
(WebCore::AccessibilityRenderObject::mathPostscripts):
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::scrollBar):
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
* accessibility/atk/WebKitAccessibleHyperlink.cpp:
(webkitAccessibleHyperlinkInit):
* accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
(webkitAccessibleDocumentGetAttributes):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
(attributeSetDifference):
* accessibility/atk/WebKitAccessibleUtil.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleRefChild):
(webkitAccessibleGetAttributes):
(webkitAccessibleGetObjectLocale):
(getInterfaceMaskFromObject):
(objectFocusedAndCaretOffsetUnignored):
(cacheAndReturnAtkProperty):

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

Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityScrollView.cpp
Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleHyperlink.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

index 1798623056642223108212d0a6cb528dd5528ceb..0deb857dbb659c8237b4dceb0d76604eb0b4ef75 100644 (file)
@@ -1,3 +1,35 @@
+2015-05-28  Hunseop Jeong  <hs85.jeong@samsung.com>
+
+        Replaced 0 with nullptr in WebCore/accessibility.
+        https://bugs.webkit.org/show_bug.cgi?id=145309
+
+        Reviewed by Chris Fleizach.
+
+        No new tests, no behavior change.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::mathPrescripts):
+        (WebCore::AccessibilityRenderObject::mathPostscripts):
+        * accessibility/AccessibilityScrollView.cpp:
+        (WebCore::AccessibilityScrollView::scrollBar):
+        * accessibility/atk/AXObjectCacheAtk.cpp:
+        (WebCore::notifyChildrenSelectionChange):
+        * accessibility/atk/WebKitAccessibleHyperlink.cpp:
+        (webkitAccessibleHyperlinkInit):
+        * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
+        (webkitAccessibleDocumentGetAttributes):
+        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
+        (getAttributeSetForAccessibilityObject):
+        (attributeSetDifference):
+        * accessibility/atk/WebKitAccessibleUtil.h:
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (webkitAccessibleRefChild):
+        (webkitAccessibleGetAttributes):
+        (webkitAccessibleGetObjectLocale):
+        (getInterfaceMaskFromObject):
+        (objectFocusedAndCaretOffsetUnignored):
+        (cacheAndReturnAtkProperty):
+
 2015-05-28  Zalan Bujtas  <zalan@apple.com>
 
         Subpixel rendering: Pixel crack in text selection of simple text in <textarea>.
index e92579645151a571287da39d8fc9e555b50a0707..1e6eca3aaf9500599c47a5693dd8d9c4a2a6861d 100644 (file)
@@ -3852,8 +3852,8 @@ void AccessibilityRenderObject::mathPrescripts(AccessibilityMathMultiscriptPairs
                 else {
                     prescriptPair.second = axChild;
                     prescripts.append(prescriptPair);
-                    prescriptPair.first = 0;
-                    prescriptPair.second = 0;
+                    prescriptPair.first = nullptr;
+                    prescriptPair.second = nullptr;
                 }
             }
         } else if (child->hasTagName(MathMLNames::mprescriptsTag))
@@ -3887,8 +3887,8 @@ void AccessibilityRenderObject::mathPostscripts(AccessibilityMathMultiscriptPair
             else {
                 postscriptPair.second = axChild;
                 postscripts.append(postscriptPair);
-                postscriptPair.first = 0;
-                postscriptPair.second = 0;
+                postscriptPair.first = nullptr;
+                postscriptPair.second = nullptr;
             }
         }
     }
index 2e56683b8766d27aa99fb21935383be7a112fa1e..7e530b37e2e1b04d0203c1066c1a817d6288c0d3 100644 (file)
@@ -65,9 +65,9 @@ AccessibilityObject* AccessibilityScrollView::scrollBar(AccessibilityOrientation
     
     switch (orientation) {
     case AccessibilityOrientationVertical:
-        return m_verticalScrollbar ? m_verticalScrollbar.get() : 0;
+        return m_verticalScrollbar ? m_verticalScrollbar.get() : nullptr;
     case AccessibilityOrientationHorizontal:
-        return m_horizontalScrollbar ? m_horizontalScrollbar.get() : 0;
+        return m_horizontalScrollbar ? m_horizontalScrollbar.get() : nullptr;
     }
     
     return nullptr;
index 4d3834e058a17347f9230cf27442ca44eb074a14..b845115e6f29885a28771fc222fa1eada1a7e759 100644 (file)
@@ -168,8 +168,8 @@ static void notifyChildrenSelectionChange(AccessibilityObject* object)
     if (oldListObject.get() != listObject)
         oldFocusedObject.get() = 0;
 
-    AtkObject* axItem = item ? item->wrapper() : 0;
-    AtkObject* axOldFocusedObject = oldFocusedObject.get() ? oldFocusedObject.get()->wrapper() : 0;
+    AtkObject* axItem = item ? item->wrapper() : nullptr;
+    AtkObject* axOldFocusedObject = oldFocusedObject.get() ? oldFocusedObject.get()->wrapper() : nullptr;
 
     // Old focused object just lost focus, so emit the events.
     if (axOldFocusedObject && axItem != axOldFocusedObject) {
index cd79c4b53e65f8db4b28eec7a60c26f5056c00ca..9df03efa9d9b781beed504cc2b6042ae5d03a7b6 100644 (file)
@@ -385,7 +385,7 @@ static void webkitAccessibleHyperlinkClassInit(AtkHyperlinkClass* klass)
 static void webkitAccessibleHyperlinkInit(AtkHyperlink* link)
 {
     WEBKIT_ACCESSIBLE_HYPERLINK(link)->priv = WEBKIT_ACCESSIBLE_HYPERLINK_GET_PRIVATE(link);
-    WEBKIT_ACCESSIBLE_HYPERLINK(link)->priv->hyperlinkImpl = 0;
+    WEBKIT_ACCESSIBLE_HYPERLINK(link)->priv->hyperlinkImpl = nullptr;
 }
 
 GType webkitAccessibleHyperlinkGetType()
index 5a52f8130f45e6ece6f3f7ef61ba87cc34b7d21f..6752d12d323b290cc15c113a1d4e1348b06f0dc8 100644 (file)
@@ -89,7 +89,7 @@ static AtkAttributeSet* webkitAccessibleDocumentGetAttributes(AtkDocument* docum
     g_return_val_if_fail(ATK_IS_DOCUMENT(document), 0);
     returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(document), 0);
 
-    AtkAttributeSet* attributeSet = 0;
+    AtkAttributeSet* attributeSet = nullptr;
     const gchar* attributes[] = { "DocType", "Encoding", "URI" };
 
     for (unsigned i = 0; i < G_N_ELEMENTS(attributes); i++) {
index 6d32491df7a140c94d8add0db8dc86e64abe24f8..4b97de94538cb000310fdf34b65114a814daeb95 100644 (file)
@@ -86,7 +86,7 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
     RenderObject* renderer = object->renderer();
     RenderStyle* style = &renderer->style();
 
-    AtkAttributeSet* result = 0;
+    AtkAttributeSet* result = nullptr;
     GUniquePtr<gchar> buffer(g_strdup_printf("%i", style->fontSize()));
     result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_SIZE), buffer.get());
 
@@ -231,7 +231,7 @@ static AtkAttributeSet* attributeSetDifference(AtkAttributeSet* attributeSet1, A
 
     AtkAttributeSet* currentSet = attributeSet1;
     AtkAttributeSet* found;
-    AtkAttributeSet* toDelete = 0;
+    AtkAttributeSet* toDelete = nullptr;
 
     while (currentSet) {
         found = g_slist_find_custom(attributeSet2, currentSet->data, (GCompareFunc)compareAttribute);
index d0312dcd1476e3ac0d275cdea03f047dfd585baf..e2938a597a8eed90e4b7a5de2cc4e2951e24cbfd 100644 (file)
@@ -61,7 +61,7 @@ class VisibleSelection;
 
 AtkAttributeSet* addToAtkAttributeSet(AtkAttributeSet*, const char* name, const char* value);
 
-void contentsRelativeToAtkCoordinateType(WebCore::AccessibilityObject*, AtkCoordType, WebCore::IntRect, gint* x, gint* y, gint* width = 0, gint* height = 0);
+void contentsRelativeToAtkCoordinateType(WebCore::AccessibilityObject*, AtkCoordType, WebCore::IntRect, gint* x, gint* y, gint* width = nullptr, gint* height = nullptr);
 
 String accessibilityTitle(WebCore::AccessibilityObject*);
 
index b472935610f5a912aa3b89baa259c130ceb8bc78..a383bd37ddfdbccc4ed99244bf2ea32e479e0cc5 100644 (file)
@@ -259,7 +259,7 @@ static void setAtkRelationSetFromCoreObject(AccessibilityObject* coreObject, Atk
     }
 }
 
-static gpointer webkitAccessibleParentClass = 0;
+static gpointer webkitAccessibleParentClass = nullptr;
 
 static bool isRootObject(AccessibilityObject* coreObject)
 {
@@ -340,7 +340,7 @@ static AtkObject* webkitAccessibleRefChild(AtkObject* object, gint index)
         return 0;
 
     AccessibilityObject* coreObject = core(object);
-    AccessibilityObject* coreChild = 0;
+    AccessibilityObject* coreChild = nullptr;
 
     const AccessibilityObject::AccessibilityChildrenVector& children = coreObject->children();
     if (static_cast<size_t>(index) >= children.size())
@@ -392,7 +392,7 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
     g_return_val_if_fail(WEBKIT_IS_ACCESSIBLE(object), 0);
     returnValIfWebKitAccessibleIsInvalid(WEBKIT_ACCESSIBLE(object), 0);
 
-    AtkAttributeSet* attributeSet = 0;
+    AtkAttributeSet* attributeSet = nullptr;
 #if PLATFORM(GTK)
     attributeSet = addToAtkAttributeSet(attributeSet, "toolkit", "WebKitGtk");
 #elif PLATFORM(EFL)
@@ -919,7 +919,7 @@ static const gchar* webkitAccessibleGetObjectLocale(AtkObject* object)
             return cacheAndReturnAtkProperty(object, AtkCachedDocumentLocale, language);
 
     } else if (ATK_IS_TEXT(object)) {
-        const gchar* locale = 0;
+        const gchar* locale = nullptr;
 
         AtkAttributeSet* textAttributes = atk_text_get_default_attributes(ATK_TEXT(object));
         for (AtkAttributeSet* attributes = textAttributes; attributes; attributes = attributes->next) {
@@ -1088,7 +1088,7 @@ static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)
         interfaceMask |= 1 << WAISelection;
 
     // Get renderer if available.
-    RenderObject* renderer = 0;
+    RenderObject* renderer = nullptr;
     if (coreObject->isAccessibilityRenderObject())
         renderer = coreObject->renderer();
 
@@ -1269,7 +1269,7 @@ AccessibilityObject* objectFocusedAndCaretOffsetUnignored(AccessibilityObject* r
     if (referenceObject->isDescendantOfObject(firstUnignoredParent))
         referenceObject = firstUnignoredParent;
 
-    Node* startNode = 0;
+    Node* startNode = nullptr;
     if (firstUnignoredParent != referenceObject || firstUnignoredParent->isTextControl()) {
         // We need to use the first child's node of the reference
         // object as the start point to calculate the caret offset
@@ -1311,7 +1311,7 @@ AccessibilityObject* objectFocusedAndCaretOffsetUnignored(AccessibilityObject* r
 const char* cacheAndReturnAtkProperty(AtkObject* object, AtkCachedProperty property, String value)
 {
     WebKitAccessiblePrivate* priv = WEBKIT_ACCESSIBLE(object)->priv;
-    CString* propertyPtr = 0;
+    CString* propertyPtr = nullptr;
 
     switch (property) {
     case AtkCachedAccessibleName: