kocienda [Mon, 25 Oct 2004 18:49:50 +0000 (18:49 +0000)]
Reviewed by me
Added some more editing layout tests.
* layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt: Added.
* layout-tests/editing/deleting/delete-ws-fixup-001.html: Added.
* layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt: Added.
* layout-tests/editing/deleting/delete-ws-fixup-002.html: Added.
* layout-tests/editing/deleting/delete-ws-fixup-003-expected.txt: Added.
* layout-tests/editing/deleting/delete-ws-fixup-003.html: Added.
* layout-tests/editing/deleting/delete-ws-fixup-004-expected.txt: Added.
* layout-tests/editing/deleting/delete-ws-fixup-004.html: Added.
* layout-tests/editing/inserting/typing-003-expected.txt: Added.
* layout-tests/editing/inserting/typing-003.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7889
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 25 Oct 2004 18:48:44 +0000 (18:48 +0000)]
Reviewed by John
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::findNextLineBreak): I did not get my fix for
3848343 and
3848224
yesterday quite right: words that should have been placed on the next line were instead
appearing on the line before, beyond the right margin. This was a one-word only error
based on moving the line break object when it should have stayed put. Here is the rule:
The line break object only moves to after the whitespace on the end of a line if that
whitespace caused line overflow when its width is added in.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7888
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Mon, 25 Oct 2004 18:26:01 +0000 (18:26 +0000)]
Reviewed by Darin.
Fix for <rdar://problem/
3619890> Feature request: designMode
This change implements the designMode property of a document. This is an IE property that is also supported by Mozilla.
This will enable more JS editing compatibility.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet): added case for designMode
(KJS::HTMLDocument::putValue): added case for designMode
* khtml/ecma/kjs_html.lut.h: (KJS::): regenerated
* khtml/khtml_part.cpp: (KHTMLPart::isContentEditable): Now returns designMode value
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl): initialize m_designMode member variable
(DocumentImpl::setDesignMode): added function to assign m_designMode value
(DocumentImpl::getDesignMode): return m_designMode value
(DocumentImpl::inDesignMode): if designMode is inherited, this will find the appropriate parent document designMode and return that value.
Otherwise, it will just return the m_designMode value.
(DocumentImpl::parentDocument):
* khtml/xml/dom_docimpl.h: (DOM::DocumentImpl::): added InheritedBool enum, prototypes, and m_designMode member variable.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::isContentEditable): added check for isContentEditable function in KHTMLPart
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7887
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 25 Oct 2004 17:52:07 +0000 (17:52 +0000)]
WebKit:
Reviewed by Chris.
- Cleanup from fix for <rdar://problem/
3851676> bookmarks should not hold onto a WebHistoryItem object;
eliminated notificationsSuppressed mechanism, which was used only by WebBookmark
* History.subproj/WebHistoryItem.m:
removed notificationsSuppressed ivar from private data object
(-[WebHistoryItem setAlternateTitle:]):
remove notificationsSuppressed guard
(-[WebHistoryItem setURLString:]):
ditto
(-[WebHistoryItem setOriginalURLString:]):
ditto
(-[WebHistoryItem setTitle:]):
ditto
(-[WebHistoryItem _setLastVisitedTimeInterval:]):
ditto
(-[WebHistoryItem setNotificationsSuppressed:]):
removed this method
(-[WebHistoryItem notificationsSuppressed]):
ditto
* History.subproj/WebHistoryItemPrivate.h:
removed notificationsSuppressed and setNotificationsSuppressed
WebBrowser:
Reviewed by Chris.
- fixed these bugs:
<rdar://problem/
3851676> bookmarks should not hold onto a WebHistoryItem object
<rdar://problem/
3852373> Could eliminate -[WebBookmark lastVisitedTimeInterval] for performance
This reduced RPRVT after launch with the standard set of built-in bookmarks on my machine from
4.12M to 4.09M, and sped up reading bookmarks a little also.
* BrowserWebBookmarkExtras.m:
(-[WebBookmark _goToWithWindowPolicy:]):
Don't set lastVisitedTimeInterval here
* URLCompletionController.m:
(-[URLCompletionController _addStatsForURL:]):
Added comment to this #defined-away method explaining that it wouldn't work as-is anymore
since it calls the obsolete setLastVisitedTimeInterval
* WebBookmark.h:
remove lastVisitedTimeInterval and setLastVisitedTimeInterval
* WebBookmark.m:
removed _URL, setLastVisitedTimeInterval, and lastVisitedTimeInterval
* WebBookmarkExporter.m:
(-[WebBookmarkExporter stringForBookmarkLeaf:withIndentLevel:]):
Don't export last visited time anymore
* WebBookmarkGroup.m:
(-[WebBookmarkGroup _addBookmarkToURLStringDictionary:]):
use [bookmark URLString] instead of [bookmark _URL]. The latter was getting the URL from its
WebHistoryItem, which no longer exists.
* WebBookmarkLeaf.h:
remove _entry ivar, add _title ivar
* WebBookmarkLeaf.m:
(-[WebBookmarkLeaf init]):
removed this method, which set up _entry
(-[WebBookmarkLeaf initWithURLString:title:group:]):
weaned from _entry, also calls setURLString instead of setting the ivar directly to
ensure that the WebIconDatabase is updated properly
(-[WebBookmarkLeaf initFromDictionaryRepresentation:topLevelOnly:withGroup:]):
ditto
(-[WebBookmarkLeaf dictionaryRepresentation]):
weaned from _entry
(-[WebBookmarkLeaf dealloc]):
calls setURLString instead of setting the ivar directly to ensure that the WebIconDatabase
is updated properly
(-[WebBookmarkLeaf copyWithZone:]):
ditto
(-[WebBookmarkLeaf title]):
weaned from _entry
(-[WebBookmarkLeaf setTitle:]):
ditto
(-[WebBookmarkLeaf icon]):
ditto
(-[WebBookmarkLeaf URLString]):
ditto
(-[WebBookmarkLeaf setURLString:]):
ditto, also updates WebIconDatabase
(-[WebBookmarkLeaf setLastVisitedTimeInterval:]):
removed this method
(-[WebBookmarkLeaf lastVisitedTimeInterval]):
ditto
(-[WebBookmarkLeaf _computeIsRSSBookmark]):
use isSyndicationURLString on a string instead of isSyndicationURL on a URL
* WebBookmarkPrivate.h:
removed _URL method
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7886
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Sat, 23 Oct 2004 00:19:49 +0000 (00:19 +0000)]
Fixed: <rdar://problem/
3851491> installedPlugins being called for a page without plugins
Reviewed by mjs.
* WebView.subproj/WebFrameView.m:
(+[WebFrameView _canShowMIMETypeAsHTML:]): call _viewTypesAllowImageTypeOmission instead of using ivar since the ivar is nil until _viewTypesAllowImageTypeOmission is called, this was causing [WebView canShowMIMEType:] to check plug-ins
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7885
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 22 Oct 2004 22:26:12 +0000 (22:26 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3844662> REGRESSION (Mail): Style changes can affect adjacent, unselected text
* khtml/editing/htmlediting.cpp:
(khtml::ApplyStyleCommand::doApply): Move end position downstream to be sure we remove style from
everything that could be affected.
(khtml::ApplyStyleCommand::removeCSSStyle): Comma in intended function call was outside the
braces, making it act as a comma operator, with a zero value as the right value!!! This made
an important check always fail!!! It turns out that we do not want the constant at all, since
that constant is only needed when checking a computed style, not an inline style as is being
done here.
(khtml::ApplyStyleCommand::removeStyle): Call nodeFullySelected with new interface.
(khtml::ApplyStyleCommand::nodeFullySelected): Change interface and implementation to rely on
RangeImpl::compareBoundaryPoints to perform the required check.
* khtml/editing/htmlediting.h: Changed nodeFullySelected function interface.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7884
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 22 Oct 2004 20:07:05 +0000 (20:07 +0000)]
Reviewed by Hyatt
Fix for this bugs:
<rdar://problem/
3848343> REGRESSION (Mail, 166-168u): Typed text after space at end of line before block quote does not appear
<rdar://problem/
3848224> REGRESSION (Mail): space typed at end of line vanishes after typing next character
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::findNextLineBreak): When the khtmlLineBreak is in AFTER_WHITE_SPACE mode, as
it is when we are editing, add in the space of the current character when calculating the width
of committed plus uncommitted characters. If this value exceeds the width of the line, move up
the line break object and call skipWhitespace to move past the end of the whitespace.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7883
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 22 Oct 2004 19:14:15 +0000 (19:14 +0000)]
versioning for TOT. the tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7882
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 22 Oct 2004 19:04:54 +0000 (19:04 +0000)]
Safari-168 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7880
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 22 Oct 2004 16:20:36 +0000 (16:20 +0000)]
JavaScriptCore:
Reviewed by me
* JavaScriptCore.pbproj/project.pbxproj:
Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags.
WebCore:
Reviewed by me
* WebCore.pbproj/project.pbxproj:
Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags.
WebKit:
Reviewed by me
* WebKit.pbproj/project.pbxproj: Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7879
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 22 Oct 2004 01:08:56 +0000 (01:08 +0000)]
Reviewed by darin
Clean up the inline run function so that it doesn't return incorrect answers when making children non-inline.
<rdar://problem/
3848724> REGRESSION (166-168u): RenderText::layout called, firing assertion that kills Mail
<rdar://problem/
3848357> RenderText::layout called, firing assertion that kills Safari (www.apple.com/downloads/macosx)
* khtml/rendering/render_block.cpp:
(khtml::getInlineRun):
(khtml::RenderBlock::makeChildrenNonInline):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7878
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 22 Oct 2004 00:00:29 +0000 (00:00 +0000)]
Add layout test for dynamic block/inline crash.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7877
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 21 Oct 2004 23:45:58 +0000 (23:45 +0000)]
Fix for
3810389, crash because of continuation() craziness. Revert back to the old behavior of
making sure that all line boxes get deleted and recreated when inlines are split because of a block.
Reviewed darin
* khtml/rendering/render_inline.cpp:
(RenderInline::splitFlow):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7876
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 21 Oct 2004 21:19:35 +0000 (21:19 +0000)]
Reviewed by Darin
Significant improvement to the way that whitespace is handled during editing.
* khtml/editing/htmlediting.cpp:
(khtml::CompositeEditCommand::deleteInsignificantText): New functions (there are actually
two being added with this name) that delete "insignificant" unrendered text.
(khtml::CompositeEditCommand::deleteInsignificantTextDownstream): Takes a position,
calculates the downstream position to use as the endpoint for the deletion, and
then calls deleteInsignificantText with this start and end.
(khtml::DeleteSelectionCommand::doApply): Call new deleteInsignificantTextDownstream function.
(khtml::InputNewlineCommand::doApply): Ditto.
(khtml::InputTextCommand::input): Ditto.
* khtml/editing/htmlediting.h: Add new declarations.
Modified layout test results:
* layout-tests/editing/deleting/delete-block-merge-contents-016-expected.txt:
* layout-tests/editing/deleting/delete-block-merge-contents-017-expected.txt:
* layout-tests/editing/deleting/delete-contiguous-ws-001-expected.txt:
* layout-tests/editing/deleting/delete-selection-001-expected.txt:
* layout-tests/editing/deleting/delete-tab-001-expected.txt:
* layout-tests/editing/deleting/delete-tab-004-expected.txt:
* layout-tests/editing/deleting/delete-trailing-ws-001-expected.txt:
* layout-tests/editing/inserting/insert-
3659587-fix-expected.txt:
* layout-tests/editing/inserting/insert-
3775316-fix-expected.txt:
* layout-tests/editing/inserting/insert-
3778059-fix-expected.txt:
* layout-tests/editing/inserting/insert-br-001-expected.txt:
* layout-tests/editing/inserting/insert-br-004-expected.txt:
* layout-tests/editing/inserting/insert-br-005-expected.txt:
* layout-tests/editing/inserting/insert-br-006-expected.txt:
* layout-tests/editing/inserting/insert-tab-001-expected.txt:
* layout-tests/editing/inserting/insert-tab-002-expected.txt:
* layout-tests/editing/inserting/insert-tab-004-expected.txt:
* layout-tests/editing/inserting/insert-text-with-newlines-expected.txt:
* layout-tests/editing/inserting/typing-001-expected.txt:
* layout-tests/editing/inserting/typing-around-br-001-expected.txt:
* layout-tests/editing/inserting/typing-around-image-001-expected.txt:
* layout-tests/editing/style/typing-style-003-expected.txt:
* layout-tests/editing/undo/redo-typing-001-expected.txt:
* layout-tests/editing/undo/undo-typing-001-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7875
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 21 Oct 2004 21:12:06 +0000 (21:12 +0000)]
Fix for
3847054, assertion failure in RenderText::layout() on news.com page. Fix getInlineRun so that
it no longer breaks early (thus causing some children not to get properly wrapped by anonymous blocks).
Reviewed by darin
* khtml/rendering/render_block.cpp:
(khtml::getInlineRun):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7874
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 21 Oct 2004 17:04:37 +0000 (17:04 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3847994> REGRESSION: reproducible exception in WebImageRenderer releasePatternColor; afterwards get crash or no more browsing
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebInternalImage createRendererIfNeeded]): Replaced retainOrCopyIfNeeded with this.
This returns nil if a copied renderer isn't needed, and returns a new renderer if a copy is.
The old version was sometimes returning a WebInternalImage and other times a WebImageRenderer.
(-[WebImageRenderer retainOrCopyIfNeeded]): Returns the result of createRendererIfNeeded
or retains self and returns self.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7873
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 21 Oct 2004 00:23:33 +0000 (00:23 +0000)]
Land updated layout tests with scroll info.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7872
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 21 Oct 2004 00:20:59 +0000 (00:20 +0000)]
Reviewed by Dave.
- fixed <rdar://problem/
3470715> Pattern cache can get huge with use of css background-image in Safari
* WebCoreSupport.subproj/WebImageRenderer.h: Change WebImageRenderer to be a subclass of NSObject
rather than NSImage and contain a pointer to a WebInternalImage.
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebInternalImage releasePatternColor]): Added. Releases patternColor.
(-[WebImageRenderer initWithMIMEType:]): Added. Makes WebInternalImage and then self.
(-[WebImageRenderer initWithData:MIMEType:]): Ditto.
(-[WebImageRenderer initWithContentsOfFile:]): Ditto.
(-[WebImageRenderer dealloc]): Added. Calls releasePatternColor and then releases WebInternalImage.
(-[WebImageRenderer image]): Added. Returns pointer to image.
(-[WebImageRenderer MIMEType]): Added. Calls through to image.
(-[WebImageRenderer TIFFRepresentation]): Ditto.
(-[WebImageRenderer frameCount]): Ditto.
(-[WebImageRenderer setOriginalData:]): Added. Sets image data pointer.
(+[WebImageRenderer stopAnimationsInView:]): Added. Calls through to image.
(-[WebImageRenderer incrementalLoadWithBytes:length:complete:]): Ditto.
(-[WebImageRenderer size]): Ditto.
(-[WebImageRenderer resize:]): Ditto.
(-[WebImageRenderer drawImageInRect:fromRect:]): Ditto.
(-[WebImageRenderer drawImageInRect:fromRect:compositeOperator:context:]): Ditto.
(-[WebImageRenderer stopAnimation]): Ditto.
(-[WebImageRenderer tileInRect:fromPoint:context:]): Ditto.
(-[WebImageRenderer isNull]): Ditto.
(-[WebImageRenderer retainOrCopyIfNeeded]): Ditto.
(-[WebImageRenderer increaseUseCount]): Ditto.
(-[WebImageRenderer decreaseUseCount]): Ditto.
(-[WebImageRenderer flushRasterCache]): Ditto.
(-[WebImageRenderer imageRef]): Ditto.
(-[WebImageRenderer copyWithZone:]): Ditto.
* Misc.subproj/WebNSViewExtras.m: (-[NSView _web_dragImage:rect:event:pasteboard:source:offset:]):
Update for slight changes to WebImageRenderer API.
* WebCoreSupport.subproj/WebImageRendererFactory.m:
(-[WebImageRendererFactory imageRendererWithMIMEType:]): Ditto.
(-[WebImageRendererFactory imageRendererWithData:MIMEType:]): Ditto.
(-[WebImageRendererFactory imageRendererWithSize:]): Ditto.
(-[WebImageRendererFactory imageRendererWithName:]): Ditto.
* WebView.subproj/WebImageView.m: (-[WebImageView image]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7871
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 21 Oct 2004 00:20:29 +0000 (00:20 +0000)]
Add better dumping of overflow information for scrolling regions.
Fix for
3726524, crash in updateLayerPosition. Make sure anonymous elements properly remove themselves
from the render tree so that layers and so forth are cleaned up.
Reviewed by darin
* khtml/rendering/render_container.cpp:
(RenderContainer::detach):
* khtml/rendering/render_layer.h:
(khtml::RenderLayer::scrollXOffset):
(khtml::RenderLayer::scrollYOffset):
* kwq/KWQRenderTreeDebug.cpp:
(write):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7870
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 20 Oct 2004 21:34:01 +0000 (21:34 +0000)]
Fix for
3791146, make sure all lines are checked when computing overflow.
Reviewed by kocienda
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::computeHorizontalPositionsForLine):
(khtml::RenderBlock::layoutInlineChildren):
(khtml::RenderBlock::findNextLineBreak):
(khtml::RenderBlock::checkLinesForOverflow):
* khtml/rendering/render_block.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7869
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 20 Oct 2004 21:31:53 +0000 (21:31 +0000)]
Fixed: <rdar://problem/
3846943> REGRESSION: JNLP files are rendered instead of downloaded
Reviewed by john.
* Plugins.subproj/WebBasePluginPackage.h:
* Plugins.subproj/WebBasePluginPackage.m:
(-[WebBasePluginPackage isJavaPlugIn]): new
* Plugins.subproj/WebPluginDatabase.m:
(-[WebPluginDatabase refresh]): don't register the Java plug-in for a document view since Java file should be downloaded when not embedded.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7868
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 20 Oct 2004 20:58:12 +0000 (20:58 +0000)]
Fix for
3790936, make the unicode-breaking on the layout tests match Panther.
Reviewed by kocienda
* khtml/rendering/break_lines.cpp:
(khtml::isBreakable):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7867
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 20 Oct 2004 19:01:16 +0000 (19:01 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3317107> text input fields and text areas don't respect background color and text color CSS properties
* khtml/rendering/render_form.cpp: (RenderFormElement::updateFromElement):
Create a palette with the background and foreground colors in it and set it on the widget.
* khtml/rendering/render_style.h: (khtml::StyleVisualData::operator==): No palette to compare
with APPLE_CHANGES. Removed palette and palette-related function members.
* khtml/rendering/render_style.cpp:
(StyleVisualData::StyleVisualData): No palette to initialize with APPLE_CHANGES.
(RenderStyle::diff): No palette to compare.
* kwq/KWQLineEdit.h: Added setPalette override. Made text function const.
* kwq/KWQLineEdit.mm:
(QLineEdit::setPalette): Added. Sets foreground and background color based on palette.
(QLineEdit::text): Made const.
* kwq/KWQTextEdit.h: Added setPalette override.
* kwq/KWQTextEdit.mm: (QTextEdit::setPalette): Added. Sets foreground and background color
based on palette.
* kwq/KWQPalette.h: Removed most things, leaving only background and foreground colors
per color group, and only a single color group per palette.
* kwq/KWQColorGroup.mm: Removed.
* kwq/KWQPalette.mm: Removed.
* WebCore.pbproj/project.pbxproj: Removed KWQColorGroup.mm and KWQPalette.mm.
* kwq/KWQApplication.h: Removed unused palette function.
* kwq/KWQApplication.mm: Ditto.
* kwq/KWQWidget.h: Removed unsetPalette.
* kwq/KWQWidget.mm: Ditto.
- fixed storage leak
* khtml/html/html_formimpl.cpp: (DOM::HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl):
Roll in storage leak fix from KDE guys.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7866
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 20 Oct 2004 18:21:48 +0000 (18:21 +0000)]
Fixed:
<rdar://problem/
3842030> WebKit needs to pass the mode (NP_FULL, NP_EMBED, etc) when calling plugInViewWithArguments
<rdar://problem/
3792852> Safari is loading the new QuickTime Cocoa plugin on Panther
Reviewed by darin.
* Plugins.subproj/WebPluginDocumentView.m:
(-[WebPluginDocumentView setDataSource:]): pass "full" as the mode
* Plugins.subproj/WebPluginPackage.m:
(-[WebPluginPackage initWithPath:]): load plug-in with the "webplugin" extension
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge pluginViewWithPackage:attributeNames:attributeValues:baseURL:]): pass "embed" as the mode
* WebKit.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7865
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Tue, 19 Oct 2004 23:50:43 +0000 (23:50 +0000)]
- bump WebKit version to 167.1, so that we can do a quick dot submission for <rdar://problem/
3843951>
* WebKit.pbproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7863
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 19 Oct 2004 23:28:51 +0000 (23:28 +0000)]
Check in updated layout tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7862
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 19 Oct 2004 23:04:29 +0000 (23:04 +0000)]
Reviewed by kocienda
More cleanup of block layout. Eliminates the separate step for tables that dont fit on a line with a float
and consolidates it with clearing.
Also patch dom_textimpl.cpp to reduce further the # of RenderTexts created.
* khtml/rendering/render_block.cpp:
(khtml::getInlineRun):
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::adjustFloatingBlock):
(khtml::RenderBlock::collapseMargins):
(khtml::RenderBlock::clearFloatsIfNeeded):
(khtml::RenderBlock::estimateVerticalPosition):
(khtml::RenderBlock::layoutBlockChildren):
(khtml::RenderBlock::markAllDescendantsWithFloatsForLayout):
(khtml::RenderBlock::getClearDelta):
(khtml::RenderBlock::calcBlockMinMaxWidth):
* khtml/rendering/render_block.h:
* khtml/rendering/render_frames.cpp:
(RenderFrameSet::layout):
* khtml/xml/dom_textimpl.cpp:
(TextImpl::rendererIsNeeded):
Fix for
3841060, regression with * in frames. Reviewed by kocienda.
* layout-tests/fast/frames/002-expected.txt: Added.
* layout-tests/fast/frames/002.html: Added.
2004-10-19 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- follow-on to my fix yesterday, which broke a layout test because I rolled out a fix that Maciej had done
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Need to check the actual queue of external
scripts being loaded here. If the current code being run is the external script itself, then we don't want
to defer parsing. But loadingExtScript has to stay true until after the script runs. The old code would
assume that any time we're running a script there's no need to look at loadingExtScript, but that was also
wrong since there can be a script loading in that case too. Layout tests check for both problems.
* layout-tests/fast/tokenizer/external-script-document-write-expected.txt: Added.
* layout-tests/fast/tokenizer/external-script-document-write.html: Added.
* layout-tests/fast/tokenizer/resources/external-script-document-write.js: Added.
* layout-tests/fast/tokenizer/004.html: Fixed line endings (were CR, should be LF).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7861
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 19 Oct 2004 22:05:02 +0000 (22:05 +0000)]
Change suggested by Maciej during code review.
* WebCoreSupport.subproj/WebTextRenderer.m: Changed rounding hack table to be const so it can be in shared instead
of private memory, and doesn't require an initialization function.
(+[WebTextRenderer initialize]): Removed initialization.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7860
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 19 Oct 2004 21:56:04 +0000 (21:56 +0000)]
Reviewed by Maciej.
- fixed <rdar://problem/
3838934> Safari stops loading pages after rangeOfCharacterFromSet nil argument exception
- fixed <rdar://problem/
3843951> REGRESSION (166-167): Safari crashes in widthForNextCharacter (belkin.com, at startup for others)
- fixed <rdar://problem/
3841049> REGRESSION (109-110): control characters render as square boxes
* WebCoreSupport.subproj/WebTextRenderer.m:
(isSpace): Merged in isAlternateSpace, never used.
(setupRoundingHackCharacterTable): Fixed size of table, was 1 entry too short. Got rid of unneeded call to bzero,
since globals start out zeroed automatically.
(isRoundingHackCharacter): Fixed backwards logic causing the crash in widthForNextCharacter.
Also removed explicit compare with 1; check for non-zero is just fine.
(fontContainsString): Change code so we'll just skip the font if the covered character set returns nil rather than
throwing an exception like the old version did. This should make bug
3838934 go away, although perhaps covering up
the underlying problem.
(-[WebTextRenderer _convertCharacters:length:toGlyphs:]): Removed unused skipControlCharacters: parameter and also
the unnecessary code to copy the buffer to change newline characters and non-break spaces to spaces.
(-[WebTextRenderer _convertUnicodeCharacters:length:toGlyphs:]): Removed unused local.
(-[WebTextRenderer _extendCharacterToGlyphMapToInclude:]): Added code to set up special cases for control characters,
\n and non-break spaces.
(-[WebTextRenderer _createATSUTextLayoutForRun:]): Added comment about the cases this code does not handle that
are handled by the CG case.
(widthForNextCharacter): Call isSpace instead of checking specifically for the space character here. The old code
would not handle cases with '\n' coming across from WebCore properly.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7859
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 19 Oct 2004 21:11:43 +0000 (21:11 +0000)]
Add image for lists test.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7858
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 19 Oct 2004 19:01:15 +0000 (19:01 +0000)]
2004-10-19 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- follow-on to my fix yesterday, which broke a layout test because I rolled out a fix that Maciej had done
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Need to check the actual queue of external
scripts being loaded here. If the current code being run is the external script itself, then we don't want
to defer parsing. But loadingExtScript has to stay true until after the script runs. The old code would
assume that any time we're running a script there's no need to look at loadingExtScript, but that was also
wrong since there can be a script loading in that case too. Layout tests check for both problems.
* layout-tests/fast/tokenizer/external-script-document-write-expected.txt: Added.
* layout-tests/fast/tokenizer/external-script-document-write.html: Added.
* layout-tests/fast/tokenizer/resources/external-script-document-write.js: Added.
* layout-tests/fast/tokenizer/004.html: Fixed line endings (were CR, should be LF).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7857
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 19 Oct 2004 00:23:55 +0000 (00:23 +0000)]
Reviewed by Dave Hyatt.
- fixed <rdar://problem/
3807234> REGRESSION (152-153): can't get element by ID that was just written with document.write in separate JS file (lacoccinelle.net)
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::scriptHandler): Use !isEmpty instead of count != 0, since it's cheaper.
(khtml::HTMLTokenizer::write): Roll back to the old version of the check here. The fix is that
we only want to look at loadingExtScript if m_executingScript is 0.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7854
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 18 Oct 2004 21:52:36 +0000 (21:52 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3840907> textedit doesn't render italic or bold text in html documents
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::getStringValue): This function did not return string values for idents.
Also changed the return value to be DOMString, rather than DOMStringImpl, to deal with the
lifecycle issues associated with creating a string to be returned in the ident case.
* khtml/css/css_valueimpl.h: Change getStringValue to return DOMString rather than DOMStringImpl.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyProperty): Two calls of getStringValue needed updating.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7852
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 18 Oct 2004 17:56:01 +0000 (17:56 +0000)]
Fixed: <rdar://problem/
3770135> hang loading page with EMBED tag pointing to same page (tridentantennas.co.uk)
Reviewed by kocienda.
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget): use completeURL before comparing the URL of the plug-in with the base URL of the document when avoiding frame recursion
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7851
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 18 Oct 2004 17:36:07 +0000 (17:36 +0000)]
Fixed: <rdar://problem/
3840916> GC: -[WebNetscapePluginPackage initWithPath:] leaks an NSURL
Reviewed by kevin.
* Plugins.subproj/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage initWithPath:]): use executablePath on NSBundle instead of CFBundleCopyExecutableURL
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7850
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 18 Oct 2004 17:30:39 +0000 (17:30 +0000)]
* DOM.subproj/DOMPrivate.h: change to copied header that was never committed
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7849
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 18 Oct 2004 16:55:06 +0000 (16:55 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3810183> Make WebHTMLView respect return value of webView:doCommandBySelector:
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView doCommandBySelector:]):
only do default action if delegate returns NO; this works with Mail as of Tiger 8A275.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7848
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Fri, 15 Oct 2004 23:17:56 +0000 (23:17 +0000)]
Fixed: <rdar://problem/
3841774> would like to get NSColor from DOM-CSS
Reviewed by john.
* kwq/DOM-CSS.mm:
(-[DOMRGBColor _color]): new, returns getNSColor on KWQColor
* kwq/DOMPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7847
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 15 Oct 2004 21:07:24 +0000 (21:07 +0000)]
Reviewed by Hyatt
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::skipNonBreakingSpace): Also need to forego the
skipping after a clean line break, in addition to the cases already
checked for.
* layout-tests/editing/inserting/insert-br-007-expected.txt: Added.
* layout-tests/editing/inserting/insert-br-007.html: Added.
* layout-tests/editing/inserting/insert-br-008-expected.txt: Added.
* layout-tests/editing/inserting/insert-br-008.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7846
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 15 Oct 2004 18:22:26 +0000 (18:22 +0000)]
versioning for TOT, Safari 2.0 (168u)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7845
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 15 Oct 2004 18:12:14 +0000 (18:12 +0000)]
Safari-167 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7843
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 15 Oct 2004 00:01:20 +0000 (00:01 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3839989> REGRESSION (Mail): Left arrow does nothing after inserting attachment
* khtml/editing/visible_position.cpp:
(khtml::VisiblePosition::deepEquivalent): Remove code that attempted to bridge old-style
position code to new-style VisiblePosition code. In retrospect, this code was misguided.
Since we do a good job of insulating external code from the internal workings of
VisiblePosition, the "hop ahead" being done here was not doing anyone any real good, and
in the case of this bug, was doing harm. Simply removing this code makes the bug
go away and does not cause any editing layout test regresssions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7842
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 14 Oct 2004 23:51:47 +0000 (23:51 +0000)]
Reviewed by Hyatt
* khtml/rendering/bidi.cpp:
(khtml::skipNonBreakingSpace): New helper.
(khtml::RenderBlock::skipWhitespace): Do not skip non-breaking spaces that are
at the start of a block. This was preventing users from typing spaces in empty
documents.
* layout-tests/editing/inserting/insert-space-in-empty-doc-expected.txt: Added.
* layout-tests/editing/inserting/insert-space-in-empty-doc.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7841
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Thu, 14 Oct 2004 21:52:53 +0000 (21:52 +0000)]
Reviewed by Darin and Ken.
fix for <rdar://problem/
3821070> null de-ref in DelectSelectionCommand::doApply()
This change shifts some code around so that the code that determines what typing style
is in effect is called before deleteUnrenderedText is called. Two asserts are also added
to ensure that start and end nodes of the selection are in the document.
* khtml/editing/htmlediting.cpp: (khtml::DeleteSelectionCommand::doApply):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7840
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Thu, 14 Oct 2004 21:35:16 +0000 (21:35 +0000)]
Reviewed by Ken
This change makes these three functions virtual so that the work is being done in KWQHTMLPart
instead of khtml_part, eliminating the need for the "#if APPLE_CHANGES" statements in the khtml code.
* khtml/khtml_part.cpp:
(KHTMLPart::shouldBeginEditing):
(KHTMLPart::shouldEndEditing):
(KHTMLPart::isContentEditable):
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7839
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 14 Oct 2004 20:38:16 +0000 (20:38 +0000)]
WebCore:
Reviewed by John
Final fix for these bugs:
<rdar://problem/
3806306> HTML editing puts spaces at start of line
<rdar://problem/
3814252> HTML editing groups space with word causing wrapping
This change sets some new CSS properties that have been added to WebCore to
enable whitespace-handling and line-breaking features that make WebView work
more like a text editor.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyProperty): Add and remove special editing CSS properties
based on property value.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::setContentEditable): Add and remove special editing CSS properties
based on attribute value.
* khtml/khtml_part.cpp:
(KHTMLPart::applyEditingStyleToBodyElement): New helper. Calls applyEditingStyleToElement on
body element.
(KHTMLPart::removeEditingStyleFromBodyElement): New helper. Calls removeEditingStyleFromElement on
body element.
(KHTMLPart::applyEditingStyleToElement): Adds special editing CSS properties to passed in element.
(KHTMLPart::removeEditingStyleFromElement): Removes special editing CSS properties from passed in element.
* khtml/khtml_part.h: Add new declarations.
* kwq/WebCoreBridge.h: Ditto.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge applyEditingStyleToBodyElement]): Call through to similarly-named function on KHTMLPart.
(-[WebCoreBridge removeEditingStyleFromBodyElement]): Ditto.
(-[WebCoreBridge applyEditingStyleToElement:]): Ditto.
(-[WebCoreBridge removeEditingStyleFromElement:]): Ditto.
WebKit:
Reviewed by John
Final fix for these bugs:
<rdar://problem/
3806306> HTML editing puts spaces at start of line
<rdar://problem/
3814252> HTML editing groups space with word causing wrapping
This change sets some new CSS properties that have been added to WebCore to
enable whitespace-handling and line-breaking features that make WebView work
more like a text editor.
* WebView.subproj/WebHTMLRepresentation.m:
(-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Turn on special editing
CSS properties when loading an HTML document into a WebView that is editable.
* WebView.subproj/WebView.m:
(-[WebView setEditable:]): Add and remove special editing CSS properties in current
document being displayed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7838
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Thu, 14 Oct 2004 19:51:14 +0000 (19:51 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3840052> Crash in removeBlockPlaceholderIfNeeded attaching file to empty document
* khtml/editing/htmlediting.cpp:
(khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded):
needed a nil check to handle empty document case
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7837
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 14 Oct 2004 17:14:28 +0000 (17:14 +0000)]
Fixed <rdar://problem/
3823026> making isRoundingHackCharacter use -O3 and an 8-bit lookup-table will speed "XBS" test up by 3% (actually < 1%)
Careful testing shows a small performance gain on very large text files.
I saw large variations in timings, but taking the lowest PLT timing
with and without this change showed a 0.9% gain. Note the cvs-base showed
no improvement. The improvement was for the large page attached to the
bug.
Reviewed by Ken.
* WebCoreSupport.subproj/WebTextRenderer.m:
(setupRoundingHackCharacterTable):
(isRoundingHackCharacter):
(+[WebTextRenderer initialize]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7836
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 14 Oct 2004 14:31:07 +0000 (14:31 +0000)]
Reviewed by me
Fix build breakage. These three functions need to return the values from their
calls to WebCGColorSpaceCreateXXX.
* WebCoreSupport.subproj/WebGraphicsBridge.m:
(-[WebGraphicsBridge createRGBColorSpace])
(-[WebGraphicsBridge createGrayColorSpace])
(-[WebGraphicsBridge createCMYKColorSpace])
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7835
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 14 Oct 2004 01:32:23 +0000 (01:32 +0000)]
Addressed concerns in <rdar://problem/
3803117> RESP: High complexity in icu uidna_IDNToASCII called by [NSString(WebNSURLExtras) _web_mapHostNameWithRange:encode:makeString:]
In practice I saw NO improvement in performance. Although,
special-case tests could possibly show improvement. Anyway,
the changes don't hurt performance.
Reviewed by Maciej.
* Misc.subproj/WebNSURLExtras.m:
(-[NSString _web_mapHostNameWithRange:encode:makeString:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7834
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Thu, 14 Oct 2004 01:26:54 +0000 (01:26 +0000)]
WebCore:
Reviewed by Ken.
<rdar://problem/
3824626> Change to do colormatching for DeviceRGB colorspace causes ~11% Safari slowdown
- I fixed this by turning off all colormatching for WebKit
content. We might turn it back on later. For now, it's possible to
turn it on temporarily by defining COLORMATCH_EVERYTHING.
* WebCorePrefix.h:
* khtml/ecma/kjs_html.cpp:
(KJS::Context2DFunction::tryCall):
(Context2D::colorRefFromValue):
(Gradient::getShading):
* khtml/rendering/render_canvasimage.cpp:
(RenderCanvasImage::createDrawingContext):
* kwq/KWQColor.mm:
(QColor::getNSColor):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(CGColorFromNSColor):
(QPainter::selectedTextBackgroundColor):
(QPainter::rgbColorSpace):
(QPainter::grayColorSpace):
(QPainter::cmykColorSpace):
* kwq/WebCoreGraphicsBridge.h:
* kwq/WebCoreGraphicsBridge.m:
(-[WebCoreGraphicsBridge createRGBColorSpace]):
(-[WebCoreGraphicsBridge createGrayColorSpace]):
(-[WebCoreGraphicsBridge createCMYKColorSpace]):
WebKit:
Reviewed by Ken.
<rdar://problem/
3824626> Change to do colormatching for DeviceRGB colorspace causes ~11% Safari slowdown
- I fixed this by turning off all colormatching for WebKit
content. We might turn it back on later. For now, it's possible to
turn it on temporarily by defining COLORMATCH_EVERYTHING.
* WebCoreSupport.subproj/WebGraphicsBridge.m:
(-[WebGraphicsBridge setFocusRingStyle:radius:color:]):
(-[WebGraphicsBridge additionalPatternPhase]):
(-[WebGraphicsBridge createRGBColorSpace]):
(-[WebGraphicsBridge createGrayColorSpace]):
(-[WebGraphicsBridge createCMYKColorSpace]):
* WebCoreSupport.subproj/WebImageData.m:
* WebCoreSupport.subproj/WebImageRenderer.h:
* WebCoreSupport.subproj/WebImageRenderer.m:
(-[WebImageRenderer _adjustSizeToPixelDimensions]):
(-[WebImageRenderer incrementalLoadWithBytes:length:complete:]):
(-[WebImageRenderer _adjustColorSpace]):
(-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
(-[WebImageRenderer tileInRect:fromPoint:context:]):
(_createImageRef):
(WebCGColorSpaceCreateRGB):
(WebCGColorSpaceCreateGray):
(WebCGColorSpaceCreateCMYK):
* WebKitPrefix.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7833
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 14 Oct 2004 00:10:47 +0000 (00:10 +0000)]
Reviewed by Hyatt
* khtml/css/css_valueimpl.cpp:
(CSSStyleDeclarationImpl::merge): A little cleanup. Also, make sure m_lstValues
is non-null before appending.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7832
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Thu, 14 Oct 2004 00:05:11 +0000 (00:05 +0000)]
Reviewed by me
Update expected results for improved behavior as a result of fix to
3816768.
* layout-tests/editing/deleting/delete-
3775172-fix-expected.txt
* layout-tests/editing/deleting/delete-
3800834-fix-expected.txt
* layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7831
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 13 Oct 2004 23:35:19 +0000 (23:35 +0000)]
Reviewed by Richard
* khtml/css/css_computedstyle.cpp:
(DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support to computed style
for getting -khtml-line-break and -khml-nbsp-mode.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7830
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 13 Oct 2004 23:21:42 +0000 (23:21 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3816768> REGRESSION (Mail): Deleting last character in block incorrectly
moves caret out of block.
The issue here is that an empty block with no explicit height set by style collapses
to zero height, and does so immediately after the last bit of content is removed from
it (as a result of deleting text with the delete key for instance). Since zero-height
blocks are not eligible caret positions, the caret jumped to the closest eligible spot.
The fix is to detect when a block has not been removed itself, but has had all its
contents removed. In this case, a BR element is placed in the block, one that is
specially marked as a placeholder. Later, if the block ever receives content, this
placeholder is removed.
* khtml/editing/htmlediting.cpp:
(khtml::blockPlaceholerClassString): String which acts as a placeholder marker class.
(khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Adds a placeholder BR if needed.
(khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Removes a placeholder BR if needed.
(khtml::DeleteSelectionCommand::moveNodesAfterNode): Call removeBlockPlaceholderIfNeeded.
Also, do some cleanup on some old, crufty code in the move logic that is just so clearly wrong
(it's very clear that we needs to be able to move more than just text nodes). This may expose
bugs, but these bugs needs to be filed and fixed, not ducked. Besides, undoing this silliness
made the test case in the bug work.
(khtml::DeleteSelectionCommand::doApply): Call insertBlockPlaceholderIfNeeded and
removeBlockPlaceholderIfNeeded.
(khtml::InputTextCommand::input): Call removeBlockPlaceholderIfNeeded.
(khtml::ReplaceSelectionCommand::doApply): Call removeBlockPlaceholderIfNeeded.
* khtml/editing/htmlediting.h: Declare new functions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7829
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 13 Oct 2004 22:00:44 +0000 (22:00 +0000)]
Don't fill background with transparency unless debug flag
is enabled.
Reviewed by Hyatt.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView drawRect:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7828
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 13 Oct 2004 21:40:47 +0000 (21:40 +0000)]
Moved boolean checks prior to NSNumber checks. booleans are
NSNumbers.
Follow on to <rdar://problem/
3821515> binding layer needs to convert NSNumber-bools to js type boolean not number.
Reviewed by John.
* bindings/objc/objc_utility.mm:
(KJS::Bindings::convertObjcValueToValue):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7827
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 13 Oct 2004 21:31:02 +0000 (21:31 +0000)]
Added support for -apple-dashboard-region:none. And fixed
a few computed style problems.
Fixed <rdar://problem/
3833532> -apple-dashboard-region: none; is needed
Reviewed by Hyatt.
* khtml/css/css_computedstyle.cpp:
(DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
* khtml/css/css_valueimpl.cpp:
(CSSPrimitiveValueImpl::cssText):
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
(CSSParser::parseDashboardRegions):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyProperty):
* khtml/rendering/render_style.cpp:
(RenderStyle::noneDashboardRegions):
* khtml/rendering/render_style.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::dashboardRegionsDictionary):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7826
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 13 Oct 2004 08:14:46 +0000 (08:14 +0000)]
Make the review fixes from kocienda's review.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7825
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 13 Oct 2004 08:04:38 +0000 (08:04 +0000)]
Rework block layout to clean it up and simplify it (r=kocienda).
Also fixing the style sharing bug (r=mjs).
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::MarginInfo::MarginInfo):
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::adjustPositionedBlock):
(khtml::RenderBlock::adjustFloatingBlock):
(khtml::RenderBlock::handleSpecialChild):
(khtml::RenderBlock::handleFloatingOrPositionedChild):
(khtml::RenderBlock::handleCompactChild):
(khtml::RenderBlock::insertCompactIfNeeded):
(khtml::RenderBlock::handleRunInChild):
(khtml::RenderBlock::collapseMargins):
(khtml::RenderBlock::clearFloatsIfNeeded):
(khtml::RenderBlock::estimateVerticalPosition):
(khtml::RenderBlock::determineHorizontalPosition):
(khtml::RenderBlock::setCollapsedBottomMargin):
(khtml::RenderBlock::adjustChildIfOverhangingFloatsExist):
(khtml::RenderBlock::handleBottomOfBlock):
(khtml::RenderBlock::layoutBlockChildren):
(khtml::RenderBlock::getAbsoluteRepaintRectIncludingFloats):
(khtml::RenderBlock::addOverHangingFloats):
* khtml/rendering/render_block.h:
(khtml::RenderBlock::maxTopMargin):
(khtml::RenderBlock::maxBottomMargin):
(khtml::RenderBlock::CompactInfo::compact):
(khtml::RenderBlock::CompactInfo::block):
(khtml::RenderBlock::CompactInfo::matches):
(khtml::RenderBlock::CompactInfo::clear):
(khtml::RenderBlock::CompactInfo::set):
(khtml::RenderBlock::CompactInfo::CompactInfo):
(khtml::RenderBlock::MarginInfo::setAtTopOfBlock):
(khtml::RenderBlock::MarginInfo::setAtBottomOfBlock):
(khtml::RenderBlock::MarginInfo::clearMargin):
(khtml::RenderBlock::MarginInfo::setSelfCollapsingBlockClearedFloat):
(khtml::RenderBlock::MarginInfo::setTopQuirk):
(khtml::RenderBlock::MarginInfo::setBottomQuirk):
(khtml::RenderBlock::MarginInfo::setDeterminedTopQuirk):
(khtml::RenderBlock::MarginInfo::setPosMargin):
(khtml::RenderBlock::MarginInfo::setNegMargin):
(khtml::RenderBlock::MarginInfo::setPosMarginIfLarger):
(khtml::RenderBlock::MarginInfo::setNegMarginIfLarger):
(khtml::RenderBlock::MarginInfo::setMargin):
(khtml::RenderBlock::MarginInfo::atTopOfBlock):
(khtml::RenderBlock::MarginInfo::canCollapseWithTop):
(khtml::RenderBlock::MarginInfo::canCollapseWithBottom):
(khtml::RenderBlock::MarginInfo::canCollapseTopWithChildren):
(khtml::RenderBlock::MarginInfo::canCollapseBottomWithChildren):
(khtml::RenderBlock::MarginInfo::selfCollapsingBlockClearedFloat):
(khtml::RenderBlock::MarginInfo::quirkContainer):
(khtml::RenderBlock::MarginInfo::determinedTopQuirk):
(khtml::RenderBlock::MarginInfo::topQuirk):
(khtml::RenderBlock::MarginInfo::bottomQuirk):
(khtml::RenderBlock::MarginInfo::posMargin):
(khtml::RenderBlock::MarginInfo::negMargin):
(khtml::RenderBlock::MarginInfo::margin):
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
* khtml/rendering/render_box.h:
(khtml::RenderBox::marginTop):
(khtml::RenderBox::marginBottom):
(khtml::RenderBox::marginLeft):
(khtml::RenderBox::marginRight):
* khtml/rendering/render_image.cpp:
(RenderImage::setImage):
* khtml/rendering/render_object.cpp:
(RenderObject::sizesToMaxWidth):
* khtml/rendering/render_object.h:
(khtml::RenderObject::collapsedMarginTop):
(khtml::RenderObject::collapsedMarginBottom):
(khtml::RenderObject::maxTopMargin):
(khtml::RenderObject::maxBottomMargin):
(khtml::RenderObject::marginTop):
(khtml::RenderObject::marginBottom):
(khtml::RenderObject::marginLeft):
(khtml::RenderObject::marginRight):
* khtml/rendering/render_text.h:
(khtml::RenderText::marginLeft):
(khtml::RenderText::marginRight):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7824
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 13 Oct 2004 00:09:43 +0000 (00:09 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3836158> REGRESSION (Mail): command-right-arrow moves to beginning of next line
* khtml/editing/selection.cpp:
(khtml::endOfLastRunAt): Do not let the end of the last run on a line be a BR.
This will make it seem like the run ends on the next line.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7823
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 12 Oct 2004 23:25:44 +0000 (23:25 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3836986> Delete code removes elements of table structure; can result in very broken-looking web pages
* khtml/editing/htmlediting.cpp:
(khtml::isTableStructureNode): New helper. Determines whether a node is a table cell,
row, section, or column.
(khtml::CompositeEditCommand::removeFullySelectedNode): New helper that recurses into elements
of table structure when doing deletes, rather than deleting the structure elements themselves.
(khtml::DeleteSelectionCommand::moveNodesAfterNode): Do not move content between elements
of table structure. We may want to revisit this some day, but this seems like the best behavior
to me now.
(khtml::DeleteSelectionCommand::doApply): Call removeFullySelectedNode instead of removeNode
where needed.
* khtml/editing/htmlediting.h: Add declarations for new functions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7822
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 12 Oct 2004 23:24:28 +0000 (23:24 +0000)]
WebKit:
Fixed <rdar://problem/
3829705> Need to remove filling w/ transparency when not drawing backgroundy.
Reviewed by Ken.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _transparentBackground]):
(-[WebHTMLView _setTransparentBackground:]):
(-[WebHTMLView drawRect:]):
* WebView.subproj/WebHTMLViewInternal.h:
* WebView.subproj/WebHTMLViewPrivate.h:
WebBrowser:
As part of fix <rdar://problem/
3829705> Need to remove filling w/ transparency when not drawing backgroundy, we can no longer rely on WebHTMLView filling with transparency, so added additional flag to indicate that we should.
* Debug/DebugUtilities.m:
(-[BrowserDocument toggleTransparentWindow:]):
* LocationChangeHandler.m:
Removed #define to prevent console spew.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7821
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 12 Oct 2004 22:43:55 +0000 (22:43 +0000)]
JavaScriptCore
Fixed access to DOM object via WebScriptObject API.
The execution context for DOM objects wasn't being found.
<rdar://problem/
3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.
Reviewed by Chris.
* bindings/objc/WebScriptObject.mm:
(_didExecute):
(-[WebScriptObject KJS::Bindings::]):
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
(-[WebScriptObject setValue:forKey:]):
(-[WebScriptObject valueForKey:]):
(-[WebScriptObject stringRepresentation]):
* bindings/objc/WebScriptObjectPrivate.h:
WebCore:
Fixed access to DOM object via WebScriptObject API.
The execution context for DOM objects wasn't being found.
<rdar://problem/
3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.
Reviewed by Chris
Fixed <rdar://problem/
3831063> regions use left offset instead of top offset
Reviewed by John
* khtml/khtml_part.h:
* khtml/rendering/render_object.cpp:
(RenderObject::addDashboardRegions):
* kwq/DOM.mm:
(-[DOMNode isContentEditable]):
(-[DOMNode KJS::Bindings::]):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::executionContextForDOM):
WebBrowser:
Added debugging code (disable) to assist in debugging DOM/WebScriptObjects.
Reviewed by Chris.
* LocationChangeHandler.m:
(-[Logger logMessage:]):
(-[LocationChangeHandler webView:locationChangeDone:forDataSource:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7820
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 12 Oct 2004 22:25:54 +0000 (22:25 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3834779> Mail crashes when editing HTML message - khtml::Selection::layout()
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::styleForSelectionStart): Table code seems to be more robust when the call to
insert our style-checking node is done with an appendChild rather than an insertBefore. Note
that this table-related problem was exposed by fixing Selection::layout(), which I did
yesterday. This change simply improves things even more so that we do not crash in the
scenario described in the bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7819
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 11 Oct 2004 17:49:24 +0000 (17:49 +0000)]
Reviewed by John
This is a partial fix to this bug:
<rdar://problem/
3832886> increase quote level on new mail document leads to immediate
crash in caret painting code
To eliminate the bad behavior for good, I have done some investigations in Mail code,
and I have sent a suggested code change on to Grant. Basically, Mail can't add empty
blocks (like blockquote elements used for quoting) to documents without giving those
blocks some content (so they have a height).
I added some other crash protections below.
* khtml/editing/selection.cpp:
(khtml::Selection::layout): Check for non-null position after calls to VisiblePosition, since
the VisiblePosition constructors may fail to find a visible spot in the document. Also, add
a couple position-has-renderer assertion checks.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::styleForSelectionStart): Take out pos.isNotNull() assertion since VisiblePosition
may not yield a position. This assertion is a holdover from before we had VisiblePosition.
(KWQKHTMLPart::fontForSelection): Rearrange the code a little to deal with possible null results from
calls to helpers.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7818
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 17:34:22 +0000 (17:34 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3834230> empty table can result in division by 0
* khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows):
Added 0 check; rolled in from KDE.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7817
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 11 Oct 2004 17:20:44 +0000 (17:20 +0000)]
Fixed: <rdar://problem/
3802039> 8A259: Can't use Grab services to grab selection from screen
Reviewed by john.
* WebView.subproj/WebHTMLView.m:
(+[WebHTMLView initialize]): register service "return types" which are types that can be inserted into a WebView
(-[WebHTMLView writeSelectionToPasteboard:types:]): service protocol method, be sure to only write specified types
(-[WebHTMLView readSelectionFromPasteboard:]): new, service protocol method, insert types
(-[WebHTMLView validRequestorForSendType:returnType:]): moved, handle return types
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7816
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 17:13:55 +0000 (17:13 +0000)]
Added layout test for <input> value bug I just fixed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7815
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 17:10:01 +0000 (17:10 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3818712> form checkbox value property is read only
The underlying problem was that we were storing two separate values for all
form elements; one for the value property (JavaScript) and the other for the
value attribute (DOM). This is a good idea for text input, but not for other types.
* khtml/html/html_formimpl.h: Changed setValue to take a const DOMString reference.
Added private storesValueSeparateFromAttribute function.
* khtml/html/html_formimpl.cpp:
(DOM::HTMLInputElementImpl::setType): Handle type changes, including detaching and re-attaching
if type changed, and moving value from m_value to ATTR_VALUE and vice versa.
(DOM::HTMLInputElementImpl::type): Added a case for ISINDEX and moved the default out of the
switch so that we will get a warning if a type is left out.
(DOM::HTMLInputElementImpl::parseHTMLAttribute): Tweaked comment format.
(DOM::HTMLInputElementImpl::reset): Changed to only nuke the value if the value property is stored
separately from the attribute. Otherwise, we just want to lave it alone
(DOM::HTMLInputElementImpl::value): Changed to always use m_value if it's not null, then fall back
on the attribute, and finally fall back to the "on" for the checkbox only if both are null.
(DOM::HTMLInputElementImpl::setValue): Changed to set the attribute unless the value property is
supposed to be stored separate from the attribute.
(DOM::HTMLInputElementImpl::storesValueSeparateFromAttribute): Added. Returns true for text-type
input elements, and false for the others.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7814
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 16:38:12 +0000 (16:38 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3834130> nil-object-in-dictionary exception seen in -[WebView _elementAtWindowPoint:]
* WebView.subproj/WebView.m: (-[WebView _elementAtWindowPoint:]): Added a check for nil frame.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7813
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 16:34:22 +0000 (16:34 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3296652> checkbox input type does not respond to onchange
* khtml/rendering/render_form.cpp:
(RenderFormElement::updateFromElement): Some new code, commented out, for form element colors.
(RenderCheckBox::slotStateChanged): Added call to onChange.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7812
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 16:28:24 +0000 (16:28 +0000)]
Reviewed by John.
- fixed <rdar://problem/
3834166> <input type=file> sends onchange even when the same file is chosen twice
* WebCoreSupport.subproj/WebFileButton.m: (-[WebFileButton chooseFilename:]):
Do nothing if filename is the same as before.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7811
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 11 Oct 2004 16:04:11 +0000 (16:04 +0000)]
WebCore:
Reviewed by Darin
Finish selection affinity implementation. This includes code to set the
affinity correctly when clicking with the mouse, and clearing the
affinity when altering the selection using any of the Selection object
mutation functions.
Each instance of the positionForCoordinates, inlineBox and caretRect
functions have been changed to include an EAffinity argument to give results
which take this bit into account.
* khtml/editing/selection.cpp:
(khtml::Selection::init): Default affinity is now UPSTREAM, to match AppKit.
(khtml::Selection::modifyAffinity): New function to compute affinity based on
modification constants.
(khtml::Selection::moveTo): Reset affinity to UPSTREAM.
(khtml::Selection::modifyExtendingRightForward): Ditto.
(khtml::Selection::modifyMovingRightForward): Ditto.
(khtml::Selection::modifyExtendingLeftBackward): Ditto.
(khtml::Selection::modifyMovingLeftBackward): Ditto.
(khtml::Selection::modify): Support saving, restoring, and then calculating new
affinity value as needed.
(khtml::Selection::xPosForVerticalArrowNavigation):
(khtml::Selection::clear): Reset affinity to UPSTREAM.
(khtml::Selection::setBase): Ditto.
(khtml::Selection::setExtent): Ditto.
(khtml::Selection::setBaseAndExtent): Ditto.
(khtml::Selection::layout): Pass affinity to caretRect().
(khtml::Selection::validate): Pass along affinity parameter to new functions that
require it.
(khtml::startOfFirstRunAt): Changed the way that the y-coordinate search is done, to
keep this code working with changes made in selectionForLine().
(khtml::endOfLastRunAt): Ditto.
(khtml::selectionForLine): Make this function work for all renderers, not just text
renderers.
* khtml/editing/selection.h:
(khtml::operator==): Consider affinity in equality check.
* khtml/editing/visible_units.cpp:
(khtml::previousLinePosition): Pass affinity argument to function so it can take this
information into account while processing.
(khtml::nextLinePosition): Ditto.
(khtml::previousParagraphPosition): Ditto.
(khtml::nextParagraphPosition): Ditto.
* khtml/editing/visible_units.h: Ditto, for each of the functions listed.
* khtml/khtml_events.cpp:
(khtml::MouseEvent::offset): Rework code to remove dependence on NodeImpl::positionForCoordinates,
as this function is being removed.
* khtml/khtml_part.cpp:
(KHTMLPart::isPointInsideSelection): Ditto.
(KHTMLPart::selectClosestWordFromMouseEvent): Ditto.
(KHTMLPart::handleMousePressEventTripleClick): Ditto.
(KHTMLPart::handleMousePressEventSingleClick): Ditto. Plus, pass affinity argument in
call to positionForCoordinates, and set resulting affinity on the selection.
(KHTMLPart::handleMouseMoveEventSelection): Rework code to remove dependence on
NodeImpl::positionForCoordinates, as this function is being removed.
(KHTMLPart::khtmlMouseReleaseEvent): Ditto.
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::positionForCoordinates): Now takes an affinity argument.
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::caretRect): Ditto.
* khtml/rendering/render_box.h:
* khtml/rendering/render_br.cpp:
(RenderBR::positionForCoordinates): Ditto.
(RenderBR::caretRect): Ditto.
(RenderBR::inlineBox): Ditto.
* khtml/rendering/render_br.h:
* khtml/rendering/render_container.cpp:
(RenderContainer::positionForCoordinates): Ditto.
* khtml/rendering/render_container.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::caretRect): Ditto.
* khtml/rendering/render_flow.h:
* khtml/rendering/render_inline.cpp:
(RenderInline::positionForCoordinates): Ditto.
* khtml/rendering/render_inline.h:
* khtml/rendering/render_object.cpp:
(RenderObject::caretRect): Ditto.
(RenderObject::positionForCoordinates): Ditto.
(RenderObject::inlineBox): Ditto.
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::positionForCoordinates): Ditto.
* khtml/rendering/render_replaced.h:
* khtml/rendering/render_text.cpp:
(RenderText::positionForCoordinates): Ditto.
(firstRendererOnNextLine): New helper used by caretRect().
(RenderText::caretRect): Now takes an affinity argument.
(RenderText::inlineBox): Ditto.
* khtml/rendering/render_text.h:
* khtml/xml/dom_nodeimpl.cpp: Remove positionForCoordinates helper.
* khtml/xml/dom_nodeimpl.h: Ditto.
* khtml/xml/dom_position.cpp:
(DOM::Position::previousLinePosition): Now takes an affinity argument.
(DOM::Position::nextLinePosition): Ditto.
* khtml/xml/dom_position.h:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge caretRectAtNode:offset:affinity:]): Ditto.
(-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto.
(-[WebCoreBridge _positionForPoint:]): Rework code to remove dependence on
NodeImpl::positionForCoordinates, as this function is being removed.
WebKit:
Reviewed by Darin
* WebView.subproj/WebHTMLView.m:
(-[WebTextCompleteController doCompletion]): bridge call to get caret rect at a node
now takes an affinity: caretRectAtNode:offset:affinity:.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7810
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 15:17:01 +0000 (15:17 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3670280> scroll position on overflowed textareas resets when leaving the tab
* kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]):
Scroll to reveal the text area, don't scroll to reveal the text view itself.
Scrolling the text view ended up putting it at the top left, regardless of
where the insertion point is.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7809
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 15:08:15 +0000 (15:08 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3831546> More text is copied than is visually selected
The bug here is that upstream was moving a position too far.
* khtml/xml/dom_position.cpp:
(DOM::Position::upstream): Use the "deep equivalent" node rather than the original node passed
in for various checks. Also use local variables a bit more for slightly more efficiency.
(DOM::Position::downstream): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7808
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 11 Oct 2004 14:58:33 +0000 (14:58 +0000)]
Removed stray conflict marker
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7807
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 11 Oct 2004 14:57:59 +0000 (14:57 +0000)]
Reviewed by Chris
Fix for this bug:
<rdar://problem/
3814236> REGRESSION (Mail): Can't set the color of text in Mail compose window using drag/drag from color panel
* WebView.subproj/WebHTMLView.m:
(+[WebHTMLView _insertablePasteboardTypes]): Add NSColorPboardType to list.
(-[WebHTMLView _isNSColorDrag:]): New helper. Determines if drag is an NSColor drag.
(-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Add a case for NSColor drags,
else do what we did before.
(-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Add a case for NSColor drags, which creates
a CSS style containing color info and calls the bridge to apply the style. Otherwise, do what we did before.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7806
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 14:55:28 +0000 (14:55 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3833841> adding an event listener for keypress events does not work
* khtml/xml/dom2_eventsimpl.h: Added numEventIds and made typeToId take a const DOMString &.
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Changed to use table. Added "keypress", otherwise, the same as before.
(EventImpl::idToType): Changed to use table.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7805
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 11 Oct 2004 14:51:46 +0000 (14:51 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3833848> REGRESSION (133-134): each keydown event is getting sent multiple times
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView performKeyEquivalent:]):
Don't send an event through WebCore if it has already been through once.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7804
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Sun, 10 Oct 2004 15:14:31 +0000 (15:14 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3777253> Crash in redirect mechanism trying to display error page for bad scheme
* WebView.subproj/WebMainResourceClient.m:
(-[WebMainResourceClient connection:willSendRequest:redirectResponse:]):
add retain/autorelease to the request returned from call to super. In this case, the return value
was being dealloc'ed before being returned.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7803
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Sun, 10 Oct 2004 15:13:52 +0000 (15:13 +0000)]
- fixed <rdar://problem/
3664375> repro crash in -[KWQAccObject accessibilityAttributeNames]
(-[KWQAccObject accessibilityActionNames]):
check for nil m_renderer
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7802
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 23:32:48 +0000 (23:32 +0000)]
Reviewed by Kevin.
- fixed <rdar://problem/
3828147> REGRESSION: textareas with wrap="off" show their contents in a thin vertical line of text
* kwq/KWQTextArea.h: Added setTextColor and setBackgroundColor methods. This is really for another fix
I'm landing later, but it does no harm to add these now.
* kwq/KWQTextArea.mm:
(-[KWQTextArea _configureTextViewForWordWrapMode]): Set the container size after changing the flag that
determines if the width tracks the text view. Otherwise, we won't successfully set the width in the case
where we don't want it to track the text view. This caused the bug.
(-[KWQTextArea _createTextView]): Remove unneeded call to setMaxSize. The above method already does that.
(-[KWQTextArea setTextColor:]): Added.
(-[KWQTextArea setBackgroundColor:]): Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7801
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 22:44:32 +0000 (22:44 +0000)]
Reviewed by Adele.
- fixed <rdar://problem/
3829452> REGRESSION (156-157): onload handler doesn't run on page with meta refresh of 0 duration (new Apple start page)
The fix for <rdar://problem/
3773150> made it so <meta> redirects prevent tokenizing the rest of the page.
This is incorrect; the reason the JavaScript-triggered loads prevent tokenizing is that they take place
"right away" in other browsers, but that is not true of <meta> redirect. We fixed this by using a separate
call for <meta> redirect and not preventing tokenizing when that's in effect.
* khtml/khtml_part.h: Removed userGesture parameter from scheduleRedirection. Renamed
isImmediateRedirectPending to isScheduledLocationChangePending. Added scheduleLocationChange.
* khtml/khtml_part.cpp:
(KHTMLPart::openURL): Updated for new constant name.
(KHTMLPart::scheduleRedirection): Removed now-unneeded userGesture parameter, and removed code that
does the special case for redirection during load; a <meta> refresh can never be one of those special
redirects during a load because it redirects the frame itself, not another frame. Also tightened up
the logic by always stopping the redirect timer even if we aren't restarting it.
(KHTMLPart::scheduleLocationChange): Added. Like scheduleRedirection, but with a different constant
so we can tell it apart and always a delay of 0. The "redirection during load" case was moved in here
and renamed to locationChangeScheduledDuringLoad.
(KHTMLPart::isScheduledLocationChangePending): Renamed from isImmediateRedirectPending. This now
returns true only for location changes and history navigation, not <meta> redirects.
(KHTMLPart::scheduleHistoryNavigation): Tightened up logic to do the stop() outside the if as above,
and got rid of a silly timer delay computation that always resulted in 0.
* khtml/khtmlpart_p.h: Added a new value to the RedirectionScheduled enum for scheduleLocationChange
and also renamed one of the existing values.
* khtml/html/htmltokenizer.cpp: (HTMLTokenizer::write): Changed to use isScheduledLocationChangePending instead
of isImmediateRedirectPending, because we do want to continue tokenizing if it's actually a redirect.
* khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::putValue): Changed to call the new scheduleLocationChange
instead of calling scheduleRedirection with delay of 0.
* khtml/ecma/kjs_window.cpp:
(Window::put): Ditto.
(WindowFunc::tryCall): Ditto.
(Location::put): Ditto.
(LocationFunc::tryCall): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7800
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 22:36:41 +0000 (22:36 +0000)]
Reviewed by Kevin.
- fixed <rdar://problem/
3658277> REGRESSION (1.1-1.2): form submission should either not simulate a click at all or use (0,0) the way Mozilla does
* khtml/html/html_elementimpl.cpp: (HTMLElementImpl::click): Use 0,0 for the coordinates.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7799
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 22:17:44 +0000 (22:17 +0000)]
Reviewed by Kevin.
- fixed <rdar://problem/
3804661> REGRESSION: JavaScriptCore framework now has two init routines
* bindings/NP_jsobject.cpp: Fixed unnecessarily-complex globals set up that was
creating an init routine.
* kjs/ustring.cpp: Changed around the UString::Rep::empty construction to not
require a global constructor that creates an init routine.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7798
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 21:46:47 +0000 (21:46 +0000)]
Reviewed by Kevin.
- fixed <rdar://problem/
3804665> REGRESSION: WebCore framework now has many init routines
* khtml/xml/dom_nodeimpl.h: Changed anyQName declaration to not use the inline function
makeId. Surprisingly, the inline function was not "constant-folded" and we ended up with
a copy of the function in each file as an init routine for the framework.
* khtml/ecma/kjs_html.cpp: (Gradient::colorStops): Get rid of initialized ColorStop
globals; their constructors were showing up as init routines for the framework.
* khtml/rendering/render_style.h: Got rid of inline initialDashboardRegions function.
* khtml/rendering/render_style.cpp: (RenderStyle::initialDashboardRegions): Made this
a normal function. When it was an inline function, the constructors for the per-file
copies of the globals were showing up as init routines for the framework.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7797
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 21:39:51 +0000 (21:39 +0000)]
Added layout test for just-fixed JavaScriptCore bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7796
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Sat, 9 Oct 2004 21:30:41 +0000 (21:30 +0000)]
Forgot to include that I also fixed <rdar://problem/
3397658> scroll wheel does not work to scroll overflow:auto/scroll/overlay areas (RSS)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7795
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Sat, 9 Oct 2004 21:25:28 +0000 (21:25 +0000)]
WebCore:
Fixed:
<rdar://problem/
3625352> up and down arrow and page up/down keys don't work to scroll overflow:auto/scroll/overlay areas
<rdar://problem/
3822027> REGRESSION (Mail): When selection moves out of visible area, should center as NSText does
Reviewed by hyatt, kocienda.
* khtml/rendering/render_layer.cpp:
(RenderLayer::scroll): new
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::scroll): new
* khtml/rendering/render_object.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::scrollOverflow): new
(KWQKHTMLPart::scrollOverflowWithScrollWheelEvent): new
(KWQKHTMLPart::khtmlMousePressEvent): store pressed node so we know where the focus is
* kwq/KWQScrollBar.h:
* kwq/KWQScrollBar.mm:
(QScrollBar::setValue): return a bool
(QScrollBar::scrollbarHit): ditto
(QScrollBar::scroll): new
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge scrollOverflowInDirection:granularity:]): new
(-[WebCoreBridge scrollOverflowWithScrollWheelEvent:]): new
(-[WebCoreBridge ensureSelectionVisible]): visually center the extent of the selection
WebKit:
Fixed: <rdar://problem/
3625352> up and down arrow and page up/down keys don't work to scroll overflow:auto/scroll/overlay areas
Reviewed by hyatt.
* Plugins.subproj/WebBaseNetscapePluginStream.m:
(-[WebBaseNetscapePluginStream initWithRequestURL:pluginPointer:notifyData:sendNotification:]): fixed typo in comment
* Plugins.subproj/WebNetscapePluginStream.m:
(-[WebNetscapePluginStream initWithRequest:pluginPointer:notifyData:sendNotification:]): ditto
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebFrameView.m:
(-[WebFrameView _bridge]): new
(-[WebFrameView scrollToBeginningOfDocument:]): call the bridge to scroll, if that fails, scroll the document view
(-[WebFrameView scrollToEndOfDocument:]): ditto
(-[WebFrameView _pageVertically:]): ditto
(-[WebFrameView _pageHorizontally:]): ditto
(-[WebFrameView _scrollLineVertically:]): ditto
(-[WebFrameView _scrollLineHorizontally:]): ditto
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView scrollWheel:]): call the bridge to scroll, if that fails, pass to next responder
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7794
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 9 Oct 2004 21:22:43 +0000 (21:22 +0000)]
Reviewed by Kevin.
- fixed <rdar://problem/
3822618> REGRESSION (164-165): expedia.com's popup help doesn't work
* kjs/reference.cpp: (Reference::putValue): Change so that references not found in any object
work with the window object of the page the function is in, not the page of the caller. This
is what all other browsers do. This code was hidden before by the "everything is defined on
window object" hack in WebCore.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7793
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 7 Oct 2004 22:05:06 +0000 (22:05 +0000)]
Fixed build error.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7787
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 7 Oct 2004 21:30:47 +0000 (21:30 +0000)]
Added simple JavaScript call tracing. Very useful for
debugging complex pages.
Tracing is only available in development builds and is
enabled by:
(gdb) set traceJavaScript = 1
or programatically
setTraceJavaScript(true)
Function, args, and return values are printed to console. Very
verbose.
Reviewed by Ken.
* kjs/function_object.cpp:
(FunctionProtoFuncImp::call):
* kjs/object.cpp:
(KJS::Object::call):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7786
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 7 Oct 2004 02:03:19 +0000 (02:03 +0000)]
Back out style sharing perf fix.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::locateCousinList):
(khtml::CSSStyleSelector::canShareStyleWithElement):
(khtml::CSSStyleSelector::locateSharedStyle):
* khtml/css/cssstyleselector.h:
* khtml/html/html_elementimpl.h:
(DOM::HTMLElementImpl::inlineStyleDecl):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_elementimpl.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7785
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 6 Oct 2004 23:27:21 +0000 (23:27 +0000)]
Really bring the new code in line with the old style sharing code.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7784
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 6 Oct 2004 16:50:02 +0000 (16:50 +0000)]
reversion JSC, for the -Wno-long-double changes
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7782
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 6 Oct 2004 16:39:50 +0000 (16:39 +0000)]
Add -Wno-long-double back to our warning flags. Without it, the x86 build fails.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7781
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 6 Oct 2004 05:52:03 +0000 (05:52 +0000)]
versioning for TOT, Safari 2.0 (v167u)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7780
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 6 Oct 2004 05:13:54 +0000 (05:13 +0000)]
Safari-166 stamp for everything except WebBrowser. In these projects, CFBundleShortVersionString matches CFBundleVersion (166 for both).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7779
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 6 Oct 2004 01:43:59 +0000 (01:43 +0000)]
Fix a bug in the iteration of locateCousinList and clean up the style sharing stats code.
Reviewed by NOBODY (OOPS!).
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::locateCousinList):
(khtml::CSSStyleSelector::elementsCanShareStyle):
(khtml::CSSStyleSelector::locateSharedStyle):
(khtml::CSSStyleSelector::styleForElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7778
268f45cc-cd09-0410-ab3c-
d52691b4dbfc