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

'text-align' of inline flow should be determined by containing block's style #222

Closed
burg opened this issue Nov 21, 2012 · 0 comments
Closed

Comments

@burg
Copy link

@burg burg commented Nov 21, 2012

Currently, we just look at the style of the first block of each line to determine that line's text alignment.

dhedlund added a commit to dhedlund/servo that referenced this issue Dec 7, 2013
dhedlund added a commit to dhedlund/servo that referenced this issue Dec 7, 2013
dhedlund added a commit to dhedlund/servo that referenced this issue Dec 9, 2013
bors-servo pushed a commit that referenced this issue Dec 13, 2013
Fixes #222.

Implements 'text-align' inheritance for inline elements.  The text alignment code has been changed a couple of times since the ticket was originally opened and was improved to inherit the text-align property from from an ancestor element.  This addressed the issue, so long as no inline elements had a text-align property defined.  Both Firefox and Chromium ignore any text-align properties attached to inline elements, but none of the specs are explicit about ignoring the property or inheriting only from non-inline elements:
http://www.w3.org/TR/CSS2/visuren.html#inline-formatting
http://www.w3.org/TR/CSS2/text.html#propdef-text-align

This is my first stab at writing any code that touches the DOM node tree.  Based on a few observations, I made the assumption that the `self.base.node` of a InlineFlow always corresponds to a BlockFlow-based node, no matter how deep inline DOM elements are nested; there was no obvious way to traverse Flow-traited objects directly and I'm not sure if it's possible to get from a FlowData struct back to a non-child {Block,Inline}Flow (probably intentionally).

I could've kept traversing the node tree directly, checking against each node style to ensure it didn't have an inline display property, but I could not create a scenario where the `base.node` was ever an inline.  It also feels like a code smell to be walking up the tree at all, especially for stylesheet properties.  Feels like it should eventually be handled in style::properties directly as being conditional inherited?
therealglazou added a commit to therealglazou/servo that referenced this issue Feb 20, 2014
glennw pushed a commit to glennw/servo that referenced this issue Jan 16, 2017
Flatten the WebRender API to allow us to use shared memory to transfer display lists.

Improves performance significantly.

r? @glennw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.