17 years agoFix doctypes tests for list item changes.
hyatt [Wed, 29 Sep 2004 18:01:37 +0000 (18:01 +0000)]
Fix doctypes tests for list item changes.

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

17 years agoLand changes to CSS1 suite from <br> patch.
hyatt [Wed, 29 Sep 2004 17:59:43 +0000 (17:59 +0000)]
Land changes to CSS1 suite from <br> patch.

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

17 years agoLand changes to editing test from <br> patch.
hyatt [Wed, 29 Sep 2004 17:58:13 +0000 (17:58 +0000)]
Land changes to editing test from <br> patch.

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

17 years ago Make sure <br>s always get line boxes. Also prevent the creation of RenderTexts...
hyatt [Wed, 29 Sep 2004 17:55:00 +0000 (17:55 +0000)]
Make sure <br>s always get line boxes.  Also prevent the creation of RenderTexts for whitespace normal/nowrap nodes
that follow <br>s.

        Reviewed by kocienda

        * khtml/editing/visible_position.cpp:
        * khtml/rendering/render_br.cpp:
        * khtml/rendering/render_br.h:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_line.h:
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_text.h:
        * khtml/xml/dom_textimpl.cpp:
        * kwq/KWQRenderTreeDebug.cpp:

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

17 years ago Reviewed by John
kocienda [Wed, 29 Sep 2004 17:51:52 +0000 (17:51 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3815895> exception inside fontForSelection causes Mail to abort when selection hits bottom

        * khtml/editing/selection.cpp:
        (khtml::Selection::toRange): Use RangeImpl calls to detect exceptions when creating a Range
        from a Selection. Return an empty Range when there is an exception.

        Fix for this bug:

        <rdar://problem/3817268> REGRESSION (Mail): Window does not scroll when selecting out of
        visible area of view with arrow keys

        * khtml/editing/selection.cpp: Did some name changing. m_needsCaretLayout -> m_needsLayout.
        Added m_expectedVisibleRect which supplies the right rectangle to update when scrolling.
        (khtml::Selection::Selection): m_needsCaretLayout -> m_needsLayout name change.
        (khtml::Selection::init): Handle m_expectedVisibleRect in initialization.
        (khtml::Selection::operator=): Handle m_expectedVisibleRect in assignment.
        (khtml::Selection::setNeedsLayout): m_needsCaretLayout -> m_needsLayout name change.
        (khtml::Selection::layout): Changed name from layoutCaret, since m_expectedVisibleRect
        is also calculated here.
        (khtml::Selection::caretRect): m_needsCaretLayout -> m_needsLayout name change.
        (khtml::Selection::expectedVisibleRect): New. Returns m_expectedVisibleRect, doing a
        layout if needed.
        (khtml::Selection::needsCaretRepaint): m_needsCaretLayout -> m_needsLayout name change.
        (khtml::Selection::paintCaret): Ditto.
        (khtml::Selection::validate): Ditto.
        * khtml/editing/selection.h: Add m_expectedVisibleRect member variable and
        expectedVisibleRect accessor.
        * kwq/WebCoreBridge.h: Change name of ensureCaretVisible to ensureSelectionVisible, since
        this is not only about making the caret visible anymore. Now it can reveal the varying
        end of the selection when scrolling with arrow keys.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): ensureCaretVisible to
        ensureSelectionVisible name change.
        (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Ditto
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): Ditto
        (-[WebCoreBridge insertNewline]): Ditto
        (-[WebCoreBridge insertText:selectInsertedText:]): Ditto
        (-[WebCoreBridge deleteKeyPressed]): Ditto
        (-[WebCoreBridge ensureSelectionVisible]): Ditto

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

17 years agoWebCore:
kocienda [Wed, 29 Sep 2004 14:16:36 +0000 (14:16 +0000)]

        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3818296> REGRESSION (Mail): centerSelectionInVisibleArea does not work correctly

        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::centerSelectionInVisibleArea): New function. Handles both caret
        and range selections correctly.
        * kwq/KWQNSViewExtras.h: Add forceCentering boolean to some methods in this file.
        * kwq/KWQNSViewExtras.m: Ditto. This addition has been done since the AppKit
        method we use to do the centering, -[NSView scrollRectToVisible:],  does not alter
        the view if the rectangle passed to it is already in view. When forceCentering is
        true, extra math is done to make scrollRectToVisible center the rectangle we want.
        (-[NSView _KWQ_scrollFrameToVisible]): Pass NO for forceCentering in call through to
        (-[NSView _KWQ_scrollRectToVisible:forceCentering:]): Add forceCentering argument.
        (-[NSView _KWQ_scrollRectToVisible:inView:forceCentering:]): Ditto.
        (-[NSClipView _KWQ_scrollRectToVisible:inView:forceCentering:]): Ditto. Do extra
        math to implement the forceCentering effect.
        * kwq/KWQScrollView.h: Add forceCentering default argument to ensureRectVisibleCentered.
        * kwq/KWQScrollView.mm:
        (QScrollView::ensureRectVisibleCentered): Ditto.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge centerSelectionInVisibleArea]): New function. Call through to KWQKHTMLPart.


        Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3818296> REGRESSION (Mail): centerSelectionInVisibleArea does not work correctly

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView centerSelectionInVisibleArea:]): Now calls new centerSelectionInVisibleArea
        bridge function instead of ensureCaretVisible. Now handles caret selections and range
        selections correctly.

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

17 years ago Fixed: WebArchives begin with "<#document/>"
cblu [Wed, 29 Sep 2004 01:19:40 +0000 (01:19 +0000)]
Fixed: WebArchives begin with "<#document/>"

        Reviewed by hyatt.

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::startMarkup): don't return markup if this is a document node, forgot this when factoring this method out from toHTML

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

17 years ago Removed range parameter from recursive_toHTML and friends since that code path is...
cblu [Wed, 29 Sep 2004 01:02:38 +0000 (01:02 +0000)]
Removed range parameter from recursive_toHTML and friends since that code path is no longer used.

        Reviewed by mjs.

        * khtml/xml/dom2_rangeimpl.cpp:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge markupStringFromNode:nodes:]):

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

17 years ago Added timing code so that Doug can time RTF conversion.
cblu [Wed, 29 Sep 2004 00:34:09 +0000 (00:34 +0000)]
Added timing code so that Doug can time RTF conversion.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView writeSelectionWithPasteboardTypes:toPasteboard:]):
        (-[WebHTMLView _attributeStringFromDOMRange:]):

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

17 years ago Reviewed by Ken.
darin [Wed, 29 Sep 2004 00:17:10 +0000 (00:17 +0000)]
    Reviewed by Ken.

        - improve spell checking so it doesn't unmark and remark as you move the cursor with the arrow

        * khtml/editing/htmlediting.h: Remove obsolete markMisspellingsInSelection private function.
        * khtml/editing/htmlediting.cpp:
        (khtml::EditCommand::EditCommand): Blow away the selection when starting an edit command.
        (khtml::EditCommand::apply): Remove code to mark misspellings because that's now done as part
        of blowing away the selection.
        (khtml::EditCommand::unapply): Blow away the selection instead of marking mispellings.
        (khtml::EditCommand::reapply): Ditto.
        (khtml::ReplaceSelectionCommand::doApply): Removed incorrect code that does spell checking
        on inserted text; this doesn't match NSText behavior.
        (khtml::TypingCommand::markMisspellingsAfterTyping): Use markMisspellingsInAdjacentWords
        function for greater clarity on what this actually does.

        * khtml/khtml_part.h: Replaced setSelection's "unmarkOldSelection" boolean parameter with a
        "keepTypingStyle" boolean parameter. Removed notifySelectionChanged.
        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Replaced the "unmarkOldSelection" boolean with a new "keepTypingStyle"
        boolean. This is a step on the way to simplifying how this works. Moved the code from the
        notifySelectionChanged function here, since there was no clear line between the two functions.
        (KHTMLPart::clearSelection): Call setSelection rather that having special case code here for
        the case of an empty selection.
        (KHTMLPart::appliedEditing): Remove the explicit "false" for "unmarkOldSelection".
        (KHTMLPart::unappliedEditing): Ditto.
        (KHTMLPart::reappliedEditing): Ditto.

        * kwq/KWQKHTMLPart.h: Replaced markMisspellingsInSelection and updateSpellChecking with
        markMisspellings and markMisspellingsInAdjacentWords. Added parameters to respondToChangedSelection.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::markMisspellingsInAdjacentWords): Added.
        (KWQKHTMLPart::markMisspellings): New name for markMisspellingsInSelection. Simplified logic a
        bit and made it the caller's responsibility to expand the selection passed in to word boundaries.
        (KWQKHTMLPart::respondToChangedSelection): Added parameter that identifies the old selection,
        and changed logic so it won't mark mispellings in a word if the selection still starts in that word.

        - implemented empty-cells property in computed style

        * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        Added code for CSS_PROP_EMPTY_CELLS. I think the HTML converter in AppKit uses this.

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

