WebKit-https.git
15 years ago Reviewed by John
kocienda [Mon, 28 Feb 2005 23:43:26 +0000 (23:43 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor

        * khtml/css/css_computedstyle.cpp: inheritableProperties array now defined in css_valueimpl.cpp.
        * khtml/css/css_valueimpl.cpp: Define inheritableProperties array here.
        (DOM::CSSMutableStyleDeclarationImpl::copyBlockProperties): Use new name for blockProperties, and use the new
        constant for the number of items in the array.
        (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto.
        (DOM::CSSMutableStyleDeclarationImpl::removeInheritableProperties): New function.
        * khtml/css/css_valueimpl.h: Declare inheritableProperties array and numInheritableProperties extern so they
        can be defined in css_valueimpl.cpp and used in css_computedstyle.cpp.
        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::removeStyleNodes): This code was misguided, and removed too much style from HTML
        elements. Now, it removes from HTML elements only the styles that we replace later with a call to applyStyle().
        Also, add ID_B to list of inline "style" nodes we are willing to remove. Leaving it off was an oversight.

        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: ID_B fix made this result change, without any
        visible change in the test.

        New test:

        * layout-tests/editing/style/smoosh-styles-003.html
        * layout-tests/editing/style/smoosh-styles-003-expected.txt

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

15 years ago Fixed <rdar://problem/4026985> CrashTracer: ...14 crashes at com.apple.WebCore:...
rjw [Mon, 28 Feb 2005 23:10:43 +0000 (23:10 +0000)]
Fixed <rdar://problem/4026985> CrashTracer: ...14 crashes at com.apple.WebCore: -[KWQPageState invalidate] + 32

Added more nil checking and ASSERTS.
Without a reproducible case this is hard to definitively resolve.

        Reviewed by John Sullivan.

        * kwq/KWQPageState.mm:
        (-[KWQPageState invalidate]):

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

15 years ago Fixed <rdar://problem/4027702> 3.5% performance regression btwn Safari-188 and Safar...
rjw [Mon, 28 Feb 2005 22:51:25 +0000 (22:51 +0000)]
Fixed <rdar://problem/4027702> 3.5% performance regression btwn Safari-188 and Safari-400

I inadvertently checked in some debugging code that disabled
style sharing.  Backed out that change.

        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::styleForElement):

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

15 years ago Fixed: <rdar://problem/4026639> www.bmw.ca configurator does not work with Safari
cblu [Mon, 28 Feb 2005 21:16:54 +0000 (21:16 +0000)]
Fixed: <rdar://problem/4026639> bmw.ca configurator does not work with Safari

        Reviewed by john.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLElement::tryGet): when frameset.<name of frame child> is called, return the window object of the frame child

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

15 years ago Reviewed by Chris
kocienda [Mon, 28 Feb 2005 17:51:12 +0000 (17:51 +0000)]
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/4026906> Paste of HTML table content can break table structure

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::pruneEmptyNodes): Call new isProbablyTableStructureNode() function to prevent
        removal of empty table structure nodes.
        (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto.
        (khtml::isProbablyTableStructureNode): New helper function.
        * khtml/editing/htmlediting.h: Declare new helper.

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

15 years ago Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragme...
cblu [Mon, 28 Feb 2005 17:11:26 +0000 (17:11 +0000)]
Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): ref and deref the element while it is "floating"
        (khtml::ReplacementFragment::insertFragmentForTestRendering): ditto
        (khtml::floatRefdElement): new, keeps an element alive while its ref count is 0
        (khtml::createDefaultParagraphElement): removed commented out code
        (khtml::createBlockPlaceholderElement): ref the element and return it as "floating"
        (khtml::createFontElement): ditto
        (khtml::createStyleSpanElement): ditto
        * khtml/editing/htmlediting.h:

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

15 years ago Reviewed by Vicki.
mjs [Mon, 28 Feb 2005 04:21:39 +0000 (04:21 +0000)]
    Reviewed by Vicki.

<rdar://problem/3993557> REGRESSION (125-180-ish): getElementsByTagName no longer works with namespace designations

* khtml/xml/dom_nodeimpl.cpp:
        (NodeBaseImpl::getElementsByTagNameNS): When no namespace is specified, find elements
of the specified name in any namespace to match Mozilla and earlier Safari behavior.

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

15 years ago Reviewed by Adele.
darin [Sat, 26 Feb 2005 01:41:13 +0000 (01:41 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/4025618> Crash while searching at hollywoodvideo.com

        * khtml/html/html_formimpl.h: Added valueWithDefault.
        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::appendFormData): Call valueWithDefault instead of going at the render object
        to try to get the default value; there may be no render object if this is display:none.
        (DOM::HTMLInputElementImpl::valueWithDefault): Added. Knows about the defaults for "submit" and "reset"
        buttons; otherwise just returns the value as-is.

        * khtml/rendering/render_form.h: Removed the defaultLabel member functions.
        * khtml/rendering/render_form.cpp:
        (RenderSubmitButton::rawText): Call valueWithDefault instead of using defaultLabel function here on
        the render side. The DOM needs to know how to deal with the default anyway for form submission.
        (RenderSubmitButton::defaultLabel): Removed.
        (RenderResetButton::defaultLabel): Removed.
        (RenderPushButton::defaultLabel): Removed.

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

15 years agoWebCore:
darin [Sat, 26 Feb 2005 01:03:45 +0000 (01:03 +0000)]
WebCore:

        Reviewed by John.

        - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus

        * kwq/KWQKHTMLPart.h: Added setWindowHasFocus function and m_windowHasFocus data member.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::setDisplaysWithFocusAttributes): Took out the code that sends the focus and blur events.
        (KWQKHTMLPart::setWindowHasFocus): Put that code here instead.

        * kwq/WebCoreBridge.h: Added setWindowHasFocus: method to the bridge.
        * kwq/WebCoreBridge.mm: (-[WebCoreBridge setWindowHasFocus:]): Added. Calls method on the part.

WebKit:

        Reviewed by John.

        - fixed <rdar://problem/4025088> window onblur and onfocus don't fire when text field has focus

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView updateFocusState]): Renamed from updateFocusDisplay. Added call to setWindowHasFocus: method.
        (-[WebHTMLView viewDidMoveToWindow]): Call method by new name.
        (-[WebHTMLView windowDidBecomeKey:]): Ditto.
        (-[WebHTMLView windowDidResignKey:]): Ditto.
        (-[WebHTMLView becomeFirstResponder]): Ditto.
        (-[WebHTMLView resignFirstResponder]): Ditto.

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

15 years ago Reviewed by John.
darin [Sat, 26 Feb 2005 00:43:58 +0000 (00:43 +0000)]
    Reviewed by John.

        - re-fixed <rdar://problem/3665430> horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode

        * kwq/KWQTextArea.mm: (-[KWQTextArea _updateTextViewWidth]): Don't change the text view width
        to match the text area's width in the "wrap" case.

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

15 years ago Reviewed by Hyatt
kocienda [Fri, 25 Feb 2005 23:51:01 +0000 (23:51 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4021518> 8A394 Mail crashes during paste: khtml::RootInlineBox::closestLeafChildForXPos

        * khtml/editing/visible_units.cpp:
        (khtml::previousLinePosition): Adding an updateLayout call at the start of the function fixes the crash, since
        we caught line boxes in a not-completely-updated state.
        (khtml::nextLinePosition): Ditto.

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

15 years ago Fix for 4010774, make sure to avoid an O(N^2) algorithm in nextRenderer() that is...
hyatt [Fri, 25 Feb 2005 23:49:20 +0000 (23:49 +0000)]
Fix for 4010774, make sure to avoid an O(N^2) algorithm in nextRenderer() that is triggered when large
DOM subtrees are inserted into documents via one insert/append call.

        Reviewed by kocienda

        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::nextRenderer):

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

15 years ago Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled corre...
rjw [Fri, 25 Feb 2005 23:41:39 +0000 (23:41 +0000)]
Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.

Second pass at fixing 3382926 w/o causing layout regressions.  Same concept:
if directionality of text's element is RTL and first character has neutral directionality
then set the initial directionality to RTL.

        Reviewed by Hyatt.

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::bidiReorderLine):
        (khtml::RenderBlock::determineStartPosition):

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

15 years agoversioning for TOT, Safari 2.0 (400+)
vicki [Fri, 25 Feb 2005 22:16:51 +0000 (22:16 +0000)]
versioning for TOT, Safari 2.0 (400+)

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

15 years agoSafari 1.3 (300) stamp, for 10.3 Panther
vicki [Fri, 25 Feb 2005 22:10:57 +0000 (22:10 +0000)]
Safari 1.3 (300) stamp, for 10.3 Panther

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

