Make LiteralParser non-recursive

Reviewed by Geoff Garen.

Convert LiteralParser from using a simple recursive descent parser
to a hand rolled PDA.  Relatively simple conversion, but required
modifications to MarkedArgumentBuffer to make it more suitable as
a generic marked vector.   I'll refactor and rename MarkedArgumentBuffer
in future as there are many other cases where it will be useful to
have such a class.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-12  Peter Kasting  <pkasting@google.com>

        Yet another Skia bustage fix.

        * platform/image-decoders/skia/ImageDecoder.h:
        (WebCore::RGBA32Buffer::setSize): Avoid symbol name clash.  The better fix is to take an IntSize(); I'll do that later.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-12  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Gtk build fix: include cstdio so we can use sscanf

        Gtk/Win Cairo build fix: use isASCIISpace instead of isspace
        Suggested by Brent Fulgham

        * platform/image-decoders/xbm/XBMImageDecoder.cpp:
        (WebCore::XBMImageDecoder::decodeDatum):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-12  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Gustavo Noronha.

        [Gtk] Enable more http/tests/navigation tests

        * platform/gtk/Skipped:

        [Gtk] use strlen instead of g_utf8_strlen so we can enable more tests.

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (dumpHistoryItem):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for Qt. After recent ImageDeocder.h changes.

I want the original change to be backed out as the whole
Skia merging is going in the wrong direction. The discussion
will happen in the bugtracker.

