WebKit-https.git
13 years ago Reviewed by Darin.
ap [Thu, 20 Jul 2006 19:20:55 +0000 (19:20 +0000)]
    Reviewed by Darin.

        Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
        Use of window.open & window.close can cause crash

        * platform/PlatformMouseEvent.h:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/mac/PlatformMouseEventMac.mm:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        The default constructor now creates a "zero" event, and a new one was added to create the "current" one.

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::handleMouseMoveEvent):
        * rendering/RenderFormElement.cpp:
        (WebCore::RenderFormElement::clicked):
        Updated for the above changes.

        * platform/gdk/MouseEventGdk.cpp:
        * platform/gdk/TemporaryLinkStubs.cpp:
        (PlatformMouseEvent::PlatformMouseEvent):
        * platform/win/MouseEventWin.cpp:
        * platform/win/TemporaryLinkStubs.cpp:
        (PlatformMouseEvent::PlatformMouseEvent):
        Trying not to break other platforms.

        * manual-tests/invalid-mouse-event.html: Added.

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

13 years ago Reviewed by Anders.
mjs [Thu, 20 Jul 2006 09:03:56 +0000 (09:03 +0000)]
    Reviewed by Anders.

        - delete line that I only commented in the last patch - meant to do this before landing

        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::close):

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

13 years ago Reviewed by Geoff.
mjs [Thu, 20 Jul 2006 08:47:52 +0000 (08:47 +0000)]
    Reviewed by Geoff.

        - fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't

        I couldn't figure out how to make an automated test case for this,
        or even a manual one. It seems to be timing-related in some way.

        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::close): detach the child frame from
        its element, not the frame containing this element.

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

13 years ago2006-07-20 Anders Carlsson <acarlsson@apple.com>
andersca [Thu, 20 Jul 2006 07:49:59 +0000 (07:49 +0000)]
2006-07-20  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::nextKeyViewInFrame):
        Hold a ref to the node in case it gets destroyed by an event handler.

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

13 years ago Reviewed by Adele.
mjs [Thu, 20 Jul 2006 04:15:25 +0000 (04:15 +0000)]
    Reviewed by Adele.

        - fixed layout test results that were affected by editing input
        paste patch -- new results are actually more correct, handling
        text fields properly as a replaced element.

        * editing/selection/3690703-2-expected.txt:
        * editing/selection/3690703-expected.txt:
        * fast/events/div-focus-expected.txt:
        * fast/text/textIteratorNilRenderer-expected.txt:

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

13 years ago Reviewed by Darin.
bdakin [Thu, 20 Jul 2006 02:01:16 +0000 (02:01 +0000)]
    Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
        Bug 10021: REGRESSION: Stack overflow due to infinite recursion in
        Image::checkForSolidColor

        * platform/Image.cpp:
        (WebCore::Image::cacheFrame): Don't call checkForSolidColor unless
        the frame was decoded successfully.

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

13 years ago Reviewed by Darin.
tomernic [Thu, 20 Jul 2006 00:47:22 +0000 (00:47 +0000)]
    Reviewed by Darin.

        <rdar://problem/4523432> safari crashed right after disabling "block pop up windows" (or other WebPreferences changes)

        * Plugins/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]):
        Stop the plug-in when it is removed from its superview.  It is not sufficient to do this in -viewWillMoveToWindow:nil, because
        the WebView might still has a hostWindow at that point, which prevents the plug-in from being destroyed.
        There is no need to start the plug-in when moving into a superview.  -viewDidMoveToWindow takes care of that.

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

13 years ago Fixed by Darin & Maciej, reviewed by me.
ggaren [Wed, 19 Jul 2006 23:56:05 +0000 (23:56 +0000)]
    Fixed by Darin & Maciej, reviewed by me.

        - Fixed <rdar://problem/4638934> Leopard 9A227: Installer crashes right
        after LCA and while preparing Installation

        Compile release/production with NDEBUG set, to ensure binary compatibility
        between JavaScriptGlue and JavaScriptCore. In debug builds, JavaScriptCore
        includes an extra debug data member in HashSet.

        * JavaScriptGlue.xcodeproj/project.pbxproj:

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

