WebKit-https.git
12 years agoJavaScriptCore:
ggaren@apple.com [Fri, 13 Feb 2009 23:28:04 +0000 (23:28 +0000)]
JavaScriptCore:

2009-02-13  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed <rdar://problem/6584057> Optimize sort by JS numeric comparison
        function not to run the comparison function

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::CodeBlock):
        * bytecode/CodeBlock.h:
        (JSC::CodeBlock::setIsNumericCompareFunction):
        (JSC::CodeBlock::isNumericCompareFunction): Added the ability to track
        whether a CodeBlock performs a sort-like numeric comparison.

        * bytecompiler/BytecodeGenerator.cpp:
        (JSC::BytecodeGenerator::generate): Set the isNumericCompareFunction bit
        after compiling.

        * parser/Nodes.cpp:
        (JSC::FunctionBodyNode::emitBytecode): Fixed a bug that caused us to
        codegen an extra return at the end of all functions (eek!), since this
        made it harder / weirder to detect the numeric comparison pattern in
        bytecode.

        * runtime/ArrayPrototype.cpp:
        (JSC::arrayProtoFuncSort): Use the isNumericCompareFunction bit to do
        a faster sort if we can.

        * runtime/FunctionConstructor.cpp:
        (JSC::extractFunctionBody):
        (JSC::constructFunction):
        * runtime/FunctionConstructor.h: Renamed and exported extractFunctionBody for
        use in initializing lazyNumericCompareFunction.

        * runtime/JSArray.cpp:
        (JSC::compareNumbersForQSort):
        (JSC::compareByStringPairForQSort):
        (JSC::JSArray::sortNumeric):
        (JSC::JSArray::sort):
        * runtime/JSArray.h: Added a fast numeric sort. Renamed ArrayQSortPair
        to be more specific since we do different kinds of qsort now.

        * runtime/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData):
        (JSC::JSGlobalData::numericCompareFunction):
        (JSC::JSGlobalData::ClientData::~ClientData):
        * runtime/JSGlobalData.h: Added helper data for computing the
        isNumericCompareFunction bit.

LayoutTests:

2009-02-13  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Added a test for an edge case in <rdar://problem/6584057>.

        * fast/js/resources/sort-non-numbers.js: Added.
        * fast/js/sort-non-numbers.html: Added.
        * fast/js/sort-non-numbers-expected.txt: Added.

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

12 years ago2009-02-13 Adam Treat <adam.treat@torchmobile.com>
treat@webkit.org [Fri, 13 Feb 2009 22:49:43 +0000 (22:49 +0000)]
2009-02-13  Adam Treat  <adam.treat@torchmobile.com>

        Caught by Darin Adler.

        No reason to check m_tokenizer twice for 0 in a row.

        * dom/Document.cpp:
        (WebCore::Document::write):

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

12 years ago2009-02-13 Lyon Chen <lyon.chen@torchmobile.com>
treat@webkit.org [Fri, 13 Feb 2009 21:49:04 +0000 (21:49 +0000)]
2009-02-13  Lyon Chen  <lyon.chen@torchmobile.com>

        Reviewed by Dave Hyatt.

        Take into account y() + height() when calculating getLowerRightCorner.

        * dom/ContainerNode.cpp:
        (WebCore::ContainerNode::getLowerRightCorner):

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

12 years ago2009-02-13 Antti Koivisto <antti@apple.com>
antti@apple.com [Fri, 13 Feb 2009 21:17:46 +0000 (21:17 +0000)]
2009-02-13  Antti Koivisto  <antti@apple.com>

        Reviewed by Dave Hyatt.

        Most of this code was in RenderBox, restore the copyright lines.

        * rendering/RenderBoxModelObject.cpp:
        * rendering/RenderBoxModelObject.h:

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

12 years ago2009-02-13 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 21:07:08 +0000 (21:07 +0000)]
2009-02-13  David Hyatt  <hyatt@apple.com>

        Get rid of printBoxDecorations, since it is dead code.

        Reviewed by Dan Bernstein

        * rendering/RenderObject.h:

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

12 years ago2009-02-13 Adam Treat <adam.treat@torchmobile.com>
treat@webkit.org [Fri, 13 Feb 2009 21:01:31 +0000 (21:01 +0000)]
2009-02-13  Adam Treat  <adam.treat@torchmobile.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=23952
        Add Document::write overload which takes a SegmentedString since this
        is what the tokenizer expects anyway.  Modified JSHTMLDocument so it once
        again calls Document::write instead of injecting the string directly into
        the tokenizer.  This ensures that all document.write's are funneled through
        one method again, but should still be just as fast for JSHTMLDocumentCustom.

        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::documentWrite):
        * dom/Document.cpp:
        (WebCore::Document::write):
        * dom/Document.h:

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

12 years ago2009-02-13 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 20:38:21 +0000 (20:38 +0000)]
2009-02-13  David Hyatt  <hyatt@apple.com>

        Reviewed by Simon Fraser

        Remove updateWidgetPosition on RenderObject.  Change RenderView's set of widgets
        to have a tighter type: RenderWidget instead of RenderObject.  Devirtualize
        updateWidgetPosition, since all RenderWidgets (except for applets) are now
        RenderParts also.

        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        * rendering/RenderPart.cpp:
        * rendering/RenderPart.h:
        * rendering/RenderView.cpp:
        (WebCore::RenderView::updateWidgetPositions):
        (WebCore::RenderView::addWidget):
        (WebCore::RenderView::removeWidget):
        * rendering/RenderView.h:
        * rendering/RenderWidget.cpp:
        (WebCore::RenderWidget::updateWidgetPosition):
        * rendering/RenderWidget.h:

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

12 years ago2009-02-13 Darin Adler <darin@apple.com>
darin@apple.com [Fri, 13 Feb 2009 20:11:09 +0000 (20:11 +0000)]
2009-02-13  Darin Adler  <darin@apple.com>

        * StringsNotToBeLocalized.txt: Updated for recent changes.

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

12 years ago2009-02-13 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 20:04:11 +0000 (20:04 +0000)]
2009-02-13  David Hyatt  <hyatt@apple.com>

        Reviewed by Eric Seidel

        Remove isEditable() on RenderObject.  It is dead code.

        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:

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

12 years ago2009-02-13 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 19:49:42 +0000 (19:49 +0000)]
2009-02-13  David Hyatt  <hyatt@apple.com>

        Reviewed by Eric Seidel

        Add isTextControl() to RenderObject.  Patch call sites thats asked isTextField() || isTextArea() to just use
        isTextControl() instead.

        Add a toRenderTextControl converter for doing checked casting to RenderTextControls.

        * dom/Document.cpp:
        (WebCore::Document::setFocusedNode):
        * dom/InputElement.cpp:
        (WebCore::InputElement::updateSelectionRange):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::ReplacementFragment):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::handleReplacedElement):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::selectionStart):
        (WebCore::HTMLInputElement::selectionEnd):
        (WebCore::HTMLInputElement::setSelectionStart):
        (WebCore::HTMLInputElement::setSelectionEnd):
        (WebCore::HTMLInputElement::select):
        (WebCore::HTMLInputElement::defaultEventHandler):
        (WebCore::HTMLInputElement::selection):
        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::selectionStart):
        (WebCore::HTMLTextAreaElement::selectionEnd):
        (WebCore::HTMLTextAreaElement::setSelectionStart):
        (WebCore::HTMLTextAreaElement::setSelectionEnd):
        (WebCore::HTMLTextAreaElement::select):
        (WebCore::HTMLTextAreaElement::setSelectionRange):
        (WebCore::HTMLTextAreaElement::appendFormData):
        (WebCore::HTMLTextAreaElement::updateValue):
        (WebCore::HTMLTextAreaElement::selection):
        * page/AccessibilityRenderObject.cpp:
        (WebCore::AccessibilityRenderObject::isNativeTextControl):
        (WebCore::AccessibilityRenderObject::text):
        (WebCore::AccessibilityRenderObject::selectedText):
        (WebCore::AccessibilityRenderObject::selectedTextRange):
        (WebCore::AccessibilityRenderObject::setSelectedTextRange):
        (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
        (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
        (WebCore::AccessibilityRenderObject::observableObject):
        * page/Frame.cpp:
        (WebCore::Frame::notifyRendererOfSelectionChange):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::isTextControl):
        (WebCore::objectIsRelayoutBoundary):
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::isTextControl):
        (WebCore::toRenderTextControl):
        * rendering/TextControlInnerElements.cpp:
        (WebCore::TextControlInnerTextElement::defaultEventHandler):
        * wml/WMLInputElement.cpp:
        (WebCore::WMLInputElement::select):
        (WebCore::WMLInputElement::defaultEventHandler):
        (WebCore::WMLInputElement::isConformedToInputMask):

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

12 years ago2009-02-13 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 19:18:36 +0000 (19:18 +0000)]
2009-02-13  David Hyatt  <hyatt@apple.com>

        Get rid of isEdited/setEdited on RenderObject.  Devirtualize isEdited/setEdited on RenderTextControl.
        Callers were already asking if the renderer was a text field (or a text area), so it was especially
        pointless to waste a second virtual function call after making one just to determine the object type.

        Reviewed by Simon Fraser

        * dom/Document.cpp:
        (WebCore::Document::setFocusedNode):
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::defaultEventHandler):
        * rendering/RenderObject.h:
        * rendering/RenderTextControl.h:
        (WebCore::RenderTextControl::isEdited):
        (WebCore::RenderTextControl::setEdited):

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

