Commit Graph

910 Commits

Author SHA1 Message Date
Wes Kocher
14ee8c57e9 Backed out changeset 9b715399e585 (bug 1310123) for build failures a=backout CLOSED TREE 2016-10-25 16:54:45 -07:00
Xidorn Quan
145fe0f429 Bug 1310123 - Move values of static constants in nsStyleStruct to the header. r=mats
MozReview-Commit-ID: J5Fp0iAEnkg
2016-10-25 17:25:10 +11:00
Xidorn Quan
95be7d0621 Bug 1311598 part 4 - Split binding types from ServoBindings.h into ServoBindingTypes, and merge ServoBindingHelpers into it. r=heycam
MozReview-Commit-ID: CKvBMOapqlI
2016-10-24 20:16:46 +11:00
Adam Velebil
2c22de0ff7 Bug 1312173 - Convert NS_STYLE_USER_INPUT_* to an enum class; r=manishearth,xidorn
MozReview-Commit-ID: sYiJrZryrA
2016-10-23 00:08:18 +02:00
Manish Goregaokar
f35d90e274 Bug 1311959 - Remove marker-offset; r=tromey,xidorn
MozReview-Commit-ID: 72Fse0z1BiY
2016-10-21 15:34:46 +05:30
Brad Werth
1148c21217 Bug 1304012 -- Part 2: Rename nsStyleStruct Computed**Self functions to Used**Self. r=dholbert
MozReview-Commit-ID: FCBuT2Z7sy6
2016-09-30 09:15:57 -07:00
Brad Werth
9c1fa6d6bd Bug 1304012 -- Part 1: Don't bother resolving align-self/justify-self 'auto' value for getComputedStyle & inheritance. r=dholbert
MozReview-Commit-ID: 8LMn8oQhUz8
2016-09-27 14:45:51 -07:00
Carsten "Tomcat" Book
8ec316a2dc merge mozilla-inbound to mozilla-central a=merge 2016-09-30 12:02:16 +02:00
Xidorn Quan
1cfc0298d4 Bug 1266621 part 5 - Convert border-color to store complex color. r=heycam
MozReview-Commit-ID: 19sl9f3EVgt
2016-09-27 20:16:35 +10:00
Xidorn Quan
793cd1a575 Bug 1266621 part 3 - Convert outline-color to store complex color. r=heycam
MozReview-Commit-ID: 70tre2pYqi3
2016-09-27 20:44:19 +10:00
Xidorn Quan
af621198c0 Bug 1266621 part 2 - Convert column-rule-color to store complex color. r=heycam
MozReview-Commit-ID: AB2b5CPABOZ
2016-09-27 20:12:08 +10: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
Cameron McCormack
46699975f3 Bug 1305376 - Use nsTArray for cursor image list storage. r=xidorn
MozReview-Commit-ID: 2uRGInQmNYU
2016-09-29 10:55:55 +08:00
L. David Baron
782a7e5b57 Bug 1301500 - Separate change hint for adding/removing transform from UpdateContainingBlock. r=heycam
MozReview-Commit-ID: FwEQDA327EI
2016-09-29 14:15:32 -07:00
Iris Hsiao
a28f0ee740 merge mozilla-inbound to mozilla-central a=merge 2016-09-26 18:34:20 +08:00
cku
b4e17130be Bug 1304437 - Part 1. Return nsChangeHint_UpdateEffects when the length of the mask-image property has changed. r=heycam
MozReview-Commit-ID: 8ETx873Atu7
2016-09-22 18:24:52 +08:00
Cameron McCormack
4c081b683c Bug 1304632 - Part 2: Remove unnecessary nsStyleImage::mImage null checking. r=bholley
nsStyleImage::mImage is always set to a non-null object when its mType
is eStyleImageType_Image, so let's just assert that and stop null
checking in that case.

