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

662 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 28b36e1b0b bug 789096 patch X - avoid some unconstrained-width (should be -isize) warnings with mixed writing modes. r=smontagu 2014-07-10 10:11:33 +01:00
Susanna Bowen 233eb2e9e3 Bug 1033052 - Call SetRect in ReflowFrame since the old rect does not need to be preserved. r=dbaron 2014-07-02 13:54:49 -07:00
Susanna Bowen b85550ce86 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 caa93255c4 Bug 789096: make method names in nsLineLayout correspond to the respective CSS properties. r=jfkthame 2014-06-17 07:41:33 -07:00
Simon Montagu aaa4878ee5 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 abf9a45351 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 d1e6d153b7 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 ca20e365ef Replace Get/SetTopAscent with Get/SetBlockStartAscent. Bug 789096, r=jfkthame 2014-06-11 02:45:31 -07:00
Simon Montagu efc2140fbb Add a WritingMode argument to nsHTMLReflowMetrics::ISize() and BSize(). Bug 789096, r=jfkthame 2014-06-05 02:39:36 -07:00
Susanna Bowen ba0f6cdd21 Bug 1019287 - Use accessor instead of private variable in ifdef'ed logging code. r=dholbert 2014-06-02 16:26:00 -04:00
Simon Montagu ab13ae46c1 Backout 38b25d5e6cf9 because assertions 2014-05-25 03:15:00 -07:00
Simon Montagu dc4cbd5301 Add a WritingMode argument to nsHTMLReflowMetrics::ISize() and BSize(). Bug 789096, r=jfkthame 2014-05-24 23:47:04 -07:00
Mats Palmgren 75bad2215e Bug 508665 - part 9, Remove now redundant static_cast<nsContainerFrame*> and do_QueryFrame() calls. r=roc 2014-05-24 22:20:40 +00:00
Simon Montagu 23c1664fb7 Wait for CanPlaceFrame (i.e. after reflow) to apply start-margin and test whether the frame is a last continuation and so needs its end-margin applied. Bug 999446, r=jfkthame 2014-05-20 07:04:54 -07:00
Mats Palmgren 03ca8433c3 Bug 1008908 - Remove assignment since the value isn't used. r=smontagu 2014-05-17 23:10:53 +00:00
Mats Palmgren 6703ffe99e Bug 1008917 - part 11, make nsBlockFrame::ReflowDirtyLines() and nsLineLayout::ReflowFrame() return types 'void'. r=roc 2014-05-13 00:47:53 +00:00
Mats Palmgren 9795aca511 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 42253715d7 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 5ba3e6847a Bug 1008917 - part 11, make nsBlockFrame::ReflowDirtyLines() and nsLineLayout::ReflowFrame() return types 'void'. r=roc 2014-05-12 17:40:29 +00:00
Mats Palmgren a722b491f1 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
Mats Palmgren 361c3593e3 Bug 613659 - Implement box-decoration-break layout for border/box-shadow and paddding/margin for inlines. r=cam 2014-05-05 17:55:54 +00:00
Mats Palmgren 6301b21c9f Back out bug 613659 (for regression bug 998792)
--HG--
rename : layout/reftests/backgrounds/background-size-slice.html => layout/reftests/backgrounds/background-size-continuous.html
rename : layout/reftests/backgrounds/background-size-cover-slice.html => layout/reftests/backgrounds/background-size-cover-continuous.html
rename : layout/reftests/backgrounds/background-size-cover-clone.html => layout/reftests/backgrounds/background-size-cover-each-box.html
rename : layout/reftests/backgrounds/background-size-clone.html => layout/reftests/backgrounds/background-size-each-box.html
2014-04-20 19:39:24 +00:00
Mats Palmgren 2b31a712b1 Bug 613659 - Implement box-decoration-break layout for border/box-shadow and paddding/margin for inlines. r=cam 2014-04-18 23:01:23 +00:00
Simon Montagu f8a68ec80e Make nsLineBox.mBounds a LogicalRect. Bug 789096, r=jfkthame 2014-04-16 01:03:28 -07:00
L. David Baron 415725d6be Bug 989130 - Back out changeset fe119a83b1f2 (bug 942017) while leaving the corresponding test from changeset 3c63decb4e7e. r=jfkthame
This should be backed out for two reasons:

 (1) It caused a serious regression with bullets from list-style-image,
     which no longer affect the line box height and thus overlap.

 (2) The dependency on 'line-height: normal' doesn't make sense; there's
     no reason for whether line-height is 'normal' or not to affect the
     behavior of bullets.