12 years ago2009-02-13 Scott Violet <sky@google.com>
dglazkov@chromium.org [Fri, 13 Feb 2009 19:04:03 +0000 (19:04 +0000)]
2009-02-13  Scott Violet  <sky@google.com>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=23934
        Skia platform doesn't render text decoration shadows.

        Makes Skia render text decoration shadows correctly. We weren't
        preparing the SkPaint correctly and didn't have a couple of checks
        CG has. Additionally makes the fillColor/strokeColor methods
        consistent.

        This behavior is covered by existing layout tests (see bug for list).

        * platform/graphics/chromium/FontChromiumWin.cpp:
        (WebCore::Font::drawGlyphs):
        (WebCore::Font::drawComplexText):
        * platform/graphics/skia/GraphicsContextSkia.cpp:
        (WebCore::GraphicsContext::drawLineForText):
        * platform/graphics/skia/PlatformContextSkia.cpp:
        (PlatformContextSkia::effectiveFillColor):
        (PlatformContextSkia::effectiveStrokeColor):
        * platform/graphics/skia/PlatformContextSkia.h:

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

12 years ago2009-02-12 Darin Fisher <darin@chromium.org>
darin@chromium.org [Fri, 13 Feb 2009 19:01:12 +0000 (19:01 +0000)]
2009-02-12  Darin Fisher  <darin@chromium.org>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=23944
        KURLGoogle's pre-parsed canonicalSpec constructor should take a CString

        * platform/KURL.h:
        * platform/KURLGoogle.cpp:
        (WebCore::KURLGooglePrivate::setUtf8):
        (WebCore::KURLGooglePrivate::setAscii):
        (WebCore::KURLGooglePrivate::init):
        (WebCore::KURLGooglePrivate::replaceComponents):
        (WebCore::KURL::KURL):
        * platform/KURLGooglePrivate.h:

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

12 years ago2009-02-13 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 18:17:26 +0000 (18:17 +0000)]
2009-02-13  David Hyatt  <hyatt@apple.com>

        Remove leftmost/rightmost/lowestPosition from RenderObject.  They only need to be called on boxes.

        Reviewed by Dan Bernstein

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::lowestPosition):
        (WebCore::RenderBlock::rightmostPosition):
        (WebCore::RenderBlock::leftmostPosition):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::computeScrollDimensions):
        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::lowestPosition):
        (WebCore::RenderMedia::rightmostPosition):
        (WebCore::RenderMedia::leftmostPosition):
        * rendering/RenderObject.h:
        * rendering/RenderTableSection.cpp:
        (WebCore::RenderTableSection::lowestPosition):
        (WebCore::RenderTableSection::rightmostPosition):
        (WebCore::RenderTableSection::leftmostPosition):

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Fri, 13 Feb 2009 17:49:58 +0000 (17:49 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Fix build with ACCELERATED_COMPOSITING turned on.

        toRenderBox()->x() asserts for a layer on an inline; use
        m_owningLayer->renderBoxX() instead.

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::paintIntoLayer):

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

12 years ago2009-02-13 Darin Adler <darin@apple.com>
darin@apple.com [Fri, 13 Feb 2009 16:24:52 +0000 (16:24 +0000)]
2009-02-13  Darin Adler  <darin@apple.com>

        * Configurations/JavaScriptCore.xcconfig: Undo accidental commit of this file.

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

12 years ago Reviewed by Adam Roben.
cmarrin@apple.com [Fri, 13 Feb 2009 16:21:26 +0000 (16:21 +0000)]
    Reviewed by Adam Roben.

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

        Fixed 3 more test cases

        * platform/win/fast/css/computed-style-expected.txt:
        * platform/win/fast/css/computed-style-without-renderer-expected.txt:
        * svg/css/getComputedStyle-basic-expected.txt:

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

12 years ago2009-02-12 Darin Adler <darin@apple.com>
darin@apple.com [Fri, 13 Feb 2009 16:20:16 +0000 (16:20 +0000)]
2009-02-12  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        Speed up document.write a bit.

        * bindings/js/JSHTMLDocumentCustom.cpp:
        (WebCore::documentWrite): Added. Uses SegmentedString to avoid conversion from
        UString to String and to avoid appending strings. Also added code to handle
        newlines efficiently.
        (WebCore::JSHTMLDocument::write): Changed to use documentWrite.
        (WebCore::JSHTMLDocument::writeln): Ditto.

        * dom/Document.cpp:
        (WebCore::Document::prepareToWrite): Added. Refactored the initialization part
        of write into a separate function for use in the JavaScript binding.
        (WebCore::Document::write): Changed to call prepareToWrite.

        * dom/Document.h: Added declaration for prepareToWrite.

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

12 years ago2009-02-12 Darin Adler <darin@apple.com>
darin@apple.com [Fri, 13 Feb 2009 16:16:50 +0000 (16:16 +0000)]
2009-02-12  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt and Alexey Proskuryakov.

        Speed up a couple string functions.

        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncIndexOf): Added a fast path for cases where the second
        argument is either missing or an integer.
        (JSC::stringProtoFuncBig): Use jsNontrivialString since the string is guaranteed
        to be 2 or more characters long.
        (JSC::stringProtoFuncSmall): Ditto.
        (JSC::stringProtoFuncBlink): Ditto.
        (JSC::stringProtoFuncBold): Ditto.
        (JSC::stringProtoFuncItalics): Ditto.
        (JSC::stringProtoFuncStrike): Ditto.
        (JSC::stringProtoFuncSub): Ditto.
        (JSC::stringProtoFuncSup): Ditto.
        (JSC::stringProtoFuncFontcolor): Ditto.
        (JSC::stringProtoFuncFontsize): Make the fast path Sam recently added even faster
        by avoiding all but the minimum memory allocation.
        (JSC::stringProtoFuncAnchor): Use jsNontrivialString.
        (JSC::stringProtoFuncLink): Added a fast path.

        * runtime/UString.cpp:
        (JSC::UString::find): Added a fast path for single-character search strings.

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

12 years ago Reviewed by Simon Fraser.
cmarrin@apple.com [Fri, 13 Feb 2009 15:53:48 +0000 (15:53 +0000)]
    Reviewed by Simon Fraser.

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

        Fixed 2 more test cases (mac specific)

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

12 years ago2009-02-13 Benjamin C Meyer <benjamin.meyer@torchmobile.com>
treat@webkit.org [Fri, 13 Feb 2009 14:45:54 +0000 (14:45 +0000)]
2009-02-13  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>

        Reviewed by Nikolas Zimmermann.

        https://bugs.webkit.org/show_bug.cgi?id=23738
        Expose the url elements target frame string.  This is the sister function
        to the existing linkTargetFrame which returns the QWebFrame*.  When the
        linkTargetFrame is 0 it is useful to know what the target was to be.

        * Api/qwebframe.cpp:
        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
        (QWebHitTestResult::linkTarget):
        * Api/qwebframe.h:
        * Api/qwebframe_p.h:
        * tests/qwebframe/tst_qwebframe.cpp:

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

12 years ago2009-02-13 David Boddie <dboddie@trolltech.com>
hausmann@webkit.org [Fri, 13 Feb 2009 12:02:26 +0000 (12:02 +0000)]
2009-02-13  David Boddie  <dboddie@trolltech.com>

        Reviewed by Simon Hausmann.

        Removed documentation for internal functions.

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

12 years ago2009-02-13 Martin Smith <msmith@trolltech.com>
hausmann@webkit.org [Fri, 13 Feb 2009 12:02:04 +0000 (12:02 +0000)]
2009-02-13  Martin Smith  <msmith@trolltech.com>

        Reviewed by Simon Hausmann.

        Corrected some minor qdoc errors.

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

12 years ago2009-02-13 Prasanth Ullattil <pullatti@trolltech.com>
hausmann@webkit.org [Fri, 13 Feb 2009 12:01:37 +0000 (12:01 +0000)]
2009-02-13  Prasanth Ullattil  <pullatti@trolltech.com>

        Reviewed by Simon Hausmann.

        Fixes crash in the Qt port on Windows with comboboxes

        The focusWidget in the input context is not reset properly.
        The QApplication::setFocusWidget() wont reset the IC if the reason is
        PopupFocusReason, this is not ideal. For the time being we are going
        to do this from webkit itself.

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

12 years ago2009-02-13 David Levin <levin@chromium.org>
ap@webkit.org [Fri, 13 Feb 2009 09:29:21 +0000 (09:29 +0000)]
2009-02-13  David Levin  <levin@chromium.org>

        Reviewed by Darin Adler.

        Bug 23926: Race condition in callOnMainThreadAndWait
        <https://bugs.webkit.org/show_bug.cgi?id=23926>

        * wtf/MainThread.cpp:
        Removed callOnMainThreadAndWait since it isn't used.

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

12 years agoMath.random is really slow on windows.
oliver@apple.com [Fri, 13 Feb 2009 09:18:43 +0000 (09:18 +0000)]
Math.random is really slow on windows.

Reviewed by Jon Honeycutt.

Math.random calls WTF::randomNumber which is implemented as
the secure rand_s on windows.  Unfortunately rand_s is an order
of magnitude slower than arc4random.  For this reason I've
added "weakRandomNumber" for use by JavaScript's Math Object.
In the long term we should look at using our own secure PRNG
in place of the system, but this will do for now.

30% win on SunSpider on Windows, resolving most of the remaining
disparity vs. Mac.

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

12 years agoFix the build for other platforms.
mrowe@apple.com [Fri, 13 Feb 2009 07:30:16 +0000 (07:30 +0000)]
Fix the build for other platforms.

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

12 years agowx build fix, typo while tweaking last patch for commit.
kevino@webkit.org [Fri, 13 Feb 2009 07:17:22 +0000 (07:17 +0000)]
wx build fix, typo while tweaking last patch for commit.

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

