WebKit-https.git
13 years agoWebCore:
antti@apple.com [Tue, 13 Nov 2007 20:08:27 +0000 (20:08 +0000)]
WebCore:

        Reviewed by Adele.

        Fix that 'timeupdate' and 'waiting' events were never dispatched.

        Add explicit m_paused attribute instead of trying to derive paused state from
        underlying media. Call updatePlayState() to start/stop media playback
        when any attribute that affects active playback state changes. This matches
        specification text.

        Test: http/tests/media/video-play-stall.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::setReadyState):
        (WebCore::HTMLMediaElement::paused):
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::pause):
        (WebCore::HTMLMediaElement::checkIfSeekNeeded):
        (WebCore::HTMLMediaElement::movieDidEnd):
        (WebCore::HTMLMediaElement::updatePlayState):
        * html/HTMLMediaElement.h:

LayoutTests:

        Reviewed by Adele.

        - add HTTP media test for stalling load
        - update tests that don't specifically test autoplay feature to not use autoplay
          attribute since playback may start before event listeners are registered

        * http/tests/media: Added.
        * http/tests/media/video-load-and-stall.cgi: Added.
        * http/tests/media/video-play-stall-expected.txt: Added.
        * http/tests/media/video-play-stall.html: Added.
        * media/video-autoplay.html:
        * media/video-dom-loopstart.html:
        * media/video-end.html:
        * media/video-loopcount.html:
        * media/video-loopend.html:
        * media/video-loopstart.html:

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

13 years ago Reviewed by Adele.
antti@apple.com [Tue, 13 Nov 2007 20:05:36 +0000 (20:05 +0000)]
    Reviewed by Adele.

        Add support for http media tests

        * Scripts/run-webkit-tests:

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

13 years ago Windows build fix.
ap@webkit.org [Tue, 13 Nov 2007 19:54:40 +0000 (19:54 +0000)]
    Windows build fix.

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertUTF8ToUTF16):
        * kjs/ustring.cpp:
        (KJS::UString::UTF8String):
        * wtf/unicode/UTF8.cpp:
        (WTF::Unicode::ConvertUTF8ToUTF16):

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

13 years ago Add IDOMElementPrivate::font() to get an element's font
sfalken@apple.com [Tue, 13 Nov 2007 19:29:45 +0000 (19:29 +0000)]
    Add IDOMElementPrivate::font() to get an element's font
        as a WebFontDescription.

        Reviewed by Darin.

        * DOMCoreClasses.cpp:
        (DOMElement::font):
        * DOMCoreClasses.h:
        * Interfaces/DOMPrivate.idl:

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

13 years agoWebCore:
sullivan@apple.com [Tue, 13 Nov 2007 18:15:27 +0000 (18:15 +0000)]
WebCore:

        Reviewed by Darin.

        removed recently-added PreferredType concept; we found a better way to do what
        ths was accomplishing

        * bridge/WindowFeatures.h:
        (WebCore::WindowFeatures::WindowFeatures):
        removed definition of PreferredType

        * page/ContextMenuController.cpp:
        (WebCore::openNewWindow):
        removed use of PreferredType

WebKit/mac:

        Reviewed by Darin.

        removed recently-added PreferredType concept; we found a better way to do what
        ths was accomplishing

        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::createWindow):
        removed use of PreferredType

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

13 years ago Reviewed by Dan Bernstein.
sullivan@apple.com [Tue, 13 Nov 2007 17:35:39 +0000 (17:35 +0000)]
    Reviewed by Dan Bernstein.

        - fixed <rdar://problem/5567954> REGRESSION (Safari 2-3): Autofill no longer automatically fills in
        form fields other than the one you're typing into

        * WebCoreSupport/WebEditorClient.mm:
        (selectorForKeyEvent):
        correct the key identifier strings for Tab and Esc; these were updated in WebCore as part of r21445
        but didn't get updated here.

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

13 years agoJavaScriptCore:
darin@apple.com [Tue, 13 Nov 2007 17:25:26 +0000 (17:25 +0000)]
JavaScriptCore:

        Reviewed by Geoff.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11231
          RegExp bug when handling newline characters
          and a number of other differences between PCRE behvior
          and JavaScript regular expressions:

          + single-digit sequences like \4 should be treated as octal
            character constants, unless there is a sufficient number
            of brackets for them to be treated as backreferences

          + \8 turns into the character "8", not a binary zero character
            followed by "8" (same for 9)

          + only the first 3 digits should be considered part of an
            octal character constant (the old behavior was to decode
            an arbitrarily long sequence and then mask with 0xFF)

          + if \x is followed by anything other than two valid hex digits,
            then it should simply be treated a the letter "x"; that includes
            not supporting the \x{41} syntax

          + if \u is followed by anything less than four valid hex digits,
            then it should simply be treated a the letter "u"

          + an extra "+" should be a syntax error, rather than being treated
            as the "possessive quantifier"

          + if a "]" character appears immediately after a "[" character that
            starts a character class, then that's an empty character class,
            rather than being the start of a character class that includes a
            "]" character

          + a "$" should not match a terminating newline; we could have gotten
            PCRE to handle this the way we wanted by passing an appropriate option

        Test: fast/js/regexp-no-extensions.html

        * pcre/pcre_compile.cpp:
        (check_escape): Check backreferences against bracount to catch both
        overflows and things that should be treated as octal. Rewrite octal
        loop to not go on indefinitely. Rewrite both hex loops to match and
        remove \x{} support.
        (compile_branch): Restructure loops so that we don't special-case a "]"
        at the beginning of a character class. Remove code that treated "+" as
        the possessive quantifier.
        (jsRegExpCompile): Change the "]" handling here too.

        * pcre/pcre_exec.cpp: (match): Changed CIRC to match the DOLL implementation.
        Changed DOLL to remove handling of "terminating newline", a Perl concept
        which we don't need.

        * tests/mozilla/expected.html: Two tests are fixed now:
        ecma_3/RegExp/regress-100199.js and ecma_3/RegExp/regress-188206.js.
        One test fails now: ecma_3/RegExp/perlstress-002.js -- our success before
        was due to a bug (we treated all 1-character numeric escapes as backreferences).
        The date tests also now both expect success -- whatever was making them fail
        before was probably due to the time being close to a DST shift; maybe we need
        to get rid of those tests.

LayoutTests:

        Reviewed by Geoff.

        - test for http://bugs.webkit.org/show_bug.cgi?id=11231
          RegExp bug when handling newline characters and other regular expression
          behavior that is different for JavaScript and PCRE

        * fast/js/regexp-no-extensions-expected.txt: Added.
        * fast/js/regexp-no-extensions.html: Added.
        * fast/js/resources/regexp-no-extensions.js: Added.

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

13 years ago * kjs/JSImmediate.h: (KJS::JSImmediate::getTruncatedInt32):
darin@apple.com [Tue, 13 Nov 2007 17:22:36 +0000 (17:22 +0000)]
    * kjs/JSImmediate.h: (KJS::JSImmediate::getTruncatedInt32):
        Remove too-strong assert that was firing constantly and preventing even basic
        web browsing from working in a debug build. This function is used in many
        cases where the immediate value is not a number; the assertion could perhaps
        be added back later with a bit of reorganization.

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

13 years ago2007-11-13 Alp Toker <alp@atoker.com>
alp@webkit.org [Tue, 13 Nov 2007 09:49:50 +0000 (09:49 +0000)]
2007-11-13  Alp Toker  <alp@atoker.com>

        Build fix for breakage to non-Mac builds introduced in r27746.

        * kjs/ustring.cpp:

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

13 years ago2007-11-13 Eric Seidel <eric@webkit.org>
eric@webkit.org [Tue, 13 Nov 2007 08:34:25 +0000 (08:34 +0000)]
2007-11-13  Eric Seidel  <eric@webkit.org>

        Reviewed by Maciej.

        Clean up evaluateToBoolean functions to use inlines instead of copy/paste code

        * kjs/JSImmediate.h:
        * kjs/nodes.cpp:
        (KJS::GreaterNode::inlineEvaluateToBoolean):
        (KJS::GreaterNode::evaluate):
        (KJS::LessEqNode::inlineEvaluateToBoolean):
        (KJS::LessEqNode::evaluate):
        (KJS::GreaterEqNode::inlineEvaluateToBoolean):
        (KJS::GreaterEqNode::evaluate):
        (KJS::InNode::evaluateToBoolean):
        (KJS::EqualNode::inlineEvaluateToBoolean):
        (KJS::EqualNode::evaluate):
        (KJS::NotEqualNode::inlineEvaluateToBoolean):
        (KJS::NotEqualNode::evaluate):
        (KJS::StrictEqualNode::inlineEvaluateToBoolean):
        (KJS::StrictEqualNode::evaluate):
        (KJS::NotStrictEqualNode::inlineEvaluateToBoolean):
        (KJS::NotStrictEqualNode::evaluate):
        * kjs/nodes.h:

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

13 years ago Reviewed by Sam Weinig.
ggaren@apple.com [Tue, 13 Nov 2007 08:05:03 +0000 (08:05 +0000)]
    Reviewed by Sam Weinig.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=15958
        base64 spends 1.1% of total time checking for special Infinity case

        Use a fast character test instead of calling strncmp.

        1.1% speedup on string-base64. SunSpider reports a .4% speedup overall;
        Sharks reports only .1%. Who are you going to believe? Huh?

        * kjs/ustring.cpp:
        (KJS::UString::toDouble):

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

