[chromium] Fix crash in DragImageTest caused by r122996
https://bugs.webkit.org/show_bug.cgi?id=91653

Patch by Varun Jain <varunjain@chromium.org> on 2012-07-18
Reviewed by Tony Chang.

Covered by existing DragImageTest.

* platform/chromium/DragImageChromiumSkia.cpp:
(WebCore::deleteDragImage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
nrwt: start merging port/webkit.py into port/base.py
https://bugs.webkit.org/show_bug.cgi?id=91559

Reviewed by Ojan Vafai.

Since all the non-test port implementations now derive from
WebKitPort, there's no real point in keeping WebKitPort distinct
from Port. This patch starts merging the two by moving nearly
all of the webkit implementations of routines with no default
behavior into base.py. The few that didn't move rely on
additional infrastructure that should be refactored differently
(like the image diffing, which should probably be its own
class) and deserve their own patches.

This patch should just be moving code around, and require no
additional tests; in fact, we can delete the tests that were
asserting virtual methods in the base class.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.baseline_search_path):
(Port.check_build):
(Port):
(Port._check_driver):
(Port._check_port_build):
(Port.check_image_diff):
(Port.driver_name):
(Port.default_results_directory):
(Port.to.setup_environ_for_server):
(Port._path_to_apache):
(Port._is_redhat_based):
(Port._is_debian_based):
(Port._apache_config_file_name_for_platform):
(Port._path_to_apache_config_file):
(Port._build_path):
(Port._path_to_driver):
(Port._path_to_webcore_library):
(Port._path_to_helper):
(Port._path_to_image_diff):
(Port._path_to_wdiff):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_httpd_returns_error_code):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort):
(WebKitPort._build_driver_flags):
(WebKitPort._read_image_diff):
(WebKitPort.skipped_layout_tests):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Fix compile on Windows.

148>tests\LayerChromiumTest.cpp(510): warning C4305: 'argument' : truncation from 'double' to 'float'

* tests/LayerChromiumTest.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Add central error management to EFL port
https://bugs.webkit.org/show_bug.cgi?id=91598

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-18
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Define possible error types in ErrorsEfl so
that we can reuse the header in both WebKit1
and WebKit2. This is inspired from the GTK
port.

No new tests, no behavior change.

* PlatformEfl.cmake:
* platform/efl/ErrorsEfl.cpp: Added.
(WebCore):
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadNetworkError):
(WebCore::downloadCancelledByUserError):
(WebCore::downloadDestinationError):
(WebCore::printError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
* platform/efl/ErrorsEfl.h: Added.
(WebCore):

Source/WebKit/efl:

Make use of ErrorsEfl header from WebCore in
EFL's FrameLoaderClient now that we have
a central place for errors.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::cancelledError):
(WebCore::FrameLoaderClientEfl::blockedError):
(WebCore::FrameLoaderClientEfl::cannotShowURLError):
(WebCore::FrameLoaderClientEfl::interruptedForPolicyChangeError):
(WebCore::FrameLoaderClientEfl::cannotShowMIMETypeError):
(WebCore::FrameLoaderClientEfl::fileDoesNotExistError):
(WebCore::FrameLoaderClientEfl::pluginWillHandleLoadError):
(WebCore::FrameLoaderClientEfl::shouldFallBack):

Source/WebKit2:

Make use of ErrorsEfl header from WebCore in
WebKit2, for Ewk_Web_Error and WebErrorsEfl.

* UIProcess/API/efl/ewk_web_error.cpp:
(ewk_web_error_type_get):
* UIProcess/API/efl/ewk_web_error.h:
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
(WebKit::cancelledError):
(WebKit::blockedError):
(WebKit::cannotShowURLError):
(WebKit::interruptedForPolicyChangeError):
(WebKit::cannotShowMIMETypeError):
(WebKit::fileDoesNotExistError):
(WebKit::pluginWillHandleLoadError):

Tools:

Map WebKitNetworkError to NSURLErrorDomain when
printing in DumpRenderTree so that the output
matches the expected one.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(descriptionSuitableForTestResult):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unify allowfullscreen logic in Document::webkitFullScreenEnabled and fullScreenIsAllowedForElement.
https://bugs.webkit.org/show_bug.cgi?id=91448

Reviewed by Adrienne Walker.

Unifies redundant traversal logic and static cast previously used
to determine if an element or document can be made fullscreen.
This clean up prepares for pointer lock, which will use the same logic.

Added a test to detect an edge case of an owning document with
fullscreen permision moving an iframe to fullscreen, while that iframe
does not have permision for its contents to be made fullscreen.

Source/WebCore:

Test: fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent.html

