Commit Graph

1096 Commits

Author SHA1 Message Date
Ethan Lin
e7c48eaf73 Bug 1357003 - Keep original layer state for basic layer manager when enabling advanced layer. r=mattwoodrow
--HG--
extra : rebase_source : 75540e18973d788e4e076aa3bdfa8a26036b2269
2017-04-21 23:11:38 +08:00
Evelyn Hung
895079a961 Bug 1355595 - Simplify the default font size calculation; r=dbaron
When calculating the thickness of the spellchecker underline, we can
directly use aPresContext to get default font size, instead of creating
a temporary nsStyleFont object. nsStyleFont does more work than default
font size calculation, and destructing its member mFont object is
expensive (see bug 1355600), so it's better to avoid it on this hot path.

MozReview-Commit-ID: GSvnZHULtL5

--HG--
extra : rebase_source : bf301c74933cf19dac45b52ff0b8b3e3675a9b1b
2017-04-11 18:13:31 -04:00
Lee Salzman
a168dcdbf3 Bug 1348980 - implement UnscaledFont API for Moz2D and thebes. r=jfkthame 2017-04-06 17:41:02 -04:00
L. David Baron
f56a065e7d Bug 1353187 - Give frame properties the const-ness semantics of member variables. r=dholbert
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed.  I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.

This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.

MozReview-Commit-ID: IJ9JnGzdH51

--HG--
extra : transplant_source : %D4%DF%04%91_q%E6%CF%B3N%82%2C%A5%CB0%3A%B6%810%ED
2017-04-04 20:59:21 -07:00
Carsten "Tomcat" Book
358125cbde Backed out changeset a86c4218ca5f (bug 1353187) 2017-04-04 09:54:51 +02:00
L. David Baron
c2af2e1613 Bug 1353187 - Give frame properties the const-ness semantics of member variables. r=dholbert
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed.  I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.

This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.

MozReview-Commit-ID: IJ9JnGzdH51

--HG--
extra : transplant_source : %91%D6%C7%01hC%B3z%90%B6%93%93qcAK%CB%09%D6z
2017-04-03 20:43:30 -07:00
cku
a52259bf72 Bug 1349462 - Part 1. Rename IsSVGText as IsInSVGTextSubtree. r=heycam
MozReview-Commit-ID: LTo6c8tTtaf

--HG--
extra : rebase_source : bc6913c42cca141d7a3098fdd4dcc72fbf146b5a
2017-03-23 15:29:11 +08:00
Jonathan Kew
f1fe2e00d1 Bug 1348596 - Back out incorrectly-landed (and unreviewed) change to ContinueTextRunAcrossFrames that was mistakenly pushed. r=dbaron 2017-03-20 09:44:02 +00:00
Jeremy Chen
9a60f77d80 Bug 1343516 - clean up the mess of PropertyProvider and its implementations. r=jfkthame
The cleanup work includes:

part 1: make all methods 'const' for the abstract class of PropertyProvider.

part 2: make nsFontMetrics's StubPropertyProvider final.

part 3: make nsTextFrame's PropertyProvider final.

  Make some methods 'const' and some variables 'mutable', so we could let all the
  overridden methods stay const.

  We also need to make the pass-in parameter of gfxFontGroup's GetHyphenWidth const.
  Note that the comment of GetHyphenWidth seem outdated, so I fixed it as well.

part 4: make the member variables in nsTextFrame's PropertyProvider to be 'const'.

  Make all the member variables 'const' except mStart, mLength,
  mJustificationArrayStart, and mJustificationSpacings.

  The static function AdvanceToNextTab is fixed since we only use 2 of the 4 parameters.

part 5: coding style fix for nsTextFrame's PropertyProvider.

MozReview-Commit-ID: 1kbWPwx27aQ
2017-03-17 18:53:15 +08:00
Brad Werth
79fcb7ba0d Bug 1343695 Part 2: Narrow an overly restrictive assert in GetRenderedText. r=mats
MozReview-Commit-ID: EuxNJmKPxok

