Make testapi.c compile under MSVC

         Currently you must compile testapi.c as C++ code since MSVC does not
         support many C features that GCC does.

         Reviewed by Steve Falkenburg.

         * API/testapi.c:
         (nan): Added an implementation of this for MSVC.
         (assertEqualsAsUTF8String): Use malloc instead of dynamically-sized
         stack arrays.
         (assertEqualsAsCharactersPtr): Ditto.
         (print_callAsFunction): Ditto.
         (main): Ditto, and explicitly cast from UniChar* to JSChar*.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix Bug 18077: Integrate testapi.c into the Windows build

JavaScriptCore:

        Fix Bug 18077: Integrate testapi.c into the Windows build

        <http://bugs.webkit.org/show_bug.cgi?id=18077>

        Reviewed by Steve Falkenburg.

        * JavaScriptCore.vcproj/testapi/testapi.vcproj: Added.

WebCore:

        Add an UnusedParam.h forwarding header for use by testapi

        Reviewed by Steve Falkenburg.

        * ForwardingHeaders/wtf/UnusedParam.h: Added.

WebKit/win:

        Fix Bug 18077: Integrate testapi.c into the Windows build

        <http://bugs.webkit.org/show_bug.cgi?id=18077>

        Reviewed by Steve Falkenburg.

        * WebKit.vcproj/WebKit.sln: Added testapi.vcproj to the solution.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim.

        -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
        -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
        -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
        - XMLHttpRequestResources now identify themselves to the inspector which caches the data related to
        the request since no one else caches it.  However this is just the plumbing and the Inspector's UI
        has not been changed to show XHR resources yet. 

        * page/InspectorController.cpp: Add ability to set XHR data on an InspectorResource.
        (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
        (WebCore::XMLHttpRequestResource::data):
        (WebCore::XMLHttpRequestResource::encoding):
        (WebCore::InspectorResource::): Add new type.
        (WebCore::InspectorResource::~InspectorResource): No longer virtual since we are not using inheritance.
        (WebCore::InspectorResource::type): Ditto.
        (WebCore::InspectorResource::setXMLHttpRequestResource):
        (WebCore::InspectorResource::isXHR):
        (WebCore::InspectorResource::xmlHttpRequestData):
        (WebCore::InspectorResource::xmlHttpRequestEncoding):
        (WebCore::InspectorResource::InspectorResource):
        (WebCore::addSourceToFrame):
        (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
        * page/InspectorController.h: Add accessor for setting the XHR data.
        * page/inspector/Resource.js: Keep the XHR resource types in sync with the Inspector Controller.
        * xml/XMLHttpRequest.cpp: Give the InspectorController the XHR information to cache.
        (WebCore::XMLHttpRequest::send):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adam.

        - Added a null check

        * xml/XMLHttpRequest.cpp: Null check
        (WebCore::XMLHttpRequest::send):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Adam.

        - Cleaned up the needless use of RefPtrs, which we may someday no longer use for
        InspectorResources.

        * page/InspectorController.cpp:
        (WebCore::InspectorController::didFinishLoading):
        (WebCore::InspectorController::didFailLoading):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Brady Eidson  <beidson@apple.com>

        Attempt to fix .bkl build systems after recent archive additions

        * webcore-base.bkl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Brady Eidson  <beidson@apple.com>

        Reviewed by Anders

        Add the ability to transform a CString into a SharedBuffer to avoid copying data
        This is valuable to avoid copying a block of data for an upcoming patch

        * platform/SharedBuffer.cpp:
        (WebCore::SharedBuffer::adoptVector):
        * platform/SharedBuffer.h:

        * platform/text/CString.cpp:
        (WebCore::CString::releaseBuffer):
        * platform/text/CString.h:
        (WebCore::CStringBuffer::releaseBuffer):



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

2008-03-25  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17252
          Acid3 test removing Nodes during NodeIterator walk fails (affects Acid3 test 2)

        Test: traversal/acid3-test-2.html

        * bindings/js/JSNodeIteratorCustom.cpp:
        (WebCore::JSNodeIterator::nextNode): Update since result is PassRefPtr.
        (WebCore::JSNodeIterator::previousNode): Ditto.
        * dom/NodeIterator.cpp:
        (WebCore::NodeIterator::nextNode): Changed result to PassRefPtr. Added code to
        track both the current candidate (which needs to move along to the next node
        if current node is deleted) and the current provisional result (passed to acceptNode,
        and needs to be returned even if it's deleted).
        (WebCore::NodeIterator::previousNode): Ditto.
        (WebCore::NodeIterator::nodeWillBeRemoved): Call updateForNodeRemoval for
        m_candidateNode as well as m_referenceNode.
        * dom/NodeIterator.h: Use PassRefPtr for return values.

LayoutTests:

2008-03-25  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - test for http://bugs.webkit.org/show_bug.cgi?id=17252
          Acid3 test removing Nodes during NodeIterator walk fails (affects Acid3 test 2)

        * traversal/acid3-test-2-expected.txt: Added.
        * traversal/acid3-test-2.html: Added.
        * traversal/resources/acid3-test-2.js: Added.
        * traversal/resources/exception-forwarding.js: Removed bogus extra line of code.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Matt Lilek  <webkit@mattlilek.com>

        Rubber stamped by Adam

        Roll out r30300 since it causes assertion failures on page load.
        See http://bugs.webkit.org/show_bug.cgi?id=18093

        * page/InspectorController.cpp:
        (WebCore::InspectorController::didFinishLoading):
        (WebCore::InspectorController::didFailLoading):



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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Attempted build fix

        * WebKit.vcproj/WebKit.sln: Make testapi build after most other
        projects.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-25  Antti Koivisto  <antti@apple.com>

        Reviewed by Oliver.

        Fix http://bugs.webkit.org/show_bug.cgi?id=18082
        REGRESSION (r31287): GMail does not work if user stylesheet is set
        
        Oops, my cache refactoring patch was missing these rather essential lines for
        user stylesheets. They would get reloaded repeatedly.

        * loader/Cache.cpp:
        (WebCore::Cache::requestUserCSSStyleSheet):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Windows build fix

        * DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj:
        Add $(WebKitLibrariesDir)\include to the include path so we can find
        stdint.h there.


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

2008-03-25  Beth Dakin  <bdakin@apple.com>

        Reviewed by Oliver.

        Fix for <rdar://problem/5811826> CSSValueList::item() does not 
        range-check index

        Check bounds before accessing the item to avoid a crash. 
        itemWithoutBoundsCheck() is still inlined and not bounds-checked to 
        avoid slowing down our internal callers of item().
        * css/CSSValueList.cpp:
        (WebCore::CSSValueList::item):
        * css/CSSValueList.h:
        (WebCore::CSSValueList::itemWithoutBoundsCheck):

        Call itemWithoutBoundsCheck() to avoid slowing down these internal 
        callers.
        * css/CSSFontSelector.cpp:
        (WebCore::CSSFontSelector::addFontFaceRule):
        * css/CSSMutableStyleDeclaration.cpp:
        (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
        * css/CSSStyleSelector.cpp:
        (WebCore::applyCounterList):
        (WebCore::CSSStyleSelector::applyProperty):
        * css/MediaQueryEvaluator.cpp:
        (WebCore::parseAspectRatio):
        * svg/SVGFontFaceElement.cpp:
        (WebCore::SVGFontFaceElement::rebuildFontFace):
        * svg/graphics/SVGPaintServer.cpp:
        (WebCore::dashArrayFromRenderingStyle):

LayoutTests:

2008-03-25  Beth Dakin  <bdakin@apple.com>

        Reviewed by Oliver.

        Test for <rdar://problem/5811826> CSSValueList::item() does not 
        range-check index

        * fast/css/resources/bikes.bmp: Added.
        * fast/css/value-list-out-of-bounds-crash.html: Added.
        * platform/mac/fast/css/value-list-out-of-bounds-crash-expected.checksum: Added.
        * platform/mac/fast/css/value-list-out-of-bounds-crash-expected.png: Added.
        * platform/mac/fast/css/value-list-out-of-bounds-crash-expected.txt: Added.



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

2008-03-24  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Maciej.

        - fixed "SVGTextElement.getStartPositionOfChar does not correctly account for multichar glyphs"
        http://bugs.webkit.org/show_bug.cgi?id=18046

        * platform/graphics/Font.cpp:
        (WebCore::Font::floatWidth): Allow expressing a run that has extra "context" characters beyond the end,
        and reporting of how many characters were actually consumed, to support multichar glyphs in SVG fonts.
        * platform/graphics/Font.h:
        * rendering/SVGInlineTextBox.cpp:
        (WebCore::SVGInlineTextBox::calculateGlyphWidth): Pass along extra chars in argument and chars consumed out
        argument.
        (WebCore::SVGInlineTextBox::calculateGlyphHeight): Pass along extra chars in argument.
        (WebCore::SVGInlineTextBox::calculateGlyphBoundaries): Add boilerplate; may not handle multichar glyphs
        right but I don't know what effects this would have.
        * rendering/SVGInlineTextBox.h:
        * rendering/SVGRootInlineBox.cpp:
        (WebCore::cummulatedWidthOrHeightOfTextChunk): Add boilerplate; may not handle multichar glyphs right
        but again I am not sure what effect this would have.
        (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Account for multichar glyphs - let glyph
        selection consider extra chars, and account for the fact that a glyph may have consumed multiple chars.
        * rendering/SVGRootInlineBox.h:
        * svg/SVGFont.cpp:
        (WebCore::SVGTextRunWalker::walk): This is the place where glyph selection happens, so this is where
        we accout for multichar glyphs (both looking at extra chars past the end of the run, and reporting how
        many chars were consumed).
        (WebCore::floatWidthOfSubStringUsingSVGFont): Pass aforementioned info through the layers.
        (WebCore::Font::floatWidthUsingSVGFont): ditto
        (WebCore::Font::drawTextUsingSVGFont): ditto
        (WebCore::Font::selectionRectForTextUsingSVGFont): ditto
        * svg/SVGTextContentElement.cpp:
        (WebCore::cummulatedCharacterRangeLength): ditto
        (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): ditto

LayoutTests:

2008-03-24  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Maciej.

        - test case and new results for "SVGTextElement.getStartPositionOfChar does not correctly account for multichar glyphs"
        http://bugs.webkit.org/show_bug.cgi?id=18046

        * svg/text/multichar-glyph.svg: Added. New test case for both rendering and getStartPositionOfChar
        access of multichar glyphs.
        * platform/mac/svg/text/multichar-glyph-expected.txt: Added.

        The following test results changed, all appear to be improvements.
        
        * platform/mac/svg/W3C-SVG-1.1/fonts-glyph-04-t-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/text-altglyph-01-b-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/text-text-06-t-expected.txt:
        * platform/mac/svg/text/text-altglyph-01-b-expected.txt:
        * platform/mac/svg/text/text-text-06-t-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed reviewer in WebCore/ChangeLog and LayoutTests/ChangeLog



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Qt build.


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

        Reviewed by Darin Adler.

        - fix http://bugs.webkit.org/show_bug.cgi?id=17994
          REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
        - fix http://bugs.webkit.org/show_bug.cgi?id=18063
          REGRESSION (r31250): Small bug that just cropped up in WebKit r31275

        Tests: fast/repaint/subtree-root-clip.html
               fast/repaint/subtree-root-clip-2.html
               fast/repaint/subtree-root-clip-3.html

        * rendering/LayoutState.cpp:
        (WebCore::LayoutState::LayoutState): Changed to not set an initial clip.
        Since the root is clipping, there is no need to set a clip, and setting
        the clip based on the container was wrong because often the root was
        not included in the container's overflow rect because it had its own
        layer.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::absolutePosition): Removed code that added table
        cell's extra top offset only in the slow (recursive) code path.
        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::absolutePosition): Added code to add the
        extra top offset in both code paths.

LayoutTests:

        Reviewed by Darin Adler.

        - tests for http://bugs.webkit.org/show_bug.cgi?id=17994
          REGRESSION (523-525+) View not updated when changing CSS size via JavaScript
        - and http://bugs.webkit.org/show_bug.cgi?id=18063
          REGRESSION (r31250): Small bug that just cropped up in WebKit r31275

        * fast/repaint/subtree-root-clip-2.html: Added.
        * fast/repaint/subtree-root-clip-3.html: Added.
        * fast/repaint/subtree-root-clip.html: Added.
        * platform/mac/fast/repaint/subtree-root-clip-2-expected.checksum: Added.
        * platform/mac/fast/repaint/subtree-root-clip-2-expected.png: Added.
        * platform/mac/fast/repaint/subtree-root-clip-2-expected.txt: Added.
        * platform/mac/fast/repaint/subtree-root-clip-3-expected.checksum: Added.
        * platform/mac/fast/repaint/subtree-root-clip-3-expected.png: Added.
        * platform/mac/fast/repaint/subtree-root-clip-3-expected.txt: Added.
        * platform/mac/fast/repaint/subtree-root-clip-expected.checksum: Added.
        * platform/mac/fast/repaint/subtree-root-clip-expected.png: Added.
        * platform/mac/fast/repaint/subtree-root-clip-expected.txt: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-26  Kevin McCullough  <kmccullough@apple.com>

        - LayoutTest fix.  Null check.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::send):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2008-03-26  Antti Koivisto  <antti@apple.com>

        Reviewed by Adam.

        Add ElementTimeControl interface to SVGAnimationElement.
        Passes Acid3 test 75.

        * DerivedSources.make:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * svg/ElementTimeControl.h: Added.
        (WebCore::ElementTimeControl::~ElementTimeControl):
        * svg/ElementTimeControl.idl: Added.
        * svg/SVGAnimationElement.cpp:
        (WebCore::SVGAnimationElement::beginElement):
        (WebCore::SVGAnimationElement::beginElementAt):
        (WebCore::SVGAnimationElement::endElement):
        (WebCore::SVGAnimationElement::endElementAt):
        * svg/SVGAnimationElement.h:
        * svg/SVGAnimationElement.idl:



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