12 years agoReviewed by Kevin Ollivier.
kevino@webkit.org [Fri, 13 Feb 2009 05:42:25 +0000 (05:42 +0000)]
Reviewed by Kevin Ollivier.

Use Cairo/PANGO to fix text measurements and implement proper non-kerned text drawing on wxGTK.

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

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

12 years ago2009-02-12 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Fri, 13 Feb 2009 05:10:12 +0000 (05:10 +0000)]
2009-02-12  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Simon Fraser

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

        Hook up 3D CSS transforms to the accelerated compositor backend.
        Not enabled by default.

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

12 years ago2009-02-12 Gavin Barraclough <barraclough@apple.com>
barraclough@apple.com [Fri, 13 Feb 2009 04:22:02 +0000 (04:22 +0000)]
2009-02-12  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Sam Weinig.

        Remove (/reduce) use of hard-wired register names from the JIT.
        Currently there is no abstraction of registers used in the JIT,
        which has a number of negative consequences.  Hard-wiring x86
        register names makes the JIT less portable to other platforms,
        and prevents us from performing dynamic register allocation to
        attempt to maintain more temporary values in machine registers.
        (The latter will be more important on x86-64, where we have more
        registers to make use of).

        Also, remove MacroAssembler::mod32.  This was not providing a
        useful abstraction, and was not in keeping with the rest of the
        MacroAssembler interface, in having specific register requirements.

        * assembler/MacroAssemblerX86Common.h:
        * jit/JIT.cpp:
        (JSC::JIT::compileOpStrictEq):
        (JSC::JIT::emitSlowScriptCheck):
        (JSC::JIT::privateCompileMainPass):
        (JSC::JIT::privateCompileSlowCases):
        (JSC::JIT::privateCompile):
        (JSC::JIT::privateCompileCTIMachineTrampolines):
        * jit/JIT.h:
        * jit/JITArithmetic.cpp:
        (JSC::JIT::compileFastArith_op_lshift):
        (JSC::JIT::compileFastArithSlow_op_lshift):
        (JSC::JIT::compileFastArith_op_rshift):
        (JSC::JIT::compileFastArithSlow_op_rshift):
        (JSC::JIT::compileFastArith_op_bitand):
        (JSC::JIT::compileFastArithSlow_op_bitand):
        (JSC::JIT::compileFastArith_op_mod):
        (JSC::JIT::compileFastArithSlow_op_mod):
        (JSC::JIT::compileFastArith_op_post_inc):
        (JSC::JIT::compileFastArithSlow_op_post_inc):
        (JSC::JIT::compileFastArith_op_post_dec):
        (JSC::JIT::compileFastArithSlow_op_post_dec):
        (JSC::JIT::compileFastArith_op_pre_inc):
        (JSC::JIT::compileFastArithSlow_op_pre_inc):
        (JSC::JIT::compileFastArith_op_pre_dec):
        (JSC::JIT::compileFastArithSlow_op_pre_dec):
        (JSC::JIT::compileFastArith_op_add):
        (JSC::JIT::compileFastArith_op_mul):
        (JSC::JIT::compileFastArith_op_sub):
        (JSC::JIT::compileBinaryArithOp):
        * jit/JITCall.cpp:
        (JSC::JIT::compileOpCallInitializeCallFrame):
        (JSC::JIT::compileOpCallSetupArgs):
        (JSC::JIT::compileOpCallEvalSetupArgs):
        (JSC::JIT::compileOpConstructSetupArgs):
        (JSC::JIT::compileOpCall):
        (JSC::JIT::compileOpCallSlowCase):
        * jit/JITInlineMethods.h:
        (JSC::JIT::emitGetVirtualRegister):
        (JSC::JIT::emitPutVirtualRegister):
        (JSC::JIT::emitNakedCall):
        (JSC::JIT::restoreArgumentReference):
        (JSC::JIT::restoreArgumentReferenceForTrampoline):
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compilePutByIdHotPath):
        (JSC::JIT::compileGetByIdSlowCase):
        (JSC::JIT::compilePutByIdSlowCase):
        (JSC::JIT::privateCompilePutByIdTransition):
        (JSC::JIT::privateCompilePatchGetArrayLength):
        (JSC::JIT::privateCompileGetByIdSelf):
        (JSC::JIT::privateCompileGetByIdProto):
        (JSC::JIT::privateCompileGetByIdSelfList):
        (JSC::JIT::privateCompileGetByIdProtoList):
        (JSC::JIT::privateCompileGetByIdChainList):
        (JSC::JIT::privateCompileGetByIdChain):
        (JSC::JIT::privateCompilePutByIdReplace):

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

12 years agoJavaScriptCore:
barraclough@apple.com [Fri, 13 Feb 2009 04:10:31 +0000 (04:10 +0000)]
JavaScriptCore:

2009-02-12  Horia Olaru  <olaru@adobe.com>

        Reviewed by Oliver Hunt.

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

        When throwing an exception within an eval argument string, the dst parameter was
        modified in the functions below and the return value for eval was altered. Changed
        the emitNode call in JSC::ThrowNode::emitBytecode to use a temporary register
        to store its results instead of dst. The JSC::FunctionCallResolveNode::emitBytecode
        would load the function within the dst registry, also altering the result returned
        by eval. Replaced it with another temporary.

        * parser/Nodes.cpp:
        (JSC::FunctionCallResolveNode::emitBytecode):
        (JSC::ThrowNode::emitBytecode):

LayoutTests:

2009-02-12  Horia Olaru  <olaru@adobe.com>

        Reviewed by Oliver Hunt.

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

        Added a modified version of the test Chris Brichford attached to the bug.
        Will test return values of various eval function calls, including some which
        throw and catch errors in the string to evaluate.

        * fast/js/eval-throw-return-expected.txt: Added.
        * fast/js/eval-throw-return.html: Added.
        * fast/js/resources/eval-throw-return.js: Added.
        (throwFunc):
        (throwOnReturn):
        (twoFunc):

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Fri, 13 Feb 2009 02:10:35 +0000 (02:10 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Reviewed by Eric Seidel

        Get rid of containingBlockHeight(), since it had only one implementation (despite being virtual) and just returned
        containingBlock()->availableHeight().  The latter reads better anyway.  Rename containingBlockWidth() to
        containingBlockWidthForContent() and move it to RenderBoxModelObject.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::localCaretRect):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::containingBlockWidthForContent):
        (WebCore::RenderBox::calcWidth):
        (WebCore::RenderBox::calcReplacedWidthUsing):
        * rendering/RenderBox.h:
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::relativePositionOffsetX):
        (WebCore::RenderBoxModelObject::relativePositionOffsetY):
        (WebCore::RenderBoxModelObject::containingBlockWidthForContent):
        * rendering/RenderBoxModelObject.h:
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::marginLeft):
        (WebCore::RenderInline::marginRight):
        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        * rendering/RenderSVGContainer.cpp:
        (WebCore::RenderSVGContainer::calcReplacedWidth):

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

