text-underline-position:under has multiple correctness issues
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Feb 2015 17:47:27 +0000 (17:47 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Feb 2015 17:47:27 +0000 (17:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.
text-underline-position:under has multiple correctness issues
https://bugs.webkit.org/show_bug.cgi?id=141528

Reviewed by Dean Jackson.

Source/WebCore:

Added a bunch of new tests in fast/text

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
(WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
(WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
* rendering/InlineFlowBox.h:
These functions have been re-written to take an enclosing renderer that specified the
decoration. This way they can properly limit the bottom/top computation to only line boxes
that are contained inside the renderer.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
Tweak the call to get the decoration colors now that quirks mode has been removed.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::enclosingRendererWithTextDecoration):
* rendering/RenderElement.h:
New function that finds the enclosing renderer that specified a text decoration. For now
this is only used in the "under" position computation, but soon we'll be using it
everywhere.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/RenderObject.h:
Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).

* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::maxLogicalBottom): Deleted.
* rendering/RootInlineBox.h:
Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
the InlineFlowBox functions directly.

* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
computation to limit which line boxes get included.

LayoutTests:

* fast/text/text-underline-first-line-decoration-expected.html: Added.
* fast/text/text-underline-first-line-decoration.html: Added.
* fast/text/text-underline-position-mixed-fonts-expected.html: Added.
* fast/text/text-underline-position-mixed-fonts.html: Added.
* fast/text/text-underline-position-subscript-expected.html: Added.
* fast/text/text-underline-position-subscript.html: Added.
* fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
* fast/text/text-underline-vertical-first-line-decoration.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180150 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/text-underline-first-line-decoration-expected.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-first-line-decoration.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-position-mixed-fonts-expected.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-position-mixed-fonts.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-position-subscript-expected.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-position-subscript.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-vertical-first-line-decoration-expected.html [new file with mode: 0644]
LayoutTests/fast/text/text-underline-vertical-first-line-decoration.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/style/InlineTextBoxStyle.cpp

index 6e4a6bc..0b3c4fb 100644 (file)
@@ -1,3 +1,19 @@
+2015-02-12  David Hyatt  <hyatt@apple.com>
+
+        text-underline-position:under has multiple correctness issues
+        https://bugs.webkit.org/show_bug.cgi?id=141528
+
+        Reviewed by Dean Jackson.
+
+        * fast/text/text-underline-first-line-decoration-expected.html: Added.
+        * fast/text/text-underline-first-line-decoration.html: Added.
+        * fast/text/text-underline-position-mixed-fonts-expected.html: Added.
+        * fast/text/text-underline-position-mixed-fonts.html: Added.
+        * fast/text/text-underline-position-subscript-expected.html: Added.
+        * fast/text/text-underline-position-subscript.html: Added.
+        * fast/text/text-underline-vertical-first-line-decoration-expected.html: Added.
+        * fast/text/text-underline-vertical-first-line-decoration.html: Added.
+
 2015-02-16  Antti Koivisto  <antti@apple.com>
 
         Develop/Disable Caches does not properly disable disk cache
diff --git a/LayoutTests/fast/text/text-underline-first-line-decoration-expected.html b/LayoutTests/fast/text/text-underline-first-line-decoration-expected.html
new file mode 100644 (file)
index 0000000..b8ca395
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<head>\r
+</head>\r
+<body style="overflow:hidden">\r
+<p>Test to make sure that the decoration line paints properly underneath the subscript.\r
+</p>\r
+\r
+<p class="decorate" style="font-size:24px; float:left;-webkit-text-underline-position:under; border:1px dotted orange">\r
+<span style="text-decoration:underline">The first line <span style="vertical-align:-20px">has a decoration,</span> but not </span><img style="vertical-align:-100px; height:20px;width:20px;background-color:lime"><span style="text-decoration:underline"> under the image.</span><br>\r
+The second line should not.\r
+</p>\r
diff --git a/LayoutTests/fast/text/text-underline-first-line-decoration.html b/LayoutTests/fast/text/text-underline-first-line-decoration.html
new file mode 100644 (file)
index 0000000..997b05c
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<head>\r
+<style>\r
+.decorate::first-line { text-decoration:underline }\r
+</style>\r
+</head>\r
+<body style="overflow:hidden">\r
+<p>Test to make sure that the decoration line paints properly underneath the subscript.\r
+</p>\r
+\r
+<p class="decorate" style="font-size:24px; float:left;-webkit-text-underline-position:under; border:1px dotted orange">\r
+The first line <span style="vertical-align:-20px">has a decoration,</span> but not <img style="vertical-align:-100px; height:20px;width:20px;background-color:lime"> under the image.<br>\r
+The second line should not.\r
+</p>\r
diff --git a/LayoutTests/fast/text/text-underline-position-mixed-fonts-expected.html b/LayoutTests/fast/text/text-underline-position-mixed-fonts-expected.html
new file mode 100644 (file)
index 0000000..4f0e94f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<body style="overflow:hidden">\r
+<p>Test to make sure gigantic fonts that aren't inside the text decoration don't affect the position of\r
+the line. The giant font is invisible (color:transparent) in this test.\r
+</p>\r
+\r
+<span style="text-decoration:underline;-webkit-text-underline-position:under">This text should be underlined just under the descenders.</span> \r
diff --git a/LayoutTests/fast/text/text-underline-position-mixed-fonts.html b/LayoutTests/fast/text/text-underline-position-mixed-fonts.html
new file mode 100644 (file)
index 0000000..37795ac
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<body style="overflow:hidden">\r
+<p>Test to make sure gigantic fonts that aren't inside the text decoration don't affect the position of\r
+the line. The giant font is invisible (color:transparent) in this test.\r
+</p>\r
+\r
+<span style="text-decoration:underline;-webkit-text-underline-position:under">This text should be underlined just under the descenders.</span> <span style="font-size:64px; vertical-align:-256px; color:transparent">Should not be underlined.</span>\r
diff --git a/LayoutTests/fast/text/text-underline-position-subscript-expected.html b/LayoutTests/fast/text/text-underline-position-subscript-expected.html
new file mode 100644 (file)
index 0000000..4fa0b75
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<head>\r
+<style>\r
+.yellow::first-line { color:grey }\r
+</style>\r
+</head>\r
+<body>\r
+<p>Test to make sure that the decoration line paints properly underneath the subscript.\r
+</p>\r
+\r
+<p class="yellow" style="font-size:40px; padding-top:5px; float:left; text-decoration:underline;-webkit-text-underline-position:under; border:1px dotted orange"><span style="position:relative;">Here is the subscript for this line.</span>\r
+</p>\r
diff --git a/LayoutTests/fast/text/text-underline-position-subscript.html b/LayoutTests/fast/text/text-underline-position-subscript.html
new file mode 100644 (file)
index 0000000..ee52029
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<head>\r
+<style>\r
+.yellow::first-line { color:grey }\r
+</style>\r
+</head>\r
+<body>\r
+<p>Test to make sure that the decoration line paints properly underneath the subscript.\r
+</p>\r
+\r
+<p class="yellow" style="font-size:40px; float:left; text-decoration:underline;-webkit-text-underline-position:under; border:1px dotted orange"><span style="vertical-align:-5px;">Here is the subscript for this line.</span>\r
+</p>\r
diff --git a/LayoutTests/fast/text/text-underline-vertical-first-line-decoration-expected.html b/LayoutTests/fast/text/text-underline-vertical-first-line-decoration-expected.html
new file mode 100644 (file)
index 0000000..05eebe4
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<head>\r
+</head>\r
+<body style="overflow:hidden">\r
+<p>Test to make sure that the decoration line paints properly underneath the subscript.\r
+</p>\r
+\r
+<p class="decorate" style="-webkit-writing-mode:vertical-lr; margin-right:10px; font-size:24px; float:left;-webkit-text-underline-position:under; border:1px dotted orange">\r
+<span style="text-decoration:underline">The first line <span style="vertical-align:-20px">has a decoration,</span> but not </span><img style="vertical-align:-100px; height:20px;width:20px;background-color:lime"><span style="text-decoration:underline"> under the image.</span><br>\r
+The second line should not.\r
+</p>\r
+\r
+<p class="decorate" style="-webkit-writing-mode:vertical-rl; margin-right:10px; font-size:24px; float:left;-webkit-text-underline-position:under; border:1px dotted orange">\r
+<span style="text-decoration:underline">The first line <span style="vertical-align:-20px">has a decoration,</span> but not </span><img style="vertical-align:-100px; height:20px;width:20px;background-color:lime"><span style="text-decoration:underline"> under the image.</span><br>\r
+The second line should not.\r
+</p>\r
diff --git a/LayoutTests/fast/text/text-underline-vertical-first-line-decoration.html b/LayoutTests/fast/text/text-underline-vertical-first-line-decoration.html
new file mode 100644 (file)
index 0000000..194fdc5
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ibooks="http://apple.com/ibooks/html-extensions" xmlns:epub="http://www.idpf.org/2007/ops">\r
+<head>\r
+<style>\r
+.decorate::first-line { text-decoration:underline }\r
+</style>\r
+</head>\r
+<body style="overflow:hidden">\r
+<p>Test to make sure that the decoration line paints properly underneath the subscript.\r
+</p>\r
+\r
+<p class="decorate" style="-webkit-writing-mode:vertical-lr; margin-right:10px; font-size:24px; float:left;-webkit-text-underline-position:under; border:1px dotted orange">\r
+The first line <span style="vertical-align:-20px">has a decoration,</span> but not <img style="vertical-align:-100px; height:20px;width:20px;background-color:lime"> under the image.<br>\r
+The second line should not.\r
+</p>\r
+\r
+<p class="decorate" style="-webkit-writing-mode:vertical-rl; margin-right:10px; font-size:24px; float:left;-webkit-text-underline-position:under; border:1px dotted orange">\r
+The first line <span style="vertical-align:-20px">has a decoration,</span> but not <img style="vertical-align:-100px; height:20px;width:20px;background-color:lime"> under the image.<br>\r
+The second line should not.\r
+</p>
\ No newline at end of file
index 17d65c1..548317b 100644 (file)
@@ -1,3 +1,48 @@
+2015-02-12  David Hyatt  <hyatt@apple.com>
+
+        text-underline-position:under has multiple correctness issues
+        https://bugs.webkit.org/show_bug.cgi?id=141528
+
+        Reviewed by Dean Jackson.
+
+        Added a bunch of new tests in fast/text
+
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine):
+        (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine):
+        (WebCore::InlineFlowBox::computeMaxLogicalBottom): Deleted.
+        * rendering/InlineFlowBox.h:
+        These functions have been re-written to take an enclosing renderer that specified the
+        decoration. This way they can properly limit the bottom/top computation to only line boxes
+        that are contained inside the renderer.
+
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::paintDecoration):
+        Tweak the call to get the decoration colors now that quirks mode has been removed.
+
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::enclosingRendererWithTextDecoration):
+        * rendering/RenderElement.h:
+        New function that finds the enclosing renderer that specified a text decoration. For now
+        this is only used in the "under" position computation, but soon we'll be using it
+        everywhere.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::getTextDecorationColors):
+        * rendering/RenderObject.h:
+        Remove the quirks mode argument, since we were always passing true anyway (making the argument dead).
+
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::maxLogicalBottom): Deleted.
+        * rendering/RootInlineBox.h:
+        Get rid of these functions and just have InlineTextBoxStyle's computeUnderLineOffset function call
+        the InlineFlowBox functions directly.
+
+        * style/InlineTextBoxStyle.cpp:
+        (WebCore::computeUnderlineOffset):
+        Re-written to fetch the enclosingRendererWithTextDecoration so that it can be passed to the logical top/bottom
+        computation to limit which line boxes get included.
+
 2015-02-16  Brent Fulgham  <bfulgham@apple.com>
 
         FEGaussianBlur::calculateUnscaledKernelSize does unspeakable things with signed and unsigned values
