WebKit-https.git
12 years ago2007-04-17 Mitz Pettel <mitz@webkit.org>
bdash [Wed, 18 Apr 2007 04:58:54 +0000 (04:58 +0000)]
2007-04-17  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13369
          REGRESSION (r13366): Invisible table cell background is painted

        Test: fast/table/invisible-cell-background.html

        * rendering/RenderTableCell.cpp:
        (WebCore::RenderTableCell::paintBackgroundsBehindCell): Don't paint any
        background if the cell is not visible. This behavior matches WinIE and Opera.

2007-04-17  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - pixel test for http://bugs.webkit.org/show_bug.cgi?id=13369
          REGRESSION (r13366): Invisible table cell background is painted

        * fast/table/invisible-cell-background-expected.checksum: Added.
        * fast/table/invisible-cell-background-expected.png: Added.
        * fast/table/invisible-cell-background-expected.txt: Added.
        * fast/table/invisible-cell-background.html: Added.

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

12 years agoRolling out my previous checkin, as the compiler bug still exists on Leopard.
justing [Wed, 18 Apr 2007 03:50:25 +0000 (03:50 +0000)]
Rolling out my previous checkin, as the compiler bug still exists on Leopard.

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

12 years ago * Scripts/find-included-framework-headers: Search Obj-C and Obj-C++
aroben [Wed, 18 Apr 2007 03:22:32 +0000 (03:22 +0000)]
    * Scripts/find-included-framework-headers: Search Obj-C and Obj-C++
        files as well.

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

12 years ago Added a simple shell script to find all the headers from a specified
aroben [Wed, 18 Apr 2007 03:18:43 +0000 (03:18 +0000)]
    Added a simple shell script to find all the headers from a specified
        framework or frameworks that are included by files beneath the working
        directory.

        * Scripts/find-included-framework-headers: Added.

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

12 years agoWebCore:
justing [Wed, 18 Apr 2007 02:23:47 +0000 (02:23 +0000)]
WebCore:

        Reviewed by adam

        Removed workarounds for compiler bug 4213314.

        * platform/mac/CursorMac.mm:
        (WebCore::leakNamedCursor):
        * platform/mac/ScrollViewMac.mm:
        (WebCore::ScrollView::resizeContents):
        (WebCore::ScrollView::contentsToWindow):
        (WebCore::ScrollView::windowToContents):

WebKit:

        Reviewed by adam

        Removed workarounds for compiler bug 4213314.

        * Misc/WebNSAttributedStringExtras.mm:
        (+[NSAttributedString _web_attributedStringFromRange:]):
        * WebKit.xcodeproj/project.pbxproj:

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

12 years agoLayoutTests:
justing [Wed, 18 Apr 2007 01:20:44 +0000 (01:20 +0000)]
LayoutTests:

        Reviewed by harrison

        <rdar://problem/5119244>
        Crash when indenting a selected ToDo

        * editing/execCommand/5119244-expected.checksum: Added.
        * editing/execCommand/5119244-expected.png: Added.
        * editing/execCommand/5119244-expected.txt: Added.
        * editing/execCommand/5119244.html: Added.

WebCore:

        Reviewed by harrison

        <rdar://problem/5119244>
        Crash when indenting a selected ToDo

        indentRegion() was using the old (incorrect) editable root
        getter, which returned null for a valid, editable position,
        causing the crash.

        * editing/IndentOutdentCommand.cpp:
        (WebCore::IndentOutdentCommand::indentRegion):
        The editable root for a position is editableRootForPosition(p),
        not p.node()->rootEditableElement(), because of VisiblePositions
        before/after tables, replaced elements and others.

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

12 years agoLayoutTests:
justing [Wed, 18 Apr 2007 00:13:15 +0000 (00:13 +0000)]
LayoutTests:

        Reviewed by hyatt

        <rdar://problem/5138441>
        GoogleDocs: Indented text looks like text that's been Quoted

        Demonstrates the bug:
        * editing/execCommand/5138441-expected.checksum: Added.
        * editing/execCommand/5138441-expected.png: Added.
        * editing/execCommand/5138441-expected.txt: Added.
        * editing/execCommand/5138441.html: Added.

        Added inline style declarations for indent blockquotes
        to match those that the engine creates:
        * editing/execCommand/indent-selection.html:
        * editing/execCommand/outdent-selection.html:

WebCore:

        Reviewed by hyatt

        <rdar://problem/5138441>
        GoogleDocs: Indented text looks like text that's been Quoted

        GoogleDocs uses FormatBlock, blockquotes and a style rule
        for blockquotes to implement a "Quote Text" feature.  Styles
        intended only for those blockquotes were added to the
        blockquotes that we use for indenting.

        * css/html4.css: Removed the webkit-indent-blockquote class rule.
        * editing/IndentOutdentCommand.cpp:
        (WebCore::createIndentBlockquoteElement): Use custom margins
        and turn off border and padding to override author rules for
        blockquotes.

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

12 years ago Reviewed by Tim Hatcher
sullivan [Tue, 17 Apr 2007 23:00:07 +0000 (23:00 +0000)]
    Reviewed by Tim Hatcher

        - fixed <rdar://problem/5138492> Safari doesn't remember some changes to the PDF scale and display mode

        Some of the user interactions that could change the PDF scale and display mode were not going through
        the proxy mechanism in WebPDFView that updates preferences. Now we also listen to PDFKit notifications
        in order to catch the other cases.

        * WebView/WebPDFView.h:
        new _ignoreScaleAndDisplayModeNotifications and _updatePreferencesTimer ivars

        * WebView/WebPDFView.mm:
        (-[WebPDFView setPDFDocument:]):
        ignore scale and display mode notifications while we're setting up a fresh document
        (-[WebPDFView dealloc]):
        cancel the new timer (which releases it)
        (-[WebPDFView viewDidMoveToWindow]):
        listen for two PDFKit notifications
        (-[WebPDFView viewWillMoveToWindow:]):
        stop listening to the two PDFKit notifications
        (-[WebPDFView _applyPDFDefaults]):
        white space change
        (-[WebPDFView _cancelUpdatePreferencesTimer]):
        invalidate, release, and nil out the timer
        (-[WebPDFView _scaleOrDisplayModeChanged:]):
        update preferences soon, unless deliberately ignoring these notifications
        (-[WebPDFView _updatePreferencesNow]):
        cancel timer, then save data to preferences (code for saving the data was extracted from
        -[PDFPrefUpdatingProxy forwardInvocation:])
        (-[WebPDFView _updatePreferencesSoon]):
        use timer to consolidate multiple calls into one action; formerly we were setting preferences
        multiple times for some atomic user actions
        (-[PDFPrefUpdatingProxy forwardInvocation:]):
        call _updatePreferencesSoon where we used to immediately set preferences

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

12 years agoLayoutTests:
justing [Tue, 17 Apr 2007 20:27:58 +0000 (20:27 +0000)]
LayoutTests:

        Reviewed by darin

        <rdar://problem/5136770>
        Gmail Editor: Hang when turning a particular multi-line selection into a list

        Demonstrates the bug:
        * editing/execCommand/5136770-expected.checksum: Added.
        * editing/execCommand/5136770-expected.png: Added.
        * editing/execCommand/5136770-expected.txt: Added.
        * editing/execCommand/5136770.html: Added.

        Added placeholders in empty list items:
        * editing/execCommand/4747450-expected.txt:
        * editing/execCommand/insert-list-empty-div-expected.txt:
        * editing/execCommand/4917055-expected.txt:

        A horizontal rule pushed into a list item appears *before*
        the list marker in the render tree, although, the new results
        look more correct (13376):
        * editing/execCommand/create-list-with-hr-expected.checksum:
        * editing/execCommand/create-list-with-hr-expected.png:
        * editing/execCommand/create-list-with-hr-expected.txt:
        * editing/execCommand/create-list-with-hr.html:

WebCore:

        Reviewed by darin

        <rdar://problem/5136770>
        Gmail Editor: Hang when turning a particular multi-line selection into a list

        When InsertListCommand pushes content into list items,
        it creates an empty list item and then calls moveParagraphs.
        But moveParagraphs' selection preservation code fails when
        it encounters empty list items (list items w/o placeholders).
        This causes InsertListCommand to lose track of where it has
        already been performed, which causes the hang.

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::doApply): Use brs to hold open
        empty list items.

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

12 years ago Oops, rolled that last change out. I'll redo it again later after making
darin [Tue, 17 Apr 2007 19:58:16 +0000 (19:58 +0000)]
    Oops, rolled that last change out. I'll redo it again later after making
        som additional refinments.

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

12 years ago Reviewed by Kevin Decker
sullivan [Tue, 17 Apr 2007 19:00:43 +0000 (19:00 +0000)]
    Reviewed by Kevin Decker

        - fixed <rdar://problem/4184640> "Look Up in Dictionary" item is always disabled for PDF pages

        * WebView/WebPDFView.mm:
        (-[WebPDFView validateUserInterfaceItem:]):
        enable "Look Up in Dictionary" only if we're using a version of PDFKit that knows how to do so
        (-[WebPDFView _canLookUpInDictionary]):
        use respondsToSelector to test whether the current version of PDFKit supports this non-API feature
        (-[WebPDFView _lookUpInDictionaryFromMenu:]):
        implement this method, which WebKit includes in the context menu when there's selected text
        (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
        updated comment for this change

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

12 years ago Reviewed by Brady.
darin [Tue, 17 Apr 2007 18:44:21 +0000 (18:44 +0000)]
    Reviewed by Brady.

        - a few baby steps to try to make lockHistory and userGesture less confusing

        * page/FrameLoadRequest.h:
        (WebCore::FrameLoadRequest::FrameLoadRequest): Add initialization of m_isUserGesture
        to true.
        (WebCore::FrameLoadRequest::shouldLockHistory): Renamed from lockHistory to avoid having
        a getter that sounds like a verb phrase.
        (WebCore::FrameLoadRequest::setShouldLockHistory): Ditto.
        (WebCore::FrameLoadRequest::isUserGesture): Added.
        (WebCore::FrameLoadRequest::setIsUserGesture): Ditto.

        * loader/FrameLoader.h: Remove userGesture parameter from load that takes
        FrameLoadRequest. Remove default values for lockHistory and userGesture parameters,
        since that just makes it more likely we'll forget to pass them in. Remove one of
        the overloads of urlSelected, since it's only called one place.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::createWindow): Remove userGesture parameter, relying on
        the true default in FrameLoadRequest.
        (WebCore::FrameLoader::urlSelected): Call setShouldLockHistory and setIsUserGesture
        on the FrameLoadRequest, and call load directly; also eliminate the other urlSelected
        overload since this was the only place it was called.
        (WebCore::FrameLoader::load): Remove userGesture parameter, relying on the true
        default in FrameLoadRequest. In the other overload, clean up logic to eliminate the
        argsReferrer variable and get rid of the userGesture parameter, using the value from
        FrameLoadRequest.
        (WebCore::FrameLoader::submitForm): Remove userGesture parameter, relying on the value
        in the FrameLoadRequest. This actually changes behavior.

        * bindings/js/kjs_html.cpp: (KJS::JSHTMLDocument::putValueProperty): Pass
        false for userGesture explicitly instead of relying on default argument.

        * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected):
        Remove userGesture parameter, relying on the true default in FrameLoadRequest.

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

12 years agoMore elegant fix for the 64-bit build failure.
thatcher [Tue, 17 Apr 2007 17:49:16 +0000 (17:49 +0000)]
More elegant fix for the 64-bit build failure.

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

12 years agoWebCore:
ddkilzer [Tue, 17 Apr 2007 01:15:36 +0000 (01:15 +0000)]
WebCore:

        Reviewed by NOBODY (fixed misspelling).

        * manual-tests/containing-block-position-chage.html: Removed.
        * manual-tests/containing-block-position-change.html: Added.

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

