Commit 3aa46dfe authored by Carsten "Tomcat" Book's avatar Carsten "Tomcat" Book
Browse files

Backed out changeset e670f691e2b9 (bug 968647) for mochitest test bustage on OS X on a CLOSED TREE

parent 88049146
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ XPIDL_MODULE = 'docshell'
EXPORTS += [
    'nsDocShellLoadTypes.h',
    'nsILinkHandler.h',
    'nsIScrollObserver.h',
    'nsIWebShellServices.h',
    'SerializedLoadContext.h',
]
+0 −34
Original line number Diff line number Diff line
@@ -67,7 +67,6 @@
#include "nsITimedChannel.h"
#include "nsIPrivacyTransitionObserver.h"
#include "nsIReflowObserver.h"
#include "nsIScrollObserver.h"
#include "nsIDocShellTreeItem.h"
#include "nsIChannel.h"
#include "IHistory.h"
@@ -2858,39 +2857,6 @@ nsDocShell::GetCurrentDocChannel()
    return nullptr;
}

NS_IMETHODIMP
nsDocShell::AddWeakScrollObserver(nsIScrollObserver* aObserver)
{
    nsWeakPtr weakObs = do_GetWeakReference(aObserver);
    if (!weakObs) {
        return NS_ERROR_FAILURE;
    }
    return mScrollObservers.AppendElement(weakObs) ? NS_OK : NS_ERROR_FAILURE;
}

NS_IMETHODIMP
nsDocShell::RemoveWeakScrollObserver(nsIScrollObserver* aObserver)
{
    nsWeakPtr obs = do_GetWeakReference(aObserver);
    return mScrollObservers.RemoveElement(obs) ? NS_OK : NS_ERROR_FAILURE;
}

NS_IMETHODIMP
nsDocShell::NotifyScrollObservers()
{
    nsTObserverArray<nsWeakPtr>::ForwardIterator iter(mScrollObservers);
    while (iter.HasMore()) {
        nsWeakPtr ref = iter.GetNext();
        nsCOMPtr<nsIScrollObserver> obs = do_QueryReferent(ref);
        if (obs) {
            obs->ScrollPositionChanged();
        } else {
            mScrollObservers.RemoveElement(ref);
        }
    }
    return NS_OK;
}

//*****************************************************************************
// nsDocShell::nsIDocShellTreeItem
//*****************************************************************************   
+0 −1
Original line number Diff line number Diff line
@@ -900,7 +900,6 @@ private:
    nsCOMPtr<nsIPrincipal> mParentCharsetPrincipal;
    nsTObserverArray<nsWeakPtr> mPrivacyObservers;
    nsTObserverArray<nsWeakPtr> mReflowObservers;
    nsTObserverArray<nsWeakPtr> mScrollObservers;
    nsCString         mOriginalUriString;

    // Separate function to do the actual name (i.e. not _top, _self etc.)
+0 −19
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ interface nsIWebBrowserPrint;
interface nsIVariant;
interface nsIPrivacyTransitionObserver;
interface nsIReflowObserver;
interface nsIScrollObserver;

typedef unsigned long nsLoadFlags;

@@ -668,24 +667,6 @@ interface nsIDocShell : nsIDocShellTreeItem
                                        in DOMHighResTimeStamp start,
                                        in DOMHighResTimeStamp end);

  /**
   * Add an observer to the list of parties to be notified when scroll position
   * of some elements is changed.
   */
  [noscript] void addWeakScrollObserver(in nsIScrollObserver obs);

  /**
   * Add an observer to the list of parties to be notified when scroll position
   * of some elements is changed.
   */
  [noscript] void removeWeakScrollObserver(in nsIScrollObserver obs);

  /**
   * Notify all attached observers that the scroll position of some element
   * has changed.
   */
  [noscript] void notifyScrollObservers();

  /**
   * Returns true if this docshell corresponds to an <iframe mozbrowser>.
   * (<iframe mozapp mozbrowser> is not considered a browser.)

docshell/base/nsIScrollObserver.h

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsIScrollObserver_h___
#define nsIScrollObserver_h___

#include "nsISupports.h"

#define NS_ISCROLLOBSERVER_IID \
  { 0x7c1a8b63, 0xe322, 0x4827, \
    { 0xa4, 0xb1, 0x3b, 0x6e, 0x59, 0x03, 0x47, 0x7e } }

class nsIScrollObserver : public nsISupports
{
public:
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCROLLOBSERVER_IID)

  /**
   * Called when the scroll position of some element has changed.
   */
  virtual void ScrollPositionChanged() = 0;
};

NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollObserver, NS_ISCROLLOBSERVER_IID)

#endif /* nsIScrollObserver_h___ */
Loading