index cb7521b..dd90eaa 100644 (file)
@@ -748,18 +748,45 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei
     }
 }
 
-void InlineFlowBox::computeMaxLogicalBottom(float& maxLogicalBottom) const
+void InlineFlowBox::maxLogicalBottomForTextDecorationLine(float& maxLogicalBottom, const RenderElement* decorationRenderer, TextDecoration textDecoration) const
 {
     for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
         if (child->renderer().isOutOfFlowPositioned())
             continue; // Positioned placeholders don't affect calculations.
-
-        if (descendantsHaveSameLineHeightAndBaseline())
+        
+        if (!(child->lineStyle().textDecorationsInEffect() & textDecoration))
+            continue; // If the text decoration isn't in effect on the child, then it must be outside of |decorationRenderer|'s hierarchy.
+        
+        if (decorationRenderer && decorationRenderer->isRenderInline() && !isAncestorAndWithinBlock(downcast<RenderInline>(*decorationRenderer), &child->renderer()))
             continue;
+        
+        if (is<InlineFlowBox>(*child))
+            downcast<InlineFlowBox>(*child).maxLogicalBottomForTextDecorationLine(maxLogicalBottom, decorationRenderer, textDecoration);
+        else {
+            if (child->isInlineTextBox() || child->lineStyle().textDecorationSkip() == TextDecorationSkipNone)
+                maxLogicalBottom = std::max<float>(maxLogicalBottom, child->logicalBottom());
+        }
+    }
+}
 