12 years ago64-bit build fix.
thatcher [Tue, 17 Apr 2007 00:25:29 +0000 (00:25 +0000)]
64-bit build fix.

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

12 years agoLayoutTests:
justing [Mon, 16 Apr 2007 21:06:46 +0000 (21:06 +0000)]
LayoutTests:

        Reviewed by darin

        <rdar://problem/5134759>
        GMail Editor: Hang after pasting underlined text multiple times

        Demonstrates the bug:
        * editing/pasteboard/5134759-expected.checksum: Added.
        * editing/pasteboard/5134759-expected.png: Added.
        * editing/pasteboard/5134759-expected.txt: Added.
        * editing/pasteboard/5134759.html: Added.

        A unnecessary extra space was added to an element's
        inline style declaration, because of the way cssText behaves:
        * editing/pasteboard/paste-table-002-expected.txt:

WebCore:

        Reviewed by darin

        <rdar://problem/5134759>
        GMail Editor: Hang after pasting underlined text multiple times

        The moveParagraphs call that ReplaceSelectionCommand
        performs must receive only inline content from createMarkup,
        or else it will result in another call to moveParagraphs
        when it performs the move, resulting in infinite recursion.

        * editing/markup.cpp:
        (WebCore::startMarkup): We were only converting a block to
        an inline if it had an inline style declaration or styles
        coming from matched rules.  Cleaned up this code a bit by
        handling an element's style separately from its other
        attributes.

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

12 years ago * Drosera/debugger.css: hide the borders for iframes
thatcher [Mon, 16 Apr 2007 18:31:08 +0000 (18:31 +0000)]
    * Drosera/debugger.css: hide the borders for iframes

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

12 years ago Rubber stamped by Tim Hatcher.
darin [Mon, 16 Apr 2007 18:29:10 +0000 (18:29 +0000)]
    Rubber stamped by Tim Hatcher.

        * WebKit.xcodeproj/project.pbxproj: Added Radar bug number to the error message
        for the "version number ending in 4" check so folks from Apple can find the
        original bug that motivated for this. To summarize what's in that bug, it says that
        <http://my.fedex.com> was failing, that it was because of the OpenCube DHTML Menu,
        and that some other affected sites were not using OpenCube (so the error is presumably
        more widespread).

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

12 years ago - get layout tests going again
darin [Mon, 16 Apr 2007 16:52:09 +0000 (16:52 +0000)]
    - get layout tests going again

        * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
        Replace assertion with a runtime check. We can consider changing it back to
        an assertion some day, but it's not important.

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

12 years agoWebCore:
darin [Mon, 16 Apr 2007 15:41:04 +0000 (15:41 +0000)]
WebCore:

        Reviewed by John Sullivan.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13303
          <rdar://problem/5126341> REGRESSION: controls in a background Safari window
          maintain active appearance if the address bar has focus (13303)

        - fix a related problem where elements could look focused in non-active windows

        - simplify secure keyboard entry logic in Frame::setIsActive

        * WebCore.exp: Add two new symbols for use by WebKit.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::dispatchFocusEvent): Call setUseSecureKeyboardEntryWhenActive
        rather than calling setSecureKeyboardEntry directly -- does nothing if the frame is not active.
        (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto.

        * page/Frame.cpp:
        (WebCore::Frame::setUseSecureKeyboardEntryWhenActive): Added. Calls
        setUseSecureKeyboardEntry only if the frame is active, but also stores away the state,
        so that the setIsActive function doesn't have to recompute it.
        (WebCore::Frame::setIsActive): Rewrote all the comments in the function. Removed the code
        to manage control tints, which are not based on the whether the frame is active but rather
        on AppKit's concept of whether the window should have "key appearance". Simplified the
        logic about when to call setUseSecureKeyboardEntry by using the value of
        m_useSecureKeyboardEntryWhenActive.
        (WebCore::FramePrivate::FramePrivate): Initialize m_useSecureKeyboardEntryWhenActive.
        * page/Frame.h: Made setSecureKeyboardEntry private and renamed it to
        setUseSecureKeyboardEntry, removed isSecureKeyboardEntry, and
        added a public setUseSecureKeyboardEntryWhenActive.
        * page/FramePrivate.h: Added m_useSecureKeyboardEntryWhenActive.
        * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry): Added an assertion,
        and removed isSecureKeyboardEntry().

        * page/FrameView.h: Added updateControlTints.
        * page/FrameView.cpp: (WebCore::FrameView::updateControlTints): Added. Code was moved
        here from setIsActive for two reasons: (1) it makes more sense in the view class, and
        (2) it needs to be called at the appropriate time for AppKit, not when active changes.

        * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isFocused): Added an isActive
        check here to match the logic in the implementation of the CSS pseudo-state.
        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::updateFocusedState): Use the isFocused function instead of
        repeating the logic here. Removed the "need to add a key window test here" comment.
        (WebCore::RenderThemeMac::controlSupportsTints): Added a comment about the NSCell
        SPI that's related to the _windowChangedKeyState method we now use in WebHTMLView.

WebKit:

        Reviewed by John Sullivan.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13303
          <rdar://problem/5126341> REGRESSION: controls in a background Safari window
          maintain active appearance if the address bar has focus (13303)

        * WebView/WebHTMLView.mm: (-[WebHTMLView _windowChangedKeyState]):
        Added. Calls FrameView::updateControlTints.

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

12 years ago Reviewed by John Sullivan.
darin [Mon, 16 Apr 2007 15:15:01 +0000 (15:15 +0000)]
    Reviewed by John Sullivan.

        - fix http://bugs.webkit.org/show_bug.cgi?id=13227
          StringImpl::isLower incorrectly assumes islower returns 1 (it can return any non-0)

        * platform/StringImpl.cpp:
        (WebCore::StringImpl::isLower): Based on test application results, changed to use &&
        instead of trying to use & to avoid branches. Use U16_NEXT so we can handle characters
        outside the BMP. Improved comments.
        (WebCore::StringImpl::lower): Improved comments.
        (WebCore::equalIgnoringCase): Changed to use && instead of trying to use & to avoid
        branches. Improved comments. Added an assertion about the assumption we're
        making that characters in the char* are all ASCII.

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

12 years agoAdding wx sources and changes to wxWebKit branch.
kevino [Sat, 14 Apr 2007 22:33:17 +0000 (22:33 +0000)]
Adding wx sources and changes to wxWebKit branch.

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

12 years agoLayoutTests:
ddkilzer [Sat, 14 Apr 2007 01:26:07 +0000 (01:26 +0000)]
LayoutTests:

        Patch and review by hyatt.  Testing and landing by ddkilzer.

        <rdar://problem/5078866>
        tables don't inherit text-align (in strict mode; they're not supposed to in quirks mode)

        Test tables/mozilla_expected_failures/bugs/bug11384s.html progressed after this fix, so
        it was moved to tables/mozilla/bugs/bug11384s.html.

        * fast/css/table-text-align-quirk-expected.checksum: Added.
        * fast/css/table-text-align-quirk-expected.png: Added.
        * fast/css/table-text-align-quirk-expected.txt: Added.
        * fast/css/table-text-align-quirk.html: Added.
        * fast/css/table-text-align-strict-expected.checksum: Added.
        * fast/css/table-text-align-strict-expected.png: Added.
        * fast/css/table-text-align-strict-expected.txt: Added.
        * fast/css/table-text-align-strict.html: Added.
        * fast/table/border-collapsing/rtl-border-collapsing.html: Replaced "text-align: -khtml-center"
        style with "text-align: center" style.
        * tables/mozilla/bugs/bug11384s-expected.checksum: Added.
        * tables/mozilla/bugs/bug11384s-expected.png: Added.
        * tables/mozilla/bugs/bug11384s-expected.txt: Added.
        * tables/mozilla/bugs/bug11384s.html: Added.
        * tables/mozilla_expected_failures/bugs/bug11384s-expected.checksum: Removed.
        * tables/mozilla_expected_failures/bugs/bug11384s-expected.png: Removed.
        * tables/mozilla_expected_failures/bugs/bug11384s-expected.txt: Removed.
        * tables/mozilla_expected_failures/bugs/bug11384s.html: Removed.

WebCore:

        Patch and review by hyatt.  Testing and landing by ddkilzer.

        <rdar://problem/5078866>
        tables don't inherit text-align (in strict mode; they're not supposed to in quirks mode)

        Test: fast/css/table-text-align-quirk.html
              fast/css/table-text-align-strict.html

        Previous commit (r20731) removed the wrong property from WebCore/css/html4.css.  However,
        when the correct property was removed, it caused tables to inherit alignment properties
        from tags like <center> and <div align="center">.  This is fixed in
        WebCore::CSSStyleSelector::adjustRenderStyle() by special-casing tables to reset the
        text-align property.

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::valueForTextAlign): Renamed KHTML_CENTER, KHTML_LEFT and KHTML_RIGHT to
        WEBKIT_CENTER, WEBKIT_LEFT and WEBKIT_RIGHT.
        * css/cssparser.cpp:
        (WebCore::CSSParser::parseValue): Ditto.
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::adjustRenderStyle): Tables should not support -webkit-center,
        -webkit-left or -webkit-right values for text-align, so reset them back to auto.
        * css/html4.css: Removed "text-align: -webkit-auto;" property from tables selector.  It
        was previously added to css/quirks.css in r20731.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::determineHorizontalPosition): Renamed KHTML_* to WEBKIT_*.
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::calcHorizontalMargins): Ditto.
        * rendering/RenderFlow.cpp:
        (WebCore::RenderFlow::caretRect): Ditto.
        * rendering/RenderStyle.h: Ditto.
        (WebCore::):
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::computeHorizontalPositionsForLine): Ditto.

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

12 years ago2007-04-13 Oliver Hunt <oliver@apple.com>
oliver [Sat, 14 Apr 2007 00:57:13 +0000 (00:57 +0000)]
2007-04-13  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Due to rdar://problem/5133910 -- WebArchives should not be constructed
        using resource from the cache -- We may try to create a potentially
        incorrect WebArchive when dragging an image multiple times.

        This patch retains the assertion for invalid behaviour, but adds a
        branch to make sure we don't try to do anything with the WebArchive
        in release builds.

        * Misc/WebNSPasteboardExtras.mm:
        (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:]):

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

12 years ago Reviewed by a sanity check
beidson [Fri, 13 Apr 2007 21:47:56 +0000 (21:47 +0000)]
    Reviewed by a sanity check

        My layout test *has* to be http, since dumping history in DRT with hard coded file paths
        will never match up to expected results across machines.

        Lame

        * history/new-window-redirect-history-expected.txt: Removed.
        * history/new-window-redirect-history.html: Removed.
        * history/resources/redirect-1.html: Removed.
        * history/resources/redirect-2.html: Removed.
        * http/tests/navigation/new-window-redirect-history-expected.txt: Added.
        * http/tests/navigation/new-window-redirect-history.html: Added.
        * http/tests/navigation/resources/redirect-1.html: Added.
        * http/tests/navigation/resources/redirect-2.html: Added.

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

12 years ago Rubberstamped by Anders.
aroben [Fri, 13 Apr 2007 20:34:14 +0000 (20:34 +0000)]
    Rubberstamped by Anders.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: #include
        stdio.h so that snprintf is defined.

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

