Commit 8c9dd3c8 authored by Chris Leary's avatar Chris Leary
Browse files

Merge mozilla-central and tracemonkey. (CLOSED TREE on tracemonkey side)

parents d8a23919 d29d1f3e
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -179,15 +179,16 @@ public:
  {}

  SVGNumberListAndInfo(nsSVGElement *aElement)
    : mElement(aElement)
    : mElement(do_GetWeakReference(static_cast<nsINode*>(aElement)))
  {}

  void SetInfo(nsSVGElement *aElement) {
    mElement = aElement;
    mElement = do_GetWeakReference(static_cast<nsINode*>(aElement));
  }

  nsSVGElement* Element() const {
    return mElement; // .get();
    nsCOMPtr<nsIContent> e = do_QueryReferent(mElement);
    return static_cast<nsSVGElement*>(e.get());
  }

  nsresult CopyFrom(const SVGNumberListAndInfo& rhs) {
@@ -218,10 +219,11 @@ public:
  }

private:
  // We must keep a strong reference to our element because we may belong to a
  // We must keep a weak reference to our element because we may belong to a
  // cached baseVal nsSMILValue. See the comments starting at:
  // https://bugzilla.mozilla.org/show_bug.cgi?id=515116#c15
  nsRefPtr<nsSVGElement> mElement;
  // See also https://bugzilla.mozilla.org/show_bug.cgi?id=653497
  nsWeakPtr mElement;
};

} // namespace mozilla
+1 −1
Original line number Diff line number Diff line
@@ -8830,7 +8830,7 @@ void ReflowCountMgr::PaintCount(const char* aName,
      nscoord x = 0, y = fm->MaxAscent();
      nscoord width, height = fm->MaxHeight();
      aRenderingContext->SetTextRunRTL(PR_FALSE);
      aRenderingContext->GetWidth((char*)buf, width);
      width = aRenderingContext->GetWidth(buf);

      PRUint32 color;
      PRUint32 color2;
+7 −4
Original line number Diff line number Diff line
@@ -1746,9 +1746,12 @@ const ContentTouchHandler = {

        if (json.click)
          this.clickPrevented = true;
        if (json.panning)
          this.panningPrevented = true;

        if (this.canCancelPan)
          Elements.browsers.customDragger.contentMouseCapture = json.panning;
        // We don't know if panning is allowed until the first touchmove event is processed.
        if (this.canCancelPan && json.type == "touchmove")
          Elements.browsers.customDragger.contentMouseCapture = this.panningPrevented;
        break;
      }
      case "Browser:CanCaptureMouse:Return": {
@@ -1790,10 +1793,9 @@ const ContentTouchHandler = {
  },

  touchTimeout: null,

  canCancelPan: false,

  clickPrevented: false,
  panningPrevented: false,

  updateCanCancel: function(aX, aY) {
    let dpi = Browser.windowUtils.displayDPI;
@@ -1823,6 +1825,7 @@ const ContentTouchHandler = {
    // if the page might capture touch events, we give it the option
    this.updateCanCancel(aX, aY);
    this.clickPrevented = false;
    this.panningPrevented = false;

    let dragger = Elements.browsers.customDragger;
    dragger.contentMouseCapture = this.canCancelPan && Browser.selectedTab.contentMightCaptureMouse;
+11 −8
Original line number Diff line number Diff line
@@ -1224,30 +1224,33 @@ var TouchEventHandler = {
      return;
    }

    let cancelled = false;

    let type;
    switch (aMessage.name) {
      case "Browser:MouseDown":
        this.isCancellable = true;
        this.element = elementFromPoint(json.x, json.y);
        cancelled = !this.sendEvent("touchstart", json, this.element);
        type = "touchstart";
        break;

      case "Browser:MouseUp":
        this.isCancellable = false;
        if (this.element)
          this.sendEvent("touchend", json, this.element);
        this.element = null;
        type = "touchend";
        break;

      case "Browser:MouseMove":
        if (this.element)
          cancelled = !this.sendEvent("touchmove", json, this.element);
        type = "touchmove";
        break;
    }

    if (!this.element)
      return;
    let cancelled = !this.sendEvent(type, json, this.element);
    if (type == "touchend")
      this.element = null;

    if (this.isCancellable) {
      sendAsyncMessage("Browser:CaptureEvents", { messageId: json.messageId,
                                                  type: type,
                                                  contentMightCaptureMouse: true,
                                                  click: cancelled && aMessage.name == "Browser:MouseDown",
                                                  panning: cancelled });
+1 −0
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ var ExtensionsView = {
  },

  addItem : function ev_addItem(aItem, aPosition) {
    AddonLogger.log("Adding item: " + aItem.id);
    if (aPosition == "repo")
      return this._list.appendChild(aItem);
    else if (aPosition == "local")
Loading