17 years ago Fixed n-squared issues with appending to KWQValueListImpl. This fixes the hang in...
cblu [Tue, 28 Sep 2004 22:55:28 +0000 (22:55 +0000)]
Fixed n-squared issues with appending to KWQValueListImpl. This fixes the hang in 3794799.

        Fixed by Darin, reviewed by me.

        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::toHTML): tweaks
        * kwq/KWQValueListImpl.mm:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge nodesFromList:]): use iterator, not at()

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

17 years agoWebCore:
rjw [Tue, 28 Sep 2004 20:57:48 +0000 (20:57 +0000)]
More dashboard region changes for John.

        <rdar://problem/3817421> add getter for dashboard regions (debugging)

        <rdar://problem/3817417> NSScrollView need autoregions for dashboard

        <rdar://problem/3817388> should have short form form control regions

        <rdar://problem/3817477> visibility does not work with dashboard control regions

        Reviewed by Hyatt.

        * WebCore-combined.exp:
        * WebCore.exp:
        * khtml/css/cssparser.cpp:
        * khtml/khtmlview.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge dashboardRegions]):
        * kwq/WebDashboardRegion.h:
        * kwq/WebDashboardRegion.m:
        (-[WebDashboardRegion description]):

More dashboard region changes for John.

        <rdar://problem/3817421> add getter for dashboard regions (debugging)

        <rdar://problem/3817417> NSScrollView need autoregions for dashboard
Also KWQScrollBars

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge dashboardRegionsChanged:]):
        * WebView.subproj/WebView.m:
        (-[WebView _setInitiatedDrag:]):
        (-[WebView _addScrollerDashboardRegions:from:]):
        (-[WebView _addScrollerDashboardRegions:]):
        (-[WebView _dashboardRegions]):
        * WebView.subproj/WebViewPrivate.h:

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

17 years agoUpdated the output of the script type test for more clarity; updated the expected...
sullivan [Tue, 28 Sep 2004 20:07:21 +0000 (20:07 +0000)]
Updated the output of the script type test for more clarity; updated the expected results too.

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

17 years ago Reviewed by Chris.
sullivan [Tue, 28 Sep 2004 18:55:48 +0000 (18:55 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/3818558> REGRESSION: "Installed Plug-ins" is blank
        because of <script type="application/x-javascript">

        * khtml/html/htmltokenizer.cpp:
        add "application/x-javascript" to the list of legal scripting types. Mozilla
        accepts this, but WinIE doesn't.

        * layout-tests/fast/tokenizer/004.html:
        updated layout test to test some application/xxxx types

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

17 years agoNew list results.
hyatt [Tue, 28 Sep 2004 18:33:11 +0000 (18:33 +0000)]
New list results.

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

17 years ago Reworked lists to work well with RTL text. Specifically the following bugs have...
hyatt [Tue, 28 Sep 2004 18:32:47 +0000 (18:32 +0000)]
Reworked lists to work well with RTL text.  Specifically the following bugs have been fixed:

(1) All bullets use the same offset constant now (a padding of 7 pixels).  Before, images used 5 and others used 7.
(2) Line height now works properly, so that list items with no content aren't squished (and missing the line descent).
(3) Punctuation now works correctly with inside and outside style ordered lists in RTL.
(4) RTL lists now properly apply padding and margin to the right side rather than the left.  This was done by adding
-khtml-margin-start and -khtml-padding-start properties that are just mapped to left/right based off the direction.

        Reviewed by darin

        * khtml/css/cssparser.cpp:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/html4.css:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_list.cpp:

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

17 years agoList layout test changes.
hyatt [Tue, 28 Sep 2004 18:29:34 +0000 (18:29 +0000)]
List layout test changes.

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

17 years ago Reviewed by Darin
kocienda [Tue, 28 Sep 2004 18:24:53 +0000 (18:24 +0000)]
    Reviewed by Darin

        Mark the VisiblePosition taking (Position &, EAffinity=DOWNSTREAM) explicit. Recently, when I added
        the EAffinity argument, I left this constructor implicit. Darin pointed out to me that this is
        undesirable since implicit use of the the constructor involved making the affinity choice, something
        which should be done explicitly.

        * khtml/editing/selection.cpp:
        (khtml::Selection::modifyExtendingRightForward): Make explicit use of constructor mentioned above.
        (khtml::Selection::modifyMovingRightForward): Ditto.
        (khtml::Selection::modifyExtendingLeftBackward): Ditto.
        (khtml::Selection::modifyMovingLeftBackward): Ditto.
        (khtml::Selection::modify): Ditto.
        (khtml::Selection::validate): Ditto.
        * khtml/editing/visible_position.h: Make constructor taking (Position &, EAffinity) explicit.
        * khtml/editing/visible_units.cpp: Ditto.
        (khtml::previousWordBoundary): Make explicit use of constructor mentioned above.
        (khtml::nextWordBoundary): Ditto.
        (khtml::previousLinePosition): Ditto.
        (khtml::nextLinePosition): Ditto.
        * kwq/KWQKHTMLPart.mm: Ditto.
        (KWQKHTMLPart::findString): Ditto.
        (KWQKHTMLPart::advanceToNextMisspelling): Ditto.
        (KWQKHTMLPart::markMisspellingsInSelection): Ditto.
        (KWQKHTMLPart::updateSpellChecking): Ditto.

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

17 years ago Reviewed by John.
darin [Tue, 28 Sep 2004 16:43:27 +0000 (16:43 +0000)]
    Reviewed by John.

        - fixed a storage leak discovered by code inspection

        * khtml/html/htmlparser.cpp: (KHTMLParser::~KHTMLParser): Call setCurrent(0) to deref
        the parser's current node in the rare case where it still has one.

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

17 years ago - fixed <rdar://problem/3814705> 8A266: Safari authentication dialog "remembe...
sullivan [Tue, 28 Sep 2004 01:08:17 +0000 (01:08 +0000)]
    - fixed <rdar://problem/3814705> 8A266: Safari authentication dialog "remember password" text should match Mail

        * Panels.subproj/English.lproj/WebAuthenticationPanel.nib:
        changed "Remember this password" to "Remember this password in my keychain";
        this will need to go through CCC for this week's build.

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

17 years ago*** empty log message ***
hyatt [Tue, 28 Sep 2004 01:01:05 +0000 (01:01 +0000)]
*** empty log message ***

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

17 years ago Don't allow nested headers when only inlines are in between them. Fixes a hang...
hyatt [Tue, 28 Sep 2004 00:58:45 +0000 (00:58 +0000)]
Don't allow nested headers when only inlines are in between them.  Fixes a hang related to pathological nesting
on magicmethodsonline.com.

        Reviewed by darin

        * khtml/html/htmlparser.cpp:
        * khtml/html/htmlparser.h:

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

17 years agoChangeLog
hyatt [Tue, 28 Sep 2004 00:57:52 +0000 (00:57 +0000)]

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

17 years ago Fixed: <rdar://problem/3594754> change null event interval from 20 ms to 10 ms to...
cblu [Mon, 27 Sep 2004 23:17:58 +0000 (23:17 +0000)]
Fixed: <rdar://problem/3594754> change null event interval from 20 ms to 10 ms to match speed on Windows

        Reviewed by NOBODY (OOPS!).

        * Plugins.subproj/WebBaseNetscapePluginView.m:

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

17 years agoWebKit:
cblu [Mon, 27 Sep 2004 22:56:01 +0000 (22:56 +0000)]

Fixed previous reviewer line.

        * ChangeLog:


Fixed typo.

        * ChangeLog:

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

17 years ago Fixed: <rdar://problem/3502138> text files don't remember scroll position when going...
cblu [Mon, 27 Sep 2004 22:22:32 +0000 (22:22 +0000)]
Fixed: <rdar://problem/3502138> text files don't remember scroll position when going back or reloading

        Reviewed by .

        * WebView.subproj/WebTextView.m:
        (-[WebTextView layout]): implemented, call sizeToFit, without this scrollPoint: won't work

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

17 years agoWebKit:
sullivan [Mon, 27 Sep 2004 21:30:50 +0000 (21:30 +0000)]

        Reviewed by Ken.

        - WebKit part of fix for <rdar://problem/3734466> ER: Support standard editing keystrokes
        like Cmd-B while editing rich text

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _toggleBold]):
        new method, toggles font-weight from "bold" to "normal"
        (-[WebHTMLView _toggleItalic]):
        new method, toggles font-style from "italic" to "normal"
        (-[WebHTMLView _handleStyleKeyEquivalent:]):
        new method, if the new preference is set and we're in an editable state, check for standard
        key equivalents for toggling styles (just command-B and command-I for now).
        (-[WebHTMLView performKeyEquivalent:]):
        Moved in file, now calls _handleStyleKeyEquivalent:

        * WebView.subproj/WebPreferenceKeysPrivate.h:
        new preference key WebKitRespectStandardStyleKeyEquivalentsPreferenceKey
        * WebView.subproj/WebPreferences.m:
        (+[WebPreferences initialize]):
        initial value of WebKitRespectStandardStyleKeyEquivalentsPreferenceKey is NO (maybe we'll
        change our minds about this, but this is more guaranteed to be backward-compatible)
        (-[WebPreferences respectStandardStyleKeyEquivalents]):
        read WebKitRespectStandardStyleKeyEquivalentsPreferenceKey
        (-[WebPreferences setRespectStandardStyleKeyEquivalents:]):
        write WebKitRespectStandardStyleKeyEquivalentsPreferenceKey

        * WebView.subproj/WebPreferencesPrivate.h:
        declare getter and setter

        * English.lproj/StringsNotToBeLocalized.txt:
        updated for these and other recent changes


        Reviewed by Ken.

        - WebBrowser part of fix for <rdar://problem/3734466> ER: Support standard editing keystrokes
        like Cmd-B while editing rich text

        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        turn on the new WebKit preference that makes command-B and command-I toggle styles in
        editable text.

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