12 years agoLayoutTests:
beidson [Fri, 13 Apr 2007 20:28:27 +0000 (20:28 +0000)]
LayoutTests:

        Reviewed by Geoose

        <rdar://problem/4664154> and http://bugs.webkit.org/show_bug.cgi?id=3546

        Layout test that covers opening an empty new window, then starting to navigate around in it

        * history/new-window-redirect-history-expected.txt: Added.
        * history/new-window-redirect-history.html: Added.
        * history/resources/redirect-1.html: Added.
        * history/resources/redirect-2.html: Added.

WebCore:

        Reviewed by Black Sheep

        <rdar://problem/4664154> and http://bugs.webkit.org/show_bug.cgi?id=3546

        When you click on a link that opens in a new window from within gmail, they first create a new window
        with an empty URL, then immediately document.write() into the window to schedule a redirect.

        Since the initial page doesn't have a URL associated with it, a history item never gets created.  The
        reasonable solution?  To actually create the history item after the redirect (in updateHistoryForInternalLoad)

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addHistoryForCurrentLocation): Updates global and B/F history with a new history item
        (WebCore::FrameLoader::updateHistoryForStandardLoad): Call addHistoryForCurrentLocation
        (WebCore::FrameLoader::updateHistoryForInternalLoad): Call addHistoryForCurrentLocation if there is not already
          a current history item
        * loader/FrameLoader.h:

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

12 years ago Reviewed by Anders
beidson [Fri, 13 Apr 2007 20:09:15 +0000 (20:09 +0000)]
    Reviewed by Anders

        Add the ability to dump the back/forward history of all windows open at the end of a test

        * DumpRenderTree/DumpRenderTree.m:
        (dumpBackForwardListForWebView): Dump B/F list for the given WebView
        (dump): Call dumpBackForwardListForWebView for each WebView open after the test

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

12 years agoLayoutTests:
andersca [Fri, 13 Apr 2007 19:54:13 +0000 (19:54 +0000)]
LayoutTests:

        Reviewed by Brady.

        * plugins/open-and-close-window-with-plugin.html:
        Manage open windows manually for this test.

WebKitTools:

        Reviewed by Brady.

        By default, close any windows that have been opened during a test. This can be overridden by
        calling setCloseRemainingWindowsWhenComplete(false).

        Change the windows set to an array so we can gurantee the enumeration order.

        * DumpRenderTree/DumpRenderTree.m:
        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (+[LayoutTestController webScriptNameForSelector:]):
        (-[LayoutTestController setCloseRemainingWindowsWhenComplete:]):
        (runTest):
        (-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]):
        (-[DumpRenderTreeWindow dealloc]):

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

12 years ago Reviewed by Dave Harrison.
thatcher [Fri, 13 Apr 2007 19:13:33 +0000 (19:13 +0000)]
    Reviewed by Dave Harrison.

        <rdar://problem/5132727> Soho Mail build fails because of renamed SPI

        * WebView/WebUIDelegatePrivate.h: define WebMenuItemTagSearchInGoogle as OldWebMenuItemTagSearchWeb

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

12 years ago Build fix.
ggaren [Fri, 13 Apr 2007 19:12:51 +0000 (19:12 +0000)]
    Build fix.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
        (handleCallback): Explicitly cast the void* returned by malloc.

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

12 years ago2007-04-13 Mark Rowe <mrowe@apple.com>
bdash [Fri, 13 Apr 2007 07:56:16 +0000 (07:56 +0000)]
2007-04-13  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver.

        <rdar://problem/5130686> Using WebPreferencesPrivate.h requires modifying framework search path

        * WebView/WebPreferencesPrivate.h: Remove unneeded #ifdef.

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

12 years ago2007-04-12 Oliver Hunt <oliver@apple.com>
oliver [Fri, 13 Apr 2007 06:38:38 +0000 (06:38 +0000)]
2007-04-12  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        This fixes <rdar://problem/5060766> -- Frameset with
        an empty frame crashes due to null document.  Debug
        builds hit the frame->document() assertion in
        EventHandler::prepareMouseEvent

        This null check seems necessary now, having run through
        all the logic on the path to this crash it appears that
        we can't avoid this null check.

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

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

12 years agoJavaScriptCore:
ggaren [Fri, 13 Apr 2007 04:32:51 +0000 (04:32 +0000)]
JavaScriptCore:

        Reviewed by Darin Adler.

        http://bugs.webkit.org/show_bug.cgi?id=13029
        rdar://problem/4994849
        Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
        This doesn't actually change JavaScriptCore, but that's where npapi.h is.

        * bindings/npapi.h:
        Add headers member to NPStream struct.  Also increase NP_VERSION_MINOR to 18.
        Increasing to >= 17 allows plug-ins to safely detect whether to look for
        NPStream::headers.  Increasing from 17 to 18 reflects presence of NPObject
        enumeration, which was added in a prior patch, and which has been agreed to
        constitute version 18 by the plugin-futures list.  Also add other missing
        bits of npapi.h to catch up from 14 to 18.  This includes features that are
        not implemented in WebKit, but those are safely stubbed.

LayoutTests:

        Reviewed by Darin Adler.

        http://bugs.webkit.org/show_bug.cgi?id=13029
        rdar://problem/4994849
        Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.

        * http/tests/plugins/npapi-response-headers-expected.txt: Added.
        * http/tests/plugins/npapi-response-headers.html: Added.
        * http/tests/plugins/resources/load-me-1.txt: Added.
        * http/tests/plugins/resources/load-me-2.txt: Added.

WebKit:

        Reviewed by Darin Adler.

        http://bugs.webkit.org/show_bug.cgi?id=13029
        rdar://problem/4994849
        Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.

        * Plugins/WebBaseNetscapePluginStream.h: declarations.
        * Plugins/WebBaseNetscapePluginStream.mm: main implementation.
        (-[WebBaseNetscapePluginStream dealloc]): cleanup.
        (-[WebBaseNetscapePluginStream finalize]): cleanup.
        (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
        Pass headers along.
        (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
        Main work is here.  Extract headers from NSHTTPURLResponse object into a byte sequence.
        See comments here about how it would be nice to have low-level access to the HTTP response.
        (-[WebBaseNetscapePluginStream _destroyStream]): cleanup.
        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
        Conform to new startStream params.  Not applicable here, pass nil.

WebKitTools:

        Reviewed by Darin Adler.

        http://bugs.webkit.org/show_bug.cgi?id=13029
        rdar://problem/4994849
        Bug 13029: Permit NPAPI plug-ins to see HTTP response headers.
        Changes in WebKitTools are only for the NPAPI test plugin.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c: main test logic.
        (pluginInvoke): support null window argument for NPStream creation.
        (pluginAllocate): initialization.
        (pluginDeallocate): cleanup.
        (handleCallback): add second JS callback arg: header dump.
        (notifyStream): added; hook from NPP_NewStream to record headers.
        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h: declarations.
        * DumpRenderTree/TestNetscapePlugIn.subproj/main.c: call new header hook.
        (NPP_NewStream): call new header hook.

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

12 years agoLayoutTests:
justing [Fri, 13 Apr 2007 01:10:15 +0000 (01:10 +0000)]
LayoutTests:

        Reviewed by darin

        <rdar://problem/5131716>
        Clicking just before a ToDo doesn't put the caret before the ToDo

        * editing/selection/5131716-1-expected.checksum: Added.
        * editing/selection/5131716-1-expected.png: Added.
        * editing/selection/5131716-1-expected.txt: Added.
        * editing/selection/5131716-1.html: Added.
        * editing/selection/5131716-2-expected.checksum: Added.
        * editing/selection/5131716-2-expected.png: Added.
        * editing/selection/5131716-2-expected.txt: Added.
        * editing/selection/5131716-2.html: Added.
        * editing/selection/5131716-3-expected.checksum: Added.
        * editing/selection/5131716-3-expected.png: Added.
        * editing/selection/5131716-3-expected.txt: Added.
        * editing/selection/5131716-3.html: Added.
        * editing/selection/5131716-4-expected.checksum: Added.
        * editing/selection/5131716-4-expected.png: Added.
        * editing/selection/5131716-4-expected.txt: Added.
        * editing/selection/5131716-4.html: Added.

WebCore:

        Reviewed by darin

        <rdar://problem/5131716>
        Clicking just before a ToDo doesn't put the caret before the ToDo

        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::positionForCoordinates):
        Consider clicks inside the blocks padding, instead of
        incorrectly sending them to the position before the block.

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

12 years ago Build fix for case sensitive file systems
beidson [Thu, 12 Apr 2007 16:56:49 +0000 (16:56 +0000)]
    Build fix for case sensitive file systems

        * Misc/WebNSPasteboardExtras.mm:
        * WebCoreSupport/WebPasteboardHelper.mm:

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

12 years agoWebCore:
sullivan [Thu, 12 Apr 2007 16:12:19 +0000 (16:12 +0000)]
WebCore:

        Reviewed by Anders

        - WebCore part of fix for:
        <rdar://problem/5128697> REGRESSION: At least one PDF context menu item isn't appearing on Leopard

        * platform/ContextMenuItem.h:
        (WebCore::):
        add two PDF-related context menu items to enum to keep it in sync with WebKit

        * platform/ContextMenu.cpp:
        (WebCore::ContextMenu::checkOrEnableIfNeeded):
        add the new context menu items to the do-nothing case of a big switch statement

WebKit:

        Reviewed by Anders

        - WebKit part of fix for:
        <rdar://problem/5128697> REGRESSION: At least one PDF context menu item isn't appearing on Leopard

        * Misc/WebNSArrayExtras.h: Added.
        * Misc/WebNSArrayExtras.m: Added.
        (-[NSMutableArray _webkit_removeUselessMenuItemSeparators]):
        New file, includes this method to strip leading, trailing, and duplicate separators from arrays
        of NSMenuItems (copied from Safari)

        * WebView/WebUIDelegatePrivate.h:
        new MenuItemTag enum values for new PDFKit context menu items

        * WebKit.xcodeproj/project.pbxproj:
        updated for new files

        * WebView/WebPDFView.mm:
        (-[WebPDFView _anyPDFTagsFoundInMenu:]):
        check for new PDFKit context menu items
        (-[WebPDFView _menuItemsFromPDFKitForEvent:]):
        associate new PDFKit context menu item selectors with the new tags; skip certain selectors that
        correspond to menu items that WebKit already includes; remove useless menu item separators when
        we're done, since we might have removed arbitrarily-placed menu items

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

12 years agoFixed drawing of justified text in the Qt port.
hausmann [Thu, 12 Apr 2007 15:28:39 +0000 (15:28 +0000)]
Fixed drawing of justified text in the Qt port.

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

12 years ago2007-04-11 Oliver Hunt <oliver@apple.com>
oliver [Thu, 12 Apr 2007 06:42:45 +0000 (06:42 +0000)]
2007-04-11  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.

WebCore:
        Adding RetainPtr to the many global obj-c pointers we use in
        C/C++ methods.  This is necessary to prevent GC from collecting
        globals we want to keep around.

        We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
        obj-c.

        Also made the Pasteboard::m_pasteboard a RetainPtr although it
        shouldn't be necessary as the only NSPasteboard instances that
        should ever be inserted are the system clipboard and dragging
        pasteboard.  Neither of which should ever be collected.

        * page/mac/WebCoreFrameBridge.mm:
        (_getPreSmartSet):
        (_getPostSmartSet):
        * platform/Pasteboard.h:
        * platform/graphics/mac/ColorMac.mm:
        (WebCore::nsColor):
        * platform/graphics/mac/GraphicsContextMac.mm:
        (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
        * platform/mac/FontDataMac.mm:
        (WebCore::webFallbackFontFamily):
        * platform/mac/PasteboardMac.mm:
        (WebCore::writableTypesForURL):
        (WebCore::writableTypesForImage):
        (WebCore::Pasteboard::clear):
        (WebCore::Pasteboard::writeSelection):
        (WebCore::Pasteboard::writeURL):
        (WebCore::Pasteboard::writeFileWrapperAsRTFDAttachment):
        (WebCore::Pasteboard::writeImage):
        (WebCore::Pasteboard::canSmartReplace):
        (WebCore::Pasteboard::plainText):
        (WebCore::Pasteboard::documentFragment):

WebKit:
        Adding RetainPtr to the many global obj-c pointers we use in
        C/C++ methods.  This is necessary to prevent GC from collecting
        globals we want to keep around.

        We use RetainPtr in obj-c++ and c++ files, and CFRetain/Release in pure
        obj-c.

        This fixes <rdar://problem/5058731> -- Crash in
        WebCore::DragData::containsCompatibleContent due to early release
        of types array

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

12 years ago2007-04-11 Mitz Pettel <mitz@webkit.org>
bdash [Thu, 12 Apr 2007 04:45:48 +0000 (04:45 +0000)]
2007-04-11  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11362
          Native popup with size="1" wraps options

        Test: fast/forms/menulist-option-wrap.html

        * css/html4.css: Added white-space declaration for select[size="0"] and
        select[size="1"]. Added border-radius declaration for select.

2007-04-11  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Dave Hyatt.

        - test and updated results for http://bugs.webkit.org/show_bug.cgi?id=11362
          Native popup with size="1" wraps options

        * fast/forms/menulist-option-wrap-expected.checksum: Added.
        * fast/forms/menulist-option-wrap-expected.png: Added.
        * fast/forms/menulist-option-wrap-expected.txt: Added.
        * fast/forms/menulist-option-wrap.html: Added.
        * fast/forms/select-empty-option-height-expected.checksum:
        * fast/forms/select-empty-option-height-expected.png:

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

12 years ago2007-04-11 MorganL <morganl.webkit@yahoo.com>
bdash [Thu, 12 Apr 2007 04:21:48 +0000 (04:21 +0000)]
2007-04-11  MorganL  <morganl.webkit@yahoo.com>

        Reviewed by Maciej.

        Add a Frame pointer to ChromeClient methods:
        http://bugs.webkit.org/show_bug.cgi?id=13127

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::createWindow):
        * page/Chrome.cpp:
        (WebCore::Chrome::createWindow):
        (WebCore::Chrome::createModalDialog):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * page/ContextMenuController.cpp:
        (WebCore::openNewWindow):
        * platform/graphics/svg/SVGImageEmptyClients.h:
        (WebCore::SVGEmptyChromeClient::createWindow):
        (WebCore::SVGEmptyChromeClient::createModalDialog):

2007-04-11  MorganL  <morganl.webkit@yahoo.com>

        Reviewed by Maciej.

        Add a Frame pointer to ChromeClient methods:
        http://bugs.webkit.org/show_bug.cgi?id=13127

        * COM/ChromeClientWin.cpp:
        (ChromeClientWin::createWindow):
        (ChromeClientWin::createModalDialog):
        * COM/ChromeClientWin.h:
        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::createWindow):
        (WebChromeClient::createModalDialog):