I don't currently have time to figure out why Gecko behavior differs
from other browsers on bug 942017, but that should be re-analyzed and
the bug fixed in a different way.  At first glance, the code should
already be leading to the expected behavior, since the bullet ought to
have the same metrics and alignment as the block's influence on the line
box's height.  Why this isn't the case should be investigated.
2014-04-01 11:53:29 -07:00
Simon Montagu ff1a91f1ec Aways use the root span's writing mode when recursing into child spans in nsLineLayout::ApplyFrameJustification. Bug 986899, r=jfkthame 2014-03-24 10:50:13 -07:00
Simon Montagu babaf4f2f3 Correction to typo in checkin for bug 789096. Bug 983691, r=jfkthame 2014-03-24 02:23:12 -07:00
L. David Baron 3ad78c87f5 Bug 349259 patch 1: Add an nsIContent* parameter to nsHTMLReflowState::CalcLineHeight. r=bz 2014-03-12 20:33:21 -07:00
Simon Montagu 2110ef8dc6 Use logical text layout API in nsLineLayout. Bug 789096, r=jfkthame 2014-03-11 13:23:50 -07:00
Carsten "Tomcat" Book b99f5df532 Backed out changeset aeff4052ef00 (bug 789096) 2014-03-11 09:22:52 +01:00
Simon Montagu 5e0cf76c45 Use logical text layout API in nsLineLayout. Bug 789096, r=jfkthame 2014-03-10 22:19:03 -07:00
L. David Baron 0511ab14ec Bug 439204: Remove assertion "We placed a float where there was no room!" r=roc 2014-03-03 00:54:39 -08:00
L. David Baron fbcb130e34 Bug 709014 patch 1: Honor margin-left and margin-right on elements in inline layout that have 0 width and/or height (commonly, inline-blocks). r=roc
Prior to this patch, we failed to honor:
 * margin-left on elements in inline layout with 0 width and 0 height
 * margin-right on elements in inline layout with 0 width
I think that was because the code in CanPlaceFrame to discard both
margins when the width was 0 was running after the left-margin was
applied, unless the later code in PlaceFrame (checking both width 0 and
height 0) un-applied that left margin.

The assertion count change in test_value_computation.html is due to 2
additional "bad width" assertions (I presume from honoring large
margins that were previously ignored).

The change to 538935-1-ref.html is to match an improvement in rendering
of the margins in the test, where both sides of the margin are now
honored.

The change to layout/reftests/text-overflow/marker-basic-ref.html is to
keep the reference (which uses margins) rendering the same way following
the changes to margin handling.

The new behavior (in the reftests added in layout/reftests/inline/)
matches at least Chromium; I didn't check any other browsers.
2014-02-17 20:07:45 -08:00
L. David Baron d31701cad1 Bug 91419 patch 9: Fix comments and debugging output referring to "special" frames. r=mats 2014-02-06 17:45:33 -08:00
Daniel Holbert 03c54ea5eb Bug 967287 part 1: Remove unnecessary nsPresContext* argument from functions defined in nsContainerFrame.h. r=mats 2014-02-06 14:07:47 -08:00
Benoit Jacob 562cb87289 Bug 959380 - 1/5 - Make gfxBreakPriority a typed enum - r=jrmuizel 2014-01-23 13:26:39 -05:00
Cameron McCormack 69ff268fcf Bug 957770 - Take SVG font size scaling into account when vertically aligning text. r=roc 2014-01-11 12:13:09 +11:00
Jonathan Kew a7837e1ffa bug 735577 - pt 4.1 - use accessor functions for some physical-coordinate fields in nsHTMLReflowMetrics, in preparation for logicalization. r=smontagu 2013-12-27 17:59:52 +00:00
Jonathan Kew 954a119d07 bug 735577 - pt 3.2 - update the rest of layout code to use the new accessors on nsHTMLReflowState. r=smontagu 2013-12-27 17:59:21 +00:00
Quentin Headen 6f30920da5 Bug 731667 - Rewrite mtable implementation to avoid use of _moz-* attributes - implement parsing and rendering. r=karlt, r=bz 2013-12-13 12:42:43 -05:00
Birunthan Mohanathas 68b00083fd Bug 713082 - Part 1: Remove unnecessary Util.h includes. r=Waldo 2013-12-08 21:52:33 -05:00
Mats Palmgren 99419ff1d6 Bug 942017 - Only let the bullet frame affect the line height when line-height:normal. r=jfkthame 2013-12-08 01:11:50 +00:00
Mats Palmgren d587273433 Bug 931853 - Adjust the frame's vertical position to account for a negative margin larger than its height, in quirks mode. r=roc 2013-11-12 18:38:29 +00:00
Mats Palmgren 4c415bc615 Bug 929991 - Layout implementation of 'text-align: true X'. r=roc 2013-10-27 20:56:32 +00:00
Ehsan Akhgari 44cb2c6702 Bug 921753 - Part 3: Avoid #including nsStyleStructInlines.h in nsHTMLReflowState.h; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1362 to 1268.
2013-10-01 17:01:49 -04:00
Ehsan Akhgari 290feb1ade Bug 921876 - Stop #including nsIFrame.h in nsLayoutUtils.h; r=roc
This patch does the following:
* Move nsIFrame::IntrinsicSize to mozilla::IntrinsicSize so that it can
  be forward-declared.
* Move a number of templated inline nsLayoutUtils methods to nsIFrame.
* Use mozilla::layout::FrameChildListID instead of the
  nsIFrame::ChildListID typedef in nsLayoutUtils.h.
* Move nsReflowFrameRunnable to its only user, nsProgressMeterFrame.cpp.
* Make a number of functions requiring nsIFrame.h out-of-line.
* Remove the nsIFrame.h #include from nsLayoutUtils.h and add it to the
  places which require it implicitly.
2013-09-30 17:26:04 -04:00
Mats Palmgren 4974add798 Bug 919318 - Drop the Get prefix on the frame methods GetFirstContinuation, GetLastContinuation, GetFirstInFlow, GetLastInFlow and also on nsLayoutUtils::GetLastContinuationWithChild, because they never return null. r=dholbert 2013-09-25 11:42:34 +00:00
Daniel Holbert 90f7eae182 Bug 919871: Make .cpp files in layout/generic #include their corresponding .h file first. r=mats 2013-09-24 18:43:43 -07:00
L. David Baron 6d628a60bd Bug 916751: Do not use nsIFrame::MovePositionBy from nsLineLayout. r=dholbert
Since bug 916751 is hard (for me) to test, I haven't confirmed for sure
that this fixes the bug.

