Commit Graph

101 Commits

Author SHA1 Message Date
David Zbarsky
d70685476e [Bug 799407] Fix build warnings in layout r=roc 2012-10-10 01:00:05 -04:00
Matt Woodrow
1d675c61d6 Bug 539356 - Part 9c - Remove old invalidation code. r=bz 2012-08-29 17:39:31 +12:00
Ed Morley
5a3b322459 Revert mozilla-inbound to e4dd1fa6d222 for crashes and test failures on a CLOSED TREE 2012-09-27 16:34:46 +01:00
Matt Woodrow
49d4c24594 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-08-29 17:38:58 +12:00
Ehsan Akhgari
8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Ehsan Akhgari
6ef72aef93 Backout changeset f568fc280fb0 (bug 539356) because of performance and correctness regressions 2012-07-03 20:24:55 -04:00
Matt Woodrow
1f0dbc7c74 Bug 539356 - Part 9 - Implement DLBI. r=roc,bz,jwatt 2012-06-30 15:06:11 +12:00
Ed Morley
f0346ff780 Merge mozilla-central to mozilla-inbound 2012-05-21 13:19:38 +01:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
L. David Baron
11f5c76522 Replace AutoMaybeNullInflationContainer with AutoMaybeDisableInflationForShrinkWrap since the concept of the pres context's current inflation container will be going away. (Bug 747720, patch 2) r=roc 2012-05-20 22:18:27 -07:00
Mats Palmgren
86f1c718ff Bug 730769 - Add NewLineBox/FreeLineBox methods to nsBlockFrame. part=1/2 r=bz 2012-03-11 03:32:27 +01:00
L. David Baron
ba70aee5a1 Set inflation container to null during ComputeSize calls for inflation containers, when we should not have inflation applied. (Bug 706609, patch 4.5) r=roc 2012-01-24 17:21:29 -08:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Ehsan Akhgari
bdc5c5427c Bug 659828 - Part 1: Apply table margins to the outer table frame instead of the inner table frame (also fixes bug 87277); r=dbaron
Outer table frames act as CSS2.1 table wrapper boxes.  We used to lay them out
without taking their margins into the account, which meant that their width was
always equal to the available width.  This breaks horizontal positioning of
absolutely positioned kids of a table frame.

The main purpose of this patch is to apply the margins of tables to their outer
frame, instead of the inner frame.  This means that the inner table frame will
always have a zero margin, which means that a lot of the stuff which used to
rely on the fact that table margins are applied to the inner frame need to
change.

In particular, in order to get the computed margins of a table, we used to query
the inner table frame, and this patch corrects that.  Also, when shrink wrapping
tables, we used to not take the margins of the inner table frame into account,
which is fixed by this patch too.  nsBlockReflowState::
ComputeReplacedBlockOffsetsForFloats also needed to be changed to read the
margin values from the outer frame too.

Also, as part of this patch, we start to respect the CSS2.1 margin model for
captions on all sides.  This means that in particular, the top/bottom margins on
the top-outside and bottom-outside captions will not be collapsed with the
top/bottom margins of the table, and that the margins of the caption element
contribute to the width and height of the outer table frame.  The
427129-table-caption reftest has been modified to match this new behavior.

