hyatt [Mon, 17 Jan 2005 23:30:10 +0000 (23:30 +0000)]
Add layout test for overflow float bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8389
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 17 Jan 2005 23:27:03 +0000 (23:27 +0000)]
Fix a screwup in rightmost/lowets position computation.
3955207. Make sure floats with layers are still checked.
Reviewed by kocienda
* khtml/rendering/render_block.cpp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8388
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Mon, 17 Jan 2005 23:23:21 +0000 (23:23 +0000)]
Reviewed by John and Richard.
- fixed <rdar://problem/
3907453> printing a multi-page PDF document from Safari doesn't produce correct output
* WebView.subproj/WebFrameViewPrivate.h: Added.
* WebView.subproj/WebFrameView.m:
(-[WebFrameView canPrintHeadersAndFooters]): Added. Returnes NO for documents that can't print headers or footers,
and delegates to the document view to answer the question. Defaults to NO, since only a view that actively does
the work is compatible with our header and footer code.
(-[WebFrameView printOperationWithPrintInfo:]): Added. Returns an NSPrintOperation set up for printing. The reason
we return this rather than an NSView is that in the PDFView case, the print info is changed around before creating
the NSPrintOperation, and also the PDFKit SPI works this way.
* WebView.subproj/WebHTMLView.m: (-[WebHTMLView canPrintHeadersAndFooters]): Added. Returns YES.
* WebView.subproj/WebImageView.m: (-[WebImageView canPrintHeadersAndFooters]): Ditto.
* WebView.subproj/WebTextView.m: (-[WebTextView canPrintHeadersAndFooters]): Ditto.
* WebView.subproj/WebPDFView.m:
(-[WebPDFView canPrintHeadersAndFooters]): Added. Returns NO.
(-[WebPDFView printOperationWithPrintInfo:]): Added. Calls getPrintOperationForPrintInfo: autoRotate:YES on the PDFView.
* WebKit.pbproj/project.pbxproj: Added WebFrameViewPrivate.h as a new private header.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8387
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 17 Jan 2005 23:08:05 +0000 (23:08 +0000)]
Fixed build snafu.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8386
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 17 Jan 2005 22:54:43 +0000 (22:54 +0000)]
Reviewed by John
<rdar://problem/
3953366> Problems with typing attributes in HTML compose
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
that tried to sense when typing style could be cleared without actually doing a style diff between
before-delete and after-delete positions. Removing this extra check and running the
general-purpose code fixes the bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8385
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Mon, 17 Jan 2005 22:41:22 +0000 (22:41 +0000)]
WebCore:
Fixed <rdar://problem/
3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
Keep track of originating execution context and target execution
context for native JS object wrappers, and perform appropriate
security checks.
Reviewed by David Harrison.
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::isGlobalObject):
(ScriptInterpreter::isSafeScript):
(ScriptInterpreter::interpreterForGlobalObject):
* khtml/ecma/kjs_binding.h:
* khtml/ecma/kjs_window.cpp:
(Window::interpreter):
(Window::isSafeScript):
* khtml/ecma/kjs_window.h:
* kwq/DOMInternal.mm:
(-[WebScriptObject _initializeScriptDOMNodeImp]):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::windowScriptObject):
(KWQKHTMLPart::windowScriptNPObject):
* kwq/WebCoreBridge.mm:
(rootForView):
(-[WebCoreBridge init]):
JavaScriptCore:
Fixed <rdar://problem/
3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
Keep track of originating execution context and target execution
context for native JS object wrappers, and perform appropriate
security checks.
Reviewed by David Harrison.
* bindings/NP_jsobject.cpp:
(_isSafeScript):
(_NPN_CreateScriptObject):
(_NPN_Invoke):
(_NPN_Evaluate):
(_NPN_GetProperty):
(_NPN_SetProperty):
(_NPN_RemoveProperty):
(_NPN_HasProperty):
(_NPN_HasMethod):
(_NPN_SetException):
* bindings/NP_jsobject.h:
* bindings/c/c_instance.cpp:
(CInstance::CInstance):
(CInstance::stringValue):
* bindings/c/c_instance.h:
* bindings/c/c_utility.cpp:
(convertValueToNPVariant):
* bindings/jni/jni_instance.cpp:
(JavaInstance::JavaInstance):
(JavaInstance::valueOf):
* bindings/jni/jni_instance.h:
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject _initializeWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
(-[WebScriptObject _initWithObjectImp:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
(-[WebScriptObject KJS::Bindings::]):
(-[WebScriptObject _setOriginExecutionContext:KJS::Bindings::]):
(-[WebScriptObject _isSafeScript]):
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
(-[WebScriptObject setValue:forKey:]):
(-[WebScriptObject valueForKey:]):
(-[WebScriptObject removeWebScriptKey:]):
(-[WebScriptObject stringRepresentation]):
(-[WebScriptObject webScriptValueAtIndex:]):
(-[WebScriptObject setWebScriptValueAtIndex:value:]):
(+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]):
* bindings/objc/WebScriptObjectPrivate.h:
* bindings/objc/objc_instance.h:
* bindings/objc/objc_runtime.mm:
(convertValueToObjcObject):
* bindings/objc/objc_utility.mm:
(KJS::Bindings::convertValueToObjcValue):
* bindings/runtime.cpp:
(Instance::Instance):
(Instance::operator=):
* bindings/runtime.h:
(KJS::Bindings::Instance::Instance):
(KJS::Bindings::Instance::setExecutionContext):
(KJS::Bindings::Instance::executionContext):
* bindings/runtime_root.cpp:
(RootObject::setInterpreter):
* bindings/runtime_root.h:
* kjs/interpreter.h:
(KJS::Interpreter::isGlobalObject):
(KJS::Interpreter::interpreterForGlobalObject):
(KJS::Interpreter::isSafeScript):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8384
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 17 Jan 2005 22:20:50 +0000 (22:20 +0000)]
Roll out unintended work-in-progress change
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8383
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 17 Jan 2005 22:18:47 +0000 (22:18 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3786659> REGRESSION (Mail): editable WebViews don't work with
"size up" and "size down" NSFontManager changes
* khtml/css/cssparser.cpp:
(CSSParser::parseValue): Add support for parsing new font size delta property.
* khtml/css/cssproperties.c: Generated file.
* khtml/css/cssproperties.h: Ditto.
* khtml/css/cssproperties.in: Add support for parsing new font size delta property.
* khtml/editing/htmlediting.cpp:
(khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
(khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
and running command to do the removal.
(khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
(khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle
relative font size changes.
(khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
before or equal to the end. Swap them if not true. I ran into this problem in some similar code in
applyRelativeFontStyleChange(). Moving that goodness here too.
(khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
I use the bool return value now (I obviously did not need it before).
(khtml::ApplyStyleCommand::computedFontSize): New helper function.
(khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
(khtml::createStyleSpanElement): Ditto.
* khtml/editing/htmlediting.h: Update header accordingly.
* khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
* kwq/DOM-CSS.mm:
(-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
(-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
* kwq/DOMPrivate.h: Declare new conveniences.
* layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
* layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
* layout-tests/editing/style/relative-font-size-change-001.html: Added.
* layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
* layout-tests/editing/style/relative-font-size-change-002.html: Added.
* layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
* layout-tests/editing/style/relative-font-size-change-003.html: Added.
* layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
* layout-tests/editing/style/relative-font-size-change-004.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8382
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 14 Jan 2005 23:55:37 +0000 (23:55 +0000)]
* khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
* khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
* khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
* khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8381
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Fri, 14 Jan 2005 20:09:32 +0000 (20:09 +0000)]
Fixed: <rdar://problem/
3886415> arrow keys don't work when the user hits Back to return to RSS page
Reviewed by hyatt.
(KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
(KWQKHTMLPart::mousePressNode): new
* kwq/KWQPageState.h:
* kwq/KWQPageState.mm:
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
(-[KWQPageState clear]): clear the mousePressNode
(-[KWQPageState dealloc]): deref the mousePressNode
(-[KWQPageState mousePressNode]): new
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8380
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Fri, 14 Jan 2005 01:01:03 +0000 (01:01 +0000)]
Fixed: <rdar://problem/
3932107> Safari does not load QT Cocoa plug-in if the WebPluginMIMETypes key is not in the info.plist
Fixing this bug required that we allow WebKit plug-ins (as well as Netscape plug-ins) support BP_CreatePluginMIMETypesPreferences
which allows plug-ins create an auxiliary MIME types file.
Reviewed by adele.
* Plugins.subproj/WebBasePluginPackage.h:
* Plugins.subproj/WebBasePluginPackage.m:
(+[WebBasePluginPackage preferredLocalizationName]): moved from WebNetscapePluginPackage
(-[WebBasePluginPackage pListForPath:createFile:]): ditto
(-[WebBasePluginPackage getPluginInfoFromPLists]): ditto
(-[WebBasePluginPackage isLoaded]): return isLoaded ivar
(-[WebBasePluginPackage load]): if loaded, get BP_CreatePluginMIMETypesPreferences symbol
* Plugins.subproj/WebNetscapePluginPackage.h:
* Plugins.subproj/WebNetscapePluginPackage.m:
(-[WebNetscapePluginPackage load]): call super when done so BP_CreatePluginMIMETypesPreferences can be initialized
* Plugins.subproj/WebPluginPackage.m:
(-[WebPluginPackage initWithPath:]): call getPluginInfoFromPLists
(-[WebPluginPackage load]): call super when done so BP_CreatePluginMIMETypesPreferences can be initialized
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8373
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 14 Jan 2005 00:17:57 +0000 (00:17 +0000)]
Changed another place where the method name was incorrect in
the comment.
Reviewed (and found) by Darin.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8371
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Fri, 14 Jan 2005 00:11:52 +0000 (00:11 +0000)]
Fixed <rdar://problem/
3952809> WebJavaPlugIn.h comments need method name corrected (webPlugInCallJava)
Reviewed by Maciej.
* Plugins.subproj/WebJavaPlugIn.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8370
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 14 Jan 2005 00:05:35 +0000 (00:05 +0000)]
Safari-179+ for TOT. The tree is open!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8369
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 13 Jan 2005 23:58:31 +0000 (23:58 +0000)]
Safari-179 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8367
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Thu, 13 Jan 2005 23:54:30 +0000 (23:54 +0000)]
Reviewed by Adele.
- fix <rdar://problem/
3946836> Safari about box lists 2004 instead of 2005
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8366
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 13 Jan 2005 22:13:04 +0000 (22:13 +0000)]
Fixed <rdar://problem/
3951911> REGRESSION: Animated GIF images with loop counts no longer update
Draw last image after animation loop terminates. (We
were drawing the image at index+1, which doesn't exist!)
Reviewed by Darin.
* WebCoreSupport.subproj/WebImageData.m:
(-[WebImageData _nextFrame:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8365
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Thu, 13 Jan 2005 22:02:58 +0000 (22:02 +0000)]
Fixed <rdar://problem/
3952084> REGRESSION: Links at projectseven.com now draw and update incorrectly during hover
Turn off use of new CGContextStrokeLineSegments API. We should
turn back on when
3952944 is fixed.
Reviewed by Darin.
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8364
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 13 Jan 2005 21:17:34 +0000 (21:17 +0000)]
fixed incorrect check-in date
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8363
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 13 Jan 2005 19:45:33 +0000 (19:45 +0000)]
Reviewed by Ken Kocienda.
Better fix for
3905066.
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8362
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Thu, 13 Jan 2005 19:41:52 +0000 (19:41 +0000)]
Fixed: <rdar://problem/
3937663> repro assertion failure and crash dragging image that has PDF source
Reviewed by adele.
* Misc.subproj/WebNSViewExtras.m:
(-[NSView _web_dragImage:rect:event:pasteboard:source:offset:]): if [WebImageRenderer image] returns nil, fallback to code that uses a file icon as the drag image
* WebCoreSupport.subproj/WebImageRendererFactory.m:
(-[WebImageRendererFactory supportedMIMETypes]): removed code that omits PDF and PostScript from the list since this omission is only needed in WebImageView
* WebView.subproj/WebImageView.m:
(+[WebImageView supportedImageMIMETypes]): added code that omits PDF and PostScript since we don't want WebImageView to render these types
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8361
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Thu, 13 Jan 2005 19:09:58 +0000 (19:09 +0000)]
WebCore:
Reviewed by Darin.
<rdar://problem/
3758033> REGRESSION (Mail): Support attributes in marked text (International input)
* khtml/rendering/render_text.cpp:
(InlineTextBox::paint): Support painting custom underline markers for
marked text in place of generic yellow.
(InlineTextBox::paintMarkedTextUnderline): New method that handles this.
* khtml/rendering/render_text.h:
* kwq/KWQKHTMLPart.h: Declare new methods and structs.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::clear): Clear marked test underlines.
(KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
(convertAttributesToUnderlines): Converts NSAttributedString attributes
to simplified and C++-friendly form.
(KWQKHTMLPart::markedTextUsesUnderlines): New method.
(KWQKHTMLPart::markedTextUnderlines): New method.
* kwq/KWQPainter.mm:
(QPainter::drawLineForText): Handle pen width.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
and ranges.
* kwq/WebCoreTextRenderer.h:
WebKit:
Reviewed by Darin.
<rdar://problem/
3758033> REGRESSION (Mail): Support attributes in marked text (International input)
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer drawLineForCharacters:yOffset:width:color:thickness:]): Changed to support
underline thickness. Also added a bit of a hack here to move thickness 2 underlines down by
.5 pixels, since the rendering engine can't give a fractional pixel offset.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView validAttributesForMarkedText]): Support underline, underline color and marked
clause attributes. Others that NSText supports are unimplemented for now.
(-[WebHTMLView firstRectForCharacterRange:]): Remove needless logging.
(-[WebHTMLView unmarkText]): Updated for new WebCore SPI.
(-[WebHTMLView _extractAttributes:ranges:fromAttributedString:]): New method to pull the attributes
and ranges out of an attributed string.
(-[WebHTMLView setMarkedText:selectedRange:]): Extract attributes and pass to WebCore.
(-[WebHTMLView insertText:]): Add comment noting that we don't really handle attributed strings
here.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8360
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 13 Jan 2005 01:31:43 +0000 (01:31 +0000)]
Reviewed by Dave Hyatt.
<rdar://problem/
3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
* kwq/KWQAccObject.mm:
(-[KWQAccObject addChildrenToArray:]):
Use the widget's outer view.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8353
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 13 Jan 2005 01:19:52 +0000 (01:19 +0000)]
Reviewed by Darin Adler.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::displayNode):
Add quotes around text node content.
(NodeBaseImpl::childNode):
Add nil check to return nil rather than crash when child node not found.
* kwq/KWQAccObject.mm:
(-[KWQAccObject doAXStringForTextMarkerRange:]):
Pass range compliant positions to TextIterator.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8352
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 12 Jan 2005 23:55:08 +0000 (23:55 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3848257> WebView will draw more than AppKit asks it to, so views behind won't redraw enough (transparent WebView)
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]): As recommended by Troy Stephens, do the
layouts here in this call, since it's before propagating the dirty rects to our ancestors.
This fixes the bug, but we only do it if the WebView is not opaque, because otherwise we can
optimize by only doing layouts you really need, and doing them later on is safe because we
know we don't need to draw any of the views behind us.
(-[WebHTMLView _layoutIfNeeded]): Added. Factored out from the method below.
(-[WebHTMLView _web_layoutIfNeededRecursive]): Added. Like the other "layout if needed" call,
but unconditional.
(-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]): Factored out the guts into the
_layoutIfNeeded method above. Otherwise unchanged.
(-[NSView _web_layoutIfNeededRecursive]): Added.
* WebView.subproj/WebFrame.m: (-[WebFrame _updateDrawsBackground]): Call setDrawsBackground:NO
on the scroll view when changing the frame to no longer be in "draws background" mode. This
is needed because the frame manages the "draws background" mode of the scroll view. It won't
have any effect if you call setDrawsBackground:NO before starting to use a WebView, but without
it calling setDrawsBackground:NO later won't have an immediate effect (easily visible in Safari).
This was hidden before because the HTML view was filling with transparent color, which blew away
the fill that was done by NSScrollView.
- fixed <rdar://problem/
3921129> reproducible crash at www.funnychristmas.com in CFSet manipulation in WebImageData
* WebCoreSupport.subproj/WebImageData.m:
(-[WebImageData _imageSourceOptions]): Changed types so we don't need a cast.
(+[WebImageData stopAnimationsInView:]): Instead of building a set of sets, by putting in the sets with addObject,
build a single set using unionSet, and then iterate the objects instead of having to iterate the sets and then the
objects in each set. The old code ended up sharing the sets with the live code, when the whole idea was to gather
all the renderers because the process of stopping modifies the active sets.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8348
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 12 Jan 2005 23:41:00 +0000 (23:41 +0000)]
Avoid additional work on dealloc by adding early out to
removeNativeReference(). (This will save time on dealloc
for all ObjC DOM objects.)
Reviewed by Darin.
* bindings/runtime_root.cpp:
(KJS::Bindings::removeNativeReference):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8347
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 12 Jan 2005 23:33:21 +0000 (23:33 +0000)]
Fix for
3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during
line layout is smarter about including the overflow for both old states and new states.
Reviewed by john
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8346
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 12 Jan 2005 23:24:18 +0000 (23:24 +0000)]
Fixed <rdar://problem/
3923356> REGRESSION: Java/JavaScript security checks working incorrectly
We were always returning the first "root" object for all runtime
objects. Changed 0 in loop to i, the index.
Reviewed by David Harrison.
* bindings/runtime_root.cpp:
(KJS::Bindings::rootForImp):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8345
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 12 Jan 2005 22:03:55 +0000 (22:03 +0000)]
Fixed <rdar://problem/
3887930> Must use new Java plug-in API to get/set fields so exception handling works (fixes many LiveConnect crashes)
Use the new dispatching API to invoke JNI, rather than calling JNI
directly.
Reviewed by David Harrison.
* bindings/jni/jni_instance.cpp:
(JavaInstance::invokeMethod):
* bindings/jni/jni_runtime.cpp:
(JavaField::dispatchValueFromInstance):
(JavaField::valueFromInstance):
(JavaField::dispatchSetValueToInstance):
(JavaField::setValueToInstance):
* bindings/jni/jni_runtime.h:
* bindings/jni/jni_utility.cpp:
(KJS::Bindings::convertValueToJValue):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8344
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 12 Jan 2005 21:41:05 +0000 (21:41 +0000)]
Fixed <rdar://problem/
3926825> Safari ignores GIF loop count
Get loop count from file properties, not image properties.
Reviewed by Ken Kocienda.
* WebCoreSupport.subproj/WebImageData.h:
* WebCoreSupport.subproj/WebImageData.m:
(-[WebImageData _commonTermination]):
(-[WebImageData fileProperties]):
(-[WebImageData _floatProperty:type:at:]):
(-[WebImageData _floatFileProperty:type:]):
(-[WebImageData _repetitionCount]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8343
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 12 Jan 2005 19:13:35 +0000 (19:13 +0000)]
Fix for bug
3937608, versiontracker.com flashes and displays the right column below content. Make sure to move
tables/overflows that dont fit within a block only in strict mode.
Fix for bug
3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific
case in editing is hit.
Reviewed by darin (first one), kocienda (second one)
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::getClearDelta):
* khtml/rendering/render_flow.cpp:
(RenderFlow::dirtyLinesFromChangedChild):
* khtml/rendering/render_line.cpp:
(khtml::InlineFlowBox::verticallyAlignBoxes):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8342
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 12 Jan 2005 17:55:08 +0000 (17:55 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3926142> REGRESSION (Mail): Deleting text decreases quote level
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
added to visible_position files.
(khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
tests to determine when to stop moving nodes more complete and correct. Also improved comments.
* khtml/editing/visible_position.cpp:
(khtml::isFirstVisiblePositionInParagraph): New function.
(khtml::isLastVisiblePositionInParagraph): New function.
* khtml/editing/visible_position.h: Update header accordingly.
* layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
results but still correct.
* layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
* layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
* layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
* layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8341
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 12 Jan 2005 00:49:51 +0000 (00:49 +0000)]
Fixed: <rdar://problem/
3934749> assertion failure in WebBaseNetscapePluginView loading movie
Reviewed by john.
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView start]): call canStart before asserting about the webView
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8340
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Wed, 12 Jan 2005 00:30:16 +0000 (00:30 +0000)]
Fixed
3922875. Fall back to DOM object is EMBED element
has no associated runtime object.
Reviewed by Chris.
* khtml/ecma/kjs_dom.cpp:
(KJS::getRuntimeObject):
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
(KJS::HTMLElement::tryGet):
(KJS::HTMLCollection::tryGet):
(KJS::HTMLCollection::getNamedItems):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8339
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 11 Jan 2005 23:46:03 +0000 (23:46 +0000)]
Fix for
3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match
other browsers.
Reviewed by Maciej
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::parseTag):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8338
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Tue, 11 Jan 2005 23:43:39 +0000 (23:43 +0000)]
Reviewed by Darin.
- fixed <rdar://problem/
3446838> REGRESSION (Mail): text decorations don't print
(e.g. <strike>, underline)
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer drawLineForCharacters:yOffset:withWidth:withColor:]):
This bottleneck routine for drawing a line was setting the linewidth to 0 when
the graphics context was not drawing to the screen. Thus, no lines. Now links
are underlined when printing from Safari (as well as Mail).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8337
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rjw [Tue, 11 Jan 2005 22:50:01 +0000 (22:50 +0000)]
Fixed
3949145. CG has a much faster API for drawing lines.
Switched over to that new API (CGContextStrokeLineSegments).
Reviewed by John Sullivan.
* WebCoreSupport.subproj/WebTextRenderer.m:
(-[WebTextRenderer drawLineForCharacters:yOffset:withWidth:withColor:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8336
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 11 Jan 2005 22:44:53 +0000 (22:44 +0000)]
Fixed: <rdar://problem/
3930733> Mail prints second page of email blank
Reviewed by dave.
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLines): removed null check since the print rect should never be null
* khtml/rendering/render_list.cpp:
(RenderListMarker::paint): ditto
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8335
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 11 Jan 2005 21:25:03 +0000 (21:25 +0000)]
Fixed: <rdar://problem/
3948862> REGRESSION: missing images when RTFD is pasted into editable WebView
This problem occurred because we were creating image elements before creating corresponding image resources. The fix is to have AppKit call us back to create the resources before it creates the elements.
Reviewed by john.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _documentFragmentFromPasteboard:allowPlainText:]): don't deal with subresources since that's now done by the following method
(-[WebHTMLView resourceForData:preferredFilename:]): new handler method called by AppKit
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8334
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 10 Jan 2005 23:40:45 +0000 (23:40 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3943648> extra line is inserted after pressing return within quoted text of reply
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a
simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the
result calculated in that deeper scope was not available when tested.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8333
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 10 Jan 2005 23:28:56 +0000 (23:28 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3946852> Option-e goes to next line
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
into the start line is done. We plan to change pretty substantially soon to better handle
the problem described in <rdar://problem/
3937352> Quote level not maintained when copied
and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8332
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 10 Jan 2005 18:47:43 +0000 (18:47 +0000)]
Reviewed by Darin
Fix for this bug:
<rdar://problem/
3907005> Applying block styles to a line of text can unexpectedly affect other lines
* khtml/editing/htmlediting.cpp:
(khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
to their own blocks if needed so that a block style can be applied.
(khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
(khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
(khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
paragraph is styled.
(khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
Should remove attributue instead.
* khtml/editing/htmlediting.h: Touch function declarations accordingly.
* layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-001.html: Added.
* layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-002.html: Added.
* layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-003.html: Added.
* layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-004.html: Added.
* layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-005.html: Added.
* layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-006.html: Added.
* layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-007.html: Added.
* layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-008.html: Added.
* layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-009.html: Added.
* layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-010.html: Added.
* layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-011.html: Added.
* layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-012.html: Added.
* layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
* layout-tests/editing/style/create-block-for-style-013.html: Added.
Unrelated updates to these expected results.
* layout-tests/editing/inserting/insert-div-007-expected.txt
* layout-tests/editing/pasteboard/paste-text-013-expected.txt
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8331
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Mon, 10 Jan 2005 18:38:39 +0000 (18:38 +0000)]
Fixed: <rdar://problem/
3936844> Mail: Messages with rich text do not print
Reviewed by john.
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLines): don't do pagination work if printRect is not set
* khtml/rendering/render_list.cpp:
(RenderListMarker::paint): ditto
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8330
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Mon, 10 Jan 2005 18:22:06 +0000 (18:22 +0000)]
Reviewed by Darin.
* kwq/KWQTextUtilities.mm:
(currentTextBreakLocaleID):
Return empty string (AKA root locale) if locale pref can not be canonicalized.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8329
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Mon, 10 Jan 2005 17:07:49 +0000 (17:07 +0000)]
Fixed broken Panther build.
* kwq/KWQTextUtilities.mm:
(currentTextBreakLocaleID):
This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
function. However, the Tiger-only code was wrong; the string generated using
CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
as well.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8328
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sun, 9 Jan 2005 21:42:55 +0000 (21:42 +0000)]
Reviewed by Ken Kocienda.
<rdar://problem/
3786362> REGRESSION (Mail): pasted text loses one newline
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply):
Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8327
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sun, 9 Jan 2005 19:11:54 +0000 (19:11 +0000)]
Reviewed by Harrison.
- fixed <rdar://problem/
3939176> select() method does not work on <input type=search>
* khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
to a switch statement. Added SEARCH to the set of types that treat the renderer as a
RenderLineEdit.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8326
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sun, 9 Jan 2005 18:54:59 +0000 (18:54 +0000)]
Reviewed by Ken Kocienda.
<rdar://problem/
3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
whitespace to a single non-breaking space when splitting a text node.
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8325
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Sun, 9 Jan 2005 18:40:48 +0000 (18:40 +0000)]
Reviewed by Ken.
Fixed: <rdar://problem/
3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8324
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sun, 9 Jan 2005 04:09:49 +0000 (04:09 +0000)]
Reviewed by Darin.
<rdar://problem/
3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
* Khtml/khtml_part.cpp:
(KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
not started loading yet so it could not possibly be finishing here...
(KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
no document, in this case we must have hit an error or been loading a non-HTML
frame.
* khtml/khtml_part.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8323
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 8 Jan 2005 20:42:40 +0000 (20:42 +0000)]
Reviewed by Maciej.
<rdar://problem/
3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
* khtml/editing/selection.cpp:
(khtml::Selection::validate):
Tune word selections left/right choice to use right if on empty last line.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8322
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Sat, 8 Jan 2005 00:17:30 +0000 (00:17 +0000)]
Reviewed by Darin.
<rdar://problem/
3942619> AX: Support sentence ax attributes
Needed to use the unicode utilities properly. Twas lame before.
* khtml/editing/visible_units.cpp:
(khtml::previousBoundary):
(khtml::nextBoundary):
(khtml::startOfWord):
(khtml::endOfWord):
(khtml::previousWordPosition):
(khtml::nextWordPosition):
(khtml::startOfSentence):
(khtml::endOfSentence):
(khtml::previousSentencePosition):
(khtml::nextSentencePosition):
* kwq/KWQAccObject.mm:
(-[KWQAccObject accessibilityAttributeNames]):
(-[KWQAccObject accessibilityAttributeValue:]):
(-[KWQAccObject accessibilityParameterizedAttributeNames]):
(-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
* kwq/KWQTextUtilities.mm:
(currentTextBreakLocaleID):
(KWQFindSentenceBoundary):
(KWQFindNextSentenceFromIndex):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8321
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 7 Jan 2005 22:42:04 +0000 (22:42 +0000)]
Reviewed by Kevin
Fix for these bugs:
<rdar://problem/
3939523> in some cases, text does not retain style info after pressing return twice
<rdar://problem/
3944492> after pressing return twice, text is bold when it shouldn't be
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
Merge the typing style with the computed style for the current position. Fixes both bugs.
* khtml/editing/htmlediting.h:
* layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-023.html: Added.
* layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-024.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8320
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 7 Jan 2005 20:38:19 +0000 (20:38 +0000)]
Fix the layout tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8319
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Fri, 7 Jan 2005 20:22:13 +0000 (20:22 +0000)]
Fix for
3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
behavior on worldofwarcraft.com.
Reviewed by kevin
* ChangeLog:
* khtml/rendering/render_table.cpp:
(RenderTable::layout):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8318
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Fri, 7 Jan 2005 20:13:11 +0000 (20:13 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3848412> for forwarded message, tabbing to message view scrolls to bottom of view
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
in the document, or if it is not a descendent of the document element. In the case of the bug,
since the selection has not yet been set up, the focus node passed here is the HTML element, and
that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8317
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Fri, 7 Jan 2005 02:30:52 +0000 (02:30 +0000)]
Reviewed by mjs.
Fixed: <rdar://problem/
3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
* khtml/khtml_part.cpp:
(KHTMLPart::processObjectRequest): m_bComplete was never true for frames generated by Javascript due to our synchronous loading and as a result, scheduled redirects wouldn't fire in KHTMLPart::scheduleLocationChange(). By virtue of being an empty document, a document is complete. In this special case it's safe at this point to call checkCompleted() which sets m_bComplete true.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8316
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 7 Jan 2005 00:35:20 +0000 (00:35 +0000)]
versioning for TOT, Safari 2.0 (178+)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8315
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Fri, 7 Jan 2005 00:27:15 +0000 (00:27 +0000)]
Safari-178 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8313
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 6 Jan 2005 21:56:28 +0000 (21:56 +0000)]
Reviewed by Chris.
(addendum to previous checkin for this bug)
<rdar://problem/
3776056> AX: Editable HTML should not be viewed as AXStaticText
Fix line navigation. Add AXUIElementForTextMarker.
* ChangeLog:
* kwq/KWQAccObject.mm:
(-[KWQAccObject accessibilityParameterizedAttributeNames]):
(-[KWQAccObject doAXUIElementForTextMarker:]):
(-[KWQAccObject doAXLineForTextMarker:]):
(-[KWQAccObject doAXTextMarkerRangeForLine:]):
(-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
(-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
(-[KWQAccObject accessibilityAttributeValue:forParameter:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8312
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Thu, 6 Jan 2005 21:13:16 +0000 (21:13 +0000)]
Reviewed by Ken.
- re-fixed <rdar://problem/
3760910> Request to include support for custom tag names in HTML (they already work in XML)
(turns out the PLT regression was a false alarm)
* khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
much larger number.
* khtml/html/htmlparser.cpp:
(KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
sense to just have the array be a member so we don't have to use new and delete on it. Also needed
to eliminate code that used ID_CLOSE_TAG for an array size.
(KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
that manages isindex to use deref instead of delete.
(KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
mistake of using ID_CLOSE_TAG for the array size too.
(KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
there and it would prevent custom tags from working. Added range check before using the forbidden
tag array with the token ID since custom tags will use index values past the end of the array.
(KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
createElement call is still here. Last time I left out a few form element types from this switch;
fixed now.
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
document if getTagID fails; this creates a unique per-document ID.
* khtml/misc/htmltags.c: Regenerated.
* khtml/misc/htmltags.h: Regenerated.
* khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
Also rewrote getTagName to work with the new scheme.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8311
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 6 Jan 2005 19:04:57 +0000 (19:04 +0000)]
Fixed Panther build. Also, do not advertize sentence support since it is incomplete.
* kwq/KWQAccObject.mm:
(-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
(-[KWQAccObject accessibilityParameterizedAttributeNames]):
(-[KWQAccObject accessibilityIsAttributeSettable:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8310
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 6 Jan 2005 18:20:51 +0000 (18:20 +0000)]
Reviewed by Dave Hyatt.
<rdar://problem/
3776056> AX: Editable HTML should not be viewed as AXStaticText
<rdar://problem/
3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
Many more AX attributes supported. Numerous fixes to previous AX work.
* khtml/editing/visible_units.cpp:
(khtml::startSentenceBoundary):
(khtml::startOfSentence):
(khtml::endSentenceBoundary):
(khtml::endOfSentence):
(khtml::previousSentencePositionBoundary):
(khtml::previousSentencePosition):
(khtml::nextSentencePositionBoundary):
(khtml::nextSentencePosition):
* khtml/editing/visible_units.h:
* khtml/khtmlview.cpp:
(KHTMLView::layout):
* khtml/misc/helper.cpp:
(khtml::findSentenceBoundary):
(khtml::nextSentenceFromIndex):
* khtml/misc/helper.h:
* khtml/misc/htmltags.c:
(hash_tag):
(findTag):
* khtml/rendering/render_container.cpp:
(RenderContainer::removeChildNode):
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_object.cpp:
(RenderObject::remove):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::getAccObjectCache):
(DocumentImpl::updateSelection):
(DocumentImpl::close):
(DocumentImpl::setFocusNode):
(DocumentImpl::parentDocument):
(DocumentImpl::topDocument):
* khtml/xml/dom_docimpl.h:
* kwq/KWQAccObject.mm:
(-[KWQAccObject accessibilityShouldUseUniqueId]):
(-[KWQAccObject detach]):
(-[KWQAccObject anchorElement]):
(-[KWQAccObject firstChild]):
(-[KWQAccObject lastChild]):
(-[KWQAccObject previousSibling]):
(-[KWQAccObject nextSibling]):
(-[KWQAccObject parentObject]):
(-[KWQAccObject value]):
(-[KWQAccObject accessibilityAttributeNames]):
(-[KWQAccObject accessibilityPerformAction:]):
(-[KWQAccObject textMarkerForVisiblePosition:]):
(-[KWQAccObject visiblePositionForTextMarker:]):
(-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
(-[KWQAccObject topDocument]):
(-[KWQAccObject topRenderer]):
(-[KWQAccObject topView]):
(-[KWQAccObject accessibilityAttributeValue:]):
(-[KWQAccObject accessibilityParameterizedAttributeNames]):
(-[KWQAccObject doAXLineForTextMarker:]):
(-[KWQAccObject doAXTextMarkerRangeForLine:]):
(-[KWQAccObject doAXStringForTextMarkerRange:]):
(-[KWQAccObject doAXTextMarkerForPosition:]):
(-[KWQAccObject doAXBoundsForTextMarkerRange:]):
(-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
(-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
(-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
(-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
(-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
(-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
(-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
(-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
(-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
(-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
(-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
(-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
(-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
(-[KWQAccObject doAXLengthForTextMarkerRange:]):
(-[KWQAccObject accessibilityAttributeValue:forParameter:]):
(-[KWQAccObject accessibilityHitTest:]):
(-[KWQAccObject accessibilityFocusedUIElement]):
(-[KWQAccObject accessibilityIsAttributeSettable:]):
(-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
(-[KWQAccObject setAccObjectID:]):
(-[KWQAccObject removeAccObjectID]):
* kwq/KWQAccObjectCache.h:
* kwq/KWQAccObjectCache.mm:
(KWQAccObjectCache::setAccObject):
(KWQAccObjectCache::removeAccObject):
(KWQAccObjectCache::visiblePositionForTextMarker):
(KWQAccObjectCache::postNotificationToTopWebArea):
(KWQAccObjectCache::postNotification):
(KWQAccObjectCache::handleFocusedUIElementChanged):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::respondToChangedContents):
* kwq/KWQTextUtilities.h:
* kwq/KWQTextUtilities.mm:
(KWQFindNextWordFromIndex):
(KWQFindSentenceBoundary):
(KWQFindNextSentenceFromIndex):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge accessibilityTree]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8309
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Thu, 6 Jan 2005 18:19:01 +0000 (18:19 +0000)]
Reviewed by Dave Hyatt
<rdar://problem/
3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView accessibilityFocusedUIElement]):
Implement this so that AppKit can use it from NSAccessibilityHandleFocusChanged.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8308
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Thu, 6 Jan 2005 00:46:40 +0000 (00:46 +0000)]
Fix changelog
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8307
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 5 Jan 2005 22:56:46 +0000 (22:56 +0000)]
Reviewed by Ken.
- re-landing a subset of my custom tag change that does not fix the bug, but also does
not introduce a performance regression
* khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
* khtml/editing/htmlediting.cpp:
(khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
per-document tags and is just better all around for things like the document.
(khtml::debugNode): Ditto.
* khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
* khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
* khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
* khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
non-HTML elements to be nested as desired.
* khtml/misc/htmlhashes.h: Changed return types to unsigned short.
* khtml/misc/htmlhashes.cpp:
(khtml::getTagID): Changed return type to unsigned short.
(khtml::getAttrID): Ditto.
* khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
Also updated for a few tags that the parser handled but this did not.
* kwq/KWQRenderTreeDebug.cpp:
(getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
the tag ID directly, which only works for standard nodes.
(operator<<): Update to call getTagName.
(nodePositionRelativeToRoot): Ditto.
(writeSelection): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8306
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 5 Jan 2005 22:43:16 +0000 (22:43 +0000)]
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/
3941203> REGRESSION (Mail): Paste inserts content in wrong place
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
this operation work correctly, particularly in the logic to figure out whether to merge content, and
also performing merges.
* khtml/editing/visible_position.cpp:
(khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
* khtml/editing/visible_units.cpp:
(khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
(khtml::isEndOfParagraph): Ditto.
* khtml/editing/visible_units.h: Declare new functions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8305
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 5 Jan 2005 21:08:25 +0000 (21:08 +0000)]
change all version numbers to 177+
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8304
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
vicki [Wed, 5 Jan 2005 20:50:37 +0000 (20:50 +0000)]
versioning for today's WebKit dot submission, WebKit-177.1
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8302
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Wed, 5 Jan 2005 19:01:03 +0000 (19:01 +0000)]
Fixed: <rdar://problem/
3936865> REGRESSION: canvas.drawImage no longer scales properly
Reviewed by john.
* WebCoreSupport.subproj/WebImageData.m: use the height of the inRect instead of the fromRect when setting the origin of the context
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8301
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Wed, 5 Jan 2005 15:59:36 +0000 (15:59 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3926522> Pressing return in a quoted block inserts too many newlines
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
for the block we are adding was being done at the wrong time, which led to the placeholder remaining
in the document when it was not needed. This resulted in the extra space reported in the bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8300
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Tue, 4 Jan 2005 23:25:11 +0000 (23:25 +0000)]
Reviewed by Hyatt.
Fixed: <rdar://problem/
3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8299
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cblu [Tue, 4 Jan 2005 23:21:30 +0000 (23:21 +0000)]
Fixed: <rdar://problem/
3928329> WebKit should pass nil for "language" to checkSpellingOfString:
Reviewed by kocienda.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _isSelectionMisspelled]): pass nil not @"" for language
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8298
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 4 Jan 2005 23:19:09 +0000 (23:19 +0000)]
Fix for
3937203, force an update of the dashboard regions when scrollbars are added/removed.
Reviewed by kevin
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateScrollInfoAfterLayout):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8297
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 4 Jan 2005 22:55:22 +0000 (22:55 +0000)]
Reviewed by John
Fix for these two bugs:
<rdar://problem/
3938935> REGRESSION (Mail): Pasting into an empty document mangles content
<rdar://problem/
3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
* khtml/editing/htmlediting.cpp:
(khtml::ReplaceSelectionCommand::doApply): For
3938935, add one more case to handle an empty document; merge
neither start nor end. For
3939148, improve the code which adjusts the insertion point during
the process of pasting. It formerly handled only one of the possible cases.
* layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
* layout-tests/editing/pasteboard/paste-text-015.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8296
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 4 Jan 2005 22:34:43 +0000 (22:34 +0000)]
Fix for
3936571, placeholder attribute should work for normal inputs for Dashboard.
Reviewed by john
* khtml/rendering/render_form.cpp:
(RenderLineEdit::updateFromElement):
* kwq/KWQLineEdit.mm:
(QLineEdit::setPlaceholderString):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8295
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 4 Jan 2005 20:08:21 +0000 (20:08 +0000)]
Fix for
3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when
returning pseudo-styles.
Reviewed by john
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::matchRulesForList):
(khtml::CSSStyleSelector::pseudoStyleForElement):
* khtml/rendering/render_style.cpp:
(RenderStyle::addPseudoStyle):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8294
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 4 Jan 2005 19:12:41 +0000 (19:12 +0000)]
- rolled out my custom tag name change again -- it caused a 1 ms PLT regression
* khtml/css/cssstyleselector.cpp:
* khtml/editing/htmlediting.cpp:
* khtml/editing/selection.cpp:
* khtml/editing/visible_position.cpp:
* khtml/html/dtd.cpp:
* khtml/html/htmlparser.cpp:
* khtml/html/htmlparser.h:
* khtml/html/htmltokenizer.cpp:
* khtml/misc/htmlhashes.cpp:
* khtml/misc/htmlhashes.h:
* khtml/misc/htmltags.c:
* khtml/misc/htmltags.h:
* khtml/misc/maketags:
* khtml/xml/dom_docimpl.cpp:
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
* khtml/xml/dom_position.cpp:
* kwq/KWQRenderTreeDebug.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8293
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 4 Jan 2005 18:35:11 +0000 (18:35 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3927554> Style info applied to remainder of document after a newline is entered
* khtml/editing/htmlediting.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
to be applied. Now the code will detect when at the end of a style run and will not move and apply
that ending style to the new paragraph, though it will place that style into the typing style. This
seems to match NSText behavior.
* layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
not have any visible effect on the document.
* layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
* layout-tests/editing/inserting/insert-div-022.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8292
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 4 Jan 2005 18:11:55 +0000 (18:11 +0000)]
Fix for
3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
all over the place.
Reviewed by john
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLines):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8291
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Tue, 4 Jan 2005 06:04:37 +0000 (06:04 +0000)]
Fix for float painting regressions
3932524,
3931664, and
3933068. Make the noPaint flag setting more
robust and make it work regardless of which objects get a layout or not.
Reviewed by mjs
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::insertFloatingObject):
(khtml::RenderBlock::addOverhangingFloats):
(khtml::RenderBlock::addIntrudingFloats):
* khtml/rendering/render_block.h:
(khtml::RenderBlock::FloatingObject::FloatingObject):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8290
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 4 Jan 2005 03:24:00 +0000 (03:24 +0000)]
Reviewed by Kevin.
<rdar://problem/
3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
* khtml/html/html_miscimpl.cpp:
(HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
it should not ever be (now).
(HTMLCollectionImpl::item): When traversing items stop when we hit
nil, meaning the end to avoid triggering above assert (formerly crash).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8289
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 4 Jan 2005 03:10:28 +0000 (03:10 +0000)]
Reviewed by John and Kevin.
<rdar://problem/
3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
* khtml/ecma/kjs_window.cpp:
(Window::get): Look up frame names before buitin window properties
to match other browsers. This regressed because we added a builtin
"toolbar" property but this site had a frame with that name.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8288
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 4 Jan 2005 01:44:08 +0000 (01:44 +0000)]
Back out accidentally committed change.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8287
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 4 Jan 2005 01:28:51 +0000 (01:28 +0000)]
WebCore:
Reviewed by Darin.
<rdar://problem/
3888931> frame naming allows malicious site to bring up a window when you click on a link in another
Added opener bridge method to help WebKit implement security check
for named frame visibility.
* khtml/khtml_part.h:
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge opener]):
WebKit:
Reviewed by Darin.
<rdar://problem/
3888931> frame naming allows malicious site to bring up a window when you click on a link in another
Implement a security check on name frame visbility. This is the
same rule as mozilla. You can only target frames by name if you
are in the same window, have the same domain as the frame or an
ancestor, or if it's a top level window have the same domain as
the opener.
* WebView.subproj/WebFrame.m:
(-[WebFrame _shouldAllowAccessFrom:]):
(-[WebFrame _descendantFrameNamed:sourceFrame:]):
(-[WebFrame findFrameNamed:]):
* WebView.subproj/WebFramePrivate.h:
* WebView.subproj/WebView.m:
(-[WebView _findFrameInThisWindowNamed:sourceFrame:]):
(-[WebView _findFrameNamed:sourceFrame:]):
* WebView.subproj/WebViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8286
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 3 Jan 2005 22:08:47 +0000 (22:08 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8285
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 3 Jan 2005 21:43:09 +0000 (21:43 +0000)]
Reviewed by NOBODY (OOPS!).
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutPositionedObjects):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8284
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Mon, 3 Jan 2005 21:38:26 +0000 (21:38 +0000)]
Reviewed by Harrison
Fix for this bug:
<rdar://problem/
3928250> REGRESSION (Mail): Typing style lost after hitting return key
* khtml/editing/htmlediting.cpp:
(khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
(khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
(khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
(khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
(khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
(khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
(khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
(khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
* khtml/editing/htmlediting.h: Declare new functions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8283
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kdecker [Mon, 3 Jan 2005 19:49:05 +0000 (19:49 +0000)]
Reviewed by Hyatt.
Fixed: <rdar://problem/
3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)
* khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements. Malformed HTML (ugh) is the only reason why we need to do this.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8282
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Fri, 24 Dec 2004 00:06:50 +0000 (00:06 +0000)]
Reviewed by Ken.
- re-fixed <rdar://problem/
3760910> Request to include support for custom tag names in HTML (they already work in XML)
* khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
* khtml/editing/htmlediting.cpp:
(khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
per-document tags and is just better all around for things like the document.
(khtml::debugNode): Ditto.
* khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
* khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
* khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
* khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
non-HTML elements to be nested as desired.
* khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
much larger number.
* khtml/html/htmlparser.cpp:
(KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
sense to just have the array be a member so we don't have to use new and delete on it. Also needed
to eliminate code that used ID_CLOSE_TAG for an array size.
(KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
that manages isindex to use deref instead of delete.
(KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
mistake of using ID_CLOSE_TAG for the array size too.
(KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
there and it would prevent custom tags from working. Added range check before using the forbidden
tag array with the token ID since custom tags will use index values past the end of the array.
(KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
createElement call is still here. Last time I left out a few form element types from this switch;
fixed now.
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
document if getTagID fails; this creates a unique per-document ID.
* khtml/misc/htmlhashes.h: Changed return types to unsigned short.
* khtml/misc/htmlhashes.cpp:
(khtml::getTagID): Changed return type to unsigned short.
(khtml::getAttrID): Ditto.
* khtml/misc/htmltags.c: Regenerated.
* khtml/misc/htmltags.h: Regenerated.
* khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
Also rewrote getTagName to work with the new scheme.
* khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
Also updated for a few tags that the parser handled but this did not.
* kwq/KWQRenderTreeDebug.cpp:
(getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
the tag ID directly, which only works for standard nodes.
(operator<<): Update to call getTagName.
(nodePositionRelativeToRoot): Ditto.
(writeSelection): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8281
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Thu, 23 Dec 2004 00:45:45 +0000 (00:45 +0000)]
Safari-177 stamp
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8279
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 22 Dec 2004 23:18:19 +0000 (23:18 +0000)]
- rolled out my custom tag name change -- it broke amazon.com
* khtml/css/cssstyleselector.cpp:
* khtml/editing/htmlediting.cpp:
* khtml/editing/selection.cpp:
* khtml/editing/visible_position.cpp:
* khtml/html/dtd.cpp:
* khtml/html/htmlparser.cpp:
* khtml/html/htmlparser.h:
* khtml/html/htmltokenizer.cpp:
* khtml/misc/htmlhashes.cpp:
* khtml/misc/htmlhashes.h:
* khtml/misc/htmltags.c:
* khtml/misc/htmltags.h:
* khtml/misc/maketags:
* khtml/xml/dom_docimpl.cpp:
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
* khtml/xml/dom_position.cpp:
* kwq/KWQRenderTreeDebug.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8278
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Wed, 22 Dec 2004 21:37:15 +0000 (21:37 +0000)]
Reviewed by Darin Adler.
* khtml/editing/selection.cpp:
(khtml::Selection::validate):
The selecting/deselecting bad behavior is because the Selection code that expands by words
had an inaccurate test for being at the end of the document (where double-clicking needs
to select the last word). Fixed that check.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8277
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Wed, 22 Dec 2004 18:23:55 +0000 (18:23 +0000)]
Reviewed by Chris.
Fix for <rdar://problem/
3911650> tabs at safeway.com stop working after a while
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection
so that we match Firefox and WinIE behavior.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8276
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Wed, 22 Dec 2004 17:58:20 +0000 (17:58 +0000)]
Reviewed by Ken.
- fixed <rdar://problem/
3760910> Request to include support for custom tag names in HTML (they already work in XML)
* khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
* khtml/editing/htmlediting.cpp:
(khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
per-document tags and is just better all around for things like the document.
(khtml::debugNode): Ditto.
* khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
* khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
* khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
* khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
non-HTML elements to be nested as desired.
* khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
much larger number.
* khtml/html/htmlparser.cpp:
(KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
sense to just have the array be a member so we don't have to use new and delete on it. Also needed
to eliminate code that used ID_CLOSE_TAG for an array size.
(KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
that manages isindex to use deref instead of delete.
(KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
mistake of using ID_CLOSE_TAG for the array size too.
(KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
there and it would prevent custom tags from working. Added range check before using the forbidden
tag array with the token ID since custom tags will use index values past the end of the array.
(KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
createElement call is still here.
* khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
document if getTagID fails; this creates a unique per-document ID.
* khtml/misc/htmlhashes.h: Changed return types to unsigned short.
* khtml/misc/htmlhashes.cpp:
(khtml::getTagID): Changed return type to unsigned short.
(khtml::getAttrID): Ditto.
* khtml/misc/htmltags.c: Regenerated.
* khtml/misc/htmltags.h: Regenerated.
* khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
Also rewrote getTagName to work with the new scheme.
* khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
Also updated for a few tags that the parser handled but this did not.
* kwq/KWQRenderTreeDebug.cpp:
(getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
the tag ID directly, which only works for standard nodes.
(operator<<): Update to call getTagName.
(nodePositionRelativeToRoot): Ditto.
(writeSelection): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8275
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Wed, 22 Dec 2004 01:05:16 +0000 (01:05 +0000)]
Reviewed by Ken Kocienda.
<rdar://problem/
3924934> REGRESSION: double click at end of line selects start of next line
Problem was the TextIterator was not handling exitNode() from a P block properly.
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::TextIterator):
Add new param that specifies whether the iterator is for content or for searching.
Search iterators do not prevent newlines at the beginning.
(khtml::TextIterator::advance):
Added some comments.
(khtml::TextIterator::handleTextNode):
Added some comments.
(khtml::TextIterator::exitNode):
Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
(khtml::TextIterator::emitCharacter):
Added some comments.
(khtml::TextIterator::range):
Added some comments.
(khtml::CharacterIterator::CharacterIterator):
Specify search type TextIterator.
(khtml::CharacterIterator::advance):
* khtml/editing/visible_text.h:
(khtml::):
Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
* khtml/editing/visible_units.cpp:
(khtml::nextWordBoundary):
Specify search type TextIterator.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8274
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Wed, 22 Dec 2004 00:52:02 +0000 (00:52 +0000)]
Reviewed by Ken Kocienda.
<rdar://problem/
3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL
Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
Fixed by pretending the start == end-1 in that situation, as long as end > 0.
* khtml/rendering/render_text.cpp:
(RenderText::setSelectionState)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8273
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Wed, 22 Dec 2004 00:44:10 +0000 (00:44 +0000)]
Reviewed by John.
<rdar://problem/
3929187> WebKit needs to restrict access to certain window operations by domain
* khtml/ecma/kjs_window.cpp:
(Window::get): Change most window functions to be restricted by
XSS domain check.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8272
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 21 Dec 2004 19:45:47 +0000 (19:45 +0000)]
Reviewed by John
Fix for this bug:
<rdar://problem/
3928305> selecting an entire line and typing over causes new inserted text at top of document
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
formerly undetected and unhandled. This is the crux of the bug fix.
(khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
execution of command.
* khtml/editing/htmlediting.h: Declare new function.
* layout-tests/editing/deleting/delete-
3928305-fix-expected.txt: Added.
* layout-tests/editing/deleting/delete-
3928305-fix.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8271
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kocienda [Tue, 21 Dec 2004 19:29:26 +0000 (19:29 +0000)]
Reviewed by me
* khtml/editing/htmlediting.cpp:
(khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
checking in (aka must return false from function returning bool).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8270
268f45cc-cd09-0410-ab3c-
d52691b4dbfc