https://bugs.webkit.org/show_bug.cgi?id=25709.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-12  David Hyatt  <hyatt@apple.com>

        Reviewed by Dan Bernstein.

        https://bugs.webkit.org/show_bug.cgi?id=26367

        Remove the global variables in bidi.cpp.  Make a new struct, MidpointState, that holds all of the
        midpoint information.  Add the remaining global variables as arguments passed down through functions
        as needed.

        * platform/text/BidiResolver.h:
        (WebCore::MidpointState::MidpointState):
        (WebCore::MidpointState::reset):
        (WebCore::BidiResolver::midpointState):
        * rendering/RenderBlock.h:
        * rendering/bidi.cpp:
        (WebCore::BidiRun::operator delete):
        (WebCore::chopMidpointsAt):
        (WebCore::checkMidpoints):
        (WebCore::addMidpoint):
        (WebCore::appendRunsForObject):
        (WebCore::RenderBlock::bidiReorderLine):
        (WebCore::RenderBlock::layoutInlineChildren):
        (WebCore::RenderBlock::determineStartPosition):
        (WebCore::skipNonBreakingSpace):
        (WebCore::shouldCollapseWhiteSpace):
        (WebCore::requiresLineBox):
        (WebCore::RenderBlock::generatesLineBoxesForInlineChild):
        (WebCore::RenderBlock::skipTrailingWhitespace):
        (WebCore::RenderBlock::skipLeadingWhitespace):
        (WebCore::shouldSkipWhitespaceAfterStartObject):
        (WebCore::RenderBlock::findNextLineBreak):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  David Hyatt  <hyatt@apple.com>

        Reviewed by Darin Adler.

        Cleanup of the new MidpointState class.  Turn it into a struct instead.  Fix a mistaken
        assertion removal and some unintentional whitespace changes.

        * platform/text/BidiResolver.h:
        (WebCore::MidpointState::reset):
        * rendering/RenderBlock.h:
        * rendering/bidi.cpp:
        (WebCore::BidiRun::operator delete):
        (WebCore::chopMidpointsAt):
        (WebCore::checkMidpoints):
        (WebCore::addMidpoint):
        (WebCore::appendRunsForObject):
        (WebCore::RenderBlock::findNextLineBreak):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-12  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Anders Carlsson.

        https://bugs.webkit.org/show_bug.cgi?id=26373

        Add a new class to Threading in wtf called ReadWriteLock that handles single writer/multiple reader locking.
        Provide a pthreads-only implementation of the lock for now, as this class is only going to be used
        on Snow Leopard at first.

        * wtf/Threading.h:
        (WTF::ReadWriteLock::impl):
        * wtf/ThreadingPthreads.cpp:
        (WTF::ReadWriteLock::ReadWriteLock):
        (WTF::ReadWriteLock::~ReadWriteLock):
        (WTF::ReadWriteLock::readLock):
        (WTF::ReadWriteLock::tryReadLock):
        (WTF::ReadWriteLock::writeLock):
        (WTF::ReadWriteLock::tryWriteLock):
        (WTF::ReadWriteLock::unlock):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Peter Kasting  <pkasting@google.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=25709 part nine
        Factor Cairo-specific implementation out of ImageDecoder.h into
        ImageDecoderCairo.cpp.  Add some comments to functions declared
        in ImageDecoder.h.

        * GNUmakefile.am:
        * WebCore.vcproj/WebCore.vcproj:
        * platform/image-decoders/ImageDecoder.h:
        * platform/image-decoders/cairo: Added.
        * platform/image-decoders/cairo/ImageDecoderCairo.cpp: Added.
        (WebCore::RGBA32Buffer::RGBA32Buffer):
        (WebCore::RGBA32Buffer::clear):
        (WebCore::RGBA32Buffer::zeroFill):
        (WebCore::RGBA32Buffer::copyBitmapData):
        (WebCore::RGBA32Buffer::setSize):
        (WebCore::RGBA32Buffer::asNewNativeImage):
        (WebCore::RGBA32Buffer::hasAlpha):
        (WebCore::RGBA32Buffer::setHasAlpha):
        (WebCore::RGBA32Buffer::operator=):
        (WebCore::RGBA32Buffer::width):
        (WebCore::RGBA32Buffer::height):
        (WebCore::RGBA32Buffer::getAddr):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Peter Kasting  <pkasting@google.com>

        GTK bustage fix.  "inline" is handled differently by different compilers.

        * platform/image-decoders/ImageDecoder.h:
        (WebCore::RGBA32Buffer::getAddr):
        * platform/image-decoders/cairo/ImageDecoderCairo.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Peter Kasting  <pkasting@google.com>

        Bustage: Fix broken GIFs on Cairo due to subtle typo.  Fix a warning.

        * platform/image-decoders/ImageDecoder.h:
        (WebCore::RGBA32Buffer::copyRowNTimes):
        * platform/image-decoders/bmp/BMPImageReader.cpp:
        (WebCore::BMPImageReader::processBitmasks):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Dirk Schulze  <krit@webkit.org>

        Reviewed by Eric Seidel.

        Added subRegion calculation to SVG filter. Every filter effect is
        clipped to the filter region (according to the spec). This makes
        ImageBuffers for filter effects smaller and we just need to take
        care about big filter regions.
        SVGFEImage needed a correction, to avoid an ASSERT. The two filter
        effects feOffset and feFlood help to test the new subRegion code.

        Tests: svg/filters/subRegion-one-effect.svg
               svg/filters/subRegion-two-effects.svg

        Added tests for the new subRgion-code on SVG filters.

        * platform/mac/svg/filters: Added.
        * platform/mac/svg/filters/subRegion-one-effect-expected.checksum: Added.
        * platform/mac/svg/filters/subRegion-one-effect-expected.png: Added.
        * platform/mac/svg/filters/subRegion-one-effect-expected.txt: Added.
        * platform/mac/svg/filters/subRegion-two-effects-expected.checksum: Added.
        * platform/mac/svg/filters/subRegion-two-effects-expected.png: Added.
        * platform/mac/svg/filters/subRegion-two-effects-expected.txt: Added.
        * svg/filters: Added.
        * svg/filters/subRegion-one-effect.svg: Added.
        * svg/filters/subRegion-two-effects.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Laszlo Gombos  <laszlo.1.gombos@nokia.com>

        Reviewed by Mark Rowe.  Landed by Adam Barth.

        Remove obsolete declarations for old Symbian port
        https://bugs.webkit.org/show_bug.cgi?id=26339

        * platform/graphics/FloatPoint.h: Remove declarations for native SYMBIAN adaptation.
        * platform/graphics/FloatRect.h: Ditto.
        * platform/graphics/IntPoint.h: Ditto.
        * platform/graphics/IntRect.h: Ditto.
        * platform/graphics/IntSize.h: Ditto.



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

        Reviewed by Eric Seidel.  Landed by Adam Barth.

        Removed dead file.
        https://bugs.webkit.org/show_bug.cgi?id=26308

        * DumpRenderTree/win/TestNetscapePlugin/main.c: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Nate Chapin  <japhet@google.com>

        Reviewed by Dimitri Glazkov.  Landed by Adam Barth.

        Moved V8 Bindings for V8CustomXPathNSResolver to svn.webkit.org.

        https://bugs.webkit.org/show_bug.cgi?id=26227

        * bindings/v8/custom/V8CustomXPathNSResolver.cpp: Added.
        (WebCore::V8CustomXPathNSResolver::V8CustomXPathNSResolver): Moved from src.chromium.org.
        (WebCore::V8CustomXPathNSResolver::~V8CustomXPathNSResolver): Moved from src.chromium.org.
        (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI): Moved from src.chromium.org.
        * bindings/v8/custom/V8CustomXPathNSResolver.h: Added.
        * bindings/v8/custom/V8DocumentCustom.cpp: Updated includes.
        (WebCore::CALLBACK_FUNC_DECL): Updated class name.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Victor Wang <victorw@chromium.org>

        Reviewed by Eric Seidel.  Landed by Adam Barth.

        https://bugs.webkit.org/show_bug.cgi?id=26333
        Alert during a dragenter event handler will crash the renderer
        
        This crash is casued by calling NULL pointer m_documentUnderMouse in
        DragController::tryDocumentDrag()

        tryDHTMLDrag fires dragenter event. The event listener that listens
        to this event may create a nested message loop (open a modal dialog),
        which could process dragleave event and reset m_documentUnderMouse in
        dragExited.

        Fix the crash by checking m_documentUnderMouse after tryDHTMLDrag and
        do not continue if the pointer has been set to NULL.

        Test: DRT does not show alerts so add a manual test:
              manual-tests/drag-enter-alert.html

        * manual-tests/drag-enter-alert.html: Added.
        * manual-tests/resources/drag-image.png: Added.
        * page/DragController.cpp:
        (WebCore::DragController::tryDocumentDrag):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Mark "Snowy" Rowe.

        Update iExploder/htdocs/cssproperties.in by running update-iexploder-cssproperties.

        * iExploder/htdocs/cssproperties.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Peter Kasting  <pkasting@google.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=25709 part ten
        Make Skia use the root directory ImageDecoder.h and factor out most
        Skia-specific bits into skia/ImageDecoderSkia.cpp.  Also fix a pair of
        style violations in ImageDecoderCairo.cpp.  This is the last patch for
        this bug, everything beyond this is an enhancement rather than
        unforking.

        * platform/image-decoders/ImageDecoder.h:
        (WebCore::RGBA32Buffer::getAddr):
        * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
        (WebCore::RGBA32Buffer::hasAlpha):
        (WebCore::RGBA32Buffer::setHasAlpha):
        (WebCore::setStatus):
        * platform/image-decoders/skia/ImageDecoder.h: Removed.
        * platform/image-decoders/skia/ImageDecoderSkia.cpp: Added.
        (WebCore::RGBA32Buffer::RGBA32Buffer):
        (WebCore::RGBA32Buffer::clear):
        (WebCore::RGBA32Buffer::zeroFill):
        (WebCore::RGBA32Buffer::copyBitmapData):
        (WebCore::RGBA32Buffer::setSize):
        (WebCore::RGBA32Buffer::asNewNativeImage):
        (WebCore::RGBA32Buffer::hasAlpha):
        (WebCore::RGBA32Buffer::setHasAlpha):
        (WebCore::RGBA32Buffer::setStatus):
        (WebCore::RGBA32Buffer::operator=):
        (WebCore::RGBA32Buffer::width):
        (WebCore::RGBA32Buffer::height):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Ben Murdoch  <benm@google.com>

        Reviewed by Eric Seidel.  Landed by Adam Barth.

        https://bugs.webkit.org/show_bug.cgi?id=26189

        Add ENABLE(DOM_STORAGE) guards to the dom storage source files.

        * storage/LocalStorage.cpp: Add ENABLE(DOM_STORAGE) guards to the file.
        * storage/LocalStorage.h: Ditto
        * storage/LocalStorageArea.cpp: Ditto
        * storage/LocalStorageArea.h: Ditto
        * storage/LocalStorageTask.cpp: Ditto
        * storage/LocalStorageTask.h: Ditto
        * storage/LocalStorageThread.cpp: Ditto
        * storage/LocalStorageThread.h: Ditto
        * storage/SessionStorage.cpp: Ditto
        * storage/SessionStorage.h: Ditto
        * storage/SessionStorageArea.cpp: Ditto
        * storage/SessionStorageArea.h: Ditto
        * storage/Storage.cpp: Ditto
        * storage/Storage.h: Ditto
        * storage/StorageArea.cpp: Ditto
        * storage/StorageArea.h: Ditto
        * storage/StorageEvent.cpp: Ditto
        * storage/StorageEvent.h: Ditto
        * storage/StorageMap.cpp: Ditto
        * storage/StorageMap.h: Ditto
        * storage/StorageEvent.idl: Add Conditional=DOM_STORAGE attribute.
        * storage/Storage.idl: Ditto



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-06-13  Ben Murdoch  <benm@google.com>

        Reviewed by David Kilzer.  Landed by Adam Barth.

        https://bugs.webkit.org/show_bug.cgi?id=26189

        This patch changes the way PageGroups create their localStorage
        objects. Rather than creating a local storage object for the page group
        when a page is added to the group, the local storage object is now
        created lazily when the local storage object is requested by the
        DOMWindow.

        * page/PageGroup.cpp:
        (WebCore::PageGroup::closeLocalStorage): Before attempting to close a local storage object for a page group, ensure one has been created.
        (WebCore::PageGroup::addPage): Do not automatically try to create a local storage object when a page is added to the group.
        (WebCore::PageGroup::localStorage): Create a local storage object if one does not exist and return it.
        * page/PageGroup.h: Add private hasLocalStorage method to PageGroup.



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