products/Sources/formale Sprachen/C/Firefox/dom/cache/test/mochitest/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 606 B image not shown  

Quelle  HTMLFrameSetElement.h

  Sprache: C
 

/* 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 HTMLFrameSetElement_h
#define HTMLFrameSetElement_h

#include "mozilla/Attributes.h"
#include "mozilla/Span.h"
#include "nsGenericHTMLElement.h"
#include "nsTArray.h"

/**
 * The nsFramesetUnit enum is used to denote the type of each entry
 * in the row or column spec.
 */

enum nsFramesetUnit {
  eFramesetUnit_Fixed = 0,
  eFramesetUnit_Percent,
  eFramesetUnit_Relative
};

/**
 * The nsFramesetSpec struct is used to hold a single entry in the
 * row or column spec.
 */

struct nsFramesetSpec {
  nsFramesetUnit mUnit;
  nscoord mValue;
};

/**
 * The maximum number of entries allowed in the frame set element row
 * or column spec.
 */

#define NS_MAX_FRAMESET_SPEC_COUNT 16000

//----------------------------------------------------------------------

namespace mozilla::dom {

class OnBeforeUnloadEventHandlerNonNull;

class HTMLFrameSetElement final : public nsGenericHTMLElement {
 public:
  explicit HTMLFrameSetElement(
      already_AddRefed<mozilla::dom::NodeInfo> aNodeInfo)
      : nsGenericHTMLElement(std::move(aNodeInfo)),
        mCurrentRowColHint(NS_STYLE_HINT_REFLOW) {
    SetHasWeirdParserInsertionMode();
  }

  NS_IMPL_FROMNODE_HTML_WITH_TAG(HTMLFrameSetElement, frameset)

  // nsISupports
  NS_INLINE_DECL_REFCOUNTING_INHERITED(HTMLFrameSetElement,
                                       nsGenericHTMLElement)

  void GetCols(DOMString& aCols) { GetHTMLAttr(nsGkAtoms::cols, aCols); }
  void SetCols(const nsAString& aCols, ErrorResult& aError) {
    SetHTMLAttr(nsGkAtoms::cols, aCols, aError);
  }
  void GetRows(DOMString& aRows) { GetHTMLAttr(nsGkAtoms::rows, aRows); }
  void SetRows(const nsAString& aRows, ErrorResult& aError) {
    SetHTMLAttr(nsGkAtoms::rows, aRows, aError);
  }

  bool IsEventAttributeNameInternal(nsAtom* aName) override;

  // Event listener stuff; we need to declare only the ones we need to
  // forward to window that don't come from nsIDOMHTMLFrameSetElement.
#define EVENT(name_, id_, type_, \
              struct_) /* nothing; handled by the superclass */
#define WINDOW_EVENT_HELPER(name_, type_) \
  type_* GetOn##name_();                  \
  void SetOn##name_(type_* handler);
#define WINDOW_EVENT(name_, id_, type_, struct_) \
  WINDOW_EVENT_HELPER(name_, EventHandlerNonNull)
#define BEFOREUNLOAD_EVENT(name_, id_, type_, struct_) \
  WINDOW_EVENT_HELPER(name_, OnBeforeUnloadEventHandlerNonNull)
#include "mozilla/EventNameList.inc"  // IWYU pragma: keep
#undef BEFOREUNLOAD_EVENT
#undef WINDOW_EVENT
#undef WINDOW_EVENT_HELPER
#undef EVENT

  /**
   * GetRowSpec is used to get the "rows" spec.
   * @return The span of size specifications, owned by the
   *        nsFrameSetElement implementation.
   */

  Span<const nsFramesetSpec> GetRowSpec() MOZ_LIFETIME_BOUND;
  /**
   * GetColSpec is used to get the "cols" spec.
   * @return The span of size specifications, owned by the
   *        nsFrameSetElement implementation.
   */

  Span<const nsFramesetSpec> GetColSpec() MOZ_LIFETIME_BOUND;

  bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
                      const nsAString& aValue,
                      nsIPrincipal* aMaybeScriptedPrincipal,
                      nsAttrValue& aResult) override;
  nsChangeHint GetAttributeChangeHint(const nsAtom* aAttribute,
                                      AttrModType aModType) const override;

  nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;

 protected:
  virtual ~HTMLFrameSetElement();

  JSObject* WrapNode(JSContext*, JS::Handle<JSObject*> aGivenProto) override;

  void BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
                     const nsAttrValue* aValue, bool aNotify) override;

 private:
  nsresult ParseRowCol(const nsAttrValue& aValue,
                       nsTArray<nsFramesetSpec>& aSpecs);

  /**
   * The style hint to return for the rows/cols attrs in
   * GetAttributeChangeHint
   */

  nsChangeHint mCurrentRowColHint;
  /**
   * The parsed representation of the "rows" attribute
   */

  nsTArray<nsFramesetSpec> mRowSpecs;  // parsed, non-computed dimensions
  /**
   * The parsed representation of the "cols" attribute
   */

  nsTArray<nsFramesetSpec> mColSpecs;  // parsed, non-computed dimensions
};

}  // namespace mozilla::dom

#endif  // HTMLFrameSetElement_h

Messung V0.5 in Prozent
C=88 H=100 G=94

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-08-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.