MozReview-Commit-ID: 2ect4coV0LV
2016-08-15 09:57:13 +08: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
Xidorn Quan
82f3304a21 Bug 1299741 part 4 - Add StyleComplexColor type for storing color combining numeric color and currentcolor. r=dbaron
MozReview-Commit-ID: I6DaSaMCgtH
2016-09-02 14:58:10 +10:00
Manish Goregaokar
49b3b83008 Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT
2016-09-04 00:16:58 +05:30
Jeremy Chen
351de41d83 Bug 1297306 - part6:replace NS_STYLE_CLEAR_* with StyleClear enum class. r=xidorn
After using enum class, a switch-case warning in CombineBreakType is caught.
This is one of such kind safty checks that we would like to gain.
Fix it by adding default case for switch-case in CombineBreakType.

MozReview-Commit-ID: BdS3LPN6qzX
2016-09-07 10:20:17 +08:00
Bobby Holley
ace7380088 Bug 1304913 - Have Servo manage node data directly without FFI calls. r=Manishearth
MozReview-Commit-ID: H8f8VP18TbM
2016-09-23 15:58:48 -07: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
Manish Goregaokar
af1754e665 Bug 1298655 - Add bindings for constructing nsCSSShadowArray; r=bholley
MozReview-Commit-ID: IFaQwuhsKqH
2016-08-28 10:11:17 +05:30
L. David Baron
17e28093c9 Bug 1251075 - Split out the parts of nsStyleDisplay::Is{Abs,Fixed}PosContainingBlock that don't depend on the frame. r=bz
The fact that HasTransform() depends on the frame requires the *Internal
functions rather than simply having the public function that takes a
frame call the public function that takes a style context.

MozReview-Commit-ID: CcWZjDTIr52
2016-08-29 11:43:29 -07:00
Wes Kocher
e079662c3f Merge inbound to central, a=merge 2016-08-26 16:20:50 -07:00
Ryan VanderMeulen
0e4c1b03d5 Merge m-c to inbound. a=merge 2016-08-26 09:39:29 -04:00
Mats Palmgren
177cccc127 Bug 1281320 - [css-grid] Implement 'fit-content([ <length> | <percentage> ])' value for <track-size>. r=dholbert 2016-08-26 15:16:57 +02:00
tlin@mozilla.com
ac64370cdb Bug 1295084 Part 4 - Rename Position::PositionCoord to Position::Coord. r=dholbert 2016-08-25 09:59:51 +00:00
tlin@mozilla.com
299b487db0 Bug 1295084 Part 3 - Move nsStyleImageLayers::Position to mozilla::Position. r=dholbert 2016-08-25 09:59:51 +00:00
tlin@mozilla.com
b6b81459fc Bug 1295084 Part 2 - Move two Position methods into nsStyleImageLayers. r=dholbert 2016-08-25 09:59:51 +00:00
tlin@mozilla.com
67549f401c Bug 1295084 Part 1 - Move FragmentOrURL into mozilla namespace. r=dholbert 2016-08-25 09:59:51 +00:00
Ravi Shankar
27b0e2b9f2 Bug 1297982 - Replace NS_STYLE_BOX_ORIENT_* with enum class; r=xidorn
MozReview-Commit-ID: GC0VRyHUM4V
2016-08-26 12:48:41 +05:30
Ravi Shankar
26db0836fe Bug 1297982 - Replace NS_STYLE_BOX_DIRECTION_* with enum class; r=xidorn
MozReview-Commit-ID: H6Mr73864O2
2016-08-26 12:47:09 +05:30
Ravi Shankar
181d48792f Bug 1297982 - Replace NS_STYLE_BOX_DECORATION_BREAK_* with enum class; r=xidorn
MozReview-Commit-ID: 9Cli68UpKdz
2016-08-26 12:44:32 +05:30
Ravi Shankar
49bd1a9b5f Bug 1297982 - Replace NS_STYLE_BOX_PACK_* with enum class; r=xidorn
MozReview-Commit-ID: Cx20hOJbmad
2016-08-26 12:41:54 +05:30
Ravi Shankar
8b54ac9176 Bug 1297982 - Replace NS_STYLE_BOX_ALIGN_* with enum class; r=xidorn
MozReview-Commit-ID: EO8hXmXooft
2016-08-26 12:39:19 +05:30
Xidorn Quan
b0b4dbe69c Bug 1200469 part 2 - Discard cursor image urgently. r=tnikkel
Given that script may change cursor image in a high frequency, and it
is usually small, it is probably better discarding it urgently.

