Commit Graph

276 Commits

Author SHA1 Message Date
waterson%netscape.com
20edcce927 Bug 56115. Be sure to determine if CanContinueTextRun() while walking *down* as well as across. r=buster, a=sfraser 2000-10-13 00:44:53 +00:00
waterson%netscape.com
072a02200b Bug 54005. Test if frame CanContinueTextRun() before advancing to its sibling. r=karnaze, a=buster 2000-10-09 22:03:03 +00:00
buster%netscape.com
2c272b9573 bug 54980
bug 50480 (list-item marker of link list overlaps)
r=karnaze
a=waterson
2000-10-04 04:17:36 +00:00
buster%netscape.com
8b236e6e67 bug 50758 (text-align:right for text control doesn't render as you type)
r=sfraser
a=waterson
We now invalidate the line explicitly if text-align:right is set, because
our incremental painting is biased towards frames that grow to L2R.  This
is a heavy-handed workaround, but it ends up doing very little extra invalidation,
and uses an already existing mechanism by just setting an existing flag.
2000-09-21 06:03:39 +00:00
buster%netscape.com
829ab5c58e just cleaning up a warning, found during fix for bug 52307 2000-09-14 05:50:56 +00:00
buster%netscape.com
05f2509eec checking in fix for unix compiler, stupid nsCOMPtr x-platform incompatibility. 2000-09-11 21:43:46 +00:00
buster%netscape.com
11241fb485 bug 14280
nsTextTransformer.cpp.
  I moved where we translate the nbsp to a (ascii 32 space character) until after the i18n routines are called, so they can properly account
  for the space as non-breaking and therefore part of the first word in the block.

bug  39901 and 38396
  nsHTMLImageLoader.*, nsImageFrame.cpp
  I backed out the bad fix for 38396, and put in a new fix where I store a little state in the image loader flags for cases where the image
  gets an unconstrained reflow and has %-based width.  This does not handle %-based min-width or max-width, that would be a separate
  bug that I'll file shortly.  But this fixes the vast majority of real cases out there.

bug  18754
  nsHRFrame.cpp, quirks.css, nsCSSFrameConstructor.cpp, last part of nsLineLayout.cpp
  in quirks mode, I changed HR from a block element to a replaced inline element that acts like a block, using generated content to get
  newlines before and after the HR.  This isn't ideal, but it gets us backwards compatibility, and ian and dbaron have blessed the approach.

bug  50257
  nsLineLayout.cpp
  Did a couple of things in here:
       * The actual fix is controlled by FIX_BUG_50257 #define symbol.  This basically says that an break (BR) will always fit on a line.
         A more general solution would probably be to round up to the nearest pixel, and if the thing is less than a pixel make it fit on a
         line.  This is a wimpier, safer solution.
       * I noticed that the way we got the compatibility mode was way out of date, very wasteful.  So I fixed that.
       * I noticed that there were a bunch of redundant SetFlag calls.  Since the flag variable is initialized to 0, setting a flag to 0 on a newly
         created object is a waste.

  nsBlockFrame.cpp  --  just added a comment to some odd looking code, to make sure no one comes along later and breaks it
2000-09-11 21:15:02 +00:00
buster%netscape.com
37e900a62c bug 28811
r=karnaze
The problem was we were over-eager in optimizing away a resize reflow for lines
that contain %-aware children.  We were only looking at the first-level children
of a line, not all the children.  Now, we compute a bit for each inline container
based on it's children, true if any of them are %-aware wrt any width measurement.
We propogate this bit upwards to a bit on the line itself, and check this bit during reflow.
2000-09-11 20:46:44 +00:00
buster%netscape.com
a017796f68 bug 45152 (Typed text does not render in TextAreas with a horizontal scrollbar)
fixed by adding a flag in nsLineBox for the content of a line to mark it "forceInvalidate",
logic in nsLineLayout to set the line dirty for initial reflow of text frames,
and logic in block to check the new flag.
r=kin
2000-08-24 04:26:43 +00:00
waterson%netscape.com
4896ee6d33 Bug 46693. Check to see if we CanContinueTextRun() while walking over the frames to FindNextText(). This revives the logic that I nuked when fixing 19051, and keeps you from trying to walk over <br> or other frames to erroneously continue a text run. r=akkana. 2000-07-28 22:29:28 +00:00
rbs%maths.uq.edu.au
af8754b765 Enable the code to export the baseline out of the block frame code to support 'vertical-article: baseline' in table-cells. bug 10207. a:waterson@mozilla.org. was r:buster@netscape.com. 2000-07-28 09:18:15 +00:00
waterson%netscape.com
349ccf4344 Bug 19051. Checked in wrong patch for nsLineLayout.cpp; we want to check the display type, not the frame type, to determine if it's a block frame. 2000-07-27 05:20:09 +00:00
waterson%netscape.com
9bd4266798 Bug 19051. Remove code that computed and maintained nsTextRun. Instead, compute 'next text' when required by crawling the frame tree in nsLineLayout::FindNextText(). r=roc+moz@cs.cmu.edu 2000-07-27 05:16:08 +00:00
buster%netscape.com
b5b8e94c24 fixed nsbeta2+ bugs 42138 35772 37657 38157 40283 35964
r=waterson, rods
2000-06-14 23:15:59 +00:00
rbs%maths.uq.edu.au
1a36f0816d [#ifdef MOZ_MATHML: not yet part of default build]. Export the baseline out of the block frame code to support 'vertical-align: baseline' in table-cells. bug 10207. r:buster@netscape.com. a:waterson@mozilla.org 2000-06-05 08:24:18 +00:00
buster%netscape.com
d421f31ce4 just removed a warning 2000-05-09 05:08:27 +00:00
buster%netscape.com
a89c2dd5fd I suck. More debugging code that should have been removed. 2000-04-17 15:54:55 +00:00
buster%netscape.com
f40b76249a bug 588 (text justification) for Robert O'Callahan <roc+moz@cs.cmu.edu>
r=buster

bug 18545 ([FLOAT] Problem Centering <TABLE> with <DIV> tag)
r=troy

bugs 18827, 19579, 22327 24782, 26512, 30124, 31849, 32846 (floater behavior wrong)
The primary change here is to determine if a block is impacted by a floater, and if so
mark the block's lines dirty when appropriate.
r=troy

no bug number.  performance work.  reduced the size of some reflow data structures by
collapsing multiple fields into a single bit field.
r=troy
2000-04-17 14:40:46 +00:00
buster%netscape.com
1c6eca645a bug 29595 (and others)
fixes layout of pages where a single line is impacted by 2 or more floaters
r=troy
2000-03-22 23:19:10 +00:00
karnaze%netscape.com
e68861558c bug 28071 - added Use DTD compatibility mode to viewer. layout uses single mechanism for determining compatibility mode. r=rods. 2000-03-20 23:39:22 +00:00
dbaron%fas.harvard.edu
b07eae2b6f 1) Make PRE line layout backwards compatible in quirks mode (related to bug 26998).
2) Don't use strings when I can use atoms.
3) Fix bug 28472 by correcting error in earlier checkin.
r=buster@netscape.com
2000-03-16 01:14:57 +00:00
dbaron%fas.harvard.edu
2fc933f4a5 Refix bug 5821, which I broke with a mistake in my earlier change. r=buster@netscape.com a=rickg@netscape.com 2000-02-19 03:42:30 +00:00
dbaron%fas.harvard.edu
e0c71d1e53 Fix bug 15428 as suggested by VYV03354@nifty.ne.jp . Stop using 0 as the initial values for min and max of inline box contents so that lines that do not (vertically) contain their own baseline are sized correctly. Also, correctly size BR frames using their line-height (for strict-mode only).
Fix bugs 24186, 26996, and 26998 by reworking the quirks-mode line-height handling so that inline elements that do not have text as children (or meet a few other conditions that show the author wants real CSS support) will not increase the size of the line, but will be as close to their correct size as possible without enlarging the line.  This fix includes emulation of the strange Nav4/IE quirk that a block's line-height is enforced on the first line of LI elements and the last line of LI, DD, and DT elements.  Many of the changes are removing an earlier fix for 24186.

