Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd bindings for nsCSSShadowArray, use for text-shadow and box-shadow #13086
+172
−8
Conversation
highfive
commented
Aug 28, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Aug 28, 2016
|
r? @bholley |
| pub mLength: u32, | ||
| pub mArray: [nsCSSShadowItem; 1usize], | ||
| } | ||
| #[test] | ||
| fn bindgen_test_layout_nsCSSShadowArray() { | ||
| assert_eq!(::std::mem::size_of::<nsCSSShadowArray>() , 48usize); | ||
| assert_eq!(::std::mem::size_of::<nsCSSShadowArray>() , 40usize); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| if !self.mRawPtr.is_null() { | ||
| Gecko_ReleaseCSSShadowArrayArbitraryThread(self.mRawPtr); | ||
| } | ||
| if len == 0 { |
This comment has been minimized.
This comment has been minimized.
emilio
Aug 28, 2016
•
Member
nit: This probably looks cleaner like:
self.mRawPtr = if len == 0 {
ptr::null_mut()
} else {
Gecko_Construct_...
};| } | ||
|
|
||
| impl Deref for RefPtr<nsCSSShadowArray> { | ||
| type Target = [nsCSSShadowItem]; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
|
||
| use bindings::Gecko_Construct_CSSShadowArray; |
This comment has been minimized.
This comment has been minimized.
| &[] | ||
| } else { | ||
| unsafe { | ||
| slice::from_raw_parts(&(*self.mRawPtr).mArray[0] as *const _, |
This comment has been minimized.
This comment has been minimized.
| &mut [] | ||
| } else { | ||
| unsafe { | ||
| slice::from_raw_parts_mut(&mut (*self.mRawPtr).mArray[0] as *mut _, |
This comment has been minimized.
This comment has been minimized.
|
r=me when this is ready. |
| self.mRawPtr = other.mRawPtr; | ||
| } | ||
| } | ||
| } |
This comment has been minimized.
This comment has been minimized.
8157288
to
85332d5
|
@bors-servo r=emilio |
|
|
bors-servo
added a commit
that referenced
this pull request
Aug 30, 2016
Add bindings for nsCSSShadowArray, use for text-shadow and box-shadow <!-- 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/13086) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.

Manishearth commentedAug 28, 2016
•
edited by larsbergstrom
This change is