tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SVGInnerSVGFrame.cpp (1326B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 // Main header first:
      8 #include "SVGInnerSVGFrame.h"
      9 
     10 #include "mozilla/PresShell.h"
     11 
     12 nsIFrame* NS_NewSVGInnerSVGFrame(mozilla::PresShell* aPresShell,
     13                                 mozilla::ComputedStyle* aStyle) {
     14  return new (aPresShell)
     15      mozilla::SVGInnerSVGFrame(aStyle, aPresShell->GetPresContext());
     16 }
     17 
     18 namespace mozilla {
     19 
     20 NS_IMPL_FRAMEARENA_HELPERS(SVGInnerSVGFrame)
     21 
     22 //----------------------------------------------------------------------
     23 // nsIFrame methods
     24 
     25 NS_QUERYFRAME_HEAD(SVGInnerSVGFrame)
     26  NS_QUERYFRAME_ENTRY(SVGInnerSVGFrame)
     27  NS_QUERYFRAME_ENTRY(ISVGSVGFrame)
     28 NS_QUERYFRAME_TAIL_INHERITING(SVGViewportFrame)
     29 
     30 #ifdef DEBUG
     31 void SVGInnerSVGFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
     32                            nsIFrame* aPrevInFlow) {
     33  NS_ASSERTION(aContent->IsSVGElement(nsGkAtoms::svg),
     34               "Content is not an SVG 'svg' element!");
     35 
     36  SVGViewportFrame::Init(aContent, aParent, aPrevInFlow);
     37 }
     38 #endif /* DEBUG */
     39 
     40 }  // namespace mozilla