https://bugs.webkit.org/show_bug.cgi?id=47841
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Oct 2010 18:38:14 +0000 (18:38 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Oct 2010 18:38:14 +0000 (18:38 +0000)
commitf438e9302a54c4ad6aca80f140da10ce8821d339
tree9500c173418ea5721108d35af67d0e2aa21d12f9
parentcd980b26a66203fa32c270977e55bd62d053ac67
https://bugs.webkit.org/show_bug.cgi?id=47841

Reviewed by Dan Bernstein.

Rework baselinePosition and lineHeight to be writing-mode-aware.  There's a lot of refactoring here to clean up
the method parameters to be more readable and to simplify the subclassing of the various methods in order to
keep the horizontal/vertical querying to a minimum.

* WebCore.xcodeproj/project.pbxproj:
* mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::baselinePosition):
* mathml/RenderMathMLFraction.h:
* mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::baselinePosition):
* mathml/RenderMathMLOperator.h:
* mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::baselinePosition):
* mathml/RenderMathMLRow.h:
* mathml/RenderMathMLSubSup.cpp:
(WebCore::RenderMathMLSubSup::baselinePosition):
* mathml/RenderMathMLSubSup.h:
* mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::layout):
(WebCore::RenderMathMLUnderOver::baselinePosition):
* mathml/RenderMathMLUnderOver.h:
* rendering/InlineBox.h:
(WebCore::InlineBox::baselinePosition):
(WebCore::InlineBox::lineHeight):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::baselinePosition):
(WebCore::InlineTextBox::lineHeight):
* rendering/InlineTextBox.h:
* rendering/RenderBR.cpp:
(WebCore::RenderBR::lineHeight):
* rendering/RenderBR.h:
(WebCore::toRenderBR):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight):
(WebCore::RenderBlock::baselinePosition):
(WebCore::RenderBlock::firstLineBoxBaseline):
(WebCore::RenderBlock::lastLineBoxBaseline):
(WebCore::RenderBlock::localCaretRect):
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::lineHeight):
(WebCore::RenderBox::baselinePosition):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::verticalPosition):
* rendering/RenderBoxModelObject.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutHorizontalBox):
(WebCore::RenderFlexibleBox::layoutVerticalBox):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::lineHeight):
(WebCore::RenderInline::baselinePosition):
* rendering/RenderInline.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::baselinePosition):
* rendering/RenderListBox.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::lineHeight):
(WebCore::RenderListMarker::baselinePosition):
* rendering/RenderListMarker.h:
* rendering/RenderObject.cpp:
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
* rendering/RenderReplaced.h:
* rendering/RenderSVGRoot.cpp:
* rendering/RenderSVGRoot.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::baselinePosition):
* rendering/RenderSlider.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::baselinePosition):
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
(WebCore::RenderTableCol::isTableCol):
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::baselinePosition):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
* rendering/RootInlineBox.h:
(WebCore::RootInlineBox::baselinePosition):
(WebCore::RootInlineBox::lineHeight):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::calculateBoundaries):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
54 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/mathml/RenderMathMLFraction.cpp
WebCore/mathml/RenderMathMLFraction.h
WebCore/mathml/RenderMathMLOperator.cpp
WebCore/mathml/RenderMathMLOperator.h
WebCore/mathml/RenderMathMLRow.cpp
WebCore/mathml/RenderMathMLRow.h
WebCore/mathml/RenderMathMLSubSup.cpp
WebCore/mathml/RenderMathMLSubSup.h
WebCore/mathml/RenderMathMLUnderOver.cpp
WebCore/mathml/RenderMathMLUnderOver.h
WebCore/rendering/InlineBox.h
WebCore/rendering/InlineFlowBox.cpp
WebCore/rendering/InlineTextBox.cpp
WebCore/rendering/InlineTextBox.h
WebCore/rendering/RenderBR.cpp
WebCore/rendering/RenderBR.h
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderBlockLineLayout.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderBox.h
WebCore/rendering/RenderBoxModelObject.cpp
WebCore/rendering/RenderBoxModelObject.h
WebCore/rendering/RenderFileUploadControl.cpp
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderInline.cpp
WebCore/rendering/RenderInline.h
WebCore/rendering/RenderListBox.cpp
WebCore/rendering/RenderListBox.h
WebCore/rendering/RenderListMarker.cpp
WebCore/rendering/RenderListMarker.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderReplaced.cpp
WebCore/rendering/RenderReplaced.h
WebCore/rendering/RenderSVGRoot.cpp
WebCore/rendering/RenderSVGRoot.h
WebCore/rendering/RenderSlider.cpp
WebCore/rendering/RenderSlider.h
WebCore/rendering/RenderTableCell.cpp
WebCore/rendering/RenderTableCell.h
WebCore/rendering/RenderTableCol.h
WebCore/rendering/RenderTableRow.h
WebCore/rendering/RenderTableSection.h
WebCore/rendering/RenderText.cpp
WebCore/rendering/RenderText.h
WebCore/rendering/RenderTextControl.cpp
WebCore/rendering/RenderTextControlMultiLine.cpp
WebCore/rendering/RenderTextControlMultiLine.h
WebCore/rendering/RenderTextControlSingleLine.cpp
WebCore/rendering/RootInlineBox.h
WebCore/rendering/svg/SVGInlineTextBox.cpp