13 years ago2007-11-12 Eric Seidel <eric@webkit.org>
eric@webkit.org [Tue, 13 Nov 2007 08:02:44 +0000 (08:02 +0000)]
2007-11-12  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver.

        Add evaluateToInt32 and evaluateUInt32 methods and deploy them.
        Fix a few missing evaluateToBoolean methods
        Deploy all evaluateTo* functions to more nodes to avoid slowdowns
        http://bugs.webkit.org/show_bug.cgi?id=15950

        SunSpider claims this is at least a 1.4% speedup.

        * kjs/JSImmediate.h:
        (KJS::JSImmediate::getTruncatedInt32):
        (KJS::JSImmediate::toDouble):
        (KJS::JSImmediate::getUInt32):
        * kjs/nodes.cpp:
        (KJS::ExpressionNode::evaluateToNumber):
        (KJS::ExpressionNode::evaluateToInt32):
        (KJS::ExpressionNode::evaluateToUInt32):
        (KJS::NumberNode::evaluateToInt32):
        (KJS::NumberNode::evaluateToUInt32):
        (KJS::ImmediateNumberNode::evaluateToInt32):
        (KJS::ImmediateNumberNode::evaluateToUInt32):
        (KJS::ResolveNode::evaluate):
        (KJS::ResolveNode::evaluateToNumber):
        (KJS::ResolveNode::evaluateToBoolean):
        (KJS::ResolveNode::evaluateToInt32):
        (KJS::ResolveNode::evaluateToUInt32):
        (KJS::LocalVarAccessNode::evaluateToInt32):
        (KJS::LocalVarAccessNode::evaluateToUInt32):
        (KJS::BracketAccessorNode::evaluateToNumber):
        (KJS::BracketAccessorNode::evaluateToBoolean):
        (KJS::BracketAccessorNode::evaluateToInt32):
        (KJS::BracketAccessorNode::evaluateToUInt32):
        (KJS::DotAccessorNode::inlineEvaluate):
        (KJS::DotAccessorNode::evaluate):
        (KJS::DotAccessorNode::evaluateToNumber):
        (KJS::DotAccessorNode::evaluateToBoolean):
        (KJS::DotAccessorNode::evaluateToInt32):
        (KJS::DotAccessorNode::evaluateToUInt32):
        (KJS::NewExprNode::inlineEvaluate):
        (KJS::NewExprNode::evaluate):
        (KJS::NewExprNode::evaluateToNumber):
        (KJS::NewExprNode::evaluateToBoolean):
        (KJS::NewExprNode::evaluateToInt32):
        (KJS::NewExprNode::evaluateToUInt32):
        (KJS::FunctionCallResolveNode::inlineEvaluate):
        (KJS::FunctionCallResolveNode::evaluate):
        (KJS::FunctionCallResolveNode::evaluateToNumber):
        (KJS::FunctionCallResolveNode::evaluateToBoolean):
        (KJS::FunctionCallResolveNode::evaluateToInt32):
        (KJS::FunctionCallResolveNode::evaluateToUInt32):
        (KJS::LocalVarFunctionCallNode::evaluate):
        (KJS::LocalVarFunctionCallNode::evaluateToNumber):
        (KJS::LocalVarFunctionCallNode::evaluateToBoolean):
        (KJS::LocalVarFunctionCallNode::evaluateToInt32):
        (KJS::LocalVarFunctionCallNode::evaluateToUInt32):
        (KJS::FunctionCallDotNode::evaluate):
        (KJS::FunctionCallDotNode::evaluateToNumber):
        (KJS::FunctionCallDotNode::evaluateToBoolean):
        (KJS::FunctionCallDotNode::evaluateToInt32):
        (KJS::FunctionCallDotNode::evaluateToUInt32):
        (KJS::PostDecLocalVarNode::inlineEvaluateToNumber):
        (KJS::PostDecLocalVarNode::evaluateToNumber):
        (KJS::PostDecLocalVarNode::evaluateToBoolean):
        (KJS::PostDecLocalVarNode::evaluateToInt32):
        (KJS::PostDecLocalVarNode::evaluateToUInt32):
        (KJS::typeStringForValue):
        (KJS::UnaryPlusNode::evaluate):
        (KJS::UnaryPlusNode::evaluateToBoolean):
        (KJS::UnaryPlusNode::evaluateToNumber):
        (KJS::UnaryPlusNode::evaluateToInt32):
        (KJS::BitwiseNotNode::inlineEvaluateToInt32):
        (KJS::BitwiseNotNode::evaluate):
        (KJS::BitwiseNotNode::evaluateToNumber):
        (KJS::BitwiseNotNode::evaluateToBoolean):
        (KJS::BitwiseNotNode::evaluateToInt32):
        (KJS::MultNode::evaluateToBoolean):
        (KJS::MultNode::evaluateToInt32):
        (KJS::MultNode::evaluateToUInt32):
        (KJS::DivNode::evaluateToInt32):
        (KJS::DivNode::evaluateToUInt32):
        (KJS::ModNode::evaluateToBoolean):
        (KJS::ModNode::evaluateToInt32):
        (KJS::ModNode::evaluateToUInt32):
        (KJS::AddNode::evaluateToNumber):
        (KJS::AddNode::evaluateToInt32):
        (KJS::AddNode::evaluateToUInt32):
        (KJS::AddNumbersNode::evaluateToInt32):
        (KJS::AddNumbersNode::evaluateToUInt32):
        (KJS::SubNode::evaluateToInt32):
        (KJS::SubNode::evaluateToUInt32):
        (KJS::LeftShiftNode::inlineEvaluateToInt32):
        (KJS::LeftShiftNode::evaluate):
        (KJS::LeftShiftNode::evaluateToNumber):
        (KJS::LeftShiftNode::evaluateToInt32):
        (KJS::RightShiftNode::inlineEvaluateToInt32):
        (KJS::RightShiftNode::evaluate):
        (KJS::RightShiftNode::evaluateToNumber):
        (KJS::RightShiftNode::evaluateToInt32):
        (KJS::UnsignedRightShiftNode::inlineEvaluateToUInt32):
        (KJS::UnsignedRightShiftNode::evaluate):
        (KJS::UnsignedRightShiftNode::evaluateToNumber):
        (KJS::UnsignedRightShiftNode::evaluateToInt32):
        (KJS::LessNode::inlineEvaluateToBoolean):
        (KJS::LessNode::evaluate):
        (KJS::LessNode::evaluateToBoolean):
        (KJS::LessNumbersNode::inlineEvaluateToBoolean):
        (KJS::LessNumbersNode::evaluate):
        (KJS::LessNumbersNode::evaluateToBoolean):
        (KJS::LessStringsNode::inlineEvaluateToBoolean):
        (KJS::LessStringsNode::evaluate):
        (KJS::BitAndNode::evaluate):
        (KJS::BitAndNode::inlineEvaluateToInt32):
        (KJS::BitAndNode::evaluateToNumber):
        (KJS::BitAndNode::evaluateToBoolean):
        (KJS::BitAndNode::evaluateToInt32):
        (KJS::BitXOrNode::inlineEvaluateToInt32):
        (KJS::BitXOrNode::evaluate):
        (KJS::BitXOrNode::evaluateToNumber):
        (KJS::BitXOrNode::evaluateToBoolean):
        (KJS::BitXOrNode::evaluateToInt32):
        (KJS::BitOrNode::inlineEvaluateToInt32):
        (KJS::BitOrNode::evaluate):
        (KJS::BitOrNode::evaluateToNumber):
        (KJS::BitOrNode::evaluateToBoolean):
        (KJS::BitOrNode::evaluateToInt32):
        (KJS::ConditionalNode::evaluateToNumber):
        (KJS::ConditionalNode::evaluateToInt32):
        (KJS::ConditionalNode::evaluateToUInt32):
        (KJS::valueForReadModifyAssignment):
        (KJS::AssignExprNode::evaluate):
        (KJS::AssignExprNode::evaluateToBoolean):
        (KJS::AssignExprNode::evaluateToNumber):
        (KJS::AssignExprNode::evaluateToInt32):
        (KJS::VarDeclNode::handleSlowCase):
        * kjs/nodes.h:
        (KJS::FunctionCallResolveNode::precedence):
        (KJS::AddNode::precedence):
        (KJS::AddNode::):
        (KJS::LessNumbersNode::):
        (KJS::LessStringsNode::):
        * kjs/value.cpp:
        (KJS::JSValue::toInt32SlowCase):
        (KJS::JSValue::toUInt32SlowCase):
        * kjs/value.h:
        (KJS::JSValue::asCell):
        (KJS::JSValue::toInt32):
        (KJS::JSValue::toUInt32):

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

13 years ago Reviewed by Darin.
ap@webkit.org [Tue, 13 Nov 2007 07:12:55 +0000 (07:12 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15953
        Add UTF-8 encoding/decoding to WTF

        * kjs/ustring.h: Moved UTF8SequenceLength() and decodeUTF8Sequence() to wtf/unicode.
        * kjs/ustring.cpp: (KJS::UString::UTF8String): Changed this function to take a strict/lenient
        parameter. Callers are not interested in getting decoding results in strict mode, so
        this allows for bailing out as soon as an error is seen.

        * kjs/function.cpp:
        (KJS::encode): Updated for new UString::UTF8String() signature.

        * API/JSStringRef.cpp:
        (JSStringCreateWithCharacters): Disambiguate UChar.
        (JSStringCreateWithUTF8CString): Actually use UTF-8 when creating the string!
        * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): Use ConvertUTF8ToUTF16().

        * wtf/unicode/UTF8.cpp: Added.
        (WTF::Unicode::inlineUTF8SequenceLengthNonASCII):
        (WTF::Unicode::inlineUTF8SequenceLength):
        (WTF::Unicode::UTF8SequenceLength):
        (WTF::Unicode::decodeUTF8Sequence):
        (WTF::Unicode::):
        (WTF::Unicode::ConvertUTF16ToUTF8):
        (WTF::Unicode::isLegalUTF8):
        (WTF::Unicode::ConvertUTF8ToUTF16):
        * wtf/unicode/UTF8.h: Added.
        (WTF::Unicode::):
        Some code moved from ustring.h, some adapted from unicode.org sources.

        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        Added UTF8.{h,cpp}

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

13 years agoJavaScriptCore:
weinig@apple.com [Tue, 13 Nov 2007 06:48:27 +0000 (06:48 +0000)]
JavaScriptCore:

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=15946
          add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat)

        * bindings/npapi.h:

WebKit/mac:

        Reviewed by Darin.

        - http://bugs.webkit.org/show_bug.cgi?id=15946
          add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat)

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView setVariable:value:]):

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

13 years ago Reviewed by Darin.
ap@webkit.org [Tue, 13 Nov 2007 06:21:57 +0000 (06:21 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15954
        Move DOM Selection operations out of SelectionController

        No change in functionality.

WebCore:
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::setSelectedRange):
        * editing/SelectionController.h:
        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::anchorNode):
        (WebCore::DOMSelection::baseNode):
        (WebCore::DOMSelection::anchorOffset):
        (WebCore::DOMSelection::baseOffset):
        (WebCore::DOMSelection::focusNode):
        (WebCore::DOMSelection::extentNode):
        (WebCore::DOMSelection::focusOffset):
        (WebCore::DOMSelection::extentOffset):
        (WebCore::DOMSelection::isCollapsed):
        (WebCore::DOMSelection::type):
        (WebCore::DOMSelection::rangeCount):
        (WebCore::DOMSelection::collapse):
        (WebCore::DOMSelection::collapseToEnd):
        (WebCore::DOMSelection::collapseToStart):
        (WebCore::DOMSelection::empty):
        (WebCore::DOMSelection::setBaseAndExtent):
        (WebCore::DOMSelection::setPosition):
        (WebCore::DOMSelection::modify):
        (WebCore::DOMSelection::extend):
        (WebCore::DOMSelection::getRangeAt):
        (WebCore::DOMSelection::removeAllRanges):
        (WebCore::DOMSelection::addRange):
        (WebCore::DOMSelection::deleteFromDocument):
        (WebCore::DOMSelection::containsNode):
        (WebCore::DOMSelection::selectAllChildren):
        (WebCore::DOMSelection::toString):
        * page/DOMSelection.h:
        Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange()
        to return its result directly instead of via an ExceptionCode that no caller wanted.

        * editing/Editor.cpp:
        (WebCore::Editor::deleteRange):
        (WebCore::Editor::removeFormattingAndStyle):
        (WebCore::Editor::selectComposition):
        (WebCore::Editor::setComposition):
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
        Adapted for SelectionController::setSelectedRange() now returning a bool.
        SelectionController::toString() is no longer avasilable, use plainText() explicitly.

        * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature.