MozReview-Commit-ID: J6tqIODXykg
2016-08-19 23:43:11 +10:00
Emilio Cobos Álvarez
85a8b5641a Bug 1292618: Tidy up nsStyleContent's API now allocations are infallible. r=heycam
MozReview-Commit-ID: BrHn4RiEWeg
2016-08-19 13:17:54 -07:00
Manish Goregaokar
5548288181 Bug 1295662 - stylo: Add bindings for StyleClipPath; r=heycam
MozReview-Commit-ID: E1ALXo7qd43
2016-08-15 21:18:11 +05:30
Manish Goregaokar
1e28f18cee Bug 1295662 - Document layout of nsStyleCorners and inset StyleBasicShape; r=heycam
MozReview-Commit-ID: DYwaSnLvWJK
2016-08-17 15:39:34 +05:30
Wes Kocher
bad19898b2 Merge inbound to central, a=merge 2016-08-17 16:38:41 -07:00
Nathan Froyd
f588788277 Bug 1295192 - part 2 - remove CPP_THROW_NEW from style struct type-safe operator new overloads; r=bholley
operator new overloads that declare that they don't throw exceptions
require a null check on their return value, per the C++ spec.  We know
that Servo isn't going to call these functions with null pointers, so
remove the CPP_THROW_NEW annotation and save ourselves some work.
2016-08-17 15:28:45 -04:00
Nathan Froyd
404078d785 Bug 1295192 - part 1 - remove CPP_THROW_NEW on layout struct operator new overloads that forward to nsPresShell::AllocateByObjectID; r=dholbert
Structs in our style system use an arena-style allocation system,
managed by the presshell to which they belong.  All of the relevant
overloads that forward allocation requests to the presshell declare
themselves as CPP_THROW_NEW, which indicates that they do not throw
exceptions.  The C++ specification states that operator new overloads
that declare themselves to not throw exceptions require a null check on
their return value.  However, the relevant presshell allocation method,
AllocateByObjectID, is infallible and will never return a null pointer.

The callers of all of these methods are therefore doing useless
(compiler-generated) null checks.  Let's get rid of those useless checks
by removing the CPP_THROW_NEW annotations.  This change declares these
methods will return non-null pointers and throw exceptions in case of
errors--but as we don't use exceptions, and AllocateByObjectID will
abort on OOM, everything works out OK.
2016-08-17 15:28:45 -04:00
Jonathan Chan
e201b93c16 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA
2016-08-16 18:37:48 -07:00
Gregory Szorc
3bcd02ebea Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE
2016-08-16 17:50:40 -07:00
Wes Kocher
bb9e0744e6 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change
2016-08-16 17:05:30 -07:00
Wes Kocher
63041461e3 Backed out 4 changesets (bug 1295192) for being a possible cause of crashtest assertions CLOSED TREE
Backed out changeset 7f10779fe019 (bug 1295192)
Backed out changeset e683dce4197a (bug 1295192)
Backed out changeset 67d12eaa8074 (bug 1295192)
Backed out changeset 44f143a01f78 (bug 1295192)
2016-08-16 11:22:04 -07:00
Manish Goregaokar
1a43d137cb Bug 1295177 - Convert STYLE_FILL_RULE_* to an enum class; r=xidorn
MozReview-Commit-ID: HnNFNyD4oVJ
2016-08-15 21:47:04 +05:30
Nathan Froyd
017edbc353 Bug 1295192 - part 2 - remove CPP_THROW_NEW from style struct type-safe operator new overloads; r=bholley
operator new overloads that declare that they don't throw exceptions
require a null check on their return value, per the C++ spec.  We know
that Servo isn't going to call these functions with null pointers, so
remove the CPP_THROW_NEW annotation and save ourselves some work.
2016-08-16 17:05:38 -04:00