dom/xslt/xslt/txRtfHandler.h
author Gerald Squelart <gsquelart@mozilla.com>
Fri, 11 Nov 2016 11:25:52 +1100
changeset 367314 680467d99ed63d1b3a37e5c61d3c4302f5181418
parent 265233 ac4464790ec4896a5188fa50cfc69ae0ffeddc08
child 508163 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1316524 - Use 'media.wmf.skip-blacklist' to set some gfxVars - r=mattwoodrow Reversing bug 1313343, as MediaPrefs are not available from the UI process. Instead media.wmf.skip-blacklist is used when setting D3D-blacklisting gfxVars, leaving them empty if we want to skip these blacklists. MozReview-Commit-ID: JYED4ovC0jq

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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 txRtfHandler_h___
#define txRtfHandler_h___

#include "mozilla/Attributes.h"
#include "txBufferingHandler.h"
#include "txExprResult.h"
#include "txXPathNode.h"

class txResultTreeFragment : public txAExprResult
{
public:
    explicit txResultTreeFragment(nsAutoPtr<txResultBuffer>&& aBuffer);

    TX_DECL_EXPRRESULT

    nsresult flushToHandler(txAXMLEventHandler* aHandler);

    void setNode(const txXPathNode* aNode)
    {
        NS_ASSERTION(!mNode, "Already converted!");

        mNode = aNode;
    }
    const txXPathNode *getNode() const
    {
        return mNode;
    }

private:
    nsAutoPtr<txResultBuffer> mBuffer;
    nsAutoPtr<const txXPathNode> mNode;
};

class txRtfHandler : public txBufferingHandler
{
public:
    nsresult getAsRTF(txAExprResult** aResult);

    nsresult endDocument(nsresult aResult) override;
    nsresult startDocument() override;
};

#endif /* txRtfHandler_h___ */