[CSS Exclusions] Implement text alignment for shape-inside
https://bugs.webkit.org/show_bug.cgi?id=101086

Reviewed by Alexandru Chiculita.

Adding tests to make sure that shape-inside layout correctly supports
the different values of text-align.

* fast/exclusions/resources/multi-segment-polygon.js:
(createOrInsert):
* fast/exclusions/shape-inside/shape-inside-text-align-expected.html: Added.
* fast/exclusions/shape-inside/shape-inside-text-align.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Consider bottom borders when calculating the position of the overflow
https://bugs.webkit.org/show_bug.cgi?id=117663

Reviewed by Alexandru Chiculita.

When you have a shape and the content overflows from the shape we need to push the overflow below the content box,
not below the border box. We didn't consider the bottom borders of the content box, now I fixed it too and the overflow
just starts after the content box. I added a new helper function called pushShapeContentOverflowBelowTheContentBox. Now
both the shape in flow thread and the shape overflow use the same function. I added a new test and modified the existing
tests to cover all the affected cases.

Source/WebCore:

Test: fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
Existing overflow tests also modified to test the behavior:
      fast/exclusions/shape-inside/shape-inside-empty-expected.html
      fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content-expected.html
      fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
      fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html
      fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html
      fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html
      fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox):
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine):
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):

LayoutTests:

* fast/exclusions/shape-inside/shape-inside-empty-expected.html:
* fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content-expected.html: Copied from LayoutTests/fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html.
* fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html: Copied from LayoutTests/fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html.
* fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html:
* fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CoordinatedGraphics][CSS Shaders] Use forwarding header for TextureMapperPlatformCompiledProgram.h
https://bugs.webkit.org/show_bug.cgi?id=117712

Patch by Ralph Thomas <ralpht@gmail.com> on 2013-06-17
Reviewed by Noam Rosenthal.

* Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
https://bugs.webkit.org/show_bug.cgi?id=20599

Add a "Download Video"/"Download Audio" context menu item to download media
elements.

Patch by Ruth Fong <ruth_fong@apple.com> on 2013-06-17
Reviewed by Beth Dakin.

Source/WebCore:

No new tests. media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.

* English.lproj/Localizable.strings: Updated to
include localizable strings for "Download Video" and "Download Audio".

* page/ContextMenuController.cpp: Updated to
include and handle a "Download Video/Audio" context menu item.

* platform/ContextMenuItem.h:

* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
* platform/gtk/LocalizedStringsGtk.cpp:
* platform/qt/LocalizedStringsQt.cpp:
Updated to include localizable strings for "Download Video" and "Download Audio".

Source/WebKit/efl:

* WebCoreSupport/AssertMatchingEnums.cpp:
* ewk/ewk_contextmenu.h:
Updated to include new EWK enum type for "Download Video/Audio" context menu item.

Source/WebKit2:

* Shared/API/c/WKContextMenuItemTypes.h: Updated to include
an enum type for the "Download Video/Audio" context menu item.

* Shared/API/c/WKSharedAPICast.h: Updated to associate
the enums in WebKit and WebCore that handle the "Download Video/Audio"
context menu item.

* UIProcess/API/efl/ewk_context_menu.cpp:
* UIProcess/API/efl/ewk_context_menu_item.cpp:
* UIProcess/API/efl/ewk_context_menu_item.h:
Updated to include new EWK enum type for "Download Video/Audio" context menu item.

* UIProcess/WebPageProxy.cpp: Updated to
handle the "Download Video/Audio" context menu item mouse click
and download the media item in the UI process.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in loadPendingShaders
https://bugs.webkit.org/show_bug.cgi?id=117665

Reviewed by Dean Jackson.

Speculative fix because the crash reports do not contain a test case.

Rearrange the conditions to check m_state.hasPendingShaders() first. Additionally, check if
m_state.style() is non-null.

No new tests. We don't know how to reproduce this crash yet.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShaders):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modify Windows makefiles to copy some bin output into Program Files.
https://bugs.webkit.org/show_bug.cgi?id=117714.
<rdar://problem/14179054>

Reviewed by Brent Fulgham.

* WTF.vcxproj/WTF.make:
* JavaScriptCore.vcxproj/JavaScriptCore.make:
* WebCore.vcxproj/WebCore.make:
* WebKit.vcxproj/WebKit.make:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PageBanners appear over HTML5 video when media element is in full screen mode
https://bugs.webkit.org/show_bug.cgi?id=117721
-and corresponding-
<rdar://problem/13686998>

Reviewed by Sam Weinig.

Source/WebCore: 

Update the scrolling tree when a header/footer has been removed.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):

Source/WebKit2: 

When an element enters fullscreen, hide the banners. Show them again when the 
element exits fullscreen.
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::willEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):

Handle hiding and showing by removing or re-creating a parent layer for m_layer.
* WebProcess/WebPage/PageBanner.cpp:
(WebKit::PageBanner::hide):
(WebKit::PageBanner::showIfHidden):
* WebProcess/WebPage/PageBanner.h:
* WebProcess/WebPage/mac/PageBannerMac.mm:
(WebKit::PageBanner::PageBanner):
(WebKit::PageBanner::hide):
(WebKit::PageBanner::showIfHidden):
(WebKit::PageBanner::mouseEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::hidePageBanners):
(WebKit::WebPage::showPageBanners):
* WebProcess/WebPage/WebPage.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add some UNUSED_PARAMs to RenderBlock.cpp so that it builds properly if CSS_EXCLUSIONS is disabled.
https://bugs.webkit.org/show_bug.cgi?id=117722.
Rubberstamped by Jon Lee.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Initialize AtomicStringTable in WTFThreadData's constructor
https://bugs.webkit.org/show_bug.cgi?id=117671

