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

Support line-height in geckolib #11445

Merged
merged 3 commits into from Jun 1, 2016
Merged

Support line-height in geckolib #11445

merged 3 commits into from Jun 1, 2016

Conversation

@mbrubeck
Copy link
Contributor

mbrubeck commented May 26, 2016

r? @bholley


This change is Reviewable

@highfive
Copy link

highfive commented May 26, 2016

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/longhand/inherited_text.mako.rs
@highfive
Copy link

highfive commented May 26, 2016

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style code, but no tests are modified. Please consider adding a test!
@bholley
Copy link
Contributor

bholley commented May 26, 2016

I need to start culling stuff before PTO. @heycam can you review?

@mbrubeck
Copy link
Contributor Author

mbrubeck commented May 26, 2016

@bors-servo delegate=heycam

@bors-servo
Copy link
Contributor

bors-servo commented May 26, 2016

✌️ @heycam can now approve this pull request

@emilio
Copy link
Member

emilio commented May 28, 2016

r=me with that question answered/nit addressed if needed.

-S-awaiting-review +S-awaiting-answer

Previously, bors-servo wrote…

✌️ @heycam can now approve this pull request


Reviewed 3 of 3 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


components/style/properties/longhand/inherited_text.mako.rs, line 18 [r1] (raw file):

    pub enum SpecifiedValue {
        Normal,
        % if product == "gecko":

Well, I can't say I really like this, but I can't think of anything better without introducing yet another generic type around, so...


ports/geckolib/properties.mako.rs, line 741 [r1] (raw file):

    fn copy_line_height_from(&mut self, other: &Self) {
        debug_assert_unit_is_safe_to_copy(self.gecko.mLineHeight.mUnit);
        self.gecko.mLineHeight.mUnit = other.gecko.mLineHeight.mUnit;

Hum... can't you do self.gecko.mLineHeight = other.gecko.mLineHeight?

If you can't maybe this should be a good thing to factor out (though if it's just used here and you want to land it it's fine for me).


Comments from Reviewable

@highfive
Copy link

highfive commented May 31, 2016

New code was committed to pull request.

@mbrubeck
Copy link
Contributor Author

mbrubeck commented May 31, 2016

@bors-servo r=emilio

Hum... can't you do self.gecko.mLineHeight = other.gecko.mLineHeight?

If you can't maybe this should be a good thing to factor out (though if it's just used here and you want to land it it's fine for me).

We can't do that because nsStyleCoord isn't Copy. We can't just implement Copy or Clone and then reassign, because we also need to check whether it's refcounted. Long-term we can implement refcounting using Clone and Drop. For new I factored out the debug assertion into a new method.

@bors-servo
Copy link
Contributor

bors-servo commented May 31, 2016

📌 Commit cc4309d has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

Testing commit cc4309d with merge 8cc8395...

bors-servo added a commit that referenced this pull request Jun 1, 2016
Support line-height in geckolib

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11445)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

💔 Test failed - linux-rel

@highfive
Copy link

highfive commented Jun 1, 2016

  ▶ TIMEOUT [expected PASS] /css21_dev/html4/text-transform-capitalize-001.htm
  │ 
  │ Xlib:  extension &#34;XFree86-VidModeExtension&#34; missing on display &#34;:0&#34;.
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ thread &#39;Constellation&#39; panicked at &#39;Couldn&#39;t receive FontCacheThread reply: IoError(Error { repr: Os { code: 104, message: &#34;Connection reset by peer&#34; } })&#39;, ../src/libcore/result.rs:785
  │ stack backtrace:
  │    1:     0x7fad77d934e0 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:     0x7fad77d9b10b - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:     0x7fad77d9ad73 - std::panicking::default_hook::hc2c969e7453d080c
  │    4:     0x7fad77a17767 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::he2b22674ad1748f3
  │    5:     0x7fad77d810cc - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:     0x7fad77d9b351 - std::panicking::begin_panic::h4889569716505182
  │    7:     0x7fad77d82b2a - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:     0x7fad77d9b2ee - rust_begin_unwind
  │    9:     0x7fad77dd18ef - core::panicking::panic_fmt::h257ceb0aa351d801
  │   10:     0x7fad775fa193 - core::result::unwrap_failed::h1d94443d858a91df
  │   11:     0x7fad77620d7a - gfx::font_cache_thread::FontCacheThread::exit::h335f05e55068200a
  │   12:     0x7fad7626deea - _&lt;constellation..constellation..Constellation&lt;Message, LTF, STF&gt;&gt;::handle_request_from_compositor::h36aa44f58af516a2
  │   13:     0x7fad7625ae84 - _&lt;constellation..constellation..Constellation&lt;Message, LTF, STF&gt;&gt;::handle_request::hcce69aee4a14205a
  │   14:     0x7fad7624d76c - std::panicking::try::call::h22909ee1e8b98df9
  │   15:     0x7fad77da554b - __rust_try
  │   16:     0x7fad77da54ee - __rust_maybe_catch_panic
  │   17:     0x7fad7624eec5 - _&lt;F as alloc..boxed..FnBox&lt;A&gt;&gt;::call_box::h11cfda0b44685af6
  │   18:     0x7fad77d994f4 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   19:     0x7fad73c55181 - start_thread
  │   20:     0x7fad7376c47c - __clone
  └   21:                0x0 - &lt;unknown&gt;
@jdm
Copy link
Member

jdm commented Jun 1, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

Testing commit cc4309d with merge 6ef0423...

bors-servo added a commit that referenced this pull request Jun 1, 2016
Support line-height in geckolib

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11445)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

💔 Test failed - arm32

@emilio
Copy link
Member

emilio commented Jun 1, 2016

@bors-servo: retry

  • git
@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

Testing commit cc4309d with merge 8caa17a...

bors-servo added a commit that referenced this pull request Jun 1, 2016
Support line-height in geckolib

r? @bholley

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11445)
<!-- Reviewable:end -->
@emilio emilio mentioned this pull request Jun 1, 2016
3 of 3 tasks complete
@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

@bors-servo bors-servo merged commit cc4309d into servo:master Jun 1, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@mbrubeck mbrubeck deleted the mbrubeck:line-height branch May 2, 2017
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

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