2009-01-09  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Eric Seidel.

        Add TransformationMatrixSkia to platform/graphics/skia
        https://bugs.webkit.org/show_bug.cgi?id=23215

        * platform/graphics/skia/TransformationMatrixSkia.cpp: Added.
        (WebCore::TransformationMatrix::TransformationMatrix):
        (WebCore::TransformationMatrix::setMatrix):
        (WebCore::TransformationMatrix::map):
        (WebCore::TransformationMatrix::mapRect):
        (WebCore::TransformationMatrix::isIdentity):
        (WebCore::TransformationMatrix::reset):
        (WebCore::TransformationMatrix::scale):
        (WebCore::TransformationMatrix::rotate):
        (WebCore::TransformationMatrix::translate):
        (WebCore::TransformationMatrix::shear):
        (WebCore::TransformationMatrix::det):
        (WebCore::TransformationMatrix::inverse):
        (WebCore::TransformationMatrix::operator SkMatrix):
        (WebCore::TransformationMatrix::operator==):
        (WebCore::TransformationMatrix::operator*=):
        (WebCore::TransformationMatrix::operator*):
        (WebCore::TransformationMatrix::a):
        (WebCore::TransformationMatrix::setA):
        (WebCore::TransformationMatrix::b):
        (WebCore::TransformationMatrix::setB):
        (WebCore::TransformationMatrix::c):
        (WebCore::TransformationMatrix::setC):
        (WebCore::TransformationMatrix::d):
        (WebCore::TransformationMatrix::setD):
        (WebCore::TransformationMatrix::e):
        (WebCore::TransformationMatrix::setE):
        (WebCore::TransformationMatrix::f):
        (WebCore::TransformationMatrix::setF):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-09  Anders Carlsson  <andersca@apple.com>

        Fix build.
        
        * WebCore.LP64.exp:



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

        Reviewed by Eric Seidel.

        Add PlatformContextSkia and PlatformGraphics.h to platform/graphics/skia
        https://bugs.webkit.org/show_bug.cgi?id=23215

        * platform/graphics/skia/PlatformContextSkia.cpp: Added.
        (PlatformContextSkia::State::State):
        (PlatformContextSkia::State::~State):
        (PlatformContextSkia::State::applyAlpha):
        (PlatformContextSkia::PlatformContextSkia):
        (PlatformContextSkia::~PlatformContextSkia):
        (PlatformContextSkia::setCanvas):
        (PlatformContextSkia::save):
        (PlatformContextSkia::restore):
        (PlatformContextSkia::drawRect):
        (PlatformContextSkia::setupPaintCommon):
        (PlatformContextSkia::setupPaintForFilling):
        (PlatformContextSkia::setupPaintForStroking):
        (PlatformContextSkia::setDrawLooper):
        (PlatformContextSkia::setMiterLimit):
        (PlatformContextSkia::setAlpha):
        (PlatformContextSkia::setLineCap):
        (PlatformContextSkia::setLineJoin):
        (PlatformContextSkia::setPorterDuffMode):
        (PlatformContextSkia::setFillColor):
        (PlatformContextSkia::getDrawLooper):
        (PlatformContextSkia::getStrokeStyle):
        (PlatformContextSkia::setStrokeStyle):
        (PlatformContextSkia::setStrokeColor):
        (PlatformContextSkia::getStrokeThickness):
        (PlatformContextSkia::setStrokeThickness):
        (PlatformContextSkia::getTextDrawingMode):
        (PlatformContextSkia::setTextDrawingMode):
        (PlatformContextSkia::setUseAntialiasing):
        (PlatformContextSkia::fillColor):
        (PlatformContextSkia::beginPath):
        (PlatformContextSkia::addPath):
        (PlatformContextSkia::setFillRule):
        (PlatformContextSkia::setGradient):
        (PlatformContextSkia::setPattern):
        (PlatformContextSkia::setDashPathEffect):
        (PlatformContextSkia::paintSkPaint):
        (PlatformContextSkia::bitmap):
        (PlatformContextSkia::isPrinting):
        * platform/graphics/skia/PlatformContextSkia.h: Added.
        (PlatformContextSkia::currentPath):
        (PlatformContextSkia::canvas):
        (PlatformContextSkia::gdk_skia):
        * platform/graphics/skia/PlatformGraphics.h: Added.

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

        Reviewed by Eric Seidel.

        Add SkiaFontWin to platform/graphics/chromium
        https://bugs.webkit.org/show_bug.cgi?id=23215

        * platform/graphics/skia/SkiaFontWin.cpp: Added.
        (WebCore::CachedOutlineKey::CachedOutlineKey):
        (WebCore::operator==):
        (WebCore::CachedOutlineKeyHash::hash):
        (WebCore::CachedOutlineKeyHash::equal):
        (WebCore::FIXEDToSkScalar):
        (WebCore::deleteOutline):
        (WebCore::addPolyCurveToPath):
        (WebCore::getPathForGlyph):
        (WebCore::SkiaWinOutlineCache::lookupOrCreatePathForGlyph):
        (WebCore::SkiaWinOutlineCache::removePathsForFont):
        * platform/graphics/skia/SkiaFontWin.h: Added.

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

        Reviewed by Eric Seidel.

        Add svg/graphics/skia files.
        https://bugs.webkit.org/show_bug.cgi?id=23147

        * svg/graphics/skia/RenderPathSkia.cpp: Added.
        (WebCore::RenderPath::strokeContains):
        * svg/graphics/skia/SVGPaintServerPatternSkia.cpp: Added.
        (WebCore::SVGPaintServerPattern::setup):
        * svg/graphics/skia/SVGPaintServerSkia.cpp: Added.
        (WebCore::SVGPaintServer::draw):
        (WebCore::SVGPaintServer::teardown):
        (WebCore::SVGPaintServer::renderPath):
        * svg/graphics/skia/SVGResourceFilterSkia.cpp: Added.
        (WebCore::SVGResourceFilter::createPlatformData):
        (WebCore::SVGResourceFilter::prepareFilter):
        (WebCore::SVGResourceFilter::applyFilter):
        * svg/graphics/skia/SVGResourceMaskerSkia.cpp: Added.
        (WebCore::SVGResourceMasker::applyMask):

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

