mjs [Wed, 23 Mar 2005 22:09:34 +0000 (22:09 +0000)]
WebKit:
Reviewed by Darin.
<rdar://problem/
4051145> The QuickTime Cocoa plug-in needs an SPI that it can call to check for URL policy
* Plugins.subproj/WebPluginContainerCheck.h: Added.
* Plugins.subproj/WebPluginContainerCheck.m: Added this new helper class to encapsulate
an async plugin navigation check.
(+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:]): Convenience allocator that gives autoreleased value.
(-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]): Initializer.
(-[WebPluginContainerCheck finalize]): Just assert that we're done, it would
be bad to deallocate this object while request is still outstanding.
(-[WebPluginContainerCheck dealloc]): Ditto.
(-[WebPluginContainerCheck _continueWithPolicy:]): Method to continue after async
policy check.
(-[WebPluginContainerCheck _isDisallowedFileLoad]): Do "file: URL from remote content"
check.
(-[WebPluginContainerCheck _actionInformationWithURL:]): Helper to make action
dictionary.
(-[WebPluginContainerCheck _askPolicyDelegate]): Call policy delegate to let
the app decide if this load is allowed.
(-[WebPluginContainerCheck start]): Start the check.
(-[WebPluginContainerCheck cancel]): Cancel a check in progress.
* Plugins.subproj/WebPluginController.h:
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController initWithDocumentView:]): Initialize new _checksInProgress field.
(-[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Implement
this new SPI method.
(-[WebPluginController _cancelOutstandingChecks]): New helper to make sure to cancel
all outstanding requests when destroying all plugins.
(-[WebPluginController destroyAllPlugins]): Call above helper.
(-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Implement this new plug-in SPI method.
(-[WebPluginController bridge]): New helper method.
(-[WebPluginController webView]): New helper method.
* WebView.subproj/WebPolicyDelegatePrivate.h: Add new navigation
type WebNavigationTypePlugInRequest.
* WebKit.pbproj/project.pbxproj: Add new files.
* WebView.subproj/WebDefaultPolicyDelegate.m:
(-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): Don't open externally on a plug-in request.
WebBrowser:
Reviewed by Darin.
<rdar://problem/
4051145> The QuickTime Cocoa plug-in needs an SPI that it can call to check for URL policy
* BrowserWebController.m:
(-[BrowserWebView decidePolicyForAction:request:frame:newFrameName:decisionListener:]): In
case this is a plugin load request, accept it early to avoid throwing up UI or
causing external loads.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8964
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 23 Mar 2005 19:49:41 +0000 (19:49 +0000)]
WebCore:
Fixed <rdar://problem/
4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
We now use actual document NSRanges to represent both marked text
ranges and selection ranges.
Reviewed by Ken.
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::rangeLength):
(khtml::TextIterator::setRangeFromLocationAndLength):
* khtml/editing/visible_text.h:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge convertToNSRange:DOM::]):
(-[WebCoreBridge DOM::convertToDOMRange:]):
(-[WebCoreBridge selectNSRange:]):
(-[WebCoreBridge markedTextDOMRange]):
(-[WebCoreBridge markedTextNSRange]):
WebKit:
Fixed <rdar://problem/
4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
We now use actual document NSRanges to represent both marked text
ranges and selection ranges.
Reviewed by Ken Kocienda.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView validAttributesForMarkedText]):
(-[WebHTMLView firstRectForCharacterRange:]):
(-[WebHTMLView selectedRange]):
(-[WebHTMLView markedRange]):
(-[WebHTMLView _selectMarkedText]):
(-[WebHTMLView setMarkedText:selectedRange:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8963
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Wed, 23 Mar 2005 02:42:58 +0000 (02:42 +0000)]
Reviewed by Vicki.
Fixed <rdar://problem/
4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
Rolled out the fix for <rdar://problem/
4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
We clearly need a better solution to
4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a <script> tag, which is evaluated and executed at page load time, this becomes a problem since we don't reevaluate a page's <script> that is in the back/forward cache. Thus once you leave the page, the listeners are gone for good. This is the problem.
* khtml/khtml_part.cpp:
(KHTMLPart::closeURL):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::detach):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8962
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 23 Mar 2005 02:03:04 +0000 (02:03 +0000)]
- roll the fix for <rdar://problem/
4060266> back in, since its
now approved by CCC (and move the Safari-410 release marker)
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::handleTextBox):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8959
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 23 Mar 2005 01:50:41 +0000 (01:50 +0000)]
versioning for TOT, Safari 2.0 (410+)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8958
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 23 Mar 2005 01:45:20 +0000 (01:45 +0000)]
versioning for SUPanWheat, Safari 1.3 (310)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8957
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 23 Mar 2005 01:39:37 +0000 (01:39 +0000)]
Safari-410 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8956
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 23 Mar 2005 01:32:40 +0000 (01:32 +0000)]
- roll out the fix for <rdar://problem/
4060266> since it was denied by CCC
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::handleTextBox):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8955
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Tue, 22 Mar 2005 22:12:55 +0000 (22:12 +0000)]
Reviewed by Darin.
<rdar://problem/
4060266> Double-clicking in Dictionary.app doesn't work for some words (coming just after style change)
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::handleTextBox):
Complete the check of whether to emit space for collapsed space.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8954
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Tue, 22 Mar 2005 17:59:24 +0000 (17:59 +0000)]
Reviewed by John.
<rdar://problem/
4061443> REGRESSION (8A420-8A421): Pasting in the Stickies widget is broken again
* khtml/editing/htmlediting.cpp:
(khtml::positionBeforeContainingSpecialElement):
(khtml::positionAfterContainingSpecialElement):
Return unchanged Position rather than a null or non-editable one.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8953
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 22 Mar 2005 13:10:41 +0000 (13:10 +0000)]
* English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8952
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 21 Mar 2005 03:18:51 +0000 (03:18 +0000)]
Versioning for TOT, Safari 2.0 (409+).
The tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8951
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 21 Mar 2005 03:12:47 +0000 (03:12 +0000)]
versioning for SUPanWheat, Safari 1.3 (309)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8949
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 21 Mar 2005 03:06:00 +0000 (03:06 +0000)]
Safari-409 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8947
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 21 Mar 2005 00:33:59 +0000 (00:33 +0000)]
Reviewed by me
I made an error in this test earlier. It was not testing what I intended. Fixed.
* layout-tests/editing/unsupported-content/list-delete-001-expected.txt
* layout-tests/editing/unsupported-content/list-delete-001.html
New tests:
* layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added.
* layout-tests/editing/unsupported-content/table-delete-001.html: Added.
* layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added.
* layout-tests/editing/unsupported-content/table-delete-002.html: Added.
* layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added.
* layout-tests/editing/unsupported-content/table-delete-003.html: Added.
* layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added.
* layout-tests/editing/unsupported-content/table-type-after.html: Added.
* layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added.
* layout-tests/editing/unsupported-content/table-type-before.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8946
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Mon, 21 Mar 2005 00:27:47 +0000 (00:27 +0000)]
Reviewed by Darin.
<rdar://problem/
4060020> Add stub version of security SPI for QuickTime plug-in so QuickTime team has something to compile and link against
* Plugins.subproj/WebPluginContainerPrivate.h: Added.
* Plugins.subproj/WebPluginController.m:
(-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]):
(-[WebPluginController _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
* WebKit.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8945
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 20 Mar 2005 23:48:17 +0000 (23:48 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/
3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset
* khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8944
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sun, 20 Mar 2005 21:31:25 +0000 (21:31 +0000)]
Reviewed by Darin.
<rdar://problem/
4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
when checking whether moving back across block boundaries
VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
All editing tests pass.
* khtml/editing/visible_text.cpp:
(khtml::SimplifiedBackwardsTextIterator::advance):
* khtml/editing/visible_units.cpp:
(khtml::previousBoundary):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8943
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 20 Mar 2005 21:18:26 +0000 (21:18 +0000)]
Reviewed by Harrison.
- fixed <rdar://problem/
4059914> when you select all of a frame's content, need to select the frame in the parent document so it can be easily deleted
* khtml/khtml_part.h: Added selectFrameElementInParentIfFullySelected.
* khtml/khtml_part.cpp:
(isFrame): Added.
(KHTMLPart::setFocusNodeIfNeeded): Changed to not set focus to a frame; was not what this function was
intended to do, and caused trouble when trying to select a frame element.
(KHTMLPart::khtmlMouseReleaseEvent): Call selectFrameElementInParentIfFullySelected.
(KHTMLPart::selectAll): Call selectFrameElementInParentIfFullySelected.
(KHTMLPart::selectFrameElementInParentIfFullySelected): Added. Selects the frame element in the parent
if a frame is entirely selected, which makes it easier to delete or replace the frame and is consistent
with the changes Maciej made recently for other elements.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Call selectFrameElementInParentIfFullySelected.
(-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Call selectFrameElementInParentIfFullySelected.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8942
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 20 Mar 2005 20:19:04 +0000 (20:19 +0000)]
Reviewed by me, code change by Ken.
- fixed <rdar://problem/
4059852> Deleting from first element of list makes content jump to wrong place
* khtml/editing/htmlediting.cpp:
(khtml::isListStructureNode): Added.
(khtml::DeleteSelectionCommand::moveNodesAfterNode): Check for list nodes as well as table nodes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8941
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Sun, 20 Mar 2005 17:36:05 +0000 (17:36 +0000)]
Reviewed by me
Added tests to cover new "unsupported content" editing code.
* layout-tests/editing/unsupported-content/list-delete-001-expected.txt: Added.
* layout-tests/editing/unsupported-content/list-delete-001.html: Added.
* layout-tests/editing/unsupported-content/list-delete-002-expected.txt: Added.
* layout-tests/editing/unsupported-content/list-delete-002.html: Added.
* layout-tests/editing/unsupported-content/list-delete-003-expected.txt: Added.
* layout-tests/editing/unsupported-content/list-delete-003.html: Added.
* layout-tests/editing/unsupported-content/list-type-after-expected.txt: Added.
* layout-tests/editing/unsupported-content/list-type-after.html: Added.
* layout-tests/editing/unsupported-content/list-type-before-expected.txt: Added.
* layout-tests/editing/unsupported-content/list-type-before.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8940
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Sun, 20 Mar 2005 16:26:24 +0000 (16:26 +0000)]
Reviewed by Maciej
Fix for this bug:
<rdar://problem/
4059578> Entire list deleted, and caret disappears, when delete key hit at end of list
The problem is that a new case in the delete code did not consider when the
downstream end node of the selection might be an ancestor of the upstream start
node. That is the case in this bug. The downstream end is the body element, and
this line of code would delete all the children of the downstream end:
removeChildrenInRangePreservingPosition(m_downstreamEnd.node(), 0,
m_downstreamEnd.offset(), m_upstreamStart);
The fix is to check for this "is ancestor" case, and do some tree logic to find
the right offset of the downstream end node for the call to
removeChildrenInRangePreservingPosition().
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleGeneralDelete): Fixed as described.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8939
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sun, 20 Mar 2005 04:58:41 +0000 (04:58 +0000)]
Reviewed by Maciej.
<rdar://problem/
4059479> Misspelling underline does underline the whole word, could go farther to the right
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer misspellingLinePatternGapWidth]):
(-[WebTextRenderer drawLineForMisspelling:withWidth:]):
Consider that the last pixel in the underline dot pattern is transparent.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8938
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Sun, 20 Mar 2005 02:22:59 +0000 (02:22 +0000)]
Reviewed by Maciej
Fix for this bug:
<rdar://problem/
4059384> Cannot place insertion point correctly in editable text that avoids floating elements
Note: I strongly suspect this bug blocks a complete solution to this other Tiger/P2:
<rdar://problem/
4055748> AX: Dictionary pop-up panel shows at wrong place on specific parts of particular pages
* khtml/rendering/render_text.cpp:
(RenderText::caretRect): Change the y-coordinate used to calculate the available width for a line. Height is wrong.
Top of the box containing the text where the click is done is correct. Also, add in the x-offset for the start
of the text box when calculating the available width. If this text box is avoiding a float at the y-coordinate
for the relevant box, failure to add in the amount of float-avoidance will make the text at the coordinates
greater than end-of-line minus float-avoidance ineligible for caret placement.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8937
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 20 Mar 2005 00:58:28 +0000 (00:58 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
4057594> REGRESSION (125-406): Unrepro crash in HTMLTokenizer::allDataProcessed after hitting Back button
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::allDataProcessed):
To get the part safely after calling end, save a guarded pointer to the view.
The old way could end trying to call a virtual function a part that was destroyed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8936
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sat, 19 Mar 2005 22:36:50 +0000 (22:36 +0000)]
Reviewed by Darin.
<rdar://problem/
4053506> Pasting Tables and Cells in Mail does not allow editing before or after
<rdar://problem/
4005954> REGRESSION (Mail): After copy/paste of content containing list element cannot go back to entering text at left side of page
* khtml/editing/htmlediting.cpp:
(khtml::maxDeepOffset):
(khtml::CompositeEditCommand::removeFullySelectedNodePreservingPosition):
(khtml::CompositeEditCommand::removeChildrenInRangePreservingPosition):
(khtml::CompositeEditCommand::removeNodePreservingPosition):
(khtml::CompositeEditCommand::insertBlockPlaceholder):
(khtml::CompositeEditCommand::appendBlockPlaceholder):
(khtml::CompositeEditCommand::forceBlockPlaceholder):
(khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
(khtml::isSpecialElement):
(khtml::isFirstVisiblePositionInSpecialElementInFragment):
(khtml::positionBeforePossibleContainingSpecialElement):
(khtml::positionAfterPossibleContainingSpecialElement):
(khtml::ApplyStyleCommand::applyInlineStyle):
(khtml::DeleteSelectionCommand::initializePositionData):
(khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
(khtml::DeleteSelectionCommand::handleGeneralDelete):
(khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
(khtml::DeleteSelectionCommand::doApply):
(khtml::InsertParagraphSeparatorCommand::doApply):
(khtml::ReplacementFragment::ReplacementFragment):
(khtml::ReplaceSelectionCommand::doApply):
* khtml/editing/htmlediting.h:
* khtml/editing/visible_position.cpp:
(khtml::isRenderedBR):
(khtml::VisiblePosition::initDownstream):
(khtml::isLastVisiblePositionInBlock):
* khtml/rendering/render_line.cpp:
(khtml::RootInlineBox::closestLeafChildForXPos):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::isBlockFlowOrTable):
(NodeImpl::isEditableBlock):
(NodeImpl::enclosingBlockFlowOrTableElement):
* khtml/xml/dom_nodeimpl.h:
* khtml/xml/dom_position.cpp:
(DOM::Position::upstream):
(DOM::Position::downstream):
* layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
* layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
* layout-tests/editing/deleting/delete-select-all-001-expected.txt:
* layout-tests/editing/deleting/delete-select-all-003-expected.txt:
* layout-tests/editing/inserting/insert-
3786362-fix-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8935
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 19 Mar 2005 19:34:56 +0000 (19:34 +0000)]
Reviewed by Maciej (a while back).
- fixed <rdar://problem/
4059323> local-file security check is allowing plug-in streams, but must not
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
Roll out change I made on 3-13. That change is needed for subresource, but not for plug-in streams.
For plug-in streams it's too risky, and leaves a serious security hole open.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8934
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 19 Mar 2005 17:09:07 +0000 (17:09 +0000)]
Reviewed by Ken and John.
- fixed <rdar://problem/
4059123> REGRESSION (402-403): deleteWordForward: and deleteWordBackward: start deleting single characters after the first delete
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]):
Fixed backwards logic in here and added missing check. Set action to one of the two typing actions only
if isTypingAction is YES.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8933
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Sat, 19 Mar 2005 16:21:57 +0000 (16:21 +0000)]
Reviewed by Darin.
- fixed <rdar://problem/
4058740> Crash (nil-deref) editing Mail reply
message in KWQKHTMLPart::fontForSelection (MailViewer-723)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::fontForSelection):
Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
running into it. We're not completely certain, but the check is harmless at worst.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8932
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 19 Mar 2005 16:07:18 +0000 (16:07 +0000)]
Reviewed by me (written by Patti Yeh).
<rdar://problem/
4029491> <TCIM> CangJie: the candidate window appears at the top left hand corner during typing in Mail and iChat
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView firstRectForCharacterRange:]):
Use selected range if there is no marked range.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8931
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 19 Mar 2005 02:19:51 +0000 (02:19 +0000)]
versioning for TOT, Safari 2.0 (408+)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8930
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 19 Mar 2005 02:12:28 +0000 (02:12 +0000)]
versioning for SUPanWheat, Safari 1.3 (308)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8928
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Sat, 19 Mar 2005 02:07:09 +0000 (02:07 +0000)]
Safari-408 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8926
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 19 Mar 2005 00:56:35 +0000 (00:56 +0000)]
Reviewed by Darin.
<rdar://problem/
3584942> AX: Safari Accessibility parent-child mismatch
* WebView.subproj/WebFrameView.m:
(-[WebFrameView webCoreBridge]):
New to conform to WebCoreBridgeHolder protocol.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8925
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 19 Mar 2005 00:53:57 +0000 (00:53 +0000)]
Reviewed by Darin.
<rdar://problem/
3584942> AX: Safari Accessibility parent-child mismatch
Also changed WebKit.
* kwq/KWQAccObject.mm:
(-[KWQAccObject rendererForView:]):
New to cover both the WebCore and WebKit NSViews.
(-[KWQAccObject _accessibilityParentForSubview:]):
Use rendererForView.
* kwq/WebCoreFrameView.h:
Add WebCoreBridgeHolder protocol to get access to WebKit NSViews.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8924
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 19 Mar 2005 00:34:07 +0000 (00:34 +0000)]
Reviewed by Darin, Ken.
<rdar://problem/
3735625> AX: add AXPress action if an element has an onclick handler
* khtml/dom/html_form.cpp:
(HTMLInputElement::click):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::click):
(HTMLElementImpl::accessKeyAction):
* khtml/html/html_elementimpl.h:
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::submitClick):
(DOM::HTMLButtonElementImpl::click):
(DOM::HTMLButtonElementImpl::accessKeyAction):
(DOM::HTMLInputElementImpl::click):
(DOM::HTMLInputElementImpl::accessKeyAction):
(DOM::HTMLInputElementImpl::defaultEventHandler):
(DOM::HTMLLabelElementImpl::accessKeyAction):
(DOM::HTMLSelectElementImpl::accessKeyAction):
(DOM::HTMLTextAreaElementImpl::accessKeyAction):
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::defaultEventHandler):
(HTMLAnchorElementImpl::accessKeyAction):
* khtml/html/html_inlineimpl.h:
* khtml/rendering/render_form.cpp:
(RenderFileButton::click):
* khtml/rendering/render_form.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::defaultEventHandler):
* khtml/xml/dom_elementimpl.h:
(DOM::ElementImpl::accessKeyAction):
* kwq/DOMHTML.mm:
(-[DOMHTMLInputElement click]):
* kwq/KWQButton.h:
* kwq/KWQButton.mm:
(QButton::click):
* kwq/KWQFileButton.h:
* kwq/KWQFileButton.mm:
(KWQFileButton::click):
Add accessKeyAction parameter about whether to limit to HTMLElementImpl subclasses that JavaScript wants, or to apply to others as well.
Add click() parameter about whether to send the mousedown and mouseup events in addition to the click event.
* kwq/KWQAccObject.mm:
(-[KWQAccObject mouseButtonListener]):
Locate a mousedown, mouseup, or click handler in the current element and its ancestors.
(-[KWQAccObject actionElement]):
(-[KWQAccObject accessibilityIsIgnored]):
(-[KWQAccObject accessibilityPerformAction:]):
Consider mouseButtonListener.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8923
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 18 Mar 2005 22:56:39 +0000 (22:56 +0000)]
Fixed <rdar://problem/
4057004> Data from XMLHTTPRequest is never dealloced
WebDataSource keeps an array of all the NSURLResponses associated
with the load for a page. This is used to playback delegate messages
when loading from the page cache. However, after the document
has completed it's initial load, we continue to keep track of responses.
So, this has the consequence of keeping all the responses for a page
around for the life of the page. NSURLResponses are now very
heavy. They indirectly reference the resource data (via the
download assessment dictionary). This fix will keep
references to responses around for those resources loaded during initial
page load, but not after that point.
Reviewed by Ken.
* WebView.subproj/WebDataSource.m:
(-[WebDataSource _addResponse:]):
(-[WebDataSource _stopRecordingResponses]):
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebFrame.m:
(-[WebFrame _opened]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8922
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Fri, 18 Mar 2005 20:41:58 +0000 (20:41 +0000)]
Reviewed by Darin.
- fixed <rdar://problem/
4002164> maps that include start and end
location don't print right from maps.google.com
I thought I checked this in yesterday but a ChangeLog conflict aborted my checkin
without me noticing.
* khtml/rendering/render_style.cpp:
(RenderStyle::diff):
flag name changed from _should_correct_text_color to _force_backgrounds_to_white
* khtml/rendering/render_style.h:
(khtml::RenderStyle::InheritedFlags::operator==):
flag name changed from _should_correct_text_color to _force_backgrounds_to_white
(khtml::RenderStyle::setBitDefaults):
ditto
(khtml::RenderStyle::forceBackgroundsToWhite):
ditto, and method name changed too
(khtml::RenderStyle::setForceBackgroundsToWhite):
ditto
* khtml/rendering/render_text.cpp:
(InlineTextBox::paint):
updated for name change; also, compare text against white instead of current bg color
because we no longer actually modify the bg color (previously we would always set
the bg color to white, so the result is the same)
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
updated for name change
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge styleSheetForPrinting]):
removed this method
(-[WebCoreBridge reapplyStylesForDeviceType:]):
removed the code that called styleSheetForPrinting; we no longer use a stylesheet
for this behavior.
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackgroundExtended):
If forceBackgroundsToWhite flag is set, convert background images and
background colors to white background color with no background image.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8921
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 18 Mar 2005 17:49:06 +0000 (17:49 +0000)]
Reviewed by Darin
Fix for this bug:
<rdar://problem/
4053729> Copy/paste of page with frames into Blot or Mail does nothing and loses insertion point
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _selectedArchive]): Wrap frameset documents in an iframe, so they can be pasted into
existing documents which will have a body or frameset of their own.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8920
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 18 Mar 2005 17:32:52 +0000 (17:32 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
4056718> Pasting quotes the entire message
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing
the end of the pasted content in certain cases. This move logic used to stop once it moved all the
siblings of the node following the last node of the pasted-in content. This means that block elements
could get moved, and if the pasted-in content included a mail blockquote, this could result in
one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or
<table> is seen. This only affected one of the many test cases we have for such scenarios, and
the change to that result makes sense given the code change.
* layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that
adequately tests the behavior change, so I did not add a new test.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8919
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 18 Mar 2005 15:56:56 +0000 (15:56 +0000)]
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
4051809> 8A413: Cursor-up in a mail message sometimes gets stuck (with specific reproducible case)
* khtml/rendering/render_text.cpp:
(RenderText::positionForCoordinates): Consider two lines: line-above and line-below. If the caret position in line-below
was at an x coordinate between half way through the x coordinate of the last character on the line-above and the
end of that same character, this bug would happen since the positioning code would assume that it could create a
VisiblePosition with a DOWNSTREAM affinity. Now, I check to see if the character position on the line-above is the
last character on that line, and if it is, I use UPSTREAM as the affinity.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8918
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 17 Mar 2005 22:59:48 +0000 (22:59 +0000)]
versioning for TOT, Safari 2.0 (407+)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8917
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 17 Mar 2005 22:48:27 +0000 (22:48 +0000)]
versioning for Safari 1.3 (307) on SUPanWheat
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8915
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 17 Mar 2005 22:41:31 +0000 (22:41 +0000)]
Safari-407 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8913
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 17 Mar 2005 21:43:30 +0000 (21:43 +0000)]
Fixed <rdar://problem/
4055562> REGRESSION (Tiger): Safari doesn't draw progressively-loaded JPEGs (theregister.co.uk, www.titantalk.com)
Anothe side effect of lazy loading of image meta data. We now
don't cache image size until size meta data is actually available.
Reviewed by Darin.
* WebCoreSupport.subproj/WebImageData.m:
(-[WebImageData size]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8912
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 17 Mar 2005 19:09:58 +0000 (19:09 +0000)]
Reviewed by Darin, Ken.
* khtml/editing/htmlediting.cpp:
(khtml::EditCommandPtr::setEndingSelection):
Fixed typo so that it calls setEndingSelection rather than setStartingSelection.
Commented out this unused method, tho, since this is late in Tiger. Proved unused by successful build after temporarily removing method declaration or implemenation.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8911
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Thu, 17 Mar 2005 17:57:33 +0000 (17:57 +0000)]
Reviewed by mjs.
Fixed <rdar://problem/
4046665> REGRESSION (403-405): mypage.apple.com login does not work (hits assertion in Development build)
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Check always came back false when callers would send a nil NSURL to this method. Now we allow the empty url cases, eg., <frame src="">
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8910
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 17 Mar 2005 02:46:53 +0000 (02:46 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/
4045203> REGRESSION (125-188): Redundant JS imports crash Safari
* khtml/html/htmltokenizer.h: Take inWRite bool out of NDEBUG ifdef.
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::HTMLTokenizer): Take inWrite bool management code out of NDEBUG ifdef.
(khtml::HTMLTokenizer::write): Ditto. Don't call end if inWrite is true, since it will be called
when you return to the body of the outer write() call.
(khtml::HTMLTokenizer::allDataProcessed): Don't call end() if inWrite is true for the same reason.
(khtml::HTMLTokenizer::finish): Ditto.
* kwq/KWQWidget.mm: (QWidget::getOuterView): Removed bogus assertion that has been vexing us of late.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8909
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 17 Mar 2005 02:30:13 +0000 (02:30 +0000)]
Reviewed by me (written by Patti Yeh).
* kwq/KWQAccObject.mm:
(-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
Use LeftWordIfOnBoundary instead of RightWordIfOnBoundary.
(-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
Use RightWordIfOnBoundary instead of LeftWordIfOnBoundary.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8908
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 17 Mar 2005 02:09:02 +0000 (02:09 +0000)]
Reviewed by Maciej.
<rdar://problem/
4054590> AX: Dictionary panel does not work when page is scrolled on Safari
* kwq/KWQAccObject.mm:
(-[KWQAccObject doAXTextMarkerForPosition:]):
Add in the view's contentsX and contentsY to the point.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8907
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 17 Mar 2005 01:32:55 +0000 (01:32 +0000)]
Reviewed by Maciej.
<rdar://problem/
4048506> Deleting from beginning of editable div deletes other document elements
Also changed WebCore.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _shouldDeleteRange:]):
Added call to new bridge method canDeleteRange.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8906
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 17 Mar 2005 01:31:03 +0000 (01:31 +0000)]
Reviewed by Maciej.
<rdar://problem/
4048506> Deleting from beginning of editable div deletes other document elements
Also changed WebKit.
* khtml/editing/visible_units.h:
* khtml/editing/visible_units.cpp:
(khtml::startOfEditableContent):
(khtml::endOfEditableContent):
(khtml::inSameEditableContent):
(khtml::isStartOfEditableContent):
(khtml::isEndOfEditableContent):
New.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge canDeleteRange:]):
New.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8905
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
jens [Wed, 16 Mar 2005 18:30:25 +0000 (18:30 +0000)]
[
4025212] search not performed correctly; united.com. Fixed bug inherited from KJS that caused unescape() of an empty string to return a messed-up String object that would sometimes act like the value 'null'.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8904
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 16 Mar 2005 16:36:00 +0000 (16:36 +0000)]
WebCore:
Reviewed by Darin
Fix for this bug:
<rdar://problem/
4042935> undo doesn't work properly during inline input
* kwq/WebCoreBridge.h: Declare new method below.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge replaceMarkedTextWithText:]): New method. Wraps calls to TypingCommand::deleteKeyPressed and
TypingCommand::insertText to map the way that international text input works onto the typing undo system.
WebKit:
Reviewed by Darin
Fix for this bug:
<rdar://problem/
4042935> undo doesn't work properly during inline input
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView setMarkedText:selectedRange:]): Call new -[WebCoreBridge replaceMarkedTextWithText:] instead of
-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]. The former call was just added in
order to provide a better mapping of international text input onto the typing command/undo design.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8903
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Wed, 16 Mar 2005 14:43:13 +0000 (14:43 +0000)]
Reviewed by Darin.
<rdar://problem/
4044336> REGRESSION (8A398-8A409): Option-Delete also deletes space to left of deleted word
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::initializePositionData):
- skip smart delete if the selection to delete already starts or ends with whitespace
* khtml/khtml_part.cpp:
(KHTMLPart::handleMousePressEventDoubleClick):
- preserve selection on double-click when range is already selected
* khtml/xml/dom_position.cpp:
(DOM::Position::leadingWhitespacePosition):
(DOM::Position::trailingWhitespacePosition):
- fix considerNonCollapsibleWhitespace action (logic was reversed)
- add non-breaking space to the non-collapsable ones
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
(-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
- these methods do not set the selection, so remove calls to setSelectionGranularity
(-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
(-[WebCoreBridge alterCurrentSelection:verticalDistance:]):
- set the granularity back to character
- the one exception is that we need to keep word granularity
to preserve smart delete behavior when extending by word
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8902
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 16 Mar 2005 03:23:42 +0000 (03:23 +0000)]
Removed conflict marker.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8901
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 16 Mar 2005 03:19:17 +0000 (03:19 +0000)]
Reviewed by John.
<rdar://problem/
4053266> Pressing return a few times right after a link makes the new blank lines part of the link
* khtml/editing/htmlediting.cpp:
(khtml::InsertLineBreakCommand::doApply): Use
positionOutsideContainingSpecialElement in the right two places.
(khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
- move all these helper functions higher in the file
* khtml/editing/htmlediting.cpp:
(khtml::isSpecialElement):
(khtml::isFirstVisiblePositionInSpecialElement):
(khtml::positionBeforeNode):
(khtml::positionBeforeContainingSpecialElement):
(khtml::maxRangeOffset):
(khtml::isLastVisiblePositionInSpecialElement):
(khtml::positionAfterNode):
(khtml::positionAfterContainingSpecialElement):
(khtml::positionOutsideContainingSpecialElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8900
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 16 Mar 2005 02:02:33 +0000 (02:02 +0000)]
Fixed <rdar://problem/
4053658> Crash getting direction at maps.google.com
Add non nil style() check.
Reviewed by Dave Harrison.
* khtml/rendering/render_table.cpp:
(RenderTableCell::collapsedRightBorder):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8899
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Wed, 16 Mar 2005 01:40:31 +0000 (01:40 +0000)]
Reviewed by John
Fixed: <rdar://problem/
4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
The reason why UNLOAD_EVENT wouldn't dispatch was because the code would delete all event listeners at the detach() phase which is prior to closeURL().
This fixes a recent regression from:
<rdar://problem/
3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
* khtml/khtml_part.cpp:
(KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::detach): Took out the call to removeAllEventListenersFromAllNodes(). If we remove all event listeners here then when KHTMLPart::closeURL() checks for even listeners, it will never have any because they'll already be gone.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8898
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 16 Mar 2005 00:00:39 +0000 (00:00 +0000)]
Fixed <rdar://problem/
4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
If client mutates request use new Foundation SPI to address remove applewebdata properties from request.
Reviewed by Ken Kocienda.
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
* WebView.subproj/WebDataProtocol.h:
* WebView.subproj/WebDataProtocol.m:
(+[NSURLRequest _webDataRequestPropertyKey]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8897
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 15 Mar 2005 23:52:26 +0000 (23:52 +0000)]
Fixed <rdar://problem/
4053276> WebScripting protocol in WebKit cannot convert Boolean in Javascript to BOOL in Objective-C
Added JavaScript boolean to type that can be converted to
ObjC scalar parameters.
Reviewed by Ken Kocienda.
* bindings/objc/objc_utility.mm:
(KJS::Bindings::convertValueToObjcValue):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8896
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 15 Mar 2005 23:27:44 +0000 (23:27 +0000)]
Reviewed by Vicki
Fox for this bug:
<rdar://problem/
4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
keystrokes grouped together in a single undo operation. My change on 27 Jan to route delete keystrokes
through _deleteRange:killRing:... made this feature regress. Previous to that change, the backwards delete
key went through separate code that is no longer in the tree that did not set the selection in the way
it is done now.
The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
-[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
selection will act to close typing or not. The code changes below all add this new argument with the
appropriate value for closeTyping.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Passes NO for closeTyping when
deletionAction is deleteKeyAction or forwardDeleteKeyAction; YES when deleteSelectionAction.
(-[WebHTMLView _expandSelectionToGranularity:]): Passes YES for closeTyping.
(-[WebHTMLView selectToMark:]): Passes YES for closeTyping.
(-[WebHTMLView swapWithMark:]): Passes YES for closeTyping.
(-[WebHTMLView transpose:]): Passes YES for closeTyping.
(-[WebHTMLView _selectMarkedText]): Passes NO for closeTyping.
(-[WebHTMLView _selectRangeInMarkedText:]): Passes NO for closeTyping.
* WebView.subproj/WebView.m:
(-[WebView setSelectedDOMRange:affinity:]): Passes YES for closeTyping.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8895
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 15 Mar 2005 23:27:37 +0000 (23:27 +0000)]
Reviewed by Vicki
Fox for this bug:
<rdar://problem/
4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete
keystrokes are handled made this feature regress. Previous to that change, the backwards delete
key went through separate code that is no longer in the tree that did not set the selection in the way
it is done now.
The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
-[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
selection will act to close typing or not.
* kwq/WebCoreBridge.h: Changed header accordingly to change method shown below.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8894
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Tue, 15 Mar 2005 22:27:31 +0000 (22:27 +0000)]
Reviewed by Vicki.
- fixed <rdar://problem/
4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart):
Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by
the recent security fix.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8893
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Tue, 15 Mar 2005 21:44:32 +0000 (21:44 +0000)]
Reviewed by Ken and Maciej.
New fix for <rdar://problem/
3667701> crash in KHTMLPart::jScriptEnabled()
The tokenizer has buffers which mean parsing can continue even after loading is supposed to be stopped. If the loading process was aborted, the tokenizer should abort, too.
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false.
(khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true.
(khtml::HTMLTokenizer::processToken):
* khtml/html/htmltokenizer.h: Added loadStopped flag. Changed the view pointer from a standard pointer to a QGuardedPtr. This fixes the crash. Now the tokenizer's handle to the view will now automatically nil-out and never dangle.
* khtml/khtml_part.cpp:
(KHTMLPart::closeURL): Notify the tokenizer to stop parsing.
* khtml/xml/xml_tokenizer.cpp:
(khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false.
* khtml/xml/xml_tokenizer.h:
(khtml::Tokenizer::stopParsing): Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8892
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 15 Mar 2005 04:00:59 +0000 (04:00 +0000)]
Fix <rdar://problem/
4051389> 8A413: gifs animating too fast
Reviewed by Maciej.
Match Mozilla's policy for minimum frame duration, which is somewhat odd:
<= 0.01 sec use .1 sec, otherwise use specified duration.
* WebCoreSupport.subproj/WebImageData.m:
(-[WebImageData _frameDurationAt:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8891
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Tue, 15 Mar 2005 02:06:19 +0000 (02:06 +0000)]
Reviewed by Darin, Maciej.
<rdar://problem/
4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly
Also fixes crash by adding nil check.
* khtml/editing/htmlediting.cpp:
(khtml::MoveSelectionCommand::doApply):
Check the node for nil.
* khtml/khtml_part.cpp:
(KHTMLPart::khtmlMouseReleaseEvent):
Use the node from the event rather than from the selection.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8890
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 15 Mar 2005 01:45:23 +0000 (01:45 +0000)]
Reviewed by Harrison.
- fixed <rdar://problem/
4049776> Seed: Mail: Disable spellcheck leaves red artifacts
* WebView.subproj/WebFrameInternal.h: Added _unmarkAllMisspellings.
* WebView.subproj/WebFrame.m: (-[WebFrame _unmarkAllMisspellings]): Added.
Calls unmarkAllMisspellings on the bridge and self and all subframes.
* WebView.subproj/WebView.m: (-[WebView setContinuousSpellCheckingEnabled:]):
Call _unmarkAllMisspellings on the main frame when turning continuous spell checking off.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8889
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 15 Mar 2005 01:05:23 +0000 (01:05 +0000)]
Reviewed by Harrison.
- fixed <rdar://problem/
4049776> Seed: Mail: Disable spellcheck leaves red artifacts
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak.
(DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed
for that node. Otherwise, we can have empty marker lists for each node forever until the
document goes away.
(DocumentImpl::removeAllMarkers): Added code to dirty the markers.
(DocumentImpl::shiftMarkers): Remove unneeded empty check.
* kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8888
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 15 Mar 2005 00:50:45 +0000 (00:50 +0000)]
WebKit:
Fixed <rdar://problem/
4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane
The Acrobat application triggers loads of new documents in it's policy delegate. This
ultimately causes the WebHTMLView to be released before their event handlers have
returned. To bullet proof against this case we retain/release self before passing
the event on for further handling.
Reviewed by Maciej.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _updateMouseoverWithEvent:]):
(-[WebHTMLView scrollWheel:]):
(-[WebHTMLView mouseDown:]):
(-[WebHTMLView mouseDragged:]):
(-[WebHTMLView mouseUp:]):
(-[WebHTMLView keyDown:]):
(-[WebHTMLView keyUp:]):
(-[WebHTMLView performKeyEquivalent:]):
WebCore:
Fixed <rdar://problem/
4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane
A document may be deleted as a consequence of handling an event,
as was the case with Acrobat.app. Ensure that the document is still valid
before passing the event on for further handling.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchUIEvent):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8887
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 15 Mar 2005 00:43:10 +0000 (00:43 +0000)]
Reviewed by me
Added a couple of comments about setChanged() to this code based on my experiences with
4047028.
* khtml/css/css_valueimpl.cpp:
(DOM::CSSMutableStyleDeclarationImpl::addParsedProperties)
(DOM::CSSMutableStyleDeclarationImpl::merge)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8886
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 15 Mar 2005 00:26:14 +0000 (00:26 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
4047028> Changing quote levels on stylized text causes it to be sent as colored (Blue). Tiger8A410
* khtml/css/css_valueimpl.cpp:
(DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): This function now calls setChanged() at the
end of its loop if any properties were removed. This makes the style system update correctly in response
to changes made by this function. The code to paste removes style from the pasted content in a
preliminary step, and the fact that the style system did not update properly left unwanted color
declarations in the document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8885
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 14 Mar 2005 23:50:14 +0000 (23:50 +0000)]
- roll out the fix for
4040321, since it is still pending CCC review.
2005-03-10 Richard Williamson <rjw@apple.com>
Fixed <rdar://problem/
4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
Reviewed by Darin.
If a delegate returns a mutated applewebdata: request in it's willSendRequest:
method, we don't load using the WebDataRequest. Instead we do a normal load.
Unfortunately, if the request they return is mutated *copy* of the applewebdata:
request it will hold the applewebdata: special properties. These properties
will be encoded into the cache. They should not be. So, to fix, we sanitize the
request, by removing the special properties from the request.
Note that we had to dig into the private guts of NSURLRequest because there is
no public mechanism to remove properties from a request, see
4046775.
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
* WebView.subproj/WebDataProtocol.h:
* WebView.subproj/WebDataProtocol.m:
(-[NSURLRequest _webDataRequestExternalRequest]):
(-[NSURLRequest _webDataRequestSanitize]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8882
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 14 Mar 2005 23:33:30 +0000 (23:33 +0000)]
- roll out this change for now, since it was denied by CCC
2005-03-11 David Harrison <harrison@apple.com>
Reviewed by Darin.
<rdar://problem/
4046602> WebCore invokes undefined behavior when the spell checker isn't running
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::advanceToNextMisspelling):
(KWQKHTMLPart::markMisspellings):
Nil check checker.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8881
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 14 Mar 2005 22:09:35 +0000 (22:09 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
4050403> Mail crashes after pasting and deleting the content of one Excel cell
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleGeneralDelete): Add some null checks to the code. This fixes the crash, although
following the steps described in the bug by John Sullivan on 3/14/05 at 10:49 AM will leave us with a "blank line" in
the document that cannot be removed (this is actually an empty table). This is undesirable, however, work Maciej is
doing to fix the general-case problem of trying to edit constructs we do not handle well in editing should fix this
particular case, making the deletion of this "blank line" possible. Maciej is doing this work as part of this bug:
<rdar://problem/
4036051> Hard to select (and thus delete) an IFRAME in an editable WebView
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8880
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 14 Mar 2005 21:49:25 +0000 (21:49 +0000)]
Reviewed by Darin
Fix for this bug:
<rdar://problem/
4029632> Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
The problem is that removeInlineStyle() can remove nodes, and if either the start or end node of the
selection at the time of the call to removeInlineStyle() was in a node that got removed, bad things
would happen. The fix is described below.
* khtml/editing/htmlediting.cpp:
(khtml::maxRangeOffset): Moved this static function to a different place in the file so the code below can use it.
(khtml::ApplyStyleCommand::applyInlineStyle): Calling removeInlineStyle() now has the side effect of
setting the command's ending selection. Now resets start and end using the ending selection after the call to
removeInlineStyle() as it is done elsewhere in this function.
(khtml::ApplyStyleCommand::removeInlineStyle): Track the removal of the start or end node based on
the positions passed in. If either the start or the end node is removed as part of style removal,
set an appropriate replacement start or end that is still in the document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8879
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 14 Mar 2005 21:40:39 +0000 (21:40 +0000)]
versioning for tip of tree, Safari 2.0 (406+)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8878
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 14 Mar 2005 21:36:13 +0000 (21:36 +0000)]
versioning for SUPanWheat, Safari 1.3 (v306)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8877
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Mon, 14 Mar 2005 21:21:44 +0000 (21:21 +0000)]
Safari-406 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8876
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 14 Mar 2005 17:58:38 +0000 (17:58 +0000)]
Reviewed by Darin
I need to roll out Kevin's change to fix
3667701. It breaks contextual fragments, and hence breaks
paste in editing (among other things).
* khtml/html/htmltokenizer.cpp: Roll out recent change.
(khtml::HTMLTokenizer::write)
* khtml/html/htmltokenizer.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8875
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 14 Mar 2005 17:49:31 +0000 (17:49 +0000)]
Reviewed by Ken and Maciej.
- fixed <rdar://problem/
4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
* Plugins.subproj/WebNetscapePluginStream.m: (-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
Allow plug-in subresource streams to load with any URL, ignoring the "canLoadURL" method's restriction (only
file URLs can load other file URLs), which now applies only to main resources, like web pages in frames or
object tags and plug-in main resources.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge startLoadingResource:withURL:customHeaders:]): Allow subresources to load with any URL, as above.
This allows things like images, stylesheets, and JavaScript to be loaded without the "canLoadURL" method's
restriction.
(-[WebBridge startLoadingResource:withURL:customHeaders:postData:]): Ditto.
(-[WebBridge syncLoadResourceWithURL:customHeaders:postData:finalURL:responseHeaders:statusCode:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8874
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 14 Mar 2005 17:49:05 +0000 (17:49 +0000)]
Reviewed by Ken and Maciej.
- fixed <rdar://problem/
4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
* kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Changed to give "applewebdata:"
documents the same privileges to open local files that "file:" documents have.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8873
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Mon, 14 Mar 2005 15:04:01 +0000 (15:04 +0000)]
Reviewed by mjs.
Fixed: <rdar://problem/
3667701> crash in KHTMLPart::jScriptEnabled()
The problem here was that the tokenizer would continue to receive chunks of data from the loader already
after the view and part had been destroyed. Situations like this could arise when clicking on another link
while still loading the current view, or during self test where we rapidly open, load, and close browser
windows very fast.
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::write): Simple nil check against the view.
* khtml/html/htmltokenizer.h: Changed the view pointer from a standard pointer to a QGuardedPtr. The tokenizer's
handle to the view will now automatically nil-out and never dangle.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8872
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 13 Mar 2005 21:35:32 +0000 (21:35 +0000)]
Reviewed by John and Ken.
- fixed <rdar://problem/
4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line
Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works.
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was
for the case where a "selection contains only a BR right after a block ended". This code was being triggered in
more cases than just that one, and in all the cases I tested, the general delete code works fine.
(khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire
block to understand the case where the end block is outside the start block, but contains the start block.
In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>,
and not the enclosing <div> in the case in the bug.
* layout-tests/editing/deleting/delete-line-015-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-015.html: Added.
* layout-tests/editing/deleting/delete-line-016-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-016.html: Added.
* layout-tests/editing/deleting/delete-line-017-expected.txt: Added.
* layout-tests/editing/deleting/delete-line-017.html: Added.
* layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion
now deletes more than it used to. The old results had an empty text node and <h1> element that were both 0-sized, and now
we delete both of those.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8871
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 13 Mar 2005 17:29:34 +0000 (17:29 +0000)]
- fixed <rdar://problem/
4049172> REGRESSION (403-405): Gmail: text box in "Invite a friend" section overlaps other sections
Rolled out fix for <rdar://problem/
3952698> Function buttons do not display properly with Telia Webmail
* khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Back to previous version of this file.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8870
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sun, 13 Mar 2005 01:58:09 +0000 (01:58 +0000)]
Reviewed by Adele.
<rdar://problem/
4046144> RSS pages leave a hole in local file security policy (need to revert feed: exemption)
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Revert
emergency workaround for Safari RSS, now that a new Syndication
has been submitted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8869
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sun, 13 Mar 2005 00:51:41 +0000 (00:51 +0000)]
Reviewed by Kevin.
<rdar://problem/
4026787> text typed after a link (pasted or Mail Link to this Page) is part of the link, underlined and colored blue
The concept of this change is every time you type at the very
start or very end of a link (even if nested in further inner
elements), the typed text goes outside the link instead of inside.
* khtml/editing/htmlediting.cpp:
(khtml::InsertTextCommand::prepareForTextInsertion): Check whether
we are at the first visible position or last visible position of a
special element. For now this only includes HTML A elements that
are links (i.e. they have an href).
(khtml::isSpecialElement): Helper function that identifies special
elements (for now only links).
(khtml::isFirstVisiblePositionInSpecialElement): Checks if a given DOM
position is equivalent to the first visible position in some containing
editable special element.
(khtml::positionBeforeNode): Returns the DOM position immediately
before a node.
(khtml::positionBeforeContainingSpecialElement): Gives a DOM
position immediately before the outermost editable containing
special element where the passed-in position is equivalent to the
first visible position.
(khtml::maxRangeOffset): Helper to get the maximum allowed
range/position offset for a node, does the right thing based on
whether the node would use a character offset or child offset.
(khtml::isLastVisiblePositionInSpecialElement): Similar to above,
but for end of node instead of start.
(khtml::positionAfterNode): Ditto.
(khtml::positionAfterContainingSpecialElement): Ditto.
Some layout tests changed - I looked over all the diffs and found
that the only changes were "junk nodes" like empty spans and text
nodes moving from one spot in the tree to another. These changes
are all harmless and do not affect layout or future editing.
* layout-tests/editing/inserting/typing-003-expected.txt:
* layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
* layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
* layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
* layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
* layout-tests/editing/style/remove-underline-expected.txt:
* layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt:
* layout-tests/editing/style/remove-underline-in-bold-expected.txt:
* layout-tests/editing/style/typing-style-003-expected.txt:
* layout-tests/editing/style/unbold-in-bold-expected.txt:
* layout-tests/editing/style/underline-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8868
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Sat, 12 Mar 2005 00:43:59 +0000 (00:43 +0000)]
backing out fix for <rdar://problem/
4021711> REGRESSION (125-188): blank pages when browsing forum at cooperativeresearch.org - cached external script problem
This caused the following regressions (that we know of):
<rdar://problem/
4047445> REGRESSION (Safari-400-403?): Some or all page contents sometimes don't appear (macworld.com)
<rdar://problem/
4046153> 8a409: Problem loading Citibank page in Safari 2 (403)
<rdar://problem/
4047801> REGRESSION (402-403): .Mac homepage links don't work
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::scriptHandler):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8867
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Fri, 11 Mar 2005 20:54:43 +0000 (20:54 +0000)]
Reviewed by Darin.
<rdar://problem/
4046602> WebCore invokes undefined behavior when the spell checker isn't running
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::advanceToNextMisspelling):
(KWQKHTMLPart::markMisspellings):
Nil check checker.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8866
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 11 Mar 2005 19:08:55 +0000 (19:08 +0000)]
Reviewed by me
* ForwardingHeaders/editing/visible_units.h: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8865
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 11 Mar 2005 18:43:36 +0000 (18:43 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
4045521> Hitting return key with full line selected does not add blank line as it should
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply): Removed some "special-case" code from this
function that would look for a selection that started and ended in a different block, and would
then bail right after the deletion of the selection without inserting a paragraph separator.
This was just wrong. So, the code change is removal only. When the general-case code runs instead
of the erroneous special-case code, the bug goes away.
New tests:
* layout-tests/editing/inserting/return-key-with-selection-001-expected.txt: Added.
* layout-tests/editing/inserting/return-key-with-selection-001.html: Added.
* layout-tests/editing/inserting/return-key-with-selection-002-expected.txt: Added.
* layout-tests/editing/inserting/return-key-with-selection-002.html: Added.
* layout-tests/editing/inserting/return-key-with-selection-003-expected.txt: Added.
* layout-tests/editing/inserting/return-key-with-selection-003.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8864
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Fri, 11 Mar 2005 17:40:53 +0000 (17:40 +0000)]
Reviewed by Darin.
<rdar://problem/
4009446> AX: kAXTextMarkerForPositionParameterizedAttribute not working correctly (required for Dictionary pop-up)
* kwq/KWQAccObject.mm:
(-[KWQAccObject accessibilityAttributeValue:]):
Comment changes.
(-[KWQAccObject doAXTextMarkerForPosition:]):
Dig into widgets.
(-[KWQAccObject doAXBoundsForTextMarkerRange:]):
Use the selection's document instead of the top document, to accommodate frames, etc.
(-[KWQAccObject accessibilityAttributeValue:forParameter:]):
Fixed parameter processing to look for NSValue instead of AXValue.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8863
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 11 Mar 2005 17:32:03 +0000 (17:32 +0000)]
move the Safari-405 release marker, since <rdar://problem/
4046510> will be included in 405
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8862
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 11 Mar 2005 17:27:55 +0000 (17:27 +0000)]
move the Safari-405 release marker, since we're including <rdar://problem/
4037700> in Safari-405
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8861
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 11 Mar 2005 16:52:18 +0000 (16:52 +0000)]
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor
This was fixed, then regressed with Harrison's fix for this bug:
<rdar://problem/
3948453> Can't type accented chars as first character in Stickies widget
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply): My now addresses both problems in a way that they no longer
clobber each other.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8860
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 11 Mar 2005 16:30:14 +0000 (16:30 +0000)]
Reviewed by John
Fix for these bugs:
<rdar://problem/
4045511> Copying and pasting end-of-paragraph selection puts insertion point in wrong place
<rdar://problem/
4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
The copy/paste code before this patch had no notion of a "logical newline" at the start of the selection. We have
had a similar notion for "logical newline" at the end of the selection for quite some time. To fix these bugs, we
need to introduce the same idea for selection starts.
* khtml/editing/htmlediting.cpp:
(khtml::ReplacementFragment::ReplacementFragment): Process the "logical newline" at start as we write it out
in markup. Set the bit we added to this object to signify we have such a newline.
(khtml::ReplaceSelectionCommand::doApply): Many, many changes to introduce the new "logical newline" at start concept.
I also tried to simply the code that sets the start position for inserting content to be pasted. I also improved a
weakness in the smart-paste code. Now, we check before and after the paste for whether we need to add a leading or
trailing space. The code previous to this patch only did a "before" check, with the result that we sometimes added
a second space. In other words, the code did not realize that DOM changes done by pasting could cause formerly
unrendered whitespace to become rendered. Also moved line placeholder clean up code to its own function.
(khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): New helper that further refines the notion
of when we can remove a line placeholder. The definition is now, "If a line placeholder is at the visible start
and visible end of its line, keep it; otherwise remove it".
* khtml/editing/htmlediting.h: Declare new functions. Rework inlines in ReplacementFragment class to account for
addition of new "logical newline" at start concept.
(khtml::ReplacementFragment::hasInterchangeNewlineAtStart): New accessor.
(khtml::ReplacementFragment::hasInterchangeNewlineAtEnd): Renamed from hasInterchangeNewline(), since before we
only had a bit for the end, hence we did not need to distinguish it from the start.
* khtml/editing/markup.cpp:
(khtml::createMarkup): Added code to detect and write out markup for cases where we have a "logical newline" at start.
* khtml/xml/dom2_rangeimpl.cpp:
(DOM::RangeImpl::startPosition): New helper.
(DOM::RangeImpl::endPosition): Ditto.
* khtml/xml/dom2_rangeimpl.h: Declare new helpers.
New tests:
* layout-tests/editing/pasteboard/paste-line-endings-001-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-001.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-002-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-002.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-003-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-003.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-004-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-004.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-005-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-005.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-006-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-006.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-007-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-007.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-008-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-008.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-009-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-009.html: Added.
* layout-tests/editing/pasteboard/paste-line-endings-010-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-line-endings-010.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8859
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 11 Mar 2005 01:43:15 +0000 (01:43 +0000)]
Fixed <rdar://problem/
4040321> Exception: Someone's trying to encode a WebDataRequestParameters instance
Reviewed by Darin.
If a delegate returns a mutated applewebdata: request in it's willSendRequest:
method, we don't load using the WebDataRequest. Instead we do a normal load.
Unfortunately, if the request they return is mutated *copy* of the applewebdata:
request it will hold the applewebdata: special properties. These properties
will be encoded into the cache. They should not be. So, to fix, we sanitize the
request, by removing the special properties from the request.
Note that we had to dig into the private guts of NSURLRequest because there is
no public mechanism to remove properties from a request, see
4046775.
* WebView.subproj/WebBaseResourceHandleDelegate.m:
(-[WebBaseResourceHandleDelegate willSendRequest:redirectResponse:]):
* WebView.subproj/WebDataProtocol.h:
* WebView.subproj/WebDataProtocol.m:
(-[NSURLRequest _webDataRequestExternalRequest]):
(-[NSURLRequest _webDataRequestSanitize]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8858
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Fri, 11 Mar 2005 01:27:18 +0000 (01:27 +0000)]
Reviewed by Vicki.
<rdar://problem/
4046510> REGRESSION (TOT): All Flash and Shockwave plugin-based web content missing
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8855
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 11 Mar 2005 01:18:39 +0000 (01:18 +0000)]
Reviewed by Richard.
- fixed <rdar://problem/
4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
* khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Set boolean "got iterator" to true.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8854
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 11 Mar 2005 00:49:55 +0000 (00:49 +0000)]
versioning for TOT, Safari 2.0 (v405+). The tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8853
268f45cc-cd09-0410-ab3c-
d52691b4dbfc