WebKit:
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView _expandSelectionToGranularity:]):
        (-[WebHTMLView selectToMark:]):
        (-[WebHTMLView swapWithMark:]):
        * WebView/WebView.mm:
        (-[WebView setSelectedDOMRange:affinity:]):
        Adapted for SelectionController::setSelectedRange() now returning a bool.

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

13 years agoWebCore:
mitz@apple.com [Tue, 13 Nov 2007 04:53:31 +0000 (04:53 +0000)]
WebCore:

        Reviewed by Darin Adler.

        - <http://bugs.webkit.org/show_bug.cgi?id=15890>
          Most of www.aol.com still redraws unnecessarily when headline/photo section changes

        Test: fast/repaint/invisible-objects.html

        Avoid repainting invisible blocks if they are enclosed in a layer that
        contains no visible objects.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::layoutBlock):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::absoluteClippedOverflowRect):

LayoutTests:

        Reviewed by Darin Adler.

        - no-repaint test for <http://bugs.webkit.org/show_bug.cgi?id=15890>
          Most of www.aol.com still redraws unnecessarily when headline/photo section changes

        * fast/repaint/invisible-objects.html: Added.
        * platform/mac/fast/repaint/invisible-objects-expected.checksum: Added.
        * platform/mac/fast/repaint/invisible-objects-expected.png: Added.
        * platform/mac/fast/repaint/invisible-objects-expected.txt: Added.

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

13 years ago<rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame cause...
oliver@apple.com [Tue, 13 Nov 2007 03:57:45 +0000 (03:57 +0000)]
<rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)

Reviewed by John S.

EventHandler needs to reset these fields when a drag terminates, otherwise
EventHandler is left in an inconsistent state when a drag is initiated on a
page with multiple frames.

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

13 years agogit-svn-id: https://svn.webkit.org/repository/webkit/trunk@27741 268f45cc-cd09-0410...
wsiegrist@apple.com [Tue, 13 Nov 2007 02:33:46 +0000 (02:33 +0000)]
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27741 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agotest 4
wsiegrist@apple.com [Tue, 13 Nov 2007 02:23:58 +0000 (02:23 +0000)]
test 4

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

13 years ago3
wsiegrist@apple.com [Tue, 13 Nov 2007 02:10:54 +0000 (02:10 +0000)]
3

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

13 years ago2++
wsiegrist@apple.com [Tue, 13 Nov 2007 02:04:56 +0000 (02:04 +0000)]
2++

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

13 years agotake 2
wsiegrist@apple.com [Tue, 13 Nov 2007 01:58:51 +0000 (01:58 +0000)]
take 2

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

13 years agotesting post-commit.
wsiegrist@apple.com [Tue, 13 Nov 2007 01:53:07 +0000 (01:53 +0000)]
testing post-commit.

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

13 years ago Reviewed by Mark Rowe.
timothy@apple.com [Tue, 13 Nov 2007 01:39:28 +0000 (01:39 +0000)]
    Reviewed by Mark Rowe.

        Prevent selecting a word in the breadcrumb or the styles section when double
        clicking on a DOM node in the outline tree.

        * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
          with a detail of 2 or higher comes in. This prevents the selection.
        * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.

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

13 years agoWebKitTools:
weinig@apple.com [Tue, 13 Nov 2007 01:33:49 +0000 (01:33 +0000)]
WebKitTools:

        Reviewed by Adam Roben.

        Implement LayoutTestController.setPrivateBrowsingEnabled(bool) for windows.

        * DumpRenderTree/win/DumpRenderTree.cpp:
        (runTest):
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        (LayoutTestController::setPrivateBrowsingEnabled):

LayoutTests:

        Reviewed by Adam Roben.

        * platform/win/Skipped: Remove http/tests/security/cross-frame-acdcess-private-browsing.html
        from the windows skipped list now that LayoutTestController.setPrivateBrowsingEnabled has
        been implmented.

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

13 years agoJavaScriptCore:
darin@apple.com [Tue, 13 Nov 2007 00:22:49 +0000 (00:22 +0000)]
JavaScriptCore:

        Reviewed by Sam.

        - http://bugs.webkit.org/show_bug.cgi?id=15951
          REGRESSION: assertion failure in regexp match() when running JS tests

        Test: fast/js/regexp-many-brackets.html

        * pcre/pcre_exec.cpp: (match): Added back accidentally-removed case for
        the BRANUMBER opcode.

LayoutTests:

        Reviewed by Sam.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15951
          REGRESSION: assertion failure in regexp match() when running JS tests

        * fast/js/regexp-many-brackets-expected.txt: Added.
        * fast/js/regexp-many-brackets.html: Added.
        * fast/js/resources/regexp-many-brackets.js: Added.

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

13 years agoReturn behaviour for 0 sized pattern back to what it was prior to r27704
oliver@apple.com [Mon, 12 Nov 2007 23:53:19 +0000 (23:53 +0000)]
Return behaviour for 0 sized pattern back to what it was prior to r27704

Reviewed by Darin and Antti.

This change in behaviour broke two layout tests in DRT, so correcting it
corrects existing tests.

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

13 years ago Reviewed by John.
timothy@apple.com [Mon, 12 Nov 2007 23:27:19 +0000 (23:27 +0000)]
    Reviewed by John.

        <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
        If the SharedBuffer is null insert an empty NSData instead of nil.

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

13 years ago Reviewed by Geoff.
darin@apple.com [Mon, 12 Nov 2007 23:04:41 +0000 (23:04 +0000)]
    Reviewed by Geoff.

        - fix use of prefix and config.h, got rid of a few unneeded things in
          the PCRE code; no behavior changes

        * API/JSBase.cpp: Added include of config.h.
        * API/JSCallbackConstructor.cpp: Ditto.
        * API/JSCallbackFunction.cpp: Ditto.
        * API/JSCallbackObject.cpp: Ditto.
        * API/JSClassRef.cpp: Ditto.
        * API/JSContextRef.cpp: Ditto.
        * API/JSObjectRef.cpp: Ditto.
        * API/JSStringRef.cpp: Ditto.
        * API/JSValueRef.cpp: Ditto.

        * JavaScriptCorePrefix.h: Removed obsolete <ctype.h> workaround.
        Moved new/delete macros after includes, as they are in WebCore's prefix.
        Removed "config.h".

        * pcre/dftables.cpp: (main): Changed back to not use a separate maketables
        function. This is needed for PCRE, but not helpful for our use. Also changed
        the tables to all be 128 entries long instead of 256, since only the first
        128 are ever used.

        * pcre/pcre_compile.cpp: Added include of config.h. Eliminated digitab,
        which was only being used to check hex digits. Changed all uses of TRUE and
        FALSE to use the C++ true and false instead.
        (check_escape): Just the TRUE/FALSE thing.
        (is_counted_repeat): Ditto.
        (could_be_empty_branch): Ditto.
        (get_othercase_range): Ditto.
        (compile_branch): Ditto.
        (compile_regex): Ditto.
        (is_anchored): Ditto.
        (is_startline): Ditto.
        (find_firstassertedchar): Ditto.
        (jsRegExpCompile): Ditto.

        * pcre/pcre_exec.cpp: Added include of config.h. Changed all uses of TRUE and
        FALSE to use the C++ true and false instead.
        (match_ref): Just the TRUE/FALSE thing.
        (match): Ditto. Removed some unneeded braces.
        (jsRegExpExecute): Just the TRUE/FALSE thing.

        * pcre/pcre_internal.h: Moved the constants needed by dftables.cpp to the top
        of the file instead of the bottom, so they can be used. Also changed the table
        sizes to 128 instead of 256. Removed macro definitions of FALSE and TRUE.
        Set array sizes for all the const arrays. Changed _pcre_utf8_table1_size to
        be a macro instead of a extern int.

        * pcre/pcre_maketables.cpp: Removed. It's all in dftables.cpp now.

        * pcre/pcre_tables.cpp: Made table sizes explicit.

        * pcre/pcre_xclass.cpp: Just the TRUE/FALSE thing.

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

