Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement asymmetric border colors #689

Merged
merged 4 commits into from Aug 20, 2013
Merged

Conversation

@sammykim
Copy link
Contributor

sammykim commented Aug 8, 2013

No description provided.

@metajack
Copy link
Contributor

metajack commented Aug 8, 2013

This is great. I have two suggestions:

  1. Use SideOffsets2D instead. I realize the name isn't perfect, but we can change the name later.
  2. Add a new constructor for SideOffsets2D called new_all_same() and refactor the calls to ::new(x, x, x, x) that exist now.
@@ -7,6 +7,13 @@ use AzColor = azure::azure_hl::Color;

pub type Color = AzColor;

pub struct Colors{

This comment has been minimized.

Copy link
@sanxiyn

sanxiyn Aug 8, 2013

Contributor

A space before the brace.

@@ -14,7 +14,7 @@
/// They are therefore not exactly analogous to constructs like Skia pictures, which consist of
/// low-level drawing primitives.

use color::Color;
use color::{Color,Colors};

This comment has been minimized.

Copy link
@sanxiyn

sanxiyn Aug 8, 2013

Contributor

A space after the comma.

@@ -640,7 +641,12 @@ impl RenderBox {
extra: ExtraDisplayListData::new(*self),
},
border: debug_border,
color: rgb(0, 0, 200).to_gfx_color(),

This comment has been minimized.

Copy link
@sanxiyn

sanxiyn Aug 8, 2013

Contributor

I think you want debug_color local variable just like debug_border.

This comment has been minimized.

Copy link
@sammykim

sammykim Aug 8, 2013

Author Contributor

I can't merge them to debug_color as same as debug_border.
Becuase their values are not same.

@@ -907,6 +924,9 @@ impl RenderBox {

// FIXME: all colors set to top color. this is obviously not right.

This comment has been minimized.

Copy link
@sanxiyn

sanxiyn Aug 8, 2013

Contributor

Delete this comment.

@@ -907,6 +924,9 @@ impl RenderBox {

// FIXME: all colors set to top color. this is obviously not right.
let top_color = self.style().border_top_color();
let bottom_color = self.style().border_bottom_color();
let left_color = self.style().border_left_color();
let right_color = self.style().border_right_color();
let color = top_color.to_gfx_color();

This comment has been minimized.

Copy link
@sanxiyn

sanxiyn Aug 8, 2013

Contributor

Unused?

@sammykim
Copy link
Contributor Author

sammykim commented Aug 8, 2013

@metajack I tried to use SideOffsets2D<Color>, but the compiler complains that Color does not implement Num.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 8, 2013

I sent servo/euclid#12.

@metajack
Copy link
Contributor

metajack commented Aug 8, 2013

servo/euclid#12 is now merged so you can finish the conversion.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 9, 2013

To implement new_all_same, the type needs to implement Clone, so that requires another submodule changes. :(

Please be patient, since I will be on a vacation in the next week.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 19, 2013

@metajack
Copy link
Contributor

metajack commented Aug 19, 2013

Those are both merged. You can now update this PR.

@sammykim
Copy link
Contributor Author

sammykim commented Aug 20, 2013

@metajack

This comment has been minimized.

Copy link

metajack commented on 858cd07 Aug 20, 2013

r+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented on 858cd07 Aug 20, 2013

saw approval from metajack
at sammykim@858cd07

This comment has been minimized.

Copy link
Contributor

bors-servo replied Aug 20, 2013

merging sammykim/servo/Border-Color = 858cd07 into auto

This comment has been minimized.

Copy link
Contributor

bors-servo replied Aug 20, 2013

sammykim/servo/Border-Color = 858cd07 merged ok, testing candidate = e86b8e1

This comment has been minimized.

Copy link
Contributor

bors-servo replied Aug 20, 2013

fast-forwarding master to auto = e86b8e1

@bors-servo bors-servo merged commit 858cd07 into servo:master Aug 20, 2013
1 check passed
1 check passed
default all tests passed
ChrisParis pushed a commit to ChrisParis/servo that referenced this pull request Sep 7, 2014
Test the steps for pausing a media element when removing from a document
glennw pushed a commit to glennw/servo that referenced this pull request Jan 16, 2017
wrench: Cleanup unstride()

This switches to using an iterator and factors out the saving.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/689)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.