Commit Graph

101 Commits

Author SHA1 Message Date
Jonathan Kew
bbc235583a bug 1046950 pt 2 - convert ComputeSize to use logical-coordinate parameters. r=smontagu 2014-08-24 15:34:44 +01:00
Robert O'Callahan
bd73a2178e Bug 1054161. Don't build display items for text with alpha=0. r=dbaron
--HG--
extra : rebase_source : 869a05a652a3bc6e8e122d34fb166ed9fbbdaa5c
2014-08-23 00:08:12 +12:00
Robert O'Callahan
ae6a16193a Bug 1048752. Part 16: Move nsFrameSelection::HINT to CaretAssociationHint.h. r=tn
This patch started an attempt to remove nsFrameSelection.h from nsCaret.h
and metastasized into a rather large refactoring patch that removed it
from some other header files as well, and changed nsFrameSelection::HINT
into a global-scope enum with better names. I also converted bools
into CaretAssociationHint in a few places where that was appropriate,
but there are still some more places (GetChildFrameContainingOffset)
where bools need to be converted. I figured this patch was big enough already.

--HG--
extra : rebase_source : cc618ef60e707e1360644340a2648de389383da0
2014-08-06 17:19:27 +12:00
Susanna Bowen
845188e8cd Bug 1030993 - Fix assertion failure in reftest css-ruby/ruby-whitespace-1.html. r=dbaron
Fixes the assertion failure with text:
"###!!! ASSERTION: Wrong line container
hint: '!aForFrame || (aLineContainer == FindLineContainer(aForFrame) ||
aLineContainer->GetType() == nsGkAtoms::rubyTextContainerFrame ||
(aLineContainer->GetType() == nsGkAtoms::letterFrame &&
aLineContainer->IsFloating()))', file
/home/sgbowen/builds/mozilla-central/layout/generic/nsTextFrame.cpp, line 1259"
which occasionally appears when opening pages with ruby or when running ruby
reftests.

Updates the manifest for ruby reftests to the current expectations (adjust
assertion counts, etc.)
2014-08-15 10:34:20 -07:00
Susanna Bowen
d4c7a65b4c Bug 1030993 - Basic reflow implementation for ruby frame classes. r=dbaron
To account for spacing between bases or text boxes during reflow, the line
layout which manages the bases updates its inline direction coordinate based on
the preferred inline size for the corresponding text boxes. Next, the base is
reflowed at the correct inline coordinate. Each paired text box is then also
reflowed at the proper inline position determined by (1) the current position of
its corresponding base and (2) its own preferred width.

In computing intrinsic widths, accounting for spacing is less complicated. The
minimum intrinsic width is the width of the widest ruby column, and the
preferred intrinsic width is the sum of all the ruby column widths. Each ruby
column width is the maximum width of its base box and text boxes. These
individual widths are determined using GetPrefISize on the base and text boxes.

Ruby base container frames store a list of pointers to the ruby text container
frames in the segment they denote. This list of pointers is created in the ruby
frame reflow method before calling the reflow method for the ruby base
container. The list exists and is used only during reflow of the main ruby frame
and is cleared before returning from reflow.
2014-08-15 10:34:20 -07:00
Morris Tseng
3a08dbaaeb Bug 1024930 - Change text highlighting color. r=roc 2014-07-28 02:13:00 +02:00
Jonathan Kew
4491d88818 bug 1031241 pt 3 - Also rename Intrinsic{Width,Height} to Intrinsic{I,B}Size. r=smontagu 2014-07-24 18:03:26 +01:00
Jonathan Kew
1507f7aa85 bug 1031241 pt 2 - More renaming, e.g. where {Min,Pref}Width occurs within longer type and function names. r=smontagu 2014-07-24 18:03:25 +01:00
Jonathan Kew
350ea3c115 bug 1031241 pt 1 - Rename Get{Min,Pref}Width to Get{Min,Pref}ISize throughout layout. r=dbaron,smontagu 2014-07-24 18:03:25 +01:00
Simon Montagu
70420ca7e7 Bug 789096 patch 10: make Reflow set nsHTMLReflowMetrics.ISize and BSize instead of Width and Height. r=jfkthame 2014-07-24 01:30:07 -07:00
James Kitchener
522cf7fbea Bug 1027354 - Fix fontweight and fontstyle on single char <mi>. r=roc 2014-06-25 05:20:00 -04:00
Chris Peterson
ef028fde56 Bug 1027486 - Make nsTextFrame::UpdateOverflow bail if it has no block ancestor (fixing -Wsometimes-uninitialized warning). r=dholbert 2014-06-18 21:23:21 -07:00
Susanna Bowen
4451470f2b Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-17 10:32:00 -04:00
Susanna Bowen
5161839fdc Bug 727125 - Lazily compute LineBaselineOffset when needed so it is present after a dynamic change of 'text-decoration'. r=dbaron
This fixes the positioning of underlines set on a block or its ancestor
when drawn on children of a block that have a vertical-align !=
baseline.

