Bug 1120750 - Part 5: Fix non-unified build bustage.

This commit is contained in:
Morris Tseng 2015-02-12 21:05:50 -05:00
parent 7a6d9fcbad
commit e205f3b0b8

View File

@ -9,29 +9,30 @@
#include <algorithm>
#include "nsCOMPtr.h"
#include "nsFrameSelection.h"
#include "nsIFrame.h"
#include "nsIScrollableFrame.h"
#include "nsIDOMNode.h"
#include "nsISelection.h"
#include "nsISelectionPrivate.h"
#include "nsIContent.h"
#include "nsIPresShell.h"
#include "nsCanvasFrame.h"
#include "nsPresContext.h"
#include "nsBlockFrame.h"
#include "nsISelectionController.h"
#include "mozilla/Preferences.h"
#include "mozilla/BasicEvents.h"
#include "nsIDOMWindow.h"
#include "nsQueryContentEventResult.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsView.h"
#include "nsDOMTokenList.h"
#include "nsCanvasFrame.h"
#include "nsCaret.h"
#include "mozilla/dom/CustomEvent.h"
#include "nsCOMPtr.h"
#include "nsContentUtils.h"
#include "nsDOMTokenList.h"
#include "nsFrameSelection.h"
#include "nsIContent.h"
#include "nsIDOMNode.h"
#include "nsIDOMWindow.h"
#include "nsIFrame.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIPresShell.h"
#include "nsIScrollableFrame.h"
#include "nsISelection.h"
#include "nsISelectionController.h"
#include "nsISelectionPrivate.h"
#include "nsPresContext.h"
#include "nsQueryContentEventResult.h"
#include "nsView.h"
#include "mozilla/dom/SelectionStateChangedEvent.h"
#include "mozilla/dom/CustomEvent.h"
#include "mozilla/BasicEvents.h"
#include "mozilla/Preferences.h"
using namespace mozilla;
@ -950,7 +951,7 @@ TouchCaret::DispatchTapEvent()
return;
}
Selection* sel = static_cast<Selection*>(caret->GetSelection());
dom::Selection* sel = static_cast<dom::Selection*>(caret->GetSelection());
if (!sel) {
return;
}
@ -959,13 +960,13 @@ TouchCaret::DispatchTapEvent()
MOZ_ASSERT(doc);
SelectionStateChangedEventInit init;
dom::SelectionStateChangedEventInit init;
init.mBubbles = true;
// XXX: Do we need to flush layout?
presShell->FlushPendingNotifications(Flush_Layout);
nsRect rect = nsContentUtils::GetSelectionBoundingRect(sel);
nsRefPtr<DOMRect>domRect = new DOMRect(ToSupports(doc));
nsRefPtr<dom::DOMRect>domRect = new dom::DOMRect(ToSupports(doc));
domRect->SetLayoutRect(rect);
init.mBoundingClientRect = domRect;
@ -973,12 +974,12 @@ TouchCaret::DispatchTapEvent()
sel->Stringify(init.mSelectedText);
dom::Sequence<SelectionState> state;
state.AppendElement(SelectionState::Taponcaret);
dom::Sequence<dom::SelectionState> state;
state.AppendElement(dom::SelectionState::Taponcaret);
init.mStates = state;
nsRefPtr<SelectionStateChangedEvent> event =
SelectionStateChangedEvent::Constructor(doc, NS_LITERAL_STRING("mozselectionstatechanged"), init);
nsRefPtr<dom::SelectionStateChangedEvent> event =
dom::SelectionStateChangedEvent::Constructor(doc, NS_LITERAL_STRING("mozselectionstatechanged"), init);
event->SetTrusted(true);
event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;