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

layout: Allow inline elements to be containing blocks for absolutely-positioned elements. #5911

Merged
merged 3 commits into from May 13, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

layout: Minor whitespace and formatting cleanups.

  • Loading branch information
pcwalton committed May 13, 2015
commit a299a2c71c39611af249d006bdd40db81cfb3979
@@ -240,6 +240,7 @@ pub struct StackingContext {

/// The position and size of this stacking context.
pub bounds: Rect<Au>,

/// The overflow rect for this stacking context in its coordinate system.
pub overflow: Rect<Au>,

@@ -665,7 +665,9 @@ impl<'a> FlowConstructor<'a> {
}
}

self.create_fragments_for_node_text_content(&mut initial_fragments, node, node.style());
self.create_fragments_for_node_text_content(&mut initial_fragments,
node,
node.style());
}

self.build_flow_for_block_starting_with_fragments(flow, node, initial_fragments)
@@ -1070,7 +1070,6 @@ impl FragmentDisplayListBuilding for Fragment {
display_list: Box<DisplayList>,
layer: Option<Arc<PaintLayer>>)
-> Arc<StackingContext> {

let border_box = self.stacking_relative_border_box(&base_flow.stacking_relative_position,
&base_flow.absolute_position_info
.relative_containing_block_size,
@@ -1408,7 +1407,6 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
ScrollPolicy::Scrollable
};


let transparent = color::transparent();
let stacking_context = self.fragment.create_stacking_context(
&self.base,
@@ -1501,10 +1501,11 @@ impl Flow for InlineFlow {
match fragment.specific {
SpecificFragmentInfo::InlineBlock(ref mut info) => {
flow::mut_base(&mut *info.flow_ref).clip = clip;

let block_flow = info.flow_ref.as_block();
block_flow.base.absolute_position_info = self.base.absolute_position_info;
block_flow.base.stacking_relative_position =
stacking_relative_border_box.origin;
stacking_relative_border_box.origin
}
SpecificFragmentInfo::InlineAbsoluteHypothetical(ref mut info) => {
flow::mut_base(&mut *info.flow_ref).clip = clip;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.