Changeset 205104 in webkit
- Timestamp:
- Aug 28, 2016 9:54:43 AM (8 years ago)
- Location:
- trunk/Source
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r205103 r205104 1 2016-08-28 Andreas Kling <akling@apple.com> 2 3 Clean up some .text attribute setters that don't throw. 4 <https://webkit.org/b/161292> 5 6 Reviewed by Darin Adler. 7 8 Remove [SetterRaisesException] for three .text attributes 9 and replace them with ASSERT_NO_EXCEPTION. 10 11 These setters behave like .textContent, which can't throw as 12 it's always okay to replace an Element's children with a Text. 13 14 * html/HTMLAnchorElement.cpp: 15 (WebCore::HTMLAnchorElement::setText): 16 * html/HTMLAnchorElement.h: 17 * html/HTMLAnchorElement.idl: 18 * html/HTMLOptionElement.cpp: 19 (WebCore::HTMLOptionElement::setText): 20 * html/HTMLOptionElement.h: 21 * html/HTMLOptionElement.idl: 22 * html/HTMLTitleElement.cpp: 23 (WebCore::HTMLTitleElement::setText): 24 * html/HTMLTitleElement.h: 25 * html/HTMLTitleElement.idl: 26 1 27 2016-08-24 Dave Hyatt <hyatt@apple.com> 2 28 -
trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.cpp
r204894 r205104 143 143 } 144 144 145 void webkit_dom_document_set_title(WebKitDOMDocument* self, const gchar* title)146 {147 webkit_dom_document_set_title_with_error(self, title, nullptr);148 }149 150 void webkit_dom_html_title_element_set_text(WebKitDOMHTMLTitleElement* self, const gchar* text)151 {152 webkit_dom_html_title_element_set_text_with_error(self, text, nullptr);153 }154 155 145 gchar* webkit_dom_document_get_default_charset(WebKitDOMDocument* self) 156 146 { -
trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.h
r204894 r205104 172 172 webkit_dom_node_clone_node(WebKitDOMNode* self, gboolean deep, GError** error); 173 173 174 /**175 * webkit_dom_document_set_title:176 * @self: A #WebKitDOMDocument177 * @title: A #gchar178 *179 * Deprecated: 2.14: Use webkit_dom_document_set_title_with_error() instead.180 */181 WEBKIT_DEPRECATED_FOR(webkit_dom_document_set_title_with_error) void182 webkit_dom_document_set_title(WebKitDOMDocument* self, const gchar* title);183 184 /**185 * webkit_dom_html_title_element_set_text:186 * @self: A #WebKitDOMHTMLTitleElement187 * @text: A #gchar188 *189 * Deprecated: 2.14: Use webkit_dom_html_title_element_set_text_with_error() instead.190 */191 WEBKIT_DEPRECATED_FOR(webkit_dom_html_title_element_set_text_with_error) void192 webkit_dom_html_title_element_set_text(WebKitDOMHTMLTitleElement* self, const gchar* text);193 174 194 175 /** -
trunk/Source/WebCore/bindings/gobject/WebKitDOMDeprecated.symbols
r204894 r205104 22 22 void webkit_dom_html_base_font_element_set_size(WebKitDOMHTMLBaseFontElement*, glong) 23 23 WebKitDOMNode* webkit_dom_node_clone_node(WebKitDOMNode*, gboolean) 24 void webkit_dom_document_set_title(WebKitDOMDocument*, const gchar*)25 void webkit_dom_html_title_element_set_text(WebKitDOMHTMLTitleElement*, const gchar*)26 24 gchar* webkit_dom_document_get_default_charset(WebKitDOMDocument*) 27 25 WebKitDOMText* webkit_dom_text_replace_whole_text(WebKitDOMText*, const gchar*, GError**) -
trunk/Source/WebCore/bindings/gobject/webkitdom.symbols
r204894 r205104 38 38 gchar* webkit_dom_document_get_title(WebKitDOMDocument*) 39 39 void webkit_dom_document_set_title(WebKitDOMDocument*, const gchar*) 40 void webkit_dom_document_set_title_with_error(WebKitDOMDocument*, const gchar*, GError**)@2.1441 40 gchar* webkit_dom_document_get_charset(WebKitDOMDocument*) 42 41 void webkit_dom_document_set_charset(WebKitDOMDocument*, const gchar*) … … 965 964 gchar* webkit_dom_html_title_element_get_text(WebKitDOMHTMLTitleElement*) 966 965 void webkit_dom_html_title_element_set_text(WebKitDOMHTMLTitleElement*, const gchar*) 967 void webkit_dom_html_title_element_set_text_with_error(WebKitDOMHTMLTitleElement*, const gchar*, GError**)@2.14968 966 GType webkit_dom_html_u_list_element_get_type(void) 969 967 gchar* webkit_dom_html_u_list_element_get_type_attr(WebKitDOMHTMLUListElement*) -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm
r204681 r205104 1058 1058 my $functionName = shift; 1059 1059 1060 return $functionName eq "webkit_dom_document_set_title" 1061 || $functionName eq "webkit_dom_html_title_element_set_text" 1062 || $functionName eq "webkit_dom_node_clone_node"; 1060 return $functionName eq "webkit_dom_node_clone_node"; 1063 1061 } 1064 1062 -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r204871 r205104 333 333 } 334 334 335 void HTMLAnchorElement::setText(const String& text , ExceptionCode& ec)336 { 337 setTextContent(text, ec);335 void HTMLAnchorElement::setText(const String& text) 336 { 337 setTextContent(text, ASSERT_NO_EXCEPTION); 338 338 } 339 339 -
trunk/Source/WebCore/html/HTMLAnchorElement.h
r204871 r205104 71 71 72 72 WEBCORE_EXPORT String text(); 73 void setText(const String& , ExceptionCode&);73 void setText(const String&); 74 74 75 75 bool isLiveLink() const; -
trunk/Source/WebCore/html/HTMLAnchorElement.idl
r204871 r205104 35 35 [Reflect] attribute DOMString type; 36 36 37 [SetterRaisesException]attribute DOMString text;37 attribute DOMString text; 38 38 39 39 [PutForwards=value] readonly attribute DOMTokenList relList; -
trunk/Source/WebCore/html/HTMLOptionElement.cpp
r204186 r205104 111 111 } 112 112 113 void HTMLOptionElement::setText(const String &text , ExceptionCode& ec)113 void HTMLOptionElement::setText(const String &text) 114 114 { 115 115 Ref<HTMLOptionElement> protectedThis(*this); … … 128 128 else { 129 129 removeChildren(); 130 appendChild(Text::create(document(), text), ec);130 appendChild(Text::create(document(), text), ASSERT_NO_EXCEPTION); 131 131 } 132 132 -
trunk/Source/WebCore/html/HTMLOptionElement.h
r204717 r205104 40 40 41 41 WEBCORE_EXPORT String text() const; 42 void setText(const String& , ExceptionCode&);42 void setText(const String&); 43 43 44 44 WEBCORE_EXPORT int index() const; -
trunk/Source/WebCore/html/HTMLOptionElement.idl
r204687 r205104 32 32 33 33 #if !(defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT) 34 [SetterRaisesException]attribute DOMString text;34 attribute DOMString text; 35 35 #else 36 36 readonly attribute DOMString text; -
trunk/Source/WebCore/html/HTMLTitleElement.cpp
r203047 r205104 93 93 } 94 94 95 void HTMLTitleElement::setText(const String& value , ExceptionCode& ec)95 void HTMLTitleElement::setText(const String& value) 96 96 { 97 setTextContent(value, ec);97 setTextContent(value, ASSERT_NO_EXCEPTION); 98 98 } 99 99 -
trunk/Source/WebCore/html/HTMLTitleElement.h
r204717 r205104 33 33 34 34 WEBCORE_EXPORT String text() const; 35 WEBCORE_EXPORT void setText(const String& , ExceptionCode&);35 WEBCORE_EXPORT void setText(const String&); 36 36 37 37 const StringWithDirection& textWithDirection() const { return m_title; } -
trunk/Source/WebCore/html/HTMLTitleElement.idl
r203047 r205104 19 19 20 20 interface HTMLTitleElement : HTMLElement { 21 [SetterRaisesException]attribute DOMString text;21 attribute DOMString text; 22 22 }; 23 23 -
trunk/Source/WebKit/mac/ChangeLog
r205065 r205104 1 2016-08-28 Andreas Kling <akling@apple.com> 2 3 Clean up some .text attribute setters that don't throw. 4 <https://webkit.org/b/161292> 5 6 Reviewed by Darin Adler. 7 8 * DOM/DOMHTMLTitleElement.mm: 9 (-[DOMHTMLTitleElement setText:]): 10 1 11 2016-08-26 Sam Weinig <sam@webkit.org> 2 12 -
trunk/Source/WebKit/mac/DOM/DOMHTMLTitleElement.mm
r204717 r205104 48 48 { 49 49 WebCore::JSMainThreadNullState state; 50 WebCore::ExceptionCode ec = 0; 51 IMPL->setText(newText, ec); 52 raiseOnDOMError(ec); 50 IMPL->setText(newText); 53 51 } 54 52
Note: See TracChangeset
for help on using the changeset viewer.