Reviewed by Geoffrey Garen.

Extracted AtomicStringTable from AtomicString.cpp into AtomicStringTable.h/cpp
and made WTFThreadDada::WTFThreadData create the atomic string table for the thread.

This eliminates a branch from stringTable() in AtomicString.cpp.

* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/WTFThreadData.cpp:
(WTF::WTFThreadData::WTFThreadData):
* wtf/text/AtomicString.cpp:
(WTF::stringTable):
* wtf/text/AtomicStringTable.cpp: Added.
(WTF::AtomicStringTable::create):
(WTF::AtomicStringTable::destroy):
* wtf/text/AtomicStringTable.h: Added.
(WTF::AtomicStringTable::table):


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

* fast/repaint/table-cell-collapsed-border-scroll-expected.png:
* fast/repaint/table-cell-collapsed-border-scroll-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Correct accessibility role when -webkit-box:display is used.
https://bugs.webkit.org/show_bug.cgi?id=117706

Reviewed by Chris Fleizach.

Source/WebCore: 

accessibility/box-styled-lists.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
of the list element type, treat it as a ListItemRole accessibility role, regardless
of what specific renderer is being used.

LayoutTests: 

* accessibility/box-styled-lists.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/accessibility/box-styled-lists-expected.txt: Added.
* platform/win/TestExpectations:
* platform/win/accessibility/box-styled-lists-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Remove unneeded WebCore namespace in FrameLoaderClientEfl
https://bugs.webkit.org/show_bug.cgi?id=117718

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-06-17
Reviewed by Christophe Dumez.

* WebCoreSupport/FrameLoaderClientEfl.cpp: Remove 'using namespace WebCore'.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed AX gardening of windows-specific results.

* platform/win/accessibility/aria-combobox-expected.txt: Added.
* platform/win/aria-labelledby-on-input-expected.txt: Added.
* platform/win/aria-menubar-menuitems-expected.txt: Added.
* platform/win/aria-roles-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[curl] Set the http response status text
https://bugs.webkit.org/show_bug.cgi?id=117307

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-06-17
Reviewed by Brent Fulgham.

No new tests, covered by existing ones.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Extra whitespace in blank line in PlatformPopupMenuData.cpp
https://bugs.webkit.org/show_bug.cgi?id=117627

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-06-17
Reviewed by Brent Fulgham.

* Shared/PlatformPopupMenuData.cpp:
(WebKit::PlatformPopupMenuData::decode):
Removing extra space

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r149184): Build errors in RefPtr.h when building with Clang, C++98 standard
https://bugs.webkit.org/show_bug.cgi?id=116352

Reviewed by Anders Carlsson.

Use the __has_feature macro instead of the __has_extension one when detecting what features the Clang compiler
that's being used is capable to provide. With the project moving onto using C++11 throughout its components,
there currently exist cases where C++11-specific functionality (for instance std::move) is used despite being
guarded by compiler-specific feature guards that still get enabled even when compiling in C++98 with Clang.
The problematic features are enabled because they're available as C++98 language extensions by Clang.

Using __has_feature instead enables the feature guard only if the tested feature is actually standardized in
the currently used language standard.

* wtf/Compiler.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
A static_assert() in RetainPtr.h sometimes causes the build to fail.

Wrap the first argument to a static_assert() in parentheses since it
contains a comma, which sometimes tricks the preprocessor into thinking
the macro is being passed three arguments rather than two.

Reviewed by Brian Weinstein.

* wtf/RetainPtr.h:
(WTF::RetainPtr::RetainPtr):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Mark two tests that are flakily timing out as slow.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] [texmap] upload a video buffer into the video texture
https://bugs.webkit.org/show_bug.cgi?id=116042

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2013-06-18
Reviewed by Philippe Normand.

This patch prepares more quickly the texture when the video frame is
already in the GPU memory.

It is done using a new buffer's metadata available in GStreamer 1.2,
and its purpose is to upload buffers into a OpenGL texture.

If the decoder provides buffers with this metadata, the buffer will be
uploaded into the texture used for the video display and it will be
rendered, avoiding a expensive mem copies. This is particularly useful
for Full HD videos, where all the processing and display will be done
in the GPU.

No new tests, covered by existing tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkProposeAllocation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][GStreamer] Fullscreen option in video element context menu not working
https://bugs.webkit.org/show_bug.cgi?id=105191

.:

Fullscreen with native controls is outdated and even broken in
[GTK][WK2], so they are deactivated for now.

Patch by Xabier Rodriguez Calvar <calvaris@igalia.com> on 2013-06-18
Reviewed by Philippe Normand.

* Source/autotools/SetupAutoconfHeader.m4: Removed the use of
fullscreen native media controls.

LayoutTests:

Patch by Xabier Rodriguez Calvar <calvaris@igalia.com> on 2013-06-18
Reviewed by Philippe Normand.

* platform/gtk-wk1/TestExpectations:
fullscreen/video-controls-drag.html does not time out anymore.
* platform/gtk-wk2/TestExpectations:
media/video-display-aspect-ratio.html crashes sometimes.
* platform/gtk/TestExpectations:
media/video-playing-and-pause.html was already flaky.

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