However, it fixes the assertions that bug 911786 part 3 triggers in
layout/base/crashtests/317934-1.html through this codepath.
2013-09-17 04:44:16 -07:00
Corey Ford c885568e56 Bug 911786 - Part 2: Reapply relative positioning when moving frames without reflowing them. r=dholbert 2013-09-11 11:51:42 -07:00
Ehsan Akhgari baf3a129ad Bug 907883 - Minimize #includes in layout/generic; r=roc
--HG--
extra : rebase_source : 5e87b764a12b05aff477c71547e2131be67ca93b
2013-08-22 14:32:52 -04:00
Corey Ford 9adda71475 Bug 898794 - Store normal frame position before applying relative positioning. r=dbaron 2013-08-08 17:20:17 -07:00
Corey Ford 3fcd99f543 Bug 901610 - Use nsStyleDisplay::IsRelativelyPositionedStyle in nsLineLayout. r=dbaron 2013-08-07 11:46:44 -07:00
Corey Ford 703e3044b9 Bug 893962 - Refactor the application of relative positioning. r=dbaron 2013-07-15 17:28:09 -07:00
Cameron McCormack d3f6368233 Bug 864289 - Rename nsLineLayout::GetLineContainer(Frame|RS) to LineContainer\1. r=dholbert 2013-04-23 11:45:26 +10:00
Masayuki Nakano 65e843edc3 Bug 857820 part.1 Drop blink effect implementation r=dbaron 2013-04-14 19:11:07 +09:00
Cameron McCormack ca4d21a415 Bug 842142 - Prevent odd text wrapping in SVG text. r=roc 2013-03-25 14:50:59 +11:00
Mats Palmgren db184f49e1 Bug 843931 - Make nsLineLayout::NewPerFrameData() allocation infallible. r=roc 2013-02-23 11:38:15 +01:00
Mats Palmgren d85ac931c6 Bug 843925 - Make nsLineLayout::NewPerSpanData() allocation infallible. r=roc 2013-02-23 11:38:15 +01:00
L. David Baron c5b9eee040 Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert
Except for the changes in:
  layout/generic/nsIFrame.h (part)
  layout/style/nsComputedDOMStyle.h (all)
  layout/style/nsRuleNode.cpp (part)
  layout/style/nsStyleContext.cpp (part)
  layout/style/nsStyleContext.h (part)