15 years agoSafari-400 stamp
vicki [Fri, 25 Feb 2005 22:05:51 +0000 (22:05 +0000)]
Safari-400 stamp

This is our first build with the new versioning scheme.  Versions are Safari 2.0 (400) on 10.4, and Safari (1.3) 300 for 10.3.  See this bug for details:

<rdar://problem/3962707> upgrade install of Tiger over SUPanWheat leaves Panther version of WebKit (need new version numbering scheme)

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

15 years ago Reviewed by me
kocienda [Fri, 25 Feb 2005 21:33:09 +0000 (21:33 +0000)]
    Reviewed by me

        Roll out Chris' change to fix this bug:

        <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        That code change is responsible for all these new crashers:

        <rdar://problem/4025177> crash copying safari.apple.com into Blot document
        <rdar://problem/4025184> crash in DOM::NodeImpl::parentNode copying "New!" from google.com to Blot
        <rdar://problem/4025214> crash in DOM::NodeImpl::getRect loading paste-match-style-001.html

        Since we wish to close the tree for a build right now, I am rolling out rather than investigating.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded)
        (khtml::ReplacementFragment::insertFragmentForTestRendering)
        (khtml::createDefaultParagraphElement)
        (khtml::createBlockPlaceholderElement)
        (khtml::createFontElement)
        (khtml::createStyleSpanElement)
        * khtml/editing/htmlediting.h

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

15 years ago Fixed <rdar://problem/4000962> 8A375: Help Viewer displays voiced sound and semi...
rjw [Fri, 25 Feb 2005 20:54:19 +0000 (20:54 +0000)]
Fixed <rdar://problem/4000962> 8A375: Help Viewer displays voiced sound and semi-voiced characters strangely (characters don't seem to be composed)

Added special case for voiced marks.

        Reviewed by John.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (widthForNextCharacter):

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

