author | Daniel Holbert <dholbert@cs.stanford.edu> |
Tue, 09 Sep 2014 16:12:13 -0700 | |
changeset 204344 | c09f2ddb7bacd254d416d3838c525a2ed95cc766 |
parent 204343 | 0eaa239b3bfd05c88aca67b2421e0770cffeb4e6 |
child 204345 | 65cda04dc8d246c20e33a31614ddd1769accca2d |
push id | 48901 |
push user | dholbert@mozilla.com |
push date | Tue, 09 Sep 2014 23:15:22 +0000 |
treeherder | mozilla-inbound@c09f2ddb7bac [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 35.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -711,18 +711,18 @@ public: */ static nsRect TransformFrameRectToAncestor(nsIFrame* aFrame, const nsRect& aRect, const nsIFrame* aAncestor, bool* aPreservesAxisAlignedRectangles = nullptr); /** - * Gets the transform for aFrame relative to aAncestor. Pass null for aAncestor - * to go up to the root frame. + * Gets the transform for aFrame relative to aAncestor. Pass null for + * aAncestor to go up to the root frame. */ static Matrix4x4 GetTransformToAncestor(nsIFrame *aFrame, const nsIFrame *aAncestor); /** * Transforms a list of CSSPoints from aFromFrame to aToFrame, taking into * account all relevant transformations on the frames up to (but excluding) * their nearest common ancestor. * If we encounter a transform that we need to invert but which is @@ -760,18 +760,18 @@ public: * transform is what would be set on the layer currently if a layers * transaction were opened at the time this helper is called. */ static bool GetLayerTransformForFrame(nsIFrame* aFrame, Matrix4x4* aTransform); /** * Given a point in the global coordinate space, returns that point expressed - * in the coordinate system of aFrame. This effectively inverts all transforms - * between this point and the root frame. + * in the coordinate system of aFrame. This effectively inverts all + * transforms between this point and the root frame. * * @param aFrame The frame that acts as the coordinate space container. * @param aPoint The point, in the global space, to get in the frame-local space. * @return aPoint, expressed in aFrame's canonical coordinate space. */ static nsPoint TransformRootPointToFrame(nsIFrame* aFrame, const nsPoint &aPoint) { @@ -882,65 +882,66 @@ public: * descendants to aRenderingContext. * @param aRenderingContext a rendering context translated so that (0,0) * is the origin of aFrame; for best results, (0,0) should transform * to pixel-aligned coordinates. This can be null, in which case * aFrame must be a "display root" (root frame for a root document, * or the root of a popup) with an associated widget and we draw using * the layer manager for the frame's widget. * @param aDirtyRegion the region that must be painted, in the coordinates - * of aFrame + * of aFrame. * @param aBackstop paint the dirty area with this color before drawing - * the actual content; pass NS_RGBA(0,0,0,0) to draw no background + * the actual content; pass NS_RGBA(0,0,0,0) to draw no background. * @param aFlags if PAINT_IN_TRANSFORM is set, then we assume * this is inside a transform or SVG foreignObject. If * PAINT_SYNC_DECODE_IMAGES is set, we force synchronous decode on all * images. If PAINT_WIDGET_LAYERS is set, aFrame must be a display root, * and we will use the frame's widget's layer manager to paint * even if aRenderingContext is non-null. This is useful if you want * to force rendering to use the widget's layer manager for testing * or speed. PAINT_WIDGET_LAYERS must be set if aRenderingContext is null. * If PAINT_DOCUMENT_RELATIVE is used, the visible region is interpreted * as being relative to the document. (Normally it's relative to the CSS * viewport.) PAINT_TO_WINDOW sets painting to window to true on the display * list builder even if we can't tell that we are painting to the window. * If PAINT_EXISTING_TRANSACTION is set, then BeginTransaction() has already * been called on aFrame's widget's layer manager and should not be * called again. - * If PAINT_COMPRESSED is set, the FrameLayerBuilder should be set to compressed mode - * to avoid short cut optimizations. + * If PAINT_COMPRESSED is set, the FrameLayerBuilder should be set to + * compressed mode to avoid short cut optimizations. * * So there are three possible behaviours: * 1) PAINT_WIDGET_LAYERS is set and aRenderingContext is null; we paint - * by calling BeginTransaction on the widget's layer manager + * by calling BeginTransaction on the widget's layer manager. * 2) PAINT_WIDGET_LAYERS is set and aRenderingContext is non-null; we * paint by calling BeginTransactionWithTarget on the widget's layer - * maanger + * manager. * 3) PAINT_WIDGET_LAYERS is not set and aRenderingContext is non-null; * we paint by construct a BasicLayerManager and calling * BeginTransactionWithTarget on it. This is desirable if we're doing * something like drawWindow in a mode where what gets rendered doesn't * necessarily correspond to what's visible in the window; we don't * want to mess up the widget's layer tree. */ static nsresult PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFrame, const nsRegion& aDirtyRegion, nscolor aBackstop, uint32_t aFlags = 0); /** * Uses a binary search for find where the cursor falls in the line of text - * It also keeps track of the part of the string that has already been measured - * so it doesn't have to keep measuring the same text over and over + * It also keeps track of the part of the string that has already been + * measured so it doesn't have to keep measuring the same text over and over. * * @param "aBaseWidth" contains the width in twips of the portion * of the text that has already been measured, and aBaseInx contains * the index of the text that has already been measured. * - * @param aTextWidth returns the (in twips) the length of the text that falls - * before the cursor aIndex contains the index of the text where the cursor falls + * @param aTextWidth returns (in twips) the length of the text that falls + * before the cursor aIndex contains the index of the text where the cursor + * falls. */ static bool BinarySearchForPosition(nsRenderingContext* acx, const char16_t* aText, int32_t aBaseWidth, int32_t aBaseInx, int32_t aStartInx, int32_t aEndInx, @@ -1140,18 +1141,18 @@ public: * aFrame? */ static bool IsFirstContinuationOrIBSplitSibling(nsIFrame *aFrame); /** * Check whether aFrame is a part of the scrollbar or scrollcorner of * the root content. - * @param aFrame the checking frame - * @return if TRUE, the frame is a part of the scrollbar or scrollcorner of + * @param aFrame the checking frame. + * @return true if the frame is a part of the scrollbar or scrollcorner of * the root content. */ static bool IsViewportScrollbarFrame(nsIFrame* aFrame); /** * Get the contribution of aFrame to its containing block's intrinsic * width. This considers the child's intrinsic width, its 'width', * 'min-width', and 'max-width' properties, and its padding, border, @@ -1179,17 +1180,17 @@ public: * Convert nsStyleCoord to nscoord when percentages depend on the * containing block width, and enumerated values are for width, * min-width, or max-width. Returns the content-box width value based * on aContentEdgeToBoxSizing and aBoxSizingToMarginEdge (which are * also used for the enumerated values for width. This function does * not handle 'auto'. It ensures that the result is nonnegative. * * @param aRenderingContext Rendering context for font measurement/metrics. - * @param aFrame Frame whose (min-/max-/)width is being computed + * @param aFrame Frame whose (min-/max-/)width is being computed. * @param aContainingBlockWidth Width of aFrame's containing block. * @param aContentEdgeToBoxSizing The sum of any left/right padding and * border that goes inside the rect chosen by box-sizing. * @param aBoxSizingToMarginEdge The sum of any left/right padding, border, * and margin that goes outside the rect chosen by box-sizing. * @param aCoord The width value to compute. */ static nscoord ComputeWidthValue( @@ -1420,18 +1421,17 @@ public: * @param aImage The image. * @param aImageSize The unscaled size of the image being drawn. * (This might be the image's size if no scaling * occurs, or it might be the image's size if * the image is a vector image being rendered at * that size.) * @param aDest The position and scaled area where one copy of * the image should be drawn. - * @param aFill The area to be filled with copies of the - * image. + * @param aFill The area to be filled with copies of the image. * @param aAnchor A point in aFill which we will ensure is * pixel-aligned in the output. * @param aDirty Pixels outside this area may be skipped. * @param aImageFlags Image flags of the imgIContainer::FLAG_* variety */ static nsresult DrawBackgroundImage(nsRenderingContext* aRenderingContext, nsPresContext* aPresContext, imgIContainer* aImage, @@ -1482,17 +1482,17 @@ public: /** * Draw a whole image without scaling or tiling. * * @param aRenderingContext Where to draw the image, set up with an * appropriate scale and transform for drawing in * app units. * @param aImage The image. - * @param aDest The top-left where the image should be drawn + * @param aDest The top-left where the image should be drawn. * @param aDirty If non-null, then pixels outside this area may * be skipped. * @param aImageFlags Image flags of the imgIContainer::FLAG_* variety * @param aSourceArea If non-null, this area is extracted from * the image and drawn at aDest. It's * in appunits. For best results it should * be aligned with image pixels. */ @@ -1507,17 +1507,17 @@ public: /** * Draw a whole image without tiling. * * @param aRenderingContext Where to draw the image, set up with an * appropriate scale and transform for drawing in * app units. * @param aImage The image. - * @param aDest The area that the image should fill + * @param aDest The area that the image should fill. * @param aDirty Pixels outside this area may be skipped. * @param aSVGContext If non-null, SVG-related rendering context * such as overridden attributes on the image * document's root <svg> node. Ignored for * raster images. * @param aImageFlags Image flags of the imgIContainer::FLAG_* * variety. * @param aSourceArea If non-null, this area is extracted from @@ -1614,17 +1614,17 @@ public: /** * Determine if a widget is likely to require transparency or translucency. * @param aBackgroundFrame The frame that the background is set on. For * <window>s, this will be the canvas frame. * @param aCSSRootFrame The frame that holds CSS properties affecting * the widget's transparency. For menupopups, * aBackgroundFrame and aCSSRootFrame will be the * same. - * @return a value suitable for passing to SetWindowTranslucency + * @return a value suitable for passing to SetWindowTranslucency. */ static nsTransparencyMode GetFrameTransparency(nsIFrame* aBackgroundFrame, nsIFrame* aCSSRootFrame); /** * A frame is a popup if it has its own floating window. Menus, panels * and combobox dropdowns are popups. */