(see patch 3b in the bug), this patch was written with the sed script:
s/\<GetStyle\(Font\|Color\|List\|Text\|Visibility\|Quotes\|UserInterface\|TableBorder\|SVG\|Background\|Position\|TextReset\|Display\|Content\|UIReset\|Table\|Margin\|Padding\|Border\|Outline\|XUL\|SVGReset\|Column\)\>/Style\1/g
2013-02-16 13:51:02 -08:00
L. David Baron 50d4e367af Bug 841789, patch 1: Rename nsIFrame::GetStyleContext() to nsIFrame::StyleContext() since it can never return null. r=dholbert
This makes it conform to our convention that getters returning pointers
that can never be null do not begin with "Get".
2013-02-15 21:38:33 -08:00
Mats Palmgren b7ae90666d Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
Scott Johnson a13eed37dc Bug 811825: Make max line box width ignored if frame has constrained height in order to prevent cut-off data when a user reflows-to-zoom. [r=dbaron] 2012-12-04 22:14:56 -06:00
Nicholas Nethercote 0e97b98462 Bug 814312 - Avoid PL_ArenaPool recycling in the layout engine. r=roc.
--HG--
extra : rebase_source : 7aaa3d745583c595692f1effd933cc70931194ff
2012-11-25 14:40:28 -08:00
Ehsan Akhgari c284cd4124 Bug 810355 - Convert nsDidReflowStatus into an enum class; r=dholbert 2012-11-13 22:47:33 -08:00
Scott Johnson 1d7a36eb51 Bug 802311: Make max line box width adjustment API compute right edge of line boxes correctly to fix reflow-on-zoom issues. [r=dbaron] 2012-10-25 16:38:54 -05:00
Isaac Aggrey 481e7dfb0b Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Leonard Camacho 4420e1cb45 Bug 524025 - Remove LL_* constants in nsLineLayout with separate booleans with field widths. r=dbaron 2012-09-27 21:26:40 -04:30
Scott Johnson 3ea152f05b Bug 780258: Add an interface to set the maximum line box width, accessible from chrome script. [r=dbaron] 2012-09-05 16:39:34 -05:00
Ehsan Akhgari e368dc9c85 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
Cameron McCormack d7e9a93257 Bug 655877 - Part 14: Ignore float in SVG text frames. r=roc 2012-08-02 21:38:49 +10:00
Cameron McCormack 6b182261bf Bug 655877 - Part 11: Ignore vertical-align and map dominant-baseline to vertical-align in SVG text frames. r=roc 2012-08-02 21:38:48 +10:00
Cameron McCormack bd8a092ab9 Bug 655877 - Part 10: Ignore text-align and text-align-end in SVG text frames. r=roc 2012-08-02 21:38:47 +10:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
David Zbarsky d2ee12f6f9 Bug 763350 - Clean up some includes in content/ and dom/ r=smaug 2012-07-01 16:45:59 -07:00
Ed Morley 83427f0fe0 Merge mozilla-central to mozilla-inbound 2012-05-21 13:19:38 +01:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
L. David Baron 6b3b8f9533 Remove width determination parameters from font inflation methods. (Bug 747720, patch 5) r=roc
These are no longer needed since we're getting the width from the
nsFontInflationData.
2012-05-20 22:18:28 -07:00
L. David Baron 94eb7fc6c5 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
Simon Montagu a05832e834 Implement text-align-last. Bug 536557, r=dbaron 2012-01-12 19:52:21 +02:00
Ed Morley afde8417a5 Backout 6605cc311ec5 & 9217303c2e5c (bug 536557) for M4 orange 2012-01-12 15:33:00 +00:00
Simon Montagu ad89de3591 Implement text-align-last. Bug 536557, r=dbaron 2012-01-12 16:29:20 +02:00
L. David Baron df40c46fa8 Weaken the quirks mode inline box model zeroing-of-containers when those containers have children that are vertical-align: top or bottom, so that it's a little more like when they have children with other values of vertical-align (except that it's an approximation). (Bug 714519) r=roc
--HG--
extra : transplant_source : %1B%A2%1A%2Cb%7BcS%C9%5Et%F8%F16%E3%1A%12%D67%15
2012-01-01 17:35:12 -05:00
Mats Palmgren 78d0f2c7ca Bug 515530 - Remove nsHTMLContainerFrame. r=roc 2011-12-27 21:18:48 +01:00
Nicholas Nethercote 24d2c81ee1 Bug 711908 - Fix a bunch of GCC warnings in layout. r=dbaron. 2011-12-19 19:46:39 -08:00
L. David Baron 1e5ca9ce1a 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 f1feb010c8 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 d65b4d17bd Make NOISY_VERTICAL_ALIGN compile again. Not part of the build. No review. 2011-10-18 10:44:43 -07:00
Simon Montagu 23fcb4824f Implement unicode-bidi: -moz-plaintext in layout. Bug 662288, r=roc 2011-10-18 14:51:58 +02:00
Ehsan Akhgari 92064e6d3f 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 461fab9117 Bug 10209 - Part 2: Implement the absolute positioning support for all frames; r=roc 2011-04-29 19:02:33 -04:00
Michael Wu d2b70213ac 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
L. David Baron 056a511714 Remove overflow handling that should have been removed along with the standards-mode text-shadow of text-decoration handling in bug 403524, changeset 83b2648ee442. (Bug 680505, patch 1) r=roc
Since this affects only the *visual* overflow and not the *scrollable*
overflow, this patch should result in no behavior changes, since the
necessary visual overflow is added in
nsTextFrame::UnionAdditionalOverflow (since the text frame now draws the
shadows of text decorations, just like it draws text decorations
themselves).
2011-08-20 21:35:56 -04:00
L. David Baron 84b8b6bf64 Replace all uses of nsLayoutUtils::SetFontFromStyle with GetFontMetricsForFrame or GetFontMetricsForStyleContext and remove SetFontFromStyle. (Bug 678671, patch 2) r=roc
There was nothing wrong with SetFontFromStyle, except that it's just one
more API to think about (and one more API to audit and modify for font
inflation work to happen in bug 627842).
2011-08-14 10:08:04 -07:00
Vitor Menezes cc47ff48ae Bug 676538: Fix regression that caused text-decorations on inline *child* of block to draw at the offset for the block rather than the inline. r=dbaron
The FrameProperty representing baseline is set when a block defines
text-decorations and has vertically-aligned children, but we were
retrieving it whether the block or the vertically-aligned frame itself
defined the decorations.  As a result, we "undo" the frame offset to get
the baseline from the child in that case.
2011-08-10 12:44:17 -07:00
Vitor Menezes 1baff11dba Bug 223764: Inlines inside inlines that draw text-decorations shouldn't alter the baseline. (r=dbaron)
We add a baseline field to nsInlineFrame and modify
nsLineLayout::BeginSpan to take a pointer to a baseline to update. This
also means that nsFirstLetterFrame no longer needs to update its own
baseline, and instead should just pass its own field along.
2011-08-03 11:30:58 -07:00
Vitor Menezes e915e08a19 Fix text-decoration positioning in quirks mode and set overflow areas to match. (Bug 403524) r=dbaron
Change the quirks mode text-decoration code (soon to be used for all
modes) to follow CSS 2.1's rules for positioning of decoration lines.
Decorations are now drawn at a constant vertical position established by
the element creating the decoration, and more than one of the same type
(underline, overline, line-through) of decoration are supported on the
same piece of text.

