1 2005-05-05 David Hyatt <hyatt@apple.com>
3 Eliminate the FOUCS on wired.com. innerWidth and innerHeight on window should not do a layout that ignores
4 pending stylesheets, since even if stylesheets are loading the correct window dimensions can be determined with
7 The radar # is 4109888.
11 * khtml/ecma/kjs_window.cpp:
13 (Window::updateLayout):
14 * khtml/ecma/kjs_window.h:
16 2005-05-05 David Hyatt <hyatt@apple.com>
18 Fix for 4109667, sIFR flash replacement technique often malfunctions. This bug occurs when the plugin
19 widget update causes the onload for the document to fire. Because you can be in the middle of a style
20 recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach
21 process when the tree is in a bogus state.
23 The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked
24 during the style recalc process and the code has been patched so that when this situation occurs, the close is
25 deferred until after the style recalc has finished.
27 Reviewed by John Sullivan
29 * khtml/xml/dom_docimpl.cpp:
30 (DocumentImpl::DocumentImpl):
31 (DocumentImpl::recalcStyle):
32 (DocumentImpl::implicitClose):
33 * khtml/xml/dom_docimpl.h:
34 * layout-tests/fast/dynamic/flash-replacement-test.html: Added.
36 2005-05-05 Darin Adler <darin@apple.com>
38 Reviewed by Dave Hyatt.
40 - fixed <rdar://problem/4109564> REGRESSION (Atlanta): maps.google.com doesn't always center California correctly
42 * khtml/ecma/kjs_events.cpp: (offsetFromTarget): Fix two places that said X where they should say Y.
44 2005-05-05 David Harrison <harrison@apple.com>
46 Restore fixed setEndingSelection. Fixed method was ifdef'd out
47 because change was at end of Tiger development, but method is
48 unused. You just can never be _too_ safe.
50 * khtml/editing/htmlediting.cpp:
51 (khtml::EditCommandPtr::setEndingSelection):
53 2005-05-02 Maciej Stachowiak <mjs@apple.com>
57 - renamed NodeBaseImpl to ContainerNodeImpl
59 * khtml/ecma/kjs_dom.cpp:
60 (DOMNodeProtoFunc::tryCall): Avoid use of NodeBaseImpl and avoid
61 use of obsolete checkNoOwner call, use isAncestor instead.
62 * khtml/html/html_elementimpl.cpp:
63 (HTMLElementImpl::setOuterText): Avoid gratuitous use of
65 * khtml/xml/dom_nodeimpl.cpp:
66 (NodeBaseImpl::checkNoOwner): Removed.
68 Ther rest is all just simple renaming.
70 * khtml/xml/dom_docimpl.cpp:
71 (DocumentImpl::DocumentImpl):
72 (DocumentImpl::attach):
73 (DocumentImpl::detach):
74 (DocumentFragmentImpl::DocumentFragmentImpl):
75 * khtml/xml/dom_docimpl.h:
76 * khtml/xml/dom_elementimpl.cpp:
78 (ElementImpl::ElementImpl):
79 (ElementImpl::insertedIntoDocument):
80 (ElementImpl::removedFromDocument):
81 (ElementImpl::attach):
83 * khtml/xml/dom_elementimpl.h:
84 * khtml/xml/dom_nodeimpl.cpp:
85 (ContainerNodeImpl::ContainerNodeImpl):
86 (ContainerNodeImpl::~ContainerNodeImpl):
87 (ContainerNodeImpl::firstChild):
88 (ContainerNodeImpl::lastChild):
89 (ContainerNodeImpl::insertBefore):
90 (ContainerNodeImpl::replaceChild):
91 (ContainerNodeImpl::removeChild):
92 (ContainerNodeImpl::removeChildren):
93 (ContainerNodeImpl::appendChild):
94 (ContainerNodeImpl::hasChildNodes):
95 (ContainerNodeImpl::setFirstChild):
96 (ContainerNodeImpl::setLastChild):
97 (ContainerNodeImpl::checkSameDocument):
98 (ContainerNodeImpl::checkIsChild):
99 (ContainerNodeImpl::addChild):
100 (ContainerNodeImpl::attach):
101 (ContainerNodeImpl::detach):
102 (ContainerNodeImpl::insertedIntoDocument):
103 (ContainerNodeImpl::removedFromDocument):
104 (ContainerNodeImpl::cloneChildNodes):
105 (ContainerNodeImpl::getElementsByTagNameNS):
106 (ContainerNodeImpl::getUpperLeftCorner):
107 (ContainerNodeImpl::getLowerRightCorner):
108 (ContainerNodeImpl::getRect):
109 (ContainerNodeImpl::setFocus):
110 (ContainerNodeImpl::setActive):
111 (ContainerNodeImpl::childNodeCount):
112 (ContainerNodeImpl::childNode):
113 (ContainerNodeImpl::dispatchChildInsertedEvents):
114 (ContainerNodeImpl::dispatchChildRemovalEvents):
115 * khtml/xml/dom_nodeimpl.h:
116 * khtml/xml/dom_xmlimpl.cpp:
117 (DOM::EntityImpl::EntityImpl):
118 (DOM::EntityReferenceImpl::EntityReferenceImpl):
119 (DOM::NotationImpl::NotationImpl):
120 (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl):
121 * khtml/xml/dom_xmlimpl.h:
123 2005-05-04 Vicki Murley <vicki@apple.com>
127 - fix mismatched parentheses in one of the ifdefs
129 * khtml/html/html_headimpl.cpp:
130 (HTMLTitleElementImpl::childrenChanged):
132 2005-05-04 Darin Adler <darin@apple.com>
134 Reviewed by Dave Hyatt.
136 - fixed build rules to match other projects
138 * WebCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles.
139 When built without a build style (by Apple B&I) we want to get the target from the
140 environment. But when built with a build style (by Safari engineers and others), we want
143 * Makefile.am: Took out extra parameters that make command-line building different from
144 Xcode building. Now that this is fixed, you should not get a full rebuild if you switch
145 from command line to Xcode or back.
147 2005-05-04 Vicki Murley <vicki@apple.com>
151 - fixed <rdar://problem/3986228> Not able to load additional script blocks dynamically
153 Run scripts when they're inserted into the document. Use createdByParser bit to make sure
154 that scripts aren't run twice, once while parsing and again when inserting.
156 * khtml/html/html_headimpl.cpp:
157 (HTMLScriptElementImpl::HTMLScriptElementImpl):
158 (HTMLScriptElementImpl::~HTMLScriptElementImpl):
159 (HTMLScriptElementImpl::insertedIntoDocument):
160 (HTMLScriptElementImpl::removedFromDocument):
161 (HTMLScriptElementImpl::notifyFinished):
162 * khtml/html/html_headimpl.h:
163 (DOM::HTMLScriptElementImpl::setCreatedByParser):
164 * khtml/html/htmlparser.cpp:
165 (KHTMLParser::getElement):
166 * khtml/xml/xml_tokenizer.cpp:
167 (khtml::XMLTokenizer::startElement):
169 2005-05-03 David Hyatt <hyatt@apple.com>
171 Normalize all our custom properties in our implementation to be -khtml (remove all the -apple).
173 Make sure that -apple, -khtml, and -moz are all able to be used. -apple and -moz just map to -khtml.
175 Add support for automatically converting -khtml-opacity to opacity (for legacy Safari 1.1 compat).
179 * khtml/css/css_computedstyle.cpp:
181 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
182 * khtml/css/cssparser.cpp:
183 (CSSParser::parseValue):
184 * khtml/css/cssproperties.in:
185 * khtml/css/cssstyleselector.cpp:
186 (khtml::CSSStyleSelector::applyDeclarations):
187 (khtml::CSSStyleSelector::applyProperty):
188 * khtml/css/parser.y:
189 * khtml/ecma/kjs_css.cpp:
192 2005-05-03 Darin Adler <darin@apple.com>
196 * WebCore.pbproj/project.pbxproj: Fix some SYMROOTS that should have been SYMROOT.
198 2005-05-03 David Hyatt <hyatt@apple.com>
200 Fix for 4098281, news.com missing a bunch of content. Make sure not to apply strict SGML parsing
201 when stripping comments out of scripts.
203 New test is comments-in-script.html
205 * khtml/html/htmltokenizer.cpp:
206 (khtml::HTMLTokenizer::parseComment):
208 2005-05-03 David Hyatt <hyatt@apple.com>
210 Remove unused notification to avoid ERROR messages spewing on the acid2 test.
214 * khtml/khtml_part.cpp:
215 (KHTMLPart::processObjectRequest):
216 * khtml/rendering/render_frames.cpp:
217 (RenderPartObject::updateWidget):
218 * khtml/rendering/render_frames.h:
220 2005-05-03 Darin Adler <darin@apple.com>
222 Reviewed by Dave Hyatt.
223 No new layout tests needed.
225 - eliminated the bogus kMin/kMax macros that we had in addition to inline functions
228 * kwq/KWQKGlobal.h: Remove the kMin/kMax macros.
230 * khtml/css/cssstyleselector.cpp:
231 (khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides
233 (khtml::CSSStyleSelector::fontSizeForKeyword): Ditto.
234 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto.
236 - remove unused parameter to dirtyLinesFromChangedChild for clarity
238 * khtml/rendering/render_object.h: Don't take the parameter.
239 * khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto.
241 * khtml/rendering/render_flow.h: Don't take the parameter.
242 * khtml/rendering/render_flow.cpp:
243 (RenderFlow::detach): Don't pass the parameter.
244 (RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter.
246 * khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter.
248 - convert DOM::NodeImpl into an abstract base class by making a couple of functions
249 pure virtual for clarity
251 * khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual.
252 * khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType.
254 2005-05-03 David Hyatt <hyatt@apple.com>
256 Fix for object element to support fallback content. WIth this change Safari passes the Acid2 test.
260 * khtml/css/html4.css:
261 * khtml/html/html_objectimpl.cpp:
262 (HTMLObjectElementImpl::HTMLObjectElementImpl):
263 (HTMLObjectElementImpl::parseHTMLAttribute):
264 (HTMLObjectElementImpl::rendererIsNeeded):
265 (HTMLObjectElementImpl::createRenderer):
266 (HTMLObjectElementImpl::attach):
267 (HTMLObjectElementImpl::detach):
268 (HTMLObjectElementImpl::recalcStyle):
269 (HTMLObjectElementImpl::childrenChanged):
270 (HTMLObjectElementImpl::isURLAttribute):
271 (HTMLObjectElementImpl::isImageType):
272 (HTMLObjectElementImpl::renderFallbackContent):
273 * khtml/html/html_objectimpl.h:
274 * khtml/khtml_part.cpp:
275 (KHTMLPart::requestObject):
276 (KHTMLPart::selectFrameElementInParentIfFullySelected):
277 (KHTMLPart::handleFallbackContent):
278 * khtml/khtml_part.h:
279 * khtml/khtmlpart_p.h:
280 (khtml::ChildFrame::ChildFrame):
281 * khtml/rendering/render_frames.cpp:
282 (RenderPartObject::RenderPartObject):
283 (RenderPartObject::updateWidget):
284 * khtml/rendering/render_frames.h:
285 (khtml::RenderPart::hasFallbackContent):
286 * khtml/rendering/render_replaced.cpp:
287 (RenderReplaced::RenderReplaced):
288 * kwq/KWQKHTMLPart.mm:
289 (KWQKHTMLPart::createPart):
290 * kwq/WebCoreBridge.h:
291 * kwq/WebCoreBridge.mm:
292 (-[WebCoreBridge mainResourceError]):
294 2005-05-01 Darin Adler <darin@apple.com>
296 - move to Xcode native targets and stop checking in generated files
298 * WebCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated
299 files, so we don't have to check them in any more.
300 * Info.plist: Added. Native targets use a separate file for this.
302 * Makefile.am: Removed rule to generate WebCore-combined.exp since this is now handled by the
303 Xcode project. Removed the code to remove the embedded copy of the framework since we don't
304 do that any more. Removed timestamp cleaning rules since we don't use those any more.
306 * WebCore-tests.exp: Removed symbols that aren't really needed. The native target gives an
307 error when you mention a nonexistent symbol, so we can't have them any more.
309 * khtml/css/parser_wrapper.cpp: Added. Shell used to compile parser.cpp since we can't add
310 a generated file easily to the list of files to be compiled.
312 * .cvsignore: Removed various timestamp files.
314 * WebCore-combined.exp: Removed.
315 * force-clean-timestamp: Removed.
316 * force-js-clean-timestamp: Removed.
317 * khtml/.cvsignore: Removed.
318 * khtml/Makefile.am: Removed.
319 * khtml/css/.cvsignore: Removed.
320 * khtml/css/Makefile.am: Removed.
321 * khtml/css/cssproperties.c: Removed.
322 * khtml/css/cssproperties.h: Removed.
323 * khtml/css/cssvalues.c: Removed.
324 * khtml/css/cssvalues.h: Removed.
325 * khtml/css/parser.cpp: Removed.
326 * khtml/css/parser.h: Removed.
327 * khtml/css/tokenizer.cpp: Removed.
328 * khtml/ecma/.cvsignore: Removed.
329 * khtml/ecma/Makefile.am: Removed.
330 * khtml/ecma/kjs_css.lut.h: Removed.
331 * khtml/ecma/kjs_dom.lut.h: Removed.
332 * khtml/ecma/kjs_events.lut.h: Removed.
333 * khtml/ecma/kjs_html.lut.h: Removed.
334 * khtml/ecma/kjs_navigator.lut.h: Removed.
335 * khtml/ecma/kjs_range.lut.h: Removed.
336 * khtml/ecma/kjs_traversal.lut.h: Removed.
337 * khtml/ecma/kjs_views.lut.h: Removed.
338 * khtml/ecma/kjs_window.lut.h: Removed.
339 * khtml/ecma/xmlhttprequest.lut.h: Removed.
340 * khtml/ecma/xmlserializer.lut.h: Removed.
341 * khtml/html/.cvsignore: Removed.
342 * khtml/html/Makefile.am: Removed.
343 * khtml/html/doctypes.cpp: Removed.
344 * khtml/html/kentities.c: Removed.
345 * khtml/misc/.cvsignore: Removed.
346 * khtml/misc/Makefile.am: Removed.
347 * khtml/misc/htmlattrs.c: Removed.
348 * khtml/misc/htmlattrs.h: Removed.
349 * khtml/misc/htmltags.c: Removed.
350 * khtml/misc/htmltags.h: Removed.
351 * kwq/.cvsignore: Removed.
352 * kwq/KWQCharsetData.c: Removed.
353 * kwq/KWQColorData.c: Removed.
354 * kwq/Makefile.am: Removed.
356 2005-05-02 Darin Adler <darin@apple.com>
359 Added two layout tests for regression testing.
361 - redid frameElement (fix for 4091082 below)
363 The first version lacked a security check, and was also broken.
365 * khtml/ecma/kjs_window.cpp:
366 (frameElement): Refactored into separate function; added isSafeScript check.
367 (Window::get): Call the new frameElement function.
369 * layout-tests/fast/frames/frameElement-frame.html: Added.
370 * layout-tests/fast/frames/frameElement-frame-expected.txt: Added.
371 * layout-tests/fast/frames/frameElement-iframe.html: Added.
372 * layout-tests/fast/frames/frameElement-iframe-expected.txt: Added.
373 * layout-tests/fast/frames/resources/frameElement-contents.html: Added.
375 2005-05-02 David Harrison <harrison@apple.com>
379 Fix isStartOfEditableContent and isEndOfEditableContent to return actual, rather than inverted, answers.
380 No Radar. Found this when trying to use isEndOfEditableContent() in some new code.
382 * khtml/editing/visible_units.cpp:
383 (khtml::isStartOfEditableContent):
384 (khtml::isEndOfEditableContent):
387 2005-04-29 Darin Adler <darin@apple.com>
389 Reviewed by David Harrison.
391 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Turn newlines into \n for better dumping.
393 2005-04-29 David Harrison <harrison@apple.com>
397 <rdar://problem/4083333> When deleting link at end of sentence, entire sentence gets deleted
399 * khtml/editing/htmlediting.cpp:
400 (khtml::DeleteSelectionCommand::initializePositionData):
401 Work around bug #4103339 (whose real fix is somewhat risky), so this fix can get into a software update.
403 (khtml::DeleteSelectionCommand::handleGeneralDelete):
404 Add isAncestor check when comparing m_downstreamEnd.node() and m_startNode.
406 * layout-tests/editing/deleting/delete-4083333-fix-expected.txt: Added.
407 * layout-tests/editing/deleting/delete-4083333-fix.html: Added.
409 2005-04-29 Darin Adler <darin@apple.com>
411 Reviewed by Dave Harrison.
413 - changed layout tests to dump more minimal information about caret and selection
415 * kwq/KWQRenderTreeDebug.cpp:
416 (nodePosition): Changed name; now does position relative to document.
417 (writeSelection): Removed upstream/downstream code and changed format slightly.
419 * layout-tests/editing/*-expected.txt: Regenerated in new format.
421 2005-04-29 Darin Adler <darin@apple.com>
423 Reviewed by Chris Blumenberg.
424 Added two layout tests for regression testing.
426 - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
428 * khtml/xml/dom_docimpl.cpp:
429 (DocumentImpl::importNode): Reorganized and partly rewrote this. The change that fixes the bug at
430 hand is to explicitly use XHTML_NAMESPACE for HTML elements, since the old way of getting the namespace
431 will return the null string for HTML elements, and createElementNS will not create an HTML element
432 if passed a null string for the namespace.
433 (DocumentImpl::processHttpEquiv): Removed some bogus getDocument() calls -- no need to call getDocument()
434 in a document object.
435 (DocumentImpl::attrName): Ditto.
436 (DocumentImpl::tagName): Ditto.
437 (DocumentImpl::setFocusNode): Ditto.
439 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::cloneNode): Moved the actual cloning here
440 from ElementImpl::cloneNode, because XMLElementImpl already had its own version, and in here
441 we can use createHTMLElement, which will work properly even in an XML document, and is also slightly
444 * khtml/xml/dom_nodeimpl.h: Added a namespaceURI method function to go along with localName.
445 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::namespaceURI): Added. Returns null string to be consistent
446 with localName (only works on certain types of elements as documented).
447 * khtml/xml/dom_elementimpl.h: Removed ElementImpl::cloneNode (see above). Added an override of
448 namespaceURI for XMLElementImpl.
449 * khtml/xml/dom_elementimpl.cpp: (XMLElementImpl::namespaceURI): Added. Returns the namespace
450 (consistent with localName).
452 * layout-tests/fast/dom/importNodeHTML.html: Added. Tests both importNode and cloneNode (for comparison).
453 * layout-tests/fast/dom/importNodeHTML-expected.txt: Added.
454 * layout-tests/fast/dom/importNodeXML.xhtml: Added. XML version of the same test as above. Tests a different
455 code path, so useful to have.
456 * layout-tests/fast/dom/importNodeXML-expected.txt: Added.
458 2005-04-28 Darin Adler <darin@apple.com>
460 Reviewed by Dave Harrison.
462 - fixed problems preventing us from compiling with gcc 4.0
464 * WebCore.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
465 way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
466 WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
468 * khtml/css/parser.y: Changed some rules that were using a float to pass around an enum to use an
469 int instead to avoid a warning.
470 * khtml/css/parser.cpp: Regenerated.
471 * khtml/css/parser.h: Regenerated.
473 * khtml/ecma/kjs_dom.cpp: (DOMTextProtoFunc::tryCall): Rearranged a return statement to avoid an incorrect
475 * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Initialized a couple of variables to avoid
476 an incorrect warning.
477 * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): Rearranged how we exit from the function to avoid
479 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Changed some %d to %ld where the
480 parameters where long ints.
481 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
482 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
483 * kwq/DOMEvents.mm: (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Rearranged code to avoid a cast
484 that was causing an incorrect warning.
486 (createObjCDOMNode): Broke out as a separate function.
487 (KJS::ScriptInterpreter::createObjcInstanceForValue): Rearranged code to avoid a namespace collision with
488 KJS::DOMNode and the Objective-C DOMNode class.
489 * kwq/KWQFileButton.mm: Made fields of KWQFileButtonAdapter public to avoid an error, new to gcc 4.0,
490 about accessing protected Objective-C fields.
491 * kwq/KWQKHTMLPart.mm:
492 (KWQKHTMLPart::matchLabelsAgainstElement): Rearranged a return statement to avoid an incorrect warning.
493 (KWQKHTMLPart::imageFromRect): Rearranged how this function does its exception handling to avoid a
494 "may be clobbered" warning.
495 * kwq/KWQKJavaAppletWidget.mm: Fixed incorrect import that said "KHTMLView.h" instead of "khtmlview.h".
496 * kwq/KWQObject.mm: Made fields of KWQObjectTimerTarget public to avoid an error, new to gcc 4.0,
497 about accessing protected Objective-C fields.
498 * kwq/WebCoreBridge.mm: (partHasSelection): Used [bridge part] instead of getting directly at instance
499 variable to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields.
501 * WebCore-combined.exp: Regenerated.
502 * WebCore-tests.exp: Added some additional symbols needed by the tests under gcc 4.0.
504 2005-04-28 Darin Adler <darin@apple.com>
506 * WebCore.pbproj/project.pbxproj: Add back the main_thread_malloc files, rolled out by accident.
508 2005-04-27 Adele Peterson <adele@apple.com>
510 Rolling out fix for <rdar://problem/4097849> because the following layout tests were failing:
512 fast/css/namespaces/001
513 fast/css/namespaces/002
514 fast/css/namespaces/004
515 fast/css/namespaces/005
516 fast/css/namespaces/006
520 * khtml/html/html_documentimpl.cpp:
521 * khtml/html/html_documentimpl.h:
522 * khtml/html/html_elementimpl.cpp:
523 (HTMLElementImpl::namespaceURI):
524 * khtml/xml/dom_docimpl.cpp:
525 (DocumentImpl::importNode):
526 (DocumentImpl::createElementNS):
527 (DocumentImpl::createHTMLElement):
528 (DocumentImpl::attrId):
529 (DocumentImpl::tagId):
530 * khtml/xml/dom_docimpl.h:
532 2005-04-27 John Sullivan <sullivan@apple.com>
536 Experimental prototype of user-resizable textareas. All the new code is guarded by
537 #if ALLOW_RESIZING_TEXTAREAS, which is false unless you remove a comment and rebuild.
539 This code allows you to press near the bottom-right corner of any textarea and drag
540 to resize the textarea on the page. It works correctly with textareas in left-aligned
541 or centered blocks, but is weird in right-aligned blocks. It also does something
542 sensible if the width is specified as a % (in that case, you can resize vertically only).
543 The user-created-size survives resizing the window and survives the back/forward cache.
544 It does not survive reloading the page.
546 This complete-lack-of-affordance UI is obviously not shippable, but this proof of concept
547 code could lead to a real user feature.
549 * kwq/KWQTextArea.mm:
550 (-[KWQTextArea getNumColumns:andNumRows:forSize:]):
551 new method that determines cols and rows for a given textarea frame size
552 (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
553 new method that tracks a drag and does a live resize-and-relayout
554 (-[KWQTextAreaTextView mouseDown:]):
555 if the mouse down is in the bottom-right corner, call _trackResizeFromMouseDown:
557 2005-04-27 John Sullivan <sullivan@apple.com>
561 - fixed problem with mouse wheel patch where alt and shift keys were switched
563 * khtml/xml/dom2_eventsimpl.h:
564 use the order cntl, alt, shift, meta in KeyboardEventImpl constructors to match
565 superclass. This isn't necessary to fix the bug, but is better for clarity.
567 * khtml/xml/dom2_eventsimpl.cpp:
568 (KeyboardEventImpl::KeyboardEventImpl):
569 switch parameter order to match superclass. Then pass the parameters to superclass's
570 constructor in the right order.
571 (KeyboardEventImpl::initKeyboardEvent):
572 Pass parameters to superclass's constructor in the right order.
574 2005-04-26 Adele Peterson <adele@apple.com>
576 Fixed by Darin, reviewed by me.
578 Fix for <rdar://problem/4084029> designMode doesn't allow editing when iframe src = "" or = about:blank
580 This change will add an HTML element for empty documents. Now that there will be an HTMLDocument in this case,
581 a body will also be created (see rdar://problem/3758785). This was preventing frames with empty documents from
584 * khtml/html/htmlparser.cpp: (KHTMLParser::finished):
586 Updated these tests to expect the HTML and BODY elements
587 * layout-tests/fast/flexbox/016-expected.txt:
588 * layout-tests/fast/frames/001-expected.txt:
589 * layout-tests/fast/frames/002-expected.txt:
590 * layout-tests/fast/frames/contentWindow_Frame-expected.txt:
591 * layout-tests/fast/frames/contentWindow_iFrame-expected.txt:
592 * layout-tests/fast/frames/empty-frame-src-expected.txt:
594 2005-04-26 Maciej Stachowiak <mjs@apple.com>
596 New test case for <rdar://problem/4092136> reproducible crash in KJS::kjs_fast_realloc loading maps.google.com
598 * layout-tests/fast/js/string-from-char-code-expected.txt: Added.
599 * layout-tests/fast/js/string-from-char-code.html: Added.
601 2005-04-26 Darin Adler <darin@apple.com>
605 - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler
609 - need to test behavior of Windows IE with horizontal scroll wheeling; we currently send a distinct event
610 for that relatively obscure case, which means the event handlers won't fire at all; might be incorrect
611 - overflow scrolling is done after all DOM event handling, but ideally should be done in the overflowing
612 element's default event handler; not important in practice
613 - frame scrolling is done after all DOM event handling, but probably should be done in a default event handler;
614 not sure about this, but it's probably not important in practice and definitely not required
618 * khtml/ecma/kjs_events.h: Added DOMWheelEvent.
619 * khtml/ecma/kjs_events.cpp:
620 (KJS::getDOMEvent): Added a case for wheel event. To be forward looking, I use the event's impl pointer
621 instead of a C++ DOM wrapper. Eventually it will all work this way.
622 (offsetFromTarget): Added. Factored out code to compute offsetX/Y for an event.
623 (DOMMouseEvent::getValueProperty): Changed to call offsetFromTarget for offsetX/Y.
624 (DOMWheelEvent::DOMWheelEvent): Added.
625 (DOMWheelEvent::tryGet): Added.
626 (DOMWheelEvent::getValueProperty): Added.
627 (DOMWheelEventProtoFunc::tryCall): Added. Nothing at the moment, but might get contents later.
629 * khtml/ecma/kjs_dom.h: Added OnMouseWheel to the enum with the list of properties.
630 * khtml/ecma/kjs_dom.cpp: Added onmousewheel as a property of DOM nodes.
631 (DOMNode::getValueProperty): Return the mouse wheel event handler.
632 (DOMNode::putValue): Set the mouse wheel event handler.
634 * khtml/ecma/kjs_window.cpp: Added onmousewheel as a property of the window.
635 (Window::get): Return the mouse wheel event handler.
636 (Window::put): Set the mouse wheel event handler.
638 * khtml/ecma/kjs_window.h: Added OnWindowMouseWheel to the enum with the list of properties.
639 (Other properties distinguish the window handler by lower-casing the initial letter, way too subtle,
640 so I did this one a good way.)
642 * khtml/dom/dom2_events.h: Made the constructors for Event and UIEvent public. There's no good reason
643 for them to be private, and I had to use the UIEvent one in the JavaScript implementation.
647 * khtml/xml/dom2_eventsimpl.h: Added events for mouse wheel and horizontal mouse wheel.
648 Added isWheelEvent function to EventImpl.
649 (DOM::UIEventWithKeyStateImpl): Added. Base class shared by mouse, wheel, and keyboard events.
650 (DOM::MouseRelatedEventImpl): Added. Base class shared by mouse and wheel events.
651 (DOM::WheelEventImpl): Added.
653 * khtml/xml/dom2_eventsimpl.cpp: Added "mousewheel" to list of event names and a placeholder for
654 the horizontal mouse wheel.
655 (EventImpl::isWheelEvent): Added. Returns false.
656 (MouseRelatedEventImpl::MouseRelatedEventImpl): Added. Factored out what's shared between mouse
657 events and wheel events to avoid duplicated code.
658 (MouseRelatedEventImpl::computeLayerPos): Moved to MouseRelatedWheelEventImpl.
659 (MouseEventImpl::MouseEventImpl): Changed since MouseRelatedWheelEventImpl is now the base class
660 so we can share more code with wheel events.
661 (KeyboardEventImpl::KeyboardEventImpl): Changed since UIEventWithKeyStateImpl is now the base class
662 so we can share more code with mouse and wheel events.
663 (WheelEventImpl::WheelEventImpl): Added.
664 (WheelEventImpl::isWheelEvent): Added. Returns true.
666 * khtml/misc/htmlattrs.in: Added "onmousewheel" attribute name.
667 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Added parsing of the
668 "onmousewheel" atribute, consistent with other event handler attributes.
672 * kwq/WebCoreBridge.h: Renamed scrollOverflowWithScrollWheelEvent to sendScrollWheelEvent.
673 * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollWheelEvent:]): Renamed.
675 * kwq/KWQEvent.h: Added Wheel as an event type value.
676 (QWheelEvent::QWheelEvent): Added.
678 (positionForEvent): Updated to know that wheel events have valid positions in them.
679 (orientationForEvent): Added.
680 (deltaForEvent): Added.
681 (QWheelEvent::QWheelEvent): Added.
683 * kwq/KWQKHTMLPart.h: Renamed scrollOverflowWithScrollWheelEvent to wheelEvent.
684 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): Renamed and added code to construct a QWheelEvent
685 and send it along to KHTMLView::viewportWheelEvent, consistent with how mouse events work.
687 * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): Do a hit test to figure out which node to
688 send the event to, and then call dispatchWheelEvent.
690 * khtml/xml/dom_nodeimpl.h: Added dispatchWheelEvent.
691 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWheelEvent): Added.
695 * khtml/ecma/kjs_dom.lut.h: Regenerated.
696 * khtml/ecma/kjs_events.lut.h: Regenerated.
697 * khtml/ecma/kjs_window.lut.h: Regenerated.
698 * khtml/misc/htmlattrs.c: Regenerated.
699 * khtml/misc/htmlattrs.h: Regenerated.
701 2005-04-26 David Harrison <harrison@apple.com>
703 Reviewed by Darin, Maciej.
705 <rdar://problem/4075576> Deleting text in new message borks content
707 Fixed by removing the methods that attempted to preserve the position. The idea
708 of preserving position is a very recent one, and turned out to not actually address
709 the problem it was intended to fix (see below). Further, is unclear how the position
710 could be preserved in a form that could be properly used later on. Therefore,
711 removing the code to work like before is the preferred alternative for this software
712 update. I've written <rdar://problem/4099839> to cover the bug that position
713 preservation was supposed to fix (but did not). Added layout tests for
714 both this bug and 4099839. Also, updated existing tests with correct expected results
715 (delete-at-paragraph-boundaries-003 and 004).
717 * khtml/editing/htmlediting.cpp:
718 (khtml::CompositeEditCommand::removeFullySelectedNode):
719 (khtml::CompositeEditCommand::removeChildrenInRange):
720 (khtml::DeleteSelectionCommand::handleGeneralDelete):
721 * khtml/editing/htmlediting.h:
722 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
723 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
724 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt: Added.
725 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007.html: Added.
726 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt: Added.
727 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008.html: Added.
728 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt: Added.
729 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009.html: Added.
730 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt: Added.
731 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010.html: Added.
733 2005-04-26 Darin Adler <darin@apple.com>
735 - fixed development builds
737 * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions.
739 2005-04-25 David Hyatt <hyatt@apple.com>
741 Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line. Make sure to
742 update line break info for the last dirty line so that when a clean line tries to figure out where it
743 started, it will get an accurate position taking into account the updated string. By doing this, the code
744 will be able to properly distinguish between the old and new positions and not accidentally assume they are
749 * khtml/rendering/render_text.cpp:
750 (RenderText::setTextWithOffset):
752 2005-04-26 Darin Adler <darin@apple.com>
756 - fixed <rdar://problem/4098826> Bezier curves broken in new Safari canvas object (last two parameters parsed incorrectly)
758 * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Fixed incorrect argument indices.
759 Thanks to Brian Campbell who figured out what was wrong.
761 2005-04-17 Maciej Stachowiak <mjs@apple.com>
765 - use single-threaded malloc in places where malloc is hot for an
766 8% speed improvement on cvs-base
768 * ForwardingHeaders/misc/fast_malloc.h: Added.
769 * WebCore.pbproj/project.pbxproj:
770 * khtml/css/css_base.h:
771 * khtml/css/css_ruleimpl.h:
772 * khtml/css/css_valueimpl.h:
773 * khtml/css/cssstyleselector.h:
774 * khtml/misc/arena.cpp:
778 * khtml/misc/main_thread_malloc.cpp: Added.
779 * khtml/misc/main_thread_malloc.h: Added.
780 * khtml/rendering/render_style.h:
781 * khtml/xml/dom2_eventsimpl.h:
782 * khtml/xml/dom2_rangeimpl.h:
783 * khtml/xml/dom2_traversalimpl.h:
784 * khtml/xml/dom2_viewsimpl.h:
785 * khtml/xml/dom_docimpl.h:
786 * khtml/xml/dom_elementimpl.cpp:
787 (NamedAttrMapImpl::NamedAttrMapImpl):
788 (NamedAttrMapImpl::clearAttributes):
789 (NamedAttrMapImpl::operator=):
790 (NamedAttrMapImpl::addAttribute):
791 (NamedAttrMapImpl::removeAttribute):
792 * khtml/xml/dom_elementimpl.h:
793 * khtml/xml/dom_nodeimpl.h:
794 * khtml/xml/dom_stringimpl.h:
795 * kwq/KWQFontFamily.h:
796 * kwq/KWQListImpl.mm:
801 (QString::setBufferFromCFString):
804 2005-04-25 John Sullivan <sullivan@apple.com>
806 Reviewed by Dave Harrison.
808 - fixed <rdar://problem/4098731> [DOMHTMLTextAreaElement cols] returns wrong value (usually zero)
811 (-[DOMHTMLTextAreaElement cols]):
812 use ATTR_COLS instead of ATTR_ACCESSKEY (D'oh!)
813 (-[DOMHTMLTextAreaElement setCols:]):
816 2005-04-25 Darin Adler <darin@apple.com>
820 - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
822 * khtml/xml/dom_docimpl.h: Add virtual functions HTMLElementNamespace and isHTMLNamespace.
823 * khtml/xml/dom_docimpl.cpp:
824 (DocumentImpl::importNode): Rearranged this function and fixed the following problems: 1) made sure to ref node while attributes are
825 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
826 the source document, not the destination document; 3) removed unneeded getDocument() call which just returns this; 4) fixed error
827 handling for cases where an exception happens while processing the children.
828 (DocumentImpl::HTMLElementNamespace): Added. Returns XHTML_NAMESPACE.
829 (DocumentImpl::isHTMLNamespace): Added. Returns true for any namespace that matches XHTML_NAMESPACE (case insensitive).
830 (DocumentImpl::createElementNS): Changed to call isHTMLNamespace, which will cause it to accept the null namespace in an HTML document.
831 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.
832 (DocumentImpl::createHTMLElement): Pass in HTMLElementNamespace() rather than 0 to tagId.
833 (DocumentImpl::attrId): Use isHTMLNamespace instead of allowing the null namespace explicitly.
834 (DocumentImpl::tagId): Ditto.
836 * khtml/html/html_documentimpl.h: Add overrides for HTMLElementNamespace and isHTMLNamespace.
837 * khtml/html/html_documentimpl.cpp:
838 (HTMLDocumentImpl::HTMLElementNamespace): Added. Returns 0 so we use the null string for HTML elements inside HTML documents (as before).
839 (HTMLDocumentImpl::isHTMLNamespace): Added. Allows 0, and then calls base class to check for the actual XHTML namespace. Thus, we allow
840 both no namespace at all and the XHTML namespace inside HTML documents.
842 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::namespaceURI): Changed to call HTMLElementNamespace rather than checking
843 isHTMLDocument. Same result as before, but better division of responsibilities.
845 2005-04-25 Darin Adler <darin@apple.com>
849 - fixed <rdar://problem/4091956> JavaScript drop handlers don't receive more than one dropped item
851 * kwq/KWQClipboard.mm:
852 (cocoaTypeFromMIMEType): Remove some use of compare -- less efficient than a simpler "==" check.
853 Fixed non-GC-safe code to use KWQCFAutorelease instead.
854 (MIMETypeFromCocoaType): Use fromCFString instead of fromNSString to avoid a cast.
855 (KWQClipboard::getData): Rearrange so that we'll use filenames if both filenames and a URL are present, since
856 filenames can accomodate multiple items. Fix bug where we'd return multiple filenames when the type requested
857 is "URL". Fixed loop that computed the count over and over again for the loop termination condition. Check
858 that the data for NSFilenamesPboardType is an NSArray instead of assuming it is.
859 (KWQClipboard::setData): Use isEqualToString: instead of == when comparing types.
861 2005-04-22 David Hyatt <hyatt@apple.com>
863 Fix for 4096878, drop shadow effect not displayed correctly on tbray.org/ongoing/. Block minmaxwidth was
864 broken when negative margins were used and did not properly decrease the max width.
868 * khtml/rendering/render_block.cpp:
869 (khtml::RenderBlock::calcBlockMinMaxWidth):
870 * layout-tests/fast/block/float/034-expected.txt: Added.
871 * layout-tests/fast/block/float/034.html: Added.
872 * layout-tests/fast/block/float/035-expected.txt: Added.
873 * layout-tests/fast/block/float/035.html: Added.
875 2005-04-22 David Hyatt <hyatt@apple.com>
877 Remove some dead code from css_valueimpl. It wasn't used at all.
879 * khtml/css/css_valueimpl.cpp:
880 * khtml/css/css_valueimpl.h:
882 2005-04-22 Darin Adler <darin@apple.com>
884 * khtml/ecma/kjs_html.h: Removed unnecessary bogus class name qualifiers.
886 2005-04-22 David Hyatt <hyatt@apple.com>
888 Fix for 4096681, fix regression in how the list-style property is parsed. It no longer parses when it hits
889 a url in the property value list now, because the list pointer did not get advanced. This fixes alistapart.com.
893 * khtml/css/cssparser.cpp:
894 (CSSParser::parseValue):
895 * layout-tests/fast/lists/009-expected.txt: Added.
896 * layout-tests/fast/lists/009.html: Added.
897 * layout-tests/fast/lists/resources/listmark.gif: Added.
899 2005-04-22 Darin Adler <darin@apple.com>
903 - fixed <rdar://problem/4091082> Google Suggest no longer works due to lack of "frameElement"
905 * khtml/ecma/kjs_window.h: Added FrameElement.
906 * khtml/ecma/kjs_window.cpp: (Window::get): Added "frameElement".
907 * khtml/ecma/kjs_window.lut.h: Regenerated.
909 2005-04-22 Darin Adler <darin@apple.com>
913 - a small editing-related code cleanup
915 * khtml/rendering/render_text.h: Added positionForOffset and made offsetForPosition const.
916 * khtml/rendering/render_text.cpp:
917 (InlineTextBox::offsetForPosition): Made const.
918 (InlineTextBox::positionForOffset): Added. Moved code here from caretRect.
919 (RenderText::caretRect): Call positionForOffset instead of doing the work here.
921 2005-04-21 David Hyatt <hyatt@apple.com>
923 Fix for 4095839, wrong background image used on flechtwerk.de. Make sure that the global mapped
924 attribute cache hashed background attributes into per-document buckets.
926 * khtml/html/html_baseimpl.cpp:
927 (HTMLBodyElementImpl::mapToEntry):
928 * khtml/html/html_elementimpl.h:
930 * khtml/html/html_tableimpl.cpp:
931 (HTMLTableElementImpl::mapToEntry):
932 (HTMLTablePartElementImpl::mapToEntry):
933 * khtml/xml/dom_docimpl.cpp:
934 (DocumentImpl::DocumentImpl):
935 * khtml/xml/dom_docimpl.h:
936 (DOM::DocumentImpl::docID):
938 2005-04-21 Vicki Murley <vicki@apple.com>
940 - layout test for 4065447, outerHTML on images
942 * layout-tests/fast/dynamic/outerHTML-img-expected.txt: Added.
943 * layout-tests/fast/dynamic/outerHTML-img.html: Added.
945 2005-04-20 Vicki Murley <vicki@apple.com>
949 - fixed <rdar://problem/4065447> support outerHTML on IMG elements
951 * khtml/html/html_elementimpl.cpp:
952 (HTMLElementImpl::setOuterHTML):
954 2005-04-18 David Hyatt <hyatt@apple.com>
956 Fix min-height so that when it resolves to auto it does not use the box's intrinsic height.
958 * khtml/rendering/render_box.cpp:
959 (RenderBox::calcHeight):
960 (RenderBox::calcHeightUsing):
962 2005-04-18 David Hyatt <hyatt@apple.com>
964 Back out fix for 4032346, since it is causing garbled image content on many sites.
966 The bug tracking the fix is 4069093.
968 (khtml::RenderBlock::matchedEndLine):
970 2005-04-18 David Hyatt <hyatt@apple.com>
972 Fix the smile in the Acid2 test. Floats should not grow to contain other floats unless height is auto. Otherwise
973 the float should use the specified height.
975 Also fix row 14 of the Acid2 test. Although ambiguous, just modify the table cell baseline alignment code to align
976 to the bottom of the cell's content height if no suitable baseline could be found.
978 * khtml/rendering/render_block.cpp:
979 (khtml::RenderBlock::layoutBlock):
980 * khtml/rendering/render_block.h:
981 (khtml::RenderBlock::firstRootBox):
982 (khtml::RenderBlock::lastRootBox):
983 * khtml/rendering/render_table.cpp:
984 (RenderTableSection::calcRowHeight):
985 (RenderTableCell::baselinePosition):
987 2005-04-15 David Hyatt <hyatt@apple.com>
989 Make sure empty tables honor CSS-specified heights when they have no rows or sections. This is done only
990 in strict mode, since it is not compatible with WinIE.
992 * khtml/rendering/render_table.cpp:
993 (RenderTable::layout):
995 2005-04-15 David Hyatt <hyatt@apple.com>
997 Fix for row 13 of the Acid2 test. Change HTML comment parsing in strict mode to do proper SGML parsing,
998 checking for pairs of -- and only being willing to close the comment if every -- is paired up.
1000 * khtml/html/htmltokenizer.cpp:
1001 (khtml::HTMLTokenizer::parseComment):
1003 2005-04-12 Maciej Stachowiak <mjs@apple.com>
1005 Reviewed by Richard.
1007 - use custom single-threaded malloc for all non-GC JavaScriptCore
1008 allocations, for a 9.1% speedup on JavaScript iBench
1010 * khtml/ecma/kjs_binding.cpp:
1012 * khtml/ecma/kjs_proxy.cpp:
1013 (KJSProxyImpl::evaluate):
1015 2005-04-15 David Hyatt <hyatt@apple.com>
1017 Fix the six pixel gap between rows nine and ten of the Acid2 test. Make sure that percentage heights that
1018 resolve to auto are properly treated as though they have auto height by the self-collapsing block check (as per
1019 section 8.3.1, paragraph 7 of the CSS2.1 spec).
1021 * khtml/rendering/render_block.cpp:
1022 (khtml::RenderBlock::isSelfCollapsingBlock):
1024 2005-04-15 David Hyatt <hyatt@apple.com>
1026 The Acid2 test and the reference rendering both make use of overflow:hidden on the <html> element. Turns out
1027 the CSS2.1 wording for this behavior has been revised (based off WinIE/Mozilla behavior). Change our behavior
1028 to match and make <html> overflow apply to the viewport.
1030 * khtml/khtmlview.cpp:
1031 (KHTMLView::applyOverflowToViewport):
1032 (KHTMLView::layout):
1033 * khtml/khtmlview.h:
1034 * khtml/rendering/render_box.cpp:
1035 (RenderBox::setStyle):
1037 2005-04-14 David Hyatt <hyatt@apple.com>
1039 3258403 and 3258402 can now be fixed. min/max-width/height support is now complete. This patch makes them
1040 work for positioned elements and enables us to pass row one of the Acid2 test.
1042 * khtml/rendering/render_box.cpp:
1043 (RenderBox::calcAbsoluteHorizontal):
1044 (RenderBox::calcAbsoluteHorizontalValues):
1045 (RenderBox::calcAbsoluteVertical):
1046 (RenderBox::calcAbsoluteVerticalValues):
1047 * khtml/rendering/render_box.h:
1049 2005-04-12 David Hyatt <hyatt@apple.com>
1051 Working on the Acid2 test, Row 1.
1053 Improve checkChild for the DTD so that it knows what mode a document is in. This allows it to adhere more
1054 strictly to the actual DTD in strict mode and almost strict mode.
1056 Change the <table>-inside-<p> check so that <table> is disallowed inside <p> in
1057 strict mode and almost strict mode. This matches Firefox behavior, which allows <table>
1058 inside <p> only in quirks mode.
1060 * khtml/html/dtd.cpp:
1063 * khtml/html/htmlparser.cpp:
1064 (KHTMLParser::insertNode):
1065 * khtml/html/htmltokenizer.cpp:
1066 (khtml::HTMLTokenizer::parseTag):
1067 * khtml/xml/dom_elementimpl.cpp:
1068 (ElementImpl::childAllowed):
1070 2005-04-12 Vicki Murley <vicki@apple.com>
1074 - fixed <rdar://problem/3760895> Request for including an implementation of the elementFromPoint function
1076 * khtml/dom/dom_doc.cpp:
1077 (DOM::Document::elementFromPoint):
1078 * khtml/dom/dom_doc.h:
1079 * khtml/ecma/kjs_dom.cpp:
1080 (DOMDocumentProtoFunc::tryCall):
1081 * khtml/ecma/kjs_dom.h:
1082 (KJS::DOMDocument::):
1083 * khtml/ecma/kjs_dom.lut.h:
1085 * khtml/xml/dom_docimpl.cpp:
1086 (DocumentImpl::elementFromPoint):
1087 * khtml/xml/dom_docimpl.h:
1089 2005-04-12 David Hyatt <hyatt@apple.com>
1091 Beginning of work to support the Acid2 CSS test put forward by the Web Standards Project. Fix
1092 our handling of the rel attribute on <link> elements to do a proper tokenization so that stylesheets
1093 can be recognized even when other keywords are present in the rel attribute.
1095 * khtml/html/html_headimpl.cpp:
1096 (HTMLLinkElementImpl::HTMLLinkElementImpl):
1097 (HTMLLinkElementImpl::parseHTMLAttribute):
1098 (HTMLLinkElementImpl::tokenizeRelAttribute):
1099 (HTMLLinkElementImpl::process):
1100 * khtml/html/html_headimpl.h:
1102 2005-04-12 John Sullivan <sullivan@apple.com>
1104 - fixed these two bugs (I also fixed these on the experimental-ui-branch)
1105 <rdar://problem/3154293> Find Next should not scroll page if the next target is already visible
1106 <rdar://problem/3121828> scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll
1110 * kwq/KWQKHTMLPart.mm:
1111 (KWQKHTMLPart::jumpToSelection):
1112 Trey had written code to address these issues, but left it commented out due to other
1113 problems. The other problems no longer occur, so I uncommented Trey's code, and then
1114 discovered that I could make it behave more like TextEdit with many fewer lines of
1117 2005-04-08 David Harrison <harrison@apple.com>
1119 Reviewed by Dave Hyatt.
1121 <rdar://problem/4084106> Remove NSAccessibilityForegroundColorTextAttributeWrapper
1123 * kwq/KWQAccObject.mm:
1124 (AXAttributeStringSetStyle):
1125 Use NSAccessibilityForegroundColorTextAttribute directly.
1127 2005-04-05 David Hyatt <hyatt@apple.com>
1129 Fix for 4077106, make sure that mouse wheeling in overflow sections uses 40 rather than 10 as the base line
1134 * khtml/rendering/render_layer.cpp:
1135 (RenderLayer::positionScrollbars):
1136 * kwq/KWQScrollBar.mm:
1137 (QScrollBar::scroll):
1139 2005-04-04 Vicki Murley <vicki@apple.com>
1143 - fixed <rdar://problem/3871669> no focus or blur methods on HTML button elements
1145 * khtml/dom/html_form.cpp:
1146 (HTMLButtonElement::focus):
1147 (HTMLButtonElement::blur):
1148 * khtml/dom/html_form.h:
1149 * khtml/ecma/kjs_html.cpp:
1150 (KJS::HTMLElementFunction::tryCall):
1151 * khtml/ecma/kjs_html.h:
1152 (KJS::HTMLElement::):
1153 * khtml/ecma/kjs_html.lut.h:
1155 * khtml/html/html_formimpl.cpp:
1156 (DOM::HTMLButtonElementImpl::blur):
1157 (DOM::HTMLButtonElementImpl::focus):
1158 * khtml/html/html_formimpl.h:
1162 2005-03-28 David Harrison <harrison@apple.com>
1166 <rdar://problem/4069161> REGRESSION (8A416-8A419): Safari crash bringing up context menu for non-HTML content in a frame
1168 * kwq/KWQAccObject.mm:
1169 (-[KWQAccObject rendererForView:]):
1170 Nil-check node variable instead of rechecking document variable.
1174 2005-03-27 Darin Adler <darin@apple.com>
1176 Reviewed by me, fix by Kida-san.
1178 - fixed <rdar://problem/4067474> 8A424: Safari immediately quit by Cmd+Ctrll+'D'
1180 * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]):
1185 2005-03-24 Richard Williamson <rjw@apple.com>
1187 Fixed <rdar://problem/4052683> After adding/removing stocks from Stocks Widget, stock areas went blank
1189 The request was being collected before firing it's load handler.
1190 We now gc protect the request while it's loading.
1194 * khtml/ecma/xmlhttprequest.cpp:
1195 (KJS::XMLHttpRequest::send):
1196 (KJS::XMLHttpRequest::abort):
1197 (KJS::XMLHttpRequest::slotFinished):
1198 (KJS::XMLHttpRequestProtoFunc::tryCall):
1202 2005-03-23 Darin Adler <darin@apple.com>
1204 Further fix for 4053515.
1206 Covered cases where text position doesn't lie inside a
1209 Reviewed by Richard.
1211 * khtml/editing/visible_text.cpp:
1212 (khtml::TextIterator::setRangeFromLocationAndLength):
1214 2005-03-23 Richard Williamson <rjw@apple.com>
1216 Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
1218 We now use actual document NSRanges to represent both marked text
1219 ranges and selection ranges.
1223 * khtml/editing/visible_text.cpp:
1224 (khtml::TextIterator::rangeLength):
1225 (khtml::TextIterator::setRangeFromLocationAndLength):
1226 * khtml/editing/visible_text.h:
1227 * kwq/WebCoreBridge.h:
1228 * kwq/WebCoreBridge.mm:
1229 (-[WebCoreBridge convertToNSRange:DOM::]):
1230 (-[WebCoreBridge DOM::convertToDOMRange:]):
1231 (-[WebCoreBridge selectNSRange:]):
1232 (-[WebCoreBridge markedTextDOMRange]):
1233 (-[WebCoreBridge markedTextNSRange]):
1235 2005-03-22 Kevin Decker <kdecker@apple.com>
1239 Fixed <rdar://problem/4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
1241 Rolled out the fix for <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
1243 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.
1245 * khtml/khtml_part.cpp:
1246 (KHTMLPart::closeURL):
1247 * khtml/xml/dom_docimpl.cpp:
1248 (DocumentImpl::detach):
1252 2005-03-22 Vicki Murley <vicki@apple.com>
1254 - roll the fix for <rdar://problem/4060266> back in, since its
1257 * khtml/editing/visible_text.cpp:
1258 (khtml::TextIterator::handleTextBox):
1260 2005-03-22 Vicki Murley <vicki@apple.com>
1262 - roll out the fix for <rdar://problem/4060266> since it was denied by CCC
1264 * khtml/editing/visible_text.cpp:
1265 (khtml::TextIterator::handleTextBox):
1267 2005-03-22 David Harrison <harrison@apple.com>
1271 <rdar://problem/4060266> Double-clicking in Dictionary.app doesn't work for some words (coming just after style change)
1273 * khtml/editing/visible_text.cpp:
1274 (khtml::TextIterator::handleTextBox):
1275 Complete the check of whether to emit space for collapsed space.
1277 2005-03-22 David Harrison <harrison@apple.com>
1281 <rdar://problem/4061443> REGRESSION (8A420-8A421): Pasting in the Stickies widget is broken again
1283 * khtml/editing/htmlediting.cpp:
1284 (khtml::positionBeforeContainingSpecialElement):
1285 (khtml::positionAfterContainingSpecialElement):
1286 Return unchanged Position rather than a null or non-editable one.
1290 2005-03-20 Ken Kocienda <kocienda@apple.com>
1294 I made an error in this test earlier. It was not testing what I intended. Fixed.
1296 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt
1297 * layout-tests/editing/unsupported-content/list-delete-001.html
1301 * layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added.
1302 * layout-tests/editing/unsupported-content/table-delete-001.html: Added.
1303 * layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added.
1304 * layout-tests/editing/unsupported-content/table-delete-002.html: Added.
1305 * layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added.
1306 * layout-tests/editing/unsupported-content/table-delete-003.html: Added.
1307 * layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added.
1308 * layout-tests/editing/unsupported-content/table-type-after.html: Added.
1309 * layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added.
1310 * layout-tests/editing/unsupported-content/table-type-before.html: Added.
1312 2005-03-20 Darin Adler <darin@apple.com>
1316 - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset
1318 * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.
1320 2005-03-20 David Harrison <harrison@apple.com>
1324 <rdar://problem/4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
1326 SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
1327 when checking whether moving back across block boundaries
1329 VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
1331 All editing tests pass.
1333 * khtml/editing/visible_text.cpp:
1334 (khtml::SimplifiedBackwardsTextIterator::advance):
1335 * khtml/editing/visible_units.cpp:
1336 (khtml::previousBoundary):
1338 2005-03-20 Darin Adler <darin@apple.com>
1340 Reviewed by Harrison.
1342 - 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
1344 * khtml/khtml_part.h: Added selectFrameElementInParentIfFullySelected.
1345 * khtml/khtml_part.cpp:
1347 (KHTMLPart::setFocusNodeIfNeeded): Changed to not set focus to a frame; was not what this function was
1348 intended to do, and caused trouble when trying to select a frame element.
1349 (KHTMLPart::khtmlMouseReleaseEvent): Call selectFrameElementInParentIfFullySelected.
1350 (KHTMLPart::selectAll): Call selectFrameElementInParentIfFullySelected.
1351 (KHTMLPart::selectFrameElementInParentIfFullySelected): Added. Selects the frame element in the parent
1352 if a frame is entirely selected, which makes it easier to delete or replace the frame and is consistent
1353 with the changes Maciej made recently for other elements.
1355 * kwq/WebCoreBridge.mm:
1356 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Call selectFrameElementInParentIfFullySelected.
1357 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Call selectFrameElementInParentIfFullySelected.
1359 2005-03-20 Darin Adler <darin@apple.com>
1361 Reviewed by me, code change by Ken.
1363 - fixed <rdar://problem/4059852> Deleting from first element of list makes content jump to wrong place
1365 * khtml/editing/htmlediting.cpp:
1366 (khtml::isListStructureNode): Added.
1367 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Check for list nodes as well as table nodes.
1369 2005-03-20 Ken Kocienda <kocienda@apple.com>
1373 Added tests to cover new "unsupported content" editing code.
1375 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt: Added.
1376 * layout-tests/editing/unsupported-content/list-delete-001.html: Added.
1377 * layout-tests/editing/unsupported-content/list-delete-002-expected.txt: Added.
1378 * layout-tests/editing/unsupported-content/list-delete-002.html: Added.
1379 * layout-tests/editing/unsupported-content/list-delete-003-expected.txt: Added.
1380 * layout-tests/editing/unsupported-content/list-delete-003.html: Added.
1381 * layout-tests/editing/unsupported-content/list-type-after-expected.txt: Added.
1382 * layout-tests/editing/unsupported-content/list-type-after.html: Added.
1383 * layout-tests/editing/unsupported-content/list-type-before-expected.txt: Added.
1384 * layout-tests/editing/unsupported-content/list-type-before.html: Added.
1386 2005-03-20 Ken Kocienda <kocienda@apple.com>
1392 <rdar://problem/4059578> Entire list deleted, and caret disappears, when delete key hit at end of list
1394 The problem is that a new case in the delete code did not consider when the
1395 downstream end node of the selection might be an ancestor of the upstream start
1396 node. That is the case in this bug. The downstream end is the body element, and
1397 this line of code would delete all the children of the downstream end:
1398 removeChildrenInRangePreservingPosition(m_downstreamEnd.node(), 0,
1399 m_downstreamEnd.offset(), m_upstreamStart);
1401 The fix is to check for this "is ancestor" case, and do some tree logic to find
1402 the right offset of the downstream end node for the call to
1403 removeChildrenInRangePreservingPosition().
1405 * khtml/editing/htmlediting.cpp:
1406 (khtml::DeleteSelectionCommand::handleGeneralDelete): Fixed as described.
1408 2005-03-19 Ken Kocienda <kocienda@apple.com>
1414 <rdar://problem/4059384> Cannot place insertion point correctly in editable text that avoids floating elements
1416 Note: I strongly suspect this bug blocks a complete solution to this other Tiger/P2:
1417 <rdar://problem/4055748> AX: Dictionary pop-up panel shows at wrong place on specific parts of particular pages
1419 * khtml/rendering/render_text.cpp:
1420 (RenderText::caretRect): Change the y-coordinate used to calculate the available width for a line. Height is wrong.
1421 Top of the box containing the text where the click is done is correct. Also, add in the x-offset for the start
1422 of the text box when calculating the available width. If this text box is avoiding a float at the y-coordinate
1423 for the relevant box, failure to add in the amount of float-avoidance will make the text at the coordinates
1424 greater than end-of-line minus float-avoidance ineligible for caret placement.
1426 2005-03-19 Darin Adler <darin@apple.com>
1430 - fixed <rdar://problem/4057594> REGRESSION (125-406): Unrepro crash in HTMLTokenizer::allDataProcessed after hitting Back button
1432 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::allDataProcessed):
1433 To get the part safely after calling end, save a guarded pointer to the view.
1434 The old way could end trying to call a virtual function a part that was destroyed.
1436 2005-03-19 Maciej Stachowiak <mjs@apple.com>
1440 <rdar://problem/4053506> Pasting Tables and Cells in Mail does not allow editing before or after
1441 <rdar://problem/4005954> REGRESSION (Mail): After copy/paste of content containing list element cannot go back to entering text at left side of page
1443 * khtml/editing/htmlediting.cpp:
1444 (khtml::maxDeepOffset):
1445 (khtml::CompositeEditCommand::removeFullySelectedNodePreservingPosition):
1446 (khtml::CompositeEditCommand::removeChildrenInRangePreservingPosition):
1447 (khtml::CompositeEditCommand::removeNodePreservingPosition):
1448 (khtml::CompositeEditCommand::insertBlockPlaceholder):
1449 (khtml::CompositeEditCommand::appendBlockPlaceholder):
1450 (khtml::CompositeEditCommand::forceBlockPlaceholder):
1451 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1452 (khtml::isSpecialElement):
1453 (khtml::isFirstVisiblePositionInSpecialElementInFragment):
1454 (khtml::positionBeforePossibleContainingSpecialElement):
1455 (khtml::positionAfterPossibleContainingSpecialElement):
1456 (khtml::ApplyStyleCommand::applyInlineStyle):
1457 (khtml::DeleteSelectionCommand::initializePositionData):
1458 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
1459 (khtml::DeleteSelectionCommand::handleGeneralDelete):
1460 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1461 (khtml::DeleteSelectionCommand::doApply):
1462 (khtml::InsertParagraphSeparatorCommand::doApply):
1463 (khtml::ReplacementFragment::ReplacementFragment):
1464 (khtml::ReplaceSelectionCommand::doApply):
1465 * khtml/editing/htmlediting.h:
1466 * khtml/editing/visible_position.cpp:
1467 (khtml::isRenderedBR):
1468 (khtml::VisiblePosition::initDownstream):
1469 (khtml::isLastVisiblePositionInBlock):
1470 * khtml/rendering/render_line.cpp:
1471 (khtml::RootInlineBox::closestLeafChildForXPos):
1472 * khtml/xml/dom_nodeimpl.cpp:
1473 (NodeImpl::isBlockFlowOrTable):
1474 (NodeImpl::isEditableBlock):
1475 (NodeImpl::enclosingBlockFlowOrTableElement):
1476 * khtml/xml/dom_nodeimpl.h:
1477 * khtml/xml/dom_position.cpp:
1478 (DOM::Position::upstream):
1479 (DOM::Position::downstream):
1480 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
1481 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
1482 * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
1483 * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
1484 * layout-tests/editing/inserting/insert-3786362-fix-expected.txt:
1486 2005-03-19 John Sullivan <sullivan@apple.com>
1490 - fixed <rdar://problem/4058740> Crash (nil-deref) editing Mail reply
1491 message in KWQKHTMLPart::fontForSelection (MailViewer-723)
1493 * kwq/KWQKHTMLPart.mm:
1494 (KWQKHTMLPart::fontForSelection):
1495 Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
1496 running into it. We're not completely certain, but the check is harmless at worst.
1500 2005-03-18 David Harrison <harrison@apple.com>
1504 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
1506 Also changed WebKit.
1508 * kwq/KWQAccObject.mm:
1509 (-[KWQAccObject rendererForView:]):
1510 New to cover both the WebCore and WebKit NSViews.
1512 (-[KWQAccObject _accessibilityParentForSubview:]):
1513 Use rendererForView.
1515 * kwq/WebCoreFrameView.h:
1516 Add WebCoreBridgeHolder protocol to get access to WebKit NSViews.
1518 2005-03-18 David Harrison <harrison@apple.com>
1520 Reviewed by Darin, Ken.
1522 <rdar://problem/3735625> AX: add AXPress action if an element has an onclick handler
1524 * khtml/dom/html_form.cpp:
1525 (HTMLInputElement::click):
1526 * khtml/html/html_elementimpl.cpp:
1527 (HTMLElementImpl::click):
1528 (HTMLElementImpl::accessKeyAction):
1529 * khtml/html/html_elementimpl.h:
1530 * khtml/html/html_formimpl.cpp:
1531 (DOM::HTMLFormElementImpl::submitClick):
1532 (DOM::HTMLButtonElementImpl::click):
1533 (DOM::HTMLButtonElementImpl::accessKeyAction):
1534 (DOM::HTMLInputElementImpl::click):
1535 (DOM::HTMLInputElementImpl::accessKeyAction):
1536 (DOM::HTMLInputElementImpl::defaultEventHandler):
1537 (DOM::HTMLLabelElementImpl::accessKeyAction):
1538 (DOM::HTMLSelectElementImpl::accessKeyAction):
1539 (DOM::HTMLTextAreaElementImpl::accessKeyAction):
1540 * khtml/html/html_formimpl.h:
1541 * khtml/html/html_inlineimpl.cpp:
1542 (HTMLAnchorElementImpl::defaultEventHandler):
1543 (HTMLAnchorElementImpl::accessKeyAction):
1544 * khtml/html/html_inlineimpl.h:
1545 * khtml/rendering/render_form.cpp:
1546 (RenderFileButton::click):
1547 * khtml/rendering/render_form.h:
1548 * khtml/xml/dom_docimpl.cpp:
1549 (DocumentImpl::defaultEventHandler):
1550 * khtml/xml/dom_elementimpl.h:
1551 (DOM::ElementImpl::accessKeyAction):
1553 (-[DOMHTMLInputElement click]):
1557 * kwq/KWQFileButton.h:
1558 * kwq/KWQFileButton.mm:
1559 (KWQFileButton::click):
1561 Add accessKeyAction parameter about whether to limit to HTMLElementImpl subclasses that JavaScript wants, or to apply to others as well.
1563 Add click() parameter about whether to send the mousedown and mouseup events in addition to the click event.
1565 * kwq/KWQAccObject.mm:
1566 (-[KWQAccObject mouseButtonListener]):
1567 Locate a mousedown, mouseup, or click handler in the current element and its ancestors.
1569 (-[KWQAccObject actionElement]):
1570 (-[KWQAccObject accessibilityIsIgnored]):
1571 (-[KWQAccObject accessibilityPerformAction:]):
1572 Consider mouseButtonListener.
1574 2005-03-18 John Sullivan <sullivan@apple.com>
1578 - fixed <rdar://problem/4002164> maps that include start and end
1579 location don't print right from maps.google.com
1581 I thought I checked this in yesterday but a ChangeLog conflict aborted my checkin
1582 without me noticing.
1584 * khtml/rendering/render_style.cpp:
1585 (RenderStyle::diff):
1586 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
1588 * khtml/rendering/render_style.h:
1589 (khtml::RenderStyle::InheritedFlags::operator==):
1590 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
1591 (khtml::RenderStyle::setBitDefaults):
1593 (khtml::RenderStyle::forceBackgroundsToWhite):
1594 ditto, and method name changed too
1595 (khtml::RenderStyle::setForceBackgroundsToWhite):
1598 * khtml/rendering/render_text.cpp:
1599 (InlineTextBox::paint):
1600 updated for name change; also, compare text against white instead of current bg color
1601 because we no longer actually modify the bg color (previously we would always set
1602 the bg color to white, so the result is the same)
1604 * khtml/xml/dom_docimpl.cpp:
1605 (DocumentImpl::recalcStyle):
1606 updated for name change
1608 * kwq/WebCoreBridge.mm:
1609 (-[WebCoreBridge styleSheetForPrinting]):
1611 (-[WebCoreBridge reapplyStylesForDeviceType:]):
1612 removed the code that called styleSheetForPrinting; we no longer use a stylesheet
1615 * khtml/rendering/render_box.cpp:
1616 (RenderBox::paintBackgroundExtended):
1617 If forceBackgroundsToWhite flag is set, convert background images and
1618 background colors to white background color with no background image.
1620 2005-03-18 Ken Kocienda <kocienda@apple.com>
1626 <rdar://problem/4056718> Pasting quotes the entire message
1628 * khtml/editing/htmlediting.cpp:
1629 (khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing
1630 the end of the pasted content in certain cases. This move logic used to stop once it moved all the
1631 siblings of the node following the last node of the pasted-in content. This means that block elements
1632 could get moved, and if the pasted-in content included a mail blockquote, this could result in
1633 one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or
1634 <table> is seen. This only affected one of the many test cases we have for such scenarios, and
1635 the change to that result makes sense given the code change.
1636 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that
1637 adequately tests the behavior change, so I did not add a new test.
1639 2005-03-17 Ken Kocienda <kocienda@apple.com>
1641 Reviewed by Harrison
1645 <rdar://problem/4051809> 8A413: Cursor-up in a mail message sometimes gets stuck (with specific reproducible case)
1647 * khtml/rendering/render_text.cpp:
1648 (RenderText::positionForCoordinates): Consider two lines: line-above and line-below. If the caret position in line-below
1649 was at an x coordinate between half way through the x coordinate of the last character on the line-above and the
1650 end of that same character, this bug would happen since the positioning code would assume that it could create a
1651 VisiblePosition with a DOWNSTREAM affinity. Now, I check to see if the character position on the line-above is the
1652 last character on that line, and if it is, I use UPSTREAM as the affinity.
1656 2005-03-17 David Harrison <harrison@apple.com>
1658 Reviewed by Darin, Ken.
1660 * khtml/editing/htmlediting.cpp:
1661 (khtml::EditCommandPtr::setEndingSelection):
1662 Fixed typo so that it calls setEndingSelection rather than setStartingSelection.
1663 Commented out this unused method, tho, since this is late in Tiger. Proved unused by successful build after temporarily removing method declaration or implemenation.
1665 2005-03-16 Kevin Decker <kdecker@apple.com>
1669 Fixed <rdar://problem/4046665> REGRESSION (403-405): mypage.apple.com login does not work (hits assertion in Development build)
1671 * kwq/WebCoreBridge.mm:
1672 (-[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="">
1674 2005-03-16 Darin Adler <darin@apple.com>
1678 - fixed <rdar://problem/4045203> REGRESSION (125-188): Redundant JS imports crash Safari
1680 * khtml/html/htmltokenizer.h: Take inWRite bool out of NDEBUG ifdef.
1681 * khtml/html/htmltokenizer.cpp:
1682 (khtml::HTMLTokenizer::HTMLTokenizer): Take inWrite bool management code out of NDEBUG ifdef.
1683 (khtml::HTMLTokenizer::write): Ditto. Don't call end if inWrite is true, since it will be called
1684 when you return to the body of the outer write() call.
1685 (khtml::HTMLTokenizer::allDataProcessed): Don't call end() if inWrite is true for the same reason.
1686 (khtml::HTMLTokenizer::finish): Ditto.
1688 * kwq/KWQWidget.mm: (QWidget::getOuterView): Removed bogus assertion that has been vexing us of late.
1690 2005-03-16 David Harrison <harrison@apple.com>
1692 Reviewed by me (written by Patti Yeh).
1694 * kwq/KWQAccObject.mm:
1695 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1696 Use LeftWordIfOnBoundary instead of RightWordIfOnBoundary.
1698 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1699 Use RightWordIfOnBoundary instead of LeftWordIfOnBoundary.
1701 2005-03-16 David Harrison <harrison@apple.com>
1705 <rdar://problem/4054590> AX: Dictionary panel does not work when page is scrolled on Safari
1707 * kwq/KWQAccObject.mm:
1708 (-[KWQAccObject doAXTextMarkerForPosition:]):
1709 Add in the view's contentsX and contentsY to the point.
1711 2005-03-16 David Harrison <harrison@apple.com>
1715 <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements
1717 Also changed WebKit.
1719 * khtml/editing/visible_units.h:
1720 * khtml/editing/visible_units.cpp:
1721 (khtml::startOfEditableContent):
1722 (khtml::endOfEditableContent):
1723 (khtml::inSameEditableContent):
1724 (khtml::isStartOfEditableContent):
1725 (khtml::isEndOfEditableContent):
1728 * kwq/WebCoreBridge.h:
1729 * kwq/WebCoreBridge.mm:
1730 (-[WebCoreBridge canDeleteRange:]):
1733 2005-03-16 Ken Kocienda <kocienda@apple.com>
1739 <rdar://problem/4042935> undo doesn't work properly during inline input
1741 * kwq/WebCoreBridge.h: Declare new method below.
1742 * kwq/WebCoreBridge.mm:
1743 (-[WebCoreBridge replaceMarkedTextWithText:]): New method. Wraps calls to TypingCommand::deleteKeyPressed and
1744 TypingCommand::insertText to map the way that international text input works onto the typing undo system.
1746 2005-03-16 David Harrison <harrison@apple.com>
1750 <rdar://problem/4044336> REGRESSION (8A398-8A409): Option-Delete also deletes space to left of deleted word
1752 * khtml/editing/htmlediting.cpp:
1753 (khtml::DeleteSelectionCommand::initializePositionData):
1754 - skip smart delete if the selection to delete already starts or ends with whitespace
1756 * khtml/khtml_part.cpp:
1757 (KHTMLPart::handleMousePressEventDoubleClick):
1758 - preserve selection on double-click when range is already selected
1760 * khtml/xml/dom_position.cpp:
1761 (DOM::Position::leadingWhitespacePosition):
1762 (DOM::Position::trailingWhitespacePosition):
1763 - fix considerNonCollapsibleWhitespace action (logic was reversed)
1764 - add non-breaking space to the non-collapsable ones
1766 * kwq/WebCoreBridge.mm:
1767 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
1768 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
1769 - these methods do not set the selection, so remove calls to setSelectionGranularity
1771 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
1772 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]):
1773 - set the granularity back to character
1774 - the one exception is that we need to keep word granularity
1775 to preserve smart delete behavior when extending by word
1777 2005-03-15 Maciej Stachowiak <mjs@apple.com>
1781 <rdar://problem/4053266> Pressing return a few times right after a link makes the new blank lines part of the link
1783 * khtml/editing/htmlediting.cpp:
1784 (khtml::InsertLineBreakCommand::doApply): Use
1785 positionOutsideContainingSpecialElement in the right two places.
1786 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
1788 - move all these helper functions higher in the file
1790 * khtml/editing/htmlediting.cpp:
1791 (khtml::isSpecialElement):
1792 (khtml::isFirstVisiblePositionInSpecialElement):
1793 (khtml::positionBeforeNode):
1794 (khtml::positionBeforeContainingSpecialElement):
1795 (khtml::maxRangeOffset):
1796 (khtml::isLastVisiblePositionInSpecialElement):
1797 (khtml::positionAfterNode):
1798 (khtml::positionAfterContainingSpecialElement):
1799 (khtml::positionOutsideContainingSpecialElement):
1801 2005-03-14 Maciej Stachowiak <mjs@apple.com>
1805 <rdar://problem/4049925> Pasting right after a link makes pasted content part of the link (without visible style change)
1807 * khtml/editing/htmlediting.cpp:
1808 (khtml::positionOutsideContainingSpecialElement): made a helper
1809 function that computes a position outside the outermost containing
1810 special element if the passed in position is right at the start or
1812 (khtml::InsertTextCommand::prepareForTextInsertion): use new helper here
1813 (khtml::ReplaceSelectionCommand::doApply): use it here too: this is the fix
1814 (khtml::positionBeforeNode): made static
1815 (khtml::positionBeforeContainingSpecialElement): made static
1816 (khtml::positionAfterNode): made static
1817 (khtml::positionAfterContainingSpecialElement): made static
1819 2005-03-15 Richard Williamson <rjw@apple.com>
1821 Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com
1823 Add non nil style() check.
1825 Reviewed by Dave Harrison.
1827 * khtml/rendering/render_table.cpp:
1828 (RenderTableCell::collapsedRightBorder):
1830 2005-03-15 Kevin Decker <kdecker@apple.com>
1834 Fixed: <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
1836 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().
1838 This fixes a recent regression from:
1840 <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
1842 * khtml/khtml_part.cpp:
1843 (KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM.
1844 * khtml/xml/dom_docimpl.cpp:
1845 (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.
1847 2005-03-15 Ken Kocienda <kocienda@apple.com>
1853 <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
1855 Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
1856 keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete
1857 keystrokes are handled made this feature regress. Previous to that change, the backwards delete
1858 key went through separate code that is no longer in the tree that did not set the selection in the way
1861 The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
1862 -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
1863 selection will act to close typing or not.
1865 * kwq/WebCoreBridge.h: Changed header accordingly to change method shown below.
1866 * kwq/WebCoreBridge.mm:
1867 (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method.
1869 2005-03-15 John Sullivan <sullivan@apple.com>
1873 - fixed <rdar://problem/4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame
1875 * kwq/KWQKHTMLPart.mm:
1876 (KWQKHTMLPart::createPart):
1877 Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by
1878 the recent security fix.
1880 2005-03-15 Kevin Decker <kdecker@apple.com>
1882 Reviewed by Ken and Maciej.
1884 New fix for <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
1886 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.
1888 * khtml/html/htmltokenizer.cpp:
1889 (khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false.
1890 (khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true.
1891 (khtml::HTMLTokenizer::processToken):
1892 * 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.
1893 * khtml/khtml_part.cpp:
1894 (KHTMLPart::closeURL): Notify the tokenizer to stop parsing.
1895 * khtml/xml/xml_tokenizer.cpp:
1896 (khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false.
1897 * khtml/xml/xml_tokenizer.h:
1898 (khtml::Tokenizer::stopParsing): Added.
1900 2005-03-14 David Harrison <harrison@apple.com>
1902 Reviewed by Darin, Maciej.
1904 <rdar://problem/4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly
1906 Also fixes crash by adding nil check.
1908 * khtml/editing/htmlediting.cpp:
1909 (khtml::MoveSelectionCommand::doApply):
1910 Check the node for nil.
1912 * khtml/khtml_part.cpp:
1913 (KHTMLPart::khtmlMouseReleaseEvent):
1914 Use the node from the event rather than from the selection.
1916 2005-03-14 Darin Adler <darin@apple.com>
1918 Reviewed by Harrison.
1920 - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts
1922 * khtml/xml/dom_docimpl.cpp:
1923 (DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak.
1924 (DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed
1925 for that node. Otherwise, we can have empty marker lists for each node forever until the
1927 (DocumentImpl::removeAllMarkers): Added code to dirty the markers.
1928 (DocumentImpl::shiftMarkers): Remove unneeded empty check.
1930 * kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit.
1931 * kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers.
1933 2005-03-14 Richard Williamson <rjw@apple.com>
1935 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
1937 A document may be deleted as a consequence of handling an event,
1938 as was the case with Acrobat.app. Ensure that the document is still valid
1939 before passing the event on for further handling.
1941 * khtml/xml/dom_nodeimpl.cpp:
1942 (NodeImpl::dispatchUIEvent):
1944 2005-03-14 Ken Kocienda <kocienda@apple.com>
1948 Added a couple of comments about setChanged() to this code based on my experiences with 4047028.
1950 * khtml/css/css_valueimpl.cpp:
1951 (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties)
1952 (DOM::CSSMutableStyleDeclarationImpl::merge)
1954 2005-03-14 Ken Kocienda <kocienda@apple.com>
1960 <rdar://problem/4047028> Changing quote levels on stylized text causes it to be sent as colored (Blue). Tiger8A410
1962 * khtml/css/css_valueimpl.cpp:
1963 (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): This function now calls setChanged() at the
1964 end of its loop if any properties were removed. This makes the style system update correctly in response
1965 to changes made by this function. The code to paste removes style from the pasted content in a
1966 preliminary step, and the fact that the style system did not update properly left unwanted color
1967 declarations in the document.
1969 2005-03-14 Vicki Murley <vicki@apple.com>
1971 - roll out this change for now, since it was denied by CCC
1973 2005-03-11 David Harrison <harrison@apple.com>
1977 <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running
1979 * kwq/KWQKHTMLPart.mm:
1980 (KWQKHTMLPart::advanceToNextMisspelling):
1981 (KWQKHTMLPart::markMisspellings):
1984 2005-03-14 Ken Kocienda <kocienda@apple.com>
1990 <rdar://problem/4050403> Mail crashes after pasting and deleting the content of one Excel cell
1992 * khtml/editing/htmlediting.cpp:
1993 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add some null checks to the code. This fixes the crash, although
1994 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
1995 the document that cannot be removed (this is actually an empty table). This is undesirable, however, work Maciej is
1996 doing to fix the general-case problem of trying to edit constructs we do not handle well in editing should fix this
1997 particular case, making the deletion of this "blank line" possible. Maciej is doing this work as part of this bug:
1998 <rdar://problem/4036051> Hard to select (and thus delete) an IFRAME in an editable WebView
2000 2005-03-14 Ken Kocienda <kocienda@apple.com>
2006 <rdar://problem/4029632> Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
2008 The problem is that removeInlineStyle() can remove nodes, and if either the start or end node of the
2009 selection at the time of the call to removeInlineStyle() was in a node that got removed, bad things
2010 would happen. The fix is described below.
2012 * khtml/editing/htmlediting.cpp:
2013 (khtml::maxRangeOffset): Moved this static function to a different place in the file so the code below can use it.
2014 (khtml::ApplyStyleCommand::applyInlineStyle): Calling removeInlineStyle() now has the side effect of
2015 setting the command's ending selection. Now resets start and end using the ending selection after the call to
2016 removeInlineStyle() as it is done elsewhere in this function.
2017 (khtml::ApplyStyleCommand::removeInlineStyle): Track the removal of the start or end node based on
2018 the positions passed in. If either the start or the end node is removed as part of style removal,
2019 set an appropriate replacement start or end that is still in the document.
2023 2005-03-14 Ken Kocienda <kocienda@apple.com>
2027 I need to roll out Kevin's change to fix 3667701. It breaks contextual fragments, and hence breaks
2028 paste in editing (among other things).
2030 * khtml/html/htmltokenizer.cpp: Roll out recent change.
2031 (khtml::HTMLTokenizer::write)
2032 * khtml/html/htmltokenizer.h: Ditto.
2034 2005-03-13 Darin Adler <darin@apple.com>
2036 Reviewed by Ken and Maciej.
2038 - fixed <rdar://problem/4049040> REGRESSION (403-405): security check prevents user stylesheet from loading (Dictionary.app doesn't work at all!)
2040 * kwq/WebCoreBridge.mm: (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Changed to give "applewebdata:"
2041 documents the same privileges to open local files that "file:" documents have.
2043 2005-03-13 Kevin Decker <kdecker@apple.com>
2047 Fixed: <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
2049 The problem here was that the tokenizer would continue to receive chunks of data from the loader already
2050 after the view and part had been destroyed. Situations like this could arise when clicking on another link
2051 while still loading the current view, or during self test where we rapidly open, load, and close browser
2054 * khtml/html/htmltokenizer.cpp:
2055 (khtml::HTMLTokenizer::write): Simple nil check against the view.
2056 * khtml/html/htmltokenizer.h: Changed the view pointer from a standard pointer to a QGuardedPtr. The tokenizer's
2057 handle to the view will now automatically nil-out and never dangle.
2059 2005-03-13 Darin Adler <darin@apple.com>
2061 Reviewed by John and Ken.
2063 - fixed <rdar://problem/4044347> REGRESSION (Mail): Control-K in particular message moves insertion point to previous line
2065 Tweaked the deleting code, and added three new deleting layout tests to confirm the new code works.
2067 * khtml/editing/htmlediting.cpp:
2068 (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Removed special case with comment that said it was
2069 for the case where a "selection contains only a BR right after a block ended". This code was being triggered in
2070 more cases than just that one, and in all the cases I tested, the general delete code works fine.
2071 (khtml::DeleteSelectionCommand::handleGeneralDelete): Changed the code that decides whether to delete an entire
2072 block to understand the case where the end block is outside the start block, but contains the start block.
2073 In that case, we want to delete the entire block. Not deleting the block was causing us to delete just the <br>,
2074 and not the enclosing <div> in the case in the bug.
2076 * layout-tests/editing/deleting/delete-line-015-expected.txt: Added.
2077 * layout-tests/editing/deleting/delete-line-015.html: Added.
2078 * layout-tests/editing/deleting/delete-line-016-expected.txt: Added.
2079 * layout-tests/editing/deleting/delete-line-016.html: Added.
2080 * layout-tests/editing/deleting/delete-line-017-expected.txt: Added.
2081 * layout-tests/editing/deleting/delete-line-017.html: Added.
2082 * layout-tests/editing/style/smoosh-styles-002-expected.txt: Updated to improved results. With the code change, the deletion
2083 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
2084 we delete both of those.
2086 2005-03-13 Darin Adler <darin@apple.com>
2088 - fixed <rdar://problem/4049172> REGRESSION (403-405): Gmail: text box in "Invite a friend" section overlaps other sections
2090 Rolled out fix for <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail
2092 * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth): Back to previous version of this file.
2094 2005-03-12 Maciej Stachowiak <mjs@apple.com>
2098 <rdar://problem/4046144> RSS pages leave a hole in local file security policy (need to revert feed: exemption)
2100 * kwq/WebCoreBridge.mm:
2101 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Revert
2102 emergency workaround for Safari RSS, now that a new Syndication
2105 2005-03-11 Maciej Stachowiak <mjs@apple.com>
2109 <rdar://problem/4026787> text typed after a link (pasted or Mail Link to this Page) is part of the link, underlined and colored blue
2111 The concept of this change is every time you type at the very
2112 start or very end of a link (even if nested in further inner
2113 elements), the typed text goes outside the link instead of inside.
2115 * khtml/editing/htmlediting.cpp:
2116 (khtml::InsertTextCommand::prepareForTextInsertion): Check whether
2117 we are at the first visible position or last visible position of a
2118 special element. For now this only includes HTML A elements that
2119 are links (i.e. they have an href).
2120 (khtml::isSpecialElement): Helper function that identifies special
2121 elements (for now only links).
2122 (khtml::isFirstVisiblePositionInSpecialElement): Checks if a given DOM
2123 position is equivalent to the first visible position in some containing
2124 editable special element.
2125 (khtml::positionBeforeNode): Returns the DOM position immediately
2127 (khtml::positionBeforeContainingSpecialElement): Gives a DOM
2128 position immediately before the outermost editable containing
2129 special element where the passed-in position is equivalent to the
2130 first visible position.
2131 (khtml::maxRangeOffset): Helper to get the maximum allowed
2132 range/position offset for a node, does the right thing based on
2133 whether the node would use a character offset or child offset.
2134 (khtml::isLastVisiblePositionInSpecialElement): Similar to above,
2135 but for end of node instead of start.
2136 (khtml::positionAfterNode): Ditto.
2137 (khtml::positionAfterContainingSpecialElement): Ditto.
2139 Some layout tests changed - I looked over all the diffs and found
2140 that the only changes were "junk nodes" like empty spans and text
2141 nodes moving from one spot in the tree to another. These changes
2142 are all harmless and do not affect layout or future editing.
2144 * layout-tests/editing/inserting/typing-003-expected.txt:
2145 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt:
2146 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
2147 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt:
2148 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
2149 * layout-tests/editing/style/remove-underline-expected.txt:
2150 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt:
2151 * layout-tests/editing/style/remove-underline-in-bold-expected.txt:
2152 * layout-tests/editing/style/typing-style-003-expected.txt:
2153 * layout-tests/editing/style/unbold-in-bold-expected.txt:
2154 * layout-tests/editing/style/underline-expected.txt:
2156 2005-03-11 Adele Amchan <adele@apple.com>
2158 backing out fix for <rdar://problem/4021711> REGRESSION (125-188): blank pages when browsing forum at cooperativeresearch.org - cached external script problem
2160 This caused the following regressions (that we know of):
2161 <rdar://problem/4047445> REGRESSION (Safari-400-403?): Some or all page contents sometimes don't appear (macworld.com)
2162 <rdar://problem/4046153> 8a409: Problem loading Citibank page in Safari 2 (403)
2163 <rdar://problem/4047801> REGRESSION (402-403): .Mac homepage links don't work
2165 * khtml/html/htmltokenizer.cpp:
2166 (khtml::HTMLTokenizer::scriptHandler):
2168 2005-03-11 David Harrison <harrison@apple.com>
2172 <rdar://problem/4046602> WebCore invokes undefined behavior when the spell checker isn't running
2174 * kwq/KWQKHTMLPart.mm:
2175 (KWQKHTMLPart::advanceToNextMisspelling):
2176 (KWQKHTMLPart::markMisspellings):
2179 2005-03-11 Ken Kocienda <kocienda@apple.com>
2183 * ForwardingHeaders/editing/visible_units.h: Added.
2185 2005-03-11 Ken Kocienda <kocienda@apple.com>
2191 <rdar://problem/4045521> Hitting return key with full line selected does not add blank line as it should
2193 * khtml/editing/htmlediting.cpp:
2194 (khtml::InsertParagraphSeparatorCommand::doApply): Removed some "special-case" code from this
2195 function that would look for a selection that started and ended in a different block, and would
2196 then bail right after the deletion of the selection without inserting a paragraph separator.
2197 This was just wrong. So, the code change is removal only. When the general-case code runs instead
2198 of the erroneous special-case code, the bug goes away.
2202 * layout-tests/editing/inserting/return-key-with-selection-001-expected.txt: Added.
2203 * layout-tests/editing/inserting/return-key-with-selection-001.html: Added.
2204 * layout-tests/editing/inserting/return-key-with-selection-002-expected.txt: Added.
2205 * layout-tests/editing/inserting/return-key-with-selection-002.html: Added.
2206 * layout-tests/editing/inserting/return-key-with-selection-003-expected.txt: Added.
2207 * layout-tests/editing/inserting/return-key-with-selection-003.html: Added.
2209 2005-03-11 David Harrison <harrison@apple.com>
2213 <rdar://problem/4009446> AX: kAXTextMarkerForPositionParameterizedAttribute not working correctly (required for Dictionary pop-up)
2215 * kwq/KWQAccObject.mm:
2216 (-[KWQAccObject accessibilityAttributeValue:]):
2219 (-[KWQAccObject doAXTextMarkerForPosition:]):
2222 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
2223 Use the selection's document instead of the top document, to accommodate frames, etc.
2225 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2226 Fixed parameter processing to look for NSValue instead of AXValue.
2228 2005-03-11 Ken Kocienda <kocienda@apple.com>
2230 Reviewed by Harrison
2234 <rdar://problem/3972665> 8A360: HTML message partially truncated on left hand side, text-indent from Script Editor
2236 This was fixed, then regressed with Harrison's fix for this bug:
2238 <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget
2240 * khtml/editing/htmlediting.cpp:
2241 (khtml::ReplaceSelectionCommand::doApply): My now addresses both problems in a way that they no longer
2244 2005-03-10 Ken Kocienda <kocienda@apple.com>
2250 <rdar://problem/4045511> Copying and pasting end-of-paragraph selection puts insertion point in wrong place
2251 <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
2253 The copy/paste code before this patch had no notion of a "logical newline" at the start of the selection. We have
2254 had a similar notion for "logical newline" at the end of the selection for quite some time. To fix these bugs, we
2255 need to introduce the same idea for selection starts.
2257 * khtml/editing/htmlediting.cpp:
2258 (khtml::ReplacementFragment::ReplacementFragment): Process the "logical newline" at start as we write it out
2259 in markup. Set the bit we added to this object to signify we have such a newline.
2260 (khtml::ReplaceSelectionCommand::doApply): Many, many changes to introduce the new "logical newline" at start concept.
2261 I also tried to simply the code that sets the start position for inserting content to be pasted. I also improved a
2262 weakness in the smart-paste code. Now, we check before and after the paste for whether we need to add a leading or
2263 trailing space. The code previous to this patch only did a "before" check, with the result that we sometimes added
2264 a second space. In other words, the code did not realize that DOM changes done by pasting could cause formerly
2265 unrendered whitespace to become rendered. Also moved line placeholder clean up code to its own function.
2266 (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): New helper that further refines the notion
2267 of when we can remove a line placeholder. The definition is now, "If a line placeholder is at the visible start
2268 and visible end of its line, keep it; otherwise remove it".
2269 * khtml/editing/htmlediting.h: Declare new functions. Rework inlines in ReplacementFragment class to account for
2270 addition of new "logical newline" at start concept.
2271 (khtml::ReplacementFragment::hasInterchangeNewlineAtStart): New accessor.
2272 (khtml::ReplacementFragment::hasInterchangeNewlineAtEnd): Renamed from hasInterchangeNewline(), since before we
2273 only had a bit for the end, hence we did not need to distinguish it from the start.
2274 * khtml/editing/markup.cpp:
2275 (khtml::createMarkup): Added code to detect and write out markup for cases where we have a "logical newline" at start.
2276 * khtml/xml/dom2_rangeimpl.cpp:
2277 (DOM::RangeImpl::startPosition): New helper.
2278 (DOM::RangeImpl::endPosition): Ditto.
2279 * khtml/xml/dom2_rangeimpl.h: Declare new helpers.
2282 * layout-tests/editing/pasteboard/paste-line-endings-001-expected.txt: Added.
2283 * layout-tests/editing/pasteboard/paste-line-endings-001.html: Added.
2284 * layout-tests/editing/pasteboard/paste-line-endings-002-expected.txt: Added.
2285 * layout-tests/editing/pasteboard/paste-line-endings-002.html: Added.
2286 * layout-tests/editing/pasteboard/paste-line-endings-003-expected.txt: Added.
2287 * layout-tests/editing/pasteboard/paste-line-endings-003.html: Added.
2288 * layout-tests/editing/pasteboard/paste-line-endings-004-expected.txt: Added.
2289 * layout-tests/editing/pasteboard/paste-line-endings-004.html: Added.
2290 * layout-tests/editing/pasteboard/paste-line-endings-005-expected.txt: Added.
2291 * layout-tests/editing/pasteboard/paste-line-endings-005.html: Added.
2292 * layout-tests/editing/pasteboard/paste-line-endings-006-expected.txt: Added.
2293 * layout-tests/editing/pasteboard/paste-line-endings-006.html: Added.
2294 * layout-tests/editing/pasteboard/paste-line-endings-007-expected.txt: Added.
2295 * layout-tests/editing/pasteboard/paste-line-endings-007.html: Added.
2296 * layout-tests/editing/pasteboard/paste-line-endings-008-expected.txt: Added.
2297 * layout-tests/editing/pasteboard/paste-line-endings-008.html: Added.
2298 * layout-tests/editing/pasteboard/paste-line-endings-009-expected.txt: Added.
2299 * layout-tests/editing/pasteboard/paste-line-endings-009.html: Added.
2300 * layout-tests/editing/pasteboard/paste-line-endings-010-expected.txt: Added.
2301 * layout-tests/editing/pasteboard/paste-line-endings-010.html: Added.
2305 2005-03-10 Darin Adler <darin@apple.com>
2307 Reviewed by Richard.
2309 - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
2311 * khtml/rendering/render_text.cpp: (getCharacterBreakIterator): Set boolean "got iterator" to true.
2313 2005-03-10 Darin Adler <darin@apple.com>
2317 - fixed <rdar://problem/4042867> "Bigger" changes the font size of too much text when the selection is on a style-change boundary
2319 * khtml/editing/htmlediting.cpp: (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
2320 Advance out of the starting text node if we're at the end of it.
2322 2005-03-10 Darin Adler <darin@apple.com>
2324 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::write): Fixed assertion for nested calls to write.
2326 2005-03-10 David Harrison <harrison@apple.com>
2330 <rdar://problem/4032346> REGRESSION (Mail): changing 1st line of a URL that wraps to two lines doesn't always update 2nd line
2332 * khtml/rendering/bidi.cpp:
2333 (khtml::RenderBlock::matchedEndLine):
2334 Look at first clean line in case line wrap implicitly dirtied it.
2336 2005-03-10 Maciej Stachowiak <mjs@apple.com>
2340 <rdar://problem/4046018> REGRESSION (TOT): RSS pages don't display anything
2342 * kwq/WebCoreBridge.mm:
2343 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Exempt
2344 feed: and feeds: pages from the local file security check.
2346 2005-03-10 Darin Adler <darin@apple.com>
2348 Change written by Steve Peters, reviewed by me.
2350 - fixed <rdar://problem/4045924> improve compareBoundaryPoints to make style changes faster
2352 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::compareBoundaryPoints):
2353 Do early outs in a couple of the loops to make things faster.
2355 2005-03-10 Jens Alfke <jens@apple.com>
2359 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.
2361 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.
2363 This ensures that the applet will get loaded even if there is no explicit </applet> tag.
2365 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.
2367 * khtml/html/html_objectimpl.cpp:
2368 (HTMLAppletElementImpl::closeRenderer):
2369 * khtml/html/html_objectimpl.h:
2370 * khtml/html/htmlparser.cpp:
2371 (KHTMLParser::insertNode):
2372 (KHTMLParser::processCloseTag):
2373 (KHTMLParser::popOneBlock):
2374 * khtml/xml/dom_nodeimpl.h:
2375 (DOM::NodeImpl::closeRenderer):
2377 2005-03-10 Ken Kocienda <kocienda@apple.com>
2383 <rdar://problem/4024929> REGRESSION (Mail): Pasting text with multiple reply levels removes one level instead of all
2385 The code to figure out which node to use to merge into an existing line did not drill into the first inline element
2386 as needed to make the feature work as user expect. Instead, it looked at the first node, and if it was a block, it
2387 skipped that node. This worked for some cases (including the important "paste-as-quotation" case) but obviously
2388 doesn't work for content quoted more than once.
2390 Now, mergeStartNode() will look for the first node in pasted content that is not a block. It will now also look
2391 for nodes specially marked by Mail as a node added to make "Paste As Quotation" work. It won't skip those.
2393 NOTE: This change will break Mail's "Paste As Quotation" feature for TOT WebKit users, but this is only a temporary
2394 problem that will exist until we sync up with Mail's pending change to mark nodes as needed in its pasteAsQuotation:
2397 * khtml/editing/html_interchange.h: Add ApplePasteAsQuotation constant used to check for "marked" blockquotes.
2398 * khtml/editing/htmlediting.cpp:
2399 (khtml::ReplacementFragment::mergeStartNode): Look for first node that is either not a block or is marked as
2400 an ApplePasteAsQuotation node.
2401 (khtml::isMailPasteAsQuotationNode): New helper that looks for nodes marked with ApplePasteAsQuotation.
2402 * khtml/editing/htmlediting.h: Updated header for new function.
2404 This test result changed is an acceptable way.
2406 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
2407 * layout-tests/editing/pasteboard/paste-text-013.html
2409 NOTE: This change causes a regression in this layout test:
2411 * layout-tests/editing/pasteboard/paste-text-013.html
2413 This problem will need to be fixed separately, and this bug has been filed to track this problem:
2414 <rdar://problem/4045513> Copying and pasting selection starting at end of paragraph can incorrectly remove line break
2416 2005-03-09 Maciej Stachowiak <mjs@apple.com>
2418 Reviewed by Richard.
2420 <rdar://problem/4040776> Dashboard (Weather widget) is a memory hog
2422 Change things around so the event listeners for XMLHttpRequest
2423 mark their JS listener objects instead of holding a hard
2424 reference, to avoid an unbreakable reference cycle.
2426 * khtml/ecma/kjs_events.cpp:
2427 (JSAbstractEventListener::JSAbstractEventListener):
2428 (JSAbstractEventListener::~JSAbstractEventListener):
2429 (JSAbstractEventListener::handleEvent):
2430 (JSAbstractEventListener::eventListenerType):
2431 (JSUnprotectedEventListener::JSUnprotectedEventListener):
2432 (JSUnprotectedEventListener::~JSUnprotectedEventListener):
2433 (JSUnprotectedEventListener::listenerObj):
2434 (JSUnprotectedEventListener::windowObj):
2435 (JSUnprotectedEventListener::mark):
2436 (JSEventListener::JSEventListener):
2437 (JSEventListener::~JSEventListener):
2438 (JSEventListener::listenerObj):
2439 (JSEventListener::windowObj):
2440 (JSLazyEventListener::JSLazyEventListener):
2441 * khtml/ecma/kjs_events.h:
2442 * khtml/ecma/kjs_html.h:
2443 * khtml/ecma/kjs_window.cpp:
2444 (Window::getJSEventListener):
2445 (Window::getJSUnprotectedEventListener):
2446 * khtml/ecma/kjs_window.h:
2447 * khtml/ecma/xmlhttprequest.cpp:
2448 (KJS::XMLHttpRequest::putValue):
2449 (KJS::XMLHttpRequest::mark):
2450 * khtml/ecma/xmlhttprequest.h:
2451 * khtml/khtml_part.h:
2453 2005-03-06 Maciej Stachowiak <mjs@apple.com>
2457 <rdar://problem/4005575> Arbitrary file disclosure vulnerability due to ability to load local html from remote content
2459 * khtml/ecma/kjs_html.cpp:
2460 (KJS::HTMLDocument::putValue):
2461 * khtml/ecma/kjs_window.cpp:
2463 (WindowFunc::tryCall):
2465 (LocationFunc::tryCall):
2466 * khtml/khtml_part.cpp:
2468 (KHTMLPart::scheduleLocationChange):
2469 (KHTMLPart::slotRedirect):
2470 (KHTMLPart::processObjectRequest):
2471 * khtml/khtml_part.h:
2472 * khtml/khtmlpart_p.h:
2473 * kwq/KWQKHTMLPart.mm:
2474 (KWQKHTMLPart::openURLRequest):
2475 (KWQKHTMLPart::urlSelected):
2476 (KWQKHTMLPart::createPart):
2477 * kwq/KWQKHTMLPartBrowserExtension.mm:
2478 (KHTMLPartBrowserExtension::createNewWindow):
2479 * kwq/WebCoreBridge.h:
2480 * kwq/WebCoreBridge.mm:
2481 (hasCaseInsensitivePrefix):
2482 (-[WebCoreBridge didNotOpenURL:pageCache:]):
2483 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]):
2485 2005-03-09 Richard Williamson <rjw@apple.com>
2487 Fixed <rdar://problem/4032938> Safari: text layout for MS P Gothic font is corrupted
2489 Remove our hacked special case now we have our own cache of
2490 which fonts are fixed pitch.
2495 (QFont::isFixedPitch):
2497 2005-03-09 David Harrison <harrison@apple.com>
2501 <rdar://problem/4037141> REGRESSION (Mail): Pasting deletes preceding blank lines with certain steps
2503 * khtml/editing/htmlediting.cpp:
2504 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2505 Add check for anonymous text after blocks.
2507 2005-03-08 Ken Kocienda <kocienda@apple.com>
2513 <rdar://problem/4039661> crash in ApplyStyleCommand::applyBlockStyle pasting contents of webpage into Mail or Blot
2514 <rdar://problem/4039672> hang in moveParagraphContentsToNewBlockIfNecessary after pasting contents of webpage into Blot
2516 * khtml/editing/htmlediting.cpp:
2517 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Fix for 4039672. Iteration needs to do
2518 a traverseNextSibling(), not a traverseNextNode(). The latter might iterate into a child that already got moved, and
2519 the code can infinite loop as a result.
2520 (khtml::ApplyStyleCommand::applyBlockStyle): Fix for 4039661. This function iterates over a set of nodes to apply
2521 block styles. Before, the iteration would go from the start to the end of the selection, and apply block styles
2522 as it went. However, the act of applying style could confuse the iteration. Now I iterate and store the relevant
2523 nodes in QPtrList before doing any style manipulation, and then iterate that set of nodes.
2525 2005-03-08 Darin Adler <darin@apple.com>
2527 Change written by Hyatt, reviewed by me.
2529 - fixed <rdar://problem/3952698> Function buttons do not display properly with Telia Webmail
2531 * khtml/rendering/render_replaced.cpp: (RenderReplaced::calcMinMaxWidth):
2532 Only use a minWidth of 0 for images with a percentage value. Other replaced elements aren't scalable
2533 so their minWidth should be their calculated width. This has been wrong all along, but it's a relatively
2534 safe change because it only affects replaced elements' min-width.
2536 2005-03-08 David Harrison <harrison@apple.com>
2540 <rdar://problem/4039006> REGRESSION (Mail): Command-left-arrow goes to the start of the wrong line in particular message
2542 * khtml/editing/visible_units.cpp:
2543 (khtml::startOfLine):
2544 Use firstLeafChild() instead of firstChild().
2546 2005-03-08 Richard Williamson <rjw@apple.com>
2548 Fixed by Tom Madden.
2550 Fixed <rdar://problem/4038586> 8A402: Osaka-Mono text overlaps when typing with input method
2552 We weren't clearing the "all ascii" flag when setting text on
2555 Reviewed by Richard Williamson.
2557 * khtml/rendering/render_text.cpp:
2558 (RenderText::setText):
2560 2005-03-08 Darin Adler <darin@apple.com>
2562 Reviewed by Ken and Maciej.
2564 - fixed <rdar://problem/3988809> REGRESSION (Mail): wide space characters are turned into plain old spaces when typed or pasted
2566 Changed the few places where it matters to use a "collapsible whitespace" concept instead of
2567 the general whitespace concept. This means treating only ' ' and '\n' specially instead of
2568 including other space characters, which matches what the space-collapsing logic does in RenderText,
2569 although it really needs to behave differently based on whitespace mode.
2571 * khtml/editing/visible_text.h: (khtml::isCollapsibleWhitespace): Added. This returns true only for
2572 ' ' and '\n' since they are the only characters collapsed once text is in the DOM. But really it
2573 can't do the job ignoring white-space mode, so some day it must go.
2575 * khtml/editing/html_interchange.cpp: (convertHTMLTextToInterchangeFormat): Changed to use
2576 isCollapsibleWhitespace and removed unnecessary calls to latin1().
2578 * khtml/editing/htmlediting.cpp:
2579 (khtml::isNBSP): Removed unnecessary creation/destruction of QChar each time this is called.
2580 (khtml::nextCharacterIsCollapsibleWhitespace): Renamed from isWS and changed to use isCollapsibleWhitespace.
2581 (khtml::DeleteSelectionCommand::fixupWhitespace): Use isCollapsibleWhitespace instead of isWS,
2582 since we only want to do our NBSP tricks for collapsible whitespace.
2583 (khtml::InsertTextCommand::input): Changed use of isTab to instead say == "\t" since that does the
2584 same thing and is arguably just as clear. Changed use of isWS to == " " since the input text can't
2585 include any "\n" characters, and really a plain old space is the only collapsible thing that can
2586 be passed in. Use isCollapsibleWhitespace instead of isWS since we want to do NBSP tricks only for
2587 collapsible whitespace, not all whitespace.
2588 (khtml::InsertTextCommand::insertSpace): Use isCollapsibleWhitespace instead of isWS since we want
2589 to do NBSP tricks only for collapsible whitespace, not all whitespace.
2590 (khtml::RebalanceWhitespaceCommand::doApply): Ditto.
2592 * khtml/xml/dom_position.h: Changed treatNBSPAsWhiteSpace parameters to considerNonCollapsibleWhitespace
2593 parameters. The most common callers are only interested in collapsible whitespace, and the smart copy
2594 and paste callers want to include all whitespace, including non-breaking spaces and all the Unicode spaces.
2595 * khtml/xml/dom_position.cpp:
2596 (DOM::Position::leadingWhitespacePosition): Rename the parameter, and use either QChar::isSpace or
2597 isCollapsibleWhitespace depending on the boolean passed in.
2598 (DOM::Position::trailingWhitespacePosition): Ditto.
2600 2005-03-07 John Sullivan <sullivan@apple.com>
2604 - <rdar://problem/4040868> REGRESSION (Mail, 403-403+): Drag and drop deletes text,
2605 many other bad editing problems
2607 * khtml/rendering/render_text.cpp:
2608 (RenderText::caretMaxOffset):
2609 A "-" should have been a "+" in this method that was tweaked an hour ago. Editing
2610 was completely horked.
2612 2005-03-07 Richard Williamson <rjw@apple.com>
2614 Additional nil check from fix for 4040749.
2616 * khtml/rendering/render_box.cpp:
2617 (RenderBox::setStyle):
2619 2005-03-07 Richard Williamson <rjw@apple.com>
2621 Additional nil check from fix for 4040749.
2623 * khtml/rendering/render_layer.cpp:
2624 (RenderLayer::updateLayerPosition):
2626 2005-03-07 David Harrison <harrison@apple.com>
2630 <rdar://problem/4033202> REGRESSION (Mail): Can't arrow up at a particular spot in a particular Mail message
2632 Doublecheck that new position is really on a different line, because the VisiblePosition constructor does not.
2633 Filed <rdar://problem/4040763> for that problem.
2635 * khtml/editing/visible_units.cpp:
2636 (khtml::previousLinePosition):
2638 2005-03-07 Richard Williamson <rjw@apple.com>
2640 Fixed <rdar://problem/4040749> REGRESSION (125-178): opacity style not working, breaks fading images on okcupid.com
2642 When layers are dynamically created/removed as a result of changing opacity they weren't being correctly
2643 sized and positioned. This happens whenever opacity goes from < 1 to 1.
2647 * khtml/rendering/render_box.cpp:
2648 (RenderBox::setStyle):
2649 * khtml/rendering/render_layer.cpp:
2650 (RenderLayer::updateLayerPosition):
2652 2005-03-07 Christy Warren <kali@apple.com>
2656 * khtml/rendering/render_text.cpp:
2657 (RenderText::caretMinOffset): modified to handle BIDI case by checking all text boxes for min offset
2658 (RenderText::caretMaxOffset): modified to handle BIDI case by checking all text boxes for max offset
2660 2005-03-07 David Harrison <harrison@apple.com>
2664 <rdar://problem/4029225> REGRESSION (Mail): Crash if hit return after dragging in attachment - DeleteSelectionCommand::initializePositionData
2666 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.
2667 Filed <rdar://problem/4040358> RenderBR height() is not accurate.
2669 * khtml/editing/htmlediting.cpp:
2670 (khtml::ReplaceSelectionCommand::doApply):
2671 When height is 0, double check that the placeholder is the first position on the line.
2675 2005-03-07 Ken Kocienda <kocienda@apple.com>
2681 <rdar://problem/4040136> Expose SPI for WebCore's functions to create document fragments from plain text and markup strings
2683 * kwq/DOMHTML.mm: Add two new SPI functions.
2684 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:])
2685 (-[DOMHTMLDocument _createDocumentFragmentWithText:])
2686 * kwq/DOMPrivate.h: Declare the new SPI here, a privately-exported header, so Mail can make use of it.
2688 2005-03-07 Ken Kocienda <kocienda@apple.com>
2694 <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date
2696 * khtml/editing/htmlediting.cpp:
2697 (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running
2698 when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already
2699 in the content needs to be preserved. A simple one-line change now sees to this.
2701 * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless,
2702 <br> at the end of a paragraph. This makes sense given the code change.
2705 * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added.
2706 * layout-tests/editing/pasteboard/paste-text-018.html: Added.
2708 2005-03-07 Ken Kocienda <kocienda@apple.com>
2714 <rdar://problem/4035648> REGRESSION (Mail): line feed in source HTML file causes bad copy/paste behavior
2716 The createMarkup() function in markup.cpp iterates over the nodes in a range,
2717 and does some bookkeeping to figure out when to add close tags to the markup.
2718 Some code added at the start of the loop to prevent markup from being written
2719 for unrendered nodes short-circuited the rest of the loop, and so prevented
2720 the close-tag-writing code from running when it should.
2722 This is why the "plain" text wound up inside of the bold tag in the example
2723 above. The addition of the unrendered return character caused an incorrect
2724 delay in the close tag for the bold element from being written out, with the
2725 result being that it wound up including additional content.
2727 The fix is to add checks for node renderers throughout the loop at the points
2728 where markup is written out for each node. This allows the additional close
2729 tag logic to run as needed.
2731 All layout tests pass with this change.
2733 * khtml/editing/markup.cpp:
2734 (khtml::createMarkup)
2738 * layout-tests/editing/pasteboard/paste-4035648-fix-expected.txt: Added.
2739 * layout-tests/editing/pasteboard/paste-4035648-fix.html: Added.
2741 2005-03-06 Christy Warren <kali@appple.com>
2745 * khtml/rendering/render_text.cpp:
2746 (lastRendererOnPrevLine): helper for RenderText::caretRect
2747 (RenderText::caretRect): added code to properly handle bidi ordered text boxes
2749 2005-03-06 Christy Warren <kali@apple.com>
2753 * khtml/editing/visible_position.cpp: Eliminated code that cuts off searching through the text boxes based on an assumption that breaks under bidi
2754 (khtml::VisiblePosition::isCandidate):
2755 * kwq/KWQFontMetrics.mm:
2756 (QFontMetrics::checkSelectionPoint): Made the initialization of the WebCoreStyle honor the reversed flag
2758 2005-03-05 John Sullivan <sullivan@apple.com>
2762 - fixed <rdar://problem/4038417> Mail crashed in StyleChange::checkForLegacyHTMLStyleChange
2763 when composing a reply
2765 * khtml/editing/htmlediting.cpp:
2766 (khtml::StyleChange::checkForLegacyHTMLStyleChange):
2767 Added missing nil check.
2769 2005-03-05 Darin Adler <darin@apple.com>
2773 - fixed <rdar://problem/4038478> Crash in renderer viewing RSS feed at feed://wvs.topleftpixel.com/index.rdf
2775 * khtml/xml/dom_docimpl.cpp: (widgetForNode): Check for nil before going from node to renderer.
2777 2005-03-05 Darin Adler <darin@apple.com>
2779 Reviewed by Richard.
2781 - fixed <rdar://problem/4037700> Every character typed causes stat call for /usr/share/icu/icudt32b_char.brk
2783 * khtml/rendering/render_text.cpp:
2784 (getCharacterBreakIterator): Added. Helper that sets up an iterator for the passed-in text.
2785 Shares a single global iterator (fast, albeit not thread-safe).
2786 (RenderText::previousOffset): Changed to call getCharacterBreakIterator.
2787 (RenderText::nextOffset): Ditto.
2789 2005-03-05 Ken Kocienda <kocienda@apple.com>
2795 <rdar://problem/4038267> REGRESSION (Mail): Crash copying and pasting end of paragraph
2797 Code to handle content that has a "logical" newline at the end of the pasted content, and the code
2798 to adjust the selection at the end of the paste operation made an assumption that at least one
2799 node had been inserted by the paste command. This is not necessarily true in the case where the sole content
2800 in the pasted content is one of these "logical" newlines. Adjust some code around so that we don't deref
2801 null, but still adjust the selection correctly for this case. In each of the two functions below, some
2802 null checks have been added, and some code has been rearranged a little bit to continue on through
2803 the end of completeHTMLReplacement, even if no nodes have been inserted. The patch looks bigger and more
2804 complicated than the conceptual change.
2806 * khtml/editing/htmlediting.cpp:
2807 (khtml::ReplaceSelectionCommand::doApply)
2808 (khtml::ReplaceSelectionCommand::completeHTMLReplacement)
2810 * layout-tests/editing/pasteboard/paste-4038267-fix-expected.txt: Added.
2811 * layout-tests/editing/pasteboard/paste-4038267-fix.html: Added.
2813 2005-03-05 Darin Adler <darin@apple.com>
2817 - fixed <rdar://problem/4025918> images copied from Safari with relative src URLs aren't pasted into Mail messages (KURL resolves base URLs incorrectly)
2819 * kwq/KWQKURL.mm: (KURL::KURL): Add a slash at the start of the path if a relative part is adding
2820 a path onto a URL that has "pre-path" bits like host name, but no path yet. This doesn't come up
2821 for http because in that case we add a trailing "/" as part of canonicalization.
2823 2005-03-04 John Sullivan <sullivan@apple.com>
2827 - fixed <rdar://problem/4033705> REGRESSION (Mail): Copy/Paste from Excel
2828 crashes Mail in KWQKHTMLPart::fontForSelection(bool*) const + 232
2830 * kwq/KWQKHTMLPart.mm:
2831 (KWQKHTMLPart::fontForSelection):
2832 Check for nil startNode, not just nil renderer.
2834 2005-03-04 David Harrison <harrison@apple.com>
2836 Reviewed by Ken, Richard.
2838 <rdar://problem/3996383> REGRESSION (Mail): Deleting all of first line also deletes line ending
2840 Problem was the placeholder check was based on 0 height block, but the block in this
2841 case is the BODY, which has other content even though the paragraph is gone.
2843 * khtml/editing/htmlediting.cpp:
2844 (khtml::CompositeEditCommand::insertBlockPlaceholder):
2845 Now does insert instead of append!
2847 (khtml::CompositeEditCommand::appendBlockPlaceholder):
2848 New. Actually does append.
2850 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
2851 Renamed from insertBlockPlaceholderIfNeeded because it can insert or append. Also accepts "force insert" flag.
2853 (khtml::CompositeEditCommand::removeBlockPlaceholder):
2854 Renamed for succinctness from removeBlockPlaceholderIfNeeded.
2856 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2857 (khtml::DeleteSelectionCommand::moveNodesAfterNode):
2858 Use renamed methods.
2860 (khtml::DeleteSelectionCommand::doApply):
2861 Use addBlockPlaceholderIfNeeded "force insert" flag if deleting whole paragraphs did not leave an empty one.
2863 (khtml::InsertParagraphSeparatorCommand::doApply):
2864 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
2865 (khtml::InsertTextCommand::input):
2866 Use renamed methods.
2868 * khtml/editing/htmlediting.h:
2869 Renamed and new methods per above.
2872 2005-03-04 Chris Blumenberg <cblu@apple.com>
2874 Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after pasting attachment at end of message
2878 * khtml/editing/visible_units.cpp:
2879 (khtml::endOfParagraph): don't consider text nodes that have no rendered characters
2881 2005-03-04 Richard Williamson <rjw@apple.com>
2883 Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going back/forward corrupts HTML pages (google.com)
2885 The parse mode wasn't be restored to the document when going
2890 * kwq/KWQKHTMLPart.mm:
2891 (KWQKHTMLPart::openURLFromPageCache):
2892 * kwq/KWQPageState.h:
2893 * kwq/KWQPageState.mm:
2894 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
2896 2005-03-04 Ken Kocienda <kocienda@apple.com>
2900 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Shame on me!
2901 I landed my last fix without running layout tests. This one changes in a subtle, but
2904 2005-03-04 Ken Kocienda <kocienda@apple.com>
2906 Reviewed by Harrison
2910 <rdar://problem/4032543> REGRESSION (Mail): Mail hangs when quoted text is pasted twice
2912 This code change fixes the bug in a non-obvious way. The root cause of the problem was
2913 that a VisiblePosition created using an affinity originating in Mail code caused
2914 two VisiblePosition objects that should have been equal to differ only in their
2915 affinities, which in turn caused us to run a code path that should not have run.
2917 * khtml/editing/visible_position.cpp:
2918 (khtml::VisiblePosition::VisiblePosition): Added copy constructor.
2919 (khtml::VisiblePosition::next): Factored out inline code that used to be here into new
2920 setAffinityUsingLinePosition() function.
2921 (khtml::isEqualIgnoringAffinity): New helper to handle cases when affinity in equality check does
2922 not matter. However, we want to know about such cases where a VisiblePosition differs only by affinity,
2923 and the code will assert in development when this happens.
2924 (khtml::isNotEqualIgnoringAffinity): Ditto, but not. :)
2925 (khtml::setAffinityUsingLinePosition): New helper function mentioned above. This will "correct"
2926 upstream affinity to downstream if the affinity does not make a difference for the position.
2927 * khtml/editing/visible_position.h:
2928 * khtml/editing/visible_range.h: Wacky bug. The operator== for this class took VisiblePosition classes!
2929 * khtml/editing/visible_units.cpp:
2930 (khtml::isStartOfParagraph): Now performs equality check without regard to affinity.
2931 (khtml::isEndOfParagraph): Ditto.
2932 (khtml::isStartOfBlock): Ditto.
2933 (khtml::isEndOfBlock): Ditto.
2934 * kwq/WebCoreBridge.mm:
2935 (-[WebCoreBridge setSelectedDOMRange:affinity:]): Adjusts the affinity using setAffinityUsingLinePosition()
2938 2005-03-04 Darin Adler <darin@apple.com>
2942 - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut
2944 * khtml/editing/htmlediting.h: Added insertTextRunWithoutNewlines.
2945 * khtml/editing/htmlediting.cpp:
2946 (khtml::InsertTextCommand::input): Added assertion to make sure strings with newlines don't get
2948 (khtml::TypingCommand::insertText): Added. Takes the name of the old function, but is a new
2949 level that breaks runs into lines and inserts each one separately.
2950 (khtml::TypingCommand::insertTextRunWithoutNewlines): Renamed old insertText to this.
2952 * khtml/dom/dom_string.h: Made substring be a const member function.
2953 * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Made this const.
2955 2005-03-04 Darin Adler <darin@apple.com>
2959 - fixed <rdar://problem/4020413> REGRESSION (Mail): can't use fonts with names that start with "#" in Mail (Korean fonts)
2961 * khtml/css/css_valueimpl.cpp:
2962 (DOM::isLegalIdentifier): Added. Commented out and not used.
2963 (DOM::quoteStringIfNeeded): Quotes the string if needed. For now only if it starts with "#".
2964 (DOM::CSSPrimitiveValueImpl::cssText): Call quoteStringIfNeeded when asked for cssText for an arbitrary string, since we
2965 need text you can re-parse.
2966 (DOM::FontFamilyValueImpl::cssText): Ditto.
2968 * khtml/editing/markup.cpp:
2969 (khtml::startMarkup): Added comments about lack of quoting for attributes.
2970 (khtml::createMarkup): Ditto.
2972 2005-03-04 Adele Amchan <adele@apple.com>
2976 Fix for <rdar://problem/4021711> REGRESSION(125-188) blank pages when browsing forum at cooperativeresearch.org - cached external script problem
2978 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::scriptHandler): set flag needToRefCachedScript so we can make sure
2979 notifyFinished is called after pendingSrc is set up with the right data from the cached script
2981 2005-03-04 Ken Kocienda <kocienda@apple.com>
2987 <rdar://problem/4029632> Tiger 8A398:- Mail crashes in DOM::NodeImpl::isBlockFlow() after pasting text with alignment style and BR element from Safari
2989 * khtml/editing/htmlediting.cpp:
2990 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): VisiblePosition constructor
2991 was failing to yield a position for a node just pasted into the document since a layout was needed
2992 for the calculation to come out right. Layout added. Crash gone.
2996 2005-03-03 Chris Blumenberg <cblu@apple.com>
2998 Fixed: <rdar://problem/3992803> Cannot navigate through list items with the keyboard, you're stuck in the same <li> block unless you click out
3000 Reviewed by harrison.
3002 * khtml/rendering/render_line.cpp:
3003 (khtml::RootInlineBox::closestLeafChildForXPos): avoid returning list markers when possible. Also improved heuristic for returning the best InlineBox given the passed X position.
3006 2005-03-03 Ken Kocienda <kocienda@apple.com>
3012 <rdar://problem/4035198> Pasting text with different styles does not get reproducible results
3014 I had a good idea yesterday to improve the way we "fixup" styles after
3015 pasting, but i chose a poor data structure to do it, a map of
3016 nodes-to-styles. In the fixup step, I iterated over the map elements and
3017 did the fixup. However, since the order in which the items would come
3018 out of the map is indeterminate, we got unpredictable results.
3020 So, the concept was good, but the implementation was flawed. I have
3021 fixed this mapping to be a list instead, so the order that nodes are
3022 evaluated in the fixup step is document order. This works nicely.
3024 * khtml/editing/htmlediting.cpp:
3025 (khtml::ReplacementFragment::~ReplacementFragment): No longer need to explicity deref nodes and
3026 styles saved away for later fixup. This is now handled by the new NodeDesiredStyle class.
3027 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls computeAndStoreNodeDesiredStyle,
3028 function renamed from mapDesiredStyleForNode.
3029 Now accepts a QValueList<NodeDesiredStyle> in place of the old map.
3030 (khtml::NodeDesiredStyle::NodeDesiredStyle): New class that represents a node-to-style mapping.
3031 (khtml::NodeDesiredStyle::~NodeDesiredStyle): Ditto.
3032 (khtml::NodeDesiredStyle::operator=): Ditto.
3033 (khtml::ReplaceSelectionCommand::doApply): Now calls computeAndStoreNodeDesiredStyle,
3034 function renamed from mapDesiredStyleForNode.
3035 (khtml::ReplaceSelectionCommand::fixupNodeStyles): Now operates on a QValueList<NodeDesiredStyle> in
3036 place of the old map.
3037 (khtml::computeAndStoreNodeDesiredStyle): Renamed from mapDesiredStyleForNode. Now operates on a
3038 QValueList<NodeDesiredStyle> in place of the old map.
3039 * khtml/editing/htmlediting.h:
3040 (khtml::NodeDesiredStyle): New class that represents a node-to-style mapping.
3041 (khtml::ReplacementFragment::desiredStyles): Now returns a QValueList<NodeDesiredStyle> in place of the old map.
3043 * layout-tests/editing/style/typing-style-003-expected.txt: Results changed in an acceptable way.
3045 2005-03-02 Darin Adler <darin@apple.com>
3049 - fixed <rdar://problem/4029741> REGRESSION (188-189): <input type=text> are cleared when you hide/show them
3051 * khtml/html/html_formimpl.h: Added detach functions for both input and text area elements, since
3052 both have m_valueMatchesRenderer flags.
3053 * khtml/html/html_formimpl.cpp:
3054 (DOM::HTMLInputElementImpl::detach): Set m_valueMatchesRenderer to false, since the renderer is going away.
3055 (DOM::HTMLTextAreaElementImpl::detach): Ditto.
3057 2005-03-02 Ken Kocienda <kocienda@apple.com>
3063 <rdar://problem/4006151> in reply, caret moves to next line after toggling bold style then typing
3065 * khtml/editing/htmlediting.cpp:
3066 (khtml::ApplyStyleCommand::applyInlineStyle): Defer cleaning up empty style until the end of the
3067 function. In some situations, the render tree can get confused when we do this removal up front.
3068 I wish I understood the reasons more deeply, but this bit of code shuffling seems harmless, and
3071 2005-03-02 Darin Adler <darin@apple.com>
3075 - fixed <rdar://problem/4024966> crash happened twice in [KWQTextField setHasFocus:] + 0xe8
3077 Added more nil checks to the widget implementations. Anywhere a widget pointer is used, do a nil check,
3078 rather than relying on high level assumptions about which calls can and can't destroy the HTML element
3079 (and hence the widget). The case in the bug seems to be a case where scrolling destroyed the element.
3080 We can't be sure this fixes the bug, but we can be relatively sure we didn't introduce any new problems,
3081 because this just avoids nil-dereferencing.
3084 (-[KWQButton becomeFirstResponder]):
3085 (-[KWQButton nextKeyView]):
3086 (-[KWQButton previousKeyView]):
3087 * kwq/KWQListBox.mm:
3088 (-[KWQTableView mouseDown:]):
3089 (-[KWQTableView becomeFirstResponder]):
3090 (-[KWQTableView numberOfRowsInTableView:]):
3091 (-[KWQTableView tableViewSelectionDidChange:]):
3092 (-[KWQTableView tableView:shouldSelectRow:]):
3093 (-[KWQTableView selectionShouldChangeInTableView:]):
3094 * kwq/KWQScrollBar.mm:
3095 (-[KWQScrollBar scroll:]):
3097 (-[KWQSlider mouseDown:]):
3098 (-[KWQSlider slide:]):
3099 (-[KWQSlider becomeFirstResponder]):
3100 (-[KWQSlider nextKeyView]):
3101 (-[KWQSlider previousKeyView]):
3102 * kwq/KWQTextArea.mm:
3103 (-[KWQTextAreaTextView becomeFirstResponder]):
3104 (-[KWQTextAreaTextView resignFirstResponder]):
3105 (-[KWQTextAreaTextView mouseDown:]):
3106 * kwq/KWQTextField.mm:
3107 (-[KWQTextFieldController action:]):
3108 (-[KWQTextFieldController controlTextDidEndEditing:]):
3109 (-[KWQTextFieldController controlTextDidChange:]):
3110 (-[KWQTextFieldController textView:didHandleEvent:]):
3111 (-[KWQTextFieldController setHasFocus:]):
3113 2005-03-02 Richard Williamson <rjw@apple.com>
3115 Fixed <rdar://problem/4031483> Leak (RenderObject::createInlineBox) reproducible with Stock widget
3117 We were leaking inline block line boxes. Argh!
3121 * khtml/rendering/render_flow.cpp:
3122 (RenderFlow::dirtyLineBoxes):
3123 * khtml/rendering/render_line.cpp:
3124 (khtml::InlineBox::deleteLine):
3126 2005-03-02 Chris Blumenberg <cblu@apple.com>
3128 Fixed: <rdar://problem/3976872> REGRESSION (Mail): Pasted plain text doesn't get the proper style if pasted into newlines
3130 Reviewed by kocienda.
3132 * khtml/editing/htmlediting.cpp:
3133 (khtml::EditCommand::styleAtPosition): new, factored out from calculateStyleBeforeInsertion
3134 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): call styleAtPosition
3135 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): clear new m_insertionStyle ivar
3136 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): deref new m_insertionStyle ivar
3137 (khtml::ReplaceSelectionCommand::doApply): store the style so it later be applied when matching style
3138 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): apply style from m_insertionStyle when matching style
3139 * khtml/editing/htmlediting.h:
3141 2005-03-02 Maciej Stachowiak <mjs@apple.com>
3145 <rdar://problem/4031718> REGRESSION (401-401+): Safari reproducible crash setting up scope in JSLazyEventListener::parseCode authenticating to bugweb
3147 * khtml/ecma/kjs_events.cpp:
3148 (JSLazyEventListener::parseCode): If originalNode is NULL, don't
3149 mess with the scope chain.
3151 * khtml/html/html_baseimpl.cpp:
3152 (HTMLBodyElementImpl::parseHTMLAttribute): For handlers that are
3153 delcared on body but set on the document, pass NULL to avoid
3154 swizzling the scope chain. It turns out that this is what browsers
3155 do, and it finesses the crash.
3157 2005-03-02 David Harrison <harrison@apple.com>
3161 <rdar://problem/3948453> Can't type accented chars as first character in Stickies widget
3163 * khtml/editing/htmlediting.cpp:
3164 (khtml::ReplaceSelectionCommand::doApply):
3166 2005-03-02 Ken Kocienda <kocienda@apple.com>
3171 <rdar://problem/4020574> REGRESSION (Mail): copy/paste first part of reply-quoted text alters downstream style
3173 The problem was that the operation to move nodes following the newly-pasted nodes did not preserve the
3174 style of these moved nodes. I have generalized some of the functions that compute and preserve styles
3175 for nodes and then apply these styles after a DOM operation.
3177 * khtml/editing/htmlediting.cpp:
3178 (khtml::ReplacementFragment::~ReplacementFragment): Call new derefNodesAndStylesInMap() helper function
3179 in place of old code that had this deref'ing inline.
3180 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Now calls new mapDesiredStyleForNode() helper
3181 function place of old code that had this style computation inline.
3182 (khtml::ReplacementFragment::removeStyleNodes): Updated comment for new helper name.
3183 (khtml::ReplaceSelectionCommand::doApply): Now calls new helpers in place of helpers whose names were changed,
3184 or in place of pre-refactored inline code.
3185 (khtml::ReplaceSelectionCommand::fixupNodeStyles): Renamed from applyStyleToInsertedNodes(). Now generalized
3186 to take the map of nodes to use for the fixup. This makes it possible to call this code with different maps,
3187 and that is needed to fix the bug.
3188 (khtml::mapDesiredStyleForNode): New helper function to compute the inheritable styles for a given node
3189 and map this style to the given node in the given map. This function now also includes the code that was
3190 in the removeBlockquoteColorsIfNeeded(). This latter helper has now been removed.
3191 (khtml::derefNodesAndStylesInMap): Simple helper to deref map members.
3192 * khtml/editing/htmlediting.h:
3193 (khtml::ReplacementFragment::desiredStyles): New helper to return map of nodes-to-desiredStyles.
3195 2005-03-01 Ken Kocienda <kocienda@apple.com>
3201 <rdar://problem/4011358> REGRESSION(Mail): after dragging text to mail message and deleting, typing or dragging new text doesn't work
3203 * khtml/editing/visible_position.cpp:
3204 (khtml::VisiblePosition::isCandidate): Insertion point disappearing was due to a failed
3205 check here after deleting all the content in the body element. The special "empty block"
3206 needs to add check for DOM children. A block may have straggling anonymous render children in
3207 some cases, and so the check needs to be (!DOM-kids || !render-kids).
3209 Also, I botched the last checkin trying to split these two patches in my tree. Wrong layout tests
3210 got checked in, I checked in a conflict marker in the Changelog, etc. I fixed everything with this checkin.
3212 2005-03-01 Ken Kocienda <kocienda@apple.com>
3216 Improved fix for this bug:
3218 <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML
3220 Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier.
3222 * khtml/editing/htmlediting.cpp:
3223 (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the
3224 "last in block" situation. Remove special case for "downstream node is in different block" and handle
3225 this case with a little bit of special code in the general insertion case.
3227 Results studied to make sure there were no problems.
3229 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt
3230 * layout-tests/editing/inserting/insert-div-001-expected.txt
3231 * layout-tests/editing/inserting/insert-div-002-expected.txt
3232 * layout-tests/editing/inserting/insert-div-004-expected.txt
3233 * layout-tests/editing/inserting/insert-div-005-expected.txt
3234 * layout-tests/editing/inserting/insert-div-009-expected.txt
3235 * layout-tests/editing/inserting/insert-div-014-expected.txt
3236 * layout-tests/editing/inserting/insert-div-018-expected.txt
3237 * layout-tests/editing/inserting/insert-div-024-expected.txt
3238 * layout-tests/editing/pasteboard/paste-text-011-expected.txt
3239 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
3240 * layout-tests/editing/pasteboard/paste-text-015-expected.txt
3241 * layout-tests/editing/style/block-style-004-expected.txt
3242 * layout-tests/editing/style/block-style-005-expected.txt
3243 * layout-tests/editing/style/block-style-006-expected.txt
3247 * layout-tests/editing/inserting/insert-div-027.html
3248 * layout-tests/editing/inserting/insert-div-027-expected.txt
3250 2005-03-01 David Hyatt <hyatt@apple.com>
3252 Fix for 4030890, regression with <sup> on Google. Fix some bogus != comparison checks in verticalPositionHint.
3256 (RenderObject::getVerticalPosition):
3258 2005-03-01 Chris Blumenberg <cblu@apple.com>
3260 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
3264 * khtml/editing/htmlediting.cpp:
3265 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
3266 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
3267 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
3268 * layout-tests/editing/deleting/smart-delete-001.html: Added.
3269 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
3270 * layout-tests/editing/deleting/smart-delete-002.html: Added.
3272 2005-03-01 Richard Williamson <rjw@apple.com>
3274 Fixed <rdar://problem/4029772> Weather widgets use a lot of memory (more that other widgets)
3276 The string objects created by KWQHeaderStringFromDictionary() leaked.
3278 Reviewed by John Louch.
3281 (KWQHeaderStringFromDictionary):
3283 2005-03-01 Jens Alfke <jens@apple.com>
3287 <rdar://problem/4004531> Simple Sun Signed Applet throws exceptions; doesn't run
3288 Two fixes for the way we extract the parameter-y goodness from <object> tags.
3290 * khtml/rendering/render_frames.cpp:
3291 (RenderPartObject::updateWidget):
3293 2005-03-01 Richard Williamson <rjw@apple.com>
3295 Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari
3297 The problem was due to incorrect "object truncation" in RenderFlow::paintLines.
3298 We attempt to push objects down if they don't fit on a page at
3299 paint time. If the attempt to push object down failed we just
3300 didn't paint at all.
3304 * khtml/rendering/render_flow.cpp:
3305 (RenderFlow::paintLines):
3307 2005-03-01 Chris Blumenberg <cblu@apple.com>
3309 Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
3313 * khtml/editing/htmlediting.cpp:
3314 (khtml::DeleteSelectionCommand::initializePositionData): pass true for treatNBSPAsWhiteSpace to leadingWhitespacePosition and trailingWhitespacePosition when testing whether or not we have to delete those characters as well.
3315 * khtml/editing/jsediting.cpp: pass true for smartDelete when the selection granularity is WORD. This allows us to write smart delete layout tests.
3316 * layout-tests/editing/deleting/smart-delete-001-expected.txt: Added.
3317 * layout-tests/editing/deleting/smart-delete-001.html: Added.
3318 * layout-tests/editing/deleting/smart-delete-002-expected.txt: Added.
3319 * layout-tests/editing/deleting/smart-delete-002.html: Added.
3321 2005-03-01 Ken Kocienda <kocienda@apple.com>