2009-01-09  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Stage two of converting JSValue from a pointer to a class type.
        Remove the class JSValue.  The functionallity has been transitioned
        into the wrapper class type JSValuePtr.

        The last stage will be to rename JSValuePtr to JSValue, remove the
        overloaded -> operator, and switch operations on JSValuePtrs from
        using '->' to use '.' instead.

        * API/APICast.h:
        * JavaScriptCore.exp:
        * runtime/JSCell.h:
        (JSC::asCell):
        (JSC::JSValuePtr::asCell):
        (JSC::JSValuePtr::isNumber):
        (JSC::JSValuePtr::isString):
        (JSC::JSValuePtr::isGetterSetter):
        (JSC::JSValuePtr::isObject):
        (JSC::JSValuePtr::getNumber):
        (JSC::JSValuePtr::getString):
        (JSC::JSValuePtr::getObject):
        (JSC::JSValuePtr::getCallData):
        (JSC::JSValuePtr::getConstructData):
        (JSC::JSValuePtr::getUInt32):
        (JSC::JSValuePtr::getTruncatedInt32):
        (JSC::JSValuePtr::getTruncatedUInt32):
        (JSC::JSValuePtr::mark):
        (JSC::JSValuePtr::marked):
        (JSC::JSValuePtr::toPrimitive):
        (JSC::JSValuePtr::getPrimitiveNumber):
        (JSC::JSValuePtr::toBoolean):
        (JSC::JSValuePtr::toNumber):
        (JSC::JSValuePtr::toString):
        (JSC::JSValuePtr::toObject):
        (JSC::JSValuePtr::toThisObject):
        (JSC::JSValuePtr::needsThisConversion):
        (JSC::JSValuePtr::toThisString):
        (JSC::JSValuePtr::getJSNumber):
        * runtime/JSImmediate.h:
        (JSC::JSValuePtr::isUndefined):
        (JSC::JSValuePtr::isNull):
        (JSC::JSValuePtr::isUndefinedOrNull):
        (JSC::JSValuePtr::isBoolean):
        (JSC::JSValuePtr::getBoolean):
        (JSC::JSValuePtr::toInt32):
        (JSC::JSValuePtr::toUInt32):
        * runtime/JSNumberCell.h:
        (JSC::JSValuePtr::uncheckedGetNumber):
        (JSC::JSValuePtr::toJSNumber):
        * runtime/JSObject.h:
        (JSC::JSValuePtr::isObject):
        (JSC::JSValuePtr::get):
        (JSC::JSValuePtr::put):
        * runtime/JSString.h:
        (JSC::JSValuePtr::toThisJSString):
        * runtime/JSValue.cpp:
        (JSC::JSValuePtr::toInteger):
        (JSC::JSValuePtr::toIntegerPreserveNaN):
        (JSC::JSValuePtr::toInt32SlowCase):
        (JSC::JSValuePtr::toUInt32SlowCase):
        * runtime/JSValue.h:
        (JSC::JSValuePtr::makeImmediate):
        (JSC::JSValuePtr::immediateValue):
        (JSC::JSValuePtr::JSValuePtr):
        (JSC::JSValuePtr::operator->):
        (JSC::JSValuePtr::operator bool):
        (JSC::JSValuePtr::operator==):
        (JSC::JSValuePtr::operator!=):
        (JSC::JSValuePtr::encode):
        (JSC::JSValuePtr::decode):
        (JSC::JSValuePtr::toFloat):
        (JSC::JSValuePtr::asValue):
        (JSC::operator==):
        (JSC::operator!=):

