From 28b5c3416c32f9858ecd254afddac4f49bda4cb5 Mon Sep 17 00:00:00 2001 From: Timothy Guan-tin Chien Date: Fri, 4 Jan 2019 21:53:51 +0000 Subject: [PATCH] Bug 1514040 - Dispatch events to hidden datetimebox UA Widget r=smaug The XBL binding implementation relied on nsDateTimeControlFrame to call into its nsIDateTimeInputArea implementation. This is correct because the XBL binding is only constructed when the element has a frame. If the value is set while the element is hidden, the XBL binding will pick up the correct value during construction. That is not the case for UA Widget. As it is constructed when the DOM is attached, relying on nsDateTimeControlFrame to send an event when attributes change means the event won't be sent to the already constructed UA Widget. This patch fixes that by moving the event dispatching calls originating from HTMLInputElement out of nsDateTimeControlFrame, so they will behave correctly in the absence of the frame. I've also moved the gut of nsDateTimeControlFrame::HasBadInput() to DateTimeInputTypeBase::HasBadInput(). Content script should be allowed to validate the input without the frame. Sadly this means the XBL implementation and the UA Widget implementation have further diverged. The complexity should go away when we could finally remove the XBL implementation. nsDateTimeControlFrame still dispatches a few events to UA Widget, in AttributeChanged() and SyncDisabledState(), as they are originated from the layout. The name of the events in AttributeChanged() are incorrect though -- I am correcting that in this patch too. Differential Revision: https://phabricator.services.mozilla.com/D15601 --HG-- extra : moz-landing-system : lando --- dom/html/HTMLInputElement.cpp | 75 ++++++-- dom/html/HTMLInputElement.h | 10 +- dom/html/input/DateTimeInputTypes.cpp | 54 +++++- dom/html/test/forms/mochitest.ini | 1 + .../forms/test_input_datetime_hidden.html | 32 ++++ .../forms/test_input_datetime_tabindex.html | 15 ++ layout/forms/nsDateTimeControlFrame.cpp | 177 +++++------------- layout/forms/nsDateTimeControlFrame.h | 3 - toolkit/content/widgets/datetimebox.js | 2 +- 9 files changed, 210 insertions(+), 159 deletions(-) create mode 100644 dom/html/test/forms/test_input_datetime_hidden.html diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index 053860bdda78..57da3964924d 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -2057,12 +2057,26 @@ void HTMLInputElement::GetDateTimeInputBoxValue(DateTimeValue& aValue) { aValue = *mDateTimeInputBoxValue; } +Element* HTMLInputElement::GetDateTimeBoxElementInUAWidget() { + if (GetShadowRoot()) { + // The datetimebox
is the only child of the UA Widget Shadow Root + // if it is present. + MOZ_ASSERT(GetShadowRoot()->IsUAWidget()); + MOZ_ASSERT(1 >= GetShadowRoot()->GetChildCount()); + if (nsIContent* inputAreaContent = GetShadowRoot()->GetFirstChild()) { + return inputAreaContent->AsElement(); + } + } + + return nullptr; +} + Element* HTMLInputElement::GetDateTimeBoxElement() { nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); if (frame && frame->GetInputAreaContent()) { return frame->GetInputAreaContent()->AsElement(); } - return nullptr; + return GetDateTimeBoxElementInUAWidget(); } void HTMLInputElement::OpenDateTimePicker(const DateTimeValue& aInitialValue) { @@ -2620,9 +2634,17 @@ nsresult HTMLInputElement::SetValueInternal(const nsAString& aValue, mType == NS_FORM_INPUT_DATE) && !IsExperimentalMobileType(mType) && !(aFlags & nsTextEditorState::eSetValue_BySetUserInput)) { - nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); - if (frame) { - frame->OnValueChanged(); + if (Element* dateTimeBoxElement = GetDateTimeBoxElementInUAWidget()) { + AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( + dateTimeBoxElement, + NS_LITERAL_STRING("MozDateTimeValueChanged"), CanBubble::eNo, + ChromeOnlyDispatch::eNo); + dispatcher->RunDOMEventWhenSafe(); + } else { + nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); + if (frame) { + frame->OnValueChanged(); + } } } if (mDoneCreating) { @@ -2909,10 +2931,18 @@ void HTMLInputElement::Blur(ErrorResult& aError) { if ((mType == NS_FORM_INPUT_TIME || mType == NS_FORM_INPUT_DATE) && !IsExperimentalMobileType(mType)) { - nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); - if (frame) { - frame->HandleBlurEvent(); + if (Element* dateTimeBoxElement = GetDateTimeBoxElementInUAWidget()) { + AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( + dateTimeBoxElement, NS_LITERAL_STRING("MozBlurInnerTextBox"), + CanBubble::eNo, ChromeOnlyDispatch::eNo); + dispatcher->RunDOMEventWhenSafe(); return; + } else { + nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); + if (frame) { + frame->HandleBlurEvent(); + return; + } } } @@ -2935,10 +2965,18 @@ void HTMLInputElement::Focus(ErrorResult& aError) { if ((mType == NS_FORM_INPUT_TIME || mType == NS_FORM_INPUT_DATE) && !IsExperimentalMobileType(mType)) { - nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); - if (frame) { - frame->HandleFocusEvent(); + if (Element* dateTimeBoxElement = GetDateTimeBoxElementInUAWidget()) { + AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( + dateTimeBoxElement, NS_LITERAL_STRING("MozFocusInnerTextBox"), + CanBubble::eNo, ChromeOnlyDispatch::eNo); + dispatcher->RunDOMEventWhenSafe(); return; + } else { + nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); + if (frame) { + frame->HandleFocusEvent(); + return; + } } } @@ -3245,11 +3283,18 @@ void HTMLInputElement::GetEventTargetParent(EventChainPreVisitor& aVisitor) { if ((mType == NS_FORM_INPUT_TIME || mType == NS_FORM_INPUT_DATE) && !IsExperimentalMobileType(mType) && aVisitor.mEvent->mMessage == eFocus && aVisitor.mEvent->mOriginalTarget == this) { - // If original target is this and not the anonymous text control, we should - // pass the focus to the anonymous text control. - nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); - if (frame) { - frame->HandleFocusEvent(); + // If original target is this and not the inner text control, we should + // pass the focus to the inner text control. + if (Element* dateTimeBoxElement = GetDateTimeBoxElementInUAWidget()) { + AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( + dateTimeBoxElement, NS_LITERAL_STRING("MozFocusInnerTextBox"), + CanBubble::eNo, ChromeOnlyDispatch::eNo); + dispatcher->RunDOMEventWhenSafe(); + } else { + nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); + if (frame) { + frame->HandleFocusEvent(); + } } } diff --git a/dom/html/HTMLInputElement.h b/dom/html/HTMLInputElement.h index 52a02856eada..3a12df77e810 100644 --- a/dom/html/HTMLInputElement.h +++ b/dom/html/HTMLInputElement.h @@ -747,9 +747,17 @@ class HTMLInputElement final : public nsGenericHTMLFormElementWithState, */ void GetDateTimeInputBoxValue(DateTimeValue& aValue); + /* + * This locates the inner datetimebox UA Widget element and only the + * UA Widget + * element. This should fold into GetDateTimeBoxElement() when the XBL binding is removed. + */ + Element* GetDateTimeBoxElementInUAWidget(); + /* * This allows chrome JavaScript to dispatch event to the inner datetimebox - * anonymous element or access nsIDateTimeInputArea implmentation. + * anonymous or UA Widget element and access nsIDateTimeInputArea + * implementation. */ Element* GetDateTimeBoxElement(); diff --git a/dom/html/input/DateTimeInputTypes.cpp b/dom/html/input/DateTimeInputTypes.cpp index fb5d95aaae9b..b60411d207f4 100644 --- a/dom/html/input/DateTimeInputTypes.cpp +++ b/dom/html/input/DateTimeInputTypes.cpp @@ -7,8 +7,10 @@ #include "DateTimeInputTypes.h" #include "js/Date.h" +#include "mozilla/AsyncEventDispatcher.h" #include "mozilla/dom/HTMLInputElement.h" #include "nsDateTimeControlFrame.h" +#include "nsDOMTokenList.h" const double DateTimeInputTypeBase::kMinimumYear = 1; const double DateTimeInputTypeBase::kMaximumYear = 275760; @@ -16,6 +18,9 @@ const double DateTimeInputTypeBase::kMaximumMonthInMaximumYear = 9; const double DateTimeInputTypeBase::kMaximumWeekInMaximumYear = 37; const double DateTimeInputTypeBase::kMsPerDay = 24 * 60 * 60 * 1000; +using namespace mozilla; +using namespace mozilla::dom; + /* static */ bool DateTimeInputTypeBase::IsInputDateTimeEnabled() { static bool sDateTimeEnabled = false; static bool sDateTimePrefCached = false; @@ -95,13 +100,42 @@ bool DateTimeInputTypeBase::HasStepMismatch(bool aUseZeroIfValueNaN) const { } bool DateTimeInputTypeBase::HasBadInput() const { + Element* editWrapperElement = nullptr; nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); - if (!frame) { + if (frame && frame->GetInputAreaContent()) { + // edit-wrapper is inside an XBL binding + editWrapperElement = + mInputElement->GetComposedDoc()->GetAnonymousElementByAttribute( + frame->GetInputAreaContent(), nsGkAtoms::anonid, + NS_LITERAL_STRING("edit-wrapper")); + } else if (mInputElement->GetShadowRoot()) { + // edit-wrapper is inside an UA Widget Shadow DOM + editWrapperElement = mInputElement->GetShadowRoot()->GetElementById( + NS_LITERAL_STRING("edit-wrapper")); + } + if (!editWrapperElement) { return false; } - return frame->HasBadInput(); - ; + // Incomplete field does not imply bad input. + for (Element* child = editWrapperElement->GetFirstElementChild(); child; + child = child->GetNextElementSibling()) { + if (child->ClassList()->Contains( + NS_LITERAL_STRING("datetime-edit-field"))) { + nsAutoString value; + child->GetAttr(kNameSpaceID_None, nsGkAtoms::value, value); + if (value.IsEmpty()) { + return false; + } + } + } + + // All fields are available but input element's value is empty implies + // it has been sanitized. + nsAutoString value; + mInputElement->GetValue(value, CallerType::System); + + return value.IsEmpty(); } nsresult DateTimeInputTypeBase::GetRangeOverflowMessage(nsAString& aMessage) { @@ -125,9 +159,17 @@ nsresult DateTimeInputTypeBase::GetRangeUnderflowMessage(nsAString& aMessage) { } nsresult DateTimeInputTypeBase::MinMaxStepAttrChanged() { - nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); - if (frame) { - frame->OnMinMaxStepAttrChanged(); + if (Element* dateTimeBoxElement = + mInputElement->GetDateTimeBoxElementInUAWidget()) { + AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( + dateTimeBoxElement, NS_LITERAL_STRING("MozNotifyMinMaxStepAttrChanged"), + CanBubble::eNo, ChromeOnlyDispatch::eNo); + dispatcher->RunDOMEventWhenSafe(); + } else { + nsDateTimeControlFrame* frame = do_QueryFrame(GetPrimaryFrame()); + if (frame) { + frame->OnMinMaxStepAttrChanged(); + } } return NS_OK; diff --git a/dom/html/test/forms/mochitest.ini b/dom/html/test/forms/mochitest.ini index 7fa60cbbe8b8..57c3e9e5e426 100644 --- a/dom/html/test/forms/mochitest.ini +++ b/dom/html/test/forms/mochitest.ini @@ -38,6 +38,7 @@ skip-if = android_version == '18' # Android, bug 1147974 [test_input_datetime_focus_blur.html] [test_input_datetime_focus_blur_events.html] [test_input_datetime_focus_state.html] +[test_input_datetime_hidden.html] [test_input_datetime_tabindex.html] [test_input_defaultValue.html] [test_input_email.html] diff --git a/dom/html/test/forms/test_input_datetime_hidden.html b/dom/html/test/forms/test_input_datetime_hidden.html new file mode 100644 index 000000000000..3e71d99913f7 --- /dev/null +++ b/dom/html/test/forms/test_input_datetime_hidden.html @@ -0,0 +1,32 @@ + + + + + Test construction of hidden date input type + + + + + +Mozilla Bug 1514040 +

