1 2004-07-20 David Hyatt <hyatt@apple.com>
3 Fix for 3714434, user stylesheet is always parsed in strict mode, when it should honor the document's setting.
7 * khtml/css/cssstyleselector.cpp:
8 (khtml::CSSStyleSelector::CSSStyleSelector):
10 2004-07-20 Ken Kocienda <kocienda@apple.com>
14 * khtml/xml/dom_elementimpl.cpp:
15 (ElementImpl::defaultEventHandler): No longer check whether
16 the command key is modifying the key event. This check is
17 now done elsewhere in the code. See the WebKit checkin that
18 added the _web_keyBindingManagerHasBinding method to
21 2004-07-20 Chris Blumenberg <cblu@apple.com>
24 <rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
25 <rdar://problem/3612691> Missing image icons (blue ?) lack context menu
29 * kwq/WebCoreBridge.mm:
30 (-[WebCoreBridge elementAtPoint:]): if there is no image, put the image URL on the element anyway
32 2004-07-20 David Hyatt <hyatt@apple.com>
34 Fix for alt text not working on images.
38 * khtml/rendering/render_image.cpp:
39 (RenderImage::RenderImage):
40 (RenderImage::setPixmap):
42 (RenderImage::calcReplacedWidth):
43 (RenderImage::calcReplacedHeight):
45 2004-07-20 Maciej Stachowiak <mjs@apple.com>
49 <rdar://problem/3720111> REGRESSION(125-152): map fails to load depending on banner ad; weather.com (works in IE and Firefox)
51 * khtml/html/htmltokenizer.cpp:
52 (khtml::HTMLTokenizer::begin): Initialize currentPrependingSrc.
53 (khtml::HTMLTokenizer::scriptHandler): Store a pointer to the currently
54 active prependingSrc variable on the stack, the better to handle weird cases
55 of scripts writing out additional script tags and so forth.
56 (khtml::HTMLTokenizer::write): Deal with the above.
57 * khtml/html/htmltokenizer.h: Declare new member field.
59 2004-07-20 David Hyatt <hyatt@apple.com>
61 Fix for layer positioning error that occurs when absolute positioned blocks are inside static positioned overflow:auto
66 * khtml/rendering/render_layer.cpp:
67 (RenderLayer::updateLayerPosition):
69 2004-07-20 Trey Matteson <trey@apple.com>
71 3705624 REGRESSION: can't rearrange photos on homepage.mac.com album
73 A subtle problem stemming from some interaction between focus handing and
74 event propagation. We previously made it so when a focus shift fails we
75 don't propagate the event to KHTML. The fix is to get rid of the inverse
76 effect, so now even if a focus shift succeeds, we don't propagate to KHTML if
77 the page already canceled default behavior.
79 In this specific case, the page is cancelling default behavior since it
80 does its own dragging, and the bug was our new system dragging was
85 * khtml/khtmlview.cpp:
86 (KHTMLView::dispatchMouseEvent): What he said.
88 2004-07-20 Ken Kocienda <kocienda@apple.com>
94 <rdar://problem/3695240> pasting plain text with newlines in it turns them into spaces
96 * kwq/WebCoreBridge.mm:
97 (-[WebCoreBridge documentFragmentWithText:]): Refine this function to be smart about converting
98 line endings into BR elements.
100 2004-07-20 Ken Kocienda <kocienda@apple.com>
106 <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
108 * khtml/khtml_part.cpp:
109 (KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
110 on the caret, this seems like a better name.
111 * khtml/khtml_part.h:
112 * khtml/khtmlview.cpp:
113 (KHTMLView::focusInEvent): Call setCaretVisible(true)
114 (KHTMLView::focusOutEvent): Call setCaretVisible(false)
115 * kwq/KWQKHTMLPart.mm:
116 (KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
117 * kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
118 * kwq/WebCoreBridge.mm:
119 (-[WebCoreBridge setCaretVisible:]): Ditto.
121 2004-07-19 Maciej Stachowiak <mjs@apple.com>
125 <rdar://problem/3721428> REGRESSION (125.8-146): external javascript statements produce extra garbage character (sina.com)
127 * khtml/misc/stringit.h:
128 (khtml::TokenizerSubstring::TokenizerSubstring): For the apple branch, use the new
129 stableUnicode() method to get the unicode pointer.
132 (QString::detachIfInternal): Reorganize this to be a bit less wacky about refcounts.
133 It does not leave around a zombie internal data handle but rather destroys it right away,
134 and leaves the object pointing to the new handle (which it can then deref). This makes
136 (QString::~QString): Simplify.
137 (QString::stableUnicode): New method that detaches a copy of the KWQStringData if it
138 is internal to a string besides this one. This guarantees that if you get the unicode()
139 pointer, it won't go bad so long as this string is still alive.
141 2004-07-19 David Hyatt <hyatt@apple.com>
143 Fix for 3715117, crash from a bug in removeChildren. Clean up node removal and fix an n-squared removal
144 bug. Also clean up checks in removeChild and in the dispatch of removedFromDocument mutation events to
145 make node removal more efficient.
149 * khtml/xml/dom_nodeimpl.cpp:
151 2004-07-19 John Sullivan <sullivan@apple.com>
155 - fixed <rdar://problem/3141150> can't undo in form textarea fields
157 * kwq/KWQTextArea.mm:
158 (-[KWQTextArea _createTextView]):
159 call setAllowsUndo:YES. My, wasn't this easy?
161 2004-07-19 David Hyatt <hyatt@apple.com>
163 Merge @import fix for CSS1 test suite from Stephan Kulow.
167 * khtml/css/parser.cpp:
168 * khtml/css/parser.y:
169 * layout-tests/css1/basic/containment-expected.txt:
171 2004-07-19 David Hyatt <hyatt@apple.com>
173 Fix for 3718697, crash clicking on JS tab at alaskaair.com.
177 * khtml/rendering/render_flow.cpp:
178 (RenderFlow::detach):
179 (RenderFlow::dirtyLinesFromChangedChild):
180 * khtml/rendering/render_flow.h:
181 * khtml/rendering/render_object.cpp:
182 (RenderObject::dirtyLinesFromChangedChild):
183 * khtml/rendering/render_object.h:
185 2004-07-16 David Hyatt <hyatt@apple.com>
187 Fix for 3726471, need to ensure that it's safe to do updateRendering from within layout, since isContentEditable
188 relies on it. The fix is to just recalcStyle up front before beginning the layout, so that all of our renderobjects
193 * khtml/khtmlview.cpp:
196 2004-07-16 Ken Kocienda <kocienda@apple.com>
202 <rdar://problem/3722153> Random crash while typing (DOM::NodeImpl::parentNode (this=0x0))
204 * khtml/editing/htmlediting_impl.cpp:
205 (khtml::DeleteSelectionCommandImpl::doApply): This check merely makes the code
206 more robust. I do not understand how Grant ended up with null start or end
207 blocks in the case of his bug report, but by adding two null checks, the code is
208 now hardened a bit in case it happens again.
210 2004-07-16 Ken Kocienda <kocienda@apple.com>
216 <rdar://problem/3730785> Crash when arrow navigation goes to empty table cell
217 <rdar://problem/3730790> Caret does not blink when placed in empty table cell
219 * khtml/rendering/render_block.cpp:
220 (khtml::RenderBlock::paintObject): Caret node's renderer might be this block, so
221 don't block the painting of the caret in this case. This was the case in 3730790.
222 We had the right geometry for the caret but blocked its painting.
223 * khtml/xml/dom_position.cpp:
224 (DOM::Position::previousLinePosition): Rework the logic here. This function asserted
225 that the new position we would navigate to had a line box, but empty table cells, for
226 instance will not. So, deal with this situation as well. The end result is a
227 function that worked like it did before in cases where the previous line position has
228 a line box, but now also will allow navigation to work when it does not.
229 (DOM::Position::nextLinePosition): Ditto.
231 2004-07-16 Ken Kocienda <kocienda@apple.com>
237 <rdar://problem/3687216> editable inline causes crash when focused
239 * khtml/xml/dom_docimpl.cpp:
240 (DocumentImpl::relinquishesEditingFocus): Add null check for rootEditableElement.
241 (DocumentImpl::acceptsEditingFocus): Ditto.
243 2004-07-16 David Hyatt <hyatt@apple.com>
245 Fix for 3709337, crash when using display: compact. Need to make sure that the isCompact() check in bidi.cpp is
246 also checking for RenderBlocks, since otherwise you match text nodes (and that's just wrong).
250 * khtml/rendering/bidi.cpp:
251 (khtml::RenderBlock::layoutInlineChildren):
255 2004-07-15 David Hyatt <hyatt@apple.com>
257 Fix for 3625611, images offset on first visit to page. The method for determining the last clean line was
258 flawed and would incorrectly miss dirty lines that occurred after the first clean line.
262 * khtml/rendering/bidi.cpp:
263 (khtml::RenderBlock::determineEndPosition):
265 2004-07-15 Ken Kocienda <kocienda@apple.com>
270 <rdar://problem/3587601> reproducible assertion failure in Blot deleting text, then image at Yahoo.com
272 * khtml/editing/htmlediting_impl.cpp:
273 (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Relax assertion
274 that nodes are text nodes during the walk of eligible nodes that could possibly be
275 deleted. Change the assertion to an conditional check for text nodes. We may have
276 unrendered nodes in the mix here (as is the case in the bug where the assertion
277 failed on an AREA element), and the conditional check is sufficient to
278 skip them while leaving the delete logic we want unperturbed.
280 2004-07-14 Ken Kocienda <kocienda@apple.com>
284 * khtml/rendering/render_block.cpp:
285 (khtml::RenderBlock::paintObject): Add null check on DOM node before
286 asking if it is contentEditable.
288 2004-07-14 David Hyatt <hyatt@apple.com>
290 Fix for 3595073, setting innerHTML on a <table> should work.
294 * khtml/html/html_elementimpl.cpp:
295 (HTMLElementImpl::createContextualFragment):
297 2004-07-14 Ken Kocienda <kocienda@apple.com>
301 Updated these layout tests as a result of the last patch.
302 These results are better.
304 * layout-tests/editing/execCommand/selectAll-expected.txt
305 * layout-tests/editing/selection/extend-by-character-006-expected.txt
306 * layout-tests/editing/selection/unrendered-001-expected.txt
307 * layout-tests/editing/selection/unrendered-003-expected.txt
309 2004-07-14 Ken Kocienda <kocienda@apple.com>
313 * khtml/rendering/render_block.cpp:
314 (khtml::RenderBlock::paintObject): Change back to start() from caretPosition().
315 Since the policy is now to move the selection to rendered content, if possible,
316 when the selection is set, there is no longer any reason to have the additional
317 caretPosition() function to store where the caret should be drawn.
318 * khtml/xml/dom_docimpl.cpp:
319 (DocumentImpl::updateSelection): No longer any need to call closestRenderedPosition here.
320 This is done in Selection::validate.
321 * khtml/xml/dom_position.cpp:
322 (DOM::Position::closestRenderedPosition): Improved algorithm. Now much simpler.
323 * khtml/xml/dom_selection.cpp:
324 (DOM::Selection::Selection): caretPosition() and m_caretPosition now obsolete.
325 (DOM::Selection::init): Ditto.
326 (DOM::Selection::modifyExtendingRightForward): No longer any need to call
327 closestRenderedPosition here. This is done in Selection::validate.
328 (DOM::Selection::modifyMovingRightForward): Ditto.
329 (DOM::Selection::modifyExtendingLeftBackward): Ditto.
330 (DOM::Selection::modifyMovingLeftBackward): Ditto.
331 (DOM::Selection::layoutCaret): Ditto.
332 (DOM::Selection::validate): Add code to move the selection to rendered content if possible.
333 * khtml/xml/dom_selection.h: caretPosition() and m_caretPosition now obsolete.
335 2004-07-14 David Hyatt <hyatt@apple.com>
337 Fix for 3716082, assert when you dynamically remove float or position styles.
341 * khtml/rendering/render_object.cpp:
342 (RenderObject::setStyle):
344 2004-07-14 David Hyatt <hyatt@apple.com>
346 Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com) involving bungling of
351 * khtml/rendering/render_box.cpp:
352 (RenderBox::calcPercentageHeight):
353 (RenderBox::availableHeightUsing):
354 * khtml/rendering/render_table.cpp:
355 (RenderTable::layout):
356 (RenderTableSection::calcRowHeight):
357 (RenderTableSection::layoutRows):
358 (RenderTableCell::updateFromElement):
359 * khtml/rendering/render_table.h:
361 2004-07-14 Ken Kocienda <kocienda@apple.com>
365 * khtml/xml/dom_position.cpp:
366 (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
367 Soon, I plan to land some changes that use this new function.
368 * khtml/xml/dom_position.h:
370 2004-07-14 Ken Kocienda <kocienda@apple.com>
374 * WebCore-combined.exp: Added QString.at symbol to tests exports to facilitate debugging
375 data formatting change that is to come.
378 2004-07-13 John Sullivan <sullivan@apple.com>
382 - fixed <rdar://problem/3705500> REGRESSION (125.8-146): Cmd-E on an
383 HTML page puts a trailing space on Find pasteboard
385 * khtml/misc/khtml_text_operations.cpp:
386 (khtml::TextIterator::handleTextBox):
387 In the case where a subrun doesn't extend to the end of the text box,
388 the well-commented code was supposed to return from this routine, but
389 the wrong variable was being compared. This would send us through another
390 pass of the loop, which would end up worrying about collapsed space at the
391 end of the current box, even though we only cared about the beginning of the
394 2004-07-12 Richard Williamson <rjw@apple.com>
396 Fixed 3717982. Implemented navigator.language!
400 * khtml/ecma/kjs_navigator.cpp:
401 (Navigator::getValueProperty):
403 2004-07-12 Ken Kocienda <kocienda@apple.com>
407 * khtml/xml/dom_position.cpp:
408 (DOM::Position::inRenderedContent): I broke selection drawing with my last patch. This
409 function is now used in selection drawing, and it was making an unneeded check to see
410 that content was editable to answer whether or not is was rendered. Bad. Fixed.
412 2004-07-12 David Hyatt <hyatt@apple.com>
414 Fix for 3621138, crash on hrweb.apple.com. Make sure that in the case where objects get pulled up from merging
415 blocks that we just delete all line boxes.
419 * khtml/rendering/render_block.cpp:
420 (khtml::RenderBlock::removeChild):
422 2004-07-10 Maciej Stachowiak <mjs@apple.com>
426 <rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
427 <rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)
431 (CGColorFromNSColor):
432 (QPainter::drawEllipse):
433 (QPainter::setShadow):
435 2004-07-12 Ken Kocienda <kocienda@apple.com>
439 Added new editing-related layout tests
441 * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
442 * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
443 * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
444 * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
445 * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
446 * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
447 * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
448 * layout-tests/editing/selection/unrendered-001.html: Added.
449 * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
450 * layout-tests/editing/selection/unrendered-002.html: Added.
451 * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
452 * layout-tests/editing/selection/unrendered-003.html: Added.
453 * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
454 * layout-tests/editing/selection/unrendered-004.html: Added.
455 * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
456 * layout-tests/editing/selection/unrendered-005.html: Added.
457 * layout-tests/traversal/node-iterator-008-expected.txt: Added.
458 * layout-tests/traversal/node-iterator-008.html: Added.
459 * layout-tests/traversal/tree-walker-005-expected.txt: Added.
460 * layout-tests/traversal/tree-walker-005.html: Added.
462 2004-07-12 Ken Kocienda <kocienda@apple.com>
466 Fixes for these bugs:
468 <rdar://problem/3723359> Extending then "unextending" selection with arrow keys should draw caret but doesn't
469 <rdar://problem/3724626> White-space deletion code deletes wrong character when space follows span
471 * khtml/editing/htmlediting_impl.cpp:
472 (khtml::DeleteSelectionCommandImpl::doApply): Modify special-case white-space deletion code so it runs
473 only in the special case. It was throwing its net too widely, catching the case described in 3724626.
474 By tightening up the special-case white-space deletion, and allowing the more general-purpose code to run,
476 * khtml/xml/dom_docimpl.cpp:
477 (DocumentImpl::updateSelection): Use recently-added closestRenderedPosition helper in Position class
478 to figure out the start and end positions for selection drawing.
479 * khtml/xml/dom_position.cpp:
480 (DOM::Position::equivalentUpstreamPosition): Added code to handle white-space that causes line breaks.
481 (DOM::Position::equivalentDownstreamPosition): Ditto.
482 (DOM::Position::closestRenderedPosition): Trap empty selections at function entry, return *this.
483 (DOM::Position::isFirstRenderedPositionOnLine): Can't be first rendered position on line if not rendered.
485 (DOM::Position::isLastRenderedPositionOnLine): Ditto, but s/first/last/
486 * khtml/xml/dom_selection.cpp:
487 (DOM::Selection::validate): A selection is in caret state if the start and end are equal *or* equivalent.
488 The equivalence case is new, and fixes 3723359.
490 2004-07-09 Kevin Decker <kdecker@apple.com>
494 fixes the width:auto problem in
495 <rdar://problem/3698344> REGRESSION (143?-144): macrumors.com tabs are compressed and illegible
497 * khtml/css/cssstyleselector.cpp:
498 (khtml::CSSStyleSelector::applyProperty):
500 2004-07-09 Ken Kocienda <kocienda@apple.com>
504 Updated some layout test results.
506 * layout-tests/editing/deleting/delete-image-004-expected.txt:
507 * layout-tests/editing/selection/extend-by-character-006-expected.txt:
510 2004-07-09 Chris Blumenberg <cblu@apple.com>
512 Allowed my change for 3715785 to compile on Jaguar.
514 Reviewed by kocienda.
516 * kwq/WebCoreBridge.h:
517 * kwq/WebCoreBridge.mm:
518 (-[WebCoreBridge domain]): new, allows access to the domain without using the DOM API which doesn't exist on Jaguar
520 2004-07-09 Ken Kocienda <kocienda@apple.com>
524 Some improvements to fix:
526 <rdar://problem/3723111> Caret not drawn when selection set to unrendered content
528 * khtml/editing/htmlediting_impl.cpp:
529 (khtml::TypingCommandImpl::issueCommandForDeleteKey): Adjust selection to delete if
530 selected position is not rendered.
531 * khtml/rendering/render_block.cpp:
532 (khtml::RenderBlock::paintObject): Use new caretPosition() function on Selection to
533 figure out whether to paint.
534 * khtml/xml/dom_position.cpp:
535 (DOM::Position::previousCharacterPosition): Now correctly deals with a start
536 position that is not rendered.
537 (DOM::Position::nextCharacterPosition): Ditto.
538 (DOM::Position::closestRenderedPosition): New helper.
539 * khtml/xml/dom_position.h:
540 (DOM::): Moved in EAffinity from Selection header. Now used in closestRenderedPosition function.
541 * khtml/xml/dom_selection.cpp:
542 (DOM::Selection::Selection): Added new m_caretPosition member. This is the position of the caret
543 after a caret layout. This may be different from start or end if start and end are not rendered.
544 (DOM::Selection::init):
545 (DOM::Selection::modifyExtendingRightForward): New helper to clean up modify() and make it more readble.
546 (DOM::Selection::modifyMovingRightForward): Ditto.
547 (DOM::Selection::modifyExtendingLeftBackward): Ditto.
548 (DOM::Selection::modifyMovingLeftBackward): Ditto.
549 (DOM::Selection::modify): Use new helpers to make this more readble.
550 (DOM::Selection::layoutCaret): Uses new closestRenderedPosition helper to place the caret if in unrendered
552 (DOM::Selection::paintCaret): Remove moveToRenderedContent. obsolete.
553 * khtml/xml/dom_selection.h:
554 (DOM::Selection::caretPosition): New accessor.
555 * kwq/WebCoreBridge.mm:
556 (-[WebCoreBridge setSelectedDOMRange:affinity:]): EAffinity no longer a member enum of Selection class.
558 2004-07-08 David Hyatt <hyatt@apple.com>
560 Fix for the table layout test that failed because of a change in how innerText worked. We need to do
561 updateLayout now when using innerText, since the method has been changed to use line boxes in the render tree
562 that might otherwise be out of date.
566 * khtml/html/html_elementimpl.cpp:
567 (HTMLElementImpl::innerText):
569 2004-07-08 John Sullivan <sullivan@apple.com>
573 - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
574 now also extends selection (even if there wasn't one before)
576 * khtml/khtml_part.cpp:
577 (KHTMLPart::handleMousePressEventSingleClick):
578 if there's a URL associated with the event, don't extend the selection
580 2004-07-08 Ken Kocienda <kocienda@apple.com>
584 Added some helper functions which provide strings to display in the
585 Xcode debugger's variable inspector window. These functions are called
586 from the LabyrinthDataFormatter debugger plugin I just checked in to
587 the Labyrinth/Tools directory.
589 Note that these functions are compiled in on Development builds only.
591 * WebCore-combined.exp:
592 * WebCore-tests.exp: Export all the formatForDebugger symbols so the
593 debugger program can link with them.
594 * khtml/xml/dom2_rangeimpl.cpp:
595 (DOM::RangeImpl::formatForDebugger):
596 * khtml/xml/dom2_rangeimpl.h:
597 * khtml/xml/dom_elementimpl.cpp:
598 (ElementImpl::formatForDebugger):
599 * khtml/xml/dom_elementimpl.h:
600 * khtml/xml/dom_nodeimpl.cpp:
601 * khtml/xml/dom_nodeimpl.h:
602 * khtml/xml/dom_position.cpp:
603 (DOM::Position::formatForDebugger):
604 * khtml/xml/dom_position.h:
605 * khtml/xml/dom_selection.cpp:
606 (DOM::Selection::formatForDebugger):
607 * khtml/xml/dom_selection.h:
608 * khtml/xml/dom_textimpl.cpp:
609 (TextImpl::formatForDebugger):
610 * khtml/xml/dom_textimpl.h:
612 2004-07-08 John Sullivan <sullivan@apple.com>
616 - fixed <rdar://problem/3721544> crash increasing font size;
617 entrezeroetun.com (works in IE and Firefox)
619 * khtml/rendering/render_block.cpp:
620 (khtml::RenderBlock::updateFirstLetter):
621 Check for nil originalString() before dereffing
623 2004-07-08 David Hyatt <hyatt@apple.com>
625 Fix for 3721453, CSS3 initial property caused crashes because the macros were not written correctly.
629 * khtml/css/cssstyleselector.cpp:
633 2004-07-07 David Hyatt <hyatt@apple.com>
635 Fix for 3712133, crash from first-line pseudo-style use.
639 * khtml/css/cssstyleselector.cpp:
640 (khtml::CSSStyleSelector::styleForElement):
641 * khtml/css/cssstyleselector.h:
642 * khtml/rendering/render_object.cpp:
643 (RenderObject::getPseudoStyle):
645 2004-07-07 Ken Kocienda <kocienda@apple.com>
651 <rdar://problem/3716479> calling setInnerHTML during a webViewDidChange delegate call causes a crash
653 The fix involves some rearrangement of code in TypingCommand and TypingCommandImpl.
654 Formerly, new TypingCommands would apply themselves (which was a no-op) and then
655 do their action in some code a way different than other commands. This type of command
656 application is different than for all other commands since TypingCommands can be coalesced.
657 The crash occurred as a result of the "no-op" TypingCommand having the unconsidered
658 consequence of causing editing delegate notifications to be sent before the command
659 has actually run. This change takes a small step towards making TypingCommandImpl function like
660 other commands, where the command work is done in doApply. This makes the notification
661 happen in the right order.
663 * khtml/editing/htmlediting.cpp:
664 (khtml::TypingCommand::TypingCommand):
665 (khtml::TypingCommand::insertText):
666 (khtml::TypingCommand::insertNewline):
667 (khtml::TypingCommand::deleteKeyPressed):
668 * khtml/editing/htmlediting.h:
669 (khtml::TypingCommand::):
670 * khtml/editing/htmlediting_impl.cpp:
671 (khtml::TypingCommandImpl::TypingCommandImpl):
672 (khtml::TypingCommandImpl::doApply):
673 * khtml/editing/htmlediting_impl.h:
675 2004-07-06 Ken Kocienda <kocienda@apple.com>
679 * khtml/html/html_tableimpl.cpp:
680 (HTMLTableElementImpl::addChild): Added a better comment in the
681 code I just checked in a few minutes ago.
683 2004-07-06 Ken Kocienda <kocienda@apple.com>
689 <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
690 due to non-0 exception code trying to insert a DIV markup string
692 The solution was to revert to the code that was rolled out, and removing
693 the child checks from NodeImpl::checkAddChild. However, this time, I added
694 code very similar to this check into the code that runs while HTML is
695 being parsed to build up tables. This code relies on child-add failure
696 to ensure the proper construction of well-formed tables (as gross as that
697 sounds), so the check needs to be retained there. No other code seems to
698 be so affected. Layout tests are unchanged by this patch.
700 * khtml/html/html_tableimpl.cpp:
701 (HTMLTableElementImpl::addChild):
702 * khtml/xml/dom_nodeimpl.cpp:
703 (NodeImpl::checkAddChild):
705 2004-07-06 Ken Kocienda <kocienda@apple.com>
709 Simple change. I switched the arguments of the appendNode helper function
710 and the AppendNodeCommand and AppendNodeCommandImpl classes. The node to
711 insert now comes before the parent node in the argument list. I did this
712 to make this function match the convention of others in the HTML editing code.
713 This was the only one that was "different" in the way that it ordered arguments.
714 As a result, I was always looking to see that I was passing things in the right
717 * khtml/editing/htmlediting.cpp:
718 (khtml::AppendNodeCommand::AppendNodeCommand):
719 (khtml::AppendNodeCommand::appendChild):
720 (khtml::AppendNodeCommand::parentNode):
721 * khtml/editing/htmlediting.h:
722 * khtml/editing/htmlediting_impl.cpp:
723 (khtml::CompositeEditCommandImpl::insertNodeAfter):
724 (khtml::CompositeEditCommandImpl::insertNodeAt):
725 (khtml::CompositeEditCommandImpl::appendNode):
726 (khtml::AppendNodeCommandImpl::AppendNodeCommandImpl):
727 (khtml::AppendNodeCommandImpl::~AppendNodeCommandImpl):
728 (khtml::AppendNodeCommandImpl::doApply):
729 (khtml::AppendNodeCommandImpl::doUnapply):
730 (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
731 (khtml::DeleteSelectionCommandImpl::doApply):
732 (khtml::InputNewlineCommandImpl::insertNodeAfterPosition):
733 (khtml::InputNewlineCommandImpl::insertNodeBeforePosition):
734 (khtml::InputTextCommandImpl::prepareForTextInsertion):
735 * khtml/editing/htmlediting_impl.h:
736 (khtml::AppendNodeCommandImpl::parentNode):
738 2004-07-06 Ken Kocienda <kocienda@apple.com>
742 Fixed several problems with traversal classes. For one, NodeIterators treat
743 FILTER_REJECT and FILTER_SKIP the same, since it treats the DOM tree as a
744 flat collection of nodes free of hierarchy. The code before this change did
745 not do this correctly. It sure pays to go back and read the specs. :)
747 Also, the code to traverse from node to node when filters were applied was
748 not working correctly. My first attemmpt to implement this was just plain
749 buggy, as I discovered when I tried to write tests for my WWDC talk. I have
750 settled on an implementation which is much simpler and worked for all the
753 * khtml/xml/dom2_traversalimpl.cpp:
754 (DOM::NodeIteratorImpl::findNextNode):
755 (DOM::NodeIteratorImpl::nextNode):
756 (DOM::NodeIteratorImpl::findPreviousNode):
757 (DOM::NodeIteratorImpl::previousNode):
758 (DOM::TreeWalkerImpl::parentNode):
759 (DOM::TreeWalkerImpl::firstChild):
760 (DOM::TreeWalkerImpl::lastChild):
761 (DOM::TreeWalkerImpl::previousSibling):
762 (DOM::TreeWalkerImpl::nextSibling):
763 (DOM::TreeWalkerImpl::previousNode):
764 (DOM::TreeWalkerImpl::nextNode):
765 (DOM::TreeWalkerImpl::ancestorRejected):
766 * khtml/xml/dom2_traversalimpl.h:
768 2004-07-06 Vicki Murley <vicki@apple.com>
770 Reviewed by kocienda.
772 - added backColorCommand, foreColorCommand, fontNameCommand,
775 * layout-tests/editing/editing.js:
777 2004-07-06 Trey Matteson <trey@apple.com>
779 3716053 - www.theage.com.au has extra back/forward items due to ads
781 This turned out to be easily fixed by generalizing the fix to 3438441. We prevent
782 addition to the b/f list not just during an onload event, but during any non-user
783 gesture, which includes top level script executing.
787 * kwq/KWQKHTMLPart.mm:
788 (KWQKHTMLPart::openURL): Only real change - prevent adding to b/f list if not
790 (KWQKHTMLPart::openURLRequest): Rename "onLoadEvent" to "userGesture", swap sense
791 (KWQKHTMLPart::submitForm): Ditto
792 (KWQKHTMLPart::urlSelected): Ditto
793 * kwq/KWQKHTMLPartBrowserExtension.mm:
794 (KHTMLPartBrowserExtension::createNewWindow): Ditto
795 * kwq/WebCoreBridge.h:
797 2004-07-02 Darin Adler <darin@apple.com>
801 - fixed half of <rdar://problem/3709244> utf-8 meta tag not parsed when page title contains angle brackets or if </meta> tag used
803 * khtml/misc/decoder.cpp: (Decoder::decode): Allow </meta> tags without deciding we
804 are done with the header.
806 2004-06-30 Trey Matteson <trey@apple.com>
808 Dragging within a web view should be allowed to start when the window isn't key.
810 A few months ago, Chris made this work, but it relied on the fact that all dragging
811 was done in WebKit. When WebCore got involved in dragging, it was broken. Now we
812 have a new scheme that gets it working again that properly involves WebCore.
814 The general idea is that when AK asks us whether to accept the first mouse and do
815 "delayed window ordering", we must consult WC to see if we might start a drag. In
816 addition, instead of these drags in non-active windows being started as a special
817 case in WK, they go through the normal WK-WC drag machinery.
821 * khtml/khtml_part.cpp:
822 (KHTMLPart::shouldDragAutoNode): New x,y args.
823 * khtml/khtml_part.h:
824 * khtml/rendering/render_object.cpp:
825 (RenderObject::draggableNode): Pass through new x,y args.
826 * khtml/rendering/render_object.h:
827 * kwq/KWQKHTMLPart.h:
828 (KWQKHTMLPart::setActivationEventNumber): New setter.
829 * kwq/KWQKHTMLPart.mm:
830 (KWQKHTMLPart::KWQKHTMLPart): Init new ivar.
831 (KWQKHTMLPart::eventMayStartDrag): New routine that checks if we might start
832 a drag in response to a mouseDown.
833 (KWQKHTMLPart::khtmlMouseMoveEvent): Pass x,y to the routine that finds a draggable
834 node. This eventually gets back up to WK's _mayStartDragAtEventLocation:.
835 Delay requirement when dragging the selection now implemented here.
836 (KWQKHTMLPart::khtmlMouseReleaseEvent): Must avoid changing the selection if we
837 wind up here as part of the first click in a window (because we started handling
838 the click to possible start a drag, but that never came through).
839 (KWQKHTMLPart::mouseDown): Save away event timestamp.
840 (KWQKHTMLPart::shouldDragAutoNode): Pass location up to WK instead of the
841 most recent event we stashed.
842 * kwq/WebCoreBridge.h:
843 * kwq/WebCoreBridge.mm:
844 (-[WebCoreBridge setActivationEventNumber:]): Trivial glue.
845 (-[WebCoreBridge eventMayStartDrag:]): Ditto.
847 2004-06-29 Trey Matteson <trey@apple.com>
849 Need to tighten up JS error checking for requesting drag props
854 * khtml/ecma/kjs_events.cpp:
855 (Clipboard::getValueProperty): Assert if someone somehow set
856 dropEffect or effectAllowed and it's a copy/paste clipboard
857 instead of a dragging clipboard.
858 (Clipboard::putValue): Don't let anyone set dropEffect or
859 effectAllowed on a copy/paste clipboard.
860 (ClipboardProtoFunc::tryCall): Disallow setting dragImage on
861 a copy/paste clipboard.
863 2004-06-29 Trey Matteson <trey@apple.com>
865 DHTML dragging - source should have access to the operation chosen
870 * kwq/KWQKHTMLPart.h:
871 * kwq/KWQKHTMLPart.mm:
872 (KWQKHTMLPart::dragSourceEndedAt): Set the destination's operation
874 * kwq/WebCoreBridge.mm:
875 (-[WebCoreBridge dragExitedWithDraggingInfo:]): For completeness
876 we set the source op for the ondragexit event.
877 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto for the
879 (-[WebCoreBridge dragSourceEndedAt:operation:]): Pass through of operation.
881 2004-06-24 Trey Matteson <trey@apple.com>
883 3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about://blank
885 Simple fix - don't try to send the event to the body element if we have no body element.
889 * kwq/KWQKHTMLPart.mm:
890 (KWQKHTMLPart::dispatchCPPEvent):
892 2004-06-24 Trey Matteson <trey@apple.com>
894 3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript
896 When we generate a drag image (or a selection image too, for that matter) we
897 translate the CTM using a CG call. Later, WebImageRenderer adjusts the pattern
898 phase based on the CTM of the focused view, which doesn't include our translate.
899 So we must inform WebKit about the additional phase adjustment.
903 * kwq/KWQKHTMLPart.mm: Tell WebKit about the phase adjustment.
904 (KWQKHTMLPart::imageFromRect):
905 * kwq/WebCoreGraphicsBridge.h:
906 * kwq/WebCoreGraphicsBridge.m:
907 (-[WebCoreGraphicsBridge setAdditionalPatternPhase:]): New routine to receive
908 the phase adjustment.
910 2004-06-24 Trey Matteson <trey@apple.com>
912 3679986 - screenX and screenY are flipped and relative to the bottom left of the WebView, rather than the screen
913 3699510 - synthesized click events have bogus screen coords
917 * khtml/khtmlview.cpp:
918 (KHTMLView::dispatchDragEvent): Generate screen coords for drag events using new func.
919 (KHTMLView::dispatchMouseEvent): Ditto.
921 * khtml/xml/dom_nodeimpl.cpp:
922 (NodeImpl::dispatchMouseEvent): Comment tricky semantics.
923 Calc screen coords in apple-specific way.
924 * kwq/KWQKHTMLView.mm:
925 (KHTMLView::viewportToGlobal): Passthrough to window widget.
926 * kwq/KWQScrollView.mm:
927 * kwq/KWQWindowWidget.h:
928 * kwq/KWQWindowWidget.mm:
929 (KWQWindowWidget::mapToGlobal): Call former code factored to new method below.
930 (KWQWindowWidget::viewportToGlobal): New method to convert "viewport" (which for us
931 really means NSWindow coords) to screen coords.
933 2004-06-24 Trey Matteson <trey@apple.com>
935 3693420 - onbeforecut and onbeforepaste need real implementaion
939 * kwq/KWQKHTMLPart.h:
940 * kwq/KWQKHTMLPart.mm:
941 (KWQKHTMLPart::mayCut): Dispatch event to DHTML.
942 (KWQKHTMLPart::mayCopy): Ditto
943 (KWQKHTMLPart::mayPaste): Ditto
944 (KWQKHTMLPart::tryCut): No more need to send fake onbefore event
945 (KWQKHTMLPart::tryCopy): Ditto
946 (KWQKHTMLPart::tryPaste): Ditto
947 * kwq/WebCoreBridge.h:
948 * kwq/WebCoreBridge.mm:
949 (-[WebCoreBridge mayDHTMLCut]): Standard glue
950 (-[WebCoreBridge mayDHTMLCopy]): Ditto
951 (-[WebCoreBridge mayDHTMLPaste]): Ditto
953 2004-06-24 Darin Adler <darin@apple.com>
957 - fixed <rdar://problem/3709385> Find on page doesn't find a string at the very end of the file
959 * khtml/misc/khtml_text_operations.cpp: (khtml::findPlainText): Rearrange loop to avoid an early
960 exit once we have all the characters we need, but are at the end of the range we are searching.
962 - fixed <rdar://problem/3102271>: (text areas have scroll bars even when they don't need them)
963 - fixed <rdar://problem/3665430>: (horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode)
965 * kwq/KWQTextArea.mm:
966 (-[KWQTextArea _configureTextViewForWordWrapMode]): Added. Helper method that sets up the
967 view for a new word wrap mode.
968 (-[KWQTextArea _createTextView]): Moved much of the code inside _configureTextViewForWordWrapMode.
969 (-[KWQTextArea _frameSizeChanged]): Added. Method shared by setFrame: and initWithFrame: to
970 avoid duplicate code that was there before. The old code also had redundant code to update
971 the text container size, but NSText handles that automatically.
972 (-[KWQTextArea initWithFrame:]): Set wrap to YES by default, which is the key to fixing bug 3665430.
973 Call setAutohidesScrollers:YES, which fixes bug 3102271. Also call the new _frameSizeChanged method.
974 (-[KWQTextArea setWordWrap:]): Call _configureTextViewForWordWrapMode instead of trying
975 to do the work here. The old version did both too little and too much.
976 (-[KWQTextArea setFrame:]): Call _frameSizeChanged instead of trying to do the work here.
977 The old version did both too little and too much.
979 2004-06-24 John Sullivan <sullivan@apple.com>
981 Darin made this change on my machine; I reviewed it.
983 - fixed <rdar://problem/3698333> Find on page doesn't find a particular string
984 with a newline in the source
986 * khtml/misc/khtml_text_operations.cpp:
987 (khtml::TextIterator::handleTextBox):
988 Clear m_lastTextNodeEndedWithCollapsedSpace after taking it into account.
990 2004-06-23 Richard Williamson <rjw@apple.com>
992 Implemented changes for latest npruntime.h.
996 * kwq/KWQKHTMLPart.h:
997 * kwq/KWQKHTMLPart.mm:
998 (KWQKHTMLPart::KWQKHTMLPart):
999 (KWQKHTMLPart::windowScriptNPObject):
1000 (KWQKHTMLPart::getEmbedInstanceForView):
1001 * kwq/WebCoreBridge.h:
1002 * kwq/WebCoreBridge.mm:
1003 (-[WebCoreBridge windowScriptObject]):
1004 (-[WebCoreBridge windowScriptNPObject]):
1006 2004-06-22 Richard Williamson <rjw@apple.com>
1008 Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash
1010 embedInstance was uninitialized.
1014 * khtml/html/html_objectimpl.cpp:
1015 (HTMLEmbedElementImpl::HTMLEmbedElementImpl):
1017 2004-06-18 John Sullivan <sullivan@apple.com>
1021 - fixed <rdar://problem/3534851> Pop up windows not showing up within SAP's
1022 BW Module (changing location.href on new window created by window.open)
1024 * khtml/khtml_part.cpp:
1025 (KHTMLPart::scheduleRedirection):
1026 allow new redirect to win if delay <= current delay, not just <
1028 === WebCore-146.1 ===
1030 2004-06-18 Trey Matteson <trey@apple.com>
1032 3702053 - DHTML dragging destination can't control the cursor (by setting the drop operation)
1034 Fallout from security work, but an easy fix.
1038 * kwq/KWQClipboard.mm:
1039 (KWQClipboard::setDropEffect): Allow dest side to set dropEffect.
1041 2004-06-18 Darin Adler <darin@apple.com>
1045 - re-fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)
1047 * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
1048 Check !isInlineFlow rather than checking hasMarkupTruncation. Otherwise, we break
1049 plain old non-markup truncation.
1051 2004-06-18 Darin Adler <darin@apple.com>
1055 - fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)
1057 * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
1058 Only walk the ellipsis list if hasMarkupTruncation is true.
1062 2004-06-17 Richard Williamson <rjw@apple.com>
1064 Fixed <rdar://problem/3698867> setting the canvas or parent to display:none and updating the causes a nil-deref
1066 Ensured that we have a renderer before rendering.
1070 * khtml/ecma/kjs_html.cpp:
1071 (KJS::Context2DFunction::tryCall):
1073 2004-06-17 David Hyatt <hyatt@apple.com>
1075 Fix for 3674601, "Read More..." links should trail articles in Emerson.
1079 * khtml/rendering/bidi.cpp:
1080 (khtml::RenderBlock::layoutInlineChildren):
1081 (khtml::RenderBlock::deleteEllipsisLineBoxes):
1082 (khtml::RenderBlock::checkLinesForTextOverflow):
1083 * khtml/rendering/render_block.cpp:
1084 (khtml:::RenderFlow):
1085 (khtml::RenderBlock::paintEllipsisBoxes):
1086 (khtml::RenderBlock::nodeAtPoint):
1087 (khtml::shouldCheckLines):
1088 (khtml::getLineAtIndex):
1089 (khtml::getHeightForLineCount):
1090 (khtml::RenderBlock::lineAtIndex):
1091 (khtml::RenderBlock::lineCount):
1092 (khtml::RenderBlock::heightForLineCount):
1093 (khtml::RenderBlock::clearTruncation):
1094 * khtml/rendering/render_block.h:
1095 (khtml::RenderBlock::setHasMarkupTruncation):
1096 (khtml::RenderBlock::hasMarkupTruncation):
1097 * khtml/rendering/render_flexbox.cpp:
1098 (khtml::RenderFlexibleBox::layoutVerticalBox):
1099 * khtml/rendering/render_line.cpp:
1100 (khtml::EllipsisBox::m_str):
1101 (khtml::InlineBox::adjustPosition):
1102 (khtml::InlineFlowBox::adjustPosition):
1103 (khtml::InlineFlowBox::clearTruncation):
1104 (khtml::EllipsisBox::paint):
1105 (khtml::EllipsisBox::nodeAtPoint):
1106 (khtml::RootInlineBox::clearTruncation):
1107 (khtml::RootInlineBox::placeEllipsis):
1108 (khtml::RootInlineBox::paintEllipsisBox):
1109 (khtml::RootInlineBox::hitTestEllipsisBox):
1110 (khtml::RootInlineBox::adjustPosition):
1111 (khtml::RootInlineBox::childRemoved):
1112 * khtml/rendering/render_line.h:
1113 (khtml::InlineBox::clearTruncation):
1114 * khtml/rendering/render_text.cpp:
1115 * khtml/rendering/render_text.h:
1116 (khtml::InlineTextBox::clearTruncation):
1118 2004-06-17 Trey Matteson <trey@apple.com>
1120 3698514 - coordinates in ondragstart and ondrag events are wrong
1122 This part fixes the ondragstart coords. We salt away the window-based mouseDown
1123 location, since we need that when we dispatch the ondragstart event. Previously
1124 we were errantly using a mouseDown point that had already been converted to view
1125 coords, and then the dispatch converted it again.
1129 * kwq/KWQKHTMLPart.h:
1130 * kwq/KWQKHTMLPart.mm:
1131 (KWQKHTMLPart::khtmlMouseMoveEvent): Use window based mouse event coords to dispatch event.
1132 (KWQKHTMLPart::mouseDown): Save window based mouse event coords .
1134 2004-06-16 David Hyatt <hyatt@apple.com>
1136 Fix for 3596620, implement a subset of CSS3 text truncation for Emerson.
1140 * khtml/rendering/bidi.cpp:
1141 (khtml::RenderBlock::checkLinesForTextOverflow):
1142 * khtml/rendering/font.cpp:
1143 (Font::checkSelectionPoint):
1144 * khtml/rendering/font.h:
1145 * khtml/rendering/render_block.cpp:
1146 (khtml::RenderBlock::paintObject):
1147 (khtml::RenderBlock::paintFloats):
1148 (khtml::RenderBlock::paintEllipsisBoxes):
1149 * khtml/rendering/render_block.h:
1150 * khtml/rendering/render_line.cpp:
1151 (InlineBox::canAccommodateEllipsis):
1152 (InlineBox::placeEllipsisBox):
1153 (InlineFlowBox::paintDecorations):
1154 (InlineFlowBox::placeEllipsisBox):
1155 (EllipsisBox::paint):
1156 (RootInlineBox::placeEllipsis):
1157 (RootInlineBox::placeEllipsisBox):
1158 * khtml/rendering/render_line.h:
1159 (khtml::EllipsisBox::m_str):
1160 (khtml::RootInlineBox::ellipsisBox):
1161 * khtml/rendering/render_text.cpp:
1162 (InlineTextBox::placeEllipsisBox):
1163 (InlineTextBox::paintDecoration):
1164 (InlineTextBox::offsetForPosition):
1165 (RenderText::positionForCoordinates):
1166 (RenderText::paint):
1167 * khtml/rendering/render_text.h:
1168 * kwq/KWQFontMetrics.h:
1169 * kwq/KWQFontMetrics.mm:
1170 (QFontMetrics::checkSelectionPoint):
1171 * kwq/WebCoreTextRenderer.h:
1173 === WebCore-145.1 ===
1175 2004-06-16 Maciej Stachowiak <mjs@apple.com>
1179 <rdar://problem/3697602> REGRESSION (144.2-TOT) Selection highlight does not draw
1181 * khtml/rendering/render_canvas.cpp:
1182 (RenderCanvas::setSelection):
1186 2004-06-16 Richard Williamson <rjw@apple.com>
1188 Fixed 3695730: Added support for embeds[], much like
1189 applets[], to allow access to a plugin's exported interface.
1193 * khtml/dom/html_document.cpp:
1194 (HTMLDocument::embeds):
1195 * khtml/dom/html_document.h:
1196 * khtml/ecma/kjs_dom.cpp:
1197 (KJS::getRuntimeObject):
1198 * khtml/ecma/kjs_html.cpp:
1199 (KJS::HTMLDocument::tryGet):
1200 (KJS::HTMLElement::tryGet):
1201 (KJS::HTMLCollection::tryGet):
1202 (KJS::HTMLCollection::getNamedItems):
1203 * khtml/ecma/kjs_html.h:
1204 (KJS::HTMLDocument::):
1205 * khtml/ecma/kjs_html.lut.h:
1207 * khtml/html/html_miscimpl.cpp:
1208 (HTMLCollectionImpl::calcLength):
1209 (HTMLCollectionImpl::getItem):
1210 (HTMLCollectionImpl::getNamedItem):
1211 * khtml/html/html_miscimpl.h:
1212 (DOM::HTMLCollectionImpl::):
1213 * khtml/html/html_objectimpl.cpp:
1214 (HTMLEmbedElementImpl::getEmbedInstance):
1215 * khtml/html/html_objectimpl.h:
1216 * kwq/KWQKHTMLPart.h:
1217 * kwq/KWQKHTMLPart.mm:
1218 (KWQKHTMLPart::getEmbedInstanceForView):
1220 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1224 <rdar://problem/3695907>: (can't enable selection inside parent where it is disabled via CSS)
1226 * khtml/css/cssparser.cpp:
1227 (CSSParser::parseValue):
1228 * khtml/css/cssstyleselector.cpp:
1229 (khtml::CSSStyleSelector::applyProperty):
1230 * khtml/rendering/render_object.cpp:
1231 (RenderObject::shouldSelect):
1232 * khtml/rendering/render_style.h:
1234 (khtml::RenderStyle::userSelect):
1235 (khtml::RenderStyle::setUserSelect):
1236 (khtml::RenderStyle::initialUserSelect):
1238 2004-06-15 David Hyatt <hyatt@apple.com>
1240 Initial impl of the EllipsisBox. This code just gets the box created and gets it placed vertically. The next
1241 stage will be to position the box horizontally as well.
1245 * khtml/rendering/bidi.cpp:
1246 (khtml::RenderBlock::checkLinesForTextOverflow):
1247 * khtml/rendering/render_line.cpp:
1248 (RootInlineBox::placeEllipsis):
1249 * khtml/rendering/render_line.h:
1250 (khtml::EllipsisBox::m_str):
1252 2004-06-15 David Hyatt <hyatt@apple.com>
1254 Implement canAccommodateEllipsis. The basic idea is that everything on a line will allow an ellipsis to be
1255 drawn on top of it unless it's a replaced element. Then, if the replaced element overlaps, the ellipsis won't
1260 * khtml/rendering/bidi.cpp:
1261 (khtml::RenderBlock::checkLinesForTextOverflow):
1262 * khtml/rendering/render_line.cpp:
1263 (InlineBox::closestLeafChildForXPos):
1264 (InlineBox::canAccommodateEllipsis):
1265 (InlineFlowBox::canAccommodateEllipsis):
1266 (RootInlineBox::canAccommodateEllipsis):
1267 * khtml/rendering/render_line.h:
1269 2004-06-15 Vicki Murley <vicki@apple.com>
1271 - added a few layout tests, rdar://3694510
1273 * layout-tests/editing/deleting/delete-image-004-expected.txt: Added.
1274 * layout-tests/editing/deleting/delete-image-004.html: Added.
1275 * layout-tests/editing/selection/extend-by-character-006-expected.txt: Added.
1276 * layout-tests/editing/selection/extend-by-character-006.html: Added.
1278 2004-06-15 Trey Matteson <trey@apple.com>
1280 Dragging tweak: We pass the mouse down coords instead of the
1281 latest mouse drag coords to the ondragstart event. This makes it
1282 easy for the client to figure the correct drag image offset,
1283 whereas the mouse drag location is next to useless for that.
1287 * kwq/KWQKHTMLPart.mm:
1288 (KWQKHTMLPart::khtmlMouseMoveEvent):
1290 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1294 <rdar://problem/3685236>: (Safari does not support onselectstart event handler)
1296 * khtml/ecma/kjs_dom.cpp:
1297 (DOMNode::getValueProperty):
1298 (DOMNode::putValue):
1299 * khtml/ecma/kjs_dom.h:
1301 * khtml/ecma/kjs_dom.lut.h:
1303 * khtml/html/html_elementimpl.cpp:
1304 (HTMLElementImpl::parseHTMLAttribute):
1305 * khtml/misc/htmlattrs.c:
1308 * khtml/misc/htmlattrs.h:
1309 * khtml/misc/htmlattrs.in:
1310 * khtml/rendering/render_object.cpp:
1311 (RenderObject::shouldSelect):
1312 * khtml/xml/dom2_eventsimpl.cpp:
1313 (EventImpl::typeToId):
1314 (EventImpl::idToType):
1315 * khtml/xml/dom2_eventsimpl.h:
1318 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1322 Fix crash with last checkin.
1324 * khtml/ecma/kjs_binding.cpp:
1325 (ScriptInterpreter::domObjectsPerDocument): check the same
1326 property we want to initialize.
1328 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1332 <rdar://problem/3685309>: (properties not shared for JS wrappers of same DOM object, accessed from different frames)
1334 * khtml/ecma/kjs_binding.cpp:
1335 (ScriptInterpreter::domObjects):
1336 (ScriptInterpreter::domObjectsPerDocument):
1337 (ScriptInterpreter::ScriptInterpreter):
1338 (ScriptInterpreter::forgetDOMObject):
1339 (ScriptInterpreter::getDOMObjectForDocument):
1340 (ScriptInterpreter::putDOMObjectForDocument):
1341 (ScriptInterpreter::deleteDOMObjectsForDocument):
1342 (ScriptInterpreter::mark):
1343 (ScriptInterpreter::forgetDOMObjectsForDocument):
1344 (ScriptInterpreter::updateDOMObjectDocument):
1345 * khtml/ecma/kjs_binding.h:
1346 (KJS::ScriptInterpreter::getDOMObject):
1347 (KJS::ScriptInterpreter::putDOMObject):
1348 (KJS::ScriptInterpreter::deleteDOMObject):
1350 2004-06-15 Darin Adler <darin@apple.com>
1352 - 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
1353 (it was making most layout tests fail)
1355 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Rolled check back in.
1357 2004-06-15 David Hyatt <hyatt@apple.com>
1359 Add a truncation variable to text run boxes that will eventually be used to know how to cut out some of the glyphs when
1364 * khtml/rendering/render_text.cpp:
1365 (RenderText::clearTextOverflowTruncation):
1366 * khtml/rendering/render_text.h:
1367 (khtml::InlineTextBox:::InlineRunBox):
1368 (khtml::InlineTextBox::clearTruncation):
1370 2004-06-14 Darin Adler <darin@apple.com>
1374 - fixed some things for GC that Patrick missed, or that happened after the branch
1377 (-[DOMStyleSheet finalize]): Added.
1378 (-[DOMStyleSheetList finalize]): Added.
1379 (-[DOMCSSStyleSheet finalize]): Added.
1380 (-[DOMMediaList finalize]): Added.
1381 (-[DOMCSSRuleList finalize]): Added.
1382 (-[DOMCSSRule finalize]): Added.
1383 (-[DOMCSSStyleDeclaration finalize]): Added.
1384 (-[DOMCSSValue finalize]): Added.
1385 (-[DOMRGBColor finalize]): Added.
1386 (-[DOMRect finalize]): Added.
1387 (-[DOMCounter finalize]): Added.
1389 (-[DOMObject finalize]): Added.
1390 (-[DOMNode finalize]): Added.
1391 (-[DOMNamedNodeMap finalize]): Added.
1392 (-[DOMNodeList finalize]): Added.
1393 (-[DOMImplementation finalize]): Added.
1394 (-[DOMRange finalize]): Added.
1395 (-[DOMNodeFilter finalize]): Added.
1396 (-[DOMNodeIterator finalize]): Added.
1397 (-[DOMTreeWalker dealloc]): Removed unneeded nil check.
1398 (-[DOMTreeWalker finalize]): Added.
1400 (-[DOMHTMLCollection finalize]): Added.
1401 (-[DOMHTMLOptionsCollection finalize]): Added.
1402 * kwq/KWQClipboard.mm:
1403 (KWQClipboard::KWQClipboard): Use KWQRetain instead of retain.
1404 (KWQClipboard::~KWQClipboard): Use KWQRelease instead of release.
1405 * kwq/KWQEditCommand.mm:
1406 (-[KWQEditCommand finalize]): Added.
1408 (QFont::~QFont): Use KWQRelease instead of release.
1409 * kwq/KWQKHTMLPart.mm:
1410 (KWQKHTMLPart::keyEvent): Use KWQRetain instead of retain, and KWQRelease instead of release.
1411 (KWQKHTMLPart::mouseDown): Use KWQRetain instead of retain, and KWQRelease instead of release.
1412 (KWQKHTMLPart::mouseDragged): Use KWQRetain instead of retain, and KWQRelease instead of release.
1413 (KWQKHTMLPart::mouseUp): Use KWQRetain instead of retain, and KWQRelease instead of release.
1414 (KWQKHTMLPart::mouseMoved): Use KWQRetain instead of retain, and KWQRelease instead of release.
1415 (KWQKHTMLPart::sendContextMenuEvent): Use KWQRetain instead of retain, and KWQRelease instead of release.
1416 * kwq/KWQPageState.mm:
1417 (-[KWQPageState finalize]): Added. Filed <rdar://problem/3694163> about the fact that this is not right.
1419 (-[KWQSingleShotTimerTarget finalize]): Added.
1420 * kwq/WebCoreBridge.mm:
1421 (-[WebCoreBridge finalize]): Added. Filed <rdar://problem/3694165> about the fact that this is not right.
1423 2004-06-15 David Hyatt <hyatt@apple.com>
1425 Initial work on text truncation. Working top-down, I think I've made all the changes I will need to bidi.cpp
1426 and to the block code itself. The rest of the code can be concentrated in the render_line and render_text files.
1430 * khtml/rendering/bidi.cpp:
1431 (khtml::RenderBlock::layoutInlineChildren):
1432 (khtml::RenderBlock::findNextLineBreak):
1433 (khtml::RenderBlock::deleteEllipsisLineBoxes):
1434 (khtml::RenderBlock::checkLinesForTextOverflow):
1435 * khtml/rendering/render_block.h:
1436 * khtml/rendering/render_line.cpp:
1437 (RootInlineBox::detach):
1438 (RootInlineBox::detachEllipsisBox):
1439 (RootInlineBox::canAccommodateEllipsis):
1440 (RootInlineBox::placeEllipsis):
1441 * khtml/rendering/render_line.h:
1442 (khtml::RootInlineBox::RootInlineBox):
1443 * khtml/rendering/render_text.cpp:
1444 (RenderText::clearTextOverflowTruncation):
1445 * khtml/rendering/render_text.h:
1447 2004-06-14 Trey Matteson <trey@apple.com>
1449 3692690 - REGRESSION: canceling drag from WebView cause link to load
1450 Just need to take extra care to cancel any click handling in
1451 all cases once we're committed to doing the drag.
1455 * kwq/KWQKHTMLPart.mm:
1456 (KWQKHTMLPart::khtmlMouseMoveEvent): Call invalidateClick once
1457 we're past the hysteresis point, and definitely going to try
1458 to start a drag and drop.
1460 2004-06-14 Darin Adler <darin@apple.com>
1462 - fixed crash on boot
1464 * kwq/KWQFoundationExtras.h: (KWQRetainNSRelease):
1465 Fixed return value of this method; was uninitialized.
1467 2004-06-14 Trey Matteson <trey@apple.com>
1469 Dashboard wants access to pastboard data during the drag gesture.
1471 We address this need be allowing docs that are local files to access the
1472 pasteboard data during a drag, while other pages can only get at the types
1473 list until the drop happens. This is deemed safe because local files already
1474 have such broad super powers.
1480 (KURL::isLocalFile): Implement this QT method to look for the file scheme.
1481 * kwq/WebCoreBridge.mm:
1482 (-[WebCoreBridge dragOperationForDraggingInfo:]): Use more relaxed clipboard
1483 security for local file pages.
1484 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto.
1486 2004-06-14 Darin Adler <darin@apple.com>
1488 Reviewed by me, code changes by Patrick Beard.
1490 - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)
1492 * WebCore.pbproj/project.pbxproj: Added KWQFoundationExtras.h.
1493 * kwq/KWQFoundationExtras.h: Added.
1494 (KWQRetain): Cover for CFRetain that is tolerant of nil.
1495 (KWQRelease): Cover for CFRelease that is tolerant of nil.
1496 (KWQRetainNSRelease): Combination of a CFRetain and an -[NSObject release] that is tolerant of nil.
1497 Also includes a declaration of finalize so we can call [super finalize] without warnings on Panther.
1500 (ObjCNodeFilterCondition::ObjCNodeFilterCondition): Use CFRetain instead of retain.
1501 (ObjCNodeFilterCondition::~ObjCNodeFilterCondition): Use CFRelease instead of release.
1502 * kwq/KWQComboBox.mm:
1503 (QComboBox::~QComboBox): Use KWQRelease instead of release.
1504 (QComboBox::setFont): Use KWQRelease instead of release.
1505 (QComboBox::labelFont): Use KWQRetain instead of retain.
1507 (QCursor::QCursor): Use KWQRetain instead of retain.
1508 (QCursor::~QCursor): Use KWQRelease instead of release.
1509 (QCursor::operator=): More of the same.
1510 * kwq/KWQFileButton.mm:
1511 (KWQFileButton::KWQFileButton): Use KWQRetainNSRelease to retain a newly-allocated object.
1512 (KWQFileButton::~KWQFileButton): Use CFRelease instead of release.
1514 (QFont::QFont): Use KWQRetain instead of retain.
1515 (QFont::operator=): More of the same.
1516 (QFont::setFamily): Use KWQRelease instead of release.
1517 (QFont::setFirstFamily): Use KWQRelease instead of release.
1518 (QFont::setPixelSize): Use KWQRelease instead of release.
1519 (QFont::setWeight): Use KWQRelease instead of release.
1520 (QFont::setItalic): Use KWQRelease instead of release.
1521 (QFont::getNSFont): Use KWQRetain instead of retain.
1522 * kwq/KWQFontMetrics.mm:
1523 (QFontMetricsPrivate::~QFontMetricsPrivate): Use KWQRelease instead of release.
1524 (QFontMetricsPrivate::getRenderer): Use KWQRetain instead of retain.
1525 (QFontMetricsPrivate::setFont): Use KWQRelease instead of release.
1526 * kwq/KWQKHTMLPart.mm:
1527 (KWQKHTMLPart::~KWQKHTMLPart): Use KWQRelease instead of release.
1528 (KWQKHTMLPart::clearRecordedFormValues): Use KWQRelease instead of release.
1529 (KWQKHTMLPart::recordFormValue): Use KWQRetainNSRelease and use KWQRetain instead of retain.
1530 (KWQKHTMLPart::windowScriptObject): Use KWQRetainNSRelease.
1531 * kwq/KWQKJobClasses.mm:
1532 (KIO::TransferJobPrivate::TransferJobPrivate): Use KWQRetainNSRelease.
1533 (KIO::TransferJobPrivate::~TransferJobPrivate): Use KWQRelease instead of release.
1534 (KIO::TransferJob::setLoader): More of the same.
1536 (KWQRetainResponse): Use KWQRetain instead of retain.
1537 (KWQReleaseResponse): Use KWQRelease instead of release.
1538 * kwq/KWQPainter.mm:
1539 (QPainterPrivate::~QPainterPrivate): Use KWQRelease instead of release.
1540 (QPainter::_updateRenderer): More of the same.
1541 (QPainter::initFocusRing): Use KWQRetainNSRelease.
1542 (QPainter::clearFocusRing): Use KWQRelease instead of release.
1544 (QPixmap::QPixmap): Use KWQRetain instead of retain.
1545 (QPixmap::~QPixmap): Use KWQRelease instead of release.
1546 (QPixmap::receivedData): Use KWQRetain instead of retain.
1547 (QPixmap::resize): Use KWQRetainNSRelease and use KWQRelease instead of release.
1548 (QPixmap::operator=): More of the same.
1550 (QRegion::QRegion): Use KWQRetain instead of retain.
1551 (QRegion::~QRegion): Use KWQRelease instead of release.
1552 (QRegion::operator=): More of the same.
1554 (QTimer::start): Use KWQRetain instead of retain.
1555 (QTimer::stop): Use KWQRelease instead of release.
1556 (QTimer::fire): Use KWQRelease instead of release.
1558 (QWidget::QWidget): Use KWQRetain instead of retain.
1559 (QWidget::~QWidget): Use KWQRelease instead of release.
1560 (QWidget::setView): More of the same.
1561 * kwq/WebCoreSettings.mm: (-[WebCoreSettings finalize]):
1562 Delete the storage here, as well as in dealloc.
1564 2004-06-14 Maciej Stachowiak <mjs@apple.com>
1568 <rdar://problem/3693818>: (Safari should use CG calls for circle drawing for better performance)
1570 * kwq/KWQPainter.mm:
1571 (QPainter::drawEllipse): Use CG calls instead of NS calls for faster circle drawing.
1572 (QPainter::drawArc): Ditto.
1574 2004-06-14 Ken Kocienda <kocienda@apple.com>
1580 <rdar://problem/3690115> Crash deleting text out of iChat's profile (an editable Webview)
1582 * khtml/html/html_elementimpl.cpp:
1583 (HTMLElementImpl::isFocusable): Added null-check of parent node before deref'ing it.
1585 2004-06-14 Trey Matteson <trey@apple.com>
1587 Two tweaks to recently added "drag" pseudo-class, as suggested by
1588 Dave. The class is renamed to "-khtml-drag", and we update layout
1589 when using it, instead of only updating styles.
1593 * khtml/css/css_base.cpp:
1594 (CSSSelector::extractPseudoType):
1595 * kwq/KWQKHTMLPart.mm:
1596 (KWQKHTMLPart::snapshotDragImage):
1598 2004-06-13 Trey Matteson <trey@apple.com>
1600 Support for DHTML cut/copy/paste. We now support oncut, oncopy, onpaste. The events
1601 are sent to the first node in the selection, or else the body. Current holes are
1602 that we do not send events for operations in text fields or text areas (because it
1603 is hard to get the right hooks into the AppKit).
1605 We also send onbeforecut, onbeforecopy, onbeforepaste before the other events, which
1606 isn't really WinIE compatible, but is close. WinIE uses these to enable cut/paste
1607 menu items in its UI. DB doesn't need this for now.
1611 * khtml/ecma/kjs_dom.cpp:
1612 (DOMNode::getValueProperty): Boilerplate for new events
1613 (DOMNode::putValue): Boilerplate for new events
1614 * khtml/ecma/kjs_dom.h:
1615 (KJS::DOMNode::): Boilerplate for new events
1616 * khtml/ecma/kjs_dom.lut.h:
1617 * khtml/ecma/kjs_events.cpp:
1618 (DOMEvent::DOMEvent): "dataTransfer" and "clipboardData" properties are conditionally
1619 defined on DOMEvent, depending on if the event is a dragging or clipboard event.
1620 (DOMMouseEvent::mark): Pass mark along to any clipboard object we have.
1621 (DOMEvent::getValueProperty): Return "dataTransfer" or "clipboardData".
1622 (DOMMouseEvent::getValueProperty): Returning "dataTransfer" now handled by
1624 * khtml/ecma/kjs_events.h:
1626 (KJS::DOMMouseEvent::DOMMouseEvent):
1627 (KJS::DOMMouseEvent::):
1628 (KJS::DOMMouseEvent::toMouseEvent):
1629 * khtml/ecma/kjs_events.lut.h:
1630 * khtml/html/html_elementimpl.cpp:
1631 (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events
1632 * khtml/misc/htmlattrs.c:
1633 * khtml/misc/htmlattrs.h:
1634 * khtml/misc/htmlattrs.in: Boilerplate for new events
1635 * khtml/xml/dom2_eventsimpl.cpp:
1636 (EventImpl::typeToId): Boilerplate for new events
1637 (EventImpl::idToType): Boilerplate for new events
1638 (EventImpl::isDragEvent): New utility
1639 (EventImpl::isClipboardEvent): New utility
1640 (MouseEventImpl::isDragEvent): New utility
1641 (ClipboardEventImpl::ClipboardEventImpl): ref optional clipboard
1642 (ClipboardEventImpl::~ClipboardEventImpl): deref optional clipboard
1643 (ClipboardEventImpl::isClipboardEvent): New utility
1644 * khtml/xml/dom2_eventsimpl.h:
1645 (DOM::EventImpl::): Boilerplate for new events
1646 (DOM::ClipboardEventImpl::clipboard):
1647 * kwq/KWQClipboard.h: Monkey business so this file is includable in C++.
1648 * kwq/KWQClipboard.mm:
1649 * kwq/KWQKHTMLPart.h:
1650 * kwq/KWQKHTMLPart.mm:
1651 (KWQKHTMLPart::dispatchCPPEvent): Send one of the new events.
1652 (KWQKHTMLPart::tryCut): Declare pasteboard types, send cut events.
1653 (KWQKHTMLPart::tryCopy): Declare pasteboard types, send copy events.
1654 (KWQKHTMLPart::tryPaste): Send paste events.
1655 * kwq/WebCoreBridge.h:
1656 * kwq/WebCoreBridge.mm:
1657 (-[WebCoreBridge tryDHTMLCut]): Pass through to part
1658 (-[WebCoreBridge tryDHTMLCopy]): Ditto
1659 (-[WebCoreBridge tryDHTMLPaste]): Ditto
1661 2004-06-14 Trey Matteson <trey@apple.com>
1663 A new CSS pseudo-class ".drag" is added. Analogous to the "hover" class,
1664 this class determines styles used while an element is generating a drag
1669 * khtml/css/css_base.cpp:
1670 (CSSSelector::extractPseudoType): Boilerplate for adding new class.
1671 * khtml/css/css_base.h: Boilerplate for adding new class.
1672 * khtml/css/cssstyleselector.cpp:
1673 (khtml::CSSStyleSelector::checkOneSelector): Match new class against
1674 elements being dragged.
1675 * khtml/css/cssstyleselector.h:
1676 (khtml::StyleSelector::): Boilerplate for adding new class.
1677 * khtml/rendering/render_object.cpp:
1678 (RenderObject::RenderObject): Init new member.
1679 (RenderObject::isDragging): Return whether this object is being dragged.
1680 (RenderObject::updateDragState): Paint us an all children with a new dragged state.
1681 * khtml/rendering/render_object.h:
1682 * khtml/rendering/render_style.h: Boilerplate for adding new class.
1683 (khtml::RenderStyle::NonInheritedFlags::operator==):
1684 (khtml::RenderStyle::setBitDefaults):
1685 (khtml::RenderStyle::affectedByDragRules):
1686 (khtml::RenderStyle::setAffectedByDragRules):
1687 * kwq/KWQClipboard.mm:
1688 (KWQClipboard::dragNSImage): Method rename.
1689 * kwq/KWQKHTMLPart.h:
1690 * kwq/KWQKHTMLPart.mm:
1691 (KWQKHTMLPart::snapshotDragImage): Mark the element as being dragged before
1692 we snapshot it, so new style class will apply.
1694 2004-06-14 Ken Kocienda <kocienda@apple.com>
1698 Added a few more editing-related layout tests.
1700 * layout-tests/editing/inserting/insert-3654864-fix-expected.txt: Added.
1701 * layout-tests/editing/inserting/insert-3654864-fix.html: Added.
1702 * layout-tests/editing/inserting/insert-3659587-fix-expected.txt: Added.
1703 * layout-tests/editing/inserting/insert-3659587-fix.html: Added.
1704 * layout-tests/editing/inserting/insert-after-delete-001-expected.txt: Added.
1705 * layout-tests/editing/inserting/insert-after-delete-001.html: Added.
1706 * layout-tests/editing/inserting/insert-br-case1-expected.txt: Added.
1707 * layout-tests/editing/inserting/insert-br-case1.html: Added.
1708 * layout-tests/editing/inserting/insert-br-case2-expected.txt: Added.
1709 * layout-tests/editing/inserting/insert-br-case2.html: Added.
1710 * layout-tests/editing/inserting/insert-br-case3-expected.txt: Added.
1711 * layout-tests/editing/inserting/insert-br-case3.html: Added.
1713 2004-06-14 Ken Kocienda <kocienda@apple.com>
1717 Regarding the bug below, removing some tests since we have removed the execCommand("paste")
1718 feature, at least for now.
1720 <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
1722 * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Removed.
1723 * layout-tests/editing/pasteboard/copy-paste-text-001.html: Removed.
1724 * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Removed.
1725 * layout-tests/editing/pasteboard/cut-paste-text-002.html: Removed.
1727 2004-06-14 Ken Kocienda <kocienda@apple.com>
1733 <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply due to non-0 exception code trying to insert a DIV markup string
1735 * khtml/xml/dom_nodeimpl.cpp:
1736 (NodeImpl::checkAddChild): This function was being too strict in disallowing certain nodes
1737 to be added as other child nodes, applying rules we typically use for parsing. However,
1738 those parsing rules are primarily for dealing with "bad" HTML, and should not be
1739 applied to programmatic DOM operations. The fix involves removing calls to childAllowed().
1741 2004-06-12 Trey Matteson <trey@apple.com>
1743 The drag image may be updated during a DHTML drag. This includes updating
1744 from a Timer instead of a drag event handler. In addition, an arbitrary
1745 element can be set as the one to snapshot for the drag image.
1749 * khtml/ecma/kjs_events.cpp:
1750 (ClipboardProtoFunc::tryCall): setDragImage accepts a node. Previously,
1751 it had to be an Image object.
1752 * khtml/rendering/render_object.cpp:
1753 (RenderObject::paintingRootRect): Also returns top element's rect.
1754 * khtml/rendering/render_object.h:
1755 * khtml/xml/dom2_eventsimpl.h:
1756 * kwq/KWQClipboard.h: New security mode where image is still writable, but
1759 (KWQClipboard::setDragHasStarted):
1760 * kwq/KWQClipboard.mm:
1761 (KWQClipboard::KWQClipboard): Part may be passed. Needed in the source
1762 case to generate an image from an element.
1763 (KWQClipboard::setAccessPolicy): New, replaces former becomeNumb method
1764 which wasn't flexible enough.
1765 (KWQClipboard::accessPolicy): New getter.
1766 (KWQClipboard::dragImage): No change, diff confusion.
1767 (KWQClipboard::setDragImage): Call new helper, below.
1768 (KWQClipboard::dragImageElement): New, return any element set.
1769 (KWQClipboard::setDragImageElement): New, call new helper.
1770 (KWQClipboard::setDragImage): New helper, set the image via either a
1771 pixmap or an element to snapshot, pushes the result to WebKit if we've
1772 already started the drag.
1773 (KWQClipboard::dragNSImage): Generate an NSImage and mouse offset, no
1774 matter how the drag image was set (Image or element).
1775 * kwq/KWQKHTMLPart.h: A single clipboard is kept over the life of a
1776 source drag instead of making one for each event.
1777 * kwq/KWQKHTMLPart.mm:
1778 (KWQKHTMLPart::KWQKHTMLPart): Init clipboard.
1779 (KWQKHTMLPart::~KWQKHTMLPart): Free clipboard.
1780 (KWQKHTMLPart::freeClipboard): New helper.
1781 (KWQKHTMLPart::dispatchDragSrcEvent): Most code moved to caller.
1782 (KWQKHTMLPart::khtmlMouseMoveEvent): Make clipboard for this drag session.
1783 Init clipboard to make an image from the dragSource element. Mark the
1784 drag as having started.
1785 (KWQKHTMLPart::dragSourceMovedTo): Clipboard will update WK with any new
1786 drag image, so we don't need to.
1787 (KWQKHTMLPart::dragSourceEndedAt): Ditto.
1788 (KWQKHTMLPart::elementImage): Also return element rect.
1789 * kwq/WebCoreBridge.h: Glue moved to WebCoreGraphicsBridge.
1790 * kwq/WebCoreBridge.mm:
1791 (-[WebCoreBridge dragOperationForDraggingInfo:]): Use new method.
1792 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
1793 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
1794 * kwq/WebCoreGraphicsBridge.h:
1795 * kwq/WebCoreGraphicsBridge.m:
1796 (-[WebCoreGraphicsBridge setDraggingImage:at:]): Glue moved from WebBridge
1798 2004-06-11 Chris Blumenberg <cblu@apple.com>
1800 Support for WebKit drag & drop API.
1804 * kwq/WebCoreBridge.h:
1805 * kwq/WebCoreBridge.mm:
1806 (-[WebCoreBridge _positionForPoint:]): new
1807 (-[WebCoreBridge moveDragCaretToPoint:]): call _positionForPoint
1808 (-[WebCoreBridge editableDOMRangeForPoint:]): new
1810 2004-06-11 Darin Adler <darin@apple.com>
1814 - fixed <rdar://problem/3645846>: (REGRESSION: Stuck "Loading" when logging into Google's Gmail on newer versions of Safari)
1816 * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::parseHTMLAttribute):
1817 Call through to base class for ATTR_ID so the "has ID" bit gets set.
1818 * khtml/html/html_imageimpl.cpp:
1819 (HTMLImageElementImpl::parseHTMLAttribute): Move ATTR_COMPOSITE code up and out of the way so
1820 it doesn't screw up ATTR_ID parsing.
1821 (HTMLMapElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID
1822 so the "has ID" bit gets set.
1823 * khtml/html/html_objectimpl.cpp:
1824 (HTMLAppletElementImpl::parseHTMLAttribute): Remove ATTR_ID case; not needed.
1825 (HTMLParamElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID
1826 so the "has ID" bit gets set.
1828 2004-06-11 Ken Kocienda <kocienda@apple.com>
1834 <rdar://problem/3659587>: "when typing in Blot, bold style does not carry over to next line after pressing 'return'"
1836 Did some work to improve the insert newline command. The refinement is to insert the newline
1837 at the upstream position of the caret, ensuring that the newline takes on the
1838 appropriate style, and does not let the caret "escape" from an element that is
1841 * khtml/editing/htmlediting_impl.cpp:
1842 (khtml::InputNewlineCommandImpl::insertNodeAfterPosition): New helper. Adds smarts about adding
1843 newlines when the selection is a caret in a block.
1844 (khtml::InputNewlineCommandImpl::insertNodeBeforePosition): Ditto.
1845 (khtml::InputNewlineCommandImpl::doApply): Simplified cases. One case in the code could not
1847 * khtml/editing/htmlediting_impl.h:
1851 <rdar://problem/3654864>: "Pasting content at start of line places it at end of previous line"
1853 (khtml::InputTextCommandImpl::prepareForTextInsertion): Simple code mistake. Content was indeed
1854 being added to the line before. Fixed to add new content after the line break.
1856 2004-07-10 Trey Matteson <trey@apple.com>
1858 Prep work for latest delegate API for dragging. In addition, I also straightened out all
1859 the cases of DHTML setting a drag image or setting pasteboard data, and how that would
1860 override WebKit's default behavior (which follows how WinIE does things).
1864 * khtml/rendering/render_object.cpp:
1865 (RenderObject::draggableNode): Obey new params for whether a DHTML or UserAgent (i.e.,
1866 WebKit) drag source is allowed.
1867 * khtml/rendering/render_object.h:
1868 * kwq/KWQKHTMLPart.h:
1869 * kwq/KWQKHTMLPart.mm:
1870 (KWQKHTMLPart::dispatchDragSrcEvent): Setting pasteboard data was moved out of here, now
1871 caller's responsibility.
1872 (KWQKHTMLPart::khtmlMouseMoveEvent): Ask bridge for allowable drag actions (DHTML vs UA).
1873 Only send drag events if DHTML is allowed. Only generate a drag image if the source is
1874 a DHTML element. Note whether event handler set any pasteboard data, and pass that fact
1876 (KWQKHTMLPart::dragSourceMovedTo): Only send drag events if DHTML is allowed.
1877 (KWQKHTMLPart::dragSourceEndedAt): Only send drag events if DHTML is allowed.
1878 * kwq/WebCoreBridge.h:
1880 2004-06-11 Ken Kocienda <kocienda@apple.com>
1884 Lay some groundwork for better testing of inserting newlines. Layout
1885 tests that use this new code will be coming soon.
1887 * khtml/editing/jsediting.cpp: Add commands for bold and inserting newlines.
1888 * layout-tests/editing/editing.js: Added new insertNewline command.
1889 which calls through to TypingCommand::insertNewline. There was no way to get
1890 to this command from JS before this addition.
1892 2004-06-11 Ken Kocienda <kocienda@apple.com>
1896 Javascript execCommand system wants to use case-insensitive QDict.
1897 The interface for QDict offers this feature, but it was never implemented.
1900 * kwq/KWQDictImpl.h: Declare bool to store case-sensitive bit.
1901 * kwq/KWQDictImpl.mm:
1902 (KWQDictImpl::KWQDictImpl): No longer drops caseSensitive on the floor; stores
1903 it in instance variable.
1904 (KWQDictImpl::insert): Make lowercase version of key for operation, if necessary.
1905 (KWQDictImpl::remove): Ditto.
1906 (KWQDictImpl::find): Ditto.
1907 (KWQDictIteratorImpl::currentStringKey): Whitespace cleanup.
1911 2004-06-10 Ken Kocienda <kocienda@apple.com>
1917 <rdar://problem/3654850>: "Style changes do not work across blocks"
1919 Now, applying styles works across blocks. I did quite a bit
1920 of internal redsign on the member functions of this class to
1921 make this work. As a bonus, from an architectural standpoint,
1922 all style changes are now done "in place". There is no more
1923 copying of content in order to perform style changes.
1925 * khtml/editing/htmlediting_impl.cpp:
1926 (khtml::ApplyStyleCommandImpl::doApply):
1927 (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode):
1928 (khtml::ApplyStyleCommandImpl::removeCSSStyle):
1929 (khtml::ApplyStyleCommandImpl::removeStyle):
1930 (khtml::ApplyStyleCommandImpl::nodeFullySelected):
1931 (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded):
1932 (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded):
1933 (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
1934 (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded):
1935 (khtml::ApplyStyleCommandImpl::positionInsertionPoint):
1936 * khtml/editing/htmlediting_impl.h:
1938 2004-06-10 Darin Adler <darin@apple.com>
1942 - filled out execCommand a lot more
1943 - fixed <rdar://problem/3685231>: (execCommand italic is not implemented)
1944 - fixed <rdar://problem/3685232>: (execCommand bold is not implemented)
1945 - fixed <rdar://problem/3675899>: (Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan)
1946 - fixed <rdar://problem/3675901>: (Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan)
1947 - fixed <rdar://problem/3675904>: (Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan)
1949 * khtml/editing/jsediting.cpp:
1950 (DOM::JSEditor::queryCommandIndeterm): Changed to use KHTMLPart::TriState instead of CommandState.
1951 (DOM::JSEditor::queryCommandState): Ditto.
1952 (execStyleChange): Changed to use KHTMLPart::applyStyle.
1953 (stateStyle): Used KHTMLPart::selectionHasStyle for this.
1954 (selectionStartHasStyle): Use KHTMLPart::selectionStartHasStyle for this.
1955 (valueStyle): Used KHTMLPart::selectionStartStylePropertyValue for this.
1956 (execBold): Implemented toggling, using selectionStartHasStyle.
1957 (execItalic): Implemented toggling, using selectionStartHasStyle.
1958 (execPrint): Implemented.
1959 (enabledRedo): Implemented, using canRedo.
1960 (enabledUndo): Implemented, using canUndo.
1961 (stateNone): Renamed from stateNo.
1962 (valueBackColor): Implemented, using valueStyle.
1963 (valueFontName): Implemented, using valueStyle.
1964 (valueFontSize): Implemented, using valueStyle.
1965 (valueForeColor): Implemented, using valueStyle.
1966 (valueFontSize): Implemented, using valueStyle.
1968 * khtml/khtml_part.h: Added editing operations.
1969 * khtml/khtml_part.cpp:
1970 (KHTMLPart::copyToPasteboard): Added.
1971 (KHTMLPart::cutToPasteboard): Added.
1972 (KHTMLPart::redo): Added.
1973 (KHTMLPart::undo): Added.
1974 (KHTMLPart::applyStyle): Added.
1975 (updateState): Added.
1976 (KHTMLPart::selectionHasStyle): Added.
1977 (KHTMLPart::selectionStartHasStyle): Added.
1978 (KHTMLPart::selectionStartStylePropertyValue): Added.
1979 (KHTMLPart::selectionComputedStyle): Added.
1980 (KHTMLPart::print): Added.
1982 * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Call print() on plain old part, not KWQ(part).
1984 * kwq/KWQKHTMLPart.h: Removed print(), added _haveUndoRedoOperations.
1985 * kwq/KWQKHTMLPart.mm:
1986 (KHTMLPart::print): Moved from KWQKHTMLPart to KHTMLPart.
1987 (KWQKHTMLPart::registerCommandForUndo): Moved code here from bridge.
1988 (KWQKHTMLPart::registerCommandForRedo): Moved code here from bridge.
1989 (KWQKHTMLPart::clearUndoRedoOperations): Moved code here from bridge.
1990 (KWQKHTMLPart::issueUndoCommand): Moved code here from bridge.
1991 (KWQKHTMLPart::issueRedoCommand): Moved code here from bridge.
1992 (KWQKHTMLPart::issuePasteCommand): Moved code here from bridge.
1993 (KHTMLPart::canUndo): Added.
1994 (KHTMLPart::canRedo): Added.
1996 * kwq/WebCoreBridge.h: Added undoManager, removed undo-related methods.
1997 * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Changed to call
1998 KHTMLPart::applyStyle.
2000 * WebCore.pbproj/.cvsignore: Updated for new Xcode files.
2002 2004-06-09 Maciej Stachowiak <mjs@apple.com>
2006 <rdar://problem/3671555>: Blot scrolls to the top every time you type
2008 * khtml/xml/dom_selection.cpp:
2009 (DOM::Selection::getRepaintRect): If the caret position is invalid, recompute it.
2011 2004-06-09 David Hyatt <hyatt@apple.com>
2013 Fix for 3607091, implement a style that prevents zoom and min font size from taking effect.
2014 The name of the new style is "-apple-text-size-adjust" with values of "none" and "auto." The default
2019 * khtml/css/cssparser.cpp:
2020 (CSSParser::parseValue):
2021 * khtml/css/cssproperties.c:
2024 * khtml/css/cssproperties.h:
2025 * khtml/css/cssproperties.in:
2026 * khtml/css/cssstyleselector.cpp:
2027 (khtml::CSSStyleSelector::styleForElement):
2028 (khtml::CSSStyleSelector::pseudoStyleForElement):
2029 (khtml::CSSStyleSelector::applyDeclarations):
2030 (khtml::CSSStyleSelector::applyProperty):
2031 (khtml::CSSStyleSelector::checkForTextSizeAdjust):
2032 * khtml/css/cssstyleselector.h:
2033 * khtml/rendering/render_style.cpp:
2035 (StyleCSS3InheritedData):
2036 (StyleCSS3InheritedData::operator==):
2037 (RenderStyle::diff):
2038 * khtml/rendering/render_style.h:
2039 (khtml::RenderStyle::lineClamp):
2040 (khtml::RenderStyle::textSizeAdjust):
2041 (khtml::RenderStyle::setTextSizeAdjust):
2042 (khtml::RenderStyle::initialTextSizeAdjust):
2044 2004-06-09 David Hyatt <hyatt@apple.com>
2046 Implement parsing and setting of the text-overflow CSS3 property.
2048 Reviewed by kocienda
2050 * khtml/css/cssparser.cpp:
2051 (CSSParser::parseValue):
2052 * khtml/css/cssproperties.c:
2055 * khtml/css/cssproperties.h:
2056 * khtml/css/cssproperties.in:
2057 * khtml/css/cssstyleselector.cpp:
2058 (khtml::CSSStyleSelector::applyProperty):
2059 * khtml/css/cssvalues.c:
2062 * khtml/css/cssvalues.h:
2063 * khtml/css/cssvalues.in:
2064 * khtml/rendering/render_style.cpp:
2066 (StyleCSS3NonInheritedData::operator==):
2067 (RenderStyle::diff):
2068 * khtml/rendering/render_style.h:
2069 (khtml::RenderStyle::textOverflow):
2070 (khtml::RenderStyle::setTextOverflow):
2071 (khtml::RenderStyle::initialTextOverflow):
2073 2004-06-09 David Hyatt <hyatt@apple.com>
2075 Fix for 3678031, implement better flexing for Emerson headers. This involved adding support for max-width: intrinsic,
2076 fixing the box layout algorithm to properly deal with max-widths, and implementing support for baseline alignment
2077 so that boxes can be aligned vertically along their interior baselines.
2079 Reviewed by kocienda
2081 * khtml/css/cssparser.cpp:
2082 (CSSParser::parseValue):
2083 (CSSParser::parseShadow):
2084 * khtml/css/cssparser.h:
2085 * khtml/css/cssproperties.c:
2088 * khtml/css/cssproperties.h:
2089 * khtml/css/cssproperties.in:
2090 * khtml/css/cssstyleselector.cpp:
2091 (khtml::CSSStyleSelector::applyProperty):
2092 * khtml/css/cssvalues.c:
2095 * khtml/css/cssvalues.h:
2096 * khtml/css/cssvalues.in:
2097 * khtml/misc/khtmllayout.h:
2099 * khtml/rendering/render_block.cpp:
2100 (khtml::RenderBlock::baselinePosition):
2101 (khtml::RenderBlock::getBaselineOfFirstLineBox):
2102 * khtml/rendering/render_block.h:
2103 * khtml/rendering/render_box.cpp:
2104 (RenderBox::RenderBox):
2105 (RenderBox::overrideWidth):
2106 (RenderBox::overrideHeight):
2107 (RenderBox::calcWidth):
2108 (RenderBox::calcHeight):
2109 * khtml/rendering/render_box.h:
2110 (khtml::RenderBox::overrideSize):
2111 (khtml::RenderBox::setOverrideSize):
2112 * khtml/rendering/render_flexbox.cpp:
2113 (khtml::RenderFlexibleBox::calcMinMaxWidth):
2114 (khtml::RenderFlexibleBox::layoutBlock):
2115 (khtml::RenderFlexibleBox::layoutHorizontalBox):
2116 (khtml::RenderFlexibleBox::layoutVerticalBox):
2117 (khtml::RenderFlexibleBox::placeChild):
2118 (khtml::RenderFlexibleBox::allowedChildFlex):
2119 * khtml/rendering/render_flexbox.h:
2120 * khtml/rendering/render_image.cpp:
2121 (RenderImage::isWidthSpecified):
2122 (RenderImage::isHeightSpecified):
2123 * khtml/rendering/render_object.h:
2124 (khtml::RenderObject::getBaselineOfFirstLineBox):
2125 (khtml::RenderObject::overrideSize):
2126 (khtml::RenderObject::overrideWidth):
2127 (khtml::RenderObject::overrideHeight):
2128 (khtml::RenderObject::setOverrideSize):
2129 * khtml/rendering/render_style.cpp:
2130 (StyleFlexibleBoxData::StyleFlexibleBoxData):
2131 (StyleFlexibleBoxData::operator==):
2132 (ShadowData::operator==):
2133 * khtml/rendering/render_style.h:
2134 (khtml::RenderStyle::boxPack):
2135 (khtml::RenderStyle::setBoxPack):
2136 * khtml/rendering/table_layout.cpp:
2137 (AutoTableLayout::layout):
2139 2004-06-09 Richard Williamson <rjw@apple.com>
2141 Added support for drawing un-rasterized transformed PDFs.
2145 * khtml/ecma/kjs_html.cpp:
2146 (KJS::Context2DFunction::tryCall):
2148 2004-06-09 Darin Adler <darin@apple.com>
2152 - implemented still more execCommand commands
2154 * khtml/editing/jsediting.cpp: Added a lot more commands, and reformatted a bit.
2156 2004-06-08 Darin Adler <darin@apple.com>
2160 - implemented a bunch more execCommand commands
2161 - fixed <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
2162 - fixed <rdar://problem/3675898>: (Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan)
2163 - fixed <rdar://problem/3675903>: (Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan)
2164 - about half of <rdar://problem/3685231>: (execCommand italic is not implemented)
2165 - about half of <rdar://problem/3685232>: (execCommand bold is not implemented)
2167 * khtml/editing/jsediting.h: Made constructor inline. Deleted a few unneeded member functions
2168 that are now just private functions inside jsediting.cpp.
2170 * khtml/editing/jsediting.cpp:
2171 (commandImp): Changed this around, so the dictionary is a static local to this function,
2172 and initialized with C++ "first time initialization" rule.
2173 (DOM::JSEditor::execCommand): Got rid of special case for 0 for function pointer and added const.
2174 (DOM::JSEditor::queryCommandEnabled): Ditto.
2175 (DOM::JSEditor::queryCommandIndeterm): Got rid of special case for 0 for function pointer, added const,
2176 and use a common three-state state function rather than a separate "indeterm" function.
2177 (DOM::JSEditor::queryCommandState): Ditto.
2178 (DOM::JSEditor::queryCommandValue): More of the same.
2179 (execNotImplemented): Added. Used for unimplemented commands; there are only a few left.
2180 (execCopy): Renamed.
2182 (execDelete): Renamed.
2183 (execInsertText): Renamed.
2184 (execPaste): Renamed, and disabled.
2185 (execRedo): Renamed.
2186 (execSelectAll): Renamed.
2187 (execUndo): Renamed.
2188 (execStyleChange): Added. Helper function for commands that are style changes.
2190 (execItalic): Added.
2191 (execJustifyCenter): Added.
2192 (execJustifyFull): Added.
2193 (execJustifyLeft): Added.
2194 (execJustifyRight): Added.
2195 (execSubscript): Added.
2196 (execSuperscript): Added.
2197 (execUnselect): Added.
2198 (stateNotImplemented): Added. Used for unimplemented state queries; there are a few left.
2200 (valueNotImplemented): Added. Used for unimplemented value queries; there are a few left.
2201 (nullStringValue): Added.
2202 (createCommandDictionary): Changed the initDict function into this function. Added implementations
2203 for many commands and condensed format so it's easier to work with.
2205 2004-06-08 Darin Adler <darin@apple.com>
2209 - our part of fix to <rdar://problem/3629334>: (REGRESSION (Tiger): titles on pop-ups menus are truncated and show ellipses)
2211 * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Call setLineBreakMode:NSLineBreakByClipping.
2212 In the current version of Tiger I am using, this is not implemented yet.
2214 - a couple of other unrelated changes
2216 * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Put a little more code
2217 inside the APPLE_CHANGES ifdef.
2218 * kwq/KWQTextEdit.h: Remove unused setTabStopWidth function, and make empty setTextFormat
2219 function an inline for slightly smaller code size.
2220 * kwq/KWQTextEdit.mm: Ditto.
2221 * kwq/KWQTextField.mm: Update copyright date.
2223 2004-06-08 Trey Matteson <trey@apple.com>
2225 A DHTML drag source can now change the dragging image during the drag. Currently
2226 it may only be set to a static image.
2230 * kwq/KWQKHTMLPart.mm:
2231 (KWQKHTMLPart::dragSourceMovedTo): If the ondrag event handler set an image,
2233 * kwq/WebCoreBridge.h:
2235 2004-06-08 Ken Kocienda <kocienda@apple.com>
2239 Changes to the selection state for these tests as a result of my previous
2240 checkin. The changes are minor to a couple of offsets. I looked at the
2241 changes and approve them.
2243 * layout-tests/editing/deleting/delete-block-contents-001-expected.txt
2244 * layout-tests/editing/deleting/delete-block-contents-002-expected.txt
2245 * layout-tests/editing/deleting/delete-block-contents-003-expected.txt
2247 2004-06-08 Ken Kocienda <kocienda@apple.com>
2253 <rdar://problem/3654841>: "Hitting delete key with start of block selected
2254 does not merge content with preceding block"
2256 Selections that span blocks now work correctly for deleting the selection and inserting
2257 over the selection. The largest part of the change is adding a new field to the
2258 RemoveNodeAndPruneCommand and its impl version. This was done since the starting block
2259 for a multi-block selection should always be preserved when deleting, and this was
2260 a convenient way to express this using the code structure already in place.
2262 * khtml/editing/htmlediting.cpp:
2263 (khtml::RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): Modify this command to
2264 take two nodes: the node to remove and a node to stop at when pruning back up the tree.
2265 (khtml::RemoveNodeAndPruneCommand::pruneNode): New accessor, replaces old node() accessor.
2266 (khtml::RemoveNodeAndPruneCommand::stopNode): New accessor for additional feature described
2268 * khtml/editing/htmlediting.h:
2269 * khtml/editing/htmlediting_impl.cpp:
2270 (khtml::shouldPruneNode): blow flow renderers can now be deleted, but not if they are a
2271 rootEditableElement.
2272 (khtml::CompositeEditCommandImpl::removeNodeAndPrune): Pass new stopNode param and change the
2273 name of the existing node argument to pruneNode to distinguish it.
2274 (khtml::DeleteSelectionCommandImpl::doApply): Pass the block containing the start of the
2275 selection to removeNodeAndPrune in each case. Also, add one little loop to move all
2276 the content from the block containing the end of the selection if that block is different
2277 than the start block.
2278 (khtml::RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): Implement the
2279 pruneNode/stopNode design already described.
2280 (khtml::RemoveNodeAndPruneCommandImpl::~RemoveNodeAndPruneCommandImpl): Manage the
2281 lifecycle of stopNode.
2282 (khtml::RemoveNodeAndPruneCommandImpl::doApply): Add a check to stop at the stop
2284 * khtml/editing/htmlediting_impl.h:
2285 (khtml::RemoveNodeAndPruneCommandImpl::pruneNode): New accessor.
2286 (khtml::RemoveNodeAndPruneCommandImpl::stopNode): Ditto.
2288 2004-06-07 Trey Matteson <trey@apple.com>
2290 Clipboard access during DHTML dragging is made secure.
2294 * kwq/KWQClipboard.h:
2296 * kwq/KWQClipboard.mm:
2297 (KWQClipboard::KWQClipboard): Init new policy and changeCount members.
2298 (KWQClipboard::becomeNumb): Set policy to numb.
2299 (KWQClipboard::clearData): Check policy.
2300 (KWQClipboard::clearAllData): Check policy.
2301 (KWQClipboard::getData): Check policy and changeCount.
2302 (KWQClipboard::setData): Check policy.
2303 (KWQClipboard::types): Check policy and ChangeCount.
2304 (KWQClipboard::setDragLocation): Check policy.
2305 (KWQClipboard::setDragImage): Check policy.
2306 (KWQClipboard::setDropEffect): Check policy.
2307 (KWQClipboard::setEffectAllowed): Check policy.
2308 * kwq/KWQKHTMLPart.mm:
2309 (KWQKHTMLPart::dispatchDragSrcEvent): Set policy when creating clipboard,
2310 and numb-ify it when we're done.
2311 * kwq/WebCoreBridge.mm:
2312 (-[WebCoreBridge dragOperationForDraggingInfo:]): Set policy when creating clipboard,
2313 and numb-ify it when we're done.
2314 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
2315 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
2317 2004-06-08 Ken Kocienda <kocienda@apple.com>
2321 * khtml/editing/jsediting.cpp:
2322 (DOM::EditorCommand::): Stray capital letter in "selectAll" command static
2323 initializer prevented the command from ever working since the command
2324 strings are lower-cased when trying to find a match, but not when they
2325 are inserted into the dictionary. This is a one character change to make
2326 the string "selectall" in the initializer.
2328 2004-06-07 Trey Matteson <trey@apple.com>
2330 WebCore will now generate a default drag image when an element serves as a drag
2331 source. The basic idea is the image contains the element and all its children.
2333 As for the implementation, instead of adding a new paintAction I added a new
2334 field to the paintInfo struct, "paintingRoot". If this field is set, painting will
2335 only paint that root's descendants.
2337 Some code also moved from the bridge to the part, to be available within WebCore.
2341 * khtml/rendering/render_block.cpp:
2342 (khtml::RenderBlock::paintObject): Pass along paintingRoot to kids.
2343 (khtml::RenderBlock::paintFloats): Pass along paintingRoot to kids.
2344 * khtml/rendering/render_box.cpp:
2345 (RenderBox::paintBoxDecorations): Test paintingRoot before painting.
2346 * khtml/rendering/render_canvasimage.cpp:
2347 (RenderCanvasImage::paint): Test paintingRoot before painting.
2348 * khtml/rendering/render_flow.cpp:
2349 (RenderFlow::paintLineBoxBackgroundBorder): Test paintingRoot before painting.
2350 (RenderFlow::paintLineBoxDecorations): Test paintingRoot before painting.
2351 * khtml/rendering/render_image.cpp:
2352 (RenderImage::paint): Test paintingRoot before painting.
2353 * khtml/rendering/render_inline.cpp:
2354 (RenderInline::paint): Pass along paintingRoot to kids.
2355 * khtml/rendering/render_layer.cpp:
2356 (RenderLayer::paint): Pass along paintingRoot to kids.
2357 (RenderLayer:: paintLayer): Pass along paintingRoot to kids. Test if we are within the
2358 paintingRoot to decide whether to pass the root to our renderer.
2359 * khtml/rendering/render_layer.h:
2360 * khtml/rendering/render_object.cpp:
2361 (RenderObject::hasAncestor): New utility.
2362 (RenderObject::absoluteBoundingBoxRect): Helper for paintingRootRect
2363 (RenderObject::addAbsoluteRectForLayer): Helper for paintingRootRect
2364 (RenderObject::paintingRootRect): Return rect that will be painted if we are
2366 (RenderObject::draggableNode): Add test to avoid rare NULL ptr crash.
2367 * khtml/rendering/render_object.h:
2368 (khtml::RenderObject::PaintInfo::PaintInfo): Add paintingRoot field.
2369 (khtml::RenderObject::paintingRootForChildren): New utility. Return the current
2370 paintingRoot, or nil if we are the root (so kids draw normally).
2371 (khtml::RenderObject::shouldPaintWithinRoot): New utility. We can paint if we
2372 are the paintingRoot, or no root is set.
2373 * khtml/rendering/render_replaced.cpp:
2374 (RenderReplaced::shouldPaint): Pass along paintingRoot to kids.
2375 * khtml/rendering/render_table.cpp:
2376 (RenderTable::paint): Pass along paintingRoot to kids.
2377 * khtml/rendering/render_text.cpp:
2378 (RenderText::paint): Test paintingRoot before painting.
2379 * kwq/KWQKHTMLPart.h:
2380 * kwq/KWQKHTMLPart.mm:
2381 (KWQKHTMLPart::KWQKHTMLPart): Init new _elementToDraw member.
2382 (KWQKHTMLPart::paint): Generalized to handle cases of painting selection or a
2384 (KWQKHTMLPart::khtmlMouseMoveEvent): Make a default image if dragSrc didn't
2386 (KWQKHTMLPart::selectionRect): Moved from bridge.
2387 (KWQKHTMLPart::visibleSelectionRect): Ditto.
2388 (KWQKHTMLPart::imageFromRect): Newly factored code, from bridge.
2389 (KWQKHTMLPart::selectionImage): Moved from bridge, wrapper around imageFromRect.
2390 (KWQKHTMLPart::elementImage): New method, wrapper around imageFromRect.
2391 * kwq/WebCoreBridge.h:
2392 * kwq/WebCoreBridge.mm:
2393 (-[WebCoreBridge drawRect:withPainter:]): Just call part to draw.
2394 (-[WebCoreBridge visibleSelectionRect]): Guts moved to part.
2395 (-[WebCoreBridge selectionImage]): Ditto.
2397 2004-06-07 Darin Adler <darin@apple.com>
2401 - fixed <rdar://problem/3682821>: (setTimeout fails when additional parameters are used and timeout function is a string)
2403 * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Ignore excess arguments instead
2404 of rejecting the argument list for window.scrollBy, scroll, scrollTo, moveBy, moveTo,
2405 resizeBy, resizeTo, and setTimeout (when the timeout is a string rather than an object).
2407 - did a refinement of JSEditor to be slightly more efficient, and not have to edit
2408 both the .cpp file and the .h when adding more implementation
2410 * khtml/khtml_part.h: Hack so we can get to the docImpl and xmlDocImpl without being a friend.
2411 * khtml/editing/jsediting.h: Simplified a bit.
2412 * khtml/editing/jsediting.cpp: Redid to use a table, and simplified a bit.
2414 2004-06-07 Ken Kocienda <kocienda@apple.com>
2420 <rdar://problem/3682354>: "Typing style does not work yet"
2422 Did the final hook-up of support that has landed in the tree in the
2423 recent past as part of ongoing style-application work.
2425 For the most part, this patch modifies the InputNewlineCommandImpl and
2426 InputTextCommandImpl commands to insert a styling span when there is
2427 a typing style active.
2429 * khtml/editing/htmlediting_impl.cpp:
2430 (khtml::CompositeEditCommandImpl::createTypingStyleElement): Helper
2431 shared by the two commands modified.
2432 (khtml::InputNewlineCommandImpl::doApply): Create a styling span if the
2433 part has a typing style. Maintain a nodeToInsert local variable, which is
2434 either the break to insert or a styling span containing the break. Also,
2435 remove some utterly bogus derefs. They are just plain wrong.
2436 (khtml::InputTextCommandImpl::InputTextCommandImpl): Don't need to keep
2437 m_insertedTextNode. The composite commands this command uses will keep
2438 track of that object's lifetime. We do not need to do that here.
2439 (khtml::InputTextCommandImpl::~InputTextCommandImpl): No longer need
2440 to deref obsolete m_insertedTextNode.
2441 (khtml::InputTextCommandImpl::prepareForTextInsertion): Handle the case
2442 where a styling span needs to be added.
2443 (khtml::TypingCommandImpl::insertText): Create a new InputTextCommand when
2444 there is an active typping style.
2445 * khtml/editing/htmlediting_impl.h: Declare createTypingStyleElement helper.
2446 Remove m_insertedTextNode from InputTextCommandImpl.
2447 * kwq/WebCoreBridge.mm:
2448 (-[WebCoreBridge applyStyle:]): Swicth on the state of the selection, calling
2449 setTypingStyle when a caret and ApplyStyleCommand when a range.
2451 2004-06-07 Darin Adler <darin@apple.com>
2455 * khtml/editing/jsediting.h: Elide some unnecessary namespace prefixes.
2456 * khtml/editing/jsediting.cpp: Make typed constants instead of macros.
2457 (DOM::JSEditor::commandDict): Elide unnecessary namespace prefix.
2458 (DOM::JSEditor::execCommand): Remove xxxNotImplemented functions; just return false instead.
2459 (DOM::JSEditor::queryCommandEnabled): Ditto.
2460 (DOM::JSEditor::queryCommandIndeterm): Ditto.
2461 (DOM::JSEditor::queryCommandState): Ditto.
2462 (DOM::JSEditor::queryCommandSupported): Ditto.
2463 (DOM::JSEditor::queryCommandValue): Ditto.
2465 2004-06-05 Trey Matteson <trey@apple.com>
2467 As agreed with Hyatt and Louch, do not post incoming dragging events
2472 * khtml/khtmlview.cpp:
2473 (KHTMLView::updateDragAndDrop): For any drag target that is a text node,
2474 use its parent instead.
2476 2004-06-03 Trey Matteson <trey@apple.com>
2478 DHTML dragging uses the Cocoa NSDragOperation on both the source and dest ends.
2480 In addition, I caught a prime gaffe where I had used "dropAllowed" instead of "effectAllowed"
2481 for that particular WinIE property. That is renamed throughout.
2485 * khtml/ecma/kjs_events.cpp:
2486 (stringOrUndefined): New little helper.
2487 (Clipboard::getValueProperty): Return Undefined if dropEffect or effectAllowed are not set.
2488 (Clipboard::putValue): Rename.
2489 * khtml/ecma/kjs_events.h:
2490 (KJS::Clipboard::): Rename.
2491 * khtml/ecma/kjs_events.lut.h:
2492 * khtml/xml/dom2_eventsimpl.h: Rename.
2493 * kwq/KWQClipboard.h: Rename, add access to Cocoa drag op.
2494 * kwq/KWQClipboard.mm:
2495 (KWQClipboard::dropEffect): These 4 just moved in the file.
2496 (KWQClipboard::setDropEffect):
2497 (KWQClipboard::effectAllowed):
2498 (KWQClipboard::setEffectAllowed):
2499 (cocoaOpFromIEOp): Convert from an IE operation string to a Cocoa DragOp
2500 (IEOpFromCocoaOp): and vice-versa
2501 (KWQClipboard::sourceOperation): Return effectAllowed, converted to a NSDragOp
2502 (KWQClipboard::destinationOperation): Return dropEffect, converted to a NSDragOp
2503 (KWQClipboard::setSourceOperation): Set effectAllowed, using a Cocoa value
2504 (KWQClipboard::setDestinationOperation): Set dropEffect, using a Cocoa value
2505 * kwq/KWQKHTMLPart.h:
2506 * kwq/KWQKHTMLPart.mm:
2507 (KWQKHTMLPart::dispatchDragSrcEvent): Return the drag op specified by the source element.
2508 (KWQKHTMLPart::khtmlMouseMoveEvent): Pass our drag op up to WebKit.
2509 (KWQKHTMLPart::dragSourceMovedTo): Pass NULL for new arg.
2510 (KWQKHTMLPart::dragSourceEndedAt): Ditto
2511 * kwq/WebCoreBridge.h:
2512 * kwq/WebCoreBridge.mm:
2513 (-[WebCoreBridge dragOperationForDraggingInfo:]): Set the incoming dragOp onto the clipboard
2514 so DHTML can access it. In addition, validate whatever op DHTML returns so we play well
2517 2004-06-04 David Hyatt <hyatt@apple.com>
2519 Add support for auto values in flex transitions. Add support for mapping the back end values to
2520 front end values. Next it's time to actually try to use this stuff in render_flexbox.
2524 * khtml/css/css_valueimpl.cpp:
2526 * khtml/css/css_valueimpl.h:
2527 (DOM::FlexGroupTransitionValueImpl::isAuto):
2528 * khtml/css/cssparser.cpp:
2529 (FlexGroupTransitionParseContext::length):
2530 (FlexGroupTransitionParseContext::commitAutoValue):
2531 (FlexGroupTransitionParseContext::commitValue):
2532 (CSSParser::parseFlexGroupTransition):
2533 * khtml/css/cssstyleselector.cpp:
2534 (khtml::CSSStyleSelector::applyProperty):
2535 * khtml/rendering/render_style.cpp:
2536 (FlexGroupTransitionData::operator==):
2537 * khtml/rendering/render_style.h:
2538 (khtml::FlexGroupTransitionData::next):
2539 (khtml::FlexGroupTransitionData::isAuto):
2543 2004-06-04 Kevin Decker <kdecker@apple.com>
2547 - kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary
2548 - khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url,
2549 so we leave this blank
2550 - khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL
2551 - khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole
2552 - khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL
2554 * khtml/ecma/kjs_events.cpp:
2555 (JSEventListener::handleEvent):
2556 (JSLazyEventListener::handleEvent):
2557 * khtml/ecma/kjs_proxy.cpp:
2558 (KJSProxyImpl::evaluate):
2559 * khtml/ecma/kjs_window.cpp:
2560 (Window::isSafeScript):
2561 (ScheduledAction::execute):
2562 * khtml/xml/dom_docimpl.cpp:
2563 (DocumentImpl::open):
2564 * kwq/KWQKHTMLPart.h:
2565 * kwq/KWQKHTMLPart.mm:
2566 (KWQKHTMLPart::addMessageToConsole):
2568 2004-06-04 Ken Kocienda <kocienda@apple.com>
2572 Fix a comical little bug where the style-applying code did not take into
2573 account deleting content from the start of a block. After the deletion,
2574 the caret is placed in the node before the deleted content and so
2575 inserting a styled fragment after the deletion position works great.
2576 The problem is that if the selectionis at the start of a block, there
2577 is no "position before the deletion" and the caret is placed in the new
2578 first child of the block. Inserting the styled content after this
2579 node is just plain wrong. Now, this case is handled correctly, and the
2580 styled content is inserted in the proper position.
2582 * khtml/editing/htmlediting_impl.cpp:
2583 (khtml::ApplyStyleCommandImpl::insertFragment):
2585 2004-06-04 Ken Kocienda <kocienda@apple.com>
2589 * khtml/rendering/bidi.cpp:
2590 (khtml::RenderBlock::layoutInlineChildren): Only add additional line height
2591 in for root editable elements. This helps to keep layout from deviating too
2592 much from the intended page layout, but still gives an empty document a line
2593 in which it can blink the caret.
2595 2004-06-04 Ken Kocienda <kocienda@apple.com>
2599 Made some progress on this set of related bugs:
2601 <rdar://problem/3675867>: "Make execCommand work as specified in the Javascript execCommand Compatibility Plan"
2602 <rdar://problem/3675898>: "Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan"
2603 <rdar://problem/3675899>: "Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan"
2604 <rdar://problem/3675901>: "Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan"
2605 <rdar://problem/3675903>: "Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan"
2606 <rdar://problem/3675904>: "Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan"
2608 I did several things to move the ahead with the plan:
2610 1. The latter five methods did not appear in the tree at all. Now they do, although
2612 2. I removed the implementation for these editing methods from dom_docimpl.cpp, and moved
2613 them out to new js_editing.cpp/js_editing.h files. The remaining code in dom_docimpl.cpp
2614 is glue to call over to the new JSEditor object defined in the new files.
2616 3. For a couple of the command implementations in js_editing.cpp, I made a stab at returning sensible values.
2617 For others, I just return place-holder values. I have added some comments to describe what has been done and
2618 what still needs to be done.
2620 * WebCore.pbproj/project.pbxproj:
2621 * khtml/dom/dom_doc.cpp: Add call-overs for these methods.
2622 (DOM::Document::queryCommandEnabled):
2623 (DOM::Document::queryCommandIndeterm):
2624 (DOM::Document::queryCommandState):
2625 (DOM::Document::queryCommandSupported):
2626 (DOM::Document::queryCommandValue):
2627 * khtml/dom/dom_doc.h:
2628 * khtml/ecma/kjs_dom.cpp: Add queryCommandXXX terminology.
2629 (DOMDocumentProtoFunc::tryCall):
2630 * khtml/ecma/kjs_dom.h:
2631 (KJS::DOMDocument::):
2632 * khtml/ecma/kjs_dom.lut.h:
2634 * khtml/editing/jsediting.cpp: Added. This file implements the guts of editing-related JS methods.
2635 (DOM::execCommandNotImplemented):
2636 (DOM::queryBoolNotImplemented):
2637 (DOM::queryValueNotImplemented):
2638 (DOM::JSEditor::commandDict):
2639 (DOM::JSEditor::JSEditor):
2640 (DOM::JSEditor::~JSEditor):
2641 (DOM::JSEditor::commandIdentifier):
2642 (DOM::JSEditor::addCommand):
2643 (DOM::JSEditor::initDict):
2644 (DOM::JSEditor::execCommand):
2645 (DOM::JSEditor::queryCommandEnabled):
2646 (DOM::JSEditor::queryCommandIndeterm):
2647 (DOM::JSEditor::queryCommandState):
2648 (DOM::JSEditor::queryCommandSupported):
2649 (DOM::JSEditor::queryCommandValue):
2650 (DOM::JSEditor::execCommandCopy):
2651 (DOM::JSEditor::execCommandCut):
2652 (DOM::JSEditor::execCommandDelete):
2653 (DOM::JSEditor::execCommandInsertText):
2654 (DOM::JSEditor::execCommandPaste):
2655 (DOM::JSEditor::execCommandRedo):
2656 (DOM::JSEditor::execCommandSelectAll):
2657 (DOM::JSEditor::execCommandUndo):
2658 (DOM::JSEditor::enabledIfPartNotNull):
2659 (DOM::JSEditor::enabledIfSelectionNotEmpty):
2660 (DOM::JSEditor::enabledIfSelectionIsRange):
2661 (DOM::JSEditor::commandSupported):
2662 * khtml/editing/jsediting.h: Added.
2663 (DOM::JSEditor::CommandIdentifier::CommandIdentifier):
2664 (DOM::JSEditor::document):
2665 (DOM::JSEditor::part):
2666 * khtml/xml/dom_docimpl.cpp: Rework JS editing support into glue that calls over into new JSEditor object.
2667 (DocumentImpl::DocumentImpl):
2668 (DocumentImpl::~DocumentImpl):
2669 (DocumentImpl::jsEditor):
2670 (DocumentImpl::execCommand):
2671 (DocumentImpl::queryCommandEnabled):
2672 (DocumentImpl::queryCommandIndeterm):
2673 (DocumentImpl::queryCommandState):
2674 (DocumentImpl::queryCommandSupported):
2675 (DocumentImpl::queryCommandValue):
2676 * khtml/xml/dom_docimpl.h:
2678 2004-06-03 Richard Williamson <rjw@apple.com>
2680 Added setCompositeOperation method to Context2D.
2681 Actually pass composite operation to drawPixmap (instead of 1).
2685 * khtml/ecma/kjs_html.cpp:
2686 (KJS::Context2DFunction::tryCall):
2687 * khtml/ecma/kjs_html.h:
2689 * khtml/ecma/kjs_html.lut.h:
2692 * kwq/KWQPainter.mm:
2693 (QPainter::compositeOperatorFromString):
2694 (QPainter::drawPixmap):
2696 2004-06-03 David Hyatt <hyatt@apple.com>
2698 Add support for box-flex-group-transition (whew!), a new property that is going to enable some incredibly
2699 complicated flexing layouts in HTML.
2701 This is Stage 1 - wire up the CSS property and make it get parsed into front-end data. Nobody actually looks
2706 * khtml/css/css_valueimpl.cpp:
2707 (CSSInheritedValueImpl::cssText):
2708 (ShadowValueImpl::cssText):
2710 (FlexGroupTransitionValueImpl::~FlexGroupTransitionValueImpl):
2711 (FlexGroupTransitionValueImpl::cssText):
2712 * khtml/css/css_valueimpl.h:
2713 (DOM::FlexGroupTransitionValueImpl::cssValueType):
2714 * khtml/css/cssparser.cpp:
2715 (CSSParser::parseValue):
2716 (CSSParser::parseShadow):
2717 (FlexGroupTransitionParseContext::length):
2718 (FlexGroupTransitionParseContext::~FlexGroupTransitionParseContext):
2719 (FlexGroupTransitionParseContext::failed):
2720 (FlexGroupTransitionParseContext::allowGroup):
2721 (FlexGroupTransitionParseContext::commitGroup):
2722 (FlexGroupTransitionParseContext::commitSlash):
2723 (FlexGroupTransitionParseContext::commitLength):
2724 (FlexGroupTransitionParseContext::commitValue):
2725 (CSSParser::parseFlexGroupTransition):
2726 * khtml/css/cssparser.h:
2727 * khtml/css/cssproperties.c:
2730 * khtml/css/cssproperties.h:
2731 * khtml/css/cssproperties.in:
2732 * khtml/rendering/render_style.cpp:
2733 (StyleFlexibleBoxData::StyleFlexibleBoxData):
2734 (StyleFlexibleBoxData::operator==):
2735 (StyleFlexibleBoxData::transitionDataEquivalent):
2736 (StyleCSS3InheritedData::operator==):
2737 (StyleCSS3InheritedData::shadowDataEquivalent):
2738 (ShadowData::operator==):
2739 (RenderStyle::setBoxFlexGroupTransition):
2741 (FlexGroupTransitionData::operator==):
2742 * khtml/rendering/render_style.h:
2743 (khtml::FlexGroupTransitionData::next):
2744 (khtml::FlexGroupTransitionData::~FlexGroupTransitionData):
2745 (khtml::FlexGroupTransitionData::operator!=):
2746 (khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
2747 (khtml::RenderStyle::boxFlexGroupTransition):
2749 2004-06-03 Richard Williamson <rjw@apple.com>
2751 Add extra sanity check to Image parameter of drawImage...
2755 * khtml/ecma/kjs_html.cpp:
2756 (KJS::Context2DFunction::tryCall):
2758 2004-06-02 David Hyatt <hyatt@apple.com>
2760 Fix for 3673931, negative margins on objects that dodge floats not handled correctly.
2764 * khtml/rendering/render_block.cpp:
2765 (khtml::RenderBlock::layoutBlockChildren):
2767 2004-06-03 Ken Kocienda <kocienda@apple.com>
2771 Fix for layout regression I caused when fixing:
2773 <rdar://problem/3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
2775 Extra height is added to empty blocks that are editable, so we can click to place
2776 the caret in them. This extra height was erroneously being added to non-editable
2777 blocks as a result of my earlier change. After looking at this and doing some
2778 code review, there are the following changes:
2780 Change away from "containingBlock" terminology in the NodeImpl class. The
2781 operation we are doing in NodeImpl is not the same as what is done in CSS
2782 when it uses the term "containingBlock" so:
2783 containingBlock changes to enclosingBlockFlowElement, and
2784 rootEditableBlock changes to rootEditableElement
2786 The vast majority of changes here are to make these name changes. The other
2787 significant piece of work, and the fix for the regression, is to change
2788 bidi.cpp to only include this extra line height if a block is empty
2789 and is content-editable.
2791 * khtml/editing/htmlediting_impl.cpp:
2792 (khtml::leadingWhitespacePosition):
2793 (khtml::trailingWhitespacePosition):
2794 (khtml::DeleteSelectionCommandImpl::doApply):
2795 (khtml::InputNewlineCommandImpl::doApply):
2796 (khtml::RemoveNodeAndPruneCommandImpl::doApply):
2797 (khtml::TypingCommandImpl::issueCommandForDeleteKey):
2798 * khtml/rendering/bidi.cpp:
2799 (khtml::RenderBlock::layoutInlineChildren):
2800 * khtml/xml/dom_docimpl.cpp:
2801 (DocumentImpl::relinquishesEditingFocus):
2802 (DocumentImpl::acceptsEditingFocus):
2803 * khtml/xml/dom_nodeimpl.cpp:
2804 * khtml/xml/dom_nodeimpl.h:
2805 * khtml/xml/dom_position.cpp:
2806 (DOM::Position::equivalentLeafPosition):
2807 (DOM::Position::previousCharacterPosition):
2808 (DOM::Position::nextCharacterPosition):
2809 (DOM::Position::previousLinePosition):
2810 (DOM::Position::nextLinePosition):
2811 (DOM::Position::equivalentUpstreamPosition):
2812 (DOM::Position::equivalentDownstreamPosition):
2813 (DOM::Position::atStartOfRootEditableElement):
2814 (DOM::Position::inRenderedContent):
2815 (DOM::Position::rendersOnSameLine):
2816 (DOM::Position::rendersInDifferentPosition):
2817 (DOM::Position::isLastRenderedPositionInEditableBlock):
2818 (DOM::Position::inFirstEditableInRootEditableElement):
2819 (DOM::Position::inLastEditableInRootEditableElement):
2820 (DOM::Position::inFirstEditableInContainingEditableBlock):
2821 (DOM::Position::inLastEditableInContainingEditableBlock):
2822 * khtml/xml/dom_position.h:
2823 * khtml/xml/dom_selection.cpp:
2824 (DOM::Selection::moveToRenderedContent):
2826 2004-06-02 Trey Matteson <trey@apple.com>
2828 Added types property to JS clipboard object.
2830 Reviewed by Richard.
2832 * khtml/ecma/kjs_events.cpp:
2833 (Clipboard::getValueProperty): Create JS array for strings coming from the clipboard impl.
2834 * khtml/ecma/kjs_events.h:
2836 * khtml/ecma/kjs_events.lut.h:
2837 * kwq/KWQClipboard.mm:
2838 (MIMETypeFromCocoaType): New helper routine to map types.
2839 (KWQClipboard::types): Implement based on NSPasteboard's types.
2841 2004-06-02 Richard Williamson <rjw@apple.com>
2843 Corrected typo ID_IMG should have been ID_CANVAS when
2844 checking for the canvas composite operator.
2848 * khtml/rendering/render_canvasimage.cpp:
2849 (RenderCanvasImage::paint):
2851 2004-06-02 Richard Williamson <rjw@apple.com>
2853 Correctly size the <CANVAS> if margins, borders, or
2858 * khtml/rendering/render_canvasimage.cpp:
2859 (RenderCanvasImage::createDrawingContext):
2861 2004-06-01 Trey Matteson <trey@apple.com>
2863 First cut at the source side of DHTML dragging. Following IE, new events are added:
2864 ondragstart, ondrag, ondragend. The recently added CSS property -khtml-user-drag can
2865 be used to make an element draggable. event.dataTransfer.setDragImage(ImageObject,x,y)
2866 can be used from ondragstart to set a static image for the dragImage. x,y is the location
2867 of the mouse within the image from the upper right corner. clipboard methods setdata
2868 and cleardata are implemented.
2872 * khtml/ecma/kjs_dom.cpp:
2873 (DOMNode::getValueProperty): Boilerplate for new events
2874 (DOMNode::putValue): Boilerplate for new events
2875 * khtml/ecma/kjs_dom.h:
2876 (KJS::DOMNode::): Boilerplate for new events
2877 * khtml/ecma/kjs_dom.lut.h:
2878 * khtml/ecma/kjs_events.cpp:
2879 (DOMMouseEvent::getValueProperty): Return undefined for clipboard when its not a drag event.
2880 (ClipboardProtoFunc::tryCall): setDragImage glue to clipboard routine.
2881 * khtml/ecma/kjs_events.h:
2883 * khtml/ecma/kjs_events.lut.h:
2884 * khtml/html/html_elementimpl.cpp:
2885 (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events
2886 * khtml/khtml_part.cpp:
2887 (KHTMLPart::shouldDragAutoNode): Empty impl of new method, where UA determines
2888 draggability for events with -khtml-user-drag=auto
2889 * khtml/khtml_part.h:
2890 * khtml/misc/htmlattrs.c:
2891 * khtml/misc/htmlattrs.h:
2892 * khtml/misc/htmlattrs.in: Boilerplate for new events
2893 * khtml/rendering/render_object.cpp:
2894 (RenderObject::draggableNode): Find the node or parent node which might be dragged.
2895 * khtml/rendering/render_object.h:
2896 * khtml/xml/dom2_eventsimpl.cpp:
2897 (EventImpl::typeToId): Boilerplate for new events
2898 (EventImpl::idToType): Boilerplate for new events
2899 * khtml/xml/dom2_eventsimpl.h:
2900 (DOM::EventImpl::): Boilerplate for new events
2901 * kwq/KWQClipboard.h:
2902 * kwq/KWQClipboard.mm:
2903 (KWQClipboard::clearData): Implemented to call NSPasteboard
2904 (KWQClipboard::clearAllData): ditto
2905 (KWQClipboard::getData): fix corner case that came up testing
2906 (KWQClipboard::setData): Implemented to call NSPasteboard
2907 (KWQClipboard::dragLocation): Simple setter/getters
2908 (KWQClipboard::setDragLocation):
2909 (KWQClipboard::dragImage):
2910 (KWQClipboard::setDragImage):
2911 (KWQClipboard::dragNSImage):
2912 * kwq/KWQKHTMLPart.h:
2913 * kwq/KWQKHTMLPart.mm:
2914 (KWQKHTMLPart::KWQKHTMLPart): init new member var
2915 (KWQKHTMLPart::dragHysteresisExceeded): Hysteresis moved here from WebKit
2916 (KWQKHTMLPart::dispatchDragSrcEvent): Send a dragging event to the current dragSource
2917 (KWQKHTMLPart::khtmlMouseMoveEvent): Initiate dragging, now including consulting DHTML,
2918 hysteresis and sending ondragstart.
2919 (KWQKHTMLPart::dragSourceMovedTo): simple passthrough
2920 (KWQKHTMLPart::dragSourceEndedAt): simple passthrough
2921 (KWQKHTMLPart::mouseDown): salt away _mouseDownX, _mouseDownY
2922 (KWQKHTMLPart::shouldDragAutoNode): Called for -khtml-user-drag=auto. We just call
2924 * kwq/WebCoreBridge.h:
2925 * kwq/WebCoreBridge.mm:
2926 (-[WebCoreBridge dragSourceMovedTo:]): New glue to drive new dragging events.
2927 (-[WebCoreBridge dragSourceEndedAt:operation:]):
2929 2004-06-02 Ken Kocienda <kocienda@apple.com>
2933 Finish off name change from previous check-in by changing dom_edititerator
2934 file names to dom_positioniterator. Files copied and renamed in repository.
2935 Includes updated as needed.
2937 * ForwardingHeaders/xml/dom_edititerator.h: Removed.
2938 * ForwardingHeaders/xml/dom_positioniterator.h: Added.
2939 * WebCore.pbproj/project.pbxproj:
2940 * khtml/editing/htmlediting_impl.cpp:
2941 * khtml/xml/dom_edititerator.cpp: Removed.
2942 * khtml/xml/dom_edititerator.h: Removed.
2943 * khtml/xml/dom_position.cpp:
2944 * khtml/xml/dom_positioniterator.cpp: Added.
2945 (DOM::PositionIterator::peekPrevious):
2946 (DOM::PositionIterator::peekNext):
2947 (DOM::PositionIterator::atStart):
2948 (DOM::PositionIterator::atEnd):
2949 * khtml/xml/dom_positioniterator.h: Added.
2950 (DOM::PositionIterator::PositionIterator):
2951 (DOM::PositionIterator::current):
2952 (DOM::PositionIterator::previous):
2953 (DOM::PositionIterator::next):
2954 (DOM::PositionIterator::setPosition):
2955 (DOM::PositionIterator::isEmpty):
2956 * khtml/xml/dom_selection.cpp:
2958 2004-06-02 Ken Kocienda <kocienda@apple.com>
2962 Probable fix for this bug:
2964 <rdar://problem/3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
2966 I could not reproduce the bug myself, which is why I call the fix
2969 Darin and I did some code inspection and found some problems
2970 with the equivalentUpstreamPosition and
2971 equivalentDownstreamPosition functions on DOM::Position and how
2972 these functions dealt with changing from editable to
2973 non-editable content. As a result of these discoveries, I went
2974 over this code and the helpers and functions which support them,
2975 and made some corrections and simplifications. The big changes
2978 1. Rename EditIterator class to PositionIterator. This class needs
2979 to run code for selections in non-editable content, so the name
2980 change is appropriate.
2982 2. Change containingEditableBlock to containingBlock. It turns out
2983 that none of the editing code relies on the distinction between
2984 editable blocks and non-editable blocks. The important distinction
2985 is the block boundary. The notion of rootEditableBlock remains.
2987 * khtml/editing/htmlediting_impl.cpp:
2988 (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): PositionIterator name change.
2989 (khtml::DeleteSelectionCommandImpl::joinTextNodesWithSameStyle): Ditto.
2990 (khtml::DeleteSelectionCommandImpl::containsOnlyWhitespace): Ditto.
2991 (khtml::DeleteSelectionCommandImpl::doApply): Ditto.
2992 (khtml::InputNewlineCommandImpl::doApply): Ditto.
2993 (khtml::RemoveNodeAndPruneCommandImpl::doApply): Ditto.
2994 * khtml/rendering/bidi.cpp:
2995 (khtml::RenderBlock::layoutInlineChildren): Ditto.
2996 * khtml/xml/dom_edititerator.cpp:
2997 (DOM::PositionIterator::peekPrevious): Call for previousLeafNode instead of previousEditable.
2998 Editable check is not appropriate as this class is used for non-editable content.
2999 (DOM::PositionIterator::peekNext): Call nextLeafNode instead of nextEditable, as above.
3000 (DOM::PositionIterator::atStart): Call for previousLeafNode instead of previousEditable, as above.
3001 (DOM::PositionIterator::atEnd): Call nextLeafNode instead of nextEditable, as above.
3002 * khtml/xml/dom_edititerator.h:
3003 (DOM::PositionIterator::PositionIterator): PositionIterator name change. Remove unused and unneeded constructors.
3004 * khtml/xml/dom_nodeimpl.cpp:
3005 (NodeImpl::previousEditable): Simplify. Rely on previousLeafNode as a helper.
3006 (NodeImpl::nextEditable): Ditto, but rely on nextLeafNode.
3007 (NodeImpl::previousLeafNode): Remove tree-walking code. Rely on traversePreviousNode as a helper.
3008 (NodeImpl::nextLeafNode): Ditto, but rely on traverseNextNode.
3009 (NodeImpl::containingBlock): Renamed replacement for containingEditableBlock.
3010 (NodeImpl::inSameContainingEditableBlock): Call renamed containingBlock.
3011 * khtml/xml/dom_nodeimpl.h:
3012 * khtml/xml/dom_position.cpp:
3013 (DOM::Position::previousCharacterPosition): Various name changes, as described above.
3014 (DOM::Position::nextCharacterPosition): Ditto.
3015 (DOM::Position::previousWordPosition): Ditto.
3016 (DOM::Position::nextWordPosition): Ditto.
3017 (DOM::Position::previousLinePosition): Ditto.
3018 (DOM::Position::nextLinePosition): Ditto.
3019 (DOM::Position::equivalentUpstreamPosition): Remove bogus check for editable node in loop. Perform
3020 improved block-crossing check at start of loop which works for editable and non-editable content.
3021 This is the crux of the fix for the bug.
3022 (DOM::Position::equivalentDownstreamPosition): Ditto.
3023 (DOM::Position::inRenderedContent): Various name changes, as described above.
3024 (DOM::Position::rendersOnSameLine): Ditto.
3025 (DOM::Position::rendersInDifferentPosition): Ditto.
3026 (DOM::Position::isFirstRenderedPositionOnLine): Ditto.
3027 (DOM::Position::isLastRenderedPositionOnLine): Ditto.
3028 (DOM::Position::isLastRenderedPositionInEditableBlock): Ditto.
3029 (DOM::Position::inFirstEditableInRootEditableBlock): Ditto.
3030 (DOM::Position::inLastEditableInRootEditableBlock): Ditto.
3031 (DOM::Position::inFirstEditableInContainingEditableBlock): Ditto.
3032 (DOM::Position::inLastEditableInContainingEditableBlock): Ditto.
3034 2004-06-01 Richard Williamson <rjw@apple.com>
3036 Fixed deployment build warning.
3038 * khtml/rendering/render_canvasimage.cpp:
3039 (RenderCanvasImage::paint):
3041 2004-06-01 Richard Williamson <rjw@apple.com>
3043 Added support for composite attribute to <CANVAS>
3044 Added support for drawImage and drawImageFromRect to <CANVAS>, i.e.:
3050 var img = new Image(600,600);
3052 function drawImage()
3054 var aCanvas = document.getElementById ("canvas1");
3055 var context = aCanvas.getContext("context-2d");
3056 context.drawImage (img, 0, 0, 600, 600, "copy");
3059 img.onload = drawImage;
3060 img.src = "http://www.google.com/images/logo.gif";
3065 <canvas id="canvas1" width=600 height=600>
3071 * khtml/ecma/kjs_html.cpp:
3072 (KJS::Context2DFunction::tryCall):
3073 (Context2D::Context2D):
3074 * khtml/ecma/kjs_html.h:
3075 * khtml/rendering/render_canvasimage.cpp:
3076 (RenderCanvasImage::paint):
3078 * kwq/KWQPainter.mm:
3079 (QPainter::getCompositeOperation):
3080 (QPainter::setCompositeOperation):
3081 (QPainter::drawPixmap):
3082 (QPainter::drawTiledPixmap):
3085 (QPixmap::flushRasterCache):
3086 * kwq/WebCoreImageRenderer.h:
3087 * kwq/WebCoreImageRendererFactory.h:
3089 2004-06-01 Ken Kocienda <kocienda@apple.com>
3095 <rdar://problem/3655028>: "Text styles have hard-coded values making bold the only supported text style"
3096 <rdar://problem/3656969>: "HTML Editing: Font panel doesn't work"
3098 * khtml/css/css_valueimpl.cpp:
3099 (FontFamilyValueImpl::cssText): Added implementation for this subclass. Returns parsedFontName.
3100 * khtml/css/css_valueimpl.h: Declare cssText() on FontFamilyValueImpl.
3101 (DOM::CSSProperty::value):
3102 * khtml/editing/htmlediting.cpp:
3103 (khtml::ApplyStyleCommand::ApplyStyleCommand): Changed signature to take a CSSStyleDeclarationImpl.
3104 (khtml::ApplyStyleCommand::style): Added accessor.
3105 * khtml/editing/htmlediting.h: Changed constructor signature to take a CSSStyleDeclarationImpl.
3106 * khtml/editing/htmlediting_impl.cpp:
3107 (khtml::styleSpanClassString): Added helper to return attribute used to tag spans we add to apply styles.
3108 (khtml::ApplyStyleCommandImpl::ApplyStyleCommandImpl): Ref style passed in.
3109 (khtml::ApplyStyleCommandImpl::~ApplyStyleCommandImpl): Deref style passed in.
3110 (khtml::ApplyStyleCommandImpl::doApply): m_removingStyle is obsolete. Removed.
3111 (khtml::ApplyStyleCommandImpl::isHTMLStyleNode): Now checks all properties in the object's declaration.
3112 (khtml::ApplyStyleCommandImpl::removeCSSStyle): Again, now is multi-property-savvy. Will now remove an empty span
3114 (khtml::ApplyStyleCommandImpl::currentlyHasStyle): Replaced, bold-only code with code that can handle all styles.
3115 (khtml::ApplyStyleCommandImpl::computeStyleChange): Helper which helps to determine whether we want to apply
3116 HTML-style markup for bold and italic, and gathers up all style changes that need to be done.
3117 (khtml::ApplyStyleCommandImpl::positionInsertionPoint): Added comment explaining possible optimization that might be
3119 (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Significant reworking; now handles applying multiple styles.
3120 (khtml::ApplyStyleCommandImpl::cloneSelection): Assert fragment has at least one child. Don't want to work
3122 (khtml::ApplyStyleCommandImpl::surroundContentsWithElement): New helper.
3123 (khtml::RemoveCSSPropertyCommandImpl::~RemoveCSSPropertyCommandImpl): Juggle asserts and lifecycle methods to be
3124 more like other commands.
3125 (khtml::RemoveCSSPropertyCommandImpl::doApply): Ditto.
3126 (khtml::RemoveNodeAttributeCommandImpl::~RemoveNodeAttributeCommandImpl): Ditto.
3127 (khtml::RemoveNodeAttributeCommandImpl::doApply):Ditto.
3128 * khtml/editing/htmlediting_impl.h:
3129 (khtml::ApplyStyleCommandImpl::style): Added.
3130 (khtml::ApplyStyleCommandImpl::StyleChange::StyleChange): Added.
3132 (-[DOMCSSStyleDeclaration setProperty:::]): Fix problem where passing an empty NSString to a function expecting a boolean
3133 made all properties important priority.
3134 * kwq/WebCoreBridge.mm:
3135 (-[WebCoreBridge applyStyle:]): Remove provisional code and comment. Now pass along style, following the intended design.
3137 2004-06-01 Chris Blumenberg <cblu@apple.com>
3139 Reviewed by kocienda.
3141 * kwq/WebCoreBridge.h:
3142 * kwq/WebCoreBridge.mm:
3143 (-[WebCoreBridge dragCaretDOMRange]): new, lets WebKit pass the drag caret DOM range to the editing delegate
3145 2004-05-28 John Louch <ouch@apple.com>
3149 - removed setShadowWithColor and change setShadow to work with optional attributes
3150 it follows the same rules as setFill/StrokeColor
3151 - Fixed bug in setFillColor and setStrokeColor for CMYK colors (missing break in case).
3153 * khtml/ecma/kjs_html.cpp:
3154 (KJS::Context2DFunction::tryCall):
3155 * khtml/ecma/kjs_html.h:
3157 * khtml/ecma/kjs_html.lut.h:
3160 2004-05-28 Darin Adler <darin@apple.com>
3164 - various editing-related improvements
3166 * khtml/xml/dom_selection.h: Removed UP and DOWN directions, and added PARAGRAPH granularity.
3167 * khtml/xml/dom_selection.cpp:
3168 (DOM::Selection::modify): Got rid of the UP and DOWN directions, and made movement
3169 between lines happen when granularity is LINE. Added a new unimplemented granularity:
3171 (DOM::Selection::validate): Remove some unneeded APPLE_CHANGES. The code need not be ifdef'd.
3172 (DOM::Selection::debugPosition): Ditto.
3174 * kwq/WebCoreBridge.h: Removed WebSelectUp and WebSelectDown, and added WebSelectByParagraph.
3175 Added stringForRange: and selectedDOMRangeWithGranularity:, and renamed replaceSelectionWithNewline
3176 to insertNewline because it has the insertText: semantic, not the replaceSelectionWithText: one.
3177 * kwq/WebCoreBridge.mm:
3178 (-[WebCoreBridge stringForRange:]): Added.
3179 (-[WebCoreBridge selectedDOMRangeWithGranularity:]): Added.
3180 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Updated code to understand
3181 that vertical movement is based on granularity now, not direction.
3182 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:]): Moved an ensureCaretVisible
3183 from the WebKit down here. I think perhaps this should go down even further in WebCore.
3184 (-[WebCoreBridge insertNewline]): Renamed, and moved ensureCaretVisible here.
3185 (-[WebCoreBridge insertText:]): Moved ensureCaretVisible here.
3186 (-[WebCoreBridge deleteKeyPressed]): Moved ensureCaretVisible here.
3188 * khtml/xml/dom_position.cpp: Some ifdef tweaks.
3190 * khtml/misc/helper.cpp: Namespace and formatting tweaks.
3191 * khtml/misc/helper.h: Removed some unused stuff.
3193 * khtml/dom/dom2_range.h: Make range constructor public so that anyone with
3194 a RangeImpl can easily make a Range.
3196 2004-05-28 Richard Williamson <rjw@apple.com>
3198 setStrokeColor and setFillColor now support
3199 old school web color string, oswcs+alpha, gray, gray+alpha,
3204 * khtml/css/cssparser.cpp:
3205 (CSSParser::parseColor):
3206 (CSSParser::parseColorFromValue):
3207 * khtml/css/cssparser.h: Made parseColor static public class method
3208 * khtml/ecma/kjs_html.cpp:
3209 (KJS::Context2DFunction::tryCall):
3211 2004-05-28 David Hyatt <hyatt@apple.com>
3213 Implement -khtml-user-select and add support for the property -khtml-user-drag (although someone will still
3214 need to wire it up).
3218 * khtml/css/cssparser.cpp:
3219 (CSSParser::parseValue):
3220 * khtml/css/cssproperties.c:
3223 * khtml/css/cssproperties.h:
3224 * khtml/css/cssproperties.in:
3225 * khtml/css/cssstyleselector.cpp:
3226 (khtml::CSSStyleSelector::applyProperty):
3227 * khtml/css/cssvalues.c:
3230 * khtml/css/cssvalues.h:
3231 * khtml/css/cssvalues.in:
3232 * khtml/khtml_part.cpp:
3233 (KHTMLPart::handleMousePressEventDoubleClick):
3234 (KHTMLPart::handleMousePressEventTripleClick):
3235 (KHTMLPart::handleMousePressEventSingleClick):
3236 (KHTMLPart::handleMouseMoveEventSelection):
3237 * khtml/rendering/render_canvas.cpp:
3238 (RenderCanvas::setSelection):
3239 * khtml/rendering/render_object.cpp:
3240 (RenderObject::shouldSelect):
3241 * khtml/rendering/render_object.h:
3242 * khtml/rendering/render_style.cpp:
3244 (StyleCSS3NonInheritedData::operator==):
3245 (RenderStyle::diff):
3246 * khtml/rendering/render_style.h:
3248 (khtml::RenderStyle::userDrag):
3249 (khtml::RenderStyle::userSelect):
3250 (khtml::RenderStyle::setUserDrag):
3251 (khtml::RenderStyle::setUserSelect):
3252 (khtml::RenderStyle::initialUserDrag):
3253 (khtml::RenderStyle::initialUserSelect):
3255 2004-05-28 John Louch <set EMAIL_ADDRESS environment variable>
3256 added addArc and clip path routines.
3258 Reviewed by sullivan.
3260 * khtml/ecma/kjs_html.cpp:
3261 (KJS::Context2DFunction::tryCall):
3262 * khtml/ecma/kjs_html.h:
3264 * khtml/ecma/kjs_html.lut.h:
3267 2004-05-28 John Louch <ouch@apple.com>
3269 Added addArcToPoint and addRect path routines.
3271 Reviewed by sullivan.
3273 * khtml/ecma/kjs_html.cpp:
3274 (KJS::Context2DFunction::tryCall):
3275 * khtml/ecma/kjs_html.h:
3277 * khtml/ecma/kjs_html.lut.h:
3280 2004-05-27 Ken Kocienda <kocienda@apple.com>
3284 * khtml/xml/dom_selection.cpp:
3285 (DOM::Selection::toRange): Add call to update document layout before returning a Range.
3286 This is done to ensure recently-done editing changes are reflected in the calculation
3287 of the Range. This change solves a specific problem with updating the font panel, where
3288 the wrong Range was used, resulting in an incorrect font. Also, defer converting
3289 positions to be range-compliant positions. The nodeIsBeforeNode function is not
3290 range-compliant-position-savvy.
3292 2004-05-27 Kevin Decker <kdecker@apple.com>
3296 - added support for the new JavaScript error console
3297 - error messages are now wired directly to the bridge
3298 - revised generated error message content
3300 * khtml/ecma/kjs_events.cpp:
3301 (JSEventListener::handleEvent):
3302 * khtml/ecma/kjs_proxy.cpp:
3303 (KJSProxyImpl::evaluate):
3304 * khtml/ecma/kjs_window.cpp:
3305 (Window::isSafeScript):
3306 (ScheduledAction::execute):
3307 * kwq/KWQKHTMLPart.h:
3308 * kwq/KWQKHTMLPart.mm:
3309 (KWQKHTMLPart::addMessageToConsole):
3310 * kwq/WebCoreBridge.h:
3311 * kwq/WebCoreBridge.mm:
3313 2004-05-27 Trey Matteson <trey@apple.com>
3315 Two dragging tweaks: ondragleave events are sent before ondragenter events when
3316 going across element boundaries, to match WinIE.
3317 For compatibility with WinIE, we honor MIME types of "Text" and "URL".
3321 * khtml/khtmlview.cpp:
3322 (KHTMLView::updateDragAndDrop):
3323 * kwq/KWQClipboard.mm:
3324 (cocoaTypeFromMIMEType):
3328 2004-05-27 Vicki Murley <vicki@apple.com>
3332 - Fix Tiger build failure. Rename constant "S" to "WHITESPACE",
3333 and change all instances of S to WHITESPACE.
3335 * khtml/css/cssparser.cpp:
3336 (DOM::CSSParser::lex): S to WHITESPACE
3337 * khtml/css/parser.cpp: regenerated file
3338 * khtml/css/parser.h: regenerated file
3339 * khtml/css/parser.y: S to WHITESPACE
3340 * khtml/css/tokenizer.cpp: regenerated file
3341 * khtml/css/tokenizer.flex: S to WHITESPACE
3343 2004-05-27 John Louch <set EMAIL_ADDRESS environment variable>
3345 Reviewed by NOBODY (OOPS!).
3347 * khtml/ecma/kjs_html.cpp:
3348 (KJS::Context2DFunction::tryCall):
3349 * khtml/ecma/kjs_html.h:
3351 * khtml/ecma/kjs_html.lut.h:
3354 2004-05-27 Trey Matteson <trey@apple.com>