WebCore:

2009-01-09  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Delete references to JSValue, removing this class.

        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::self):
        * bindings/js/ScriptCallStack.h:



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

        Check in correct results for failing test.

        * fast/dom/Window/window-properties-expected.txt:



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

2009-01-09  Darin Adler  <darin@apple.com>

        Reviewed by Jon Honeycutt.

        Bug 22913: REGRESSION: Space bar doesn't scroll on windows
        https://bugs.webkit.org/show_bug.cgi?id=22913
        rdar://problem/6479834

        * page/EventHandler.cpp:
        (WebCore::EventHandler::defaultKeyboardEventHandler): Added code to call
        defaultSpaceEventHandler.
        (WebCore::EventHandler::defaultSpaceEventHandler): Added. Scrolls down or up based
        on the shift key.
        * page/EventHandler.h: Added defaultSpaceEventHandler.

        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::platformScroll): Return false, because this function does
        not scroll. In an earlier version of this patch, I used this to prevent the
        patch from affecting the Mac, but I decided to use #if instead.

WebKit/win:

2009-01-09  Darin Adler  <darin@apple.com>

        Reviewed by Jon Honeycutt.

        Bug 22913: REGRESSION: Space bar doesn't scroll on windows
        https://bugs.webkit.org/show_bug.cgi?id=22913
        rdar://problem/6479834

        * WebView.cpp:
        (WebView::keyPress): Removed code to handle space bar here; put it in
        WebCore instead.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-09  Adele Peterson  <adele@apple.com>

        Reviewed by Darin Adler.

        Fix infinite recursion in clientPaddingLeft and clientPaddingRight.  This changes the code back to
        how it was before RenderTextControlSingleLine was split out from RenderTextControl.
        
        No test added since this code is only exercised when trying to place a search field's recent searches popup menu.

        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
        (WebCore::RenderTextControlSingleLine::clientPaddingRight):



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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-09  Adam Bergkvist <adam.bergkvist@ericsson.com>

        Reviewed by Holger Freyther.

        [CURL] POST without body becomes GET
        https://bugs.webkit.org/show_bug.cgi?id=23182

        Make sure that method is always set to POST even when the body is
        empty. Cleaned up httpBody null check.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-09  Benjamin Otte  <otte@gnome.org>

        Reviewed by Holger Freyther.

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

        Remove broken code that uses a fallback. The previous code did 2
        policy decisions which caused crashes.
        Download is still notImplemented();

        * webkit/webkitwebpolicydecision.cpp:
        (_WebKitWebPolicyDecisionPrivate::webkit_web_policy_decision_download):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39775 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-09  Benjamin Otte  <otte@gnome.org>

        Reviewed by Holger Freyther.

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

        make the finalize function the dispose function. Not releasing held
        objects in dispose can cause crashers later.

        * webkit/webkitwebview.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[QT] Make SharedTimer use QBasicTimer

