Bug 1365402 - part 2: Remove trailing spaces in dom/html/HTMLTextAreaElement.cpp, r=baku draft
authorbtian <btian@mozilla.com>
Tue, 13 Jun 2017 10:19:28 +0800
changeset 592983 14696ba3133ad68e39f41b6d4ba7defef8d4db95
parent 592982 a19bf3506e88295920488e16e5b9a72e81ff9690
child 632988 c41a637221059152c9a1a7680794ba06bd1e7244
push id63564
push userbmo:btian@mozilla.com
push dateTue, 13 Jun 2017 02:19:47 +0000
reviewersbaku
bugs1365402
milestone56.0a1
Bug 1365402 - part 2: Remove trailing spaces in dom/html/HTMLTextAreaElement.cpp, r=baku MozReview-Commit-ID: 1au3YwRK3ZS
dom/html/HTMLTextAreaElement.cpp
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -220,32 +220,32 @@ NS_IMPL_BOOL_ATTR(HTMLTextAreaElement, D
 NS_IMPL_NON_NEGATIVE_INT_ATTR(HTMLTextAreaElement, MaxLength, maxlength)
 NS_IMPL_NON_NEGATIVE_INT_ATTR(HTMLTextAreaElement, MinLength, minlength)
 NS_IMPL_STRING_ATTR(HTMLTextAreaElement, Name, name)
 NS_IMPL_BOOL_ATTR(HTMLTextAreaElement, ReadOnly, readonly)
 NS_IMPL_BOOL_ATTR(HTMLTextAreaElement, Required, required)
 NS_IMPL_UINT_ATTR_NON_ZERO_DEFAULT_VALUE(HTMLTextAreaElement, Rows, rows, DEFAULT_ROWS_TEXTAREA)
 NS_IMPL_STRING_ATTR(HTMLTextAreaElement, Wrap, wrap)
 NS_IMPL_STRING_ATTR(HTMLTextAreaElement, Placeholder, placeholder)
-  
+
 int32_t
 HTMLTextAreaElement::TabIndexDefault()
 {
   return 0;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 HTMLTextAreaElement::GetType(nsAString& aType)
 {
   aType.AssignLiteral("textarea");
 
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 HTMLTextAreaElement::GetValue(nsAString& aValue)
 {
   nsAutoString value;
   GetValueInternal(value, true);
 
   // Normalize CRLF and CR to LF
   nsContentUtils::PlatformToDOMLineBreaks(value);
 
@@ -391,17 +391,17 @@ HTMLTextAreaElement::SetValueInternal(co
 
   if (!mState.SetValue(aValue, aFlags)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 HTMLTextAreaElement::SetValue(const nsAString& aValue)
 {
   // If the value has been set by a script, we basically want to keep the
   // current change event state. If the element is ready to fire a change
   // event, we should keep it that way. Otherwise, we should make sure the
   // element will not fire any event because of the script interaction.
   //
   // NOTE: this is currently quite expensive work (too much string
@@ -418,17 +418,17 @@ HTMLTextAreaElement::SetValue(const nsAS
 
   if (mFocusedValue.Equals(currentValue)) {
     GetValueInternal(mFocusedValue, true);
   }
 
   return NS_OK;
 }
 
-NS_IMETHODIMP 
+NS_IMETHODIMP
 HTMLTextAreaElement::SetUserInput(const nsAString& aValue)
 {
   return SetValueInternal(aValue,
     nsTextEditorState::eSetValue_BySetUserInput |
     nsTextEditorState::eSetValue_Notify|
     nsTextEditorState::eSetValue_MoveCursorToEndIfValueChanged);
 }
 
@@ -451,17 +451,17 @@ HTMLTextAreaElement::SetValueChanged(boo
 
 NS_IMETHODIMP
 HTMLTextAreaElement::GetDefaultValue(nsAString& aDefaultValue)
 {
   if (!nsContentUtils::GetNodeTextContent(this, false, aDefaultValue, fallible)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
   return NS_OK;
-}  
+}
 
 NS_IMETHODIMP
 HTMLTextAreaElement::SetDefaultValue(const nsAString& aDefaultValue)
 {
   ErrorResult error;
   SetDefaultValue(aDefaultValue, error);
   return error.StealNSResult();
 }
@@ -580,17 +580,17 @@ HTMLTextAreaElement::GetEventTargetParen
   if (aVisitor.mEvent->mMessage == eFormSelect) {
     if (mHandlingSelect) {
       return NS_OK;
     }
     mHandlingSelect = true;
   }
 
   // If noContentDispatch is true we will not allow content to handle
-  // this event.  But to allow middle mouse button paste to work we must allow 
+  // this event.  But to allow middle mouse button paste to work we must allow
   // middle clicks to go to text fields anyway.
   if (aVisitor.mEvent->mFlags.mNoContentDispatch) {
     aVisitor.mItemFlags |= NS_NO_CONTENT_DISPATCH;
   }
   if (aVisitor.mEvent->mMessage == eMouseClick &&
       aVisitor.mEvent->AsMouseEvent()->button ==
         WidgetMouseEvent::eMiddleButton) {
     aVisitor.mEvent->mFlags.mNoContentDispatch = false;
@@ -937,17 +937,17 @@ HTMLTextAreaElement::SaveState()
   return rv;
 }
 
 bool
 HTMLTextAreaElement::RestoreState(nsPresState* aState)
 {
   nsCOMPtr<nsISupportsString> state
     (do_QueryInterface(aState->GetStateProperty()));
-  
+
   if (state) {
     nsAutoString data;
     state->GetData(data);
     nsresult rv = SetValue(data);
     NS_ENSURE_SUCCESS(rv, false);
   }
 
   if (aState->IsDisabledSet() && !aState->GetDisabled()) {