First step at getting rid of anonymous blocks and continuations.
-Add RenderParagraph and display:paragraph. This is the only render type that's allowed to contain inlines or text. -If you put text nodes directly in a non-paragraph, wrap them in an anonymous paragraph. This may not be the place we want to end up, but it's a good stopgap to make it so we don't crash in this case. -Make StyleAdjuster force that non-paragraph blocks only contain RenderBlock subclasses and that paragraphs and inlines only contain inlines. -Considerably simplify addChildIgnoringAnonymousColumnBlocks now that we only create anonymous blocks for the case of text nodes in non-paragraphs. Also get rid of the behavior where we try to group multiple nodes into a single anonymous block. R=esprehn@chromium.org Review URL: https://codereview.chromium.org/729693003
This commit is contained in:
parent
2556b66620
commit
85817b24a0
@ -14,6 +14,7 @@
|
|||||||
color: #FFF;
|
color: #FFF;
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
padding: 4px 4px 4px 12px;
|
padding: 4px 4px 4px 12px;
|
||||||
|
display: paragraph;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div>{{ state }}</div>
|
<div>{{ state }}</div>
|
||||||
@ -35,6 +36,7 @@ SkyElement({
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 2px 4px 4px 12px;
|
padding: 2px 4px 4px 12px;
|
||||||
background-color: #DDD;
|
background-color: #DDD;
|
||||||
|
display: paragraph;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div>{{ letter }}</div>
|
<div>{{ letter }}</div>
|
||||||
@ -60,6 +62,10 @@ SkyElement({
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
display: paragraph;
|
||||||
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user