2007-04-11  MorganL  <morganl.webkit@yahoo.com>

        Reviewed by Maciej.

        Add a Frame pointer to ChromeClient methods:
        http://bugs.webkit.org/show_bug.cgi?id=13127

        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::createWindow):
        (WebCore::ChromeClientQt::createModalDialog):
        * WebCoreSupport/ChromeClientQt.h:

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

12 years ago Reviewed by Ada
beidson [Thu, 12 Apr 2007 01:38:41 +0000 (01:38 +0000)]
    Reviewed by Ada

        <rdar://problem/5080987> - Crash in DocumentLoader::frameLoader() const

        This was free nil checking lost during the ObjC -> C++ conversion

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Null check the DocumentLoader

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

12 years agoLayoutTests:
justing [Thu, 12 Apr 2007 01:25:35 +0000 (01:25 +0000)]
LayoutTests:

        Reviewed by harrison

        <rdar://problem/5126166>
        Deleting selection starting at before ToDo checkbox to end of line, inserts a BR in the subsequent ToDo

        * editing/deleting/5126166-expected.checksum: Added.
        * editing/deleting/5126166-expected.png: Added.
        * editing/deleting/5126166-expected.txt: Added.
        * editing/deleting/5126166.html: Added.

WebCore:

        Reviewed by harrison

        <rdar://problem/5126166>
        Deleting selection starting at before ToDo checkbox to end of line, inserts a BR in the subsequent ToDo

        If a selection ends in a table cell, we shouldn't perform
        a merge after deleting that selection.  We have code in
        place to prevent those merges, but it failed here.

        It fails because the end of the selection was [tableCell, 0],
        (normally not a valid VisiblePosition, but valid here
        because the table cell is empty).  We prevent the merge
        if the node of the position at the end of the selection
        has an enclosingTableCell.  Even though [tableCell, 0] has
        an enclosing table cell, the node tableCell doesn't, so
        the check fails.

        Fixed this by changing enclosingTableCell to take in
        a position, instead of a node.  The other enclosing element
        getters should be changed in this way as well.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::initializePositionData):
        Call the new enclosingTableCell.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::shouldMerge): Ditto.
        * editing/htmlediting.cpp:
        (WebCore::enclosingTableCell): Take in a position instead
        of a node.
        * editing/htmlediting.h:

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

12 years ago2007-04-12 Mark Rowe <mrowe@apple.com>
bdash [Wed, 11 Apr 2007 21:30:37 +0000 (21:30 +0000)]
2007-04-12  Mark Rowe  <mrowe@apple.com>

        Second part of Qt build fix.

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::loadedFromCachedPage):
        (WebCore::FrameLoaderClientQt::setDocumentViewFromCachedPage):
        (WebCore::FrameLoaderClientQt::saveDocumentViewToCachedPage):
        * WebCoreSupport/FrameLoaderClientQt.h:

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

12 years ago2007-04-12 Mark Rowe <mrowe@apple.com>
bdash [Wed, 11 Apr 2007 20:58:25 +0000 (20:58 +0000)]
2007-04-12  Mark Rowe  <mrowe@apple.com>

        Qt build fix.

        * WebCore.pro:
        * editing/qt/EditorQt.cpp:
        (WebCore::Editor::markBadGrammar):
        * history/qt/CachedPageQt.cpp: Added.
        (WebCore::CachedPage::close):
        * history/qt/PageCacheQt.cpp: Removed.

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

12 years ago Reviewed by Antti
beidson [Wed, 11 Apr 2007 18:22:20 +0000 (18:22 +0000)]
    Reviewed by Antti

        <rdar://problem/5125648> and http://bugs.webkit.org/show_bug.cgi?id=13326

        Crash opening a link in a new window from Gmail

        Problem here is that the currentHistoryItem in the new window is null.  This *shouldn't* be the case,
        and is the cause of a very long standing bug -
        http://bugs.webkit.org/show_bug.cgi?id=3546 - Can't go back to first page in new window opened from gmail

        For now, adding a null check prevents this crash and restores the original, long standing regression

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::updateHistoryForInternalLoad): NULL check

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

12 years ago Reviewed by Anders.
aroben [Wed, 11 Apr 2007 17:51:52 +0000 (17:51 +0000)]
    Reviewed by Anders.

        Made image document copying more cross-platform.

        All layout tests pass.

        * editing/Editor.cpp:
        (WebCore::imageNodeFromImageDocument): Added.
        (WebCore::Editor::canCopy): Called imageNodeFromImageDocument.
        (WebCore::Editor::copy): Ditto.
        (WebCore::Editor::copyImage): Updated for changes to Pasteboard.
        * platform/Pasteboard.h: Made writeImage more general, which allowed
        getting rid of its second incarnation.
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeImage): Collapsed logic from the two
        writeImage methods into one.
        (Pasteboard::writeImage): Updated for Pasteboard changes.
        * platform/qt/PasteboardQt.cpp:
        (WebCore::Pasteboard::writeImage): Ditto.

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

12 years ago * css/CSSValueKeywords.in: Fix a comment.
darin [Wed, 11 Apr 2007 07:50:59 +0000 (07:50 +0000)]
    * css/CSSValueKeywords.in: Fix a comment.

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

12 years agoLayoutTests:
justing [Wed, 11 Apr 2007 02:43:33 +0000 (02:43 +0000)]
LayoutTests:

        Reviewed by harrison

        <rdar://problem/4932260>
        Invalid attributed string for attachment range obtained via AXPreviousWordStartTextMarkerForTextMarker

        Forgot to check these in in my previous checkin:
        * editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum: Added.
        * editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png: Added.

        Tests for a bug where replaced elements would act
        as sentence boundaries:
        * editing/selection/4932260-1-expected.checksum: Added.
        * editing/selection/4932260-1-expected.png: Added.
        * editing/selection/4932260-1-expected.txt: Added.
        * editing/selection/4932260-1.html: Added.

        Tests to see that replaced elements do not act as word
        boundaries when moving forward through the document:
        * editing/selection/4932260-2-expected.checksum: Added.
        * editing/selection/4932260-2-expected.png: Added.
        * editing/selection/4932260-2-expected.txt: Added.
        * editing/selection/4932260-2.html: Added.

        Ditto but tests moving backward:
        * editing/selection/4932260-3-expected.checksum: Added.
        * editing/selection/4932260-3-expected.png: Added.
        * editing/selection/4932260-3-expected.txt: Added.
        * editing/selection/4932260-3.html: Added.

        No way to test accessibility APIs atm, and had trouble
        making a test for selection creation with double-click
        and drag.