-        maxLogicalBottom = std::max<float>(maxLogicalBottom, child->logicalBottom());
+void InlineFlowBox::minLogicalTopForTextDecorationLine(float& minLogicalTop, const RenderElement* decorationRenderer, TextDecoration textDecoration) const
+{
+    for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
+        if (child->renderer().isOutOfFlowPositioned())
+            continue; // Positioned placeholders don't affect calculations.
+        
+        if (!(child->lineStyle().textDecorationsInEffect() & textDecoration))
+            continue; // If the text decoration isn't in effect on the child, then it must be outside of |decorationRenderer|'s hierarchy.
+        
+        if (decorationRenderer && decorationRenderer->isRenderInline() && !isAncestorAndWithinBlock(downcast<RenderInline>(*decorationRenderer), &child->renderer()))
+            continue;
+        
         if (is<InlineFlowBox>(*child))
-            downcast<InlineFlowBox>(*child).computeMaxLogicalBottom(maxLogicalBottom);
+            downcast<InlineFlowBox>(*child).minLogicalTopForTextDecorationLine(minLogicalTop, decorationRenderer, textDecoration);
+        else {
+            if (child->isInlineTextBox() || child->lineStyle().textDecorationSkip() == TextDecorationSkipNone)
+                minLogicalTop = std::min<float>(minLogicalTop, child->logicalTop());
+        }
     }
 }
 
index 859410e..ed61692 100644 (file)
@@ -293,6 +293,10 @@ public:
 
     void computeReplacedAndTextLineTopAndBottom(LayoutUnit& lineTop, LayoutUnit& lineBottom) const;
     
+    // Used to calculate the underline offset for TextUnderlinePositionUnder.
+    void maxLogicalBottomForTextDecorationLine(float& maxLogicalBottom, const RenderElement* decorationRenderer, TextDecoration) const;
+    void minLogicalTopForTextDecorationLine(float& minLogicalTop, const RenderElement* decorationRenderer, TextDecoration) const;
+
 private:
     virtual bool isInlineFlowBox() const override final { return true; }
     void boxModelObject() const = delete;
@@ -312,9 +316,6 @@ protected:
     InlineFlowBox* m_prevLineBox; // The previous box that also uses our RenderObject
     InlineFlowBox* m_nextLineBox; // The next box that also uses our RenderObject
 
-    // Maximum logicalBottom among all children of an InlineFlowBox. Used to
-    // calculate the offset for TextUnderlinePositionUnder.
-    void computeMaxLogicalBottom(float& maxLogicalBottom) const;
 private:
     unsigned m_includeLogicalLeftEdge : 1;
     unsigned m_includeLogicalRightEdge : 1;
index cb7bdeb..b626f8e 100644 (file)
@@ -915,9 +915,9 @@ void InlineTextBox::paintDecoration(GraphicsContext& context, const FloatPoint&
     
     // Get the text decoration colors.
     Color underline, overline, linethrough;
-    renderer().getTextDecorationColors(decoration, underline, overline, linethrough, true);
+    renderer().getTextDecorationColors(decoration, underline, overline, linethrough);
     if (isFirstLine())
-        renderer().getTextDecorationColors(decoration, underline, overline, linethrough, true, true);
+        renderer().getTextDecorationColors(decoration, underline, overline, linethrough, true);
     
     // Use a special function for underlines to get the positioning exactly right.
     bool isPrinting = renderer().document().printing();
index 749532e..5b2f96d 100644 (file)
@@ -1675,4 +1675,22 @@ LayoutRect RenderElement::anchorRect() const
     return enclosingLayoutRect(FloatRect(upperLeft, lowerRight.expandedTo(upperLeft) - upperLeft));
 }
 
+const RenderElement* RenderElement::enclosingRendererWithTextDecoration(TextDecoration textDecoration, bool firstLine) const
+{
+    const RenderElement* current = this;
+    do {
+        if (current->isRenderBlock())
+            return current;
+        if (!current->isRenderInline() || current->isRubyText())
+            return nullptr;
+        
+        const RenderStyle& styleToUse = firstLine ? current->firstLineStyle() : current->style();
+        if (styleToUse.textDecoration() & textDecoration)
+            return current;
+        current = current->parent();
+    } while (current && (!current->element() || (!is<HTMLAnchorElement>(*current->element()) && !current->element()->hasTagName(HTMLNames::fontTag))));
+
+    return current;
+}
+
 }
index c0343ef..5cb1240 100644 (file)
@@ -191,6 +191,8 @@ public:
 
     bool isCSSAnimating() const { return m_isCSSAnimating; }
     void setIsCSSAnimating(bool b) { m_isCSSAnimating = b; }
+    
+    const RenderElement* enclosingRendererWithTextDecoration(TextDecoration, bool firstLine) const;
 
 protected:
     enum BaseTypeFlags {
index c31358d..8cd4cb1 100644 (file)
@@ -2110,8 +2110,7 @@ static Color decorationColor(RenderStyle* style)
     return result;
 }
 
-void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline,
-                                           Color& linethrough, bool quirksMode, bool firstlineStyle)
+void RenderObject::getTextDecorationColors(int decorations, Color& underline, Color& overline, Color& linethrough, bool firstlineStyle)
 {
     RenderObject* current = this;
     RenderStyle* styleToUse = nullptr;
@@ -2141,7 +2140,7 @@ void RenderObject::getTextDecorationColors(int decorations, Color& underline, Co
         current = current->parent();
         if (current && current->isAnonymousBlock() && downcast<RenderBlock>(*current).continuation())
             current = downcast<RenderBlock>(*current).continuation();
-    } while (current && decorations && (!quirksMode || !current->node() || (!is<HTMLAnchorElement>(*current->node()) && !current->node()->hasTagName(fontTag))));
+    } while (current && decorations && (!current->node() || (!is<HTMLAnchorElement>(*current->node()) && !current->node()->hasTagName(fontTag))));
 
     // If we bailed out, use the element we bailed out at (typically a <font> or <a> element).
     if (decorations && current) {
index edd5a3e..31c3dbd 100644 (file)
@@ -703,7 +703,7 @@ public:
     
     virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const;
 
-    void getTextDecorationColors(int decorations, Color& underline, Color& overline, Color& linethrough, bool quirksMode = false, bool firstlineStyle = false);
+    void getTextDecorationColors(int decorations, Color& underline, Color& overline, Color& linethrough, bool firstlineStyle = false);
 
     // Return the RenderLayerModelObject in the container chain which is responsible for painting this object, or 0
     // if painting is root-relative. This is the container that should be passed to the 'forRepaint'
index 72427ed..c942a34 100644 (file)
@@ -314,13 +314,6 @@ LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G
     return heightOfBlock + maxHeight;
 }
 
-float RootInlineBox::maxLogicalBottom() const
-{
-    float maxLogicalBottom = logicalBottom();
-    computeMaxLogicalBottom(maxLogicalBottom);
-    return maxLogicalBottom;
-}
-
 LayoutUnit RootInlineBox::beforeAnnotationsAdjustment() const
 {
     LayoutUnit result = 0;
index 1e46a59..3e9c888 100644 (file)
@@ -187,9 +187,6 @@ public:
         return InlineFlowBox::logicalBottomLayoutOverflow(lineBottom());
     }
 
-    // Used to calculate the underline offset for TextUnderlinePositionUnder.
-    float maxLogicalBottom() const;
-
     Node* getLogicalStartBoxWithNode(InlineBox*&) const;
     Node* getLogicalEndBoxWithNode(InlineBox*&) const;
 
index e1c823c..9a82a22 100644 (file)
@@ -46,7 +46,19 @@ int computeUnderlineOffset(TextUnderlinePosition underlinePosition, const FontMe
     case TextUnderlinePositionUnder: {
         ASSERT(inlineTextBox);
         // Position underline relative to the bottom edge of the lowest element's content box.
-        float offset = inlineTextBox->root().maxLogicalBottom() - inlineTextBox->logicalBottom();
+        const RootInlineBox& rootBox = inlineTextBox->root();
+        const RenderElement* decorationRenderer = inlineTextBox->parent()->renderer().enclosingRendererWithTextDecoration(TextDecorationUnderline, inlineTextBox->isFirstLine());
+        
+        float offset;
+        if (inlineTextBox->renderer().style().isFlippedLinesWritingMode()) {
+            offset = inlineTextBox->logicalTop();
+            rootBox.minLogicalTopForTextDecorationLine(offset, decorationRenderer, TextDecorationUnderline);
+            offset = inlineTextBox->logicalTop() - offset;
+        } else {
+            offset = inlineTextBox->logicalBottom();
+            rootBox.maxLogicalBottomForTextDecorationLine(offset, decorationRenderer, TextDecorationUnderline);
+            offset -= inlineTextBox->logicalBottom();
+        }
         return inlineTextBox->logicalHeight() + gap + std::max<float>(offset, 0);
     }
     }