Commit Graph

1119 Commits

Author SHA1 Message Date
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
Jason Woofenden
908978aeb5 Bug 1008019 - Allow whitespace to "hang" at soft-wrap boundaries when white-space:pre-wrap is in effect. r=jfkthame 2016-03-20 17:54:00 -04:00
Xidorn Quan
1ada2b0d24 Bug 1260031 - Not force break before a block when calculating intrinsic width if the current line is empty and the block cannot intersect floats. r=dbaron
MozReview-Commit-ID: 9rNUDK5t5jg
2016-08-23 09:29:45 +10:00
Nicholas Nethercote
887efe04d5 Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.
2016-09-01 15:01:16 +10:00
Emilio Cobos Álvarez
2efcfaad38 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
The main renaming was generated with the following python script:

```

import sys
import re

CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")

def to_camel_case(ident):
  return re.sub(CAMEL_CASE_REGEX,
                lambda m: m.group(2) + m.group(3).lower(), ident)

def constant_to_enum(constant):
  return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")

def process_line(line):
  return re.sub(DISPLAY_REGEX,
                lambda m: constant_to_enum(m.group(1)), line)

lines = []
with open(sys.argv[1], "r") as f:
  for line in f:
    lines.append(process_line(line))

with open(sys.argv[1], "w") as f:
  for line in lines:
    f.write(line)
```

And the following shell commands:

```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```

MozReview-Commit-ID: 91xYCbLC2Vf
2016-09-01 20:41:17 -07:00
Sebastian Hengst
e81a3958f7 Backed out changeset 932c269da17b (bug 1008019) 2016-08-26 11:30:45 +02:00
Jason Woofenden
966ccaeb26 Bug 1008019 - Allow whitespace to "hang" at soft-wrap boundaries when white-space:pre-wrap is in effect. r=jfkthame 2016-03-20 17:54:00 -04:00
Jonathan Kew
ff0268019c Backed out changesets 4a7bb508cadf, e8917efd53e3, 2d87636d76b0 (bug 1008019) due to Android reftest orange. 2016-08-26 00:56:10 +01:00
Jason Woofenden
bef3b9fdf4 Bug 1008019 - Allow whitespace to "hang" at soft-wrap boundaries when white-space:pre-wrap is in effect. r=jfkthame 2016-03-20 17:54:00 -04:00
Jinank Jain
b875b54a4e Bug 712936 - Convert users of PR_STATIC_ASSERT to C++11 static_assert(). r=Ms2ger 2016-08-23 11:24:54 -04:00