Граф коммитов

10417 Коммитов

Автор SHA1 Сообщение Дата
L. David Baron a5286da929 Bug 1055865 patch 5 - Use normal inline handling for setting the size of a non-floating nsFirstLetterFrame. r=jfkthame
This is the actual fix for the bug.  This changes the vertical sizing of
inline ::first-letter frames to work like inlines (and size based on
font metrics), so that the line-height calculation that happens later
will produces the same results as inlines would produce.

In the case we're concerned with of having a text frame child that's
0x0, this changes the inline ::first-letter from from being 0x0 to
having a height that is determined from the font metrics.
2014-08-25 15:32:03 -07:00
L. David Baron c9fd8584c8 Bug 1055865 patch 4 - Remove bits of code that nsLineLayout takes care of. r=jfkthame
There's no need for these calls to be done in the inline ::first-letter
codepath.

In particular, nsLineLayout::ReflowFrame (called a few lines above)
calls SetRect and DidReflow, while nsLineLayout::RelativePositionFrames
(which is called at the end of inline reflow) calls
FinishAndStoreOverflow.
2014-08-25 15:32:03 -07:00
L. David Baron 1c3bdea6f4 Bug 1055865 patch 3 - Fork a bit of code between the floating and non-floating branches in nsFirstLetterFrame::Reflow. r=jfkthame
This patch makes no changes other than duplicating the code previously
after the if/else on both branches of the if/else.

The next two patches in this series will completely rewrite the half in
the non-floating (i.e., inline) codepath (the else branch).
2014-08-25 15:32:03 -07:00
L. David Baron 09267bcbdd Bug 1055865 patch 2 - Use separate nsHTMLReflowMetrics for reflowing the child of the nsFirstLetterFrame. r=jfkthame
This changes this code to do things in the normal way, which is to use a
separate nsHTMLReflowMetrics for each Reflow, rather than (as this code
was) reusing the one for the nsFirstLetterFrame for its text frame
child.
2014-08-25 15:32:03 -07:00
Jonathan Kew 50cb6e6264 bug 1046950 pt 4 - convert ComputeSizeWithIntrinsicDimensions to logical-coord parameters. r=smontagu 2014-08-24 15:34:57 +01:00
Jonathan Kew 7bb78ef42a bug 1046950 pt 3 - convert ComputeAutoSize to use logical-coordinate parameters. r=smontagu 2014-08-24 15:34:51 +01:00
Jonathan Kew a5a5cf98e5 bug 1046950 pt 2 - convert ComputeSize to use logical-coordinate parameters. r=smontagu 2014-08-24 15:34:44 +01:00
Jonathan Kew 1e0d48aa2d bug 1046950 pt 1 - additional/modified APIs on LogicalSize. r=smontagu 2014-08-24 15:34:21 +01:00
Olli Pettay d72906c30d Bug 314095 - Eliminate nsIContent::GetDocument, r=jst
--HG--
extra : rebase_source : dd8f690940825b298a478b65b68a57418a9962ff
2014-08-22 23:11:27 +03:00
Miranda Emery 29c0f10b91 Bug 957445: Part 3 - combines nsIScrollbarOwner with nsIScrollbarMediator, r=mats 2014-02-14 19:40:53 +13:00
Miranda Emery 14dc1158ee Bug 957445: Part 2 - nsHTML/XULScrollFrame implement nsIScrollbarMediator, r=mats 2014-02-05 14:33:18 +13:00
David Zbarsky 1b247e50b6 Bug 952977: Switch some uses of gfx3DMatrix in nsLayoutUtils to Matrix4x4 r=nical 2014-08-22 09:40:02 -04:00
Simon Montagu f7f37b1977 Bug 1054810: when block size is unconstrained and we aren't setting aDesiredSize.BSize to the computed block size, preserve the original value. r=jfkthame. 2014-08-22 00:04:41 -07:00
Robert O'Callahan 41cde90a7c 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
Trevor Saunders fd5e9d1fcc bug 1047696 - mark a number of classes MOZ_FINAL to get compilers to devirtualize more r=froydnj 2014-08-05 13:33:55 -04:00
Olli Pettay 49a09b0c9d Bug 1054773 - Fix crashes in nsProgressFrame.cpp r=wchen 2014-08-20 17:38:01 -07:00
Seth Fowler e9ea912b18 Bug 1024454 (Part 1) - Eagerly propagate dirty bits so absolute children of table parts get reflowed reliably. r=dbaron 2014-08-20 17:48:56 -07:00
Ed Morley 3580355329 Merge mozilla-central and b2g-inbound 2014-08-20 15:19:45 +01:00
John Daggett 7ff1a8d144 Bug 975744 - unprefix font-feature-settings and font-language-override in tests. r=jfkthame 2014-08-20 16:54:37 +09:00
C.J. Ku c6a4df843d Bug 1055040 - Send mouse events base on canvas position and enable this test case on all B2G builds. r=ehsan 2014-08-19 19:38:00 -04:00
Ehsan Akhgari 5833657423 Bug 1055519 - Fix some more bad implicit constructors in layout and widget; r=roc 2014-08-20 00:58:22 -04:00
Seth Fowler 5ba894ef8c Bug 35168 - Backout 4 changesets (e15a7a0c8f70, 852b5ce53278, f36adee1958f, 479ff28f783f) for B2G bustage and reftest failures ON A CLOSED TREE
--HG--
extra : amend_source : 2be4ad526c51311c6f03b2681dd3961c1502c303
2014-08-19 20:37:14 -07:00
Seth Fowler ccaee9fcd0 Bug 35168 (Part 1) - Add GetNormalRect to nsIFrame. r=dbaron 2014-08-19 18:24:57 -07:00
Ehsan Akhgari 40d9e7c418 Backed out changeset 0409c8faca80 because of build bustage on a CLOSED TREE 2014-08-18 13:44:59 -04:00
Ehsan Akhgari 0ab9b21d10 Add SetProp to the list of windows.h #defined functions that we need to #undef, no bug 2014-08-18 13:19:16 -04:00
Aryeh Gregor 60fbc97021 Bug 1053190 - Reduce unnecessary inclusion of nsINode.h in headers; r=ehsan 2014-08-18 17:44:50 +03:00
Robert O'Callahan 150ec76871 Bug 1048752. Part 24: Rename and deCOM Set/GetCaretVisible. r=tn
--HG--
extra : rebase_source : 04249e9b22a62b8f2952515fa48f4ba3227e235e
2014-08-06 17:19:29 +12:00
Robert O'Callahan a1480fca87 Bug 1048752. Part 19: Create nsCaret::GetPaintGeometry to call during painting. r=tn
This is the start of the changes to caret-drawing proper.

