[Webkit-unassigned] [Bug 93809] [CSS Regions] Setting region-break-after: always on a <br> element does not cause a region break
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jul 9 09:28:04 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=93809
--- Comment #10 from Manuel Rego Casasnovas <rego at igalia.com> 2013-07-09 09:30:05 PST ---
(In reply to comment #9)
> (In reply to comment #8)
> > It seems that the breaks only work for blocks and not for inline elements.
> >
>
> Yes, this is the definition of forced breaks: http://www.w3.org/TR/2012/WD-css3-break-20120823/#break-properties
Ok, thanks for the link.
> > On the other hand in order to fix the issue with <br> elements is enough with adding "content: "";" in the CSS (as in the attached example). Because of before/after pseudo-elements are not applied if they don't have content. This is not needed for <span> elements because of they always have a content (at least an empty string).
>
> I am confused about your mention of pseudo-elements. I see the fix with the content but i would rather see what it takes to fix it in the code. Probably such a fix would also fix for multicolumn element in this case.
Sorry for the comment about the pseudo-elements I read some information somewhere but I messed it up in my head.
Anyway, I've been taking a look to the code related with content, and why the <br> is considered a block when content is added. The reason is in the following method where style->hasContent() is checked:
RenderObject* HTMLBRElement::createRenderer(RenderArena* arena, RenderStyle* style)
{
if (style->hasContent())
return RenderObject::createObject(this, style);
return new (arena) RenderBR(this);
}
If it hasn't content, it always create a RenderBR which is a RenderText, which is always inline, so breaks won't work in <br> elements without content.
In order to change it we could add a new condition in this if. I'll provide an initial patch doing it to see if it's or not a valid approach.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list