1 2004-07-20 Ken Kocienda <kocienda@apple.com>
5 * khtml/xml/dom_elementimpl.cpp:
6 (ElementImpl::defaultEventHandler): No longer check whether
7 the command key is modifying the key event. This check is
8 now done elsewhere in the code. See the WebKit checkin that
9 added the _web_keyBindingManagerHasBinding method to
12 2004-07-20 Chris Blumenberg <cblu@apple.com>
15 <rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
16 <rdar://problem/3612691> Missing image icons (blue ?) lack context menu
20 * kwq/WebCoreBridge.mm:
21 (-[WebCoreBridge elementAtPoint:]): if there is no image, put the image URL on the element anyway
23 2004-07-20 David Hyatt <hyatt@apple.com>
25 Fix for alt text not working on images.
29 * khtml/rendering/render_image.cpp:
30 (RenderImage::RenderImage):
31 (RenderImage::setPixmap):
33 (RenderImage::calcReplacedWidth):
34 (RenderImage::calcReplacedHeight):
36 2004-07-20 Maciej Stachowiak <mjs@apple.com>
40 <rdar://problem/3720111> REGRESSION(125-152): map fails to load depending on banner ad; weather.com (works in IE and Firefox)
42 * khtml/html/htmltokenizer.cpp:
43 (khtml::HTMLTokenizer::begin): Initialize currentPrependingSrc.
44 (khtml::HTMLTokenizer::scriptHandler): Store a pointer to the currently
45 active prependingSrc variable on the stack, the better to handle weird cases
46 of scripts writing out additional script tags and so forth.
47 (khtml::HTMLTokenizer::write): Deal with the above.
48 * khtml/html/htmltokenizer.h: Declare new member field.
50 2004-07-20 David Hyatt <hyatt@apple.com>
52 Fix for layer positioning error that occurs when absolute positioned blocks are inside static positioned overflow:auto
57 * khtml/rendering/render_layer.cpp:
58 (RenderLayer::updateLayerPosition):
60 2004-07-20 Trey Matteson <trey@apple.com>
62 3705624 REGRESSION: can't rearrange photos on homepage.mac.com album
64 A subtle problem stemming from some interaction between focus handing and
65 event propagation. We previously made it so when a focus shift fails we
66 don't propagate the event to KHTML. The fix is to get rid of the inverse
67 effect, so now even if a focus shift succeeds, we don't propagate to KHTML if
68 the page already canceled default behavior.
70 In this specific case, the page is cancelling default behavior since it
71 does its own dragging, and the bug was our new system dragging was
76 * khtml/khtmlview.cpp:
77 (KHTMLView::dispatchMouseEvent): What he said.
79 2004-07-20 Ken Kocienda <kocienda@apple.com>
85 <rdar://problem/3695240> pasting plain text with newlines in it turns them into spaces
87 * kwq/WebCoreBridge.mm:
88 (-[WebCoreBridge documentFragmentWithText:]): Refine this function to be smart about converting
89 line endings into BR elements.
91 2004-07-20 Ken Kocienda <kocienda@apple.com>
97 <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
99 * khtml/khtml_part.cpp:
100 (KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
101 on the caret, this seems like a better name.
102 * khtml/khtml_part.h:
103 * khtml/khtmlview.cpp:
104 (KHTMLView::focusInEvent): Call setCaretVisible(true)
105 (KHTMLView::focusOutEvent): Call setCaretVisible(false)
106 * kwq/KWQKHTMLPart.mm:
107 (KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
108 * kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
109 * kwq/WebCoreBridge.mm:
110 (-[WebCoreBridge setCaretVisible:]): Ditto.
112 2004-07-19 Maciej Stachowiak <mjs@apple.com>
116 <rdar://problem/3721428> REGRESSION (125.8-146): external javascript statements produce extra garbage character (sina.com)
118 * khtml/misc/stringit.h:
119 (khtml::TokenizerSubstring::TokenizerSubstring): For the apple branch, use the new
120 stableUnicode() method to get the unicode pointer.
123 (QString::detachIfInternal): Reorganize this to be a bit less wacky about refcounts.
124 It does not leave around a zombie internal data handle but rather destroys it right away,
125 and leaves the object pointing to the new handle (which it can then deref). This makes
127 (QString::~QString): Simplify.
128 (QString::stableUnicode): New method that detaches a copy of the KWQStringData if it
129 is internal to a string besides this one. This guarantees that if you get the unicode()
130 pointer, it won't go bad so long as this string is still alive.
132 2004-07-19 David Hyatt <hyatt@apple.com>
134 Fix for 3715117, crash from a bug in removeChildren. Clean up node removal and fix an n-squared removal
135 bug. Also clean up checks in removeChild and in the dispatch of removedFromDocument mutation events to
136 make node removal more efficient.
140 * khtml/xml/dom_nodeimpl.cpp:
142 2004-07-19 John Sullivan <sullivan@apple.com>
146 - fixed <rdar://problem/3141150> can't undo in form textarea fields
148 * kwq/KWQTextArea.mm:
149 (-[KWQTextArea _createTextView]):
150 call setAllowsUndo:YES. My, wasn't this easy?
152 2004-07-19 David Hyatt <hyatt@apple.com>
154 Merge @import fix for CSS1 test suite from Stephan Kulow.
158 * khtml/css/parser.cpp:
159 * khtml/css/parser.y:
160 * layout-tests/css1/basic/containment-expected.txt:
162 2004-07-19 David Hyatt <hyatt@apple.com>
164 Fix for 3718697, crash clicking on JS tab at alaskaair.com.
168 * khtml/rendering/render_flow.cpp:
169 (RenderFlow::detach):
170 (RenderFlow::dirtyLinesFromChangedChild):
171 * khtml/rendering/render_flow.h:
172 * khtml/rendering/render_object.cpp:
173 (RenderObject::dirtyLinesFromChangedChild):
174 * khtml/rendering/render_object.h:
176 2004-07-16 David Hyatt <hyatt@apple.com>
178 Fix for 3726471, need to ensure that it's safe to do updateRendering from within layout, since isContentEditable
179 relies on it. The fix is to just recalcStyle up front before beginning the layout, so that all of our renderobjects
184 * khtml/khtmlview.cpp:
187 2004-07-16 Ken Kocienda <kocienda@apple.com>
193 <rdar://problem/3722153> Random crash while typing (DOM::NodeImpl::parentNode (this=0x0))
195 * khtml/editing/htmlediting_impl.cpp:
196 (khtml::DeleteSelectionCommandImpl::doApply): This check merely makes the code
197 more robust. I do not understand how Grant ended up with null start or end
198 blocks in the case of his bug report, but by adding two null checks, the code is
199 now hardened a bit in case it happens again.
201 2004-07-16 Ken Kocienda <kocienda@apple.com>
207 <rdar://problem/3730785> Crash when arrow navigation goes to empty table cell
208 <rdar://problem/3730790> Caret does not blink when placed in empty table cell
210 * khtml/rendering/render_block.cpp:
211 (khtml::RenderBlock::paintObject): Caret node's renderer might be this block, so
212 don't block the painting of the caret in this case. This was the case in 3730790.
213 We had the right geometry for the caret but blocked its painting.
214 * khtml/xml/dom_position.cpp:
215 (DOM::Position::previousLinePosition): Rework the logic here. This function asserted
216 that the new position we would navigate to had a line box, but empty table cells, for
217 instance will not. So, deal with this situation as well. The end result is a
218 function that worked like it did before in cases where the previous line position has
219 a line box, but now also will allow navigation to work when it does not.
220 (DOM::Position::nextLinePosition): Ditto.
222 2004-07-16 Ken Kocienda <kocienda@apple.com>
228 <rdar://problem/3687216> editable inline causes crash when focused
230 * khtml/xml/dom_docimpl.cpp:
231 (DocumentImpl::relinquishesEditingFocus): Add null check for rootEditableElement.
232 (DocumentImpl::acceptsEditingFocus): Ditto.
234 2004-07-16 David Hyatt <hyatt@apple.com>
236 Fix for 3709337, crash when using display: compact. Need to make sure that the isCompact() check in bidi.cpp is
237 also checking for RenderBlocks, since otherwise you match text nodes (and that's just wrong).
241 * khtml/rendering/bidi.cpp:
242 (khtml::RenderBlock::layoutInlineChildren):
246 2004-07-15 David Hyatt <hyatt@apple.com>
248 Fix for 3625611, images offset on first visit to page. The method for determining the last clean line was
249 flawed and would incorrectly miss dirty lines that occurred after the first clean line.
253 * khtml/rendering/bidi.cpp:
254 (khtml::RenderBlock::determineEndPosition):
256 2004-07-15 Ken Kocienda <kocienda@apple.com>
261 <rdar://problem/3587601> reproducible assertion failure in Blot deleting text, then image at Yahoo.com
263 * khtml/editing/htmlediting_impl.cpp:
264 (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Relax assertion
265 that nodes are text nodes during the walk of eligible nodes that could possibly be
266 deleted. Change the assertion to an conditional check for text nodes. We may have
267 unrendered nodes in the mix here (as is the case in the bug where the assertion
268 failed on an AREA element), and the conditional check is sufficient to
269 skip them while leaving the delete logic we want unperturbed.
271 2004-07-14 Ken Kocienda <kocienda@apple.com>
275 * khtml/rendering/render_block.cpp:
276 (khtml::RenderBlock::paintObject): Add null check on DOM node before
277 asking if it is contentEditable.
279 2004-07-14 David Hyatt <hyatt@apple.com>
281 Fix for 3595073, setting innerHTML on a <table> should work.
285 * khtml/html/html_elementimpl.cpp:
286 (HTMLElementImpl::createContextualFragment):
288 2004-07-14 Ken Kocienda <kocienda@apple.com>
292 Updated these layout tests as a result of the last patch.
293 These results are better.
295 * layout-tests/editing/execCommand/selectAll-expected.txt
296 * layout-tests/editing/selection/extend-by-character-006-expected.txt
297 * layout-tests/editing/selection/unrendered-001-expected.txt
298 * layout-tests/editing/selection/unrendered-003-expected.txt
300 2004-07-14 Ken Kocienda <kocienda@apple.com>
304 * khtml/rendering/render_block.cpp:
305 (khtml::RenderBlock::paintObject): Change back to start() from caretPosition().
306 Since the policy is now to move the selection to rendered content, if possible,
307 when the selection is set, there is no longer any reason to have the additional
308 caretPosition() function to store where the caret should be drawn.
309 * khtml/xml/dom_docimpl.cpp:
310 (DocumentImpl::updateSelection): No longer any need to call closestRenderedPosition here.
311 This is done in Selection::validate.
312 * khtml/xml/dom_position.cpp:
313 (DOM::Position::closestRenderedPosition): Improved algorithm. Now much simpler.
314 * khtml/xml/dom_selection.cpp:
315 (DOM::Selection::Selection): caretPosition() and m_caretPosition now obsolete.
316 (DOM::Selection::init): Ditto.
317 (DOM::Selection::modifyExtendingRightForward): No longer any need to call
318 closestRenderedPosition here. This is done in Selection::validate.
319 (DOM::Selection::modifyMovingRightForward): Ditto.
320 (DOM::Selection::modifyExtendingLeftBackward): Ditto.
321 (DOM::Selection::modifyMovingLeftBackward): Ditto.
322 (DOM::Selection::layoutCaret): Ditto.
323 (DOM::Selection::validate): Add code to move the selection to rendered content if possible.
324 * khtml/xml/dom_selection.h: caretPosition() and m_caretPosition now obsolete.
326 2004-07-14 David Hyatt <hyatt@apple.com>
328 Fix for 3716082, assert when you dynamically remove float or position styles.
332 * khtml/rendering/render_object.cpp:
333 (RenderObject::setStyle):
335 2004-07-14 David Hyatt <hyatt@apple.com>
337 Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com) involving bungling of
342 * khtml/rendering/render_box.cpp:
343 (RenderBox::calcPercentageHeight):
344 (RenderBox::availableHeightUsing):
345 * khtml/rendering/render_table.cpp:
346 (RenderTable::layout):
347 (RenderTableSection::calcRowHeight):
348 (RenderTableSection::layoutRows):
349 (RenderTableCell::updateFromElement):
350 * khtml/rendering/render_table.h:
352 2004-07-14 Ken Kocienda <kocienda@apple.com>
356 * khtml/xml/dom_position.cpp:
357 (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
358 Soon, I plan to land some changes that use this new function.
359 * khtml/xml/dom_position.h:
361 2004-07-14 Ken Kocienda <kocienda@apple.com>
365 * WebCore-combined.exp: Added QString.at symbol to tests exports to facilitate debugging
366 data formatting change that is to come.
369 2004-07-13 John Sullivan <sullivan@apple.com>
373 - fixed <rdar://problem/3705500> REGRESSION (125.8-146): Cmd-E on an
374 HTML page puts a trailing space on Find pasteboard
376 * khtml/misc/khtml_text_operations.cpp:
377 (khtml::TextIterator::handleTextBox):
378 In the case where a subrun doesn't extend to the end of the text box,
379 the well-commented code was supposed to return from this routine, but
380 the wrong variable was being compared. This would send us through another
381 pass of the loop, which would end up worrying about collapsed space at the
382 end of the current box, even though we only cared about the beginning of the
385 2004-07-12 Richard Williamson <rjw@apple.com>
387 Fixed 3717982. Implemented navigator.language!
391 * khtml/ecma/kjs_navigator.cpp:
392 (Navigator::getValueProperty):
394 2004-07-12 Ken Kocienda <kocienda@apple.com>
398 * khtml/xml/dom_position.cpp:
399 (DOM::Position::inRenderedContent): I broke selection drawing with my last patch. This
400 function is now used in selection drawing, and it was making an unneeded check to see
401 that content was editable to answer whether or not is was rendered. Bad. Fixed.
403 2004-07-12 David Hyatt <hyatt@apple.com>
405 Fix for 3621138, crash on hrweb.apple.com. Make sure that in the case where objects get pulled up from merging
406 blocks that we just delete all line boxes.
410 * khtml/rendering/render_block.cpp:
411 (khtml::RenderBlock::removeChild):
413 2004-07-10 Maciej Stachowiak <mjs@apple.com>
417 <rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
418 <rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)
422 (CGColorFromNSColor):
423 (QPainter::drawEllipse):
424 (QPainter::setShadow):
426 2004-07-12 Ken Kocienda <kocienda@apple.com>
430 Added new editing-related layout tests
432 * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
433 * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
434 * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
435 * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
436 * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
437 * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
438 * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
439 * layout-tests/editing/selection/unrendered-001.html: Added.
440 * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
441 * layout-tests/editing/selection/unrendered-002.html: Added.
442 * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
443 * layout-tests/editing/selection/unrendered-003.html: Added.
444 * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
445 * layout-tests/editing/selection/unrendered-004.html: Added.
446 * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
447 * layout-tests/editing/selection/unrendered-005.html: Added.
448 * layout-tests/traversal/node-iterator-008-expected.txt: Added.
449 * layout-tests/traversal/node-iterator-008.html: Added.
450 * layout-tests/traversal/tree-walker-005-expected.txt: Added.
451 * layout-tests/traversal/tree-walker-005.html: Added.
453 2004-07-12 Ken Kocienda <kocienda@apple.com>
457 Fixes for these bugs:
459 <rdar://problem/3723359> Extending then "unextending" selection with arrow keys should draw caret but doesn't
460 <rdar://problem/3724626> White-space deletion code deletes wrong character when space follows span
462 * khtml/editing/htmlediting_impl.cpp:
463 (khtml::DeleteSelectionCommandImpl::doApply): Modify special-case white-space deletion code so it runs
464 only in the special case. It was throwing its net too widely, catching the case described in 3724626.
465 By tightening up the special-case white-space deletion, and allowing the more general-purpose code to run,
467 * khtml/xml/dom_docimpl.cpp:
468 (DocumentImpl::updateSelection): Use recently-added closestRenderedPosition helper in Position class
469 to figure out the start and end positions for selection drawing.
470 * khtml/xml/dom_position.cpp:
471 (DOM::Position::equivalentUpstreamPosition): Added code to handle white-space that causes line breaks.
472 (DOM::Position::equivalentDownstreamPosition): Ditto.
473 (DOM::Position::closestRenderedPosition): Trap empty selections at function entry, return *this.
474 (DOM::Position::isFirstRenderedPositionOnLine): Can't be first rendered position on line if not rendered.
476 (DOM::Position::isLastRenderedPositionOnLine): Ditto, but s/first/last/
477 * khtml/xml/dom_selection.cpp:
478 (DOM::Selection::validate): A selection is in caret state if the start and end are equal *or* equivalent.
479 The equivalence case is new, and fixes 3723359.
481 2004-07-09 Kevin Decker <kdecker@apple.com>
485 fixes the width:auto problem in
486 <rdar://problem/3698344> REGRESSION (143?-144): macrumors.com tabs are compressed and illegible
488 * khtml/css/cssstyleselector.cpp:
489 (khtml::CSSStyleSelector::applyProperty):
491 2004-07-09 Ken Kocienda <kocienda@apple.com>
495 Updated some layout test results.
497 * layout-tests/editing/deleting/delete-image-004-expected.txt:
498 * layout-tests/editing/selection/extend-by-character-006-expected.txt:
501 2004-07-09 Chris Blumenberg <cblu@apple.com>
503 Allowed my change for 3715785 to compile on Jaguar.
505 Reviewed by kocienda.
507 * kwq/WebCoreBridge.h:
508 * kwq/WebCoreBridge.mm:
509 (-[WebCoreBridge domain]): new, allows access to the domain without using the DOM API which doesn't exist on Jaguar
511 2004-07-09 Ken Kocienda <kocienda@apple.com>
515 Some improvements to fix:
517 <rdar://problem/3723111> Caret not drawn when selection set to unrendered content
519 * khtml/editing/htmlediting_impl.cpp:
520 (khtml::TypingCommandImpl::issueCommandForDeleteKey): Adjust selection to delete if
521 selected position is not rendered.
522 * khtml/rendering/render_block.cpp:
523 (khtml::RenderBlock::paintObject): Use new caretPosition() function on Selection to
524 figure out whether to paint.
525 * khtml/xml/dom_position.cpp:
526 (DOM::Position::previousCharacterPosition): Now correctly deals with a start
527 position that is not rendered.
528 (DOM::Position::nextCharacterPosition): Ditto.
529 (DOM::Position::closestRenderedPosition): New helper.
530 * khtml/xml/dom_position.h:
531 (DOM::): Moved in EAffinity from Selection header. Now used in closestRenderedPosition function.
532 * khtml/xml/dom_selection.cpp:
533 (DOM::Selection::Selection): Added new m_caretPosition member. This is the position of the caret
534 after a caret layout. This may be different from start or end if start and end are not rendered.
535 (DOM::Selection::init):
536 (DOM::Selection::modifyExtendingRightForward): New helper to clean up modify() and make it more readble.
537 (DOM::Selection::modifyMovingRightForward): Ditto.
538 (DOM::Selection::modifyExtendingLeftBackward): Ditto.
539 (DOM::Selection::modifyMovingLeftBackward): Ditto.
540 (DOM::Selection::modify): Use new helpers to make this more readble.
541 (DOM::Selection::layoutCaret): Uses new closestRenderedPosition helper to place the caret if in unrendered
543 (DOM::Selection::paintCaret): Remove moveToRenderedContent. obsolete.
544 * khtml/xml/dom_selection.h:
545 (DOM::Selection::caretPosition): New accessor.
546 * kwq/WebCoreBridge.mm:
547 (-[WebCoreBridge setSelectedDOMRange:affinity:]): EAffinity no longer a member enum of Selection class.
549 2004-07-08 David Hyatt <hyatt@apple.com>
551 Fix for the table layout test that failed because of a change in how innerText worked. We need to do
552 updateLayout now when using innerText, since the method has been changed to use line boxes in the render tree
553 that might otherwise be out of date.
557 * khtml/html/html_elementimpl.cpp:
558 (HTMLElementImpl::innerText):
560 2004-07-08 John Sullivan <sullivan@apple.com>
564 - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
565 now also extends selection (even if there wasn't one before)
567 * khtml/khtml_part.cpp:
568 (KHTMLPart::handleMousePressEventSingleClick):
569 if there's a URL associated with the event, don't extend the selection
571 2004-07-08 Ken Kocienda <kocienda@apple.com>
575 Added some helper functions which provide strings to display in the
576 Xcode debugger's variable inspector window. These functions are called
577 from the LabyrinthDataFormatter debugger plugin I just checked in to
578 the Labyrinth/Tools directory.
580 Note that these functions are compiled in on Development builds only.
582 * WebCore-combined.exp:
583 * WebCore-tests.exp: Export all the formatForDebugger symbols so the
584 debugger program can link with them.
585 * khtml/xml/dom2_rangeimpl.cpp:
586 (DOM::RangeImpl::formatForDebugger):
587 * khtml/xml/dom2_rangeimpl.h:
588 * khtml/xml/dom_elementimpl.cpp:
589 (ElementImpl::formatForDebugger):
590 * khtml/xml/dom_elementimpl.h:
591 * khtml/xml/dom_nodeimpl.cpp:
592 * khtml/xml/dom_nodeimpl.h:
593 * khtml/xml/dom_position.cpp:
594 (DOM::Position::formatForDebugger):
595 * khtml/xml/dom_position.h:
596 * khtml/xml/dom_selection.cpp:
597 (DOM::Selection::formatForDebugger):
598 * khtml/xml/dom_selection.h:
599 * khtml/xml/dom_textimpl.cpp:
600 (TextImpl::formatForDebugger):
601 * khtml/xml/dom_textimpl.h:
603 2004-07-08 John Sullivan <sullivan@apple.com>
607 - fixed <rdar://problem/3721544> crash increasing font size;
608 entrezeroetun.com (works in IE and Firefox)
610 * khtml/rendering/render_block.cpp:
611 (khtml::RenderBlock::updateFirstLetter):
612 Check for nil originalString() before dereffing
614 2004-07-08 David Hyatt <hyatt@apple.com>
616 Fix for 3721453, CSS3 initial property caused crashes because the macros were not written correctly.
620 * khtml/css/cssstyleselector.cpp:
624 2004-07-07 David Hyatt <hyatt@apple.com>
626 Fix for 3712133, crash from first-line pseudo-style use.
630 * khtml/css/cssstyleselector.cpp:
631 (khtml::CSSStyleSelector::styleForElement):
632 * khtml/css/cssstyleselector.h:
633 * khtml/rendering/render_object.cpp:
634 (RenderObject::getPseudoStyle):
636 2004-07-07 Ken Kocienda <kocienda@apple.com>
642 <rdar://problem/3716479> calling setInnerHTML during a webViewDidChange delegate call causes a crash
644 The fix involves some rearrangement of code in TypingCommand and TypingCommandImpl.
645 Formerly, new TypingCommands would apply themselves (which was a no-op) and then
646 do their action in some code a way different than other commands. This type of command
647 application is different than for all other commands since TypingCommands can be coalesced.
648 The crash occurred as a result of the "no-op" TypingCommand having the unconsidered
649 consequence of causing editing delegate notifications to be sent before the command
650 has actually run. This change takes a small step towards making TypingCommandImpl function like
651 other commands, where the command work is done in doApply. This makes the notification
652 happen in the right order.
654 * khtml/editing/htmlediting.cpp:
655 (khtml::TypingCommand::TypingCommand):
656 (khtml::TypingCommand::insertText):
657 (khtml::TypingCommand::insertNewline):
658 (khtml::TypingCommand::deleteKeyPressed):
659 * khtml/editing/htmlediting.h:
660 (khtml::TypingCommand::):
661 * khtml/editing/htmlediting_impl.cpp:
662 (khtml::TypingCommandImpl::TypingCommandImpl):
663 (khtml::TypingCommandImpl::doApply):
664 * khtml/editing/htmlediting_impl.h:
666 2004-07-06 Ken Kocienda <kocienda@apple.com>
670 * khtml/html/html_tableimpl.cpp:
671 (HTMLTableElementImpl::addChild): Added a better comment in the
672 code I just checked in a few minutes ago.
674 2004-07-06 Ken Kocienda <kocienda@apple.com>
680 <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
681 due to non-0 exception code trying to insert a DIV markup string
683 The solution was to revert to the code that was rolled out, and removing
684 the child checks from NodeImpl::checkAddChild. However, this time, I added
685 code very similar to this check into the code that runs while HTML is
686 being parsed to build up tables. This code relies on child-add failure
687 to ensure the proper construction of well-formed tables (as gross as that
688 sounds), so the check needs to be retained there. No other code seems to
689 be so affected. Layout tests are unchanged by this patch.
691 * khtml/html/html_tableimpl.cpp:
692 (HTMLTableElementImpl::addChild):
693 * khtml/xml/dom_nodeimpl.cpp:
694 (NodeImpl::checkAddChild):
696 2004-07-06 Ken Kocienda <kocienda@apple.com>
700 Simple change. I switched the arguments of the appendNode helper function
701 and the AppendNodeCommand and AppendNodeCommandImpl classes. The node to
702 insert now comes before the parent node in the argument list. I did this
703 to make this function match the convention of others in the HTML editing code.
704 This was the only one that was "different" in the way that it ordered arguments.
705 As a result, I was always looking to see that I was passing things in the right
708 * khtml/editing/htmlediting.cpp:
709 (khtml::AppendNodeCommand::AppendNodeCommand):
710 (khtml::AppendNodeCommand::appendChild):
711 (khtml::AppendNodeCommand::parentNode):
712 * khtml/editing/htmlediting.h:
713 * khtml/editing/htmlediting_impl.cpp:
714 (khtml::CompositeEditCommandImpl::insertNodeAfter):
715 (khtml::CompositeEditCommandImpl::insertNodeAt):
716 (khtml::CompositeEditCommandImpl::appendNode):
717 (khtml::AppendNodeCommandImpl::AppendNodeCommandImpl):
718 (khtml::AppendNodeCommandImpl::~AppendNodeCommandImpl):
719 (khtml::AppendNodeCommandImpl::doApply):
720 (khtml::AppendNodeCommandImpl::doUnapply):
721 (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
722 (khtml::DeleteSelectionCommandImpl::doApply):
723 (khtml::InputNewlineCommandImpl::insertNodeAfterPosition):
724 (khtml::InputNewlineCommandImpl::insertNodeBeforePosition):
725 (khtml::InputTextCommandImpl::prepareForTextInsertion):
726 * khtml/editing/htmlediting_impl.h:
727 (khtml::AppendNodeCommandImpl::parentNode):
729 2004-07-06 Ken Kocienda <kocienda@apple.com>
733 Fixed several problems with traversal classes. For one, NodeIterators treat
734 FILTER_REJECT and FILTER_SKIP the same, since it treats the DOM tree as a
735 flat collection of nodes free of hierarchy. The code before this change did
736 not do this correctly. It sure pays to go back and read the specs. :)
738 Also, the code to traverse from node to node when filters were applied was
739 not working correctly. My first attemmpt to implement this was just plain
740 buggy, as I discovered when I tried to write tests for my WWDC talk. I have
741 settled on an implementation which is much simpler and worked for all the
744 * khtml/xml/dom2_traversalimpl.cpp:
745 (DOM::NodeIteratorImpl::findNextNode):
746 (DOM::NodeIteratorImpl::nextNode):
747 (DOM::NodeIteratorImpl::findPreviousNode):
748 (DOM::NodeIteratorImpl::previousNode):
749 (DOM::TreeWalkerImpl::parentNode):
750 (DOM::TreeWalkerImpl::firstChild):
751 (DOM::TreeWalkerImpl::lastChild):
752 (DOM::TreeWalkerImpl::previousSibling):
753 (DOM::TreeWalkerImpl::nextSibling):
754 (DOM::TreeWalkerImpl::previousNode):
755 (DOM::TreeWalkerImpl::nextNode):
756 (DOM::TreeWalkerImpl::ancestorRejected):
757 * khtml/xml/dom2_traversalimpl.h:
759 2004-07-06 Vicki Murley <vicki@apple.com>
761 Reviewed by kocienda.
763 - added backColorCommand, foreColorCommand, fontNameCommand,
766 * layout-tests/editing/editing.js:
768 2004-07-06 Trey Matteson <trey@apple.com>
770 3716053 - www.theage.com.au has extra back/forward items due to ads
772 This turned out to be easily fixed by generalizing the fix to 3438441. We prevent
773 addition to the b/f list not just during an onload event, but during any non-user
774 gesture, which includes top level script executing.
778 * kwq/KWQKHTMLPart.mm:
779 (KWQKHTMLPart::openURL): Only real change - prevent adding to b/f list if not
781 (KWQKHTMLPart::openURLRequest): Rename "onLoadEvent" to "userGesture", swap sense
782 (KWQKHTMLPart::submitForm): Ditto
783 (KWQKHTMLPart::urlSelected): Ditto
784 * kwq/KWQKHTMLPartBrowserExtension.mm:
785 (KHTMLPartBrowserExtension::createNewWindow): Ditto
786 * kwq/WebCoreBridge.h:
788 2004-07-02 Darin Adler <darin@apple.com>
792 - fixed half of <rdar://problem/3709244> utf-8 meta tag not parsed when page title contains angle brackets or if </meta> tag used
794 * khtml/misc/decoder.cpp: (Decoder::decode): Allow </meta> tags without deciding we
795 are done with the header.
797 2004-06-30 Trey Matteson <trey@apple.com>
799 Dragging within a web view should be allowed to start when the window isn't key.
801 A few months ago, Chris made this work, but it relied on the fact that all dragging
802 was done in WebKit. When WebCore got involved in dragging, it was broken. Now we
803 have a new scheme that gets it working again that properly involves WebCore.
805 The general idea is that when AK asks us whether to accept the first mouse and do
806 "delayed window ordering", we must consult WC to see if we might start a drag. In
807 addition, instead of these drags in non-active windows being started as a special
808 case in WK, they go through the normal WK-WC drag machinery.
812 * khtml/khtml_part.cpp:
813 (KHTMLPart::shouldDragAutoNode): New x,y args.
814 * khtml/khtml_part.h:
815 * khtml/rendering/render_object.cpp:
816 (RenderObject::draggableNode): Pass through new x,y args.
817 * khtml/rendering/render_object.h:
818 * kwq/KWQKHTMLPart.h:
819 (KWQKHTMLPart::setActivationEventNumber): New setter.
820 * kwq/KWQKHTMLPart.mm:
821 (KWQKHTMLPart::KWQKHTMLPart): Init new ivar.
822 (KWQKHTMLPart::eventMayStartDrag): New routine that checks if we might start
823 a drag in response to a mouseDown.
824 (KWQKHTMLPart::khtmlMouseMoveEvent): Pass x,y to the routine that finds a draggable
825 node. This eventually gets back up to WK's _mayStartDragAtEventLocation:.
826 Delay requirement when dragging the selection now implemented here.
827 (KWQKHTMLPart::khtmlMouseReleaseEvent): Must avoid changing the selection if we
828 wind up here as part of the first click in a window (because we started handling
829 the click to possible start a drag, but that never came through).
830 (KWQKHTMLPart::mouseDown): Save away event timestamp.
831 (KWQKHTMLPart::shouldDragAutoNode): Pass location up to WK instead of the
832 most recent event we stashed.
833 * kwq/WebCoreBridge.h:
834 * kwq/WebCoreBridge.mm:
835 (-[WebCoreBridge setActivationEventNumber:]): Trivial glue.
836 (-[WebCoreBridge eventMayStartDrag:]): Ditto.
838 2004-06-29 Trey Matteson <trey@apple.com>
840 Need to tighten up JS error checking for requesting drag props
845 * khtml/ecma/kjs_events.cpp:
846 (Clipboard::getValueProperty): Assert if someone somehow set
847 dropEffect or effectAllowed and it's a copy/paste clipboard
848 instead of a dragging clipboard.
849 (Clipboard::putValue): Don't let anyone set dropEffect or
850 effectAllowed on a copy/paste clipboard.
851 (ClipboardProtoFunc::tryCall): Disallow setting dragImage on
852 a copy/paste clipboard.
854 2004-06-29 Trey Matteson <trey@apple.com>
856 DHTML dragging - source should have access to the operation chosen
861 * kwq/KWQKHTMLPart.h:
862 * kwq/KWQKHTMLPart.mm:
863 (KWQKHTMLPart::dragSourceEndedAt): Set the destination's operation
865 * kwq/WebCoreBridge.mm:
866 (-[WebCoreBridge dragExitedWithDraggingInfo:]): For completeness
867 we set the source op for the ondragexit event.
868 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto for the
870 (-[WebCoreBridge dragSourceEndedAt:operation:]): Pass through of operation.
872 2004-06-24 Trey Matteson <trey@apple.com>
874 3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about://blank
876 Simple fix - don't try to send the event to the body element if we have no body element.
880 * kwq/KWQKHTMLPart.mm:
881 (KWQKHTMLPart::dispatchCPPEvent):
883 2004-06-24 Trey Matteson <trey@apple.com>
885 3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript
887 When we generate a drag image (or a selection image too, for that matter) we
888 translate the CTM using a CG call. Later, WebImageRenderer adjusts the pattern
889 phase based on the CTM of the focused view, which doesn't include our translate.
890 So we must inform WebKit about the additional phase adjustment.
894 * kwq/KWQKHTMLPart.mm: Tell WebKit about the phase adjustment.
895 (KWQKHTMLPart::imageFromRect):
896 * kwq/WebCoreGraphicsBridge.h:
897 * kwq/WebCoreGraphicsBridge.m:
898 (-[WebCoreGraphicsBridge setAdditionalPatternPhase:]): New routine to receive
899 the phase adjustment.
901 2004-06-24 Trey Matteson <trey@apple.com>
903 3679986 - screenX and screenY are flipped and relative to the bottom left of the WebView, rather than the screen
904 3699510 - synthesized click events have bogus screen coords
908 * khtml/khtmlview.cpp:
909 (KHTMLView::dispatchDragEvent): Generate screen coords for drag events using new func.
910 (KHTMLView::dispatchMouseEvent): Ditto.
912 * khtml/xml/dom_nodeimpl.cpp:
913 (NodeImpl::dispatchMouseEvent): Comment tricky semantics.
914 Calc screen coords in apple-specific way.
915 * kwq/KWQKHTMLView.mm:
916 (KHTMLView::viewportToGlobal): Passthrough to window widget.
917 * kwq/KWQScrollView.mm:
918 * kwq/KWQWindowWidget.h:
919 * kwq/KWQWindowWidget.mm:
920 (KWQWindowWidget::mapToGlobal): Call former code factored to new method below.
921 (KWQWindowWidget::viewportToGlobal): New method to convert "viewport" (which for us
922 really means NSWindow coords) to screen coords.
924 2004-06-24 Trey Matteson <trey@apple.com>
926 3693420 - onbeforecut and onbeforepaste need real implementaion
930 * kwq/KWQKHTMLPart.h:
931 * kwq/KWQKHTMLPart.mm:
932 (KWQKHTMLPart::mayCut): Dispatch event to DHTML.
933 (KWQKHTMLPart::mayCopy): Ditto
934 (KWQKHTMLPart::mayPaste): Ditto
935 (KWQKHTMLPart::tryCut): No more need to send fake onbefore event
936 (KWQKHTMLPart::tryCopy): Ditto
937 (KWQKHTMLPart::tryPaste): Ditto
938 * kwq/WebCoreBridge.h:
939 * kwq/WebCoreBridge.mm:
940 (-[WebCoreBridge mayDHTMLCut]): Standard glue
941 (-[WebCoreBridge mayDHTMLCopy]): Ditto
942 (-[WebCoreBridge mayDHTMLPaste]): Ditto
944 2004-06-24 Darin Adler <darin@apple.com>
948 - fixed <rdar://problem/3709385> Find on page doesn't find a string at the very end of the file
950 * khtml/misc/khtml_text_operations.cpp: (khtml::findPlainText): Rearrange loop to avoid an early
951 exit once we have all the characters we need, but are at the end of the range we are searching.
953 - fixed <rdar://problem/3102271>: (text areas have scroll bars even when they don't need them)
954 - fixed <rdar://problem/3665430>: (horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode)
956 * kwq/KWQTextArea.mm:
957 (-[KWQTextArea _configureTextViewForWordWrapMode]): Added. Helper method that sets up the
958 view for a new word wrap mode.
959 (-[KWQTextArea _createTextView]): Moved much of the code inside _configureTextViewForWordWrapMode.
960 (-[KWQTextArea _frameSizeChanged]): Added. Method shared by setFrame: and initWithFrame: to
961 avoid duplicate code that was there before. The old code also had redundant code to update
962 the text container size, but NSText handles that automatically.
963 (-[KWQTextArea initWithFrame:]): Set wrap to YES by default, which is the key to fixing bug 3665430.
964 Call setAutohidesScrollers:YES, which fixes bug 3102271. Also call the new _frameSizeChanged method.
965 (-[KWQTextArea setWordWrap:]): Call _configureTextViewForWordWrapMode instead of trying
966 to do the work here. The old version did both too little and too much.
967 (-[KWQTextArea setFrame:]): Call _frameSizeChanged instead of trying to do the work here.
968 The old version did both too little and too much.
970 2004-06-24 John Sullivan <sullivan@apple.com>
972 Darin made this change on my machine; I reviewed it.
974 - fixed <rdar://problem/3698333> Find on page doesn't find a particular string
975 with a newline in the source
977 * khtml/misc/khtml_text_operations.cpp:
978 (khtml::TextIterator::handleTextBox):
979 Clear m_lastTextNodeEndedWithCollapsedSpace after taking it into account.
981 2004-06-23 Richard Williamson <rjw@apple.com>
983 Implemented changes for latest npruntime.h.
987 * kwq/KWQKHTMLPart.h:
988 * kwq/KWQKHTMLPart.mm:
989 (KWQKHTMLPart::KWQKHTMLPart):
990 (KWQKHTMLPart::windowScriptNPObject):
991 (KWQKHTMLPart::getEmbedInstanceForView):
992 * kwq/WebCoreBridge.h:
993 * kwq/WebCoreBridge.mm:
994 (-[WebCoreBridge windowScriptObject]):
995 (-[WebCoreBridge windowScriptNPObject]):
997 2004-06-22 Richard Williamson <rjw@apple.com>
999 Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash
1001 embedInstance was uninitialized.
1005 * khtml/html/html_objectimpl.cpp:
1006 (HTMLEmbedElementImpl::HTMLEmbedElementImpl):
1008 2004-06-18 John Sullivan <sullivan@apple.com>
1012 - fixed <rdar://problem/3534851> Pop up windows not showing up within SAP's
1013 BW Module (changing location.href on new window created by window.open)
1015 * khtml/khtml_part.cpp:
1016 (KHTMLPart::scheduleRedirection):
1017 allow new redirect to win if delay <= current delay, not just <
1019 === WebCore-146.1 ===
1021 2004-06-18 Trey Matteson <trey@apple.com>
1023 3702053 - DHTML dragging destination can't control the cursor (by setting the drop operation)
1025 Fallout from security work, but an easy fix.
1029 * kwq/KWQClipboard.mm:
1030 (KWQClipboard::setDropEffect): Allow dest side to set dropEffect.
1032 2004-06-18 Darin Adler <darin@apple.com>
1036 - re-fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)
1038 * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
1039 Check !isInlineFlow rather than checking hasMarkupTruncation. Otherwise, we break
1040 plain old non-markup truncation.
1042 2004-06-18 Darin Adler <darin@apple.com>
1046 - fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)
1048 * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
1049 Only walk the ellipsis list if hasMarkupTruncation is true.
1053 2004-06-17 Richard Williamson <rjw@apple.com>
1055 Fixed <rdar://problem/3698867> setting the canvas or parent to display:none and updating the causes a nil-deref
1057 Ensured that we have a renderer before rendering.
1061 * khtml/ecma/kjs_html.cpp:
1062 (KJS::Context2DFunction::tryCall):
1064 2004-06-17 David Hyatt <hyatt@apple.com>
1066 Fix for 3674601, "Read More..." links should trail articles in Emerson.
1070 * khtml/rendering/bidi.cpp:
1071 (khtml::RenderBlock::layoutInlineChildren):
1072 (khtml::RenderBlock::deleteEllipsisLineBoxes):
1073 (khtml::RenderBlock::checkLinesForTextOverflow):
1074 * khtml/rendering/render_block.cpp:
1075 (khtml:::RenderFlow):
1076 (khtml::RenderBlock::paintEllipsisBoxes):
1077 (khtml::RenderBlock::nodeAtPoint):
1078 (khtml::shouldCheckLines):
1079 (khtml::getLineAtIndex):
1080 (khtml::getHeightForLineCount):
1081 (khtml::RenderBlock::lineAtIndex):
1082 (khtml::RenderBlock::lineCount):
1083 (khtml::RenderBlock::heightForLineCount):
1084 (khtml::RenderBlock::clearTruncation):
1085 * khtml/rendering/render_block.h:
1086 (khtml::RenderBlock::setHasMarkupTruncation):
1087 (khtml::RenderBlock::hasMarkupTruncation):
1088 * khtml/rendering/render_flexbox.cpp:
1089 (khtml::RenderFlexibleBox::layoutVerticalBox):
1090 * khtml/rendering/render_line.cpp:
1091 (khtml::EllipsisBox::m_str):
1092 (khtml::InlineBox::adjustPosition):
1093 (khtml::InlineFlowBox::adjustPosition):
1094 (khtml::InlineFlowBox::clearTruncation):
1095 (khtml::EllipsisBox::paint):
1096 (khtml::EllipsisBox::nodeAtPoint):
1097 (khtml::RootInlineBox::clearTruncation):
1098 (khtml::RootInlineBox::placeEllipsis):
1099 (khtml::RootInlineBox::paintEllipsisBox):
1100 (khtml::RootInlineBox::hitTestEllipsisBox):
1101 (khtml::RootInlineBox::adjustPosition):
1102 (khtml::RootInlineBox::childRemoved):
1103 * khtml/rendering/render_line.h:
1104 (khtml::InlineBox::clearTruncation):
1105 * khtml/rendering/render_text.cpp:
1106 * khtml/rendering/render_text.h:
1107 (khtml::InlineTextBox::clearTruncation):
1109 2004-06-17 Trey Matteson <trey@apple.com>
1111 3698514 - coordinates in ondragstart and ondrag events are wrong
1113 This part fixes the ondragstart coords. We salt away the window-based mouseDown
1114 location, since we need that when we dispatch the ondragstart event. Previously
1115 we were errantly using a mouseDown point that had already been converted to view
1116 coords, and then the dispatch converted it again.
1120 * kwq/KWQKHTMLPart.h:
1121 * kwq/KWQKHTMLPart.mm:
1122 (KWQKHTMLPart::khtmlMouseMoveEvent): Use window based mouse event coords to dispatch event.
1123 (KWQKHTMLPart::mouseDown): Save window based mouse event coords .
1125 2004-06-16 David Hyatt <hyatt@apple.com>
1127 Fix for 3596620, implement a subset of CSS3 text truncation for Emerson.
1131 * khtml/rendering/bidi.cpp:
1132 (khtml::RenderBlock::checkLinesForTextOverflow):
1133 * khtml/rendering/font.cpp:
1134 (Font::checkSelectionPoint):
1135 * khtml/rendering/font.h:
1136 * khtml/rendering/render_block.cpp:
1137 (khtml::RenderBlock::paintObject):
1138 (khtml::RenderBlock::paintFloats):
1139 (khtml::RenderBlock::paintEllipsisBoxes):
1140 * khtml/rendering/render_block.h:
1141 * khtml/rendering/render_line.cpp:
1142 (InlineBox::canAccommodateEllipsis):
1143 (InlineBox::placeEllipsisBox):
1144 (InlineFlowBox::paintDecorations):
1145 (InlineFlowBox::placeEllipsisBox):
1146 (EllipsisBox::paint):
1147 (RootInlineBox::placeEllipsis):
1148 (RootInlineBox::placeEllipsisBox):
1149 * khtml/rendering/render_line.h:
1150 (khtml::EllipsisBox::m_str):
1151 (khtml::RootInlineBox::ellipsisBox):
1152 * khtml/rendering/render_text.cpp:
1153 (InlineTextBox::placeEllipsisBox):
1154 (InlineTextBox::paintDecoration):
1155 (InlineTextBox::offsetForPosition):
1156 (RenderText::positionForCoordinates):
1157 (RenderText::paint):
1158 * khtml/rendering/render_text.h:
1159 * kwq/KWQFontMetrics.h:
1160 * kwq/KWQFontMetrics.mm:
1161 (QFontMetrics::checkSelectionPoint):
1162 * kwq/WebCoreTextRenderer.h:
1164 === WebCore-145.1 ===
1166 2004-06-16 Maciej Stachowiak <mjs@apple.com>
1170 <rdar://problem/3697602> REGRESSION (144.2-TOT) Selection highlight does not draw
1172 * khtml/rendering/render_canvas.cpp:
1173 (RenderCanvas::setSelection):
1177 2004-06-16 Richard Williamson <rjw@apple.com>
1179 Fixed 3695730: Added support for embeds[], much like
1180 applets[], to allow access to a plugin's exported interface.
1184 * khtml/dom/html_document.cpp:
1185 (HTMLDocument::embeds):
1186 * khtml/dom/html_document.h:
1187 * khtml/ecma/kjs_dom.cpp:
1188 (KJS::getRuntimeObject):
1189 * khtml/ecma/kjs_html.cpp:
1190 (KJS::HTMLDocument::tryGet):
1191 (KJS::HTMLElement::tryGet):
1192 (KJS::HTMLCollection::tryGet):
1193 (KJS::HTMLCollection::getNamedItems):
1194 * khtml/ecma/kjs_html.h:
1195 (KJS::HTMLDocument::):
1196 * khtml/ecma/kjs_html.lut.h:
1198 * khtml/html/html_miscimpl.cpp:
1199 (HTMLCollectionImpl::calcLength):
1200 (HTMLCollectionImpl::getItem):
1201 (HTMLCollectionImpl::getNamedItem):
1202 * khtml/html/html_miscimpl.h:
1203 (DOM::HTMLCollectionImpl::):
1204 * khtml/html/html_objectimpl.cpp:
1205 (HTMLEmbedElementImpl::getEmbedInstance):
1206 * khtml/html/html_objectimpl.h:
1207 * kwq/KWQKHTMLPart.h:
1208 * kwq/KWQKHTMLPart.mm:
1209 (KWQKHTMLPart::getEmbedInstanceForView):
1211 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1215 <rdar://problem/3695907>: (can't enable selection inside parent where it is disabled via CSS)
1217 * khtml/css/cssparser.cpp:
1218 (CSSParser::parseValue):
1219 * khtml/css/cssstyleselector.cpp:
1220 (khtml::CSSStyleSelector::applyProperty):
1221 * khtml/rendering/render_object.cpp:
1222 (RenderObject::shouldSelect):
1223 * khtml/rendering/render_style.h:
1225 (khtml::RenderStyle::userSelect):
1226 (khtml::RenderStyle::setUserSelect):
1227 (khtml::RenderStyle::initialUserSelect):
1229 2004-06-15 David Hyatt <hyatt@apple.com>
1231 Initial impl of the EllipsisBox. This code just gets the box created and gets it placed vertically. The next
1232 stage will be to position the box horizontally as well.
1236 * khtml/rendering/bidi.cpp:
1237 (khtml::RenderBlock::checkLinesForTextOverflow):
1238 * khtml/rendering/render_line.cpp:
1239 (RootInlineBox::placeEllipsis):
1240 * khtml/rendering/render_line.h:
1241 (khtml::EllipsisBox::m_str):
1243 2004-06-15 David Hyatt <hyatt@apple.com>
1245 Implement canAccommodateEllipsis. The basic idea is that everything on a line will allow an ellipsis to be
1246 drawn on top of it unless it's a replaced element. Then, if the replaced element overlaps, the ellipsis won't
1251 * khtml/rendering/bidi.cpp:
1252 (khtml::RenderBlock::checkLinesForTextOverflow):
1253 * khtml/rendering/render_line.cpp:
1254 (InlineBox::closestLeafChildForXPos):
1255 (InlineBox::canAccommodateEllipsis):
1256 (InlineFlowBox::canAccommodateEllipsis):
1257 (RootInlineBox::canAccommodateEllipsis):
1258 * khtml/rendering/render_line.h:
1260 2004-06-15 Vicki Murley <vicki@apple.com>
1262 - added a few layout tests, rdar://3694510
1264 * layout-tests/editing/deleting/delete-image-004-expected.txt: Added.
1265 * layout-tests/editing/deleting/delete-image-004.html: Added.
1266 * layout-tests/editing/selection/extend-by-character-006-expected.txt: Added.
1267 * layout-tests/editing/selection/extend-by-character-006.html: Added.
1269 2004-06-15 Trey Matteson <trey@apple.com>
1271 Dragging tweak: We pass the mouse down coords instead of the
1272 latest mouse drag coords to the ondragstart event. This makes it
1273 easy for the client to figure the correct drag image offset,
1274 whereas the mouse drag location is next to useless for that.
1278 * kwq/KWQKHTMLPart.mm:
1279 (KWQKHTMLPart::khtmlMouseMoveEvent):
1281 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1285 <rdar://problem/3685236>: (Safari does not support onselectstart event handler)
1287 * khtml/ecma/kjs_dom.cpp:
1288 (DOMNode::getValueProperty):
1289 (DOMNode::putValue):
1290 * khtml/ecma/kjs_dom.h:
1292 * khtml/ecma/kjs_dom.lut.h:
1294 * khtml/html/html_elementimpl.cpp:
1295 (HTMLElementImpl::parseHTMLAttribute):
1296 * khtml/misc/htmlattrs.c:
1299 * khtml/misc/htmlattrs.h:
1300 * khtml/misc/htmlattrs.in:
1301 * khtml/rendering/render_object.cpp:
1302 (RenderObject::shouldSelect):
1303 * khtml/xml/dom2_eventsimpl.cpp:
1304 (EventImpl::typeToId):
1305 (EventImpl::idToType):
1306 * khtml/xml/dom2_eventsimpl.h:
1309 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1313 Fix crash with last checkin.
1315 * khtml/ecma/kjs_binding.cpp:
1316 (ScriptInterpreter::domObjectsPerDocument): check the same
1317 property we want to initialize.
1319 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1323 <rdar://problem/3685309>: (properties not shared for JS wrappers of same DOM object, accessed from different frames)
1325 * khtml/ecma/kjs_binding.cpp:
1326 (ScriptInterpreter::domObjects):
1327 (ScriptInterpreter::domObjectsPerDocument):
1328 (ScriptInterpreter::ScriptInterpreter):
1329 (ScriptInterpreter::forgetDOMObject):
1330 (ScriptInterpreter::getDOMObjectForDocument):
1331 (ScriptInterpreter::putDOMObjectForDocument):
1332 (ScriptInterpreter::deleteDOMObjectsForDocument):
1333 (ScriptInterpreter::mark):
1334 (ScriptInterpreter::forgetDOMObjectsForDocument):
1335 (ScriptInterpreter::updateDOMObjectDocument):
1336 * khtml/ecma/kjs_binding.h:
1337 (KJS::ScriptInterpreter::getDOMObject):
1338 (KJS::ScriptInterpreter::putDOMObject):
1339 (KJS::ScriptInterpreter::deleteDOMObject):
1341 2004-06-15 Darin Adler <darin@apple.com>
1343 - rolled out Ken's fix for <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply due to non-0 exception code trying to insert a DIV markup string
1344 (it was making most layout tests fail)
1346 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Rolled check back in.
1348 2004-06-15 David Hyatt <hyatt@apple.com>
1350 Add a truncation variable to text run boxes that will eventually be used to know how to cut out some of the glyphs when
1355 * khtml/rendering/render_text.cpp:
1356 (RenderText::clearTextOverflowTruncation):
1357 * khtml/rendering/render_text.h:
1358 (khtml::InlineTextBox:::InlineRunBox):
1359 (khtml::InlineTextBox::clearTruncation):
1361 2004-06-14 Darin Adler <darin@apple.com>
1365 - fixed some things for GC that Patrick missed, or that happened after the branch
1368 (-[DOMStyleSheet finalize]): Added.
1369 (-[DOMStyleSheetList finalize]): Added.
1370 (-[DOMCSSStyleSheet finalize]): Added.
1371 (-[DOMMediaList finalize]): Added.
1372 (-[DOMCSSRuleList finalize]): Added.
1373 (-[DOMCSSRule finalize]): Added.
1374 (-[DOMCSSStyleDeclaration finalize]): Added.
1375 (-[DOMCSSValue finalize]): Added.
1376 (-[DOMRGBColor finalize]): Added.
1377 (-[DOMRect finalize]): Added.
1378 (-[DOMCounter finalize]): Added.
1380 (-[DOMObject finalize]): Added.
1381 (-[DOMNode finalize]): Added.
1382 (-[DOMNamedNodeMap finalize]): Added.
1383 (-[DOMNodeList finalize]): Added.
1384 (-[DOMImplementation finalize]): Added.
1385 (-[DOMRange finalize]): Added.
1386 (-[DOMNodeFilter finalize]): Added.
1387 (-[DOMNodeIterator finalize]): Added.
1388 (-[DOMTreeWalker dealloc]): Removed unneeded nil check.
1389 (-[DOMTreeWalker finalize]): Added.
1391 (-[DOMHTMLCollection finalize]): Added.
1392 (-[DOMHTMLOptionsCollection finalize]): Added.
1393 * kwq/KWQClipboard.mm:
1394 (KWQClipboard::KWQClipboard): Use KWQRetain instead of retain.
1395 (KWQClipboard::~KWQClipboard): Use KWQRelease instead of release.
1396 * kwq/KWQEditCommand.mm:
1397 (-[KWQEditCommand finalize]): Added.
1399 (QFont::~QFont): Use KWQRelease instead of release.
1400 * kwq/KWQKHTMLPart.mm:
1401 (KWQKHTMLPart::keyEvent): Use KWQRetain instead of retain, and KWQRelease instead of release.
1402 (KWQKHTMLPart::mouseDown): Use KWQRetain instead of retain, and KWQRelease instead of release.
1403 (KWQKHTMLPart::mouseDragged): Use KWQRetain instead of retain, and KWQRelease instead of release.
1404 (KWQKHTMLPart::mouseUp): Use KWQRetain instead of retain, and KWQRelease instead of release.
1405 (KWQKHTMLPart::mouseMoved): Use KWQRetain instead of retain, and KWQRelease instead of release.
1406 (KWQKHTMLPart::sendContextMenuEvent): Use KWQRetain instead of retain, and KWQRelease instead of release.
1407 * kwq/KWQPageState.mm:
1408 (-[KWQPageState finalize]): Added. Filed <rdar://problem/3694163> about the fact that this is not right.
1410 (-[KWQSingleShotTimerTarget finalize]): Added.
1411 * kwq/WebCoreBridge.mm:
1412 (-[WebCoreBridge finalize]): Added. Filed <rdar://problem/3694165> about the fact that this is not right.
1414 2004-06-15 David Hyatt <hyatt@apple.com>
1416 Initial work on text truncation. Working top-down, I think I've made all the changes I will need to bidi.cpp
1417 and to the block code itself. The rest of the code can be concentrated in the render_line and render_text files.
1421 * khtml/rendering/bidi.cpp:
1422 (khtml::RenderBlock::layoutInlineChildren):
1423 (khtml::RenderBlock::findNextLineBreak):
1424 (khtml::RenderBlock::deleteEllipsisLineBoxes):
1425 (khtml::RenderBlock::checkLinesForTextOverflow):
1426 * khtml/rendering/render_block.h:
1427 * khtml/rendering/render_line.cpp:
1428 (RootInlineBox::detach):
1429 (RootInlineBox::detachEllipsisBox):
1430 (RootInlineBox::canAccommodateEllipsis):
1431 (RootInlineBox::placeEllipsis):
1432 * khtml/rendering/render_line.h:
1433 (khtml::RootInlineBox::RootInlineBox):
1434 * khtml/rendering/render_text.cpp:
1435 (RenderText::clearTextOverflowTruncation):
1436 * khtml/rendering/render_text.h:
1438 2004-06-14 Trey Matteson <trey@apple.com>
1440 3692690 - REGRESSION: canceling drag from WebView cause link to load
1441 Just need to take extra care to cancel any click handling in
1442 all cases once we're committed to doing the drag.
1446 * kwq/KWQKHTMLPart.mm:
1447 (KWQKHTMLPart::khtmlMouseMoveEvent): Call invalidateClick once
1448 we're past the hysteresis point, and definitely going to try
1449 to start a drag and drop.
1451 2004-06-14 Darin Adler <darin@apple.com>
1453 - fixed crash on boot
1455 * kwq/KWQFoundationExtras.h: (KWQRetainNSRelease):
1456 Fixed return value of this method; was uninitialized.
1458 2004-06-14 Trey Matteson <trey@apple.com>
1460 Dashboard wants access to pastboard data during the drag gesture.
1462 We address this need be allowing docs that are local files to access the
1463 pasteboard data during a drag, while other pages can only get at the types
1464 list until the drop happens. This is deemed safe because local files already
1465 have such broad super powers.
1471 (KURL::isLocalFile): Implement this QT method to look for the file scheme.
1472 * kwq/WebCoreBridge.mm:
1473 (-[WebCoreBridge dragOperationForDraggingInfo:]): Use more relaxed clipboard
1474 security for local file pages.
1475 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto.
1477 2004-06-14 Darin Adler <darin@apple.com>
1479 Reviewed by me, code changes by Patrick Beard.
1481 - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)
1483 * WebCore.pbproj/project.pbxproj: Added KWQFoundationExtras.h.
1484 * kwq/KWQFoundationExtras.h: Added.
1485 (KWQRetain): Cover for CFRetain that is tolerant of nil.
1486 (KWQRelease): Cover for CFRelease that is tolerant of nil.
1487 (KWQRetainNSRelease): Combination of a CFRetain and an -[NSObject release] that is tolerant of nil.
1488 Also includes a declaration of finalize so we can call [super finalize] without warnings on Panther.
1491 (ObjCNodeFilterCondition::ObjCNodeFilterCondition): Use CFRetain instead of retain.
1492 (ObjCNodeFilterCondition::~ObjCNodeFilterCondition): Use CFRelease instead of release.
1493 * kwq/KWQComboBox.mm:
1494 (QComboBox::~QComboBox): Use KWQRelease instead of release.
1495 (QComboBox::setFont): Use KWQRelease instead of release.
1496 (QComboBox::labelFont): Use KWQRetain instead of retain.
1498 (QCursor::QCursor): Use KWQRetain instead of retain.
1499 (QCursor::~QCursor): Use KWQRelease instead of release.
1500 (QCursor::operator=): More of the same.
1501 * kwq/KWQFileButton.mm:
1502 (KWQFileButton::KWQFileButton): Use KWQRetainNSRelease to retain a newly-allocated object.
1503 (KWQFileButton::~KWQFileButton): Use CFRelease instead of release.
1505 (QFont::QFont): Use KWQRetain instead of retain.
1506 (QFont::operator=): More of the same.
1507 (QFont::setFamily): Use KWQRelease instead of release.
1508 (QFont::setFirstFamily): Use KWQRelease instead of release.
1509 (QFont::setPixelSize): Use KWQRelease instead of release.
1510 (QFont::setWeight): Use KWQRelease instead of release.
1511 (QFont::setItalic): Use KWQRelease instead of release.
1512 (QFont::getNSFont): Use KWQRetain instead of retain.
1513 * kwq/KWQFontMetrics.mm:
1514 (QFontMetricsPrivate::~QFontMetricsPrivate): Use KWQRelease instead of release.
1515 (QFontMetricsPrivate::getRenderer): Use KWQRetain instead of retain.
1516 (QFontMetricsPrivate::setFont): Use KWQRelease instead of release.
1517 * kwq/KWQKHTMLPart.mm:
1518 (KWQKHTMLPart::~KWQKHTMLPart): Use KWQRelease instead of release.
1519 (KWQKHTMLPart::clearRecordedFormValues): Use KWQRelease instead of release.
1520 (KWQKHTMLPart::recordFormValue): Use KWQRetainNSRelease and use KWQRetain instead of retain.
1521 (KWQKHTMLPart::windowScriptObject): Use KWQRetainNSRelease.
1522 * kwq/KWQKJobClasses.mm:
1523 (KIO::TransferJobPrivate::TransferJobPrivate): Use KWQRetainNSRelease.
1524 (KIO::TransferJobPrivate::~TransferJobPrivate): Use KWQRelease instead of release.
1525 (KIO::TransferJob::setLoader): More of the same.
1527 (KWQRetainResponse): Use KWQRetain instead of retain.
1528 (KWQReleaseResponse): Use KWQRelease instead of release.
1529 * kwq/KWQPainter.mm:
1530 (QPainterPrivate::~QPainterPrivate): Use KWQRelease instead of release.
1531 (QPainter::_updateRenderer): More of the same.
1532 (QPainter::initFocusRing): Use KWQRetainNSRelease.
1533 (QPainter::clearFocusRing): Use KWQRelease instead of release.
1535 (QPixmap::QPixmap): Use KWQRetain instead of retain.
1536 (QPixmap::~QPixmap): Use KWQRelease instead of release.
1537 (QPixmap::receivedData): Use KWQRetain instead of retain.
1538 (QPixmap::resize): Use KWQRetainNSRelease and use KWQRelease instead of release.
1539 (QPixmap::operator=): More of the same.
1541 (QRegion::QRegion): Use KWQRetain instead of retain.
1542 (QRegion::~QRegion): Use KWQRelease instead of release.
1543 (QRegion::operator=): More of the same.
1545 (QTimer::start): Use KWQRetain instead of retain.
1546 (QTimer::stop): Use KWQRelease instead of release.
1547 (QTimer::fire): Use KWQRelease instead of release.
1549 (QWidget::QWidget): Use KWQRetain instead of retain.
1550 (QWidget::~QWidget): Use KWQRelease instead of release.
1551 (QWidget::setView): More of the same.
1552 * kwq/WebCoreSettings.mm: (-[WebCoreSettings finalize]):
1553 Delete the storage here, as well as in dealloc.
1555 2004-06-14 Maciej Stachowiak <mjs@apple.com>
1559 <rdar://problem/3693818>: (Safari should use CG calls for circle drawing for better performance)
1561 * kwq/KWQPainter.mm:
1562 (QPainter::drawEllipse): Use CG calls instead of NS calls for faster circle drawing.
1563 (QPainter::drawArc): Ditto.
1565 2004-06-14 Ken Kocienda <kocienda@apple.com>
1571 <rdar://problem/3690115> Crash deleting text out of iChat's profile (an editable Webview)
1573 * khtml/html/html_elementimpl.cpp:
1574 (HTMLElementImpl::isFocusable): Added null-check of parent node before deref'ing it.
1576 2004-06-14 Trey Matteson <trey@apple.com>
1578 Two tweaks to recently added "drag" pseudo-class, as suggested by
1579 Dave. The class is renamed to "-khtml-drag", and we update layout
1580 when using it, instead of only updating styles.
1584 * khtml/css/css_base.cpp:
1585 (CSSSelector::extractPseudoType):
1586 * kwq/KWQKHTMLPart.mm:
1587 (KWQKHTMLPart::snapshotDragImage):
1589 2004-06-13 Trey Matteson <trey@apple.com>
1591 Support for DHTML cut/copy/paste. We now support oncut, oncopy, onpaste. The events
1592 are sent to the first node in the selection, or else the body. Current holes are
1593 that we do not send events for operations in text fields or text areas (because it
1594 is hard to get the right hooks into the AppKit).
1596 We also send onbeforecut, onbeforecopy, onbeforepaste before the other events, which
1597 isn't really WinIE compatible, but is close. WinIE uses these to enable cut/paste
1598 menu items in its UI. DB doesn't need this for now.
1602 * khtml/ecma/kjs_dom.cpp:
1603 (DOMNode::getValueProperty): Boilerplate for new events
1604 (DOMNode::putValue): Boilerplate for new events
1605 * khtml/ecma/kjs_dom.h:
1606 (KJS::DOMNode::): Boilerplate for new events
1607 * khtml/ecma/kjs_dom.lut.h:
1608 * khtml/ecma/kjs_events.cpp:
1609 (DOMEvent::DOMEvent): "dataTransfer" and "clipboardData" properties are conditionally
1610 defined on DOMEvent, depending on if the event is a dragging or clipboard event.
1611 (DOMMouseEvent::mark): Pass mark along to any clipboard object we have.
1612 (DOMEvent::getValueProperty): Return "dataTransfer" or "clipboardData".
1613 (DOMMouseEvent::getValueProperty): Returning "dataTransfer" now handled by
1615 * khtml/ecma/kjs_events.h:
1617 (KJS::DOMMouseEvent::DOMMouseEvent):
1618 (KJS::DOMMouseEvent::):
1619 (KJS::DOMMouseEvent::toMouseEvent):
1620 * khtml/ecma/kjs_events.lut.h:
1621 * khtml/html/html_elementimpl.cpp:
1622 (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events
1623 * khtml/misc/htmlattrs.c:
1624 * khtml/misc/htmlattrs.h:
1625 * khtml/misc/htmlattrs.in: Boilerplate for new events
1626 * khtml/xml/dom2_eventsimpl.cpp:
1627 (EventImpl::typeToId): Boilerplate for new events
1628 (EventImpl::idToType): Boilerplate for new events
1629 (EventImpl::isDragEvent): New utility
1630 (EventImpl::isClipboardEvent): New utility
1631 (MouseEventImpl::isDragEvent): New utility
1632 (ClipboardEventImpl::ClipboardEventImpl): ref optional clipboard
1633 (ClipboardEventImpl::~ClipboardEventImpl): deref optional clipboard
1634 (ClipboardEventImpl::isClipboardEvent): New utility
1635 * khtml/xml/dom2_eventsimpl.h:
1636 (DOM::EventImpl::): Boilerplate for new events
1637 (DOM::ClipboardEventImpl::clipboard):
1638 * kwq/KWQClipboard.h: Monkey business so this file is includable in C++.
1639 * kwq/KWQClipboard.mm:
1640 * kwq/KWQKHTMLPart.h:
1641 * kwq/KWQKHTMLPart.mm:
1642 (KWQKHTMLPart::dispatchCPPEvent): Send one of the new events.
1643 (KWQKHTMLPart::tryCut): Declare pasteboard types, send cut events.
1644 (KWQKHTMLPart::tryCopy): Declare pasteboard types, send copy events.
1645 (KWQKHTMLPart::tryPaste): Send paste events.
1646 * kwq/WebCoreBridge.h:
1647 * kwq/WebCoreBridge.mm:
1648 (-[WebCoreBridge tryDHTMLCut]): Pass through to part
1649 (-[WebCoreBridge tryDHTMLCopy]): Ditto
1650 (-[WebCoreBridge tryDHTMLPaste]): Ditto
1652 2004-06-14 Trey Matteson <trey@apple.com>
1654 A new CSS pseudo-class ".drag" is added. Analogous to the "hover" class,
1655 this class determines styles used while an element is generating a drag
1660 * khtml/css/css_base.cpp:
1661 (CSSSelector::extractPseudoType): Boilerplate for adding new class.
1662 * khtml/css/css_base.h: Boilerplate for adding new class.
1663 * khtml/css/cssstyleselector.cpp:
1664 (khtml::CSSStyleSelector::checkOneSelector): Match new class against
1665 elements being dragged.
1666 * khtml/css/cssstyleselector.h:
1667 (khtml::StyleSelector::): Boilerplate for adding new class.
1668 * khtml/rendering/render_object.cpp:
1669 (RenderObject::RenderObject): Init new member.
1670 (RenderObject::isDragging): Return whether this object is being dragged.
1671 (RenderObject::updateDragState): Paint us an all children with a new dragged state.
1672 * khtml/rendering/render_object.h:
1673 * khtml/rendering/render_style.h: Boilerplate for adding new class.
1674 (khtml::RenderStyle::NonInheritedFlags::operator==):
1675 (khtml::RenderStyle::setBitDefaults):
1676 (khtml::RenderStyle::affectedByDragRules):
1677 (khtml::RenderStyle::setAffectedByDragRules):
1678 * kwq/KWQClipboard.mm:
1679 (KWQClipboard::dragNSImage): Method rename.
1680 * kwq/KWQKHTMLPart.h:
1681 * kwq/KWQKHTMLPart.mm:
1682 (KWQKHTMLPart::snapshotDragImage): Mark the element as being dragged before
1683 we snapshot it, so new style class will apply.
1685 2004-06-14 Ken Kocienda <kocienda@apple.com>
1689 Added a few more editing-related layout tests.
1691 * layout-tests/editing/inserting/insert-3654864-fix-expected.txt: Added.
1692 * layout-tests/editing/inserting/insert-3654864-fix.html: Added.
1693 * layout-tests/editing/inserting/insert-3659587-fix-expected.txt: Added.
1694 * layout-tests/editing/inserting/insert-3659587-fix.html: Added.
1695 * layout-tests/editing/inserting/insert-after-delete-001-expected.txt: Added.
1696 * layout-tests/editing/inserting/insert-after-delete-001.html: Added.
1697 * layout-tests/editing/inserting/insert-br-case1-expected.txt: Added.
1698 * layout-tests/editing/inserting/insert-br-case1.html: Added.
1699 * layout-tests/editing/inserting/insert-br-case2-expected.txt: Added.
1700 * layout-tests/editing/inserting/insert-br-case2.html: Added.
1701 * layout-tests/editing/inserting/insert-br-case3-expected.txt: Added.
1702 * layout-tests/editing/inserting/insert-br-case3.html: Added.
1704 2004-06-14 Ken Kocienda <kocienda@apple.com>
1708 Regarding the bug below, removing some tests since we have removed the execCommand("paste")
1709 feature, at least for now.
1711 <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
1713 * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Removed.
1714 * layout-tests/editing/pasteboard/copy-paste-text-001.html: Removed.
1715 * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Removed.
1716 * layout-tests/editing/pasteboard/cut-paste-text-002.html: Removed.
1718 2004-06-14 Ken Kocienda <kocienda@apple.com>
1724 <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply due to non-0 exception code trying to insert a DIV markup string
1726 * khtml/xml/dom_nodeimpl.cpp:
1727 (NodeImpl::checkAddChild): This function was being too strict in disallowing certain nodes
1728 to be added as other child nodes, applying rules we typically use for parsing. However,
1729 those parsing rules are primarily for dealing with "bad" HTML, and should not be
1730 applied to programmatic DOM operations. The fix involves removing calls to childAllowed().
1732 2004-06-12 Trey Matteson <trey@apple.com>
1734 The drag image may be updated during a DHTML drag. This includes updating
1735 from a Timer instead of a drag event handler. In addition, an arbitrary
1736 element can be set as the one to snapshot for the drag image.
1740 * khtml/ecma/kjs_events.cpp:
1741 (ClipboardProtoFunc::tryCall): setDragImage accepts a node. Previously,
1742 it had to be an Image object.
1743 * khtml/rendering/render_object.cpp:
1744 (RenderObject::paintingRootRect): Also returns top element's rect.
1745 * khtml/rendering/render_object.h:
1746 * khtml/xml/dom2_eventsimpl.h:
1747 * kwq/KWQClipboard.h: New security mode where image is still writable, but
1750 (KWQClipboard::setDragHasStarted):
1751 * kwq/KWQClipboard.mm:
1752 (KWQClipboard::KWQClipboard): Part may be passed. Needed in the source
1753 case to generate an image from an element.
1754 (KWQClipboard::setAccessPolicy): New, replaces former becomeNumb method
1755 which wasn't flexible enough.
1756 (KWQClipboard::accessPolicy): New getter.
1757 (KWQClipboard::dragImage): No change, diff confusion.
1758 (KWQClipboard::setDragImage): Call new helper, below.
1759 (KWQClipboard::dragImageElement): New, return any element set.
1760 (KWQClipboard::setDragImageElement): New, call new helper.
1761 (KWQClipboard::setDragImage): New helper, set the image via either a
1762 pixmap or an element to snapshot, pushes the result to WebKit if we've
1763 already started the drag.
1764 (KWQClipboard::dragNSImage): Generate an NSImage and mouse offset, no
1765 matter how the drag image was set (Image or element).
1766 * kwq/KWQKHTMLPart.h: A single clipboard is kept over the life of a
1767 source drag instead of making one for each event.
1768 * kwq/KWQKHTMLPart.mm:
1769 (KWQKHTMLPart::KWQKHTMLPart): Init clipboard.
1770 (KWQKHTMLPart::~KWQKHTMLPart): Free clipboard.
1771 (KWQKHTMLPart::freeClipboard): New helper.
1772 (KWQKHTMLPart::dispatchDragSrcEvent): Most code moved to caller.
1773 (KWQKHTMLPart::khtmlMouseMoveEvent): Make clipboard for this drag session.
1774 Init clipboard to make an image from the dragSource element. Mark the
1775 drag as having started.
1776 (KWQKHTMLPart::dragSourceMovedTo): Clipboard will update WK with any new
1777 drag image, so we don't need to.
1778 (KWQKHTMLPart::dragSourceEndedAt): Ditto.
1779 (KWQKHTMLPart::elementImage): Also return element rect.
1780 * kwq/WebCoreBridge.h: Glue moved to WebCoreGraphicsBridge.
1781 * kwq/WebCoreBridge.mm:
1782 (-[WebCoreBridge dragOperationForDraggingInfo:]): Use new method.
1783 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
1784 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
1785 * kwq/WebCoreGraphicsBridge.h:
1786 * kwq/WebCoreGraphicsBridge.m:
1787 (-[WebCoreGraphicsBridge setDraggingImage:at:]): Glue moved from WebBridge
1789 2004-06-11 Chris Blumenberg <cblu@apple.com>
1791 Support for WebKit drag & drop API.
1795 * kwq/WebCoreBridge.h:
1796 * kwq/WebCoreBridge.mm:
1797 (-[WebCoreBridge _positionForPoint:]): new
1798 (-[WebCoreBridge moveDragCaretToPoint:]): call _positionForPoint
1799 (-[WebCoreBridge editableDOMRangeForPoint:]): new
1801 2004-06-11 Darin Adler <darin@apple.com>
1805 - fixed <rdar://problem/3645846>: (REGRESSION: Stuck "Loading" when logging into Google's Gmail on newer versions of Safari)
1807 * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::parseHTMLAttribute):
1808 Call through to base class for ATTR_ID so the "has ID" bit gets set.
1809 * khtml/html/html_imageimpl.cpp:
1810 (HTMLImageElementImpl::parseHTMLAttribute): Move ATTR_COMPOSITE code up and out of the way so
1811 it doesn't screw up ATTR_ID parsing.
1812 (HTMLMapElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID
1813 so the "has ID" bit gets set.
1814 * khtml/html/html_objectimpl.cpp:
1815 (HTMLAppletElementImpl::parseHTMLAttribute): Remove ATTR_ID case; not needed.
1816 (HTMLParamElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID
1817 so the "has ID" bit gets set.
1819 2004-06-11 Ken Kocienda <kocienda@apple.com>
1825 <rdar://problem/3659587>: "when typing in Blot, bold style does not carry over to next line after pressing 'return'"
1827 Did some work to improve the insert newline command. The refinement is to insert the newline
1828 at the upstream position of the caret, ensuring that the newline takes on the
1829 appropriate style, and does not let the caret "escape" from an element that is
1832 * khtml/editing/htmlediting_impl.cpp:
1833 (khtml::InputNewlineCommandImpl::insertNodeAfterPosition): New helper. Adds smarts about adding
1834 newlines when the selection is a caret in a block.
1835 (khtml::InputNewlineCommandImpl::insertNodeBeforePosition): Ditto.
1836 (khtml::InputNewlineCommandImpl::doApply): Simplified cases. One case in the code could not
1838 * khtml/editing/htmlediting_impl.h:
1842 <rdar://problem/3654864>: "Pasting content at start of line places it at end of previous line"
1844 (khtml::InputTextCommandImpl::prepareForTextInsertion): Simple code mistake. Content was indeed
1845 being added to the line before. Fixed to add new content after the line break.
1847 2004-07-10 Trey Matteson <trey@apple.com>
1849 Prep work for latest delegate API for dragging. In addition, I also straightened out all
1850 the cases of DHTML setting a drag image or setting pasteboard data, and how that would
1851 override WebKit's default behavior (which follows how WinIE does things).
1855 * khtml/rendering/render_object.cpp:
1856 (RenderObject::draggableNode): Obey new params for whether a DHTML or UserAgent (i.e.,
1857 WebKit) drag source is allowed.
1858 * khtml/rendering/render_object.h:
1859 * kwq/KWQKHTMLPart.h:
1860 * kwq/KWQKHTMLPart.mm:
1861 (KWQKHTMLPart::dispatchDragSrcEvent): Setting pasteboard data was moved out of here, now
1862 caller's responsibility.
1863 (KWQKHTMLPart::khtmlMouseMoveEvent): Ask bridge for allowable drag actions (DHTML vs UA).
1864 Only send drag events if DHTML is allowed. Only generate a drag image if the source is
1865 a DHTML element. Note whether event handler set any pasteboard data, and pass that fact
1867 (KWQKHTMLPart::dragSourceMovedTo): Only send drag events if DHTML is allowed.
1868 (KWQKHTMLPart::dragSourceEndedAt): Only send drag events if DHTML is allowed.
1869 * kwq/WebCoreBridge.h:
1871 2004-06-11 Ken Kocienda <kocienda@apple.com>
1875 Lay some groundwork for better testing of inserting newlines. Layout
1876 tests that use this new code will be coming soon.
1878 * khtml/editing/jsediting.cpp: Add commands for bold and inserting newlines.
1879 * layout-tests/editing/editing.js: Added new insertNewline command.
1880 which calls through to TypingCommand::insertNewline. There was no way to get
1881 to this command from JS before this addition.
1883 2004-06-11 Ken Kocienda <kocienda@apple.com>
1887 Javascript execCommand system wants to use case-insensitive QDict.
1888 The interface for QDict offers this feature, but it was never implemented.
1891 * kwq/KWQDictImpl.h: Declare bool to store case-sensitive bit.
1892 * kwq/KWQDictImpl.mm:
1893 (KWQDictImpl::KWQDictImpl): No longer drops caseSensitive on the floor; stores
1894 it in instance variable.
1895 (KWQDictImpl::insert): Make lowercase version of key for operation, if necessary.
1896 (KWQDictImpl::remove): Ditto.
1897 (KWQDictImpl::find): Ditto.
1898 (KWQDictIteratorImpl::currentStringKey): Whitespace cleanup.
1902 2004-06-10 Ken Kocienda <kocienda@apple.com>
1908 <rdar://problem/3654850>: "Style changes do not work across blocks"
1910 Now, applying styles works across blocks. I did quite a bit
1911 of internal redsign on the member functions of this class to
1912 make this work. As a bonus, from an architectural standpoint,
1913 all style changes are now done "in place". There is no more
1914 copying of content in order to perform style changes.
1916 * khtml/editing/htmlediting_impl.cpp:
1917 (khtml::ApplyStyleCommandImpl::doApply):
1918 (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode):
1919 (khtml::ApplyStyleCommandImpl::removeCSSStyle):
1920 (khtml::ApplyStyleCommandImpl::removeStyle):
1921 (khtml::ApplyStyleCommandImpl::nodeFullySelected):
1922 (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded):
1923 (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded):
1924 (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
1925 (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded):
1926 (khtml::ApplyStyleCommandImpl::positionInsertionPoint):
1927 * khtml/editing/htmlediting_impl.h:
1929 2004-06-10 Darin Adler <darin@apple.com>
1933 - filled out execCommand a lot more
1934 - fixed <rdar://problem/3685231>: (execCommand italic is not implemented)
1935 - fixed <rdar://problem/3685232>: (execCommand bold is not implemented)
1936 - fixed <rdar://problem/3675899>: (Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan)
1937 - fixed <rdar://problem/3675901>: (Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan)
1938 - fixed <rdar://problem/3675904>: (Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan)
1940 * khtml/editing/jsediting.cpp:
1941 (DOM::JSEditor::queryCommandIndeterm): Changed to use KHTMLPart::TriState instead of CommandState.
1942 (DOM::JSEditor::queryCommandState): Ditto.
1943 (execStyleChange): Changed to use KHTMLPart::applyStyle.
1944 (stateStyle): Used KHTMLPart::selectionHasStyle for this.
1945 (selectionStartHasStyle): Use KHTMLPart::selectionStartHasStyle for this.
1946 (valueStyle): Used KHTMLPart::selectionStartStylePropertyValue for this.
1947 (execBold): Implemented toggling, using selectionStartHasStyle.
1948 (execItalic): Implemented toggling, using selectionStartHasStyle.
1949 (execPrint): Implemented.
1950 (enabledRedo): Implemented, using canRedo.
1951 (enabledUndo): Implemented, using canUndo.
1952 (stateNone): Renamed from stateNo.
1953 (valueBackColor): Implemented, using valueStyle.
1954 (valueFontName): Implemented, using valueStyle.
1955 (valueFontSize): Implemented, using valueStyle.
1956 (valueForeColor): Implemented, using valueStyle.
1957 (valueFontSize): Implemented, using valueStyle.
1959 * khtml/khtml_part.h: Added editing operations.
1960 * khtml/khtml_part.cpp:
1961 (KHTMLPart::copyToPasteboard): Added.
1962 (KHTMLPart::cutToPasteboard): Added.
1963 (KHTMLPart::redo): Added.
1964 (KHTMLPart::undo): Added.
1965 (KHTMLPart::applyStyle): Added.
1966 (updateState): Added.
1967 (KHTMLPart::selectionHasStyle): Added.
1968 (KHTMLPart::selectionStartHasStyle): Added.
1969 (KHTMLPart::selectionStartStylePropertyValue): Added.
1970 (KHTMLPart::selectionComputedStyle): Added.
1971 (KHTMLPart::print): Added.
1973 * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Call print() on plain old part, not KWQ(part).
1975 * kwq/KWQKHTMLPart.h: Removed print(), added _haveUndoRedoOperations.
1976 * kwq/KWQKHTMLPart.mm:
1977 (KHTMLPart::print): Moved from KWQKHTMLPart to KHTMLPart.
1978 (KWQKHTMLPart::registerCommandForUndo): Moved code here from bridge.
1979 (KWQKHTMLPart::registerCommandForRedo): Moved code here from bridge.
1980 (KWQKHTMLPart::clearUndoRedoOperations): Moved code here from bridge.
1981 (KWQKHTMLPart::issueUndoCommand): Moved code here from bridge.
1982 (KWQKHTMLPart::issueRedoCommand): Moved code here from bridge.
1983 (KWQKHTMLPart::issuePasteCommand): Moved code here from bridge.
1984 (KHTMLPart::canUndo): Added.
1985 (KHTMLPart::canRedo): Added.
1987 * kwq/WebCoreBridge.h: Added undoManager, removed undo-related methods.
1988 * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Changed to call
1989 KHTMLPart::applyStyle.
1991 * WebCore.pbproj/.cvsignore: Updated for new Xcode files.
1993 2004-06-09 Maciej Stachowiak <mjs@apple.com>
1997 <rdar://problem/3671555>: Blot scrolls to the top every time you type
1999 * khtml/xml/dom_selection.cpp:
2000 (DOM::Selection::getRepaintRect): If the caret position is invalid, recompute it.
2002 2004-06-09 David Hyatt <hyatt@apple.com>
2004 Fix for 3607091, implement a style that prevents zoom and min font size from taking effect.
2005 The name of the new style is "-apple-text-size-adjust" with values of "none" and "auto." The default
2010 * khtml/css/cssparser.cpp:
2011 (CSSParser::parseValue):
2012 * khtml/css/cssproperties.c:
2015 * khtml/css/cssproperties.h:
2016 * khtml/css/cssproperties.in:
2017 * khtml/css/cssstyleselector.cpp:
2018 (khtml::CSSStyleSelector::styleForElement):
2019 (khtml::CSSStyleSelector::pseudoStyleForElement):
2020 (khtml::CSSStyleSelector::applyDeclarations):
2021 (khtml::CSSStyleSelector::applyProperty):
2022 (khtml::CSSStyleSelector::checkForTextSizeAdjust):
2023 * khtml/css/cssstyleselector.h:
2024 * khtml/rendering/render_style.cpp:
2026 (StyleCSS3InheritedData):
2027 (StyleCSS3InheritedData::operator==):
2028 (RenderStyle::diff):
2029 * khtml/rendering/render_style.h:
2030 (khtml::RenderStyle::lineClamp):
2031 (khtml::RenderStyle::textSizeAdjust):
2032 (khtml::RenderStyle::setTextSizeAdjust):
2033 (khtml::RenderStyle::initialTextSizeAdjust):
2035 2004-06-09 David Hyatt <hyatt@apple.com>
2037 Implement parsing and setting of the text-overflow CSS3 property.
2039 Reviewed by kocienda
2041 * khtml/css/cssparser.cpp:
2042 (CSSParser::parseValue):
2043 * khtml/css/cssproperties.c:
2046 * khtml/css/cssproperties.h:
2047 * khtml/css/cssproperties.in:
2048 * khtml/css/cssstyleselector.cpp:
2049 (khtml::CSSStyleSelector::applyProperty):
2050 * khtml/css/cssvalues.c:
2053 * khtml/css/cssvalues.h:
2054 * khtml/css/cssvalues.in:
2055 * khtml/rendering/render_style.cpp:
2057 (StyleCSS3NonInheritedData::operator==):
2058 (RenderStyle::diff):
2059 * khtml/rendering/render_style.h:
2060 (khtml::RenderStyle::textOverflow):
2061 (khtml::RenderStyle::setTextOverflow):
2062 (khtml::RenderStyle::initialTextOverflow):
2064 2004-06-09 David Hyatt <hyatt@apple.com>
2066 Fix for 3678031, implement better flexing for Emerson headers. This involved adding support for max-width: intrinsic,
2067 fixing the box layout algorithm to properly deal with max-widths, and implementing support for baseline alignment
2068 so that boxes can be aligned vertically along their interior baselines.
2070 Reviewed by kocienda
2072 * khtml/css/cssparser.cpp:
2073 (CSSParser::parseValue):
2074 (CSSParser::parseShadow):
2075 * khtml/css/cssparser.h:
2076 * khtml/css/cssproperties.c:
2079 * khtml/css/cssproperties.h:
2080 * khtml/css/cssproperties.in:
2081 * khtml/css/cssstyleselector.cpp:
2082 (khtml::CSSStyleSelector::applyProperty):
2083 * khtml/css/cssvalues.c:
2086 * khtml/css/cssvalues.h:
2087 * khtml/css/cssvalues.in:
2088 * khtml/misc/khtmllayout.h:
2090 * khtml/rendering/render_block.cpp:
2091 (khtml::RenderBlock::baselinePosition):
2092 (khtml::RenderBlock::getBaselineOfFirstLineBox):
2093 * khtml/rendering/render_block.h:
2094 * khtml/rendering/render_box.cpp:
2095 (RenderBox::RenderBox):
2096 (RenderBox::overrideWidth):
2097 (RenderBox::overrideHeight):
2098 (RenderBox::calcWidth):
2099 (RenderBox::calcHeight):
2100 * khtml/rendering/render_box.h:
2101 (khtml::RenderBox::overrideSize):
2102 (khtml::RenderBox::setOverrideSize):
2103 * khtml/rendering/render_flexbox.cpp:
2104 (khtml::RenderFlexibleBox::calcMinMaxWidth):
2105 (khtml::RenderFlexibleBox::layoutBlock):
2106 (khtml::RenderFlexibleBox::layoutHorizontalBox):
2107 (khtml::RenderFlexibleBox::layoutVerticalBox):
2108 (khtml::RenderFlexibleBox::placeChild):
2109 (khtml::RenderFlexibleBox::allowedChildFlex):
2110 * khtml/rendering/render_flexbox.h:
2111 * khtml/rendering/render_image.cpp:
2112 (RenderImage::isWidthSpecified):
2113 (RenderImage::isHeightSpecified):
2114 * khtml/rendering/render_object.h:
2115 (khtml::RenderObject::getBaselineOfFirstLineBox):
2116 (khtml::RenderObject::overrideSize):
2117 (khtml::RenderObject::overrideWidth):
2118 (khtml::RenderObject::overrideHeight):
2119 (khtml::RenderObject::setOverrideSize):
2120 * khtml/rendering/render_style.cpp:
2121 (StyleFlexibleBoxData::StyleFlexibleBoxData):
2122 (StyleFlexibleBoxData::operator==):
2123 (ShadowData::operator==):
2124 * khtml/rendering/render_style.h:
2125 (khtml::RenderStyle::boxPack):
2126 (khtml::RenderStyle::setBoxPack):
2127 * khtml/rendering/table_layout.cpp:
2128 (AutoTableLayout::layout):
2130 2004-06-09 Richard Williamson <rjw@apple.com>
2132 Added support for drawing un-rasterized transformed PDFs.
2136 * khtml/ecma/kjs_html.cpp:
2137 (KJS::Context2DFunction::tryCall):
2139 2004-06-09 Darin Adler <darin@apple.com>
2143 - implemented still more execCommand commands
2145 * khtml/editing/jsediting.cpp: Added a lot more commands, and reformatted a bit.
2147 2004-06-08 Darin Adler <darin@apple.com>
2151 - implemented a bunch more execCommand commands
2152 - fixed <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
2153 - fixed <rdar://problem/3675898>: (Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan)
2154 - fixed <rdar://problem/3675903>: (Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan)
2155 - about half of <rdar://problem/3685231>: (execCommand italic is not implemented)
2156 - about half of <rdar://problem/3685232>: (execCommand bold is not implemented)
2158 * khtml/editing/jsediting.h: Made constructor inline. Deleted a few unneeded member functions
2159 that are now just private functions inside jsediting.cpp.
2161 * khtml/editing/jsediting.cpp:
2162 (commandImp): Changed this around, so the dictionary is a static local to this function,
2163 and initialized with C++ "first time initialization" rule.
2164 (DOM::JSEditor::execCommand): Got rid of special case for 0 for function pointer and added const.
2165 (DOM::JSEditor::queryCommandEnabled): Ditto.
2166 (DOM::JSEditor::queryCommandIndeterm): Got rid of special case for 0 for function pointer, added const,
2167 and use a common three-state state function rather than a separate "indeterm" function.
2168 (DOM::JSEditor::queryCommandState): Ditto.
2169 (DOM::JSEditor::queryCommandValue): More of the same.
2170 (execNotImplemented): Added. Used for unimplemented commands; there are only a few left.
2171 (execCopy): Renamed.
2173 (execDelete): Renamed.
2174 (execInsertText): Renamed.
2175 (execPaste): Renamed, and disabled.
2176 (execRedo): Renamed.
2177 (execSelectAll): Renamed.
2178 (execUndo): Renamed.
2179 (execStyleChange): Added. Helper function for commands that are style changes.
2181 (execItalic): Added.
2182 (execJustifyCenter): Added.
2183 (execJustifyFull): Added.
2184 (execJustifyLeft): Added.
2185 (execJustifyRight): Added.
2186 (execSubscript): Added.
2187 (execSuperscript): Added.
2188 (execUnselect): Added.
2189 (stateNotImplemented): Added. Used for unimplemented state queries; there are a few left.
2191 (valueNotImplemented): Added. Used for unimplemented value queries; there are a few left.
2192 (nullStringValue): Added.
2193 (createCommandDictionary): Changed the initDict function into this function. Added implementations
2194 for many commands and condensed format so it's easier to work with.
2196 2004-06-08 Darin Adler <darin@apple.com>
2200 - our part of fix to <rdar://problem/3629334>: (REGRESSION (Tiger): titles on pop-ups menus are truncated and show ellipses)
2202 * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Call setLineBreakMode:NSLineBreakByClipping.
2203 In the current version of Tiger I am using, this is not implemented yet.
2205 - a couple of other unrelated changes
2207 * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Put a little more code
2208 inside the APPLE_CHANGES ifdef.
2209 * kwq/KWQTextEdit.h: Remove unused setTabStopWidth function, and make empty setTextFormat
2210 function an inline for slightly smaller code size.
2211 * kwq/KWQTextEdit.mm: Ditto.
2212 * kwq/KWQTextField.mm: Update copyright date.
2214 2004-06-08 Trey Matteson <trey@apple.com>
2216 A DHTML drag source can now change the dragging image during the drag. Currently
2217 it may only be set to a static image.
2221 * kwq/KWQKHTMLPart.mm:
2222 (KWQKHTMLPart::dragSourceMovedTo): If the ondrag event handler set an image,
2224 * kwq/WebCoreBridge.h:
2226 2004-06-08 Ken Kocienda <kocienda@apple.com>
2230 Changes to the selection state for these tests as a result of my previous
2231 checkin. The changes are minor to a couple of offsets. I looked at the
2232 changes and approve them.
2234 * layout-tests/editing/deleting/delete-block-contents-001-expected.txt
2235 * layout-tests/editing/deleting/delete-block-contents-002-expected.txt
2236 * layout-tests/editing/deleting/delete-block-contents-003-expected.txt
2238 2004-06-08 Ken Kocienda <kocienda@apple.com>
2244 <rdar://problem/3654841>: "Hitting delete key with start of block selected
2245 does not merge content with preceding block"
2247 Selections that span blocks now work correctly for deleting the selection and inserting
2248 over the selection. The largest part of the change is adding a new field to the
2249 RemoveNodeAndPruneCommand and its impl version. This was done since the starting block
2250 for a multi-block selection should always be preserved when deleting, and this was
2251 a convenient way to express this using the code structure already in place.
2253 * khtml/editing/htmlediting.cpp:
2254 (khtml::RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): Modify this command to
2255 take two nodes: the node to remove and a node to stop at when pruning back up the tree.
2256 (khtml::RemoveNodeAndPruneCommand::pruneNode): New accessor, replaces old node() accessor.
2257 (khtml::RemoveNodeAndPruneCommand::stopNode): New accessor for additional feature described
2259 * khtml/editing/htmlediting.h:
2260 * khtml/editing/htmlediting_impl.cpp:
2261 (khtml::shouldPruneNode): blow flow renderers can now be deleted, but not if they are a
2262 rootEditableElement.
2263 (khtml::CompositeEditCommandImpl::removeNodeAndPrune): Pass new stopNode param and change the
2264 name of the existing node argument to pruneNode to distinguish it.
2265 (khtml::DeleteSelectionCommandImpl::doApply): Pass the block containing the start of the
2266 selection to removeNodeAndPrune in each case. Also, add one little loop to move all
2267 the content from the block containing the end of the selection if that block is different
2268 than the start block.
2269 (khtml::RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): Implement the
2270 pruneNode/stopNode design already described.
2271 (khtml::RemoveNodeAndPruneCommandImpl::~RemoveNodeAndPruneCommandImpl): Manage the
2272 lifecycle of stopNode.
2273 (khtml::RemoveNodeAndPruneCommandImpl::doApply): Add a check to stop at the stop
2275 * khtml/editing/htmlediting_impl.h:
2276 (khtml::RemoveNodeAndPruneCommandImpl::pruneNode): New accessor.
2277 (khtml::RemoveNodeAndPruneCommandImpl::stopNode): Ditto.
2279 2004-06-07 Trey Matteson <trey@apple.com>
2281 Clipboard access during DHTML dragging is made secure.
2285 * kwq/KWQClipboard.h:
2287 * kwq/KWQClipboard.mm:
2288 (KWQClipboard::KWQClipboard): Init new policy and changeCount members.
2289 (KWQClipboard::becomeNumb): Set policy to numb.
2290 (KWQClipboard::clearData): Check policy.
2291 (KWQClipboard::clearAllData): Check policy.
2292 (KWQClipboard::getData): Check policy and changeCount.
2293 (KWQClipboard::setData): Check policy.
2294 (KWQClipboard::types): Check policy and ChangeCount.
2295 (KWQClipboard::setDragLocation): Check policy.
2296 (KWQClipboard::setDragImage): Check policy.
2297 (KWQClipboard::setDropEffect): Check policy.
2298 (KWQClipboard::setEffectAllowed): Check policy.
2299 * kwq/KWQKHTMLPart.mm:
2300 (KWQKHTMLPart::dispatchDragSrcEvent): Set policy when creating clipboard,
2301 and numb-ify it when we're done.
2302 * kwq/WebCoreBridge.mm:
2303 (-[WebCoreBridge dragOperationForDraggingInfo:]): Set policy when creating clipboard,
2304 and numb-ify it when we're done.
2305 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
2306 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
2308 2004-06-08 Ken Kocienda <kocienda@apple.com>
2312 * khtml/editing/jsediting.cpp:
2313 (DOM::EditorCommand::): Stray capital letter in "selectAll" command static
2314 initializer prevented the command from ever working since the command
2315 strings are lower-cased when trying to find a match, but not when they
2316 are inserted into the dictionary. This is a one character change to make
2317 the string "selectall" in the initializer.
2319 2004-06-07 Trey Matteson <trey@apple.com>
2321 WebCore will now generate a default drag image when an element serves as a drag
2322 source. The basic idea is the image contains the element and all its children.
2324 As for the implementation, instead of adding a new paintAction I added a new
2325 field to the paintInfo struct, "paintingRoot". If this field is set, painting will
2326 only paint that root's descendants.
2328 Some code also moved from the bridge to the part, to be available within WebCore.
2332 * khtml/rendering/render_block.cpp:
2333 (khtml::RenderBlock::paintObject): Pass along paintingRoot to kids.
2334 (khtml::RenderBlock::paintFloats): Pass along paintingRoot to kids.
2335 * khtml/rendering/render_box.cpp:
2336 (RenderBox::paintBoxDecorations): Test paintingRoot before painting.
2337 * khtml/rendering/render_canvasimage.cpp:
2338 (RenderCanvasImage::paint): Test paintingRoot before painting.
2339 * khtml/rendering/render_flow.cpp:
2340 (RenderFlow::paintLineBoxBackgroundBorder): Test paintingRoot before painting.
2341 (RenderFlow::paintLineBoxDecorations): Test paintingRoot before painting.
2342 * khtml/rendering/render_image.cpp:
2343 (RenderImage::paint): Test paintingRoot before painting.
2344 * khtml/rendering/render_inline.cpp:
2345 (RenderInline::paint): Pass along paintingRoot to kids.
2346 * khtml/rendering/render_layer.cpp:
2347 (RenderLayer::paint): Pass along paintingRoot to kids.
2348 (RenderLayer:: paintLayer): Pass along paintingRoot to kids. Test if we are within the
2349 paintingRoot to decide whether to pass the root to our renderer.
2350 * khtml/rendering/render_layer.h:
2351 * khtml/rendering/render_object.cpp:
2352 (RenderObject::hasAncestor): New utility.
2353 (RenderObject::absoluteBoundingBoxRect): Helper for paintingRootRect
2354 (RenderObject::addAbsoluteRectForLayer): Helper for paintingRootRect
2355 (RenderObject::paintingRootRect): Return rect that will be painted if we are
2357 (RenderObject::draggableNode): Add test to avoid rare NULL ptr crash.
2358 * khtml/rendering/render_object.h:
2359 (khtml::RenderObject::PaintInfo::PaintInfo): Add paintingRoot field.
2360 (khtml::RenderObject::paintingRootForChildren): New utility. Return the current
2361 paintingRoot, or nil if we are the root (so kids draw normally).
2362 (khtml::RenderObject::shouldPaintWithinRoot): New utility. We can paint if we
2363 are the paintingRoot, or no root is set.
2364 * khtml/rendering/render_replaced.cpp:
2365 (RenderReplaced::shouldPaint): Pass along paintingRoot to kids.
2366 * khtml/rendering/render_table.cpp:
2367 (RenderTable::paint): Pass along paintingRoot to kids.
2368 * khtml/rendering/render_text.cpp:
2369 (RenderText::paint): Test paintingRoot before painting.
2370 * kwq/KWQKHTMLPart.h:
2371 * kwq/KWQKHTMLPart.mm:
2372 (KWQKHTMLPart::KWQKHTMLPart): Init new _elementToDraw member.
2373 (KWQKHTMLPart::paint): Generalized to handle cases of painting selection or a
2375 (KWQKHTMLPart::khtmlMouseMoveEvent): Make a default image if dragSrc didn't
2377 (KWQKHTMLPart::selectionRect): Moved from bridge.
2378 (KWQKHTMLPart::visibleSelectionRect): Ditto.
2379 (KWQKHTMLPart::imageFromRect): Newly factored code, from bridge.
2380 (KWQKHTMLPart::selectionImage): Moved from bridge, wrapper around imageFromRect.
2381 (KWQKHTMLPart::elementImage): New method, wrapper around imageFromRect.
2382 * kwq/WebCoreBridge.h:
2383 * kwq/WebCoreBridge.mm:
2384 (-[WebCoreBridge drawRect:withPainter:]): Just call part to draw.
2385 (-[WebCoreBridge visibleSelectionRect]): Guts moved to part.
2386 (-[WebCoreBridge selectionImage]): Ditto.
2388 2004-06-07 Darin Adler <darin@apple.com>
2392 - fixed <rdar://problem/3682821>: (setTimeout fails when additional parameters are used and timeout function is a string)
2394 * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Ignore excess arguments instead
2395 of rejecting the argument list for window.scrollBy, scroll, scrollTo, moveBy, moveTo,
2396 resizeBy, resizeTo, and setTimeout (when the timeout is a string rather than an object).
2398 - did a refinement of JSEditor to be slightly more efficient, and not have to edit
2399 both the .cpp file and the .h when adding more implementation
2401 * khtml/khtml_part.h: Hack so we can get to the docImpl and xmlDocImpl without being a friend.
2402 * khtml/editing/jsediting.h: Simplified a bit.
2403 * khtml/editing/jsediting.cpp: Redid to use a table, and simplified a bit.
2405 2004-06-07 Ken Kocienda <kocienda@apple.com>
2411 <rdar://problem/3682354>: "Typing style does not work yet"
2413 Did the final hook-up of support that has landed in the tree in the
2414 recent past as part of ongoing style-application work.
2416 For the most part, this patch modifies the InputNewlineCommandImpl and
2417 InputTextCommandImpl commands to insert a styling span when there is
2418 a typing style active.
2420 * khtml/editing/htmlediting_impl.cpp:
2421 (khtml::CompositeEditCommandImpl::createTypingStyleElement): Helper
2422 shared by the two commands modified.
2423 (khtml::InputNewlineCommandImpl::doApply): Create a styling span if the
2424 part has a typing style. Maintain a nodeToInsert local variable, which is
2425 either the break to insert or a styling span containing the break. Also,
2426 remove some utterly bogus derefs. They are just plain wrong.
2427 (khtml::InputTextCommandImpl::InputTextCommandImpl): Don't need to keep
2428 m_insertedTextNode. The composite commands this command uses will keep
2429 track of that object's lifetime. We do not need to do that here.
2430 (khtml::InputTextCommandImpl::~InputTextCommandImpl): No longer need
2431 to deref obsolete m_insertedTextNode.
2432 (khtml::InputTextCommandImpl::prepareForTextInsertion): Handle the case
2433 where a styling span needs to be added.
2434 (khtml::TypingCommandImpl::insertText): Create a new InputTextCommand when
2435 there is an active typping style.
2436 * khtml/editing/htmlediting_impl.h: Declare createTypingStyleElement helper.
2437 Remove m_insertedTextNode from InputTextCommandImpl.
2438 * kwq/WebCoreBridge.mm:
2439 (-[WebCoreBridge applyStyle:]): Swicth on the state of the selection, calling
2440 setTypingStyle when a caret and ApplyStyleCommand when a range.
2442 2004-06-07 Darin Adler <darin@apple.com>
2446 * khtml/editing/jsediting.h: Elide some unnecessary namespace prefixes.
2447 * khtml/editing/jsediting.cpp: Make typed constants instead of macros.
2448 (DOM::JSEditor::commandDict): Elide unnecessary namespace prefix.
2449 (DOM::JSEditor::execCommand): Remove xxxNotImplemented functions; just return false instead.
2450 (DOM::JSEditor::queryCommandEnabled): Ditto.
2451 (DOM::JSEditor::queryCommandIndeterm): Ditto.
2452 (DOM::JSEditor::queryCommandState): Ditto.
2453 (DOM::JSEditor::queryCommandSupported): Ditto.
2454 (DOM::JSEditor::queryCommandValue): Ditto.
2456 2004-06-05 Trey Matteson <trey@apple.com>
2458 As agreed with Hyatt and Louch, do not post incoming dragging events
2463 * khtml/khtmlview.cpp:
2464 (KHTMLView::updateDragAndDrop): For any drag target that is a text node,
2465 use its parent instead.
2467 2004-06-03 Trey Matteson <trey@apple.com>
2469 DHTML dragging uses the Cocoa NSDragOperation on both the source and dest ends.
2471 In addition, I caught a prime gaffe where I had used "dropAllowed" instead of "effectAllowed"
2472 for that particular WinIE property. That is renamed throughout.
2476 * khtml/ecma/kjs_events.cpp:
2477 (stringOrUndefined): New little helper.
2478 (Clipboard::getValueProperty): Return Undefined if dropEffect or effectAllowed are not set.
2479 (Clipboard::putValue): Rename.
2480 * khtml/ecma/kjs_events.h:
2481 (KJS::Clipboard::): Rename.
2482 * khtml/ecma/kjs_events.lut.h:
2483 * khtml/xml/dom2_eventsimpl.h: Rename.
2484 * kwq/KWQClipboard.h: Rename, add access to Cocoa drag op.
2485 * kwq/KWQClipboard.mm:
2486 (KWQClipboard::dropEffect): These 4 just moved in the file.
2487 (KWQClipboard::setDropEffect):
2488 (KWQClipboard::effectAllowed):
2489 (KWQClipboard::setEffectAllowed):
2490 (cocoaOpFromIEOp): Convert from an IE operation string to a Cocoa DragOp
2491 (IEOpFromCocoaOp): and vice-versa
2492 (KWQClipboard::sourceOperation): Return effectAllowed, converted to a NSDragOp
2493 (KWQClipboard::destinationOperation): Return dropEffect, converted to a NSDragOp
2494 (KWQClipboard::setSourceOperation): Set effectAllowed, using a Cocoa value
2495 (KWQClipboard::setDestinationOperation): Set dropEffect, using a Cocoa value
2496 * kwq/KWQKHTMLPart.h:
2497 * kwq/KWQKHTMLPart.mm:
2498 (KWQKHTMLPart::dispatchDragSrcEvent): Return the drag op specified by the source element.
2499 (KWQKHTMLPart::khtmlMouseMoveEvent): Pass our drag op up to WebKit.
2500 (KWQKHTMLPart::dragSourceMovedTo): Pass NULL for new arg.
2501 (KWQKHTMLPart::dragSourceEndedAt): Ditto
2502 * kwq/WebCoreBridge.h:
2503 * kwq/WebCoreBridge.mm:
2504 (-[WebCoreBridge dragOperationForDraggingInfo:]): Set the incoming dragOp onto the clipboard
2505 so DHTML can access it. In addition, validate whatever op DHTML returns so we play well
2508 2004-06-04 David Hyatt <hyatt@apple.com>
2510 Add support for auto values in flex transitions. Add support for mapping the back end values to
2511 front end values. Next it's time to actually try to use this stuff in render_flexbox.
2515 * khtml/css/css_valueimpl.cpp:
2517 * khtml/css/css_valueimpl.h:
2518 (DOM::FlexGroupTransitionValueImpl::isAuto):
2519 * khtml/css/cssparser.cpp:
2520 (FlexGroupTransitionParseContext::length):
2521 (FlexGroupTransitionParseContext::commitAutoValue):
2522 (FlexGroupTransitionParseContext::commitValue):
2523 (CSSParser::parseFlexGroupTransition):
2524 * khtml/css/cssstyleselector.cpp:
2525 (khtml::CSSStyleSelector::applyProperty):
2526 * khtml/rendering/render_style.cpp:
2527 (FlexGroupTransitionData::operator==):
2528 * khtml/rendering/render_style.h:
2529 (khtml::FlexGroupTransitionData::next):
2530 (khtml::FlexGroupTransitionData::isAuto):
2534 2004-06-04 Kevin Decker <kdecker@apple.com>
2538 - kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary
2539 - khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url,
2540 so we leave this blank
2541 - khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL
2542 - khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole
2543 - khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL
2545 * khtml/ecma/kjs_events.cpp:
2546 (JSEventListener::handleEvent):
2547 (JSLazyEventListener::handleEvent):
2548 * khtml/ecma/kjs_proxy.cpp:
2549 (KJSProxyImpl::evaluate):
2550 * khtml/ecma/kjs_window.cpp:
2551 (Window::isSafeScript):
2552 (ScheduledAction::execute):
2553 * khtml/xml/dom_docimpl.cpp:
2554 (DocumentImpl::open):
2555 * kwq/KWQKHTMLPart.h:
2556 * kwq/KWQKHTMLPart.mm:
2557 (KWQKHTMLPart::addMessageToConsole):
2559 2004-06-04 Ken Kocienda <kocienda@apple.com>
2563 Fix a comical little bug where the style-applying code did not take into
2564 account deleting content from the start of a block. After the deletion,
2565 the caret is placed in the node before the deleted content and so
2566 inserting a styled fragment after the deletion position works great.
2567 The problem is that if the selectionis at the start of a block, there
2568 is no "position before the deletion" and the caret is placed in the new
2569 first child of the block. Inserting the styled content after this
2570 node is just plain wrong. Now, this case is handled correctly, and the
2571 styled content is inserted in the proper position.
2573 * khtml/editing/htmlediting_impl.cpp:
2574 (khtml::ApplyStyleCommandImpl::insertFragment):
2576 2004-06-04 Ken Kocienda <kocienda@apple.com>
2580 * khtml/rendering/bidi.cpp:
2581 (khtml::RenderBlock::layoutInlineChildren): Only add additional line height
2582 in for root editable elements. This helps to keep layout from deviating too
2583 much from the intended page layout, but still gives an empty document a line
2584 in which it can blink the caret.
2586 2004-06-04 Ken Kocienda <kocienda@apple.com>
2590 Made some progress on this set of related bugs:
2592 <rdar://problem/3675867>: "Make execCommand work as specified in the Javascript execCommand Compatibility Plan"
2593 <rdar://problem/3675898>: "Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan"
2594 <rdar://problem/3675899>: "Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan"
2595 <rdar://problem/3675901>: "Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan"
2596 <rdar://problem/3675903>: "Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan"
2597 <rdar://problem/3675904>: "Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan"
2599 I did several things to move the ahead with the plan:
2601 1. The latter five methods did not appear in the tree at all. Now they do, although
2603 2. I removed the implementation for these editing methods from dom_docimpl.cpp, and moved
2604 them out to new js_editing.cpp/js_editing.h files. The remaining code in dom_docimpl.cpp
2605 is glue to call over to the new JSEditor object defined in the new files.
2607 3. For a couple of the command implementations in js_editing.cpp, I made a stab at returning sensible values.
2608 For others, I just return place-holder values. I have added some comments to describe what has been done and
2609 what still needs to be done.
2611 * WebCore.pbproj/project.pbxproj:
2612 * khtml/dom/dom_doc.cpp: Add call-overs for these methods.
2613 (DOM::Document::queryCommandEnabled):
2614 (DOM::Document::queryCommandIndeterm):
2615 (DOM::Document::queryCommandState):
2616 (DOM::Document::queryCommandSupported):
2617 (DOM::Document::queryCommandValue):
2618 * khtml/dom/dom_doc.h:
2619 * khtml/ecma/kjs_dom.cpp: Add queryCommandXXX terminology.
2620 (DOMDocumentProtoFunc::tryCall):
2621 * khtml/ecma/kjs_dom.h:
2622 (KJS::DOMDocument::):
2623 * khtml/ecma/kjs_dom.lut.h:
2625 * khtml/editing/jsediting.cpp: Added. This file implements the guts of editing-related JS methods.
2626 (DOM::execCommandNotImplemented):
2627 (DOM::queryBoolNotImplemented):
2628 (DOM::queryValueNotImplemented):
2629 (DOM::JSEditor::commandDict):
2630 (DOM::JSEditor::JSEditor):
2631 (DOM::JSEditor::~JSEditor):
2632 (DOM::JSEditor::commandIdentifier):
2633 (DOM::JSEditor::addCommand):
2634 (DOM::JSEditor::initDict):
2635 (DOM::JSEditor::execCommand):
2636 (DOM::JSEditor::queryCommandEnabled):
2637 (DOM::JSEditor::queryCommandIndeterm):
2638 (DOM::JSEditor::queryCommandState):
2639 (DOM::JSEditor::queryCommandSupported):
2640 (DOM::JSEditor::queryCommandValue):
2641 (DOM::JSEditor::execCommandCopy):
2642 (DOM::JSEditor::execCommandCut):
2643 (DOM::JSEditor::execCommandDelete):
2644 (DOM::JSEditor::execCommandInsertText):
2645 (DOM::JSEditor::execCommandPaste):
2646 (DOM::JSEditor::execCommandRedo):
2647 (DOM::JSEditor::execCommandSelectAll):
2648 (DOM::JSEditor::execCommandUndo):
2649 (DOM::JSEditor::enabledIfPartNotNull):
2650 (DOM::JSEditor::enabledIfSelectionNotEmpty):
2651 (DOM::JSEditor::enabledIfSelectionIsRange):
2652 (DOM::JSEditor::commandSupported):
2653 * khtml/editing/jsediting.h: Added.
2654 (DOM::JSEditor::CommandIdentifier::CommandIdentifier):
2655 (DOM::JSEditor::document):
2656 (DOM::JSEditor::part):
2657 * khtml/xml/dom_docimpl.cpp: Rework JS editing support into glue that calls over into new JSEditor object.
2658 (DocumentImpl::DocumentImpl):
2659 (DocumentImpl::~DocumentImpl):
2660 (DocumentImpl::jsEditor):
2661 (DocumentImpl::execCommand):
2662 (DocumentImpl::queryCommandEnabled):
2663 (DocumentImpl::queryCommandIndeterm):
2664 (DocumentImpl::queryCommandState):
2665 (DocumentImpl::queryCommandSupported):
2666 (DocumentImpl::queryCommandValue):
2667 * khtml/xml/dom_docimpl.h:
2669 2004-06-03 Richard Williamson <rjw@apple.com>
2671 Added setCompositeOperation method to Context2D.
2672 Actually pass composite operation to drawPixmap (instead of 1).
2676 * khtml/ecma/kjs_html.cpp:
2677 (KJS::Context2DFunction::tryCall):
2678 * khtml/ecma/kjs_html.h:
2680 * khtml/ecma/kjs_html.lut.h:
2683 * kwq/KWQPainter.mm:
2684 (QPainter::compositeOperatorFromString):
2685 (QPainter::drawPixmap):
2687 2004-06-03 David Hyatt <hyatt@apple.com>
2689 Add support for box-flex-group-transition (whew!), a new property that is going to enable some incredibly
2690 complicated flexing layouts in HTML.
2692 This is Stage 1 - wire up the CSS property and make it get parsed into front-end data. Nobody actually looks
2697 * khtml/css/css_valueimpl.cpp:
2698 (CSSInheritedValueImpl::cssText):
2699 (ShadowValueImpl::cssText):
2701 (FlexGroupTransitionValueImpl::~FlexGroupTransitionValueImpl):
2702 (FlexGroupTransitionValueImpl::cssText):
2703 * khtml/css/css_valueimpl.h:
2704 (DOM::FlexGroupTransitionValueImpl::cssValueType):
2705 * khtml/css/cssparser.cpp:
2706 (CSSParser::parseValue):
2707 (CSSParser::parseShadow):
2708 (FlexGroupTransitionParseContext::length):
2709 (FlexGroupTransitionParseContext::~FlexGroupTransitionParseContext):
2710 (FlexGroupTransitionParseContext::failed):
2711 (FlexGroupTransitionParseContext::allowGroup):
2712 (FlexGroupTransitionParseContext::commitGroup):
2713 (FlexGroupTransitionParseContext::commitSlash):
2714 (FlexGroupTransitionParseContext::commitLength):
2715 (FlexGroupTransitionParseContext::commitValue):
2716 (CSSParser::parseFlexGroupTransition):
2717 * khtml/css/cssparser.h:
2718 * khtml/css/cssproperties.c:
2721 * khtml/css/cssproperties.h:
2722 * khtml/css/cssproperties.in:
2723 * khtml/rendering/render_style.cpp:
2724 (StyleFlexibleBoxData::StyleFlexibleBoxData):
2725 (StyleFlexibleBoxData::operator==):
2726 (StyleFlexibleBoxData::transitionDataEquivalent):
2727 (StyleCSS3InheritedData::operator==):
2728 (StyleCSS3InheritedData::shadowDataEquivalent):
2729 (ShadowData::operator==):
2730 (RenderStyle::setBoxFlexGroupTransition):
2732 (FlexGroupTransitionData::operator==):
2733 * khtml/rendering/render_style.h:
2734 (khtml::FlexGroupTransitionData::next):
2735 (khtml::FlexGroupTransitionData::~FlexGroupTransitionData):
2736 (khtml::FlexGroupTransitionData::operator!=):
2737 (khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
2738 (khtml::RenderStyle::boxFlexGroupTransition):
2740 2004-06-03 Richard Williamson <rjw@apple.com>
2742 Add extra sanity check to Image parameter of drawImage...
2746 * khtml/ecma/kjs_html.cpp:
2747 (KJS::Context2DFunction::tryCall):
2749 2004-06-02 David Hyatt <hyatt@apple.com>
2751 Fix for 3673931, negative margins on objects that dodge floats not handled correctly.
2755 * khtml/rendering/render_block.cpp:
2756 (khtml::RenderBlock::layoutBlockChildren):
2758 2004-06-03 Ken Kocienda <kocienda@apple.com>
2762 Fix for layout regression I caused when fixing:
2764 <rdar://problem/3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
2766 Extra height is added to empty blocks that are editable, so we can click to place
2767 the caret in them. This extra height was erroneously being added to non-editable
2768 blocks as a result of my earlier change. After looking at this and doing some
2769 code review, there are the following changes:
2771 Change away from "containingBlock" terminology in the NodeImpl class. The
2772 operation we are doing in NodeImpl is not the same as what is done in CSS
2773 when it uses the term "containingBlock" so:
2774 containingBlock changes to enclosingBlockFlowElement, and
2775 rootEditableBlock changes to rootEditableElement
2777 The vast majority of changes here are to make these name changes. The other
2778 significant piece of work, and the fix for the regression, is to change
2779 bidi.cpp to only include this extra line height if a block is empty
2780 and is content-editable.
2782 * khtml/editing/htmlediting_impl.cpp:
2783 (khtml::leadingWhitespacePosition):
2784 (khtml::trailingWhitespacePosition):
2785 (khtml::DeleteSelectionCommandImpl::doApply):
2786 (khtml::InputNewlineCommandImpl::doApply):
2787 (khtml::RemoveNodeAndPruneCommandImpl::doApply):
2788 (khtml::TypingCommandImpl::issueCommandForDeleteKey):
2789 * khtml/rendering/bidi.cpp:
2790 (khtml::RenderBlock::layoutInlineChildren):
2791 * khtml/xml/dom_docimpl.cpp:
2792 (DocumentImpl::relinquishesEditingFocus):
2793 (DocumentImpl::acceptsEditingFocus):
2794 * khtml/xml/dom_nodeimpl.cpp:
2795 * khtml/xml/dom_nodeimpl.h:
2796 * khtml/xml/dom_position.cpp:
2797 (DOM::Position::equivalentLeafPosition):
2798 (DOM::Position::previousCharacterPosition):
2799 (DOM::Position::nextCharacterPosition):
2800 (DOM::Position::previousLinePosition):
2801 (DOM::Position::nextLinePosition):
2802 (DOM::Position::equivalentUpstreamPosition):
2803 (DOM::Position::equivalentDownstreamPosition):
2804 (DOM::Position::atStartOfRootEditableElement):
2805 (DOM::Position::inRenderedContent):
2806 (DOM::Position::rendersOnSameLine):
2807 (DOM::Position::rendersInDifferentPosition):
2808 (DOM::Position::isLastRenderedPositionInEditableBlock):
2809 (DOM::Position::inFirstEditableInRootEditableElement):
2810 (DOM::Position::inLastEditableInRootEditableElement):
2811 (DOM::Position::inFirstEditableInContainingEditableBlock):
2812 (DOM::Position::inLastEditableInContainingEditableBlock):
2813 * khtml/xml/dom_position.h:
2814 * khtml/xml/dom_selection.cpp:
2815 (DOM::Selection::moveToRenderedContent):
2817 2004-06-02 Trey Matteson <trey@apple.com>
2819 Added types property to JS clipboard object.
2821 Reviewed by Richard.
2823 * khtml/ecma/kjs_events.cpp:
2824 (Clipboard::getValueProperty): Create JS array for strings coming from the clipboard impl.
2825 * khtml/ecma/kjs_events.h:
2827 * khtml/ecma/kjs_events.lut.h:
2828 * kwq/KWQClipboard.mm:
2829 (MIMETypeFromCocoaType): New helper routine to map types.
2830 (KWQClipboard::types): Implement based on NSPasteboard's types.
2832 2004-06-02 Richard Williamson <rjw@apple.com>
2834 Corrected typo ID_IMG should have been ID_CANVAS when
2835 checking for the canvas composite operator.
2839 * khtml/rendering/render_canvasimage.cpp:
2840 (RenderCanvasImage::paint):
2842 2004-06-02 Richard Williamson <rjw@apple.com>
2844 Correctly size the <CANVAS> if margins, borders, or
2849 * khtml/rendering/render_canvasimage.cpp:
2850 (RenderCanvasImage::createDrawingContext):
2852 2004-06-01 Trey Matteson <trey@apple.com>
2854 First cut at the source side of DHTML dragging. Following IE, new events are added:
2855 ondragstart, ondrag, ondragend. The recently added CSS property -khtml-user-drag can
2856 be used to make an element draggable. event.dataTransfer.setDragImage(ImageObject,x,y)
2857 can be used from ondragstart to set a static image for the dragImage. x,y is the location
2858 of the mouse within the image from the upper right corner. clipboard methods setdata
2859 and cleardata are implemented.
2863 * khtml/ecma/kjs_dom.cpp:
2864 (DOMNode::getValueProperty): Boilerplate for new events
2865 (DOMNode::putValue): Boilerplate for new events
2866 * khtml/ecma/kjs_dom.h:
2867 (KJS::DOMNode::): Boilerplate for new events
2868 * khtml/ecma/kjs_dom.lut.h:
2869 * khtml/ecma/kjs_events.cpp:
2870 (DOMMouseEvent::getValueProperty): Return undefined for clipboard when its not a drag event.
2871 (ClipboardProtoFunc::tryCall): setDragImage glue to clipboard routine.
2872 * khtml/ecma/kjs_events.h:
2874 * khtml/ecma/kjs_events.lut.h:
2875 * khtml/html/html_elementimpl.cpp:
2876 (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events
2877 * khtml/khtml_part.cpp:
2878 (KHTMLPart::shouldDragAutoNode): Empty impl of new method, where UA determines
2879 draggability for events with -khtml-user-drag=auto
2880 * khtml/khtml_part.h:
2881 * khtml/misc/htmlattrs.c:
2882 * khtml/misc/htmlattrs.h:
2883 * khtml/misc/htmlattrs.in: Boilerplate for new events
2884 * khtml/rendering/render_object.cpp:
2885 (RenderObject::draggableNode): Find the node or parent node which might be dragged.
2886 * khtml/rendering/render_object.h:
2887 * khtml/xml/dom2_eventsimpl.cpp:
2888 (EventImpl::typeToId): Boilerplate for new events
2889 (EventImpl::idToType): Boilerplate for new events
2890 * khtml/xml/dom2_eventsimpl.h:
2891 (DOM::EventImpl::): Boilerplate for new events
2892 * kwq/KWQClipboard.h:
2893 * kwq/KWQClipboard.mm:
2894 (KWQClipboard::clearData): Implemented to call NSPasteboard
2895 (KWQClipboard::clearAllData): ditto
2896 (KWQClipboard::getData): fix corner case that came up testing
2897 (KWQClipboard::setData): Implemented to call NSPasteboard
2898 (KWQClipboard::dragLocation): Simple setter/getters
2899 (KWQClipboard::setDragLocation):
2900 (KWQClipboard::dragImage):
2901 (KWQClipboard::setDragImage):
2902 (KWQClipboard::dragNSImage):
2903 * kwq/KWQKHTMLPart.h:
2904 * kwq/KWQKHTMLPart.mm:
2905 (KWQKHTMLPart::KWQKHTMLPart): init new member var
2906 (KWQKHTMLPart::dragHysteresisExceeded): Hysteresis moved here from WebKit
2907 (KWQKHTMLPart::dispatchDragSrcEvent): Send a dragging event to the current dragSource
2908 (KWQKHTMLPart::khtmlMouseMoveEvent): Initiate dragging, now including consulting DHTML,
2909 hysteresis and sending ondragstart.
2910 (KWQKHTMLPart::dragSourceMovedTo): simple passthrough
2911 (KWQKHTMLPart::dragSourceEndedAt): simple passthrough
2912 (KWQKHTMLPart::mouseDown): salt away _mouseDownX, _mouseDownY
2913 (KWQKHTMLPart::shouldDragAutoNode): Called for -khtml-user-drag=auto. We just call
2915 * kwq/WebCoreBridge.h:
2916 * kwq/WebCoreBridge.mm:
2917 (-[WebCoreBridge dragSourceMovedTo:]): New glue to drive new dragging events.
2918 (-[WebCoreBridge dragSourceEndedAt:operation:]):
2920 2004-06-02 Ken Kocienda <kocienda@apple.com>
2924 Finish off name change from previous check-in by changing dom_edititerator
2925 file names to dom_positioniterator. Files copied and renamed in repository.
2926 Includes updated as needed.
2928 * ForwardingHeaders/xml/dom_edititerator.h: Removed.
2929 * ForwardingHeaders/xml/dom_positioniterator.h: Added.
2930 * WebCore.pbproj/project.pbxproj:
2931 * khtml/editing/htmlediting_impl.cpp:
2932 * khtml/xml/dom_edititerator.cpp: Removed.
2933 * khtml/xml/dom_edititerator.h: Removed.
2934 * khtml/xml/dom_position.cpp:
2935 * khtml/xml/dom_positioniterator.cpp: Added.
2936 (DOM::PositionIterator::peekPrevious):
2937 (DOM::PositionIterator::peekNext):
2938 (DOM::PositionIterator::atStart):
2939 (DOM::PositionIterator::atEnd):
2940 * khtml/xml/dom_positioniterator.h: Added.
2941 (DOM::PositionIterator::PositionIterator):
2942 (DOM::PositionIterator::current):
2943 (DOM::PositionIterator::previous):
2944 (DOM::PositionIterator::next):
2945 (DOM::PositionIterator::setPosition):
2946 (DOM::PositionIterator::isEmpty):
2947 * khtml/xml/dom_selection.cpp:
2949 2004-06-02 Ken Kocienda <kocienda@apple.com>
2953 Probable fix for this bug:
2955 <rdar://problem/3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
2957 I could not reproduce the bug myself, which is why I call the fix
2960 Darin and I did some code inspection and found some problems
2961 with the equivalentUpstreamPosition and
2962 equivalentDownstreamPosition functions on DOM::Position and how
2963 these functions dealt with changing from editable to
2964 non-editable content. As a result of these discoveries, I went
2965 over this code and the helpers and functions which support them,
2966 and made some corrections and simplifications. The big changes
2969 1. Rename EditIterator class to PositionIterator. This class needs
2970 to run code for selections in non-editable content, so the name
2971 change is appropriate.
2973 2. Change containingEditableBlock to containingBlock. It turns out
2974 that none of the editing code relies on the distinction between
2975 editable blocks and non-editable blocks. The important distinction
2976 is the block boundary. The notion of rootEditableBlock remains.
2978 * khtml/editing/htmlediting_impl.cpp:
2979 (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): PositionIterator name change.
2980 (khtml::DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Ditto.
2981 (khtml::DeleteSelectionCommandImpl::containsOnlyWhitespace): Ditto.
2982 (khtml::DeleteSelectionCommandImpl::doApply): Ditto.
2983 (khtml::InputNewlineCommandImpl::doApply): Ditto.
2984 (khtml::RemoveNodeAndPruneCommandImpl::doApply): Ditto.
2985 * khtml/rendering/bidi.cpp:
2986 (khtml::RenderBlock::layoutInlineChildren): Ditto.
2987 * khtml/xml/dom_edititerator.cpp:
2988 (DOM::PositionIterator::peekPrevious): Call for previousLeafNode instead of previousEditable.
2989 Editable check is not appropriate as this class is used for non-editable content.
2990 (DOM::PositionIterator::peekNext): Call nextLeafNode instead of nextEditable, as above.
2991 (DOM::PositionIterator::atStart): Call for previousLeafNode instead of previousEditable, as above.
2992 (DOM::PositionIterator::atEnd): Call nextLeafNode instead of nextEditable, as above.
2993 * khtml/xml/dom_edititerator.h:
2994 (DOM::PositionIterator::PositionIterator): PositionIterator name change. Remove unused and unneeded constructors.
2995 * khtml/xml/dom_nodeimpl.cpp:
2996 (NodeImpl::previousEditable): Simplify. Rely on previousLeafNode as a helper.
2997 (NodeImpl::nextEditable): Ditto, but rely on nextLeafNode.
2998 (NodeImpl::previousLeafNode): Remove tree-walking code. Rely on traversePreviousNode as a helper.
2999 (NodeImpl::nextLeafNode): Ditto, but rely on traverseNextNode.
3000 (NodeImpl::containingBlock): Renamed replacement for containingEditableBlock.
3001 (NodeImpl::inSameContainingEditableBlock): Call renamed containingBlock.
3002 * khtml/xml/dom_nodeimpl.h:
3003 * khtml/xml/dom_position.cpp:
3004 (DOM::Position::previousCharacterPosition): Various name changes, as described above.
3005 (DOM::Position::nextCharacterPosition): Ditto.
3006 (DOM::Position::previousWordPosition): Ditto.
3007 (DOM::Position::nextWordPosition): Ditto.
3008 (DOM::Position::previousLinePosition): Ditto.
3009 (DOM::Position::nextLinePosition): Ditto.
3010 (DOM::Position::equivalentUpstreamPosition): Remove bogus check for editable node in loop. Perform
3011 improved block-crossing check at start of loop which works for editable and non-editable content.
3012 This is the crux of the fix for the bug.
3013 (DOM::Position::equivalentDownstreamPosition): Ditto.
3014 (DOM::Position::inRenderedContent): Various name changes, as described above.
3015 (DOM::Position::rendersOnSameLine): Ditto.
3016 (DOM::Position::rendersInDifferentPosition): Ditto.
3017 (DOM::Position::isFirstRenderedPositionOnLine): Ditto.
3018 (DOM::Position::isLastRenderedPositionOnLine): Ditto.
3019 (DOM::Position::isLastRenderedPositionInEditableBlock): Ditto.
3020 (DOM::Position::inFirstEditableInRootEditableBlock): Ditto.
3021 (DOM::Position::inLastEditableInRootEditableBlock): Ditto.
3022 (DOM::Position::inFirstEditableInContainingEditableBlock): Ditto.
3023 (DOM::Position::inLastEditableInContainingEditableBlock): Ditto.
3025 2004-06-01 Richard Williamson <rjw@apple.com>
3027 Fixed deployment build warning.
3029 * khtml/rendering/render_canvasimage.cpp:
3030 (RenderCanvasImage::paint):
3032 2004-06-01 Richard Williamson <rjw@apple.com>
3034 Added support for composite attribute to <CANVAS>
3035 Added support for drawImage and drawImageFromRect to <CANVAS>, i.e.:
3041 var img = new Image(600,600);
3043 function drawImage()
3045 var aCanvas = document.getElementById ("canvas1");
3046 var context = aCanvas.getContext("context-2d");
3047 context.drawImage (img, 0, 0, 600, 600, "copy");
3050 img.onload = drawImage;
3051 img.src = "http://www.google.com/images/logo.gif";
3056 <canvas id="canvas1" width=600 height=600>
3062 * khtml/ecma/kjs_html.cpp:
3063 (KJS::Context2DFunction::tryCall):
3064 (Context2D::Context2D):
3065 * khtml/ecma/kjs_html.h:
3066 * khtml/rendering/render_canvasimage.cpp:
3067 (RenderCanvasImage::paint):
3069 * kwq/KWQPainter.mm:
3070 (QPainter::getCompositeOperation):
3071 (QPainter::setCompositeOperation):
3072 (QPainter::drawPixmap):
3073 (QPainter::drawTiledPixmap):
3076 (QPixmap::flushRasterCache):
3077 * kwq/WebCoreImageRenderer.h:
3078 * kwq/WebCoreImageRendererFactory.h:
3080 2004-06-01 Ken Kocienda <kocienda@apple.com>
3086 <rdar://problem/3655028>: "Text styles have hard-coded values making bold the only supported text style"
3087 <rdar://problem/3656969>: "HTML Editing: Font panel doesn't work"
3089 * khtml/css/css_valueimpl.cpp:
3090 (FontFamilyValueImpl::cssText): Added implementation for this subclass. Returns parsedFontName.
3091 * khtml/css/css_valueimpl.h: Declare cssText() on FontFamilyValueImpl.
3092 (DOM::CSSProperty::value):
3093 * khtml/editing/htmlediting.cpp:
3094 (khtml::ApplyStyleCommand::ApplyStyleCommand): Changed signature to take a CSSStyleDeclarationImpl.
3095 (khtml::ApplyStyleCommand::style): Added accessor.
3096 * khtml/editing/htmlediting.h: Changed constructor signature to take a CSSStyleDeclarationImpl.
3097 * khtml/editing/htmlediting_impl.cpp:
3098 (khtml::styleSpanClassString): Added helper to return attribute used to tag spans we add to apply styles.
3099 (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl): Ref style passed in.
3100 (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl): Deref style passed in.
3101 (khtml::ApplyStyleCommandImpl::doApply): m_removingStyle is obsolete. Removed.
3102 (khtml::ApplyStyleCommandImpl::isHTMLStyleNode): Now checks all properties in the object's declaration.
3103 (khtml::ApplyStyleCommandImpl::removeCSSStyle): Again, now is multi-property-savvy. Will now remove an empty span
3105 (khtml::ApplyStyleCommandImpl::currentlyHasStyle): Replaced, bold-only code with code that can handle all styles.
3106 (khtml::ApplyStyleCommandImpl::computeStyleChange): Helper which helps to determine whether we want to apply
3107 HTML-style markup for bold and italic, and gathers up all style changes that need to be done.
3108 (khtml::ApplyStyleCommandImpl::positionInsertionPoint): Added comment explaining possible optimization that might be
3110 (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Significant reworking; now handles applying multiple styles.
3111 (khtml::ApplyStyleCommandImpl::cloneSelection): Assert fragment has at least one child. Don't want to work
3113 (khtml::ApplyStyleCommandImpl::surroundContentsWithElement): New helper.
3114 (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl): Juggle asserts and lifecycle methods to be
3115 more like other commands.
3116 (khtml::RemoveCSSPropertyCommandImpl::doApply): Ditto.
3117 (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl): Ditto.
3118 (khtml::RemoveNodeAttributeCommandImpl::doApply):Ditto.
3119 * khtml/editing/htmlediting_impl.h:
3120 (khtml::ApplyStyleCommandImpl::style): Added.
3121 (khtml::ApplyStyleCommandImpl::StyleChange::StyleChange): Added.
3123 (-[DOMCSSStyleDeclaration setProperty:::]): Fix problem where passing an empty NSString to a function expecting a boolean
3124 made all properties important priority.
3125 * kwq/WebCoreBridge.mm:
3126 (-[WebCoreBridge applyStyle:]): Remove provisional code and comment. Now pass along style, following the intended design.
3128 2004-06-01 Chris Blumenberg <cblu@apple.com>
3130 Reviewed by kocienda.
3132 * kwq/WebCoreBridge.h:
3133 * kwq/WebCoreBridge.mm:
3134 (-[WebCoreBridge dragCaretDOMRange]): new, lets WebKit pass the drag caret DOM range to the editing delegate
3136 2004-05-28 John Louch <ouch@apple.com>
3140 - removed setShadowWithColor and change setShadow to work with optional attributes
3141 it follows the same rules as setFill/StrokeColor
3142 - Fixed bug in setFillColor and setStrokeColor for CMYK colors (missing break in case).
3144 * khtml/ecma/kjs_html.cpp:
3145 (KJS::Context2DFunction::tryCall):
3146 * khtml/ecma/kjs_html.h:
3148 * khtml/ecma/kjs_html.lut.h:
3151 2004-05-28 Darin Adler <darin@apple.com>
3155 - various editing-related improvements
3157 * khtml/xml/dom_selection.h: Removed UP and DOWN directions, and added PARAGRAPH granularity.
3158 * khtml/xml/dom_selection.cpp:
3159 (DOM::Selection::modify): Got rid of the UP and DOWN directions, and made movement
3160 between lines happen when granularity is LINE. Added a new unimplemented granularity:
3162 (DOM::Selection::validate): Remove some unneeded APPLE_CHANGES. The code need not be ifdef'd.
3163 (DOM::Selection::debugPosition): Ditto.
3165 * kwq/WebCoreBridge.h: Removed WebSelectUp and WebSelectDown, and added WebSelectByParagraph.
3166 Added stringForRange: and selectedDOMRangeWithGranularity:, and renamed replaceSelectionWithNewline
3167 to insertNewline because it has the insertText: semantic, not the replaceSelectionWithText: one.
3168 * kwq/WebCoreBridge.mm:
3169 (-[WebCoreBridge stringForRange:]): Added.
3170 (-[WebCoreBridge selectedDOMRangeWithGranularity:]): Added.
3171 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Updated code to understand
3172 that vertical movement is based on granularity now, not direction.
3173 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): Moved an ensureCaretVisible
3174 from the WebKit down here. I think perhaps this should go down even further in WebCore.
3175 (-[WebCoreBridge insertNewline]): Renamed, and moved ensureCaretVisible here.
3176 (-[WebCoreBridge insertText:]): Moved ensureCaretVisible here.
3177 (-[WebCoreBridge deleteKeyPressed]): Moved ensureCaretVisible here.
3179 * khtml/xml/dom_position.cpp: Some ifdef tweaks.
3181 * khtml/misc/helper.cpp: Namespace and formatting tweaks.
3182 * khtml/misc/helper.h: Removed some unused stuff.
3184 * khtml/dom/dom2_range.h: Make range constructor public so that anyone with
3185 a RangeImpl can easily make a Range.
3187 2004-05-28 Richard Williamson <rjw@apple.com>
3189 setStrokeColor and setFillColor now support
3190 old school web color string, oswcs+alpha, gray, gray+alpha,
3195 * khtml/css/cssparser.cpp:
3196 (CSSParser::parseColor):
3197 (CSSParser::parseColorFromValue):
3198 * khtml/css/cssparser.h: Made parseColor static public class method
3199 * khtml/ecma/kjs_html.cpp:
3200 (KJS::Context2DFunction::tryCall):
3202 2004-05-28 David Hyatt <hyatt@apple.com>
3204 Implement -khtml-user-select and add support for the property -khtml-user-drag (although someone will still
3205 need to wire it up).
3209 * khtml/css/cssparser.cpp:
3210 (CSSParser::parseValue):
3211 * khtml/css/cssproperties.c:
3214 * khtml/css/cssproperties.h:
3215 * khtml/css/cssproperties.in:
3216 * khtml/css/cssstyleselector.cpp:
3217 (khtml::CSSStyleSelector::applyProperty):
3218 * khtml/css/cssvalues.c:
3221 * khtml/css/cssvalues.h:
3222 * khtml/css/cssvalues.in:
3223 * khtml/khtml_part.cpp:
3224 (KHTMLPart::handleMousePressEventDoubleClick):
3225 (KHTMLPart::handleMousePressEventTripleClick):
3226 (KHTMLPart::handleMousePressEventSingleClick):
3227 (KHTMLPart::handleMouseMoveEventSelection):
3228 * khtml/rendering/render_canvas.cpp:
3229 (RenderCanvas::setSelection):
3230 * khtml/rendering/render_object.cpp:
3231 (RenderObject::shouldSelect):
3232 * khtml/rendering/render_object.h:
3233 * khtml/rendering/render_style.cpp:
3235 (StyleCSS3NonInheritedData::operator==):
3236 (RenderStyle::diff):
3237 * khtml/rendering/render_style.h:
3239 (khtml::RenderStyle::userDrag):
3240 (khtml::RenderStyle::userSelect):
3241 (khtml::RenderStyle::setUserDrag):
3242 (khtml::RenderStyle::setUserSelect):
3243 (khtml::RenderStyle::initialUserDrag):
3244 (khtml::RenderStyle::initialUserSelect):
3246 2004-05-28 John Louch <set EMAIL_ADDRESS environment variable>
3247 added addArc and clip path routines.
3249 Reviewed by sullivan.
3251 * khtml/ecma/kjs_html.cpp:
3252 (KJS::Context2DFunction::tryCall):
3253 * khtml/ecma/kjs_html.h:
3255 * khtml/ecma/kjs_html.lut.h:
3258 2004-05-28 John Louch <ouch@apple.com>
3260 Added addArcToPoint and addRect path routines.
3262 Reviewed by sullivan.
3264 * khtml/ecma/kjs_html.cpp:
3265 (KJS::Context2DFunction::tryCall):
3266 * khtml/ecma/kjs_html.h:
3268 * khtml/ecma/kjs_html.lut.h:
3271 2004-05-27 Ken Kocienda <kocienda@apple.com>
3275 * khtml/xml/dom_selection.cpp:
3276 (DOM::Selection::toRange): Add call to update document layout before returning a Range.
3277 This is done to ensure recently-done editing changes are reflected in the calculation
3278 of the Range. This change solves a specific problem with updating the font panel, where
3279 the wrong Range was used, resulting in an incorrect font. Also, defer converting
3280 positions to be range-compliant positions. The nodeIsBeforeNode function is not
3281 range-compliant-position-savvy.
3283 2004-05-27 Kevin Decker <kdecker@apple.com>
3287 - added support for the new JavaScript error console
3288 - error messages are now wired directly to the bridge
3289 - revised generated error message content
3291 * khtml/ecma/kjs_events.cpp:
3292 (JSEventListener::handleEvent):
3293 * khtml/ecma/kjs_proxy.cpp:
3294 (KJSProxyImpl::evaluate):
3295 * khtml/ecma/kjs_window.cpp:
3296 (Window::isSafeScript):
3297 (ScheduledAction::execute):
3298 * kwq/KWQKHTMLPart.h:
3299 * kwq/KWQKHTMLPart.mm:
3300 (KWQKHTMLPart::addMessageToConsole):
3301 * kwq/WebCoreBridge.h:
3302 * kwq/WebCoreBridge.mm:
3304 2004-05-27 Trey Matteson <trey@apple.com>
3306 Two dragging tweaks: ondragleave events are sent before ondragenter events when
3307 going across element boundaries, to match WinIE.
3308 For compatibility with WinIE, we honor MIME types of "Text" and "URL".
3312 * khtml/khtmlview.cpp:
3313 (KHTMLView::updateDragAndDrop):
3314 * kwq/KWQClipboard.mm:
3315 (cocoaTypeFromMIMEType):
3319 2004-05-27 Vicki Murley <vicki@apple.com>
3323 - Fix Tiger build failure. Rename constant "S" to "WHITESPACE",
3324 and change all instances of S to WHITESPACE.
3326 * khtml/css/cssparser.cpp:
3327 (DOM::CSSParser::lex): S to WHITESPACE
3328 * khtml/css/parser.cpp: regenerated file
3329 * khtml/css/parser.h: regenerated file
3330 * khtml/css/parser.y: S to WHITESPACE
3331 * khtml/css/tokenizer.cpp: regenerated file
3332 * khtml/css/tokenizer.flex: S to WHITESPACE
3334 2004-05-27 John Louch <set EMAIL_ADDRESS environment variable>
3336 Reviewed by NOBODY (OOPS!).
3338 * khtml/ecma/kjs_html.cpp:
3339 (KJS::Context2DFunction::tryCall):
3340 * khtml/ecma/kjs_html.h:
3342 * khtml/ecma/kjs_html.lut.h:
3345 2004-05-27 Trey Matteson <trey@apple.com>
3347 First cut at DHTML dragging, destination side. Dragging text, files
3348 and URLs onto elements works. Type conversion from NSPasteboard to
3349 MIME types is hardwired. No JS access yet to modifier keys, or
3350 drag operations mask.
3352 Per IE's dragging API, we have the new DOM events ondragenter,
3353 ondragover, ondragleave and ondrop.