Commit Graph

1128 Commits

Author SHA1 Message Date
jeremychen@mozilla.com
993e4d8d59 Bug 276079 - fix couple coding style in IsJustifiableCharacter. r=xidorn
MozReview-Commit-ID: Hf13sGzwdDl
2017-03-01 20:58:25 +08:00
Ting-Yu Lin
e6769617e9 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
2017-02-14 17:55:48 +08:00
Ting-Yu Lin
323098e251 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
2017-02-14 17:30:56 +08:00
Ting-Yu Lin
0212e4bbbf Bug 775624 Part 19 - Convert NS_INLINE_BREAK_FIRST_LETTER_COMPLETE to use bit-field and methods. r=dholbert
MozReview-Commit-ID: k1CSWJNMns
2017-02-14 17:09:37 +08:00
Ting-Yu Lin
a3dd49c694 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
2017-02-14 11:52:53 +08:00
Ting-Yu Lin
f87f7e111c 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
2017-02-14 11:52:53 +08:00
Carsten "Tomcat" Book
242fd05a22 merge mozilla-inbound to mozilla-central a=merge 2017-02-15 12:21:44 +01:00
Jeff Walden
a6ec779698 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 2017-02-13 09:07:40 -08:00
Daniel Holbert
bee7fa0be8 Bug 1339609: Add #include for gfxPrefs.h to all source code that calls gfxPrefs APIs. r=jgilbert
MozReview-Commit-ID: GxWehmDYB3t
2017-02-14 14:01:59 -08:00
Kartikaya Gupta
f441112c9f Merge m-c to graphics
MozReview-Commit-ID: AXRXwXgkOTv
2017-02-10 13:57:53 -05:00
Kartikaya Gupta
3e3b1b3f6f Merge m-c to graphics
MozReview-Commit-ID: uU8MPphFqj
2017-02-02 13:38:51 -05:00
Ryan Hunt
b60d405ff9 Merge m-c to graphics 2017-01-27 10:07:37 -06:00
Kartikaya Gupta
5c508e0b98 Merge m-c to graphics
MozReview-Commit-ID: FOyS87VawTT
2017-01-25 08:52:04 -05:00
Jonathan Kew
9dd90d9385 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
2d075dbfbe Merge m-c to graphics
MozReview-Commit-ID: 5ovnMmSOiZX
2017-01-09 10:18:37 -05:00
Mason Chang
f7152a1f5b Bug 1329314 - Add support for nsDisplayText webrender display item. r=jrmuizel? 2017-01-06 11:50:53 -08:00
Emilio Cobos Álvarez
40969de9f5 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
db94c3e82c 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
2016-12-31 00:57:37 +11:00
Jeremy Chen
102346403b 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
2017-01-04 23:55:16 +08:00
Jeremy Chen
9e2ea144ef Bug 1328540 - convert NS_STYLE_HYPHENS_* to an enum class. r=xidorn
MozReview-Commit-ID: BwTzbA29Y3H
2017-01-04 23:55:16 +08:00
Nathan Froyd
f6f2de80c4 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
b00f9ec88d Bug 1311270 - Part 3. Replace {bg|mask}-origin/{bg|mask}-clip constants by StyleGeometryBox.
MozReview-Commit-ID: DYokhDa9fFQ
2016-11-22 15:30:01 +08:00
Markus Stange
683672b065 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
2017-01-31 17:07:35 -05:00
Ting-Yu Lin
19193f8928 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
2017-01-20 17:39:57 +08:00
Michael Layzell
da7d6a4db8 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
6724c40db0 Bug 1319424 - Ensure to setup line breaker before using it. r=jfkthame
MozReview-Commit-ID: EOuPLXTIBcZ
2016-11-25 16:19:32 +11:00
Jeremy Chen
bf66a904c1 Bug 1320239 - use nscoord instead of nsStyleCoord for -webkit-text-stroke-width. r=heycam
MozReview-Commit-ID: 94fL7YgZqCl
2016-11-29 20:08:08 +08:00
Carsten "Tomcat" Book
e23b4a4227 merge mozilla-inbound to mozilla-central a=merge 2016-11-29 16:47:18 +01:00
Thomas Wisniewski
6aa2877759 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
b454e5fcc5 Backed out changeset 0c5eb3fd9fb5 (bug 943918) 2016-11-28 00:39:27 +01:00
Thomas Wisniewski
5f74ccce30 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
6eb5c8ff40 Bug 1320815 - DeCOMtaminate nsIFrame::IsSelectable by returning boolean instead of nsresult. r=xidorn
MozReview-Commit-ID: EBxBcEgIvp7
2016-11-28 15:31:29 -08:00
Xidorn Quan
98ea70e747 Bug 389283 - Choose cursor value based on selectability. r=dbaron
MozReview-Commit-ID: 2c4RcXgwz1U
2016-11-25 01:00:34 +11:00
Matt Woodrow
050c55ba10 Bug 1317862 - Part 4: Remove unnecessary clip. r=mstange 2016-11-24 18:11:29 +13:00
Matt Woodrow
71dfeb349f Bug 1317862 - Part 3: Build TextLayers if enabled. r=mstange 2016-11-24 18:11:29 +13:00
Xidorn Quan
73900b805a Bug 1267515 part 2 - Place ruby annotations outside annotations from ruby descendants. r=dholbert
MozReview-Commit-ID: Gbo43pC5jqr
2016-10-26 17:40:58 +11:00
Xidorn Quan
fe92f6c82c Bug 1267515 part 1 - Refactor ruby leadings into a helper RubyBlockLeadings struct. r=dholbert
MozReview-Commit-ID: IJAA9fHbCZd
2016-11-10 11:10:42 +11:00
Jeremy Chen
b1dad671ed Bug 1286468 followup - Fix naming issues.
MozReview-Commit-ID: C2PDA4R5k5F
2016-10-24 15:01:25 +08:00
Jeremy Chen
677ecc039d Bug 1286468 - Rename line related functions in nsBlockFrame. r=TYLin
1. Rename these functions to agree with Mozilla coding style.
2. Use singular naming instead of plural naming since each of these functions
returns an iterator pointing to a singular line.
3. Rename line() and rline() to BeginLineFrom() and RBeginLineFrom(), which
shall improve the readability.