--HG--
extra : rebase_source : b77018ea2417b0778fb51ba579d8c4baeeaf06a5
2017-03-14 14:27:30 -07:00
Jeremy Chen
0316fede8c Bug 1056516 - let auto hyphen honor manual hyphen when hyphens:auto is set. r=jfkthame
MozReview-Commit-ID: F3ALAJRHned
2017-03-13 12:54:05 +08:00
Jeremy Chen
2e09040e6e Bug 1056516 - use HyphenType to store different types of hyphenations. r=jfkthame
MozReview-Commit-ID: AX3NNDS4hxP
2017-03-13 12:54:05 +08:00
Jeremy Chen
17dca35346 Bug 1056516 - use AutoTArray for hyphenBuffer in BreakAndMeasureText. r=jfkthame
MozReview-Commit-ID: 2sFqlGdoCcm
2017-03-13 12:54:04 +08:00
Ryan VanderMeulen
b035220d0f Backed out 5 changesets (bug 1056516) for suspicion of causing Linux/OSX topcrashes.
Backed out changeset 70586dbb509c (bug 1056516)
Backed out changeset 753067cc11f7 (bug 1056516)
Backed out changeset 0bcf5f91b014 (bug 1056516)
Backed out changeset 41d39e1e440b (bug 1056516)
Backed out changeset aaec04f76481 (bug 1056516)
2017-03-10 11:56:50 -05:00
jeremychen@mozilla.com
2cb71eafe4 Bug 1056516 - let auto hyphen honor manual hyphen when hyphens:auto is set. r=jfkthame
MozReview-Commit-ID: BWzg3pb2lDH

--HG--
extra : rebase_source : 069dc3091bf7600d4675fe9ea5d0b41bc70744ba
2017-03-10 00:30:11 +08:00
jeremychen@mozilla.com
f4ac16bb05 Bug 1056516 - use HyphenType to store different types of hyphenations. r=jfkthame
MozReview-Commit-ID: 22ICYSaY1I2

--HG--
extra : rebase_source : 05e0a442dec8a8ac7f1b663808fc016ee3385aa2
2017-03-10 00:30:11 +08:00
jeremychen@mozilla.com
68ca87317f Bug 1056516 - use AutoTArray for hyphenBuffer in BreakAndMeasureText. r=jfkthame
MozReview-Commit-ID: 1fQGiosLYG

--HG--
extra : rebase_source : cdca8fa9f308d3676a09b2735a98c13bd2a2e2ef
2017-03-10 00:30:10 +08:00
jeremychen@mozilla.com
ec96d9f267 Bug 276079 - add layout support for CSS text-justify property. r=xidorn
MozReview-Commit-ID: Kiwu8UNfbSj

--HG--
extra : rebase_source : 7673c42f8d401832437b0bb891f87aa22acabe15
2017-03-01 20:58:25 +08:00
jeremychen@mozilla.com
33b63777fa Bug 276079 - fix couple coding style in IsJustifiableCharacter. r=xidorn
MozReview-Commit-ID: Hf13sGzwdDl

--HG--
extra : rebase_source : b2ef71e347c235c8973fd5d74e845a2d3f523027
2017-03-01 20:58:25 +08:00
Ting-Yu Lin
8f840dc923 Bug 775624 Part 22 - Remove NS_FRAME_COMPLETE. r=dholbert
This patch is written by the following script with some manual adjustment to
the comment in nsRubyTextContainerFrame.cpp and nsRubyFrame.cpp, and
nsColumnSetFrame's constructor.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "nsReflowStatus *([a-zA-Z0-9]*) = NS_FRAME_COMPLETE" "nsReflowStatus \1"
rename "([a-zA-Z0-9.*]*) *= NS_FRAME_COMPLETE;" "\1.Reset();"
rename "([a-zA-Z0-9.*]*) == NS_FRAME_COMPLETE" "\1.IsEmpty()"

MozReview-Commit-ID: 9tqQAHvdQex

--HG--
extra : rebase_source : 3119776946dc2c8350098b7bf9f3ceff29bdffb5
2017-02-14 17:55:48 +08:00
Ting-Yu Lin
f19bfc4b93 Bug 775624 Part 21 - Remove NS_FRAME_NOT_COMPLETE. r=dholbert
To preserve the semantics, Reset() is called to clear other bits in the
status prior to set the incomplete bit. Though some of them might not be
necessary.

MozReview-Commit-ID: InNDwcpp28A

--HG--
extra : rebase_source : 833e44a5dbb447d82c67f715cd5b0b2e97a5c62d
2017-02-14 17:30:56 +08:00
Ting-Yu Lin
37d27159af Bug 775624 Part 19 - Convert NS_INLINE_BREAK_FIRST_LETTER_COMPLETE to use bit-field and methods. r=dholbert
MozReview-Commit-ID: k1CSWJNMns

--HG--
extra : rebase_source : 1aa775a1e835f3d001f8b2093d0c4fb9f6651630
2017-02-14 17:09:37 +08:00
Ting-Yu Lin
d1e11eca37 Bug 775624 Part 13 - Convert NS_INLINE_LINE_BREAK_AFTER to a method. r=dholbert
NS_INLINE_MAKE_BREAK_TYPE is used only in BRFrame. Delete it, too.

MozReview-Commit-ID: GC4vF0GFsAD