12 years agoVersioning.
mrowe@apple.com [Fri, 13 Feb 2009 01:42:32 +0000 (01:42 +0000)]
Versioning.

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Fri, 13 Feb 2009 01:27:46 +0000 (01:27 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Fix non-Mac builds by adding Matrix3DTransformOperation.* and
        PerspectiveTransformOperation.*. Cleaned out some cruft in
        the WebCore.vcproj fle.

        * GNUmakefile.am:
        * WebCore.pro:
        * WebCore.scons:
        * WebCore.vcproj/WebCore.vcproj:

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

12 years agoWebCore:
dsmith@webkit.org [Fri, 13 Feb 2009 01:19:39 +0000 (01:19 +0000)]
WebCore:

2009-02-12  David Smith  <catfish.man@gmail.com>

        Reviewed by Dave Hyatt.

        Fix https://bugs.webkit.org/show_bug.cgi?id=23935
        Nested :not() and non-simple selectors in :not() should be invalid

        * css/CSSGrammar.y: Reject nested :not()
        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ASSERT() rather than checking, since the parser enforces it now

LayoutTests:

2009-02-12  David Smith  <catfish.man@gmail.com>

        Reviewed by David Hyatt.

        * fast/dom/SelectorAPI/resig-SelectorsAPI-test-expected.txt: Updated results now that we pass a few more

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

12 years agoWebKit/mac:
beidson@apple.com [Fri, 13 Feb 2009 01:09:10 +0000 (01:09 +0000)]
WebKit/mac:

2009-02-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Kevin Decker

        <rdar://problem/6582180> - Wrong HTTP method applied to history item.

        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
          redirected request.

WebKit/win:

2009-02-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Kevin Decker

        <rdar://problem/6582180> - Wrong HTTP method applied to history item.

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
          redirected request.

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

12 years agowx build fixes.
kevino@webkit.org [Fri, 13 Feb 2009 00:48:12 +0000 (00:48 +0000)]
wx build fixes.

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Fri, 13 Feb 2009 00:35:39 +0000 (00:35 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Fix build with ACCELERATED_COMPOSITING turned on.

        Need to cast toRenderBox() in order to call overflowClipRect().

        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

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

12 years ago Reviewed by Simon Fraser.
cmarrin@apple.com [Fri, 13 Feb 2009 00:22:48 +0000 (00:22 +0000)]
    Reviewed by Simon Fraser.

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

        Fixed test results

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

12 years agoFix windows build.
oliver@apple.com [Fri, 13 Feb 2009 00:19:14 +0000 (00:19 +0000)]
Fix windows build.

Reviewed by NOBODY(OOPS!)

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 23:53:17 +0000 (23:53 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Rename getOverflowClipRect and getClipRect to overflowClipRect and clipRect.  Move them to RenderBox, since these methods
        only apply to boxes.  Devirtualize clipRect, since it was not subclassed.  Move controlClip stuff to RenderBox also.

        Reviewed by Simon Fraser

        * editing/Editor.cpp:
        (WebCore::Editor::insideVisibleArea):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::overflowClipRect):
        (WebCore::RenderBox::clipRect):
        * rendering/RenderBox.h:
        (WebCore::RenderBox::hasControlClip):
        (WebCore::RenderBox::controlClipRect):
        * rendering/RenderForeignObject.cpp:
        (WebCore::RenderForeignObject::paint):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::calculateClipRects):
        (WebCore::RenderLayer::calculateRects):
        * rendering/RenderLayerBacking.cpp:
        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
        * rendering/RenderObject.h:
        (WebCore::RenderObject::hasClip):
        (WebCore::RenderObject::hasOverflowClip):
        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::overflowClipRect):
        * rendering/RenderTable.h:

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 23:46:31 +0000 (23:46 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Fix build with ACCELERATED_COMPOSITING turned on (simple copy/paste error)

        * platform/graphics/mac/GraphicsLayerCA.mm:
        (WebCore::GraphicsLayerCA::setBasicAnimation):

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

12 years ago2009-02-12 Sam Weinig <sam@webkit.org>
weinig@apple.com [Thu, 12 Feb 2009 23:28:06 +0000 (23:28 +0000)]
2009-02-12  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        Speed up String.prototype.fontsize.

        * runtime/StringPrototype.cpp:
        (JSC::stringProtoFuncFontsize): Specialize for defined/commonly used values.

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

12 years ago2009-02-12 Julien Chaffraix <jchaffraix@webkit.org>
jchaffraix@webkit.org [Thu, 12 Feb 2009 23:18:51 +0000 (23:18 +0000)]
2009-02-12  Julien Chaffraix  <jchaffraix@webkit.org>

        Not reviewed.

        Release build fix when VIDEO is disabled (it should also
        help those with WORKERS or XSLT disabled).

        * bindings/js/JSDOMWindowBase.cpp:
        (jsDOMWindowBaseAudio): Added an UNUSED_PARAM for exec and slot when
        VIDEO is disabled.
        (jsDOMWindowBaseWorker): Ditto for WORKERS.
        (jsDOMWindowBaseXSLTProcessor): Ditto for XSLT.

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

12 years ago2009-02-12 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Thu, 12 Feb 2009 23:14:02 +0000 (23:14 +0000)]
2009-02-12  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Simon Fraser.

        https://bugs.webkit.org/show_bug.cgi?id=23923
        Implement mediaPlayerVolumeChanged so a media engine can report autonomous volume changes.
        Supporting this requires that we know when we are processing a media engine callback so
        we don't turn around and tell the media player to change the volume when it is reporting
        a volume change.

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement): initialize m_processingMediaPlayerCallback
        (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged): call begin/endProcessingMediaPlayerCallback
        (WebCore::HTMLMediaElement::setNetworkState): logic split out of mediaPlayerNetworkStateChanged
        to make it easier to maintain m_processingMediaPlayerCallback.
        (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged): call begin/endProcessingMediaPlayerCallback
        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
        (WebCore::HTMLMediaElement::mediaPlayerRepaint): Ditto.
        (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged): New
        (WebCore::HTMLMediaElement::updateVolume): Don't change media engine volume if we are processing
        a callback from the engine.
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::processingMediaPlayerCallback): New, return true if (m_processingMediaPlayerCallback>0)
        (WebCore::HTMLMediaElement::beginProcessingMediaPlayerCallback): New, increment m_processingMediaPlayerCallback
        (WebCore::HTMLMediaElement::endProcessingMediaPlayerCallback): New, decrement m_processingMediaPlayerCallback

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

12 years ago2009-02-12 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Thu, 12 Feb 2009 22:55:43 +0000 (22:55 +0000)]
2009-02-12  Eric Carlson  <eric.carlson@apple.com>

        Simon Fraser

        Support MPEG content on Mac and Windows.
        <rdar://problem/5917509>
        https://bugs.webkit.org/show_bug.cgi?id=23495

        Test: media/audio-mpeg-supported.html

        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):

        * platform/graphics/win/QTMovieWin.cpp:
        (QTMovieWin::disableUnsupportedTracks):

        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h: fix typo added in r40925

2009-02-12  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Simon Fraser.

        Support MPEG content on Mac and Windows.
        <rdar://problem/5917509>
        https://bugs.webkit.org/show_bug.cgi?id=23495

        * media/audio-mpeg-supported-expected.txt: Added.
        * media/audio-mpeg-supported.html: Added.
        * media/content/silence.mpg: Added.

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 22:54:05 +0000 (22:54 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Reviewed by Sam Weinig

        Move containsFloats, hasOverhangingFloats, shrinkToAvoidFloats and avoidsFloats down to
        RenderBox, since these methods only apply to boxes.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::collapseMargins):
        (WebCore::RenderBlock::clearFloatsIfNeeded):
        (WebCore::RenderBlock::layoutBlockChildren):
        (WebCore::RenderBlock::clearFloats):
        (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
        (WebCore::RenderBlock::calcBlockPrefWidths):
        * rendering/RenderBlock.h:
        (WebCore::RenderBlock::containsFloats):
        (WebCore::RenderBlock::hasOverhangingFloats):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::shrinkToAvoidFloats):
        (WebCore::RenderBox::avoidsFloats):
        * rendering/RenderBox.h:
        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        (WebCore::RenderObject::isFloatingOrPositioned):
        * rendering/RenderView.h:

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

12 years ago2009-02-12 Anders Carlsson <andersca@apple.com>
andersca@apple.com [Thu, 12 Feb 2009 22:43:14 +0000 (22:43 +0000)]
2009-02-12  Anders Carlsson  <andersca@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/6579412>
        REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture

        * Plugins/WebNetscapePluginView.h:
        * Plugins/WebNetscapePluginView.mm:
        (-[WebNetscapePluginView userAgent]):
        Apply workaround for Silverlight workaround.

        (-[WebNetscapePluginView _createPlugin]):
        Check if the plug-in that we're creating is the silverlight plug-in.

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

12 years ago2009-02-12 Chris Marrin <cmarrin@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 22:33:55 +0000 (22:33 +0000)]
2009-02-12  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Dave Hyatt

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

        Added parsing of 3d transform functions and properties
        (perspective, perspective-origin, transform-style-3d,
        and backface-visibility).

        Test: transforms/3d/cssmatrix-3d-interface.xhtml

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

12 years ago2009-02-12 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 12 Feb 2009 22:28:17 +0000 (22:28 +0000)]
2009-02-12  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Correctness fix.

        * wtf/RandomNumber.cpp:
        (WTF::randomNumber): Divide by the maximum representable value, which
        is different on each platform now, to get values between 0 and 1.

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

12 years ago2009-02-12 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 12 Feb 2009 22:22:07 +0000 (22:22 +0000)]
2009-02-12  Geoffrey Garen  <ggaren@apple.com>

        Build fix.

        * wtf/RandomNumber.cpp:
        (WTF::randomNumber):

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

12 years agowx build fix.
kevino@webkit.org [Thu, 12 Feb 2009 22:15:52 +0000 (22:15 +0000)]
wx build fix.

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

12 years agoWebCore:
beidson@apple.com [Thu, 12 Feb 2009 21:59:15 +0000 (21:59 +0000)]
WebCore:

2009-02-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.

        * platform/mac/SharedBufferMac.mm: Change to use RefPtr<> instead of ref()/deref().
        (-[WebCoreSharedBufferData dealloc]):
        (-[WebCoreSharedBufferData finalize]):
        (-[WebCoreSharedBufferData initWithSharedBuffer:]):

WebKit/mac:

