Commit Graph

117 Commits

Author SHA1 Message Date
Bobby Holley
9edbeb583e Bug 1290214 - Remove NS_ERROR for {un,partially-}implemented ServoRestyleManager and ServoStyleSet methods. r=emilio
These are core methods that we know we need to implement, and I'm not worried that
we'll forget about them. The warnings should be enough here.
2016-07-28 17:25:53 -07:00
Bobby Holley
4730d97c3e Bug 1290214 - Make ServoRestyleManager::AttributeChanged a no-op. r=emilio
We do all the work we need to do with the snapshot model in AttributeWillChange.
2016-07-28 17:25:48 -07:00
Bobby Holley
20b26a1432 Bug 1289916 - Check tree dirtiness in ProcessPendingRestyles before triggering traversal. r=emilio
It's possible (and in fact, desirable) for the restyle hints to all evaluate
to 0, which means the tree stays clean even though the map was non-empty.
2016-07-27 18:20:18 -07:00
Bobby Holley
1c9c1d221f Bug 1289620 - Hook up initial styling. r=heycam
Aside from the parser-side hacks, this should subsume all the current scattered
logic in the stylo tree to handle initial styling.
2016-07-27 09:44:25 -07:00
Cameron McCormack
3cc2283166 Bug 1289620 - Stub out ReparentStyleContext. r=bholley 2016-07-27 09:41:50 -07:00
Emilio Cobos Álvarez
85da92ad01 Bug 1288873: stylo: Improve the error message when we don't handle a restyle hint. r=heycam
MozReview-Commit-ID: 3FCCCCF5gQS
2016-07-27 09:35:20 -07:00
Emilio Cobos Álvarez
df732f119d Bug 1288873: Don't propagate the IS_DIRTY flag down the whole tree, just make it
imply that all descendants are dirty. r=heycam

We're probably going to be a lot more smarter than this in the future, but since
there is work in progress to figure out how should we avoid running
selector-matching on the elements, this helps a lot with perf in the meantime.

MozReview-Commit-ID: CEb15JwHAdH
2016-07-27 09:35:20 -07:00
Emilio Cobos Álvarez
4c885f5fce Bug 1287951: stylo: Implement ServoRestyleManager::AttributeWillChange. r=heycam
MozReview-Commit-ID: 5CCleWo06Ow
2016-07-21 16:57:52 -07:00
Emilio Cobos Álvarez
029cda8ee4 Bug 1287951: stylo: Add support for computing style hints from Servo. r=heycam
MozReview-Commit-ID: ALuJxcfAMuL
2016-07-21 16:57:52 -07:00
Emilio Cobos Álvarez
6d49d6c409 Bug 1287542: stylo: Actually post a restyle event to the restyle manager on content state change. r=bholley
This was somehow a leftover from Bug 1286445.

MozReview-Commit-ID: 1bGKsNvm1qn
2016-07-18 11:28:57 -07:00
Emilio Cobos Álvarez
f702c2acc1 Bug 1287542: stylo: Implement ServoRestyleManager::HasPendingRestyles() r=bholley
MozReview-Commit-ID: JeDly0eqjka
2016-07-18 11:28:27 -07:00
Emilio Cobos Álvarez
03dcde9d5c Bug 1286445: stylo: Unset restyle frames appropriately after regenerating style contexts. r=heycam
MozReview-Commit-ID: IgG4KOESJUY
2016-07-16 16:22:12 -07:00
Emilio Cobos Álvarez
95dc632f01 Bug 1286445: stylo: Support restyles of non-pseudo content on state change. r=heycam
This includes, for example :hover.

Also removes the call to IsStyledByServo() in the document constructor, it's not
only unnecessary, but also we call UpdateStyleBackendType() too early.

MozReview-Commit-ID: 4YfCdmLoSxu
2016-07-16 16:22:12 -07:00
Emilio Cobos Álvarez
d3a2ca57e6 Bug 1285474: Add mozilla::RestyleManagerBase to share logic between RestyleManager and ServoRestyleManager. r=bholley
Partially implement some restyling APIs to take rid of some gecko-only code
paths.

MozReview-Commit-ID: L5i6Kr2Qars
2016-07-12 00:33:57 -07:00
Cameron McCormack
4d4e79b681 Bug 1270956 - Stub out some ServoRestyleManager methods. r=bholley 2016-05-06 14:19:57 -07:00
Cameron McCormack
09d16d0bfa Bug 1248864 - Part 2: Add skeleton ServoRestyleManager and a RestyleManagerHandle smart pointer. r=dholbert 2016-02-24 18:01:12 +11: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