The lazy computation is done all at once for all children of a block to
avoid O(N^2) searches for the line containing a frame.
2014-06-18 12:55:00 -04:00
Simon Montagu
36dfc0d94f Replace GetBaseline with GetLogicalBaseline and use logical coordinates in the line position and baseline getters in nsLayoutUtils. Bug 789096, r=jfkthame 2014-06-17 05:19:38 -07:00
Wes Kocher
b29250a3a3 Backed out 2 changesets (bug 727125) for reftest bustage on an otherwise CLOSED TREE
Backed out changeset 443361e2724a (bug 727125)
Backed out changeset 16c8d78df86e (bug 727125)
2014-06-16 13:34:50 -07:00
Susanna Bowen
de5185bcd2 Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-16 11:58:29 -07:00
Susanna Bowen
2b2979c881 Bug 727125 - Lazily compute LineBaselineOffset when needed so it is present after a dynamic change of 'text-decoration'. r=dbaron
This fixes the positioning of underlines set on a block or its ancestor
when drawn on children of a block that have a vertical-align !=
baseline.

The lazy computation is done all at once for all children of a block to
avoid O(N^2) searches for the line containing a frame.
2014-06-16 11:58:25 -07:00
Simon Montagu
16bbd0f24e Replace Get/SetTopAscent with Get/SetBlockStartAscent. Bug 789096, r=jfkthame 2014-06-11 02:45:31 -07:00
Cameron McCormack
a58154f20d Bug 1019555 - Treat newlines and tabs as space characters in SVG xml:space="preserve" text. r=roc 2014-06-05 13:25:15 +10:00
Victor Porof
5643294005 Bug 1007203 - Always add categories when pushing to the pseudostack, r=djvj 2014-05-23 17:12:29 -04:00
Robert O'Callahan
7d4c3fd53a Bug 1014252. Optimize clearing of textruns via RemoveInFlows. r=matspal
We're keeping the core idea that, before we remove the frames-to-be-destroyed
from the continuation chain, their textruns need to be disconnected/destroyed.
However, nsContinuingTextFrame::DestroyFrom tries to optimize when the
destroying frames that aren't mentioned in the userdata for the textrun, and
certain other conditions are met; we need a similar optimization here. It's
simpler here because the other conditions are definitely met, since all the
text for the frames being deleted has already been consumed and reflowed by
previous frames.

We don't need the TEXT_STYLE_MATCHES_PREV_CONTINUATION state bit anymore
because nsContinuingTextFrame::DestroyFrom will never see any textruns when
called via RemoveEmptyInFlows.