2009-02-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin Adler

        Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.

        * History/WebBackForwardList.mm:
        (-[WebBackForwardList dealloc]): Null check before deref()'ing.
        (-[WebBackForwardList finalize]): Ditto.

        * Misc/WebIconFetcher.mm:
        (-[WebIconFetcher dealloc]): Null check before deref()'ing.
        (-[WebIconFetcher finalize]): Ditto.

        * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
        (-[WebEditCommand initWithEditCommand:]):
        (-[WebEditCommand dealloc]):
        (-[WebEditCommand finalize]):
        (-[WebEditCommand command]):

        * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
        (-[WebArchivePrivate init]):
        (-[WebArchivePrivate initWithCoreArchive:]):
        (-[WebArchivePrivate coreArchive]):
        (-[WebArchivePrivate setCoreArchive:]):
        (-[WebArchivePrivate dealloc]):
        (-[WebArchivePrivate finalize]):

        * WebView/WebDataSource.mm:
        (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
        (-[WebDataSourcePrivate finalize]): Ditto.

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

12 years ago2009-02-12 Geoffrey Garen <ggaren@apple.com>
ggaren@apple.com [Thu, 12 Feb 2009 21:56:13 +0000 (21:56 +0000)]
2009-02-12  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.

        Fixed <rdar://problem/6582048>.

        * wtf/RandomNumber.cpp:
        (WTF::randomNumber): Make only one call to the random number generator
        on platforms where the generator is cryptographically secure. The value
        of randomness over and above cryptographically secure randomness is not
        clear, and it caused some performance problems.

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 21:52:36 +0000 (21:52 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Remove calcWidth from RenderObject.  Nobody ever called it on RenderObjects.

        Reviewed by Sam Weinig

        * rendering/RenderObject.h:

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 21:38:23 +0000 (21:38 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Reviewed by Mark Rowe

        Fix for regression where form controls would paint yellow highlights.  The containsComposition check needs to
        null check node() now.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paint):

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 21:34:36 +0000 (21:34 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Build fix

        Change Animation::setDirection() to take the new enum value, and fix
        the single caller.

        Fix build error in MediaPlayerPrivateQTKit.h.

        * css/CSSStyleSelector.cpp:
        (WebCore::CSSStyleSelector::mapAnimationDirection):
        * platform/animation/Animation.h:
        (WebCore::Animation::setDirection):
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 21:33:14 +0000 (21:33 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        No review.

        Remove debugging code which was committed by mistake.

        * Scripts/run-webkit-tests:

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 21:26:57 +0000 (21:26 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Adam Roben

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

        Add detection of accelerated compositing and 3d transforms,
        and add various directories to $ignoredDirectories when these
        features are off.

        * Scripts/run-webkit-tests:
        * Scripts/webkitdirs.pm:

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 21:18:07 +0000 (21:18 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Reviewed by Simon Fraser

        Remove the overrideSize methods from RenderObject.  Devirtualize all of the accessors on RenderBox.

        * rendering/RenderBox.h:
        * rendering/RenderObject.h:

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

12 years ago2009-02-12 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Thu, 12 Feb 2009 21:08:19 +0000 (21:08 +0000)]
2009-02-12  Eric Carlson  <eric.carlson@apple.com>

        Darin Adler, Antti Koivisto, Holger Hans Peter Freyther

        Bug 23797: A platform should be able to use more than one media engine for <video> and <audio>
        https://bugs.webkit.org/show_bug.cgi?id=23797

        * WebCore.xcodeproj/project.pbxproj: add MediaPlayerPrivate.h

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::load): selectMediaURL now also returns a MIME type, pass it to
        MediaPlayer::load so it can choose the right media engine
        (WebCore::HTMLMediaElement::selectMediaURL): renamed from pickMedia. use MIMETypeRegistry
        functions to strip params from the url and extract the codecs parameter. call
        MediaPlayer::supportsType to see if we can open the file since only a media engine can
        answer questions about supported type+codecs.
        * html/HTMLMediaElement.h:

        * platform/MIMETypeRegistry.cpp:
        (WebCore::MIMETypeRegistry::getParameterFromMIMEType): New, find and return a MIME type parameter
        (WebCore::MIMETypeRegistry::stripParametersFromMIMEType): New, strip all parameters from a MIME type
        * platform/MIMETypeRegistry.h:

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
        (WebCore::NullMediaPlayerPrivate::load):
        (WebCore::NullMediaPlayerPrivate::cancelLoad):
        (WebCore::NullMediaPlayerPrivate::play):
        (WebCore::NullMediaPlayerPrivate::pause):
        (WebCore::NullMediaPlayerPrivate::naturalSize):
        (WebCore::NullMediaPlayerPrivate::hasVideo):
        (WebCore::NullMediaPlayerPrivate::setVisible):
        (WebCore::NullMediaPlayerPrivate::duration):
        (WebCore::NullMediaPlayerPrivate::currentTime):
        (WebCore::NullMediaPlayerPrivate::seek):
        (WebCore::NullMediaPlayerPrivate::seeking):
        (WebCore::NullMediaPlayerPrivate::setEndTime):
        (WebCore::NullMediaPlayerPrivate::setRate):
        (WebCore::NullMediaPlayerPrivate::paused):
        (WebCore::NullMediaPlayerPrivate::setVolume):
        (WebCore::NullMediaPlayerPrivate::networkState):
        (WebCore::NullMediaPlayerPrivate::readyState):
        (WebCore::NullMediaPlayerPrivate::maxTimeSeekable):
        (WebCore::NullMediaPlayerPrivate::maxTimeBuffered):
        (WebCore::NullMediaPlayerPrivate::dataRate):
        (WebCore::NullMediaPlayerPrivate::totalBytesKnown):
        (WebCore::NullMediaPlayerPrivate::totalBytes):
        (WebCore::NullMediaPlayerPrivate::bytesLoaded):
        (WebCore::NullMediaPlayerPrivate::setRect):
        (WebCore::NullMediaPlayerPrivate::paint):
        (WebCore::createNullMediaPlayer):
        Do nothing media player so MediaPlayer doesn't have to NULL check before calling current engine.

        (WebCore::MediaPlayerFactory::MediaPlayerFactory): New, factory constructor.
        (WebCore::installedMediaEngines): New, returns vector of all installed engines.
        (WebCore::addMediaEngine): New, add a media engine to the cache.
        (WebCore::chooseBestEngineForTypeAndCodecs): New, return an engine that might support a MIME type.
        (WebCore::MediaPlayer::MediaPlayer): create NULL media player so we have a default. Initialize m_currentMediaEngine.
        (WebCore::MediaPlayer::~MediaPlayer): don't need to delete m_private, it is now an OwnPtr.
        (WebCore::MediaPlayer::load): Take MIME type as well as url, since we need it to find the right
          media engine. If no MIME type is provided, try to devine one from the url. Choose a media engine
          based on the MIME type and codecs parameter.
        (WebCore::MediaPlayer::currentTime): Remove excess white space.
        (WebCore::MediaPlayer::supportsType): Take codecs param as well as MIME type. Return enum so we can
        indicate "maybe" condition.
        (WebCore::MediaPlayer::getSupportedTypes): Build up list of MIME types by consulting all engines.
        (WebCore::MediaPlayer::isAvailable): return true if any media engine is installed.

        * platform/graphics/MediaPlayer.h:
        (WebCore::MediaPlayer::):
        (WebCore::MediaPlayer::frameView): accessor function.

        * platform/graphics/MediaPlayerPrivate.h: New, declares abstract interface for media engines.
        (WebCore::MediaPlayerPrivateInterface::~MediaPlayerPrivateInterface):
        (WebCore::MediaPlayerPrivateInterface::totalBytesKnown):

        * platform/graphics/chromium/MediaPlayerPrivateChromium.h: Add support for engine factory

        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivate::create): New, media engine factory function
        (WebCore::MediaPlayerPrivate::registerMediaEngine): Register engine with MediaPlayer factory
        (WebCore::MediaPlayerPrivate::load): URL is a const String.
        (WebCore::MediaPlayerPrivate::duration): Declare const.
        (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
        (WebCore::MediaPlayerPrivate::hasVideo): Ditto.
        (WebCore::MediaPlayerPrivate::networkState): Ditto.
        (WebCore::MediaPlayerPrivate::readyState): Ditto.
        (WebCore::MediaPlayerPrivate::maxTimeBuffered): Ditto.
        (WebCore::MediaPlayerPrivate::maxTimeSeekable): Ditto.
        (WebCore::MediaPlayerPrivate::maxTimeLoaded): Ditto.
        (WebCore::MediaPlayerPrivate::bytesLoaded): Ditto.
        (WebCore::MediaPlayerPrivate::totalBytesKnown): Ditto.
        (WebCore::MediaPlayerPrivate::totalBytes): Ditto.
        (WebCore::MediaPlayerPrivate::supportsType): Return MediaPlayer::SupportsType enum instead of bool.
        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
        (WebCore::MediaPlayerPrivate::isAvailable):

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::create): New, media engine factory function
        (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Register engine with MediaPlayer factory
        (WebCore::MediaPlayerPrivate::createQTMovieView): don't access MediaPlayer->m_frameView directly,
        use accessor function.
        (WebCore::MediaPlayerPrivate::setUpVideoRendering): Ditto.
        (WebCore::MediaPlayerPrivate::paint): Ditto.
        (WebCore::mimeTypeCache): New.
        (WebCore::MediaPlayerPrivate::getSupportedTypes): New, media engine factory function.
        (WebCore::MediaPlayerPrivate::supportsType): return MediaPlayer::SupportsType enum instead of bool
        (-[WebCoreMovieObserver initWithCallback:]): fix formatting

        * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
        (WebCore::MediaPlayerPrivate::create):
        (WebCore::MediaPlayerPrivate::registerMediaEngine):
        (WebCore::MediaPlayerPrivate::supportsType):
        (WebCore::MediaPlayerPrivate::load): URL is a const String.
        * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
        (WebCore::MediaPlayerPrivate::isAvailable):

        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
        (WebCore::MediaPlayerPrivate::create): New, media engine factory function
        (WebCore::MediaPlayerPrivate::registerMediaEngine): New, register engine with MediaPlayer factory
        (WebCore::MediaPlayerPrivate::load): URL is a const String.
        (WebCore::MediaPlayerPrivate::paint): don't access MediaPlayer->m_frameView directly,
        use accessor function.
        (WebCore::mimeTypeCache): New.
        (WebCore::MediaPlayerPrivateQTWin::getSupportedTypes): New, media engine factory function.
        (WebCore::MediaPlayerPrivateQTWin::supportsType): return MediaPlayer::SupportsType enum instead of bool
        * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:

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

12 years agoWebCore:
jchaffraix@webkit.org [Thu, 12 Feb 2009 20:52:02 +0000 (20:52 +0000)]
WebCore:

2009-02-12  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        Test: fast/dom/prefixed-image-tag.xhtml

        Bug 23915: Remove setPrefix work-around in Document::createElement(QualifiedName, bool)

        Instead we now directly propage the QualifiedName inside the generated Factory.

        Test: fast/dom/prefixed-image-tag.xhtml

        * dom/Document.cpp:
        (WebCore::Document::createElement): Removed the setPrefix work-around
        and replaced it with an ASSERT to catch mistakes inside the Factory code.
        Remove the unneeded ExceptionCode argument.

        (WebCore::Document::createElementNS): Removed ExceptionCode argument.
        * dom/Document.h: Updated the signature.
        * dom/XMLTokenizerLibxml2.cpp:
        (WebCore::XMLTokenizer::startElementNs): Removed ExceptionCode argument.
        * dom/XMLTokenizerQt.cpp: Ditto.
        (WebCore::XMLTokenizer::parseStartElement): Ditto.

        * dom/make_names.pl: Implemented the QualifiedName propogation logic
        in the Factory.

LayoutTests:

2009-02-12  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        Bug 23915: Remove setPrefix work-around in Document::createElement(QualifiedName, bool)

        The test validates the <image> special treatment (using <img> tag) and see whether
        it validates the previous behaviour and we do not ASSERT.

        * fast/dom/prefixed-image-tag-expected.txt: Added.
        * fast/dom/prefixed-image-tag.xhtml: Added.

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

12 years ago2009-02-12 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 20:47:01 +0000 (20:47 +0000)]
2009-02-12  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dave Hyatt

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

        Define enum values for Animation::direction(), and one for
        IterationCountInfinite to make the code more self-documenting.

        Order the member vars of Animation to optimize packing.

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

12 years ago Reviewed by Holger Freyther.
christian@webkit.org [Thu, 12 Feb 2009 20:42:03 +0000 (20:42 +0000)]
    Reviewed by Holger Freyther.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::ResourceHandle::startHttp): Don't use O_CLOEXEC for now.

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

12 years agoWebCore:
jchaffraix@webkit.org [Thu, 12 Feb 2009 20:31:17 +0000 (20:31 +0000)]
WebCore:

2009-02-12  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        Bug 23826: Potential bug with before/after rule while moving element from one document to another

        Moved the document before/after toggle from the constructor to insertedIntoDocument.

        Test: fast/css-generated-content/beforeAfter-interdocument.html

        * html/HTMLQuoteElement.cpp:
        (WebCore::HTMLQuoteElement::HTMLQuoteElement):
        (WebCore::HTMLQuoteElement::insertedIntoDocument):
        * html/HTMLQuoteElement.h:

LayoutTests:

2009-02-12  Julien Chaffraix  <jchaffraix@webkit.org>

        Reviewed by Darin Adler.

        Bug 23826: Potential bug with before/after rule while moving element from one document to another

        * fast/css-generated-content/beforeAfter-interdocument.html: Added.
        * platform/mac/fast/css-generated-content/beforeAfter-interdocument-expected.txt: Added.

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

12 years ago2009-02-12 Brady Eidson <beidson@apple.com>
beidson@apple.com [Thu, 12 Feb 2009 20:30:16 +0000 (20:30 +0000)]
2009-02-12  Brady Eidson  <beidson@apple.com>

        Reviewed by Kevin Decker

        <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit

        NSHTMLReader tries to create a WebArchive from a random chunk of data.  Previously, WebArchive creation would
        fail and return nil and NSHTMLReader would try something else.  When we changed the behavior to return an invalid
        WebArchive object, things started getting weird.

        * WebView/WebArchive.mm:
        (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
        (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
        (-[WebArchivePrivate finalize]): Ditto
        (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 20:18:50 +0000 (20:18 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Reviewed by Simon Fraser

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

        I have no idea why this broke.  As far as I can tell the old code never should have worked in
        the first place.  Add code to handleWheelEvent that will find an enclosing renderer for a node
        in order to attempt a wheel scroll.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleWheelEvent):

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

12 years ago[GTK] API: hovering-over-link and webkit_web_view_open /_load_foo
christian@webkit.org [Thu, 12 Feb 2009 19:44:47 +0000 (19:44 +0000)]
[GTK] API: hovering-over-link and webkit_web_view_open /_load_foo
http://bugs.webkit.org/show_bug.cgi?id=17176

Reviewed by Holger Freyther.

* webkit/webkitwebframe.cpp:
* webkit/webkitwebframe.h:
* webkit/webkitwebview.cpp:
* webkit/webkitwebview.h: Introduce webkit_web_frame_load_uri,
webkit_web_frame_load_string, webkit_web_view_load_uri and
webkit_web_view_load_request and unify implementations.

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

12 years ago Try to fix dashboard-region-parser
aroben@apple.com [Thu, 12 Feb 2009 19:41:07 +0000 (19:41 +0000)]
    Try to fix dashboard-region-parser

        * platform/mac/fast/css/dashboard-region-parser.html: Fixed relative
        paths now that this test has moved.

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

12 years ago2009-02-12 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 19:28:24 +0000 (19:28 +0000)]
2009-02-12  David Hyatt  <hyatt@apple.com>

        Move the functions that paint borders, box shadows and border images into RenderBoxModelObject.  drawBorder and drawBorderArc, because they are used
        for outlines as well as borders, need to stay in RenderObject.  Rename them to drawLineForBoxSide and drawArcForBoxSide in order to reflect their
        more generic use.  Rename the BorderSide struct to BoxSide, since the concept of "side" is just a rectangle concept and not a border concept.

        Reviewed by Simon Fraser

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::paintFillLayer):
        (WebCore::InlineFlowBox::paintBoxShadow):
        (WebCore::InlineFlowBox::paintBoxDecorations):
        (WebCore::InlineFlowBox::paintMask):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintColumns):
        * rendering/RenderBoxModelObject.cpp:
        (WebCore::RenderBoxModelObject::paintNinePieceImage):
        (WebCore::RenderBoxModelObject::paintBorder):
        (WebCore::RenderBoxModelObject::paintBoxShadow):
        * rendering/RenderBoxModelObject.h:
        * rendering/RenderFieldset.cpp:
        (WebCore::RenderFieldset::paintBorderMinusLegend):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::paintOutlineForLine):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::drawLineForBoxSide):
        (WebCore::RenderObject::drawArcForBoxSide):
        (WebCore::RenderObject::paintOutline):
        * rendering/RenderObject.h:
        (WebCore::):
        (WebCore::RenderObject::hasBoxDecorations):
        * rendering/RenderTableCell.cpp:
        (WebCore::CollapsedBorders::addBorder):
        (WebCore::RenderTableCell::paintCollapsedBorder):

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