--HG--
extra : rebase_source : d7727fe41410a8998142d9ded8dcd8ae9c2a780f
2017-02-14 11:52:53 +08:00
Ting-Yu Lin
56ebb62910 Bug 775624 Part 12 - Add bit-fields for inline break status, and convert NS_INLINE_LINE_BREAK_BEFORE. r=dholbert
NS_INLINE_LINE_BREAK_BEFORE() was replaced by the help of the following script.

function rename() {
find layout\
     -type f\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename " = NS_INLINE_LINE_BREAK_BEFORE\(\);" ".SetInlineLineBreakBeforeAndReset();"

MozReview-Commit-ID: mz6L8zay7q

--HG--
extra : rebase_source : fddffa1288c7a52c7245aec0839a65f8d1d3f008
2017-02-14 11:52:53 +08:00
Carsten "Tomcat" Book
ed3d8d8286 merge mozilla-inbound to mozilla-central a=merge 2017-02-15 12:21:44 +01:00
Jeff Walden
cdee578059 Bug 1287006 - Don't pass Maybe (or any class containing a Maybe member) by value, only by reference or pointer, in layout/-related code. r=bz
--HG--
extra : rebase_source : 94377970d6ec591044a10dab1aa5568e4a051837
2017-02-13 09:07:40 -08:00
Daniel Holbert
452a3b8454 Bug 1339609: Add #include for gfxPrefs.h to all source code that calls gfxPrefs APIs. r=jgilbert
MozReview-Commit-ID: GxWehmDYB3t

--HG--
extra : rebase_source : cd994e5c6abf777f77c5a708cbfb2f6afc49a44c
2017-02-14 14:01:59 -08:00
Kartikaya Gupta
96c394d70c Merge m-c to graphics
MozReview-Commit-ID: AXRXwXgkOTv
2017-02-10 13:57:53 -05:00
Kartikaya Gupta
6580d884b2 Merge m-c to graphics
MozReview-Commit-ID: uU8MPphFqj
2017-02-02 13:38:51 -05:00
Ryan Hunt
3fe2c02ee1 Merge m-c to graphics 2017-01-27 10:07:37 -06:00
Kartikaya Gupta
ca041b7c5a Merge m-c to graphics
MozReview-Commit-ID: FOyS87VawTT
2017-01-25 08:52:04 -05:00
Jonathan Kew
36f52391d9 Bug 1331683 - Don't attempt to use any Core Text and Core Graphics variation-font APIs on pre-Sierra systems. r=jrmuizel,lsalzman 2017-02-09 21:37:24 +00:00
Kartikaya Gupta
5e2e8f8f8e Merge m-c to graphics
MozReview-Commit-ID: 5ovnMmSOiZX
2017-01-09 10:18:37 -05:00
Mason Chang
5e1c34af71 Bug 1329314 - Add support for nsDisplayText webrender display item. r=jrmuizel? 2017-01-06 11:50:53 -08:00
Emilio Cobos Álvarez
1c87f99407 Bug 1334075: Part 2, mark some methods in nsTextFrame as final to avoid virtual calls. r=xidorn
MozReview-Commit-ID: FBhjFSNviBL
2017-01-26 15:43:12 +01:00
Xidorn Quan
97d13f46a3 Bug 1303241 part 2 - Make GetVisitedDependentColor use style structs directly. r=dbaron
I think there are three advantages of this change:
1. removes some dependencies from layout / painting code to pre-computed
   value stuff in the style system;
2. makes it easier to audit usage of specific fields in style structs
   (which is probably a side effect of the first one);
3. potentially improves performance since it doesn't go through the
   unnecessary general logic in ExtractComputedValue.

Also, combined with the part before, we get a unified list for visited-
dependent properties so that we can ensure the assertion here and the
style difference calc code are consistent.

MozReview-Commit-ID: 5B9aN7CfRgI

--HG--
extra : rebase_source : ac80eaea2474b9ec4b47b1cc9a5bdd2e61f6ec4d
2016-12-31 00:57:37 +11:00
Jeremy Chen
213197e5e1 Bug 1328540 - trim trailing whitespaces. r=jeremychen
Trim trailing whitespaces for files that are touched in this bug:

  gfxTextRun.h
  gfxTextRun.cpp
  nsTextFrame.cpp
  nsCSSProps.cpp

MozReview-Commit-ID: FmiW2QiCoFv

--HG--
extra : rebase_source : cbc9ae8c3c4410d1fe79c027d4ccf11b45c8bd19
2017-01-04 23:55:16 +08:00
Jeremy Chen
f735dd2d2c Bug 1328540 - convert NS_STYLE_HYPHENS_* to an enum class. r=xidorn
MozReview-Commit-ID: BwTzbA29Y3H

--HG--
extra : rebase_source : fc07d2c881a8ccc618fd1776d1e977c051b0032f
2017-01-04 23:55:16 +08:00
Nathan Froyd
f6a73ed989 Bug 1315274 - rename mozilla::MakeRange to mozilla::IntegerRange; r=Waldo
MakeRange is just way too generic for this sort of thing.
2017-01-06 09:22:53 -05:00
cku
286c728e90 Bug 1311270 - Part 3. Replace {bg|mask}-origin/{bg|mask}-clip constants by StyleGeometryBox.
MozReview-Commit-ID: DYokhDa9fFQ

--HG--
extra : rebase_source : a187c3f9519efb8b031913ce0dbf643c05232fa2
2016-11-22 15:30:01 +08:00
Markus Stange
6efd7c73b1 Bug 1298218 - Use DisplayItemClipChain for tracking clips on display items. r=mattwoodrow,tnikkel
This is the bulk of the changes.
 - DisplayItemScrollClip is removed. Instead, we will have 1) ActiveScrolledRoot
   and 2) DisplayItemClipChain.
 - ActiveScrolledRoot points to a scroll frame and allows traversing up the
   scroll frame chain.
 - DisplayItemClipChain is a linked list of clips, each clip being associated
   with the ActiveScrolledRoot that moves this clip.
 - Each display item has an ActiveScrolledRoot and a clip chain.
 - nsDisplayItem::GetClip returns the item of the clip chain that scrolls with
   the item's ASR. The separation between "regular clip" and "scroll clips"
   mostly goes away.
 - Tracking clips in the display list builder's clip state happens very
   similarly to how regular clips used to be tracked - there's a clip chain for
   content descendants and a clip chain for containing block descendants. These
   clip chains are intersected to create the combined clip chain.
 - There are strict rules for the ASR of a container item: A container item's
   ASR should be the innermost ASR which the item has finite clipped bounds with
   respect to.
 - At some point in the future, ASRs and AGRs should be reunified, but I haven't
   done that yet, because I needed to limit the scope of the change.