WebCore:

        Reviewed by harrison

        <rdar://problem/4932260>
        Invalid attributed string for attachment range obtained via AXPreviousWordStartTextMarkerForTextMarker

        By default, text iterators don't emit anything for replaced
        elements.  Boundary finding code works around this but has
        bugs: replaced elements act as sentence boundaries and the
        above bug, where previousBoundary moves past the start of a
        word if there is a replaced element just before it. This
        patch fixes these issues by treating replaced elements as
        punctuation for boundary finding.

        * editing/TextIterator.cpp:
        (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
        Set m_pastStartNode, the node after (in a reverse pre-order traversal) the
        last one that should be processed.
        (WebCore::SimplifiedBackwardsTextIterator::advance):
        Stop at m_pastStartNode.
        Iterate over nodes in reverse pre-order (TextIterator traverses in
        pre-orer). This makes knowing when to emit characters after nodes vs. when
        to emit characters before nodes easier.
        Remove the special case for entering a new block, emitting characters
        after nodes can now be handled generally, in handleNonTextNode(), because
        of the way we traverse.
        Set m_handledChildren to false every iteration since we now do traverse in
        reverse pre-order.
        (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement):
        Emit a comma for replaced elements.  We only use this kind of iterator
        for finding boundaries, so we can do this unconditionally.
        (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
        Don't use emitNewline, instead specify where the newline should be positioned.
        A node is handled before its children, so characters emitted here should
        be positioned after the node, not before it.
        (WebCore::SimplifiedBackwardsTextIterator::exitNode):
        Don't use emitNewline, instead specify where the newline should be positioned.
        (WebCore::CharacterIterator::CharacterIterator):
        Create a TextIterator that emits content for replaced elements, if requested.
        * editing/TextIterator.h:
        * editing/visible_units.cpp:
        (WebCore::previousBoundary):
        Removed replaced element handling code.
        If the start of the chunk that contained the boundary was in a non-text
        node, then the boundary is not necessarily in that node.  Particularly
        because it is only the end of the chunk that is guaranteed to be a valid
        position in those cases.  We must iterate backwards by character from
        the end of the chunk to find the boundary.
        (WebCore::nextBoundary): Removed replaced element handling code.

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

12 years agoWebCore:
beidson [Tue, 10 Apr 2007 23:55:56 +0000 (23:55 +0000)]
WebCore:

        Reviewed by Darin

        <rdar://problem/4887095> - PageCache and PageState should be combined

        These two objects are a relic of when the PageCache was split between WebCore and WebKit
        It just makes good sense to combine them now, and the new object is more appropriately
        called "CachedPage"

        This patch is vast in scope, but simple in depth - anywhere a PageCache or PageState object
        was used has been adjusted to use a CachedPage object instead.  The most notable change is
        that HistoryItem - which always used to have a PageCache object which may or may not have
        had a PageState - now may or may not have a CachedPage.  This actually simplifies the
        HistoryItem code a bit while making the role of CachedPage much more clear.

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:

        * history/BackForwardList.cpp:
        (WebCore::BackForwardList::addItem):
        (WebCore::BackForwardList::setCapacity):
        (WebCore::BackForwardList::setPageCacheSize):
        (WebCore::BackForwardList::clearPageCache):
        (WebCore::BackForwardList::close):

        * history/PageCache.cpp: Removed.
        * history/PageCache.h: Removed.
        * page/PageState.cpp: Removed.
        * page/PageState.h: Removed.
        * history/CachedPage.cpp: Added.
        (WebCore::CachedPage::create):
        (WebCore::CachedPage::CachedPage):
        (WebCore::CachedPage::~CachedPage):
        (WebCore::CachedPage::restore):
        (WebCore::CachedPage::clear):
        (WebCore::CachedPage::setDocumentLoader):
        (WebCore::CachedPage::documentLoader):
        (WebCore::CachedPage::setTimeStamp):
        (WebCore::CachedPage::setTimeStampToNow):
        (WebCore::CachedPage::timeStamp):
        * history/CachedPage.h: Added.
        (WebCore::CachedPage::document):
        (WebCore::CachedPage::mousePressNode):
        (WebCore::CachedPage::URL):

        * history/HistoryItem.cpp:
        (WebCore::HistoryItem::HistoryItem):
        (WebCore::HistoryItem::setCachedPage):
        (WebCore::HistoryItem::setURL):
        (WebCore::HistoryItem::alwaysAttemptToUseCachedPage):
        (WebCore::HistoryItem::setAlwaysAttemptToUseCachedPage):
        (WebCore::HistoryItem::cachedPage):
        (WebCore::cachedPagesPendingRelease):
        (WebCore::HistoryItem::releaseCachedPagesOrReschedule):
        (WebCore::HistoryItem::releaseAllPendingCachedPages):
        (WebCore::HistoryItem::scheduleCachedPageForRelease):
        * history/HistoryItem.h:
        * history/mac/HistoryItemMac.mm:

        * history/HistoryItemTimer.cpp:
        (WebCore::HistoryItemTimer::HistoryItemTimer):
        (WebCore::HistoryItemTimer::callReleaseCachedPagesOrReschedule):
        * history/HistoryItemTimer.h:

        * history/mac/PageCacheMac.mm: Removed.
        * history/mac/CachedPageMac.mm: Added.
        (WebCore::CachedPage::close):
        (WebCore::CachedPage::setDocumentView):
        (WebCore::CachedPage::documentView):

        * loader/DocumentLoader.cpp:
        (WebCore::DocumentLoader::DocumentLoader):
        (WebCore::DocumentLoader::loadFromCachedPage):
        (WebCore::DocumentLoader::setLoadingFromCachedPage):
        (WebCore::DocumentLoader::isLoadingFromCachedPage):
        * loader/DocumentLoader.h:

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::provisionalLoadStarted):
        (WebCore::FrameLoader::commitProvisionalLoad):
        (WebCore::FrameLoader::transitionToCommitted):
        (WebCore::FrameLoader::open):
        (WebCore::FrameLoader::startLoading):
        (WebCore::FrameLoader::receivedMainResourceError):
        (WebCore::FrameLoader::opened):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
        (WebCore::FrameLoader::cachePageToHistoryItem):
        (WebCore::FrameLoader::createHistoryItem):
        (WebCore::FrameLoader::purgePageCache):
        (WebCore::FrameLoader::invalidateCurrentItemCachedPage):
        (WebCore::FrameLoader::loadItem):
        (WebCore::FrameLoader::updateHistoryForStandardLoad):
        (WebCore::FrameLoader::updateHistoryForClientRedirect):
        (WebCore::FrameLoader::updateHistoryForBackForwardNavigation):
        (WebCore::FrameLoader::updateHistoryForReload):
        (WebCore::FrameLoader::updateHistoryForInternalLoad):
        (WebCore::FrameLoader::updateHistoryForCommit):
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:

        * page/mac/WebCoreFrameBridge.h: Got rid of unused WebCorePageCacheStateKey
        * page/mac/WebCoreFrameBridge.mm: Ditto

        * platform/graphics/svg/SVGImage.cpp:
        * platform/graphics/svg/SVGImageEmptyClients.h: Update to reflect the new names
        (WebCore::SVGEmptyFrameLoaderClient::loadProvisionalItemFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::invalidateCurrentItemCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::loadedFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::clearLoadingFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::isLoadingFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::setDocumentViewFromCachedPage):
        (WebCore::SVGEmptyFrameLoaderClient::saveDocumentViewToCachedPage):

WebKit:

        Reviewed by Darin

        <rdar://problem/4887095> - PageCache and PageState should be combined

        WebKit side of the change to reflect the new object name of CachedPage and new Client method names

        * History/WebHistoryItem.mm:
        (-[WebHistoryItem setAlwaysAttemptToUsePageCache:]):
        (+[WebHistoryItem _releaseAllPendingPageCaches]):
        (-[WebWindowWatcher windowWillClose:]):

        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::setDocumentViewFromCachedPage):
        (WebFrameLoaderClient::loadedFromCachedPage):
        (WebFrameLoaderClient::saveDocumentViewToCachedPage):

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

12 years ago Reviewed by Mark Rowe.
ggaren [Tue, 10 Apr 2007 22:40:00 +0000 (22:40 +0000)]
    Reviewed by Mark Rowe.

        Fixed last check-in to print in release builds, too.

        * kjs/collector.cpp:
        (KJS::getPlatformThreadRegisters):

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

12 years ago Reviewed by John Sullivan, Darin Adler.
ggaren [Tue, 10 Apr 2007 22:27:26 +0000 (22:27 +0000)]
    Reviewed by John Sullivan, Darin Adler.

        Fixed <rdar://problem/5121899> JavaScript garbage collection leads to
        later crash under Rosetta (should abort or leak instead?)

        Log an error message and crash if the kernel reports failure during GC.
        We decided to do this instead of just leaking because we don't want people
        to get the mistaken impression that running in Rosetta is a supported
        configurtion.

        The CRASH macro will also hook into CrashReporter, which will tell us if
        many (any?) users run into this issue.

        * kjs/collector.cpp:
        (KJS::getPlatformThreadRegisters):

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

12 years agoLayoutTests:
antti [Tue, 10 Apr 2007 21:44:53 +0000 (21:44 +0000)]
LayoutTests:

        Reviewed by Hyatt.

        Layout test for <rdar://5057686>
        Flex box layout example hangs in WebCore::RenderFlexibleBox::allowedChildFlex

        * fast/flexbox/flex-hang-expected.checksum: Added.
        * fast/flexbox/flex-hang-expected.png: Added.
        * fast/flexbox/flex-hang-expected.txt: Added.
        * fast/flexbox/flex-hang.html: Added.

WebCore:

        Reviewed by Hyatt.

        Fix <rdar://5057686>
        Flex box layout example hangs in WebCore::RenderFlexibleBox::allowedChildFlex

        Forcibly distribute remaining pixels if the algorithm is not advancing.

        * rendering/RenderFlexibleBox.cpp:
        (WebCore::RenderFlexibleBox::layoutHorizontalBox):
        (WebCore::RenderFlexibleBox::layoutVerticalBox):

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

12 years ago2007-04-11 Mark Rowe <mrowe@apple.com>
bdash [Tue, 10 Apr 2007 21:37:35 +0000 (21:37 +0000)]
2007-04-11  Mark Rowe  <mrowe@apple.com>

        Build fix.

        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject accessibilityDescription]):

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

12 years ago<rdar://problem/5122276> Allow focused frame to fire off notification
pyeh [Tue, 10 Apr 2007 21:00:53 +0000 (21:00 +0000)]
<rdar://problem/5122276> Allow focused frame to fire off notification
Improve accessibility support for Mail WebView embedded Notes.
* bridge/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postNotification):
The focused document with the selection change should fire the selection changed notification, not the top level document
* bridge/mac/WebCoreAXObject.mm:
(-[WebCoreAXObject accessibilityDescription]):
Allow the name attribute of the html body to be used as the accessibility description

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

12 years agoWebCore:
ggaren [Tue, 10 Apr 2007 18:19:51 +0000 (18:19 +0000)]
WebCore:

        Reviewed by Maciej Stachowiak.

        Support for fixing fast/forms/textarea-paste-newline.html.

        Changed clients to use new preference specifying whether a Page should
        allow pasting through the DOM API, instead of a global flag.

        Removed old behavior of always allowing DOM paste in debug builds. In
        light of the new preference-based API, that behavior makes no sense anymore.
        Instead, developers who want to test paste inside Safari can set the
        preference for themselves.

        * WebCore.exp:
        * editing/CommandByName.cpp: Removed crazy hack to keep an identically
        named but invalid copy of the global "pate allowed" flag in this file.
        (WebCore::Frame::enabledPaste):
        * editing/JSEditor.cpp: Removed "always allow" behavior for debug builds.
        (WebCore::JSEditor::queryCommandSupported):
        * editing/JSEditor.h:
        * page/Settings.cpp:
        (WebCore::Settings::setDOMPasteAllowed):
        * page/Settings.h:
        (WebCore::Settings::isDOMPasteAllowed):
        * rendering/RenderTreeAsText.cpp:
        (WebCore::externalRepresentation): Removed crazy hack to allow DOM paste
        after this function has been called.

WebKit:

        Reviewed by Maciej Stachowiak.

        Support for fixing fast/forms/textarea-paste-newline.html.

        Added SPI for specifying whether a WebView should allow pasting through the
        DOM API.

        * ChangeLog:
        * WebKit.xcodeproj/project.pbxproj:
        * WebView/WebPreferenceKeysPrivate.h:
        * WebView/WebPreferences.m:
        (+[WebPreferences standardPreferences]):
        (-[WebPreferences isDOMPasteAllowed]):
        (-[WebPreferences setDOMPasteAllowed:]):
        * WebView/WebPreferencesPrivate.h:
        * WebView/WebView.mm:
        (-[WebView _updateWebCoreSettingsFromPreferences:]):

WebKitTools:

        Reviewed by Maciej Stachowiak.

        Fixed fast/forms/textarea-paste-newline.html.

        This failure was pretty funny. run-webkit-tests kills and respawns
        DumpRenderTree once every 1000 runs. Adding a few tests caused
        textarea-paste-newline.html to run right at the beginning of DumpRenderTree's
        lifetime, before any render tree dumps had occurred. However, WebCore
        used a render tree dump as the hook that set a global flag to allow
        pasting through the DOM API, so running before any render tree dumps had
        occurred caused this test to fail.

        * DumpRenderTree/DumpRenderTree.m:
        (dumpRenderTree): Explicitly tell WebKit to allow pasting through the DOM
        API, instead of hoping it will read the tea leaves.

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