12 years ago Reviewed by Simon Fraser.
cmarrin@apple.com [Thu, 12 Feb 2009 19:25:03 +0000 (19:25 +0000)]
    Reviewed by Simon Fraser.

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

        Skip 16 SVG tests that fail on PPC, until problem is resolved

        * platform/mac/Skipped:

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

12 years ago Reviewed by Simon Fraser.
cmarrin@apple.com [Thu, 12 Feb 2009 19:21:59 +0000 (19:21 +0000)]
    Reviewed by Simon Fraser.

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

        This fixes one testcase on PPC Mac

        * svg/custom/getTransformToElement.svg:

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

12 years ago2009-02-12 Eric Carlson <eric.carlson@apple.com>
eric.carlson@apple.com [Thu, 12 Feb 2009 18:43:31 +0000 (18:43 +0000)]
2009-02-12  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Simon Fraser

        Bug 18322: video element should have ui when scripting is disabled
        https://bugs.webkit.org/show_bug.cgi?id=18322

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::controls): always return 'true' when JavaScript is disabled.
        * manual-tests/media-controls-when-javascript-disabled.html: Added.

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

12 years ago* configure.ac: Make soup the default HTTP backend for the Gtk port.
christian@webkit.org [Thu, 12 Feb 2009 18:32:09 +0000 (18:32 +0000)]
* configure.ac: Make soup the default HTTP backend for the Gtk port.

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

12 years ago2009-02-12 Dimitri Glazkov <dglazkov@chromium.org>
dglazkov@chromium.org [Thu, 12 Feb 2009 18:18:11 +0000 (18:18 +0000)]
2009-02-12  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Eric Seidel.

        https://bugs.webkit.org/show_bug.cgi?id=23906
        Add custom V8 bindings for HTMLPlugInElement.

        * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp: Added.
        (WebCore::NAMED_PROPERTY_GETTER):
        (WebCore::NAMED_PROPERTY_SETTER):
        (WebCore::CALLBACK_FUNC_DECL):
        (WebCore::INDEXED_PROPERTY_GETTER):
        (WebCore::INDEXED_PROPERTY_SETTER):

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

12 years ago [GTK] Soup backend must handle upload of multiple files
christian@webkit.org [Thu, 12 Feb 2009 18:11:54 +0000 (18:11 +0000)]
    [GTK] Soup backend must handle upload of multiple files
        https://bugs.webkit.org/show_bug.cgi?id=18343

Reviewed by Mark Rowe.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::):
        (WebCore::freeFileMapping):
        (WebCore::ResourceHandle::startHttp): Support multipart request bodies
        mmap'ing files to be uploaded.

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

12 years ago Add some tests that fail due to using the wrong font for Hebrew to the Window...
aroben@apple.com [Thu, 12 Feb 2009 17:27:44 +0000 (17:27 +0000)]
    Add some tests that fail due to using the wrong font for Hebrew to the Windows Skipped list

        * platform/win/Skipped:

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

12 years ago Fix lots of Perl warnings when building JavaScriptCoreGenerated on Windows
aroben@apple.com [Thu, 12 Feb 2009 17:10:16 +0000 (17:10 +0000)]
    Fix lots of Perl warnings when building JavaScriptCoreGenerated on Windows

        Reviewed by John Sullivan.

        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
        Create the docs/ directory so that we can write bytecode.html into it.
        This matches what JavaScriptCore.xcodeproj does.

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

12 years ago Remove some passing tests from the Windows Skipped list
aroben@apple.com [Thu, 12 Feb 2009 16:48:50 +0000 (16:48 +0000)]
    Remove some passing tests from the Windows Skipped list

        * platform/win/Skipped: Removed two tests in http/tests/incremental
        (one of which had been renamed and so was running anyway).

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

