Commit Graph

509 Commits

Author SHA1 Message Date
Jeff Muizelaar
3efeae39c6 Bug 753058. Add SAMPLE_LABELS for shadows. r=ehsan
This will make this things more obvious on the profile.
2012-05-08 18:10:02 -04:00
Makoto Kato
6bbd48cb4a Bug 249159 - Part 2 Implement CSS3 Text word-break property. r=dbaron, smontagu 2012-05-07 12:18:23 -07:00
Jeff Muizelaar
4c6a9736de Bug 745864. Add SAMPLE_LABELs to layout code. r=roc, a=joe
--HG--
extra : rebase_source : d826780c34692d333442b6bf563791b53bf3aa3d
2012-04-16 14:37:59 -04:00
Robert O'Callahan
833e8a244f Bug 733607. Restructure logic to compute snapped bounds of display items in layer coordinates. Moves responsibility for computing snapped bounds from within the display items to callers of GetBounds/GetOpaqueRegion. r=tnikkel
Previously we snapped the results of nsDisplayItem::GetBounds and
nsDisplayItem::GetOpaqueRegion internally. By tracking which display items were
inside transforms, we disabled snapping quite conservatively whenever an ancestor
had a transform, which is undesirable.

With this patch, we don't snap inside GetBounds or GetOpaqueRegion, but just return
a boolean flag indicating whether the item will draw with snapping or not. This flag
is conservative so that "true" means we will snap (if the graphics context has a transform
that allows snapping), but "false" means we might or might not snap (so it's always safe
to return false).