MozReview-Commit-ID: txZjVnv9Yb
2016-10-22 19:41:05 +08:00
Jeremy Chen
a63dddda2b Bug 1286468 - Rename line related typedefs in nsBlockFrame. r=TYLin
MozReview-Commit-ID: Cz9R3D4NzMc
2016-10-22 19:41:04 +08:00
Xidorn Quan
5b6b80a5ac Bug 1304556 part 2 - Use AutoLineCursorSetup to optimize pre-render innerText query. r=dbaron
MozReview-Commit-ID: G0I4MPSeV38
2016-10-21 11:53:12 +11:00
Cameron McCormack
7e89cd1f28 Bug 1298774 - Part 5: Make nsStyleSVGPaint use css::URLValue for url() storage instead of FragmentOrURL. r=cjku
MozReview-Commit-ID: CkNcSxVToTL
2016-10-11 14:56:11 +08:00
Carsten "Tomcat" Book
bbac27f90e Merge mozilla-central to mozilla-inbound 2016-10-06 12:28:03 +02:00
Sumit Tiwari
b8edbb100a Remove mMappedFlows from TextRunData - bug 1290312 r=emilio,xidorn
MozReview-Commit-ID: EQafEoyu43a
2016-10-03 20:30:50 -04:00
Jonathan Kew
7a3cd2abcc Bug 924851 - patch 1 - Move definition of nsBidiLevel/nsBidiDirection and frame bidi properties from nsBidi.h to nsIFrame.h, in preparation for removal of nsBidi. r=xidorn 2016-10-06 09:49:14 +01:00
Jeremy Chen
89bb1c2964 Bug 1307402 - use a more precise bounding box for initial letter texts. r=jfkthame
MozReview-Commit-ID: 5OIXp0uQisn
2016-10-04 22:22:52 +08:00
Xidorn Quan
0e32e46079 Bug 1266621 part 1 - Convert text-decoration-color to store complex color. r=heycam
MozReview-Commit-ID: LEGICgvgQDY
2016-09-27 20:19:48 +10:00
Daniel Holbert
e14eb670ea Bug 1304540 part 2: Use nsCOMPtr/RefPtr (and their forget() API) instead of manual NS_ADDREF macros, in a few files within layout. r=mats
MozReview-Commit-ID: SrJNtbwc1B
2016-09-21 15:41:26 -07:00
Daniel Holbert
db2f6f5ff0 Bug 1304540 part 1: minor code-cleanup in the neighborhood of some NS_ADDREF usages. r=mats
DETAILS ON THE CLEANUP:

* In nsFrameTraversal.cpp:
 - Whitespace fix.
 - Remove a useless nullptr assignment.
 - Use "=" to initialize a nsCOMPtr, per coding style guideline ("initialize variables with nsFoo aFoo = bFoo and not nsFoo aFoo(bFoo)").

* In nsPresShell.cpp:
 - Wrap a longish assignment to 2 lines (since next patch will make the first line longer, which would push the whole thing over 80 characters if it weren't wrapped).
 - Add braces around "if" body.

* In nsTextFrame.cpp:
 - Remove a useless nullptr assignment.
 - Move the "metrics->GetThebesFontGroup()" call slightly earlier, so it happens *before* we've implicitly transferred ownership the object pointed to by "metrics".
 - Add a code-comment.

MozReview-Commit-ID: LG6vgOmM9MK
2016-09-21 15:39:48 -07:00
Xidorn Quan
dcfa696ded Bug 1299741 part 11 - Change text-{emphasis,fill,stroke}-color to using StyleComplexColor. r=dbaron
MozReview-Commit-ID: 1MlgGAkdPn8
2016-09-16 14:40:45 +10:00