Title: [89424] trunk/Source/WebCore
- Revision
- 89424
- Author
- [email protected]
- Date
- 2011-06-22 05:31:49 -0700 (Wed, 22 Jun 2011)
Log Message
2011-06-22 Darin Adler <[email protected]>
Reviewed by Sam Weinig.
A couple setTextAsOfLastFormControlChangeEvent tweaks
https://bugs.webkit.org/show_bug.cgi?id=63108
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedIntoDocument): Use
emptyString() instead of String("") because it is better style and faster.
* html/HTMLFormControlElement.h: Make setTextAsOfLastFormControlChangeEvent
non-virtual so it actually gets inlined, since there are no overrides of it.
Also make it take a const String& to avoid unnecessary reference count churn.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (89423 => 89424)
--- trunk/Source/WebCore/ChangeLog 2011-06-22 11:47:54 UTC (rev 89423)
+++ trunk/Source/WebCore/ChangeLog 2011-06-22 12:31:49 UTC (rev 89424)
@@ -1,3 +1,18 @@
+2011-06-22 Darin Adler <[email protected]>
+
+ Reviewed by Sam Weinig.
+
+ A couple setTextAsOfLastFormControlChangeEvent tweaks
+ https://bugs.webkit.org/show_bug.cgi?id=63108
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLTextFormControlElement::insertedIntoDocument): Use
+ emptyString() instead of String("") because it is better style and faster.
+
+ * html/HTMLFormControlElement.h: Make setTextAsOfLastFormControlChangeEvent
+ non-virtual so it actually gets inlined, since there are no overrides of it.
+ Also make it take a const String& to avoid unnecessary reference count churn.
+
2011-06-22 Sheriff Bot <[email protected]>
Unreviewed, rolling out r89402.
Modified: trunk/Source/WebCore/html/HTMLFormControlElement.cpp (89423 => 89424)
--- trunk/Source/WebCore/html/HTMLFormControlElement.cpp 2011-06-22 11:47:54 UTC (rev 89423)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.cpp 2011-06-22 12:31:49 UTC (rev 89424)
@@ -575,7 +575,7 @@
{
HTMLFormControlElement::insertedIntoDocument();
String initialValue = value();
- setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? String("") : initialValue);
+ setTextAsOfLastFormControlChangeEvent(initialValue.isNull() ? emptyString() : initialValue);
}
void HTMLTextFormControlElement::dispatchFocusEvent()
Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (89423 => 89424)
--- trunk/Source/WebCore/html/HTMLFormControlElement.h 2011-06-22 11:47:54 UTC (rev 89423)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h 2011-06-22 12:31:49 UTC (rev 89424)
@@ -219,8 +219,9 @@
void updatePlaceholderVisibility(bool);
virtual void parseMappedAttribute(Attribute*);
- virtual void setTextAsOfLastFormControlChangeEvent(String text) { m_textAsOfLastFormControlChangeEvent = text; }
+ void setTextAsOfLastFormControlChangeEvent(const String& text) { m_textAsOfLastFormControlChangeEvent = text; }
+
private:
virtual void dispatchFocusEvent();
virtual void dispatchBlurEvent();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes