Xidorn Quan
fe470c1653
Bug 1309868 part 3 - Make NonOwningStyleContextSource store const ServoComputedValues. r=heycam
...
MozReview-Commit-ID: G84fYXLbQyt
--HG--
extra : source : 85ba0fdfc05ec11dd08eba5a1b1f6a9d7e8acd8f
2016-10-18 15:29:03 +11:00
Xidorn Quan
2f49a48a09
Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
...
This commit is generated by the following commands with some minor
manual adjustment:
find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
-e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
-e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
-e 's/StyleSheetHandle()/nullptr/g' \
-e 's/->AsStyleSheet()//g' \
-e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp
MozReview-Commit-ID: 7abdvlKHukd
--HG--
extra : source : e5682242db07203b5a91810fe1e243c955310588
2016-09-26 22:03:25 +10:00
Manish Goregaokar
aad318e17a
Bug 1300337
- Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
...
MozReview-Commit-ID: CxHzbEzjLxT
--HG--
extra : rebase_source : 232f90b8b107f7fb49f47a29a4e493660b8a7d87
2016-09-04 00:16:58 +05:30
Emilio Cobos Álvarez
619cb14d87
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
Ryan VanderMeulen
f2ae8f9bce
Merge m-c to autoland. a=merge
2016-08-31 22:34:02 -04:00
Emilio Cobos Álvarez
31bcff5fe1
Bug 1299396: Don't style content that is not an element or a text node in ServoStyleSet::StyleNewSubtree. r=bholley
...
MozReview-Commit-ID: KmcYPFqt48W
--HG--
extra : rebase_source : 0aff142b7522e853a8948820cd2c88d84afe5fb8
2016-08-31 14:33:46 -07:00
Bobby Holley
ff780d017f
Bug 1299348 - Remove StylingStarted(). r=emilio
...
StylingStarted is a kind of nebulous and not-very-useful concept. The concept
that _is_ useful is whether the presshell has been initialized or not, but the
root element may not exist at that point.
So we need to make sure we that we can trigger the initial document style in both
presshell initialized _and_ ContentInserted, which has the nice effect of handling
root element reinsertions.
We also take the opportunity to make StyleDocument assert the existence of a root
element, and align the responsibility for clearing the dirty descendant bits between
document and non-document nodes.
2016-08-31 10:32:42 -07:00
Emilio Cobos Álvarez
ec1d8b030d
Bug 1292280: Force a full document restyle on ServoStyleSet::StartStyling. r=bholley
...
Some things like nsDocumentViewer::SetPageMode recreate the presShell, so we
can't rely on the flags being correctly set always.
MozReview-Commit-ID: 4bxNjXGBaJt
--HG--
extra : rebase_source : f40ddb64d261778be2fd051503f7d2747f0c80e8
2016-08-25 13:36:51 -07:00
Bobby Holley
0453dfa721
Bug 1292662 - Use accessors to unset stylo dirty bits. r=heycam
...
I often find myself wanting to hook them for logging etc, and this makes the
API symmetric with the setters.
2016-08-25 21:36:57 -07:00
Bobby Holley
95e95fe501
Bug 1292662 - Use StyleChildrenIterator in ServoRestyleManger and ServoStyleSet. r=heycam
...
Most importantly, this causes us to traverse NAC during style context fixup.
2016-08-25 21:36:51 -07:00
Bobby Holley
263669837b
Bug 1292279 - Clear up the semantics of our Servo traversal APIs. r=heycam
2016-08-25 21:34:31 -07:00
Xidorn Quan
611f544c5d
Bug 1296173
part 2 - Rename the servo binding functions. r=bholley
...
MozReview-Commit-ID: Gxqx52v3sDQ
--HG--
extra : rebase_source : 98fdf4a1463680b629c4986df2b2b9c3b306c64e
2016-08-23 13:14:27 +10:00
Xidorn Quan
22456d1070
Bug 1296173
part 1 - Change StyleSet manipulation functions to be prefixed by Servo_StyleSet_. r=bholley
...
MozReview-Commit-ID: C1PPJltyodE
--HG--
extra : rebase_source : 9aef052b0b41d52ec3dbd90baeec5f4067f03a26
2016-08-23 13:10:49 +10:00
Emilio Cobos Álvarez
c74f7fc2ae
Bug 1292618: followup: Use IsGeneratedContentContainerForBefore/After in ServoStyleSet. r=me
...
MozReview-Commit-ID: AU8YKQBvXX7
2016-08-22 10:42:18 -07:00
Emilio Cobos Álvarez
66f4488daf
Bug 1292618: Specialize ServoStyleSet::ResolveStyleForText to take into account generated nodes. r=heycam
...
Eventually, we might want to use the same mechanism that Gecko uses directly,
and stop styling text nodes from Servo.
This would have the benefit of removing the "stash the change on the parent"
thing.
MozReview-Commit-ID: IOxNR05jkh
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-08-19 20:24:28 -07:00
Emilio Cobos Álvarez
e7bc43ddc7
Bug 1292618: Support basic pseudo-element restyling. r=heycam
...
:before and :after only, for now.
MozReview-Commit-ID: 9hLFvVhqIrN
2016-08-19 20:24:27 -07:00
Wes Kocher
02f300c352
Backed out 4 changesets (bug 1292618) because it was making merging things difficult a=backout
...
Backed out changeset 14733a383b4c (bug 1292618)
Backed out changeset 17dfe8bc5f76 (bug 1292618)
Backed out changeset d04597bd1109 (bug 1292618)
Backed out changeset 30f7696fea2d (bug 1292618)
2016-08-19 18:37:09 -07:00
Emilio Cobos Álvarez
84de3367d5
Bug 1292618: Specialize ServoStyleSet::ResolveStyleForText to take into account generated nodes. r=heycam
...
Eventually, we might want to use the same mechanism that Gecko uses directly,
and stop styling text nodes from Servo.
This would have the benefit of removing the "stash the change on the parent"
thing.
MozReview-Commit-ID: IOxNR05jkh
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-08-19 18:26:38 -07:00
Emilio Cobos Álvarez
6ca7e9e4f1
Bug 1292618: Support basic pseudo-element restyling. r=heycam
...
:before and :after only, for now.
MozReview-Commit-ID: 9hLFvVhqIrN
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>
2016-08-19 18:26:38 -07:00
Phil Ringnalda
b4f23026ee
Backed out 5 changesets (bug 1292618) for !mImageTracked assertion failures
...
CLOSED TREE
Backed out changeset 1d767147e160 (bug 1292618)
Backed out changeset e6034e58efe4 (bug 1292618)
Backed out changeset 928dd363efa0 (bug 1292618)
Backed out changeset 8e274c66ae7f (bug 1292618)
Backed out changeset 6c347701d343 (bug 1292618)
2016-08-19 00:23:42 -07:00
Emilio Cobos Álvarez
cee263a02e
Bug 1292618: Specialize ServoStyleSet::ResolveStyleForText to take into account generated nodes. r=heycam
...
Eventually, we might want to use the same mechanism that Gecko uses directly,
and stop styling text nodes from Servo.
This would have the benefit of removing the "stash the change on the parent"
thing.
MozReview-Commit-ID: IOxNR05jkh
2016-08-18 22:16:17 -07:00
Emilio Cobos Álvarez
6614524248
Bug 1292618: Support basic pseudo-element restyling. r=heycam
...
:before and :after only, for now.
MozReview-Commit-ID: 9hLFvVhqIrN
2016-08-18 22:16:16 -07:00
Manish Goregaokar
f054dcd843
Bug 1275913 - Use already_addrefed properly when dealing with arcs sent from servo to gecko; r=bholley
...
MozReview-Commit-ID: 5FDS8J2Fo1G
--HG--
extra : rebase_source : d58c4a9ceeaa64c522bd25452d607e3593eab619
2016-08-16 10:38:46 +05:30
Phil Ringnalda
0ba1763460
Backed out 2 changesets (bug 1275913) for static analysis bustage
...
CLOSED TREE
Backed out changeset 4420244e8fba (bug 1275913)
Backed out changeset 324554b04f19 (bug 1275913)
2016-08-15 22:27:16 -07:00
Manish Goregaokar
3f96d89612
Bug 1275913 - Use already_addrefed properly when dealing with arcs sent from servo to gecko; r=bholley
...
MozReview-Commit-ID: 5FDS8J2Fo1G
--HG--
extra : rebase_source : ecbcb3c2eff5a390a24ab97f93899c87a463c791
2016-08-16 10:38:46 +05:30
Bobby Holley
c9097e6d3d
Bug 1291885 - Use dont_AddRef for already-addrefed ServoComputedValues. r=emilio
2016-08-03 18:31:02 -07:00
Bobby Holley
e20ac68912
Bug 1291891 - Implement ServoStyleSet::ReplaceSheets. r=emilio
2016-08-03 18:30:56 -07:00
Bobby Holley
3c38d97aa1
Bug 1291891 - Don't segfault on null parent context in ServoStyleSet::ResolveStyleForOtherNonElement. r=emilio
2016-08-03 18:30:54 -07:00
Emilio Cobos Álvarez
b2fc547e0a
Bug 1290335: Improve error message of the anonymous box assertion. r=heycam
...
MozReview-Commit-ID: 6cJSBz03Yji
2016-08-03 15:11:15 -07:00
Bobby Holley
6255cd0c72
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
64639661c1
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
Emilio Cobos Álvarez
042b18ee72
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
253dfd8aad
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
f526a25d70
Bug 1286445: Stub out HasStateDependentStyle. r=heycam
...
MozReview-Commit-ID: CbHfVNHFVS3
2016-07-16 16:22:12 -07:00
Emilio Cobos Álvarez
1a49c35a07
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
Cameron McCormack
daeb3ff4dd
Bug 1275452 - Part 4: Remove anonymous content styling hack in ServoStyleSet. r=bholley
...
--HG--
extra : rebase_source : ef6ace49a67f19d7a16815b85efe18faebf69b79
2016-05-25 16:55:50 +10:00
Cameron McCormack
4e94a3cb48
Bug 1275452 - Part 1: Add Servo_RestyleSubtree for eagerly restyling a subtree of a document. r=bholley
...
--HG--
extra : rebase_source : add50774bc74cc2651b057e5a9518cf2b8b0bb12
2016-05-25 16:55:49 +10:00
Bobby Holley
bedd733071
Bug 1270956 - Convert CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE assertion into a warning. r=me
2016-05-06 14:19:57 -07:00
Cameron McCormack
1bc38c297a
Bug 1268759 - Make ServoStyleSet handle anonymous content incorrectly but without crashing. r=bholley
2016-05-06 14:19:57 -07:00
Cameron McCormack
0e7490d676
Bug 1270741 - Correctly resolve styles for non-elements. r=bholley
2016-05-06 00:32:00 +02:00
Cameron McCormack
e0e0348a4f
Bug 1270374 - Create style context with correct pseudo tag in ServoStyleSet::ResolveAnonymousBoxStyle. r=bholley
2016-05-04 22:33:00 -04:00
Bobby Holley
ef87858910
Bug 1268748 - Implement {Resolve,Probe}PseudoElementStyle. r=heycam
2016-04-29 19:21:48 -07:00
Cameron McCormack
d222b3159d
Bug 1268404 - Part 2: Implement ServoStyleSet::ResolveStyleForText. r=bholley
2016-04-29 14:04:16 +10:00
Cameron McCormack
3aadcf811c
Bug 1268404 - Part 1: Split out ResolveStyleForText from ResolveStyleForNonElement and pass in the text node. r=bholley
2016-04-29 14:01:44 +10:00
Cameron McCormack
022c4340ae
Bug 1268390 - Part 3: Add support for doc style sheets in ServoStyleSet. r=bholley
2016-04-29 14:01:44 +10:00
Bobby Holley
70f077146d
Bug 1267833 - Pass the RawServoStyleSet to Servo_GetComputedValuesForAnonymousBox. r=heycam
2016-04-26 23:39:44 -07:00
Cameron McCormack
90c9880ccc
Bug 1267564 - Implement a couple of Servo-backed style object methods. r=bholley
2016-04-27 12:34:49 +10:00
Xidorn Quan
d5599a3104
Bug 1097499 part 3 - Add a separate anonbox for text nodes. r=heycam
...
MozReview-Commit-ID: 1GfoFEGhyka
--HG--
extra : source : 38b806fd0fa54934439db0de75600def43142272
2016-04-22 09:18:41 +10:00
Bobby Holley
3831864b3d
Bug 1260310 - Create servo style contexts from ServoStyleSet. r=heycam
2016-03-29 22:16:38 -07:00
Bobby Holley
5c409b2ed2
Bug 1251496 - Forward stylesheet management to RawServoStyleSet. r=heycam
2016-02-28 00:25:34 -08:00