Source/WebCore: WebKit2: Add support for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=52343
<rdar://problem/7660558>
               
Reviewed by Darin Adler.

This patch contains the changes required to support dropping content
in WebKit on the Mac. The DragData class has been extended to provide
additional context from the application (keyboard state, modal windows, etc.)
as well as information of the drag pasteboard being used.
The support for WebKit as drag source will be added with a separate patch.

* WebCore.exp.in:
* page/DragController.cpp:
(WebCore::DragController::dragIsMove): Added DragData parameter.
(WebCore::DragController::tryDocumentDrag): Modified call to dragIsMove.
(WebCore::DragController::concludeEditDrag): Same as above.
* page/DragController.h: Added parameter to isCopyKeyDown.
* page/mac/DragControllerMac.mm:
The following methods have been modified to use the information stored
in the DragData class.
(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):
* platform/DragData.h:
(WebCore::DragData::flags):
* platform/DragData.cpp: Added default flags parameter to the constructor.
* platform/mac/DragDataMac.mm:
(WebCore::DragData::DragData): Added constructor that receives the name of the pasteboard to use.
(WebCore::DragData::canSmartReplace):
(WebCore::DragData::containsColor):
(WebCore::DragData::containsFiles):
(WebCore::DragData::asFilenames):
(WebCore::DragData::containsPlainText):
(WebCore::DragData::asPlainText):
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::asURL):
(WebCore::DragData::asFragment):
All the following files have been modified to add the DragData
parameter to isCopyKeyDown. I plan to improve this in the future
and make isCopyKeyDown not platform specific.
* page/android/DragControllerAndroid.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/brew/DragControllerBrew.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/chromium/DragControllerChromium.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/efl/DragControllerEfl.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/haiku/DragControllerHaiku.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/mac/DragControllerMac.mm:
(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):
* page/qt/DragControllerQt.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/win/DragControllerWin.cpp:
(WebCore::DragController::isCopyKeyDown):
* page/wx/DragControllerWx.cpp:
(WebCore::DragController::isCopyKeyDown):

WebKit/mac: WebKit2: Add support for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=52343
<rdar://problem/7660558>
        
Reviewed by Darin Adler.

The DragData class has been extended to provide
additional context from the application (keyboard state, modal windows, etc.)
as well as information of the drag pasteboard being used.
These are the changes to align the behavior for WebKit.

