Use tighter InlineBox subtypes in some places.
<https://webkit.org/b/123980>

RenderLineBreak and RenderBox line box wrappers are always going to
be InlineElementBox, so codify this with tighter types. Also made
the various positionLine() functions take tighter reference types.

All the casting to renderer-appropriate box types happens inside of
RenderBlockFlow::computeBlockDirectionPositionsForLine() and
propagates from there.

Reviewed by Antti Koivisto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[AX] Use toAccessibilityTable() instead of using manual static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=123982

Reviewed by Mario Sanchez Prada.

Though there is toAccessibilityTable(), static_cast<> are being used by many places.
We need to use toAccessibilityTable().

No new tests, no behavior changes.

* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::disclosedRows):
(WebCore::AccessibilityARIAGridRow::disclosedByRow):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::addChildren):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(cell):
(cellAtIndex):
(webkitAccessibleTableGetIndexAt):
(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):
(webkitAccessibleTableGetColumnHeader):
(webkitAccessibleTableGetRowHeader):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper tableParent]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[AX] Use toAccessibilityRenderObject() instead of using static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=123986

Reviewed by Mario Sanchez Prada.

Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
To use toAccessibilityRenderObject() is more helpful to find bad type cast.

No new tests, no behavior changes.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetElement):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Efl] Disable LTO when building cairo
https://bugs.webkit.org/show_bug.cgi?id=123947

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-11-07
Reviewed by Gyuyoung Kim.

Cairo always uses LTO, when it detects compiler support.
LTO is buggy in many/all versions of GCC and shouldn't be enabled by
default. This patch disables LTO when building cairo library.
- See: https://bugs.freedesktop.org/show_bug.cgi?id=60852

With gcc 4.7.3, for example, the build fails with the following message:
'lto1: fatal error: LTO_tags out of range: Range is 0 to 361, value is 15872'

* efl/jhbuild.modules:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, Add new baselines to EFL port since r158743 as well as do rebaseline.
Because r158743 didn't update EFL port.

* platform/efl/fullscreen/video-controls-override-expected.txt: Added.
* platform/efl/http/tests/media/video-cookie-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt:
* platform/efl/media/W3C/video/canPlayType/canPlayType_codecs_order_2-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_codecs_order_3-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt:
* platform/efl/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_2-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_3-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt:
* platform/efl/media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt:
* platform/efl/media/W3C/video/canPlayType/canPlayType_two_implies_one_3-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_two_implies_one_4-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_two_implies_one_5-expected.txt: Added.
* platform/efl/media/W3C/video/canPlayType/canPlayType_two_implies_one_6-expected.txt: Added.
* platform/efl/media/context-menu-actions-expected.txt: Added.
* platform/efl/media/media-can-play-flac-audio-expected.txt: Added.
* platform/efl/media/media-can-play-webm-expected.txt: Added.
* platform/efl/media/media-volume-slider-rendered-below-expected.txt: Added.
* platform/efl/media/media-volume-slider-rendered-normal-expected.txt: Added.
* platform/efl/media/track/audio/audio-track-mkv-vorbis-addtrack-expected.txt: Added.
* platform/efl/media/track/audio/audio-track-mkv-vorbis-enabled-expected.txt: Added.
* platform/efl/media/track/track-cue-mutable-text-expected.txt: Added.
* platform/efl/media/track/track-cue-rendering-mode-changed-expected.txt: Added.
* platform/efl/media/track/track-language-preference-expected.txt: Added.
* platform/efl/media/track/video/video-track-mkv-theora-addtrack-expected.txt: Added.
* platform/efl/media/track/video/video-track-mkv-theora-selected-expected.txt: Added.
* platform/efl/media/video-controls-fullscreen-volume-expected.txt: Added.
* platform/efl/media/video-controls-toggling-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Expectations are finally the same for
WK1 and WK2 so, besides needing a rebaseline, we now can share them.

* platform/gtk-wk1/accessibility/table-attributes-expected.txt: Removed.
* platform/gtk-wk1/accessibility/table-sections-expected.txt: Removed.
* platform/gtk/accessibility/table-attributes-expected.txt: Renamed from LayoutTests/platform/gtk-wk2/accessibility/table-attributes-expected.txt.
* platform/gtk/accessibility/table-sections-expected.txt: Renamed from LayoutTests/platform/gtk-wk2/accessibility/table-sections-expected.txt.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
https://bugs.webkit.org/show_bug.cgi?id=50619

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-11-07
Reviewed by Martin Robinson.