This means that text-decorations can now significantly overflow a text
frame, since the vertical-alignment of the element with text-decoration
may be substantially different from the vertical alignment of the text.
Set overflow areas for text frames with text decorations in
nsLineLayout::RelativePositionFrames since it must happen *after*
vertical alignment is done, and when relative positioning data are
consistent (nsIFrame::GetRelativeOffset matches the offset that has been
applied).
2011-08-03 11:30:58 -07:00
Ehsan Akhgari 2a3dbb4205 Back out bug 10209 and bug 656875 (its regression fix) from Aurora because the work on this bug has not been finished yet
--HG--
extra : transplant_source : t%9F%EB%2Aa%A4%C0%9Ab%A5%DDQ%3EMD%5E%01h%E7%2A
2011-06-01 16:18:15 -04:00
L. David Baron d69c8fdc7b Change IsPercentageAware (which tests whether an inline box's width depends on the width of its container) to check the correct general statement of when the width of a replaced element depends on its container's width, and in doing so avoid depending on the notion of percentage intrinsic size. (Bug 611099) r=dholbert
Needed to help CSS 2.1 meet Proposed Recommendation entrance criteria.
2011-06-12 18:52:32 -07:00
Ed Morley f13392fb42 Bug 614515 - Remove MOZ_SVG conditions. r=roc 2011-05-30 09:34:50 +02:00
Ehsan Akhgari e66b9024c8 Bug 10209 - Part 2: Implement the absolute positioning support for all frames; r=roc 2011-04-29 19:02:33 -04:00
Chris Jones d737e982f8 Bug 642381, part 3: Hoist Maybe into mfbt and eliminate Gecko's use of jstl. r=jorendorff,luke 2011-04-28 17:48:52 -05:00
Chris Jones 91abf226cc Bug 642381, part 2: Rename LazilyConstructed to Maybe. r=luke 2011-04-28 17:48:51 -05:00
Zack Weinberg ef90e52c10 Bug 174055, part 6: eliminate pointless nsresult return values. 2011-04-07 21:18:43 -07:00
Zack Weinberg b6b73ad75a Bug 174055, part 4: mechanical fixups outside gfx. 2011-04-07 18:05:49 -07:00
Zack Weinberg 9f143f420f Bug 174055, part 1: minimize inclusion of nsI(Thebes)FontMetrics.h. 2011-04-07 18:04:41 -07:00
Zack Weinberg 86131020a5 Bug 266236 part 8: Change nsRenderingContext::GetDeviceContext and ::GetFontMetrics to return bare pointers.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
rename : gfx/src/nsThebesRenderingContext.h => gfx/src/nsRenderingContext.h
extra : rebase_source : 36dd32d715cb75e99cd3a69e460c000c1777d6a6
2011-04-07 18:04:40 -07:00
Jan Küchler c510bc3046 Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr<nsRenderingContext> for nsCOMPtr<nsRenderingContext>.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
extra : rebase_source : 34884bfcafd885feaf73300bc7246cd192062a48
2011-04-07 18:04:40 -07:00
Jan Küchler ebb2f0c7ec Bug 266236 part 1: Preliminary API cleanup on nsIRenderingContext.
--HG--
extra : rebase_source : a21ffad484f47103e403b8316eae5fdfd815c2cb
2011-04-07 18:04:39 -07:00
Daniel Holbert 9784cf45cc Bug 596478: delay nsImageFrame's IsPercentageAware check until after we've lazily initialized mIntrinsicSize. r=roc a=dbaron 2011-02-15 13:34:52 -08:00
L. David Baron 24d9099920 Make overflow from text frames be visual overflow only, and not scrollable. (Bug 542595, patch 8) r=roc a2.0=blocking2.0:beta8 2010-10-06 21:25:45 -07:00
L. David Baron dd079acd74 Make nsLineLayout track two separate overflow areas. (Bug 542595, patch 7) r=roc a2.0=blocking2.0:beta8 2010-10-06 21:25:45 -07:00
Daniel Holbert dde3a3fc36 Bug 594617: Make nsImageFrame::GetIntrinsicSize return its actual intrinsic size, and teach IsPercentageAware about SVG images. r=roc a=blocking 2010-09-14 16:20:32 -04:00
L. David Baron b221c0b0c0 Add support for calc() to 'vertical-align' and 'text-indent'. (Bug 585715) r=bzbarsky a2.0=blocking:beta6+ 2010-08-31 12:05:12 -04:00
L. David Baron 374fca8e4f Add support for calc() to the '{margin,padding}-{top,right,bottom,left}' and '-moz-margin-{start,end}' properties. (Bug 585715) r=bzbarsky a2.0=blocking:beta6+ 2010-08-31 12:05:12 -04:00
Boris Zbarsky 4e33893936 Bug 580167 part 3. Make nsLineLayout call ReflowText as needed. r=dbaron 2010-08-25 14:54:47 -04:00
L. David Baron 999bb0be9f Add support for calc() to the 'top', 'right', 'bottom', and 'left' properties. (Bug 585715) r=bzbarsky a2.0=blocking+ 2010-08-25 12:17:56 +02:00
fantasai d65a7e96aa 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 39c372840a Consolidate code for determining when widths and heights depend on a container. (Bug 585715) r=bzbarsky a2.0=blocking2.0+ 2010-08-11 12:32:52 -07:00
L. David Baron 729eb4ac32 Remove aReflowStatus parameters made unnecessary by previous patch. (Bug 563584, patch 20) r=roc 2010-08-05 21:59:20 -07:00
Robert O'Callahan 79e3ba391b Bug 551632. endsInDiacritic frame property is set but never used. r=smontagu 2010-03-29 14:46:13 +13:00
Robert O'Callahan c347059add Bug 549184. Track 'has nonempty content been placed on this line yet' separately from 'has nonempty, non-span content been placed on this line yet'. r=dbaron
--HG--
extra : rebase_source : fe9318ed5143fe42107a55dfdcb6c0c8fee3dae6
2010-03-10 13:14:14 +13:00
Robert O'Callahan 67692a0491 Bug 538935. A span should be considered non-empty (for the purposes of deciding whether stuff after it is 'at the beginning of the line') only if it contains non-empty content. r=dbaron
--HG--
extra : rebase_source : 70e158527ef017ed5d5271e861a775aa85986645
2010-02-02 12:18:57 +13:00
Robert O'Callahan f2ce9444f4 Bug 531361. Make nsLineLayout not assert about long lines that may occur naturally. r=dbaron 2009-12-12 13:27:18 -08:00
Boris Zbarsky 64ec41f84d Bug 501847 part 2. Make various consumers deal with more than 2 inlines in an {ib} split. r=tn, sr=roc 2009-09-18 14:00:21 -04:00
L. David Baron 7f2dd889cf 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
L. David Baron 2ee74123ac Make empty bullets (i.e., those for list-style-type:none) not contribute to layout. (Bug 512631) r=roc 2009-09-11 06:46:36 -04:00
fantasai b2ea1d69bb Bug 492627 - Remove Placeholder Continuations [Part IV: Switch float layout APIs to pass float directly, without placeholder] r=roc 2009-08-31 11:25:35 -07:00
L. David Baron 08e90a1a5b Make lines with only a bullet take up height. (Bug 179596 / Bug 507187) r=roc 2009-08-10 19:48:42 -07:00
L. David Baron af28c93900 Make the quirks mode line height algorithm's check for bullets check whether there's a bullet rather than checking whether it's an HTML LI. (Bug 179596) r=roc 2009-08-10 19:48:42 -07:00
L. David Baron 4c34a1aff5 Merge InitFloat into AddFloat (on nsLineLayout and nsBlockReflowState). (Bug 25888) r+sr=roc 2009-05-20 07:21:34 -04:00
Karl Tomlinson 3bbadcfb42 b=481751 block-height line-height for text input and strut baseline for textarea r=bz,sr=dbaron
--HG--
extra : rebase_source : 1241360066ea9387d15c71936da9468399240640
2009-05-19 10:13:12 +12:00
Arpad Borsos 37bfad5344 Bug 492937 - kill nsLineLayout::mPlacedFloats and related code; r+sr=roc 2009-05-14 11:31:35 +02:00
Boris Zbarsky 30f1a769f0 Bug 492469. Better handling of end margins/borders/padding for frames that end up complete while having both fluid and fixed continuations. r+sr=dbaron 2009-05-13 12:38:58 -04:00
Arpad Borsos 6a3e4f01b4 Bug 492510 - Optimize nsLineLayout for memory usage; r+sr=roc 2009-05-12 10:53:06 +02:00
Simon Montagu 5effd3a66c Fix warnings caused by the patch for bug 492231. r+sr=roc 2009-05-12 01:18:27 -07:00
Boris Zbarsky 56ee16413d Bug 480452. Make {ib} splits behave the same way with regard to margins, borders, and padding as inline frames that just have a line-break happening inside them do. r+sr=dbaron 2009-05-11 22:04:58 -04:00
Simon Montagu 3c67dd2a7e Do bidi reordering for visual RTL frames in the same way as other bidi frames. Bug 492231, r+sr=roc 2009-05-11 03:36:01 -07:00
Boris Zbarsky 346daa82d1 Bug 67752. Implement interruptible reflow. r=roc,dbaron 2009-04-21 19:53:52 -04:00
Joe Drew 633b99bd32 Backed out changeset 6a452e522e07 - Boris Zbarsky – Bug 67752. Implement interruptible reflow. r=roc,dbaron - because of apparent Tp hangs. 2009-04-21 23:02:17 -04:00
Boris Zbarsky 5c5eb9c3ea Bug 67752. Implement interruptible reflow. r=roc,dbaron 2009-04-21 19:53:52 -04:00
Jonathan Kew 68b13a1a71 Bug 475968. Eliminate NS_FRAME_OUTSIDE_CHILDREN flag, store small overflow areas cheaply within the frame. r+sr=roc 2009-04-06 12:31:50 +12:00
Masayuki Nakano 0066bb8330 Bug 338209 Make spellchecker use thicker wavy underlines instead of dotted underlines r+sr=roc 2009-04-03 16:26:28 +09:00
L. David Baron efb6f0d272 Remove PerFrameData::mFrameType, since it's write-only. (Bug 478899) r+sr=bzbarsky 2009-02-19 13:55:48 -08:00
L. David Baron c936720f0a Back out all 8 changesets that I just landed (bugs 477959, 477961, 322475, 478899, 475215, 478156) again, because Talos Try server builds lie about which changesets they're testing. 2009-02-19 09:06:18 -08:00
L. David Baron d7971aa24b Remove PerFrameData::mFrameType, since it's write-only. (Bug 478899) r+sr=bzbarsky 2009-02-19 07:29:28 -08:00
L. David Baron 3d090560b0 Revert (back out) the previous 11 changesets (bugs 477959, 477961, 477963, 477962, 322475, 478899, 475215, 478156), due to Mac talos orange with (as usual) no useful diagnostic. 2009-02-18 18:59:47 -08:00
L. David Baron d071d4e2af Remove PerFrameData::mFrameType, since it's write-only. (Bug 478899) r+sr=bzbarsky 2009-02-18 17:13:25 -08:00
Boris Zbarsky f4cb3086ac Bug 299837. Implement text-align:end. r+sr=dbaron 2009-02-05 22:48:30 -05:00
L. David Baron f6824a9fa5 Replace space manager with a more limited float manager. (Bug 191448) r+sr=roc
--HG--
rename : layout/generic/nsSpaceManager.cpp => layout/generic/nsFloatManager.cpp
rename : layout/generic/nsSpaceManager.h => layout/generic/nsFloatManager.h
2009-01-04 19:39:54 -05:00
L. David Baron ad5d856ae6 Rename flags and methods from space manager to float manager. (Bug 191448) r+sr=roc 2009-01-04 19:39:54 -05:00
Robert O'Callahan bc9d906d47 Bug 465928. Avoid SetInvalidateTextRuns being called by nsBlockFrame::DoRemoveFrame when we're just deleting empty continuation frames. r+sr=dbaron 2008-12-03 14:27:19 +13:00
L. David Baron 9c3b92f412 Use larger values for no-minimum and no-maximum so that we don't cross them. (Bug 466395) r+sr=roc a191=beltzner 2008-11-27 20:08:32 -08:00
Robert O'Callahan 7211ccf1cd Bug 428263. Don't treat continuations of blocks as 'continuations' for setting zeroEffectiveSpanBox, since they're not span-continuations which is all we care about here. r+sr=dbaron 2008-10-16 09:57:27 +13:00
Robert O'Callahan c608a29bb8 Bug 441259. Account for trimmable width when deciding whether we can place a float on the line. Also, only try to place a float at a point where we can have a line break. r+sr=dbaron 2008-08-12 21:29:35 +12:00
Robert O'Callahan f05ab3d5c6 Bug 406299. Make sure we include the font ascent/descent of a soft hyphen if there is one. r+sr=dbaron 2008-08-12 21:18:23 +12:00
Simon Montagu 0185f285af Support for word-wrap CSS property. Bug 99457, r+sr=dbaron, roc 2008-07-24 10:16:18 +03:00
Zack Weinberg a1072e86a3 Delete nsLayoutUtils::GetAbsoluteCoord(); fold logic into callers and simplify. (Bug 437335) r+sr=dbaron 2008-07-17 16:37:12 -07:00
Robert O'Callahan 1b6c71eabf Bug 439004. Check whether there's logically empty content already placed on the line instead of just checking whether the line has advanced horizontally. r+sr=dbaron. 2008-06-14 20:28:07 +12:00
Michael Ventnor 129d4dc805 Implement text-shadow rendering (bug 10713). r+sr=roc. Relanding with fixes to make tests pass on Mac 2008-06-13 10:02:32 +12:00
Robert O'Callahan 42904fb3e3 Backing out text-shadow due to Mac issues 2008-06-12 17:32:31 +12:00
Michael Ventnor 159e13c0ea Implement text-shadow rendering. 2008-06-12 14:34:40 +12:00
Robert O'Callahan 4188aa979e Allow floats to be placed on the current line even after nonzero-width inline content has been placed. Fixes an Acid3 layout bug. r+sr=dbaron 2008-06-11 11:53:22 +12:00
L. David Baron f4b0e442f4 Make top and bottom values of vertical-align align the subtree rather than the element itself. (Bug 118501) r+sr=roc 2008-06-06 09:26:58 -07:00
L. David Baron 305731053a Use PlaceTopBottomFrames for the children of the root span, too. (Bug 118501) r+sr=roc 2008-06-06 09:26:58 -07:00
masayuki@d-toybox.com a383f49809 Bug 426772 Floated first-letter generates too tall box r+sr=roc, a1.9=beltzner 2008-04-11 01:44:58 -07:00
masayuki@d-toybox.com 3b28b33c93 Bug 421353 Moving the mouse over text hyperlinks which become underlined spikes cpu usage r=roc+stuart, sr=roc, a1.9=beltzner 2008-03-29 14:25:15 -07:00
masayuki@d-toybox.com dfeff6fa58 Bug 417014 Need blacklist system for underline offset adjusting of CJK fonts which have wrong underline offset r=roc+stuart, sr=roc, b1.9=stuart 2008-03-12 19:36:58 -07:00
roc+@cs.cmu.edu dc7c75d483 Bug 420351. Don't let empty list-bullets make a line non-empty. r+sr=dbaron 2008-03-11 17:46:18 -07:00
roc+@cs.cmu.edu d5b40c88f6 Backing out 420351 2008-03-11 03:44:32 -07:00
roc+@cs.cmu.edu aeaf9bd3dc Bug 420351. Empty bullets cannot make a line non-empty. r+sr=dbaron 2008-03-11 00:36:03 -07:00
roc+@cs.cmu.edu 60a9f80a00 Bug 261081. Support official 'pre-wrap' value for CSS 'white-space' since we already support it well as '-moz-pre-wrap'. r+sr=dbaron,a=schrep 2008-02-19 18:07:48 -08:00
masayuki@d-toybox.com 6e2677d193 Bug 392785 overflowed underline sometimes is not repainted at scrolling r+sr=roc b1.9=dbaron 2008-02-16 07:31:27 -08:00
roc+@cs.cmu.edu 244809251f Bug 400813, check in the right version of the patch 2008-02-14 02:03:01 -08:00
roc+@cs.cmu.edu 05225fa949 Bug 400813. Text with font-size:0 should not make a line be treated as empty. r+sr=dbaron 2008-02-14 01:08:33 -08:00
roc+@cs.cmu.edu abee6630e1 backing out bug 400813 again due to reftest failure... 2008-02-11 18:48:17 -08:00
roc+@cs.cmu.edu 5c233a1d82 Bug 400813. Lines with font-size:0 content should not be treated as empty. r+sr=dbaron 2008-02-11 17:42:14 -08:00
dholbert@cs.stanford.edu 7f8f780867 Bug 412607: Fix wrapping issue by clearing trimmable width before trying CanPlaceFrame. r+sr=roc, a=blocking1.9 2008-02-07 15:00:37 -08:00
roc+@cs.cmu.edu 0b989b691c Backing out 400813, sigh 2008-01-29 23:35:05 -08:00
roc+@cs.cmu.edu 4786a8d1cb Bug 400813. Lines with actual content that just happens to be zero-width should be treated as non-empty. r+sr=dbaron 2008-01-29 23:12:26 -08:00
uriber@gmail.com 2544167c67 Fix bullet positioning for justified RTL list items. bug=410503 r=smontagu sr=roc a1.9=dsicore 2008-01-04 02:22:38 -08:00
dbaron@dbaron.org 5553e72c54 Remove unused height output from nsLineLayout::EndSpan. b=407086 r+sr=roc a=dsicore 2007-12-12 13:51:18 -08:00
dbaron@dbaron.org 37d5bc4b46 Remove some code that handles unconstrained widths (and fix nsFirstLetterFrame not to pass them). b=407086 r+sr=roc a=dsicore 2007-12-12 13:51:00 -08:00
roc+@cs.cmu.edu 797b89f601 Bug 404180. Bidi reordering moves frames around so we can't trust pfd->mBounds in nsLineLayout::RelativePositionFrames. r+sr=dbaron 2007-12-11 17:43:09 -08:00
roc+@cs.cmu.edu 095643fe53 Bug 407111. Correctly set whether a break opportunity after non-text content fits. r+sr=dbaron,a=schrep 2007-12-07 01:17:19 -08:00
smontagu@smontagu.org 43a5e11b2a Only try to process first-letter frames when they exist. Bug 404209, r+sr+b=roc 2007-12-05 00:15:15 -08:00
dmose@mozilla.org 4ef13d4907 Backing out fix for bug 392785 as per roc + mconnor. 2007-12-04 15:32:08 -08:00
masayuki@d-toybox.com 7fc09046f2 Bug 392785 overflowed underline sometimes is not repainted at scrolling r+sr=roc, b1.9=dbaron 2007-12-02 22:51:57 -08:00
roc+@cs.cmu.edu efa3189859 Bug 399531. Rework TrimTrailingWhitespace so that we recompute the overflow area for trimmed textframes and so that soft hyphens in otherwise-empty textframes are activated. r+sr=dbaron 2007-12-01 01:24:24 -08:00
reed@reedloden.com 98992c2e45 Bug 404636 - "Building without SVG fails" [p=romaxa@gmail.com (romaxa) r+sr=roc a1.9=schrep] 2007-11-21 13:09:12 -08:00
roc+@cs.cmu.edu 4d16d41efc Bug 402950. Allow spans to always be placed on a line, because part of the span may fit even if the whole span doesn't. Also request backup earlier so we always backup if we decline to place a frame. r+sr=dbaron 2007-11-18 13:36:18 -08:00
jwatt@jwatt.org d308285bb4 Fixing bug 294086. <svg> should be a replaced element. r+sr=dbaron@mozilla.com blocking1.9=tor@acm.org 2007-11-18 04:09:03 -08:00
dbaron@dbaron.org 5a7a8d066f Rename new width keywords to match CSS WG decision. b=402706 r+sr=bzbarsky a=blocking1.9+ 2007-11-15 10:10:31 -08:00
reed@reedloden.com c78dcd3420 Bug 400369 - "List markers (bullets) positioned incorrectly for left- and center-aligned list items in RTL lists" [p=uriber@gmail.com (Uri Bernstein) r=smontagu sr+a1.9=roc] 2007-11-08 23:49:56 -08:00
reed@reedloden.com 2b71f12671 Bug 402338 - "outline property on inline-block painted too far outside" [p=roc r+sr=dbaron a=blocking1.9+] 2007-11-08 22:49:38 -08:00
roc+@cs.cmu.edu e1da1696a2 Bug 393096. Allow an element containing breakable whitespace to introduce a break opportunity no matter what the context. Also cleans up some trimming stuff and adds comprehensive whitespace breaking and trimming reftests. r+sr=dbaron 2007-10-20 00:30:26 -07:00
roc+@cs.cmu.edu 18ec94e683 Bug 392829. Clean up nsLineLayout code that's not used (or at least used differently). r+sr+a=dbaron 2007-10-01 19:36:26 -07:00
roc+@cs.cmu.edu a0ce273d02 Bug 96041. Compute precise glyph extents for high-quality text, and when requested. r=vlad,r+sr=dbaron 2007-09-23 19:19:14 -07:00
roc+@cs.cmu.edu f5ea55f8b4 Backing out due to test bustage 2007-09-22 06:28:16 -07:00
roc+@cs.cmu.edu f2b87e6c9a Bug 96041. Compute true glyph bounding metrics. r=vlad,dbaron,sr=dbaron 2007-09-22 05:43:52 -07:00