Another side effect of this bug is fixing bug 87277, and the reftests for that
bug are marked as passing in this patch.
2011-05-31 19:02:56 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Craig Topper
7a1b417e0b Bug 654369 - Part 10: Make nsFloatManager::StoreRegionFor return void r=bz
--HG--
extra : rebase_source : dcf1babec6d26cfaee2e050e1fbd8abca941c8eb
2011-05-08 01:00:29 -07:00
Ed Morley
7bd9e7ed4a Bug 665723 - Fix unused variable warnings in layout/generic/; r=roc 2011-06-21 17:37:47 +02:00
Robert O'Callahan
c957ae039e Bug 641426. Part 5: Avoid operator== where possible to distinguish between 'equal edges' and 'equal areas' for rectangles. r=dbaron,sr=cjones 2011-04-19 15:07:23 +12:00
Robert O'Callahan
dc7ee6cfc4 Bug 594333. Invalidate frame subtree (including layers) when moving a float. r=dbaron 2010-12-20 14:37:43 +13:00
L. David Baron
bea16867c4 Reflow floating ::first-letter before deciding where to place the float, since we need to reflow it to learn its width. (Bug 594303) r=roc a2.0=blocking:betaN 2010-10-06 21:25:47 -07:00
L. David Baron
b401e8f1d5 Convert nsBlockReflowState::mFloatCombinedArea and part of nsBlockFrame to split overflow areas. (Bug 542595, patch 9) r=roc a2.0=blocking2.0:beta8 2010-10-06 21:25:45 -07:00
L. David Baron
109dae0465 Don't push floats past break due to total lack of available height when we're required to place something. (Bug 586973) r=roc a2.0=blocking 2010-08-19 09:38:00 -04:00
L. David Baron
52881c4fb2 Split floats when they are overflow-incomplete. (Bug 585598) r=roc a2.0=blocking 2010-08-19 09:38:00 -04:00
fantasai
4b31319f01 Change coordinate system in the float manager from content box (most of the time, but sometimes border box) to always border box. (Bug 551425) r=dbaron a2.0=blocking+ 2010-08-11 12:32:53 -07:00
L. David Baron
6d279b0435 Rename float continuations to pushed floats. (Bug 563584, patch 33) r=roc
This patch was generated with the following sed commands on layout/generic/*.{h,cpp}: 's/FLOAT_CONTINUATION/PUSHED_FLOAT/g;s/FloatContinuation/PushedFloat/g;s/float continuation/pushed float/g' plus whitespace fixup where the frame state bits are defined.
2010-08-05 21:59:20 -07:00
L. David Baron
48dd50ff36 Don't force availableHeight to be nonnegative, because doing so means that we'll place zero height blocks (including their non-zero-height contents) at the bottom of a page when there's not room (see nsHTMLReflowState::SetTruncated). (Bug 563584, patch 32) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
5239f85a39 Don't split floats when we're not paginating. (Bug 563584, patch 26) Fixes assertion on layout/generic/crashtests/461294-1.html . r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
bc78f1fdf5 In a constrained height situation, we need to reflow anything with floats. (Bug 563584, patch 25) Fixes assertion on layout/generic/crashtests/408883-1.html . r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
5deb652621 Add bit to lines indicating that they may have a placeholder for a float that was pushed to the next line (and bump the child count up to 32 bits). (Bug 563584, patch 24) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
934f7dfb67 Pass correct *remaining* height to float manager, rather than the whole height of the content area. (Bug 563584, patch 22) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
4a3f5d15df Remove aReflowStatus parameters made unnecessary by previous patch. (Bug 563584, patch 20) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
5247c76404 Do the same for PlaceBelowCurrentLineFloats: don't propagate the truncation of a float into the line's reflow status. (Bug 563584, patch 18) r=roc 2010-08-05 21:59:20 -07:00
L. David Baron
867d31744c Don't propagate the float's reflow status through places that expect an inline's reflow status, to avoid the assertion for which bug 563584 was filed. This separates pushing of floats from pushing of lines, and allows first-in-flow floats to be pushed to the next page without their associated line. (Bug 563584, patch 17) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
646c626078 Steal float back before reflowing it, in order to allow first continuation of a float to be pushed to the next page. (Bug 563584, patch 15) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
fd5ab03929 nsBlockFrame::ReflowFloatContinuations doesn't need anything in AddFloat other than FlowAndPlaceFloat. (Bug 563584, patch 14) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
e714f071f9 Manage float continuations to-be-pulled by the next-in-flow better by keeping them in a separate frame list until they're actually pulled. (Bug 563584, patch 13) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
4f730231c6 Don't try to clear pushed floats when computing the final size of blocks. Fixes scrollbar on layout/reftests/bugs/563584-6-columns.html . (Bug 563584, patch 11) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
138354b6a3 Use an AutoRestore to restore mY in nsBlockReflowState::FlowAndPlaceFloat. (Bug 563584, patch 7) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
489ed8d30b When we're in columns (and therefore not splitting floats), push floats that don't fit to the next column. (Bug 563584, patch 6) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
08a16e6b29 Replace force-fit with setting mIsTopOfPage correctly. (Bug 563584, patch 5) r=roc 2010-08-05 21:59:19 -07:00
L. David Baron
f46f248ca8 Make nsBlockReflowState::FlowAndPlaceFloat reflow the float after computing its vertical position, so we know how much height is actually available. (Bug 563584, patch 4) r=roc
Test coverage for this is in the future patch "Add reftests for bug 563584.".
2010-08-05 21:59:18 -07:00
L. David Baron
353538a3ba Most of CanPlaceFloat is unnecessary given the float placement rules (in particular, that the top of a float cannot be higher than the top of any prior left or right float) and the fact that we now split floats. (Bug 563584, patch 3) r=roc 2010-08-05 21:59:18 -07:00
L. David Baron
11f75cf522 Remove aForceFit/aRelaxHeightConstraint concept from float reflow, since we now split floats rather than push them to the next page (and correct propagation of nsHTMLReflowState::mFlags::mIsTopOfPage will force fitting when we need to). (Bug 563584, patch 2) r=roc 2010-08-05 21:59:18 -07:00
L. David Baron
a33881c053 Fix assertion about float manager state by restoring old float manager state when we place a float and then cancel that placement. (Bug 563584, patch 1) r=roc 2010-08-05 21:59:18 -07:00
L. David Baron
da49db240b Subtract the correct border+padding. (Bug 546048) r=roc 2010-04-04 14:46:15 -07:00
Robert O'Callahan
9a2ed61b34 Bug 551660. Switch layout code from using nsPropertyTable to FramePropertyTable. r=mats,sr=dbaron 2010-03-29 14:46:55 +13:00
Daniel Holbert
2d9d5efe4f comment-only typo fix: s/its/it's/ for contractions in nsBlockReflowState.cpp 2010-01-08 16:38:08 -08:00
L. David Baron
1e581250d4 Make unconstrained width assertions into warnings because we can hit them when we clamp really large widths. (Bug 525100) r=roc 2009-10-28 20:22:28 -07:00
Mats Palmgren
948203eb7d Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX. b=512106 r=roc 2009-09-16 17:01:36 +02:00