[webkit-reviews] review granted: [Bug 47841] Rework baselinePosition and lineHeight to be writing-mode-aware. : [Attachment 71067] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Oct 18 12:21:54 PDT 2010
mitz at webkit.org has granted Dave Hyatt <hyatt at apple.com>'s request for review:
Bug 47841: Rework baselinePosition and lineHeight to be writing-mode-aware.
https://bugs.webkit.org/show_bug.cgi?id=47841
Attachment 71067: Patch
https://bugs.webkit.org/attachment.cgi?id=71067&action=review
------- Additional Comments from mitz at webkit.org
View in context: https://bugs.webkit.org/attachment.cgi?id=71067&action=review
> WebCore/rendering/InlineBox.h:25
> #include "RenderBoxModelObject.h"
> +#include "RenderBR.h"
R comes before o.
> WebCore/rendering/RenderBlock.cpp:5139
> + bool ignoreBaseline = (layer() && (layer()->marquee() || (direction
== HorizontalLine ? (layer()->verticalScrollbar() || layer()->scrollYOffset()
!= 0)
> + : (layer()->horizontalScrollbar() || layer()->scrollXOffset() !=
0)))) || isWritingModeRoot();
> + int baselinePos = ignoreBaseline ? -1 : lastLineBoxBaseline();
> +
> + int bottomOfContent = direction == HorizontalLine ? borderTop() +
paddingTop() + contentHeight() : borderRight() + paddingRight() +
contentWidth();
> + if (baselinePos != -1 && baselinePos <= bottomOfContent)
> + return direction == HorizontalLine ? marginTop() + baselinePos :
marginRight() + baselinePos;
> +
> + return RenderBox::baselinePosition(firstLine, direction,
linePositionMode);
I think you can easily get rid of the -1 and just use the boolean.
> WebCore/rendering/RenderBlock.cpp:5179
> + const Font& f = style(true)->font();
I prefer firstLineStyle() here, so people don’t have to guess what 'true'
means.
> WebCore/rendering/RenderBlock.cpp:5196
> + const Font& f = style(true)->font();
Ditto
> WebCore/rendering/RenderSlider.cpp:158
> +int RenderSlider::baselinePosition(bool /*firstLine*/, LineDirectionMode
/*direction*/, LinePositionMode /*linePositionMode*/) const
Don’t need the 2nd and 3rd commented-out parameter names.
More information about the webkit-reviews
mailing list