13 years ago Reviewed by Tim.
darin@apple.com [Mon, 12 Nov 2007 22:28:01 +0000 (22:28 +0000)]
    Reviewed by Tim.

        - http://bugs.webkit.org/show_bug.cgi?id=15947
          speed up page loading a bit by inlining

        * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
        Factored out the slow case of isScheduledLocationChangePending into this.

        * loader/FrameLoader.h:
        (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
        inline check of the far and away most common case, where m_scheduledRedirection
        is 0; the rest is in the isLocationChange function.

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

13 years agoAppease geoff :D
oliver@apple.com [Mon, 12 Nov 2007 22:11:17 +0000 (22:11 +0000)]
Appease geoff :D

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

13 years ago Rubber-stamped by Oliver Hunt.
ggaren@apple.com [Mon, 12 Nov 2007 22:06:46 +0000 (22:06 +0000)]
    Rubber-stamped by Oliver Hunt.

        Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
        Import variable lookup optimizations from KJS

        * fast/js/kde/completion-expected.txt:
        * fast/js/kde/resources/completion.js:

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

13 years ago<rdar://problem/5522011> The content of the password field of Safari is displayed...
oliver@apple.com [Mon, 12 Nov 2007 22:04:26 +0000 (22:04 +0000)]
<rdar://problem/5522011> The content of the password field of Safari is displayed by reconversion.

Reviewed by Darin.

Some input methods (notably Kotoeri) can incorrectly provide
access to the raw text of a password field.  To work around
this we forcefully override the inputContext whenever a password
field is active.

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

13 years ago Rubber-stamped by Oliver Hunt.
ggaren@apple.com [Mon, 12 Nov 2007 21:59:33 +0000 (21:59 +0000)]
    Rubber-stamped by Oliver Hunt.

        Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
        Import variable lookup optimizations from KJS

        * fast/js/kde/lval-exceptions-expected.txt: Added.
        * fast/js/kde/lval-exceptions.html: Added.
        * fast/js/kde/operators-expected.txt:
        * fast/js/kde/resources/lval-exceptions.js: Added.
        * fast/js/kde/resources/operators.js:

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

13 years ago Rubber-stamped by Oliver Hunt.
ggaren@apple.com [Mon, 12 Nov 2007 21:57:41 +0000 (21:57 +0000)]
    Rubber-stamped by Oliver Hunt.

        Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
        Import variable lookup optimizations from KJS

        * fast/js/kde/func-decl-expected.txt: Added.
        * fast/js/kde/func-decl.html: Added.
        * fast/js/kde/resources/func-decl.js: Added.

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

13 years ago Rubber-stamped by Oliver Hunt.
ggaren@apple.com [Mon, 12 Nov 2007 21:55:02 +0000 (21:55 +0000)]
    Rubber-stamped by Oliver Hunt.

        Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
        Import variable lookup optimizations from KJS

        * fast/js/rehash-assign-expected.txt: Added.
        * fast/js/rehash-assign.html: Added.
        * fast/js/resize-array-assign-expected.txt: Added.
        * fast/js/resize-array-assign.html: Added.
        * fast/js/resources/rehash-assign.js: Added.
        * fast/js/resources/resize-array-assign.js: Added.

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

13 years ago Rubber-stamped by Oliver Hunt.
ggaren@apple.com [Mon, 12 Nov 2007 21:48:55 +0000 (21:48 +0000)]
    Rubber-stamped by Oliver Hunt.

        Landing a few layout tests from http://bugs.webkit.org/show_bug.cgi?id=14868
        Import variable lookup optimizations from KJS

        * fast/js/kde/arguments-scope-expected.txt: Added.
        * fast/js/kde/arguments-scope.html: Added.
        * fast/js/kde/resources/arguments-scope.js: Added.
        * fast/js/kde/resources/scope.js:
        * fast/js/kde/scope-expected.txt:

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

13 years ago2007-11-12 George Staikos <staikos@kde.org>
staikos@webkit.org [Mon, 12 Nov 2007 20:11:29 +0000 (20:11 +0000)]
2007-11-12  George Staikos  <staikos@kde.org>

        Reviewed by Tim.

        Extract the text match marker highlight color into RenderTheme instead
        of the hardcoded yellow.

        * rendering/InlineTextBox.cpp:
        (WebCore::InlineTextBox::paintTextMatchMarker):
        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::platformTextSearchHighlightColor):
        * rendering/RenderTheme.h:

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

13 years ago2007-11-12 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Mon, 12 Nov 2007 19:49:44 +0000 (19:49 +0000)]
2007-11-12  Mark Rowe  <mrowe@apple.com>

        * building/tools.html: Remove extra >.

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

13 years ago2007-11-12 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Mon, 12 Nov 2007 19:45:06 +0000 (19:45 +0000)]
2007-11-12  Mark Rowe  <mrowe@apple.com>

        Fix deadlock on launch on the Mac.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717.

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

13 years ago Reviewed by Tim Hatcher
sullivan@apple.com [Mon, 12 Nov 2007 18:51:21 +0000 (18:51 +0000)]
    Reviewed by Tim Hatcher

        - speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit:
        -[WebPDFView(FileInternal) _updatePreferencesSoon] + 56

        The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained
        by this class, but should be. (It is retained by WebHTMLView, e.g.).

        * WebView/WebPDFView.mm:
        (-[WebPDFView dealloc]):
        release dataSource ivar
        (-[WebPDFView setDataSource:]):
        retain dataSource ivar

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

13 years ago2007-11-12 Justin Haygood <jhaygood@reaktix.com>
mrowe@apple.com [Mon, 12 Nov 2007 18:34:45 +0000 (18:34 +0000)]
2007-11-12  Justin Haygood  <jhaygood@reaktix.com>

        Reviewed by Brady.

        http://bugs.webkit.org/show_bug.cgi?id=15955
        Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::open):
        (WebCore::IconDatabase::close):
        * loader/icon/IconDatabase.h:
        * platform/sql/SQLiteDatabase.cpp:
        (WebCore::SQLiteDatabase::SQLiteDatabase):
        (WebCore::SQLiteDatabase::open):
        (WebCore::SQLiteDatabase::close):
        * platform/sql/SQLiteDatabase.h:

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

13 years ago Windows build fix
aroben@apple.com [Mon, 12 Nov 2007 11:02:47 +0000 (11:02 +0000)]
    Windows build fix

        * config.h: Touch because VS apparently can't figure out which files
        depend on ResourceResponse.h.
        * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to
        project and remove old ResourceResponse files.

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

13 years agoChange update-webkit-localizable-strings to only scan mac and win directories
aroben@apple.com [Mon, 12 Nov 2007 10:39:08 +0000 (10:39 +0000)]
Change update-webkit-localizable-strings to only scan mac and win directories

WebKit:

        * StringsNotToBeLocalized.txt: Updated.

WebKitTools:

        * Scripts/update-webkit-localizable-strings: Changed to only scan the
        mac and win subdirectories.

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

13 years ago2007-11-12 Julien Chaffraix <julien.chaffraix@gmail.com>
mrowe@apple.com [Mon, 12 Nov 2007 10:33:11 +0000 (10:33 +0000)]
2007-11-12  Julien Chaffraix  <julien.chaffraix@gmail.com>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15334
        Split ResourceResponse into platform specific files

        * WebCore.base.exp:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/network/ResourceResponse.cpp: Removed.
        * platform/network/ResourceResponse.h: Removed.
        * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp.
        (WebCore::ResourceResponseBase::asResourceResponse):
        (WebCore::ResourceResponseBase::isHTTP):
        (WebCore::ResourceResponseBase::url):
        (WebCore::ResourceResponseBase::setUrl):
        (WebCore::ResourceResponseBase::mimeType):
        (WebCore::ResourceResponseBase::setMimeType):
        (WebCore::ResourceResponseBase::expectedContentLength):
        (WebCore::ResourceResponseBase::setExpectedContentLength):
        (WebCore::ResourceResponseBase::textEncodingName):
        (WebCore::ResourceResponseBase::setTextEncodingName):
        (WebCore::ResourceResponseBase::suggestedFilename):
        (WebCore::ResourceResponseBase::setSuggestedFilename):
        (WebCore::ResourceResponseBase::httpStatusCode):
        (WebCore::ResourceResponseBase::setHTTPStatusCode):
        (WebCore::ResourceResponseBase::httpStatusText):
        (WebCore::ResourceResponseBase::setHTTPStatusText):
        (WebCore::ResourceResponseBase::httpHeaderField):
        (WebCore::ResourceResponseBase::setHTTPHeaderField):
        (WebCore::ResourceResponseBase::httpHeaderFields):
        (WebCore::ResourceResponseBase::isAttachment):
        (WebCore::ResourceResponseBase::setExpirationDate):
        (WebCore::ResourceResponseBase::expirationDate):
        (WebCore::ResourceResponseBase::setLastModifiedDate):
        (WebCore::ResourceResponseBase::lastModifiedDate):
        (WebCore::ResourceResponseBase::updateResourceResponse):
        * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h.
        (WebCore::ResourceResponseBase::ResourceResponseBase):
        * platform/network/cf/ResourceResponse.h: Added.
        (WebCore::ResourceResponse::ResourceResponse):
        * platform/network/curl/ResourceResponse.h: Added.
        (WebCore::ResourceResponse::ResourceResponse):
        (WebCore::ResourceResponse::doUpdateResourceResponse):
        * platform/network/mac/ResourceResponse.h: Added.
        (WebCore::ResourceResponse::ResourceResponse):
        * platform/network/qt/ResourceResponse.h: Added.
        (WebCore::ResourceResponse::ResourceResponse):
        (WebCore::ResourceResponse::doUpdateResourceResponse):

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

13 years ago Windows build fix
aroben@apple.com [Mon, 12 Nov 2007 10:27:21 +0000 (10:27 +0000)]
    Windows build fix

        * WebKit.vcproj/WebKit.def: Export fastZeroedMalloc.
        * WebKit.vcproj/WebKit_debug.def: Ditto.

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

13 years ago Build fix
aroben@apple.com [Mon, 12 Nov 2007 09:59:45 +0000 (09:59 +0000)]
    Build fix

        * wtf/FastMalloc.h: Add missing using statement.

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

13 years agoAdd special fastZeroedMalloc function to replace a
oliver [Mon, 12 Nov 2007 08:00:29 +0000 (08:00 +0000)]
Add special fastZeroedMalloc function to replace a
number of fastCalloc calls where one argument was 1.

Reviewed by Darin.

This results in a 0.4% progression in SunSpider, more
than making up for the earlier regression caused by
additional overflow checks.

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

13 years ago Fix <rdar://5578982> ASSERT in HashTable::checkTableConsistencyExceptSize...
aroben@apple.com [Mon, 12 Nov 2007 06:44:26 +0000 (06:44 +0000)]
    Fix <rdar://5578982> ASSERT in HashTable::checkTableConsistencyExceptSize beneath WebNotificationCenter

        The bug was due to a mismatch between HashMap::remove and
        HashTable::checkTableConsistency. HashMap::remove can delete the value
        stored in the HashTable (by derefing it), which is not normally
        allowed by HashTable. It's OK in this case because the value is about
        to be removed from the table, but HashTable wasn't aware of this.

        HashMap::remove now performs the consistency check itself before
        derefing the value.

        Darin noticed that the same bug would occur in HashSet, so I've fixed
        it there as well.

        Reviewed by Darin.

        * wtf/HashMap.h:
        (WTF::HashMap::remove): Perform the HashTable consistency check
        manually before calling deref.
        * wtf/HashSet.h:
        (WTF::HashSet::remove): Ditto.
        * wtf/HashTable.h: Made checkTableConsistency public so that HashMap
        and HashSet can call it.
        (WTF::HashTable::removeAndInvalidateWithoutEntryConsistencyCheck):
        Added.
        (WTF::HashTable::removeAndInvalidate): Added.
        (WTF::HashTable::remove):
        (WTF::HashTable::removeWithoutEntryConsistencyCheck): Added.

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

13 years agoRoll out r27708 as it breaks the Mac PowerPC build.
mrowe@apple.com [Mon, 12 Nov 2007 06:16:58 +0000 (06:16 +0000)]
Roll out r27708 as it breaks the Mac PowerPC build.

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

13 years ago2007-11-11 Mike Hommey <mh+webkit@glandium.org>
mrowe@apple.com [Mon, 12 Nov 2007 06:00:05 +0000 (06:00 +0000)]
2007-11-11  Mike Hommey  <mh+webkit@glandium.org>

        Reviewed by Maciej.

        Fix http://bugs.webkit.org/show_bug.cgi?id=14521
        Bug 14521: JavaScriptCore fails to build on Linux/PPC gcc 4.1.2

        * wtf/TCSpinLock.h:
        (TCMalloc_SpinLock::Unlock): Change constraint from o to m.

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

