Changeset 83746 in webkit
- Timestamp:
- Apr 13, 2011 9:27:23 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r83745 r83746 1 2011-04-13 Mario Sanchez Prada <msanchez@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Missing nullchecks in GTK's a11y wrapper 6 https://bugs.webkit.org/show_bug.cgi?id=58429 7 8 Add missing nullchecks for coreObject->document(). 9 10 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 11 (atkParentOfRootObject): Add missing nullcheck. 12 (getPangoLayoutForAtk): Ditto. 13 (webkit_accessible_text_get_caret_offset): Ditto. 14 (textExtents): Ditto. 15 (webkit_accessible_editable_text_insert_text): Ditto. 16 (webkit_accessible_editable_text_delete_text): Ditto. 17 1 18 2011-04-13 Thierry Reding <thierry.reding@avionic-design.de> 2 19 -
trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r83493 r83746 269 269 // hierarchy all the way to the application. (Bug 30489) 270 270 if (!coreParent && isRootObject(coreObject)) { 271 HostWindow* hostWindow = coreObject->document()->view()->hostWindow(); 271 Document* document = coreObject->document(); 272 if (!document) 273 return 0; 274 275 HostWindow* hostWindow = document->view()->hostWindow(); 272 276 if (hostWindow) { 273 277 PlatformPageClient scrollView = hostWindow->platformPageClient(); … … 1177 1181 AccessibilityObject* coreObject = core(textObject); 1178 1182 1179 HostWindow* hostWindow = coreObject->document()->view()->hostWindow(); 1183 Document* document = coreObject->document(); 1184 if (!document) 1185 return 0; 1186 1187 HostWindow* hostWindow = document->view()->hostWindow(); 1180 1188 if (!hostWindow) 1181 1189 return 0; … … 1219 1227 return 0; 1220 1228 1229 Document* document = coreObject->document(); 1230 if (!document) 1231 return 0; 1232 1221 1233 Node* focusedNode = coreObject->selection().end().deprecatedNode(); 1222 1234 if (!focusedNode) … … 1224 1236 1225 1237 RenderObject* focusedRenderer = focusedNode->renderer(); 1226 AccessibilityObject* focusedObject = coreObject->document()->axObjectCache()->getOrCreate(focusedRenderer);1238 AccessibilityObject* focusedObject = document->axObjectCache()->getOrCreate(focusedRenderer); 1227 1239 1228 1240 int offset; … … 1542 1554 switch(coords) { 1543 1555 case ATK_XY_SCREEN: 1544 extents = coreObject->document()->view()->contentsToScreen(extents); 1556 if (Document* document = coreObject->document()) 1557 extents = document->view()->contentsToScreen(extents); 1545 1558 break; 1546 1559 case ATK_XY_WINDOW: … … 1814 1827 //coreObject->setSelectedText(String::fromUTF8(string)); 1815 1828 1816 if (!coreObject->document() || !coreObject->document()->frame()) 1829 Document* document = coreObject->document(); 1830 if (!document || !document->frame()) 1817 1831 return; 1832 1818 1833 coreObject->setSelectedVisiblePositionRange(coreObject->visiblePositionRangeForRange(PlainTextRange(*position, 0))); 1819 1834 coreObject->setFocused(true); 1820 1835 // FIXME: We should set position to the actual inserted text length, which may be less than that requested. 1821 if ( coreObject->document()->frame()->editor()->insertTextWithoutSendingTextEvent(String::fromUTF8(string), false, 0))1836 if (document->frame()->editor()->insertTextWithoutSendingTextEvent(String::fromUTF8(string), false, 0)) 1822 1837 *position += length; 1823 1838 } … … 1840 1855 //coreObject->setSelectedText(String()); 1841 1856 1842 if (!coreObject->document() || !coreObject->document()->frame()) 1857 Document* document = coreObject->document(); 1858 if (!document || !document->frame()) 1843 1859 return; 1860 1844 1861 coreObject->setSelectedVisiblePositionRange(coreObject->visiblePositionRangeForRange(PlainTextRange(start_pos, end_pos - start_pos))); 1845 1862 coreObject->setFocused(true); 1846 coreObject->document()->frame()->editor()->performDelete();1863 document->frame()->editor()->performDelete(); 1847 1864 } 1848 1865
Note: See TracChangeset
for help on using the changeset viewer.