--HG--
extra : rebase_source : 6544f923499ef604d48ec15961716549dd25d279
2014-05-28 15:39:25 +12:00
Jonathan Kew
223d697ee1 bug 1015603 part 6 - remove nsFontVariantTextRunFactory from layout, leaving gfx to handle small-caps. r=roc 2014-05-26 14:23:32 +01:00
Mats Palmgren
da5455a4b0 Bug 508665 - part 8, Move child frame insertion/removal methods from nsIFrame to nsContainerFrame. r=roc 2014-05-24 22:20:40 +00:00
Mats Palmgren
80071d48fe Bug 508665 - part 5, Make nsIFrame::Init require a nsContainerFrame* for the parent frame param. r=roc 2014-05-24 22:20:40 +00:00
Mats Palmgren
5023eccc38 Bug 1008917 - part 2,3,4, make Reflow() return type 'void', and make a few reflow related helper methods 'void' too. r=roc 2014-05-13 00:47:52 +00:00
Wes Kocher
4bfe3c39fd Backed out 11 changesets (bug 1008917) for apparently introducing an intermittent failure of B2G Crashtest-2 on a CLOSED TREE
Backed out changeset e2ab653f688a (bug 1008917)
Backed out changeset b52154d8d900 (bug 1008917)
Backed out changeset 2ab5b01da4de (bug 1008917)
Backed out changeset f7a38df1d44f (bug 1008917)
Backed out changeset 80304bb9a572 (bug 1008917)
Backed out changeset 10ed89a302e9 (bug 1008917)
Backed out changeset 161c41991d46 (bug 1008917)
Backed out changeset 25b2475d2368 (bug 1008917)
Backed out changeset b8000b31277c (bug 1008917)
Backed out changeset 9afa5e7715e1 (bug 1008917)
Backed out changeset 5c380c21351f (bug 1008917)
2014-05-12 15:47:41 -07:00
Mats Palmgren
3272848305 Bug 1008917 - part 2,3,4, make Reflow() return type 'void', and make a few reflow related helper methods 'void' too. r=roc 2014-05-12 17:40:28 +00:00
Benoit Jacob
2e1ef0025a Bug 1004098 - Make nsTArray use size_t in its interface (32bitness is fine as an internal detail) - r=froydnj, sr=bsmedberg 2014-05-08 21:03:35 -04:00
Ehsan Akhgari
15916f4738 Bug 491863 - Remove IBMBIDI; r=roc 2014-04-23 21:15:29 -04:00
Daniel Holbert
ce29c5307d Bug 996351: Rename nsPresShell::GetReferenceRenderingContext() to CreateReferenceRenderingContext(), to reduce implication of fallibility. r=roc 2014-04-14 21:30:25 -07:00
Daniel Holbert
1270442a0f Bug 996319: Drop always-null arg from nsTextFrame.cpp's static helper-function "GetReferenceRenderingContext". r=jdaggett 2014-04-14 17:45:39 -07:00
John Daggett
c8b9bf6143 Bug 950526 - don't dump textruns within nsTextFrame::DidSetStyleContext. r=dbaron 2014-04-08 14:13:28 +09:00
Jonathan Kew
b1589b8ab2 bug 617008 - avoid creating a rendering context that we may not need. r=roc 2014-03-31 11:53:09 +01:00
Gorman Ho
9f11aa16d4 Bug 983285 - Add a generic destructor for property values allocated with new. r=kats, r=bz 2014-03-25 09:25:47 -04:00
Carsten "Tomcat" Book
9fe557e5da Backed out changeset 1d12ab8bf5fe (bug 950526) for android reftest failures on a CLOSED TREE 2014-03-20 10:00:24 +01:00
John Daggett
8a2f99bfd8 Bug 950526 - don't dump textruns within nsTextFrame::DidSetStyleContext. r=dbaron 2014-03-20 14:43:29 +08:00
Tom Hindle
d00ff2db8c Bug 970363 - Make PeekOffset* methods return continue reason. r=roc 2014-03-13 08:14:37 -06:00
L. David Baron
beb1729130 Bug 349259 patch 1: Add an nsIContent* parameter to nsHTMLReflowState::CalcLineHeight. r=bz 2014-03-12 20:33:21 -07:00
Simon Montagu
677c6954d4 Use logical text layout API in nsLineLayout. Bug 789096, r=jfkthame 2014-03-11 13:23:50 -07:00
Carsten "Tomcat" Book
030af78620 Backed out changeset aeff4052ef00 (bug 789096) 2014-03-11 09:22:52 +01:00
Simon Montagu
8db501aece Use logical text layout API in nsLineLayout. Bug 789096, r=jfkthame 2014-03-10 22:19:03 -07:00
Arnaud Sourioux
1d21dd1816 Bug 974687 - Part 2: Fix more than 80cols issues caused by MOZ_OVERRIDE annotation. r=dholbert 2014-02-24 09:41:56 -05:00
Arnaud Sourioux
bea44014b1 Bug 974687 - Part 1: Add about 300 MOZ_OVERRIDE in layout/. r=dholbert 2014-02-24 09:41:56 -05:00
Arnaud Sourioux
bc988b83ca Bug 919806: Get rid of NS_IMETHOD in nsIFrame.h and its implementations r=dholbert 2014-02-17 23:47:48 -08:00
Jonathan Kew
8f1906d8c5 bug 970710 - ensure GetTrimmedOffsets is called with consistent parameters from PropertyProvider::InitializeForMeasure and SetupJustificationSpacing. r=roc 2014-02-13 08:38:48 +00:00
Robert O'Callahan
5f6debb054 Bug 947588. Part 3: Map nsStyleText::mControlCharacterVisibility to TEXT_HIDE_CONTROL_CHARACTERS flag in nsTextFrame. r=jfkthame
Note that this is set up so any use of gfxTextRun outside of nsTextFrame
shows hexboxes for control characters.

--HG--
extra : rebase_source : 83335c85c4db4a6391f18924aad566b00fd6a66c
2014-02-05 23:16:23 +13:00
L. David Baron
d1d272808d Bug 91419 patch 5: Rename everything with SpecialSibling to IBSplitSibling. r=mats 2014-02-06 17:45:31 -08:00
Cameron McCormack
c8236b6779 Bug 960848 - Part 1: Make nsFrameState an enum and consolidate all frame state bit definitions in a single preprocessed file. r=dbaron 2014-02-05 12:59:39 +11:00
James Kitchener
4e5786a150 Bug 953385 - Set math script flag on textruns belonging to MathML tokens. r=roc 2014-01-30 10:59:16 -05:00