Commit d1622128 authored by James Kitchener's avatar James Kitchener
Browse files

Bug 442637 - MathML changes to support ssty setting. r=fredw

parent f7004e96
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -29,6 +29,11 @@ UNIFIED_SOURCES += [
    'nsMathMLTokenFrame.cpp',
]

EXPORTS += [
    'nsIMathMLFrame.h',
    'nsMathMLOperators.h'
]

FAIL_ON_WARNINGS = True

FINAL_LIBRARY = 'gklayout'
+8 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#define nsIMathMLFrame_h___

#include "nsQueryFrame.h"
#include "nsMathMLOperators.h"

struct nsPresentationData;
struct nsEmbellishData;
@@ -192,6 +193,13 @@ public:
                                    int32_t         aLastIndex,
                                    uint32_t        aFlagsValues,
                                    uint32_t        aWhichFlags) = 0;

  // If aFrame is a child frame, returns the script increment which this frame
  // imposes on the specified frame, ignoring any artificial adjustments to
  // scriptlevel.
  // Returns 0 if the specified frame isn't a child frame.
  virtual uint8_t
  ScriptIncrement(nsIFrame* aFrame) = 0;
};

// struct used by a container frame to keep track of its embellishments.
+15 −0
Original line number Diff line number Diff line
@@ -1530,6 +1530,21 @@ nsMathMLContainerFrame::TransmitAutomaticDataForMrowLikeElement()
  return NS_OK;
}

/*static*/ void
nsMathMLContainerFrame::PropagateFrameFlagFor(nsIFrame* aFrame,
                                              uint64_t  aFlags)
{
  if (!aFrame || !aFlags)
    return;

  aFrame->AddStateBits(aFlags);
  nsIFrame* childFrame = aFrame->GetFirstPrincipalChild();
  while (childFrame) {
    PropagateFrameFlagFor(childFrame, aFlags);
    childFrame = childFrame->GetNextSibling();
  }
}

nsresult
nsMathMLContainerFrame::ReportErrorToConsole(const char*       errorMsgId,
                                             const char16_t** aParams,
+5 −0
Original line number Diff line number Diff line
@@ -339,6 +339,11 @@ public:
                                       uint32_t        aFlagsValues,
                                       uint32_t        aFlagsToUpdate);

  // Sets flags on aFrame and all descendant frames
  static void
  PropagateFrameFlagFor(nsIFrame* aFrame,
                        uint64_t  aFlags);

  // helper to let the rebuild of automatic data (presentation data
  // and embellishement data) walk through a subtree that may contain
  // non-MathML container frames. Note that this method re-builds the
+6 −0
Original line number Diff line number Diff line
@@ -92,6 +92,12 @@ public:
    return NS_OK;
  }

  uint8_t
  ScriptIncrement(nsIFrame* aFrame) MOZ_OVERRIDE
  {
    return 0;
  }

  // helper to give a style context suitable for doing the stretching to the
  // MathMLChar. Frame classes that use this should make the extra style contexts
  // accessible to the Style System via Get/Set AdditionalStyleContext.
Loading