Kill the SharedTimerQt.h and the usage of signal and slots
by using QBasicTimer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-10  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
        because of change to -[HTMLObjectElement data]

        * WebView/WebView.mm:
        (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
        violation check because I saw this being done off the main thread while testing Mail, and it
        caused problems. Put all the one time initialization under a single guard to make things just
        a little faster other times, and to make it clearer which things are one-time. Added a call to
        the new patchMailRemoveAttributesMethod function.
        (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
        because I assumed it would be slightly better to have a public method name in the violation
        message. This calls commonInitialization later, so it will hit that one eventually.
        (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
        (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
        a WebKit method and removes the patch again on the way out.
        (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
        applies the patch that fixes this bug.



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

2009-01-10  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Adler.

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

        We shouldn't update the document pointer of inactive windows.  This
        behavior differs slightly from Firefox, I'd argue that this behavior is
        more correct (we both differ from IE).  The HTML 5 spec is a bit in flux
        on this point.

        Test: http/tests/security/xss-inactive-closure.html

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
        * bindings/js/ScriptController.cpp:
        (WebCore::ScriptController::clearWindowShell):
        (WebCore::ScriptController::updateDocument):
        * bindings/js/ScriptController.h:

LayoutTests:

2009-01-10  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Adler.

        Test that we don't do goofy things with the document pointer after
        navigation.

        * fast/dom/Window/dom-access-from-closure-iframe-expected.txt:
        * fast/dom/Window/dom-access-from-closure-window-expected.txt:
        * http/tests/security/resources/childWithButton.html: Added.
        * http/tests/security/resources/xss-inactive-closure-child-2.html: Added.
        * http/tests/security/resources/xss-inactive-closure-child.html: Added.
        * http/tests/security/xss-inactive-closure-expected.txt: Added.
        * http/tests/security/xss-inactive-closure.html: Added.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-10  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dan Bernstein

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

        We need to disable LayoutState when an object has transforms,
        because LayoutState is not transform-aware and therefore
        repaint rects can be computed incorrectly.

        Test: fast/repaint/transform-disable-layoutstate.html

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock):
        (WebCore::RenderBlock::layoutOnlyPositionedObjects):
        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutBlock):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-10  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=23210
        Make it easier for ports to define custom UI for media controls

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::styleForElement): call theme()->styleSheetForMediaControls to
        get the media controller style sheet 

        * rendering/MediaControlElements.cpp:
        (WebCore::MediaControlInputElement::hitTest): Added
        * rendering/MediaControlElements.h: Updated

        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::forwardEvent): Call element hitTest() method instead of local function
        so control elements don't necessarily have to be rectangular

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::styleSheetForMediaControls):  Added
        (WebCore::RenderTheme::hitTestMediaControlPart):  Added
        * rendering/RenderTheme.h: Updated



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-01-11  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Darin Adler.

        Make ScheduledAction (Timeout callback) able to execute the callback under WorkerContext.
        Part of 'Timers in Workers' work.
        https://bugs.webkit.org/show_bug.cgi?id=23223

        * bindings/js/ScheduledAction.cpp:
        (WebCore::ScheduledAction::execute): new method that takes WorkerContext.
        (WebCore::ScheduledAction::executeFunctionInContext): Executes a JSFunction in proper context with 'this' object.
        * bindings/js/ScheduledAction.h:



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