13 years ago2007-11-11 Justin Haygood <jhaygood@reaktix.com>
mrowe@apple.com [Mon, 12 Nov 2007 05:54:59 +0000 (05:54 +0000)]
2007-11-11  Justin Haygood  <jhaygood@reaktix.com>

        Reviewed by Adam Roben.

        http://bugs.webkit.org/show_bug.cgi?id=15939
        Adds a currentThread API for use by SQLiteDatabase, etc.

        * platform/Threading.h:
        * platform/ThreadingNone.cpp:
        (WebCore::currentThread):
        * platform/gtk/ThreadingGtk.cpp:
        (WebCore::identifierByGthreadHandle):
        (WebCore::):
        * platform/pthreads/ThreadingPthreads.cpp:
        (WebCore::identifierByPthreadHandle):
        (WebCore::currentThread):

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

13 years agoWebCore:
mitz@apple.com [Mon, 12 Nov 2007 05:40:30 +0000 (05:40 +0000)]
WebCore:

        Reviewed by Adam Roben.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15942
          REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())

        Test: editing/selection/cleared-by-relayout.html

        * editing/Selection.cpp:
        (WebCore::Selection::toRange): Check if the selection has been cleared
        by updating layout.

LayoutTests:

        Reviewed by Adam Roben.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15942
          REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())

        * editing/selection/cleared-by-relayout-expected.txt: Added.
        * editing/selection/cleared-by-relayout.html: Added.

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

13 years ago Reviewed by Mark Rowe.
darin@apple.com [Mon, 12 Nov 2007 04:51:55 +0000 (04:51 +0000)]
    Reviewed by Mark Rowe.

        - fix line numbers that were off since my recent patch

        * platform/SegmentedString.h:
        (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers
        and rename it to m_doNotExcludeLineNumbers.
        (WebCore::SegmentedSubstring::excludeLineNumbers): Updated.
        (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added.
        (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated.
        (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix
        the regression, but keep the speediness. I accidentally had removed a ! here.

        * platform/SegmentedString.cpp:
        (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers.

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

13 years agoFix for <rdar://problem/5585334>
oliver [Mon, 12 Nov 2007 04:48:08 +0000 (04:48 +0000)]
Fix for <rdar://problem/5585334>

Reviewed by Darin.

Fix for <rdar://problem/5585334> numfuzz: integer overflows opening
malformed SVG file in WebCore::ImageBuffer::create. Add protection
against a potential overflow.

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

13 years ago2007-11-11 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Mon, 12 Nov 2007 04:37:47 +0000 (04:37 +0000)]
2007-11-11  Mark Rowe  <mrowe@apple.com>

        Build fix.  Use the correct filename case.

        * kjs/nodes.h:

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

13 years ago Reviewed by Sam Weinig.
ggaren@apple.com [Mon, 12 Nov 2007 04:27:33 +0000 (04:27 +0000)]
    Reviewed by Sam Weinig.

        Fixed http://bugs.webkit.org/show_bug.cgi?id=15902
        15% of string-validate-input.js is spent compiling the same regular expression

        Store a compiled representation of the regular expression in the AST.

        Only a .2% SunSpider speedup overall, but a 10.6% speedup on
        string-validate-input.js.

        * kjs/nodes.cpp:
        (KJS::RegExpNode::evaluate):
        * kjs/nodes.h:
        (KJS::RegExpNode::):
        * kjs/nodes2string.cpp:
        (KJS::RegExpNode::streamTo):
        * kjs/regexp.cpp:
        (KJS::RegExp::flags):
        * kjs/regexp.h:
        (KJS::RegExp::pattern):
        * kjs/regexp_object.cpp:
        (KJS::RegExpObjectImp::construct):
        (KJS::RegExpObjectImp::createRegExpImp):
        * kjs/regexp_object.h:

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

13 years ago Reviewed by Darin.
antti@apple.com [Mon, 12 Nov 2007 04:26:11 +0000 (04:26 +0000)]
    Reviewed by Darin.

        Fix a bunch of cases where the exception code is checked by the function but is not zeroed first.

        * bindings/js/kjs_binding.cpp:
        (KJS::setDOMException):
        * dom/Attr.cpp:
        (WebCore::Attr::setPrefix):
        * dom/Document.cpp:
        (WebCore::Document::createElement):
        * dom/Element.cpp:
        (WebCore::Element::setPrefix):
        * dom/Range.cpp:
        (WebCore::Range::setStart):
        (WebCore::Range::setEnd):
        (WebCore::Range::isPointInRange):
        (WebCore::Range::comparePoint):
        (WebCore::Range::compareBoundaryPoints):
        (WebCore::Range::deleteContents):
        (WebCore::Range::processContents):
        (WebCore::Range::extractContents):
        (WebCore::Range::insertNode):
        (WebCore::Range::setStartAfter):
        (WebCore::Range::setEndBefore):
        (WebCore::Range::setEndAfter):
        (WebCore::Range::selectNode):
        (WebCore::Range::surroundContents):
        (WebCore::Range::setStartBefore):
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::TextIterator):
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::createPattern):
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::pause):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::add):
        (WebCore::HTMLSelectElement::setOption):
        * xml/XPathEvaluator.cpp:
        (WebCore::XPathEvaluator::evaluate):

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