13 years ago Reviewed by Maciej.
adele [Wed, 19 Jul 2006 23:54:49 +0000 (23:54 +0000)]
    Reviewed by Maciej.

        - Fix for:
        <rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
        http://bugzilla.opendarwin.org/show_bug.cgi?id=7405

        <rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
        http://bugzilla.opendarwin.org/show_bug.cgi?id=9707

        Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)

        These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
        Now, we detect this case and let setFocusNode be called.  And when the stylesheet finishes loading, and the element attaches, a timer will fire,
        which will cause the correct selection & scrolling behavior to occur.

        This fix removes selection and scrolling behavior from the focus method.  This code is now in a new method, updateFocusAppearance.
        updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires.  This timer gets set
        up when an element attaches, and its already been focused by the focus method.  We have to use a timer, because updateFocusAppearance can cause
        a layout to happen, and we don't want that to happen in the middle of attach().

        * bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
        * bindings/objc/DOMPrivate.h:

        * dom/Element.cpp:
        (WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
        (WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
        (WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode,
        and only requiring the element to be focusable now before updating focus appearance.
        (WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
        (WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
        (WebCore::Element::stopUpdateFocusAppearanceTimer):  Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
        (WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
        (WebCore::Element::blur): ditto.
        * dom/Element.h:
        (WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
        (WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.

        * dom/Node.h: (WebCore::Node::supportsFocus): Added.  Base class just calls isFocusable.
        * html/HTMLAnchorElement.h: Added supportsFocus.
        * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
        so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
        * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
        * html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode,
        and only requiring the element to be focusable now before updating focus appearance.
        (WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
        * html/HTMLInputElement.h:

        * html/HTMLTextAreaElement.cpp:
        (WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode,
        and only requiring the element to be focusable now before updating focus appearance.
        (WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
        * html/HTMLTextAreaElement.h:

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

13 years agoLayoutTests:
justing [Wed, 19 Jul 2006 22:55:10 +0000 (22:55 +0000)]
LayoutTests:

        Reviewed by levi

        <rdar://problem/4631972>
        REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message

        * editing/pasteboard/4631972-expected.checksum: Added.
        * editing/pasteboard/4631972-expected.png: Added.
        * editing/pasteboard/4631972-expected.txt: Added.
        * editing/pasteboard/4631972.html: Added.
        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
        * editing/selection/replaced-boundaries-3-expected.checksum:
        * editing/selection/replaced-boundaries-3-expected.txt:
        * editing/selection/select-box-expected.txt:

WebCore:

        Reviewed by levi

        <rdar://problem/4631972>
        REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message

        * dom/Position.cpp:
        (WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
        (WebCore::Position::downstream): Ditto.
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
        * editing/htmlediting.cpp:
        (WebCore::canHaveChildrenForEditing): Added !iframe.
        (WebCore::isBlock): Added, returns !node->renderer()->isInline()
        (WebCore::enclosingBlock): Added.
        * editing/htmlediting.h:

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

13 years agoWebCore:
andersca [Wed, 19 Jul 2006 22:32:39 +0000 (22:32 +0000)]
WebCore:

2006-07-19  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Adele.

        <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::nextKeyViewInFrame):
        Take into account that focus handlers can cause a node to be destroyed.

LayoutTests:

2006-07-19  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Adele.

        <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com

        * fast/forms/display-none-in-onchange-keyboard-expected.txt: Added.
        * fast/forms/display-none-in-onchange-keyboard.html: Added.

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

13 years ago Fix for 4638376. The 1x1 solid color image optimization was broken when
hyatt [Wed, 19 Jul 2006 21:49:25 +0000 (21:49 +0000)]
    Fix for 4638376.  The 1x1 solid color image optimization was broken when
        I re-architected image.  This patch restores the optimization for CG.  Cairo
        will still need the optimization.

        Reviewed by darin

        WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)

        * platform/Image.cpp:
        (WebCore::Image::Image):
        (WebCore::Image::invalidateData):
        (WebCore::Image::cacheFrame):
        * platform/Image.h:
        (WebCore::Image::setIsPDF):
        * platform/cairo/ImageCairo.cpp:
        (WebCore::Image::checkForSolidColor):
        * platform/mac/ImageMac.mm:
        (WebCore::Image::initNativeData):
        (WebCore::Image::invalidateNativeData):
        (WebCore::Image::checkForSolidColor):
        (WebCore::Image::draw):
        (WebCore::Image::drawTiled):

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

13 years agoLayoutTests:
justing [Wed, 19 Jul 2006 19:01:26 +0000 (19:01 +0000)]
LayoutTests:

        Reviewed by levi

        <rdar://problem/4613519>
        REGRESSION: Pasting text in native text area inserts text one character before it should (9527)

        * fast/forms/paste-into-textarea-expected.checksum: Added.
        * fast/forms/paste-into-textarea-expected.png: Added.
        * fast/forms/paste-into-textarea-expected.txt: Added.
        * fast/forms/paste-into-textarea.html: Added.

WebCore:

        Reviewed by levi

        <rdar://problem/4613519>
        REGRESSION: Pasting text in native text area inserts text one character before it should (9527)

        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
        if the enclosingBlockFlowElement doesn't have a parent.

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

13 years ago2006-07-19 Anders Carlsson <acarlsson@apple.com>
andersca [Wed, 19 Jul 2006 18:30:02 +0000 (18:30 +0000)]
2006-07-19  Anders Carlsson  <acarlsson@apple.com>

        * fast/js/pretty-print-expected.txt:
        Update result.

        * fast/js/resources/pretty-print.js:
        Fix description string.

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

13 years agoJavaScriptCore:
andersca [Wed, 19 Jul 2006 17:32:15 +0000 (17:32 +0000)]
JavaScriptCore:

2006-07-19  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work

        * kjs/nodes2string.cpp:
        (StringNode::streamTo):
        Return the escaped string.

        (RegExpNode::streamTo):
        Use the correct syntax.

        * kjs/function.cpp:
        (KJS::escapeStringForPrettyPrinting):
        * kjs/function.h:
        Add escape function which escapes a string for pretty-printing so it can be parsed again.

        * wtf/unicode/icu/UnicodeIcu.h:
        (WTF::Unicode::isPrintableChar):
        New function.

LayoutTests:

2006-07-19  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work

        * fast/js/pretty-print-expected.txt: Added.
        * fast/js/pretty-print.html: Added.
        * fast/js/resources/pretty-print.js: Added.

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

13 years agoLayoutTests:
harrison [Wed, 19 Jul 2006 17:24:22 +0000 (17:24 +0000)]
LayoutTests:

        <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
        <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table

        (this really only tests the symptoms of <rdar://problem/4062218>, because -[DOMRange markupString] is not testable)

        * editing/pasteboard/paste-table-003-expected.checksum: Added.
        * editing/pasteboard/paste-table-003-expected.png: Added.
        * editing/pasteboard/paste-table-003-expected.txt: Added.
        * editing/pasteboard/paste-table-003.html: Added.

WebCore:

        Reviewed by Tim Hatcher.

        <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
        <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table

        Better patch than previous checkin.

        * test: editing/pasteboard/paste-table-003.html

        * editing/markup.cpp:
        (WebCore::createMarkup):
        Make sure to include the table when including a tbody.

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

13 years agoVersioning
thatcher [Wed, 19 Jul 2006 15:26:12 +0000 (15:26 +0000)]
Versioning

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

13 years ago Reviewed by Tim Hatcher.
harrison [Wed, 19 Jul 2006 14:50:37 +0000 (14:50 +0000)]
    Reviewed by Tim Hatcher.

        <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range

        No test case as this can only be reproduced through ObjC APIs.

        * editing/markup.cpp:
        (WebCore::createMarkup):
        Adjust the range for ancestor markup handling when main loop skips first node.

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

13 years agoJavaScriptCore:
mjs [Wed, 19 Jul 2006 07:06:13 +0000 (07:06 +0000)]
JavaScriptCore:

        Reviewed by Adele Peterson.

        <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers)

        * kjs/lexer.cpp:
        (Lexer::shift):
        (Lexer::lex):
        (Lexer::record16):
        (Lexer::scanRegExp):
        * kjs/lexer.h:

LayoutTests:

        Reviewed by Adele Peterson.

        Test case for:

        <rdar://problem/4620646> REGRESSION(10.4.7-10.5): can't type into editing region when creating or editing a blogger.com post

        * fast/js/null-char-in-string-expected.txt: Added.
        * fast/js/null-char-in-string.html: Added.
        * fast/js/resources/null-char-in-string.js: Added.

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

13 years agoAdding versioning and markers from earlier.
thatcher [Wed, 19 Jul 2006 05:38:13 +0000 (05:38 +0000)]
Adding versioning and markers from earlier.

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

13 years agoRemove the font property compatibility test, since we no longer want to be compatible.
hyatt [Wed, 19 Jul 2006 04:05:24 +0000 (04:05 +0000)]
Remove the font property compatibility test, since we no longer want to be compatible.

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

13 years agoWebKitTools:
ddkilzer [Wed, 19 Jul 2006 02:44:15 +0000 (02:44 +0000)]
WebKitTools:

        Reviewed by Timothy.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9964
          Add switch to prepare-ChangeLog to skip svn update of ChangeLog files

        * Scripts/prepare-ChangeLog: Added --[no-]update switch.

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

13 years agoTweak a comment in cssparser.
hyatt [Wed, 19 Jul 2006 00:32:33 +0000 (00:32 +0000)]
Tweak a comment in cssparser.

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

13 years ago Fix for radar 4611287, make resizable text fields opt-in rather than
hyatt [Wed, 19 Jul 2006 00:16:34 +0000 (00:16 +0000)]
    Fix for radar 4611287, make resizable text fields opt-in rather than
        opt-out.  Open source users will need to write the pref into their defaults
        to see the resizers on textareas now.

        Reviewed by mjs and adele

        * WebCore.xcodeproj/project.pbxproj:
        * bridge/mac/WebCoreSettings.mm:
        (-[WebCoreSettings setTextAreasAreResizable:]):
        * css/cssparser.cpp:
        (WebCore::CSSParser::parseValue):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * css/html4.css:

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

13 years ago Reviewed by Tim Hatcher.
tomernic [Tue, 18 Jul 2006 22:56:24 +0000 (22:56 +0000)]
    Reviewed by Tim Hatcher.

        Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject
        variable.

        * bindings/npapi.h:

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

13 years agoWebCore:
andersca [Tue, 18 Jul 2006 20:22:31 +0000 (20:22 +0000)]
WebCore:

2006-07-18  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
        REGRESSION: iframes stop rendering after 200th one on successive reloads

        * html/HTMLFrameElement.cpp:
        (WebCore::HTMLFrameElement::attach):
        (WebCore::HTMLFrameElement::close):
        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::insertedIntoDocument):
        (WebCore::HTMLIFrameElement::willRemove):
        Remove calls to incrementFrameCount and decrementFrameCount.

        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        Call incrementFrameCount here.

        (WebCore::Frame::~Frame):
        Call disconnectOwnerElement.

        (WebCore::Frame::disconnectOwnerElement):
        Call decrementFrameCount here.

LayoutTests:

2006-07-18  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
        REGRESSION: iframes stop rendering after 200th one on successive reloads

        * fast/frames/frame-limit-expected.txt: Added.
        * fast/frames/frame-limit.html: Added.

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

13 years ago Reviewed by Darin.
ap [Tue, 18 Jul 2006 19:56:17 +0000 (19:56 +0000)]
    Reviewed by Darin.

        Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
        Let correct CSS custom cursor declarations parse

        * css/cssparser.cpp:
        (WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
        requiring that it is the only one in the list (which is actually illegal, according to the spec).
        This is only a temporary hack, with a real implementation to follow in bug 6001/6002.

        * manual-tests/custom-cursors.html: Added a test for this issue.
        * manual-tests/resources/helpCursor.tiff: A cursor image used in the test.

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

13 years ago Reviewed by Anders.
thatcher [Tue, 18 Jul 2006 19:28:24 +0000 (19:28 +0000)]
    Reviewed by Anders.

        <rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols

        WebCore needs to add -sub_library libobjc to maintain
        backwards compatibility with binaries linked with WebKit
        before JavaScriptCore moved out of WebKit.

        * WebCore.xcodeproj/project.pbxproj:

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

13 years ago Reviewed by Alice.
darin [Tue, 18 Jul 2006 17:03:06 +0000 (17:03 +0000)]
    Reviewed by Alice.

        - convert a couple of tests to "dump as text" tests

        * fast/dom/css-selectorText-expected.checksum: Removed.
        * fast/dom/css-selectorText-expected.png: Removed.
        * fast/dom/css-selectorText-expected.txt: Replaced render tree results with text results.
        * fast/dom/css-selectorText.html: Added a call to layoutTestController.dumpAsText.

        * fast/dom/css-shortHands-expected.checksum: Removed.
        * fast/dom/css-shortHands-expected.png: Removed.
        * fast/dom/css-shortHands-expected.txt: Replaced render tree results with text results.
        * fast/dom/css-shortHands.html: Added a call to layoutTestController.dumpAsText.

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

13 years ago Made the following headers public:
thatcher [Tue, 18 Jul 2006 16:01:24 +0000 (16:01 +0000)]
    Made the following headers public:

        * JavaScriptCore.h
        * JSBase.h
        * JSContextRef.h
        * JSObjectRef.h
        * JSStringRef.h
        * JSValueRef.h

        * JavaScriptCore.xcodeproj/project.pbxproj:

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

13 years agoLayoutTests:
ddkilzer [Tue, 18 Jul 2006 10:55:32 +0000 (10:55 +0000)]
LayoutTests:

        Reviewed by Justin.  Patch by Mitz.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
          REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line

        * editing/selection/click-start-of-line-expected.checksum: Added.
        * editing/selection/click-start-of-line-expected.png: Added.
        * editing/selection/click-start-of-line-expected.txt: Added.
        * editing/selection/click-start-of-line.html: Added.

WebCore:

        Reviewed by Justin.  Patch by Mitz.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
          REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line

        Test: editing/selection/click-start-of-line.html

        * rendering/RenderText.cpp:
        (WebCore::RenderText::positionForCoordinates): Changed to return downstream
        affinity if the x coordinate is to the left of the middle of the first character
        in the text box.

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

13 years agoWebCore:
andersca [Tue, 18 Jul 2006 09:24:22 +0000 (09:24 +0000)]
WebCore:

2006-07-18  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
        <rdar://problem/4614085>
        TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::modifyExtendingRightForward):
        (WebCore::SelectionController::modifyMovingRightForward):
        (WebCore::SelectionController::modifyExtendingLeftBackward):
        (WebCore::SelectionController::modifyMovingLeftBackward):
        If the caret is inside an editable region, the beginning/end of the document should actually be the
        beginning/end of the editable region.

LayoutTests:

2006-07-18  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
        <rdar://problem/4614085>
        TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)

        * editing/selection/move-begin-end-expected.txt: Added.
        * editing/selection/move-begin-end.html: Added.

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

13 years agoWebCore:
tomernic [Tue, 18 Jul 2006 04:55:40 +0000 (04:55 +0000)]
WebCore:

        Reviewed by Maciej.

        <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
        by script

        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge setProhibitsScrolling:]):
        * page/Frame.cpp:
        (WebCore::Frame::prohibitsScrolling):
        (WebCore::Frame::setProhibitsScrolling):
        * page/Frame.h:
        * page/FramePrivate.h:
        (WebCore::FramePrivate::FramePrivate):
        * page/FrameView.cpp:
        (WebCore::FrameView::scrollPointRecursively):
        (WebCore::FrameView::setContentsPos):
        * page/FrameView.h:
        * platform/ScrollView.h:

WebKit:

        Reviewed by Maciej.

        <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
        by script

        * WebView/WebViewPrivate.h:
        * WebView/WebView.m:
        (-[WebView setProhibitsMainFrameScrolling:]):
        New method.  Prohibits scrolling in the WebView's main frame.  Used to "lock" a WebView to a specific
        scroll position.

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

13 years ago Reviewed by Maciej.
ggaren [Tue, 18 Jul 2006 04:33:46 +0000 (04:33 +0000)]
    Reviewed by Maciej.

        - Added automatic prototype creation for classes.

        A class stores a weak reference to a prototype, which is cleared when
        the prototype is garbage collected, to avoid a reference cycle.

        We now have an attributes field in JSClassDefinition, that currently is
        used only to override automatic prototype creation when you want to manage your
        own prototypes, but can be extended in the future for other nefarious purposes.

        Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter
        allowing you to manage your own prototypes.

        JSObjectMakeConstructor is more interesting now, able to make a constructor
        on your behalf if you just give it a class.

        - Removed bogus old code from minidom.js.

        - Tweaked the headerdocs.

        - Added more GC testing, which caught some leaks, and tested more funny
        edge cases in lookup, which caught a lookup bug. Removed some testing
        we used to do with MyObject because it was redundant with the new, cool
        stuff.

        While fixing the lookup bug I retracted this change:

            "If a static setProperty callback returns 'false', to indicate that the
            property was not set, we no longer forward the set request up the class
            chain, because that's almost certainly not what the programmer expected."

        Returning false when setting a static property is a little silly, but you can see
        it being useful when shadowing a base class's static properties, and, regardless
        of usefullness, this is the defined behavior of the setProperty callback.

        - Plus a little ASCII art, for the kids.

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

13 years agoLayoutTests:
mjs [Tue, 18 Jul 2006 04:32:00 +0000 (04:32 +0000)]
LayoutTests:

        Test cases not reviewed but the corresponding fix was.

        - test cases for <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/

        * editing/pasteboard/nested-blocks-with-text-area-expected.txt: Added.
        * editing/pasteboard/nested-blocks-with-text-area.html: Added.
        * editing/pasteboard/nested-blocks-with-text-field-expected.txt: Added.
        * editing/pasteboard/nested-blocks-with-text-field.html: Added.

WebCore:

        Reviewed by Dave Harrison.

        - fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/

        * editing/htmlediting.cpp:
        (WebCore::editingIgnoresContent):

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

13 years ago Reviewed by levi
justing [Tue, 18 Jul 2006 01:18:15 +0000 (01:18 +0000)]
    Reviewed by levi

        <rdar://problem/4621728>
        REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
        <rdar://problem/4604932>
        REGRESSION: Dragging too far left on a line will select all lines above it.

        No layout test because of 9980.

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
        for coordinates outside those roots, except for coordinates outside a document that is entirely
        editable.

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

13 years ago Reviewed by Darin.
thatcher [Tue, 18 Jul 2006 00:55:02 +0000 (00:55 +0000)]
    Reviewed by Darin.

        <rdar://problem/4635311> REGRESSION: WebKit should call windowScriptObjectAvailable before attaching the script debugger

        * WebCoreSupport/WebFrameBridge.m:
        (-[WebFrameBridge windowObjectCleared]):

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

13 years ago Reviewed by Darin.
thatcher [Tue, 18 Jul 2006 00:48:32 +0000 (00:48 +0000)]
    Reviewed by Darin.

        <rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero

        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        (WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
        * html/CanvasRenderingContext2D.cpp:
        (WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return

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

13 years agoJavaScriptCore:
thatcher [Tue, 18 Jul 2006 00:27:46 +0000 (00:27 +0000)]
JavaScriptCore:

        Reviewed by Maciej.

        <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit

        Moves WebScriptObject and WebUndefined up to WebCore.
        This change does create an upwards-dependancy on WebScriptObject existing
        in the loaded process, but this code path in JavaScriptCore does not get used
        unless it is through WebKit/WebCore. Moving all of the binding code out of
        JavaScriptCore might make sense in the future.

        * JavaScriptCore.exp:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * bindings/objc/WebScriptObject.h: Replaced.
        * bindings/objc/WebScriptObject.mm: Removed.
        * bindings/objc/WebScriptObjectPrivate.h: Removed.
        * bindings/objc/objc_class.h:
        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::~ObjcInstance):
        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        (convertValueToObjcObject):
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue):
        (KJS::Bindings::convertObjcValueToValue):
        (KJS::Bindings::createObjcInstanceForValue):

WebCore:

        Reviewed by Maciej.

        <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit

        Moves WebScriptObject and WebUndefined to WebCore.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOM.mm:
        * bindings/objc/DOMCore.h:
        * bindings/objc/DOMInternal.mm:
        * bindings/objc/DOMUtility.mm:
        * bindings/objc/WebScriptObject.mm: Added.
        (+[WebUndefined allocWithZone:]):
        (-[WebUndefined initWithCoder:]):
        (-[WebUndefined encodeWithCoder:]):
        (-[WebUndefined copyWithZone:]):
        * bindings/objc/WebScriptObjectPrivate.h: Added.
        * bridge/mac/FrameMac.mm:
        * bridge/mac/WebCoreScriptDebugger.mm:

WebKit:

        Reviewed by Maciej.

        <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit

        Copy WebScriptObject.h from WebCore's private headers, not JavaScriptCore.

        * WebKit.xcodeproj/project.pbxproj:

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

13 years ago2006-07-17 Anders Carlsson <acarlsson@apple.com>
andersca [Mon, 17 Jul 2006 22:29:47 +0000 (22:29 +0000)]
2006-07-17  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        Add Apache 2 config file.

        * http/conf/apache2-httpd.conf: Added.

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

13 years ago Back out the fix for 5564, since it turns out font:x-small; is a pretty
hyatt [Mon, 17 Jul 2006 22:18:27 +0000 (22:18 +0000)]
    Back out the fix for 5564, since it turns out font:x-small; is a pretty
        prominent IE-specific CSS hack.  Because Web sites rely on IE's incorrect
        font parsing as a means of also correcting IE's incorrect font size rules.

        This fixes Yahoo.com.

        Reviewed by darin

        * css/cssparser.cpp:
        (WebCore::CSSParser::parseFont):

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

13 years ago Reviewed by Tim Omernick.
sullivan [Mon, 17 Jul 2006 22:05:21 +0000 (22:05 +0000)]
    Reviewed by Tim Omernick.

        - fixed <rdar://problem/4604366> Orange Find highlight displays text in wrong size on PDF pages
        if they're not at "actual size"

        To match WebHTMLView, I made the methods that return attributed strings take the view's scale
        factor into account.

        * WebView/WebPDFView.m:
        (-[WebPDFView _scaledAttributedString:]):
        new helper method, takes an attributed string and returns one that's scaled by the view's
        current scale factor
        (-[WebPDFView attributedString]):
        pass result through _scaledAttributedString:
        (-[WebPDFView selectedAttributedString]):
        ditto

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

13 years agoLayoutTests:
justing [Mon, 17 Jul 2006 21:54:32 +0000 (21:54 +0000)]
LayoutTests:

        Reviewed by levi

        <rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence

        * editing/selection/replace-selection-1-expected.checksum: Added.
        * editing/selection/replace-selection-1-expected.png: Added.
        * editing/selection/replace-selection-1-expected.txt: Added.
        * editing/selection/replace-selection-1.html: Added.

WebCore:

        Reviewed by levi

        <rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence

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

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

13 years agoLayoutTests:
justing [Mon, 17 Jul 2006 19:38:48 +0000 (19:38 +0000)]
LayoutTests:

        Reviewed by levi

        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
        * editing/selection/subframe-with-selection-expected.txt:

WebKit:

        Reviewed by levi

        Rolled the first fix for:
        <http://bugzilla.opendarwin.org/show_bug.cgi?id=9642>
        GMail Editor: Operations that use drop down menus blow away the selection
        back in and removed the call to _clearSelectionInOtherFrames from
        -[WebHTMLView becomeFirstResponder] to fix the bug.

        * WebView/WebHTMLView.m:
        (-[NSArray maintainsInactiveSelection]):
        (-[NSArray becomeFirstResponder]):
        * WebView/WebView.m:
        (-[WebView maintainsInactiveSelection]):

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

13 years ago * API/JSBase.h: Fix comment formatting where things used to be lined up but
darin [Mon, 17 Jul 2006 15:19:46 +0000 (15:19 +0000)]
    * API/JSBase.h: Fix comment formatting where things used to be lined up but
        are now ragged. Got rid of spaces that attempted to line things up.
        * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments.

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

13 years agoLayoutTests:
mjs [Mon, 17 Jul 2006 11:50:02 +0000 (11:50 +0000)]
LayoutTests:

        Reviewed by Beth.

        <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard

        * fast/events/programmatic-check-no-change-event-expected.txt: Added.
        * fast/events/programmatic-check-no-change-event.html: Added.

WebCore:

        Reviewed by Beth.

        <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::setChecked):
        (WebCore::HTMLInputElement::preDispatchEventHandler):
        * html/HTMLInputElement.h:

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

13 years ago Reviewed by Maciej.
ggaren [Mon, 17 Jul 2006 10:49:28 +0000 (10:49 +0000)]
    Reviewed by Maciej.

        - Removed the exception parameter from the initialize callback and, by extension,
        JSObjectMake. We have never had a need for exceptions when iniitializing,
        so the parameter seemed likely to "get in the way."

        Also, an exception in JavaScript is thrown in response to input --
        "invalid URL", "index not a number", etc., so it's the job of the
        constructor function, not the initialize method, to throw.

        If initialize *really* wants to throw, it can communicate the throw to
        the constructor through the constructed object's private data (e.g., set
        it to NULL, signaling to the consntructor that initialization failed.)

        - Added JSObjectMakeWithData, which enables a constructor to set private
        data on an object *before* it has been initialized. That way, the initialize
        methods can properly operate on the data.

        * API/JSNode.c: Moved ref into the initialize method, for better encapsulation,
        now that it's possible.
        * API/JSNodeList.c: ditto
        * API/minidom.c:
        (main): Do more aggressive garbage collection to test ref/deref and
        initialize/finalize.
        * API/minidom.js: store childNodes in a temporary so it doesn't get re-created
        like a thousand times. This makes debugging ref/deref easier

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

13 years ago Reviewed by Maciej.
ggaren [Mon, 17 Jul 2006 09:06:57 +0000 (09:06 +0000)]
    Reviewed by Maciej.

        - Changed the initialize callback to run from least derived class (parent
        class) to most derived class. This enables C++ style initialization,
        and derived class overriding of member data.

        - Added excpetion propopgation to JSObjectMake, to support initialize
        exceptions, and generally round out our policy of making function
        signatures as long as possible.

        * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're
        in C++ land now.

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

13 years ago Reviewed by Maciej.
ggaren [Mon, 17 Jul 2006 08:20:28 +0000 (08:20 +0000)]
    Reviewed by Maciej.

        - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback,
        to match JSObjectMakeFunctionWithCallback.

        - Added prototype parameter, so the generated constructor
        automatically works with hasInstance / instanceof

        - Moved hasInstance implementation from InternalFunctionImp to JSObject
        so that subclasses can inherit it without inheriting function-related baggage.
        More refactoring here would be good, but this seems like a good short-term
        solution.

        (KJS::JSCallbackFunction::implementsHasInstance): override and return false,
        because callback functions aren't constructors.

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

13 years ago Reviewed by Geoff.
mjs [Mon, 17 Jul 2006 08:14:39 +0000 (08:14 +0000)]
    Reviewed by Geoff.

        - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
        except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.

        Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
        but usually uninteresting parameter.

        * API/JSBase.cpp:
        (JSEvaluateScript):
        (JSCheckScriptSyntax):
        (JSGarbageCollect):
        * API/JSBase.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::JSCallbackObject):
        (KJS::JSCallbackObject::init):
        (KJS::JSCallbackObject::getOwnPropertySlot):
        (KJS::JSCallbackObject::put):
        (KJS::JSCallbackObject::deleteProperty):
        (KJS::JSCallbackObject::toNumber):
        (KJS::JSCallbackObject::toString):
        * API/JSContextRef.cpp:
        (JSGlobalContextCreate):
        (JSGlobalContextRetain):
        (JSGlobalContextRelease):
        (JSContextGetGlobalObject):
        * API/JSContextRef.h:
        * API/JSNode.c:
        (JSNodePrototype_appendChild):
        (JSNodePrototype_removeChild):
        (JSNodePrototype_replaceChild):
        (JSNode_getNodeType):
        (JSNode_getFirstChild):
        (JSNode_prototype):
        * API/JSNodeList.c:
        (JSNodeListPrototype_item):
        (JSNodeList_length):
        (JSNodeList_getProperty):
        (JSNodeList_prototype):
        * API/JSObjectRef.cpp:
        (JSObjectMake):
        (JSObjectMakeFunctionWithCallback):
        (JSObjectMakeConstructor):
        (JSObjectMakeFunction):
        (JSObjectGetPrototype):
        (JSObjectSetPrototype):
        (JSObjectHasProperty):
        (JSObjectGetProperty):
        (JSObjectSetProperty):
        (JSObjectGetPropertyAtIndex):
        (JSObjectSetPropertyAtIndex):
        (JSObjectDeleteProperty):
        (JSObjectIsFunction):
        (JSObjectCallAsFunction):
        (JSObjectIsConstructor):
        (JSObjectCallAsConstructor):
        (JSObjectCopyPropertyNames):
        * API/JSObjectRef.h:
        * API/JSStringRef.cpp:
        * API/JSValueRef.cpp:
        (JSValueGetType):
        (JSValueIsUndefined):
        (JSValueIsNull):
        (JSValueIsBoolean):
        (JSValueIsNumber):
        (JSValueIsString):
        (JSValueIsObject):
        (JSValueIsObjectOfClass):
        (JSValueIsEqual):
        (JSValueIsStrictEqual):
        (JSValueIsInstanceOfConstructor):
        (JSValueMakeUndefined):
        (JSValueMakeNull):
        (JSValueMakeBoolean):
        (JSValueMakeNumber):
        (JSValueMakeString):
        (JSValueToBoolean):
        (JSValueToNumber):
        (JSValueToStringCopy):
        (JSValueToObject):
        (JSValueProtect):
        (JSValueUnprotect):
        * API/JSValueRef.h:
        * API/minidom.c:
        (print):
        * API/testapi.c:
        (MyObject_getProperty):
        (MyObject_deleteProperty):
        (MyObject_callAsFunction):
        (MyObject_callAsConstructor):
        (MyObject_convertToType):
        (print_callAsFunction):
        (main):

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

13 years ago Approved by Maciej, RS by Beth.
ggaren [Mon, 17 Jul 2006 04:41:01 +0000 (04:41 +0000)]
    Approved by Maciej, RS by Beth.

        JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
        JSObjectMakeFunctionWithBody -> JSObjectMakeFunction

        because the latter is more common, and more fundamental, than the former.

        * API/APICast.h:
        (toJS):
        * API/JSBase.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::getOwnPropertySlot):
        (KJS::JSCallbackObject::put):
        (KJS::JSCallbackObject::deleteProperty):
        (KJS::JSCallbackObject::getPropertyNames):
        (KJS::JSCallbackObject::staticValueGetter):
        (KJS::JSCallbackObject::staticFunctionGetter):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass):
        (OpaqueJSClass::~OpaqueJSClass):
        * API/JSClassRef.h:
        * API/JSObjectRef.cpp:
        (JSClassCreate):
        (JSObjectMakeFunctionWithCallback):
        (JSObjectMakeFunction):
        (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
        (JSObjectCopyPropertyNames):
        * API/JSObjectRef.h:
        * API/minidom.c:
        (main):
        * API/testapi.c:
        (main):
        * ChangeLog:
        * JavaScriptCore.exp:

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

13 years agoLayoutTests:
ddkilzer [Mon, 17 Jul 2006 04:21:09 +0000 (04:21 +0000)]
LayoutTests:

        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
          REGRESSION: document.dir should return empty string in <head>

        * fast/dom/document-dir-property-expected.txt: Added.
        * fast/dom/document-dir-property.html: Added.

WebCore:

        Reviewed by Darin.

        - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
          REGRESSION: document.dir should return empty string in <head>

        Test: fast/dom/document-dir-property.html

        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
        undefined value for an unset document.dir property.

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

13 years agoLayoutTests:
ddkilzer [Mon, 17 Jul 2006 04:15:53 +0000 (04:15 +0000)]
LayoutTests:

        Reviewed by Darin.

        * fast/dynamic/move-node-with-selection-expected.checksum:
        Removed "No newline at end of file" that snuck in as part of the "apply patch" process.

WebCore:

        Reviewed by Darin.

        * dom/NodeFilter.idl:
        Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
        * manual-tests/input-empty-on-focus.html:
        Removed "Property changes" that snuck in as part of the "apply patch" process.

WebKitTools:

        Reviewed by Darin.

        * BuildSlaveSupport/build.webkit.org-config/buildbot.css:
        Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
        * GdkLauncher/mk:
        Removed "Property changes" that snuck in as part of the "apply patch" process.

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

13 years agoWebKitTools:
ddkilzer [Mon, 17 Jul 2006 03:59:42 +0000 (03:59 +0000)]
WebKitTools:

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9875
          Teach svn-apply and svn-unapply to use patch(1) for additions and deletions

        * Scripts/svn-apply:
        (addDirectoriesIfNeeded): Don't try to add a directory that's already in svn.
        (checksum): Added.
        (patch): Use patch(1) for non-binary additions and deletions.
        * Scripts/svn-unapply:
        (checksum): Added.
        (patch): Use patch(1) for reverting non-binary additions and deletions.
        (revertDirectories): Don't try to revert a directory that hasn't changed in svn.

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

13 years ago - try to fix Windows build
darin [Mon, 17 Jul 2006 03:59:27 +0000 (03:59 +0000)]
    - try to fix Windows build

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Added some recently added files, removed some recently removed.

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

13 years ago - fixed a couple of files I checked in wrong
darin [Mon, 17 Jul 2006 02:51:26 +0000 (02:51 +0000)]
    - fixed a couple of files I checked in wrong

        * fast/html/body-offset-properties-expected.txt: Removed property cruft.
        * fast/html/body-offset-properties.html: Ditto.

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

13 years ago Reviewed by Maciej.
ggaren [Mon, 17 Jul 2006 02:00:40 +0000 (02:00 +0000)]
    Reviewed by Maciej.

        - Change getProperty* to return undefined, rather than NULL, for missing
        properties, since that's what the spec says. Also added exception out
        parameters to the *Index functions, because they can call through to the
        regular functions, which can throw for custom objects.

        * API/JSObjectRef.cpp:
        (JSObjectGetProperty):
        (JSObjectGetPropertyAtIndex):
        (JSObjectSetPropertyAtIndex):
        * API/JSObjectRef.h:
        * API/testapi.c:
        (main):

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

13 years ago Reviewed by Maciej.
ggaren [Mon, 17 Jul 2006 01:48:27 +0000 (01:48 +0000)]
    Reviewed by Maciej.

        - Properly document and handle NULL callbacks for static properties. We
        throw an exception in any case other than a ReadOnly property with a NULL
        setProperty callback, because a NULL callback almost certainly indicates
        a programming error. Also throw an exception if hasProperty returns true
        for a property that getProperty can't get.

        - If a static setProperty callback returns 'false', to indicate that the
        property was not set, we no longer forward the set request up the class
        chain, because that's almost certainly not what the programmer expected.

        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::getOwnPropertySlot):
        (KJS::JSCallbackObject::put):
        (KJS::JSCallbackObject::staticValueGetter):
        (KJS::JSCallbackObject::staticFunctionGetter):
        (KJS::JSCallbackObject::callbackGetter):
        * API/JSObjectRef.h:
        * API/minidom.js:
        * API/testapi.c:
        (MyObject_hasProperty):
        * API/testapi.js:

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

13 years ago - fixed typo in expected results
mjs [Mon, 17 Jul 2006 01:47:13 +0000 (01:47 +0000)]
    - fixed typo in expected results

        * fast/js/for-in-avoid-duplicates-expected.txt:

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

13 years agoLayoutTests:
darin [Mon, 17 Jul 2006 00:37:55 +0000 (00:37 +0000)]
LayoutTests:

        Reviewed by John Sullivan (new test, not the changes to existing ones).

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
          <rdar://problem/4590613>
          REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns

        * fast/html/body-offset-properties-expected.txt: Added.
        * fast/html/body-offset-properties.html: Added.

        * editing/execCommand/findString-2.html: Update to not depend on the buggy body.offseLeft/Top.
        Instead hardcode the default body margin of 8.
        * editing/pasteboard/drop-text-without-selection.html: Ditto.
        * editing/selection/click-before-and-after-table.html: Ditto.
        * editing/selection/mixed-editability-1.html: Ditto.
        * fast/table/click-near-anonymous-table.html: Ditto.

        * editing/selection/drag-to-contenteditable-iframe.html: Remove unnecessary use of body.offsetLeft/Top
        that are always 0.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
          <rdar://problem/4590613>
          REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns

        The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
        I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
        Presumably some other bug that we fixed had been compensating.

        Test: fast/html/body-offset-properties.html

        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
        (WebCore::RenderObject::offsetTop): Ditto.
        (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).

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

13 years ago Reviewed by Maciej.
bdakin [Mon, 17 Jul 2006 00:25:56 +0000 (00:25 +0000)]
    Reviewed by Maciej.

        Fix for <rdar://problem/4616595> REGRESSION: Problems with world
        clock widget clock hand motion on 9A211 + 4604574

        The second hand on the widget was jiggling because the rotation was
        messing up the use of the affine transformation matrix while
        rounding to pixel boundaries in device space. We are mainly
        concerned with rounding to pixel boundaries with the scale in mind,
        so this patch extracts the scale to device space from the matrix,
        and rounds to pixel boundaries using only the scale. This doesn't
        seem like it is a perfect solution, but it definitely solves the
        immediate problem. We will probably need to re-address what should
        happen to avoid pixel cracks with rotations at non-integral scale
        factors.

        * platform/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::roundToDevicePixels):

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

