From a05383ef1bcb35f182f5760e4ee2d81fb880eb23 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Sun, 20 Nov 2005 22:05:24 +0000 Subject: [PATCH] Bug 106386 Correct misspellings in source code patch by mats.palmgren@bredband.net r=dbaron sr=dbaron git-svn-id: svn://10.0.0.236/trunk@185018 18797224-902f-48f8-a5cc-f745e15eee43 --- .../canvas/src/nsCanvasRenderingContext2D.cpp | 2 +- mozilla/layout/base/nsBidi.cpp | 4 +-- mozilla/layout/base/nsCSSColorUtils.cpp | 2 +- mozilla/layout/base/nsCSSFrameConstructor.cpp | 22 ++++++++-------- mozilla/layout/base/nsCSSRendering.cpp | 6 ++--- mozilla/layout/base/nsChangeHint.h | 2 +- mozilla/layout/base/nsFrameManager.cpp | 2 +- mozilla/layout/base/nsIFrameSelection.h | 14 +++++----- mozilla/layout/base/nsPresContext.h | 4 +-- mozilla/layout/base/nsPresShell.cpp | 10 +++---- mozilla/layout/doc/DD-SpaceManager.html | 10 +++---- mozilla/layout/doc/HLD-SpaceManager.html | 16 ++++++------ mozilla/layout/doc/Layout_Overview.html | 8 +++--- mozilla/layout/doc/adding-style-props.html | 2 +- mozilla/layout/doc/dd-template.html | 4 +-- mozilla/layout/doc/debugtable.html | 4 +-- mozilla/layout/doc/overview.html | 2 +- .../layout/forms/nsComboboxControlFrame.cpp | 8 +++--- mozilla/layout/forms/nsFileControlFrame.cpp | 4 +-- mozilla/layout/forms/nsFormControlFrame.h | 2 +- .../layout/forms/nsHTMLButtonControlFrame.cpp | 4 +-- .../layout/forms/nsIComboboxControlFrame.h | 2 +- mozilla/layout/forms/nsIFormControlFrame.h | 2 +- mozilla/layout/forms/nsIsIndexFrame.cpp | 6 ++--- mozilla/layout/forms/nsListControlFrame.cpp | 8 +++--- mozilla/layout/forms/nsTextControlFrame.cpp | 6 ++--- .../layout/forms/resources/skin/select.css | 2 +- mozilla/layout/generic/nsBlockFrame.cpp | 26 +++++++++---------- mozilla/layout/generic/nsBlockFrame.h | 2 +- mozilla/layout/generic/nsBlockReflowState.cpp | 2 +- mozilla/layout/generic/nsColumnSetFrame.cpp | 4 +-- mozilla/layout/generic/nsContainerFrame.cpp | 2 +- mozilla/layout/generic/nsFrame.cpp | 22 ++++++++-------- mozilla/layout/generic/nsFrame.h | 2 +- mozilla/layout/generic/nsFrameFrame.cpp | 2 +- mozilla/layout/generic/nsGfxScrollFrame.cpp | 4 +-- mozilla/layout/generic/nsHTMLReflowState.cpp | 4 +-- mozilla/layout/generic/nsHTMLReflowState.h | 2 +- mozilla/layout/generic/nsIFrame.h | 2 +- mozilla/layout/generic/nsIFrameDebug.h | 2 +- mozilla/layout/generic/nsILineIterator.h | 4 +-- mozilla/layout/generic/nsImageFrame.cpp | 6 ++--- mozilla/layout/generic/nsInlineFrame.cpp | 2 +- mozilla/layout/generic/nsLineBox.h | 2 +- mozilla/layout/generic/nsLineLayout.cpp | 16 ++++++------ mozilla/layout/generic/nsObjectFrame.cpp | 4 +-- mozilla/layout/generic/nsReflowType.h | 2 +- mozilla/layout/generic/nsSelection.cpp | 24 ++++++++--------- .../layout/generic/nsSimplePageSequence.cpp | 4 +-- mozilla/layout/generic/nsSpaceManager.cpp | 4 +-- mozilla/layout/generic/nsTextFrame.cpp | 4 +-- mozilla/layout/generic/nsTextTransformer.h | 4 +-- .../mathml/base/src/mathfontPUA.properties | 2 +- .../layout/mathml/base/src/nsMathMLChar.cpp | 2 +- mozilla/layout/mathml/base/src/nsMathMLChar.h | 2 +- .../base/src/nsMathMLContainerFrame.cpp | 2 +- .../layout/mathml/base/src/nsMathMLFrame.cpp | 2 +- .../mathml/base/src/nsMathMLmfracFrame.cpp | 2 +- mozilla/layout/printing/nsPrintEngine.cpp | 24 ++++++++--------- mozilla/layout/printing/nsPrintEngine.h | 2 +- .../printing/nsPrintPreviewListener.cpp | 2 +- mozilla/layout/style/nsCSSStyleSheet.cpp | 2 +- mozilla/layout/style/nsDOMCSSValueList.cpp | 2 +- .../layout/svg/base/src/nsSVGRectFrame.cpp | 2 +- .../renderer/src/cairo/nsSVGCairoRegion.cpp | 2 +- .../src/libart/nsSVGLibartGradient.cpp | 2 +- .../tables/BasicTableLayoutStrategy.cpp | 2 +- mozilla/layout/tables/nsCellMap.cpp | 2 +- mozilla/layout/tables/nsTableCellFrame.cpp | 2 +- mozilla/layout/tables/nsTableColFrame.cpp | 2 +- mozilla/layout/tables/nsTableFrame.cpp | 6 ++--- mozilla/layout/tables/nsTableFrame.h | 2 +- mozilla/layout/tables/nsTableOuterFrame.cpp | 4 +-- mozilla/layout/tables/nsTablePainter.cpp | 2 +- mozilla/layout/tables/nsTableRowFrame.cpp | 2 +- .../layout/tables/nsTableRowGroupFrame.cpp | 8 +++--- mozilla/layout/xul/base/src/grid/nsGrid.cpp | 14 +++++----- .../base/src/grid/nsGridRowGroupLayout.cpp | 2 +- .../xul/base/src/grid/nsGridRowLayout.cpp | 4 +-- mozilla/layout/xul/base/src/nsBoxFrame.cpp | 4 +-- .../layout/xul/base/src/nsBoxLayoutState.cpp | 4 +-- .../xul/base/src/nsListBoxBodyFrame.cpp | 2 +- .../layout/xul/base/src/nsListBoxLayout.cpp | 2 +- mozilla/layout/xul/base/src/nsMenuFrame.cpp | 2 +- .../layout/xul/base/src/nsMenuPopupFrame.cpp | 2 +- .../xul/base/src/nsScrollbarButtonFrame.cpp | 2 +- mozilla/layout/xul/base/src/nsSliderFrame.cpp | 2 +- .../layout/xul/base/src/nsSplitterFrame.cpp | 2 +- .../layout/xul/base/src/nsSprocketLayout.cpp | 6 ++--- .../xul/base/src/tree/src/nsTreeBodyFrame.cpp | 4 +-- 90 files changed, 222 insertions(+), 222 deletions(-) diff --git a/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp b/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp index 01b9c41f286..8d868e0a231 100644 --- a/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -241,7 +241,7 @@ protected: // Member vars PRInt32 mWidth, mHeight; - // the canvas element informs us when its going away, + // the canvas element informs us when it's going away, // so these are not nsCOMPtrs nsICanvasElement* mCanvasElement; diff --git a/mozilla/layout/base/nsBidi.cpp b/mozilla/layout/base/nsBidi.cpp index eea27dd04eb..35e5f450d7e 100644 --- a/mozilla/layout/base/nsBidi.cpp +++ b/mozilla/layout/base/nsBidi.cpp @@ -132,7 +132,7 @@ static Flags flagO[2]={ DIRPROP_FLAG(LRO), DIRPROP_FLAG(RLO) }; * that look at immediately surrounding types. * * As a related topic, this implementation does not remove Boundary Neutral - * types from the input, but ignores them whereever this is relevant. + * types from the input, but ignores them whenever this is relevant. * For example, the loop for the resolution of the weak types reads * types until it finds a non-BN. * Also, explicit embedding codes are neither changed into BN nor removed. @@ -1092,7 +1092,7 @@ void nsBidi::ResolveImplicitLevels(PRInt32 aStart, PRInt32 aLimit, } /* perform (Nn) - here, - the character after the the neutrals is aEOR, which is either L or R */ + the character after the neutrals is aEOR, which is either L or R */ /* this is one iteration late for the neutrals */ if(neutralStart>=0) { /* diff --git a/mozilla/layout/base/nsCSSColorUtils.cpp b/mozilla/layout/base/nsCSSColorUtils.cpp index 8a6ad0e3e2a..632ea3d6bad 100644 --- a/mozilla/layout/base/nsCSSColorUtils.cpp +++ b/mozilla/layout/base/nsCSSColorUtils.cpp @@ -289,7 +289,7 @@ double h,f,percent; q = (PRUint16)(percent*(255-(aSat*f))); t = (PRUint16)(percent*(255-(aSat*(1.0-f)))); - // i is guarenteed to never be larger than 5. + // i is guaranteed to never be larger than 5. switch(i){ case 0: r = aValue; g = t; b = p;break; case 1: r = q; g = aValue; b = p;break; diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 82c57670d6f..6310b8ad06b 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -4099,7 +4099,7 @@ nsCSSFrameConstructor::ConstructTableForeignFrame(nsFrameConstructorState& aStat parentFrame == aState.mPseudoFrames.mCellInner.mFrame, "Weird parent in ConstructTableForeignFrame"); - // Push the parent as the floater containing block + // Push the parent as the float containing block nsFrameConstructorSaveState saveState; aState.PushFloatContainingBlock(parentFrame, saveState, PR_FALSE, PR_FALSE); @@ -5087,7 +5087,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsFrameConstructorState& aState, // Construct a frame-based combo box. // The frame-based combo box is built out of three parts. A display area, a button and // a dropdown list. The display area and button are created through anonymous content. - // The drop-down list's frame is created explicitly. The combobox frame shares it's content + // The drop-down list's frame is created explicitly. The combobox frame shares its content // with the drop-down list. PRUint32 flags = NS_BLOCK_SHRINK_WRAP | NS_BLOCK_SPACE_MGR; nsIFrame* comboboxFrame = NS_NewComboboxControlFrame(mPresShell, flags); @@ -5219,7 +5219,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsFrameConstructorState& aState, } /** - * Used to be InitializeScrollFrame but now its only used for the select tag + * Used to be InitializeScrollFrame but now it's only used for the select tag * But the select tag should really be fixed to use GFX scrollbars that can * be create with BuildScrollFrame. */ @@ -6412,7 +6412,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsFrameConstructorState& aState, // if our parent is a block frame then do things the way html likes it // if not then we are in a box so do what boxes like. On example is boxes // do not support the absolute positioning of their children. While html blocks - // thats why we call different things here. + // that's why we call different things here. nsIAtom* frameType = geometricParent->GetType(); if ((frameType == nsLayoutAtoms::blockFrame) || (frameType == nsLayoutAtoms::areaFrame)) { @@ -7681,7 +7681,7 @@ nsCSSFrameConstructor::ConstructSVGFrame(nsFrameConstructorState& aState, #ifdef MOZ_SVG_FOREIGNOBJECT if (aTag == nsSVGAtoms::foreignObject) { // Claim to be relatively positioned so that we end up being the - // absolute containing block. Also, push "null" as the floater + // absolute containing block. Also, push "null" as the float // containing block so that we get the SPACE_MGR bit set. nsFrameConstructorSaveState saveState; aState.PushFloatContainingBlock(nsnull, saveState, PR_FALSE, PR_FALSE); @@ -9356,12 +9356,12 @@ nsCSSFrameConstructor::ContentInserted(nsIContent* aContainer, // In order to shave off some cycles, we only dig up the // containing block haveFirst* flags if the parent frame where - // the insertion/append is occuring is an inline or block + // the insertion/append is occurring is an inline or block // container. For other types of containers this isn't relevant. const nsStyleDisplay* parentDisplay = parentFrame->GetStyleDisplay(); // Examine the parentFrame where the insertion is taking - // place. If its a certain kind of container then some special + // place. If it's a certain kind of container then some special // processing is done. if ((NS_STYLE_DISPLAY_BLOCK == parentDisplay->mDisplay) || (NS_STYLE_DISPLAY_LIST_ITEM == parentDisplay->mDisplay) || @@ -9577,7 +9577,7 @@ nsCSSFrameConstructor::ReinsertContent(nsIContent* aContainer, * * @param aRemovedFrame this is the frame that was removed from the * content model. As we recurse we need to remember this so we - * can check if out-of-flow frames are a descendent of the frame + * can check if out-of-flow frames are a descendant of the frame * being removed * @param aFrame the local subtree that is being deleted. This is initially * the same as aRemovedFrame, but as we recurse down the tree @@ -11569,7 +11569,7 @@ nsCSSFrameConstructor::HaveSpecialBlockStyle(nsIContent* aContent, * Request to process the child content elements and create frames. * * @param aContent the content object whose child elements to process - * @param aFrame the the associated with aContent. This will be the + * @param aFrame the frame associated with aContent. This will be the * parent frame (both content and geometric) for the flowed * child frames */ @@ -11898,7 +11898,7 @@ nsCSSFrameConstructor::InsertFirstLineFrames( } else { // Easy case: the regular insertion logic can insert the new - // frame because its a block frame. + // frame because it's a block frame. } } } @@ -12746,7 +12746,7 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState, // This inline frame contains several types of children. Therefore // this frame has to be chopped into several pieces. We will produce // as a result of this 3 lists of children. The first list contains - // all of the inline children that preceed the first block child + // all of the inline children that precede the first block child // (and may be empty). The second list contains all of the block // children and any inlines that are between them (and must not be // empty, otherwise - why are we here?). The final list contains all diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index 0842a978f34..aff63d4a674 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -1853,7 +1853,7 @@ void nsCSSRendering::DrawCompositeSide(nsIRenderingContext& aRenderingContext, // Alternatively we could add support for a -moz-border-diagonal property, which is // what this code actually draws (instead of a curve). - // determine the the number of pixels we need to draw for this side + // determine the number of pixels we need to draw for this side // and the start and end radii nscoord shrinkage, startRadius, endRadius; if (aWhichSide == NS_SIDE_TOP) { @@ -3092,11 +3092,11 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, start. Always negative or zero. x = x0 and y0 in the code. The point at which tiling must start - so that the fewest tiles are laid out while completly + so that the fewest tiles are laid out while completely covering the dirtyRect area. z = x1 and y1 in the code. The point at which tiling must end so - that the fewest tiles are laid out while completly covering + that the fewest tiles are laid out while completely covering the dirtyRect area. w = the width of the tile (tileWidth). diff --git a/mozilla/layout/base/nsChangeHint.h b/mozilla/layout/base/nsChangeHint.h index 0510d56b358..1503a8f0c1f 100644 --- a/mozilla/layout/base/nsChangeHint.h +++ b/mozilla/layout/base/nsChangeHint.h @@ -104,7 +104,7 @@ inline PRBool NS_IsHintSubset(nsChangeHint aSubset, nsChangeHint aSuperSet) { /** * |nsReStyleHint| is a bitfield for the result of |HasStateDependentStyle| * and |HasAttributeDependentStyle|. All values have an implied "and - * descendants." When no restyling is necesary, use |nsReStyleHint(0)|. + * descendants." When no restyling is necessary, use |nsReStyleHint(0)|. */ enum nsReStyleHint { eReStyle_Self = 0x1, diff --git a/mozilla/layout/base/nsFrameManager.cpp b/mozilla/layout/base/nsFrameManager.cpp index ddbb84aeade..e5862c3a1c2 100644 --- a/mozilla/layout/base/nsFrameManager.cpp +++ b/mozilla/layout/base/nsFrameManager.cpp @@ -1327,7 +1327,7 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext, ReResolveStyleContext(aPresContext, child, content, aChangeList, aMinChange); } else { - NOISY_TRACE_FRAME("child frame already resolved as descendent, skipping",aFrame); + NOISY_TRACE_FRAME("child frame already resolved as descendant, skipping",aFrame); } } } diff --git a/mozilla/layout/base/nsIFrameSelection.h b/mozilla/layout/base/nsIFrameSelection.h index 58d8cbe2272..4e5155cdcda 100644 --- a/mozilla/layout/base/nsIFrameSelection.h +++ b/mozilla/layout/base/nsIFrameSelection.h @@ -73,7 +73,7 @@ struct SelectionDetails }; /*PeekOffsetStruct - * @param mShell is used to get the PresContext usefull for measuring text ect. + * @param mShell is used to get the PresContext useful for measuring text etc. * @param mDesiredX is the "desired" location of the new caret * @param mAmount eWord, eCharacter, eLine * @param mDirection enum defined in this file to be eForward or eBackward @@ -83,7 +83,7 @@ struct SelectionDetails * @param mResultFrame resulting frame for peeking * @param mEatingWS boolean to tell us the state of our search for Next/Prev * @param mPreferLeft true = prev line end, false = next line begin - * @param mJumpLines if this is true then its ok to cross lines while peeking + * @param mJumpLines if this is true then it's ok to cross lines while peeking * @param mScrollViewStop if this is true then stop peeking across scroll view boundary */ struct nsPeekOffsetStruct @@ -136,10 +136,10 @@ public: /** Init will initialize the frame selector with the necessary pres shell to * be used by most of the methods - * @param aShell is the parameter to be used for most of the other calls for callbacks ect + * @param aShell is the parameter to be used for most of the other calls for callbacks etc * @param aLimiter limits the selection to nodes with aLimiter parents */ - NS_IMETHOD Init(nsIPresShell *aShell, nsIContent *aLimiter) = 0; //default since this isnt used for embedding + NS_IMETHOD Init(nsIPresShell *aShell, nsIContent *aLimiter) = 0; //default since this isn't used for embedding /* SetScrollableView sets the scroll view * @param aScrollView is the scroll view for this selection. @@ -182,7 +182,7 @@ public: * @param aMultipleSelection will tell the frame selector to replace /or not the old selection. * cannot coexist with aContinueSelection * @param aHint will tell the selection which direction geometrically to actually show the caret on. - * 1 = end of this line 0 = beggining of this line + * 1 = end of this line 0 = beginning of this line */ NS_IMETHOD HandleClick(nsIContent *aNewFocus, PRUint32 aContentOffset, PRUint32 aContentEndOffset , PRBool aContinueSelection, PRBool aMultipleSelection, PRBool aHint) = 0; @@ -204,7 +204,7 @@ public: * TABLESELECTION_COLUMN We should select a row (content points to any cell in column) * TABLESELECTION_TABLE We should select a table (content points to the table) * TABLESELECTION_ALLCELLS We should select all cells (content points to any cell in table) - * @param aMouseEvent passed in so we we can get where event occured and what keys are pressed + * @param aMouseEvent passed in so we can get where event occurred and what keys are pressed */ NS_IMETHOD HandleTableSelection(nsIContent *aParentContent, PRInt32 aContentOffset, PRInt32 aTarget, nsMouseEvent *aMouseEvent) = 0; @@ -369,7 +369,7 @@ public: * when the user clicks over an existing selection. A aDelay * value of PR_TRUE means delay clearing the selection and * placing the caret until MouseUp, when the user clicks over - * an existing selection. This is especially usefull when applications + * an existing selection. This is especially useful when applications * want to support Drag & Drop of the current selection. A value * of PR_FALSE means place the caret immediately. If the application * never calls this method, the nsIFrameSelection implementation diff --git a/mozilla/layout/base/nsPresContext.h b/mozilla/layout/base/nsPresContext.h index 684997a951b..41c83b7d607 100644 --- a/mozilla/layout/base/nsPresContext.h +++ b/mozilla/layout/base/nsPresContext.h @@ -243,7 +243,7 @@ public: #endif /** - * Get the default font correponding to the given ID. This object is + * Get the default font corresponding to the given ID. This object is * read-only, you must copy the font to modify it. */ virtual NS_HIDDEN_(const nsFont*) GetDefaultFontExternal(PRUint8 aFontID) const; @@ -466,7 +466,7 @@ public: } /** - * Set and get methods for controling the background drawing + * Set and get methods for controlling the background drawing */ PRBool GetBackgroundImageDraw() const { return mDrawImageBackground; } void SetBackgroundImageDraw(PRBool aCanDraw) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 59d622c7eda..d8e33cd8ef6 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -468,7 +468,7 @@ private: // our stack of mark where push has been called StackMark* mMarks; - // the current top of the the mark list + // the current top of the mark list PRUint32 mStackTop; // the size of the mark array @@ -3114,7 +3114,7 @@ NS_IMETHODIMP PresShell::LineMove(PRBool aForward, PRBool aExtend) { nsresult result = mSelection->LineMove(aForward, aExtend); -// if we cant go down/up any more we must then move caret completely to +// if we can't go down/up any more we must then move caret completely to // end/beginning respectively. if (NS_FAILED(result)) result = CompleteMove(aForward,aExtend); @@ -3993,7 +3993,7 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, PRBool aScroll) content = content->GetChildAt(0); } nsCOMPtr node(do_QueryInterface(content)); - NS_ASSERTION(node, "No nsIDOMNode for descendent of anchor"); + NS_ASSERTION(node, "No nsIDOMNode for descendant of anchor"); jumpToRange->SelectNodeContents(node); } } @@ -4518,7 +4518,7 @@ PresShell::CaptureHistoryState(nsILayoutHistoryState** aState, PRBool aLeavingPa nsIFrame* rootFrame = FrameManager()->GetRootFrame(); if (!rootFrame) return NS_OK; // Capture frame state for the root scroll frame - // Don't capture state when first creating doc element heirarchy + // Don't capture state when first creating doc element hierarchy // As the scroll position is 0 and this will cause us to loose // our previously saved place! if (aLeavingPage) { @@ -5985,7 +5985,7 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsIView *aView, // Treat focus/blur events as user input if they happen while // executing trusted script, or no script at all. If they // happen during execution of non-trusted script, then they - // should not be considerd user input. + // should not be considered user input. if (!nsContentUtils::IsCallerChrome()) { break; } diff --git a/mozilla/layout/doc/DD-SpaceManager.html b/mozilla/layout/doc/DD-SpaceManager.html index 0efbe60b1a9..3e8c936baec 100644 --- a/mozilla/layout/doc/DD-SpaceManager.html +++ b/mozilla/layout/doc/DD-SpaceManager.html @@ -9,7 +9,7 @@