+
+ +
+
+
+
+ + diff --git a/dom/html/test/forms/test_input_datetime_tabindex.html b/dom/html/test/forms/test_input_datetime_tabindex.html index 26b9b268105d..91577bfc5984 100644 --- a/dom/html/test/forms/test_input_datetime_tabindex.html +++ b/dom/html/test/forms/test_input_datetime_tabindex.html @@ -34,6 +34,15 @@ SimpleTest.waitForFocus(function() { SimpleTest.finish(); }); +function checkInnerTextboxTabindex(input, tabindex) { + let fields = SpecialPowers.wrap(input).openOrClosedShadowRoot.getElementsByClassName("datetime-edit-field"); + + for (let field of fields) { + is(field.tabIndex, tabindex, "tabIndex in the inner textbox should be correct"); + } + +} + function testTabindex(type) { let input1 = document.getElementById(type + "1"); let input2 = document.getElementById(type + "2"); @@ -62,11 +71,17 @@ function testTabindex(type) { is(document.activeElement, input2, "input element with tabindex=-1 is still focusable"); + checkInnerTextboxTabindex(input1, 0); + checkInnerTextboxTabindex(input2, -1); + checkInnerTextboxTabindex(input3, 0); + // Changing the tabindex attribute dynamically. input3.setAttribute("tabindex", "-1"); synthesizeKey("KEY_Tab"); // need only one TAB since input2 is not tabbable isnot(document.activeElement, input3, "element with tabindex changed to -1 should not be tabbable"); + + checkInnerTextboxTabindex(input3, -1); } function test() { diff --git a/layout/forms/nsDateTimeControlFrame.cpp b/layout/forms/nsDateTimeControlFrame.cpp index 3f222e3b2d62..dc48e271e026 100644 --- a/layout/forms/nsDateTimeControlFrame.cpp +++ b/layout/forms/nsDateTimeControlFrame.cpp @@ -18,7 +18,6 @@ #include "mozilla/AsyncEventDispatcher.h" #include "mozilla/dom/HTMLInputElement.h" #include "mozilla/dom/MutationEventBinding.h" -#include "nsDOMTokenList.h" #include "nsNodeInfoManager.h" #include "nsIDateTimeInputArea.h" #include "nsIObserverService.h" @@ -51,121 +50,47 @@ void nsDateTimeControlFrame::DestroyFrom(nsIFrame* aDestructRoot, } void nsDateTimeControlFrame::OnValueChanged() { - if (mInputAreaContent) { - nsCOMPtr inputAreaContent = - do_QueryInterface(mInputAreaContent); - if (inputAreaContent) { - inputAreaContent->NotifyInputElementValueChanged(); - } - } else { - Element* inputAreaContent = GetInputAreaContentAsElement(); - if (!inputAreaContent) { - return; - } - - AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, NS_LITERAL_STRING("MozDateTimeValueChanged"), - CanBubble::eNo, ChromeOnlyDispatch::eNo); - dispatcher->RunDOMEventWhenSafe(); + if (!mInputAreaContent) { + return; + } + nsCOMPtr inputAreaContent = + do_QueryInterface(mInputAreaContent); + if (inputAreaContent) { + inputAreaContent->NotifyInputElementValueChanged(); } } void nsDateTimeControlFrame::OnMinMaxStepAttrChanged() { - if (mInputAreaContent) { - nsCOMPtr inputAreaContent = - do_QueryInterface(mInputAreaContent); - if (inputAreaContent) { - inputAreaContent->NotifyMinMaxStepAttrChanged(); - } - } else { - Element* inputAreaContent = GetInputAreaContentAsElement(); - if (!inputAreaContent) { - return; - } - - AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, NS_LITERAL_STRING("MozNotifyMinMaxStepAttrChanged"), - CanBubble::eNo, ChromeOnlyDispatch::eNo); - dispatcher->RunDOMEventWhenSafe(); + if (!mInputAreaContent) { + return; + } + nsCOMPtr inputAreaContent = + do_QueryInterface(mInputAreaContent); + if (inputAreaContent) { + inputAreaContent->NotifyMinMaxStepAttrChanged(); } } void nsDateTimeControlFrame::HandleFocusEvent() { - if (mInputAreaContent) { - nsCOMPtr inputAreaContent = - do_QueryInterface(mInputAreaContent); - if (inputAreaContent) { - inputAreaContent->FocusInnerTextBox(); - } - } else { - Element* inputAreaContent = GetInputAreaContentAsElement(); - if (!inputAreaContent) { - return; - } - - AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, NS_LITERAL_STRING("MozFocusInnerTextBox"), - CanBubble::eNo, ChromeOnlyDispatch::eNo); - dispatcher->RunDOMEventWhenSafe(); + if (!mInputAreaContent) { + return; + } + nsCOMPtr inputAreaContent = + do_QueryInterface(mInputAreaContent); + if (inputAreaContent) { + inputAreaContent->FocusInnerTextBox(); } } void nsDateTimeControlFrame::HandleBlurEvent() { - if (mInputAreaContent) { - nsCOMPtr inputAreaContent = - do_QueryInterface(mInputAreaContent); - if (inputAreaContent) { - inputAreaContent->BlurInnerTextBox(); - } - } else { - Element* inputAreaContent = GetInputAreaContentAsElement(); - if (!inputAreaContent) { - return; - } - - AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, NS_LITERAL_STRING("MozBlurInnerTextBox"), - CanBubble::eNo, ChromeOnlyDispatch::eNo); - dispatcher->RunDOMEventWhenSafe(); + if (!mInputAreaContent) { + return; } -} - -bool nsDateTimeControlFrame::HasBadInput() { - Element* editWrapperElement = nullptr; - if (mInputAreaContent) { - // edit-wrapper is inside an XBL binding - editWrapperElement = - mInputAreaContent->GetComposedDoc()->GetAnonymousElementByAttribute( - mInputAreaContent, nsGkAtoms::anonid, - NS_LITERAL_STRING("edit-wrapper")); - } else if (mContent->GetShadowRoot()) { - // edit-wrapper is inside an UA Widget Shadow DOM - editWrapperElement = mContent->GetShadowRoot()->GetElementById( - NS_LITERAL_STRING("edit-wrapper")); + nsCOMPtr inputAreaContent = + do_QueryInterface(mInputAreaContent); + if (inputAreaContent) { + inputAreaContent->BlurInnerTextBox(); } - - if (!editWrapperElement) { - return false; - } - - // Incomplete field does not imply bad input. - for (Element* child = editWrapperElement->GetFirstElementChild(); child; - child = child->GetNextElementSibling()) { - if (child->ClassList()->Contains( - NS_LITERAL_STRING("datetime-edit-field"))) { - nsAutoString value; - child->GetAttr(kNameSpaceID_None, nsGkAtoms::value, value); - if (value.IsEmpty()) { - return false; - } - } - } - - // All fields are available but input element's value is empty implies - // it has been sanitized. - nsAutoString value; - HTMLInputElement::FromNode(mContent)->GetValue(value, CallerType::System); - return value.IsEmpty(); } nscoord nsDateTimeControlFrame::GetMinISize(gfxContext* aRenderingContext) { @@ -384,13 +309,15 @@ void nsDateTimeControlFrame::SyncDisabledState() { } inputAreaContent->UpdateEditAttributes(); } else { - Element* inputAreaContent = GetInputAreaContentAsElement(); - if (!inputAreaContent) { + Element* dateTimeBoxElement = + static_cast(GetContent()) + ->GetDateTimeBoxElementInUAWidget(); + if (!dateTimeBoxElement) { return; } AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, NS_LITERAL_STRING("MozDateTimeAttributeChanged"), + dateTimeBoxElement, NS_LITERAL_STRING("MozDateTimeAttributeChanged"), CanBubble::eNo, ChromeOnlyDispatch::eNo); dispatcher->RunDOMEventWhenSafe(); } @@ -426,21 +353,23 @@ nsresult nsDateTimeControlFrame::AttributeChanged(int32_t aNameSpaceID, } } } else { - Element* inputAreaContent = GetInputAreaContentAsElement(); + Element* dateTimeBoxElement = + static_cast(GetContent()) + ->GetDateTimeBoxElementInUAWidget(); if (aAttribute == nsGkAtoms::value) { - if (inputAreaContent) { + if (dateTimeBoxElement) { AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, - NS_LITERAL_STRING("NotifyInputElementValueChanged"), - CanBubble::eNo, ChromeOnlyDispatch::eNo); + dateTimeBoxElement, + NS_LITERAL_STRING("MozDateTimeValueChanged"), CanBubble::eNo, + ChromeOnlyDispatch::eNo); dispatcher->RunDOMEventWhenSafe(); } } else { - if (inputAreaContent) { + if (dateTimeBoxElement) { AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher( - inputAreaContent, - NS_LITERAL_STRING("MozDateTimeValueChanged"), CanBubble::eNo, - ChromeOnlyDispatch::eNo); + dateTimeBoxElement, + NS_LITERAL_STRING("MozDateTimeAttributeChanged"), + CanBubble::eNo, ChromeOnlyDispatch::eNo); dispatcher->RunDOMEventWhenSafe(); } } @@ -453,25 +382,7 @@ nsresult nsDateTimeControlFrame::AttributeChanged(int32_t aNameSpaceID, } nsIContent* nsDateTimeControlFrame::GetInputAreaContent() { - if (mInputAreaContent) { - return mInputAreaContent; - } - if (mContent->GetShadowRoot()) { - // The datetimebox
is the only child of the UA Widget Shadow Root - // if it is present. - MOZ_ASSERT(mContent->GetShadowRoot()->IsUAWidget()); - MOZ_ASSERT(1 >= mContent->GetShadowRoot()->GetChildCount()); - return mContent->GetShadowRoot()->GetFirstChild(); - } - return nullptr; -} - -Element* nsDateTimeControlFrame::GetInputAreaContentAsElement() { - nsIContent* inputAreaContent = GetInputAreaContent(); - if (inputAreaContent) { - return inputAreaContent->AsElement(); - } - return nullptr; + return mInputAreaContent; } void nsDateTimeControlFrame::ContentStatesChanged(EventStates aStates) { diff --git a/layout/forms/nsDateTimeControlFrame.h b/layout/forms/nsDateTimeControlFrame.h index 27257a40d701..aa4b42dd3b86 100644 --- a/layout/forms/nsDateTimeControlFrame.h +++ b/layout/forms/nsDateTimeControlFrame.h @@ -80,7 +80,6 @@ class nsDateTimeControlFrame final : public nsContainerFrame, void OnMinMaxStepAttrChanged(); void HandleFocusEvent(); void HandleBlurEvent(); - bool HasBadInput(); private: class SyncDisabledStateEvent; @@ -109,8 +108,6 @@ class nsDateTimeControlFrame final : public nsContainerFrame, */ void SyncDisabledState(); - mozilla::dom::Element* GetInputAreaContentAsElement(); - // Anonymous child which is bound via XBL to an element that wraps the input // area and reset button. RefPtr mInputAreaContent; diff --git a/toolkit/content/widgets/datetimebox.js b/toolkit/content/widgets/datetimebox.js index c6dc8c8cbc78..906b1911f437 100644 --- a/toolkit/content/widgets/datetimebox.js +++ b/toolkit/content/widgets/datetimebox.js @@ -267,7 +267,7 @@ this.DateTimeInputBaseImplWidget = class { // Used to store the non-formatted value, cleared when value is // cleared. - // nsDateTimeControlFrame::HasBadInput() will read this to decide + // DateTimeInputTypeBase::HasBadInput() will read this to decide // if the input has value. field.setAttribute("value", "");