12 years ago Reviewed by Tim Hatcher
sullivan [Tue, 10 Apr 2007 16:28:40 +0000 (16:28 +0000)]
    Reviewed by Tim Hatcher

        - fixed <rdar://problem/4859132> Grammar must always be checked in entire-sentence chunks,
          and shouldn't show markers for current sentence

        * editing/Editor.h:
        add markBadGrammar, now distinct from markMisspellings

        * editing/mac/EditorMac.mm:
        (WebCore::Editor::markMisspellingsAfterTypingToPosition):
        call markMisspellings on one word, and markBadGrammar on entire sentence
        (WebCore::markMisspellingsOrBadGrammar):
        new static function, extracted from markMisspellings
        (WebCore::Editor::markMisspellings):
        now calls extracted function
        (WebCore::Editor::markBadGrammar):
        new method, calls extracted function

        * page/Frame.cpp:
        (WebCore::Frame::respondToChangedSelection):
        update grammar markers for entire new and old sentences

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

12 years ago * blog/wp-content/chrome.jpg: Added.
adele [Tue, 10 Apr 2007 01:05:19 +0000 (01:05 +0000)]
    * blog/wp-content/chrome.jpg: Added.

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

12 years agoWebCore:
andersca [Tue, 10 Apr 2007 00:06:35 +0000 (00:06 +0000)]
WebCore:

        Reviewed by John.

        * WebCore.exp:
        Add __ZNK7WebCore11FrameLoader10isCompleteEv.

WebKit:

        Reviewed by John.

        <rdar://problem/5081860>
        REGRESSION: Select All for standalone image has no visible effect but does change state

        <rdar://problem/5081840>
        REGRESSION: context menu in white space beyond standalone image is different after Select All

        Have validateUserInterface emulate the old behavior for full-frame images and plugins, which is:

        - For full-frame plugins, always return false.
        - For images, only return true if the selector is copy: and the image has finished loading.

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView validateUserInterfaceItem:]):

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

12 years agoLayoutTests:
beidson [Tue, 10 Apr 2007 00:00:21 +0000 (00:00 +0000)]
LayoutTests:

        Reviewed by Darin

        Layout test for the fix for <rdar://4921797> and http://bugs.webkit.org/show_bug.cgi?id=12005

        * http/tests/navigation/multiple-back-forward-entries-expected.txt: Added.
        * http/tests/navigation/multiple-back-forward-entries.html: Added.
        * http/tests/navigation/resources/slow-resource.pl: Added.

WebCore:

        Reviewed by Darin

        Fixes <rdar://4921797> and http://bugs.webkit.org/show_bug.cgi?id=12005

        The original regression was to claim that more loads were the result of a "user gesture" than really
        were.  A lot of the ways a frame load could be kicked off didn't properly set up this flag, and it
        wasn't properly propagated and respected where it should've been.

        This patch cleans much of that up.  One loose end is the "treatAsUserGesture" flag which is a stop
        gap measure to keep "slow redirects" working to create a new history item.  In the future, we need
        to cleanup the meaning and use of "userGesture" and "lockHistory."  This includes integrating them
        in to FrameLoadRequest and being very clear of what their meaning actually is at different stages of
        the Frame load process.

        * dom/Document.cpp:
        (WebCore::Document::processHttpEquiv): Pass only the delay for the redirect

        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultEventHandler): Pass "lockHistory" false, "userGesture" true

        * ksvg2/svg/SVGAElement.cpp:
        (WebCore::SVGAElement::defaultEventHandler): Pass "lockHistory" false, "userGesture" true

        * loader/FrameLoader.cpp:
        (WebCore::ScheduledRedirection::ScheduledRedirection): Figure "lockHistory" and "userGesture" from the
          delay here, instead of at 3 other different sites that call this method
        (WebCore::FrameLoader::changeLocation): Set userGesture correctly
        (WebCore::FrameLoader::urlSelected): Propagate userGesture down
        (WebCore::FrameLoader::requestFrame):
        (WebCore::FrameLoader::receivedFirstData):
        (WebCore::FrameLoader::scheduleRedirection): Pass only the delay here
        (WebCore::FrameLoader::redirectionTimerFired): Set userGesture correctly
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::updateHistoryForInternalLoad): Insteading of asserting we aren't a redirect,
          handle the case where we *are* a redirect by updating the previous history item
        * loader/FrameLoader.h:

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

12 years ago Reviewed by Darin.
andersca [Mon, 9 Apr 2007 23:31:50 +0000 (23:31 +0000)]
    Reviewed by Darin.

        <rdar://problem/5026893>
        REGRESSION: "Mail Contents of this Page" for standalone image in Safari results in a broken image in Mail

        * WebView/WebFrame.mm:
        (-[WebFrame DOMDocument]):
        We can't check for _isHTMLDocument here since image and plugin documents inherit from HTMLDocument. Instead,
        check for those two document types explicitly.

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

12 years ago Reviewed by Geoff, Ada and John.
andersca [Mon, 9 Apr 2007 22:52:11 +0000 (22:52 +0000)]
    Reviewed by Geoff, Ada and John.

        <rdar://problem/4600978> Would like a way to test whether a WebView is displaying a standalone image

        * WebView/WebFrame.mm:
        (-[WebFrame _isDisplayingStandaloneImage]):
        * WebView/WebFramePrivate.h:
        Add _isDisplayingStandaloneImage SPI.

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

12 years agoAdd bug number to ChangeLog.
andersca [Mon, 9 Apr 2007 22:11:50 +0000 (22:11 +0000)]
Add bug number to ChangeLog.

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

12 years ago Reviewed by ggaren
justing [Mon, 9 Apr 2007 20:07:00 +0000 (20:07 +0000)]
    Reviewed by ggaren

        These were never checked in:
        * editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.checksum: Added.
        * editing/pasteboard/drag-image-to-contenteditable-in-iframe-expected.png: Added.

        New results were never checked in after some selection
        gap filling fixes:
        * editing/style/remove-underline-across-paragraph-expected.checksum:
        * editing/style/remove-underline-across-paragraph-expected.png:
        * editing/style/remove-underline-across-paragraph-in-bold-expected.checksum:
        * editing/style/remove-underline-across-paragraph-in-bold-expected.png:
        * editing/style/style-3690704-fix-expected.checksum:
        * editing/style/style-3690704-fix-expected.png:
        * editing/style/table-selection-expected.checksum:
        * editing/style/table-selection-expected.png:
        * editing/undo/4063751-expected.checksum:
        * editing/undo/4063751-expected.png:
        * editing/style/apple-style-editable-mix-expected.checksum:
        * editing/style/apple-style-editable-mix-expected.png:
        * editing/inserting/paragraph-separator-in-table-1-expected.checksum:
        * editing/inserting/paragraph-separator-in-table-1-expected.png:
        * editing/inserting/paragraph-separator-in-table-2-expected.checksum:
        * editing/inserting/paragraph-separator-in-table-2-expected.png:

        Checking in incorrect results and adding a FIXME that references the
        bug that this test demonstrates:
        * editing/style/smoosh-styles-003-expected.checksum:
        * editing/style/smoosh-styles-003-expected.png:
        * editing/style/smoosh-styles-003-expected.txt:
        * editing/style/smoosh-styles-003.html:

        Misspelling marker correctly removed:
        * editing/deleting/delete-to-select-table-expected.checksum:
        * editing/deleting/delete-to-select-table-expected.png:

        Horizontal rules and parts of table borders were made very slightly
        darker, and these results were never updated:
        * editing/inserting/4278698-expected.checksum:
        * editing/inserting/4278698-expected.png:
        * editing/unsupported-content/table-type-after-expected.checksum:
        * editing/unsupported-content/table-type-after-expected.png:
        * editing/unsupported-content/table-type-before-expected.checksum:
        * editing/unsupported-content/table-type-before-expected.png:
        * editing/deleting/table-cells-expected.checksum:
        * editing/deleting/table-cells-expected.png:

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

12 years ago Reviewed by Mitz.
andersca [Mon, 9 Apr 2007 19:51:27 +0000 (19:51 +0000)]
    Reviewed by Mitz.

        * plugins/resources/open-and-close-window-with-plugin.html:
        Try to fix the ASSERT on the build bot by scheduling a timeout that schedules a timeout.

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

12 years agoLayoutTests:
andersca [Mon, 9 Apr 2007 18:19:39 +0000 (18:19 +0000)]
LayoutTests:

        Reviewed by Darin.

        <rdar://problem/5120801>
        http://bugs.webkit.org/show_bug.cgi?id=13247
        Closing a page during slow cloning causes crash in setJSStatusBarText (13247)

        * fast/dom/Window/setting-properties-on-closed-window-expected.txt: Added.
        * fast/dom/Window/setting-properties-on-closed-window.html: Added.

WebCore:

        Reviewed by Darin.

        <rdar://problem/5120801>
        http://bugs.webkit.org/show_bug.cgi?id=13247
        Closing a page during slow cloning causes crash in setJSStatusBarText (13247)

        * bindings/js/kjs_window.cpp:
        (KJS::Window::put):
        Return early if m_frame is null. A closed window only has one property, "closed"
        so no properties should be settable in that case.

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

12 years ago2007-04-09 Andrew Wellington <proton@wiretapped.net>
andrew [Mon, 9 Apr 2007 11:48:45 +0000 (11:48 +0000)]
2007-04-09  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Justin Garcia.

        Layout test for http://bugs.webkit.org/show_bug.cgi?id=12959
        "REGRESSION: Edit -> Copy not enabled on standalone images"

        * editing/pasteboard/copy-standalone-image-expected.checksum: Added.
        * editing/pasteboard/copy-standalone-image-expected.png: Added.
        * editing/pasteboard/copy-standalone-image-expected.txt: Added.
        * editing/pasteboard/copy-standalone-image.html: Added.

2007-04-09  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Justin Garcia.

        Fix for http://bugs.webkit.org/show_bug.cgi?id=12959
        "REGRESSION: Edit -> Copy not enabled on standalone images"

        * dom/Document.h: Add support for determining if a document is an image
        (WebCore::Document::isImageDocument):
        * editing/Editor.cpp:
        (WebCore::Editor::canCopy): Image documents are copyable
        (WebCore::Editor::copy): If copying an image document, call appropriate pasteboard methods
        * loader/ImageDocument.h:
        (WebCore::ImageDocument::isImageDocument): Override to return true for image documents
        * platform/Pasteboard.h: Add new writeImage function to pasteboard
        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeImage): Add writeImage implementation that takes Node and URL
        * platform/qt/PasteboardQt.cpp:
        (WebCore::Pasteboard::writeImage): Stub for Qt implementation of pasteboard

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

12 years ago2007-04-08 Oliver Hunt <oliver@apple.com>
oliver [Mon, 9 Apr 2007 06:32:06 +0000 (06:32 +0000)]
2007-04-08  Oliver Hunt  <oliver@apple.com>

        rs=Adam.

        Add ASSERT(selectedRange) to previous change

        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeSelection):

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

12 years ago2007-04-08 Oliver Hunt <oliver@apple.com>
oliver [Mon, 9 Apr 2007 06:14:19 +0000 (06:14 +0000)]
2007-04-08  Oliver Hunt  <oliver@apple.com>

        rs=Adam.

        Fix minor error when writing selection to pasteboard.
        This shouldn't have an effect as selectedRange should be the
        selected range from source frame, however this is safer.

        * platform/mac/PasteboardMac.mm:
        (WebCore::Pasteboard::writeSelection):

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

12 years ago Fix mouseover/out failing layout tests.
hyatt [Mon, 9 Apr 2007 06:11:48 +0000 (06:11 +0000)]
    Fix mouseover/out failing layout tests.

        Reviewed by aroben

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::updateMouseEventTargetNode):
        (WebCore::EventHandler::dispatchMouseEvent):
        * page/EventHandler.h:

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