13 years ago Reviewed by Maciej.
ggaren [Sun, 16 Jul 2006 22:17:04 +0000 (22:17 +0000)]
    Reviewed by Maciej.

        - Added names to functions.

        - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
        The private data idiom is that a JS object stores its native implementation
        as private data. For functions and constructors, the native implementation is nothing
        more than the callback they already store, so supporting private data, too,
        confuses the idiom. If you *really* want, you can still create a custom
        function with private data.

        * API/JSCallbackConstructor.cpp:
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::JSCallbackFunction):
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::staticFunctionGetter):
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunction):
        (JSObjectMakeFunctionWithBody):
        (JSObjectGetPrivate):
        (JSObjectSetPrivate):
        * API/JSObjectRef.h:
        * API/minidom.c:
        (main):
        * API/testapi.c:
        (main):

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

13 years agoJavaScriptCore:
mjs [Sun, 16 Jul 2006 21:06:28 +0000 (21:06 +0000)]
JavaScriptCore:

        Reviewed by Darin.

        - switch property lists to be vector+set of Identifiers instead of list of References

        This has the following benefits:

        - no duplicates in property lists
        - simplifies API calls
        - probably more efficient, since linked list is gone
        - entirely removed Reference, ReferenceList and ProtectedReference types from the API

        * kjs/PropertyNameArray.cpp: Added.
        (KJS::PropertyNameArray::add): Check set, if not already there, add to
        vector.
        * kjs/PropertyNameArray.h: Added.
        (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
        a set and a vector to make a unique but ordered list of identifiers.
        (KJS::PropertyNameArray::begin): ditto
        (KJS::PropertyNameArray::end): ditto
        (KJS::PropertyNameArray::size): ditto
        (KJS::PropertyNameArray::operator[]): ditto
        * kjs/array_instance.h:
        * kjs/array_object.cpp:
        (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
        for PropertyNameArray
        (ArrayInstance::setLength): updated for PropertyNameArray
        (ArrayInstance::pushUndefinedObjectsToEnd): ditto
        * kjs/nodes.cpp:
        (ForInNode::execute): updated for PropertyNameArray
        * kjs/nodes.h:
        * kjs/object.cpp:
        (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
        for PropertyNameArray
        * kjs/object.h:
        * kjs/property_map.cpp:
        (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
        (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
        * kjs/property_map.h:
        * kjs/protected_reference.h: Removed.
        * kjs/reference.cpp: Removed.
        * kjs/reference.h: Removed.
        * kjs/reference_list.cpp: Removed.
        * kjs/reference_list.h: Removed.
        * kjs/scope_chain.cpp:
        (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
        * kjs/string_object.cpp:
        (StringInstance::getPropertyNames): Updated for new approach.
        * kjs/string_object.h:
        * kjs/ustring.h:
        * API/APICast.h:
        (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
        (toRef): ditto
        * API/JSBase.h:
        * API/JSCallbackObject.cpp:
        (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
        * API/JSCallbackObject.h:
        * API/JSObjectRef.cpp:
        (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
        JSPropertyNameArrayRef.
        (JSObjectCopyPropertyNames): New API call - renamed / refactored from
        JSObjectCreatePropertyList
        (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
        (JSPropertyNameArrayRelease): new release call for - " -.
        (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
        can now get the count and items in any order.
        (JSPropertyNameArrayGetNameAtIndex): See above.
        (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque
        accumulator object.
        * API/JSObjectRef.h: Prototyped new functions, removed old ones
        * JavaScriptCore.exp: Updated exported symbols.
        * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
        * API/testapi.c:
        (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
        (main): Updated for new API.

JavaScriptGlue:

        Reviewed by Darin.

        - switch property lists to be vector+set of Identifiers instead of list of References

        * JSUtils.cpp:
        (KJSValueToCFTypeInternal): updated for JSC SPI changes
        * JSValueWrapper.cpp:
        (JSValueWrapper::JSObjectCopyPropertyNames): ditto
        * UserObjectImp.cpp:
        (UserObjectImp::getPropertyNames): ditto
        * UserObjectImp.h:

LayoutTests:

        Reviewed by Darin.

        - new test case and updated results for property list changes

        * fast/js/for-in-avoid-duplicates-expected.txt: Added.
        * fast/js/for-in-avoid-duplicates.html: Added.
        * fast/js/kde/Array-expected.txt:
        * fast/js/resources/for-in-avoid-duplicates.js: Added.

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

13 years agoJavaScriptGlue has no need to look for frameworks in WebKit's umbrella framework...
thatcher [Sun, 16 Jul 2006 05:45:36 +0000 (05:45 +0000)]
JavaScriptGlue has no need to look for frameworks in WebKit's umbrella framework path anymore.

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

13 years agoWebCore has no need to look for frameworks in WebKit's umbrella framework path anymore.
thatcher [Sun, 16 Jul 2006 05:22:12 +0000 (05:22 +0000)]
WebCore has no need to look for frameworks in WebKit's umbrella framework path anymore.

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

13 years ago - oops, missed a few more arrays that had to be const
darin [Sun, 16 Jul 2006 02:26:40 +0000 (02:26 +0000)]
    - oops, missed a few more arrays that had to be const

        * API/JSNode.c:
        (JSNodePrototype_appendChild): Added const.
        (JSNodePrototype_removeChild): Ditto.
        (JSNodePrototype_replaceChild): Ditto.
        (JSNode_construct): Ditto.
        * API/JSNodeList.c:
        (JSNodeListPrototype_item): Ditto.
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunctionWithBody): Ditto.
        (JSObjectCallAsFunction): Ditto.
        (JSObjectCallAsConstructor): Ditto.
        * API/minidom.c:
        (print): Ditto.
        * API/testapi.c:
        (MyObject_callAsFunction): Ditto.
        (MyObject_callAsConstructor): Ditto.
        (print_callAsFunction): Ditto.
        (myConstructor_callAsConstructor): Ditto.

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

13 years ago Reviewed by Maciej.
darin [Sun, 16 Jul 2006 02:18:37 +0000 (02:18 +0000)]
    Reviewed by Maciej.

        * API/JSNode.h: Made an array parameter const.
        * API/JSObjectRef.h: Made array parameters const. Fixed a comment.

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

13 years ago Reviewed by Maciej.
ggaren [Sun, 16 Jul 2006 01:40:07 +0000 (01:40 +0000)]
    Reviewed by Maciej.

        - JSObjectMakeFunctionWithBody includes a function name and named parameters now.

        * API/JSObjectRef.cpp:
        (JSObjectMakeFunctionWithBody):
        * API/JSObjectRef.h:
        * API/testapi.c:
        (assertEqualsAsUTF8String): More informative failure reporting.
        (main): Test more function cases.

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

13 years ago Reviewed by Maciej.
ggaren [Sun, 16 Jul 2006 01:28:25 +0000 (01:28 +0000)]
    Reviewed by Maciej.

        - Moved the arguments passed to JSClassCreate into a single structure,
        called JSClassDefinition. This will enable easier structure
        migration/versioning in the future, if necessary.

        - Added support for class names.

        - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.

        - JSClass is becoming a fairly complex struct, so I migrated all of its
        implementation other than reference counting to the sruct.

        - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're
        declared in JSObjectRef.h

        - Also added some more informative explanation to the class structure doc.

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

13 years ago - fix mistake from fix for 8952 that was breaking layout tests
darin [Sat, 15 Jul 2006 21:03:57 +0000 (21:03 +0000)]
    - fix mistake from fix for 8952 that was breaking layout tests

        * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
        Justin was right! I changed the behavior of the function by accident. Changed it
        back so that it doesn't blow away the selection on the DOM side in the case where
        it didn't before.

        I will write 100 times on the blackboard: "When Justin says something about editing,
        assume he is right."

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

13 years ago - try to fix Windows build
darin [Sat, 15 Jul 2006 20:00:37 +0000 (20:00 +0000)]
    - try to fix Windows build

        * WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.

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

13 years agoLayoutTests:
darin [Sat, 15 Jul 2006 19:41:49 +0000 (19:41 +0000)]
LayoutTests:

        Reviewed by John Sullivan.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
          <rdar://problem/4575185>
          REGRESSION: crash on drag of highlighted Google custom home page modules

        * fast/dynamic/move-node-with-selection-expected.checksum: Added.
        * fast/dynamic/move-node-with-selection-expected.png: Added.
        * fast/dynamic/move-node-with-selection-expected.txt: Added.
        * fast/dynamic/move-node-with-selection.html: Added.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
          <rdar://problem/4575185>
          REGRESSION: crash on drag of highlighted Google custom home page modules

        Test: fast/dynamic/move-node-with-selection.html

        * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
        Call updateRendering before calling clearSelection(), since it's important to do any
        work beforehand, and there are calls inside clearSelection that will indirectly do an
        updateRendering. Also change code to make fewer assumptions about object lifetime.

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

13 years agoLayoutTests:
darin [Sat, 15 Jul 2006 19:27:34 +0000 (19:27 +0000)]
LayoutTests:

        Reviewed by John Sullivan.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
          <rdar://problem/4631844>
          REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering

        * fast/lists/numeric-markers-outside-list-expected.checksum: Added.
        * fast/lists/numeric-markers-outside-list-expected.png: Added.
        * fast/lists/numeric-markers-outside-list-expected.txt: Added.
        * fast/lists/numeric-markers-outside-list.html: Added.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
          <rdar://problem/4631844>
          REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering

        Test: fast/lists/numeric-markers-outside-list.html

        * rendering/RenderListItem.cpp: (WebCore::previousListItem):
        Look for list items, even when we're outside any list.

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

13 years ago Reviewed by John.
adele [Sat, 15 Jul 2006 17:22:50 +0000 (17:22 +0000)]
    Reviewed by John.

        - Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character

        This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
        interpreted by the form delegate as an actual delete.  This fix doesn't notify the form delegate if the deletion is
        part of an editing command to replace the selected text.

        * editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is
          part of a composite command to replace the text being deleted.
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
        (WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
        * editing/CompositeEditCommand.h:
        * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection):
          Added replace argument to construct DeleteSelectionCommand.

        * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
        * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.

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

13 years agoLayoutTests:
ggaren [Sat, 15 Jul 2006 16:31:30 +0000 (16:31 +0000)]
LayoutTests:

        Reviewed by Maciej.

        Layout test for crash when setting the dir property on a document with no body.

        * fast/dom/dir-no-body-expected.txt: Added.
        * fast/dom/dir-no-body.html: Added.

WebCore:

        Reviewed by Maciej, tweaked to match Darin's patch.

        - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on
        FCKeditor demo (9911)

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_html.cpp:
        (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
        forwarding the put request to it. I confirmed that no other parts of the
        file use 'body' or 'bodyElement' without checking for null.

        Also, use 'body' rather than 'bodyElement' because dir can bet set on
        any element, not just HTMLBodyElement.

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

13 years agoJavaScriptCore:
darin [Sat, 15 Jul 2006 15:30:03 +0000 (15:30 +0000)]
JavaScriptCore:

        Reviewed by Geoff.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
          <rdar://problem/4613467>
          REGRESSION: RegEx seems broken for hex escaped non breaking space

        Test: fast/js/regexp-extended-characters-more.html

        * pcre/pcre_exec.c:
        (match): Got rid of utf16Length local variable to guarantee there's no
        extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16
        code that were using the length variable, which is the UTF-8 length of
        a character in the pattern, to move in the UTF-16 subject string. Instead
        they hardcode lengths of 1 and 2 since the code already handles BMP
        characters and surrogate pairs separately. Also fixed some DPRINTF so
        I could compile with DEBUG on.
        (pcre_exec): Changed a place that was checking for multibyte characters
        in the subject string to use ISMIDCHAR. Instead it was using hardcoded
        logic that was right for UTF-8 but wrong for UTF-16.

        * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile
        with DEBUG on.

LayoutTests:

        Reviewed by Geoff.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
          <rdar://problem/4613467>
          REGRESSION: RegEx seems broken for hex escaped non breaking space

        * fast/js/regexp-extended-characters-more-expected.txt: Added.
        * fast/js/regexp-extended-characters-more.html: Added.
        * fast/js/resources/regexp-extended-characters-more.js: Added.

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

13 years agoLayoutTests:
darin [Sat, 15 Jul 2006 15:21:28 +0000 (15:21 +0000)]
LayoutTests:

        Reviewed by Adele.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
          <rdar://problem/4575417>
          REGRESSION: Pressing Enter/Return in a text input removes the selected text
          and http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
          <rdar://problem/4614228>
          REGRESSION: crash dispatching JavaScript-created keyboard event to input element

        * fast/forms/input-text-enter-expected.txt: Added.
        * fast/forms/input-text-enter.html: Added.

WebCore:

        Reviewed by Adele.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
          <rdar://problem/4575417>
          REGRESSION: Pressing Enter/Return in a text input removes the selected text

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
          <rdar://problem/4614228>
          REGRESSION: crash dispatching JavaScript-created keyboard event to input element

        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
        Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
        enough for the future.

        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
        Consume Enter key keypress events even if the element is not in a form.

        * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
        characters that turn into "Enter". Actual keyboard events always are \r or \003 on
        the Macintosh, but in layout tests we can use \n, and everything other than the
        code path here works, so worth fixing.

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

13 years agoLayoutTests:
darin [Sat, 15 Jul 2006 15:14:15 +0000 (15:14 +0000)]
LayoutTests:

        Reviewed by John Sullivan.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
          <rdar://problem/4631821>
          REGRESSION: NativePopups don't work correctly in some forum software

        * fast/forms/select-selected-expected.checksum: Added.
        * fast/forms/select-selected-expected.png: Added.
        * fast/forms/select-selected-expected.txt: Added.
        * fast/forms/select-selected.html: Added.

WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
          <rdar://problem/4631821>
          REGRESSION: NativePopups don't work correctly in some forum software

        Test: fast/forms/select-selected.html

        * rendering/RenderMenuList.h:
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
        index to a list index before using it to index into the list.
        (WebCore::RenderMenuList::showPopup): Added code to map the selection option index
        to a list index before passing it to the menu renderer.
        (WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
        option index before calling setSelectedIndex (that function takes an option index).

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

13 years agoWebCore:
darin [Sat, 15 Jul 2006 15:09:19 +0000 (15:09 +0000)]
WebCore:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
          REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)

        * bindings/objc/DOM.mm:
        (-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
        (-[DOMNode removeEventListener:::]): Ditto.
        (-[DOMNode dispatchEvent:]): Ditto.

        * WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.

WebKit:

        Reviewed by John Sullivan.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
          REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)

        * WebView/WebHTMLView.m:
        (-[WebHTMLView _documentRange]): Moved into WebHTMLViewFileInternal category.
        (-[WebHTMLView selectionRect]): Moved into WebDocumentPrivateProtocols category.
        (-[WebHTMLView selectionView]): Ditto.
        (-[WebHTMLView selectionImageForcingWhiteText:]): Ditto.
        (-[WebHTMLView selectionImageRect]): Ditto.
        (-[WebHTMLView pasteboardTypesForSelection]): Ditto.
        (-[WebHTMLView selectAll]): Ditto.
        (-[WebHTMLView deselectAll]): Ditto.
        (-[WebHTMLView string]): Ditto.
        (-[WebHTMLView _attributeStringFromDOMRange:]): Ditto.
        (-[WebHTMLView attributedString]): Ditto.
        (-[WebHTMLView selectedString]): Ditto.
        (-[WebHTMLView selectedAttributedString]): Ditto.
        (-[WebHTMLView supportsTextEncoding]): Ditto.
        (-[WebHTMLView _canProcessDragWithDraggingInfo:]): Moved into WebDocumentInternalProtocols.
        (-[WebHTMLView _isMoveDrag]): Ditto.
        (-[WebHTMLView _isNSColorDrag:]): Ditto.
        (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Ditto.
        (-[WebHTMLView draggingCancelledWithDraggingInfo:]): Ditto.
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Ditto.
        (-[WebHTMLView elementAtPoint:]): Ditto.
        (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.

        * WebKit.xcodeproj/project.pbxproj: Let Xcode 2.3 do its thing.

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

13 years ago Reviewed by Anders.
mjs [Sat, 15 Jul 2006 09:36:24 +0000 (09:36 +0000)]
    Reviewed by Anders.

        <rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix

        * rendering/RenderTable.cpp:
        (WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
        just table sections!

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

13 years agoWebCore:
andersca [Sat, 15 Jul 2006 09:04:43 +0000 (09:04 +0000)]
WebCore:

2006-07-15  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
        <rdar://problem/4631561>
        REGRESSION: Repro crash from mangleme using iframe, only from server.

        * html/HTMLIFrameElement.cpp:
        (WebCore::HTMLIFrameElement::attach):
        Add null check for contentFrame() since content frames won't be created for invalid URLs.

LayoutTests:

2006-07-15  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
        <rdar://problem/4631561>
        REGRESSION: Repro crash from mangleme using iframe, only from server.

        * http/tests/misc/iframe-invalid-source-crash-expected.txt: Added.
        * http/tests/misc/iframe-invalid-source-crash.html: Added.

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

13 years ago Reviewed by Darin.
ap [Sat, 15 Jul 2006 06:53:11 +0000 (06:53 +0000)]
    Reviewed by Darin.

        Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
        REGRESSION: KOI8-U encoding no longer supported.

        Tests:
        * http/tests/misc/BOM-override.pl
        * http/tests/misc/BOM-override-script.html
        * fast/encoding/charset-koi8-u.html
        * fast/encoding/charset-x-nextstep.html

        Restored a TEC code path for encodings that are not supported by ICU (but which currently
        passes all layout tests even by itself with ICU disabled). A lot of refactoring is
        still needed - most importantly, round-tripping encoding names via CFStringEncoding
        makes little sense now.

        * WebCore.exp:
        * bridge/mac/WebCoreTextDecoder.h: Removed.
        * bridge/mac/WebCoreTextDecoder.mm: Removed.
        WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.

        * loader/Decoder.cpp:
        (Decoder::Decoder):
        (Decoder::setEncodingName):
        (Decoder::decode):
        Use StreamingTextDecoder::create().

        * platform/StreamingTextDecoder.cpp:
        (WebCore::StreamingTextDecoder::create):
        (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
        * platform/StreamingTextDecoder.h:
        StreamingTextDecoder is just an abstract interface to implementations now.

        * platform/StreamingTextDecoderICU.cpp: Added.
        (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
        (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
        (WebCore::StreamingTextDecoderICU::releaseICUConverter):
        (WebCore::StreamingTextDecoderICU::textEncodingSupported):
        (WebCore::StreamingTextDecoderICU::convertUTF16):
        (WebCore::StreamingTextDecoderICU::convertIfASCII):
        (WebCore::StreamingTextDecoderICU::createICUConverter):
        (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
        (WebCore::StreamingTextDecoderICU::convertUsingICU):
        (WebCore::StreamingTextDecoderICU::convert):
        (WebCore::StreamingTextDecoderICU::toUnicode):
        (WebCore::StreamingTextDecoderICU::fromUnicode):
        * platform/StreamingTextDecoderICU.h: Added.
        Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
        supported by the decoder; minor cleanup.

        * platform/TextEncoding.cpp:
        (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
        (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
        (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.

        * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().

        * platform/mac/StreamingTextDecoderMac.cpp: Added.
        (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
        (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
        (WebCore::StreamingTextDecoderMac::releaseTECConverter):
        (WebCore::StreamingTextDecoderMac::textEncodingSupported):
        (WebCore::StreamingTextDecoderMac::convertUTF16):
        (WebCore::StreamingTextDecoderMac::convertIfASCII):
        (WebCore::StreamingTextDecoderMac::createTECConverter):
        (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
        (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
        (WebCore::StreamingTextDecoderMac::convertUsingTEC):
        (WebCore::StreamingTextDecoderMac::convert):
        (WebCore::StreamingTextDecoderMac::toUnicode):
        (WebCore::StreamingTextDecoderMac::fromUnicode):
        * platform/mac/StreamingTextDecoderMac.h: Added.
        (WebCore::StreamingTextDecoderMac::convert):
        This is a TEC+CFString code path for decoding, basically restored from a year-old revision.

        * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.

        * WebCore.xcodeproj/project.pbxproj:

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

13 years agoBuild fix for case-sensitive file systems.
thatcher [Sat, 15 Jul 2006 06:32:53 +0000 (06:32 +0000)]
Build fix for case-sensitive file systems.

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

13 years ago RS by Maciej.
ggaren [Sat, 15 Jul 2006 04:16:30 +0000 (04:16 +0000)]
    RS by Maciej.

        Global replace in the API of argc/argv with argumentCount/arguments.

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

13 years ago Reviewed by Maciej.
ggaren [Sat, 15 Jul 2006 04:10:31 +0000 (04:10 +0000)]
    Reviewed by Maciej.

        - Finalized exception handling in the API.

        setProperty can throw because it throws for built-in arrays. getProperty
        and deleteProperty can throw because setProperty can throw and we want
        to be consistent, and also because they seem like "actions." callAsFunction,
        callAsConstructor, and hasInstance can throw, because they caan throw for
        all built-ins.

        toBoolean can't throw because it's defined that way in the spec.

        - Documented that toBoolean and toObject can't be overridden by custom
        objects because they're defined that way in the spec.

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

13 years agoLayoutTests:
thatcher [Sat, 15 Jul 2006 02:25:38 +0000 (02:25 +0000)]
LayoutTests:

        Rolling out this fix from r15358 since it isn't resolved.

    2006-07-11  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by levi & thatcher

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=9642>
        GMail Editor: Operations that use drop down menus blow away the selection

        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
        * editing/selection/subframe-with-selection-expected.checksum: Added.
        * editing/selection/subframe-with-selection-expected.png: Added.
        * editing/selection/subframe-with-selection-expected.txt: Added.
        * editing/selection/subframe-with-selection.html: Added.

WebKit:

        Rolling out this fix from r15358 since it isn't resolved.

    2006-07-11  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by levi & thatcher

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=9642>
        GMail Editor: Operations that use drop down menus blow away the selection

        * WebView/WebHTMLView.m:
        (-[NSArray maintainsInactiveSelection]): Maintain an inactive selection
        when resigning as first responder if the selection is editable
        or if the WebView tells us to.
        * WebView/WebView.m:
        (-[WebView maintainsInactiveSelection]): Just because a WebView is
        editable doesn't mean selections inside subframes will be.  Return
        NO by default.

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

13 years agoVersioning
thatcher [Sat, 15 Jul 2006 02:14:21 +0000 (02:14 +0000)]
Versioning

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

13 years ago <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore...
thatcher [Sat, 15 Jul 2006 00:53:47 +0000 (00:53 +0000)]
    <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure

        Build fix with the new GCC. Removes forward declarations of protocols.

        * Misc/WebSearchableTextView.h:
        * WebCoreSupport/WebSubresourceLoader.h:
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebDocumentInternal.h:
        * WebView/WebDocumentPrivate.h:
        * WebView/WebHTMLView.h:
        * WebView/WebPDFView.h:
        * WebView/WebScriptDebugDelegatePrivate.h:

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

13 years ago <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore...
thatcher [Sat, 15 Jul 2006 00:24:03 +0000 (00:24 +0000)]
    <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure

        Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
        DOMEventTarget protocol that works with GCC 5412.

        Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.

        Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
        we import <Cocoa/Cocoa.h> in the prefix header for ObjC.

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOMCore.h:
        * bindings/objc/DOMEvents.h:
        * bridge/mac/FormDataMac.h:
        * bridge/mac/WebCoreAXObject.h:
        * bridge/mac/WebCoreCache.h:
        * bridge/mac/WebCoreEncodings.h:
        * bridge/mac/WebCoreFrameBridge.h:
        * bridge/mac/WebCoreFrameNamespaces.h:
        * bridge/mac/WebCoreJavaScript.h:
        * bridge/mac/WebCorePageBridge.h:
        * bridge/mac/WebCorePageState.h:
        * bridge/mac/WebCoreResourceLoader.h:
        * bridge/mac/WebCoreScriptDebugger.h:
        * bridge/mac/WebCoreSettings.h:
        * bridge/mac/WebCoreStringTruncator.h:
        * bridge/mac/WebCoreStringTruncator.mm:
        * bridge/mac/WebCoreTextDecoder.h:
        * bridge/mac/WebDashboardRegion.h:
        * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
        * platform/mac/CookieJar.mm:
        * platform/mac/DeprecatedStringMac.mm:
        * platform/mac/FontDataMac.mm:
        * platform/mac/FoundationExtras.h:
        * platform/mac/TextBoundaries.mm:
        * platform/mac/WebCoreHistory.h:
        * platform/mac/WebCoreHistory.m:
        * platform/mac/WebCoreKeyGenerator.h:
        * platform/mac/WebCoreTextArea.h:
        * platform/mac/WebCoreTextField.h:
        * platform/mac/WebCoreTextRenderer.h:
        * platform/mac/WebCoreView.h:
        * platform/mac/WebCoreWidgetHolder.h:

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

13 years agoJavaScriptCore:
ggaren [Fri, 14 Jul 2006 22:39:58 +0000 (22:39 +0000)]
JavaScriptCore:

        Reviewed by Maciej.

        - Implemented ref-counting of JSContexts by splitting into two datatypes:
        JSGlobalContext, which you can create/retain/release, and JSContext, which
        you can't.

        Internally, you retain a JSGlobalContext/ExecState by retaining its
        interpreter, which, in the case of a global ExecState, owns it.

        - Also made ~Interpreter() protected to catch places where Interpreter
        is manually deleted. (Can't make it private because some crazy fool
        decided it would be a good idea to subclass Interpreter in other frameworks.
        I pity da fool.)

        * API/APICast.h:
        (toJS): Added cast for new JSGlobalContext
        * API/JSStringRef.h: Changed vague "you must" language to more specific
        (but, ultimately, equally vague) "behavior is undefined if you don't"
        language.
        (KJS::Interpreter::Interpreter): Factored more common initialization into
        init()
        * kjs/interpreter.h:
        (KJS::Interpreter::ref): new
        (KJS::Interpreter::deref): new
        (KJS::Interpreter::refCount): new
        * kjs/testkjs.cpp:
        (doIt): Ref-count the interpreter.

JavaScriptGlue:

        Reviewed by Maciej.

        - Updated JSInterpreter to work with Interpreter ref-counting in JavaScriptCore.

        (JSInterpreter::JSInterpreter::~JSInterpreter): Now protected to catch
        manual delete.

WebCore:

        Reviewed by Maciej.

        - Updated ScriptInterpreter to work with Interpreter ref-counting in
        JavaScriptCore.

        (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
        manual delete.

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

13 years ago2006-07-14 Anders Carlsson <acarlsson@apple.com>
andersca [Fri, 14 Jul 2006 20:54:09 +0000 (20:54 +0000)]
2006-07-14  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Adele and Justin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
        <rdar://problem/4613948>
        REGRESSION: Check Spelling does not work in textarea elements

        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::advanceToNextMisspelling):
        Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
        is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
        indices respectively.

        * dom/Range.cpp:
        (WebCore::Range::checkNodeBA):
        Allow range operations on shadow trees.

        * manual-tests/form-element-spelling.html: Added.

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

13 years ago Reviewed by Geoff.
mjs [Fri, 14 Jul 2006 20:53:38 +0000 (20:53 +0000)]
    Reviewed by Geoff.

        - removed bool return value from JSObjectSetProperty, since it is inefficient and
        also doesn't work quite right
        - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex

        * API/JSObjectRef.cpp:
        (JSObjectSetProperty): Removed return value and canPut stuff.
        (JSObjectGetPropertyAtIndex): Added.
        (JSObjectSetPropertyAtIndex): Added.
        * API/JSObjectRef.h: Prototyped and documented new functions.

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

13 years ago Reviewed by Hyatt.
bdakin [Fri, 14 Jul 2006 20:35:03 +0000 (20:35 +0000)]
    Reviewed by Hyatt.

        Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in
        WebCore::FrameView::updateOverflowStatus

        m_viewportRenderer is never initialized for framesets, and it
        shouldn't be. So we just need to nil-check for it in
        updateOverflowStatus() and return early.

        * page/FrameView.cpp:
        (WebCore::FrameView::updateOverflowStatus): Nil check.

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

13 years agoWebCore:
adele [Fri, 14 Jul 2006 19:09:50 +0000 (19:09 +0000)]
WebCore:

        RS by Darin.

        Backing out fix for <rdar://problem/4604703>
        REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field

        Darin had a better fix in WebKit for this.

        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):

WebKit:

        Reviewed by Adele.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9625
          <rdar://problem/4604703>
          REGRESSION: Focus not removed from password field after ctrl-click in text field

        * WebView/WebHTMLView.m: (-[NSArray menuForEvent:]): Set handlingMouseDownEvent to
        YES while calling sendContextMenuEvent: on the bridge.

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

13 years ago Reviewed by Darin.
adele [Fri, 14 Jul 2006 18:53:03 +0000 (18:53 +0000)]
    Reviewed by Darin.

        - Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs

        * page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
        * bridge/mac/FrameMac.h: ditto.
        * bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
        * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
        if the input manager says there's marked text.  I added this code for all text field paths.  For widgets, WebCoreTextField.mm
        has code to deal with this case.  But as we convert search, password, and isindex, they will need to do this check too.

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

13 years ago Reviewed by Beth.
ggaren [Fri, 14 Jul 2006 17:41:10 +0000 (17:41 +0000)]
    Reviewed by Beth.

        Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into
        JSBase.h/.cpp. They don't belong in the value-specific or context-specific
        files because they're not part of the value or context implementations.

        * API/JSBase.h:
        * API/JSContextRef.cpp:
        (JSContextGetGlobalObject):
        * API/JSContextRef.h:
        * API/JSValueRef.cpp:
        (JSValueUnprotect):
        * API/JSValueRef.h:
        * JavaScriptCore.xcodeproj/project.pbxproj:

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

13 years agoWebCore:
ddkilzer [Fri, 14 Jul 2006 13:18:28 +0000 (13:18 +0000)]
WebCore:

        Reviewed by Darin.  Patch by Mitz.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
          REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel  mode

        * rendering/RenderText.cpp:
        (WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
        position.

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

13 years agoLayoutTests:
ddkilzer [Fri, 14 Jul 2006 13:14:17 +0000 (13:14 +0000)]
LayoutTests:

        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
          REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div

        * editing/deleting/delete-at-start-or-end-expected.checksum: Added.
        * editing/deleting/delete-at-start-or-end-expected.png: Added.
        * editing/deleting/delete-at-start-or-end-expected.txt: Added.
        * editing/deleting/delete-at-start-or-end.html: Added.

WebCore:

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
          REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div

        Test: editing/deleting/delete-at-start-or-end.html

        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::deleteKeyPressed): Added null check.
        (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.

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

13 years agoLayoutTests:
ddkilzer [Fri, 14 Jul 2006 12:33:04 +0000 (12:33 +0000)]
LayoutTests:

        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9879
          REGRESSION: Repro crash when clicking to the side of an anonymous table
        - see also <rdar://problem/4628129> REGRESSION: Repro crash when clicking
          to the side of an anonymous table

        NOTE: Only the layout test part of this patch was landed since an alternate
        fix was committed in r15401:  <rdar://problem/4509393> selected DOM range
        starts with <object>, 0 offset but selection should include the <object>

        * fast/table/click-near-anonymous-table-expected.checksum: Added.
        * fast/table/click-near-anonymous-table-expected.png: Added.
        * fast/table/click-near-anonymous-table-expected.txt: Added.
        * fast/table/click-near-anonymous-table.html: Added.

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

13 years agoWebCore:
ddkilzer [Fri, 14 Jul 2006 12:05:38 +0000 (12:05 +0000)]
WebCore:

        Reviewed by Geoffrey.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
          Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()

        No test cases since there is no change in functionality.

        * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
        (WebCore::JSHTMLOptionsCollection::setLength):  Simplified logic by using the
        no-argument getNumber() method.

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