FrameLayerBuilder takes over responsibility for snapping item bounds. When it converts
display item bounds to layer pixel coordinates, it checks the snap flag returned from
the display item and checks whether the transform when we draw into the layer will be
a known scale (the ContainerParameters scale factors) plus integer translation. If both
are true, we snap the item bounds when converting to layer pixel coordinates. With
this approach, we can snap item bounds even when the items have ancestors with active
transforms.
2012-04-10 23:24:18 +12:00
Scott Johnson
10f76a2526 Bug 708187: Disable caching of font inflation inside of BuildTextRunsScanner to prevent bleeding of bad values. [r=dbaron] 2012-03-26 22:37:16 -07:00
Simon Montagu
8ea4557aa9 Add a mParagraphDepth member to BidiParagraphData and cache it on frames to track nested bidi-isolated paragraphs. Use mParagraphDepth (* 2 + isRTL in order to keep LTR even and RTL odd) as the initial paragraph embedding level instead of pushing a stack of embedding codes. Pass the <bdi> frame instead of its first-child to BidiParagraphData::Reset and save a call to GetParent(). Split inline ancestors before and after bidi-isolated paragraphs, in the same way that we currently do between runs in different directions. This required also adding code to SplitInlineAncestors to handle situations where the parent frame is being split before its first child or after its last child. In JoinInlineAncestors, prevent frames that belong to paragraphs isolated from one another from being rejoined. Bug 712600, r=ehsan, roc 2012-01-11 21:26:02 +02:00
Daniel Holbert
ce6dc9863d Bug 732610 - Make nsIFrame::ComputeSize take a bitfield 'aFlags' instead of a bool 'aShrinkWrap'. r=dbaron 2012-03-16 11:01:05 -07:00
Cameron McCormack
96242ad44d Bug 736326 - Fix nscoord/nscolor typo. r=dbaron 2012-03-16 11:53:50 +11:00
Mats Palmgren
95f1774653 Bug 728908 - Make the Overflow lines property have both a nsLineList and a nsFrameList for fast access to the last frame, eliminate SetNextSibling calls, and to support GetChildList(kOverflowList). part 1/2 r=bz 2012-03-08 02:57:37 +01:00
Simon Montagu
6091adf028 Use GetGeneralCategory in IsPunctuationMark instead of the precompiled ccmap. Bug 731222, r=jfkthame 2012-03-01 00:17:27 -08:00
Jonathan Kew
9e665aa5d9 bug 724826 pt 3 - replace users of nsIUGenCategory service within libxul with direct access to mozilla::unicode::GetGenCategory. r=smontagu 2012-02-24 10:15:46 +00:00
Mats Palmgren
4986c8d89f Bug 638937 - For text frames that are a child a floating first-letter frame, use the parent of the associated placeholder as the line-container to search. r=roc 2012-02-22 00:50:16 +01:00
Cameron Kaiser
6e8b40d35a Bug 724453. Don't assume that sizeof(bool) == 1 when memsetting arrays of bools in nsTextFrame. r=bzbarsky 2012-02-06 13:00:54 -05:00
Edwin Flores
bc6a31b0b1 Bug 719288 - Fill and stroke SVG text with one Draw call r=roc 2012-02-04 13:11:09 +00:00
Edwin Flores
3f5de025f0 Bug 710521 - Refactor gfxFont to separate out drawing stroke and drawing to path. r=roc 2012-01-26 13:11:18 +01:00
L. David Baron
67a0afcf6e Honor inflation during intrinsic width computation when needed. (Bug 706609, patch 6) r=roc
This is the second of two patches to honor inflation during intrinsic
width calculation (which we need to do to make some form controls
inflate correctly).
2012-01-24 17:21:29 -08:00
L. David Baron
d789ef0b1b Switch nsLayoutUtils inflation methods to the new setup with state on the pres context. (Bug 706609, patch 5) r=roc
This is the third of three patches to rework the way we handle getting
the font inflation container and width data during reflow, which are
needed so that we can sometimes honor inflation during intrinsic width
calculation (which we need to do to make some form controls inflate
correctly).
2012-01-24 17:21:29 -08:00
Jonathan Watt
9fb3c8bb9f Bug 416581, part 1 - Move mLanguage from nsStyleVisibility to nsStyleFont. r=dbaron. 2012-01-24 13:09:55 +00:00
Jonathan Kew
c1c93594ee bug 715471 - use fallible allocation for potentially large buffers in nsTextFrameThebes.cpp. r=roc 2012-01-14 22:19:51 +00:00
Ed Morley
cfb250c0d7 Backout 148044813372 (bug 715471) for multiple test failures 2012-01-13 11:26:13 +00:00
Jonathan Kew
896e762f5e bug 715471 - use fallible allocation for potentially large buffers in nsTextFrameThebes.cpp. r=roc 2012-01-13 10:35:02 +00:00
Josh Matthews
93a2adcf34 Bug 454790 - Allow programmatic selection of -moz-user-select: none frames. r=roc 2012-01-12 15:59:19 -05:00
Simon Montagu
3ca7ecdbcb Implement text-align-last. Bug 536557, r=dbaron 2012-01-12 19:52:21 +02:00
Ed Morley
2099bb7e42 Backout 6605cc311ec5 & 9217303c2e5c (bug 536557) for M4 orange 2012-01-12 15:33:00 +00:00
Simon Montagu
dec2df3fe1 Implement text-align-last. Bug 536557, r=dbaron 2012-01-12 16:29:20 +02:00
Jonathan Kew
1bf3af6cfe bug 703100 - pt 3 - remove copy of original characters from gfxTextRun. r=roc 2011-12-06 12:39:19 +00:00
Jonathan Kew
f702c54c74 bug 703100 - pt 1 - eliminate gfxTextRunWordCache and gfxTextRunCache. r=roc 2011-12-06 12:39:18 +00:00
Ehsan Akhgari
0382216924 Bug 713856 - Dynamic change of DOM in lists before block element creates blank line; r=roc 2011-12-30 17:22:47 -05:00
Mats Palmgren
fa7242bcc4 Bug 700031 - "ASSERTION: Can only call this on frames that have been reflowed" with too-deep frame tree. r=roc 2011-12-29 14:21:00 +01:00
Nicholas Nethercote
33730101c6 Bug 711908 - Fix a bunch of GCC warnings in layout. r=dbaron. 2011-12-19 19:46:39 -08:00
Mats Palmgren
77f0b019cd Bug 619273 - Move the selection state bit from frames to content nodes. r=smaug 2011-12-20 10:15:41 +01:00
Matt Brubeck
5d8466250b Back out bug 710521, bug 672013, bug 702739 because of Mac reftest failures 2011-12-18 08:15:09 -08:00
Edwin Flores
68f8de97ea Bug 710521. Small refactor of gfxFont to separate drawing to paths and drawing strokes. r=roc 2011-12-18 21:53:03 +13:00
Alexander Surkov
43913eb06b Bug 706335 - Remove text accesible getting no text inside a preformatted area, r=marcoz, bz 2011-12-02 16:52:56 +08:00
L. David Baron
f7abcf04bc Make other users of font metrics (other than MathML and XUL) honor font size inflation. (Bug 627842, patch 15) r=roc
This does not address users of font metrics in layout/mathml/ (for text
size and alignment issues) or in layout/xul (for text size and sizing of
listbox and tree widgets):  see all the callers of GetFontMetricsFor*
in those directories.
2011-11-23 18:48:23 -08:00
L. David Baron
1bf4346bd3 Apply font size inflation to line heights. (Bug 627842, patch 11) r=roc
Since font size inflation applies to the text after style data
computation, we must separately apply this inflation to line heights.
2011-11-23 18:48:23 -08:00
L. David Baron
bb227ad838 Remove the unused context parameter to MeasureCharClippedText. (Bug 627842, patch 10) r=roc 2011-11-23 18:48:23 -08:00
L. David Baron
4fc409e924 Apply font size inflation to text. (Bug 627842, patch 9) r=roc
This applies the font size inflation to reflow and painting of text
frames.  However, it does not (by design) apply to intrinsic width
computation, since the inflation is itself a function of the containers
width, which can depend on the intrinsic width.
2011-11-23 18:48:23 -08:00
L. David Baron
1d218d5fcd Pass block's reflow state to nsTextFrame::UnionAdditionalOverflow. (Bug 627842, patch 8) r=roc 2011-11-23 18:48:23 -08:00
L. David Baron
b9738c841b Use the text run's font group for the tab width instead of recomputing it from the frame. (Bug 627842, patch 7) r=roc 2011-11-23 18:48:23 -08:00
Matt Woodrow
a570c6f017 Bug 700240 - Print contents of TextFrames. r=mats 2011-11-17 16:44:16 +13:00
Phil Ringnalda
15887bd189 Backout changesets c9abc8ef4626, d62512892555, 69f89ee5d08f, c511af7d8f58, 6a6a560a1492, ac0ec1183d19, 46669afabd15, 74f32abaa8c0, f197554cf989, 0a2405eb5b90, b48954598d7d, e0a82577259c, 0235d1541e58, 450f2557d3a2, e24d196602bf, 03c2ea0eeba3, 7aca4ef8e538, 11ec362e780b, 4b92a3b96446 (bug 627842) for Windows crashtest assertions and Android reftest failures
--HG--
extra : rebase_source : fc8946055314369bfba5038ded32afcb00bf134d
2011-11-14 22:12:31 -08:00
L. David Baron
7fbf50a659 Make other users of font metrics (other than MathML and XUL) honor font size inflation. (Bug 627842, patch 15) r=roc
This does not address users of font metrics in layout/mathml/ (for text
size and alignment issues) or in layout/xul (for text size and sizing of
listbox and tree widgets):  see all the callers of GetFontMetricsFor*
in those directories.
2011-11-15 17:02:01 +13:00
L. David Baron
d0fd3c605b Apply font size inflation to line heights. (Bug 627842, patch 11) r=roc
Since font size inflation applies to the text after style data
computation, we must separately apply this inflation to line heights.
2011-11-15 17:02:01 +13:00
L. David Baron
162bc661a1 Remove the unused context parameter to MeasureCharClippedText. (Bug 627842, patch 10) r=roc 2011-11-15 17:02:01 +13:00
L. David Baron
6b02f59bf3 Apply font size inflation to text. (Bug 627842, patch 9) r=roc
This applies the font size inflation to reflow and painting of text
frames.  However, it does not (by design) apply to intrinsic width
computation, since the inflation is itself a function of the containers
width, which can depend on the intrinsic width.
2011-11-15 17:02:01 +13:00
L. David Baron
0e16a65517 Pass block's reflow state to nsTextFrame::UnionAdditionalOverflow. (Bug 627842, patch 8) r=roc 2011-11-15 17:02:01 +13:00
L. David Baron
1986127472 Use the text run's font group for the tab width instead of recomputing it from the frame. (Bug 627842, patch 7) r=roc 2011-11-15 17:02:01 +13:00
Timothy Nikkel
d9c707d348 Bug 694213. Make various display items return bounds in the correct coordinate space. r=roc 2011-10-21 12:45:32 -05:00
Timothy Nikkel
0d0f09e5f7 Backout 18f70ede04b0 (bug 694213). 2011-10-20 20:59:47 -05:00