12 years ago2007-04-08 Oliver Hunt <oliver@apple.com>
oliver [Mon, 9 Apr 2007 04:30:31 +0000 (04:30 +0000)]
2007-04-08  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Fix for <rdar://problem/5113621> REGRESSION: Dragging PDF as image does not give any feedback

        If we fail when attempting to create a drag image for a dragged
        image, we fall back to the appropriate icon.

        * page/DragController.cpp:
        (WebCore::DragController::doImageDrag):

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

12 years ago Reviewed by Oliver.
aroben [Mon, 9 Apr 2007 03:32:13 +0000 (03:32 +0000)]
    Reviewed by Oliver.

        Bestowed the gift of -webkit-dashboard-region upon all platforms, since
        there's nothing Mac-specific about it other than the name. This also
        allowed me to get rid of FrameViewMac.mm.

        Removed a lot of #if PLATFORM(MAC):

        * css/CSSComputedStyleDeclaration.cpp:
        (WebCore::):
        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
        * css/CSSPrimitiveValue.cpp:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::cleanup):
        (WebCore::CSSPrimitiveValue::cssText):
        * css/CSSPrimitiveValue.h:
        (WebCore::CSSPrimitiveValue::getDashboardRegionValue):
        (WebCore::CSSPrimitiveValue::):
        * css/cssparser.cpp:
        (WebCore::CSSParser::parseValue):
        (WebCore::CSSParser::parseDashboardRegions):
        * css/cssparser.h:
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * dom/Document.cpp:
        (WebCore::Document::Document):
        * dom/Document.h:
        * page/Frame.cpp:
        (WebCore::Frame::paint):
        * page/Frame.h:
        * page/FrameView.cpp:
        (WebCore::FrameView::layout):
        (WebCore::FrameView::updateDashboardRegions): Moved from FrameViewMac.mm.
        * page/FrameView.h:
        * page/qt/FrameQt.cpp:
        (WebCore::Frame::dashboardRegionsChanged): Stubbed out.
        * platform/gdk/FrameGdk.cpp:
        (WebCore::Frame::dashboardRegionsChanged): Ditto.
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::scrollToOffset):
        (WebCore::RenderLayer::setHasHorizontalScrollbar):
        (WebCore::RenderLayer::setHasVerticalScrollbar):
        (WebCore::RenderLayer::updateScrollInfoAfterLayout):
        * rendering/RenderObject.cpp:
        (WebCore::RenderObject::setStyle):

        * WebCore.xcodeproj/project.pbxproj: Removed FrameViewMac.mm.
        * bridge/mac/FrameViewMac.mm: Removed.

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

12 years ago2007-04-08 Mark Rowe <mrowe@apple.com>
bdash [Sun, 8 Apr 2007 10:15:16 +0000 (10:15 +0000)]
2007-04-08  Mark Rowe  <mrowe@apple.com>

        Qt build fix.

        * platform/qt/TemporaryLinkStubs.cpp:

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

12 years agoLayoutTests:
ggaren [Sat, 7 Apr 2007 19:32:09 +0000 (19:32 +0000)]
LayoutTests:

        Reviewed by Beth Dakin.

        Layout tests for one more case of <rdar://problem/5112273> REGRESSION(TOT):
        Reproducible crash loading an old version of amazon.com as a web archive

        * fast/dom/null-document-xmlhttprequest-open-expected.txt: Added.
        * fast/dom/null-document-xmlhttprequest-open.html: Added.

WebCore:

        Reviewed by Beth Dakin.

        Fixed one more case of <rdar://problem/5112273> REGRESSION(TOT):
        Reproducible crash loading an old version of amazon.com as a web archive

        * bindings/js/JSXMLHttpRequest.cpp:
        (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):

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

12 years ago2007-04-06 Oliver Hunt <oliver@apple.com>
oliver [Sat, 7 Apr 2007 05:44:44 +0000 (05:44 +0000)]
2007-04-06  Oliver Hunt  <oliver@apple.com>

        Reviewed by Adam.

        Fix MouseEvent so it's possible to distinguish between
        a MouseMouseEvent with NoButton down, and a move with
        LeftButton down.  It would be nice if the DOM allowed
        for NoButton to exist, but it doesn't so this is necessary.

        * dom/EventTargetNode.cpp:
        (WebCore::EventTargetNode::dispatchMouseEvent):
        * dom/MouseEvent.cpp:
        (WebCore::MouseEvent::MouseEvent):
        (WebCore::MouseEvent::initMouseEvent):
        * dom/MouseEvent.h:
        (WebCore::MouseEvent::noButton):

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

12 years ago2007-04-07 Mark Rowe <mrowe@apple.com>
bdash [Sat, 7 Apr 2007 04:24:59 +0000 (04:24 +0000)]
2007-04-07  Mark Rowe  <mrowe@apple.com>

        Not reviewed.  Update to match some configuration changes that have been active on build.webkit.org.

        * BuildSlaveSupport/build.webkit.org-config/webkit/status.py:

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

12 years ago Not reviewed - gdk build fix.
kjk [Sat, 7 Apr 2007 03:31:48 +0000 (03:31 +0000)]
    Not reviewed - gdk build fix.

        * platform/gdk/MouseEventGdk.cpp:

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

12 years ago Reviewed by darin.
kjk [Sat, 7 Apr 2007 03:08:04 +0000 (03:08 +0000)]
    Reviewed by darin.

        Coverity fix. Coverity says:
        "Event var_deref_op: Variable "info_ptr" tracked as NULL was dereferenced."

        * platform/image-decoders/png/pngrutil.c:
        (png_handle_gAMA):

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

12 years agoIndex: WebCore/ChangeLog
kjk [Sat, 7 Apr 2007 03:05:13 +0000 (03:05 +0000)]
Index: WebCore/ChangeLog
===================================================================
--- WebCore/ChangeLog (revision 20709)
+++ WebCore/ChangeLog (working copy)
@@ -1,3 +1,13 @@
+2007-04-04  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
+
+        Reviewed by darin.
+
+        Coverity fix. Coverity says:
+        "Event var_deref_model: Variable "(this)->clientptr" tracked as NULL was passed to a function that dereferences it."
+
+        * platform/image-decoders/gif/GIFImageReader.cpp:
+        (GIFImageReader::read):
+
 2007-04-04  Adele Peterson  <adele@apple.com>

         Reviewed by Oliver.
Index: WebCore/platform/image-decoders/gif/GIFImageReader.cpp
===================================================================
--- WebCore/platform/image-decoders/gif/GIFImageReader.cpp (revision 20709)
+++ WebCore/platform/image-decoders/gif/GIFImageReader.cpp (working copy)
@@ -760,7 +760,8 @@ bool GIFImageReader::read(const unsigned
       if (query == GIFImageDecoder::GIFSizeQuery || haltAtFrame == images_decoded) {
         // The decoder needs to stop.  Hand back the number of bytes we consumed from
         // buffer minus 9 (the amount we consumed to read the header).
-        clientptr->decodingHalted(len + 9);
+        if (clientptr)
+            clientptr->decodingHalted(len + 9);
         GETN(9, gif_image_header);
         return true;
       }

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

12 years agoIndex: JavaScriptCore/ChangeLog
kjk [Sat, 7 Apr 2007 03:02:11 +0000 (03:02 +0000)]
Index: JavaScriptCore/ChangeLog
===================================================================
--- JavaScriptCore/ChangeLog (revision 20709)
+++ JavaScriptCore/ChangeLog (working copy)
@@ -1,3 +1,14 @@
+2007-04-04  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
+
+        Reviewed by darin.
+
+        Coverity fix. Coverity says:
+        "Event var_deref_model: Variable "sourceRanges" tracked as NULL was passed to a
+        function that dereferences it"
+
+        * kjs/string_object.cpp:
+        (KJS::replace):
+
 2007-04-03  Kevin McCullough  <kmccullough@apple.com>

         Reviewed by Adam.
Index: JavaScriptCore/kjs/string_object.cpp
===================================================================
--- JavaScriptCore/kjs/string_object.cpp (revision 20709)
+++ JavaScriptCore/kjs/string_object.cpp (working copy)
@@ -387,7 +387,9 @@ static JSValue *replace(ExecState *exec,
     if (lastIndex < source.size())
       pushSourceRange(sourceRanges, sourceRangeCount, sourceRangeCapacity, UString::Range(lastIndex, source.size() - lastIndex));

-    UString result = source.spliceSubstringsWithSeparators(sourceRanges, sourceRangeCount, replacements, replacementCount);
+    UString result;
+    if (sourceRanges)
+        result = source.spliceSubstringsWithSeparators(sourceRanges, sourceRangeCount, replacements, replacementCount);

     delete [] sourceRanges;
     delete [] replacements;

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

12 years ago Fix more of the layout test failures caused by fixing the slider layout test...
hyatt [Sat, 7 Apr 2007 00:56:03 +0000 (00:56 +0000)]
    Fix more of the layout test failures caused by fixing the slider layout test failure (sigh).  clear()
        needs to null out the capturingMouseEventsNode in the case where a mousedown or move while captured
        causes a navigation to another page.

        * page/EventHandler.cpp:
        (WebCore::EventHandler::clear):
        (WebCore::EventHandler::handleMouseReleaseEvent):

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

12 years ago Fix failing slider layout test. Don't clear the subframe capture unless...
hyatt [Sat, 7 Apr 2007 00:15:41 +0000 (00:15 +0000)]
    Fix failing slider layout test.  Don't clear the subframe capture unless we really were capturing on a
        subframe.

        Reviewed by adele, darin

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

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

12 years agoBuild fix attempt.
thatcher [Fri, 6 Apr 2007 23:59:17 +0000 (23:59 +0000)]
Build fix attempt.

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

12 years ago Reviewed by Geoff and Darin.
bdakin [Fri, 6 Apr 2007 23:56:04 +0000 (23:56 +0000)]
    Reviewed by Geoff and Darin.

        Fix for <rdar://problem/4875433> WebView underlines are too thick
        when scaled small

        When we have a small scale factor, we should follow the line-
        drawing code as if we were printing. Meaning, specifically, that we
        should not round to device pixels and we should antialias.

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

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

12 years agoLayoutTests:
ggaren [Fri, 6 Apr 2007 23:12:57 +0000 (23:12 +0000)]
LayoutTests:

        Reviewed by Beth Dakin.

        Layout tests for <rdar://problem/5112273> REGRESSION(TOT): Reproducible
        crash loading an old version of amazon.com as a web archive

        * fast/dom/null-document-location-assign-crash-expected.txt: Added.
        * fast/dom/null-document-location-assign-crash.html: Added.
        * fast/dom/null-document-location-href-put-crash-expected.txt: Added.
        * fast/dom/null-document-location-href-put-crash.html: Added.
        * fast/dom/null-document-location-put-crash-expected.txt: Added.
        * fast/dom/null-document-location-put-crash.html: Added.
        * fast/dom/null-document-location-replace-crash-expected.txt: Added.
        * fast/dom/null-document-location-replace-crash.html: Added.
        * fast/dom/null-document-window-open-crash-expected.txt: Added.
        * fast/dom/null-document-window-open-crash.html: Added.

WebCore:

        Reviewed by Beth Dakin.

        Fixed <rdar://problem/5112273> REGRESSION(TOT): Reproducible crash loading
        an old version of amazon.com as a web archive

        The problem was JavaScript executing inside a frame with a NULL document.
        It's probably a bug that the document was NULL, but we don't want a minor
        bug to be a crasher, and we don't want the DOM to depend on the implementation
        details of the JS bindings, so I added NULL checks.

        * bindings/js/kjs_window.cpp: Call FrameLoader::completeURL instead of
        Document::completeURL, since FrameLoader::completeURL is safe against a
        NULL document.
        (KJS::Window::put):
        (KJS::WindowFunc::callAsFunction):
        (KJS::Location::put):
        (KJS::LocationFunc::callAsFunction):

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

12 years ago Reviewed by Adele.
aroben [Fri, 6 Apr 2007 22:11:01 +0000 (22:11 +0000)]
    Reviewed by Adele.

        These two editing tests were using the wrong case for
        dumpEditingCallbacks, which meant that they were falling into DRT's
        invokeUndefinedMethodFromWebScript instead of actually turning on the
        callback dumping.

        This patch fixes the case of the call and updates the results.

        * editing/execCommand/4641880-1-expected.txt:
        * editing/execCommand/4641880-1.html:
        * editing/execCommand/4641880-2-expected.txt:
        * editing/execCommand/4641880-2.html:

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

12 years ago Fix for bug 13274. Rework mouse events so that subframe capturing works...
hyatt [Fri, 6 Apr 2007 21:37:48 +0000 (21:37 +0000)]
    Fix for bug 13274.  Rework mouse events so that subframe capturing works again.  Make sure
        everything just comes down through the top FrameView even when capturing is in effect.  Update
        scrollbar handling logic so that scrollbars receive events correctly while capturing is in
        effect.  Eliminate the notion of widget capture.  Fix mouse moves so that they only fire
        on the innermost hit frame.

        Reviewed by olliej

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleMouseDraggedEvent):
        (WebCore::subframeForTargetNode):
        (WebCore::EventHandler::handleMousePressEvent):
        (WebCore::EventHandler::handleMouseMoveEvent):
        (WebCore::EventHandler::handleMouseReleaseEvent):
        * page/EventHandler.h:
        * platform/PopupMenu.h:
        (WebCore::PopupMenu::scrollbarCapturingMouse):
        (WebCore::PopupMenu::setScrollbarCapturingMouse):
        * platform/ScrollBar.h:
        (WebCore::Scrollbar::handleMouseReleaseEvent):
        * platform/Widget.h:
        (WebCore::Widget::geometryChanged):

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

12 years agoLayoutTests:
justing [Fri, 6 Apr 2007 18:59:04 +0000 (18:59 +0000)]
LayoutTests:

        Reviewed by john

        <rdar://problem/5115601>
        REGRESSION: Crash deleting a selection that starts in an editable table cell

        * editing/deleting/5115601-expected.checksum: Added.
        * editing/deleting/5115601-expected.png: Added.
        * editing/deleting/5115601-expected.txt: Added.
        * editing/deleting/5115601.html: Added.

WebCore:

        Reviewed by john

        <rdar://problem/5115601>
        REGRESSION: Crash deleting a selection that starts in an editable table cell

        The selection starts at the start of an editable
        root that's embedded in a non-editable ToDo (table).
        Removing the selection removes all editable
        VisiblePositions from the root.  Then, the creation
        of mergeDestination fails, and using it causes a crash.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::mergeParagraphs):
        Nil-check mergeDestination to avoid crashing and
        also insert a break in that case at m_upstreamStart,
        so that we can create a valid mergeDestination and
        perform the merge.

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