* dom/Document.cpp:
(WebCore::isAttributeOnAllOwners):
(WebCore::Document::fullScreenIsAllowedForElement):
(WebCore::Document::webkitFullscreenEnabled):

LayoutTests:

* fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent-expected.txt: Added.
* fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix up old name in RuleSet::addRulesFromSheet
https://bugs.webkit.org/show_bug.cgi?id=91646

Reviewed by Andreas Kling.

Simple parameter rename, no change in functionality.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList): Renamed styleSelector to resolver to reflect recent rename of the parameter type.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123006 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, more compile fixes on Chromium Win.

Source/WebKit/chromium:

* tests/WebTransformationMatrixTest.cpp:
(WebKit::TEST):

Tools:

* DumpRenderTree/chromium/TestShellWin.cpp:
(TestShell::waitTestFinished):
* DumpRenderTree/chromium/WebThemeControlDRTWin.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123007 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make TextCodecLatin1 handle 8 bit data without converting to UChar's
https://bugs.webkit.org/show_bug.cgi?id=90319

Reviewed by Oliver Hunt.

Source/WebCore: 

Updated codec to create 8 bit strings where possible.
We assume that the incoming stream can all be decoded as 8-bit values.
If we find a 16-bit value, we take the already decoded data and
copy / convert it to a 16-bit buffer and then continue process the rest
of the stream as 16-bits.

No new tests, functionality covered with existing tests.

* platform/text/TextCodecASCIIFastPath.h:
(WebCore::copyASCIIMachineWord):
* platform/text/TextCodecLatin1.cpp:
(WebCore::TextCodecLatin1::decode):

Source/WTF: 

* wtf/text/StringImpl.h:
(StringImpl): Exported LChar variant of adopt().
* wtf/text/WTFString.h:
(WTF::String::createUninitialized): Exported LChar variant.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Chromium Mac: Add TEXTURE_RECTANGLE_ARB support to CCVideoLayerImpl
https://bugs.webkit.org/show_bug.cgi?id=91169

Patch by Sailesh Agrawal <sail@chromium.org> on 2012-07-18
Reviewed by Adrienne Walker.

Source/Platform:

Added a "orientation" field to WebCompositorIOSurfaceQuad. This is used at draw time to flip the texture if necessary.

* chromium/public/WebCompositorIOSurfaceQuad.h: Added orientation field to the constructor.
(WebKit::WebCompositorIOSurfaceQuad::orientation):
(WebCompositorIOSurfaceQuad): The new orientation field should be set to Flipped if the texture should be flipped when drawing.

Source/WebCore:

This extends CCVideoLayerImpl to support TEXTURE_RECTANGLE_ARB. This texture target is used by the Mac hardware accelerated video decoder.

No new tests (HW video decode on Mac is being tested manually.).

* platform/chromium/support/WebCompositorIOSurfaceQuad.cpp:
(WebKit::WebCompositorIOSurfaceQuad::create): Added an orientation argument.
(WebKit::WebCompositorIOSurfaceQuad::WebCompositorIOSurfaceQuad): Added an orientation argument.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawIOSurfaceQuad): Added support for non-flipped IOSurface textures.
* platform/graphics/chromium/LayerRendererChromium.h:
(LayerRendererChromium): Changed TextureIOSurfaceProgram to be non-flipped. To draw flipped textures drawIOSurfaceQuad sets a different value for texTransformLocation.
* platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
(WebCore::CCIOSurfaceLayerImpl::appendQuads): Updated call to CCIOSurfaceDrawQuad constructor.
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
(WebCore::CCVideoLayerImpl::appendQuads): Added support for drawing TEXTURE_RECTANGLE_ARB textures.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] ewk_cookie_manager_persistent_storage_set is not exported
https://bugs.webkit.org/show_bug.cgi?id=91647

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-18
Reviewed by Gustavo Noronha Silva.

Properly export ewk_cookie_manager_persistent_storage_set in
ewk_cookie_manager.h by using EAPI.

* UIProcess/API/efl/ewk_cookie_manager.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make TextCodecUTF8 handle 8 bit data without converting to UChar's
https://bugs.webkit.org/show_bug.cgi?id=90320

Reviewed by Oliver Hunt.

Change UTF8 Codec to produce 8-bit strings when data fits in 8-bit range.
First we try decoding the string as all 8-bit and then fall back to 16 bit
when we find the first character that doesn't fit in 8 bits.  Then we take
the already decoded data and copy / convert it to a 16-bit buffer and then
continue process the rest of the stream as 16-bits.

No new tests, no change in functionality.

* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::handleError):
(WebCore::TextCodecUTF8::decode):
* platform/text/TextCodecUTF8.h:
(TextCodecUTF8):


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