author Simon Whitehead <>
Sat, 13 May 2017 15:12:15 -0500
changeset 358329 633151f5d481d49bd39900d43e6a75d77459a7bb
parent 354537 e9400156bf733aa1a928969529eea5d5e6ed7f98
child 360164 c92612ac17d3db172ccf80369007921503612962
permissions -rw-r--r--
servo: Merge #16829 - Disallow negative duration for animation and transition (from hiikezoe:disallow-negative-duration); r=emilio <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15343 <!-- Either: --> - [X] There are tests for these changes written by @simon-whitehead . Thank you! <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: Source-Revision: 4613c0382ab76263fb8202ccf52f4c0520e44809

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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 */

include protocol PBlob;
include protocol PBrowser;
include protocol PContent;
include protocol PJavaScript;
include protocol PFileDescriptorSet;
include protocol PChildToParentStream;
include protocol PMemoryStream;
include protocol PParentToChildStream;
include protocol PIPCBlobInputStream;

include DOMTypes;
include JavaScriptTypes;
include ProtocolTypes;
include PTabContext;

using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
using class mozilla::dom::MessagePort from "mozilla/dom/MessagePort.h";
using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h";

namespace mozilla {
namespace dom {

 * PContentBridge allows us to represent a parent/child relationship between two
 * child processes.  When a child process wants to open its own child, it asks
 * the root process to create a new process and then bridge them.  The first
 * child will allocate the PContentBridgeParent, and the newly opened child will
 * allocate the PContentBridgeChild.  This protocol allows these processes to
 * share PBrowsers and send messages to each other.
nested(upto inside_cpow) sync protocol PContentBridge
    manages PBlob;
    manages PBrowser;
    manages PFileDescriptorSet;
    manages PJavaScript;
    manages PChildToParentStream;
    manages PMemoryStream;
    manages PParentToChildStream;
    manages PIPCBlobInputStream;

    async PParentToChildStream();

     * Sending an activate message moves focus to the child.
    async Activate(PBrowser aTab);

    async Deactivate(PBrowser aTab);

    async ParentActivated(PBrowser aTab, bool aActivated);

    async PIPCBlobInputStream(nsID aID, uint64_t aSize);

    sync SyncMessage(nsString aMessage, ClonedMessageData aData,
                     CpowEntry[] aCpows, Principal aPrincipal)
      returns (StructuredCloneData[] retval);

    async PJavaScript();

    async PChildToParentStream();

    async PMemoryStream(uint64_t aSize);

    // Both the parent and the child can construct the PBrowser.
    // See the comment in PContent::PBrowser().
    async PBrowser(TabId tabId, TabId sameTabGroupAs,
                   IPCTabContext context, uint32_t chromeFlags,
                   ContentParentId cpId, bool isForBrowser);

    async PBlob(BlobConstructorParams params);

    async PFileDescriptorSet(FileDescriptor fd);

    async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
                       Principal aPrincipal, ClonedMessageData aData);