13 years ago Reviewed by Mitz.
darin@apple.com [Mon, 12 Nov 2007 04:14:55 +0000 (04:14 +0000)]
    Reviewed by Mitz.

        - http://bugs.webkit.org/show_bug.cgi?id=15945
          speed up GraphicsContextCG typical case by skipping roundToDevicePixels

        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no
        longer know if the transform is identity or not.
        (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant
        CGContextSave/RestoreGState.
        (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no
        longer know if the transform is identity or not.
        (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
        (WebCore::GraphicsContext::scale): Ditto.
        (WebCore::GraphicsContext::rotate): Ditto.
        (WebCore::GraphicsContext::translate): Ditto.
        (WebCore::GraphicsContext::concatCTM): Ditto.
        (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform
        is known to be identity, and record that fact when we discover it otherwise.

        * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
        (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
        Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false.

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

13 years ago Reviewed by Mitz.
darin@apple.com [Mon, 12 Nov 2007 04:09:30 +0000 (04:09 +0000)]
    Reviewed by Mitz.

        - http://bugs.webkit.org/show_bug.cgi?id=15944
          streamline SegmentedString to speed up parsing

        I measured a speed-up of the page load test while developing this patch. I don't
        have a precise figure, though.

        * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed
        lineno to m_lineNumber.
        * html/HTMLTokenizer.cpp:
        (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function
        since we don't want to update a line number.
        (WebCore::HTMLTokenizer::parseSpecial): Ditto.
        (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly
        instead of lineNumberPtr() since the advance function now takes a reference.
        (WebCore::HTMLTokenizer::parseServer): Ditto.
        (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
        (WebCore::HTMLTokenizer::parseText): Ditto.
        (WebCore::HTMLTokenizer::parseEntity): Ditto.
        (WebCore::HTMLTokenizer::parseTag): Ditto.
        (WebCore::HTMLTokenizer::write): Ditto.

        * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write):
        * loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
        Don't pass 0 to the advance function.

        * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined
        the most common case, and pushed less common cases into a separate function
        that is not inlined. Also got rid of a branch by separating the case with a
        line number from the case without one.

        * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase):
        Added. The aforementioned less common cases are here.

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

13 years agoPartial fix for <rdar://problem/5585334> numfuzz: integer overflows opening malformed...
oliver [Mon, 12 Nov 2007 03:36:03 +0000 (03:36 +0000)]
Partial fix for <rdar://problem/5585334> numfuzz: integer overflows opening malformed SVG file in WebCore::ImageBuffer::create

Reviewed By Eric.

Unfortunately this is a very slight regression, but is unavoidable.

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

13 years ago Forgot to do this review change (and test HTTP commit).
antti@apple.com [Mon, 12 Nov 2007 02:02:49 +0000 (02:02 +0000)]
    Forgot to do this review change (and test HTTP commit).

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::play):

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

13 years agoWebCore:
antti [Mon, 12 Nov 2007 01:54:55 +0000 (01:54 +0000)]
WebCore:

        Reviewed by Darin.

        - Update play() and pause() to match current HTML5 draft
            - send events asynchronously
            - add timeupdate event to pause
            - rethrow load() exception, not others
        - Use list for async events to get ordering right

        Tests: media/video-pause-empty-events.html
               media/video-play-empty-events.html
               media/video-play-pause-events.html
               media/video-play-pause-exception.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::dispatchEventAsync):
        (WebCore::HTMLMediaElement::asyncEventTimerFired):
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::pause):
        * html/HTMLMediaElement.h:

LayoutTests:

        Reviewed by Darin.

        Add tests for play() and pause() events.
        Update one test to match new behavior.

        * media/video-currentTime-expected.txt:
        * media/video-currentTime.html:
        * media/video-pause-empty-events-expected.txt: Added.
        * media/video-pause-empty-events.html: Added.
        * media/video-play-empty-events-expected.txt: Added.
        * media/video-play-empty-events.html: Added.
        * media/video-play-pause-events-expected.txt: Added.
        * media/video-play-pause-events.html: Added.
        * media/video-play-pause-exception-expected.txt: Added
        * media/video-play-pause-exception.html: Added
        * media/video-test.js:

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

13 years ago2007-11-10 Eric Seidel <eric@webkit.org>
eseidel [Mon, 12 Nov 2007 00:34:37 +0000 (00:34 +0000)]
2007-11-10  Eric Seidel  <eric@webkit.org>

        Reviewed by darin.

        Add simple type inferencing to the parser, and create custom
        AddNode and LessNode subclasses based on inferred types.
        http://bugs.webkit.org/show_bug.cgi?id=15884

        SunSpider claims this is at least a 0.5% speedup.

        * JavaScriptCore.exp:
        * kjs/grammar.y:
        * kjs/internal.cpp:
        (KJS::NumberImp::getPrimitiveNumber):
        (KJS::GetterSetterImp::getPrimitiveNumber):
        * kjs/internal.h:
        * kjs/lexer.cpp:
        (KJS::Lexer::lex):
        * kjs/nodes.cpp:
        (KJS::Node::Node):
        (KJS::StringNode::evaluate):
        (KJS::StringNode::evaluateToNumber):
        (KJS::StringNode::evaluateToBoolean):
        (KJS::RegExpNode::evaluate):
        (KJS::UnaryPlusNode::optimizeVariableAccess):
        (KJS::AddNode::evaluate):
        (KJS::AddNode::evaluateToNumber):
        (KJS::AddNumbersNode::inlineEvaluateToNumber):
        (KJS::AddNumbersNode::evaluate):
        (KJS::AddNumbersNode::evaluateToNumber):
        (KJS::AddStringsNode::evaluate):
        (KJS::AddStringLeftNode::evaluate):
        (KJS::AddStringRightNode::evaluate):
        (KJS::lessThan):
        (KJS::lessThanEq):
        (KJS::LessNumbersNode::evaluate):
        (KJS::LessStringsNode::evaluate):
        * kjs/nodes.h:
        (KJS::ExpressionNode::):
        (KJS::RegExpNode::):
        (KJS::RegExpNode::precedence):
        (KJS::TypeOfResolveNode::):
        (KJS::LocalVarTypeOfNode::):
        (KJS::UnaryPlusNode::):
        (KJS::UnaryPlusNode::precedence):
        (KJS::AddNode::):
        (KJS::AddNode::precedence):
        (KJS::AddNumbersNode::):
        (KJS::AddStringLeftNode::):
        (KJS::AddStringRightNode::):
        (KJS::AddStringsNode::):
        (KJS::LessNode::):
        (KJS::LessNode::precedence):
        (KJS::LessNumbersNode::):
        (KJS::LessStringsNode::):
        * kjs/nodes2string.cpp:
        (KJS::StringNode::streamTo):
        * kjs/object.cpp:
        * kjs/object.h:
        * kjs/value.h:
        (KJS::JSValue::getPrimitiveNumber):

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

13 years ago2007-11-11 Alp Toker <alp@atoker.com>
alp@webkit.org [Mon, 12 Nov 2007 00:25:49 +0000 (00:25 +0000)]
2007-11-11  Alp Toker  <alp@atoker.com>

        Reviewed by Anders.

        Initialize m_userAgent.

        Fix typos in GDK_WINDOWING conditionals.

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::FrameLoaderClient::FrameLoaderClient):
        (WebKit::agentPlatform):

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

13 years agoForgot to commit ChangeLog, in my last commit.
zimmermann@webkit.org [Sun, 11 Nov 2007 22:36:21 +0000 (22:36 +0000)]
Forgot to commit ChangeLog, in my last commit.

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

13 years agoReviewed by Eric.
zimmermann@webkit.org [Sun, 11 Nov 2007 22:33:58 +0000 (22:33 +0000)]
Reviewed by Eric.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=6424 (<text>, <tspan> dominant-baseline attribute is not respected)

Add (basic) support for dominant-baseline / alignment-baseline text properties.
Note: there are no official testcases, and no-one implemented it before. Only ASV3
      supported dominant-baseline, but not correct it seems.

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

13 years ago Fix <rdar://5133816> keepWebHistory is not implemented
aroben@apple.com [Sun, 11 Nov 2007 20:51:09 +0000 (20:51 +0000)]
 Fix <rdar://5133816> keepWebHistory is not implemented

 WebCore:

         Add wrappers around CoCreateInstance to COMPtr

         I followed the example of the Query constructor and query method by
         adding a Create constructor and create method.

         Reviewed by Darin.

         * platform/win/COMPtr.h:
         (COMPtr::COMPtr): Added a new constructor that calls
         CoCreateInstance.
         (COMPtr::create): Added.
         (COMPtr::createInstance): Added.

 WebKitTools:

         Fix <rdar://5133816> keepWebHistory is not implemented

         Fixes fast/history/clicked-link-is-visited.html.

         Reviewed by Darin.

         * DumpRenderTree/win/DumpRenderTree.cpp:
         (runTest): Clear the optionalSharedHistory.
         * DumpRenderTree/win/LayoutTestControllerWin.cpp:
         (LayoutTestController::keepWebHistory): Set the optionalSharedHistory.

 LayoutTests:

         Remove a now-passing test from the Windows Skipped file

         Reviewed by Darin.

         * platform/win/Skipped:

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

13 years ago Reviewed by Darin.
ap@webkit.org [Sun, 11 Nov 2007 20:28:51 +0000 (20:28 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15896
        More editing cleanup

        No functionality changes.

        * dom/Node.h: Moved several editing-related methods elsewhere.
        * dom/Node.cpp: (WebCore::Node::maxCharacterOffset): Renamed from maxOffset()
        to highlight that it is a match to offsetInCharacters(), and much different from other
        offset-related methods. Added ASSERT_NOT_REACHED(), as callers are supposed to check
        offsetInCharacters() before calling this.

        * dom/CharacterData.cpp: (WebCore::CharacterData::maxCharacterOffset):
        * dom/CharacterData.h: (WebCore::CharacterData::isCharacterDataNode):
        Updated for above renamings.

        * dom/Comment.{h,cpp}: Removed an override for offsetInCharacters(), which is already present in CharacterData.

        * dom/Document.{h,cpp}: Folded updateSelection() into Frame::selectionLayoutChanged().

        * dom/Position.h:
        * dom/Position.cpp:
        (WebCore::Position::uncheckedPreviousOffset): Moved from Node::previousOffset().
        (WebCore::Position::uncheckedNextOffset): Moved from Node::NextOffset().
        (WebCore::Position::previous): Adapted to the above move.
        (WebCore::Position::next): Ditto.
        (WebCore::Position::upstream): Removed an isBR() check, since a non-BR element cannot have a BR renderer (I think),
        and BR elements are covered by editingIgnoresContent().
        (WebCore::Position::downstream): Ditto.
        (WebCore::caretMaxRenderedOffset): Moved from Node::caretMaxRenderedOffset().
        (WebCore::Position::rendersInDifferentPosition): Updated for the above moves.

        * dom/PositionIterator.h: Added a comment describing this class from the original check-in.
        * dom/PositionIterator.cpp:
        (WebCore::PositionIterator::increment): Updated for the above moves.
        (WebCore::PositionIterator::decrement): Ditto.

        * dom/ProcessingInstruction.h:
        * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::maxCharacterOffset):
        ProcessingInstruction was already returning true from offsetInCharacters(), but didn't override maxCharacterOffset().
        I think that implementing it has no actual effect, as PIs are not rendered, but it looks cleaner this way.

        * dom/Range.cpp:
        (WebCore::Range::selectNodeContents):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        (WebCore::ApplyStyleCommand::applyInlineStyle):
        (WebCore::maxRangeOffset):
        (WebCore::ApplyStyleCommand::removeInlineStyle):
        (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
        (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
        (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
        (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
        (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::insertNodeAt):
        (WebCore::CompositeEditCommand::positionOutsideTabSpan):
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::insertTab):
        * editing/visible_units.cpp:
        (WebCore::previousLinePosition):
        (WebCore::nextLinePosition):
        Updated for the above moves.

        * editing/Editor.cpp:
        (WebCore::Editor::advanceToNextMisspelling): Added a missing rangeCompliantEquivalent() call.

        * editing/TextIterator.cpp:
        (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Changed the condition to obviously
        match a maxCharacterOffset() call made after it; hopefully, this doesn't break any border cases.
        (WebCore::SimplifiedBackwardsTextIterator::advance): Updated for the above moves.

        * editing/htmlediting.h:
        * editing/htmlediting.cpp:
        (WebCore::canHaveChildrenForEditing): Removed a bogus comment: I don't thin BRs have a special ability to accept
        child nodes, other than via DOM manipulation, which is not specific to BRs.
        (WebCore::rangeCompliantEquivalent): Removed a check for BR, which is already covered by editingIgnoresContent().
        (WebCore::maxDeepOffset): Ditto.
        (WebCore::caretMinOffset): Moved from Node. Changed some runtime checks that seemingly cannot fail into assertions.
        (WebCore::caretMaxOffset): Ditto.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMousePressEventSingleClick): Pass 0 to VisiblePosition constructor instead of
        caretMinOffset. I didn't want to include htmlediting.h here, and I think that VisiblePosition constructor
        will take care of adjusting the offset.

        * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Folded Document::updateSelection() here.
        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]): Added missing rangeCompliantEquivalent() calls.
        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForRenderer): Changed to not round-trip via editing.
        Changed some runtime checks that seemingly cannot fail into assertions.

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

13 years ago - try another way of fixing dftables builds -- refactor pcre_internal.h a bit
darin@apple.com [Sun, 11 Nov 2007 19:24:37 +0000 (19:24 +0000)]
    - try another way of fixing dftables builds -- refactor pcre_internal.h a bit

        * pcre/pcre_internal.h: Make most of this header do nothing when DFTABLES is set.
        Later we can break it into two files.

        * JavaScriptCore.vcproj/dftables/dftables.vcproj: Take out now-unneeded include paths.
        * pcre/dftables.cpp: Set DFTABLES. Use delete instead of free.
        * pcre/dftables.pro: Take out now-unneeded include paths.
        * pcre/pcre_maketables.cpp: Use new instead of malloc.

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

13 years ago * pcre/dftables.pro: Try fixing Qt builds (I looked at qt-win) by adding
darin@apple.com [Sun, 11 Nov 2007 19:05:53 +0000 (19:05 +0000)]
    * pcre/dftables.pro: Try fixing Qt builds (I looked at qt-win) by adding
        another include path.

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

13 years ago * JavaScriptCore.xcodeproj/project.pbxproj: Try fixing Mac Tiger builds
darin@apple.com [Sun, 11 Nov 2007 19:03:35 +0000 (19:03 +0000)]
    * JavaScriptCore.xcodeproj/project.pbxproj: Try fixing Mac Tiger builds
        by adding another include path.

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

13 years agoJavaScriptCore:
darin@apple.com [Sun, 11 Nov 2007 18:56:13 +0000 (18:56 +0000)]
JavaScriptCore:

        Reviewed by Sam.

        - http://bugs.webkit.org/show_bug.cgi?id=15924
          next round of changes to JSRegExp (formerly PCRE)

        This is a combination of converting to C++, tweaking the API, and adding
        some additional optimizations.

        Future steps will involve getting rid of the use of UTF-8 completely
        (we'll use UTF-16 exclusively instead), eliminating more source files,
        and some more speed-ups.

        SunSpider says the current round is an 0.9% speed-up overall, and a
        5.3% speed-up for regexp.

        * JavaScriptCore.exp: Updated for new entry points.

        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/dftables/dftables.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * jscore.bkl:
        Updated for new source file names and ForwardingHeaders.

        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp): Changed to use the error message without calling
        strdup on it and to pass the new types and options.
        (KJS::RegExp::~RegExp): Removed the now-unneeded free of the error message.
        (KJS::RegExp::match): Pass the new types and options.
        * kjs/regexp.h: Update type of m_constructionError.

        * pcre/AUTHORS: Update to reflect the status of the project -- we don't include
        the Google parts, and this isn't the PCRE library, per se.
        * pcre/COPYING: Ditto.

        * pcre/dftables.cpp: Copied from JavaScriptCore/pcre/dftables.c.
        (main): Removed unneeded ctype_digit.

        * pcre/pcre.h: Convert to C++, tweak API a bit. Use UChar instead of JSRegExpChar.

        * pcre/pcre_compile.cpp: Copied from JavaScriptCore/pcre/pcre_compile.c.
        Moved a lot of private stuff used only within this file here from pcre_internal.h.
        Renumbered the error codes.
        (error_text): Use a single string with embedded nulls for the error text (I got
        this idea from newer versions of PCRE).
        (check_escape): Changed return type to be enum instead of int. Replaced ctype_digit
        uses with isASCIIDigit.
        (is_counted_repeat): Ditto.
        (read_repeat_counts): Ditto.
        (first_significant_code): Ditto.
        (find_fixedlength): Ditto.
        (could_be_empty_branch): Ditto.
        (compile_branch): Ditto. Also removed some code that handles changing options.
        JavaScript doesn't have any of the features that allow options to change.
        (compile_regex): Updated for change to options parameter.
        (is_anchored): Ditto.
        (find_firstassertedchar): Ditto.
        (jsRegExpCompile): Changed to take separate flags instead of an options int.
        Also changed to call new/delete instead of pcre_malloc/free.
        (jsRegExpFree): Ditto.

        * pcre/pcre_exec.cpp: Copied from JavaScriptCore/pcre/pcre_exec.c.
        Added a case that uses computed goto for the opcode loop, but did not turn it on.
        Changed the RMATCH macro to handle returns more efficiently by putting the where
        pointer in the new frame instead of the old one, allowing us to branch to the
        return with a single statement. Switched to new/delete from pcre_malloc/free.
        Changed many RRETURN callers to not set the return value since it's already
        set correctly. Replaced the rrc variable with an is_match variable. Values other
        than "match" and "no match" are now handled differently. This allows us to remove
        the code to check for those cases in various rules.
        (match): All the case statements use a macro BEGIN_OPCODE instead. And all the
        continue statements, or break statements that break out of the outer case use
        a macro NEXT_OPCODE instead. Replaced a few if statements with assertions.
        (jsRegExpExecute): Use new/delete instead of pcre_malloc/free. Removed unused
        start_match field from the match block.

        * pcre/pcre_internal.h: Moved the last few configuration macros from pcre-config.h
        in here. Removed various unused types. Converted from JSRegExpChar to UChar.
        Eliminated pcre_malloc/free. Replaced the opcode enum with a macro that can be
        used in multiple places. Unfortunately we lose the comments for each opcode; we
        should find a place to put those back. Removed ctype_digit.

        * pcre/pcre_maketables.cpp: Copied from JavaScriptCore/pcre/pcre_maketables.c.
        (pcre_maketables): Got rid of the conditional code that allows this to be compiled
        in -- it's only used for dftables now (and soon may be obsolete entirely).
        Changed code for cbit_digit to not use isdigit, and took the "_" case out of the
        loop. Removed ctype_digit.

        * pcre/pcre_ord2utf8.cpp: Copied from JavaScriptCore/pcre/pcre_ord2utf8.c.

        * pcre/pcre_tables.cpp: Copied from JavaScriptCore/pcre/pcre_tables.c.
        Moved _pcre_OP_lengths out of here into pcre_exec.cpp.

        * pcre/pcre_ucp_searchfuncs.cpp: Copied from JavaScriptCore/pcre/pcre_ucp_searchfuncs.c.
        Updated for other file name changes.

        * pcre/pcre_xclass.cpp: Copied from JavaScriptCore/pcre/pcre_xclass.c.

        * pcre/ucpinternal.h: Updated header.

        * pcre/ucptable.cpp: Copied from JavaScriptCore/pcre/ucptable.c.

        * wtf/ASCIICType.h: (WTF::isASCIIDigit): Removed a branch by changing from && to
        & for this operation. Also added an overload that takes an int because that's
        useful for PCRE. Later we could optimize for int and overload other functions in
        this file; stuck to this simple one for now.

        * wtf/unicode/icu/UnicodeIcu.h: Removed unused isUpper.
        * wtf/unicode/qt4/UnicodeQt4.h: Ditto.

        * pcre/LICENCE: Removed.
        * pcre/pcre-config.h: Removed.
        * wtf/FastMallocPCRE.cpp: Removed.

        * pcre/dftables.c: Renamed to cpp.
        * pcre/pcre_compile.c: Ditto.
        * pcre/pcre_exec.c: Ditto.
        * pcre/pcre_maketables.c: Ditto.
        * pcre/pcre_ord2utf8.c: Ditto.
        * pcre/pcre_tables.c: Ditto.
        * pcre/pcre_ucp_searchfuncs.c: Ditto.
        * pcre/pcre_xclass.c: Ditto.
        * pcre/ucptable.c: Ditto.

WebCore:

        Reviewed by Sam.

        - updated for JSRegExp function changes

        * platform/RegularExpression.cpp:
        (WebCore::RegularExpression::Private::compile):
        (WebCore::RegularExpression::match):

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

13 years ago2007-11-11 Alp Toker <alp@atoker.com>
alp@webkit.org [Sun, 11 Nov 2007 09:32:03 +0000 (09:32 +0000)]
2007-11-11  Alp Toker  <alp@atoker.com>

        Reviewed by Mark Rowe.

        Mention Safari in the UserAgent string to improve site compatibility.

        Also bump the hard-coded AppleWebKit version number.

        * WebCoreSupport/FrameLoaderClientGtk.cpp:
        (WebKit::composeUserAgent):

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

13 years ago2007-11-11 Eric Seidel <eric@webkit.org>
eseidel [Sun, 11 Nov 2007 08:34:39 +0000 (08:34 +0000)]
2007-11-11  Eric Seidel  <eric@webkit.org>

        Reviewed by Oliver.

        Add KJS_CHECKEXCEPTIONBOOLEAN to match rest of nodes.cpp

        * kjs/nodes.cpp:
        (KJS::ExpressionNode::evaluateToBoolean):
        (KJS::LessNode::evaluateToBoolean):
        (KJS::GreaterNode::evaluateToBoolean):
        (KJS::LessEqNode::evaluateToBoolean):
        (KJS::GreaterEqNode::evaluateToBoolean):
        (KJS::InstanceOfNode::evaluateToBoolean):
        (KJS::InNode::evaluateToBoolean):
        (KJS::EqualNode::evaluateToBoolean):
        (KJS::NotEqualNode::evaluateToBoolean):
        (KJS::StrictEqualNode::evaluateToBoolean):
        (KJS::NotStrictEqualNode::evaluateToBoolean):
        (KJS::LogicalAndNode::evaluateToBoolean):
        (KJS::LogicalOrNode::evaluateToBoolean):
        (KJS::ConditionalNode::evaluateToBoolean):

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

13 years ago2007-11-10 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Sun, 11 Nov 2007 04:05:39 +0000 (04:05 +0000)]
2007-11-10  Mark Rowe  <mrowe@apple.com>

        Qt Linux build fix.

        * platform/UnicodeRange.h:

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

13 years ago2007-11-10 Mark Rowe <mrowe@apple.com>
mrowe@apple.com [Sun, 11 Nov 2007 03:52:34 +0000 (03:52 +0000)]
2007-11-10  Mark Rowe  <mrowe@apple.com>

        Qt Windows build fix.

        * platform/UnicodeRange.h:

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

13 years ago * platform/win/fast/dom/Window/window-properties-expected.txt: Update for
darin@apple.com [Sun, 11 Nov 2007 03:33:33 +0000 (03:33 +0000)]
    * platform/win/fast/dom/Window/window-properties-expected.txt: Update for
        fix for http://bugs.webkit.org/show_bug.cgi?id=15922.

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

13 years agoReviewed by Eric.
zimmermann@webkit.org [Sun, 11 Nov 2007 02:12:09 +0000 (02:12 +0000)]
Reviewed by Eric.

Fixes: http://bugs.webkit.org/show_bug.cgi?id=15937 (Add glyph-orientation-horizontal/vertical support)
Fixes: http://bugs.webkit.org/show_bug.cgi?id=13971 (text-anchor support on vertical text seems slightly off)

Add glyph-orientation-* support for text & textPath. (90/180/270 and 'auto')
Also fix all vertical text handling - for text & textPath! (especially latin1 characters auto orientation in vertical writing modes)

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

13 years agoRubberstamped by Eric.
zimmermann@webkit.org [Sun, 11 Nov 2007 01:38:53 +0000 (01:38 +0000)]
Rubberstamped by Eric.
Update some SVG pixel test results - which show changes lately -> repainting fixes.

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

13 years agoJavaScriptCore:
darin@apple.com [Sun, 11 Nov 2007 01:07:00 +0000 (01:07 +0000)]
JavaScriptCore:

        Reviewed by Sam.

        - fix http://bugs.webkit.org/show_bug.cgi?id=15927
          REGRESSION(r27487): delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property
          and <rdar://problem/5586384> REGRESSION (r27487): Can't switch out of Edit HTML Source mode on Leopard Wiki

        Test: fast/js/delete-then-put.html

        * kjs/property_map.cpp:
        (KJS::PropertyMap::put): Added a missing "- 1"; code to find an empty slot was not working.
        (KJS::PropertyMap::checkConsistency): Added a missing range check that would have caught this
        problem before.

        - roll out a last-minute change to my evaluateToBoolean patch that was incorrect.

        * kjs/nodes.h: (KJS::ExprStatementNode::ExprStatementNode): Take out call to
        optimizeForUnnecessaryResult, since the result is used in some cases.

LayoutTests:

        Reviewed by Sam.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15927
          delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property

        * fast/js/delete-then-put-expected.txt: Added.
        * fast/js/delete-then-put.html: Added.
        * fast/js/resources/delete-then-put.js: Added.

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

13 years ago Reviewed by Sam Weinig.
timothy@apple.com [Sun, 11 Nov 2007 00:49:55 +0000 (00:49 +0000)]
    Reviewed by Sam Weinig.

        * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
          and switch over to use getUniqueProperties in another place.

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

13 years agoWebKitTools:
weinig@apple.com [Sun, 11 Nov 2007 00:30:06 +0000 (00:30 +0000)]
WebKitTools:

        Reviewed by Tim Hatcher.

        Follow up to <rdar://problem/5394877> Safari should not log unsafe JavaScript
        attempts when in private browsing mode (only an issue if Log JavaScript Exceptions
        is turned on)

        - Add LayoutTestController.setPrivateBrowsingEnabled(bool) (stub out implementation for windows)

        Added test: http/tests/security/cross-frame-access-private-browsing.html

        * DumpRenderTree/LayoutTestController.cpp:
        (setPrivateBrowsingEnabledCallback):
        (LayoutTestController::staticFunctions):
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/mac/DumpRenderTree.mm:
        (runTest): Default to private browsing disabled.
        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
        (LayoutTestController::setPrivateBrowsingEnabled):
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        (LayoutTestController::setPrivateBrowsingEnabled):

LayoutTests:

        Reviewed by Tim Hatcher.

        Follow up to <rdar://problem/5394877> Safari should not log unsafe JavaScript
        attempts when in private browsing mode (only an issue if Log JavaScript Exceptions
        is turned on)

        Test using the new LayoutTestController.setPrivateBrowsingEnabled(bool)

        * http/tests/security/cross-frame-access-private-browsing-expected.txt: Added.
        * http/tests/security/cross-frame-access-private-browsing.html: Added.
        * platform/win/Skipped: Add new test to windows skip list until we have an
        implementation of LayoutTestController.setPrivateBrowsingEnabled(bool) for it.

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

13 years ago Reviewed by Sam Weinig
sullivan@apple.com [Sat, 10 Nov 2007 23:38:43 +0000 (23:38 +0000)]
    Reviewed by Sam Weinig

        Rest of fix for 5394877

        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):
        Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in
        private browsing mode either.

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

13 years agoReviewed by Oliver.
zimmermann@webkit.org [Sat, 10 Nov 2007 23:16:16 +0000 (23:16 +0000)]
Reviewed by Oliver.

Fix function name difference - header said 'unicodeRangeForCharacter', actually
implemented function is 'findCharUnicodeRange'. They are not compiled yet.

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

13 years agoWhen populating the context menu with sub-menus don't add sub-menus if they're empty.
hausmann [Sat, 10 Nov 2007 22:24:34 +0000 (22:24 +0000)]
When populating the context menu with sub-menus don't add sub-menus if they're empty.

Signed-off-by: Nikolas
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27673 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoAdded support for the Bold/Italic/Underline toggle actions.
hausmann [Sat, 10 Nov 2007 22:24:29 +0000 (22:24 +0000)]
Added support for the Bold/Italic/Underline toggle actions.

Signed-off-by: Nikolas
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27672 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoBefore adding an action to the context menu call checkOrEnableIfNeeded for each action
hausmann [Sat, 10 Nov 2007 22:24:23 +0000 (22:24 +0000)]
Before adding an action to the context menu call checkOrEnableIfNeeded for each action
to update the enable/checked state correctly.

Signed-off-by: Nikolas
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27671 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years agoMark the text direction actions as checkable actions.
hausmann [Sat, 10 Nov 2007 22:24:17 +0000 (22:24 +0000)]
Mark the text direction actions as checkable actions.

Signed-off-by: Nikolas
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27670 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 years ago Windows build fix
aroben@apple.com [Sat, 10 Nov 2007 22:18:17 +0000 (22:18 +0000)]
    Windows build fix

        Roll out some changes that were (seemingly accidentally) checked in
        with r27664.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

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

13 years ago Reviewed by Darin Adler.
mitz@apple.com [Sat, 10 Nov 2007 21:12:44 +0000 (21:12 +0000)]
    Reviewed by Darin Adler.

        - fix <rdar://problem/5450655> Control-clicking text in a link can surprisingly select only part of the link, should select entire link

        No test because context menu events cannot be tested in DumpRenderTree.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added.
        If the click occurred in an active link, selects the entire link
        element. Otherwise selects the closest word.
        (WebCore::EventHandler::sendContextMenuEvent): Call
        selectClosestWordOrLinkFromMouseEvent().
        * page/EventHandler.h:

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

13 years ago Reviewed by Tim Hatcher
sullivan@apple.com [Sat, 10 Nov 2007 21:08:17 +0000 (21:08 +0000)]
    Reviewed by Tim Hatcher

        - fixed <rdar://problem/5394877> Safari should not log unsafe JavaScript attempts when
          in private browsing mode (only an issue if Log JavaScript Exceptions is turned on)

        * bindings/js/kjs_window.cpp:
        (KJS::Window::isSafeScript):
        Don't log unsafe JavaScript attempts to console or chromeClient if in private browsing mode

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

13 years ago Reviewed by Darin.
ap@webkit.org [Sat, 10 Nov 2007 20:29:27 +0000 (20:29 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15922
        Implement more of Mozilla Selection API

        Tests: editing/selection/containsNode.html
               editing/selection/deleteFromDocument.html
               editing/selection/extend.html
               editing/selection/selectAllChildren.html

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::deleteFromDocument):
        (WebCore::SelectionController::containsNode):
        (WebCore::SelectionController::selectAllChildren):
        (WebCore::SelectionController::extend):
        * editing/SelectionController.h:
        Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(),
        which existed, but didn't match Firefox behavior and wasn't exposed via bindings.
        Removed a comment mentioning removeRange(), as this method makes no sense without multiple
        selection range support.

        * page/DOMSelection.cpp:
        (WebCore::DOMSelection::extend):
        (WebCore::DOMSelection::deleteFromDocument):
        (WebCore::DOMSelection::containsNode):
        (WebCore::DOMSelection::selectAllChildren):
        * page/DOMSelection.h:
        * page/DOMSelection.idl:
        Exposed the new methods.

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

13 years ago Reviewed by Darin.
ap@webkit.org [Sat, 10 Nov 2007 20:24:18 +0000 (20:24 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15892
        DOM Range operations are not implemented for ProcessingInstruction nodes

        Test: fast/dom/Range/range-processing-instructions.html

        * dom/Range.cpp:
        (WebCore::Range::processContents): Implemented ProcessingInstruction cases.
        (WebCore::Range::checkNodeWOffset): Removed a FIXME - yes, I think that we are supposed
        to use ProcessingInstruction.data.

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

13 years ago Reviewed by Sam.
darin@apple.com [Sat, 10 Nov 2007 18:29:17 +0000 (18:29 +0000)]
    Reviewed by Sam.

        - http://bugs.webkit.org/show_bug.cgi?id=15915
          add an evaluation path for booleans like the one we have for numbers

        Gives 1.1% on SunSpider.

        * kjs/grammar.y: Create TrueNode and FalseNode instead of BooleanNode.

        * kjs/nodes.h: Changed to use Noncopyable. Moved optimizeForUnnecessaryResult
        down from Node to ExpressionNode. Changed some classes to not inherit from
        ExpressionNode where not necessary, and removed unnneeded evaluate functions
        as well as evaluate functions that need not be virtual. Call the
        optimizeForUnnecessaryResult function on the start of a for loop too.
        * kjs/nodes.cpp:
        (KJS::ExpressionNode::evaluateToBoolean): Added.
        (KJS::FalseNode::evaluate): Added.
        (KJS::TrueNode::evaluate): Added.
        (KJS::NumberNode::evaluateToBoolean): Added.
        (KJS::StringNode::evaluateToBoolean): Added.
        (KJS::LocalVarAccessNode::evaluateToBoolean): Added.
        (KJS::BracketAccessorNode::evaluateToBoolean): Added.
        (KJS::LogicalNotNode::evaluate): Changed to call evaluateToBoolean.
        (KJS::LogicalNotNode::evaluateToBoolean): Added.
        (KJS::lessThan): Changed to return bool.
        (KJS::lessThanEq): Ditto.
        (KJS::LessNode::evaluate): Changed since lessThan returns bool.
        (KJS::LessNode::evaluateToBoolean): Added.
        (KJS::GreaterNode::evaluate): Changed since lessThanEq returns bool.
        (KJS::GreaterNode::evaluateToBoolean): Added.
        (KJS::LessEqNode::evaluate): Changed since lessThanEq returns bool.
        (KJS::LessEqNode::evaluateToBoolean): Added.
        (KJS::GreaterEqNode::evaluate): Changed since lessThan returns bool.
        (KJS::GreaterEqNode::evaluateToBoolean): Added.
        (KJS::InstanceOfNode::evaluateToBoolean): Added.
        (KJS::InNode::evaluateToBoolean): Added.
        (KJS::EqualNode::evaluateToBoolean): Added.
        (KJS::NotEqualNode::evaluateToBoolean): Added.
        (KJS::StrictEqualNode::evaluateToBoolean): Added.
        (KJS::NotStrictEqualNode::evaluateToBoolean): Added.
        (KJS::ConditionalNode::evaluate): Changed to call evaluateToBoolean.
        (KJS::IfNode::execute): Ditto.
        (KJS::DoWhileNode::execute): Ditto.
        (KJS::WhileNode::execute): Ditto.
        (KJS::ForNode::execute): Ditto.

        * kjs/nodes2string.cpp:
        (KJS::FalseNode::streamTo): Added.
        (KJS::TrueNode::streamTo): Added.

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

13 years ago Reviewed by Mark Rowe.
timothy@apple.com [Sat, 10 Nov 2007 08:02:49 +0000 (08:02 +0000)]
    Reviewed by Mark Rowe.

        Bug 12054: Ability to serialize an element subtree (into clipboard?) from the DOM inspector
        http://bugs.webkit.org/show_bug.cgi?id=12054

        - Add support code for routing copy events to the focused element.
        - Implement copying the currently selected DOM node. The node
          and it's subtree is copied to the clipboard. If the node has no
          outerHTML, the nodeValue is copied (text nodes, etc.)
        - Implement copy for the resource sidebar. The URL is copied for the
          currently selected resource.

        * page/inspector/DocumentPanel.js:
        * page/inspector/inspector.js:

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

13 years ago Reviewed by Darin.
ap@webkit.org [Sat, 10 Nov 2007 07:50:20 +0000 (07:50 +0000)]
    Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=15925
        SunSpider should check for Shark being installed

        * sunspider: Explicitly test that shark command line tool is installed.

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

13 years ago2007-11-09 Jon Honeycutt <jhoneycutt@apple.com>
honeycutt [Sat, 10 Nov 2007 02:28:57 +0000 (02:28 +0000)]
2007-11-09  Jon Honeycutt  <jhoneycutt@apple.com>

        Reviewed by Sam.

        <rdar://5585900>: Safari crashes when selected in context menu to open
        audio format files (au, aif) with QT 7.3

        The crash occurred on a machine where QT 7.3 was failing to initialize.
        The fix is to avoid sending streams to full-page plugins that've failed
        to load

        * WebFrame.cpp:
        (WebFrame::finishedLoading): Check plugin status before calling manual
        stream methods
        (WebFrame::setMainDocumentError): Same
        (WebFrame::committedLoad): Same

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

13 years ago Rubber stamped by bdash.
antti [Sat, 10 Nov 2007 01:53:37 +0000 (01:53 +0000)]
    Rubber stamped by bdash.

        Add directory for blog resources (and one image).

        * blog-files: Added.
        * blog-files/touch-poster.png: Added.

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

13 years ago Reviewed by Adele.
antti [Sat, 10 Nov 2007 00:59:21 +0000 (00:59 +0000)]
    Reviewed by Adele.

        Fix occasional blank video with poster attribute.

        * ChangeLog:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::load):
        (WebCore::HTMLMediaElement::didRestoreFromCache):
        Just calling updateFromElement() does the right thing for both poster image and video.

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