r=buster
2000-02-15 04:26:44 +00:00
pp%ludusdesign.com
58065dda04 Converting ::GetIID() into NS_GET_IID(). Bug #20232. r=scc, r=mozbot 2000-02-02 22:24:56 +00:00
buster%netscape.com
e959bc93cd fixing linux bustage. got caught by a platform difference in handling
of nsCOMPtr and the equality operator
2000-02-02 08:28:37 +00:00
buster%netscape.com
d2e420cfb4 fixed bug 24186 (well, fixed it enough for beta at least. see bug for details)
r=troy
2000-02-02 07:38:23 +00:00
troy%netscape.com
3b23873b58 b=25245 Fixed ApplyLeftMargin() to not subtract for margins if it is an
unconstrained reflow
2000-01-30 18:29:52 +00:00
nisheeth%netscape.com
56525e3574 r=troy. Reflow commands are now coalesced by block and inline frames. This fixes bug 985 in which we now generate 6 reflow commands instead of 257. 2000-01-12 08:28:24 +00:00
troy%netscape.com
8791b810ba Added new #define NS_SHRINKWRAPWIDTH that specifies that a frame should
shrink wrap its width (paying attention to the maximum computed width). Mostly
complete implementation for block frames
2000-01-03 04:32:13 +00:00
kin%netscape.com
c802915a2e Fix for bug #18622 (UMR in nsLineLayout::CanPlaceFrame)
nsLineLayout::ReflowFrame() now sets some of the psd flags before
calling aFrame->Reflow().
r=troy@netscape.com,norris@netscape.com  a=chofmann@netscape.com
1999-12-10 18:41:43 +00:00
troy%netscape.com
85012ab550 Change to how overflow is handled for absolutely positioned elements.
We no longer use nsIAraeFrame and now it's folded into the overflow
area in the reflow metrics
1999-12-06 15:49:53 +00:00
tbogard%aol.net
af1ce8d410 Changed nsIPresContext& to nsIPresContext*. Changed nsEventStatus& to nsEventStatus*. Now more compatible with XPIDL. a=vidur r=scc 1999-11-24 06:03:41 +00:00
troy%netscape.com
597b5f236b WillReflow/DidReflow changes and changes to the way view positioning
and sizing works
1999-11-19 15:33:29 +00:00
dmose%mozilla.org
5312eacf8c updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:40:37 +00:00
kipp%netscape.com
c93281e841 r=troy; fixed bugs 2636 and 17636 - line layout issues for some more edge cases (nobr's with floaters in them) and handling of nbsp 1999-11-02 15:44:57 +00:00
kipp%netscape.com
b8f8a97ca6 r=troy; fixed bug 14982 - the problem was that empty continuations of an inline non-replaced element (e.g. 'span') were impact line-height calculations when they should effectively disappear 1999-11-01 22:38:17 +00:00
troy%netscape.com
1585a751fb Moved a bunch of stuff out to a nsIFrameDebug interface 1999-11-01 22:12:45 +00:00
troy%netscape.com
a12c3d6c5d Folded reflow functions into nsIFrame and eliminated nsIFrameReflow and
nsIHTMLReflow. This saves 4 bytes per frame and cleans things up
1999-10-30 02:52:11 +00:00
kipp%netscape.com
f961e4b03a r=troy; updated api slightly to support fixes to bug 12760, 12958 and some resize-reflow optimization bugs 1999-10-29 14:33:26 +00:00
troy%netscape.com
87afecabc0 Changed SetView/GetView to take an additional argument which is the
pres context
1999-10-26 04:44:41 +00:00
kipp%netscape.com
e04f117392 Turned off some more debug noise 1999-10-25 23:05:15 +00:00
kipp%netscape.com
b10899223c r=troy; bug: 15153; fixed problem with style-change reflows not being propogated properly 1999-10-21 20:44:58 +00:00
kipp%netscape.com
c0f47fe47c Fixed edge case where line bounds wasn't quite accurate which causes the combined rect to not match which now wastes memory; only affects right aligned lines 1999-10-14 23:10:59 +00:00
kipp%netscape.com
e44578adf4 Fixed bugs with combined-area continuing to include trimmed whitespace (wip for 12297); Added support for tracking trim for 16176) 1999-10-12 23:27:32 +00:00
kipp%netscape.com
65f6ba5343 Cleanup moz-decl-counter usage and fix NS_LOG_ADDREF usage 1999-10-08 20:41:19 +00:00
kipp%netscape.com
b4438b15f9 Refixed bug #10496 - a=choffman, r=troy 1999-09-24 17:23:33 +00:00
kipp%netscape.com
d5d391a005 Reimplement TrimTrailingWhiteSpace; fixed another combined area bug (12910) 1999-09-21 00:14:22 +00:00
kipp%netscape.com
a01e908524 Fixed a glitch in the debug noise 1999-09-17 23:15:31 +00:00
kipp%netscape.com
beadfcb37c Reworked to be more css compliant; factored compatability logic out of nsInlineFrame into here 1999-09-09 21:04:37 +00:00
kipp%netscape.com
86e12ae621 Implement fix for bug #5821 as per dbaron's suggestion 1999-09-03 03:47:49 +00:00
kipp%netscape.com
1e904c8b7b Save some memory by not saving away useless text runs 1999-09-02 18:01:59 +00:00
kipp%netscape.com
f808fbb193 Reimplemented SizeOf methods in some of the frame classes; partial rework of first-line handling snapshot 1999-08-31 03:09:40 +00:00
kipp%netscape.com
bcb6fd2f40 Fixed computation of max-element-size for bug #12384; don't compute line-height in this class 1999-08-27 21:50:06 +00:00
troy%netscape.com
c3e32b0b65 Added 'm' prefix to a couple more data members of nsHTMLReflowState struct 1999-07-20 03:51:46 +00:00
troy%netscape.com
155ed6816a Added 'm' prefix to some of the nsHTMLReflowState data members 1999-07-20 03:41:03 +00:00
kipp%netscape.com
b32c6678b7 Removed some compiler warnings; fix subtlety with handling empty inline frames and whitespace compression for bug #5999 1999-07-14 17:29:32 +00:00
kipp%netscape.com
87e4c2d72f Removed HaveFixedContent* methods from nsHTMLReflowState and updated code to match (fix bug #7993) 1999-07-07 02:33:17 +00:00
nisheeth%netscape.com
aa6ad6f2fe Adding support in line layout for the CSS "direction" property. 1999-05-08 00:48:39 +00:00
kipp%netscape.com
f297ff8225 Tweaked to handle updated line-height calculation code that will now return -1 sometimes 1999-05-03 20:54:11 +00:00
kipp%netscape.com
e83d736b28 Clear first-letter ok style at the right time 1999-04-29 00:16:09 +00:00
kipp%netscape.com
cd85b25744 tweaked 1999-04-27 22:13:06 +00:00
troy%netscape.com
3b869d6014 Added code to check the placeholder's out-of-flow frame and see if it's
an absolutely positioned frame and not just assume it's a floater
1999-04-25 17:01:07 +00:00
kipp%netscape.com
96c0fa0aa2 nit 1999-04-23 20:01:38 +00:00
kipp%netscape.com
3ecd939521 Moved hacked call to floater adds out of nsPlaceholderFrame and into nsLineLayout 1999-04-23 15:15:53 +00:00
kipp%netscape.com
f43163b5c4 Switch to a different (more accurate) BR handling hack... 1999-04-03 18:57:30 +00:00
kipp%netscape.com
6bffe03233 Select size of builtin arrays by platform (sigh); remove some cruft; added in support for debugging memory leaks and reducing initialization time 1999-03-29 23:46:34 +00:00
kipp%netscape.com
90bc4551ea Removed carried-out-top-margin 1999-03-27 01:24:24 +00:00
kipp%netscape.com
94b81992a1 Work around some first-letter bugs 1999-03-26 00:41:36 +00:00
kipp%netscape.com
b71670884c Fixed a bug that prevented text-indent from working next to floaters; support moz-right and moz-center text-align values 1999-03-25 03:49:29 +00:00
kipp%netscape.com
0667c4e9c1 Tweaked the line-breaking logic so that certain floater situations don't trigger crashes 1999-03-24 15:41:49 +00:00
kipp%netscape.com
bee4a28ce9 Made state that is really per-span state part of PerSpanData to fix some reflow bugs 1999-03-22 20:45:09 +00:00
kipp%netscape.com
80d3e71a85 Reworked CanPlaceFrame logic to be slightly more efficient and to handle breaking around floaters differently to conform to CSS 1999-03-21 01:14:43 +00:00
kipp%netscape.com
503c59ff13 Fixed a bug with zero height spans and combined area calculations that led to tall vertical scrollbars...; also switch to using CRAZY macros 1999-03-20 21:55:22 +00:00
kipp%netscape.com
1564a15bba Added some debugging help for tracking down max-element-size bugs 1999-03-20 19:38:50 +00:00
kipp%netscape.com
06e27bfd9d Added more bad-frame detection; fixed a purify caught bug 1999-03-19 23:07:17 +00:00
kipp%netscape.com
c9067260be Spanked to collapse inline-reflow with line-layout into line-layout; fixed bugs #1278, #1990, #3527, #1670, etc. 1999-03-18 21:03:25 +00:00
troy%netscape.com
03c5c1f520 Changed GetNextInFlow() and GetPrevInFlow() to be pointer arguments and
not references
1999-02-24 04:48:08 +00:00
kipp%netscape.com
b23b120a19 Implement TreatFrameAsBlock 1999-02-01 17:32:49 +00:00
kipp%netscape.com
a6926809f0 Added DumpRegressionData; revised ListTag; added GetFrameName 1998-11-19 17:22:29 +00:00
kipp%netscape.com
add7918774 Added run-in and compact display types to the TreatFrameAsBlockFrame method 1998-11-11 03:54:47 +00:00
kipp%netscape.com
f41818bc4c Reworked white-space compression flags so that inline-reflow can detect white-space aware frames properly 1998-10-31 22:48:56 +00:00
kipp%netscape.com
084fde0160 Added FindTextRunsFor method 1998-10-20 00:23:11 +00:00
kipp%netscape.com
a77548baff Removed nsCSSLayout::GetStyleSize and converted callers to use state in the html reflow state 1998-10-12 17:00:32 +00:00
kipp%netscape.com
2031470780 Added methods to support word breaking 1998-10-10 04:35:01 +00:00
kipp%netscape.com
6dceba716f Mork work on floaters; support for clear style property 1998-10-09 22:58:25 +00:00
kipp%netscape.com
6333380ca0 Use pres-context as a ref instead of a pointer 1998-09-23 02:31:16 +00:00
kipp%netscape.com
8f2807a027 Removed css/layout directory 1998-09-15 00:19:49 +00:00
kipp
1a446c2e3f New and improved (?) line layout 1998-06-25 16:33:10 +00:00
troy
8bfcb70b73 Changed some pairs of GetStyleContext/GetStyleData calls to a single call
to nsIFrame::GetStyleData
1998-06-14 05:00:38 +00:00
karnaze
0ccd357a8f initial support for <iframe> 1998-06-11 16:46:33 +00:00
kipp
944ae7d0f1 Fixed a pending-break clear bug; use new ReflowInlineChild API 1998-06-09 17:47:49 +00:00
troy
66b6882d23 Added nsIReflowCommand interface 1998-06-09 04:51:44 +00:00
kipp
80f5fb359a Added another tracing log message 1998-06-09 00:49:12 +00:00
kipp
0e01e46467 Added no-wrap support 1998-06-05 17:53:28 +00:00
peterl
91c5893512 sync up to new style data apis 1998-06-05 06:09:09 +00:00
kipp
aec0b7c844 Verify that mIsBlock is correct 1998-06-04 23:10:15 +00:00
kipp
382a176fe8 Added code to do ebina style margins; perform horizontal alignment and relative positioning for blocks 1998-06-04 17:51:27 +00:00
kipp
bdcfe7d55f Wrap created frames in a view if necessary 1998-06-03 15:57:08 +00:00
kipp
9176bca6d6 Set first child during reflow unmapped; leave white space compression flag alone for zero sized frames 1998-06-01 23:39:40 +00:00
kipp
014fd2716d Use new mPendingBreak state 1998-05-30 17:46:11 +00:00
troy
7a485fcc40 Changed nsReflowState structs to be linked together 1998-05-29 20:36:05 +00:00
kipp
8bf7e83385 Removed some unused list layout cruft 1998-05-29 02:33:50 +00:00
kipp
59784b7f81 Get initial reflow state set right during child reflow; support list bullets directly 1998-05-29 02:15:46 +00:00
troy
4910a3a407 Added 'ns' prefix to class name 1998-05-28 02:37:37 +00:00
kipp
e3c2b23d0a Use revised HorziontallyPlaceChildren api 1998-05-28 02:01:50 +00:00
kipp
a51ed32383 Set x,y coordinate of frame before reflowing it 1998-05-27 22:24:57 +00:00
kipp
739607faa8 Moved certain line layout state into a state struct that can be saved/restored for word breaking; updated code to use it; fixed up split line logic to use state to compute push count; added in word breaking logic; eliminated old word break code 1998-05-27 21:06:55 +00:00
troy
3ea1d2d8e3 Merged ResizeReflow() and IncrementalReflow() into one Reflow() member function 1998-05-25 17:31:49 +00:00
troy
6204c78831 Changed splittable enum to be bit flags 1998-05-22 04:54:11 +00:00
troy
d0e4da316d Some work in progress for incremental floaters 1998-05-22 02:38:41 +00:00
kipp
2addaf04c8 disabled reflow-mapped-child for now 1998-05-21 16:29:20 +00:00
kipp
460f3aac59 better handle reflow avoidance; factored align children slightly different so that more code is shared between ResizeReflow and IncrementalReflow; fixed more cases where reflow is required 1998-05-21 16:12:10 +00:00
peterl
7168f94691 Changed GetStyleData to use an enum instead of an nsID 1998-05-21 02:34:13 +00:00
kipp
32a594133f Disable reflow optimizations for now 1998-05-20 21:51:51 +00:00
kipp
bd4c33187c Use new tracing macros; add in ReflowMappedChild to avoid reflowing children 1998-05-20 16:27:46 +00:00
kipp
df1f69f0cd Moved margin code into line layout 1998-05-12 23:49:40 +00:00
peterl
9bc80be166 sync to new spacing apis 1998-05-12 22:28:01 +00:00
troy
5b69e1f043 Change to nsIFrame API 1998-05-12 04:17:56 +00:00
troy
e0a3f308d8 Work in progress on block incremental reflow 1998-05-09 03:52:29 +00:00
troy
b5f329f71c Work on getting floaters working again 1998-05-07 05:25:08 +00:00
kipp
519a6403a4 Ported to new CreateFrame/CreateContinuingFrame APIs 1998-05-07 00:08:20 +00:00
troy
d477d86672 Frames no longet store the content index-in-parent 1998-05-05 23:56:50 +00:00
troy
b6217c70a6 Changed body to create block pseudo-frame instead of a column pseudo frame,
and hooked up the reflow appended code
1998-05-03 03:51:48 +00:00
kipp
fa2e5e968b Spanked nsBlockFrame: newly rewritten, broken into two pieces (see nsLineLayout.h,.cpp for the line layout code) 1998-05-02 00:56:24 +00:00
kipp
2c54f1bfe8 Updated 1998-05-02 00:40:25 +00:00
kipp
1c28e03068 new 1998-04-30 23:32:32 +00:00