12 years ago Fix Bug 23922: Warning message from run-webkit-tests when Skipped file contai...
aroben@apple.com [Thu, 12 Feb 2009 16:48:40 +0000 (16:48 +0000)]
    Fix Bug 23922: Warning message from run-webkit-tests when Skipped file contains non-existent tests is confusing and is given for disabled tests

        <https://bugs.webkit.org/show_bug.cgi?id=23922>

        We now no longer warn about disabled tests. The warning now reads:

        Skipped list contained '$item', but no file of that name could be
        found

        Reviewed by John Sullivan.

        * Scripts/run-webkit-tests:
        (top level): Pass the list name to processIgnoreTests so it can print
        out a reasonable warning message.
        (processIgnoreTests): Take a list name as a second parameter and use
        it to display a better warning message. Also check for a "-disabled"
        version of the test before warning about it not existing.

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

12 years ago Add a failing loader test to the Windows Skipped list
aroben@apple.com [Thu, 12 Feb 2009 16:48:28 +0000 (16:48 +0000)]
    Add a failing loader test to the Windows Skipped list

        * platform/win/Skipped: Added fast/loader/frame-creation-removal.html.

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

12 years ago Add another failing drag-n-drop test to the Windows Skipped list
aroben@apple.com [Thu, 12 Feb 2009 16:48:16 +0000 (16:48 +0000)]
    Add another failing drag-n-drop test to the Windows Skipped list

        * platform/win/Skipped: Added editing/selection/drag-in-iframe.html.

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

12 years ago Fix Bug 23919: Mac-specific test fast/css/dashboard-region-parser is in cross...
aroben@apple.com [Thu, 12 Feb 2009 16:48:03 +0000 (16:48 +0000)]
    Fix Bug 23919: Mac-specific test fast/css/dashboard-region-parser is in cross-platform location

        <https://bugs.webkit.org/show_bug.cgi?id=23919>

        Moved the test and its results to platform/mac.

        Reviewed by Dan Bernstein.

        * platform/mac/fast/css/dashboard-region-parser-expected.txt: Renamed from LayoutTests/fast/css/dashboard-region-parser-expected.txt.
        * platform/mac/fast/css/dashboard-region-parser.html: Renamed from LayoutTests/fast/css/dashboard-region-parser.html.

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

12 years ago Fix Bug 23918: Mac-specific results for fast/css/computed-style[-without...
aroben@apple.com [Thu, 12 Feb 2009 16:47:38 +0000 (16:47 +0000)]
    Fix Bug 23918: Mac-specific results for fast/css/computed-style[-without-renderer] are sitting in cross-platform location

        <https://bugs.webkit.org/show_bug.cgi?id=23918>

        Move Mac-specific results for
        fast/css/computed-style[-without-renderer] to platform/mac

        Reviewed by John Sullivan.

        * fast/css/computed-style-expected.txt:
        * fast/css/computed-style-without-renderer-expected.txt:
        Made these results correct for non-Mac platforms by removing the
        -webkit-dashboard-region references.

        * platform/mac/fast/css/computed-style-expected.txt: Copied from LayoutTests/fast/css/computed-style-expected.txt.
        * platform/mac/fast/css/computed-style-without-renderer-expected.txt: Copied from LayoutTests/fast/css/computed-style-without-renderer-expected.txt.

        * platform/win/fast/css/computed-style-expected.txt:
        * platform/win/fast/css/computed-style-without-renderer-expected.txt:
        Copied the non-Mac results here, too, since on Windows we first check
        for Mac-specific results before checking for cross-platform results.

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

12 years ago2009-02-12 Adam Treat <adam.treat@torchmobile.com>
treat@webkit.org [Thu, 12 Feb 2009 15:01:15 +0000 (15:01 +0000)]
2009-02-12  Adam Treat  <adam.treat@torchmobile.com>

        Fix the Qt build following r40871 which changed RenderObject::element()
        into RenderObject::node().

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::getMediaElementFromRenderObject):
        (WebCore::RenderThemeQt::getMediaControlForegroundColor):

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

12 years ago2009-02-12 Simon Hausmann <simon.hausmann@nokia.com>
hausmann@webkit.org [Thu, 12 Feb 2009 10:51:10 +0000 (10:51 +0000)]
2009-02-12  Simon Hausmann  <simon.hausmann@nokia.com>

        Rubber-stamped by Lars.

        Re-enable the JIT in the Qt build with -fno-stack-protector on Linux.

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

12 years ago Build fix.
ap@webkit.org [Thu, 12 Feb 2009 10:45:19 +0000 (10:45 +0000)]
    Build fix.

        * platform/graphics/transforms/RotateTransformOperation.cpp: Include <algorithm>.

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

12 years ago2009-02-12 Jian Li <jianli@chromium.org>
ap@webkit.org [Thu, 12 Feb 2009 09:08:37 +0000 (09:08 +0000)]
2009-02-12  Jian Li  <jianli@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Change worker code to use different proxy class pointers.
        https://bugs.webkit.org/show_bug.cgi?id=23859

        This is a step towards using separate proxies in multi-process implementation.

        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        * dom/Worker.cpp:
        (WebCore::Worker::Worker):
        (WebCore::Worker::~Worker):
        (WebCore::Worker::postMessage):
        (WebCore::Worker::terminate):
        (WebCore::Worker::hasPendingActivity):
        (WebCore::Worker::notifyFinished):
        (WebCore::Worker::dispatchMessage):
        * dom/Worker.h:
        * dom/WorkerContext.cpp:
        (WebCore::WorkerContext::~WorkerContext):
        (WebCore::WorkerContext::reportException):
        (WebCore::WorkerContext::addMessage):
        (WebCore::WorkerContext::postMessage):
        (WebCore::WorkerContext::dispatchMessage):
        * dom/WorkerContext.h:
        * dom/WorkerContextProxy.h:
        * dom/WorkerMessagingProxy.cpp:
        (WebCore::MessageWorkerContextTask::performTask):
        (WebCore::MessageWorkerTask::performTask):
        (WebCore::WorkerContextProxy::create):
        (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::startWorkerContext):
        (WebCore::postConsoleMessageTask):
        (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
        (WebCore::WorkerMessagingProxy::workerThreadCreated):
        * dom/WorkerMessagingProxy.h:
        * dom/WorkerObjectProxy.h:
        * dom/WorkerThread.cpp:
        (WebCore::WorkerThread::create):
        (WebCore::WorkerThread::WorkerThread):
        (WebCore::WorkerThread::workerThread):
        * dom/WorkerThread.h:
        (WebCore::WorkerThread::workerObjectProxy):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):

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

12 years ago2009-02-12 David Levin <levin@chromium.org>
ap@webkit.org [Thu, 12 Feb 2009 08:32:53 +0000 (08:32 +0000)]
2009-02-12  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 23688: ThreadableLoader needs a sync implementation for Workers.
        <https://bugs.webkit.org/show_bug.cgi?id=23688>

        Add ResourceError to ThreadableLoaderClient.

        No observable change in behavior, so no test.

        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::create):
        (WebCore::DocumentThreadableLoader::willSendRequest):
        (WebCore::DocumentThreadableLoader::didFail):
        * loader/ThreadableLoaderClient.h:
        (WebCore::ThreadableLoaderClient::didFail):
        (WebCore::ThreadableLoaderClient::didFailWillSendRequestCheck):
        * loader/ThreadableLoaderClientWrapper.h:
        (WebCore::ThreadableLoaderClientWrapper::didFail):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
        (WebCore::workerContextDidFail):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
        * loader/WorkerThreadableLoader.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::didFail):
        (WebCore::XMLHttpRequest::didFailWillSendRequestCheck):
        * xml/XMLHttpRequest.h:

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

12 years ago2009-02-11 Dmitry Titov <dimich@chromium.org>
ap@webkit.org [Thu, 12 Feb 2009 07:58:36 +0000 (07:58 +0000)]
2009-02-11  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=23705
        Fix the UI freeze caused by Worker generating a flood of messages.
        Measure time we spend in executing posted work items. If too much time is spent
        without returning to the run loop, exit and reschedule.

        * wtf/MainThread.h:
        Added initializeMainThreadPlatform() to initialize low-level mechanism for posting
        work items from thread to thread. This removes #ifdefs for WIN and CHROMIUM from platform-independent code.

        * wtf/MainThread.cpp:
        (WTF::initializeMainThread):
        (WTF::dispatchFunctionsFromMainThread):
        Instead of dispatching all work items in the queue, dispatch them one by one
        and measure elapsed time. After a threshold, reschedule and quit.

        (WTF::callOnMainThread):
        (WTF::callOnMainThreadAndWait):
        Only schedule dispatch if the queue was empty - to avoid many posted messages in the run loop queue.

        * wtf/mac/MainThreadMac.mm:
        (WTF::scheduleDispatchFunctionsOnMainThread):
        Use static instance of the mainThreadCaller instead of allocating and releasing it each time.
        (WTF::initializeMainThreadPlatform):
        * wtf/gtk/MainThreadChromium.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/gtk/MainThreadGtk.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/qt/MainThreadQt.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/win/MainThreadWin.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/wx/MainThreadWx.cpp:
        (WTF::initializeMainThreadPlatform):

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

12 years ago2009-02-11 Simon Fraser <simon.fraser@apple.com>
simon.fraser@apple.com [Thu, 12 Feb 2009 05:53:06 +0000 (05:53 +0000)]
2009-02-11  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dave Hyatt

        Fix the build on Leopard with ACCELERATED_COMPOSITING turned on.

        * WebCore.xcodeproj/project.pbxproj:
        FloatPoint3D needs to be a private header, since it's included by GraphicsLayer.h
        * platform/graphics/mac/GraphicsLayerCA.mm:
        (WebCore::getTransformFunctionValue):
        (WebCore::caValueFunctionSupported):
        (WebCore::GraphicsLayerCA::setAnchorPoint):
        (WebCore::GraphicsLayerCA::setPreserves3D):
        (WebCore::GraphicsLayerCA::setContentsToImage):
        (WebCore::GraphicsLayerCA::setBasicAnimation):
        (WebCore::GraphicsLayerCA::setKeyframeAnimation):
        * rendering/RenderLayer.h:
        (WebCore::RenderLayer::isRootLayer):
        Fix isRootLayer to return true for the renderView's layer, not the root
        renderer's layer.

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

