1 2005-05-05 David Hyatt <hyatt@apple.com>
3 Fix for 4109667, sIFR flash replacement technique often malfunctions. This bug occurs when the plugin
4 widget update causes the onload for the document to fire. Because you can be in the middle of a style
5 recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach
6 process when the tree is in a bogus state.
8 The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked
9 during the style recalc process and the code has been patched so that when this situation occurs, the close is
10 deferred until after the style recalc has finished.
12 Reviewed by John Sullivan
14 * khtml/xml/dom_docimpl.cpp:
15 (DocumentImpl::DocumentImpl):
16 (DocumentImpl::recalcStyle):
17 (DocumentImpl::implicitClose):
18 * khtml/xml/dom_docimpl.h:
19 * layout-tests/fast/dynamic/flash-replacement-test.html: Added.
21 2005-05-05 Darin Adler <darin@apple.com>
23 Reviewed by Dave Hyatt.
25 - fixed <rdar://problem/4109564> REGRESSION (Atlanta): maps.google.com doesn't always center California correctly
27 * khtml/ecma/kjs_events.cpp: (offsetFromTarget): Fix two places that said X where they should say Y.
29 2005-05-05 David Harrison <harrison@apple.com>
31 Restore fixed setEndingSelection. Fixed method was ifdef'd out
32 because change was at end of Tiger development, but method is
33 unused. You just can never be _too_ safe.
35 * khtml/editing/htmlediting.cpp:
36 (khtml::EditCommandPtr::setEndingSelection):
38 2005-05-02 Maciej Stachowiak <mjs@apple.com>
42 - renamed NodeBaseImpl to ContainerNodeImpl
44 * khtml/ecma/kjs_dom.cpp:
45 (DOMNodeProtoFunc::tryCall): Avoid use of NodeBaseImpl and avoid
46 use of obsolete checkNoOwner call, use isAncestor instead.
47 * khtml/html/html_elementimpl.cpp:
48 (HTMLElementImpl::setOuterText): Avoid gratuitous use of
50 * khtml/xml/dom_nodeimpl.cpp:
51 (NodeBaseImpl::checkNoOwner): Removed.
53 Ther rest is all just simple renaming.
55 * khtml/xml/dom_docimpl.cpp:
56 (DocumentImpl::DocumentImpl):
57 (DocumentImpl::attach):
58 (DocumentImpl::detach):
59 (DocumentFragmentImpl::DocumentFragmentImpl):
60 * khtml/xml/dom_docimpl.h:
61 * khtml/xml/dom_elementimpl.cpp:
63 (ElementImpl::ElementImpl):
64 (ElementImpl::insertedIntoDocument):
65 (ElementImpl::removedFromDocument):
66 (ElementImpl::attach):
68 * khtml/xml/dom_elementimpl.h:
69 * khtml/xml/dom_nodeimpl.cpp:
70 (ContainerNodeImpl::ContainerNodeImpl):
71 (ContainerNodeImpl::~ContainerNodeImpl):
72 (ContainerNodeImpl::firstChild):
73 (ContainerNodeImpl::lastChild):
74 (ContainerNodeImpl::insertBefore):
75 (ContainerNodeImpl::replaceChild):
76 (ContainerNodeImpl::removeChild):
77 (ContainerNodeImpl::removeChildren):
78 (ContainerNodeImpl::appendChild):
79 (ContainerNodeImpl::hasChildNodes):
80 (ContainerNodeImpl::setFirstChild):
81 (ContainerNodeImpl::setLastChild):
82 (ContainerNodeImpl::checkSameDocument):
83 (ContainerNodeImpl::checkIsChild):
84 (ContainerNodeImpl::addChild):
85 (ContainerNodeImpl::attach):
86 (ContainerNodeImpl::detach):
87 (ContainerNodeImpl::insertedIntoDocument):
88 (ContainerNodeImpl::removedFromDocument):
89 (ContainerNodeImpl::cloneChildNodes):
90 (ContainerNodeImpl::getElementsByTagNameNS):
91 (ContainerNodeImpl::getUpperLeftCorner):
92 (ContainerNodeImpl::getLowerRightCorner):
93 (ContainerNodeImpl::getRect):
94 (ContainerNodeImpl::setFocus):
95 (ContainerNodeImpl::setActive):
96 (ContainerNodeImpl::childNodeCount):
97 (ContainerNodeImpl::childNode):
98 (ContainerNodeImpl::dispatchChildInsertedEvents):
99 (ContainerNodeImpl::dispatchChildRemovalEvents):
100 * khtml/xml/dom_nodeimpl.h:
101 * khtml/xml/dom_xmlimpl.cpp:
102 (DOM::EntityImpl::EntityImpl):
103 (DOM::EntityReferenceImpl::EntityReferenceImpl):
104 (DOM::NotationImpl::NotationImpl):
105 (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl):
106 * khtml/xml/dom_xmlimpl.h:
108 2005-05-04 Vicki Murley <vicki@apple.com>
112 - fix mismatched parentheses in one of the ifdefs
114 * khtml/html/html_headimpl.cpp:
115 (HTMLTitleElementImpl::childrenChanged):
117 2005-05-04 Darin Adler <darin@apple.com>
119 Reviewed by Dave Hyatt.
121 - fixed build rules to match other projects
123 * WebCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles.
124 When built without a build style (by Apple B&I) we want to get the target from the
125 environment. But when built with a build style (by Safari engineers and others), we want
128 * Makefile.am: Took out extra parameters that make command-line building different from
129 Xcode building. Now that this is fixed, you should not get a full rebuild if you switch
130 from command line to Xcode or back.
132 2005-05-04 Vicki Murley <vicki@apple.com>
136 - fixed <rdar://problem/3986228> Not able to load additional script blocks dynamically
138 Run scripts when they're inserted into the document. Use createdByParser bit to make sure
139 that scripts aren't run twice, once while parsing and again when inserting.
141 * khtml/html/html_headimpl.cpp:
142 (HTMLScriptElementImpl::HTMLScriptElementImpl):
143 (HTMLScriptElementImpl::~HTMLScriptElementImpl):
144 (HTMLScriptElementImpl::insertedIntoDocument):
145 (HTMLScriptElementImpl::removedFromDocument):
146 (HTMLScriptElementImpl::notifyFinished):
147 * khtml/html/html_headimpl.h:
148 (DOM::HTMLScriptElementImpl::setCreatedByParser):
149 * khtml/html/htmlparser.cpp:
150 (KHTMLParser::getElement):
151 * khtml/xml/xml_tokenizer.cpp:
152 (khtml::XMLTokenizer::startElement):
154 2005-05-03 David Hyatt <hyatt@apple.com>
156 Normalize all our custom properties in our implementation to be -khtml (remove all the -apple).
158 Make sure that -apple, -khtml, and -moz are all able to be used. -apple and -moz just map to -khtml.
160 Add support for automatically converting -khtml-opacity to opacity (for legacy Safari 1.1 compat).
164 * khtml/css/css_computedstyle.cpp:
166 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
167 * khtml/css/cssparser.cpp:
168 (CSSParser::parseValue):
169 * khtml/css/cssproperties.in:
170 * khtml/css/cssstyleselector.cpp:
171 (khtml::CSSStyleSelector::applyDeclarations):
172 (khtml::CSSStyleSelector::applyProperty):
173 * khtml/css/parser.y:
174 * khtml/ecma/kjs_css.cpp:
177 2005-05-03 Darin Adler <darin@apple.com>
181 * WebCore.pbproj/project.pbxproj: Fix some SYMROOTS that should have been SYMROOT.
183 2005-05-03 David Hyatt <hyatt@apple.com>
185 Fix for 4098281, news.com missing a bunch of content. Make sure not to apply strict SGML parsing
186 when stripping comments out of scripts.
188 New test is comments-in-script.html
190 * khtml/html/htmltokenizer.cpp:
191 (khtml::HTMLTokenizer::parseComment):
193 2005-05-03 David Hyatt <hyatt@apple.com>
195 Remove unused notification to avoid ERROR messages spewing on the acid2 test.
199 * khtml/khtml_part.cpp:
200 (KHTMLPart::processObjectRequest):
201 * khtml/rendering/render_frames.cpp:
202 (RenderPartObject::updateWidget):
203 * khtml/rendering/render_frames.h:
205 2005-05-03 Darin Adler <darin@apple.com>
207 Reviewed by Dave Hyatt.
208 No new layout tests needed.
210 - eliminated the bogus kMin/kMax macros that we had in addition to inline functions
213 * kwq/KWQKGlobal.h: Remove the kMin/kMax macros.
215 * khtml/css/cssstyleselector.cpp:
216 (khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides
218 (khtml::CSSStyleSelector::fontSizeForKeyword): Ditto.
219 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto.
221 - remove unused parameter to dirtyLinesFromChangedChild for clarity
223 * khtml/rendering/render_object.h: Don't take the parameter.
224 * khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto.
226 * khtml/rendering/render_flow.h: Don't take the parameter.
227 * khtml/rendering/render_flow.cpp:
228 (RenderFlow::detach): Don't pass the parameter.
229 (RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter.
231 * khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter.
233 - convert DOM::NodeImpl into an abstract base class by making a couple of functions
234 pure virtual for clarity
236 * khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual.
237 * khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType.
239 2005-05-03 David Hyatt <hyatt@apple.com>
241 Fix for object element to support fallback content. WIth this change Safari passes the Acid2 test.
245 * khtml/css/html4.css:
246 * khtml/html/html_objectimpl.cpp:
247 (HTMLObjectElementImpl::HTMLObjectElementImpl):
248 (HTMLObjectElementImpl::parseHTMLAttribute):
249 (HTMLObjectElementImpl::rendererIsNeeded):
250 (HTMLObjectElementImpl::createRenderer):
251 (HTMLObjectElementImpl::attach):
252 (HTMLObjectElementImpl::detach):
253 (HTMLObjectElementImpl::recalcStyle):
254 (HTMLObjectElementImpl::childrenChanged):
255 (HTMLObjectElementImpl::isURLAttribute):
256 (HTMLObjectElementImpl::isImageType):
257 (HTMLObjectElementImpl::renderFallbackContent):
258 * khtml/html/html_objectimpl.h:
259 * khtml/khtml_part.cpp:
260 (KHTMLPart::requestObject):
261 (KHTMLPart::selectFrameElementInParentIfFullySelected):
262 (KHTMLPart::handleFallbackContent):
263 * khtml/khtml_part.h:
264 * khtml/khtmlpart_p.h:
265 (khtml::ChildFrame::ChildFrame):
266 * khtml/rendering/render_frames.cpp:
267 (RenderPartObject::RenderPartObject):
268 (RenderPartObject::updateWidget):
269 * khtml/rendering/render_frames.h:
270 (khtml::RenderPart::hasFallbackContent):
271 * khtml/rendering/render_replaced.cpp:
272 (RenderReplaced::RenderReplaced):
273 * kwq/KWQKHTMLPart.mm:
274 (KWQKHTMLPart::createPart):
275 * kwq/WebCoreBridge.h:
276 * kwq/WebCoreBridge.mm:
277 (-[WebCoreBridge mainResourceError]):
279 2005-05-01 Darin Adler <darin@apple.com>
281 - move to Xcode native targets and stop checking in generated files
283 * WebCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated
284 files, so we don't have to check them in any more.
285 * Info.plist: Added. Native targets use a separate file for this.
287 * Makefile.am: Removed rule to generate WebCore-combined.exp since this is now handled by the
288 Xcode project. Removed the code to remove the embedded copy of the framework since we don't
289 do that any more. Removed timestamp cleaning rules since we don't use those any more.
291 * WebCore-tests.exp: Removed symbols that aren't really needed. The native target gives an
292 error when you mention a nonexistent symbol, so we can't have them any more.
294 * khtml/css/parser_wrapper.cpp: Added. Shell used to compile parser.cpp since we can't add
295 a generated file easily to the list of files to be compiled.
297 * .cvsignore: Removed various timestamp files.
299 * WebCore-combined.exp: Removed.
300 * force-clean-timestamp: Removed.
301 * force-js-clean-timestamp: Removed.
302 * khtml/.cvsignore: Removed.
303 * khtml/Makefile.am: Removed.
304 * khtml/css/.cvsignore: Removed.
305 * khtml/css/Makefile.am: Removed.
306 * khtml/css/cssproperties.c: Removed.
307 * khtml/css/cssproperties.h: Removed.
308 * khtml/css/cssvalues.c: Removed.
309 * khtml/css/cssvalues.h: Removed.
310 * khtml/css/parser.cpp: Removed.
311 * khtml/css/parser.h: Removed.
312 * khtml/css/tokenizer.cpp: Removed.
313 * khtml/ecma/.cvsignore: Removed.
314 * khtml/ecma/Makefile.am: Removed.
315 * khtml/ecma/kjs_css.lut.h: Removed.
316 * khtml/ecma/kjs_dom.lut.h: Removed.
317 * khtml/ecma/kjs_events.lut.h: Removed.
318 * khtml/ecma/kjs_html.lut.h: Removed.
319 * khtml/ecma/kjs_navigator.lut.h: Removed.
320 * khtml/ecma/kjs_range.lut.h: Removed.
321 * khtml/ecma/kjs_traversal.lut.h: Removed.
322 * khtml/ecma/kjs_views.lut.h: Removed.
323 * khtml/ecma/kjs_window.lut.h: Removed.
324 * khtml/ecma/xmlhttprequest.lut.h: Removed.
325 * khtml/ecma/xmlserializer.lut.h: Removed.
326 * khtml/html/.cvsignore: Removed.
327 * khtml/html/Makefile.am: Removed.
328 * khtml/html/doctypes.cpp: Removed.
329 * khtml/html/kentities.c: Removed.
330 * khtml/misc/.cvsignore: Removed.
331 * khtml/misc/Makefile.am: Removed.
332 * khtml/misc/htmlattrs.c: Removed.
333 * khtml/misc/htmlattrs.h: Removed.
334 * khtml/misc/htmltags.c: Removed.
335 * khtml/misc/htmltags.h: Removed.
336 * kwq/.cvsignore: Removed.
337 * kwq/KWQCharsetData.c: Removed.
338 * kwq/KWQColorData.c: Removed.
339 * kwq/Makefile.am: Removed.
341 2005-05-02 Darin Adler <darin@apple.com>
344 Added two layout tests for regression testing.
346 - redid frameElement (fix for 4091082 below)
348 The first version lacked a security check, and was also broken.
350 * khtml/ecma/kjs_window.cpp:
351 (frameElement): Refactored into separate function; added isSafeScript check.
352 (Window::get): Call the new frameElement function.
354 * layout-tests/fast/frames/frameElement-frame.html: Added.
355 * layout-tests/fast/frames/frameElement-frame-expected.txt: Added.
356 * layout-tests/fast/frames/frameElement-iframe.html: Added.
357 * layout-tests/fast/frames/frameElement-iframe-expected.txt: Added.
358 * layout-tests/fast/frames/resources/frameElement-contents.html: Added.
360 2005-05-02 David Harrison <harrison@apple.com>
364 Fix isStartOfEditableContent and isEndOfEditableContent to return actual, rather than inverted, answers.
365 No Radar. Found this when trying to use isEndOfEditableContent() in some new code.
367 * khtml/editing/visible_units.cpp:
368 (khtml::isStartOfEditableContent):
369 (khtml::isEndOfEditableContent):
372 2005-04-29 Darin Adler <darin@apple.com>
374 Reviewed by David Harrison.
376 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Turn newlines into \n for better dumping.
378 2005-04-29 David Harrison <harrison@apple.com>
382 <rdar://problem/4083333> When deleting link at end of sentence, entire sentence gets deleted
384 * khtml/editing/htmlediting.cpp:
385 (khtml::DeleteSelectionCommand::initializePositionData):
386 Work around bug #4103339 (whose real fix is somewhat risky), so this fix can get into a software update.
388 (khtml::DeleteSelectionCommand::handleGeneralDelete):
389 Add isAncestor check when comparing m_downstreamEnd.node() and m_startNode.
391 * layout-tests/editing/deleting/delete-4083333-fix-expected.txt: Added.
392 * layout-tests/editing/deleting/delete-4083333-fix.html: Added.
394 2005-04-29 Darin Adler <darin@apple.com>
396 Reviewed by Dave Harrison.
398 - changed layout tests to dump more minimal information about caret and selection
400 * kwq/KWQRenderTreeDebug.cpp:
401 (nodePosition): Changed name; now does position relative to document.
402 (writeSelection): Removed upstream/downstream code and changed format slightly.
404 * layout-tests/editing/*-expected.txt: Regenerated in new format.
406 2005-04-29 Darin Adler <darin@apple.com>
408 Reviewed by Chris Blumenberg.
409 Added two layout tests for regression testing.
411 - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
413 * khtml/xml/dom_docimpl.cpp:
414 (DocumentImpl::importNode): Reorganized and partly rewrote this. The change that fixes the bug at
415 hand is to explicitly use XHTML_NAMESPACE for HTML elements, since the old way of getting the namespace
416 will return the null string for HTML elements, and createElementNS will not create an HTML element
417 if passed a null string for the namespace.
418 (DocumentImpl::processHttpEquiv): Removed some bogus getDocument() calls -- no need to call getDocument()
419 in a document object.
420 (DocumentImpl::attrName): Ditto.
421 (DocumentImpl::tagName): Ditto.
422 (DocumentImpl::setFocusNode): Ditto.
424 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::cloneNode): Moved the actual cloning here
425 from ElementImpl::cloneNode, because XMLElementImpl already had its own version, and in here
426 we can use createHTMLElement, which will work properly even in an XML document, and is also slightly
429 * khtml/xml/dom_nodeimpl.h: Added a namespaceURI method function to go along with localName.
430 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::namespaceURI): Added. Returns null string to be consistent
431 with localName (only works on certain types of elements as documented).
432 * khtml/xml/dom_elementimpl.h: Removed ElementImpl::cloneNode (see above). Added an override of
433 namespaceURI for XMLElementImpl.
434 * khtml/xml/dom_elementimpl.cpp: (XMLElementImpl::namespaceURI): Added. Returns the namespace
435 (consistent with localName).
437 * layout-tests/fast/dom/importNodeHTML.html: Added. Tests both importNode and cloneNode (for comparison).
438 * layout-tests/fast/dom/importNodeHTML-expected.txt: Added.
439 * layout-tests/fast/dom/importNodeXML.xhtml: Added. XML version of the same test as above. Tests a different
440 code path, so useful to have.
441 * layout-tests/fast/dom/importNodeXML-expected.txt: Added.
443 2005-04-28 Darin Adler <darin@apple.com>
445 Reviewed by Dave Harrison.
447 - fixed problems preventing us from compiling with gcc 4.0
449 * WebCore.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
450 way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
451 WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
453 * khtml/css/parser.y: Changed some rules that were using a float to pass around an enum to use an
454 int instead to avoid a warning.
455 * khtml/css/parser.cpp: Regenerated.
456 * khtml/css/parser.h: Regenerated.
458 * khtml/ecma/kjs_dom.cpp: (DOMTextProtoFunc::tryCall): Rearranged a return statement to avoid an incorrect
460 * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Initialized a couple of variables to avoid
461 an incorrect warning.
462 * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): Rearranged how we exit from the function to avoid
464 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Changed some %d to %ld where the
465 parameters where long ints.
466 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
467 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
468 * kwq/DOMEvents.mm: (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Rearranged code to avoid a cast
469 that was causing an incorrect warning.
471 (createObjCDOMNode): Broke out as a separate function.
472 (KJS::ScriptInterpreter::createObjcInstanceForValue): Rearranged code to avoid a namespace collision with
473 KJS::DOMNode and the Objective-C DOMNode class.
474 * kwq/KWQFileButton.mm: Made fields of KWQFileButtonAdapter public to avoid an error, new to gcc 4.0,
475 about accessing protected Objective-C fields.
476 * kwq/KWQKHTMLPart.mm:
477 (KWQKHTMLPart::matchLabelsAgainstElement): Rearranged a return statement to avoid an incorrect warning.
478 (KWQKHTMLPart::imageFromRect): Rearranged how this function does its exception handling to avoid a
479 "may be clobbered" warning.
480 * kwq/KWQKJavaAppletWidget.mm: Fixed incorrect import that said "KHTMLView.h" instead of "khtmlview.h".
481 * kwq/KWQObject.mm: Made fields of KWQObjectTimerTarget public to avoid an error, new to gcc 4.0,
482 about accessing protected Objective-C fields.
483 * kwq/WebCoreBridge.mm: (partHasSelection): Used [bridge part] instead of getting directly at instance
484 variable to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields.
486 * WebCore-combined.exp: Regenerated.
487 * WebCore-tests.exp: Added some additional symbols needed by the tests under gcc 4.0.
489 2005-04-28 Darin Adler <darin@apple.com>
491 * WebCore.pbproj/project.pbxproj: Add back the main_thread_malloc files, rolled out by accident.
493 2005-04-27 Adele Peterson <adele@apple.com>
495 Rolling out fix for <rdar://problem/4097849> because the following layout tests were failing:
497 fast/css/namespaces/001
498 fast/css/namespaces/002
499 fast/css/namespaces/004
500 fast/css/namespaces/005
501 fast/css/namespaces/006
505 * khtml/html/html_documentimpl.cpp:
506 * khtml/html/html_documentimpl.h:
507 * khtml/html/html_elementimpl.cpp:
508 (HTMLElementImpl::namespaceURI):
509 * khtml/xml/dom_docimpl.cpp:
510 (DocumentImpl::importNode):
511 (DocumentImpl::createElementNS):
512 (DocumentImpl::createHTMLElement):
513 (DocumentImpl::attrId):
514 (DocumentImpl::tagId):
515 * khtml/xml/dom_docimpl.h:
517 2005-04-27 John Sullivan <sullivan@apple.com>
521 Experimental prototype of user-resizable textareas. All the new code is guarded by
522 #if ALLOW_RESIZING_TEXTAREAS, which is false unless you remove a comment and rebuild.
524 This code allows you to press near the bottom-right corner of any textarea and drag
525 to resize the textarea on the page. It works correctly with textareas in left-aligned
526 or centered blocks, but is weird in right-aligned blocks. It also does something
527 sensible if the width is specified as a % (in that case, you can resize vertically only).
528 The user-created-size survives resizing the window and survives the back/forward cache.
529 It does not survive reloading the page.
531 This complete-lack-of-affordance UI is obviously not shippable, but this proof of concept
532 code could lead to a real user feature.
534 * kwq/KWQTextArea.mm:
535 (-[KWQTextArea getNumColumns:andNumRows:forSize:]):
536 new method that determines cols and rows for a given textarea frame size
537 (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
538 new method that tracks a drag and does a live resize-and-relayout
539 (-[KWQTextAreaTextView mouseDown:]):
540 if the mouse down is in the bottom-right corner, call _trackResizeFromMouseDown:
542 2005-04-27 John Sullivan <sullivan@apple.com>
546 - fixed problem with mouse wheel patch where alt and shift keys were switched
548 * khtml/xml/dom2_eventsimpl.h:
549 use the order cntl, alt, shift, meta in KeyboardEventImpl constructors to match
550 superclass. This isn't necessary to fix the bug, but is better for clarity.
552 * khtml/xml/dom2_eventsimpl.cpp:
553 (KeyboardEventImpl::KeyboardEventImpl):
554 switch parameter order to match superclass. Then pass the parameters to superclass's
555 constructor in the right order.
556 (KeyboardEventImpl::initKeyboardEvent):
557 Pass parameters to superclass's constructor in the right order.
559 2005-04-26 Adele Peterson <adele@apple.com>
561 Fixed by Darin, reviewed by me.
563 Fix for <rdar://problem/4084029> designMode doesn't allow editing when iframe src = "" or = about:blank
565 This change will add an HTML element for empty documents. Now that there will be an HTMLDocument in this case,
566 a body will also be created (see rdar://problem/3758785). This was preventing frames with empty documents from
569 * khtml/html/htmlparser.cpp: (KHTMLParser::finished):
571 Updated these tests to expect the HTML and BODY elements
572 * layout-tests/fast/flexbox/016-expected.txt:
573 * layout-tests/fast/frames/001-expected.txt:
574 * layout-tests/fast/frames/002-expected.txt:
575 * layout-tests/fast/frames/contentWindow_Frame-expected.txt:
576 * layout-tests/fast/frames/contentWindow_iFrame-expected.txt:
577 * layout-tests/fast/frames/empty-frame-src-expected.txt:
579 2005-04-26 Maciej Stachowiak <mjs@apple.com>
581 New test case for <rdar://problem/4092136> reproducible crash in KJS::kjs_fast_realloc loading maps.google.com
583 * layout-tests/fast/js/string-from-char-code-expected.txt: Added.
584 * layout-tests/fast/js/string-from-char-code.html: Added.
586 2005-04-26 Darin Adler <darin@apple.com>
590 - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler
594 - need to test behavior of Windows IE with horizontal scroll wheeling; we currently send a distinct event
595 for that relatively obscure case, which means the event handlers won't fire at all; might be incorrect
596 - overflow scrolling is done after all DOM event handling, but ideally should be done in the overflowing
597 element's default event handler; not important in practice
598 - frame scrolling is done after all DOM event handling, but probably should be done in a default event handler;
599 not sure about this, but it's probably not important in practice and definitely not required
603 * khtml/ecma/kjs_events.h: Added DOMWheelEvent.
604 * khtml/ecma/kjs_events.cpp:
605 (KJS::getDOMEvent): Added a case for wheel event. To be forward looking, I use the event's impl pointer
606 instead of a C++ DOM wrapper. Eventually it will all work this way.
607 (offsetFromTarget): Added. Factored out code to compute offsetX/Y for an event.
608 (DOMMouseEvent::getValueProperty): Changed to call offsetFromTarget for offsetX/Y.
609 (DOMWheelEvent::DOMWheelEvent): Added.
610 (DOMWheelEvent::tryGet): Added.
611 (DOMWheelEvent::getValueProperty): Added.
612 (DOMWheelEventProtoFunc::tryCall): Added. Nothing at the moment, but might get contents later.
614 * khtml/ecma/kjs_dom.h: Added OnMouseWheel to the enum with the list of properties.
615 * khtml/ecma/kjs_dom.cpp: Added onmousewheel as a property of DOM nodes.
616 (DOMNode::getValueProperty): Return the mouse wheel event handler.
617 (DOMNode::putValue): Set the mouse wheel event handler.
619 * khtml/ecma/kjs_window.cpp: Added onmousewheel as a property of the window.
620 (Window::get): Return the mouse wheel event handler.
621 (Window::put): Set the mouse wheel event handler.
623 * khtml/ecma/kjs_window.h: Added OnWindowMouseWheel to the enum with the list of properties.
624 (Other properties distinguish the window handler by lower-casing the initial letter, way too subtle,
625 so I did this one a good way.)
627 * khtml/dom/dom2_events.h: Made the constructors for Event and UIEvent public. There's no good reason
628 for them to be private, and I had to use the UIEvent one in the JavaScript implementation.
632 * khtml/xml/dom2_eventsimpl.h: Added events for mouse wheel and horizontal mouse wheel.
633 Added isWheelEvent function to EventImpl.
634 (DOM::UIEventWithKeyStateImpl): Added. Base class shared by mouse, wheel, and keyboard events.
635 (DOM::MouseRelatedEventImpl): Added. Base class shared by mouse and wheel events.
636 (DOM::WheelEventImpl): Added.
638 * khtml/xml/dom2_eventsimpl.cpp: Added "mousewheel" to list of event names and a placeholder for
639 the horizontal mouse wheel.
640 (EventImpl::isWheelEvent): Added. Returns false.
641 (MouseRelatedEventImpl::MouseRelatedEventImpl): Added. Factored out what's shared between mouse
642 events and wheel events to avoid duplicated code.
643 (MouseRelatedEventImpl::computeLayerPos): Moved to MouseRelatedWheelEventImpl.
644 (MouseEventImpl::MouseEventImpl): Changed since MouseRelatedWheelEventImpl is now the base class
645 so we can share more code with wheel events.
646 (KeyboardEventImpl::KeyboardEventImpl): Changed since UIEventWithKeyStateImpl is now the base class
647 so we can share more code with mouse and wheel events.
648 (WheelEventImpl::WheelEventImpl): Added.
649 (WheelEventImpl::isWheelEvent): Added. Returns true.
651 * khtml/misc/htmlattrs.in: Added "onmousewheel" attribute name.
652 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Added parsing of the
653 "onmousewheel" atribute, consistent with other event handler attributes.
657 * kwq/WebCoreBridge.h: Renamed scrollOverflowWithScrollWheelEvent to sendScrollWheelEvent.
658 * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollWheelEvent:]): Renamed.
660 * kwq/KWQEvent.h: Added Wheel as an event type value.
661 (QWheelEvent::QWheelEvent): Added.
663 (positionForEvent): Updated to know that wheel events have valid positions in them.
664 (orientationForEvent): Added.
665 (deltaForEvent): Added.
666 (QWheelEvent::QWheelEvent): Added.
668 * kwq/KWQKHTMLPart.h: Renamed scrollOverflowWithScrollWheelEvent to wheelEvent.
669 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): Renamed and added code to construct a QWheelEvent
670 and send it along to KHTMLView::viewportWheelEvent, consistent with how mouse events work.
672 * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): Do a hit test to figure out which node to
673 send the event to, and then call dispatchWheelEvent.
675 * khtml/xml/dom_nodeimpl.h: Added dispatchWheelEvent.
676 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWheelEvent): Added.
680 * khtml/ecma/kjs_dom.lut.h: Regenerated.
681 * khtml/ecma/kjs_events.lut.h: Regenerated.
682 * khtml/ecma/kjs_window.lut.h: Regenerated.
683 * khtml/misc/htmlattrs.c: Regenerated.
684 * khtml/misc/htmlattrs.h: Regenerated.
686 2005-04-26 David Harrison <harrison@apple.com>
688 Reviewed by Darin, Maciej.
690 <rdar://problem/4075576> Deleting text in new message borks content
692 Fixed by removing the methods that attempted to preserve the position. The idea
693 of preserving position is a very recent one, and turned out to not actually address
694 the problem it was intended to fix (see below). Further, is unclear how the position
695 could be preserved in a form that could be properly used later on. Therefore,
696 removing the code to work like before is the preferred alternative for this software
697 update. I've written <rdar://problem/4099839> to cover the bug that position
698 preservation was supposed to fix (but did not). Added layout tests for
699 both this bug and 4099839. Also, updated existing tests with correct expected results
700 (delete-at-paragraph-boundaries-003 and 004).
702 * khtml/editing/htmlediting.cpp:
703 (khtml::CompositeEditCommand::removeFullySelectedNode):
704 (khtml::CompositeEditCommand::removeChildrenInRange):
705 (khtml::DeleteSelectionCommand::handleGeneralDelete):
706 * khtml/editing/htmlediting.h:
707 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
708 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
709 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt: Added.
710 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007.html: Added.
711 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt: Added.
712 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008.html: Added.
713 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt: Added.
714 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009.html: Added.
715 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt: Added.
716 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010.html: Added.
718 2005-04-26 Darin Adler <darin@apple.com>
720 - fixed development builds
722 * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions.
724 2005-04-25 David Hyatt <hyatt@apple.com>
726 Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line. Make sure to
727 update line break info for the last dirty line so that when a clean line tries to figure out where it
728 started, it will get an accurate position taking into account the updated string. By doing this, the code
729 will be able to properly distinguish between the old and new positions and not accidentally assume they are
734 * khtml/rendering/render_text.cpp:
735 (RenderText::setTextWithOffset):
737 2005-04-26 Darin Adler <darin@apple.com>
741 - fixed <rdar://problem/4098826> Bezier curves broken in new Safari canvas object (last two parameters parsed incorrectly)
743 * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Fixed incorrect argument indices.
744 Thanks to Brian Campbell who figured out what was wrong.
746 2005-04-17 Maciej Stachowiak <mjs@apple.com>
750 - use single-threaded malloc in places where malloc is hot for an
751 8% speed improvement on cvs-base
753 * ForwardingHeaders/misc/fast_malloc.h: Added.
754 * WebCore.pbproj/project.pbxproj:
755 * khtml/css/css_base.h:
756 * khtml/css/css_ruleimpl.h:
757 * khtml/css/css_valueimpl.h:
758 * khtml/css/cssstyleselector.h:
759 * khtml/misc/arena.cpp:
763 * khtml/misc/main_thread_malloc.cpp: Added.
764 * khtml/misc/main_thread_malloc.h: Added.
765 * khtml/rendering/render_style.h:
766 * khtml/xml/dom2_eventsimpl.h:
767 * khtml/xml/dom2_rangeimpl.h:
768 * khtml/xml/dom2_traversalimpl.h:
769 * khtml/xml/dom2_viewsimpl.h:
770 * khtml/xml/dom_docimpl.h:
771 * khtml/xml/dom_elementimpl.cpp:
772 (NamedAttrMapImpl::NamedAttrMapImpl):
773 (NamedAttrMapImpl::clearAttributes):
774 (NamedAttrMapImpl::operator=):
775 (NamedAttrMapImpl::addAttribute):
776 (NamedAttrMapImpl::removeAttribute):
777 * khtml/xml/dom_elementimpl.h:
778 * khtml/xml/dom_nodeimpl.h:
779 * khtml/xml/dom_stringimpl.h:
780 * kwq/KWQFontFamily.h:
781 * kwq/KWQListImpl.mm:
786 (QString::setBufferFromCFString):
789 2005-04-25 John Sullivan <sullivan@apple.com>
791 Reviewed by Dave Harrison.
793 - fixed <rdar://problem/4098731> [DOMHTMLTextAreaElement cols] returns wrong value (usually zero)
796 (-[DOMHTMLTextAreaElement cols]):
797 use ATTR_COLS instead of ATTR_ACCESSKEY (D'oh!)
798 (-[DOMHTMLTextAreaElement setCols:]):
801 2005-04-25 Darin Adler <darin@apple.com>
805 - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
807 * khtml/xml/dom_docimpl.h: Add virtual functions HTMLElementNamespace and isHTMLNamespace.
808 * khtml/xml/dom_docimpl.cpp:
809 (DocumentImpl::importNode): Rearranged this function and fixed the following problems: 1) made sure to ref node while attributes are
810 being set on it so it doesn't get destroyed; 2) fixed code to get namespace from the element we are importing to use the IDs from
811 the source document, not the destination document; 3) removed unneeded getDocument() call which just returns this; 4) fixed error
812 handling for cases where an exception happens while processing the children.
813 (DocumentImpl::HTMLElementNamespace): Added. Returns XHTML_NAMESPACE.
814 (DocumentImpl::isHTMLNamespace): Added. Returns true for any namespace that matches XHTML_NAMESPACE (case insensitive).
815 (DocumentImpl::createElementNS): Changed to call isHTMLNamespace, which will cause it to accept the null namespace in an HTML document.
816 This is the change that fixes the bug. Also fixed the code path to do a little less wasteful work in the non-XHTML case.
817 (DocumentImpl::createHTMLElement): Pass in HTMLElementNamespace() rather than 0 to tagId.
818 (DocumentImpl::attrId): Use isHTMLNamespace instead of allowing the null namespace explicitly.
819 (DocumentImpl::tagId): Ditto.
821 * khtml/html/html_documentimpl.h: Add overrides for HTMLElementNamespace and isHTMLNamespace.
822 * khtml/html/html_documentimpl.cpp:
823 (HTMLDocumentImpl::HTMLElementNamespace): Added. Returns 0 so we use the null string for HTML elements inside HTML documents (as before).
824 (HTMLDocumentImpl::isHTMLNamespace): Added. Allows 0, and then calls base class to check for the actual XHTML namespace. Thus, we allow
825 both no namespace at all and the XHTML namespace inside HTML documents.
827 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::namespaceURI): Changed to call HTMLElementNamespace rather than checking
828 isHTMLDocument. Same result as before, but better division of responsibilities.
830 2005-04-25 Darin Adler <darin@apple.com>
834 - fixed <rdar://problem/4091956> JavaScript drop handlers don't receive more than one dropped item
836 * kwq/KWQClipboard.mm:
837 (cocoaTypeFromMIMEType): Remove some use of compare -- less efficient than a simpler "==" check.
838 Fixed non-GC-safe code to use KWQCFAutorelease instead.
839 (MIMETypeFromCocoaType): Use fromCFString instead of fromNSString to avoid a cast.
840 (KWQClipboard::getData): Rearrange so that we'll use filenames if both filenames and a URL are present, since
841 filenames can accomodate multiple items. Fix bug where we'd return multiple filenames when the type requested
842 is "URL". Fixed loop that computed the count over and over again for the loop termination condition. Check
843 that the data for NSFilenamesPboardType is an NSArray instead of assuming it is.
844 (KWQClipboard::setData): Use isEqualToString: instead of == when comparing types.
846 2005-04-22 David Hyatt <hyatt@apple.com>
848 Fix for 4096878, drop shadow effect not displayed correctly on tbray.org/ongoing/. Block minmaxwidth was
849 broken when negative margins were used and did not properly decrease the max width.
853 * khtml/rendering/render_block.cpp:
854 (khtml::RenderBlock::calcBlockMinMaxWidth):
855 * layout-tests/fast/block/float/034-expected.txt: Added.
856 * layout-tests/fast/block/float/034.html: Added.
857 * layout-tests/fast/block/float/035-expected.txt: Added.
858 * layout-tests/fast/block/float/035.html: Added.
860 2005-04-22 David Hyatt <hyatt@apple.com>
862 Remove some dead code from css_valueimpl. It wasn't used at all.
864 * khtml/css/css_valueimpl.cpp:
865 * khtml/css/css_valueimpl.h:
867 2005-04-22 Darin Adler <darin@apple.com>
869 * khtml/ecma/kjs_html.h: Removed unnecessary bogus class name qualifiers.
871 2005-04-22 David Hyatt <hyatt@apple.com>
873 Fix for 4096681, fix regression in how the list-style property is parsed. It no longer parses when it hits
874 a url in the property value list now, because the list pointer did not get advanced. This fixes alistapart.com.
878 * khtml/css/cssparser.cpp:
879 (CSSParser::parseValue):
880 * layout-tests/fast/lists/009-expected.txt: Added.
881 * layout-tests/fast/lists/009.html: Added.
882 * layout-tests/fast/lists/resources/listmark.gif: Added.
884 2005-04-22 Darin Adler <darin@apple.com>
888 - fixed <rdar://problem/4091082> Google Suggest no longer works due to lack of "frameElement"
890 * khtml/ecma/kjs_window.h: Added FrameElement.
891 * khtml/ecma/kjs_window.cpp: (Window::get): Added "frameElement".
892 * khtml/ecma/kjs_window.lut.h: Regenerated.
894 2005-04-22 Darin Adler <darin@apple.com>
898 - a small editing-related code cleanup
900 * khtml/rendering/render_text.h: Added positionForOffset and made offsetForPosition const.
901 * khtml/rendering/render_text.cpp:
902 (InlineTextBox::offsetForPosition): Made const.
903 (InlineTextBox::positionForOffset): Added. Moved code here from caretRect.
904 (RenderText::caretRect): Call positionForOffset instead of doing the work here.
906 2005-04-21 David Hyatt <hyatt@apple.com>
908 Fix for 4095839, wrong background image used on flechtwerk.de. Make sure that the global mapped
909 attribute cache hashed background attributes into per-document buckets.
911 * khtml/html/html_baseimpl.cpp:
912 (HTMLBodyElementImpl::mapToEntry):
913 * khtml/html/html_elementimpl.h:
915 * khtml/html/html_tableimpl.cpp:
916 (HTMLTableElementImpl::mapToEntry):
917 (HTMLTablePartElementImpl::mapToEntry):
918 * khtml/xml/dom_docimpl.cpp:
919 (DocumentImpl::DocumentImpl):
920 * khtml/xml/dom_docimpl.h:
921 (DOM::DocumentImpl::docID):
923 2005-04-21 Vicki Murley <vicki@apple.com>
925 - layout test for 4065447, outerHTML on images
927 * layout-tests/fast/dynamic/outerHTML-img-expected.txt: Added.
928 * layout-tests/fast/dynamic/outerHTML-img.html: Added.
930 2005-04-20 Vicki Murley <vicki@apple.com>
934 - fixed <rdar://problem/4065447> support outerHTML on IMG elements
936 * khtml/html/html_elementimpl.cpp:
937 (HTMLElementImpl::setOuterHTML):
939 2005-04-18 David Hyatt <hyatt@apple.com>
941 Fix min-height so that when it resolves to auto it does not use the box's intrinsic height.
943 * khtml/rendering/render_box.cpp:
944 (RenderBox::calcHeight):
945 (RenderBox::calcHeightUsing):
947 2005-04-18 David Hyatt <hyatt@apple.com>
949 Back out fix for 4032346, since it is causing garbled image content on many sites.
951 The bug tracking the fix is 4069093.
953 (khtml::RenderBlock::matchedEndLine):
955 2005-04-18 David Hyatt <hyatt@apple.com>
957 Fix the smile in the Acid2 test. Floats should not grow to contain other floats unless height is auto. Otherwise
958 the float should use the specified height.
960 Also fix row 14 of the Acid2 test. Although ambiguous, just modify the table cell baseline alignment code to align
961 to the bottom of the cell's content height if no suitable baseline could be found.
963 * khtml/rendering/render_block.cpp:
964 (khtml::RenderBlock::layoutBlock):
965 * khtml/rendering/render_block.h:
966 (khtml::RenderBlock::firstRootBox):
967 (khtml::RenderBlock::lastRootBox):
968 * khtml/rendering/render_table.cpp:
969 (RenderTableSection::calcRowHeight):
970 (RenderTableCell::baselinePosition):
972 2005-04-15 David Hyatt <hyatt@apple.com>
974 Make sure empty tables honor CSS-specified heights when they have no rows or sections. This is done only
975 in strict mode, since it is not compatible with WinIE.
977 * khtml/rendering/render_table.cpp:
978 (RenderTable::layout):
980 2005-04-15 David Hyatt <hyatt@apple.com>
982 Fix for row 13 of the Acid2 test. Change HTML comment parsing in strict mode to do proper SGML parsing,
983 checking for pairs of -- and only being willing to close the comment if every -- is paired up.
985 * khtml/html/htmltokenizer.cpp:
986 (khtml::HTMLTokenizer::parseComment):
988 2005-04-12 Maciej Stachowiak <mjs@apple.com>
992 - use custom single-threaded malloc for all non-GC JavaScriptCore
993 allocations, for a 9.1% speedup on JavaScript iBench
995 * khtml/ecma/kjs_binding.cpp:
997 * khtml/ecma/kjs_proxy.cpp:
998 (KJSProxyImpl::evaluate):
1000 2005-04-15 David Hyatt <hyatt@apple.com>
1002 Fix the six pixel gap between rows nine and ten of the Acid2 test. Make sure that percentage heights that
1003 resolve to auto are properly treated as though they have auto height by the self-collapsing block check (as per
1004 section 8.3.1, paragraph 7 of the CSS2.1 spec).
1006 * khtml/rendering/render_block.cpp:
1007 (khtml::RenderBlock::isSelfCollapsingBlock):
1009 2005-04-15 David Hyatt <hyatt@apple.com>
1011 The Acid2 test and the reference rendering both make use of overflow:hidden on the <html> element. Turns out
1012 the CSS2.1 wording for this behavior has been revised (based off WinIE/Mozilla behavior). Change our behavior
1013 to match and make <html> overflow apply to the viewport.
1015 * khtml/khtmlview.cpp:
1016 (KHTMLView::applyOverflowToViewport):
1017 (KHTMLView::layout):
1018 * khtml/khtmlview.h:
1019 * khtml/rendering/render_box.cpp:
1020 (RenderBox::setStyle):
1022 2005-04-14 David Hyatt <hyatt@apple.com>
1024 3258403 and 3258402 can now be fixed. min/max-width/height support is now complete. This patch makes them
1025 work for positioned elements and enables us to pass row one of the Acid2 test.
1027 * khtml/rendering/render_box.cpp:
1028 (RenderBox::calcAbsoluteHorizontal):
1029 (RenderBox::calcAbsoluteHorizontalValues):
1030 (RenderBox::calcAbsoluteVertical):
1031 (RenderBox::calcAbsoluteVerticalValues):
1032 * khtml/rendering/render_box.h:
1034 2005-04-12 David Hyatt <hyatt@apple.com>
1036 Working on the Acid2 test, Row 1.
1038 Improve checkChild for the DTD so that it knows what mode a document is in. This allows it to adhere more
1039 strictly to the actual DTD in strict mode and almost strict mode.
1041 Change the <table>-inside-<p> check so that <table> is disallowed inside <p> in
1042 strict mode and almost strict mode. This matches Firefox behavior, which allows <table>
1043 inside <p> only in quirks mode.
1045 * khtml/html/dtd.cpp:
1048 * khtml/html/htmlparser.cpp:
1049 (KHTMLParser::insertNode):
1050 * khtml/html/htmltokenizer.cpp:
1051 (khtml::HTMLTokenizer::parseTag):
1052 * khtml/xml/dom_elementimpl.cpp:
1053 (ElementImpl::childAllowed):
1055 2005-04-12 Vicki Murley <vicki@apple.com>
1059 - fixed <rdar://problem/3760895> Request for including an implementation of the elementFromPoint function
1061 * khtml/dom/dom_doc.cpp:
1062 (DOM::Document::elementFromPoint):
1063 * khtml/dom/dom_doc.h:
1064 * khtml/ecma/kjs_dom.cpp:
1065 (DOMDocumentProtoFunc::tryCall):
1066 * khtml/ecma/kjs_dom.h:
1067 (KJS::DOMDocument::):
1068 * khtml/ecma/kjs_dom.lut.h:
1070 * khtml/xml/dom_docimpl.cpp:
1071 (DocumentImpl::elementFromPoint):
1072 * khtml/xml/dom_docimpl.h:
1074 2005-04-12 David Hyatt <hyatt@apple.com>
1076 Beginning of work to support the Acid2 CSS test put forward by the Web Standards Project. Fix
1077 our handling of the rel attribute on <link> elements to do a proper tokenization so that stylesheets
1078 can be recognized even when other keywords are present in the rel attribute.
1080 * khtml/html/html_headimpl.cpp:
1081 (HTMLLinkElementImpl::HTMLLinkElementImpl):
1082 (HTMLLinkElementImpl::parseHTMLAttribute):
1083 (HTMLLinkElementImpl::tokenizeRelAttribute):
1084 (HTMLLinkElementImpl::process):
1085 * khtml/html/html_headimpl.h:
1087 2005-04-12 John Sullivan <sullivan@apple.com>
1089 - fixed these two bugs (I also fixed these on the experimental-ui-branch)
1090 <rdar://problem/3154293> Find Next should not scroll page if the next target is already visible
1091 <rdar://problem/3121828> scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll
1095 * kwq/KWQKHTMLPart.mm:
1096 (KWQKHTMLPart::jumpToSelection):
1097 Trey had written code to address these issues, but left it commented out due to other
1098 problems. The other problems no longer occur, so I uncommented Trey's code, and then
1099 discovered that I could make it behave more like TextEdit with many fewer lines of
1102 2005-04-08 David Harrison <harrison@apple.com>
1104 Reviewed by Dave Hyatt.
1106 <rdar://problem/4084106> Remove NSAccessibilityForegroundColorTextAttributeWrapper
1108 * kwq/KWQAccObject.mm:
1109 (AXAttributeStringSetStyle):
1110 Use NSAccessibilityForegroundColorTextAttribute directly.
1112 2005-04-05 David Hyatt <hyatt@apple.com>
1114 Fix for 4077106, make sure that mouse wheeling in overflow sections uses 40 rather than 10 as the base line
1119 * khtml/rendering/render_layer.cpp:
1120 (RenderLayer::positionScrollbars):
1121 * kwq/KWQScrollBar.mm:
1122 (QScrollBar::scroll):
1124 2005-04-04 Vicki Murley <vicki@apple.com>
1128 - fixed <rdar://problem/3871669> no focus or blur methods on HTML button elements
1130 * khtml/dom/html_form.cpp:
1131 (HTMLButtonElement::focus):
1132 (HTMLButtonElement::blur):
1133 * khtml/dom/html_form.h:
1134 * khtml/ecma/kjs_html.cpp:
1135 (KJS::HTMLElementFunction::tryCall):
1136 * khtml/ecma/kjs_html.h:
1137 (KJS::HTMLElement::):
1138 * khtml/ecma/kjs_html.lut.h:
1140 * khtml/html/html_formimpl.cpp:
1141 (DOM::HTMLButtonElementImpl::blur):
1142 (DOM::HTMLButtonElementImpl::focus):
1143 * khtml/html/html_formimpl.h:
1147 2005-03-28 David Harrison <harrison@apple.com>
1151 <rdar://problem/4069161> REGRESSION (8A416-8A419): Safari crash bringing up context menu for non-HTML content in a frame
1153 * kwq/KWQAccObject.mm:
1154 (-[KWQAccObject rendererForView:]):
1155 Nil-check node variable instead of rechecking document variable.
1159 2005-03-27 Darin Adler <darin@apple.com>
1161 Reviewed by me, fix by Kida-san.
1163 - fixed <rdar://problem/4067474> 8A424: Safari immediately quit by Cmd+Ctrll+'D'
1165 * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]):
1170 2005-03-24 Richard Williamson <rjw@apple.com>
1172 Fixed <rdar://problem/4052683> After adding/removing stocks from Stocks Widget, stock areas went blank
1174 The request was being collected before firing it's load handler.
1175 We now gc protect the request while it's loading.
1179 * khtml/ecma/xmlhttprequest.cpp:
1180 (KJS::XMLHttpRequest::send):
1181 (KJS::XMLHttpRequest::abort):
1182 (KJS::XMLHttpRequest::slotFinished):
1183 (KJS::XMLHttpRequestProtoFunc::tryCall):
1187 2005-03-23 Darin Adler <darin@apple.com>
1189 Further fix for 4053515.
1191 Covered cases where text position doesn't lie inside a
1194 Reviewed by Richard.
1196 * khtml/editing/visible_text.cpp:
1197 (khtml::TextIterator::setRangeFromLocationAndLength):
1199 2005-03-23 Richard Williamson <rjw@apple.com>
1201 Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
1203 We now use actual document NSRanges to represent both marked text
1204 ranges and selection ranges.
1208 * khtml/editing/visible_text.cpp:
1209 (khtml::TextIterator::rangeLength):
1210 (khtml::TextIterator::setRangeFromLocationAndLength):
1211 * khtml/editing/visible_text.h:
1212 * kwq/WebCoreBridge.h:
1213 * kwq/WebCoreBridge.mm:
1214 (-[WebCoreBridge convertToNSRange:DOM::]):
1215 (-[WebCoreBridge DOM::convertToDOMRange:]):
1216 (-[WebCoreBridge selectNSRange:]):
1217 (-[WebCoreBridge markedTextDOMRange]):
1218 (-[WebCoreBridge markedTextNSRange]):
1220 2005-03-22 Kevin Decker <kdecker@apple.com>
1224 Fixed <rdar://problem/4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
1226 Rolled out the fix for <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
1228 We clearly need a better solution to 4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a <script> tag, which is evaluated and executed at page load time, this becomes a problem since we don't reevaluate a page's <script> that is in the back/forward cache. Thus once you leave the page, the listeners are gone for good. This is the problem.
1230 * khtml/khtml_part.cpp:
1231 (KHTMLPart::closeURL):
1232 * khtml/xml/dom_docimpl.cpp:
1233 (DocumentImpl::detach):
1237 2005-03-22 Vicki Murley <vicki@apple.com>
1239 - roll the fix for <rdar://problem/4060266> back in, since its
1242 * khtml/editing/visible_text.cpp:
1243 (khtml::TextIterator::handleTextBox):
1245 2005-03-22 Vicki Murley <vicki@apple.com>
1247 - roll out the fix for <rdar://problem/4060266> since it was denied by CCC
1249 * khtml/editing/visible_text.cpp:
1250 (khtml::TextIterator::handleTextBox):
1252 2005-03-22 David Harrison <harrison@apple.com>
1256 <rdar://problem/4060266> Double-clicking in Dictionary.app doesn't work for some words (coming just after style change)
1258 * khtml/editing/visible_text.cpp:
1259 (khtml::TextIterator::handleTextBox):
1260 Complete the check of whether to emit space for collapsed space.
1262 2005-03-22 David Harrison <harrison@apple.com>
1266 <rdar://problem/4061443> REGRESSION (8A420-8A421): Pasting in the Stickies widget is broken again
1268 * khtml/editing/htmlediting.cpp:
1269 (khtml::positionBeforeContainingSpecialElement):
1270 (khtml::positionAfterContainingSpecialElement):
1271 Return unchanged Position rather than a null or non-editable one.
1275 2005-03-20 Ken Kocienda <kocienda@apple.com>
1279 I made an error in this test earlier. It was not testing what I intended. Fixed.
1281 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt
1282 * layout-tests/editing/unsupported-content/list-delete-001.html
1286 * layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added.
1287 * layout-tests/editing/unsupported-content/table-delete-001.html: Added.
1288 * layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added.
1289 * layout-tests/editing/unsupported-content/table-delete-002.html: Added.
1290 * layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added.
1291 * layout-tests/editing/unsupported-content/table-delete-003.html: Added.
1292 * layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added.
1293 * layout-tests/editing/unsupported-content/table-type-after.html: Added.
1294 * layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added.
1295 * layout-tests/editing/unsupported-content/table-type-before.html: Added.
1297 2005-03-20 Darin Adler <darin@apple.com>
1301 - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset
1303 * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.
1305 2005-03-20 David Harrison <harrison@apple.com>
1309 <rdar://problem/4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
1311 SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
1312 when checking whether moving back across block boundaries
1314 VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
1316 All editing tests pass.
1318 * khtml/editing/visible_text.cpp:
1319 (khtml::SimplifiedBackwardsTextIterator::advance):
1320 * khtml/editing/visible_units.cpp:
1321 (khtml::previousBoundary):
1323 2005-03-20 Darin Adler <darin@apple.com>
1325 Reviewed by Harrison.
1327 - fixed <rdar://problem/4059914> when you select all of a frame's content, need to select the frame in the parent document so it can be easily deleted
1329 * khtml/khtml_part.h: Added selectFrameElementInParentIfFullySelected.
1330 * khtml/khtml_part.cpp:
1332 (KHTMLPart::setFocusNodeIfNeeded): Changed to not set focus to a frame; was not what this function was
1333 intended to do, and caused trouble when trying to select a frame element.
1334 (KHTMLPart::khtmlMouseReleaseEvent): Call selectFrameElementInParentIfFullySelected.
1335 (KHTMLPart::selectAll): Call selectFrameElementInParentIfFullySelected.
1336 (KHTMLPart::selectFrameElementInParentIfFullySelected): Added. Selects the frame element in the parent
1337 if a frame is entirely selected, which makes it easier to delete or replace the frame and is consistent
1338 with the changes Maciej made recently for other elements.
1340 * kwq/WebCoreBridge.mm:
1341 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Call selectFrameElementInParentIfFullySelected.
1342 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Call selectFrameElementInParentIfFullySelected.
1344 2005-03-20 Darin Adler <darin@apple.com>
1346 Reviewed by me, code change by Ken.
1348 - fixed <rdar://problem/4059852> Deleting from first element of list makes content jump to wrong place
1350 * khtml/editing/htmlediting.cpp:
1351 (khtml::isListStructureNode): Added.
1352 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Check for list nodes as well as table nodes.
1354 2005-03-20 Ken Kocienda <kocienda@apple.com>
1358 Added tests to cover new "unsupported content" editing code.
1360 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt: Added.
1361 * layout-tests/editing/unsupported-content/list-delete-001.html: Added.
1362 * layout-tests/editing/unsupported-content/list-delete-002-expected.txt: Added.
1363 * layout-tests/editing/unsupported-content/list-delete-002.html: Added.
1364 * layout-tests/editing/unsupported-content/list-delete-003-expected.txt: Added.
1365 * layout-tests/editing/unsupported-content/list-delete-003.html: Added.
1366 * layout-tests/editing/unsupported-content/list-type-after-expected.txt: Added.
1367 * layout-tests/editing/unsupported-content/list-type-after.html: Added.
1368 * layout-tests/editing/unsupported-content/list-type-before-expected.txt: Added.
1369 * layout-tests/editing/unsupported-content/list-type-before.html: Added.
1371 2005-03-20 Ken Kocienda <kocienda@apple.com>
1377 <rdar://problem/4059578> Entire list deleted, and caret disappears, when delete key hit at end of list
1379 The problem is that a new case in the delete code did not consider when the
1380 downstream end node of the selection might be an ancestor of the upstream start
1381 node. That is the case in this bug. The downstream end is the body element, and
1382 this line of code would delete all the children of the downstream end:
1383 removeChildrenInRangePreservingPosition(m_downstreamEnd.node(), 0,
1384 m_downstreamEnd.offset(), m_upstreamStart);
1386 The fix is to check for this "is ancestor" case, and do some tree logic to find
1387 the right offset of the downstream end node for the call to
1388 removeChildrenInRangePreservingPosition().
1390 * khtml/editing/htmlediting.cpp:
1391 (khtml::DeleteSelectionCommand::handleGeneralDelete): Fixed as described.
1393 2005-03-19 Ken Kocienda <kocienda@apple.com>
1399 <rdar://problem/4059384> Cannot place insertion point correctly in editable text that avoids floating elements
1401 Note: I strongly suspect this bug blocks a complete solution to this other Tiger/P2:
1402 <rdar://problem/4055748> AX: Dictionary pop-up panel shows at wrong place on specific parts of particular pages
1404 * khtml/rendering/render_text.cpp:
1405 (RenderText::caretRect): Change the y-coordinate used to calculate the available width for a line. Height is wrong.
1406 Top of the box containing the text where the click is done is correct. Also, add in the x-offset for the start
1407 of the text box when calculating the available width. If this text box is avoiding a float at the y-coordinate
1408 for the relevant box, failure to add in the amount of float-avoidance will make the text at the coordinates
1409 greater than end-of-line minus float-avoidance ineligible for caret placement.
1411 2005-03-19 Darin Adler <darin@apple.com>
1415 - fixed <rdar://problem/4057594> REGRESSION (125-406): Unrepro crash in HTMLTokenizer::allDataProcessed after hitting Back button
1417 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::allDataProcessed):
1418 To get the part safely after calling end, save a guarded pointer to the view.
1419 The old way could end trying to call a virtual function a part that was destroyed.
1421 2005-03-19 Maciej Stachowiak <mjs@apple.com>
1425 <rdar://problem/4053506> Pasting Tables and Cells in Mail does not allow editing before or after
1426 <rdar://problem/4005954> REGRESSION (Mail): After copy/paste of content containing list element cannot go back to entering text at left side of page
1428 * khtml/editing/htmlediting.cpp:
1429 (khtml::maxDeepOffset):
1430 (khtml::CompositeEditCommand::removeFullySelectedNodePreservingPosition):
1431 (khtml::CompositeEditCommand::removeChildrenInRangePreservingPosition):
1432 (khtml::CompositeEditCommand::removeNodePreservingPosition):
1433 (khtml::CompositeEditCommand::insertBlockPlaceholder):
1434 (khtml::CompositeEditCommand::appendBlockPlaceholder):
1435 (khtml::CompositeEditCommand::forceBlockPlaceholder):
1436 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1437 (khtml::isSpecialElement):
1438 (khtml::isFirstVisiblePositionInSpecialElementInFragment):
1439 (khtml::positionBeforePossibleContainingSpecialElement):
1440 (khtml::positionAfterPossibleContainingSpecialElement):
1441 (khtml::ApplyStyleCommand::applyInlineStyle):
1442 (khtml::DeleteSelectionCommand::initializePositionData):
1443 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
1444 (khtml::DeleteSelectionCommand::handleGeneralDelete):
1445 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1446 (khtml::DeleteSelectionCommand::doApply):
1447 (khtml::InsertParagraphSeparatorCommand::doApply):
1448 (khtml::ReplacementFragment::ReplacementFragment):
1449 (khtml::ReplaceSelectionCommand::doApply):
1450 * khtml/editing/htmlediting.h:
1451 * khtml/editing/visible_position.cpp:
1452 (khtml::isRenderedBR):
1453 (khtml::VisiblePosition::initDownstream):
1454 (khtml::isLastVisiblePositionInBlock):
1455 * khtml/rendering/render_line.cpp:
1456 (khtml::RootInlineBox::closestLeafChildForXPos):
1457 * khtml/xml/dom_nodeimpl.cpp:
1458 (NodeImpl::isBlockFlowOrTable):
1459 (NodeImpl::isEditableBlock):
1460 (NodeImpl::enclosingBlockFlowOrTableElement):
1461 * khtml/xml/dom_nodeimpl.h:
1462 * khtml/xml/dom_position.cpp:
1463 (DOM::Position::upstream):
1464 (DOM::Position::downstream):
1465 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
1466 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
1467 * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
1468 * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
1469 * layout-tests/editing/inserting/insert-3786362-fix-expected.txt:
1471 2005-03-19 John Sullivan <sullivan@apple.com>
1475 - fixed <rdar://problem/4058740> Crash (nil-deref) editing Mail reply
1476 message in KWQKHTMLPart::fontForSelection (MailViewer-723)
1478 * kwq/KWQKHTMLPart.mm:
1479 (KWQKHTMLPart::fontForSelection):
1480 Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
1481 running into it. We're not completely certain, but the check is harmless at worst.
1485 2005-03-18 David Harrison <harrison@apple.com>
1489 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
1491 Also changed WebKit.
1493 * kwq/KWQAccObject.mm:
1494 (-[KWQAccObject rendererForView:]):
1495 New to cover both the WebCore and WebKit NSViews.
1497 (-[KWQAccObject _accessibilityParentForSubview:]):
1498 Use rendererForView.
1500 * kwq/WebCoreFrameView.h:
1501 Add WebCoreBridgeHolder protocol to get access to WebKit NSViews.
1503 2005-03-18 David Harrison <harrison@apple.com>
1505 Reviewed by Darin, Ken.
1507 <rdar://problem/3735625> AX: add AXPress action if an element has an onclick handler
1509 * khtml/dom/html_form.cpp:
1510 (HTMLInputElement::click):
1511 * khtml/html/html_elementimpl.cpp:
1512 (HTMLElementImpl::click):
1513 (HTMLElementImpl::accessKeyAction):
1514 * khtml/html/html_elementimpl.h:
1515 * khtml/html/html_formimpl.cpp:
1516 (DOM::HTMLFormElementImpl::submitClick):
1517 (DOM::HTMLButtonElementImpl::click):
1518 (DOM::HTMLButtonElementImpl::accessKeyAction):
1519 (DOM::HTMLInputElementImpl::click):
1520 (DOM::HTMLInputElementImpl::accessKeyAction):
1521 (DOM::HTMLInputElementImpl::defaultEventHandler):
1522 (DOM::HTMLLabelElementImpl::accessKeyAction):
1523 (DOM::HTMLSelectElementImpl::accessKeyAction):
1524 (DOM::HTMLTextAreaElementImpl::accessKeyAction):
1525 * khtml/html/html_formimpl.h:
1526 * khtml/html/html_inlineimpl.cpp:
1527 (HTMLAnchorElementImpl::defaultEventHandler):
1528 (HTMLAnchorElementImpl::accessKeyAction):
1529 * khtml/html/html_inlineimpl.h:
1530 * khtml/rendering/render_form.cpp:
1531 (RenderFileButton::click):
1532 * khtml/rendering/render_form.h:
1533 * khtml/xml/dom_docimpl.cpp:
1534 (DocumentImpl::defaultEventHandler):
1535 * khtml/xml/dom_elementimpl.h:
1536 (DOM::ElementImpl::accessKeyAction):
1538 (-[DOMHTMLInputElement click]):
1542 * kwq/KWQFileButton.h:
1543 * kwq/KWQFileButton.mm:
1544 (KWQFileButton::click):
1546 Add accessKeyAction parameter about whether to limit to HTMLElementImpl subclasses that JavaScript wants, or to apply to others as well.
1548 Add click() parameter about whether to send the mousedown and mouseup events in addition to the click event.
1550 * kwq/KWQAccObject.mm:
1551 (-[KWQAccObject mouseButtonListener]):
1552 Locate a mousedown, mouseup, or click handler in the current element and its ancestors.
1554 (-[KWQAccObject actionElement]):
1555 (-[KWQAccObject accessibilityIsIgnored]):
1556 (-[KWQAccObject accessibilityPerformAction:]):
1557 Consider mouseButtonListener.
1559 2005-03-18 John Sullivan <sullivan@apple.com>
1563 - fixed <rdar://problem/4002164> maps that include start and end
1564 location don't print right from maps.google.com
1566 I thought I checked this in yesterday but a ChangeLog conflict aborted my checkin
1567 without me noticing.
1569 * khtml/rendering/render_style.cpp:
1570 (RenderStyle::diff):
1571 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
1573 * khtml/rendering/render_style.h:
1574 (khtml::RenderStyle::InheritedFlags::operator==):
1575 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
1576 (khtml::RenderStyle::setBitDefaults):
1578 (khtml::RenderStyle::forceBackgroundsToWhite):
1579 ditto, and method name changed too
1580 (khtml::RenderStyle::setForceBackgroundsToWhite):
1583 * khtml/rendering/render_text.cpp:
1584 (InlineTextBox::paint):
1585 updated for name change; also, compare text against white instead of current bg color
1586 because we no longer actually modify the bg color (previously we would always set
1587 the bg color to white, so the result is the same)
1589 * khtml/xml/dom_docimpl.cpp:
1590 (DocumentImpl::recalcStyle):
1591 updated for name change
1593 * kwq/WebCoreBridge.mm:
1594 (-[WebCoreBridge styleSheetForPrinting]):
1596 (-[WebCoreBridge reapplyStylesForDeviceType:]):
1597 removed the code that called styleSheetForPrinting; we no longer use a stylesheet
1600 * khtml/rendering/render_box.cpp:
1601 (RenderBox::paintBackgroundExtended):
1602 If forceBackgroundsToWhite flag is set, convert background images and
1603 background colors to white background color with no background image.
1605 2005-03-18 Ken Kocienda <kocienda@apple.com>
1611 <rdar://problem/4056718> Pasting quotes the entire message
1613 * khtml/editing/htmlediting.cpp:
1614 (khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing
1615 the end of the pasted content in certain cases. This move logic used to stop once it moved all the
1616 siblings of the node following the last node of the pasted-in content. This means that block elements
1617 could get moved, and if the pasted-in content included a mail blockquote, this could result in
1618 one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or
1619 <table> is seen. This only affected one of the many test cases we have for such scenarios, and
1620 the change to that result makes sense given the code change.
1621 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that
1622 adequately tests the behavior change, so I did not add a new test.
1624 2005-03-17 Ken Kocienda <kocienda@apple.com>
1626 Reviewed by Harrison
1630 <rdar://problem/4051809> 8A413: Cursor-up in a mail message sometimes gets stuck (with specific reproducible case)
1632 * khtml/rendering/render_text.cpp:
1633 (RenderText::positionForCoordinates): Consider two lines: line-above and line-below. If the caret position in line-below
1634 was at an x coordinate between half way through the x coordinate of the last character on the line-above and the
1635 end of that same character, this bug would happen since the positioning code would assume that it could create a
1636 VisiblePosition with a DOWNSTREAM affinity. Now, I check to see if the character position on the line-above is the
1637 last character on that line, and if it is, I use UPSTREAM as the affinity.
1641 2005-03-17 David Harrison <harrison@apple.com>
1643 Reviewed by Darin, Ken.
1645 * khtml/editing/htmlediting.cpp:
1646 (khtml::EditCommandPtr::setEndingSelection):
1647 Fixed typo so that it calls setEndingSelection rather than setStartingSelection.
1648 Commented out this unused method, tho, since this is late in Tiger. Proved unused by successful build after temporarily removing method declaration or implemenation.
1650 2005-03-16 Kevin Decker <kdecker@apple.com>
1654 Fixed <rdar://problem/4046665> REGRESSION (403-405): mypage.apple.com login does not work (hits assertion in Development build)
1656 * kwq/WebCoreBridge.mm:
1657 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Check always came back false when callers would send a nil NSURL to this method. Now we allow the empty url cases, eg., <frame src="">
1659 2005-03-16 Darin Adler <darin@apple.com>
1663 - fixed <rdar://problem/4045203> REGRESSION (125-188): Redundant JS imports crash Safari
1665 * khtml/html/htmltokenizer.h: Take inWRite bool out of NDEBUG ifdef.
1666 * khtml/html/htmltokenizer.cpp:
1667 (khtml::HTMLTokenizer::HTMLTokenizer): Take inWrite bool management code out of NDEBUG ifdef.
1668 (khtml::HTMLTokenizer::write): Ditto. Don't call end if inWrite is true, since it will be called
1669 when you return to the body of the outer write() call.
1670 (khtml::HTMLTokenizer::allDataProcessed): Don't call end() if inWrite is true for the same reason.
1671 (khtml::HTMLTokenizer::finish): Ditto.
1673 * kwq/KWQWidget.mm: (QWidget::getOuterView): Removed bogus assertion that has been vexing us of late.
1675 2005-03-16 David Harrison <harrison@apple.com>
1677 Reviewed by me (written by Patti Yeh).
1679 * kwq/KWQAccObject.mm:
1680 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1681 Use LeftWordIfOnBoundary instead of RightWordIfOnBoundary.
1683 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1684 Use RightWordIfOnBoundary instead of LeftWordIfOnBoundary.
1686 2005-03-16 David Harrison <harrison@apple.com>
1690 <rdar://problem/4054590> AX: Dictionary panel does not work when page is scrolled on Safari
1692 * kwq/KWQAccObject.mm:
1693 (-[KWQAccObject doAXTextMarkerForPosition:]):
1694 Add in the view's contentsX and contentsY to the point.
1696 2005-03-16 David Harrison <harrison@apple.com>
1700 <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements
1702 Also changed WebKit.
1704 * khtml/editing/visible_units.h:
1705 * khtml/editing/visible_units.cpp:
1706 (khtml::startOfEditableContent):
1707 (khtml::endOfEditableContent):
1708 (khtml::inSameEditableContent):
1709 (khtml::isStartOfEditableContent):
1710 (khtml::isEndOfEditableContent):
1713 * kwq/WebCoreBridge.h:
1714 * kwq/WebCoreBridge.mm:
1715 (-[WebCoreBridge canDeleteRange:]):
1718 2005-03-16 Ken Kocienda <kocienda@apple.com>
1724 <rdar://problem/4042935> undo doesn't work properly during inline input
1726 * kwq/WebCoreBridge.h: Declare new method below.
1727 * kwq/WebCoreBridge.mm:
1728 (-[WebCoreBridge replaceMarkedTextWithText:]): New method. Wraps calls to TypingCommand::deleteKeyPressed and
1729 TypingCommand::insertText to map the way that international text input works onto the typing undo system.
1731 2005-03-16 David Harrison <harrison@apple.com>
1735 <rdar://problem/4044336> REGRESSION (8A398-8A409): Option-Delete also deletes space to left of deleted word
1737 * khtml/editing/htmlediting.cpp:
1738 (khtml::DeleteSelectionCommand::initializePositionData):
1739 - skip smart delete if the selection to delete already starts or ends with whitespace
1741 * khtml/khtml_part.cpp:
1742 (KHTMLPart::handleMousePressEventDoubleClick):
1743 - preserve selection on double-click when range is already selected
1745 * khtml/xml/dom_position.cpp:
1746 (DOM::Position::leadingWhitespacePosition):
1747 (DOM::Position::trailingWhitespacePosition):
1748 - fix considerNonCollapsibleWhitespace action (logic was reversed)
1749 - add non-breaking space to the non-collapsable ones
1751 * kwq/WebCoreBridge.mm:
1752 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
1753 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
1754 - these methods do not set the selection, so remove calls to setSelectionGranularity
1756 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
1757 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]):
1758 - set the granularity back to character
1759 - the one exception is that we need to keep word granularity
1760 to preserve smart delete behavior when extending by word
1762 2005-03-15 Maciej Stachowiak <mjs@apple.com>
1766 <rdar://problem/4053266> Pressing return a few times right after a link makes the new blank lines part of the link
1768 * khtml/editing/htmlediting.cpp:
1769 (khtml::InsertLineBreakCommand::doApply): Use
1770 positionOutsideContainingSpecialElement in the right two places.
1771 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
1773 - move all these helper functions higher in the file
1775 * khtml/editing/htmlediting.cpp:
1776 (khtml::isSpecialElement):
1777 (khtml::isFirstVisiblePositionInSpecialElement):
1778 (khtml::positionBeforeNode):
1779 (khtml::positionBeforeContainingSpecialElement):
1780 (khtml::maxRangeOffset):
1781 (khtml::isLastVisiblePositionInSpecialElement):
1782 (khtml::positionAfterNode):
1783 (khtml::positionAfterContainingSpecialElement):
1784 (khtml::positionOutsideContainingSpecialElement):
1786 2005-03-14 Maciej Stachowiak <mjs@apple.com>
1790 <rdar://problem/4049925> Pasting right after a link makes pasted content part of the link (without visible style change)
1792 * khtml/editing/htmlediting.cpp:
1793 (khtml::positionOutsideContainingSpecialElement): made a helper
1794 function that computes a position outside the outermost containing
1795 special element if the passed in position is right at the start or
1797 (khtml::InsertTextCommand::prepareForTextInsertion): use new helper here
1798 (khtml::ReplaceSelectionCommand::doApply): use it here too: this is the fix
1799 (khtml::positionBeforeNode): made static
1800 (khtml::positionBeforeContainingSpecialElement): made static
1801 (khtml::positionAfterNode): made static
1802 (khtml::positionAfterContainingSpecialElement): made static
1804 2005-03-15 Richard Williamson <rjw@apple.com>
1806 Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com
1808 Add non nil style() check.
1810 Reviewed by Dave Harrison.
1812 * khtml/rendering/render_table.cpp:
1813 (RenderTableCell::collapsedRightBorder):
1815 2005-03-15 Kevin Decker <kdecker@apple.com>
1819 Fixed: <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
1821 The reason why UNLOAD_EVENT wouldn't dispatch was because the code would delete all event listeners at the detach() phase which is prior to closeURL().
1823 This fixes a recent regression from:
1825 <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
1827 * khtml/khtml_part.cpp:
1828 (KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM.
1829 * khtml/xml/dom_docimpl.cpp:
1830 (DocumentImpl::detach): Took out the call to removeAllEventListenersFromAllNodes(). If we remove all event listeners here then when KHTMLPart::closeURL() checks for even listeners, it will never have any because they'll already be gone.
1832 2005-03-15 Ken Kocienda <kocienda@apple.com>
1838 <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
1840 Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
1841 keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete
1842 keystrokes are handled made this feature regress. Previous to that change, the backwards delete
1843 key went through separate code that is no longer in the tree that did not set the selection in the way
1846 The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
1847 -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
1848 selection will act to close typing or not.
1850 * kwq/WebCoreBridge.h: Changed header accordingly to change method shown below.
1851 * kwq/WebCoreBridge.mm:
1852 (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method.
1854 2005-03-15 John Sullivan <sullivan@apple.com>
1858 - fixed <rdar://problem/4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame
1860 * kwq/KWQKHTMLPart.mm:
1861 (KWQKHTMLPart::createPart):
1862 Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by
1863 the recent security fix.
1865 2005-03-15 Kevin Decker <kdecker@apple.com>
1867 Reviewed by Ken and Maciej.
1869 New fix for <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
1871 The tokenizer has buffers which mean parsing can continue even after loading is supposed to be stopped. If the loading process was aborted, the tokenizer should abort, too.
1873 * khtml/html/htmltokenizer.cpp:
1874 (khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false.
1875 (khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true.
1876 (khtml::HTMLTokenizer::processToken):
1877 * khtml/html/htmltokenizer.h: Added loadStopped flag. Changed the view pointer from a standard pointer to a QGuardedPtr. This fixes the crash. Now the tokenizer's handle to the view will now automatically nil-out and never dangle.
1878 * khtml/khtml_part.cpp:
1879 (KHTMLPart::closeURL): Notify the tokenizer to stop parsing.
1880 * khtml/xml/xml_tokenizer.cpp:
1881 (khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false.
1882 * khtml/xml/xml_tokenizer.h:
1883 (khtml::Tokenizer::stopParsing): Added.
1885 2005-03-14 David Harrison <harrison@apple.com>
1887 Reviewed by Darin, Maciej.
1889 <rdar://problem/4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly
1891 Also fixes crash by adding nil check.
1893 * khtml/editing/htmlediting.cpp:
1894 (khtml::MoveSelectionCommand::doApply):
1895 Check the node for nil.
1897 * khtml/khtml_part.cpp:
1898 (KHTMLPart::khtmlMouseReleaseEvent):
1899 Use the node from the event rather than from the selection.
1901 2005-03-14 Darin Adler <darin@apple.com>
1903 Reviewed by Harrison.
1905 - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts
1907 * khtml/xml/dom_docimpl.cpp:
1908 (DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak.
1909 (DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed
1910 for that node. Otherwise, we can have empty marker lists for each node forever until the
1912 (DocumentImpl::removeAllMarkers): Added code to dirty the markers.
1913 (DocumentImpl::shiftMarkers): Remove unneeded empty check.
1915 * kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit.
1916 * kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers.
1918 2005-03-14 Richard Williamson <rjw@apple.com>
1920 Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane
1922 A document may be deleted as a consequence of handling an event,
1923 as was the case with Acrobat.app. Ensure that the document is still valid
1924 before passing the event on for further handling.
1926 * khtml/xml/dom_nodeimpl.cpp:
1927 (NodeImpl::dispatchUIEvent):
1929 2005-03-14 Ken Kocienda <kocienda@apple.com>
1933 Added a couple of comments about setChanged() to this code based on my experiences with 4047028.
1935 * khtml/css/css_valueimpl.cpp:
1936 (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties)
1937 (DOM::CSSMutableStyleDeclarationImpl::merge)
1939 2005-03-14 Ken Kocienda <kocienda@apple.com>
1945 <rdar://problem/4047028> Changing quote levels on stylized text causes it to be sent as colored (Blue). Tiger8A410
1947 * khtml/css/css_valueimpl.cpp:
1948 (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): This function now calls setChanged() at the
1949 end of its loop if any properties were removed. This makes the style system update correctly in response
1950 to changes made by this function. The code to paste removes style from the pasted content in a
1951 preliminary step, and the fact that the style system did not update properly left unwanted color
1952 declarations in the document.
1954 2005-03-14 Vicki Murley <vicki@apple.com>
1956 - roll out this change for now, since it was denied by CCC
1958 2005-03-11 David Harrison <harrison@apple.com>
1962 <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running
1964 * kwq/KWQKHTMLPart.mm:
1965 (KWQKHTMLPart::advanceToNextMisspelling):
1966 (KWQKHTMLPart::markMisspellings):
1969 2005-03-14 Ken Kocienda <kocienda@apple.com>
1975 <rdar://problem/4050403> Mail crashes after pasting and deleting the content of one Excel cell
1977 * khtml/editing/htmlediting.cpp:
1978 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add some null checks to the code. This fixes the crash, although
1979 following the steps described in the bug by John Sullivan on 3/14/05 at 10:49 AM will leave us with a "blank line" in
1980 the document that cannot be removed (this is actually an empty table). This is undesirable, however, work Maciej is
1981 doing to fix the general-case problem of trying to edit constructs we do not handle well in editing should fix this
1982 particular case, making the deletion of this "blank line" possible. Maciej is doing this work as part of this bug:
1983 <rdar://problem/4036051> Hard to select (and thus delete) an IFRAME in an editable WebView
1985 2005-03-14 Ken Kocienda <kocienda@apple.com>
1991 <rdar://problem/4029632> Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
1993 The problem is that removeInlineStyle() can remove nodes, and if either the start or end node of the
1994 selection at the time of the call to removeInlineStyle() was in a node that got removed, bad things
1995 would happen. The fix is described below.
1997 * khtml/editing/htmlediting.cpp:
1998 (khtml::maxRangeOffset): Moved this static function to a different place in the file so the code below can use it.
1999 (khtml::ApplyStyleCommand::applyInlineStyle): Calling removeInlineStyle() now has the side effect of
2000 setting the command's ending selection. Now resets start and end using the ending selection after the call to
2001 removeInlineStyle() as it is done elsewhere in this function.
2002 (khtml::ApplyStyleCommand::removeInlineStyle): Track the removal of the start or end node based on
2003 the positions passed in. If either the start or the end node is removed as part of style removal,
2004 set an appropriate replacement start or end that is still in the document.
2008 2005-03-14 Ken Kocienda <kocienda@apple.com>
2012 I need to roll out Kevin's change to fix 3667701. It breaks contextual fragments, and hence breaks
2013 paste in editing (among other things).
2015 * khtml/html/htmltokenizer.cpp: Roll out recent change.
2016 (khtml::HTMLTokenizer::write)
2017 * khtml/html/htmltokenizer.h: Ditto.
2019 2005-03-13 Darin Adler <darin@apple.com>
2021 Reviewed by Ken and Maciej.
2023 - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
2025 * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Changed to give "applewebdata:"
2026 documents the same privileges to open local files that "file:" documents have.
2028 2005-03-13 Kevin Decker <kdecker@apple.com>
2032 Fixed: <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
2034 The problem here was that the tokenizer would continue to receive chunks of data from the loader already
2035 after the view and part had been destroyed. Situations like this could arise when clicking on another link
2036 while still loading the current view, or during self test where we rapidly open, load, and close browser
2039 * khtml/html/htmltokenizer.cpp:
2040 (khtml::HTMLTokenizer::write): Simple nil check against the view.
2041 * khtml/html/htmltokenizer.h: Changed the view pointer from a standard pointer to a QGuardedPtr. The tokenizer's
2042 handle to the view will now automatically nil-out and never dangle.
2044 2005-03-13 Darin Adler <darin@apple.com>
2046 Reviewed by John and Ken.
2048 - fixed <rdar://problem/4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line
2050 Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works.
2052 * khtml/editing/htmlediting.cpp:
2053 (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was
2054 for the case where a "selection contains only a BR right after a block ended". This code was being triggered in
2055 more cases than just that one, and in all the cases I tested, the general delete code works fine.
2056 (khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire
2057 block to understand the case where the end block is outside the start block, but contains the start block.
2058 In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>,
2059 and not the enclosing <div> in the case in the bug.
2061 * layout-tests/editing/deleting/delete-line-015-expected.txt: Added.
2062 * layout-tests/editing/deleting/delete-line-015.html: Added.
2063 * layout-tests/editing/deleting/delete-line-016-expected.txt: Added.
2064 * layout-tests/editing/deleting/delete-line-016.html: Added.
2065 * layout-tests/editing/deleting/delete-line-017-expected.txt: Added.
2066 * layout-tests/editing/deleting/delete-line-017.html: Added.
2067 * layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion
2068 now deletes more than it used to. The old results had an empty text node and <h1> element that were both 0-sized, and now
2069 we delete both of those.
2071 2005-03-13 Darin Adler <darin@apple.com>
2073 - fixed <rdar://problem/4049172> REGRESSION (403-405): Gmail: text box in "Invite a friend" section overlaps other sections
2075 Rolled out fix for <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail
2077 * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Back to previous version of this file.
2079 2005-03-12 Maciej Stachowiak <mjs@apple.com>
2083 <rdar://problem/4046144> RSS pages leave a hole in local file security policy (need to revert feed: exemption)
2085 * kwq/WebCoreBridge.mm:
2086 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Revert
2087 emergency workaround for Safari RSS, now that a new Syndication
2090 2005-03-11 Maciej Stachowiak <mjs@apple.com>
2094 <rdar://problem/4026787> text typed after a link (pasted or Mail Link to this Page) is part of the link, underlined and colored blue
2096 The concept of this change is every time you type at the very
2097 start or very end of a link (even if nested in further inner
2098 elements), the typed text goes outside the link instead of inside.
2100 * khtml/editing/htmlediting.cpp:
2101 (khtml::InsertTextCommand::prepareForTextInsertion): Check whether
2102 we are at the first visible position or last visible position of a
2103 special element. For now this only includes HTML A elements that
2104 are links (i.e. they have an href).
2105 (khtml::isSpecialElement): Helper function that identifies special
2106 elements (for now only links).
2107 (khtml::isFirstVisiblePositionInSpecialElement): Checks if a given DOM
2108 position is equivalent to the first visible position in some containing
2109 editable special element.
2110 (khtml::positionBeforeNode): Returns the DOM position immediately
2112 (khtml::positionBeforeContainingSpecialElement): Gives a DOM
2113 position immediately before the outermost editable containing
2114 special element where the passed-in position is equivalent to the
2115 first visible position.
2116 (khtml::maxRangeOffset): Helper to get the maximum allowed
2117 range/position offset for a node, does the right thing based on
2118 whether the node would use a character offset or child offset.
2119 (khtml::isLastVisiblePositionInSpecialElement): Similar to above,
2120 but for end of node instead of start.
2121 (khtml::positionAfterNode): Ditto.
2122 (khtml::positionAfterContainingSpecialElement): Ditto.
2124 Some layout tests changed - I looked over all the diffs and found
2125 that the only changes were "junk nodes" like empty spans and text
2126 nodes moving from one spot in the tree to another. These changes
2127 are all harmless and do not affect layout or future editing.
2129 * layout-tests/editing/inserting/typing-003-expected.txt:
2130 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
2131 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
2132 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
2133 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
2134 * layout-tests/editing/style/remove-underline-expected.txt:
2135 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt:
2136 * layout-tests/editing/style/remove-underline-in-bold-expected.txt:
2137 * layout-tests/editing/style/typing-style-003-expected.txt:
2138 * layout-tests/editing/style/unbold-in-bold-expected.txt:
2139 * layout-tests/editing/style/underline-expected.txt:
2141 2005-03-11 Adele Amchan <adele@apple.com>
2143 backing out fix for <rdar://problem/4021711> REGRESSION (125-188): blank pages when browsing forum at cooperativeresearch.org - cached external script problem
2145 This caused the following regressions (that we know of):
2146 <rdar://problem/4047445> REGRESSION (Safari-400-403?): Some or all page contents sometimes don't appear (macworld.com)
2147 <rdar://problem/4046153> 8a409: Problem loading Citibank page in Safari 2 (403)
2148 <rdar://problem/4047801> REGRESSION (402-403): .Mac homepage links don't work
2150 * khtml/html/htmltokenizer.cpp:
2151 (khtml::HTMLTokenizer::scriptHandler):
2153 2005-03-11 David Harrison <harrison@apple.com>
2157 <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running
2159 * kwq/KWQKHTMLPart.mm:
2160 (KWQKHTMLPart::advanceToNextMisspelling):
2161 (KWQKHTMLPart::markMisspellings):
2164 2005-03-11 Ken Kocienda <kocienda@apple.com>
2168 * ForwardingHeaders/editing/visible_units.h: Added.
2170 2005-03-11 Ken Kocienda <kocienda@apple.com>
2176 <rdar://problem/4045521> Hitting return key with full line selected does not add blank line as it should
2178 * khtml/editing/htmlediting.cpp:
2179 (khtml::InsertParagraphSeparatorCommand::doApply): Removed some "special-case" code from this
2180 function that would look for a selection that started and ended in a different block, and would
2181 then bail right after the deletion of the selection without inserting a paragraph separator.
2182 This was just wrong. So, the code change is removal only. When the general-case code runs instead
2183 of the erroneous special-case code, the bug goes away.
2187 * layout-tests/editing/inserting/return-key-with-selection-001-expected.txt: Added.
2188 * layout-tests/editing/inserting/return-key-with-selection-001.html: Added.
2189 * layout-tests/editing/inserting/return-key-with-selection-002-expected.txt: Added.
2190 * layout-tests/editing/inserting/return-key-with-selection-002.html: Added.
2191 * layout-tests/editing/inserting/return-key-with-selection-003-expected.txt: Added.
2192 * layout-tests/editing/inserting/return-key-with-selection-003.html: Added.
2194 2005-03-11 David Harrison <harrison@apple.com>
2198 <rdar://problem/4009446> AX: kAXTextMarkerForPositionParameterizedAttribute not working correctly (required for Dictionary pop-up)
2200 * kwq/KWQAccObject.mm:
2201 (-[KWQAccObject accessibilityAttributeValue:]):
2204 (-[KWQAccObject doAXTextMarkerForPosition:]):
2207 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
2208 Use the selection's document instead of the top document, to accommodate frames, etc.
2210 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2211 Fixed parameter processing to look for NSValue instead of AXValue.
2213 2005-03-11 Ken Kocienda <kocienda@apple.com>
2215 Reviewed by Harrison
2219 <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor
2221 This was fixed, then regressed with Harrison's fix for this bug:
2223 <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget
2225 * khtml/editing/htmlediting.cpp:
2226 (khtml::ReplaceSelectionCommand::doApply): My now addresses both problems in a way that they no longer
2229 2005-03-10 Ken Kocienda <kocienda@apple.com>
2235 <rdar://problem/4045511> Copying and pasting end-of-paragraph selection puts insertion point in wrong place
2236 <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
2238 The copy/paste code before this patch had no notion of a "logical newline" at the start of the selection. We have
2239 had a similar notion for "logical newline" at the end of the selection for quite some time. To fix these bugs, we
2240 need to introduce the same idea for selection starts.
2242 * khtml/editing/htmlediting.cpp:
2243 (khtml::ReplacementFragment::ReplacementFragment): Process the "logical newline" at start as we write it out
2244 in markup. Set the bit we added to this object to signify we have such a newline.
2245 (khtml::ReplaceSelectionCommand::doApply): Many, many changes to introduce the new "logical newline" at start concept.
2246 I also tried to simply the code that sets the start position for inserting content to be pasted. I also improved a
2247 weakness in the smart-paste code. Now, we check before and after the paste for whether we need to add a leading or
2248 trailing space. The code previous to this patch only did a "before" check, with the result that we sometimes added
2249 a second space. In other words, the code did not realize that DOM changes done by pasting could cause formerly
2250 unrendered whitespace to become rendered. Also moved line placeholder clean up code to its own function.
2251 (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): New helper that further refines the notion
2252 of when we can remove a line placeholder. The definition is now, "If a line placeholder is at the visible start
2253 and visible end of its line, keep it; otherwise remove it".
2254 * khtml/editing/htmlediting.h: Declare new functions. Rework inlines in ReplacementFragment class to account for
2255 addition of new "logical newline" at start concept.
2256 (khtml::ReplacementFragment::hasInterchangeNewlineAtStart): New accessor.
2257 (khtml::ReplacementFragment::hasInterchangeNewlineAtEnd): Renamed from hasInterchangeNewline(), since before we
2258 only had a bit for the end, hence we did not need to distinguish it from the start.
2259 * khtml/editing/markup.cpp:
2260 (khtml::createMarkup): Added code to detect and write out markup for cases where we have a "logical newline" at start.
2261 * khtml/xml/dom2_rangeimpl.cpp:
2262 (DOM::RangeImpl::startPosition): New helper.
2263 (DOM::RangeImpl::endPosition): Ditto.
2264 * khtml/xml/dom2_rangeimpl.h: Declare new helpers.
2267 * layout-tests/editing/pasteboard/paste-line-endings-001-expected.txt: Added.
2268 * layout-tests/editing/pasteboard/paste-line-endings-001.html: Added.
2269 * layout-tests/editing/pasteboard/paste-line-endings-002-expected.txt: Added.
2270 * layout-tests/editing/pasteboard/paste-line-endings-002.html: Added.
2271 * layout-tests/editing/pasteboard/paste-line-endings-003-expected.txt: Added.
2272 * layout-tests/editing/pasteboard/paste-line-endings-003.html: Added.
2273 * layout-tests/editing/pasteboard/paste-line-endings-004-expected.txt: Added.
2274 * layout-tests/editing/pasteboard/paste-line-endings-004.html: Added.
2275 * layout-tests/editing/pasteboard/paste-line-endings-005-expected.txt: Added.
2276 * layout-tests/editing/pasteboard/paste-line-endings-005.html: Added.
2277 * layout-tests/editing/pasteboard/paste-line-endings-006-expected.txt: Added.
2278 * layout-tests/editing/pasteboard/paste-line-endings-006.html: Added.
2279 * layout-tests/editing/pasteboard/paste-line-endings-007-expected.txt: Added.
2280 * layout-tests/editing/pasteboard/paste-line-endings-007.html: Added.
2281 * layout-tests/editing/pasteboard/paste-line-endings-008-expected.txt: Added.
2282 * layout-tests/editing/pasteboard/paste-line-endings-008.html: Added.
2283 * layout-tests/editing/pasteboard/paste-line-endings-009-expected.txt: Added.
2284 * layout-tests/editing/pasteboard/paste-line-endings-009.html: Added.
2285 * layout-tests/editing/pasteboard/paste-line-endings-010-expected.txt: Added.
2286 * layout-tests/editing/pasteboard/paste-line-endings-010.html: Added.
2290 2005-03-10 Darin Adler <darin@apple.com>
2292 Reviewed by Richard.
2294 - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
2296 * khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Set boolean "got iterator" to true.
2298 2005-03-10 Darin Adler <darin@apple.com>
2302 - fixed <rdar://problem/4042867> "Bigger" changes the font size of too much text when the selection is on a style-change boundary
2304 * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
2305 Advance out of the starting text node if we're at the end of it.
2307 2005-03-10 Darin Adler <darin@apple.com>
2309 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertion for nested calls to write.
2311 2005-03-10 David Harrison <harrison@apple.com>
2315 <rdar://problem/4032346> REGRESSION (Mail): changing 1st line of a URL that wraps to two lines doesn't always update 2nd line
2317 * khtml/rendering/bidi.cpp:
2318 (khtml::RenderBlock::matchedEndLine):
2319 Look at first clean line in case line wrap implicitly dirtied it.
2321 2005-03-10 Maciej Stachowiak <mjs@apple.com>
2325 <rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything
2327 * kwq/WebCoreBridge.mm:
2328 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
2329 feed: and feeds: pages from the local file security check.
2331 2005-03-10 Darin Adler <darin@apple.com>
2333 Change written by Steve Peters, reviewed by me.
2335 - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster
2337 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
2338 Do early outs in a couple of the loops to make things faster.
2340 2005-03-10 Jens Alfke <jens@apple.com>
2344 Fixes <rdar://problem/4040848> "REGR: Sun security-check demo applet does not load". My earlier fix for 3603191 deferred loading the applet until the </applet> tag is reached, so all <param>s will be available. Unfortunately that meant that if the </applet> tag was missing, the applet would never load at all. So instead, the loading needs to happen when the ID_APPLET tag is popped from the parser stack for any reason.
2346 I've restored the old NodeImpl::closeRenderer() method. Except it's now virtual, with a no-op base implementation, and is overridden by HTMLAppletElementImpl, replacing its setAllParamsAvailable method that I added a few weeks ago when fixing 3603191.
2348 This ensures that the applet will get loaded even if there is no explicit </applet> tag.
2350 The changes to htmlparser.cpp back out my earlier change and restore the lines that were deleted on 8/3/04 when the old closeRenderer was removed.
2352 * khtml/html/html_objectimpl.cpp:
2353 (HTMLAppletElementImpl::closeRenderer):
2354 * khtml/html/html_objectimpl.h:
2355 * khtml/html/htmlparser.cpp:
2356 (KHTMLParser::insertNode):
2357 (KHTMLParser::processCloseTag):
2358 (KHTMLParser::popOneBlock):
2359 * khtml/xml/dom_nodeimpl.h:
2360 (DOM::NodeImpl::closeRenderer):
2362 2005-03-10 Ken Kocienda <kocienda@apple.com>
2368 <rdar://problem/4024929> REGRESSION (Mail): Pasting text with multiple reply levels removes one level instead of all
2370 The code to figure out which node to use to merge into an existing line did not drill into the first inline element
2371 as needed to make the feature work as user expect. Instead, it looked at the first node, and if it was a block, it
2372 skipped that node. This worked for some cases (including the important "paste-as-quotation" case) but obviously
2373 doesn't work for content quoted more than once.
2375 Now, mergeStartNode() will look for the first node in pasted content that is not a block. It will now also look
2376 for nodes specially marked by Mail as a node added to make "Paste As Quotation" work. It won't skip those.
2378 NOTE: This change will break Mail's "Paste As Quotation" feature for TOT WebKit users, but this is only a temporary
2379 problem that will exist until we sync up with Mail's pending change to mark nodes as needed in its pasteAsQuotation:
2382 * khtml/editing/html_interchange.h: Add ApplePasteAsQuotation constant used to check for "marked" blockquotes.
2383 * khtml/editing/htmlediting.cpp:
2384 (khtml::ReplacementFragment::mergeStartNode): Look for first node that is either not a block or is marked as
2385 an ApplePasteAsQuotation node.
2386 (khtml::isMailPasteAsQuotationNode): New helper that looks for nodes marked with ApplePasteAsQuotation.
2387 * khtml/editing/htmlediting.h: Updated header for new function.
2389 This test result changed is an acceptable way.
2391 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
2392 * layout-tests/editing/pasteboard/paste-text-013.html
2394 NOTE: This change causes a regression in this layout test:
2396 * layout-tests/editing/pasteboard/paste-text-013.html
2398 This problem will need to be fixed separately, and this bug has been filed to track this problem:
2399 <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
2401 2005-03-09 Maciej Stachowiak <mjs@apple.com>
2403 Reviewed by Richard.
2405 <rdar://problem/4040776> Dashboard (Weather widget) is a memory hog
2407 Change things around so the event listeners for XMLHttpRequest
2408 mark their JS listener objects instead of holding a hard
2409 reference, to avoid an unbreakable reference cycle.
2411 * khtml/ecma/kjs_events.cpp:
2412 (JSAbstractEventListener::JSAbstractEventListener):
2413 (JSAbstractEventListener::~JSAbstractEventListener):
2414 (JSAbstractEventListener::handleEvent):
2415 (JSAbstractEventListener::eventListenerType):
2416 (JSUnprotectedEventListener::JSUnprotectedEventListener):
2417 (JSUnprotectedEventListener::~JSUnprotectedEventListener):
2418 (JSUnprotectedEventListener::listenerObj):
2419 (JSUnprotectedEventListener::windowObj):
2420 (JSUnprotectedEventListener::mark):
2421 (JSEventListener::JSEventListener):
2422 (JSEventListener::~JSEventListener):
2423 (JSEventListener::listenerObj):
2424 (JSEventListener::windowObj):
2425 (JSLazyEventListener::JSLazyEventListener):
2426 * khtml/ecma/kjs_events.h:
2427 * khtml/ecma/kjs_html.h:
2428 * khtml/ecma/kjs_window.cpp:
2429 (Window::getJSEventListener):
2430 (Window::getJSUnprotectedEventListener):
2431 * khtml/ecma/kjs_window.h:
2432 * khtml/ecma/xmlhttprequest.cpp:
2433 (KJS::XMLHttpRequest::putValue):
2434 (KJS::XMLHttpRequest::mark):
2435 * khtml/ecma/xmlhttprequest.h:
2436 * khtml/khtml_part.h:
2438 2005-03-06 Maciej Stachowiak <mjs@apple.com>
2442 <rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content
2444 * khtml/ecma/kjs_html.cpp:
2445 (KJS::HTMLDocument::putValue):
2446 * khtml/ecma/kjs_window.cpp:
2448 (WindowFunc::tryCall):
2450 (LocationFunc::tryCall):
2451 * khtml/khtml_part.cpp:
2453 (KHTMLPart::scheduleLocationChange):
2454 (KHTMLPart::slotRedirect):
2455 (KHTMLPart::processObjectRequest):
2456 * khtml/khtml_part.h:
2457 * khtml/khtmlpart_p.h:
2458 * kwq/KWQKHTMLPart.mm:
2459 (KWQKHTMLPart::openURLRequest):
2460 (KWQKHTMLPart::urlSelected):
2461 (KWQKHTMLPart::createPart):
2462 * kwq/KWQKHTMLPartBrowserExtension.mm:
2463 (KHTMLPartBrowserExtension::createNewWindow):
2464 * kwq/WebCoreBridge.h:
2465 * kwq/WebCoreBridge.mm:
2466 (hasCaseInsensitivePrefix):
2467 (-[WebCoreBridge didNotOpenURL:pageCache:]):
2468 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]):
2470 2005-03-09 Richard Williamson <rjw@apple.com>
2472 Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted
2474 Remove our hacked special case now we have our own cache of
2475 which fonts are fixed pitch.
2480 (QFont::isFixedPitch):
2482 2005-03-09 David Harrison <harrison@apple.com>
2486 <rdar://problem/4037141> REGRESSION (Mail): Pasting deletes preceding blank lines with certain steps
2488 * khtml/editing/htmlediting.cpp:
2489 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2490 Add check for anonymous text after blocks.
2492 2005-03-08 Ken Kocienda <kocienda@apple.com>
2498 <rdar://problem/4039661> crash in ApplyStyleCommand::applyBlockStyle pasting contents of webpage into Mail or Blot
2499 <rdar://problem/4039672> hang in moveParagraphContentsToNewBlockIfNecessary after pasting contents of webpage into Blot
2501 * khtml/editing/htmlediting.cpp:
2502 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix for 4039672. Iteration needs to do
2503 a traverseNextSibling(), not a traverseNextNode(). The latter might iterate into a child that already got moved, and
2504 the code can infinite loop as a result.
2505 (khtml::ApplyStyleCommand::applyBlockStyle): Fix for 4039661. This function iterates over a set of nodes to apply
2506 block styles. Before, the iteration would go from the start to the end of the selection, and apply block styles
2507 as it went. However, the act of applying style could confuse the iteration. Now I iterate and store the relevant
2508 nodes in QPtrList before doing any style manipulation, and then iterate that set of nodes.
2510 2005-03-08 Darin Adler <darin@apple.com>
2512 Change written by Hyatt, reviewed by me.
2514 - fixed <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail
2516 * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth):
2517 Only use a minWidth of 0 for images with a percentage value. Other replaced elements aren't scalable
2518 so their minWidth should be their calculated width. This has been wrong all along, but it's a relatively
2519 safe change because it only affects replaced elements' min-width.
2521 2005-03-08 David Harrison <harrison@apple.com>
2525 <rdar://problem/4039006> REGRESSION (Mail): Command-left-arrow goes to the start of the wrong line in particular message
2527 * khtml/editing/visible_units.cpp:
2528 (khtml::startOfLine):
2529 Use firstLeafChild() instead of firstChild().
2531 2005-03-08 Richard Williamson <rjw@apple.com>
2533 Fixed by Tom Madden.
2535 Fixed <rdar://problem/4038586> 8A402: Osaka-Mono text overlaps when typing with input method
2537 We weren't clearing the "all ascii" flag when setting text on
2540 Reviewed by Richard Williamson.
2542 * khtml/rendering/render_text.cpp:
2543 (RenderText::setText):
2545 2005-03-08 Darin Adler <darin@apple.com>
2547 Reviewed by Ken and Maciej.
2549 - fixed <rdar://problem/3988809> REGRESSION (Mail): wide space characters are turned into plain old spaces when typed or pasted
2551 Changed the few places where it matters to use a "collapsible whitespace" concept instead of
2552 the general whitespace concept. This means treating only ' ' and '\n' specially instead of
2553 including other space characters, which matches what the space-collapsing logic does in RenderText,
2554 although it really needs to behave differently based on whitespace mode.
2556 * khtml/editing/visible_text.h: (khtml::isCollapsibleWhitespace): Added. This returns true only for
2557 ' ' and '\n' since they are the only characters collapsed once text is in the DOM. But really it
2558 can't do the job ignoring white-space mode, so some day it must go.
2560 * khtml/editing/html_interchange.cpp: (convertHTMLTextToInterchangeFormat): Changed to use
2561 isCollapsibleWhitespace and removed unnecessary calls to latin1().
2563 * khtml/editing/htmlediting.cpp:
2564 (khtml::isNBSP): Removed unnecessary creation/destruction of QChar each time this is called.
2565 (khtml::nextCharacterIsCollapsibleWhitespace): Renamed from isWS and changed to use isCollapsibleWhitespace.
2566 (khtml::DeleteSelectionCommand::fixupWhitespace): Use isCollapsibleWhitespace instead of isWS,
2567 since we only want to do our NBSP tricks for collapsible whitespace.
2568 (khtml::InsertTextCommand::input): Changed use of isTab to instead say == "\t" since that does the
2569 same thing and is arguably just as clear. Changed use of isWS to == " " since the input text can't
2570 include any "\n" characters, and really a plain old space is the only collapsible thing that can
2571 be passed in. Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for
2572 collapsible whitespace, not all whitespace.
2573 (khtml::InsertTextCommand::insertSpace): Use isCollapsibleWhitespace instead of isWS since we want
2574 to do NBSP tricks only for collapsible whitespace, not all whitespace.
2575 (khtml::RebalanceWhitespaceCommand::doApply): Ditto.
2577 * khtml/xml/dom_position.h: Changed treatNBSPAsWhiteSpace parameters to considerNonCollapsibleWhitespace
2578 parameters. The most common callers are only interested in collapsible whitespace, and the smart copy
2579 and paste callers want to include all whitespace, including non-breaking spaces and all the Unicode spaces.
2580 * khtml/xml/dom_position.cpp:
2581 (DOM::Position::leadingWhitespacePosition): Rename the parameter, and use either QChar::isSpace or
2582 isCollapsibleWhitespace depending on the boolean passed in.
2583 (DOM::Position::trailingWhitespacePosition): Ditto.
2585 2005-03-07 John Sullivan <sullivan@apple.com>
2589 - <rdar://problem/4040868> REGRESSION (Mail, 403-403+): Drag and drop deletes text,
2590 many other bad editing problems
2592 * khtml/rendering/render_text.cpp:
2593 (RenderText::caretMaxOffset):
2594 A "-" should have been a "+" in this method that was tweaked an hour ago. Editing
2595 was completely horked.
2597 2005-03-07 Richard Williamson <rjw@apple.com>
2599 Additional nil check from fix for 4040749.
2601 * khtml/rendering/render_box.cpp:
2602 (RenderBox::setStyle):
2604 2005-03-07 Richard Williamson <rjw@apple.com>
2606 Additional nil check from fix for 4040749.
2608 * khtml/rendering/render_layer.cpp:
2609 (RenderLayer::updateLayerPosition):
2611 2005-03-07 David Harrison <harrison@apple.com>
2615 <rdar://problem/4033202> REGRESSION (Mail): Can't arrow up at a particular spot in a particular Mail message
2617 Doublecheck that new position is really on a different line, because the VisiblePosition constructor does not.
2618 Filed <rdar://problem/4040763> for that problem.
2620 * khtml/editing/visible_units.cpp:
2621 (khtml::previousLinePosition):
2623 2005-03-07 Richard Williamson <rjw@apple.com>
2625 Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com
2627 When layers are dynamically created/removed as a result of changing opacity they weren't being correctly
2628 sized and positioned. This happens whenever opacity goes from < 1 to 1.
2632 * khtml/rendering/render_box.cpp:
2633 (RenderBox::setStyle):
2634 * khtml/rendering/render_layer.cpp:
2635 (RenderLayer::updateLayerPosition):
2637 2005-03-07 Christy Warren <kali@apple.com>
2641 * khtml/rendering/render_text.cpp:
2642 (RenderText::caretMinOffset): modified to handle BIDI case by checking all text boxes for min offset
2643 (RenderText::caretMaxOffset): modified to handle BIDI case by checking all text boxes for max offset
2645 2005-03-07 David Harrison <harrison@apple.com>
2649 <rdar://problem/4029225> REGRESSION (Mail): Crash if hit return after dragging in attachment - DeleteSelectionCommand::initializePositionData
2651 Work around the fact that the height() of a BR is 0 if there are no text elements on the line, even if there are replaced elements.
2652 Filed <rdar://problem/4040358> RenderBR height() is not accurate.
2654 * khtml/editing/htmlediting.cpp:
2655 (khtml::ReplaceSelectionCommand::doApply):
2656 When height is 0, double check that the placeholder is the first position on the line.
2660 2005-03-07 Ken Kocienda <kocienda@apple.com>
2666 <rdar://problem/4040136> Expose SPI for WebCore's functions to create document fragments from plain text and markup strings
2668 * kwq/DOMHTML.mm: Add two new SPI functions.
2669 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:])
2670 (-[DOMHTMLDocument _createDocumentFragmentWithText:])
2671 * kwq/DOMPrivate.h: Declare the new SPI here, a privately-exported header, so Mail can make use of it.
2673 2005-03-07 Ken Kocienda <kocienda@apple.com>
2679 <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date
2681 * khtml/editing/htmlediting.cpp:
2682 (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running
2683 when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already
2684 in the content needs to be preserved. A simple one-line change now sees to this.
2686 * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless,
2687 <br> at the end of a paragraph. This makes sense given the code change.
2690 * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added.
2691 * layout-tests/editing/pasteboard/paste-text-018.html: Added.
2693 2005-03-07 Ken Kocienda <kocienda@apple.com>
2699 <rdar://problem/4035648> REGRESSION (Mail): line feed in source HTML file causes bad copy/paste behavior
2701 The createMarkup() function in markup.cpp iterates over the nodes in a range,
2702 and does some bookkeeping to figure out when to add close tags to the markup.
2703 Some code added at the start of the loop to prevent markup from being written
2704 for unrendered nodes short-circuited the rest of the loop, and so prevented
2705 the close-tag-writing code from running when it should.
2707 This is why the "plain" text wound up inside of the bold tag in the example
2708 above. The addition of the unrendered return character caused an incorrect
2709 delay in the close tag for the bold element from being written out, with the
2710 result being that it wound up including additional content.
2712 The fix is to add checks for node renderers throughout the loop at the points
2713 where markup is written out for each node. This allows the additional close
2714 tag logic to run as needed.
2716 All layout tests pass with this change.
2718 * khtml/editing/markup.cpp:
2719 (khtml::createMarkup)
2723 * layout-tests/editing/pasteboard/paste-4035648-fix-expected.txt: Added.
2724 * layout-tests/editing/pasteboard/paste-4035648-fix.html: Added.
2726 2005-03-06 Christy Warren <kali@appple.com>
2730 * khtml/rendering/render_text.cpp:
2731 (lastRendererOnPrevLine): helper for RenderText::caretRect
2732 (RenderText::caretRect): added code to properly handle bidi ordered text boxes
2734 2005-03-06 Christy Warren <kali@apple.com>
2738 * khtml/editing/visible_position.cpp: Eliminated code that cuts off searching through the text boxes based on an assumption that breaks under bidi
2739 (khtml::VisiblePosition::isCandidate):
2740 * kwq/KWQFontMetrics.mm:
2741 (QFontMetrics::checkSelectionPoint): Made the initialization of the WebCoreStyle honor the reversed flag
2743 2005-03-05 John Sullivan <sullivan@apple.com>
2747 - fixed <rdar://problem/4038417> Mail crashed in StyleChange::checkForLegacyHTMLStyleChange
2748 when composing a reply
2750 * khtml/editing/htmlediting.cpp:
2751 (khtml::StyleChange::checkForLegacyHTMLStyleChange):
2752 Added missing nil check.
2754 2005-03-05 Darin Adler <darin@apple.com>
2758 - fixed <rdar://problem/4038478> Crash in renderer viewing RSS feed at feed://wvs.topleftpixel.com/index.rdf
2760 * khtml/xml/dom_docimpl.cpp: (widgetForNode): Check for nil before going from node to renderer.
2762 2005-03-05 Darin Adler <darin@apple.com>
2764 Reviewed by Richard.
2766 - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
2768 * khtml/rendering/render_text.cpp:
2769 (getCharacterBreakIterator): Added. Helper that sets up an iterator for the passed-in text.
2770 Shares a single global iterator (fast, albeit not thread-safe).
2771 (RenderText::previousOffset): Changed to call getCharacterBreakIterator.
2772 (RenderText::nextOffset): Ditto.
2774 2005-03-05 Ken Kocienda <kocienda@apple.com>
2780 <rdar://problem/4038267> REGRESSION (Mail): Crash copying and pasting end of paragraph
2782 Code to handle content that has a "logical" newline at the end of the pasted content, and the code
2783 to adjust the selection at the end of the paste operation made an assumption that at least one
2784 node had been inserted by the paste command. This is not necessarily true in the case where the sole content
2785 in the pasted content is one of these "logical" newlines. Adjust some code around so that we don't deref
2786 null, but still adjust the selection correctly for this case. In each of the two functions below, some
2787 null checks have been added, and some code has been rearranged a little bit to continue on through
2788 the end of completeHTMLReplacement, even if no nodes have been inserted. The patch looks bigger and more
2789 complicated than the conceptual change.
2791 * khtml/editing/htmlediting.cpp:
2792 (khtml::ReplaceSelectionCommand::doApply)
2793 (khtml::ReplaceSelectionCommand::completeHTMLReplacement)
2795 * layout-tests/editing/pasteboard/paste-4038267-fix-expected.txt: Added.
2796 * layout-tests/editing/pasteboard/paste-4038267-fix.html: Added.
2798 2005-03-05 Darin Adler <darin@apple.com>
2802 - fixed <rdar://problem/4025918> images copied from Safari with relative src URLs aren't pasted into Mail messages (KURL resolves base URLs incorrectly)
2804 * kwq/KWQKURL.mm: (KURL::KURL): Add a slash at the start of the path if a relative part is adding
2805 a path onto a URL that has "pre-path" bits like host name, but no path yet. This doesn't come up
2806 for http because in that case we add a trailing "/" as part of canonicalization.
2808 2005-03-04 John Sullivan <sullivan@apple.com>
2812 - fixed <rdar://problem/4033705> REGRESSION (Mail): Copy/Paste from Excel
2813 crashes Mail in KWQKHTMLPart::fontForSelection(bool*) const + 232
2815 * kwq/KWQKHTMLPart.mm:
2816 (KWQKHTMLPart::fontForSelection):
2817 Check for nil startNode, not just nil renderer.
2819 2005-03-04 David Harrison <harrison@apple.com>
2821 Reviewed by Ken, Richard.
2823 <rdar://problem/3996383> REGRESSION (Mail): Deleting all of first line also deletes line ending
2825 Problem was the placeholder check was based on 0 height block, but the block in this
2826 case is the BODY, which has other content even though the paragraph is gone.
2828 * khtml/editing/htmlediting.cpp:
2829 (khtml::CompositeEditCommand::insertBlockPlaceholder):
2830 Now does insert instead of append!
2832 (khtml::CompositeEditCommand::appendBlockPlaceholder):
2833 New. Actually does append.
2835 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
2836 Renamed from insertBlockPlaceholderIfNeeded because it can insert or append. Also accepts "force insert" flag.
2838 (khtml::CompositeEditCommand::removeBlockPlaceholder):
2839 Renamed for succinctness from removeBlockPlaceholderIfNeeded.
2841 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2842 (khtml::DeleteSelectionCommand::moveNodesAfterNode):
2843 Use renamed methods.
2845 (khtml::DeleteSelectionCommand::doApply):
2846 Use addBlockPlaceholderIfNeeded "force insert" flag if deleting whole paragraphs did not leave an empty one.
2848 (khtml::InsertParagraphSeparatorCommand::doApply):
2849 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
2850 (khtml::InsertTextCommand::input):
2851 Use renamed methods.
2853 * khtml/editing/htmlediting.h:
2854 Renamed and new methods per above.
2857 2005-03-04 Chris Blumenberg <cblu@apple.com>
2859 Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after pasting attachment at end of message
2863 * khtml/editing/visible_units.cpp:
2864 (khtml::endOfParagraph): don't consider text nodes that have no rendered characters
2866 2005-03-04 Richard Williamson <rjw@apple.com>
2868 Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going back/forward corrupts HTML pages (google.com)
2870 The parse mode wasn't be restored to the document when going
2875 * kwq/KWQKHTMLPart.mm:
2876 (KWQKHTMLPart::openURLFromPageCache):
2877 * kwq/KWQPageState.h:
2878 * kwq/KWQPageState.mm:
2879 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
2881 2005-03-04 Ken Kocienda <kocienda@apple.com>
2885 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Shame on me!
2886 I landed my last fix without running layout tests. This one changes in a subtle, but
2889 2005-03-04 Ken Kocienda <kocienda@apple.com>
2891 Reviewed by Harrison
2895 <rdar://problem/4032543> REGRESSION (Mail): Mail hangs when quoted text is pasted twice
2897 This code change fixes the bug in a non-obvious way. The root cause of the problem was
2898 that a VisiblePosition created using an affinity originating in Mail code caused
2899 two VisiblePosition objects that should have been equal to differ only in their
2900 affinities, which in turn caused us to run a code path that should not have run.
2902 * khtml/editing/visible_position.cpp:
2903 (khtml::VisiblePosition::VisiblePosition): Added copy constructor.
2904 (khtml::VisiblePosition::next): Factored out inline code that used to be here into new
2905 setAffinityUsingLinePosition() function.
2906 (khtml::isEqualIgnoringAffinity): New helper to handle cases when affinity in equality check does
2907 not matter. However, we want to know about such cases where a VisiblePosition differs only by affinity,
2908 and the code will assert in development when this happens.
2909 (khtml::isNotEqualIgnoringAffinity): Ditto, but not. :)
2910 (khtml::setAffinityUsingLinePosition): New helper function mentioned above. This will "correct"
2911 upstream affinity to downstream if the affinity does not make a difference for the position.
2912 * khtml/editing/visible_position.h:
2913 * khtml/editing/visible_range.h: Wacky bug. The operator== for this class took VisiblePosition classes!
2914 * khtml/editing/visible_units.cpp:
2915 (khtml::isStartOfParagraph): Now performs equality check without regard to affinity.
2916 (khtml::isEndOfParagraph): Ditto.
2917 (khtml::isStartOfBlock): Ditto.
2918 (khtml::isEndOfBlock): Ditto.
2919 * kwq/WebCoreBridge.mm:
2920 (-[WebCoreBridge setSelectedDOMRange:affinity:]): Adjusts the affinity using setAffinityUsingLinePosition()
2923 2005-03-04 Darin Adler <darin@apple.com>
2927 - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut
2929 * khtml/editing/htmlediting.h: Added insertTextRunWithoutNewlines.
2930 * khtml/editing/htmlediting.cpp:
2931 (khtml::InsertTextCommand::input): Added assertion to make sure strings with newlines don't get
2933 (khtml::TypingCommand::insertText): Added. Takes the name of the old function, but is a new
2934 level that breaks runs into lines and inserts each one separately.
2935 (khtml::TypingCommand::insertTextRunWithoutNewlines): Renamed old insertText to this.
2937 * khtml/dom/dom_string.h: Made substring be a const member function.
2938 * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Made this const.
2940 2005-03-04 Darin Adler <darin@apple.com>
2944 - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)
2946 * khtml/css/css_valueimpl.cpp:
2947 (DOM::isLegalIdentifier): Added. Commented out and not used.
2948 (DOM::quoteStringIfNeeded): Quotes the string if needed. For now only if it starts with "#".
2949 (DOM::CSSPrimitiveValueImpl::cssText): Call quoteStringIfNeeded when asked for cssText for an arbitrary string, since we
2950 need text you can re-parse.
2951 (DOM::FontFamilyValueImpl::cssText): Ditto.
2953 * khtml/editing/markup.cpp:
2954 (khtml::startMarkup): Added comments about lack of quoting for attributes.
2955 (khtml::createMarkup): Ditto.
2957 2005-03-04 Adele Amchan <adele@apple.com>
2961 Fix for <rdar://problem/4021711> REGRESSION(125-188) blank pages when browsing forum at cooperativeresearch.org - cached external script problem
2963 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): set flag needToRefCachedScript so we can make sure
2964 notifyFinished is called after pendingSrc is set up with the right data from the cached script
2966 2005-03-04 Ken Kocienda <kocienda@apple.com>
2972 <rdar://problem/4029632> Tiger 8A398:- Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
2974 * khtml/editing/htmlediting.cpp:
2975 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): VisiblePosition constructor
2976 was failing to yield a position for a node just pasted into the document since a layout was needed
2977 for the calculation to come out right. Layout added. Crash gone.
2981 2005-03-03 Chris Blumenberg <cblu@apple.com>
2983 Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard, you're stuck in the same <li> block unless you click out
2985 Reviewed by harrison.
2987 * khtml/rendering/render_line.cpp:
2988 (khtml::RootInlineBox::closestLeafChildForXPos): avoid returning list markers when possible. Also improved heuristic for returning the best InlineBox given the passed X position.
2991 2005-03-03 Ken Kocienda <kocienda@apple.com>
2997 <rdar://problem/4035198> Pasting text with different styles does not get reproducible results
2999 I had a good idea yesterday to improve the way we "fixup" styles after
3000 pasting, but i chose a poor data structure to do it, a map of
3001 nodes-to-styles. In the fixup step, I iterated over the map elements and
3002 did the fixup. However, since the order in which the items would come
3003 out of the map is indeterminate, we got unpredictable results.
3005 So, the concept was good, but the implementation was flawed. I have
3006 fixed this mapping to be a list instead, so the order that nodes are
3007 evaluated in the fixup step is document order. This works nicely.
3009 * khtml/editing/htmlediting.cpp:
3010 (khtml::ReplacementFragment::~ReplacementFragment): No longer need to explicity deref nodes and
3011 styles saved away for later fixup. This is now handled by the new NodeDesiredStyle class.
3012 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls computeAndStoreNodeDesiredStyle,
3013 function renamed from mapDesiredStyleForNode.
3014 Now accepts a QValueList<NodeDesiredStyle> in place of the old map.
3015 (khtml::NodeDesiredStyle::NodeDesiredStyle): New class that represents a node-to-style mapping.
3016 (khtml::NodeDesiredStyle::~NodeDesiredStyle): Ditto.
3017 (khtml::NodeDesiredStyle::operator=): Ditto.
3018 (khtml::ReplaceSelectionCommand::doApply): Now calls computeAndStoreNodeDesiredStyle,
3019 function renamed from mapDesiredStyleForNode.
3020 (khtml::ReplaceSelectionCommand::fixupNodeStyles): Now operates on a QValueList<NodeDesiredStyle> in
3021 place of the old map.
3022 (khtml::computeAndStoreNodeDesiredStyle): Renamed from mapDesiredStyleForNode. Now operates on a
3023 QValueList<NodeDesiredStyle> in place of the old map.
3024 * khtml/editing/htmlediting.h:
3025 (khtml::NodeDesiredStyle): New class that represents a node-to-style mapping.
3026 (khtml::ReplacementFragment::desiredStyles): Now returns a QValueList<NodeDesiredStyle> in place of the old map.
3028 * layout-tests/editing/style/typing-style-003-expected.txt: Results changed in an acceptable way.
3030 2005-03-02 Darin Adler <darin@apple.com>
3034 - fixed <rdar://problem/4029741> REGRESSION (188-189): <input type=text> are cleared when you hide/show them
3036 * khtml/html/html_formimpl.h: Added detach functions for both input and text area elements, since
3037 both have m_valueMatchesRenderer flags.
3038 * khtml/html/html_formimpl.cpp:
3039 (DOM::HTMLInputElementImpl::detach): Set m_valueMatchesRenderer to false, since the renderer is going away.
3040 (DOM::HTMLTextAreaElementImpl::detach): Ditto.
3042 2005-03-02 Ken Kocienda <kocienda@apple.com>
3048 <rdar://problem/4006151> in reply, caret moves to next line after toggling bold style then typing
3050 * khtml/editing/htmlediting.cpp:
3051 (khtml::ApplyStyleCommand::applyInlineStyle): Defer cleaning up empty style until the end of the
3052 function. In some situations, the render tree can get confused when we do this removal up front.
3053 I wish I understood the reasons more deeply, but this bit of code shuffling seems harmless, and
3056 2005-03-02 Darin Adler <darin@apple.com>
3060 - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8
3062 Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check,
3063 rather than relying on high level assumptions about which calls can and can't destroy the HTML element
3064 (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element.
3065 We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems,
3066 because this just avoids nil-dereferencing.
3069 (-[KWQButton becomeFirstResponder]):
3070 (-[KWQButton nextKeyView]):
3071 (-[KWQButton previousKeyView]):
3072 * kwq/KWQListBox.mm:
3073 (-[KWQTableView mouseDown:]):
3074 (-[KWQTableView becomeFirstResponder]):
3075 (-[KWQTableView numberOfRowsInTableView:]):
3076 (-[KWQTableView tableViewSelectionDidChange:]):
3077 (-[KWQTableView tableView:shouldSelectRow:]):
3078 (-[KWQTableView selectionShouldChangeInTableView:]):
3079 * kwq/KWQScrollBar.mm:
3080 (-[KWQScrollBar scroll:]):
3082 (-[KWQSlider mouseDown:]):
3083 (-[KWQSlider slide:]):
3084 (-[KWQSlider becomeFirstResponder]):
3085 (-[KWQSlider nextKeyView]):
3086 (-[KWQSlider previousKeyView]):
3087 * kwq/KWQTextArea.mm:
3088 (-[KWQTextAreaTextView becomeFirstResponder]):
3089 (-[KWQTextAreaTextView resignFirstResponder]):
3090 (-[KWQTextAreaTextView mouseDown:]):
3091 * kwq/KWQTextField.mm:
3092 (-[KWQTextFieldController action:]):
3093 (-[KWQTextFieldController controlTextDidEndEditing:]):
3094 (-[KWQTextFieldController controlTextDidChange:]):
3095 (-[KWQTextFieldController textView:didHandleEvent:]):
3096 (-[KWQTextFieldController setHasFocus:]):
3098 2005-03-02 Richard Williamson <rjw@apple.com>
3100 Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible with Stock widget
3102 We were leaking inline block line boxes. Argh!
3106 * khtml/rendering/render_flow.cpp:
3107 (RenderFlow::dirtyLineBoxes):
3108 * khtml/rendering/render_line.cpp:
3109 (khtml::InlineBox::deleteLine):
3111 2005-03-02 Chris Blumenberg <cblu@apple.com>
3113 Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get the proper style if pasted into newlines
3115 Reviewed by kocienda.
3117 * khtml/editing/htmlediting.cpp:
3118 (khtml::EditCommand::styleAtPosition): new, factored out from calculateStyleBeforeInsertion
3119 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): call styleAtPosition
3120 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): clear new m_insertionStyle ivar
3121 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): deref new m_insertionStyle ivar
3122 (khtml::ReplaceSelectionCommand::doApply): store the style so it later be applied when matching style
3123 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply style from m_insertionStyle when matching style
3124 * khtml/editing/htmlediting.h:
3126 2005-03-02 Maciej Stachowiak <mjs@apple.com>
3130 <rdar://problem/4031718> REGRESSION (401-401+): Safari reproducible crash setting up scope in JSLazyEventListener::parseCode authenticating to bugweb
3132 * khtml/ecma/kjs_events.cpp:
3133 (JSLazyEventListener::parseCode): If originalNode is NULL, don't
3134 mess with the scope chain.
3136 * khtml/html/html_baseimpl.cpp:
3137 (HTMLBodyElementImpl::parseHTMLAttribute): For handlers that are
3138 delcared on body but set on the document, pass NULL to avoid
3139 swizzling the scope chain. It turns out that this is what browsers
3140 do, and it finesses the crash.
3142 2005-03-02 David Harrison <harrison@apple.com>
3146 <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget
3148 * khtml/editing/htmlediting.cpp:
3149 (khtml::ReplaceSelectionCommand::doApply):
3151 2005-03-02 Ken Kocienda <kocienda@apple.com>
3156 <rdar://problem/4020574> REGRESSION (Mail): copy/paste first part of reply-quoted text alters downstream style
3158 The problem was that the operation to move nodes following the newly-pasted nodes did not preserve the
3159 style of these moved nodes. I have generalized some of the functions that compute and preserve styles
3160 for nodes and then apply these styles after a DOM operation.
3162 * khtml/editing/htmlediting.cpp:
3163 (khtml::ReplacementFragment::~ReplacementFragment): Call new derefNodesAndStylesInMap() helper function
3164 in place of old code that had this deref'ing inline.
3165 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls new mapDesiredStyleForNode() helper
3166 function place of old code that had this style computation inline.
3167 (khtml::ReplacementFragment::removeStyleNodes): Updated comment for new helper name.
3168 (khtml::ReplaceSelectionCommand::doApply): Now calls new helpers in place of helpers whose names were changed,
3169 or in place of pre-refactored inline code.
3170 (khtml::ReplaceSelectionCommand::fixupNodeStyles): Renamed from applyStyleToInsertedNodes(). Now generalized
3171 to take the map of nodes to use for the fixup. This makes it possible to call this code with different maps,
3172 and that is needed to fix the bug.
3173 (khtml::mapDesiredStyleForNode): New helper function to compute the inheritable styles for a given node
3174 and map this style to the given node in the given map. This function now also includes the code that was
3175 in the removeBlockquoteColorsIfNeeded(). This latter helper has now been removed.
3176 (khtml::derefNodesAndStylesInMap): Simple helper to deref map members.
3177 * khtml/editing/htmlediting.h:
3178 (khtml::ReplacementFragment::desiredStyles): New helper to return map of nodes-to-desiredStyles.
3180 2005-03-01 Ken Kocienda <kocienda@apple.com>
3186 <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work
3188 * khtml/editing/visible_position.cpp:
3189 (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
3190 check here after deleting all the content in the body element. The special "empty block"
3191 needs to add check for DOM children. A block may have straggling anonymous render children in
3192 some cases, and so the check needs to be (!DOM-kids || !render-kids).
3194 Also, I botched the last checkin trying to split these two patches in my tree. Wrong layout tests
3195 got checked in, I checked in a conflict marker in the Changelog, etc. I fixed everything with this checkin.
3197 2005-03-01 Ken Kocienda <kocienda@apple.com>
3201 Improved fix for this bug:
3203 <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML
3205 Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier.
3207 * khtml/editing/htmlediting.cpp:
3208 (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the
3209 "last in block" situation. Remove special case for "downstream node is in different block" and handle
3210 this case with a little bit of special code in the general insertion case.
3212 Results studied to make sure there were no problems.
3214 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt
3215 * layout-tests/editing/inserting/insert-div-001-expected.txt
3216 * layout-tests/editing/inserting/insert-div-002-expected.txt
3217 * layout-tests/editing/inserting/insert-div-004-expected.txt
3218 * layout-tests/editing/inserting/insert-div-005-expected.txt
3219 * layout-tests/editing/inserting/insert-div-009-expected.txt
3220 * layout-tests/editing/inserting/insert-div-014-expected.txt
3221 * layout-tests/editing/inserting/insert-div-018-expected.txt
3222 * layout-tests/editing/inserting/insert-div-024-expected.txt
3223 * layout-tests/editing/pasteboard/paste-text-011-expected.txt
3224 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
3225 * layout-tests/editing/pasteboard/paste-text-015-expected.txt
3226 * layout-tests/editing/style/block-style-004-expected.txt
3227 * layout-tests/editing/style/block-style-005-expected.txt
3228 * layout-tests/editing/style/block-style-006-expected.txt
3232 * layout-tests/editing/inserting/insert-div-027.html
3233 * layout-tests/editing/inserting/insert-div-027-expected.txt
3235 2005-03-01 David Hyatt <hyatt@apple.com>
3237 Fix for 4030890, regression with <sup> on Google. Fix some bogus != comparison checks in verticalPositionHint.
3241 (RenderObject::getVerticalPosition):
3243 2005-03-01 Chris Blumenberg <cblu@apple.com>
3245 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
3249 * khtml/editing/htmlediting.cpp:
3250 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
3251 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
3252 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
3253 * layout-tests/editing/deleting/smart-delete-001.html: Added.
3254 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
3255 * layout-tests/editing/deleting/smart-delete-002.html: Added.
3257 2005-03-01 Richard Williamson <rjw@apple.com>
3259 Fixed <rdar://problem/4029772> Weather widgets use a lot of memory (more that other widgets)
3261 The string objects created by KWQHeaderStringFromDictionary() leaked.
3263 Reviewed by John Louch.
3266 (KWQHeaderStringFromDictionary):
3268 2005-03-01 Jens Alfke <jens@apple.com>
3272 <rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run
3273 Two fixes for the way we extract the parameter-y goodness from <object> tags.
3275 * khtml/rendering/render_frames.cpp:
3276 (RenderPartObject::updateWidget):
3278 2005-03-01 Richard Williamson <rjw@apple.com>
3280 Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari
3282 The problem was due to incorrect "object truncation" in RenderFlow::paintLines.
3283 We attempt to push objects down if they don't fit on a page at
3284 paint time. If the attempt to push object down failed we just
3285 didn't paint at all.
3289 * khtml/rendering/render_flow.cpp:
3290 (RenderFlow::paintLines):
3292 2005-03-01 Chris Blumenberg <cblu@apple.com>
3294 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
3298 * khtml/editing/htmlediting.cpp:
3299 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
3300 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
3301 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
3302 * layout-tests/editing/deleting/smart-delete-001.html: Added.
3303 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
3304 * layout-tests/editing/deleting/smart-delete-002.html: Added.
3306 2005-03-01 Ken Kocienda <kocienda@apple.com>
3312 <rdar://problem/4030068> Trailing <return> gets eaten when pasted at the end of a document
3314 * khtml/editing/htmlediting.cpp:
3315 (khtml::ReplaceSelectionCommand::doApply): Add code to handle formerly-unhandled end-of-document case.
3317 2005-03-01 Maciej Stachowiak <mjs@apple.com>
3321 <rdar://problem/4003774> REGRESSION(125-181): JavaScript problems @ Yankee/Dixie quiz
3323 Reworked how scopes are set up for event handlers to match other
3324 browser. This includes the following changes: