[MathML] Implement the subscriptshift and superscriptshift attributes
https://bugs.webkit.org/show_bug.cgi?id=120069

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-18
Reviewed by Darin Adler.

Source/WebCore:

Added support for subscriptshift and superscriptshift attributes. The
subscriptshift attribute is for msup element and superscriptshift for
msup. msubsup can have both subscriptshift and superscriptshift. The
subscriptshift attribute specifies the minimum amount to shift the
baseline of subscript down. The superscriptshift attribute specifies
the minimum amount to shift the baseline of superscript up.

Tests: mathml/presentation/msub-subscriptshift.html
       mathml/presentation/msubsup-subscriptshift.html
       mathml/presentation/msubsup-superscriptshift.html
       mathml/presentation/msup-superscriptshift.html
       mathml/presentation/multiscript-subscriptshift.html
       mathml/presentation/multiscript-superscriptshift.html

* mathml/mathattrs.in:
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::layout):
For aligning the subscript and superscript padding is added to the base.
So subscriptshift and superscriptshift attributes is set as padding bottom
and padding top of base respectively.

LayoutTests:

* mathml/presentation/msub-subscriptshift-expected.txt: Added.
* mathml/presentation/msub-subscriptshift.html: Added.
* mathml/presentation/msubsup-subscriptshift-expected.txt: Added.
* mathml/presentation/msubsup-subscriptshift.html: Added.
* mathml/presentation/msubsup-superscriptshift-expected.txt: Added.
* mathml/presentation/msubsup-superscriptshift.html: Added.
* mathml/presentation/msup-superscriptshift-expected.txt: Added.
* mathml/presentation/msup-superscriptshift.html: Added.
* mathml/presentation/multiscript-subscriptshift-expected.txt: Added.
* mathml/presentation/multiscript-subscriptshift.html: Added.
* mathml/presentation/multiscript-superscriptshift-expected.txt: Added.
* mathml/presentation/multiscript-superscriptshift.html: Added.
Added new tests for verifying that subscriptshift and superscriptshift are
being applied properly to the script base.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ASSERT_NOT_REACHED is touched in WebCore::CSSPrimitiveValue::computeLengthDouble
https://bugs.webkit.org/show_bug.cgi?id=120469

Source/WebCore:

Tests: fast/css/outline-offset-parsing-assert.html
       fast/css/outline-offset-parsing.html

Reviewed by Dirk Schulze.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Fixed a typo after r66615, outline-offset can't be percentage.

LayoutTests:

Reviewed by Dirk Schulze.

* fast/css/outline-offset-parsing-assert-expected.txt: Added.
* fast/css/outline-offset-parsing-assert.html: Added.
* fast/css/outline-offset-parsing-expected.txt: Added.
* fast/css/outline-offset-parsing.html: Added.
* fast/css/script-tests/outline-offset-parsing.js: Added.
(test):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove RenderWordBreak
https://bugs.webkit.org/show_bug.cgi?id=121549

Reviewed by Andreas Kling.

Remove RenderWordBreak and make it a bit in RenderBR instead.
        
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* dom/Position.cpp:
(WebCore::hasInlineBoxWrapper):
(WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
* editing/Editor.cpp:
(WebCore::findFirstMarkable):
* editing/TextIterator.cpp:
(WebCore::ignoresContainerClip):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::createRenderer):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::logicalHeight):
(WebCore::InlineBox::baselinePosition):
(WebCore::InlineBox::lineHeight):
(WebCore::InlineBox::deleteLine):
(WebCore::InlineBox::extractLine):
(WebCore::InlineBox::attachLine):
(WebCore::InlineBox::nodeAtPoint):
* rendering/InlineBox.h:
(WebCore::InlineBox::isLineBreak):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::computeOverflow):
* rendering/InlineIterator.h:
(WebCore::InlineIterator::atTextParagraphSeparator):
(WebCore::isIteratorTarget):
* rendering/RenderBR.cpp:
(WebCore::RenderBR::RenderBR):
* rendering/RenderBR.h:
(WebCore::toRenderBR):
    
    RenderBR now represents both hard and soft line breaks. It will be renamed to RenderLineBreak later.

* rendering/RenderBlock.cpp:
(WebCore::InlineMinMaxIterator::next):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::createInlineBoxForRenderer):
(WebCore::dirtyLineBoxesForRenderer):
(WebCore::RenderBlock::computeBlockDirectionPositionsForLine):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::textBeginsWithBreakablePosition):
(WebCore::canBreakAtThisPosition):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::generateCulledLineBoxRects):
(WebCore::RenderInline::culledInlineFirstLineBox):
(WebCore::RenderInline::culledInlineLastLineBox):
(WebCore::RenderInline::dirtyLineBoxes):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
* rendering/RenderObject.h:
(WebCore::RenderObject::isLineBreak):
        
    This bit covers both BR and WBR.

(WebCore::RenderObject::isBR):
(WebCore::RenderObject::isLineBreakOpportunity):
        
    Rename isWordBreak to isLineBreakOpportunity. This matches HTML5 spec terminology.

(WebCore::RenderObject::isTextOrLineBreak):
        
    Since WBR used to be Text we want this check to still cover it too. Renamed from isTextOrBR.

(WebCore::RenderObject::setIsLineBreak):
(WebCore::RenderObject::isWBR):
(WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderText.cpp:
* rendering/RenderText.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject):
* rendering/RenderWordBreak.cpp: Removed.
* rendering/RenderWordBreak.h: Removed.
* rendering/RenderingAllInOne.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
(WebCore::RootInlineBox::verticalPositionForBox):
(WebCore::RootInlineBox::includeLeadingForBox):
(WebCore::RootInlineBox::includeFontForBox):
(WebCore::RootInlineBox::includeGlyphsForBox):
(WebCore::RootInlineBox::includeMarginForBox):



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