12 years ago2009-02-11 Brady Eidson <beidson@apple.com>
beidson@apple.com [Thu, 12 Feb 2009 05:48:41 +0000 (05:48 +0000)]
2009-02-11  Brady Eidson  <beidson@apple.com>

        Fix my last checkin for more effect.

        * WebHistoryItem.cpp:
        (WebHistoryItem::initFromDictionaryRepresentation):

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

12 years ago2009-02-11 Adele Peterson <adele@apple.com>
adele@apple.com [Thu, 12 Feb 2009 05:06:02 +0000 (05:06 +0000)]
2009-02-11  Adele Peterson  <adele@apple.com>

        Reviewed by Oliver Hunt.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=23910
        <rdar://problem/6160546> REGRESSION: In Full page mode, movie controller hides when I drag the knob if movie is playing

        * rendering/RenderMedia.cpp: (WebCore::RenderMedia::forwardEvent):
        When we get a mouseOut event, consider the mouse as still within the RenderMedia if the relatedTarget is a descendant.

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

12 years agoFix the build.
mrowe@apple.com [Thu, 12 Feb 2009 04:15:16 +0000 (04:15 +0000)]
Fix the build.

* History/WebHistory.mm:
(-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.

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

12 years agoWindows fix for Bug 22239: Implement missing animation & transition APIs on LayoutTes...
aroben@apple.com [Thu, 12 Feb 2009 04:07:18 +0000 (04:07 +0000)]
Windows fix for Bug 22239: Implement missing animation & transition APIs on LayoutTestController for non-mac platforms

WebKit/win:

        Windows fix for Bug 22239: Implement missing animation & transition
        APIs on LayoutTestController for non-mac platforms

        <https://bugs.webkit.org/show_bug.cgi?id=22239>

        Reviewed by Simon Fraser.

        * Interfaces/IWebFramePrivate.idl: Added pauseAnimation,
        pauseTransition, and numberOfActiveAnimations.

        * WebFrame.cpp:
        (WebFrame::pauseAnimation):
        (WebFrame::pauseTransition):
        (WebFrame::numberOfActiveAnimation):
        Added. These all call through to AnimationController.

        * WebFrame.h: Added pauseAnimation, pauseTransition, and
        numberOfActiveAnimations.

WebKitTools:

        Windows fix for Bug 22239: Implement missing animation & transition
        APIs on LayoutTestController for non-mac platforms

        <https://bugs.webkit.org/show_bug.cgi?id=22239>

        Reviewed by Simon Fraser.

        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
        (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
        (LayoutTestController::numberOfActiveAnimations):
        Implemented these by calling through to IWebFramePrivate.

LayoutTests:

        Windows fix for Bug 22239: Implement missing animation & transition
        APIs on LayoutTestController for non-mac platforms

        <https://bugs.webkit.org/show_bug.cgi?id=22239>

        Reviewed by Simon Fraser.

        * platform/win/Skipped: Enable the previously-skipped tests.

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

12 years agoWebKit/mac:
beidson@apple.com [Thu, 12 Feb 2009 02:30:38 +0000 (02:30 +0000)]
WebKit/mac:

2009-02-11  Brady Eidson  <beidson@apple.com>

        Reviewed by Mark Rowe

        <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative

        Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed
        and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
        which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.

        * History/WebHistory.mm:
        (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
        (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
          if an entry for the URL already exists.  Use that mode when reading the History.plist so only the most
          recent entry for a given URL will be used.
        (-[WebHistoryPrivate addItems:]):
        (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):

WebKit/win:

2009-02-11  Brady Eidson  <beidson@apple.com>

        Reviewed by Mark Rowe

        <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative

        Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed
        and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
        which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.

        * WebHistory.cpp:
        (WebHistory::loadHistoryGutsFromURL):
        (WebHistory::addItems):
        (WebHistory::addItem): Add a mode that allows the entry being added to be discarded if an entry for the URL already
          exists.  Use that mode when reading the History.plist so only the most recent entry for a given URL will be used.
        (WebHistory::visitedURL): Swap the removeItemFromDateCaches and visitedWithTitle calls.
        * WebHistory.h:

        * WebHistoryItem.cpp:
        (WebHistoryItem::initFromDictionaryRepresentation):  Add the negative-visit-count-correction-logic as implemented
          for Mac in http://trac.webkit.org/changeset/40851.

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

12 years ago2009-02-11 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 01:59:47 +0000 (01:59 +0000)]
2009-02-11  David Hyatt  <hyatt@apple.com>

        Remove all of the inline box wrapper functions from RenderObject, since they only apply to RenderBox.  Devirtualize the functions.
        Patch all of the call sites to convert to a RenderBox.

        Reviewed by Simon Fraser

        * dom/Position.cpp:
        (WebCore::nextRenderedEditable):
        (WebCore::previousRenderedEditable):
        (WebCore::Position::getInlineBoxAndOffset):
        * rendering/InlineBox.cpp:
        (WebCore::InlineBox::deleteLine):
        (WebCore::InlineBox::extractLine):
        (WebCore::InlineBox::attachLine):
        * rendering/RenderLineBoxList.cpp:
        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        * rendering/RenderObjectChildList.cpp:
        (WebCore::RenderObjectChildList::removeChildNode):
        * rendering/RenderTextControl.cpp:
        (WebCore::RenderTextControl::textWithHardLineBreaks):

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

12 years ago2009-02-11 David Hyatt <hyatt@apple.com>
hyatt@apple.com [Thu, 12 Feb 2009 01:35:08 +0000 (01:35 +0000)]
2009-02-11  David Hyatt  <hyatt@apple.com>

        Eliminate createInlineBox and dirtyLineBoxes from RenderObject.  These functions have been devirtualized.
        The single call site now calls a helper function that just bit checks and casts before calling the correct
        type.  RenderBlock's dirtyLineBoxes function was dead code (caused by the RenderFlow deletion), so it has
        just been removed.

        Reviewed by Eric Seidel

        * rendering/RenderBR.cpp:
        * rendering/RenderBR.h:
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::createRootInlineBox):
        * rendering/RenderBlock.h:
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::createInlineBox):
        * rendering/RenderBox.h:
        * rendering/RenderCounter.cpp:
        * rendering/RenderCounter.h:
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::createInlineFlowBox):
        * rendering/RenderInline.h:
        * rendering/RenderObject.cpp:
        * rendering/RenderObject.h:
        * rendering/RenderSVGInlineText.cpp:
        (WebCore::RenderSVGInlineText::createTextBox):
        * rendering/RenderSVGInlineText.h:
        (WebCore::RenderSVGInlineText::isSVGText):
        * rendering/RenderText.cpp:
        (WebCore::RenderText::createTextBox):
        (WebCore::RenderText::createInlineTextBox):
        * rendering/RenderText.h:
        * rendering/bidi.cpp:
        (WebCore::createInlineBoxForRenderer):
        (WebCore::RenderBlock::createLineBoxes):
        (WebCore::RenderBlock::constructLine):
        (WebCore::RenderBlock::layoutInlineChildren):

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

12 years ago2009-02-11 Sam Weinig <sam@webkit.org>
weinig@apple.com [Thu, 12 Feb 2009 00:37:35 +0000 (00:37 +0000)]
2009-02-11  Sam Weinig  <sam@webkit.org>

        Reviewed by Gavin Barraclough.

        Style cleanup.

        * assembler/AbstractMacroAssembler.h:
        (JSC::AbstractMacroAssembler::CodeLocationCommon::CodeLocationCommon):
        (JSC::AbstractMacroAssembler::CodeLocationCommon::operator bool):
        (JSC::AbstractMacroAssembler::CodeLocationCommon::reset):
        (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForSwitch):
        (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForExceptionHandler):
        (JSC::AbstractMacroAssembler::CodeLocationLabel::addressForJSR):
        (JSC::AbstractMacroAssembler::CodeLocationLabel::getJumpDestination):
        (JSC::AbstractMacroAssembler::CodeLocationJump::relink):
        (JSC::AbstractMacroAssembler::CodeLocationJump::CodeLocationJump):
        (JSC::AbstractMacroAssembler::CodeLocationCall::relink):
        (JSC::AbstractMacroAssembler::CodeLocationCall::calleeReturnAddressValue):
        (JSC::AbstractMacroAssembler::CodeLocationCall::CodeLocationCall):
        (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::repatch):
        (JSC::AbstractMacroAssembler::CodeLocationDataLabel32::CodeLocationDataLabel32):
        (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::repatch):
        (JSC::AbstractMacroAssembler::CodeLocationDataLabelPtr::CodeLocationDataLabelPtr):
        (JSC::AbstractMacroAssembler::ProcessorReturnAddress::ProcessorReturnAddress):
        (JSC::AbstractMacroAssembler::ProcessorReturnAddress::relinkCallerToFunction):
        (JSC::AbstractMacroAssembler::ProcessorReturnAddress::operator void*):
        (JSC::AbstractMacroAssembler::PatchBuffer::link):
        (JSC::::CodeLocationCommon::labelAtOffset):
        (JSC::::CodeLocationCommon::jumpAtOffset):
        (JSC::::CodeLocationCommon::callAtOffset):
        (JSC::::CodeLocationCommon::dataLabelPtrAtOffset):
        (JSC::::CodeLocationCommon::dataLabel32AtOffset):

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