Source/WebCore:

Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
the 90 degrees rotation problem of CJK characters when displaying
vertical text.

New tests are not required as the existing tests for vertical text will
work properly now.

* GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
OpenTypeVerticalData.h to platformgtk_sources.
* PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
* PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
* platform/graphics/FontCache.cpp: Originally the HashMap for
OpenTypeVerticalData was designed with FontFileKey as integer in the
Chromium port, which was an unique number provided by Skia. Since other
ports use FontFileKey as string, new generic hash functions had to be
implemented instead of using the specific ones for integers.
(WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
HashMap of OpenTypeVerticalData.
(WebCore::FontVerticalDataCacheKeyHash::equal): New function for
comparing hash indexes in the HashMap of OpenTypeVerticalData.
(WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
giving an empty FontFileKey.
(WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
function to create a FontFileKey for deleted values.
(WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
to check if a HashMap entry is available.
* platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Added font
orientation as a parameter to the FontPlatformData constructor.
* platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
store the font orientation and m_horizontalOrientationMatrix to store
the Cairo matrix for horizontal orientation, which can be restored in
setOrientation().
(WebCore::FontPlatformData::FontPlatformData): Added font orientation as
a parameter.
(WebCore::FontPlatformData::orientation): Implemented this function
based on m_orientation.
* platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
helper function rotateCairoMatrixForVerticalOrientation() to rotate the
Cairo matrix in case of vertical orientation.
(WebCore::FontPlatformData::FontPlatformData): Initialized
m_orientation.
(WebCore::FontPlatformData::operator=): Added m_orientation and
m_horizontalOrientationMatrix to the assignment operator.
(WebCore::FontPlatformData::operator==): Added m_orientation to the
equal operator.
(WebCore::FontPlatformData::initializeWithFontFace): Rotated and
translated fonts if orientation is vertical. Also stored the horizontal
Cairo matrix.
(WebCore::FontPlatformData::verticalData): Returned the vertical data
from the font cache.
(WebCore::FontPlatformData::openTypeTable): Loaded the font table into
a shared buffer.
(WebCore::FontPlatformData::setOrientation): Replaced the scaled font
data by rotating fonts according to the new orientation.
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::SimpleFontData::platformInit): Set the glyph's height and
width according to the font orientation. It also sets EM.
(WebCore::SimpleFontData::platformCreateScaledFontData): Added
orientation to the FontPlatformData constructor.
(WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
width according the orientation.
* platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
(WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
and extents according to the font orientation.

Source/Platform:

Added WebCore/platform/graphics/opentype to the include path.

* GNUmakefile.am:

Source/WTF:

Enabled OPENTYPE_VERTICAL by default on GTK+ and EFL ports, which are
currently using Freetype.

* wtf/Platform.h:

Source/WebKit:

Added WebCore/platform/graphics/opentype to the include path.

* PlatformEfl.cmake:

Source/WebKit2:

Added WebCore/platform/graphics/opentype to the include path.

* PlatformEfl.cmake:
* PlatformGTK.cmake:

LayoutTests:

Updated existing test results that uses vertical texts.

* platform/gtk-wk1/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Added.
* platform/gtk-wk1/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.png: Updated.
* platform/gtk/editing/selection/vertical-lr-ltr-extend-line-backward-br-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.png: Updated.
* platform/gtk/editing/selection/vertical-lr-ltr-extend-line-forward-br-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.png: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-backward-br-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.png: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-backward-p-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.png: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.png: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-forward-br-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.png: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-forward-p-expected.txt: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.png: Updated.
* platform/gtk/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.txt: Updated.
* platform/gtk/fast/block/lineboxcontain/block-with-ideographs-expected.png: Updated.
* platform/gtk/fast/block/lineboxcontain/block-with-ideographs-expected.txt: Updated.
* platform/gtk/fast/css/relative-positioned-block-with-inline-ancestor-and-parent-dynamic-expected.png: Updated.
* platform/gtk/fast/dynamic/text-combine-expected.png: Updated.
* platform/gtk/fast/dynamic/text-combine-expected.txt: Updated.
* platform/gtk/fast/html/details-writing-mode-expected.png: Updated.
* platform/gtk/fast/repaint/japanese-rl-selection-clear-expected.png: Updated.
* platform/gtk/fast/repaint/japanese-rl-selection-clear-expected.txt: Added.
* platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.png: Updated.
* platform/gtk/fast/repaint/japanese-rl-selection-repaint-expected.txt: Added.
* platform/gtk/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.png: Updated.
* platform/gtk/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt: Updated.
* platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.png: Updated.
* platform/gtk/fast/repaint/repaint-across-writing-mode-boundary-expected.txt: Updated.
* platform/gtk/fast/ruby/base-shorter-than-text-expected.png: Updated.
* platform/gtk/fast/ruby/base-shorter-than-text-expected.txt: Updated.
* platform/gtk/fast/text/decorations-with-text-combine-expected.png: Updated.
* platform/gtk/fast/text/decorations-with-text-combine-expected.txt: Updated.
* platform/gtk/fast/text/emphasis-combined-text-expected.png: Updated.
* platform/gtk/fast/text/emphasis-combined-text-expected.txt: Updated.
* platform/gtk/fast/text/emphasis-vertical-expected.png: Updated.
* platform/gtk/fast/text/emphasis-vertical-expected.txt: Updated.
* platform/gtk/fast/text/international/text-combine-image-test-expected.png: Updated.
* platform/gtk/fast/text/international/text-combine-image-test-expected.txt: Updated.
* platform/gtk/fast/text/international/text-spliced-font-expected.png: Updated.
* platform/gtk/fast/text/international/text-spliced-font-expected.txt: Updated.
* platform/gtk/fast/text/international/vertical-text-glyph-test-expected.png: Updated.
* platform/gtk/fast/text/international/vertical-text-glyph-test-expected.txt: Added.
* platform/gtk/fast/text/justify-ideograph-vertical-expected.png: Updated.
* platform/gtk/fast/text/justify-ideograph-vertical-expected.txt: Added.
* platform/gtk/fast/text/orientation-sideways-expected.png: Updated.
* platform/gtk/fast/text/orientation-sideways-expected.txt: Updated.
* platform/gtk/fast/writing-mode/Kusa-Makura-background-canvas-expected.png: Updated.
* platform/gtk/fast/writing-mode/Kusa-Makura-background-canvas-expected.txt: Updated.
* platform/gtk/fast/writing-mode/border-vertical-lr-expected.png: Updated.
* platform/gtk/fast/writing-mode/border-vertical-lr-expected.txt: Updated.
* platform/gtk/fast/writing-mode/broken-ideograph-small-caps-expected.png: Updated.
* platform/gtk/fast/writing-mode/broken-ideograph-small-caps-expected.txt: Updated.
* platform/gtk/fast/writing-mode/broken-ideographic-font-expected.png: Updated.
* platform/gtk/fast/writing-mode/broken-ideographic-font-expected.txt: Updated.
* platform/gtk/fast/writing-mode/fallback-orientation-expected.png: Updated.
* platform/gtk/fast/writing-mode/fallback-orientation-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-lr-selection-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-lr-selection-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-lr-text-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-lr-text-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-rl-selection-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-rl-selection-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-rl-text-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-rl-text-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-rl-text-with-broken-font-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-rl-text-with-broken-font-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-ruby-vertical-lr-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-ruby-vertical-lr-expected.txt: Updated.
* platform/gtk/fast/writing-mode/japanese-ruby-vertical-rl-expected.png: Updated.
* platform/gtk/fast/writing-mode/japanese-ruby-vertical-rl-expected.txt: Updated.
* platform/gtk/fast/writing-mode/text-orientation-basic-expected.png: Updated.
* platform/gtk/fast/writing-mode/text-orientation-basic-expected.txt:
* platform/gtk/fast/writing-mode/vertical-align-table-baseline-expected.png: Updated.
* platform/gtk/fast/writing-mode/vertical-align-table-baseline-expected.txt: Updated.
* platform/gtk/fast/writing-mode/vertical-baseline-alignment-expected.png: Updated.
* platform/gtk/fast/writing-mode/vertical-baseline-alignment-expected.txt: Updated.
* platform/gtk/fast/writing-mode/vertical-font-fallback-expected.png: Updated.
* platform/gtk/fast/writing-mode/vertical-font-fallback-expected.txt: Updated.

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