Gecko Layout Detailed Design Document

-

Space Manger Detailed Design

+

Space Manager Detailed Design

Overview

@@ -25,14 +25,14 @@


nsSpaceManager

- The Space Manger is the central class is a group of classes that manage + The Space Manager is the central class is a group of classes that manage the occupied and available space that exists in horizontal bands across a canvas.  The primary goal of the Space Manager is to provide information about those bands of space to support the CSS notion of floated elements.

- There are three important parts to the Space Manger API: the parts that + There are three important parts to the Space Manager API: the parts that deal with the coordinate space of the Space Manager, the parts that deal with the regions managed by the Space Manager, and the parts that manage float impact intervals. @@ -321,7 +321,7 @@ private:

The Constructor requires a Presentation Shell, used for arena allocations mostly, and a frame that this Space Manager is rooted on.  The coordinate - space of this Space Manger is relative to the frame passed in to the constructor. + space of this Space Manager is relative to the frame passed in to the constructor.

  nsSpaceManager(nsIPresShell* aPresShell, nsIFrame* aFrame);
@@ -588,7 +588,7 @@ as available, and with a rect corresponding to the area remainin in the band
 
  
 

Algorithm 2: AddRectRegion

-Clients call into this method to notify the Space Manger that a new frame +Clients call into this method to notify the Space Manager that a new frame is occupying some space.
    diff --git a/mozilla/layout/doc/HLD-SpaceManager.html b/mozilla/layout/doc/HLD-SpaceManager.html index 895aad50570..910d6335058 100644 --- a/mozilla/layout/doc/HLD-SpaceManager.html +++ b/mozilla/layout/doc/HLD-SpaceManager.html @@ -38,7 +38,7 @@ job. The classes that are considered part of the Space Manager are:
