diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-12-10 01:16:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-10 01:16:26 -0800 |
commit | 6dd4b4822fa788694153ee61a04dd9a5dfb748ec (patch) | |
tree | 7067984403c44dc3b0d1f95a6cf1616e8a4e8965 /components/script_layout_interface | |
parent | b9a8ccd775c3192e3810a1730b1d0bc2b5c9dfb6 (diff) | |
parent | 9856c617dfa1487ada2868b5b0520d86817e83fc (diff) | |
download | servo-6dd4b4822fa788694153ee61a04dd9a5dfb748ec.tar.gz servo-6dd4b4822fa788694153ee61a04dd9a5dfb748ec.zip |
Auto merge of #14535 - servo:property-id, r=mbrubeck
Introduce a PropertyId enum and use it instead of strings of property names
<!-- Please describe your changes on the following line: -->
* `LonghandId` and `ShorthandId` are C-like enums
* `Atom` is used for the name of custom properties.
* `PropertyDeclarationId` is the identifier for `PropertyDeclaration`,
after parsing and shorthand expansion. (Longhand or custom property.)
* `PropertyId` represents any CSS property, e.g. in CSSOM.
(Longhand, shorthand, or custom.)
CC @upsuper
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14535)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script_layout_interface')
-rw-r--r-- | components/script_layout_interface/message.rs | 4 | ||||
-rw-r--r-- | components/script_layout_interface/rpc.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs index 581adbb45bc..3d0e00c46cc 100644 --- a/components/script_layout_interface/message.rs +++ b/components/script_layout_interface/message.rs @@ -14,11 +14,11 @@ use profile_traits::mem::ReportsChan; use rpc::LayoutRPC; use script_traits::{ConstellationControlMsg, LayoutControlMsg}; use script_traits::{LayoutMsg as ConstellationMsg, StackingContextScrollState, WindowSizeData}; -use servo_atoms::Atom; use servo_url::ServoUrl; use std::sync::Arc; use std::sync::mpsc::{Receiver, Sender}; use style::context::ReflowGoal; +use style::properties::PropertyId; use style::selector_parser::PseudoElement; use style::stylesheets::Stylesheet; @@ -97,7 +97,7 @@ pub enum ReflowQueryType { NodeScrollRootIdQuery(TrustedNodeAddress), NodeGeometryQuery(TrustedNodeAddress), NodeScrollGeometryQuery(TrustedNodeAddress), - ResolvedStyleQuery(TrustedNodeAddress, Option<PseudoElement>, Atom), + ResolvedStyleQuery(TrustedNodeAddress, Option<PseudoElement>, PropertyId), OffsetParentQuery(TrustedNodeAddress), MarginStyleQuery(TrustedNodeAddress), } diff --git a/components/script_layout_interface/rpc.rs b/components/script_layout_interface/rpc.rs index 6e19b3f3bcf..7bc58dbf334 100644 --- a/components/script_layout_interface/rpc.rs +++ b/components/script_layout_interface/rpc.rs @@ -57,7 +57,7 @@ pub struct HitTestResponse { pub node_address: Option<UntrustedNodeAddress>, } -pub struct ResolvedStyleResponse(pub Option<String>); +pub struct ResolvedStyleResponse(pub String); #[derive(Clone)] pub struct OffsetParentResponse { |