* WebView/WebView.mm:
(-[WebView applicationFlags:]): Added.
(-[WebView draggingEntered:]): Added parameter to the DragData constructor.
(-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
(-[WebView draggingExited:]): Added parameter to the DragData constructor.
(-[WebView performDragOperation:]): Added parameter to the DragData constructor.

WebKit2: WebKit2: Add support for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=52343
<rdar://problem/7660558>
               
Reviewed by Darin Adler.

This patch contains the changes required to support dropping content
in WebKit on the Mac. The DragData class has been extended to provide
additional context from the application (keyboard state, modal windows, etc.)
as well as information of the drag pasteboard being used.
The support for WebKit as drag source will be added with a separate patch.

* Shared/DragControllerAction.h: Added.
* UIProcess/API/mac/WKView.mm:
Added implemention of the methods required to add suport for a drop target.
To maintain asynchronous communication with the WebProcess, we always return
the previous calculated value for the drag operation.
(-[WKView _registerDraggedTypes]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView applicationFlags:]):
(-[WKView draggingEntered:]):
(-[WKView draggingUpdated:]):
(-[WKView draggingExited:]):
(-[WKView prepareForDragOperation:]):
(-[WKView performDragOperation:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::performDragControllerAction):
(WebKit::WebPageProxy::didPerformDragControllerAction):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::dragOperation):
(WebKit::WebPageProxy::resetDragOperation):
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::willPerformDragDestinationAction):
(WebKit::WebDragClient::willPerformDragSourceAction):
(WebKit::WebDragClient::actionMaskForDrag):
(WebKit::WebDragClient::dragSourceActionMaskForPoint):
(WebKit::WebDragClient::startDrag):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Justin Schuh  <jschuh@chromium.org>

        Unreviewed chromium expectations update.

        Remove exception for canvas-large-dimensions.html.

        * platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        Transferring nodes between documents should be aware of the shadow DOM.
        https://bugs.webkit.org/show_bug.cgi?id=52399

        No visible change in behavior at the moment.

        Once https://bugs.webkit.org/show_bug.cgi?id=52317 lands, the following
        tests should no longer crash:
        * fast/css/pseudo-in-range-invalid-value.html
        * fast/css/pseudo-in-range.html
        * fast/forms/form-collection-elements.html
        * fast/forms/range-keyoperation.html

        * dom/Document.cpp:
        (WebCore::Document::adoptNode): Changed to use Node::setDocumentRecursively.
        * dom/Node.cpp:
        (WebCore::Node::setDocumentRecursively): Added new method, taking existing
            logic and adding shadow DOM traversal.
        (WebCore::Node::traverseNextNode): Style fix.
        (WebCore::Node::traverseNextSibling): Ditto.
        (WebCore::Node::traversePreviousNode): Ditto.
        (WebCore::Node::traversePreviousNodePostOrder): Ditto.
        (WebCore::Node::checkReplaceChild): Changed to use setDocumentRecursively.
        (WebCore::Node::checkAddChild): Ditto.
        * dom/Node.h: Added def.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Adam Barth.

        add container divs for diff blocks
        https://bugs.webkit.org/show_bug.cgi?id=52400

        This will help simplify a lot of code in code-review.js
        and make side-by-side diffs better (i.e. put removed lines
        to the left of corresponding added lines).

        Also, allow for running the JS from a local file. Now you can modify code-review.js
        to point to a local file and then run:
        ruby prettify.rb < foo.diff > foo.html

        foo.html will load a dummy code review matching foo.diff.

        Before structure:
        Line
        Line remove
        Line add
        Line add
        Line

        After structure:
        DiffBlock
          DiffBlockPart shared
            Line shared
        DiffBlock
          DiffBlockPart remove
            Line remove
          DiffBlockPart add
            Line add
            Line add
        DiffBlock
          DiffBlockPart shared
            Line shared

        * PrettyPatch/PrettyPatch.rb:
        * code-review.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Rename RGBA32Buffer to ImageFrame
        https://bugs.webkit.org/show_bug.cgi?id=52363

        Update references to the new name.

        * src/WebImageDecoder.cpp:
        (WebKit::WebImageDecoder::isFrameCompleteAtIndex):
        (WebKit::WebImageDecoder::getFrameAtIndex):