17 years agoWebKit:
cblu [Mon, 27 Sep 2004 18:41:19 +0000 (18:41 +0000)]

Fixed: <rdar://problem/3806649> assertion failure after control-click of webcam

        Reviewed by john.

        * WebView.subproj/WebDefaultContextMenuDelegate.m:
        (-[WebDefaultUIDelegate contextMenuItemsForElement:]): don't provide "Copy Image" if the image is not fully loaded


Fixed:  Fixed: <rdar://problem/3806649> assertion failure after control-click of webcam

        Reviewed by john.

        * ContextMenuHandler.m:
        (-[BrowserWebView webView:contextMenuItemsForElement:defaultMenuItems:]): don't provide "Save Image", "Copy Image" and "Add Image to iPhoto Library" if the image is not fully loaded. Provide "Download Image" instead.

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

17 years agoland fixed frame result.
hyatt [Mon, 27 Sep 2004 18:39:02 +0000 (18:39 +0000)]
land fixed frame result.

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

17 years agoLand fixed overflow result.
hyatt [Mon, 27 Sep 2004 18:35:57 +0000 (18:35 +0000)]
Land fixed overflow result.

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

17 years ago Reviewed by John.
kdecker [Mon, 27 Sep 2004 18:00:13 +0000 (18:00 +0000)]
    Reviewed by John.

        * khtml/css/css_base.cpp:
        (CSSSelector::selectorText): changed another ATTR_CLASS case to properly return class selector names.

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

17 years ago Fix style sharing so that it doesn't share when it shouldn't. Partially fixes 36715...
hyatt [Mon, 27 Sep 2004 17:52:18 +0000 (17:52 +0000)]
Fix style sharing so that it doesn't share when it shouldn't.  Partially fixes 3671516, table cells don't update
their color on macosx.apple.com.

Fix 3521639, iframe mispositioned on bidi page.  Make sure that when the width of a line exceeds the available line
width that the spillage out of the block is determined by the direction of the block and not by the text-align value.

Partial fix for 3762962, make sure the image cells with specified widths but percentage heights don't just get a minwidth
of 0.

Fix for 3533878, framesets that use percentages that add up to a value > 100% should normalize those percentages.

        Reviewed by john

        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/html/html_elementimpl.h:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/render_frames.cpp:
        * khtml/rendering/render_replaced.cpp:
        * khtml/xml/dom_elementimpl.h:

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

17 years ago Reviewed by John
kocienda [Mon, 27 Sep 2004 17:49:54 +0000 (17:49 +0000)]
    Reviewed by John

        Removed closestRenderedPosition function from Position class and gave this work
        to VisiblePosition instead. However, in order to make the transfer possible,
        VisiblePosition needed upstream and downstream affinities added to its
        constructors. Also moved the EAffinity enum into its own file. Also moved it
        to the khtml namespace.

        Updated several functions which used closestRenderedPosition to use VisiblePosition

        Also deleted Position::equivalentShallowPosition. This was unused.

        * ForwardingHeaders/editing/text_affinity.h: Added.
        * ForwardingHeaders/editing/visible_position.h: Added.
        * WebCore.pbproj/project.pbxproj: Added new files.
        * khtml/editing/selection.cpp:
        (khtml::Selection::validate): Use VisiblePosition instead of closestRenderedPosition.
        * khtml/editing/selection.h:
        * khtml/editing/text_affinity.h: Added.
        * khtml/editing/visible_position.cpp:
        (khtml::VisiblePosition::initUpstream): New helper for finding upstream visible position.
        (khtml::VisiblePosition::initDownstream): Was old init function that unconditionally did
        downstream checks for visible position. Renamed to describe this more clearly.
        * khtml/editing/visible_position.h:
        * khtml/editing/visible_units.cpp:
        (khtml::previousWordBoundary): Use VisiblePosition instead of closestRenderedPosition.
        (khtml::nextWordBoundary): Use VisiblePosition instead of closestRenderedPosition.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): Use VisiblePosition instead of closestRenderedPosition.
        * khtml/xml/dom_position.cpp:
        (DOM::Position::closestRenderedPosition): Removed.
        * khtml/xml/dom_position.h: Removed two functions mentioned above.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::fontForSelection) Use VisiblePosition instead of closestRenderedPosition.:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectedDOMRange:affinity:]): Use VisiblePosition instead of closestRenderedPosition.
        * layout-tests/editing/deleting/delete-block-merge-contents-012-expected.txt: Updated expected results.
        * layout-tests/editing/deleting/delete-block-merge-contents-017-expected.txt: Ditto.
        * layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt: Ditto.
        * layout-tests/editing/selection/move-by-character-004-expected.txt: Ditto.

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

17 years ago Fixed: <rdar://problem/3814810> REGRESSION (125-164): Exception adding nil to dictio...
cblu [Mon, 27 Sep 2004 16:36:01 +0000 (16:36 +0000)]
Fixed: <rdar://problem/3814810> REGRESSION (125-164): Exception adding nil to dictionary in dragging code

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _setMouseDownEvent:]): new
        (-[WebHTMLView acceptsFirstMouse:]): call _setMouseDownEvent
        (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): ditto
        (-[WebHTMLView mouseDown:]): ditto
        (-[WebHTMLView _delegateDragSourceActionMask]): removed temp fix, assert that the mouse event is not nil

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

17 years ago * WebKit.pbproj/project.pbxproj: Added WebDashboardRegion.h as a private...
darin [Mon, 27 Sep 2004 15:30:06 +0000 (15:30 +0000)]
    * WebKit.pbproj/project.pbxproj: Added WebDashboardRegion.h as a private header.

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

17 years ago Reviewed by Darin and Maciej
kocienda [Mon, 27 Sep 2004 14:44:26 +0000 (14:44 +0000)]
    Reviewed by Darin and Maciej

        Removed EditCommand smart pointer wrappers from htmlediting.cpp/.h, save for the one
        at the root of the hierarchy, and this one has been renamed EditCommandPtr. Renamed
        each of the XXXCommandImpl classes, removing the Impl suffix from each, and rolled
        these into the htmlediting.cpp/.h files. The htmlediting_impl.cpp/.h files have
        been emptied and are being removed.

        For the remainder of files, perform the mechanical changes necessary to make everything
        compile and run as before.

        * WebCore.pbproj/project.pbxproj
        * khtml/editing/htmlediting.cpp
        * khtml/editing/htmlediting.h
        * khtml/editing/htmlediting_impl.cpp: Removed.
        * khtml/editing/htmlediting_impl.h: Removed.
        * khtml/editing/jsediting.cpp
        * khtml/khtml_part.cpp
        * khtml/khtml_part.h
        * khtml/khtmlpart_p.h
        * kwq/KWQEditCommand.h
        * kwq/KWQEditCommand.mm
        (-[KWQEditCommand initWithEditCommandImpl:])
        (+[KWQEditCommand commandWithEditCommandImpl:])
        (-[KWQEditCommand impl])
        * kwq/KWQKHTMLPart.h
        * kwq/KWQKHTMLPart.mm
        * kwq/WebCoreBridge.mm
        (-[WebCoreBridge undoEditing:])
        (-[WebCoreBridge redoEditing:])
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
        (-[WebCoreBridge moveSelectionToDragCaret:smartMove:])
        (-[WebCoreBridge deleteSelectionWithSmartDelete:])

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