15 years ago Reviewed by John
kocienda [Fri, 25 Feb 2005 19:42:18 +0000 (19:42 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4020108> Pasting text into message makes Mail crash reproducibly

        Note that, even with this fix, development build will crash until this bug is fixed:
        <rdar://problem/4024996> Applying block styles can cause assertion failure in inline style removal

        This will not crash deployment builds, so I am going to land.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::applyBlockStyle): Applying block styles can make the loop to reach beyondEnd
        fail since the structure of the document can change. Cache the next node first before operating on it,
        as we do elsewhere.

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

15 years ago - recommit this change, since rolling it out did NOT fix the performance regression!
vicki [Fri, 25 Feb 2005 19:38:59 +0000 (19:38 +0000)]
- recommit this change, since rolling it out did NOT fix the performance regression!

    2005-02-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves

        The key was to change things around so that we don't push text from the DOM to the widget
        unless the DOM has actually been changed. This prevents the code path that wipes out inline input
        during the blur process.

        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
        (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
        new value is set here.
        (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
        is set here.
        (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
        to true, and also sends out the input event. It's better to have this here than in the renderer code.
        (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
        m_dirtyvalue) and m_valueMatchesRenderer as false.
        (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
        the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
        where the value came from.
        (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
        (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
        (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.

        * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
        and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
        by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
        is true.
        (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
        directly.
        (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
        (RenderTextArea::handleFocusOut): Ditto.
        (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
        DOM if valueMatchesRenderer is true.
        (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.

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

15 years ago Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragme...
cblu [Fri, 25 Feb 2005 19:34:52 +0000 (19:34 +0000)]
Fixed: <rdar://problem/4023566> Stickies: Crash in ReplacementFragment::insertFragmentForTestRendering on paste

        Reviewed by darin.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
        (khtml::ReplacementFragment::insertFragmentForTestRendering):
        (khtml::floatRefdElement):
        (khtml::createDefaultParagraphElement):
        (khtml::createBlockPlaceholderElement):
        (khtml::createFontElement):
        (khtml::createStyleSpanElement):
        * khtml/editing/htmlediting.h:

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

15 years ago Reviewed by John.
darin [Fri, 25 Feb 2005 18:48:12 +0000 (18:48 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4019823> Seed: Control-Y doesn't work

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Call _handleKillRing
        after setting the selection, since it uses the selection to get the text.
        (-[WebHTMLView _insertText:selectInsertedText:]): Check for empty string to avoid an assertion
        on the other side of the bridge when you yank the empty string.

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

15 years ago * kwq/character-sets.txt: Checked in updated file. This new file has no effec...
darin [Fri, 25 Feb 2005 18:38:08 +0000 (18:38 +0000)]
    * kwq/character-sets.txt: Checked in updated file. This new file has no effect, because none of the
        changes affect character sets that we support, but it's good to have the latest file in here, and
        completely safe because I checked that the generated files have not changed.

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

15 years ago Reviewed by Darin.
vicki [Fri, 25 Feb 2005 18:36:44 +0000 (18:36 +0000)]
    Reviewed by Darin.

- back out this change, since it causes a 3.5% performance regression

    2005-02-23  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves

        The key was to change things around so that we don't push text from the DOM to the widget
        unless the DOM has actually been changed. This prevents the code path that wipes out inline input
        during the blur process.

        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
        (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
        new value is set here.
        (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
        is set here.
        (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
        to true, and also sends out the input event. It's better to have this here than in the renderer code.
        (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
        m_dirtyvalue) and m_valueMatchesRenderer as false.
        (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
        the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
        where the value came from.
        (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
        (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
        (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.

        * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
        and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
        by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
        is true.
        (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
        directly.
        (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
        (RenderTextArea::handleFocusOut): Ditto.
        (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
        DOM if valueMatchesRenderer is true.
        (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.

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

15 years ago Reviewed by Chris.
darin [Fri, 25 Feb 2005 18:29:40 +0000 (18:29 +0000)]
    Reviewed by Chris.

        - fixed <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced

        * khtml/editing/htmlediting.cpp: (khtml::ReplaceSelectionCommand::doApply):
        Use the insertNodeAfterAndUpdateNodesInserted and insertNodeBeforeAndUpdateNodesInserted
        functions to add the leading and trailing spaces for smart paste.

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

15 years ago Back out fix for 3382926, since it breaks LTR text inside RTL contexts.
hyatt [Fri, 25 Feb 2005 17:43:16 +0000 (17:43 +0000)]
Back out fix for 3382926, since it breaks LTR text inside RTL contexts.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::direction):

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

15 years ago Fix for 3975039, scrolling is slow in huge RSS views. Optimize the calculation...
hyatt [Fri, 25 Feb 2005 17:33:10 +0000 (17:33 +0000)]
Fix for 3975039, scrolling is slow in huge RSS views.  Optimize the calculation of clip rects for overflow:hidden
layers.  Also optimize layer movement when scrolling overflow sections.

        Reviewed by darin

        * khtml/rendering/render_layer.cpp:
        (throw):
        (ClipRects::operator delete):
        (ClipRects::detach):
        (RenderLayer::RenderLayer):
        (RenderLayer::~RenderLayer):
        (RenderLayer::updateLayerPosition):
        (RenderLayer::removeOnlyThisLayer):
        (RenderLayer::insertOnlyThisLayer):
        (RenderLayer::scrollToOffset):
        (RenderLayer::hitTest):
        (RenderLayer::calculateClipRects):
        (RenderLayer::calculateRects):
        (RenderLayer::containsPoint):
        (RenderLayer::clearClipRects):
        (RenderLayer::clearClipRect):
        * khtml/rendering/render_layer.h:
        (khtml::ClipRects::m_refCnt):
        (khtml::ClipRects::overflowClipRect):
        (khtml::ClipRects::fixedClipRect):
        (khtml::ClipRects::posClipRect):
        (khtml::ClipRects::ref):
        (khtml::ClipRects::deref):
        (khtml::RenderLayer::clipRects):
        * khtml/rendering/render_object.cpp:
        (RenderObject::setStyle):

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

15 years ago Reviewed by Darin and Dave a while ago.
mjs [Fri, 25 Feb 2005 03:41:55 +0000 (03:41 +0000)]
    Reviewed by Darin and Dave a while ago.

<rdar://problem/3996685> REGRESSION: Crash in KWQVectorImpl::at loading http://maps.google.com/mapfiles/homepanel.xsl

* kwq/WebCoreBridge.mm:
        (formElementFromDOMElement): Check for isHTMLElement() as well as
id() == ID_FORM. This seems like an impossible situation, but
papering over it seems more expedient for the time being.

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

15 years agoFixed panther build problem.
rjw [Fri, 25 Feb 2005 01:33:07 +0000 (01:33 +0000)]
Fixed panther build problem.

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

15 years agoWebCore
rjw [Fri, 25 Feb 2005 00:50:27 +0000 (00:50 +0000)]
WebCore
Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.

Use mirror characters correctly when rendering with RTL directionality.

        Reviewed by Hyatt.

        * khtml/rendering/bidi.cpp:
        (khtml::BidiIterator::direction):

WebKit
Fixed <rdar://problem/3382926> Bidi neutrals at RTL/LTR boundaries not handled correctly.

If directionality is specified use that as initial directionality,
rather than neutral directionality.

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (widthForNextCharacter):

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

15 years ago Reviewed by Chris.
adele [Fri, 25 Feb 2005 00:33:01 +0000 (00:33 +0000)]
    Reviewed by Chris.

        Fix for <rdar://problem/4023393> Safari crashed in khtml::RenderObject::repaintAfterLayoutIfNeeded(QRect const&, QRect const&)

        We were crashing after hitting PageDown when viewing a pdf because
        WebKit was calling over to WebCore to scroll overflow areas.
        Since this only needs to be done if we're dealing with a WebHTMLView,
        I added a wrapper function to check the documentView before calling
        over to WebCore.

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView _scrollOverflowInDirection:granularity:]): added wrapper function that checks if documentView is a WebHTMLView
        (-[WebFrameView scrollToBeginningOfDocument:]): uses new wrapper function now
        (-[WebFrameView scrollToEndOfDocument:]): uses new wrapper function now
        (-[WebFrameView _pageVertically:]): uses new wrapper function now
        (-[WebFrameView _pageHorizontally:]): uses new wrapper function now
        (-[WebFrameView _scrollLineVertically:]): uses new wrapper function now
        (-[WebFrameView _scrollLineHorizontally:]): uses new wrapper function now

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

15 years agoWebCore:
rjw [Fri, 25 Feb 2005 00:25:12 +0000 (00:25 +0000)]
WebCore:
Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame

        Reviewed by Hyatt.

        * WebCore.pbproj/project.pbxproj:
        * khtml/html/html_imageimpl.cpp:
        (HTMLImageLoader::updateFromElement):
        * khtml/rendering/render_image.cpp:
        (RenderImage::resetAnimation):
        * khtml/rendering/render_image.h:
        * khtml/rendering/render_list.cpp:
        (RenderListMarker::setStyle):
        (RenderListMarker::paint):
        * khtml/rendering/render_list.h:
        * kwq/KWQPixmap.h:
        * kwq/KWQPixmap.mm:

WebKit:
Fixed <rdar://problem/3985889> REGRESSION (125-180): setting <img> src to GIF that already animated does not animate; just shows final frame

        Reviewed by Hyatt.

        * WebCoreSupport.subproj/WebImageData.h:
        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData resetAnimation]):
        * WebCoreSupport.subproj/WebImageRenderer.m:
        (-[WebImageRenderer resetAnimation]):
        (-[WebInternalImage resetAnimation]):
        (-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]):

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

15 years ago Fixed: <rdar://problem/4020110> Safari crashes in setAllData while taking a www...
cblu [Fri, 25 Feb 2005 00:00:43 +0000 (00:00 +0000)]
Fixed: <rdar://problem/4020110> Safari crashes in setAllData while taking a zoomerang.com survey

        Reviewed by rjw.

        * kwq/KWQResourceLoader.mm:
        (-[KWQResourceLoader finishJobAndHandle:]): clear the job after we've deleted to avoid reentrancy

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

15 years ago Reviewed by John.
kdecker [Thu, 24 Feb 2005 23:07:44 +0000 (23:07 +0000)]
    Reviewed by John.

Fixed <rdar://problem/3962401> Don't load multipart/x-mixed-replace content to prevent memory leak

Since we're not going to fix <rdar://problem/3087535> for Tiger, we should not load multipart/x-mixed-replace content.  Pages with such content contain what is essentially an infinite load and therefore may leak.

        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:didReceiveResponse:]):  Disabled loading of multipart/x-mixed-replace content until we fully implement server side push.
      * WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient didReceiveResponse:]): Ditto. Same exact thing for sub resources.

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

15 years ago Reviewed by Vicki.
darin [Thu, 24 Feb 2005 22:35:46 +0000 (22:35 +0000)]
    Reviewed by Vicki.

        - fixed <rdar://problem/4023360> REGRESSION (186-187): image file upload is broken at pep.apple.com

        * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::appendFormData): Return true after
        setting up the form data for an uploaded file. The old code would fall through to the ISINDEX
        case and send double form data (the filename instead of the file contents the second time).

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

15 years ago Reviewed by Ken.
harrison [Thu, 24 Feb 2005 22:17:27 +0000 (22:17 +0000)]
    Reviewed by Ken.

        <rdar://problem/3990849> AX: textMarkerRange for an AXUIElement within an AXWebArea

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject textMarkerRange]):
        (-[KWQAccObject accessibilityParameterizedAttributeNames]):
        (-[KWQAccObject doAXTextMarkerRangeForUIElement:]):
        (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
        Added AXTextMarkerRangeForUIElement, or you can send textMarkerRange to the UIElement itself.

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

15 years ago Reviewed by Vicki.
harrison [Thu, 24 Feb 2005 21:28:58 +0000 (21:28 +0000)]
    Reviewed by Vicki.

        <rdar://problem/4004279> 3 AXSelectedTextChanged notifications are firing each time I type a character

        * khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::updateSelection):
        Send notification only if the selection is not null.  This safely ignores transitory selections set during editing.

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

15 years ago Reviewed by John.
darin [Thu, 24 Feb 2005 17:59:39 +0000 (17:59 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/3987619> in some cases, text doesn't resize with Format->Style->Bigger/Smaller

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): Only call nodeFullySelected for non-text nodes.
        Text nodes are already split so they're either in the range and full selected or out of the range.
        And nodeFullySelected doesn't work for text nodes.
        (khtml::ApplyStyleCommand::nodeFullySelected): Add an assertion, since this function only works for elements,
        not text nodes.
        (khtml::ApplyStyleCommand::nodeFullyUnselected): Ditto.

        - make big improvement in <rdar://problem/3953636> Mail hung for ~10sec changing font of 84328 characters: khtml::ApplyStyleCommand::nodeFullySelected

        * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints): Improve algorithm based on suggestion
        from Nate Begeman.

        - fixed <rdar://problem/4020305> REGRESSION (185-186): loading image in new window using document.write fails

        * khtml/xml/dom_docimpl.cpp: (DocumentImpl::open): If there is no parent document, don't blow away the base URL.

        - fixed <rdar://problem/4021701> REGRESSION (188-188+): form not submitted after pressing <return> at http://hrweb.apple.com

        * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchMouseEvent): Send activate event in the case where the event
        sent is a KHTML_CLICK_EVENT, not CLICK_EVENT.

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

15 years ago Reviewed by mjs
kdecker [Thu, 24 Feb 2005 15:30:03 +0000 (15:30 +0000)]
    Reviewed by mjs

        Fixed <rdar://problem/4020747> REGRESSION: stray </applet> tags crash Safari

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::processCloseTag):  Made a typesafe check that prevents crashes
        whenever there is a closing applet tag without an actual <applet> in the first place.
        Now verifies the current token is ID_APPLET before casting it to an HTMLAppletElementImpl.

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

15 years ago Reviewed by John
kocienda [Thu, 24 Feb 2005 00:35:01 +0000 (00:35 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3977962> font loses bold style after pasting next to existing text and pressing return

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Problem here was
        that we were doing work in cases where we should not, and content whose style would have
        been correct if we had done nothing was getting clobbered. It turns out that extra work
        to apply style to the new paragraph added in this command only needs to be done if we're
        at the boundaries of a paragraph. Otherwise, content that is moved as part of the work
        of the command will lend their styles to the new paragraph without any extra work needed.
        So, make this position check and return unless at a paragraph boundary.

        New test:

        * layout-tests/editing/style/block-styles-007-expected.txt
        * layout-tests/editing/style/block-styles-007.html

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

15 years ago Reviewed by Ken.
sullivan [Wed, 23 Feb 2005 22:59:33 +0000 (22:59 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4021370> REGRESSION (Tiger): WebKit part of fix for
        shift-tab on tivofaq doing the wrong thing

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView becomeFirstResponder]):
        If our previousValidKeyView is nil or self (same as nil modulo AppKit oddness),
        look out of the box and get the previousValidKeyView of our webview.

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 23 Feb 2005 22:11:16 +0000 (22:11 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4017641> REGRESSION (Mail): you can only bold/unbold a selection starting from end of line once

        Problem is with the way we figure out whether to add or remove a style based on
        the current selection. In this case, the code is looking at the end of the
        previous line, which is not bold, and deduces incorrectly that the operation is
        a "make bold". Then the style code runs to make bold, but there is nothing on
        the end of the previous line to embolden, so we get into a cycle where the same
        thing happens each time cmd-b is hit.

        * khtml/khtml_part.cpp:
        (KHTMLPart::selectionComputedStyle):  Call editingStartPosition() to get the right position for the font determination.
        * khtml/xml/dom2_rangeimpl.cpp:
        (DOM::RangeImpl::editingStartPosition): New helper function that "does the right thing" based on whether the
        selection is a caret or a range, moving upstream for the former, and downstream for the latter.
        * khtml/xml/dom2_rangeimpl.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::fontForSelection): Call editingStartPosition() to get the right position for the font determination.

        New tests:

        * layout-tests/editing/style/style-boundary-001-expected.txt
        * layout-tests/editing/style/style-boundary-001.html
        * layout-tests/editing/style/style-boundary-002-expected.txt
        * layout-tests/editing/style/style-boundary-002.html
        * layout-tests/editing/style/style-boundary-003-expected.txt
        * layout-tests/editing/style/style-boundary-003.html
        * layout-tests/editing/style/style-boundary-004-expected.txt
        * layout-tests/editing/style/style-boundary-004.html

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

15 years ago Fixed <rdar://problem/3985579> 8A367: Dashboard: Stock widget not visible when click...
rjw [Wed, 23 Feb 2005 22:04:12 +0000 (22:04 +0000)]
Fixed <rdar://problem/3985579> 8A367: Dashboard: Stock widget not visible when click remove to remove single char ticker symbol

Explicitly remove scroll bar views when removing them from
the overflow.

Don't paint synchronously when the scroll position changes,
this caused funky clip problems.

        Reviewed by Hyatt.

        * khtml/rendering/render_layer.cpp:
        (RenderLayer::scrollToOffset):
        (RenderLayer::setHasHorizontalScrollbar):
        (RenderLayer::setHasVerticalScrollbar):
        (RenderLayer::updateScrollInfoAfterLayout):

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 23 Feb 2005 21:38:20 +0000 (21:38 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/3959996> REGRESSION (Mail): cursor moves to beginning of document when click is past end

        * khtml/rendering/render_block.cpp:
        (khtml::RenderBlock::positionForCoordinates): Skip blocks that are invisible or have no height when
        looking for a child to pass off to. And save away the last visible block with a height to pass off
        to if there is no child at the right y-coordinate.

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

15 years ago Reviewed by Darin.
harrison [Wed, 23 Feb 2005 21:25:11 +0000 (21:25 +0000)]
    Reviewed by Darin.

        <rdar://problem/4010059> BoundsForTextMarkerRange does not update with scrolled web area

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
        Adjust for scrolling.

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

15 years ago Reviewed by Ken.
mjs [Wed, 23 Feb 2005 20:22:59 +0000 (20:22 +0000)]
    Reviewed by Ken.

<rdar://problem/3949790> hitting return after pasted styled line results in extra content getting the style

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): In the case
where the start block is the root, insert the newly created DIV at
the end of the root block instead of after the last sibling in the
start node, since the start node could be inside other
style-affecting nodes and we don't want to reparent its cousins
into that.

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

15 years ago Reviewed by Vicki.
harrison [Wed, 23 Feb 2005 20:09:17 +0000 (20:09 +0000)]
    Reviewed by Vicki.

        <rdar://problem/4014691> switch to correctly spelled NSAccessibilityForegroundColorTextAttribute constant

        Also removed two older, now unneeded, wrappers.

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
        (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
        Removed these older, now unneeded, wrappers.

        (NSAccessibilityForegroundColorTextAttributeWrapper):
        New wrapper for NSAccessibilityForegroundColorTextAttribute.

        (AXAttributeStringSetStyle):
        Use NSAccessibilityForegroundColorTextAttributeWrapper.

        (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
        Remove uses of visiblePositionForStartOfTextMarkerRange and visiblePositionForEndOfTextMarkerRange.

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

15 years ago Reviewed by Vicki.
harrison [Wed, 23 Feb 2005 19:07:53 +0000 (19:07 +0000)]
    Reviewed by Vicki.

        <rdar://problem/3524784> AX hit test doesn't return info when done in empty space of content area

        * kwq/KWQAccObject.mm:
        (-[KWQAccObject accessibilityHitTest:]):
        Return unignored object.

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

15 years ago Reviewed by Hyatt.
darin [Wed, 23 Feb 2005 19:06:56 +0000 (19:06 +0000)]
    Reviewed by Hyatt.

        - fixed <rdar://problem/4010196> REGRESSION (125-186+): 8-character timestamps in gmail wrap to 2 lines (width:8ex; font-size:80%)

        * WebCoreSupport.subproj/WebTextRenderer.m: (-[WebTextRenderer xHeight]): Return the maximum
        of the "x" height and width. Comment in the code explains why in more detail.

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

15 years ago Reviewed by Ken.
darin [Wed, 23 Feb 2005 18:23:01 +0000 (18:23 +0000)]
    Reviewed by Ken.

        - fixed <rdar://problem/4006509> REGRESSION (171-172): Setting CSS -khtml-user-modify property triggers crash

        * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::applyProperty):
        Removed the code that changes the style of the element. This was never needed, and caused the
        style to be modified while we were iterating it.

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

15 years ago Reviewed by John
kocienda [Wed, 23 Feb 2005 17:54:00 +0000 (17:54 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3980209> Mail crashed when I pressed Cmd-Shift-[ (nil-deref in ApplyStyleCommand::addBlockStyleIfNeeded)

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Reordered the new block
        insertion so that it come before the move. The logic stays exactly the same, however, with the old
        ordering, the new block could want to become a child of itself come insertion time. I considered
        making a more complicated code change to fix this problem, but the simple reordering works just
        as well, and seems less risky.

        These all changed in an insignificant way. It seems that with the new code, some empty text nodes
        got reordered in the document. This has no effect on anything visible to the user.

        * layout-tests/editing/style/create-block-for-style-003-expected.txt
        * layout-tests/editing/style/create-block-for-style-004-expected.txt
        * layout-tests/editing/style/create-block-for-style-009-expected.txt
        * layout-tests/editing/style/create-block-for-style-011-expected.txt
        * layout-tests/editing/style/create-block-for-style-013-expected.txt

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

15 years ago Reviewed by John.
darin [Wed, 23 Feb 2005 17:42:36 +0000 (17:42 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4013986> REGRESSION (173-174): onclick event not sent when mouse click on checkbox is double-click

        We need to send an onclick event *and* an ondblclick event when we process a double click.

        * khtml/khtmlview.cpp: (KHTMLView::dispatchMouseEvent): In the case where we're sending a CLICK_EVENT,
        follow it by a KHTML_CLICK_EVENT, a KHTML_DBLCLICK_EVENT when handling a double click, and a DOMACTIVATE_EVENT.
        We no longer do the DOMACTIVATE_EVENT in dispatchGenericEvent.
        * khtml/rendering/render_form.cpp: (RenderFormElement::slotClicked): send only CLICK_EVENT here, and
        lets dispatchMouseEvent deal with the other subsequent events.
        * khtml/xml/dom_nodeimpl.cpp:
        (NodeImpl::dispatchGenericEvent): Remove the code that sends a DOMACTIVATE_EVENT, since there's no longer
        a good way to figure out if this is the last event that should be sent before it is.
        (NodeImpl::dispatchMouseEvent): Set the meta key modifier here (as it already is set elsewhere), and
        follow up a CLICK_EVENT with KHTML_CLICK_EVENT, a KHTML_DBLCLICK_EVENT, and DOMACTIVATE_EVENT as above.

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

15 years ago Reviewed by John.
darin [Wed, 23 Feb 2005 17:35:40 +0000 (17:35 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4011405> REGRESSION (180-181): Unconfirmed text disappears when text focus moves

        The key was to change things around so that we don't push text from the DOM to the widget
        unless the DOM has actually been changed. This prevents the code path that wipes out inline input
        during the blur process.

        * khtml/html/html_formimpl.cpp:
        (DOM::HTMLInputElementImpl::HTMLInputElementImpl): Start m_valueMatchesRenderer as false.
        (DOM::HTMLInputElementImpl::parseHTMLAttribute): Set m_valueMatchesRenderer to false when a
        new value is set here.
        (DOM::HTMLInputElementImpl::setValue): Set m_valueMatchesRenderer to false when a new value
        is set here.
        (DOM::HTMLInputElementImpl::setValueFromRenderer): Added. Sets m_value, sets m_valueMatchesRenderer
        to true, and also sends out the input event. It's better to have this here than in the renderer code.
        (DOM::HTMLTextAreaElementImpl::HTMLTextAreaElementImpl): Start m_valueIsValid as false (replaces
        m_dirtyvalue) and m_valueMatchesRenderer as false.
        (DOM::HTMLTextAreaElementImpl::updateValue): Added. Factored this out from the value function. Uses
        the new booleans and keeps them up to date, specifically setting m_valueMatchesRenderer based on
        where the value came from.
        (DOM::HTMLTextAreaElementImpl::value): Updated to call updateValue to do most of the work.
        (DOM::HTMLTextAreaElementImpl::setValue): Set both m_valueIsValid and m_valueMatchesRenderer.
        (DOM::HTMLTextAreaElementImpl::setDefaultValue): Take parameter by reference.

        * khtml/html/html_formimpl.h: Added setValueFromRenderer, valueMatchesRenderer, setValueMatchesRenderer,
        and m_valueMatchesRenderer to input element. For textarea element, made some parameters pass DOMString
        by reference, and added invalidateValue, updateValue, valueMatchesRenderer, and setValueMatchesRenderer.

        * khtml/rendering/render_form.cpp:
        (RenderLineEdit::updateFromElement): Don't re-get the value from the DOM if valueMatchesRenderer
        is true.
        (RenderLineEdit::slotTextChanged): Call setValueFromRenderer instead of manipulating the DOM
        directly.
        (RenderTextArea::detach): Call updateValue instead of calling value for its side effect.
        (RenderTextArea::handleFocusOut): Ditto.
        (RenderTextArea::updateFromElement): Call updateValue and then not re-get the value from the
        DOM if valueMatchesRenderer is true.
        (RenderTextArea::slotTextChanged): Call invalidateValue instead of directly setting m_dirtyvalue to true.

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

15 years agoWebCore:
rjw [Wed, 23 Feb 2005 03:44:13 +0000 (03:44 +0000)]
WebCore:
Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions

Just set dashboard dirty bit when overflow scrolling changes.

Don't do comparison of regions in before scroll regions are
added, instead do it in WebKit after automatic scroll regions
are added.

        Reviewed by Maciej.

        * khtml/css/cssparser.cpp:
        (CSSParser::parseDashboardRegions):  Cleaned up comments
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::styleForElement): Cleaned up comments

        * khtml/khtmlview.cpp:
        (KHTMLView::updateDashboardRegions):
        * khtml/rendering/render_layer.cpp:
        (RenderLayer::updateScrollInfoAfterLayout):
        * kwq/WebDashboardRegion.m:
        (-[WebDashboardRegion isEqual:]):

Webkit:
Fixed <rdar://problem/3937203> when a div adds a scrollbar (overflow:auto) we do not get regions

Compare regions after automatice scroll regions have been
added.

        Reviewed by Maciej.

        * WebCoreSupport.subproj/WebBridge.h:
        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge dealloc]):
        (-[WebBridge _compareDashboardRegions:]):
        (-[WebBridge dashboardRegionsChanged:]):

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

15 years ago Fixed <rdar://problem/4012463> Dashboard widgets don't work with authenticating...
rjw [Wed, 23 Feb 2005 03:34:31 +0000 (03:34 +0000)]
Fixed <rdar://problem/4012463> Dashboard widgets don't work with authenticating proxies

Added new SPI for dashboard that just calls default delegate
behavior.

        Reviewed by Maciej.

        * WebView.subproj/WebView.m:
        (-[WebView handleAuthenticationForResource:challenge:fromDataSource:]):
        * WebView.subproj/WebViewPrivate.h:

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

15 years agoWebCore:
cblu [Wed, 23 Feb 2005 02:34:08 +0000 (02:34 +0000)]
WebCore:

Fixed: <rdar://problem/3976872> Pasted plain text doesn't get the proper style if pasted into newlines

        Reviewed by mjs.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): don't clear the typing style when matching style
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply the typing style when matching style
        * khtml/editing/jsediting.cpp:
        * khtml/khtml_part.cpp:
        (KHTMLPart::pasteAndMatchStyle): new
        * khtml/khtml_part.h:
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::issuePasteAndMatchStyleCommand): new
        * kwq/WebCoreBridge.h:
        * layout-tests/editing/editing.js:

WebKit:

        Reviewed by mjs.

        * WebCoreSupport.subproj/WebBridge.m:
        (-[WebBridge issuePasteAndMatchStyleCommand]): support for new "PasteAndMatchStyle" exec command

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

15 years ago Reviewed by Adele.
darin [Wed, 23 Feb 2005 01:27:59 +0000 (01:27 +0000)]
    Reviewed by Adele.

        - fixed <rdar://problem/4006596> REGRESSION (183-184): crash in DOM::DocumentImpl::setFocusNode(DOM::NodeImpl*)

        * khtml/xml/dom_docimpl.cpp:
        (widgetForNode): Added helper.
        (DocumentImpl::setFocusNode): Re-get the widget for the node after calling updateLayout.
        The updateLayout can destroy the old widget, so we can't keep a stale widget pointer around.

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

15 years ago Reviewed by Hyatt
kocienda [Wed, 23 Feb 2005 00:10:45 +0000 (00:10 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4003463> Mail.app HTML uses inline styling markup not understood by Entourage and Eudora

        * khtml/editing/htmlediting.cpp:
        (khtml::isEmptyFontTag): Helper for removing <font> tags.
        (khtml::StyleChange::styleModeForParseMode): Helper to map a document parse mode to a use/don't use
        legacy-html-styles value.
        (khtml::StyleChange::checkForLegacyHTMLStyleChange): Add support for colors, font faces, and font sizes.
        (khtml::ApplyStyleCommand::isHTMLStyleNode):
        (khtml::ApplyStyleCommand::removeHTMLFontStyle):
        (khtml::ApplyStyleCommand::applyTextDecorationStyle): Now call styleModeForParseMode to determine
        whether to use legacy html styles or not.
        (khtml::ApplyStyleCommand::removeInlineStyle): Now properly removes <font> styles.
        (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto.
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
        (khtml::createFontElement): Helper for applying <font> elements.
        * khtml/editing/htmlediting.h: All the following support the new bits of data we need to store.
        (khtml::StyleChange::applyFontColor)
        (khtml::StyleChange::applyFontFace)
        (khtml::StyleChange::applyFontSize)
        (khtml::StyleChange::fontColor)
        (khtml::StyleChange::fontFace)
        (khtml::StyleChange::fontSize)

        Test results updated now that we will write out <font> tags for quirks mode documents.

        * layout-tests/editing/execCommand/modifyForeColorByCharacter-expected.txt
        * layout-tests/editing/style/block-style-004-expected.txt
        * layout-tests/editing/editing/pasteboard/paste-text-011-expected.txt
        * layout-tests/editing/style/block-style-005-expected.txt
        * layout-tests/editing/style/block-style-006-expected.txt
        * layout-tests/editing/style/smoosh-styles-001-expected.txt
        * layout-tests/editing/style/smoosh-styles-002-expected.txt

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

15 years ago Reviewed by Kevin.
mjs [Wed, 23 Feb 2005 00:00:12 +0000 (00:00 +0000)]
    Reviewed by Kevin.

<rdar://problem/4017066> crash in KJS::ValueImp::dispatchType() every time I load www.nytimes.com/pages/automobiles

When creating option elements, use lowercase "option" instead of
uppercase "OPTION" to create option elements, because only
lowercase works for XHTML.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLSelectCollection::tryPut):
        (OptionConstructorImp::construct):

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

15 years ago WebCore fix for: <rdar://problem/3918056> Mail not line breaking my <pre> formatted...
cblu [Tue, 22 Feb 2005 23:22:22 +0000 (23:22 +0000)]
WebCore fix for: <rdar://problem/3918056> Mail not line breaking my <pre> formatted emails on replies

Mail must 4018993 to fully address the problem.

        Reviewed by kocienda.

        * khtml/editing/markup.cpp:
        (khtml::startMarkup): don't compute style for text in PRE tags
        (khtml::createMarkup): include PRE if it is an ancestor of the nodes in the range

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

15 years ago Fixed <rdar://problem/4008338> REGRESSION (125-178): opacity style not working,...
rjw [Tue, 22 Feb 2005 01:32:52 +0000 (01:32 +0000)]
Fixed <rdar://problem/4008338> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com

There was a long standing bug in cssText().  Double value were always cast int!  So,
opacity values values were incorrectly converted to text, i.e. 0.75 became 0.

The problem was newly triggered because we parse the css for opacity *TWICE*.  This is a result of
incorrectly "invalidating" the style attribute (from fix for 3790449).  The second parse was from
the cssText() of the style.

        Reviewed by Hyatt.

        * khtml/css/css_valueimpl.cpp:
        (DOM::CSSPrimitiveValueImpl::cssText):

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

15 years ago Fix for 4017204, apply the same fix to the base class nodeAtPoint that was already...
hyatt [Tue, 22 Feb 2005 00:19:31 +0000 (00:19 +0000)]
Fix for 4017204, apply the same fix to the base class nodeAtPoint that was already applied to RenderBlock.
Skip elements with layers and inline flows.  Demoted <form>s can end up causing trouble otherwise.

        Reviewed by Richard Williamson

        * khtml/rendering/render_box.cpp:
        (RenderBox::nodeAtPoint):

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

15 years ago Fix for 4017033, CSS is being parsed twice. Make sure to always validate the style...
hyatt [Mon, 21 Feb 2005 23:36:16 +0000 (23:36 +0000)]
Fix for 4017033, CSS is being parsed twice.  Make sure to always validate the style attribute when it is
initially parsed.  Add code to clean up decls when the style attribute is completely removed.  Add a new
synchronizing boolean that avoids reparsing the style declaration when the attribute is simply
being synced up to the declaration.

        Reviewed by John

        * khtml/css/css_valueimpl.cpp:
        (DOM::CSSMutableStyleDeclarationImpl::setChanged):
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::invalidateStyleAttribute):
        (HTMLElementImpl::updateStyleAttributeIfNeeded):
        (HTMLElementImpl::HTMLElementImpl):
        (HTMLElementImpl::~HTMLElementImpl):
        (HTMLElementImpl::destroyInlineStyleDecl):
        (HTMLElementImpl::mapToEntry):
        (HTMLElementImpl::parseHTMLAttribute):
        * khtml/html/html_elementimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        (ElementImpl::ElementImpl):
        (ElementImpl::setAttribute):
        * khtml/xml/dom_elementimpl.h:
        (DOM::ElementImpl::updateStyleAttributeIfNeeded):

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

15 years agoversioning for TOT, Safari 2.0 (188+)
vicki [Mon, 21 Feb 2005 23:24:42 +0000 (23:24 +0000)]
versioning for TOT, Safari 2.0 (188+)

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

15 years agoSafari-188 stamp
vicki [Mon, 21 Feb 2005 23:17:19 +0000 (23:17 +0000)]
Safari-188 stamp

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

15 years agoTree was closed. Rolling out.
kocienda [Mon, 21 Feb 2005 22:02:34 +0000 (22:02 +0000)]
Tree was closed. Rolling out.

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

15 years ago Reviewed by Hyatt
kocienda [Mon, 21 Feb 2005 22:01:07 +0000 (22:01 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4003463> Mail.app HTML uses inline styling markup not understood by Entourage and Eudora

        * khtml/editing/htmlediting.cpp:
        (khtml::isEmptyFontTag): Helper for removing <font> tags.
        (khtml::StyleChange::styleModeForParseMode): Helper to map a document parse mode to a use/don't use
        legacy-html-styles value.
        (khtml::StyleChange::checkForLegacyHTMLStyleChange): Add support for colors, font faces, and font sizes.
        (khtml::ApplyStyleCommand::isHTMLStyleNode):
        (khtml::ApplyStyleCommand::removeHTMLFontStyle):
        (khtml::ApplyStyleCommand::applyTextDecorationStyle): Now call styleModeForParseMode to determine
        whether to use legacy html styles or not.
        (khtml::ApplyStyleCommand::removeInlineStyle): Now properly removes <font> styles.
        (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Ditto.
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Ditto.
        (khtml::createFontElement): Helper for applying <font> elements.
        * khtml/editing/htmlediting.h: All the following support the new bits of data we need to store.
        (khtml::StyleChange::applyFontColor)
        (khtml::StyleChange::applyFontFace)
        (khtml::StyleChange::applyFontSize)
        (khtml::StyleChange::fontColor)
        (khtml::StyleChange::fontFace)
        (khtml::StyleChange::fontSize)

        Test results updated now that we will write out <font> tags for quirks mode documents.

        * layout-tests/editing/execCommand/modifyForeColorByCharacter-expected.txt
        * layout-tests/editing/style/block-style-004-expected.txt
        * layout-tests/editing/style/block-style-005-expected.txt
        * layout-tests/editing/style/block-style-006-expected.txt
        * layout-tests/editing/style/smoosh-styles-001-expected.txt
        * layout-tests/editing/style/smoosh-styles-002-expected.txt

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

15 years ago - fixed Panther deployment build
darin [Mon, 21 Feb 2005 21:55:42 +0000 (21:55 +0000)]
    - fixed Panther deployment build

        * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Put more stuff inside #if.

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

15 years ago Reviewed by Darin.
harrison [Mon, 21 Feb 2005 19:56:24 +0000 (19:56 +0000)]
    Reviewed by Darin.

        <rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer misspellingLineThickness]):
        (-[WebTextRenderer misspellingLinePatternWidth]):
        Replaced #defines with these methods, so others can get the same info.

        (-[WebTextRenderer drawLineForMisspelling:withWidth:]):
        Keep underline within originally specified bounds.

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

15 years ago Reviewed by Darin.
harrison [Mon, 21 Feb 2005 19:56:06 +0000 (19:56 +0000)]
    Reviewed by Darin.

        <rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps

        * khtml/rendering/render_text.cpp:
        (InlineTextBox::paintMarker):
        Make sure underline is placed within the text bounds.

        * kwq/KWQPainter.h:
        * kwq/KWQPainter.mm:
        (QPainter::misspellingLineThickness):
        * kwq/WebCoreTextRenderer.h:
        Add misspellingLineThickness for use by InlineTextBox::paintMarker.

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

15 years ago Reviewed by John.
darin [Mon, 21 Feb 2005 19:50:08 +0000 (19:50 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4012978> -[DOMRange markupString] crashes when range contains only a text node with a single space

        * khtml/editing/markup.cpp: (khtml::createMarkup): Added updateLayout calls, and added a missing
        nil check.

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

15 years ago Reviewed by John.
darin [Mon, 21 Feb 2005 17:50:57 +0000 (17:50 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4005435> Safari hung while pasting text into a <textarea> (Panther-only)

        * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Don't setAutohidesScrollers:YES on Panther.

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

15 years ago Reviewed by John.
darin [Mon, 21 Feb 2005 17:45:57 +0000 (17:45 +0000)]
    Reviewed by John.

        - fixed <rdar://problem/4016358> don't ever display IDN URLs with characters from "possible Latin look-alike" scripts

        * Misc.subproj/WebNSURLExtras.m:
        (containsPossibleLatinLookalikes): Added.
        (-[NSString _web_mapHostNameWithRange:encode:makeString:]): Call containsPossibleLatinLookalikes, and if true,
        don't decode the host name.

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

15 years ago Reviewed by John
kocienda [Mon, 21 Feb 2005 17:33:47 +0000 (17:33 +0000)]
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4015499> REGRESSION (186-187): pasted quoted text starting with a blank line increases quote level of pasted text when pasted

        * khtml/editing/markup.cpp:
        (khtml::markup): Changed over to ASSERT instead of assert.
        (khtml::createMarkup): The issue was that the code to add parents all the way back to the common ancestor
        block did not check for blocks whose markup had already been added, and could result in adding markup for
        nodes twice (hence the additional and erroneous quote level). Now there is a new check that will
        only add markup for those nodes before the start of the selection range. This fixes the bug.
        (khtml::createFragmentFromMarkup): Changed over to ASSERT instead of assert.
        (khtml::createFragmentFromText): Ditto.

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

15 years ago * kjs/date_object.cpp: (timetUsingCF): Fixed indenting.
darin [Mon, 21 Feb 2005 17:32:35 +0000 (17:32 +0000)]
    * kjs/date_object.cpp: (timetUsingCF): Fixed indenting.

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

15 years ago Reviewed by Maciej
kocienda [Sun, 20 Feb 2005 02:24:40 +0000 (02:24 +0000)]
    Reviewed by Maciej

        * khtml/editing/htmlediting.cpp:
        (khtml::matchNearestBlockquoteColorString): New function which abstracts away the CSS property we use
        for this pseudo-color.
        (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Set the new nearestBlockquoteColorString
        psuedo-color here, rather than removing colors as was done before.
        (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): Check for the pseudo-color in the desired
        style, and determine the real color based on the nearest blockquote (or none) to the node.
        (khtml::nearestMailBlockquote): Name change from closestMailBlockquote to match new property better.

        All the rest of this change is the mechanical coding you need to do to add a new CSS property, in this
        case, -khtml-match-nearest-mail-blockquote-color.

        * khtml/css/css_computedstyle.cpp:
        (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue)
        * khtml/css/cssparser.cpp:
        (CSSParser::parseValue):
        * khtml/css/cssproperties.c:
        (hash_prop):
        (findProp):
        * khtml/css/cssproperties.h:
        * khtml/css/cssproperties.in:
        * khtml/css/cssstyleselector.cpp:
        (khtml::CSSStyleSelector::applyProperty)
        * khtml/css/cssvalues.c:
        (findValue)
        * khtml/css/cssvalues.h:
        * khtml/css/cssvalues.in:
        * khtml/rendering/render_style.h:
        (khtml::RenderStyle::matchNearestMailBlockquoteColor)
        (khtml::RenderStyle::setMatchNearestMailBlockquoteColor)
        (khtml::RenderStyle::initialMatchNearestMailBlockquoteColor)

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

15 years ago Reviewed by Chris
kocienda [Sat, 19 Feb 2005 22:53:43 +0000 (22:53 +0000)]
    Reviewed by Chris

        Fix for these bugs:

        <rdar://problem/4014228> REGRESSION (186-187) extra, uneditable lines inserted above and below a line of pasted quoted text
        <rdar://problem/4014393> REGRESSION (186-187) pasted quoted text gets extra <cr>s when pasted at top of document

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::ReplacementFragment): Part of a general refactoring of how
        the fragment is inserted into the document, rendered, and then tested for certain
        important pieces of information that are required for pasting.
        (khtml::ReplacementFragment::insertFragmentForTestRendering): New helper. Handles inserting
        the fragment nodes into the document.
        (khtml::ReplacementFragment::restoreTestRenderingNodesToFragment): Removes nodes from the
        document, and restores them to the fragment.
        (khtml::ReplacementFragment::computeStylesUsingTestRendering): Factored out code that
        did this before into its own function.
        (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto.
        (khtml::ReplacementFragment::countRenderedBlocks): This is a real improvement, as it
        eliminates a major use of the isProbablyBlock() function. Now, the blocks that are
        counted are real, rendered blocks.
        (khtml::ReplacementFragment::removeStyleNodes): Made this function retain margin-zeroing
        CSS properties on paragraphs. This does two things: 1) It helps us to maintain good behavior
        in the short term while there are still versions of Mail out there that use <p> elements
        instead of <div> elements for new paragraphs; and 2) It will help to maintain the compatibility
        with other mail clients that use <p> elements for their paragraphs but render them themselves
        with no margins as the result of quirks.
        (khtml::ReplaceSelectionCommand::doApply): Do some work to fix up and improve the handling
        of blank lines, be they <p> elements or <br> elements, that can be removed after pasting. This,
        coupled with the refactoring, fixes 4014393.
        * khtml/editing/htmlediting.h: Updated for new functions.
        * layout-tests/editing/pasteboard/paste-text-010-expected.txt: Updated results, actually improved with this change.
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Ditto.

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

15 years ago Reviewed by Chris.
kdecker [Sat, 19 Feb 2005 21:46:34 +0000 (21:46 +0000)]
    Reviewed by Chris.

Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission

Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case.  Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker.

        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): Changed this to invoke the new stringByEvaluatingJavaScriptFromString:forceUserGesture method below.
        (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Let the WebKit make the determination if this was a user originated gesture or not; we must no longer assume this is always the case.

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

15 years ago Reviewed by Chris.
kdecker [Sat, 19 Feb 2005 21:40:02 +0000 (21:40 +0000)]
    Reviewed by Chris.

Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission

Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case.  Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker.

        * Plugins.subproj/WebBaseNetscapePluginView.h: Addded currentEventIsUserGesture boolean ivar.
        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView sendEvent:]): If at any point the user clicks or presses a key from within a plugin, set the currentEventIsUserGesture flag to true. This is important to differentiate legitimate window.open() calls originating from plugins;  we still want to allow those.
        (-[WebBaseNetscapePluginView initWithFrame:]): In our asynchronous load, pass along currentEventIsUserGesture to the PluginRequest.
        (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Inform WebCore if this was a user originated gesture when calling executeScript().
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
        (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
        (-[WebPluginRequest isCurrentEventUserGesture]): Added.

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

15 years ago Fixed: <rdar://problem/3951196> REGRESSION (Mail): too many levels of reply quotes...
cblu [Sat, 19 Feb 2005 21:36:03 +0000 (21:36 +0000)]
Fixed: <rdar://problem/3951196> REGRESSION (Mail): too many levels of reply quotes after certain steps

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
- If we find a new start node, update topBlockquote so we don't use too many block quotes for the contents following the new line.
- Build up the list of ancestors after we've determined the actual topBlockquote.
- Don't insert an extra new line if there is a new start node.

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

15 years ago Fixed: <rdar://problem/3978461> smart paste is broken
cblu [Sat, 19 Feb 2005 18:59:07 +0000 (18:59 +0000)]
Fixed: <rdar://problem/3978461> smart paste is broken

        Reviewed by kevin.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): properly check for leading and trailing whitespace. These checks were incorrectly reversed. Also check if we're pasting at the beginning or end of a line. We should not insert spaces in either case.

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

15 years ago Reviewed by Darin.
adele [Sat, 19 Feb 2005 01:13:01 +0000 (01:13 +0000)]
    Reviewed by Darin.

        Fix for <rdar://problem/3975568> REGRESSION(125-180)Australian Open pages have drawing problem

        This patch fixes two problems caused by our added support for custom tags.  First, the layout problem at the sites mentioned in the bug
        was caused by custom tags within tables.  In checkChild, we needed to treat these tags as spans so they get placed correctly in the DOM tree.
        Also, we were indexing the tagPriority and endTag arrays with id values from the custom tags that were greater than the size of the array.  So now
        we have functions to check for the custom tags, and again, treat them as spans.  To avoid confusion, we changed the names of the arrays to
        endTagArray and tagPriorityArray.

        * khtml/html/dtd.h: changed all uses of the endTag array to endTagArray for our new wrapper functions
        (DOM::tagPriority): added function to check array bounds and to treat custom tags as spans
        (DOM::endTagRequirement): added function to check array bounds and to treat custom tags as spans
        * khtml/html/dtd.cpp: changed name of endTag and tagPriority arrays to endTagArray and tagPriorityArray
        (DOM::checkChild): treat custom tags as spans during this check
        * khtml/html/html_elementimpl.cpp: changed all uses of the endTag array to the endTagRequirement function
        (HTMLElementImpl::createContextualFragment):
        (HTMLElementImpl::setInnerText):
        (HTMLElementImpl::setOuterText):
        (HTMLElementImpl::toString):
        * khtml/html/htmlparser.cpp: changed all uses of the endTag array to the endTagRequirement function and all uses of the tagPriority array to the tagPriority function.
        (KHTMLParser::parseToken):
        (KHTMLParser::insertNode):
        * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): changed all uses of the endTag array to the endTagRequirement function
       * khtml/editing/markup.cpp: changed all uses of the endTag array to the endTagRequirement function
        (khtml::endMarkup):
        (khtml::markup):

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

15 years agoFixed build: Whoops, setNeedsLayout's parameter is NOT optional!
jens [Fri, 18 Feb 2005 22:10:25 +0000 (22:10 +0000)]
Fixed build: Whoops, setNeedsLayout's parameter is NOT optional!

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

15 years ago[3603191] REGRESSION: Applets not receiving all of the Applet Parameters in Java...
jens [Fri, 18 Feb 2005 21:39:27 +0000 (21:39 +0000)]
[3603191] REGRESSION: Applets not receiving all of the Applet Parameters in Java 1.4.1/1.4.2. Fix is to defer instantiating the applet plugin until the applet tag and its nested param tags have been completely parsed.

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

15 years ago Fixed <rdar://problem/4006161> Tiger8A380: Widgets leak dashboard regions
rjw [Fri, 18 Feb 2005 20:49:01 +0000 (20:49 +0000)]
Fixed <rdar://problem/4006161> Tiger8A380: Widgets leak dashboard regions

We were leaking the DashboardRegionImpls.

        Reviewed by Kevin.

        * khtml/css/css_valueimpl.cpp:
        (DOM::CSSPrimitiveValueImpl::cleanup):

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

15 years agoWebCore:
cblu [Fri, 18 Feb 2005 20:11:13 +0000 (20:11 +0000)]
WebCore:

Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled

        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): don't set class on element returned by createStyleSpanElement since that's already done
        (khtml::ReplacementFragment::ReplacementFragment): take matchStyle param, don't call computeStylesAndRemoveUnrendered() if !matchStyle
        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take matchStyle param
        (khtml::ReplaceSelectionCommand::doApply): if m_matchStyle, use selection.start() as the insertion position and don't call applyStyleToInsertedNodes()
        * khtml/editing/htmlediting.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): take matchStyle param and pass it
        (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): pass NO for matchStyle
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): pass NO for matchStyle
        (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): pass YES for matchStyle

WebKit:

Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled

        Reviewed by kocienda.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for matchStyle to replaceSelection
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:chosePlainText:]): return new chosePlainText parameter
        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass chosePlainText for matchStyle to replaceSelection
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): ditto

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

15 years ago Reviewed by Chris
kocienda [Fri, 18 Feb 2005 19:55:57 +0000 (19:55 +0000)]
    Reviewed by Chris

        Fix for these bugs:

        <rdar://problem/4013025> Copy/Paste of quoted word results in removal of any following <cr>
        <rdar://problem/4013100> Copy/Paste quoted text and then decrease quote level does not change text color

        For the most part, these bugs were caused by errors and lack of foresight on my part when
        I added the better paste code. Chalk these fixes up to the result of bake time.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::ReplacementFragment): Need to move count of number of blocks in
        fragment after the call to remove unrendered nodes. Meant to do this before, but forgot to.
        (khtml::ReplacementFragment::removeStyleNodes): Need to remove inline styles from elements!
        Terrible omission now fixed.
        (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Remove blockquote colors for now.
        Code has a more extensive comment in it now to explain the difficulty, and the need for more
        study and changes.
        (khtml::ReplaceSelectionCommand::doApply): Need to call applyStyleToInsertedNodes() in the
        m_fragment.hasInterchangeNewline() case. This was just missed before.
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Updated results, subtly different, but OK.
        * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Updated for <p> to <div> change in test content.
        * layout-tests/editing/pasteboard/paste-text-017.html: Needed to change <p> to <div> to
        make this test go with the new design of using <div> tags for default paragraphs.

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

15 years ago Fix for 3974263 (and possibly others). Don't let fixed tables use maxint as their...
hyatt [Fri, 18 Feb 2005 19:37:48 +0000 (19:37 +0000)]
Fix for 3974263 (and possibly others).  Don't let fixed tables use maxint as their maxwidth when some
cells have percentage values.

        Reviewed by kocienda

        * khtml/misc/arena.cpp:
        (ArenaAllocate):
        * khtml/rendering/table_layout.cpp:
        (FixedTableLayout::calcWidthArray):
        (FixedTableLayout::calcMinMaxWidth):
        (AutoTableLayout::layout):

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

15 years agonew layout test
hyatt [Fri, 18 Feb 2005 19:35:29 +0000 (19:35 +0000)]
new layout test

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

15 years ago Removed code that should not have been checked in from
rjw [Fri, 18 Feb 2005 01:51:55 +0000 (01:51 +0000)]
Removed code that should not have been checked in from
last patch.

        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (-[WebTextRendererFactory isFontFixedPitch:]):

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

15 years ago Reviewed by Kevin.
darin [Fri, 18 Feb 2005 01:30:10 +0000 (01:30 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/3998627> WebKit crashes when deleting text in a modified div

        * khtml/khtml_part.cpp: (KHTMLPart::selectionComputedStyle): Add a ref and deref to keep
        the element alive until it's added to the DOM tree.
        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::styleForSelectionStart): Ditto.

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

15 years agoWebCore:
rjw [Fri, 18 Feb 2005 01:26:11 +0000 (01:26 +0000)]
WebCore:
        Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead

Fixed w/o introducing a performance regression.  Add early
check for Osaka-Mono to avoid expensive call into WebKit.

        Reviewed by Vicki.

        * kwq/KWQFont.mm:
        (QFont::isFixedPitch):

WebKit:
        Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead

Fixed w/o introducing a performance regression.

        Reviewed by Vicki (and earlier by Dave Harrison).

        * WebCoreSupport.subproj/WebTextRenderer.m:
        (-[WebTextRenderer _computeWidthForSpace]):
        (widthForNextCharacter):
        * WebCoreSupport.subproj/WebTextRendererFactory.h:
        * WebCoreSupport.subproj/WebTextRendererFactory.m:
        (-[NSFont _web_isFakeFixedPitch]):
        (-[WebTextRendererFactory isFontFixedPitch:]):
        (-[WebTextRendererFactory fontWithFamily:traits:size:]):

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

15 years ago Reviewed by Kevin.
darin [Fri, 18 Feb 2005 01:25:05 +0000 (01:25 +0000)]
    Reviewed by Kevin.

        - fixed <rdar://problem/4011210> REGRESSION (180-181): Maxlength property for INPUT object not working

        * kwq/KWQTextField.mm:
        (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): If controller returns
        YES, go on to call super, since super does the text formatter handling, which we need.
        (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
        (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.

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

15 years agomove the Safari-187 release marker in the WebCore Changelog, since we're going to...
vicki [Fri, 18 Feb 2005 01:23:07 +0000 (01:23 +0000)]
move the Safari-187 release marker in the WebCore Changelog, since we're going to include <rdar://problem/4012058>  in Safari-187

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

15 years ago Fixed <rdar://problem/4003251> Safari crashed at www.icelandair.com in LiveConnect...
rjw [Fri, 18 Feb 2005 01:13:50 +0000 (01:13 +0000)]
Fixed <rdar://problem/4003251> Safari crashed at icelandair.com in LiveConnect code converting a Java object to a string

Added nil check.

        Reviewed by John Sullivan.

        * bindings/jni/jni_runtime.cpp:
        (JavaField::valueFromInstance):

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

15 years ago Reviewed by Hyatt
kocienda [Fri, 18 Feb 2005 00:38:08 +0000 (00:38 +0000)]
    Reviewed by Hyatt

        Fix for this bug:

        <rdar://problem/4012058> Copy from quoted text and paste results in blue text

        The relatively-new paste code tries hard to retain style of the content from the
        source location. However, in the case of quoted material in mail messages, we do
        not want to carry the quoting color along. This fixes the problem by factoring
        out such colors.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::computeStylesAndRemoveUnrendered): Now calls removeBlockquoteColorsIfNeeded()
        to fix bug.
        (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): New function. Factors out colors that are
        the result of text being quoted.
        (khtml::isNodeRendered): Function moved in file. No other change.
        (khtml::isProbablyBlock): Function moved in file. No other change.
        (khtml::closestMailBlockquote): New function. Helps fix bug.
        (khtml::isMailBlockquote): Function moved to be free-floating instead of being a
        member of CompositeEditCommand. No other change.
        * khtml/editing/htmlediting.h: Moved around some functions. Added removeBlockquoteColorsIfNeeded().
        * khtml/editing/markup.cpp: Remove redundant static implementation of isMailBlockquote.

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

15 years ago Fixed <rdar://problem/3959304> PDF in img tag is not rendered correctly anymore
rjw [Fri, 18 Feb 2005 00:11:18 +0000 (00:11 +0000)]
Fixed <rdar://problem/3959304> PDF in img tag is not rendered correctly anymore

We were incorrectly adding image position when flipping coordinates.

        Reviewed by David Harrison.

        * WebCoreSupport.subproj/WebImageData.m:
        (-[WebImageData _PDFDrawFromRect:toRect:operation:alpha:flipped:context:]):

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

15 years ago Fixed <rdar://problem/4007262> Seed: Flight tracker scrolling moves to the left
rjw [Fri, 18 Feb 2005 00:09:39 +0000 (00:09 +0000)]
Fixed <rdar://problem/4007262> Seed: Flight tracker scrolling moves to the left

Added SPI for dashboard to disable wheel scrolling of the WebClipView.

        Reviewed by Ken.

        * ChangeLog:
        * WebView.subproj/WebClipView.m:
        (-[WebClipView _focusRingVisibleRect]):
        (-[WebClipView scrollWheel:]):
        * WebView.subproj/WebView.m:
        (-[WebViewPrivate init]):
        (-[WebView drawRect:]):
        (-[WebView _dashboardBehavior:]):
        * WebView.subproj/WebViewInternal.h:
        * WebView.subproj/WebViewPrivate.h:

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

15 years agoversioning for TOT, Safari 2.0 (187+)
vicki [Fri, 18 Feb 2005 00:05:13 +0000 (00:05 +0000)]
versioning for TOT, Safari 2.0 (187+)

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

15 years agoSafari-187 stamp
vicki [Thu, 17 Feb 2005 23:59:13 +0000 (23:59 +0000)]
Safari-187 stamp

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