MozReview-Commit-ID: KYEpWY7qgf2

--HG--
extra : rebase_source : c727f6300a35463750639e165bfa37374c06b851
2017-01-31 17:07:35 -05:00
Ting-Yu Lin
f1d19f16fb Bug 1332105 Part 1 - Convert SelectionDetails and related functions to use UniquePtr. r=dholbert
For the non-owning pointer usage like iterating SelectionDetails's linked
list, it's sufficient to use SelectionDetails*.

MozReview-Commit-ID: 7PCFhD6Iz8j

--HG--
extra : rebase_source : 2d26edd513a402384e26719b3c0b5362d7a4ebb8
2017-01-20 17:39:57 +08:00
Michael Layzell
c6fccac579 Bug 1299489 - Change nsTArray to use a custom iterator based on index instead of pointers to improve iterator invalidation safety of ranged for loops, r=froydnj
MozReview-Commit-ID: CahPOcRYvES
2016-12-08 15:54:45 -10:00
Xidorn Quan
c3010f1b3e Bug 1319424 - Ensure to setup line breaker before using it. r=jfkthame
MozReview-Commit-ID: EOuPLXTIBcZ

--HG--
extra : rebase_source : 166719397abf9ba8ca4e5bf9d187f2c7783981b3
2016-11-25 16:19:32 +11:00
Jeremy Chen
7e8439ba23 Bug 1320239 - use nscoord instead of nsStyleCoord for -webkit-text-stroke-width. r=heycam
MozReview-Commit-ID: 94fL7YgZqCl

--HG--
extra : rebase_source : ad651ab9270a9e19a21401b81745808cc7a8a74b
2016-11-29 20:08:08 +08:00
Carsten "Tomcat" Book
68202ee27c merge mozilla-inbound to mozilla-central a=merge 2016-11-29 16:47:18 +01:00
Thomas Wisniewski
bbec31e079 Bug 943918 - Part 2: layout for tab-size:<length> and tab-size:<number>. r=heycam 2016-11-25 00:18:11 -05:00
Sebastian Hengst
8a78fcdecc Backed out changeset 0c5eb3fd9fb5 (bug 943918) 2016-11-28 00:39:27 +01:00
Thomas Wisniewski
813450469e Bug 943918 - Part 2: layout for tab-size:<length> and tab-size:<number>. r=heycam 2016-11-25 00:18:11 -05:00
L. David Baron
03d6962a30 Bug 1320815 - DeCOMtaminate nsIFrame::IsSelectable by returning boolean instead of nsresult. r=xidorn
MozReview-Commit-ID: EBxBcEgIvp7

--HG--
extra : rebase_source : 49e5a370df86baec014e99be56b05d451d5ee78c
2016-11-28 15:31:29 -08:00