-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
initial implement for inline background #1494
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/553 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
Do you mean background-color on elements with |
@SimonSapin yes. it is |
Doing inline backgrounds correctly and fast in anything but the solid-color case is slightly rocket-science because of block-in-inline splits and line-breaking... We should figure out how to do this well. |
// FIXME: This causes a lot of background colors to be displayed when they are clearly not | ||
// needed. We could use display list optimization to clean this up, but it still seems | ||
// inefficient. What we really want is something like "nearest ancestor element that | ||
// doesn't have a box". | ||
|
||
|
||
self.inline_info.with( |info| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of .with
, could you use .borrow()
and then .get()
? Like this:
let info = self.inline_info.borrow();
match info.get() {
&Some(ref box_info) => {
... etc ...
}
That way the code won't be smushed so far to the right.
initial implement for inline background it makes same result in "src/test/html/inline_bg_color_simple.html" with firefox
initial implement for inline background it makes same result in "src/test/html/inline_bg_color_simple.html" with firefox
initial implement for inline background
it makes same result in "src/test/html/inline_bg_color_simple.html" with firefox