[Webkit-unassigned] [Bug 9272] Left/Right borders/padding/margins are not always added correctly when rendering multiline inline boxes with bidi elements
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 29 09:44:37 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=9272
--- Comment #19 from Eric Seidel <eric at webkit.org> 2011-03-29 09:44:36 PST ---
(From update of attachment 87347)
View in context: https://bugs.webkit.org/attachment.cgi?id=87347&action=review
> Source/WebCore/rendering/InlineFlowBox.cpp:270
> + if (endObject && endObject->isText()) {
> + if (ltr) {
> + if (!nextLineBox()
> + && (((lastLine || !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer->parent())) && !inlineFlow->continuation())))
> + includeRightEdge = true;
> + } else {
> + if ((!prevLineBox() || prevLineBox()->isConstructed())
> + && (((lastLine || !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer->parent())) && !inlineFlow->continuation())))
> + includeLeftEdge = true;
> + }
> } else {
> - if ((!prevLineBox() || prevLineBox()->isConstructed()) &&
> - ((lastLine && !inlineFlow->continuation()) || prevOnLineExists() || onEndChain(endObject)))
> - includeLeftEdge = true;
> - }
> + if (ltr) {
> + if (!nextLineBox()
> + && ((lastLine || onEndChain(logicallyLastRunRenderer)) && !inlineFlow->continuation()))
> + includeRightEdge = true;
> + } else {
> + if ((!prevLineBox() || prevLineBox()->isConstructed())
> + && ((lastLine || onEndChain(logicallyLastRunRenderer)) && !inlineFlow->continuation()))
> + includeLeftEdge = true;
> + }
> + }
seems if we inverted this if most of hte duplicate code would go away.
it seems endObject && endObject->isText() controls whether we check onEndChain(logicallyLastRunRenderer) or !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer->parent())
Which we could do once and cache in a local variable.
Something like:
bool isLastObjectOnLine = (endObject && endObject->isText()) ? !isAnsectorAndWithinBlock(renderer(), logicallyLastRunRenderer->parent())) ? onEndChain(logicallyLastRunRenderer);
Right?
--
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