Changeset 242311 in webkit
- Timestamp:
- Mar 2, 2019 9:33:20 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r242309 r242311 1 2019-03-02 Darin Adler <darin@apple.com> 2 3 Improve some comments 4 https://bugs.webkit.org/show_bug.cgi?id=195243 5 6 Reviewed by Daniel Bates. 7 8 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: 9 (-[WebAccessibilityObjectWrapper _addAccessibilityObject:toTextMarkerArray:]): 10 Fix a typo in a comment. 11 12 * dom/RadioButtonGroups.cpp: Fix a typo in a comment. 13 (WebCore::RadioButtonGroups::checkedButtonForGroup const): Use nullptr instead of 0. 14 15 * html/HTMLInputElement.cpp: 16 (WebCore::HTMLInputElement::~HTMLInputElement): Improved a comment, but sadly made 17 it a bit longer. Use nullptr instead of 0. 18 (WebCore::HTMLInputElement::didMoveToNewDocument): Added a comment. 19 1 20 2019-03-01 Wenson Hsieh <wenson_hsieh@apple.com> 2 21 -
trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
r242051 r242311 2077 2077 return YES; 2078 2078 2079 // Explicit y set that this is now an element (in case other logic tries to override).2079 // Explicitly set that this is now an element (in case other logic tries to override). 2080 2080 [wrapper setValue:@YES forKey:@"isAccessibilityElement"]; 2081 2081 [array addObject:wrapper]; -
trunk/Source/WebCore/dom/RadioButtonGroups.cpp
r240237 r242311 187 187 // ---------------------------------------------------------------- 188 188 189 // Explicity define empty constructor and destructor in order to prevent the 190 // compiler from generating them as inlines. So we don't need to to define 191 // RadioButtonGroup in the header. 189 // Explicitly define default constructor and destructor here outside the header 190 // so we can compile the header without including the definition of RadioButtonGroup. 192 191 RadioButtonGroups::RadioButtonGroups() = default; 193 194 192 RadioButtonGroups::~RadioButtonGroups() = default; 195 193 … … 255 253 { 256 254 if (!m_nameToGroupMap) 257 return 0;255 return nullptr; 258 256 m_nameToGroupMap->checkConsistency(); 259 257 RadioButtonGroup* group = m_nameToGroupMap->get(name.impl()); -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r240926 r242311 166 166 // Need to remove form association while this is still an HTMLInputElement 167 167 // so that virtual functions are called correctly. 168 setForm(0); 169 // setForm(0) may register this to a document-level radio button group. 170 // We should unregister it to avoid accessing a deleted object. 168 setForm(nullptr); 169 170 // This is needed for a radio button that was not in a form, and also for 171 // a radio button that was in a form. The call to setForm(nullptr) above 172 // actually adds the button to the document groups in the latter case. 173 // That is inelegant, but harmless since we remove it here. 171 174 if (isRadioButton()) 172 175 document().formController().radioButtonGroups().removeButton(*this); 176 173 177 #if ENABLE(TOUCH_EVENTS) 174 178 if (m_hasTouchEventHandler) … … 1564 1568 newDocument.registerForDocumentSuspensionCallbacks(*this); 1565 1569 } 1570 1571 // We call this even for radio buttons in forms; it's harmless because the 1572 // removeButton function is written to be safe for buttons not in any group. 1566 1573 if (isRadioButton()) 1567 1574 oldDocument.formController().radioButtonGroups().removeButton(*this); 1575 1568 1576 #if ENABLE(TOUCH_EVENTS) 1569 1577 if (m_hasTouchEventHandler) { … … 1893 1901 return buttons->groupMembers(*this); 1894 1902 } 1895 1903 1896 1904 HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup() const 1897 1905 { 1898 1906 if (RadioButtonGroups* buttons = radioButtonGroups()) 1899 1907 return buttons->checkedButtonForGroup(name()); 1900 return 0;1908 return nullptr; 1901 1909 } 1902 1910
Note: See TracChangeset
for help on using the changeset viewer.