12 years ago Rubber stamped by Adele Peterson.
ggaren [Fri, 6 Apr 2007 18:36:26 +0000 (18:36 +0000)]
    Rubber stamped by Adele Peterson.

        * kjs/ExecState.h: Removed obsolete forward/friend declaration of
        RuntimeMethodImp.

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

12 years ago Reviewed by.
kmccullo [Fri, 6 Apr 2007 17:47:06 +0000 (17:47 +0000)]
    Reviewed by.

        - Fixing a test failure.

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

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

12 years agoVersioning and ChangeLog markers.
bdash [Fri, 6 Apr 2007 16:55:12 +0000 (16:55 +0000)]
Versioning and ChangeLog markers.

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

12 years ago Reviewed by Mark Rowe.
thatcher [Fri, 6 Apr 2007 16:29:19 +0000 (16:29 +0000)]
    Reviewed by Mark Rowe.

        Adds a build phase script that ensures WebKit's version dosen't end in a 4.
        If our version ends in 4, some sites might think we are Netscape 4 in their
        user agent checks.

        * Configurations/Version.xcconfig:
        * WebKit.xcodeproj/project.pbxproj:

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

12 years ago2007-04-06 Mitz Pettel <mitz@webkit.org>
bdash [Fri, 6 Apr 2007 14:58:41 +0000 (14:58 +0000)]
2007-04-06  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Oliver.

        Eliminate PlatformMouseEvent::currentEvent.

        No test possible (no change to functionality).

        * page/EventHandler.cpp:
        (WebCore::EventHandler::handleDrag):
        * platform/PlatformMouseEvent.h:
        * platform/gdk/TemporaryLinkStubs.cpp:
        * platform/mac/PlatformMouseEventMac.mm:
        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
        * platform/qt/PlatformMouseEventQt.cpp:
        * platform/win/TemporaryLinkStubs.cpp:

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

12 years agoFix typo in ChangeLog.
bdash [Fri, 6 Apr 2007 14:56:25 +0000 (14:56 +0000)]
Fix typo in ChangeLog.

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

12 years ago2007-04-05 Oliver Hunt <oliver@apple.com>
oliver [Fri, 6 Apr 2007 06:45:53 +0000 (06:45 +0000)]
2007-04-05  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej.
WebCore:
        Fix for rdar://problem/4849948 -- JSCanvasRenderingContext2D::drawImage
        crashes when given invalid arguments.

        JSCanvasRenderingContext2D frequently casts from JSValue* to JSObject*
        and then checks isObject *after* the cast.  JSObject::isObject is unsafe
        if applied to a JSImmediate value (null, undefined, etc).  This patch
        corrects the logic in a number of places by performing the isObject check
        before casting to JSObject.

        * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
        (WebCore::JSCanvasRenderingContext2D::drawImage):
        (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
        (WebCore::JSCanvasRenderingContext2D::createPattern):

LayoutTests:
        Layout tests for rdar://problem/4849948
        Make sure we don't crash when passing invalid args to Canvas::drawImage

        * fast/canvas/drawImage-with-invalid-args-expected.checksum: Added.
        * fast/canvas/drawImage-with-invalid-args-expected.png: Added.
        * fast/canvas/drawImage-with-invalid-args-expected.txt: Added.
        * fast/canvas/drawImage-with-invalid-args.html: Added.

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

12 years agoLayoutTests:
adele [Fri, 6 Apr 2007 05:25:10 +0000 (05:25 +0000)]
LayoutTests:

        Reviewed by Oliver.

        Test for <rdar://problem/4965597> REGRESSION: mouseup doesn't fire for slider (causes it to always default to max)

        * fast/forms/slider-mouse-events-expected.txt: Added.
        * fast/forms/slider-mouse-events.html: Added.

WebCore:

        Reviewed by Oliver.

        Fix for <rdar://problem/4965597> REGRESSION: mouseup doesn't fire for slider (causes it to always default to max)

        Test: fast/forms/slider-mouse-events.html

        * page/EventHandler.cpp: (WebCore::EventHandler::dispatchMouseEvent):
        Since the actual target node of the event can't be a shadow node, set the target node to the capturing node before adjusting it.

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

12 years agoLayoutTests:
andersca [Fri, 6 Apr 2007 03:05:48 +0000 (03:05 +0000)]
LayoutTests:

        Reviewed by Adam.

        <rdar://problem/5083023>
        REGRESSION: In Real Player (10.1.0), video continues to play after closing window

        Add a test where a window containing a plugin is opened and then closed. The window is closed
        without calling -[WebView close].

        * plugins/open-and-close-window-with-plugin-expected.txt: Added.
        * plugins/open-and-close-window-with-plugin.html: Added.
        * plugins/resources/open-and-close-window-with-plugin.html: Added.

WebKit:

        Reviewed by Adam.

        <rdar://problem/5083023>
        REGRESSION: In Real Player (10.1.0), video continues to play after closing window

        This broke in revision 18422 because now the plugin isn't stopped when the window is closed. Since the window is retained
        by the plugin view for as long as it is running (so that removeTrackingRect works even though the window has been closed),
        we would end up with a reference cycle (NSWindow -> WebView -> PluginView -> NSWindow) and stopping the plug-in when the window
        was closed would break that cycle.

        Applications that call -[WebView close] when closing aren't affected, but RealPlayer doesn't do this.

        The bug that 18422 was supposed to fix was fixed by 19275, which is why it's safe to add back the check.

        * Plugins/WebBaseNetscapePluginView.mm:
        (-[WebBaseNetscapePluginView addWindowObservers]):
        (-[WebBaseNetscapePluginView removeWindowObservers]):
        (-[WebBaseNetscapePluginView windowWillClose:]):

WebKitTools:

        Reviewed by Adam.

        Add support for opening new windows in DumpRenderTree.

        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (+[LayoutTestController webScriptNameForSelector:]):
        (-[LayoutTestController setCallCloseOnWebViews:]):
        (-[LayoutTestController setCanOpenWindows]):
        Add two new methods callable from JavaScript. setCanOpenWindows controls whether a test
        can open new windows, and setCallCloseOnWebViews controls whether -[WebView close] should be called on
        web views that are about to be closed.

        (runTest):
        Make sure that only the main window is around when a test has finished running.

        (-[DumpRenderTreeWindow initWithContentRect:styleMask:backing:defer:]):
        (-[DumpRenderTreeWindow dealloc]):
        Manage the set of windows.

        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.c:
        * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h:
        * DumpRenderTree/TestNetscapePlugIn.subproj/main.c:
        (NPP_Destroy):
        Add a "logDestroy" property which controls whether plugins should print when they are destroyed or not.

        * DumpRenderTree/UIDelegate.m:
        (-[UIDelegate webView:createWebViewWithRequest:]):
        Create new windows.

        (-[UIDelegate webViewClose:]):
        Close windows.

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

12 years ago Reviewed by Maciej.
andersca [Fri, 6 Apr 2007 01:46:42 +0000 (01:46 +0000)]
    Reviewed by Maciej.

        Move WebView and NSWindow creation to a separate function in preparation of supporting opening new
        windows in DRT.

        * DumpRenderTree/DumpRenderTree.m:
        (createWebView):
        (dumpRenderTree):

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

12 years agoLayoutTests:
kmccullo [Fri, 6 Apr 2007 01:05:58 +0000 (01:05 +0000)]
LayoutTests:

        Reviewed by Darin.

        - Now we add a console message when local resources are blocked.

        * http/tests/security/local-CSS-from-remote-expected.txt:
        * http/tests/security/local-JavaScript-from-remote-expected.txt:
        * http/tests/security/local-iFrame-from-remote-expected.txt:
        * http/tests/security/local-image-from-remote-expected.txt:

WebCore:

        Reviewed by Darin.

        - Added reportLocalLoadFailed to FrameLoader to send an error to the console when
        calls to canLoad fail.

        * loader/Cache.cpp:
        (WebCore::Cache::requestResource):
        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::loadSubframe):
        (WebCore::FrameLoader::loadPlugin):
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::reportLocalLoadFailed):
        * loader/FrameLoader.h:
        * loader/SubresourceLoader.cpp:
        (WebCore::SubresourceLoader::create):

WebKit:

        Reviewed by Darin.

        - Moved registerURLSchemeAsLocal to the public API.

        * WebView/WebView.h:
        * WebView/WebView.mm:
        (+[WebView registerURLSchemeAsLocal:]):
        * WebView/WebViewPrivate.h:

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

12 years ago Reviewed by Maciej.
adele [Fri, 6 Apr 2007 00:42:03 +0000 (00:42 +0000)]
    Reviewed by Maciej.

        Add text-align: -webkit-auto for form controls.  Buttons already override this property to center their text.

        * css/html4.css:

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