Outside of the Space Manager itself, the clients of the Space Manager also play an inportant part in the management of he available and used space. - The primary classes that interact witht eh Space Manager are:
+ The primary classes that interact with the Space Manager are:
  • nsBlockReflowState
  • @@ -58,7 +58,7 @@ in nsBlockReflowState).  
    changes to floated elements.  This is referred to as Propagation of Float Damage and is handled by the Block Frame, making use of the Space Manager. When a float is incrementally reflowed, the Space -Manger is notified if the float's region has changed. If so, the +Manager is notified if the float's region has changed. If so, the vertical space that has been affected (including both the float's old region and the float's new region) is noted in the internal nsIntervalSet as potential float damage (the method is @@ -110,14 +110,14 @@ data.

    Use Case

    -

    Use Case 1: Space Manger is Created / Destroyed

    +

    Use Case 1: Space Manager is Created / Destroyed

    Space Manager instances are created in the nsBlockFrame's Reflow method.  

-The first column has already the minimum content width, the table column can't shrink below that, the desired content width of 540 twips, thats the space to layout cell 1 without wrapping the text and the 1230 which correspond to the style="width:80px" at the first cell. At this step the final size is 360 twips. +The first column has already the minimum content width, the table column can't shrink below that, the desired content width of 540 twips, that's the space to layout cell 1 without wrapping the text and the 1230 which correspond to the style="width:80px" at the first cell. At this step the final size is 360 twips.

diff --git a/mozilla/layout/doc/overview.html b/mozilla/layout/doc/overview.html index f84fddf8431..8794ae5c32b 100644 --- a/mozilla/layout/doc/overview.html +++ b/mozilla/layout/doc/overview.html @@ -167,7 +167,7 @@ information geared toward helping developers work on the system.  Tech Notes might contain information about  how code has been modified, how a new feature was added, how to debug a certain class of problem, how to use built-in debugging r logging facilities, or how to maintain or extend -unit tests.  The Tech Notes should be stored in a publibly accessable +unit tests.  The Tech Notes should be stored in a publicly accessible location, as a comment or attachment in a bugzilla bug, for example.  The text that holds the link should be descriptive of what the Tech Note addresses.

diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 1372ffe8c7c..b172da01814 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -342,7 +342,7 @@ nsComboboxControlFrame::nsComboboxControlFrame() mRecentSelectedIndex = -1; - //Shrink the area around it's contents + //Shrink the area around its contents //SetFlags(NS_BLOCK_SHRINK_WRAP); REFLOW_COUNTER_INIT() @@ -680,7 +680,7 @@ nsComboboxControlFrame::PositionDropdown(nsPresContext* aPresContext, // frame. // Note: As first glance, it appears that you could simply get the absolute bounding box for the - // dropdown list by first getting it's view, then getting the view's nsIWidget, then asking the nsIWidget + // dropdown list by first getting its view, then getting the view's nsIWidget, then asking the nsIWidget // for it's AbsoluteBounds. The problem with this approach, is that the dropdown lists y location can // change based on whether the dropdown is placed below or above the display frame. // The approach, taken here is to get use the absolute position of the display frame and use it's location @@ -1307,7 +1307,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext, // when this flow of control drops out of this if it will do a reflow // on the AreaFrame which SHOULD make it get tothe drop down // except that it is in the popup list, so we have it reflowed as - // a StyleChange, this is not as effecient as doing an Incremental + // a StyleChange, this is not as efficient as doing an Incremental // // At this point we want to by pass the reflow optimization in the dropdown // because we aren't why it is getting an incremental reflow, but we do @@ -1494,7 +1494,7 @@ nsComboboxControlFrame::Reflow(nsPresContext* aPresContext, nsMargin dspBorderPadding(0, 0, 0, 0); mDisplayFrame->CalcBorderPadding(dspBorderPadding); - // Substract dropdown's borderPadding from the width of the dropdown rect + // Subtract dropdown's borderPadding from the width of the dropdown rect // to get the size of the content area // // the height will come from the mDisplayFrame's height diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index f11d35406d6..16731699353 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -88,7 +88,7 @@ nsFileControlFrame::nsFileControlFrame(): mCachedState(nsnull), mDidPreDestroy(PR_FALSE) { - //Shrink the area around it's contents + //Shrink the area around its contents SetFlags(NS_BLOCK_SHRINK_WRAP); } @@ -485,7 +485,7 @@ nsFileControlFrame::SetInitialChildList(nsPresContext* aPresContext, { nsresult r = nsAreaFrame::SetInitialChildList(aPresContext, aListName, aChildList); - // given that the CSS frame constuctor created all our frames. We need to find the text field + // given that the CSS frame constructor created all our frames. We need to find the text field // so we can get info from it. mTextFrame = GetTextControlFrame(this); } diff --git a/mozilla/layout/forms/nsFormControlFrame.h b/mozilla/layout/forms/nsFormControlFrame.h index ab96f60906d..f17bc894338 100644 --- a/mozilla/layout/forms/nsFormControlFrame.h +++ b/mozilla/layout/forms/nsFormControlFrame.h @@ -165,7 +165,7 @@ public: virtual void ControlChanged(nsPresContext* aPresContext) {} /** - * Chance to Initialize to a defualt value + * Chance to Initialize to a default value */ virtual void InitializeControl(nsPresContext* aPresContext); diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 4f5ee1e9775..2153d9ed721 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -318,7 +318,7 @@ nsHTMLButtonControlFrame::Paint(nsPresContext* aPresContext, #else // temporary // XXX This is temporary - // clips to it's size minus the border + // clips to its size minus the border // but the real problem is the FirstChild (the AreaFrame) // isn't being constrained properly // Bug #17474 @@ -384,7 +384,7 @@ nsHTMLButtonControlFrame::Reflow(nsPresContext* aPresContext, nsIFrame* firstKid = mFrames.FirstChild(); nsSize availSize(aReflowState.mComputedWidth, NS_INTRINSICSIZE); - // Indent the child inside us by the the focus border. We must do this separate from the + // Indent the child inside us by the focus border. We must do this separate from the // regular border. nsMargin focusPadding = mRenderer.GetAddedButtonBorderAndPadding(); diff --git a/mozilla/layout/forms/nsIComboboxControlFrame.h b/mozilla/layout/forms/nsIComboboxControlFrame.h index 6b9b535cd8d..c6f5f0cb056 100644 --- a/mozilla/layout/forms/nsIComboboxControlFrame.h +++ b/mozilla/layout/forms/nsIComboboxControlFrame.h @@ -121,7 +121,7 @@ public: * the dropdown and it needs to roll up it has to decide whether to keep the current * selection or not. This method is used to get the current index in the combobox to * compare it to the current index in the dropdown to see if the combox has been updated - * and that way it knows whether to "cancel" the the current selection residing in the + * and that way it knows whether to "cancel" the current selection residing in the * dropdown. Or whether to leave the selection alone. */ NS_IMETHOD GetIndexOfDisplayArea(PRInt32* aSelectedIndex) = 0; diff --git a/mozilla/layout/forms/nsIFormControlFrame.h b/mozilla/layout/forms/nsIFormControlFrame.h index cad6d9a946e..109a79da23f 100644 --- a/mozilla/layout/forms/nsIFormControlFrame.h +++ b/mozilla/layout/forms/nsIFormControlFrame.h @@ -71,7 +71,7 @@ public: /** * Set the suggested size for the form element. - * This is used to control the size of the element during reflow if it hasn't had it's size + * This is used to control the size of the element during reflow if it hasn't had its size * explicitly set. * @param aWidth width of the form element * @param aHeight height of the form element diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index 635689405df..c8a70161eda 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -90,7 +90,7 @@ NS_NewIsIndexFrame(nsIPresShell* aPresShell) nsIsIndexFrame::nsIsIndexFrame() { - //Shrink the area around it's contents + //Shrink the area around its contents SetFlags(NS_BLOCK_SHRINK_WRAP | NS_BLOCK_SPACE_MGR); } @@ -98,8 +98,8 @@ nsIsIndexFrame::~nsIsIndexFrame() { // remove ourself as a listener of the text control (bug 40533) if (mInputContent) { - nsCOMPtr reciever(do_QueryInterface(mInputContent)); - reciever->RemoveEventListenerByIID(this, NS_GET_IID(nsIDOMKeyListener)); + nsCOMPtr receiver(do_QueryInterface(mInputContent)); + receiver->RemoveEventListenerByIID(this, NS_GET_IID(nsIDOMKeyListener)); } } diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index d4103ddec3a..b09343e7326 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -912,8 +912,8 @@ nsListControlFrame::Reflow(nsPresContext* aPresContext, nscoord visibleHeight = 0; if (isInDropDownMode) { // Compute the visible height of the drop-down list - // The dropdown list height is the smaller of it's height setting or the height - // of the smallest box that can drawn around it's contents. + // The dropdown list height is the smaller of its height setting or the height + // of the smallest box that can drawn around its contents. visibleHeight = scrolledAreaHeight; mNumDisplayRows = kMaxDropDownRows; @@ -1953,7 +1953,7 @@ nsListControlFrame::DoneAddingChildren(PRBool aIsDone) // for all the content. // If so, then we can initialize; if (mIsAllFramesHere == PR_FALSE) { - // if all the frames are now present we can initalize + // if all the frames are now present we can initialize if (CheckIfAllFramesHere()) { mHasBeenInitialized = PR_TRUE; ResetList(PR_TRUE); @@ -2220,7 +2220,7 @@ nsListControlFrame::SyncViewWithFrame() { // Resync the view's position with the frame. // The problem is the dropdown's view is attached directly under - // the root view. This means it's view needs to have it's coordinates calculated + // the root view. This means its view needs to have its coordinates calculated // as if it were in it's normal position in the view hierarchy. mComboboxFrame->AbsolutelyPositionDropDown(); diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index e040586b263..025935e88bb 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -105,8 +105,8 @@ #include "nsIDOMCharacterData.h" //for selection setting helper func #include "nsIDOMNodeList.h" //for selection setting helper func #include "nsIDOMRange.h" //for selection setting helper func -#include "nsIScriptGlobalObject.h" //needed for notify selection changed to update the menus ect. -#include "nsIDOMWindowInternal.h" //needed for notify selection changed to update the menus ect. +#include "nsIScriptGlobalObject.h" //needed for notify selection changed to update the menus etc. +#include "nsIDOMWindowInternal.h" //needed for notify selection changed to update the menus etc. #include "nsITextContent.h" //needed to create initial text control content #ifdef ACCESSIBILITY #include "nsIAccessibilityService.h" @@ -2012,7 +2012,7 @@ nsTextControlFrame::CreateAnonymousContent(nsPresContext* aPresContext, if (mSelCon) { //do not turn caret enabled off at this time. the caret will behave - //dependant on the focused frame it is in. disabling it here has + //dependent on the focused frame it is in. disabling it here has //an adverse affect on the browser in caret display mode or the editor //when a readonly/disabled text form is in the page. bug 141888 //mSelCon->SetCaretEnabled(PR_FALSE); diff --git a/mozilla/layout/forms/resources/skin/select.css b/mozilla/layout/forms/resources/skin/select.css index 20eb2b2935e..aaa792f7d38 100644 --- a/mozilla/layout/forms/resources/skin/select.css +++ b/mozilla/layout/forms/resources/skin/select.css @@ -51,7 +51,7 @@ select[size] { } xul|*.select-treebody::-moz-tree-row { -/* -moz-apperance: treeitem; */ +/* -moz-appearance: treeitem; */ border: 1px solid transparent; } diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index e26b75c4768..f98cc668a87 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -1344,7 +1344,7 @@ nsBlockFrame::ComputeFinalSize(const nsHTMLReflowState& aReflowState, if (!aState.GetFlag(BRS_ISBOTTOMMARGINROOT)) { // Apply rule from CSS 2.1 section 8.3.1. If we have some empty // line with clearance and a non-zero top margin and all - // subsequent lines are empty, then we do not allow our childrens' + // subsequent lines are empty, then we do not allow our children's // carried out bottom margin to be carried out of us and collapse // with our own bottom margin. if (CheckForCollapsedBottomMarginFromClearanceLine()) { @@ -1696,7 +1696,7 @@ nsBlockFrame::MarkLineDirty(line_iterator aLine) } #endif - // Mark previous line dirty if its an inline line so that it can + // Mark previous line dirty if it's an inline line so that it can // maybe pullup something from the line just affected. // XXX We don't need to do this if aPrevLine ends in a break-after... if (aLine != mLines.front() && @@ -3161,7 +3161,7 @@ nsBlockFrame::ShouldApplyTopMargin(nsBlockReflowState& aState, // Determine if this line is "essentially" the first line for (line_iterator line = begin_lines(); line != aLine; ++line) { if (!line->CachedIsEmpty() || line->HasClearance()) { - // A line which preceeds aLine is non-empty, or has clearance, + // A line which precedes aLine is non-empty, or has clearance, // so therefore the top margin applies. aState.SetFlag(BRS_APPLYTOPMARGIN, PR_TRUE); return PR_TRUE; @@ -3267,7 +3267,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState, // See if we should apply the top margin. If the block frame being // reflowed is a continuation (non-null prev-in-flow) then we don't - // apply its top margin because its not significant. Otherwise, dig + // apply its top margin because it's not significant. Otherwise, dig // deeper. PRBool applyTopMargin = !frame->GetPrevInFlow() && ShouldApplyTopMargin(aState, aLine); @@ -3647,7 +3647,7 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState, // first line box. // // There are exactly two places a bullet can be placed: near the - // first or second line. Its only placed on the second line in a + // first or second line. It's only placed on the second line in a // rare case: an empty first line followed by a second line that // contains a block (example:
  • \n

    ... ). This is where // the second case can happen. @@ -4092,7 +4092,7 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState, // Break-before cases. if (aFrame == aLine->mFirstChild) { // If we break before the first frame on the line then we must - // be trying to place content where theres no room (e.g. on a + // be trying to place content where there's no room (e.g. on a // line with wide floats). Inform the caller to reflow the // line after skipping past a float. *aLineReflowStatus = LINE_REFLOW_REDO; @@ -4379,7 +4379,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, // first line box. // // There are exactly two places a bullet can be placed: near the - // first or second line. Its only placed on the second line in a + // first or second line. It's only placed on the second line in a // rare case: an empty first line followed by a second line that // contains a block (example:

  • \n

    ... ). // @@ -4521,7 +4521,7 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, newY > aState.mBottomEdge && aState.mBottomEdge != NS_UNCONSTRAINEDSIZE && !aUpdateMaximumWidth) { - // Push this line and all of it's children and anything else that + // Push this line and all of its children and anything else that // follows to our next-in-flow NS_ASSERTION((aState.mCurrentLine == aLine), "oops"); PushLines(aState, aLine.prev()); @@ -5313,7 +5313,7 @@ nsBlockFrame::AddFrames(nsIFrame* aFrameList, if (aPrevSibling) { // XXX_perf This is technically O(N^2) in some cases, but by using // RFind instead of Find, we make it O(N) in the most common case, - // which is appending cotent. + // which is appending content. // Find the line that contains the previous sibling if (! nsLineBox::RFindLineContaining(aPrevSibling, @@ -5864,7 +5864,7 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState, // round down to twips per pixel so that we fit // needed when prev. float has procentage width // (maybe is a table flaw that makes table chose to round up - // but i don't want to change that, too risky) + // but I don't want to change that, too risky) nscoord twp = aState.mPresContext->IntScaledPixelsToTwips(1); availWidth -= availWidth % twp; } @@ -6632,7 +6632,7 @@ nsBlockFrame::HandleEvent(nsPresContext* aPresContext, if (NS_SUCCEEDED(result) && pos.mResultFrame){ if (result == NS_OK) - it = do_QueryInterface(pos.mResultFrame, &result);//if this fails thats ok + it = do_QueryInterface(pos.mResultFrame, &result);//if this fails that's ok resultFrame = pos.mResultFrame; mainframe = resultFrame; } @@ -7346,7 +7346,7 @@ nsBlockFrame::ReflowBullet(nsBlockReflowState& aState, reason = eReflowReason_Resize; } - // ...unless its an incremental `style changed' reflow targeted at + // ...unless it's an incremental `style changed' reflow targeted at // the block, in which case, we propagate that to its children. nsHTMLReflowCommand *command = rs.path->mReflowCommand; if (command) { @@ -7418,7 +7418,7 @@ void nsBlockFrame::CollectFloats(nsIFrame* aFrame, nsFrameList& aList, nsIFrame* } } -//XXX get rid of this -- its slow +//XXX get rid of this -- it's slow void nsBlockFrame::BuildFloatList(nsBlockReflowState& aState) { diff --git a/mozilla/layout/generic/nsBlockFrame.h b/mozilla/layout/generic/nsBlockFrame.h index 22350fb1242..2f645feea16 100644 --- a/mozilla/layout/generic/nsBlockFrame.h +++ b/mozilla/layout/generic/nsBlockFrame.h @@ -341,7 +341,7 @@ protected: } /** move the frames contained by aLine by aDY - * if aLine is a block, it's child floats are added to the state manager + * if aLine is a block, its child floats are added to the state manager */ void SlideLine(nsBlockReflowState& aState, nsLineBox* aLine, nscoord aDY); diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 2df7e9603dc..6c80cb993f0 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -826,7 +826,7 @@ nsBlockReflowState::FlowAndPlaceFloat(nsFloatCache* aFloatCache, // ``above'' another float that preceded it in the flow. mY = NS_MAX(mSpaceManager->GetLowestRegionTop() + BorderPadding().top, mY); - // See if the float should clear any preceeding floats... + // See if the float should clear any preceding floats... if (NS_STYLE_CLEAR_NONE != floatDisplay->mBreakType) { // XXXldb Does this handle vertical margins correctly? mY = ClearFloats(mY, floatDisplay->mBreakType); diff --git a/mozilla/layout/generic/nsColumnSetFrame.cpp b/mozilla/layout/generic/nsColumnSetFrame.cpp index dbcc87e7a76..a28a55e94d7 100644 --- a/mozilla/layout/generic/nsColumnSetFrame.cpp +++ b/mozilla/layout/generic/nsColumnSetFrame.cpp @@ -237,7 +237,7 @@ nsColumnSetFrame::ChooseColumnStrategy(const nsHTMLReflowState& aReflowState) if (colStyle->mColumnWidth.GetUnit() == eStyleUnit_Coord) { colWidth = colStyle->mColumnWidth.GetCoordValue(); - // Reduce column count if necesary to make columns fit in the + // Reduce column count if necessary to make columns fit in the // available width. Compute max number of columns that fit in // availContentWidth, satisfying colGap*(maxColumns - 1) + // colWidth*maxColumns <= availContentWidth @@ -709,7 +709,7 @@ nsColumnSetFrame::Reflow(nsPresContext* aPresContext, kidReason = eReflowReason_StyleChange; break; - // if its a dirty type then reflow us with a dirty reflow + // if it's a dirty type then reflow us with a dirty reflow case eReflowType_ReflowDirty: kidReason = eReflowReason_Dirty; break; diff --git a/mozilla/layout/generic/nsContainerFrame.cpp b/mozilla/layout/generic/nsContainerFrame.cpp index 32c81fb54b6..c621ff7a886 100644 --- a/mozilla/layout/generic/nsContainerFrame.cpp +++ b/mozilla/layout/generic/nsContainerFrame.cpp @@ -210,7 +210,7 @@ nsContainerFrame::Paint(nsPresContext* aPresContext, } // Paint the children of a container, assuming nothing about the -// childrens spatial arrangement. Given relative positioning, negative +// children's spatial arrangement. Given relative positioning, negative // margins, etc, that's probably a good thing. // // Note: aDirtyRect is in our coordinate system (and of course, child diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 1c19c05874b..bac8cdffe5a 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -375,7 +375,7 @@ SelectionImageService::CreateImage(nscolor aImageColor, imgIContainer *aContaine image->GetImageBytesPerRow(&bpr); image->GetAlphaBytesPerRow(&abpr); - //its better to temporarily go after heap than put big data on stack + //it's better to temporarily go after heap than put big data on stack unsigned char *row_data = (unsigned char *)malloc(bpr); if (!row_data) return NS_ERROR_OUT_OF_MEMORY; @@ -1138,7 +1138,7 @@ nsFrame::FrameOrParentHasSpecialSelectionStyle(PRUint8 aSelectionStyle, nsIFrame NS_IMETHODIMP nsFrame::IsSelectable(PRBool* aSelectable, PRUint8* aSelectStyle) const { - if (!aSelectable) //its ok if aSelectStyle is null + if (!aSelectable) //it's ok if aSelectStyle is null return NS_ERROR_NULL_POINTER; // Like 'visibility', we must check all the parents: if a parent @@ -1234,7 +1234,7 @@ ContentContainsPoint(nsPresContext *aPresContext, while (frame) { // Get the frame's rect and make it relative to the - // upper left corner of it's parent view. + // upper left corner of its parent view. nsRect frameRect = frame->GetRect(); frameRect.x = offsetPoint.x; @@ -3147,7 +3147,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext, result = it->GetNumLines(&countLines); if (aOutSideLimit > 0) //start at end searchingLine = countLines; - else if (aOutSideLimit <0)//start at begining + else if (aOutSideLimit <0)//start at beginning searchingLine = -1;//"next" will be 0 else if ((aPos->mDirection == eDirPrevious && searchingLine == 0) || @@ -3763,7 +3763,7 @@ nsFrame::PeekOffset(nsPresContext* aPresContext, nsPeekOffsetStruct *aPos) int edgeCase = 0;//no edge case. this should look at thisLine PRBool doneLooping = PR_FALSE;//tells us when no more block frames hit. - //this part will find a frame or a block frame. if its a block frame + //this part will find a frame or a block frame. if it's a block frame //it will "drill down" to find a viable frame or it will return an error. nsIFrame *lastFrame = this; do { @@ -3792,7 +3792,7 @@ nsFrame::PeekOffset(nsPresContext* aPresContext, nsPeekOffsetStruct *aPos) /* SPECIAL CHECK FOR TABLE NAVIGATION tables need to navigate also and the frame that supports it is nsTableRowGroupFrame which is INSIDE nsTableOuterFrame. if we have stumbled onto an nsTableOuter we need to drill into nsTableRowGroup - if we hit a header or footer thats ok just go into them, + if we hit a header or footer that's ok just go into them, */ PRBool searchTableBool = PR_FALSE; if (aPos->mResultFrame->GetType() == nsLayoutAtoms::tableOuterFrame || @@ -4081,7 +4081,7 @@ nsFrame::GetFrameFromDirection(nsPresContext* aPresContext, nsPeekOffsetStruct * return result; if (!isupports) return NS_ERROR_NULL_POINTER; - //we must CAST here to an nsIFrame. nsIFrame doesnt really follow the rules + //we must CAST here to an nsIFrame. nsIFrame doesn't really follow the rules //for speed reasons #ifndef IBMBIDI nsIFrame *newFrame = (nsIFrame *)isupports; @@ -4769,7 +4769,7 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState) NS_ASSERTION(reason != eReflowReason_Incremental || path, "HandleIncrementalReflow should have changed the reason to dirty."); - // If we don't have any HTML constraints and its a resize, then nothing in the block + // If we don't have any HTML constraints and it's a resize, then nothing in the block // could have changed, so no refresh is necessary. nsBoxLayoutMetrics* metrics = BoxMetrics(); if (!DoesNeedRecalc(metrics->mBlockPrefSize) && reason == eReflowReason_Resize) @@ -4908,7 +4908,7 @@ nsFrame::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize) metrics->mPrefSize = metrics->mBlockPrefSize; // notice we don't need to add our borders or padding - // in. Thats because the block did it for us. + // in. That's because the block did it for us. // but we do need to add insets so debugging will work. AddInset(metrics->mPrefSize); nsIBox::AddCSSPrefSize(aState, this, metrics->mPrefSize); @@ -5453,7 +5453,7 @@ nsFrame::HandleIncrementalReflow(nsBoxLayoutState& aState, { // if the child we are reflowing is the child we popped off the incremental // reflow chain then we need to reflow it no matter what. - // if its not the child we got from the reflow chain then this child needs reflow + // if it's not the child we got from the reflow chain then this child needs reflow // because as a side effect of the incremental child changing size it needs to be resized. // This will happen a lot when a box that contains 2 children with different flexibilities // if on child gets bigger the other is affected because it is proprotional to the first. @@ -5517,7 +5517,7 @@ nsFrame::HandleIncrementalReflow(nsBoxLayoutState& aState, aNeedsReflow = BoxMetrics()->mStyleChange || (childState & NS_FRAME_IS_DIRTY) || (childState & NS_FRAME_HAS_DIRTY_CHILDREN); break; - // if its an initial reflow we must place the child. + // if it's an initial reflow we must place the child. // otherwise we might think it was already placed when it wasn't case eReflowReason_Initial: aMoveFrame = PR_TRUE; diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index 5991f4bd6da..2a465772a12 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -462,7 +462,7 @@ protected: PRInt16 DisplaySelection(nsPresContext* aPresContext, PRBool isOkToTurnOn = PR_FALSE); - //this will modify aPos and return the next frame ect. + //this will modify aPos and return the next frame etc. NS_IMETHOD GetFrameFromDirection(nsPresContext* aPresContext, nsPeekOffsetStruct *aPos); // Style post processing hook diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index d888ecc8063..d2a03854108 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -298,7 +298,7 @@ nsSubDocumentFrame::GetDesiredSize(nsPresContext* aPresContext, float p2t = 0; if (!mContent->IsContentOfType(nsIContent::eXUL)) // If no width/height was specified, use 300/150. - // This is for compatability with IE. + // This is for compatibility with IE. p2t = aPresContext->ScaledPixelsToTwips(); if (NS_UNCONSTRAINEDSIZE != aReflowState.mComputedWidth) { diff --git a/mozilla/layout/generic/nsGfxScrollFrame.cpp b/mozilla/layout/generic/nsGfxScrollFrame.cpp index ce48e7b5bc6..500773d8b43 100644 --- a/mozilla/layout/generic/nsGfxScrollFrame.cpp +++ b/mozilla/layout/generic/nsGfxScrollFrame.cpp @@ -1477,8 +1477,8 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const /** * this code is resposible for restoring the scroll position back to some - * saved positon. if the user has not moved the scroll position manually - * we keep scrolling down until we get to our orignally position. keep in + * saved position. if the user has not moved the scroll position manually + * we keep scrolling down until we get to our original position. keep in * mind that content could incrementally be coming in. we only want to stop * when we reach our new position. */ diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 3590fe90d5f..d5468ba184b 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -267,7 +267,7 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext, #endif // IBMBIDI } -// Version that species the containing block width and height +// Version that specifies the containing block width and height nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext, const nsHTMLReflowState& aParentReflowState, nsIFrame* aFrame, @@ -1673,7 +1673,7 @@ static eNormalLineHeightControl GetNormalLineHeightCalcControl(void) { if (sNormalLineHeightControl == eUninitialized) { // browser.display.normal_lineheight_calc_control is not user - // changable, so no need to register callback for it. + // changeable, so no need to register callback for it. sNormalLineHeightControl = NS_STATIC_CAST(eNormalLineHeightControl, nsContentUtils::GetIntPref("browser.display.normal_lineheight_calc_control", eNoExternalLeading)); diff --git a/mozilla/layout/generic/nsHTMLReflowState.h b/mozilla/layout/generic/nsHTMLReflowState.h index 39d7387318b..0555d2c90aa 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.h +++ b/mozilla/layout/generic/nsHTMLReflowState.h @@ -74,7 +74,7 @@ struct nsHypotheticalBox; */ enum nsReflowReason { eReflowReason_Initial = 0, // initial reflow of a newly created frame - eReflowReason_Incremental = 1, // an incremental change has occured. see the reflow command for details + eReflowReason_Incremental = 1, // an incremental change has occurred. see the reflow command for details eReflowReason_Resize = 2, // general request to determine a desired size eReflowReason_StyleChange = 3, // request to reflow because of a style change. Note: you must reflow // all your child frames diff --git a/mozilla/layout/generic/nsIFrame.h b/mozilla/layout/generic/nsIFrame.h index 11cf620ee80..c235467279c 100644 --- a/mozilla/layout/generic/nsIFrame.h +++ b/mozilla/layout/generic/nsIFrame.h @@ -782,7 +782,7 @@ public: * Get the frame that should receive events for a given point in the * coordinate space of this frame, if the frame is painted in * the given paint layer. A frame should return itself if it should - * recieve the events. A successful return value indicates that a + * receive the events. A successful return value indicates that a * point was found. */ virtual nsIFrame* GetFrameForPoint(const nsPoint& aPoint, diff --git a/mozilla/layout/generic/nsIFrameDebug.h b/mozilla/layout/generic/nsIFrameDebug.h index 065bcb04b42..c760869f252 100644 --- a/mozilla/layout/generic/nsIFrameDebug.h +++ b/mozilla/layout/generic/nsIFrameDebug.h @@ -72,7 +72,7 @@ public: NS_IMETHOD_(nsFrameState) GetDebugStateBits() const = 0; /** * Called to dump out regression data that describes the layout - * of the frame and it's children, and so on. The format of the + * of the frame and its children, and so on. The format of the * data is dictated to be XML (using a specific DTD); the * specific kind of data dumped is up to the frame itself, with * the caveat that some base types are defined. diff --git a/mozilla/layout/generic/nsILineIterator.h b/mozilla/layout/generic/nsILineIterator.h index d868a4c55b5..391343011fc 100644 --- a/mozilla/layout/generic/nsILineIterator.h +++ b/mozilla/layout/generic/nsILineIterator.h @@ -54,7 +54,7 @@ // // NOTE: while you can get this interface by doing a slezy hacky // QueryInterface on block frames, it isn't like a normal com -// interface: its not reflexive (you can't query back to the block +// interface: it's not reflexive (you can't query back to the block // frame) and unlike other frames, it *IS* reference counted so don't // forget to NS_RELEASE it when you are done with it! @@ -98,7 +98,7 @@ public: nsRect& aLineBounds, PRUint32* aLineFlags) = 0; - // Given a frame thats a child of the block, find which line its on + // Given a frame that's a child of the block, find which line its on // and return that line index into aIndexResult. aIndexResult will // be set to -1 if the frame cannot be found. NS_IMETHOD FindLineContaining(nsIFrame* aFrame, diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 06660cb5101..4d8b2e8ed62 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -455,7 +455,7 @@ nsImageFrame::ShouldCreateImageFrameFor(nsIContent* aContent, } // Check if we want to use a placeholder box with an icon or just - // let the the presShell make us into inline text. Decide as follows: + // let the presShell make us into inline text. Decide as follows: // // - if our special "force icons" style is set, show an icon // - else if our "do not show placeholders" pref is set, skip the icon @@ -634,7 +634,7 @@ nsImageFrame::OnStopDecode(imgIRequest *aRequest, mIntrinsicSize.SizeTo(0, 0); } - if (mState & IMAGE_GOTINITIALREFLOW) { // do nothing if we havn't gotten the inital reflow yet + if (mState & IMAGE_GOTINITIALREFLOW) { // do nothing if we haven't gotten the initial reflow yet if (!(mState & IMAGE_SIZECONSTRAINED) && intrinsicSizeChanged) { NS_ASSERTION(mParent, "No parent to pass the reflow request up to."); if (mParent && presShell) { @@ -1197,7 +1197,7 @@ nsImageFrame::DisplayAltFeedback(nsPresContext* aPresContext, } } - // if we could not draw the image, then just draw some grafitti + // if we could not draw the image, then just draw some graffiti if (!iconUsed) { nscolor oldColor; aRenderingContext.DrawRect(0,0,size,size); diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index f7aae4e6faf..30629377c2e 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -492,7 +492,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext, if (irs.mSetParentPointer) { frame->SetParent(this); - // We also need to check if frame has a next-in-flow. It it does, then set + // We also need to check if frame has a next-in-flow. If it does, then set // its parent frame pointer, too. Otherwise, if we reflow frame and it's // complete we'll fail when deleting its next-in-flow which is no longer // needed. This scenario doesn't happen often, but it can happen diff --git a/mozilla/layout/generic/nsLineBox.h b/mozilla/layout/generic/nsLineBox.h index fb8eba99fb3..fbf56f0e883 100644 --- a/mozilla/layout/generic/nsLineBox.h +++ b/mozilla/layout/generic/nsLineBox.h @@ -441,7 +441,7 @@ public: // Call this only while in Reflow() for the block the line belongs // to, only between reflowing the line (or sliding it, if we skip - // reflowing it) and the end of reflowing the the block. + // reflowing it) and the end of reflowing the block. PRBool CachedIsEmpty(); void InvalidateCachedIsEmpty() { diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index 23d114c9ef3..1f24a394710 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -177,7 +177,7 @@ nsLineLayout::nsLineLayout(nsPresContext* aPresContext, // Instead of always pre-initializing the free-lists for frames and // spans, we do it on demand so that situations that only use a few - // frames and spans won't waste alot of time in unneeded + // frames and spans won't waste a lot of time in unneeded // initialization. PL_INIT_ARENA_POOL(&mArena, "nsLineLayout", 1024); mFrameFreeList = nsnull; @@ -606,7 +606,7 @@ nsLineLayout::EndSpan(nsIFrame* aFrame, aSizeResult.height = maxHeight; if (aMaxElementWidth) { if (psd->mNoWrap) { - // When we have a non-breakable span, it's max-element-width + // When we have a non-breakable span, its max-element-width // width is its entire width. *aMaxElementWidth = width; } @@ -736,7 +736,7 @@ nsLineLayout::FreeSpan(PerSpanData* psd) pfd = next; } - // Now put the span on the free list since its free too + // Now put the span on the free list since it's free too psd->mNextFreeSpan = mSpanFreeList; mSpanFreeList = psd; #ifdef DEBUG @@ -1025,7 +1025,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, } } else if (nsLayoutAtoms::textFrame == frameType) { - // Note non-empty text-frames for inline frame compatability hackery + // Note non-empty text-frames for inline frame compatibility hackery pfd->SetFlag(PFD_ISTEXTFRAME, PR_TRUE); // XXX An empty text frame at the end of the line seems not // to have zero width. @@ -1358,7 +1358,7 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, // frame. If it is, then allow the frame next to it to fit. if (pfd->GetFlag(PFD_ISNONEMPTYTEXTFRAME)) { // This must be the first piece of non-empty text (because - // aNotSafeToBreak is true) or its a piece of text that is + // aNotSafeToBreak is true) or it's a piece of text that is // part of a larger word. pfd->SetFlag(PFD_ISSTICKY, PR_TRUE); } @@ -1420,7 +1420,7 @@ nsLineLayout::CanPlaceFrame(PerFrameData* pfd, // only things on a line will be those things that "fit". // // 2. Before a float is placed on a line, the line has to be empty - // (otherwise its a "below current line" flaoter and will be placed + // (otherwise it's a "below current line" float and will be placed // after the line). // // Therefore, if the span directly or indirectly has a float @@ -2005,7 +2005,7 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd) (0 == spanFramePFD->mMargin.right) && (0 == spanFramePFD->mMargin.bottom) && (0 == spanFramePFD->mMargin.left)))) { - // This code handles an issue with compatability with non-css + // This code handles an issue with compatibility with non-css // conformant browsers. In particular, there are some cases // where the font-size and line-height for a span must be // ignored and instead the span must *act* as if it were zero @@ -3043,7 +3043,7 @@ nsLineLayout::FindNextText(nsPresContext* aPresContext, nsIFrame* aFrame) // So this is kind of funky. During reflow, overflow frames will // have their parent pointers set up lazily. We assume that, on - // entry, aFrame has it's parent pointer set correctly (as do all of + // entry, aFrame has its parent pointer set correctly (as do all of // its ancestors). Starting from that, we need to make sure that as // we traverse through frames trying to find the next text frame, we // leave the frames with their parent pointers set correctly, so the diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 3b1853e4898..8e09e8b7566 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -2779,7 +2779,7 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays() rv = NS_NewISupportsArray(getter_AddRefs(ourParams)); NS_ENSURE_SUCCESS(rv, rv); - // use the DOM to get us ALL our dependant PARAM tags, even if not + // use the DOM to get us ALL our dependent PARAM tags, even if not // ours nsCOMPtr mydomElement = do_QueryInterface(content); NS_ENSURE_TRUE(mydomElement, NS_ERROR_NO_INTERFACE); @@ -2807,7 +2807,7 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays() if (allParams) { PRUint32 numAllParams; allParams->GetLength(&numAllParams); - // loop through every so called dependant PARAM tag to check if it + // loop through every so called dependent PARAM tag to check if it // "belongs" to us for (PRUint32 i = 0; i < numAllParams; i++) { diff --git a/mozilla/layout/generic/nsReflowType.h b/mozilla/layout/generic/nsReflowType.h index 9851d635902..04f709b7a79 100644 --- a/mozilla/layout/generic/nsReflowType.h +++ b/mozilla/layout/generic/nsReflowType.h @@ -51,7 +51,7 @@ enum nsReflowType { /** * This reflow command is used when the style for a frame has * changed. This also implies that if the frame is a container - * that its childrens style has also changed. The target of the + * that its children's style has also changed. The target of the * reflow command is the frame that changed style. */ eReflowType_StyleChanged, diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index 91fca6d906e..a902636085d 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -760,7 +760,7 @@ IsValidSelectionPoint(nsSelection *aFrameSel, nsIContent *aContent) return PR_FALSE; if (tLimiter && tLimiter != aContent) { - if (tLimiter != aContent->GetParent()) //if newfocus == the limiter. thats ok. but if not there and not parent bad + if (tLimiter != aContent->GetParent()) //if newfocus == the limiter. that's ok. but if not there and not parent bad return PR_FALSE; //not in the right content. tLimiter said so } } @@ -1021,8 +1021,8 @@ nsSelection::GetRootForContentSubtree(nsIContent *aContent, nsIContent **aParent // parent/child relationship becomes invalid. // // An example of an invalid parent/child relationship is anonymous content. - // Anonymous content has a pointer to it's parent, but it is not listed - // as a child of it's parent. In this case, the anonymous content would + // Anonymous content has a pointer to its parent, but it is not listed + // as a child of its parent. In this case, the anonymous content would // be considered the root of the subtree. if (!aContent || !aParent) @@ -1522,7 +1522,7 @@ nsSelection::HandleKeyEvent(nsPresContext* aPresContext, nsGUIEvent *aGuiEvent) return NS_ERROR_FAILURE; } -//XXX Need xp way get platfrom specific behavior into key navigation. +//XXX Need xp way get platform specific behavior into key navigation. //XXX This really shouldn't have to use an ifdef #ifdef _WIN32 if (keyEvent->isAlt) { @@ -1893,7 +1893,7 @@ nsSelection::VisualSelectFrames(nsPresContext *aPresContext, // Select from the anchor point to the edge of the frame // Which edge? If the selection direction is forward the right edge, if it is backward the left edge - // For rtl frames the right edge is the begining of the frame, for ltr frames it is the end and vice versa + // For rtl frames the right edge is the beginning of the frame, for ltr frames it is the end and vice versa if ((eDirNext == selectionDirection) == (anchorLevel & 1)) result = SelectToEdge(anchorFrame, anchorContent, anchorOffset, 0, PR_FALSE); else @@ -1949,7 +1949,7 @@ nsSelection::VisualSelectFrames(nsPresContext *aPresContext, // i.e. the rightmost character if the current paragraph embedding level is even (LTR paragraph) // or the leftmost character if the current paragraph embedding level is odd (RTL paragraph) // - // As before, for rtl frames the right edge is the begining of the frame, for ltr frames it is the end and vice versa + // As before, for rtl frames the right edge is the beginning of the frame, for ltr frames it is the end and vice versa // // If selection direction is backwards, vice versa throughout // @@ -2181,7 +2181,7 @@ nsSelection::GetPrevNextBidiLevels(nsPresContext *aPresContext, return result; if (!isupports) return NS_ERROR_NULL_POINTER; - //we must CAST here to an nsIFrame. nsIFrame doesnt really follow the rules + //we must CAST here to an nsIFrame. nsIFrame doesn't really follow the rules //for speed reasons nsIFrame *newFrame = (nsIFrame *)isupports; @@ -2236,7 +2236,7 @@ NS_IMETHODIMP nsSelection::GetFrameFromLevel(nsPresContext *aPresContext, return result; if (!isupports) return NS_ERROR_NULL_POINTER; - //we must CAST here to an nsIFrame. nsIFrame doesnt really follow the rules + //we must CAST here to an nsIFrame. nsIFrame doesn't really follow the rules //for speed reasons foundFrame = (nsIFrame *)isupports; foundLevel = NS_GET_EMBEDDING_LEVEL(foundFrame); @@ -2645,7 +2645,7 @@ printf(" * TakeFocus - moving into new cell\n"); { // XXXX Problem: Shift+click in browser is appending text selection to selected table!!! // is this the place to erase seleced cells ????? - if (mDomSelections[index]->GetDirection() == eDirNext && aContentEndOffset > aContentOffset) //didnt go far enough + if (mDomSelections[index]->GetDirection() == eDirNext && aContentEndOffset > aContentOffset) //didn't go far enough { mDomSelections[index]->Extend(domNode, aContentEndOffset);//this will only redraw the diff } @@ -4033,7 +4033,7 @@ nsTypedSelection::GetTableSelectionType(nsIDOMRange* aRange, PRInt32* aTableSele // if we simply cannot have children, return NS_OK as a non-failing, // non-completing case for table selection if (!content->IsContentOfType(nsIContent::eELEMENT)) - return NS_OK; //got to be a text node, definately not a table row/cell + return NS_OK; //got to be a text node, definitely not a table row/cell PRInt32 startOffset; PRInt32 endOffset; @@ -5538,7 +5538,7 @@ nsTypedSelection::DoAutoScrollView(nsPresContext *aPresContext, nsIView *aView, // // Map the globalPoint back into aView's coordinate system. We // have to get the globalOffsets again because aView's - // window and it's parents may have changed their offsets. + // window and its parents may have changed their offsets. // result = GetViewAncestorOffset(aView, nsnull, &globalOffset.x, &globalOffset.y); @@ -5980,7 +5980,7 @@ nsTypedSelection::FixupSelectionPoints(nsIDOMRange *aRange , nsDirection *aDir, dirtyend = PR_TRUE; } else - found = PR_FALSE; //didnt find the right cell yet + found = PR_FALSE; //didn't find the right cell yet } else if (atom == nsHTMLAtoms::td || atom == nsHTMLAtoms::th) //you are in "cell" mode put selection to end of cell diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index d55755960ca..89e326d03b8 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -319,7 +319,7 @@ nsSimplePageSequenceFrame::Reflow(nsPresContext* aPresContext, } // XXX - Hack Alert - // OK, so ther eis a selection, we will print the entire selection + // OK, so there is a selection, we will print the entire selection // on one page and then crop the page. // This means you can never print any selection that is longer than one page // put it keeps it from page breaking in the middle of your print of the selection @@ -565,7 +565,7 @@ nsSimplePageSequenceFrame::SetPageNumberFormat(const char* aPropName, const char pageNumberFormat.AssignASCII(aDefPropVal); } - // Sets the format into a static data memeber which will own the memory and free it + // Sets the format into a static data member which will own the memory and free it PRUnichar* uStr = ToNewUnicode(pageNumberFormat); if (uStr != nsnull) { SetPageNumberFormat(uStr, aPageNumOnly); // nsPageFrame will own the memory diff --git a/mozilla/layout/generic/nsSpaceManager.cpp b/mozilla/layout/generic/nsSpaceManager.cpp index 7a349c85c5d..07ff0822883 100644 --- a/mozilla/layout/generic/nsSpaceManager.cpp +++ b/mozilla/layout/generic/nsSpaceManager.cpp @@ -192,7 +192,7 @@ void nsSpaceManager::Shutdown() nsMemory::Free(spaceManager); } - // Disable futher caching. + // Disable further caching. sCachedSpaceManagerCount = -1; } @@ -508,7 +508,7 @@ nsSpaceManager::CanJoinBands(BandRect* aBand, BandRect* aPrevBand) * Tries to join the two adjacent bands. Returns PR_TRUE if successful and * PR_FALSE otherwise * - * If the two bands are joined, the previous band is the the band that's deleted + * If the two bands are joined, the previous band is the band that's deleted */ PRBool nsSpaceManager::JoinBands(BandRect* aBand, BandRect* aPrevBand) diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index c214ae6d6c3..34bb76c1c2e 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -4221,7 +4221,7 @@ nsTextFrame::PeekOffset(nsPresContext* aPresContext, nsPeekOffsetStruct *aPos) nsTextTransformer tx(aPresContext); PrepareUnicodeText(tx, &indexBuffer, &paintBuffer, &textLength); - if (textLength)//if no renderable length, you cant park here. + if (textLength)//if no renderable length, you can't park here. { aPos->mContentOffset = aPos->mStartOffset; result = NS_OK; @@ -6334,7 +6334,7 @@ void nsTextFrame::AdjustSelectionPointsForBidi(SelectionDetails *sdptr, sdptr->mStart = textLength - sdptr->mEnd; sdptr->mEnd = textLength - swap; - // temp fix for 75026 crasher untill we fix the bidi code + // temp fix for 75026 crasher until we fix the bidi code // the above bidi code cause mStart < 0 in some case // the problem is we have whitespace compression code in // nsTextTransformer which cause mEnd > textLength diff --git a/mozilla/layout/generic/nsTextTransformer.h b/mozilla/layout/generic/nsTextTransformer.h index 196530665b5..db775a7bf32 100644 --- a/mozilla/layout/generic/nsTextTransformer.h +++ b/mozilla/layout/generic/nsTextTransformer.h @@ -190,7 +190,7 @@ public: * Returns a pointer to the word, the number of characters in the word, the * content length of the word, whether it is whitespace, and whether the * text was transformed (any of the transformations listed above). The content - * length can be greater than the word length if whitespace compression occured + * length can be greater than the word length if whitespace compression occurred * or if characters were discarded * * The default behavior is to reset the transform buffer to the beginning, @@ -362,7 +362,7 @@ protected: // The frame's text-transform state PRUint8 mTextTransform; - // Flag for controling mLeaveAsAscii, mHasMultibyte, mTransformedTextIsAscii + // Flag for controlling mLeaveAsAscii, mHasMultibyte, mTransformedTextIsAscii PRUint8 mFlags; // prefs used to configure the double-click word selection behavior diff --git a/mozilla/layout/mathml/base/src/mathfontPUA.properties b/mozilla/layout/mathml/base/src/mathfontPUA.properties index 703710207c4..aaaf141e2d5 100644 --- a/mozilla/layout/mathml/base/src/mathfontPUA.properties +++ b/mozilla/layout/mathml/base/src/mathfontPUA.properties @@ -50,7 +50,7 @@ # Assignments for variants and parts of stretchy characters. # # This list is active during MathML processing, i.e., it is loaded -# and used to resolve the indirect references made in the the +# and used to resolve the indirect references made in the # MathFont Property Files for glyphs of stretchy characters. ############ diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp index 91f1b407535..0571b0125bc 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.cpp @@ -1414,7 +1414,7 @@ nsMathMLChar::SetData(nsPresContext* aPresContext, chars are handled in a special manner. When this situation is detected, the initial char (referred to as "parent") creates a singly-linked list of child chars, asking them to stretch in - a divided space. A convention is used in the the setup of + a divided space. A convention is used in the setup of nsGlyphTable to express that a composite parent char can be built from child chars. b) There are some chars that have no middle and glue glyphs. For diff --git a/mozilla/layout/mathml/base/src/nsMathMLChar.h b/mozilla/layout/mathml/base/src/nsMathMLChar.h index 546ae30298f..828dd037259 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLChar.h +++ b/mozilla/layout/mathml/base/src/nsMathMLChar.h @@ -178,7 +178,7 @@ public: } // Hooks to access the extra leaf style contexts given to the MathMLChars. - // They provide an interface to make them acessible to the Style System via + // They provide an interface to make them accessible to the Style System via // the Get/Set AdditionalStyleContext() APIs. Owners of MathMLChars // should honor these APIs. nsStyleContext* GetStyleContext() const; diff --git a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp index 70dda975bb0..dbe409faef4 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -395,7 +395,7 @@ nsMathMLContainerFrame::Stretch(nsIRenderingContext& aRenderingContext, // (need to test coreFrame since resets other things) if (parentData.coreFrame != mEmbellishData.coreFrame) { // (we fetch values from the core since they may use units that depend - // on style data, and style changes could have occured in the core since + // on style data, and style changes could have occurred in the core since // our last visit there) nsEmbellishData coreData; GetEmbellishDataFrom(mEmbellishData.coreFrame, coreData); diff --git a/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp index eb06dcc90c1..8df1c6aa889 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLFrame.cpp @@ -121,7 +121,7 @@ nsMathMLFrame::UpdatePresentationData(PRInt32 aScriptLevelIncrement, // Helper to give a style context suitable for doing the stretching of // a MathMLChar. Frame classes that use this should ensure that the -// extra leaf style contexts given to the MathMLChars are acessible to +// extra leaf style contexts given to the MathMLChars are accessible to // the Style System via the Get/Set AdditionalStyleContext() APIs. /* static */ void nsMathMLFrame::ResolveMathMLCharStyle(nsPresContext* aPresContext, diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp index 1a7e918ee37..6818c3362d6 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp @@ -316,7 +316,7 @@ nsMathMLmfracFrame::Place(nsIRenderingContext& aRenderingContext, // by default, leave at least one-pixel padding at either end, or use // lspace & rspace that may come from if we are an embellished container // (we fetch values from the core since they may use units that depend - // on style data, and style changes could have occured in the core since + // on style data, and style changes could have occurred in the core since // our last visit there) nsEmbellishData coreData; GetEmbellishDataFrom(mEmbellishData.coreFrame, coreData); diff --git a/mozilla/layout/printing/nsPrintEngine.cpp b/mozilla/layout/printing/nsPrintEngine.cpp index 67b6a2b34cd..93d1b773574 100644 --- a/mozilla/layout/printing/nsPrintEngine.cpp +++ b/mozilla/layout/printing/nsPrintEngine.cpp @@ -1048,7 +1048,7 @@ nsPrintEngine::PrintPreview(nsIPrintSettings* aPrintSettings, // You have to have both a PrintOptions and a PrintSetting to call // CheckForPrinters. // The user can pass in a null PrintSettings, but you can only - // create one if you have a PrintOptions. So we we might as check + // create one if you have a PrintOptions. So we might as check // to if we have a PrintOptions first, because we can't do anything // below without it then inside we check to se if the printSettings // is null to know if we need to create on. @@ -1710,7 +1710,7 @@ nsPrintEngine::IsParentAFrameSet(nsIDocShell * aParent) aParent->GetPresShell(getter_AddRefs(shell)); NS_ASSERTION(shell, "shell can't be null"); - // See if if the incoming doc is the root document + // See if the incoming doc is the root document nsCOMPtr parentAsItem(do_QueryInterface(aParent)); if (!parentAsItem) return PR_FALSE; @@ -1743,7 +1743,7 @@ nsPrintEngine::IsParentAFrameSet(nsIDocShell * aParent) //--------------------------------------------------------------------- -// Recursively build a list of of sub documents to be printed +// Recursively build a list of sub documents to be printed // that mirrors the document tree void nsPrintEngine::BuildDocTree(nsIDocShellTreeNode * aParentNode, @@ -1893,12 +1893,12 @@ nsPrintEngine::CheckForChildFrameSets(nsPrintObject* aPO) // This method is key to the entire print mechanism. // // This "maps" or figures out which sub-doc represents a -// given Frame or IFrame in it's parent sub-doc. +// given Frame or IFrame in its parent sub-doc. // // So the Mcontent pointer in the child sub-doc points to the -// content in the it's parent document, that caused it to be printed. +// content in the its parent document, that caused it to be printed. // This is used later to (after reflow) to find the absolute location -// of the sub-doc on it's parent's page frame so it can be +// of the sub-doc on its parent's page frame so it can be // printed in the correct location. // // This method recursvely "walks" the content for a document finding @@ -2293,7 +2293,7 @@ nsPrintEngine::SetupToPrintContent(nsIDeviceContext* aDContext, // so just transfer it to the PrintData and we will skip the extra shrinkage reflow // // doSetPixelScale tells Reflow whether to set the shrinkage value into the DC - // The first tru we do not want to do this, the second time thru we do + // The first time we do not want to do this, the second time through we do PRBool doSetPixelScale = PR_FALSE; PRBool ppIsShrinkToFit = mPrtPreview && mPrtPreview->mShrinkToFit; if (ppIsShrinkToFit) { @@ -2559,7 +2559,7 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO, PRBool aDoCalcShrink) NS_ASSERTION(aPO, "Pointer is null!"); if (!aPO) return NS_ERROR_FAILURE; - // If it is hidden don't bother reflow it or any of it's children + // If it is hidden don't bother reflowing it or any of its children if (aPO->mIsHidden) return NS_OK; // create the PresContext @@ -2628,7 +2628,7 @@ nsPrintEngine::ReflowPrintObject(nsPrintObject * aPO, PRBool aDoCalcShrink) PR_PL(("In DV::ReflowPrintObject PO: %p (%9s) Setting w,h to %d,%d\n", aPO, gFrameTypesStr[aPO->mFrameType], width, height)); // XXX - Hack Alert - // OK, so ther eis a selection, we will print the entire selection + // OK, so there is a selection, we will print the entire selection // on one page and then crop the page. // This means you can never print any selection that is longer than // one page put it keeps it from page breaking in the middle of your @@ -3562,7 +3562,7 @@ nsPrintEngine::PrintPage(nsPresContext* aPresContext, NS_ASSERTION(po, "nsPrintObject can't be null!"); if (po->IsPrintable()) { // Now verify that SubDoc's PageNum matches the - // page num of it's parent doc + // page num of its parent doc curPageSeq->GetCurrentPageNum(&pageNum); nsIFrame* fr; CallQueryInterface(curPageSeq, &fr); @@ -3711,7 +3711,7 @@ nsPrintEngine::FindSelectionBounds(nsPresContext* aPresContext, NS_ASSERTION(aPresContext, "Pointer is null!"); NS_ASSERTION(aParentFrame, "Pointer is null!"); - // loop thru named child lists + // loop through named child lists nsIAtom* childListName = nsnull; PRInt32 childListIndex = 0; do { @@ -3757,7 +3757,7 @@ nsPrintEngine::GetPageRangeForSelection(nsIPresShell * aPresShell, nsIFrame * endFrame = nsnull; // start out with the sequence frame and search the entire frame tree - // capturing the the starting and ending child frames of the selection + // capturing the starting and ending child frames of the selection // and their rects nsRect r = seqFrame->GetRect(); FindSelectionBounds(aPresContext, aRC, seqFrame, r, diff --git a/mozilla/layout/printing/nsPrintEngine.h b/mozilla/layout/printing/nsPrintEngine.h index c79e2d12446..dd6262f8c2a 100644 --- a/mozilla/layout/printing/nsPrintEngine.h +++ b/mozilla/layout/printing/nsPrintEngine.h @@ -360,7 +360,7 @@ protected: nsRect& aRect, nsRect& aChildRect); - // Static memeber variables + // Static member variables PRBool mIsCreatingPrintPreview; PRBool mIsDoingPrinting; diff --git a/mozilla/layout/printing/nsPrintPreviewListener.cpp b/mozilla/layout/printing/nsPrintPreviewListener.cpp index 7695829c9bf..c0cca880467 100644 --- a/mozilla/layout/printing/nsPrintPreviewListener.cpp +++ b/mozilla/layout/printing/nsPrintPreviewListener.cpp @@ -116,7 +116,7 @@ nsPrintPreviewListener::RemoveListeners() // // GetActionForEvent // -// Helper function to let certain key events thru +// Helper function to let certain key events through // enum eEventAction { eEventAction_Tab, eEventAction_ShiftTab, diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index 35973110f4d..3a38b236bd7 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -3291,7 +3291,7 @@ static PRBool SelectorMatches(RuleProcessorData &data, #undef STATE_CHECK // Right now, there are four operators: -// PRUnichar(0), the descendent combinator, is greedy +// PRUnichar(0), the descendant combinator, is greedy // '~', the indirect adjacent sibling combinator, is greedy // '+' and '>', the direct adjacent sibling and child combinators, are not #define NS_IS_GREEDY_OPERATOR(ch) (ch == PRUnichar(0) || ch == PRUnichar('~')) diff --git a/mozilla/layout/style/nsDOMCSSValueList.cpp b/mozilla/layout/style/nsDOMCSSValueList.cpp index f0988049aab..ccb8636cbdd 100644 --- a/mozilla/layout/style/nsDOMCSSValueList.cpp +++ b/mozilla/layout/style/nsDOMCSSValueList.cpp @@ -122,7 +122,7 @@ nsDOMCSSValueList::GetCssText(nsAString& aCssText) } // If this isn't the first item in the list, then - // its ok to append a separator. + // it's ok to append a separator. if (!aCssText.IsEmpty()) { aCssText.Append(separator); } diff --git a/mozilla/layout/svg/base/src/nsSVGRectFrame.cpp b/mozilla/layout/svg/base/src/nsSVGRectFrame.cpp index 8f255e1e4f2..7b9aa14a988 100644 --- a/mozilla/layout/svg/base/src/nsSVGRectFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGRectFrame.cpp @@ -250,7 +250,7 @@ nsSVGRectFrame::ConstructPath(nsISVGRendererPathBuilder* pathBuilder) /* If either the 'rx' or the 'ry' attribute isn't set in the markup, then we have to set it to the value of the other. We do this after clamping rx and - ry since omiting one of the attributes implicitly means they should both + ry since omitting one of the attributes implicitly means they should both be the same. */ PRBool hasRx = mContent->HasAttr(kNameSpaceID_None, nsSVGAtoms::rx); PRBool hasRy = mContent->HasAttr(kNameSpaceID_None, nsSVGAtoms::ry); diff --git a/mozilla/layout/svg/renderer/src/cairo/nsSVGCairoRegion.cpp b/mozilla/layout/svg/renderer/src/cairo/nsSVGCairoRegion.cpp index 3800d73d19a..38d93457f71 100644 --- a/mozilla/layout/svg/renderer/src/cairo/nsSVGCairoRegion.cpp +++ b/mozilla/layout/svg/renderer/src/cairo/nsSVGCairoRegion.cpp @@ -115,7 +115,7 @@ NS_IMETHODIMP nsSVGCairoRectRegion::Combine(nsISVGRendererRegion *other, nsISVGRendererRegion **_retval) { - nsSVGCairoRectRegion *_other = static_cast(other); // ok, i know i'm being bad + nsSVGCairoRectRegion *_other = static_cast(other); // ok, I know I'm being bad float x1 = PR_MIN(mX, _other->mX); float y1 = PR_MIN(mY, _other->mY); diff --git a/mozilla/layout/svg/renderer/src/libart/nsSVGLibartGradient.cpp b/mozilla/layout/svg/renderer/src/libart/nsSVGLibartGradient.cpp index 6ec36ecb097..1e063b8ed90 100644 --- a/mozilla/layout/svg/renderer/src/libart/nsSVGLibartGradient.cpp +++ b/mozilla/layout/svg/renderer/src/libart/nsSVGLibartGradient.cpp @@ -174,7 +174,7 @@ LibartLinearGradient(ArtRender *render, nsISVGGradient *aGrad, double *affine) dx = x2 - x1; dy = y2 - y1; - // Protect against devide by 0 + // Protect against divide by 0 if (fabs(dx) + fabs(dy) <= EPSILON ) scale = 0.; else diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index 2913bc6ca74..579e08575c4 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -1008,7 +1008,7 @@ BasicTableLayoutStrategy::AssignNonPctColumnWidths(nscoord aMax numColsForColsAttr = (NS_STYLE_TABLE_COLS_ALL == mCols) ? numCols : mCols; } - // For every column, determine it's min and desired width based on cell style + // For every column, determine its min and desired width based on cell style // base on cells which do not span cols. Also, determine mCellSpacingTotal for (colX = 0; colX < numCols; colX++) { nscoord minWidth = 0; diff --git a/mozilla/layout/tables/nsCellMap.cpp b/mozilla/layout/tables/nsCellMap.cpp index f9eff8c9cb5..984b4392186 100644 --- a/mozilla/layout/tables/nsCellMap.cpp +++ b/mozilla/layout/tables/nsCellMap.cpp @@ -2046,7 +2046,7 @@ void nsCellMap::RebuildConsideringCells(nsTableCellMap& aMap, } } - // For for cell deletion, since the row is not being deleted, + // For cell deletion, since the row is not being deleted, // keep mRowCount the same as before. mRowCount = PR_MAX(mRowCount, mRowCountOrig); diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 18b0624d0c6..d3199dbda2e 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -676,7 +676,7 @@ void DebugCheckChildSize(nsIFrame* aChild, } #endif -// the computed height for the cell, which descendents use for percent height calculations +// the computed height for the cell, which descendants use for percent height calculations // it is the height (minus border, padding) of the cell's first in flow during its final // reflow without an unconstrained height. static nscoord diff --git a/mozilla/layout/tables/nsTableColFrame.cpp b/mozilla/layout/tables/nsTableColFrame.cpp index aceee4834cf..d4aeea657f7 100644 --- a/mozilla/layout/tables/nsTableColFrame.cpp +++ b/mozilla/layout/tables/nsTableColFrame.cpp @@ -276,7 +276,7 @@ nsTableColFrame::Init(nsPresContext* aPresContext, { nsresult rv; - // Let the the base class do its initialization + // Let the base class do its initialization rv = nsFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow); diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 381aacad129..92f6c234717 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1811,7 +1811,7 @@ nsTableFrame::IsPrematureSpecialHeightReflow(const nsHTMLReflowState& aReflowSta * 2) After the pass 2 reflow, if the table's NeedToInitiateSpecialReflow(true) was called, it * will do the special height reflow, setting the reflow state's mFlages.mSpecialHeightReflow * to true and mSpecialHeightInitiator to itself. It won't do this if IsPrematureSpecialHeightReflow() - * returns true because in that case another special height reflow will be comming along with the + * returns true because in that case another special height reflow will be coming along with the * containing table as the mSpecialHeightInitiator. It is only relevant to do the reflow when * the mSpecialHeightInitiator is the containing table, because if it is a remote ancestor, then * appropriate heights will not be known. @@ -6781,7 +6781,7 @@ BCHorizontalSeg::BCHorizontalSeg() * @param aSubWidth - how wide is the nonowning width of the corner * @param aBevel - is the corner beveled * @param aTopVerSegWidth - vertical segment width going down - * @param aBottomVerSegWidth - vertical segment width comming from up + * @param aBottomVerSegWidth - vertical segment width coming from up * @param aHorSegHeight - the height of the segment * @param aLastCell - cell frame above this segment * @param aPixelsToTwips - conversion factor @@ -7405,7 +7405,7 @@ void nsTableFrame::DebugReflow(nsIFrame* aFrame, parentRS = parentRS->parentReflowState; } #endif - // get the the frame summary timer + // get the frame summary timer nsIAtom* frameType = aFrame->GetType(); nsReflowTimer* frameTimer = GetFrameTimer(aFrame, frameType); if (!frameTimer) {NS_ASSERTION(PR_FALSE, "no frame timer");return;} diff --git a/mozilla/layout/tables/nsTableFrame.h b/mozilla/layout/tables/nsTableFrame.h index 7277cf17344..98924620601 100644 --- a/mozilla/layout/tables/nsTableFrame.h +++ b/mozilla/layout/tables/nsTableFrame.h @@ -864,7 +864,7 @@ protected: nsAutoVoidArray mColFrames; struct TableBits { - PRUint32 mHadInitialReflow:1; // has intial reflow happened + PRUint32 mHadInitialReflow:1; // has initial reflow happened PRUint32 mHaveReflowedColGroups:1; // have the col groups gotten their initial reflow PRUint32 mNeedStrategyBalance:1; // does the strategy needs to balance the table PRUint32 mNeedStrategyInit:1; // does the strategy needs to be initialized and then balance the table diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index 21f7c750e58..6fbe3665cc4 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -1256,7 +1256,7 @@ nsTableOuterFrame::OuterReflowChild(nsPresContext* aPresContext, // If mComputedWidth > availWidth and availWidth >= minWidth for a nested percent table - // then adjust mComputedWidth based on availableWidth if this isn't the intial reflow + // then adjust mComputedWidth based on availableWidth if this isn't the initial reflow if ((NS_UNCONSTRAINEDSIZE != childRS.mComputedWidth) && (eReflowReason_Initial != aReflowReason) && (childRS.mComputedWidth + childRS.mComputedBorderPadding.left + @@ -2119,7 +2119,7 @@ void nsTableOuterFrame::DeleteChildsNextInFlow(nsPresContext* aPresContext, aChild->SetNextSibling(nextInFlow->GetNextSibling()); } - // Delete the next-in-flow frame and adjust it's parent's child count + // Delete the next-in-flow frame and adjust its parent's child count nextInFlow->Destroy(aPresContext); NS_POSTCONDITION(!aChild->GetNextInFlow(), "non null next-in-flow"); diff --git a/mozilla/layout/tables/nsTablePainter.cpp b/mozilla/layout/tables/nsTablePainter.cpp index ee6128188e4..82eca6a20cb 100644 --- a/mozilla/layout/tables/nsTablePainter.cpp +++ b/mozilla/layout/tables/nsTablePainter.cpp @@ -74,7 +74,7 @@ striped background set on

  • will line up across rows even if the cells are assigned arbitrary border widths. - For example, the continous border on the top edge of a + For example, the continuous border on the top edge of a row group is the collapse of any row group, row, and table borders involved. (The first row group's top would be [table-top + row group top + first row top]. It's bottom diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index d26a3b05549..c68d7a5bbdc 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -191,7 +191,7 @@ nsTableRowFrame::Init(nsPresContext* aPresContext, { nsresult rv; - // Let the the base class do its initialization + // Let the base class do its initialization rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow); diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 0aa480889b3..4d491f15044 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -1056,9 +1056,9 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext, } } else { - // The row frame is complete because either (1) it's minimum height is greater than the + // The row frame is complete because either (1) its minimum height is greater than the // available height we gave it, or (2) it may have been given a larger height through - // style than it's content, or (3) it contains a rowspan >1 cell which hasn't been + // style than its content, or (3) it contains a rowspan >1 cell which hasn't been // reflowed with a constrained height yet (we will find out when SplitSpanningCells is // called below) if (rowMetrics.height >= availSize.height) { @@ -1663,7 +1663,7 @@ nsTableRowGroupFrame::IR_TargetIsChild(nsPresContext* aPresContext, ((nsTableRowFrame*)aNextFrame)->DidResize(aPresContext, aReflowState.reflowState); // the overflow area may have changed inflate the overflow area if (aReflowState.tableFrame->IsAutoHeight()) { - // Because other cells in the row may need to be be aligned differently, + // Because other cells in the row may need to be aligned differently, // repaint the entire row // XXX Improve this so the row knows it should bitblt (or repaint) those // cells that change position... @@ -2025,7 +2025,7 @@ nsTableRowGroupFrame::GetNextSiblingOnLine(nsIFrame*& aFrame, CellData* cellData = cellMap->GetDataAt(aLineNumber, colIndex + 1); - if (!cellData)// if this isnt a valid cell, drop down and check the next line + if (!cellData)// if this isn't a valid cell, drop down and check the next line { cellData = cellMap->GetDataAt(aLineNumber + 1, 0); if (!cellData) diff --git a/mozilla/layout/xul/base/src/grid/nsGrid.cpp b/mozilla/layout/xul/base/src/grid/nsGrid.cpp index bef674bb8be..e01b7896322 100644 --- a/mozilla/layout/xul/base/src/grid/nsGrid.cpp +++ b/mozilla/layout/xul/base/src/grid/nsGrid.cpp @@ -212,7 +212,7 @@ nsGrid::RebuildIfNeeded() // // // - // computedColumnCount = 2 // for the 2 buttons in the the row tag + // computedColumnCount = 2 // for the 2 buttons in the row tag // computedRowCount = 0 // there is nothing in the column tag // mColumnCount = 1 // one column defined // mRowCount = 1 // one row defined @@ -745,7 +745,7 @@ nsGrid::GetRowOffsets(nsBoxLayoutState& aState, PRInt32 aIndex, nscoord& aTop, n nsMargin totalBorderPadding(0,0,0,0); nsMargin totalMargin(0,0,0,0); - // if there is a box and its not bogus take its + // if there is a box and it's not bogus take its // borders padding and insets into account if (box && !row->mIsBogus) { @@ -797,10 +797,10 @@ nsGrid::GetRowOffsets(nsBoxLayoutState& aState, PRInt32 aIndex, nscoord& aTop, n // of each columns. // If we are the first row then get the largest top border/padding in - // our columns. If thats larger than the rows top border/padding use it. + // our columns. If that's larger than the rows top border/padding use it. // If we are the last row then get the largest bottom border/padding in - // our columns. If thats larger than the rows bottom border/padding use it. + // our columns. If that's larger than the rows bottom border/padding use it. PRInt32 firstIndex = 0; PRInt32 lastIndex = 0; nsGridRow* firstRow = nsnull; @@ -1214,7 +1214,7 @@ nsGrid::IsGrid(nsIBox* aBox) } /** - * This get the flexibilty of the row at aIndex. Its not trivial. There are a few + * This get the flexibilty of the row at aIndex. It's not trivial. There are a few * things we need to look at. Specifically we need to see if any or * tags are around us. Their flexibilty will affect ours. */ @@ -1490,8 +1490,8 @@ nsGrid::GetScrollBox(nsIBox* aChild) aChild->GetParentBox(&parent); // walk up until we find a scrollframe or a part - // if its a scrollframe return it. - // if its a parent then the child passed does not + // if it's a scrollframe return it. + // if it's a parent then the child passed does not // have a scroll frame immediately wrapped around it. while (parent) { nsCOMPtr scrollFrame = do_QueryInterface(parent); diff --git a/mozilla/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp b/mozilla/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp index 6bd878a5724..51c29d3e944 100644 --- a/mozilla/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp +++ b/mozilla/layout/xul/base/src/grid/nsGridRowGroupLayout.cpp @@ -340,7 +340,7 @@ nsGridRowGroupLayout::GetTotalMargin(nsIBox* aBox, nsMargin& aMargin, PRBool aIs nsresult rv = nsGridRowLayout::GetTotalMargin(aBox, aMargin, aIsHorizontal); // make sure we have the scrollframe on the outside if it has one. - // thats where the border it. + // that's where the border is. aBox = nsGrid::GetScrollBox(aBox); // add our border/padding to it diff --git a/mozilla/layout/xul/base/src/grid/nsGridRowLayout.cpp b/mozilla/layout/xul/base/src/grid/nsGridRowLayout.cpp index 657bcaa6b91..4159249167d 100644 --- a/mozilla/layout/xul/base/src/grid/nsGridRowLayout.cpp +++ b/mozilla/layout/xul/base/src/grid/nsGridRowLayout.cpp @@ -227,7 +227,7 @@ nsGridRowLayout::GetTotalMargin(nsIBox* aBox, nsMargin& aMargin, PRBool aIsHoriz // if first or last if (child == aBox || next == nsnull) { - // if its not the first child remove the top margin + // if it's not the first child remove the top margin // we don't need it. if (child != aBox) { @@ -237,7 +237,7 @@ nsGridRowLayout::GetTotalMargin(nsIBox* aBox, nsMargin& aMargin, PRBool aIsHoriz margin.left = 0; } - // if its not the last child remove the bottom margin + // if it's not the last child remove the bottom margin // we don't need it. if (next != nsnull) { diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index e053648126e..f109b17d3d5 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -54,12 +54,12 @@ // Necessary. // // However there is a catch. Some html components like block frames can not determine their preferred size. -// this is their size if they were layed out intrinsically. So the box will flow the child to determine this can +// this is their size if they were laid out intrinsically. So the box will flow the child to determine this can // cache the value. // Boxes and Incremental Reflow // ---------------------------- -// Boxes layout out top down by adding up their childrens min, max, and preferred sizes. Only problem is if a incremental +// Boxes layout out top down by adding up their children's min, max, and preferred sizes. Only problem is if a incremental // reflow occurs. The preferred size of a child deep in the hierarchy could change. And this could change // any number of syblings around the box. Basically any children in the reflow chain must have their caches cleared // so when asked for there current size they can relayout themselves. diff --git a/mozilla/layout/xul/base/src/nsBoxLayoutState.cpp b/mozilla/layout/xul/base/src/nsBoxLayoutState.cpp index f347d5934bd..3c209406bc1 100644 --- a/mozilla/layout/xul/base/src/nsBoxLayoutState.cpp +++ b/mozilla/layout/xul/base/src/nsBoxLayoutState.cpp @@ -124,7 +124,7 @@ nsBoxLayoutState::HandleReflow(nsIBox* aRootBox) mType = Resize; break; - // if its an initial reflow we must place the child. + // if it's an initial reflow we must place the child. // otherwise we might think it was already placed when it wasn't case eReflowReason_Initial: mType = Initial; @@ -209,7 +209,7 @@ nsBoxLayoutState::Unwind(nsReflowPath* aReflowPath, nsIBox* aRootBox) // don't want to just mark dirty that would notify the // box and it would notify its layout manager. This would // be really bad for grid because it would blow away - // all is cached infomation for is colums and rows. Because the + // all is cached information for is colums and rows. Because the // our parent is most likely a rows or columns and it will think // its child is getting bigger or something. nsIBox* parent; diff --git a/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp b/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp index 997350dae29..79d1e2d852e 100644 --- a/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp +++ b/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp @@ -90,7 +90,7 @@ // notices it as a delay. #define USER_TIME_THRESHOLD 150000 -// how long it takes to layout a single row inital value. +// how long it takes to layout a single row initial value. // we will time this after we scroll a few rows. #define TIME_PER_ROW_INITAL 50000 diff --git a/mozilla/layout/xul/base/src/nsListBoxLayout.cpp b/mozilla/layout/xul/base/src/nsListBoxLayout.cpp index 5bc7f8e8eb5..36e9ef68ece 100644 --- a/mozilla/layout/xul/base/src/nsListBoxLayout.cpp +++ b/mozilla/layout/xul/base/src/nsListBoxLayout.cpp @@ -232,7 +232,7 @@ nsListBoxLayout::LayoutInternal(nsIBox* aBox, nsBoxLayoutState& aState) PRInt32 newPos = yOffset+margin.top; // are we pushing down or pulling up any rows? - // Then we may have to redraw everything below the the moved + // Then we may have to redraw everything below the moved // rows. if (redrawStart == -1 && childRect.y != newPos) redrawStart = newPos; diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 6fb967f18c3..0aa48351503 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -880,7 +880,7 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag) // XXX, bug 137033, In Windows, if mouse is outside the window when the menupopup closes, no // mouse_enter/mouse_exit event will be fired to clear current hover state, we should clear it manually. - // This code may not the best solution, but we can leave it here untill we find the better approach. + // This code may not the best solution, but we can leave it here until we find the better approach. nsIEventStateManager *esm = mPresContext->EventStateManager(); diff --git a/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp b/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp index a2a166aa42d..830b8d8d4bf 100644 --- a/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp @@ -407,7 +407,7 @@ nsMenuPopupFrame::GetRootViewForPopup(nsIFrame* aStartFrame, } while (view) { - // Walk up the view hierachy looking for a view whose widget has a + // Walk up the view hierarchy looking for a view whose widget has a // window type of eWindowType_popup - in other words a popup window // widget. If we find one, this is the view we want. nsIWidget* widget = view->GetWidget(); diff --git a/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp b/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp index 6420d91f824..15c656ba0a2 100644 --- a/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp +++ b/mozilla/layout/xul/base/src/nsScrollbarButtonFrame.cpp @@ -175,7 +175,7 @@ nsScrollbarButtonFrame::MouseClicked() else if (value.EqualsLiteral("increment")) curpos += increment; - // make sure the current positon is between the current and max positions + // make sure the current position is between the current and max positions if (curpos < 0) curpos = 0; else if (curpos > maxpos) diff --git a/mozilla/layout/xul/base/src/nsSliderFrame.cpp b/mozilla/layout/xul/base/src/nsSliderFrame.cpp index b5029937ed9..18246ecb8db 100644 --- a/mozilla/layout/xul/base/src/nsSliderFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSliderFrame.cpp @@ -454,7 +454,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext, nsIFrame* thumbFrame = mFrames.FirstChild(); - // take our current position and substract the start location + // take our current position and subtract the start location pos -= mDragStart; PRBool isMouseOutsideThumb = PR_FALSE; if (gSnapMultiplier) { diff --git a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp index eaa3f831c24..992064bdcaf 100644 --- a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp @@ -516,7 +516,7 @@ nsSplitterFrameInner::MouseDrag(nsPresContext* aPresContext, nsGUIEvent* aEvent) // mDragStart is in frame coordinates nscoord start = mDragStart; - // take our current position and substract the start location + // take our current position and subtract the start location pos -= start; //printf("Diff=%d\n", pos); diff --git a/mozilla/layout/xul/base/src/nsSprocketLayout.cpp b/mozilla/layout/xul/base/src/nsSprocketLayout.cpp index 3f96fd697c4..ef0a7add316 100644 --- a/mozilla/layout/xul/base/src/nsSprocketLayout.cpp +++ b/mozilla/layout/xul/base/src/nsSprocketLayout.cpp @@ -869,7 +869,7 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox else currentBox->flex = flex; - // we we specified all our children are equal size; + // we specified all our children are equal size; if (frameState & NS_STATE_EQUAL_SIZE) { if (prefWidth > biggestPrefWidth) @@ -916,7 +916,7 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox } - // we we specified all our children are equal size; + // we specified all our children are equal size; if (frameState & NS_STATE_EQUAL_SIZE) { currentBox = aBoxSizes; @@ -1046,7 +1046,7 @@ nsSprocketLayout::ChildResized(nsIBox* aBox, // if we are a horizontal box see if the child will fit inside us. if ( childActualHeight > containingHeight) { - // if we are a horizontal box and the the child it bigger than our height + // if we are a horizontal box and the child is bigger than our height // ok if the height changed then we need to reflow everyone but us at the new height // so we will set the changed index to be us. And signal that we need a new pass. diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp index 23fab476bf1..123f427ea17 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp @@ -2702,7 +2702,7 @@ nsTreeBodyFrame::PaintTwisty(PRInt32 aRowIndex, // determine the twisty rect's true width. This is done by examining the style context for // a width first. If it has one, we use that. If it doesn't, we use the image's natural width. // If the image hasn't loaded and if no width is specified, then we just bail. If there is - // a -moz-apperance involved, adjust the rect by the minimum widget size provided by + // a -moz-appearance involved, adjust the rect by the minimum widget size provided by // the theme implementation. nsRect imageSize = GetImageSize(aRowIndex, aColumn, PR_TRUE, twistyContext); if (imageSize.height > twistyRect.height) @@ -2737,7 +2737,7 @@ nsTreeBodyFrame::PaintTwisty(PRInt32 aRowIndex, PaintBackgroundLayer(twistyContext, aPresContext, aRenderingContext, twistyRect, aDirtyRect); if ( useTheme ) { - // yeah, i know it says we're drawing a background, but a twisty is really a fg + // yeah, I know it says we're drawing a background, but a twisty is really a fg // object since it doesn't have anything that gecko would want to draw over it. Besides, // we have to prevent imagelib from drawing it. theme->DrawWidgetBackground(&aRenderingContext, this,