2011-01-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Rename RGBA32Buffer to ImageFrame
        https://bugs.webkit.org/show_bug.cgi?id=52363

        RGBA32Buffer is a terrible misnomer.  ImageFrame is vastly
        more accurate.  More cleanup to come.

        * WebCore.pro:
        * platform/graphics/ImageSource.cpp:
        (WebCore::ImageSource::createFrameAtIndex):
        (WebCore::ImageSource::frameDurationAtIndex):
        (WebCore::ImageSource::frameIsCompleteAtIndex):
        * platform/graphics/qt/ImageDecoderQt.cpp:
        (WebCore::ImageDecoderQt::frameBufferAtIndex):
        (WebCore::ImageDecoderQt::internalReadImage):
        (WebCore::ImageDecoderQt::internalHandleCurrentImage):
        * platform/graphics/qt/ImageDecoderQt.h:
        * platform/graphics/wince/ImageWinCE.cpp:
        (WebCore::ImageFrame::asNewNativeImage):
        * platform/image-decoders/ImageDecoder.cpp:
        (WebCore::ImageFrame::ImageFrame):
        (WebCore::ImageFrame::operator=):
        (WebCore::ImageFrame::clear):
        (WebCore::ImageFrame::zeroFill):
        (WebCore::ImageFrame::copyReferenceToBitmapData):
        (WebCore::ImageFrame::copyBitmapData):
        (WebCore::ImageFrame::setSize):
        (WebCore::ImageFrame::hasAlpha):
        (WebCore::ImageFrame::setHasAlpha):
        (WebCore::ImageFrame::setColorProfile):
        (WebCore::ImageFrame::setStatus):
        (WebCore::ImageFrame::width):
        (WebCore::ImageFrame::height):
        * platform/image-decoders/ImageDecoder.h:
        (WebCore::ImageFrame::ImageFrame):
        * platform/image-decoders/bmp/BMPImageDecoder.cpp:
        (WebCore::BMPImageDecoder::frameBufferAtIndex):
        (WebCore::BMPImageDecoder::decode):
        * platform/image-decoders/bmp/BMPImageDecoder.h:
        * platform/image-decoders/bmp/BMPImageReader.cpp:
        (WebCore::BMPImageReader::decodeBMP):
        * platform/image-decoders/bmp/BMPImageReader.h:
        (WebCore::BMPImageReader::setBuffer):
        * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
        (WebCore::ImageFrame::asNewNativeImage):
        * platform/image-decoders/cg/ImageDecoderCG.cpp:
        (WebCore::getPtrAsPixelData):
        (WebCore::ImageFrame::copyReferenceToBitmapData):
        (WebCore::ImageFrame::copyBitmapData):
        (WebCore::ImageFrame::setSize):
        (WebCore::ImageFrame::asNewNativeImage):
        * platform/image-decoders/gif/GIFImageDecoder.cpp:
        (WebCore::GIFImageDecoder::frameBufferAtIndex):
        (WebCore::GIFImageDecoder::clearFrameBufferCache):
        (WebCore::GIFImageDecoder::haveDecodedRow):
        (WebCore::GIFImageDecoder::frameComplete):
        (WebCore::GIFImageDecoder::initFrameBuffer):
        * platform/image-decoders/gif/GIFImageDecoder.h:
        * platform/image-decoders/gif/GIFImageReader.cpp:
        (GIFImageReader::read):
        * platform/image-decoders/gif/GIFImageReader.h:
        (GIFFrameReader::GIFFrameReader):
        * platform/image-decoders/haiku/ImageDecoderHaiku.cpp:
        (WebCore::ImageFrame::asNewNativeImage):
        * platform/image-decoders/ico/ICOImageDecoder.cpp:
        (WebCore::ICOImageDecoder::frameBufferAtIndex):
        (WebCore::ICOImageDecoder::decode):
        * platform/image-decoders/ico/ICOImageDecoder.h:
        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
        (WebCore::JPEGImageDecoder::frameBufferAtIndex):
        (WebCore::JPEGImageDecoder::outputScanlines):
        (WebCore::JPEGImageDecoder::jpegComplete):
        (WebCore::JPEGImageDecoder::decode):
        * platform/image-decoders/jpeg/JPEGImageDecoder.h:
        * platform/image-decoders/openvg/ImageDecoderOpenVG.cpp:
        (WebCore::ImageFrame::asNewNativeImage):
        * platform/image-decoders/png/PNGImageDecoder.cpp:
        (WebCore::PNGImageDecoder::frameBufferAtIndex):
        (WebCore::PNGImageDecoder::rowAvailable):
        (WebCore::PNGImageDecoder::pngComplete):
        * platform/image-decoders/png/PNGImageDecoder.h:
        (WebCore::PNGImageDecoder::isComplete):
        * platform/image-decoders/qt/ImageFrameQt.cpp: Copied from Source/WebCore/platform/image-decoders/qt/RGBA32BufferQt.cpp.
        (WebCore::ImageFrame::ImageFrame):
        (WebCore::ImageFrame::operator=):
        (WebCore::ImageFrame::clear):
        (WebCore::ImageFrame::zeroFill):
        (WebCore::ImageFrame::copyBitmapData):
        (WebCore::ImageFrame::setSize):
        (WebCore::ImageFrame::asNewNativeImage):
        (WebCore::ImageFrame::hasAlpha):
        (WebCore::ImageFrame::setHasAlpha):
        (WebCore::ImageFrame::setColorProfile):
        (WebCore::ImageFrame::setStatus):
        (WebCore::ImageFrame::setPixmap):
        (WebCore::ImageFrame::width):
        (WebCore::ImageFrame::height):
        * platform/image-decoders/qt/RGBA32BufferQt.cpp: Removed.
        * platform/image-decoders/skia/ImageDecoderSkia.cpp:
        (WebCore::ImageFrame::ImageFrame):
        (WebCore::ImageFrame::operator=):
        (WebCore::ImageFrame::clear):
        (WebCore::ImageFrame::zeroFill):
        (WebCore::ImageFrame::copyBitmapData):
        (WebCore::ImageFrame::setSize):
        (WebCore::ImageFrame::asNewNativeImage):
        (WebCore::ImageFrame::hasAlpha):
        (WebCore::ImageFrame::setHasAlpha):
        (WebCore::ImageFrame::setColorProfile):
        (WebCore::ImageFrame::setStatus):
        (WebCore::ImageFrame::width):
        (WebCore::ImageFrame::height):
        * platform/image-decoders/webp/WEBPImageDecoder.cpp:
        (WebCore::WEBPImageDecoder::frameBufferAtIndex):
        (WebCore::WEBPImageDecoder::decode):
        * platform/image-decoders/webp/WEBPImageDecoder.h:
        * platform/image-decoders/wx/ImageDecoderWx.cpp:
        (WebCore::ImageFrame::asNewNativeImage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        Flip input[type=range] to use the new shadow DOM model.
        https://bugs.webkit.org/show_bug.cgi?id=52317

        This is a straight-up flip, minimal change to the logic, which will be
        refactored in a follow-up patch.

        Covered by existing tests.

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::initForStyleResolve): Changed to use either
            host or parent node to find parent.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::updateType): Added logic for destroying/creating
            shadow DOM subtree.
        * html/InputType.cpp:
        (WebCore::InputType::createShadowSubtree): Added empty decl.
        (WebCore::InputType::destroyShadowSubtree): Added a method to destroy
            shadow subtree.
        * html/InputType.h: Added defs.
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::createShadowSubtree): Added a virtual method to create
            slider thumb.
        * html/RangeInputType.h: Adde def.
        * html/shadow/SliderThumbElement.cpp: Added temporary RenderSliderThumb class
            to handle cascading appearance.
        (WebCore::RenderSliderThumb::RenderSliderThumb): Added.
        (WebCore::RenderSliderThumb::layout): Moved here the logic from
            RenderSlider::createThumbStyle.
        (WebCore::SliderThumbElement::createRenderer): Added virtual method to
            create RenderSliderThumb instance.
        (WebCore::SliderThumbElement::defaultEventHandler): Changed to use HTMLDivElement
            as base class.
        (WebCore::SliderThumbElement::detach): Ditto.
        * html/shadow/SliderThumbElement.h:
        (WebCore::SliderThumbElement::SliderThumbElement): Ditto.
        (WebCore::SliderThumbElement::create): Ditto.
        (WebCore::toSliderThumbElement): Added a casting helper.
        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlInputElement::attach): Added handling of shadow DOM,
            since the whole method is hand-rolled.
        (WebCore::MediaControlInputElement::updateStyle): Ditto.
        * rendering/RenderSlider.cpp:
        (WebCore::RenderSlider::~RenderSlider): Removed unneeded code.
        (WebCore::RenderSlider::thumbRect): Changed to use sliderThumbElement helper.
        (WebCore::RenderSlider::layout): Ditto.
        (WebCore::RenderSlider::sliderThumbElement): Added a temporary helper to access
            SliderThumbElement.
        (WebCore::RenderSlider::mouseEventIsInThumb): Changed to use sliderThumbElement helper.
        (WebCore::RenderSlider::mouseEventOffsetToThumb): Ditto.
        (WebCore::RenderSlider::setValueForPosition): Ditto.
        (WebCore::RenderSlider::positionForOffset): Ditto.
        (WebCore::RenderSlider::currentPosition): Ditto.
        (WebCore::RenderSlider::trackSize): Ditto.
        (WebCore::RenderSlider::forwardEvent): Ditto.
        (WebCore::RenderSlider::inDragMode): Ditto.
        * rendering/RenderSlider.h: Added def.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Adam Barth.

        simplify keyboard handling in code review tool
        https://bugs.webkit.org/show_bug.cgi?id=52407

        Now that we have DiffBlock containers, the only things that are
        focusable are previousComment nodes and DiffBlock containers
        that contain add/remove lines.

        Also, this means we show the focus border around the entire diff
        instead of just the first line.

        * code-review.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Evan Martin  <evan@chromium.org>

        Reviewed by Tony Chang.

        [chromium] drop backwards iteration in Linux complex text code
        https://bugs.webkit.org/show_bug.cgi?id=52403

        ComplexTextController previously supported iterating through the text in
        both directions, but this resulted in duplicate code for each path.
        Instead, by being more careful about flipping signs where appropriate,
        we can refactor the code into one code path.

        No tests, just a refactoring; should be covered by existing tests.

        * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
        (WebCore::ComplexTextController::ComplexTextController):
        (WebCore::ComplexTextController::reset):
        (WebCore::ComplexTextController::nextScriptRun):
        * platform/graphics/chromium/ComplexTextControllerLinux.h:
        * platform/graphics/chromium/FontLinux.cpp:
        (WebCore::glyphIndexForXPositionInScriptRun):
        (WebCore::Font::selectionRectForComplexText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Mihai Parparita  <mihaip@chromium.org>

        Unreviewed chromium expectations update.

        Categorize remaining scrollbar-related failures. 6 are due to bug 52414
        (small remaining difference between mac and chromium-mac scrollbars).
        fast/text/international/thai-line-breaks.html just needed a baseline
        update (done for both Leopard and Snow Leopard).

        * platform/chromium-mac-leopard/fast/text/international/thai-line-breaks-expected.checksum: Added.
        * platform/chromium-mac-leopard/fast/text/international/thai-line-breaks-expected.png: Added.
        * platform/chromium-mac/fast/text/international/thai-line-breaks-expected.checksum: Added.
        * platform/chromium-mac/fast/text/international/thai-line-breaks-expected.png: Added.
        * platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The pageScaleFactor() should be saved/restored along with the scroll position
https://bugs.webkit.org/show_bug.cgi?id=52406
<rdar://problem/8714412>

Reviewed by Darin Adler and Brady Eidson.

* history/HistoryItem.cpp:
(WebCore::HistoryItem::HistoryItem): Initialize m_pageScaleFactor.
(WebCore::HistoryItem::pageScaleFactor): Added getter.
(WebCore::HistoryItem::setPageScaleFactor): Added setter.
(WebCore::HistoryItem::encodeBackForwardTreeNode): Encode m_pageScaleFactor.
(WebCore::HistoryItem::decodeBackForwardTree): Decode m_pageScaleFactor.
* history/HistoryItem.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem): Save the page scale factor...
(WebCore::HistoryController::restoreScrollPositionAndViewState): ...and restore it here.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  John Abd-El-Malek  <jam@chromium.org>

        Reviewed by Mihai Parparita.

        [chromium] Fix minor type in plugin printing
        https://bugs.webkit.org/show_bug.cgi?id=52410

        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::printBegin):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Eric Seidel  <eric@webkit.org>

        Reviewed by Adam Barth.

        results archives from commit-queue are too large to upload
        https://bugs.webkit.org/show_bug.cgi?id=52405

        * Scripts/webkitpy/common/system/filesystem.py:
        * Scripts/webkitpy/common/system/filesystem_mock.py:
        * Scripts/webkitpy/tool/commands/queues.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Eric Seidel  <eric@webkit.org>

        Reviewed by Mihai Parparita.

        webkit-patch suggest-reviewers fails due to invalid utf8 in ChangeLog files
        https://bugs.webkit.org/show_bug.cgi?id=52416

        Example: webkit-patch suggest-reviewers -g ca3890fe74d94d85d6bfa48f9ea497b094d8e717
        UnicodeDecodeError: 'utf8' codec can't decode bytes in position 536-538: invalid data

        I also added FIXMEs about the changed_files returning deleted files problem
        which is causing the other most common exception for suggest-reviewers
        (and is probably breaking sheriff-bots blame detection).

        * Scripts/webkitpy/common/checkout/api.py:
        * Scripts/webkitpy/common/checkout/api_unittest.py:
        * Scripts/webkitpy/common/checkout/scm.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Mihai Parparita  <mihaip@chromium.org>

        Unreviewed chromium expectations update.

        Add Chromium Snow Leopard expectations. These need to go into a new
        chromium-mac-snowleopard directory, since these tests do not have
        chromium-mac expectations, but currently pass on Leopard.

        The differences are due to bug 52335 (which explains why we can't use
        the regular mac port Snow Leopard baselines).

        * platform/chromium-mac-snowleopard/css1/box_properties/clear-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css1/box_properties/clear-expected.png: Added.
        * platform/chromium-mac-snowleopard/css1/box_properties/float-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css1/box_properties/float-expected.png: Added.
        * platform/chromium-mac-snowleopard/css1/text_properties/vertical_align-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css1/text_properties/vertical_align-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5501-imrgn-t-00-b-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5501-imrgn-t-00-b-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5502-mrgn-r-00-c-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5502-mrgn-r-00-c-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5503-imrgn-b-00-b-a-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5503-imrgn-b-00-b-a-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5504-mrgn-l-00-c-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5504-mrgn-l-00-c-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5505-mrgn-00-b-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0803-c5505-mrgn-00-b-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0905-c414-flt-01-d-g-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t0905-c414-flt-01-d-g-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100304-c43-rpl-bbx-00-d-g-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100304-c43-rpl-bbx-00-d-g-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t1008-c44-ln-box-00-d-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t1008-c44-ln-box-00-d-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t1008-c44-ln-box-02-d-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t1008-c44-ln-box-02-d-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t1008-c44-ln-box-03-d-ag-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t1008-c44-ln-box-03-d-ag-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-02-d-agi-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-02-d-agi-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-03-d-agi-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-03-d-agi-expected.png: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-04-d-agi-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/css2.1/t100801-c544-valgn-04-d-agi-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/css/resize-corner-tracking-transformed-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/css/resize-corner-tracking-transformed-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/forms/searchfield-heights-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/forms/searchfield-heights-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/forms/slider-thumb-shared-style-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/forms/slider-thumb-shared-style-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/gradients/background-clipped-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/gradients/background-clipped-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/replaced/selection-rect-transform-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/replaced/selection-rect-transform-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/text/whitespace/tab-character-basics-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/text/whitespace/tab-character-basics-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/transforms/diamond-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/transforms/diamond-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/transforms/shadows-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/transforms/shadows-expected.png: Added.
        * platform/chromium-mac-snowleopard/fast/transforms/transformed-caret-expected.checksum: Added.
        * platform/chromium-mac-snowleopard/fast/transforms/transformed-caret-expected.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Robert Hogan  <robert@webkit.org>

        Reviewed by Andreas Kling.

        [Qt] Unskip http/tests/security/originHeader/origin-header-for-empty.html
        https://bugs.webkit.org/show_bug.cgi?id=52389

        * platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Martin Robinson  <mrobinson@igalia.com>

        Unreviewed, rolling out r75740.
        http://trac.webkit.org/changeset/75740

        This led to GTK+ redness

        * platform/gtk/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-01-13  Justin Schuh  <jschuh@chromium.org>

        Unreviewed chromium expectations update.

        Several text layout tests failing on linux after r75756

        * platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.