The idea is to combine GetCaretFrame and GetCaretRect into a method
GetPaintGeometry which looks like GetGeometry but returns values
needed for painting (i.e. including bidi decorations, and returning
a null frame if we're not supposed to paint due to specific caret
state, e.g. in the "off" phase of the blink cycle).

Mostly a straightforward refactoring but there are a few interesting changes:
-- nsDisplayCaret stores its bounds instead of getting them from nsCaret on
demand. Eventually those bounds will not be stored in nsCaret at all.
-- nsDisplayCaret::GetBounds returns true for aSnap. nsCaret draws snapped
rects, so why not.
-- I removed "if (caretRect.Intersects(aDirtyRect))" in EnterPresShell.
As far as I can tell, this check is incorrect because it doesn't take
transforms into account. Since there's at most one drawn caret per window,
hence we do this at most once per paint, I don't think there's any real
performance advantage to having this check.

--HG--
extra : rebase_source : c98d3a5994478b482d19cc2e2ac83ab51bd17e00
2014-08-06 17:19:28 +12:00
Robert O'Callahan 0a6d04586e Bug 1048752. Part 17: Rename Get/SetCaretDOMSelection to Get/SetSelection. r=tn
The forward declaration of Selection in nsCaret.h will be used in later patches.

--HG--
extra : rebase_source : d1b749adac983c04d3365bb6bfb76a50101beeb5
2014-08-06 17:19:27 +12:00
Robert O'Callahan 2489dc1f01 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
Robert O'Callahan b4ed20d441 Bug 1048752. Part 14: Split GetGeometry into a static and a non-static version. r=tn
GetGeometry is used in two different ways. Sometimes it's used to get
information about a particular caret. Sometimes it's used to get
information about a particular selection that's not associated with
a caret. Splitting GetGeometry into a non-static version for the former
and a static version for the latter makes this more clear. Also it saves
code since for the latter version we don't have to get an nsCaret first.

--HG--
extra : rebase_source : b7730dac56b308a82b79b175749234c9a92b6f59
2014-08-06 17:19:26 +12:00
Robert O'Callahan 0de1b9e514 Bug 1048752. Part 10: Remove FrameLayerBuilder.h from nsDisplayList.h. r=tn
I was inspired by the previous patch to remove FrameLayerBuilder.h from
nsDisplayList.h too.