17 years ago Reviewed by Maciej.
darin [Mon, 27 Sep 2004 04:59:46 +0000 (04:59 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3816170> image.width/height not available from Image objects (works in Firefox)

        * khtml/ecma/kjs_html.h: Added width and height.
        * khtml/ecma/kjs_html.cpp: (Image::getValueProperty): Added width and height.
        * khtml/ecma/kjs_html.lut.h: Regenerated.

        - unrelated change; changed ordering of use count manipulation just in case we decide some day to do
          something when the use count hits 0

        * khtml/rendering/render_image.cpp: (RenderImage::setPixmap): Increment use count on new object before
        decrementing use count on old object.

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

17 years agoNew layout tests for the bugs I just fixed.
darin [Mon, 27 Sep 2004 02:07:37 +0000 (02:07 +0000)]
New layout tests for the bugs I just fixed.

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

17 years ago * kjs/string_object.cpp: (StringProtoFuncImp::call): Remove strange use of...
darin [Mon, 27 Sep 2004 01:54:30 +0000 (01:54 +0000)]
    * kjs/string_object.cpp: (StringProtoFuncImp::call): Remove strange use of high() and
        low() to get Unicode value of character, and just use unicode().

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

17 years ago - refine charAt/charCodeAt fix slightly
darin [Mon, 27 Sep 2004 01:52:53 +0000 (01:52 +0000)]
    - refine charAt/charCodeAt fix slightly

        * kjs/string_object.cpp: (StringProtoFuncImp::call): Treat undefined the same was as an
        omitted parameter, as we do everywhere else, and as other browsers do here.

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

17 years ago Reviewed by Kevin.
darin [Mon, 27 Sep 2004 01:02:39 +0000 (01:02 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3812771> document.implementation.hasFeature returns false for a lot of features we implement

        * khtml/xml/dom_docimpl.cpp: (DOMImplementationImpl::hasFeature): Added all the DOM features that we implemented
        as part of the HTML editing work.

        * khtml/dom/dom_node.cpp: (Node::isSupported): Changed this to call DOMImplementationImpl::hasFeature to share
        code. Later this might need to be different per-node, but at the moment that does not seem to be so.

        * khtml/ecma/kjs_dom.cpp:
        (DOMNodeProtoFunc::tryCall): Pass a null string if the parameter is omitted, undefined, or null. This is better than
        having a special case for the string "null" in the DOM implementation.
        (DOMDOMImplementationProtoFunc::tryCall): Ditto.

        - fixed <rdar://problem/3814605> REGRESSION: fast/table/039 layout test is failing due to extra trailing whitespace in innerText

        * khtml/editing/visible_text.cpp: (khtml::TextIterator::advance): Check for the case where we are at the end of
        iteration, and don't call exitNode in that case. This prevents us from getting some unwanted trailing \n characters.

        - fixed <rdar://problem/3813253> method cloneNode() does not clone dynamically-set style attributes correctly

        * khtml/html/html_elementimpl.h: Added cloneNode override.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::cloneNode): Added. Copies m_inlineStyleDecl.
        (HTMLElementImpl::parseHTMLAttribute): Changed to use getInlineStyleDecl().
        (HTMLElementImpl::innerText): Changed to do the same thing with fewer lines of code.
        (HTMLElementImpl::outerText): Tweaked comment.

        - other cleanup

        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::cloneNode): Removed an uneeded type cast.
        (XMLElementImpl::cloneNode): Ditto.

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

17 years ago Reviewed by Kevin.
darin [Mon, 27 Sep 2004 01:01:00 +0000 (01:01 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3816097> REGRESSION: mailblocks, and presumably many other pages, failing because variable not found

        * kjs/internal.cpp: (InterpreterImp::evaluate): Process variable declarations before executing
        the program. We were doing this properly for functions, but not entire programs.

        - fixed <rdar://problem/3814706> REGRESSION: text fields in mailblocks wizards do not accept keystrokes due to use of charCodeAt()

        * kjs/string_object.cpp: (StringProtoFuncImp::call): Changed the implementation of charAt
        and charCodeAt to treat a missing parameter as an index of 0, rather than an invalid index.

        * tests/mozilla/expected.html: Update for two tests that now pass with these changes.

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

17 years ago Reviewed by Maciej.
kdecker [Sat, 25 Sep 2004 00:44:50 +0000 (00:44 +0000)]
    Reviewed by Maciej.

<rdar://problem/3799334> DIG: Safari does not properly return style names [DigCSS.htm]

        * khtml/css/css_base.cpp:
        (CSSSelector::selectorText): Properly returns Class Selector names.
Before we would get *[CLASS"foo"] instead of .foo

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

17 years ago Reviewed by John
kocienda [Fri, 24 Sep 2004 23:27:41 +0000 (23:27 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3814660> REGRESSION (8A200-8A259): Select All has no effect on livepage.apple.com

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection): Move the selection start and end to rendered positions
        before passing off to the RenderCanvas for drawing.
        * layout-tests/editing/selection/select-all-004-expected.txt: Added.
        * layout-tests/editing/selection/select-all-004.html: Added.

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

17 years ago Reviewed by Maciej.
sullivan [Fri, 24 Sep 2004 23:23:26 +0000 (23:23 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3528339> Turn on full keyboard access shows
        invisible <input> elements

        * khtml/html/html_formimpl.cpp:
        reject elements that have zero width or height, even if they aren't hidden

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

17 years ago - fixed deployment build
mjs [Fri, 24 Sep 2004 23:09:10 +0000 (23:09 +0000)]
- fixed deployment build

        Reviewed by Ken.

        * khtml/dom/dom_string.cpp: put implementation of ascii() in #ifdef !NDEBUG
to match prototype.

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

17 years agoFix layout test 37.
hyatt [Fri, 24 Sep 2004 22:38:08 +0000 (22:38 +0000)]
Fix layout test 37.

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

17 years ago Fix for 3800316, test 37 for tables is failing on the layout tests. Make sure we...
hyatt [Fri, 24 Sep 2004 22:14:45 +0000 (22:14 +0000)]
Fix for 3800316, test 37 for tables is failing on the layout tests.  Make sure we don't incorrectly match
non-HTML elements with HTML tag selectors in CSS.

        Reviewed by rjw

        * khtml/css/cssstyleselector.cpp:

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

17 years ago Fix for 3601920, CSS "tabs" not switching properly on zen garden design. Improve...
hyatt [Fri, 24 Sep 2004 22:09:52 +0000 (22:09 +0000)]
Fix for 3601920, CSS "tabs" not switching properly on zen garden design.  Improve the repainting to account
for layer changes of z-index that necessitate an invalidation.

        Reviewed by kocienda

        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

17 years agoWebCore:
cblu [Fri, 24 Sep 2004 21:44:02 +0000 (21:44 +0000)]

Made markup copying 5 times faster. Unfortunately, this still doesn't fix:
<rdar://problem/3794799> Tiger8A252: copying a bunch o' text is so slow it seems like a hang

        Reviewed by rjw.

        * khtml/dom/dom_string.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::toHTML): serialize the range by iterating through the range
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::startMarkup): new, factored out from recursive_toString
        (NodeImpl::endMarkup): ditto
        (NodeImpl::recursive_toString): call factored out methods
        * khtml/xml/dom_nodeimpl.h:


        Reviewed by rjw.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _selectedArchive]): added timing code for copying markup

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

17 years agoversioning for TOT, Safari 2.0 (v166u)
vicki [Fri, 24 Sep 2004 21:42:38 +0000 (21:42 +0000)]
versioning for TOT, Safari 2.0 (v166u)

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

17 years agoSafari-165 stamp for everything except WebBrowser. In these projects, CFBundleShortV...
vicki [Fri, 24 Sep 2004 21:31:27 +0000 (21:31 +0000)]
Safari-165 stamp for everything except WebBrowser.  In these projects, CFBundleShortVersionString matches CFBundleVersion (165 for both).

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

17 years ago Temp fix for: <rdar://problem/3814810> REGRESSION (125-164): Exception adding nil...
cblu [Fri, 24 Sep 2004 20:34:13 +0000 (20:34 +0000)]
Temp fix for: <rdar://problem/3814810> REGRESSION (125-164): Exception adding nil to dictionary in dragging code

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _delegateDragSourceActionMask]): return none if the mouse down event is nil

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

17 years ago Reviewed by me
kocienda [Fri, 24 Sep 2004 18:12:09 +0000 (18:12 +0000)]
    Reviewed by me

        Hyatt made an improvement in the render tree which caused the results
        to get a little thinner.

        * layout-tests/editing/deleting/delete-block-merge-contents-001-expected.txt.
        * layout-tests/editing/deleting/delete-block-merge-contents-008-expected.txt.

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

17 years ago Reviewed by Hyatt
kocienda [Fri, 24 Sep 2004 17:51:35 +0000 (17:51 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3812939> REGRESSION: move-between-blocks-no-001 editing layout test fails in DeleteSelectionCommandImpl

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::removeChild): Hyatt said this regression was caused by a bad merge.
        Found by code inspection.

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

17 years ago Reviewed by John
kocienda [Fri, 24 Sep 2004 17:49:46 +0000 (17:49 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3813917> REGRESSION (125-163): The font panel will change the font of any web page

        We were doing a laughably bad job at preventing edits in documents that were not editable.
        This change fixes the specific case of the bug mentioned above, and makes an attempt to
        fix similar bugs by checking for whether the view is in editing mode before making edits.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _canEdit]): Renamed from _canType. Used in many more places in the code now.
        (-[WebHTMLView _isMoveDrag]): Change around code to make the meaning more clear. This one
        was actually performing a correct check before.
        (-[WebHTMLView keyDown:]): Renamed _canType to _canEdit.
        (-[WebHTMLView paste:]): Don't beep if can't paste. This matches AppKit. Any paste-related beeps
        will come from failure to handle key equivalent. Menu validation will kick in to dim menu.
        (-[WebHTMLView _applyStyleToSelection:]): Bail if !_canEdit.
        (-[WebHTMLView pasteAsPlainText:]): Ditto.
        (-[WebHTMLView _alignSelectionUsingCSSValue:]): Ditto.
        (-[WebHTMLView insertNewline:]): Ditto.
        (-[WebHTMLView insertParagraphSeparator:]): Ditto.
        (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:]): Ditto.
        (-[WebHTMLView complete:]): Ditto.
        (-[WebHTMLView _changeSpellingToWord:]): Ditto. Some code rearranging to eliminate bridge local variable.
        (-[WebHTMLView ignoreSpelling:]): Ditto.
        (-[WebHTMLView yank:]): Bail if !_canEdit.
        (-[WebHTMLView yankAndSelect:]): Ditto.
        (-[WebHTMLView deleteToMark:]): Ditto.
        (-[WebHTMLView swapWithMark:]): Ditto.
        (-[WebHTMLView transpose:]): Ditto.
        (-[WebHTMLView _updateFontPanel]): Ditto. Some code rearranging to eliminate bridge local variable.
        (-[WebHTMLView setMarkedText:selectedRange:]): Bail if !_canEdit.
        (-[WebHTMLView _insertText:selectInsertedText:]): Ditto. Some code rearranging to eliminate bridge local variable.
        * WebView.subproj/WebHTMLViewPrivate.h: Renamed _canType to _canEdit.

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

17 years ago Reviewed by me
kocienda [Fri, 24 Sep 2004 16:37:08 +0000 (16:37 +0000)]
    Reviewed by me

        * WebCoreSupport.subproj/WebDashboardRegion.h: Check in file copied from WebCore.

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

17 years agoLayout tests for acceptable and unacceptable values of "language" and "type" attribut...
sullivan [Fri, 24 Sep 2004 15:35:20 +0000 (15:35 +0000)]
Layout tests for acceptable and unacceptable values of "language" and "type" attributes for <script> tags.

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

17 years ago Reviewed by Maciej.
sullivan [Fri, 24 Sep 2004 02:20:14 +0000 (02:20 +0000)]
    Reviewed by Maciej.

        - fixed <rdar://problem/3551850> hang caused by interpreting bad javascript
        guarded by a deliberately bogus "language" attribute (www.riibe.com)

        * khtml/html/htmltokenizer.cpp:
        Check for language attribute of <script> tag in a way that matches WinIE.
        Previously we were far too permissive.

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

17 years ago Fix for 3685234 and 3548444, the x-offset for frame borders was off by 1 pixel,...
hyatt [Fri, 24 Sep 2004 00:27:44 +0000 (00:27 +0000)]
Fix for 3685234 and 3548444, the x-offset for frame borders was off by 1 pixel, causing mojibake to occur when
repainting happened.

        * khtml/rendering/render_canvas.cpp:

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

17 years ago Fixed <rdar://problem/3813271> dashboard-region-circle and dashboard-region-rectangl...
rjw [Fri, 24 Sep 2004 00:17:57 +0000 (00:17 +0000)]
Fixed <rdar://problem/3813271> dashboard-region-circle and dashboard-region-rectangle should be collapsed into dashboard-region
Fixed <rdar://problem/3813289> dashboard regions need to correctly account for overflow/scrolling

        Reviewed by Chris.

        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/khtmlview.cpp:
        * khtml/khtmlview.h:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebDashboardRegion.h:
        * kwq/WebDashboardRegion.m:
        (-[WebDashboardRegion initWithRect:clip:type:]):
        (-[WebDashboardRegion dashboardRegionClip]):
        (-[WebDashboardRegion description]):

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

17 years ago Reviewed by Richard
kocienda [Fri, 24 Sep 2004 00:05:57 +0000 (00:05 +0000)]
    Reviewed by Richard

        * khtml/xml/dom_position.cpp:
        (DOM::Position::inRenderedContent): Make the "empty block" check the same as the one
        use in visible position. This fixes a recent regression which broke up and down
        arrowing between blocks with an empty block in between.

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

17 years agoWebCore:
mjs [Thu, 23 Sep 2004 21:25:30 +0000 (21:25 +0000)]

        Reviewed by Darin.

<rdar://problem/3685235> REGRESSION (Mail): links are not properly editable

* khtml/html/html_inlineimpl.cpp:
        (HTMLAnchorElementImpl::isFocusable): If this element is editable, then follow
the normal focus rules so the link does not swallow focus when you arrow key
or drag-select into it.


        Reviewed by Darin.

<rdar://problem/3685235> REGRESSION (Mail): links are not properly editable

        * WebView.subproj/WebDefaultUIDelegate.m: By default, don't allow
link dragging if the element under the mouse pointer is
editable. This way, you can drag-select starting inside a link.

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

17 years agoWebKit:
sullivan [Thu, 23 Sep 2004 17:56:45 +0000 (17:56 +0000)]

        Reviewed by Chris.

        - WebKit part of fix for <rdar://problem/3415264>
        Default encoding should initially be set to current system encoding

        * WebView.subproj/WebPreferences.m:
        (-[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]):
        new SPI that sets the initial value of the default text encoding to
        be the system encoding, with a special-case conversion of MacRoman->Latin1.
        This is not done automatically for WebKit clients for fear of breaking them.

        * WebView.subproj/WebPreferencesPrivate.h:
        declare new SPI


        Reviewed by Chris.

        - WebBrowser part of fix for <rdar://problem/3415264>
        Default encoding should initially be set to current system encoding

        * AppController.m:
        (-[AppController applicationDidFinishLaunching:]):
        call new SPI -[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]

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

17 years ago*** empty log message ***
hyatt [Thu, 23 Sep 2004 17:47:15 +0000 (17:47 +0000)]
*** empty log message ***

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

17 years ago - added test for the DOM::Range bug fixed recently
darin [Thu, 23 Sep 2004 17:29:26 +0000 (17:29 +0000)]
    - added test for the DOM::Range bug fixed recently

        * layout-tests/fast/dom/clone-contents-0-end-offset-expected.txt: Added.
        * layout-tests/fast/dom/clone-contents-0-end-offset.html: Added.

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

17 years ago Fix for hitlist bug, crash when deleting.
hyatt [Thu, 23 Sep 2004 17:22:27 +0000 (17:22 +0000)]
Fix for hitlist bug, crash when deleting.

Also fix repaint bug when inlines are inside overflow:auto/scroll regions.

        Reviewed by kocienda

        * khtml/editing/htmlediting_impl.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_flow.cpp:

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

17 years ago Reviewed by Ken.
sullivan [Thu, 23 Sep 2004 16:52:18 +0000 (16:52 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3527840> reproducible crash at johnbrown.v32.qikker.com
        (nil-deref in NodeImpl::dispatchEvent)

        * khtml/xml/dom_nodeimpl.cpp:
        guard against document or document->document() being nil

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 16:10:01 +0000 (16:10 +0000)]
    Reviewed by Ken.

        - added new VisibleRange class; not used yet

        * WebCore.pbproj/project.pbxproj: Added visible_range.h and visible_range.cpp.
        * khtml/editing/visible_range.cpp: Added.
        * khtml/editing/visible_range.h: Added.

        - tweaks

        * kwq/WebCoreBridge.mm: (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
        Use switch statement instead of if statement so we get a warning if we ever add a new

        * khtml/editing/selection.h: khtml, not DOM, namespace
        * khtml/editing/visible_position.h: Ditto.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 16:08:35 +0000 (16:08 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3812758> 8S266: attaching mutation events to an editable div crashes Safari

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchEvent): Added ref/deref so this works if passed a "floating" event object.
        (NodeImpl::dispatchGenericEvent): Ditto.
        (NodeImpl::dispatchHTMLEvent): Removed unneeded ref/deref now that dispatchEvent takes care of it.
        (NodeImpl::dispatchMouseEvent): Ditto.
        (NodeImpl::dispatchUIEvent): Ditto.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 16:05:58 +0000 (16:05 +0000)]
    Reviewed by Ken.

        - fixed some minor mistakes discovered by code inspection

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Changed to not grab focus if clearing the selection.
        Grabbing focus when we get the selection is also probably something that should be
        conditional, since you can use a WebView in a mode where it can have selection even
        when not first responder, ala NSTextView.
        (KHTMLPart::setCaretVisible): Changed to not grab focus if making the caret invisible.
        Not sure if it's ever important to grab focus when making the caret visible, but by
        code inspection it seemed that was unlikely to do harm.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 16:03:00 +0000 (16:03 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3790595> "ERROR: unimplemented propertyID: 97" logged to console when copying selection (table-layout)

        * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        Added CSS_PROP_TABLE_LAYOUT case.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 16:02:04 +0000 (16:02 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3809600> REGRESSION: text in search field doesn't disappear when clicked at developer.apple.com

        Reversing the order of scope caused us to get and set too many properties in the window
        object; in the case of this bug setting value ended up setting a window.value property
        instead of the value of the <input> element.

        * khtml/ecma/kjs_window.h: Removed bogus hasProperty function that always returns true.
        Testing shows that MacIE and Gecko match our behavior when we remove this, despite the
        "need this to match IE behavior" comment in the file, which I believe is incorrect.
        * khtml/ecma/kjs_window.cpp: Ditto.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 15:58:37 +0000 (15:58 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3812471> -[DOMRange cloneContents] clones too much in some cases where endOffset is 0

        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Added some nil
        checks to prevent this function from crashing if offsets are greater than the
        number of child nodes. Added a special case for offset 0 in one case that has a loop
        that won't work correctly for that case.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 15:50:59 +0000 (15:50 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3811890> when selecting and moving the caret, some words aren't spell-checked (test case included)

        This was mostly fixed by changes I made recently, but using the test case in the bug
        I discovered one regression I introduced and another problem that wasn't fixed yet.
        This change fixes both.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::markMisspellingsInSelection): Removed unneeded inRenderedContent() check. It was returning false
        in cases involving a <br> at the end of line, and the check isn't all that helpful now that we use VisiblePosition,
        which takes care of that sort of thing for you. Changed code to determine the range to check to use the two
        different flavors of word boundary to expand to words we touch in both directions.
        (KWQKHTMLPart::updateSpellChecking): Changed to use the same logic about word boundaries. By being consistent,
        the anomalies reported in the bug report go away.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 15:22:15 +0000 (15:22 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3811584> REGRESSION (85-125): iframe.document undefined in function called from button onclick; works from img onclick

        The fix is to not let "defers callbacks" have any effect on loading "about:blank".
        I also had to fix one bug in WebCore that could then be reproduced by going to "about:blank"
        while using a button.

        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:didReceiveResponse:]): Loosen asserts to allow this callback
        for the specific case of "about:blank" even if the defers callbacks flag is true.
        (-[WebMainResourceClient connectionDidFinishLoading:]): Ditto.
        (-[WebMainResourceClient loadWithRequestNow:]): Added NSURLRequest return value. Loosened asserts
        as above. Changed code to return a new request if we get a new request back that is not empty
        when the defers callbacks flag is true.
        (-[WebMainResourceClient loadWithRequest:]): If the defers callbacks flag is set, but the
        URL is one that gives us an empty document, then do the work right away, don't defer it.

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

17 years ago Reviewed by Ken.
darin [Thu, 23 Sep 2004 15:21:44 +0000 (15:21 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/3811584> REGRESSION (85-125): iframe.document undefined in function called from button onclick; works from img onclick

        Since we are doing a bit less "defers callbacks" work, when testing I ran into this code path.

        * khtml/xml/dom2_eventsimpl.cpp: (MouseEventImpl::computeLayerPos): Check for document without renderer.

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

17 years ago - checked in a new file I forgot
darin [Thu, 23 Sep 2004 07:10:20 +0000 (07:10 +0000)]
    - checked in a new file I forgot

        * khtml/editing/text_granularity.h: Added.

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

17 years ago - fixed B&I builds by checking in generated file
darin [Thu, 23 Sep 2004 07:09:14 +0000 (07:09 +0000)]
    - fixed B&I builds by checking in generated file

        * WebCoreSupport.subproj/WebDashboardRegion.h: Added.

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

17 years ago - renamed
darin [Thu, 23 Sep 2004 07:05:23 +0000 (07:05 +0000)]
    - renamed

            DOM::CaretPosition -> khtml::VisibleRange
            DOM::Selection     -> khtml::Selection

        - moved all the functions in visible_units.h from DOM to khtml namespace
        - moved the one thing from Selection that KHTMLPart uses into its own header

        * WebCore.pbproj/project.pbxproj: Added text_granularity.h.

        * ForwardingHeaders/editing/selection.h: Added.
        * WebCore-combined.exp: Regenerated.
        * WebCore-tests.exp: Updated symbol for DOM::Selection debugging.

        * khtml/ecma/kjs_window.cpp: Update names and namespaces.
        * khtml/editing/htmlediting.cpp: Ditto.
        * khtml/editing/htmlediting.h: Ditto.
        * khtml/editing/htmlediting_impl.cpp: Ditto.
        * khtml/editing/htmlediting_impl.h: Ditto.
        * khtml/editing/jsediting.cpp: Ditto.
        * khtml/editing/selection.cpp: Ditto.
        * khtml/editing/selection.h: Ditto.
        * khtml/editing/visible_position.cpp: Ditto.
        * khtml/editing/visible_position.h: Ditto.
        * khtml/editing/visible_text.h: Ditto.
        * khtml/editing/visible_units.cpp: Ditto.
        * khtml/editing/visible_units.h: Ditto.
        * khtml/khtml_part.cpp: Ditto.
        * khtml/khtml_part.h: Ditto.
        * khtml/khtmlpart_p.h: Ditto.
        * khtml/rendering/render_block.cpp: Ditto.
        * khtml/xml/dom_docimpl.h: Ditto.
        * khtml/xml/dom_nodeimpl.cpp: Ditto.
        * kwq/KWQKHTMLPart.h: Ditto.
        * kwq/KWQKHTMLPart.mm: Ditto.
        * kwq/KWQRenderTreeDebug.cpp: Ditto.
        * kwq/WebCoreBridge.mm: Ditto.

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

17 years ago * ForwardingHeaders/*: Use import instead of include.
darin [Thu, 23 Sep 2004 06:21:28 +0000 (06:21 +0000)]
    * ForwardingHeaders/*: Use import instead of include.

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

17 years ago - renamed these files:
darin [Thu, 23 Sep 2004 05:23:55 +0000 (05:23 +0000)]
    - renamed these files:

            misc/khtml_text_operations.h   -> editing/visible_text.h
            misc/khtml_text_operations.cpp -> editing/visible_text.cpp
            xml/dom_caretposition.cpp      -> editing/visible_position.cpp
            xml/dom_caretposition.h        -> editing/visible_position.h
            xml/dom_selection.cpp          -> editing/selection.cpp
            xml/dom_selection.h            -> editing/selection.h

        - broke out the word/line/paragraph part of visible_position.h into visible_units.h
        - removed some unnecessary includes from some header files to reduce the number of
          files that trigger "building the world"

        * WebCore.pbproj/project.pbxproj: Added the files under new names, removed the old ones.

        * ForwardingHeaders/editing/jsediting.h: Added.
        * ForwardingHeaders/editing/visible_text.h: Added.
        * ForwardingHeaders/misc/khtml_text_operations.h: Removed.
        * ForwardingHeaders/xml/dom_caretposition.h: Removed.
        * ForwardingHeaders/xml/dom_selection.h: Removed.

        * khtml/ecma/kjs_window.cpp: Updated or removed #include lines.
        * khtml/editing/htmlediting.cpp: Ditto.
        * khtml/editing/htmlediting.h: Ditto.
        * khtml/editing/htmlediting_impl.cpp: Ditto.
        * khtml/editing/htmlediting_impl.h: Ditto.
        * khtml/editing/jsediting.cpp: Ditto.
        * khtml/editing/selection.cpp: Ditto.
        * khtml/editing/selection.h: Ditto.
        * khtml/editing/visible_position.cpp: Ditto.
        * khtml/editing/visible_position.h: Ditto.
        * khtml/editing/visible_text.cpp: Ditto.
        * khtml/editing/visible_text.h: Ditto.
        * khtml/editing/visible_units.cpp: Added.
        * khtml/editing/visible_units.h: Added.
        * khtml/html/html_elementimpl.cpp: Updated or removed #include lines.
        * khtml/khtml_part.cpp: Ditto.
        * khtml/khtml_part.h: Ditto.
        * khtml/khtmlpart_p.h: Ditto.
        * khtml/khtmlview.cpp: Ditto.
        * khtml/misc/khtml_text_operations.cpp: Removed.
        * khtml/misc/khtml_text_operations.h: Removed.
        * khtml/rendering/render_block.cpp: Updated or removed #include lines.
        * khtml/xml/dom2_rangeimpl.cpp: Ditto.
        * khtml/xml/dom_caretposition.cpp: Removed.
        * khtml/xml/dom_caretposition.h: Removed.
        * khtml/xml/dom_docimpl.cpp: Updated or removed #include lines.
        * khtml/xml/dom_docimpl.h: Ditto.
        * khtml/xml/dom_elementimpl.cpp: Ditto.
        * khtml/xml/dom_nodeimpl.cpp: Ditto.
        * khtml/xml/dom_position.cpp: Ditto.
        * khtml/xml/dom_selection.cpp: Removed.
        * khtml/xml/dom_selection.h: Removed.
        * kwq/KWQKHTMLPart.mm: Updated or removed #include lines.
        * kwq/KWQKHTMLPart.h: Ditto.
        * kwq/KWQRenderTreeDebug.cpp: Ditto.
        * kwq/WebCoreBridge.mm: Ditto.

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

17 years agoWebCore:
rjw [Thu, 23 Sep 2004 01:50:21 +0000 (01:50 +0000)]
Pass dashboard regions up to WebKit.

Don't collect regions from RenderTexts.

Made more args and return types references to avoid
copying value lists.

        Reviewed by Hyatt.

        * WebCore.pbproj/project.pbxproj:
        * khtml/khtmlview.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        * kwq/WebCoreBridge.h:
        * kwq/WebDashboardRegion.h: Added.
        * kwq/WebDashboardRegion.m: Added.
        (-[WebDashboardRegion initWithRect:type:]):
        (-[WebDashboardRegion copyWithZone:]):
        (-[WebDashboardRegion dashboardRegionRect]):
        (-[WebDashboardRegion dashboardRegionType]):
        (-[WebDashboardRegion description]):

Pass dashboard regions to UI delegate.

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge dashboardRegionsChanged:]):
        * WebView.subproj/WebUIDelegatePrivate.h:
        * copy-webcore-files-to-webkit:

Debug only code to display dashboard regions.

        Reviewed by Hyatt.

        * BrowserWebController.m:
        (-[BrowserWebView webView:dashboardRegionsChanged:]):

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 22 Sep 2004 23:57:47 +0000 (23:57 +0000)]
    Reviewed by Hyatt

        Fix for this hitlist bug:

        <rdar://problem/3805486> REGRESSION (Mail): Empty block elements can cause the caret to get "stuck" in one spot

        * khtml/xml/dom_caretposition.cpp:
        (DOM::CaretPosition::isCandidate): You can no longer caret into empty blocks with no height.
        Also did a little clean up in this function.
        * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: Regenerated expected results.
        This test was actually failing and had bogus results checked in!
        * layout-tests/editing/selection/select-all-003-expected.txt: Regenerated expected results.

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

17 years ago Fixed build that I just broke.
cblu [Wed, 22 Sep 2004 23:45:28 +0000 (23:45 +0000)]
Fixed build that I just broke.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):

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

17 years agoWebCore:
cblu [Wed, 22 Sep 2004 23:42:19 +0000 (23:42 +0000)]

Fixed: <rdar://problem/3812091> REGRESSION (Mail): double-clicked word is not smart inserted on drag

        Reviewed by john.

        * khtml/editing/htmlediting.cpp:
        (khtml::MoveSelectionCommand::MoveSelectionCommand): take smartMove arg
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::deleteSelection): take smartDelete arg
        (khtml::MoveSelectionCommandImpl::MoveSelectionCommandImpl): take smartMove arg
        (khtml::MoveSelectionCommandImpl::doApply): pass smartMove for smartDelete and smartReplace
        * khtml/editing/htmlediting_impl.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge moveSelectionToDragCaret:smartMove:]): take smartMove arg


<rdar://problem/3812091> REGRESSION (Mail): double-clicked word is not smart inserted on drag

        Reviewed by john.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): pass value for smartMove

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

17 years ago Reviewed by Hyatt
kocienda [Wed, 22 Sep 2004 22:17:28 +0000 (22:17 +0000)]
    Reviewed by Hyatt

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): New overloaded
version of this function, one that takes a flag to determine whether to
perform a document updateLayout() call before querying the style system.
        * khtml/css/css_computedstyle.h:
        (DOM::EUpdateLayout): Give a symbolic constant to true/false for the
purpose of the new call to getPropertyCSSValue.
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::StyleChange::currentlyHasStyle): Pass DoNotUpdateLayout to call to
        (khtml::CompositeEditCommandImpl::applyTypingStyle): Add in top-level calls
to updateLayout before doing style changes that now do not update styles
        (khtml::ApplyStyleCommandImpl::doApply): Ditto.
        (khtml::ApplyStyleCommandImpl::removeCSSStyle): Pass DoNotUpdateLayout to call to
        (khtml::DeleteSelectionCommandImpl::computeTypingStyle): Remove this dead code.
        * khtml/editing/htmlediting_impl.h: Ditto.

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

17 years agoWebKit:
cblu [Wed, 22 Sep 2004 21:25:44 +0000 (21:25 +0000)]

<rdar://problem/3667301> Frequent crashes in Mail when viewing HTML messages (CFURLGetByteRangeForComponent)
<rdar://problem/3810354> WebResourceLoadDelegate can't refuse requests by returning nil; code asserts/crashes instead

        Reviewed by rjw.

        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (+[WebSubresourceClient startLoadingResource:withRequest:customHeaders:referrer:forDataSource:]): removed broken code that handled loadWithRequest returning NO
        * WebView.subproj/WebBaseResourceHandleDelegate.m:
        (-[WebBaseResourceHandleDelegate loadWithRequest:]): if nil is returned from the client for willSendRequest, report the cancelled error and return


        Reviewed by rjw.

        * LoadProgressMonitor.m:
        (-[LoadProgressMonitor webView:resource:willSendRequest:redirectResponse:fromDataSource:]): updated to use "new" API, this wasn't being called!

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

17 years agoWebCore:
kocienda [Wed, 22 Sep 2004 21:12:10 +0000 (21:12 +0000)]

        Reviewed by Darin

        * WebCore.pbproj/project.pbxproj: New files added.
        * khtml/khtml_part.cpp:
        (KHTMLPart::clearSelection): No longer calls setFocusIfNeeded.
        (KHTMLPart::slotClearSelection): Merged old implementation from this function to
        clearSelection. Now just calls clearSelection. Also put in !APPLE_CHANGES since
        we do not call it.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::setFocusNode): Add some code to determine when setting the focus should
        clear the selection.
        * kwq/KWQWidget.mm:
        (QWidget::hasFocus): Call _webcore_effectiveFirstResponder to get view to check for focus.
        (QWidget::setFocus): Ditto.
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge deselectText]): Called slotClearSelection and should have been. Now calls
        * kwq/WebCoreView.h: Added.
        * kwq/WebCoreView.m: Added.
        (-[NSView _webcore_effectiveFirstResponder]): New method to yield the correct responder
        to check for firstResponder-ness before calling makeFirstResonder. This helps to prevent
        unwanted firstResponder switching.
        (-[NSClipView _webcore_effectiveFirstResponder]): Ditto.
        (-[NSScrollView _webcore_effectiveFirstResponder]): Ditto.


        Reviewed by Darin

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView _webcore_effectiveFirstResponder]): New function to yield the correct responder
        to check for firstResponder-ness before calling makeFirstResonder. This helps to prevent
        unwanted firstResponder switching.
        * WebView.subproj/WebView.m:
        (-[WebView _webcore_effectiveFirstResponder]): Ditto.

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

17 years ago Reviewed by Darin.
mjs [Wed, 22 Sep 2004 20:36:10 +0000 (20:36 +0000)]
    Reviewed by Darin.

<rdar://problem/3805137> REGRESSION: Cannot search on pricetool.com

        The problem here is that residual style handling can cause an
element associated with a misnested form to lose the association,
because it can become detached and then reattached in this
case. So we need to maintain the association.

        * khtml/html/html_formimpl.h: Added list of dormant elements to form,
and dormant bit to generic form element.
* khtml/html/html_formimpl.cpp:
        (DOM::HTMLFormElementImpl::~HTMLFormElementImpl): Clear m_form field for
dormant elements too.
        (DOM::HTMLFormElementImpl::registerFormElement): Remove from dormant list
in addition to adding to main list.
        (DOM::HTMLFormElementImpl::removeFormElement): Remove from both lists.
        (DOM::HTMLFormElementImpl::makeFormElementDormant): New method, remove from
main list, add to dormant list.
        (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl): Initialize
dormant bit to false.
        (DOM::HTMLGenericFormElementImpl::insertedIntoDocument): If the element is
dormant and has a form, re-register it and clear the dormant bit.
        (DOM::HTMLGenericFormElementImpl::removedFromDocument): If the document has
a form, tell the form it is dormant and set the dormant bit.

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

17 years ago Fixed: <rdar://problem/3811187> REGRESSION (Mail): Control-click past end of documen...
cblu [Wed, 22 Sep 2004 20:26:16 +0000 (20:26 +0000)]
Fixed: <rdar://problem/3811187> REGRESSION (Mail): Control-click past end of document does not spell check last word

        Reviewed by kocienda.

        * khtml/xml/dom_selection.cpp:
        (DOM::Selection::validate): if at the end of the document, expand to the left.

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

17 years agoRemove stray non-ascii characters in ChangeLog.
mjs [Wed, 22 Sep 2004 20:15:52 +0000 (20:15 +0000)]
Remove stray non-ascii characters in ChangeLog.

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

17 years ago Reviewed by Ken and John.
mjs [Wed, 22 Sep 2004 20:14:27 +0000 (20:14 +0000)]
    Reviewed by Ken and John.

<rdar://problem/3759228> REGRESSION (Mail): stray characters when entering text via input method right after newline

* khtml/editing/htmlediting_impl.cpp:
        (khtml::CompositeEditCommandImpl::inputText): Add an optional
selectInsertedText parameter.
        (khtml::ReplaceSelectionCommandImpl::doApply): Let the inputText operation
select the text when inserting plain text, because it already knows all the right
information to do so, and this function doesn't (sometimes text is inserted
before the start of the old selection, not after!)
        * khtml/editing/htmlediting_impl.h:

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

17 years ago More tweaks to dashboard regions style.
rjw [Wed, 22 Sep 2004 20:03:35 +0000 (20:03 +0000)]
More tweaks to dashboard regions style.

Move dashboard regions list into css3NonInheritedData so it will be shared
by all styles that don't modify the empty region list.

Make the initial value for dashboard region list a static to minimize allocations
of empty lists.

Unrelated to regions:  make marquee, flex box, and opacity style¬†accessor functions const.

        Reviewed by Hyatt.

        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

17 years ago Fix for 3802766, entire view redrawn in Blot while typing. Don't needlessly create...
hyatt [Wed, 22 Sep 2004 18:42:39 +0000 (18:42 +0000)]
Fix for 3802766, entire view redrawn in Blot while typing.  Don't needlessly create text nodes just to find
out the font for the caret position.

        Reviewed by darin

        * kwq/KWQKHTMLPart.mm:

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

17 years agoWebCore:
cblu [Wed, 22 Sep 2004 01:30:34 +0000 (01:30 +0000)]

<rdar://problem/3735071> REGRESSION (Mail): WebCore Editing must do smart paste
<rdar://problem/3799163> REGRESSION (Mail): Deleting a word doesn't delete whitespace

        Reviewed by darin.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::DeleteSelectionCommand): take smartDelete parameter
        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take smartReplace parameter
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): take smartDelete parameter
        (khtml::DeleteSelectionCommandImpl::doApply): delete whitespace before and after selection if necessary
        (khtml::ReplaceSelectionCommandImpl::ReplaceSelectionCommandImpl): take smartReplace parameter
        (khtml::ReplaceSelectionCommandImpl::doApply): add whitespace before and after the replacement if necessary
        * khtml/editing/htmlediting_impl.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): take smartReplace parameter
        (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): ditto
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): ditto
        (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): ditto
        (-[WebCoreBridge deleteSelectionWithSmartDelete:]): take smartDelete parameter


<rdar://problem/3735071> REGRESSION (Mail): WebCore Editing must do smart paste
<rdar://problem/3799163> REGRESSION (Mail): Deleting a word doesn't delete whitespace

        Reviewed by darin.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for smartReplace
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass parameter for smartReplace using _canSmartReplaceWithPasteboard
        (-[WebHTMLView _changeSpellingFromMenu:]): pass NO for smartReplace
        (-[WebHTMLView pasteboardTypesForSelection]): include WebSmartPastePboardType when _canSmartCopyOrDelete return YES
        (-[WebHTMLView writeSelectionWithPasteboardTypes:toPasteboard:]): ditto
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): pass parameter for smartReplace using _canSmartReplaceWithPasteboard
        (-[WebHTMLView delete:]): call _deleteSelection
        (-[WebHTMLView cut:]): don't call delegate twice, call _deleteRange to delete
        (-[WebHTMLView pasteAsPlainText:]): pass parameter for smartReplace using _canSmartReplaceWithPasteboard
        (-[WebHTMLView _changeWordCaseWithSelector:]): pass NO for smartReplace
        (-[WebHTMLView deleteBackward:]): call _deleteSelection when there is a selected range
        (-[WebHTMLView _changeSpellingToWord:]): pass NO for smartReplace
        (-[WebHTMLView deleteToMark:]): pass NO for smartDeleteOK
        (-[WebHTMLView transpose:]): pass NO for smartReplace
        (-[WebHTMLView _shouldDeleteRange:]): moved
        (-[WebHTMLView _deleteRange:preflight:killRing:prepend:smartDeleteOK:]): moved, handle smartDelete
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:]): moved
        (-[WebHTMLView _deleteSelection]): new
(-[WebHTMLView _canSmartReplaceWithPasteboard]): new
(-[WebHTMLView _canSmartCopyOrDelete]): new
        (-[WebHTMLView setMarkedText:selectedRange:]): pass NO for smartReplace
        (-[WebHTMLView _discardMarkedText]): call _deleteSelection
        (-[WebTextCompleteController _insertMatch:]): pass NO for smartReplace
        (-[WebTextCompleteController endRevertingChange:moveLeft:]): pass NO for smartReplace
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]): set smartInsertDeleteEnabled to YES
        (-[WebView replaceSelectionWithNode:]): pass NO for smartReplace
        (-[WebView replaceSelectionWithText:]): pass NO for smartReplace
        (-[WebView replaceSelectionWithMarkupString:]): pass NO for smartReplace
        (-[WebView deleteSelection]): call _deleteSelection on WebHTMLView

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

17 years ago More dashboard region work.
rjw [Wed, 22 Sep 2004 01:13:10 +0000 (01:13 +0000)]
More dashboard region work.

Added support for computed style and cssText for new region property.
Added restriction on length types allowed in region functions.
Added initial and inheritance support for -apple-dashboard-region.

        Reviewed by Hyatt.

        * khtml/css/css_computedstyle.cpp:
        * khtml/css/css_valueimpl.cpp:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssstyleselector.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:

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

17 years ago Reviewed by Ken.
darin [Wed, 22 Sep 2004 00:41:01 +0000 (00:41 +0000)]
    Reviewed by Ken.

        - fixed problem where our updateLayout call ignores pending stylesheets all the time

        * khtml/xml/dom_docimpl.h: Added updateLayoutIgnorePendingStylesheets.
        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateLayout): Took out the "ignore pending stylesheets" business here.
        (DocumentImpl::updateLayoutIgnorePendingStylesheets): Put it in here.

        * khtml/ecma/kjs_dom.cpp: (DOMNode::getValueProperty): Call the new
        updateLayoutIgnorePendingStylesheets function.
        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::getValueProperty): Ditto.
        (KJS::HTMLElement::putValue): Ditto.
        * khtml/ecma/kjs_views.cpp: (DOMAbstractViewFunc::tryCall): Ditto.
        * khtml/ecma/kjs_window.cpp:
        (Window::updateLayout): Ditto.
        (Selection::get): Ditto.
        (SelectionFunc::tryCall): Ditto.

        * khtml/html/html_imageimpl.h: Add ignorePendingStylesheets boolean parameter.
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageElementImpl::width): Respect new parameter.
        (HTMLImageElementImpl::height): Ditto.

        - tweaks

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Removed unneeded
        explicit "true" parameter to setSelection.
        (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Ditto.

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

17 years ago Reviewed by Ken.
darin [Wed, 22 Sep 2004 00:38:27 +0000 (00:38 +0000)]
    Reviewed by Ken.

        - fix crash when pasting text at the end of the document and then doing an undo

        * khtml/editing/htmlediting_impl.cpp:
        (khtml::EditCommandImpl::apply): Call markMisspellingsInSelection before doing
        the editing operation, and we'll tell setSelection not to unmark the old selection.
        Also call updateLayout before calling appliedEditing so DOM operations in the
        code responding to the selection change will work.
        (khtml::EditCommandImpl::unapply): Ditto.
        (khtml::EditCommandImpl::reapply): Ditto.

        * khtml/khtml_part.h: Added a third parameter to setSelection to tell it whether
        to unmark the old selection. We must pass false when editing, because the old
        selection might have now-invalid offsets inside it.
        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): Add unmarkOldSelection parameter, and respect it.
        (KHTMLPart::appliedEditing): Pass false for unmarkOldSelection.
        (KHTMLPart::unappliedEditing): Ditto.
        (KHTMLPart::reappliedEditing): Ditto.

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

17 years ago Part 2 of the feature requested in
rjw [Tue, 21 Sep 2004 22:12:14 +0000 (22:12 +0000)]
    Part 2 of the feature requested in
        <rdar://problem/3752791> Dashboard: Need a better solution for control regions

        This patch actually collections the regions and converts to absolute coordinates.
        Only remaining piece is to pass over the bridge and up the alley to WebKit
        UI delegate.

        Reviewed by Ken.

        * khtml/css/css_valueimpl.h:
        * khtml/css/cssparser.cpp:
        * khtml/css/cssproperties.c:
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        * khtml/khtmlview.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_object.h:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:

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