Reviewed by Geoff Garen.

* DerivedSources.make: Create a header file, HeaderDetection.h, that tells
us whether pthread_machdep.h is available.
* wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then
don't do the pthread_getspecific_function_pointer trick.
(WTF::setThreadHeap): Ditto, but set thread-specific data.
(WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don’t try to compile InjectedScriptSource.js into WebCore.

Reviewed by Mark Rowe.

* WebCore.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/8827065> REGRESSION (r71884): Cross-origin XHR fails if willSendRequest changes the URL
https://bugs.webkit.org/show_bug.cgi?id=52419

Reviewed by Alexey Proskuryakov.

Source/WebCore: 

Test: http/tests/loading/cross-origin-XHR-willLoadRequest.html

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::init): Complete r74453 by ensuring that m_request is only set after
willSendRequest(). Otherwise, willSendRequest() ends up calling into
ThreadableDocumentRequest::willSendRequest(), which cancels the request.

Tools: 

Allow to further control the behavior of the willSendRequest delegate callback by making it
set a different URL in the new request.

* DumpRenderTree/LayoutTestController.cpp:
(addURLToRedirectCallback): Added.
(LayoutTestController::staticFunctions): Added addURLToRedirect.
(LayoutTestController::addURLToRedirect): Added. Adds the redirection to the map.
(LayoutTestController::redirectionDestinationForURL): Added this getter.
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/mac/ResourceLoadDelegate.mm:
(-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): Check
if there is a redirection for the request’s URL, established by addURLToRedirect(), and if so,
change the URL in the new request to the redirect destination.

LayoutTests: 

* http/tests/loading/cross-origin-XHR-willLoadRequest-expected.txt: Added.
* http/tests/loading/cross-origin-XHR-willLoadRequest.html: Added.
* platform/gtk/Skipped: Skip the new test.
* platform/qt/Skipped: Ditto.
* platform/win/Skipped: Ditto.



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