--HG--
extra : rebase_source : b34a01bea5865da4737817e2396b98d54cc6d1bf
2014-08-06 17:19:25 +12:00
Robert O'Callahan b8bd1730f3 Bug 1048752. Part 9: Remove nsCaret.h from nsDisplayList.h. r=tn
I got tired of slow build turnarounds every time I modified nsCaret.h.

--HG--
extra : rebase_source : 0c4598c4881ab8de0a636b08c70fb801bb912247
2014-08-06 17:19:25 +12:00
Robert O'Callahan 787f2f51a5 Bug 1048752. Part 3: Make GetCaretFrameForNodeOffset static. r=tn
GetCaretFrameForNodeOffset only uses the nsFrameSelection and mBidiUI
from its nsCaret. For mBidiUI we can just get the pref directly whenever
we need it. By modifying GetCaretFrameForNodeOffset to take nsFrameSelection
as a parameter, we can make it static to make it clear it isn't really
related to the state of the nsCaret.

This may also fix a bug in Selection::GetPrimaryFrameForFocusNode where
things would go unexpectedly wrong if mCaret is temporarily observing
a different selection to the Selection.

--HG--
extra : rebase_source : cdd59f6e20cd1060bc5d2325cb3adb5e5c4a1d2c
2014-08-06 17:19:24 +12:00
Susanna Bowen c622b18e05 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 779f8cef59 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
Seth Fowler 983a3f905a Bug 913586 (Part 7) - Update Maybe users in layout. r=dbaron
--HG--
extra : rebase_source : 1bf45d1356d36269ca951b58ebf1e448313c55c5
2014-08-13 15:42:15 -07:00
L. David Baron ebafb4f9b6 Bug 625289 patch 6 - Store style contexts being reframed in the ReframingStyleContexts struct. r=heycam 2014-08-13 15:39:01 -07:00
Trevor Saunders 8f78184d9a bug 1016545 - Provide an iterator that iterates over all children of an element r=bz 2014-07-16 14:41:57 -04:00
Seth Fowler 3be514e0be Bug 981924 - Update ReportToConsole calls in layout code to use the right category. r=dbaron 2014-08-11 16:52:01 -07:00
Jonathan Kew 31f53d899f bug 1048050 - ignore region (or other) subtags when checking for language-specific casing behavior. r=smontagu 2014-08-11 09:49:11 +01:00
Markus Stange 3262aee646 Backed out changeset 411a075b3624 (bug 987030) because it probably caused timeouts of browser_tabview_expander.js. CLOSED TREE 2014-08-08 18:05:40 +02:00
Robert O'Callahan f4028459f4 Bug 1050096. Clip scrollparts to the viewport for root scrollframes. r=tnikkel 2014-08-09 01:00:53 +12:00
Markus Stange 42d041842e Bug 987030 - Fix compressed paint timer scheduling. r=roc 2014-08-08 12:46:50 +02:00
Nicholas Nethercote a7cf4142b4 Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
* * *
imported patch rm-dummy-params

--HG--
extra : rebase_source : c25987eb11bae197218d5fc53b77def19afa36ac
2014-08-06 06:31:21 -07:00
Daniel Holbert abbc77f1fc Bug 1032922 part 2: Rename flex-basis's "auto" keyword to "main-size" (but retain "flex:auto" as shorthand for "1 1 main-size"). r=heycam 2014-08-07 22:11:48 -07:00
Daniel Holbert 39bd7337db Bug 1050412 part 2: Assert about frame type before static_casting, and drop useless null-check. r=tn 2014-08-07 22:07:16 -07:00
Daniel Holbert 405e80dc03 Bug 1050412 part 1: Use nsFrameList::Enumerator in nsSimplePageSequenceFrame to iterate over child frames. r=tn 2014-08-07 22:07:15 -07:00
Timothy Nikkel fb63d1472a Bug 1042772. Update the reference frame and current frame offset when moving to outside a transform so that we can use the correct offset to compute the initial visible rect for wrap list display items. r=roc
* * *
The current reference frame is still the same as our reference frame because we set and restore it in nsFrame::BuildDisplayListForChild before this. So we need to actually compute it.
2014-08-07 11:33:18 -05:00
Timothy Nikkel c98f0d0c71 Bug 1042772. offsetToReferenceFrame is always zero when we use it. Remove it. r=mattwoodrow 2014-08-07 11:33:16 -05:00