1 2004-07-28 Maciej Stachowiak <mjs@apple.com>
5 <rdar://problem/3678534> controls on page at http://help.sap.com don't work properly
7 To fix this I implemented the various JavaScript BarInfo properties in JavaScript.
9 * khtml/ecma/kjs_window.cpp:
11 (Window::locationbar):
13 (Window::personalbar):
19 (SelectionFunc::tryCall):
24 * khtml/ecma/kjs_window.h:
28 (KJS::BarInfo::classInfo):
29 * khtml/ecma/kjs_window.lut.h:
32 * kwq/KWQKHTMLPart.mm:
33 (KWQKHTMLPart::locationbarVisible):
34 (KWQKHTMLPart::menubarVisible):
35 (KWQKHTMLPart::personalbarVisible):
36 (KWQKHTMLPart::scrollbarsVisible):
37 (KWQKHTMLPart::statusbarVisible):
38 (KWQKHTMLPart::toolbarVisible):
40 2004-07-28 Ken Kocienda <kocienda@apple.com>
44 Added more layout tests.
46 * layout-tests/editing/style/style-3681552-fix-001-expected.txt: Added.
47 * layout-tests/editing/style/style-3681552-fix-001.html: Added.
48 * layout-tests/editing/style/style-3681552-fix-002-expected.txt: Added.
49 * layout-tests/editing/style/style-3681552-fix-002.html: Added.
50 * layout-tests/editing/style/style-3690704-fix-expected.txt: Added.
51 * layout-tests/editing/style/style-3690704-fix.html: Added.
52 * layout-tests/editing/style/typing-style-001-expected.txt: Added.
53 * layout-tests/editing/style/typing-style-001.html: Added.
54 * layout-tests/editing/style/typing-style-002-expected.txt: Added.
55 * layout-tests/editing/style/typing-style-002.html: Added.
57 2004-07-28 Ken Kocienda <kocienda@apple.com>
61 Added some layout tests.
63 * layout-tests/editing/selection/select-all-001-expected.txt: Added.
64 * layout-tests/editing/selection/select-all-001.html: Added.
65 * layout-tests/editing/selection/select-all-002-expected.txt: Added.
66 * layout-tests/editing/selection/select-all-002.html: Added.
67 * layout-tests/editing/selection/select-all-003-expected.txt: Added.
68 * layout-tests/editing/selection/select-all-003.html: Added.
70 2004-07-28 Trey Matteson <trey@apple.com>
72 Spellchecking, Part I. Basic spellcheck is working. Spelling panel is hooked up.
74 At this point, no special marking of misspellings, no grammar check, no context
75 menu integration, no "check continually" mode.
77 Much of the TextIterator and CharacterIterator interface got published outside
78 of khtml_text_operations.cpp, with a little API rationalizing.
82 * khtml/misc/khtml_text_operations.cpp:
83 (khtml::TextIterator::range): Name changes.
84 (khtml::CharacterIterator::CharacterIterator): Ditto.
85 (khtml::CharacterIterator::range): Ditto.
86 (khtml::CharacterIterator::advance): Ditto.
87 (khtml::CharacterIterator::string): New method to consume chars into a string.
88 (khtml::WordAwareIterator::WordAwareIterator): New class that iterates over
89 the text respecting word boundaries.
90 (khtml::WordAwareIterator::advance):
91 (khtml::WordAwareIterator::length):
92 (khtml::WordAwareIterator::characters):
93 (khtml::plainText): Name changes.
94 (khtml::findPlainText): Ditto.
96 API moved from cpp to header file.
97 * khtml/misc/khtml_text_operations.h:
98 (khtml::TextIterator::atEnd):
99 (khtml::TextIterator::length):
100 (khtml::TextIterator::characters):
101 (khtml::CharacterIterator::atBreak):
102 (khtml::CharacterIterator::atEnd):
103 (khtml::CharacterIterator::length):
104 (khtml::CharacterIterator::characters):
105 (khtml::CharacterIterator::characterOffset):
106 (khtml::WordAwareIterator::atEnd):
107 (khtml::WordAwareIterator::range):
109 * khtml/xml/dom_position.cpp:
110 (DOM::Position::previousWordBoundary): New name for the old routine. This routines semantics
111 match the current behavior of this code.
112 (DOM::Position::nextWordBoundary): Ditto.
113 (DOM::Position::previousWordPosition): Call old code with the new name. When we fix
114 word advancement, this routine will have its own impl.
115 (DOM::Position::nextWordPosition): Ditto.
116 * khtml/xml/dom_position.h:
117 * khtml/xml/dom_selection.h:
118 (DOM::Selection::rangeStart): New convenience methods
119 (DOM::Selection::rangeEnd):
120 * kwq/KWQKHTMLPart.h:
121 * kwq/KWQKHTMLPart.mm:
122 (KWQKHTMLPart::findString): Ensure we use range-compatible positions.
123 (KWQKHTMLPart::advanceToNextMisspelling): Brand new.
124 * kwq/WebCoreBridge.h:
125 * kwq/WebCoreBridge.mm:
126 (-[WebCoreBridge advanceToNextMisspelling]): Typical bridge glue.
128 2004-07-28 Ken Kocienda <kocienda@apple.com>
134 <rdar://problem/3690704> marking partly bold text italic across blocks wrongly extends the bold section
136 * khtml/editing/htmlediting_impl.cpp:
137 (khtml::ApplyStyleCommandImpl::doApply): Fixed loop that gathers up groups of nodes to
138 pass off to the function that applies styles. While this is meant to be conservative in
139 order to leave the DOM well-formed in all cases, it contained an error where the set
140 of nodes to be styled together erroneously could include a node that was meant for
142 (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Unrelated change to remove DOM:: scope
143 resolution qualifier. Unneeded here.
145 2004-07-28 Darin Adler <darin@apple.com>
149 - fixed <rdar://problem/3658471> REGRESSION: Node.appendChild( ) fails when parent already contains that child
151 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::isAncestor): Restore the original meaning of this function.
152 It returns true if the parameter is an ancestor of this, but had been changed to return true if this
153 is an ancestor of the parameter. However, we do retain one change we made at the same time, which is
154 that it does not consider a node an ancestor of itself.
156 * khtml/editing/htmlediting_impl.cpp: (khtml::ApplyStyleCommandImpl::nodeFullySelected):
157 * khtml/xml/dom2_traversalimpl.cpp: (DOM::NodeIteratorImpl::notifyBeforeNodeRemoval):
158 Reverse parameters for callers who wanted the new meaning of isAncestor, with care to not use it in
159 any cases where the pointer might be 0.
161 * khtml/xml/dom_nodeimpl.h: Added const to the parameter to make things more symmetric and allow the
162 new uses to all compile.
164 2004-07-28 Ken Kocienda <kocienda@apple.com>
170 <rdar://problem/3681552> html editing needs to preserve typing font when replacing selection
172 * khtml/css/css_valueimpl.cpp:
173 (CSSStyleDeclarationImpl::merge): New helper that merges styles together. Helpful for
174 dealing with typing styles.
175 * khtml/css/css_valueimpl.h:
176 * khtml/editing/htmlediting_impl.cpp:
177 (khtml::DeleteSelectionCommandImpl::computeTypingStyle): New helper that updates the
178 typing style based on the current selection. This is a convenient bottleneck for all
179 the code that needs to worry about typing style.
180 (khtml::DeleteSelectionCommandImpl::doApply): Update typing style before doing the delete.
181 (khtml::InputNewlineCommandImpl::doApply): No need to redeclare exceptionCode local.
183 (khtml::InputTextCommandImpl::prepareForTextInsertion): Remove unneeded complication when
184 figuring out where to insert style node. Not even sure what I was trying to do here, but
185 it does not seem to be needed any more.
186 (khtml::InputTextCommandImpl::execute): Remove unneeded comment.
187 * khtml/editing/htmlediting_impl.h: Declare new computeTypingStyle helper.
188 * khtml/khtml_part.cpp:
189 (KHTMLPart::setCaretVisible): Call selectionLayoutChanged instead of notifySelectionChanged
190 in this function. The selection did not change simply by calling this function, but it
192 (KHTMLPart::notifySelectionChanged): Treat clearing the typing style much like closing typing,
193 instead of clearing it unconditionally.
194 (KHTMLPart::applyStyle): In the case where the current selection is a caret, merge the
195 style being applied with any current typing style that already exists.
197 2004-07-28 Darin Adler <darin@apple.com>
201 - fixed <rdar://problem/3711080> REGRESSION (125-146): form fields have shrunk by 1 pixel, and now clip descenders
203 * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth):
204 Compute the size without ever calling cellSize. After talking with Andrew Platzer,
205 we decided that hard-coding the size of the borders of a text field was the best
206 way for WebCore to handle this.
208 2004-07-28 Darin Adler <darin@apple.com>
212 - fixed <rdar://problem/3743204> REGRESSION: crash at startribune.com in InlineBox::root()
214 * khtml/rendering/render_flow.cpp: (RenderFlow::dirtyLinesFromChangedChild):
215 Added a check for nil.
217 2004-07-27 Darin Adler <darin@apple.com>
221 - fixed <rdar://problem/3743138> opaque colors come out of getComputedStyle as "rgba", transparent ones as "rgb"
223 * khtml/css/css_valueimpl.cpp: (CSSPrimitiveValueImpl::cssText): Use "rgb" rather than
224 "rgba" when alpha is 0xFF, not when alpha is 0.
226 2004-07-27 Ken Kocienda <kocienda@apple.com>
230 Fixed the problem where BR elements on lines by themselves don't paint when selected.
232 * khtml/khtml_part.cpp:
233 (KHTMLPart::selectAll): Related fix. Include BR's when figuring out what "all" is.
234 * khtml/rendering/render_br.cpp:
235 (RenderBR::paint): New function implementation. Teach BR's how to paint selections.
236 * khtml/rendering/render_br.h:
237 * khtml/rendering/render_text.cpp:
238 (InlineTextBox::paintSelection): Fix some geometry calculations to be more readable (i.e. don't
239 reuse function argument as a local). Also, improve the logic for determining whether to
240 extend the selection to block boundaries.
241 (RenderText::paint): Remove extendSelection argument from paintSelection. The logic to figure out
242 extensions is now fully contained in paintSelection.
243 * khtml/rendering/render_text.h:
245 2004-07-27 David Hyatt <hyatt@apple.com>
247 Fix for 3665211 (again). Make sure not to leave child line boxes pointing to deleted ancestor line boxes.
251 * khtml/rendering/render_block.cpp:
252 (khtml::RenderBlock::removeChild):
254 2004-07-26 Chris Blumenberg <cblu@apple.com>
256 Fixed: WebView scrolls to the top after making an editing change via drag & drop
258 Fixed by Ken, reviewed by me.
260 * kwq/WebCoreBridge.mm:
261 (-[WebCoreBridge ensureCaretVisible]): do nothing if the selection is not a caret
265 2004-07-26 Maciej Stachowiak <mjs@apple.com>
269 <rdar://problem/3740855> REGRESSION: Flash incorrectly positioned at macromedia.com
271 * khtml/html/htmltokenizer.cpp:
272 (khtml::HTMLTokenizer::scriptExecution): Do the prepending-src
273 trick as for inline script execution.
275 Added new layout tests covering this and other recent tokenizer
278 * layout-tests/fast/tokenizer/001-expected.txt: Added.
279 * layout-tests/fast/tokenizer/001.html: Added.
280 * layout-tests/fast/tokenizer/002-expected.txt: Added.
281 * layout-tests/fast/tokenizer/002.html: Added.
282 * layout-tests/fast/tokenizer/003-expected.txt: Added.
283 * layout-tests/fast/tokenizer/003.html: Added.
284 * layout-tests/fast/tokenizer/resources/003-script.js: Added.
286 2004-07-23 Ken Kocienda <kocienda@apple.com>
292 <rdar://problem/3738920> Caret blinks in inactive window
294 As part of the fix, I cleaned up the way we handle special drawing that needs
295 to be done in the HTML view that is first responder in the key window (e.g the
296 drawing of text selection highlight and caret blinking).
298 * khtml/khtml_part.cpp: Removed setCaretVisible function. Updating caret visibility
299 is now done in setDisplaysWithFocusAttributes, described below.
300 * khtml/khtml_part.h: Ditto.
301 * khtml/khtmlpart_p.h:
302 (KHTMLPartPrivate::KHTMLPartPrivate): m_caretVisible now defaults to false. This prevents
303 the caret from blinking when an app is started from the command line and remains in the
305 * khtml/khtmlview.cpp:
306 (KHTMLView::focusInEvent): Remove caret code from here. Not needed.
307 (KHTMLView::focusOutEvent): Ditto.
308 * kwq/KWQKHTMLPart.h:
309 (KWQKHTMLPart::displaysWithFocusAttributes): New accessor to return cached value to other code
311 * kwq/KWQKHTMLPart.mm:
312 (KWQKHTMLPart::KWQKHTMLPart):
313 (KWQKHTMLPart::setDisplaysWithFocusAttributes): Renamed from setShowsFirstResponder and modified
314 to do the display updating in a clearer way....and now has comments!
315 * kwq/WebCoreBridge.h: Remove several obsolete functions that use to try to do the work of the new
316 setDisplaysWithFocusAttributes function (and did so less well).
317 * kwq/WebCoreBridge.mm:
318 (-[WebCoreBridge drawRect:]): Now calls displaysWithFocusAttributes to figure out how to draw the
319 text selection background.
320 (-[WebCoreBridge setDisplaysWithFocusAttributes:]): Calls through to setDisplaysWithFocusAttributes in
322 (-[WebCoreBridge selectionColor]): Flipped the value of this ternary expression to accommodate the
323 change from usesInactiveTextBackgroundColor to setDisplaysWithFocusAttributes.
324 (-[WebCoreBridge setCaretVisible:]): Removed.
326 2004-07-23 John Sullivan <sullivan@apple.com>
330 - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
331 now also extends selection (even if there wasn't one before)
333 * khtml/khtml_part.cpp:
334 (KHTMLPart::handleMousePressEventSingleClick):
335 Uh, duh. Got a ! wrong last time somehow, so it did even more the wrong thing
336 than ever. I did test this before, so my best guess is an accidental undo or
337 something before committing.
339 2004-07-23 David Hyatt <hyatt@apple.com>
341 Fix for 3735084 and 3737209, when you can find no line boxes in your previous sibling, the line box to dirty
342 should be the *first* line box and not the last.
346 * khtml/rendering/render_flow.cpp:
347 (RenderFlow::dirtyLinesFromChangedChild):
349 2004-07-23 Ken Kocienda <kocienda@apple.com>
353 * khtml/xml/dom_selection.cpp:
354 (DOM::Selection::validate): Not exactly a fix of anything per se, but more of a refinement
355 of how selection validation works. The idea is to let the selection validation process
356 end up with an empty selection given real DOM position inputs if the validation code
357 cannot find a rendered position. Since selection is all about display, this makes sense.
358 Currently, the code will allow the selection to be placed in a location that is not
359 rendered, and this does nobody any good, as it can lead to bugs like accepting key input
360 in a div that is set to display:none.
362 2004-07-23 Ken Kocienda <kocienda@apple.com>
366 Updated layout tests with new expected results.
368 * layout-tests/editing/execCommand/boldSelection-expected.txt
369 * layout-tests/editing/selection/extend-by-character-001-expected.txt
370 * layout-tests/editing/selection/extend-by-character-003-expected.txt
371 * layout-tests/editing/selection/unrendered-005-expected.txt
373 2004-07-22 Maciej Stachowiak <mjs@apple.com>
377 <rdar://problem/3725467> REGRESSION(140-142) nothing displayed at http://Ye-Olde-Movies.tripod.com
378 <rdar://problem/3599494> REGRESSION (100-125): Frame does not refresh until user clicks on browser.
380 * khtml/rendering/render_frames.cpp:
381 (RenderFrameSet::layout): When returning early because there are
382 no children, make sure to mark self as no longer needing
383 layout. Otherwise, when children are added, we'll fail to
384 propagate childrenNeedLayout to our own parent! This is almost
385 certainly a long-standing bug that was just masked by our old
388 2004-07-22 Kevin Decker <kdecker@apple.com>
392 Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions).
394 * khtml/ecma/kjs_events.cpp:
395 (JSLazyEventListener::JSLazyEventListener):
396 (JSLazyEventListener::parseCode):
397 * khtml/ecma/kjs_events.h:
398 * khtml/ecma/kjs_proxy.cpp:
399 (KJSProxyImpl::createHTMLEventHandler):
400 * khtml/ecma/kjs_window.cpp:
401 (Window::getJSLazyEventListener):
402 * khtml/ecma/kjs_window.h:
404 2004-07-22 Ken Kocienda <kocienda@apple.com>
410 <rdar://problem/3724344> Bolding and unbolding creates extraneous tags
412 * khtml/editing/htmlediting_impl.cpp:
413 (khtml::ApplyStyleCommandImpl::doApply): Move the start of the selection upstream
414 before calling removeStyle. This makes sure we remove all styles that could apply to the
415 selection, and not just ones in from the start position of the selection passed to us.
417 * khtml/xml/dom_selection.cpp:
418 (DOM::Selection::validate): Related fix to "constrain" the selection to be the
419 smallest equivalent range of nodes, in effect making a "canonical" version of the
420 selection. While this is not strictly necessary to fix the bug, it is a step I have been
421 wanting to take this step for a long time, and some recent improvements made it
422 possible for me to do now in just two lines of code.
424 2004-07-22 Ken Kocienda <kocienda@apple.com>
430 <rdar://problem/3711264> difficult (impossible?) to get cursor in an editable webview containing only tags
432 * khtml/rendering/render_container.cpp:
433 (RenderContainer::positionForCoordinates): Don't assume you can pass off
434 the check to a first child if there is one, since the child can be an element
435 we do not want to place the caret in, like a table row with no cells (the case
436 in the bug above). So now, we iterate of the renderer's children looking for
437 the closest one, but only consider those renderers which either have children
438 themselves, or are render block flows or are render inlines.
440 2004-07-22 Darin Adler <darin@apple.com>
442 - remove a bunch of now-unused code
444 * ForwardingHeaders/qxml.h: Removed.
445 * kwq/KWQXmlAttributes.h: Removed.
446 * kwq/KWQXmlAttributes.mm: Removed.
447 * kwq/KWQXmlDefaultHandler.h: Removed.
448 * kwq/KWQXmlDefaultHandler.mm: Removed.
449 * kwq/KWQXmlSimpleReader.h: Removed.
450 * kwq/KWQXmlSimpleReader.mm: Removed.
452 2004-07-22 Darin Adler <darin@apple.com>
456 - got rid of QXml classes and changed XML parsing to use libxml directly
458 This is the first step toward more direct use of libxml and libxslt.
459 Dave is planning to build on this to implement XSLT and to improve our handling
460 of XML documents (faster and more feature complete, including DTDs).
462 * khtml/html/html_elementimpl.cpp:
463 (HTMLElementImpl::createContextualFragment):
464 * khtml/html/htmltokenizer.cpp:
465 (khtml::HTMLTokenizer::HTMLTokenizer):
466 * khtml/html/htmltokenizer.h:
467 * khtml/xml/dom_docimpl.cpp:
468 (DocumentImpl::createTokenizer):
469 (DocumentImpl::open):
470 * khtml/xml/dom_docimpl.h:
471 (DOM::DocumentImpl::tokenizer):
472 * khtml/xml/dom_xmlimpl.cpp:
473 (DOM::ProcessingInstructionImpl::checkStyleSheet):
474 * khtml/xml/dom_xmlimpl.h:
475 * khtml/xml/xml_tokenizer.h:
476 * khtml/xml/xml_tokenizer.cpp: Redid this all to use libxml directly.
478 * WebCore.pbproj/project.pbxproj: Removed a bunch of files.
480 2004-07-21 Trey Matteson <trey@apple.com>
482 DHTML dragging should use UTI for MIME-pboard type conversion
486 * kwq/KWQClipboard.mm:
487 (cocoaTypeFromMIMEType): Use UTI, except for cases we need to hardwire. Only cut off
488 MIME args following a semi-colon for text/plain.
489 (MIMETypeFromCocoaType): Use UTI, except for cases we need to hardwire.
490 (KWQClipboard::types): Filter out ancient NSAsciiPboardType so DHTML never sees this cruft.
492 2004-07-21 Ken Kocienda <kocienda@apple.com>
496 Remove handling of HTML editing key events from WebCore.
497 This now happens in WebKit if an event passes all the
498 way through WebCore without being handled by the DOM.
500 In each case below, function were removed, as their
501 only purpose was to handle editing key events.
503 * khtml/xml/dom_elementimpl.cpp
504 * khtml/xml/dom_elementimpl.h
506 * kwq/KWQKHTMLPart.mm
507 * kwq/WebCoreBridge.h
509 2004-07-21 Ken Kocienda <kocienda@apple.com>
513 * khtml/xml/dom_selection.cpp:
514 (DOM::Selection::modifyExtendingRightForward): Add LINE_BOUNDARY case to the switch statement in this
515 function. Use the startAndEndLineNodesIncludingNode helper which already existed to get the right
517 (DOM::Selection::modifyMovingRightForward): Ditto
518 (DOM::Selection::modifyExtendingLeftBackward): Ditto
519 (DOM::Selection::modifyMovingLeftBackward): Ditto
520 * khtml/xml/dom_selection.h:
521 (DOM::Selection::): Add LINE_BOUNDARY constant to ETextGranularity enum. This
522 specifies a new kind of movement that we need to implement the "move-to beggining/end of line"
523 behavior which AppKit binds to cmd+left/right arrow keys.
524 * kwq/WebCoreBridge.h: Add WebSelectToLineBoundary constant. This matches
526 2004-07-20 David Hyatt <hyatt@apple.com>
528 Fix for 3714434, user stylesheet is always parsed in strict mode, when it should honor the document's setting.
532 * khtml/css/cssstyleselector.cpp:
533 (khtml::CSSStyleSelector::CSSStyleSelector):
535 2004-07-20 Ken Kocienda <kocienda@apple.com>
539 * khtml/xml/dom_elementimpl.cpp:
540 (ElementImpl::defaultEventHandler): No longer check whether
541 the command key is modifying the key event. This check is
542 now done elsewhere in the code. See the WebKit checkin that
543 added the _web_keyBindingManagerHasBinding method to
546 2004-07-20 Chris Blumenberg <cblu@apple.com>
549 <rdar://problem/3580589> REGRESSION (1.1-1.2): can't open a new window for an image that has not loaded
550 <rdar://problem/3612691> Missing image icons (blue ?) lack context menu
554 * kwq/WebCoreBridge.mm:
555 (-[WebCoreBridge elementAtPoint:]): if there is no image, put the image URL on the element anyway
557 2004-07-20 David Hyatt <hyatt@apple.com>
559 Fix for alt text not working on images.
563 * khtml/rendering/render_image.cpp:
564 (RenderImage::RenderImage):
565 (RenderImage::setPixmap):
566 (RenderImage::paint):
567 (RenderImage::calcReplacedWidth):
568 (RenderImage::calcReplacedHeight):
570 2004-07-20 Maciej Stachowiak <mjs@apple.com>
574 <rdar://problem/3720111> REGRESSION(125-152): map fails to load depending on banner ad; weather.com (works in IE and Firefox)
576 * khtml/html/htmltokenizer.cpp:
577 (khtml::HTMLTokenizer::begin): Initialize currentPrependingSrc.
578 (khtml::HTMLTokenizer::scriptHandler): Store a pointer to the currently
579 active prependingSrc variable on the stack, the better to handle weird cases
580 of scripts writing out additional script tags and so forth.
581 (khtml::HTMLTokenizer::write): Deal with the above.
582 * khtml/html/htmltokenizer.h: Declare new member field.
584 2004-07-20 David Hyatt <hyatt@apple.com>
586 Fix for layer positioning error that occurs when absolute positioned blocks are inside static positioned overflow:auto
591 * khtml/rendering/render_layer.cpp:
592 (RenderLayer::updateLayerPosition):
594 2004-07-20 Trey Matteson <trey@apple.com>
596 3705624 REGRESSION: can't rearrange photos on homepage.mac.com album
598 A subtle problem stemming from some interaction between focus handing and
599 event propagation. We previously made it so when a focus shift fails we
600 don't propagate the event to KHTML. The fix is to get rid of the inverse
601 effect, so now even if a focus shift succeeds, we don't propagate to KHTML if
602 the page already canceled default behavior.
604 In this specific case, the page is cancelling default behavior since it
605 does its own dragging, and the bug was our new system dragging was
610 * khtml/khtmlview.cpp:
611 (KHTMLView::dispatchMouseEvent): What he said.
613 2004-07-20 Ken Kocienda <kocienda@apple.com>
619 <rdar://problem/3695240> pasting plain text with newlines in it turns them into spaces
621 * kwq/WebCoreBridge.mm:
622 (-[WebCoreBridge documentFragmentWithText:]): Refine this function to be smart about converting
623 line endings into BR elements.
625 2004-07-20 Ken Kocienda <kocienda@apple.com>
631 <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
633 * khtml/khtml_part.cpp:
634 (KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
635 on the caret, this seems like a better name.
636 * khtml/khtml_part.h:
637 * khtml/khtmlview.cpp:
638 (KHTMLView::focusInEvent): Call setCaretVisible(true)
639 (KHTMLView::focusOutEvent): Call setCaretVisible(false)
640 * kwq/KWQKHTMLPart.mm:
641 (KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
642 * kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
643 * kwq/WebCoreBridge.mm:
644 (-[WebCoreBridge setCaretVisible:]): Ditto.
646 2004-07-19 Maciej Stachowiak <mjs@apple.com>
650 <rdar://problem/3721428> REGRESSION (125.8-146): external javascript statements produce extra garbage character (sina.com)
652 * khtml/misc/stringit.h:
653 (khtml::TokenizerSubstring::TokenizerSubstring): For the apple branch, use the new
654 stableUnicode() method to get the unicode pointer.
657 (QString::detachIfInternal): Reorganize this to be a bit less wacky about refcounts.
658 It does not leave around a zombie internal data handle but rather destroys it right away,
659 and leaves the object pointing to the new handle (which it can then deref). This makes
661 (QString::~QString): Simplify.
662 (QString::stableUnicode): New method that detaches a copy of the KWQStringData if it
663 is internal to a string besides this one. This guarantees that if you get the unicode()
664 pointer, it won't go bad so long as this string is still alive.
666 2004-07-19 David Hyatt <hyatt@apple.com>
668 Fix for 3715117, crash from a bug in removeChildren. Clean up node removal and fix an n-squared removal
669 bug. Also clean up checks in removeChild and in the dispatch of removedFromDocument mutation events to
670 make node removal more efficient.
674 * khtml/xml/dom_nodeimpl.cpp:
676 2004-07-19 John Sullivan <sullivan@apple.com>
680 - fixed <rdar://problem/3141150> can't undo in form textarea fields
682 * kwq/KWQTextArea.mm:
683 (-[KWQTextArea _createTextView]):
684 call setAllowsUndo:YES. My, wasn't this easy?
686 2004-07-19 David Hyatt <hyatt@apple.com>
688 Merge @import fix for CSS1 test suite from Stephan Kulow.
692 * khtml/css/parser.cpp:
693 * khtml/css/parser.y:
694 * layout-tests/css1/basic/containment-expected.txt:
696 2004-07-19 David Hyatt <hyatt@apple.com>
698 Fix for 3718697, crash clicking on JS tab at alaskaair.com.
702 * khtml/rendering/render_flow.cpp:
703 (RenderFlow::detach):
704 (RenderFlow::dirtyLinesFromChangedChild):
705 * khtml/rendering/render_flow.h:
706 * khtml/rendering/render_object.cpp:
707 (RenderObject::dirtyLinesFromChangedChild):
708 * khtml/rendering/render_object.h:
710 2004-07-16 David Hyatt <hyatt@apple.com>
712 Fix for 3726471, need to ensure that it's safe to do updateRendering from within layout, since isContentEditable
713 relies on it. The fix is to just recalcStyle up front before beginning the layout, so that all of our renderobjects
718 * khtml/khtmlview.cpp:
721 2004-07-16 Ken Kocienda <kocienda@apple.com>
727 <rdar://problem/3722153> Random crash while typing (DOM::NodeImpl::parentNode (this=0x0))
729 * khtml/editing/htmlediting_impl.cpp:
730 (khtml::DeleteSelectionCommandImpl::doApply): This check merely makes the code
731 more robust. I do not understand how Grant ended up with null start or end
732 blocks in the case of his bug report, but by adding two null checks, the code is
733 now hardened a bit in case it happens again.
735 2004-07-16 Ken Kocienda <kocienda@apple.com>
741 <rdar://problem/3730785> Crash when arrow navigation goes to empty table cell
742 <rdar://problem/3730790> Caret does not blink when placed in empty table cell
744 * khtml/rendering/render_block.cpp:
745 (khtml::RenderBlock::paintObject): Caret node's renderer might be this block, so
746 don't block the painting of the caret in this case. This was the case in 3730790.
747 We had the right geometry for the caret but blocked its painting.
748 * khtml/xml/dom_position.cpp:
749 (DOM::Position::previousLinePosition): Rework the logic here. This function asserted
750 that the new position we would navigate to had a line box, but empty table cells, for
751 instance will not. So, deal with this situation as well. The end result is a
752 function that worked like it did before in cases where the previous line position has
753 a line box, but now also will allow navigation to work when it does not.
754 (DOM::Position::nextLinePosition): Ditto.
756 2004-07-16 Ken Kocienda <kocienda@apple.com>
762 <rdar://problem/3687216> editable inline causes crash when focused
764 * khtml/xml/dom_docimpl.cpp:
765 (DocumentImpl::relinquishesEditingFocus): Add null check for rootEditableElement.
766 (DocumentImpl::acceptsEditingFocus): Ditto.
768 2004-07-16 David Hyatt <hyatt@apple.com>
770 Fix for 3709337, crash when using display: compact. Need to make sure that the isCompact() check in bidi.cpp is
771 also checking for RenderBlocks, since otherwise you match text nodes (and that's just wrong).
775 * khtml/rendering/bidi.cpp:
776 (khtml::RenderBlock::layoutInlineChildren):
780 2004-07-15 David Hyatt <hyatt@apple.com>
782 Fix for 3625611, images offset on first visit to page. The method for determining the last clean line was
783 flawed and would incorrectly miss dirty lines that occurred after the first clean line.
787 * khtml/rendering/bidi.cpp:
788 (khtml::RenderBlock::determineEndPosition):
790 2004-07-15 Ken Kocienda <kocienda@apple.com>
795 <rdar://problem/3587601> reproducible assertion failure in Blot deleting text, then image at Yahoo.com
797 * khtml/editing/htmlediting_impl.cpp:
798 (khtml::DeleteCollapsibleWhitespaceCommandImpl::deleteWhitespace): Relax assertion
799 that nodes are text nodes during the walk of eligible nodes that could possibly be
800 deleted. Change the assertion to an conditional check for text nodes. We may have
801 unrendered nodes in the mix here (as is the case in the bug where the assertion
802 failed on an AREA element), and the conditional check is sufficient to
803 skip them while leaving the delete logic we want unperturbed.
805 2004-07-14 Ken Kocienda <kocienda@apple.com>
809 * khtml/rendering/render_block.cpp:
810 (khtml::RenderBlock::paintObject): Add null check on DOM node before
811 asking if it is contentEditable.
813 2004-07-14 David Hyatt <hyatt@apple.com>
815 Fix for 3595073, setting innerHTML on a <table> should work.
819 * khtml/html/html_elementimpl.cpp:
820 (HTMLElementImpl::createContextualFragment):
822 2004-07-14 Ken Kocienda <kocienda@apple.com>
826 Updated these layout tests as a result of the last patch.
827 These results are better.
829 * layout-tests/editing/execCommand/selectAll-expected.txt
830 * layout-tests/editing/selection/extend-by-character-006-expected.txt
831 * layout-tests/editing/selection/unrendered-001-expected.txt
832 * layout-tests/editing/selection/unrendered-003-expected.txt
834 2004-07-14 Ken Kocienda <kocienda@apple.com>
838 * khtml/rendering/render_block.cpp:
839 (khtml::RenderBlock::paintObject): Change back to start() from caretPosition().
840 Since the policy is now to move the selection to rendered content, if possible,
841 when the selection is set, there is no longer any reason to have the additional
842 caretPosition() function to store where the caret should be drawn.
843 * khtml/xml/dom_docimpl.cpp:
844 (DocumentImpl::updateSelection): No longer any need to call closestRenderedPosition here.
845 This is done in Selection::validate.
846 * khtml/xml/dom_position.cpp:
847 (DOM::Position::closestRenderedPosition): Improved algorithm. Now much simpler.
848 * khtml/xml/dom_selection.cpp:
849 (DOM::Selection::Selection): caretPosition() and m_caretPosition now obsolete.
850 (DOM::Selection::init): Ditto.
851 (DOM::Selection::modifyExtendingRightForward): No longer any need to call
852 closestRenderedPosition here. This is done in Selection::validate.
853 (DOM::Selection::modifyMovingRightForward): Ditto.
854 (DOM::Selection::modifyExtendingLeftBackward): Ditto.
855 (DOM::Selection::modifyMovingLeftBackward): Ditto.
856 (DOM::Selection::layoutCaret): Ditto.
857 (DOM::Selection::validate): Add code to move the selection to rendered content if possible.
858 * khtml/xml/dom_selection.h: caretPosition() and m_caretPosition now obsolete.
860 2004-07-14 David Hyatt <hyatt@apple.com>
862 Fix for 3716082, assert when you dynamically remove float or position styles.
866 * khtml/rendering/render_object.cpp:
867 (RenderObject::setStyle):
869 2004-07-14 David Hyatt <hyatt@apple.com>
871 Fix for various table regressions (malumovies.com and cityofheroes.gameamp.com) involving bungling of
876 * khtml/rendering/render_box.cpp:
877 (RenderBox::calcPercentageHeight):
878 (RenderBox::availableHeightUsing):
879 * khtml/rendering/render_table.cpp:
880 (RenderTable::layout):
881 (RenderTableSection::calcRowHeight):
882 (RenderTableSection::layoutRows):
883 (RenderTableCell::updateFromElement):
884 * khtml/rendering/render_table.h:
886 2004-07-14 Ken Kocienda <kocienda@apple.com>
890 * khtml/xml/dom_position.cpp:
891 (DOM::Position::equivalentDeepPosition): New helper function to improve selection handling.
892 Soon, I plan to land some changes that use this new function.
893 * khtml/xml/dom_position.h:
895 2004-07-14 Ken Kocienda <kocienda@apple.com>
899 * WebCore-combined.exp: Added QString.at symbol to tests exports to facilitate debugging
900 data formatting change that is to come.
903 2004-07-13 John Sullivan <sullivan@apple.com>
907 - fixed <rdar://problem/3705500> REGRESSION (125.8-146): Cmd-E on an
908 HTML page puts a trailing space on Find pasteboard
910 * khtml/misc/khtml_text_operations.cpp:
911 (khtml::TextIterator::handleTextBox):
912 In the case where a subrun doesn't extend to the end of the text box,
913 the well-commented code was supposed to return from this routine, but
914 the wrong variable was being compared. This would send us through another
915 pass of the loop, which would end up worrying about collapsed space at the
916 end of the current box, even though we only cared about the beginning of the
919 2004-07-12 Richard Williamson <rjw@apple.com>
921 Fixed 3717982. Implemented navigator.language!
925 * khtml/ecma/kjs_navigator.cpp:
926 (Navigator::getValueProperty):
928 2004-07-12 Ken Kocienda <kocienda@apple.com>
932 * khtml/xml/dom_position.cpp:
933 (DOM::Position::inRenderedContent): I broke selection drawing with my last patch. This
934 function is now used in selection drawing, and it was making an unneeded check to see
935 that content was editable to answer whether or not is was rendered. Bad. Fixed.
937 2004-07-12 David Hyatt <hyatt@apple.com>
939 Fix for 3621138, crash on hrweb.apple.com. Make sure that in the case where objects get pulled up from merging
940 blocks that we just delete all line boxes.
944 * khtml/rendering/render_block.cpp:
945 (khtml::RenderBlock::removeChild):
947 2004-07-10 Maciej Stachowiak <mjs@apple.com>
951 <rdar://problem/3706080>: (REGRESSION (125.8-147u): Nested <ul> do not display bullets)
952 <rdar://problem/3676376>: (Second level bullets not printed when printing Xcode release notes)
956 (CGColorFromNSColor):
957 (QPainter::drawEllipse):
958 (QPainter::setShadow):
960 2004-07-12 Ken Kocienda <kocienda@apple.com>
964 Added new editing-related layout tests
966 * layout-tests/editing/deleting/delete-after-span-ws-001-expected.txt: Added.
967 * layout-tests/editing/deleting/delete-after-span-ws-001.html: Added.
968 * layout-tests/editing/deleting/delete-after-span-ws-002-expected.txt: Added.
969 * layout-tests/editing/deleting/delete-after-span-ws-002.html: Added.
970 * layout-tests/editing/deleting/delete-after-span-ws-003-expected.txt: Added.
971 * layout-tests/editing/deleting/delete-after-span-ws-003.html: Added.
972 * layout-tests/editing/selection/unrendered-001-expected.txt: Added.
973 * layout-tests/editing/selection/unrendered-001.html: Added.
974 * layout-tests/editing/selection/unrendered-002-expected.txt: Added.
975 * layout-tests/editing/selection/unrendered-002.html: Added.
976 * layout-tests/editing/selection/unrendered-003-expected.txt: Added.
977 * layout-tests/editing/selection/unrendered-003.html: Added.
978 * layout-tests/editing/selection/unrendered-004-expected.txt: Added.
979 * layout-tests/editing/selection/unrendered-004.html: Added.
980 * layout-tests/editing/selection/unrendered-005-expected.txt: Added.
981 * layout-tests/editing/selection/unrendered-005.html: Added.
982 * layout-tests/traversal/node-iterator-008-expected.txt: Added.
983 * layout-tests/traversal/node-iterator-008.html: Added.
984 * layout-tests/traversal/tree-walker-005-expected.txt: Added.
985 * layout-tests/traversal/tree-walker-005.html: Added.
987 2004-07-12 Ken Kocienda <kocienda@apple.com>
991 Fixes for these bugs:
993 <rdar://problem/3723359> Extending then "unextending" selection with arrow keys should draw caret but doesn't
994 <rdar://problem/3724626> White-space deletion code deletes wrong character when space follows span
996 * khtml/editing/htmlediting_impl.cpp:
997 (khtml::DeleteSelectionCommandImpl::doApply): Modify special-case white-space deletion code so it runs
998 only in the special case. It was throwing its net too widely, catching the case described in 3724626.
999 By tightening up the special-case white-space deletion, and allowing the more general-purpose code to run,
1001 * khtml/xml/dom_docimpl.cpp:
1002 (DocumentImpl::updateSelection): Use recently-added closestRenderedPosition helper in Position class
1003 to figure out the start and end positions for selection drawing.
1004 * khtml/xml/dom_position.cpp:
1005 (DOM::Position::equivalentUpstreamPosition): Added code to handle white-space that causes line breaks.
1006 (DOM::Position::equivalentDownstreamPosition): Ditto.
1007 (DOM::Position::closestRenderedPosition): Trap empty selections at function entry, return *this.
1008 (DOM::Position::isFirstRenderedPositionOnLine): Can't be first rendered position on line if not rendered.
1010 (DOM::Position::isLastRenderedPositionOnLine): Ditto, but s/first/last/
1011 * khtml/xml/dom_selection.cpp:
1012 (DOM::Selection::validate): A selection is in caret state if the start and end are equal *or* equivalent.
1013 The equivalence case is new, and fixes 3723359.
1015 2004-07-09 Kevin Decker <kdecker@apple.com>
1019 fixes the width:auto problem in
1020 <rdar://problem/3698344> REGRESSION (143?-144): macrumors.com tabs are compressed and illegible
1022 * khtml/css/cssstyleselector.cpp:
1023 (khtml::CSSStyleSelector::applyProperty):
1025 2004-07-09 Ken Kocienda <kocienda@apple.com>
1029 Updated some layout test results.
1031 * layout-tests/editing/deleting/delete-image-004-expected.txt:
1032 * layout-tests/editing/selection/extend-by-character-006-expected.txt:
1034 2004-07-09 Chris Blumenberg <cblu@apple.com>
1036 Allowed my change for 3715785 to compile on Jaguar.
1038 Reviewed by kocienda.
1040 * kwq/WebCoreBridge.h:
1041 * kwq/WebCoreBridge.mm:
1042 (-[WebCoreBridge domain]): new, allows access to the domain without using the DOM API which doesn't exist on Jaguar
1044 2004-07-09 Ken Kocienda <kocienda@apple.com>
1048 Some improvements to fix:
1050 <rdar://problem/3723111> Caret not drawn when selection set to unrendered content
1052 * khtml/editing/htmlediting_impl.cpp:
1053 (khtml::TypingCommandImpl::issueCommandForDeleteKey): Adjust selection to delete if
1054 selected position is not rendered.
1055 * khtml/rendering/render_block.cpp:
1056 (khtml::RenderBlock::paintObject): Use new caretPosition() function on Selection to
1057 figure out whether to paint.
1058 * khtml/xml/dom_position.cpp:
1059 (DOM::Position::previousCharacterPosition): Now correctly deals with a start
1060 position that is not rendered.
1061 (DOM::Position::nextCharacterPosition): Ditto.
1062 (DOM::Position::closestRenderedPosition): New helper.
1063 * khtml/xml/dom_position.h:
1064 (DOM::): Moved in EAffinity from Selection header. Now used in closestRenderedPosition function.
1065 * khtml/xml/dom_selection.cpp:
1066 (DOM::Selection::Selection): Added new m_caretPosition member. This is the position of the caret
1067 after a caret layout. This may be different from start or end if start and end are not rendered.
1068 (DOM::Selection::init):
1069 (DOM::Selection::modifyExtendingRightForward): New helper to clean up modify() and make it more readble.
1070 (DOM::Selection::modifyMovingRightForward): Ditto.
1071 (DOM::Selection::modifyExtendingLeftBackward): Ditto.
1072 (DOM::Selection::modifyMovingLeftBackward): Ditto.
1073 (DOM::Selection::modify): Use new helpers to make this more readble.
1074 (DOM::Selection::layoutCaret): Uses new closestRenderedPosition helper to place the caret if in unrendered
1076 (DOM::Selection::paintCaret): Remove moveToRenderedContent. obsolete.
1077 * khtml/xml/dom_selection.h:
1078 (DOM::Selection::caretPosition): New accessor.
1079 * kwq/WebCoreBridge.mm:
1080 (-[WebCoreBridge setSelectedDOMRange:affinity:]): EAffinity no longer a member enum of Selection class.
1082 2004-07-08 David Hyatt <hyatt@apple.com>
1084 Fix for the table layout test that failed because of a change in how innerText worked. We need to do
1085 updateLayout now when using innerText, since the method has been changed to use line boxes in the render tree
1086 that might otherwise be out of date.
1088 Reviewed by kocienda
1090 * khtml/html/html_elementimpl.cpp:
1091 (HTMLElementImpl::innerText):
1093 2004-07-08 John Sullivan <sullivan@apple.com>
1097 - fixed <rdar://problem/3691569> REGRESSION (142): cmd-shift-clicking on a link
1098 now also extends selection (even if there wasn't one before)
1100 * khtml/khtml_part.cpp:
1101 (KHTMLPart::handleMousePressEventSingleClick):
1102 if there's a URL associated with the event, don't extend the selection
1104 2004-07-08 Ken Kocienda <kocienda@apple.com>
1108 Added some helper functions which provide strings to display in the
1109 Xcode debugger's variable inspector window. These functions are called
1110 from the LabyrinthDataFormatter debugger plugin I just checked in to
1111 the Labyrinth/Tools directory.
1113 Note that these functions are compiled in on Development builds only.
1115 * WebCore-combined.exp:
1116 * WebCore-tests.exp: Export all the formatForDebugger symbols so the
1117 debugger program can link with them.
1118 * khtml/xml/dom2_rangeimpl.cpp:
1119 (DOM::RangeImpl::formatForDebugger):
1120 * khtml/xml/dom2_rangeimpl.h:
1121 * khtml/xml/dom_elementimpl.cpp:
1122 (ElementImpl::formatForDebugger):
1123 * khtml/xml/dom_elementimpl.h:
1124 * khtml/xml/dom_nodeimpl.cpp:
1125 * khtml/xml/dom_nodeimpl.h:
1126 * khtml/xml/dom_position.cpp:
1127 (DOM::Position::formatForDebugger):
1128 * khtml/xml/dom_position.h:
1129 * khtml/xml/dom_selection.cpp:
1130 (DOM::Selection::formatForDebugger):
1131 * khtml/xml/dom_selection.h:
1132 * khtml/xml/dom_textimpl.cpp:
1133 (TextImpl::formatForDebugger):
1134 * khtml/xml/dom_textimpl.h:
1136 2004-07-08 John Sullivan <sullivan@apple.com>
1140 - fixed <rdar://problem/3721544> crash increasing font size;
1141 entrezeroetun.com (works in IE and Firefox)
1143 * khtml/rendering/render_block.cpp:
1144 (khtml::RenderBlock::updateFirstLetter):
1145 Check for nil originalString() before dereffing
1147 2004-07-08 David Hyatt <hyatt@apple.com>
1149 Fix for 3721453, CSS3 initial property caused crashes because the macros were not written correctly.
1153 * khtml/css/cssstyleselector.cpp:
1157 2004-07-07 David Hyatt <hyatt@apple.com>
1159 Fix for 3712133, crash from first-line pseudo-style use.
1161 Reviewed by kocienda
1163 * khtml/css/cssstyleselector.cpp:
1164 (khtml::CSSStyleSelector::styleForElement):
1165 * khtml/css/cssstyleselector.h:
1166 * khtml/rendering/render_object.cpp:
1167 (RenderObject::getPseudoStyle):
1169 2004-07-07 Ken Kocienda <kocienda@apple.com>
1175 <rdar://problem/3716479> calling setInnerHTML during a webViewDidChange delegate call causes a crash
1177 The fix involves some rearrangement of code in TypingCommand and TypingCommandImpl.
1178 Formerly, new TypingCommands would apply themselves (which was a no-op) and then
1179 do their action in some code a way different than other commands. This type of command
1180 application is different than for all other commands since TypingCommands can be coalesced.
1181 The crash occurred as a result of the "no-op" TypingCommand having the unconsidered
1182 consequence of causing editing delegate notifications to be sent before the command
1183 has actually run. This change takes a small step towards making TypingCommandImpl function like
1184 other commands, where the command work is done in doApply. This makes the notification
1185 happen in the right order.
1187 * khtml/editing/htmlediting.cpp:
1188 (khtml::TypingCommand::TypingCommand):
1189 (khtml::TypingCommand::insertText):
1190 (khtml::TypingCommand::insertNewline):
1191 (khtml::TypingCommand::deleteKeyPressed):
1192 * khtml/editing/htmlediting.h:
1193 (khtml::TypingCommand::):
1194 * khtml/editing/htmlediting_impl.cpp:
1195 (khtml::TypingCommandImpl::TypingCommandImpl):
1196 (khtml::TypingCommandImpl::doApply):
1197 * khtml/editing/htmlediting_impl.h:
1199 2004-07-06 Ken Kocienda <kocienda@apple.com>
1203 * khtml/html/html_tableimpl.cpp:
1204 (HTMLTableElementImpl::addChild): Added a better comment in the
1205 code I just checked in a few minutes ago.
1207 2004-07-06 Ken Kocienda <kocienda@apple.com>
1213 <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply
1214 due to non-0 exception code trying to insert a DIV markup string
1216 The solution was to revert to the code that was rolled out, and removing
1217 the child checks from NodeImpl::checkAddChild. However, this time, I added
1218 code very similar to this check into the code that runs while HTML is
1219 being parsed to build up tables. This code relies on child-add failure
1220 to ensure the proper construction of well-formed tables (as gross as that
1221 sounds), so the check needs to be retained there. No other code seems to
1222 be so affected. Layout tests are unchanged by this patch.
1224 * khtml/html/html_tableimpl.cpp:
1225 (HTMLTableElementImpl::addChild):
1226 * khtml/xml/dom_nodeimpl.cpp:
1227 (NodeImpl::checkAddChild):
1229 2004-07-06 Ken Kocienda <kocienda@apple.com>
1233 Simple change. I switched the arguments of the appendNode helper function
1234 and the AppendNodeCommand and AppendNodeCommandImpl classes. The node to
1235 insert now comes before the parent node in the argument list. I did this
1236 to make this function match the convention of others in the HTML editing code.
1237 This was the only one that was "different" in the way that it ordered arguments.
1238 As a result, I was always looking to see that I was passing things in the right
1241 * khtml/editing/htmlediting.cpp:
1242 (khtml::AppendNodeCommand::AppendNodeCommand):
1243 (khtml::AppendNodeCommand::appendChild):
1244 (khtml::AppendNodeCommand::parentNode):
1245 * khtml/editing/htmlediting.h:
1246 * khtml/editing/htmlediting_impl.cpp:
1247 (khtml::CompositeEditCommandImpl::insertNodeAfter):
1248 (khtml::CompositeEditCommandImpl::insertNodeAt):
1249 (khtml::CompositeEditCommandImpl::appendNode):
1250 (khtml::AppendNodeCommandImpl::AppendNodeCommandImpl):
1251 (khtml::AppendNodeCommandImpl::~AppendNodeCommandImpl):
1252 (khtml::AppendNodeCommandImpl::doApply):
1253 (khtml::AppendNodeCommandImpl::doUnapply):
1254 (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
1255 (khtml::DeleteSelectionCommandImpl::doApply):
1256 (khtml::InputNewlineCommandImpl::insertNodeAfterPosition):
1257 (khtml::InputNewlineCommandImpl::insertNodeBeforePosition):
1258 (khtml::InputTextCommandImpl::prepareForTextInsertion):
1259 * khtml/editing/htmlediting_impl.h:
1260 (khtml::AppendNodeCommandImpl::parentNode):
1262 2004-07-06 Ken Kocienda <kocienda@apple.com>
1266 Fixed several problems with traversal classes. For one, NodeIterators treat
1267 FILTER_REJECT and FILTER_SKIP the same, since it treats the DOM tree as a
1268 flat collection of nodes free of hierarchy. The code before this change did
1269 not do this correctly. It sure pays to go back and read the specs. :)
1271 Also, the code to traverse from node to node when filters were applied was
1272 not working correctly. My first attemmpt to implement this was just plain
1273 buggy, as I discovered when I tried to write tests for my WWDC talk. I have
1274 settled on an implementation which is much simpler and worked for all the
1275 tests I threw at it.
1277 * khtml/xml/dom2_traversalimpl.cpp:
1278 (DOM::NodeIteratorImpl::findNextNode):
1279 (DOM::NodeIteratorImpl::nextNode):
1280 (DOM::NodeIteratorImpl::findPreviousNode):
1281 (DOM::NodeIteratorImpl::previousNode):
1282 (DOM::TreeWalkerImpl::parentNode):
1283 (DOM::TreeWalkerImpl::firstChild):
1284 (DOM::TreeWalkerImpl::lastChild):
1285 (DOM::TreeWalkerImpl::previousSibling):
1286 (DOM::TreeWalkerImpl::nextSibling):
1287 (DOM::TreeWalkerImpl::previousNode):
1288 (DOM::TreeWalkerImpl::nextNode):
1289 (DOM::TreeWalkerImpl::ancestorRejected):
1290 * khtml/xml/dom2_traversalimpl.h:
1292 2004-07-06 Vicki Murley <vicki@apple.com>
1294 Reviewed by kocienda.
1296 - added backColorCommand, foreColorCommand, fontNameCommand,
1299 * layout-tests/editing/editing.js:
1301 2004-07-06 Trey Matteson <trey@apple.com>
1303 3716053 - www.theage.com.au has extra back/forward items due to ads
1305 This turned out to be easily fixed by generalizing the fix to 3438441. We prevent
1306 addition to the b/f list not just during an onload event, but during any non-user
1307 gesture, which includes top level script executing.
1309 Reviewed by Richard.
1311 * kwq/KWQKHTMLPart.mm:
1312 (KWQKHTMLPart::openURL): Only real change - prevent adding to b/f list if not
1314 (KWQKHTMLPart::openURLRequest): Rename "onLoadEvent" to "userGesture", swap sense
1315 (KWQKHTMLPart::submitForm): Ditto
1316 (KWQKHTMLPart::urlSelected): Ditto
1317 * kwq/KWQKHTMLPartBrowserExtension.mm:
1318 (KHTMLPartBrowserExtension::createNewWindow): Ditto
1319 * kwq/WebCoreBridge.h:
1321 2004-07-02 Darin Adler <darin@apple.com>
1325 - fixed half of <rdar://problem/3709244> utf-8 meta tag not parsed when page title contains angle brackets or if </meta> tag used
1327 * khtml/misc/decoder.cpp: (Decoder::decode): Allow </meta> tags without deciding we
1328 are done with the header.
1330 2004-06-30 Trey Matteson <trey@apple.com>
1332 Dragging within a web view should be allowed to start when the window isn't key.
1334 A few months ago, Chris made this work, but it relied on the fact that all dragging
1335 was done in WebKit. When WebCore got involved in dragging, it was broken. Now we
1336 have a new scheme that gets it working again that properly involves WebCore.
1338 The general idea is that when AK asks us whether to accept the first mouse and do
1339 "delayed window ordering", we must consult WC to see if we might start a drag. In
1340 addition, instead of these drags in non-active windows being started as a special
1341 case in WK, they go through the normal WK-WC drag machinery.
1345 * khtml/khtml_part.cpp:
1346 (KHTMLPart::shouldDragAutoNode): New x,y args.
1347 * khtml/khtml_part.h:
1348 * khtml/rendering/render_object.cpp:
1349 (RenderObject::draggableNode): Pass through new x,y args.
1350 * khtml/rendering/render_object.h:
1351 * kwq/KWQKHTMLPart.h:
1352 (KWQKHTMLPart::setActivationEventNumber): New setter.
1353 * kwq/KWQKHTMLPart.mm:
1354 (KWQKHTMLPart::KWQKHTMLPart): Init new ivar.
1355 (KWQKHTMLPart::eventMayStartDrag): New routine that checks if we might start
1356 a drag in response to a mouseDown.
1357 (KWQKHTMLPart::khtmlMouseMoveEvent): Pass x,y to the routine that finds a draggable
1358 node. This eventually gets back up to WK's _mayStartDragAtEventLocation:.
1359 Delay requirement when dragging the selection now implemented here.
1360 (KWQKHTMLPart::khtmlMouseReleaseEvent): Must avoid changing the selection if we
1361 wind up here as part of the first click in a window (because we started handling
1362 the click to possible start a drag, but that never came through).
1363 (KWQKHTMLPart::mouseDown): Save away event timestamp.
1364 (KWQKHTMLPart::shouldDragAutoNode): Pass location up to WK instead of the
1365 most recent event we stashed.
1366 * kwq/WebCoreBridge.h:
1367 * kwq/WebCoreBridge.mm:
1368 (-[WebCoreBridge setActivationEventNumber:]): Trivial glue.
1369 (-[WebCoreBridge eventMayStartDrag:]): Ditto.
1371 2004-06-29 Trey Matteson <trey@apple.com>
1373 Need to tighten up JS error checking for requesting drag props
1378 * khtml/ecma/kjs_events.cpp:
1379 (Clipboard::getValueProperty): Assert if someone somehow set
1380 dropEffect or effectAllowed and it's a copy/paste clipboard
1381 instead of a dragging clipboard.
1382 (Clipboard::putValue): Don't let anyone set dropEffect or
1383 effectAllowed on a copy/paste clipboard.
1384 (ClipboardProtoFunc::tryCall): Disallow setting dragImage on
1385 a copy/paste clipboard.
1387 2004-06-29 Trey Matteson <trey@apple.com>
1389 DHTML dragging - source should have access to the operation chosen
1394 * kwq/KWQKHTMLPart.h:
1395 * kwq/KWQKHTMLPart.mm:
1396 (KWQKHTMLPart::dragSourceEndedAt): Set the destination's operation
1398 * kwq/WebCoreBridge.mm:
1399 (-[WebCoreBridge dragExitedWithDraggingInfo:]): For completeness
1400 we set the source op for the ondragexit event.
1401 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto for the
1403 (-[WebCoreBridge dragSourceEndedAt:operation:]): Pass through of operation.
1405 2004-06-24 Trey Matteson <trey@apple.com>
1407 3710422 - REGRESSION: Safari crashes trying to send onbeforecut event at about://blank
1409 Simple fix - don't try to send the event to the body element if we have no body element.
1413 * kwq/KWQKHTMLPart.mm:
1414 (KWQKHTMLPart::dispatchCPPEvent):
1416 2004-06-24 Trey Matteson <trey@apple.com>
1418 3704950 drag image in DB ConfigBar has horizontal graphics turd WebCore JavaScript
1420 When we generate a drag image (or a selection image too, for that matter) we
1421 translate the CTM using a CG call. Later, WebImageRenderer adjusts the pattern
1422 phase based on the CTM of the focused view, which doesn't include our translate.
1423 So we must inform WebKit about the additional phase adjustment.
1427 * kwq/KWQKHTMLPart.mm: Tell WebKit about the phase adjustment.
1428 (KWQKHTMLPart::imageFromRect):
1429 * kwq/WebCoreGraphicsBridge.h:
1430 * kwq/WebCoreGraphicsBridge.m:
1431 (-[WebCoreGraphicsBridge setAdditionalPatternPhase:]): New routine to receive
1432 the phase adjustment.
1434 2004-06-24 Trey Matteson <trey@apple.com>
1436 3679986 - screenX and screenY are flipped and relative to the bottom left of the WebView, rather than the screen
1437 3699510 - synthesized click events have bogus screen coords
1441 * khtml/khtmlview.cpp:
1442 (KHTMLView::dispatchDragEvent): Generate screen coords for drag events using new func.
1443 (KHTMLView::dispatchMouseEvent): Ditto.
1444 * khtml/khtmlview.h:
1445 * khtml/xml/dom_nodeimpl.cpp:
1446 (NodeImpl::dispatchMouseEvent): Comment tricky semantics.
1447 Calc screen coords in apple-specific way.
1448 * kwq/KWQKHTMLView.mm:
1449 (KHTMLView::viewportToGlobal): Passthrough to window widget.
1450 * kwq/KWQScrollView.mm:
1451 * kwq/KWQWindowWidget.h:
1452 * kwq/KWQWindowWidget.mm:
1453 (KWQWindowWidget::mapToGlobal): Call former code factored to new method below.
1454 (KWQWindowWidget::viewportToGlobal): New method to convert "viewport" (which for us
1455 really means NSWindow coords) to screen coords.
1457 2004-06-24 Trey Matteson <trey@apple.com>
1459 3693420 - onbeforecut and onbeforepaste need real implementaion
1463 * kwq/KWQKHTMLPart.h:
1464 * kwq/KWQKHTMLPart.mm:
1465 (KWQKHTMLPart::mayCut): Dispatch event to DHTML.
1466 (KWQKHTMLPart::mayCopy): Ditto
1467 (KWQKHTMLPart::mayPaste): Ditto
1468 (KWQKHTMLPart::tryCut): No more need to send fake onbefore event
1469 (KWQKHTMLPart::tryCopy): Ditto
1470 (KWQKHTMLPart::tryPaste): Ditto
1471 * kwq/WebCoreBridge.h:
1472 * kwq/WebCoreBridge.mm:
1473 (-[WebCoreBridge mayDHTMLCut]): Standard glue
1474 (-[WebCoreBridge mayDHTMLCopy]): Ditto
1475 (-[WebCoreBridge mayDHTMLPaste]): Ditto
1477 2004-06-24 Darin Adler <darin@apple.com>
1481 - fixed <rdar://problem/3709385> Find on page doesn't find a string at the very end of the file
1483 * khtml/misc/khtml_text_operations.cpp: (khtml::findPlainText): Rearrange loop to avoid an early
1484 exit once we have all the characters we need, but are at the end of the range we are searching.
1486 - fixed <rdar://problem/3102271>: (text areas have scroll bars even when they don't need them)
1487 - fixed <rdar://problem/3665430>: (horizontal scroll bar of text area does not show, even when text is wide in "no wrap" mode)
1489 * kwq/KWQTextArea.mm:
1490 (-[KWQTextArea _configureTextViewForWordWrapMode]): Added. Helper method that sets up the
1491 view for a new word wrap mode.
1492 (-[KWQTextArea _createTextView]): Moved much of the code inside _configureTextViewForWordWrapMode.
1493 (-[KWQTextArea _frameSizeChanged]): Added. Method shared by setFrame: and initWithFrame: to
1494 avoid duplicate code that was there before. The old code also had redundant code to update
1495 the text container size, but NSText handles that automatically.
1496 (-[KWQTextArea initWithFrame:]): Set wrap to YES by default, which is the key to fixing bug 3665430.
1497 Call setAutohidesScrollers:YES, which fixes bug 3102271. Also call the new _frameSizeChanged method.
1498 (-[KWQTextArea setWordWrap:]): Call _configureTextViewForWordWrapMode instead of trying
1499 to do the work here. The old version did both too little and too much.
1500 (-[KWQTextArea setFrame:]): Call _frameSizeChanged instead of trying to do the work here.
1501 The old version did both too little and too much.
1503 2004-06-24 John Sullivan <sullivan@apple.com>
1505 Darin made this change on my machine; I reviewed it.
1507 - fixed <rdar://problem/3698333> Find on page doesn't find a particular string
1508 with a newline in the source
1510 * khtml/misc/khtml_text_operations.cpp:
1511 (khtml::TextIterator::handleTextBox):
1512 Clear m_lastTextNodeEndedWithCollapsedSpace after taking it into account.
1514 2004-06-23 Richard Williamson <rjw@apple.com>
1516 Implemented changes for latest npruntime.h.
1520 * kwq/KWQKHTMLPart.h:
1521 * kwq/KWQKHTMLPart.mm:
1522 (KWQKHTMLPart::KWQKHTMLPart):
1523 (KWQKHTMLPart::windowScriptNPObject):
1524 (KWQKHTMLPart::getEmbedInstanceForView):
1525 * kwq/WebCoreBridge.h:
1526 * kwq/WebCoreBridge.mm:
1527 (-[WebCoreBridge windowScriptObject]):
1528 (-[WebCoreBridge windowScriptNPObject]):
1530 2004-06-22 Richard Williamson <rjw@apple.com>
1532 Fixed <rdar://problem/3707162>: accessing embeds[] plug-in interface may crash
1534 embedInstance was uninitialized.
1538 * khtml/html/html_objectimpl.cpp:
1539 (HTMLEmbedElementImpl::HTMLEmbedElementImpl):
1541 2004-06-18 John Sullivan <sullivan@apple.com>
1545 - fixed <rdar://problem/3534851> Pop up windows not showing up within SAP's
1546 BW Module (changing location.href on new window created by window.open)
1548 * khtml/khtml_part.cpp:
1549 (KHTMLPart::scheduleRedirection):
1550 allow new redirect to win if delay <= current delay, not just <
1552 === WebCore-146.1 ===
1554 2004-06-18 Trey Matteson <trey@apple.com>
1556 3702053 - DHTML dragging destination can't control the cursor (by setting the drop operation)
1558 Fallout from security work, but an easy fix.
1562 * kwq/KWQClipboard.mm:
1563 (KWQClipboard::setDropEffect): Allow dest side to set dropEffect.
1565 2004-06-18 Darin Adler <darin@apple.com>
1569 - re-fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)
1571 * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
1572 Check !isInlineFlow rather than checking hasMarkupTruncation. Otherwise, we break
1573 plain old non-markup truncation.
1575 2004-06-18 Darin Adler <darin@apple.com>
1579 - fixed <rdar://problem/3701893> show expert preferences notes in xcode causes crash (in EllipsisBox code)
1581 * khtml/rendering/render_block.cpp: (khtml::RenderBlock::paintEllipsisBoxes):
1582 Only walk the ellipsis list if hasMarkupTruncation is true.
1586 2004-06-17 Richard Williamson <rjw@apple.com>
1588 Fixed <rdar://problem/3698867> setting the canvas or parent to display:none and updating the causes a nil-deref
1590 Ensured that we have a renderer before rendering.
1594 * khtml/ecma/kjs_html.cpp:
1595 (KJS::Context2DFunction::tryCall):
1597 2004-06-17 David Hyatt <hyatt@apple.com>
1599 Fix for 3674601, "Read More..." links should trail articles in Emerson.
1603 * khtml/rendering/bidi.cpp:
1604 (khtml::RenderBlock::layoutInlineChildren):
1605 (khtml::RenderBlock::deleteEllipsisLineBoxes):
1606 (khtml::RenderBlock::checkLinesForTextOverflow):
1607 * khtml/rendering/render_block.cpp:
1608 (khtml:::RenderFlow):
1609 (khtml::RenderBlock::paintEllipsisBoxes):
1610 (khtml::RenderBlock::nodeAtPoint):
1611 (khtml::shouldCheckLines):
1612 (khtml::getLineAtIndex):
1613 (khtml::getHeightForLineCount):
1614 (khtml::RenderBlock::lineAtIndex):
1615 (khtml::RenderBlock::lineCount):
1616 (khtml::RenderBlock::heightForLineCount):
1617 (khtml::RenderBlock::clearTruncation):
1618 * khtml/rendering/render_block.h:
1619 (khtml::RenderBlock::setHasMarkupTruncation):
1620 (khtml::RenderBlock::hasMarkupTruncation):
1621 * khtml/rendering/render_flexbox.cpp:
1622 (khtml::RenderFlexibleBox::layoutVerticalBox):
1623 * khtml/rendering/render_line.cpp:
1624 (khtml::EllipsisBox::m_str):
1625 (khtml::InlineBox::adjustPosition):
1626 (khtml::InlineFlowBox::adjustPosition):
1627 (khtml::InlineFlowBox::clearTruncation):
1628 (khtml::EllipsisBox::paint):
1629 (khtml::EllipsisBox::nodeAtPoint):
1630 (khtml::RootInlineBox::clearTruncation):
1631 (khtml::RootInlineBox::placeEllipsis):
1632 (khtml::RootInlineBox::paintEllipsisBox):
1633 (khtml::RootInlineBox::hitTestEllipsisBox):
1634 (khtml::RootInlineBox::adjustPosition):
1635 (khtml::RootInlineBox::childRemoved):
1636 * khtml/rendering/render_line.h:
1637 (khtml::InlineBox::clearTruncation):
1638 * khtml/rendering/render_text.cpp:
1639 * khtml/rendering/render_text.h:
1640 (khtml::InlineTextBox::clearTruncation):
1642 2004-06-17 Trey Matteson <trey@apple.com>
1644 3698514 - coordinates in ondragstart and ondrag events are wrong
1646 This part fixes the ondragstart coords. We salt away the window-based mouseDown
1647 location, since we need that when we dispatch the ondragstart event. Previously
1648 we were errantly using a mouseDown point that had already been converted to view
1649 coords, and then the dispatch converted it again.
1653 * kwq/KWQKHTMLPart.h:
1654 * kwq/KWQKHTMLPart.mm:
1655 (KWQKHTMLPart::khtmlMouseMoveEvent): Use window based mouse event coords to dispatch event.
1656 (KWQKHTMLPart::mouseDown): Save window based mouse event coords .
1658 2004-06-16 David Hyatt <hyatt@apple.com>
1660 Fix for 3596620, implement a subset of CSS3 text truncation for Emerson.
1664 * khtml/rendering/bidi.cpp:
1665 (khtml::RenderBlock::checkLinesForTextOverflow):
1666 * khtml/rendering/font.cpp:
1667 (Font::checkSelectionPoint):
1668 * khtml/rendering/font.h:
1669 * khtml/rendering/render_block.cpp:
1670 (khtml::RenderBlock::paintObject):
1671 (khtml::RenderBlock::paintFloats):
1672 (khtml::RenderBlock::paintEllipsisBoxes):
1673 * khtml/rendering/render_block.h:
1674 * khtml/rendering/render_line.cpp:
1675 (InlineBox::canAccommodateEllipsis):
1676 (InlineBox::placeEllipsisBox):
1677 (InlineFlowBox::paintDecorations):
1678 (InlineFlowBox::placeEllipsisBox):
1679 (EllipsisBox::paint):
1680 (RootInlineBox::placeEllipsis):
1681 (RootInlineBox::placeEllipsisBox):
1682 * khtml/rendering/render_line.h:
1683 (khtml::EllipsisBox::m_str):
1684 (khtml::RootInlineBox::ellipsisBox):
1685 * khtml/rendering/render_text.cpp:
1686 (InlineTextBox::placeEllipsisBox):
1687 (InlineTextBox::paintDecoration):
1688 (InlineTextBox::offsetForPosition):
1689 (RenderText::positionForCoordinates):
1690 (RenderText::paint):
1691 * khtml/rendering/render_text.h:
1692 * kwq/KWQFontMetrics.h:
1693 * kwq/KWQFontMetrics.mm:
1694 (QFontMetrics::checkSelectionPoint):
1695 * kwq/WebCoreTextRenderer.h:
1697 === WebCore-145.1 ===
1699 2004-06-16 Maciej Stachowiak <mjs@apple.com>
1703 <rdar://problem/3697602> REGRESSION (144.2-TOT) Selection highlight does not draw
1705 * khtml/rendering/render_canvas.cpp:
1706 (RenderCanvas::setSelection):
1710 2004-06-16 Richard Williamson <rjw@apple.com>
1712 Fixed 3695730: Added support for embeds[], much like
1713 applets[], to allow access to a plugin's exported interface.
1717 * khtml/dom/html_document.cpp:
1718 (HTMLDocument::embeds):
1719 * khtml/dom/html_document.h:
1720 * khtml/ecma/kjs_dom.cpp:
1721 (KJS::getRuntimeObject):
1722 * khtml/ecma/kjs_html.cpp:
1723 (KJS::HTMLDocument::tryGet):
1724 (KJS::HTMLElement::tryGet):
1725 (KJS::HTMLCollection::tryGet):
1726 (KJS::HTMLCollection::getNamedItems):
1727 * khtml/ecma/kjs_html.h:
1728 (KJS::HTMLDocument::):
1729 * khtml/ecma/kjs_html.lut.h:
1731 * khtml/html/html_miscimpl.cpp:
1732 (HTMLCollectionImpl::calcLength):
1733 (HTMLCollectionImpl::getItem):
1734 (HTMLCollectionImpl::getNamedItem):
1735 * khtml/html/html_miscimpl.h:
1736 (DOM::HTMLCollectionImpl::):
1737 * khtml/html/html_objectimpl.cpp:
1738 (HTMLEmbedElementImpl::getEmbedInstance):
1739 * khtml/html/html_objectimpl.h:
1740 * kwq/KWQKHTMLPart.h:
1741 * kwq/KWQKHTMLPart.mm:
1742 (KWQKHTMLPart::getEmbedInstanceForView):
1744 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1748 <rdar://problem/3695907>: (can't enable selection inside parent where it is disabled via CSS)
1750 * khtml/css/cssparser.cpp:
1751 (CSSParser::parseValue):
1752 * khtml/css/cssstyleselector.cpp:
1753 (khtml::CSSStyleSelector::applyProperty):
1754 * khtml/rendering/render_object.cpp:
1755 (RenderObject::shouldSelect):
1756 * khtml/rendering/render_style.h:
1758 (khtml::RenderStyle::userSelect):
1759 (khtml::RenderStyle::setUserSelect):
1760 (khtml::RenderStyle::initialUserSelect):
1762 2004-06-15 David Hyatt <hyatt@apple.com>
1764 Initial impl of the EllipsisBox. This code just gets the box created and gets it placed vertically. The next
1765 stage will be to position the box horizontally as well.
1769 * khtml/rendering/bidi.cpp:
1770 (khtml::RenderBlock::checkLinesForTextOverflow):
1771 * khtml/rendering/render_line.cpp:
1772 (RootInlineBox::placeEllipsis):
1773 * khtml/rendering/render_line.h:
1774 (khtml::EllipsisBox::m_str):
1776 2004-06-15 David Hyatt <hyatt@apple.com>
1778 Implement canAccommodateEllipsis. The basic idea is that everything on a line will allow an ellipsis to be
1779 drawn on top of it unless it's a replaced element. Then, if the replaced element overlaps, the ellipsis won't
1784 * khtml/rendering/bidi.cpp:
1785 (khtml::RenderBlock::checkLinesForTextOverflow):
1786 * khtml/rendering/render_line.cpp:
1787 (InlineBox::closestLeafChildForXPos):
1788 (InlineBox::canAccommodateEllipsis):
1789 (InlineFlowBox::canAccommodateEllipsis):
1790 (RootInlineBox::canAccommodateEllipsis):
1791 * khtml/rendering/render_line.h:
1793 2004-06-15 Vicki Murley <vicki@apple.com>
1795 - added a few layout tests, rdar://3694510
1797 * layout-tests/editing/deleting/delete-image-004-expected.txt: Added.
1798 * layout-tests/editing/deleting/delete-image-004.html: Added.
1799 * layout-tests/editing/selection/extend-by-character-006-expected.txt: Added.
1800 * layout-tests/editing/selection/extend-by-character-006.html: Added.
1802 2004-06-15 Trey Matteson <trey@apple.com>
1804 Dragging tweak: We pass the mouse down coords instead of the
1805 latest mouse drag coords to the ondragstart event. This makes it
1806 easy for the client to figure the correct drag image offset,
1807 whereas the mouse drag location is next to useless for that.
1811 * kwq/KWQKHTMLPart.mm:
1812 (KWQKHTMLPart::khtmlMouseMoveEvent):
1814 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1818 <rdar://problem/3685236>: (Safari does not support onselectstart event handler)
1820 * khtml/ecma/kjs_dom.cpp:
1821 (DOMNode::getValueProperty):
1822 (DOMNode::putValue):
1823 * khtml/ecma/kjs_dom.h:
1825 * khtml/ecma/kjs_dom.lut.h:
1827 * khtml/html/html_elementimpl.cpp:
1828 (HTMLElementImpl::parseHTMLAttribute):
1829 * khtml/misc/htmlattrs.c:
1832 * khtml/misc/htmlattrs.h:
1833 * khtml/misc/htmlattrs.in:
1834 * khtml/rendering/render_object.cpp:
1835 (RenderObject::shouldSelect):
1836 * khtml/xml/dom2_eventsimpl.cpp:
1837 (EventImpl::typeToId):
1838 (EventImpl::idToType):
1839 * khtml/xml/dom2_eventsimpl.h:
1842 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1846 Fix crash with last checkin.
1848 * khtml/ecma/kjs_binding.cpp:
1849 (ScriptInterpreter::domObjectsPerDocument): check the same
1850 property we want to initialize.
1852 2004-06-15 Maciej Stachowiak <mjs@apple.com>
1856 <rdar://problem/3685309>: (properties not shared for JS wrappers of same DOM object, accessed from different frames)
1858 * khtml/ecma/kjs_binding.cpp:
1859 (ScriptInterpreter::domObjects):
1860 (ScriptInterpreter::domObjectsPerDocument):
1861 (ScriptInterpreter::ScriptInterpreter):
1862 (ScriptInterpreter::forgetDOMObject):
1863 (ScriptInterpreter::getDOMObjectForDocument):
1864 (ScriptInterpreter::putDOMObjectForDocument):
1865 (ScriptInterpreter::deleteDOMObjectsForDocument):
1866 (ScriptInterpreter::mark):
1867 (ScriptInterpreter::forgetDOMObjectsForDocument):
1868 (ScriptInterpreter::updateDOMObjectDocument):
1869 * khtml/ecma/kjs_binding.h:
1870 (KJS::ScriptInterpreter::getDOMObject):
1871 (KJS::ScriptInterpreter::putDOMObject):
1872 (KJS::ScriptInterpreter::deleteDOMObject):
1874 2004-06-15 Darin Adler <darin@apple.com>
1876 - 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
1877 (it was making most layout tests fail)
1879 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::checkAddChild): Rolled check back in.
1881 2004-06-15 David Hyatt <hyatt@apple.com>
1883 Add a truncation variable to text run boxes that will eventually be used to know how to cut out some of the glyphs when
1888 * khtml/rendering/render_text.cpp:
1889 (RenderText::clearTextOverflowTruncation):
1890 * khtml/rendering/render_text.h:
1891 (khtml::InlineTextBox:::InlineRunBox):
1892 (khtml::InlineTextBox::clearTruncation):
1894 2004-06-14 Darin Adler <darin@apple.com>
1898 - fixed some things for GC that Patrick missed, or that happened after the branch
1901 (-[DOMStyleSheet finalize]): Added.
1902 (-[DOMStyleSheetList finalize]): Added.
1903 (-[DOMCSSStyleSheet finalize]): Added.
1904 (-[DOMMediaList finalize]): Added.
1905 (-[DOMCSSRuleList finalize]): Added.
1906 (-[DOMCSSRule finalize]): Added.
1907 (-[DOMCSSStyleDeclaration finalize]): Added.
1908 (-[DOMCSSValue finalize]): Added.
1909 (-[DOMRGBColor finalize]): Added.
1910 (-[DOMRect finalize]): Added.
1911 (-[DOMCounter finalize]): Added.
1913 (-[DOMObject finalize]): Added.
1914 (-[DOMNode finalize]): Added.
1915 (-[DOMNamedNodeMap finalize]): Added.
1916 (-[DOMNodeList finalize]): Added.
1917 (-[DOMImplementation finalize]): Added.
1918 (-[DOMRange finalize]): Added.
1919 (-[DOMNodeFilter finalize]): Added.
1920 (-[DOMNodeIterator finalize]): Added.
1921 (-[DOMTreeWalker dealloc]): Removed unneeded nil check.
1922 (-[DOMTreeWalker finalize]): Added.
1924 (-[DOMHTMLCollection finalize]): Added.
1925 (-[DOMHTMLOptionsCollection finalize]): Added.
1926 * kwq/KWQClipboard.mm:
1927 (KWQClipboard::KWQClipboard): Use KWQRetain instead of retain.
1928 (KWQClipboard::~KWQClipboard): Use KWQRelease instead of release.
1929 * kwq/KWQEditCommand.mm:
1930 (-[KWQEditCommand finalize]): Added.
1932 (QFont::~QFont): Use KWQRelease instead of release.
1933 * kwq/KWQKHTMLPart.mm:
1934 (KWQKHTMLPart::keyEvent): Use KWQRetain instead of retain, and KWQRelease instead of release.
1935 (KWQKHTMLPart::mouseDown): Use KWQRetain instead of retain, and KWQRelease instead of release.
1936 (KWQKHTMLPart::mouseDragged): Use KWQRetain instead of retain, and KWQRelease instead of release.
1937 (KWQKHTMLPart::mouseUp): Use KWQRetain instead of retain, and KWQRelease instead of release.
1938 (KWQKHTMLPart::mouseMoved): Use KWQRetain instead of retain, and KWQRelease instead of release.
1939 (KWQKHTMLPart::sendContextMenuEvent): Use KWQRetain instead of retain, and KWQRelease instead of release.
1940 * kwq/KWQPageState.mm:
1941 (-[KWQPageState finalize]): Added. Filed <rdar://problem/3694163> about the fact that this is not right.
1943 (-[KWQSingleShotTimerTarget finalize]): Added.
1944 * kwq/WebCoreBridge.mm:
1945 (-[WebCoreBridge finalize]): Added. Filed <rdar://problem/3694165> about the fact that this is not right.
1947 2004-06-15 David Hyatt <hyatt@apple.com>
1949 Initial work on text truncation. Working top-down, I think I've made all the changes I will need to bidi.cpp
1950 and to the block code itself. The rest of the code can be concentrated in the render_line and render_text files.
1954 * khtml/rendering/bidi.cpp:
1955 (khtml::RenderBlock::layoutInlineChildren):
1956 (khtml::RenderBlock::findNextLineBreak):
1957 (khtml::RenderBlock::deleteEllipsisLineBoxes):
1958 (khtml::RenderBlock::checkLinesForTextOverflow):
1959 * khtml/rendering/render_block.h:
1960 * khtml/rendering/render_line.cpp:
1961 (RootInlineBox::detach):
1962 (RootInlineBox::detachEllipsisBox):
1963 (RootInlineBox::canAccommodateEllipsis):
1964 (RootInlineBox::placeEllipsis):
1965 * khtml/rendering/render_line.h:
1966 (khtml::RootInlineBox::RootInlineBox):
1967 * khtml/rendering/render_text.cpp:
1968 (RenderText::clearTextOverflowTruncation):
1969 * khtml/rendering/render_text.h:
1971 2004-06-14 Trey Matteson <trey@apple.com>
1973 3692690 - REGRESSION: canceling drag from WebView cause link to load
1974 Just need to take extra care to cancel any click handling in
1975 all cases once we're committed to doing the drag.
1979 * kwq/KWQKHTMLPart.mm:
1980 (KWQKHTMLPart::khtmlMouseMoveEvent): Call invalidateClick once
1981 we're past the hysteresis point, and definitely going to try
1982 to start a drag and drop.
1984 2004-06-14 Darin Adler <darin@apple.com>
1986 - fixed crash on boot
1988 * kwq/KWQFoundationExtras.h: (KWQRetainNSRelease):
1989 Fixed return value of this method; was uninitialized.
1991 2004-06-14 Trey Matteson <trey@apple.com>
1993 Dashboard wants access to pastboard data during the drag gesture.
1995 We address this need be allowing docs that are local files to access the
1996 pasteboard data during a drag, while other pages can only get at the types
1997 list until the drop happens. This is deemed safe because local files already
1998 have such broad super powers.
2004 (KURL::isLocalFile): Implement this QT method to look for the file scheme.
2005 * kwq/WebCoreBridge.mm:
2006 (-[WebCoreBridge dragOperationForDraggingInfo:]): Use more relaxed clipboard
2007 security for local file pages.
2008 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto.
2010 2004-06-14 Darin Adler <darin@apple.com>
2012 Reviewed by me, code changes by Patrick Beard.
2014 - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)
2016 * WebCore.pbproj/project.pbxproj: Added KWQFoundationExtras.h.
2017 * kwq/KWQFoundationExtras.h: Added.
2018 (KWQRetain): Cover for CFRetain that is tolerant of nil.
2019 (KWQRelease): Cover for CFRelease that is tolerant of nil.
2020 (KWQRetainNSRelease): Combination of a CFRetain and an -[NSObject release] that is tolerant of nil.
2021 Also includes a declaration of finalize so we can call [super finalize] without warnings on Panther.
2024 (ObjCNodeFilterCondition::ObjCNodeFilterCondition): Use CFRetain instead of retain.
2025 (ObjCNodeFilterCondition::~ObjCNodeFilterCondition): Use CFRelease instead of release.
2026 * kwq/KWQComboBox.mm:
2027 (QComboBox::~QComboBox): Use KWQRelease instead of release.
2028 (QComboBox::setFont): Use KWQRelease instead of release.
2029 (QComboBox::labelFont): Use KWQRetain instead of retain.
2031 (QCursor::QCursor): Use KWQRetain instead of retain.
2032 (QCursor::~QCursor): Use KWQRelease instead of release.
2033 (QCursor::operator=): More of the same.
2034 * kwq/KWQFileButton.mm:
2035 (KWQFileButton::KWQFileButton): Use KWQRetainNSRelease to retain a newly-allocated object.
2036 (KWQFileButton::~KWQFileButton): Use CFRelease instead of release.
2038 (QFont::QFont): Use KWQRetain instead of retain.
2039 (QFont::operator=): More of the same.
2040 (QFont::setFamily): Use KWQRelease instead of release.
2041 (QFont::setFirstFamily): Use KWQRelease instead of release.
2042 (QFont::setPixelSize): Use KWQRelease instead of release.
2043 (QFont::setWeight): Use KWQRelease instead of release.
2044 (QFont::setItalic): Use KWQRelease instead of release.
2045 (QFont::getNSFont): Use KWQRetain instead of retain.
2046 * kwq/KWQFontMetrics.mm:
2047 (QFontMetricsPrivate::~QFontMetricsPrivate): Use KWQRelease instead of release.
2048 (QFontMetricsPrivate::getRenderer): Use KWQRetain instead of retain.
2049 (QFontMetricsPrivate::setFont): Use KWQRelease instead of release.
2050 * kwq/KWQKHTMLPart.mm:
2051 (KWQKHTMLPart::~KWQKHTMLPart): Use KWQRelease instead of release.
2052 (KWQKHTMLPart::clearRecordedFormValues): Use KWQRelease instead of release.
2053 (KWQKHTMLPart::recordFormValue): Use KWQRetainNSRelease and use KWQRetain instead of retain.
2054 (KWQKHTMLPart::windowScriptObject): Use KWQRetainNSRelease.
2055 * kwq/KWQKJobClasses.mm:
2056 (KIO::TransferJobPrivate::TransferJobPrivate): Use KWQRetainNSRelease.
2057 (KIO::TransferJobPrivate::~TransferJobPrivate): Use KWQRelease instead of release.
2058 (KIO::TransferJob::setLoader): More of the same.
2060 (KWQRetainResponse): Use KWQRetain instead of retain.
2061 (KWQReleaseResponse): Use KWQRelease instead of release.
2062 * kwq/KWQPainter.mm:
2063 (QPainterPrivate::~QPainterPrivate): Use KWQRelease instead of release.
2064 (QPainter::_updateRenderer): More of the same.
2065 (QPainter::initFocusRing): Use KWQRetainNSRelease.
2066 (QPainter::clearFocusRing): Use KWQRelease instead of release.
2068 (QPixmap::QPixmap): Use KWQRetain instead of retain.
2069 (QPixmap::~QPixmap): Use KWQRelease instead of release.
2070 (QPixmap::receivedData): Use KWQRetain instead of retain.
2071 (QPixmap::resize): Use KWQRetainNSRelease and use KWQRelease instead of release.
2072 (QPixmap::operator=): More of the same.
2074 (QRegion::QRegion): Use KWQRetain instead of retain.
2075 (QRegion::~QRegion): Use KWQRelease instead of release.
2076 (QRegion::operator=): More of the same.
2078 (QTimer::start): Use KWQRetain instead of retain.
2079 (QTimer::stop): Use KWQRelease instead of release.
2080 (QTimer::fire): Use KWQRelease instead of release.
2082 (QWidget::QWidget): Use KWQRetain instead of retain.
2083 (QWidget::~QWidget): Use KWQRelease instead of release.
2084 (QWidget::setView): More of the same.
2085 * kwq/WebCoreSettings.mm: (-[WebCoreSettings finalize]):
2086 Delete the storage here, as well as in dealloc.
2088 2004-06-14 Maciej Stachowiak <mjs@apple.com>
2092 <rdar://problem/3693818>: (Safari should use CG calls for circle drawing for better performance)
2094 * kwq/KWQPainter.mm:
2095 (QPainter::drawEllipse): Use CG calls instead of NS calls for faster circle drawing.
2096 (QPainter::drawArc): Ditto.
2098 2004-06-14 Ken Kocienda <kocienda@apple.com>
2104 <rdar://problem/3690115> Crash deleting text out of iChat's profile (an editable Webview)
2106 * khtml/html/html_elementimpl.cpp:
2107 (HTMLElementImpl::isFocusable): Added null-check of parent node before deref'ing it.
2109 2004-06-14 Trey Matteson <trey@apple.com>
2111 Two tweaks to recently added "drag" pseudo-class, as suggested by
2112 Dave. The class is renamed to "-khtml-drag", and we update layout
2113 when using it, instead of only updating styles.
2117 * khtml/css/css_base.cpp:
2118 (CSSSelector::extractPseudoType):
2119 * kwq/KWQKHTMLPart.mm:
2120 (KWQKHTMLPart::snapshotDragImage):
2122 2004-06-13 Trey Matteson <trey@apple.com>
2124 Support for DHTML cut/copy/paste. We now support oncut, oncopy, onpaste. The events
2125 are sent to the first node in the selection, or else the body. Current holes are
2126 that we do not send events for operations in text fields or text areas (because it
2127 is hard to get the right hooks into the AppKit).
2129 We also send onbeforecut, onbeforecopy, onbeforepaste before the other events, which
2130 isn't really WinIE compatible, but is close. WinIE uses these to enable cut/paste
2131 menu items in its UI. DB doesn't need this for now.
2135 * khtml/ecma/kjs_dom.cpp:
2136 (DOMNode::getValueProperty): Boilerplate for new events
2137 (DOMNode::putValue): Boilerplate for new events
2138 * khtml/ecma/kjs_dom.h:
2139 (KJS::DOMNode::): Boilerplate for new events
2140 * khtml/ecma/kjs_dom.lut.h:
2141 * khtml/ecma/kjs_events.cpp:
2142 (DOMEvent::DOMEvent): "dataTransfer" and "clipboardData" properties are conditionally
2143 defined on DOMEvent, depending on if the event is a dragging or clipboard event.
2144 (DOMMouseEvent::mark): Pass mark along to any clipboard object we have.
2145 (DOMEvent::getValueProperty): Return "dataTransfer" or "clipboardData".
2146 (DOMMouseEvent::getValueProperty): Returning "dataTransfer" now handled by
2148 * khtml/ecma/kjs_events.h:
2150 (KJS::DOMMouseEvent::DOMMouseEvent):
2151 (KJS::DOMMouseEvent::):
2152 (KJS::DOMMouseEvent::toMouseEvent):
2153 * khtml/ecma/kjs_events.lut.h:
2154 * khtml/html/html_elementimpl.cpp:
2155 (HTMLElementImpl::parseHTMLAttribute): Boilerplate for new events
2156 * khtml/misc/htmlattrs.c:
2157 * khtml/misc/htmlattrs.h:
2158 * khtml/misc/htmlattrs.in: Boilerplate for new events
2159 * khtml/xml/dom2_eventsimpl.cpp:
2160 (EventImpl::typeToId): Boilerplate for new events
2161 (EventImpl::idToType): Boilerplate for new events
2162 (EventImpl::isDragEvent): New utility
2163 (EventImpl::isClipboardEvent): New utility
2164 (MouseEventImpl::isDragEvent): New utility
2165 (ClipboardEventImpl::ClipboardEventImpl): ref optional clipboard
2166 (ClipboardEventImpl::~ClipboardEventImpl): deref optional clipboard
2167 (ClipboardEventImpl::isClipboardEvent): New utility
2168 * khtml/xml/dom2_eventsimpl.h:
2169 (DOM::EventImpl::): Boilerplate for new events
2170 (DOM::ClipboardEventImpl::clipboard):
2171 * kwq/KWQClipboard.h: Monkey business so this file is includable in C++.
2172 * kwq/KWQClipboard.mm:
2173 * kwq/KWQKHTMLPart.h:
2174 * kwq/KWQKHTMLPart.mm:
2175 (KWQKHTMLPart::dispatchCPPEvent): Send one of the new events.
2176 (KWQKHTMLPart::tryCut): Declare pasteboard types, send cut events.
2177 (KWQKHTMLPart::tryCopy): Declare pasteboard types, send copy events.
2178 (KWQKHTMLPart::tryPaste): Send paste events.
2179 * kwq/WebCoreBridge.h:
2180 * kwq/WebCoreBridge.mm:
2181 (-[WebCoreBridge tryDHTMLCut]): Pass through to part
2182 (-[WebCoreBridge tryDHTMLCopy]): Ditto
2183 (-[WebCoreBridge tryDHTMLPaste]): Ditto
2185 2004-06-14 Trey Matteson <trey@apple.com>
2187 A new CSS pseudo-class ".drag" is added. Analogous to the "hover" class,
2188 this class determines styles used while an element is generating a drag
2193 * khtml/css/css_base.cpp:
2194 (CSSSelector::extractPseudoType): Boilerplate for adding new class.
2195 * khtml/css/css_base.h: Boilerplate for adding new class.
2196 * khtml/css/cssstyleselector.cpp:
2197 (khtml::CSSStyleSelector::checkOneSelector): Match new class against
2198 elements being dragged.
2199 * khtml/css/cssstyleselector.h:
2200 (khtml::StyleSelector::): Boilerplate for adding new class.
2201 * khtml/rendering/render_object.cpp:
2202 (RenderObject::RenderObject): Init new member.
2203 (RenderObject::isDragging): Return whether this object is being dragged.
2204 (RenderObject::updateDragState): Paint us an all children with a new dragged state.
2205 * khtml/rendering/render_object.h:
2206 * khtml/rendering/render_style.h: Boilerplate for adding new class.
2207 (khtml::RenderStyle::NonInheritedFlags::operator==):
2208 (khtml::RenderStyle::setBitDefaults):
2209 (khtml::RenderStyle::affectedByDragRules):
2210 (khtml::RenderStyle::setAffectedByDragRules):
2211 * kwq/KWQClipboard.mm:
2212 (KWQClipboard::dragNSImage): Method rename.
2213 * kwq/KWQKHTMLPart.h:
2214 * kwq/KWQKHTMLPart.mm:
2215 (KWQKHTMLPart::snapshotDragImage): Mark the element as being dragged before
2216 we snapshot it, so new style class will apply.
2218 2004-06-14 Ken Kocienda <kocienda@apple.com>
2222 Added a few more editing-related layout tests.
2224 * layout-tests/editing/inserting/insert-3654864-fix-expected.txt: Added.
2225 * layout-tests/editing/inserting/insert-3654864-fix.html: Added.
2226 * layout-tests/editing/inserting/insert-3659587-fix-expected.txt: Added.
2227 * layout-tests/editing/inserting/insert-3659587-fix.html: Added.
2228 * layout-tests/editing/inserting/insert-after-delete-001-expected.txt: Added.
2229 * layout-tests/editing/inserting/insert-after-delete-001.html: Added.
2230 * layout-tests/editing/inserting/insert-br-case1-expected.txt: Added.
2231 * layout-tests/editing/inserting/insert-br-case1.html: Added.
2232 * layout-tests/editing/inserting/insert-br-case2-expected.txt: Added.
2233 * layout-tests/editing/inserting/insert-br-case2.html: Added.
2234 * layout-tests/editing/inserting/insert-br-case3-expected.txt: Added.
2235 * layout-tests/editing/inserting/insert-br-case3.html: Added.
2237 2004-06-14 Ken Kocienda <kocienda@apple.com>
2241 Regarding the bug below, removing some tests since we have removed the execCommand("paste")
2242 feature, at least for now.
2244 <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
2246 * layout-tests/editing/pasteboard/copy-paste-text-001-expected.txt: Removed.
2247 * layout-tests/editing/pasteboard/copy-paste-text-001.html: Removed.
2248 * layout-tests/editing/pasteboard/cut-paste-text-002-expected.txt: Removed.
2249 * layout-tests/editing/pasteboard/cut-paste-text-002.html: Removed.
2251 2004-06-14 Ken Kocienda <kocienda@apple.com>
2257 <rdar://problem/3672377> assertion failure in AppendNodeCommandImpl::doApply due to non-0 exception code trying to insert a DIV markup string
2259 * khtml/xml/dom_nodeimpl.cpp:
2260 (NodeImpl::checkAddChild): This function was being too strict in disallowing certain nodes
2261 to be added as other child nodes, applying rules we typically use for parsing. However,
2262 those parsing rules are primarily for dealing with "bad" HTML, and should not be
2263 applied to programmatic DOM operations. The fix involves removing calls to childAllowed().
2265 2004-06-12 Trey Matteson <trey@apple.com>
2267 The drag image may be updated during a DHTML drag. This includes updating
2268 from a Timer instead of a drag event handler. In addition, an arbitrary
2269 element can be set as the one to snapshot for the drag image.
2273 * khtml/ecma/kjs_events.cpp:
2274 (ClipboardProtoFunc::tryCall): setDragImage accepts a node. Previously,
2275 it had to be an Image object.
2276 * khtml/rendering/render_object.cpp:
2277 (RenderObject::paintingRootRect): Also returns top element's rect.
2278 * khtml/rendering/render_object.h:
2279 * khtml/xml/dom2_eventsimpl.h:
2280 * kwq/KWQClipboard.h: New security mode where image is still writable, but
2283 (KWQClipboard::setDragHasStarted):
2284 * kwq/KWQClipboard.mm:
2285 (KWQClipboard::KWQClipboard): Part may be passed. Needed in the source
2286 case to generate an image from an element.
2287 (KWQClipboard::setAccessPolicy): New, replaces former becomeNumb method
2288 which wasn't flexible enough.
2289 (KWQClipboard::accessPolicy): New getter.
2290 (KWQClipboard::dragImage): No change, diff confusion.
2291 (KWQClipboard::setDragImage): Call new helper, below.
2292 (KWQClipboard::dragImageElement): New, return any element set.
2293 (KWQClipboard::setDragImageElement): New, call new helper.
2294 (KWQClipboard::setDragImage): New helper, set the image via either a
2295 pixmap or an element to snapshot, pushes the result to WebKit if we've
2296 already started the drag.
2297 (KWQClipboard::dragNSImage): Generate an NSImage and mouse offset, no
2298 matter how the drag image was set (Image or element).
2299 * kwq/KWQKHTMLPart.h: A single clipboard is kept over the life of a
2300 source drag instead of making one for each event.
2301 * kwq/KWQKHTMLPart.mm:
2302 (KWQKHTMLPart::KWQKHTMLPart): Init clipboard.
2303 (KWQKHTMLPart::~KWQKHTMLPart): Free clipboard.
2304 (KWQKHTMLPart::freeClipboard): New helper.
2305 (KWQKHTMLPart::dispatchDragSrcEvent): Most code moved to caller.
2306 (KWQKHTMLPart::khtmlMouseMoveEvent): Make clipboard for this drag session.
2307 Init clipboard to make an image from the dragSource element. Mark the
2308 drag as having started.
2309 (KWQKHTMLPart::dragSourceMovedTo): Clipboard will update WK with any new
2310 drag image, so we don't need to.
2311 (KWQKHTMLPart::dragSourceEndedAt): Ditto.
2312 (KWQKHTMLPart::elementImage): Also return element rect.
2313 * kwq/WebCoreBridge.h: Glue moved to WebCoreGraphicsBridge.
2314 * kwq/WebCoreBridge.mm:
2315 (-[WebCoreBridge dragOperationForDraggingInfo:]): Use new method.
2316 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
2317 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
2318 * kwq/WebCoreGraphicsBridge.h:
2319 * kwq/WebCoreGraphicsBridge.m:
2320 (-[WebCoreGraphicsBridge setDraggingImage:at:]): Glue moved from WebBridge
2322 2004-06-11 Chris Blumenberg <cblu@apple.com>
2324 Support for WebKit drag & drop API.
2328 * kwq/WebCoreBridge.h:
2329 * kwq/WebCoreBridge.mm:
2330 (-[WebCoreBridge _positionForPoint:]): new
2331 (-[WebCoreBridge moveDragCaretToPoint:]): call _positionForPoint
2332 (-[WebCoreBridge editableDOMRangeForPoint:]): new
2334 2004-06-11 Darin Adler <darin@apple.com>
2338 - fixed <rdar://problem/3645846>: (REGRESSION: Stuck "Loading" when logging into Google's Gmail on newer versions of Safari)
2340 * khtml/html/html_baseimpl.cpp: (HTMLFrameElementImpl::parseHTMLAttribute):
2341 Call through to base class for ATTR_ID so the "has ID" bit gets set.
2342 * khtml/html/html_imageimpl.cpp:
2343 (HTMLImageElementImpl::parseHTMLAttribute): Move ATTR_COMPOSITE code up and out of the way so
2344 it doesn't screw up ATTR_ID parsing.
2345 (HTMLMapElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID
2346 so the "has ID" bit gets set.
2347 * khtml/html/html_objectimpl.cpp:
2348 (HTMLAppletElementImpl::parseHTMLAttribute): Remove ATTR_ID case; not needed.
2349 (HTMLParamElementImpl::parseHTMLAttribute): Call through to base class for ATTR_ID
2350 so the "has ID" bit gets set.
2352 2004-06-11 Ken Kocienda <kocienda@apple.com>
2358 <rdar://problem/3659587>: "when typing in Blot, bold style does not carry over to next line after pressing 'return'"
2360 Did some work to improve the insert newline command. The refinement is to insert the newline
2361 at the upstream position of the caret, ensuring that the newline takes on the
2362 appropriate style, and does not let the caret "escape" from an element that is
2365 * khtml/editing/htmlediting_impl.cpp:
2366 (khtml::InputNewlineCommandImpl::insertNodeAfterPosition): New helper. Adds smarts about adding
2367 newlines when the selection is a caret in a block.
2368 (khtml::InputNewlineCommandImpl::insertNodeBeforePosition): Ditto.
2369 (khtml::InputNewlineCommandImpl::doApply): Simplified cases. One case in the code could not
2371 * khtml/editing/htmlediting_impl.h:
2375 <rdar://problem/3654864>: "Pasting content at start of line places it at end of previous line"
2377 (khtml::InputTextCommandImpl::prepareForTextInsertion): Simple code mistake. Content was indeed
2378 being added to the line before. Fixed to add new content after the line break.
2380 2004-07-10 Trey Matteson <trey@apple.com>
2382 Prep work for latest delegate API for dragging. In addition, I also straightened out all
2383 the cases of DHTML setting a drag image or setting pasteboard data, and how that would
2384 override WebKit's default behavior (which follows how WinIE does things).
2388 * khtml/rendering/render_object.cpp:
2389 (RenderObject::draggableNode): Obey new params for whether a DHTML or UserAgent (i.e.,
2390 WebKit) drag source is allowed.
2391 * khtml/rendering/render_object.h:
2392 * kwq/KWQKHTMLPart.h:
2393 * kwq/KWQKHTMLPart.mm:
2394 (KWQKHTMLPart::dispatchDragSrcEvent): Setting pasteboard data was moved out of here, now
2395 caller's responsibility.
2396 (KWQKHTMLPart::khtmlMouseMoveEvent): Ask bridge for allowable drag actions (DHTML vs UA).
2397 Only send drag events if DHTML is allowed. Only generate a drag image if the source is
2398 a DHTML element. Note whether event handler set any pasteboard data, and pass that fact
2400 (KWQKHTMLPart::dragSourceMovedTo): Only send drag events if DHTML is allowed.
2401 (KWQKHTMLPart::dragSourceEndedAt): Only send drag events if DHTML is allowed.
2402 * kwq/WebCoreBridge.h:
2404 2004-06-11 Ken Kocienda <kocienda@apple.com>
2408 Lay some groundwork for better testing of inserting newlines. Layout
2409 tests that use this new code will be coming soon.
2411 * khtml/editing/jsediting.cpp: Add commands for bold and inserting newlines.
2412 * layout-tests/editing/editing.js: Added new insertNewline command.
2413 which calls through to TypingCommand::insertNewline. There was no way to get
2414 to this command from JS before this addition.
2416 2004-06-11 Ken Kocienda <kocienda@apple.com>
2420 Javascript execCommand system wants to use case-insensitive QDict.
2421 The interface for QDict offers this feature, but it was never implemented.
2424 * kwq/KWQDictImpl.h: Declare bool to store case-sensitive bit.
2425 * kwq/KWQDictImpl.mm:
2426 (KWQDictImpl::KWQDictImpl): No longer drops caseSensitive on the floor; stores
2427 it in instance variable.
2428 (KWQDictImpl::insert): Make lowercase version of key for operation, if necessary.
2429 (KWQDictImpl::remove): Ditto.
2430 (KWQDictImpl::find): Ditto.
2431 (KWQDictIteratorImpl::currentStringKey): Whitespace cleanup.
2435 2004-06-10 Ken Kocienda <kocienda@apple.com>
2441 <rdar://problem/3654850>: "Style changes do not work across blocks"
2443 Now, applying styles works across blocks. I did quite a bit
2444 of internal redsign on the member functions of this class to
2445 make this work. As a bonus, from an architectural standpoint,
2446 all style changes are now done "in place". There is no more
2447 copying of content in order to perform style changes.
2449 * khtml/editing/htmlediting_impl.cpp:
2450 (khtml::ApplyStyleCommandImpl::doApply):
2451 (khtml::ApplyStyleCommandImpl::removeHTMLStyleNode):
2452 (khtml::ApplyStyleCommandImpl::removeCSSStyle):
2453 (khtml::ApplyStyleCommandImpl::removeStyle):
2454 (khtml::ApplyStyleCommandImpl::nodeFullySelected):
2455 (khtml::ApplyStyleCommandImpl::splitTextAtStartIfNeeded):
2456 (khtml::ApplyStyleCommandImpl::splitTextAtEndIfNeeded):
2457 (khtml::ApplyStyleCommandImpl::surroundNodeRangeWithElement):
2458 (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded):
2459 (khtml::ApplyStyleCommandImpl::positionInsertionPoint):
2460 * khtml/editing/htmlediting_impl.h:
2462 2004-06-10 Darin Adler <darin@apple.com>
2466 - filled out execCommand a lot more
2467 - fixed <rdar://problem/3685231>: (execCommand italic is not implemented)
2468 - fixed <rdar://problem/3685232>: (execCommand bold is not implemented)
2469 - fixed <rdar://problem/3675899>: (Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan)
2470 - fixed <rdar://problem/3675901>: (Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan)
2471 - fixed <rdar://problem/3675904>: (Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan)
2473 * khtml/editing/jsediting.cpp:
2474 (DOM::JSEditor::queryCommandIndeterm): Changed to use KHTMLPart::TriState instead of CommandState.
2475 (DOM::JSEditor::queryCommandState): Ditto.
2476 (execStyleChange): Changed to use KHTMLPart::applyStyle.
2477 (stateStyle): Used KHTMLPart::selectionHasStyle for this.
2478 (selectionStartHasStyle): Use KHTMLPart::selectionStartHasStyle for this.
2479 (valueStyle): Used KHTMLPart::selectionStartStylePropertyValue for this.
2480 (execBold): Implemented toggling, using selectionStartHasStyle.
2481 (execItalic): Implemented toggling, using selectionStartHasStyle.
2482 (execPrint): Implemented.
2483 (enabledRedo): Implemented, using canRedo.
2484 (enabledUndo): Implemented, using canUndo.
2485 (stateNone): Renamed from stateNo.
2486 (valueBackColor): Implemented, using valueStyle.
2487 (valueFontName): Implemented, using valueStyle.
2488 (valueFontSize): Implemented, using valueStyle.
2489 (valueForeColor): Implemented, using valueStyle.
2490 (valueFontSize): Implemented, using valueStyle.
2492 * khtml/khtml_part.h: Added editing operations.
2493 * khtml/khtml_part.cpp:
2494 (KHTMLPart::copyToPasteboard): Added.
2495 (KHTMLPart::cutToPasteboard): Added.
2496 (KHTMLPart::redo): Added.
2497 (KHTMLPart::undo): Added.
2498 (KHTMLPart::applyStyle): Added.
2499 (updateState): Added.
2500 (KHTMLPart::selectionHasStyle): Added.
2501 (KHTMLPart::selectionStartHasStyle): Added.
2502 (KHTMLPart::selectionStartStylePropertyValue): Added.
2503 (KHTMLPart::selectionComputedStyle): Added.
2504 (KHTMLPart::print): Added.
2506 * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Call print() on plain old part, not KWQ(part).
2508 * kwq/KWQKHTMLPart.h: Removed print(), added _haveUndoRedoOperations.
2509 * kwq/KWQKHTMLPart.mm:
2510 (KHTMLPart::print): Moved from KWQKHTMLPart to KHTMLPart.
2511 (KWQKHTMLPart::registerCommandForUndo): Moved code here from bridge.
2512 (KWQKHTMLPart::registerCommandForRedo): Moved code here from bridge.
2513 (KWQKHTMLPart::clearUndoRedoOperations): Moved code here from bridge.
2514 (KWQKHTMLPart::issueUndoCommand): Moved code here from bridge.
2515 (KWQKHTMLPart::issueRedoCommand): Moved code here from bridge.
2516 (KWQKHTMLPart::issuePasteCommand): Moved code here from bridge.
2517 (KHTMLPart::canUndo): Added.
2518 (KHTMLPart::canRedo): Added.
2520 * kwq/WebCoreBridge.h: Added undoManager, removed undo-related methods.
2521 * kwq/WebCoreBridge.mm: (-[WebCoreBridge applyStyle:]): Changed to call
2522 KHTMLPart::applyStyle.
2524 * WebCore.pbproj/.cvsignore: Updated for new Xcode files.
2526 2004-06-09 Maciej Stachowiak <mjs@apple.com>
2530 <rdar://problem/3671555>: Blot scrolls to the top every time you type
2532 * khtml/xml/dom_selection.cpp:
2533 (DOM::Selection::getRepaintRect): If the caret position is invalid, recompute it.
2535 2004-06-09 David Hyatt <hyatt@apple.com>
2537 Fix for 3607091, implement a style that prevents zoom and min font size from taking effect.
2538 The name of the new style is "-apple-text-size-adjust" with values of "none" and "auto." The default
2543 * khtml/css/cssparser.cpp:
2544 (CSSParser::parseValue):
2545 * khtml/css/cssproperties.c:
2548 * khtml/css/cssproperties.h:
2549 * khtml/css/cssproperties.in:
2550 * khtml/css/cssstyleselector.cpp:
2551 (khtml::CSSStyleSelector::styleForElement):
2552 (khtml::CSSStyleSelector::pseudoStyleForElement):
2553 (khtml::CSSStyleSelector::applyDeclarations):
2554 (khtml::CSSStyleSelector::applyProperty):
2555 (khtml::CSSStyleSelector::checkForTextSizeAdjust):
2556 * khtml/css/cssstyleselector.h:
2557 * khtml/rendering/render_style.cpp:
2559 (StyleCSS3InheritedData):
2560 (StyleCSS3InheritedData::operator==):
2561 (RenderStyle::diff):
2562 * khtml/rendering/render_style.h:
2563 (khtml::RenderStyle::lineClamp):
2564 (khtml::RenderStyle::textSizeAdjust):
2565 (khtml::RenderStyle::setTextSizeAdjust):
2566 (khtml::RenderStyle::initialTextSizeAdjust):
2568 2004-06-09 David Hyatt <hyatt@apple.com>
2570 Implement parsing and setting of the text-overflow CSS3 property.
2572 Reviewed by kocienda
2574 * khtml/css/cssparser.cpp:
2575 (CSSParser::parseValue):
2576 * khtml/css/cssproperties.c:
2579 * khtml/css/cssproperties.h:
2580 * khtml/css/cssproperties.in:
2581 * khtml/css/cssstyleselector.cpp:
2582 (khtml::CSSStyleSelector::applyProperty):
2583 * khtml/css/cssvalues.c:
2586 * khtml/css/cssvalues.h:
2587 * khtml/css/cssvalues.in:
2588 * khtml/rendering/render_style.cpp:
2590 (StyleCSS3NonInheritedData::operator==):
2591 (RenderStyle::diff):
2592 * khtml/rendering/render_style.h:
2593 (khtml::RenderStyle::textOverflow):
2594 (khtml::RenderStyle::setTextOverflow):
2595 (khtml::RenderStyle::initialTextOverflow):
2597 2004-06-09 David Hyatt <hyatt@apple.com>
2599 Fix for 3678031, implement better flexing for Emerson headers. This involved adding support for max-width: intrinsic,
2600 fixing the box layout algorithm to properly deal with max-widths, and implementing support for baseline alignment
2601 so that boxes can be aligned vertically along their interior baselines.
2603 Reviewed by kocienda
2605 * khtml/css/cssparser.cpp:
2606 (CSSParser::parseValue):
2607 (CSSParser::parseShadow):
2608 * khtml/css/cssparser.h:
2609 * khtml/css/cssproperties.c:
2612 * khtml/css/cssproperties.h:
2613 * khtml/css/cssproperties.in:
2614 * khtml/css/cssstyleselector.cpp:
2615 (khtml::CSSStyleSelector::applyProperty):
2616 * khtml/css/cssvalues.c:
2619 * khtml/css/cssvalues.h:
2620 * khtml/css/cssvalues.in:
2621 * khtml/misc/khtmllayout.h:
2623 * khtml/rendering/render_block.cpp:
2624 (khtml::RenderBlock::baselinePosition):
2625 (khtml::RenderBlock::getBaselineOfFirstLineBox):
2626 * khtml/rendering/render_block.h:
2627 * khtml/rendering/render_box.cpp:
2628 (RenderBox::RenderBox):
2629 (RenderBox::overrideWidth):
2630 (RenderBox::overrideHeight):
2631 (RenderBox::calcWidth):
2632 (RenderBox::calcHeight):
2633 * khtml/rendering/render_box.h:
2634 (khtml::RenderBox::overrideSize):
2635 (khtml::RenderBox::setOverrideSize):
2636 * khtml/rendering/render_flexbox.cpp:
2637 (khtml::RenderFlexibleBox::calcMinMaxWidth):
2638 (khtml::RenderFlexibleBox::layoutBlock):
2639 (khtml::RenderFlexibleBox::layoutHorizontalBox):
2640 (khtml::RenderFlexibleBox::layoutVerticalBox):
2641 (khtml::RenderFlexibleBox::placeChild):
2642 (khtml::RenderFlexibleBox::allowedChildFlex):
2643 * khtml/rendering/render_flexbox.h:
2644 * khtml/rendering/render_image.cpp:
2645 (RenderImage::isWidthSpecified):
2646 (RenderImage::isHeightSpecified):
2647 * khtml/rendering/render_object.h:
2648 (khtml::RenderObject::getBaselineOfFirstLineBox):
2649 (khtml::RenderObject::overrideSize):
2650 (khtml::RenderObject::overrideWidth):
2651 (khtml::RenderObject::overrideHeight):
2652 (khtml::RenderObject::setOverrideSize):
2653 * khtml/rendering/render_style.cpp:
2654 (StyleFlexibleBoxData::StyleFlexibleBoxData):
2655 (StyleFlexibleBoxData::operator==):
2656 (ShadowData::operator==):
2657 * khtml/rendering/render_style.h:
2658 (khtml::RenderStyle::boxPack):
2659 (khtml::RenderStyle::setBoxPack):
2660 * khtml/rendering/table_layout.cpp:
2661 (AutoTableLayout::layout):
2663 2004-06-09 Richard Williamson <rjw@apple.com>
2665 Added support for drawing un-rasterized transformed PDFs.
2669 * khtml/ecma/kjs_html.cpp:
2670 (KJS::Context2DFunction::tryCall):
2672 2004-06-09 Darin Adler <darin@apple.com>
2676 - implemented still more execCommand commands
2678 * khtml/editing/jsediting.cpp: Added a lot more commands, and reformatted a bit.
2680 2004-06-08 Darin Adler <darin@apple.com>
2684 - implemented a bunch more execCommand commands
2685 - fixed <rdar://problem/3684792>: (JavaScript execCommand("paste") presents security issues)
2686 - fixed <rdar://problem/3675898>: (Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan)
2687 - fixed <rdar://problem/3675903>: (Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan)
2688 - about half of <rdar://problem/3685231>: (execCommand italic is not implemented)
2689 - about half of <rdar://problem/3685232>: (execCommand bold is not implemented)
2691 * khtml/editing/jsediting.h: Made constructor inline. Deleted a few unneeded member functions
2692 that are now just private functions inside jsediting.cpp.
2694 * khtml/editing/jsediting.cpp:
2695 (commandImp): Changed this around, so the dictionary is a static local to this function,
2696 and initialized with C++ "first time initialization" rule.
2697 (DOM::JSEditor::execCommand): Got rid of special case for 0 for function pointer and added const.
2698 (DOM::JSEditor::queryCommandEnabled): Ditto.
2699 (DOM::JSEditor::queryCommandIndeterm): Got rid of special case for 0 for function pointer, added const,
2700 and use a common three-state state function rather than a separate "indeterm" function.
2701 (DOM::JSEditor::queryCommandState): Ditto.
2702 (DOM::JSEditor::queryCommandValue): More of the same.
2703 (execNotImplemented): Added. Used for unimplemented commands; there are only a few left.
2704 (execCopy): Renamed.
2706 (execDelete): Renamed.
2707 (execInsertText): Renamed.
2708 (execPaste): Renamed, and disabled.
2709 (execRedo): Renamed.
2710 (execSelectAll): Renamed.
2711 (execUndo): Renamed.
2712 (execStyleChange): Added. Helper function for commands that are style changes.
2714 (execItalic): Added.
2715 (execJustifyCenter): Added.
2716 (execJustifyFull): Added.
2717 (execJustifyLeft): Added.
2718 (execJustifyRight): Added.
2719 (execSubscript): Added.
2720 (execSuperscript): Added.
2721 (execUnselect): Added.
2722 (stateNotImplemented): Added. Used for unimplemented state queries; there are a few left.
2724 (valueNotImplemented): Added. Used for unimplemented value queries; there are a few left.
2725 (nullStringValue): Added.
2726 (createCommandDictionary): Changed the initDict function into this function. Added implementations
2727 for many commands and condensed format so it's easier to work with.
2729 2004-06-08 Darin Adler <darin@apple.com>
2733 - our part of fix to <rdar://problem/3629334>: (REGRESSION (Tiger): titles on pop-ups menus are truncated and show ellipses)
2735 * kwq/KWQComboBox.mm: (QComboBox::QComboBox): Call setLineBreakMode:NSLineBreakByClipping.
2736 In the current version of Tiger I am using, this is not implemented yet.
2738 - a couple of other unrelated changes
2740 * khtml/rendering/render_form.cpp: (RenderTextArea::calcMinMaxWidth): Put a little more code
2741 inside the APPLE_CHANGES ifdef.
2742 * kwq/KWQTextEdit.h: Remove unused setTabStopWidth function, and make empty setTextFormat
2743 function an inline for slightly smaller code size.
2744 * kwq/KWQTextEdit.mm: Ditto.
2745 * kwq/KWQTextField.mm: Update copyright date.
2747 2004-06-08 Trey Matteson <trey@apple.com>
2749 A DHTML drag source can now change the dragging image during the drag. Currently
2750 it may only be set to a static image.
2754 * kwq/KWQKHTMLPart.mm:
2755 (KWQKHTMLPart::dragSourceMovedTo): If the ondrag event handler set an image,
2757 * kwq/WebCoreBridge.h:
2759 2004-06-08 Ken Kocienda <kocienda@apple.com>
2763 Changes to the selection state for these tests as a result of my previous
2764 checkin. The changes are minor to a couple of offsets. I looked at the
2765 changes and approve them.
2767 * layout-tests/editing/deleting/delete-block-contents-001-expected.txt
2768 * layout-tests/editing/deleting/delete-block-contents-002-expected.txt
2769 * layout-tests/editing/deleting/delete-block-contents-003-expected.txt
2771 2004-06-08 Ken Kocienda <kocienda@apple.com>
2777 <rdar://problem/3654841>: "Hitting delete key with start of block selected
2778 does not merge content with preceding block"
2780 Selections that span blocks now work correctly for deleting the selection and inserting
2781 over the selection. The largest part of the change is adding a new field to the
2782 RemoveNodeAndPruneCommand and its impl version. This was done since the starting block
2783 for a multi-block selection should always be preserved when deleting, and this was
2784 a convenient way to express this using the code structure already in place.
2786 * khtml/editing/htmlediting.cpp:
2787 (khtml::RemoveNodeAndPruneCommand::RemoveNodeAndPruneCommand): Modify this command to
2788 take two nodes: the node to remove and a node to stop at when pruning back up the tree.
2789 (khtml::RemoveNodeAndPruneCommand::pruneNode): New accessor, replaces old node() accessor.
2790 (khtml::RemoveNodeAndPruneCommand::stopNode): New accessor for additional feature described
2792 * khtml/editing/htmlediting.h:
2793 * khtml/editing/htmlediting_impl.cpp:
2794 (khtml::shouldPruneNode): blow flow renderers can now be deleted, but not if they are a
2795 rootEditableElement.
2796 (khtml::CompositeEditCommandImpl::removeNodeAndPrune): Pass new stopNode param and change the
2797 name of the existing node argument to pruneNode to distinguish it.
2798 (khtml::DeleteSelectionCommandImpl::doApply): Pass the block containing the start of the
2799 selection to removeNodeAndPrune in each case. Also, add one little loop to move all
2800 the content from the block containing the end of the selection if that block is different
2801 than the start block.
2802 (khtml::RemoveNodeAndPruneCommandImpl::RemoveNodeAndPruneCommandImpl): Implement the
2803 pruneNode/stopNode design already described.
2804 (khtml::RemoveNodeAndPruneCommandImpl::~RemoveNodeAndPruneCommandImpl): Manage the
2805 lifecycle of stopNode.
2806 (khtml::RemoveNodeAndPruneCommandImpl::doApply): Add a check to stop at the stop
2808 * khtml/editing/htmlediting_impl.h:
2809 (khtml::RemoveNodeAndPruneCommandImpl::pruneNode): New accessor.
2810 (khtml::RemoveNodeAndPruneCommandImpl::stopNode): Ditto.
2812 2004-06-07 Trey Matteson <trey@apple.com>
2814 Clipboard access during DHTML dragging is made secure.
2818 * kwq/KWQClipboard.h:
2820 * kwq/KWQClipboard.mm:
2821 (KWQClipboard::KWQClipboard): Init new policy and changeCount members.
2822 (KWQClipboard::becomeNumb): Set policy to numb.
2823 (KWQClipboard::clearData): Check policy.
2824 (KWQClipboard::clearAllData): Check policy.
2825 (KWQClipboard::getData): Check policy and changeCount.
2826 (KWQClipboard::setData): Check policy.
2827 (KWQClipboard::types): Check policy and ChangeCount.
2828 (KWQClipboard::setDragLocation): Check policy.
2829 (KWQClipboard::setDragImage): Check policy.
2830 (KWQClipboard::setDropEffect): Check policy.
2831 (KWQClipboard::setEffectAllowed): Check policy.
2832 * kwq/KWQKHTMLPart.mm:
2833 (KWQKHTMLPart::dispatchDragSrcEvent): Set policy when creating clipboard,
2834 and numb-ify it when we're done.
2835 * kwq/WebCoreBridge.mm:
2836 (-[WebCoreBridge dragOperationForDraggingInfo:]): Set policy when creating clipboard,
2837 and numb-ify it when we're done.
2838 (-[WebCoreBridge dragExitedWithDraggingInfo:]): Ditto
2839 (-[WebCoreBridge concludeDragForDraggingInfo:]): Ditto
2841 2004-06-08 Ken Kocienda <kocienda@apple.com>
2845 * khtml/editing/jsediting.cpp:
2846 (DOM::EditorCommand::): Stray capital letter in "selectAll" command static
2847 initializer prevented the command from ever working since the command
2848 strings are lower-cased when trying to find a match, but not when they
2849 are inserted into the dictionary. This is a one character change to make
2850 the string "selectall" in the initializer.
2852 2004-06-07 Trey Matteson <trey@apple.com>
2854 WebCore will now generate a default drag image when an element serves as a drag
2855 source. The basic idea is the image contains the element and all its children.
2857 As for the implementation, instead of adding a new paintAction I added a new
2858 field to the paintInfo struct, "paintingRoot". If this field is set, painting will
2859 only paint that root's descendants.
2861 Some code also moved from the bridge to the part, to be available within WebCore.
2865 * khtml/rendering/render_block.cpp:
2866 (khtml::RenderBlock::paintObject): Pass along paintingRoot to kids.
2867 (khtml::RenderBlock::paintFloats): Pass along paintingRoot to kids.
2868 * khtml/rendering/render_box.cpp:
2869 (RenderBox::paintBoxDecorations): Test paintingRoot before painting.
2870 * khtml/rendering/render_canvasimage.cpp:
2871 (RenderCanvasImage::paint): Test paintingRoot before painting.
2872 * khtml/rendering/render_flow.cpp:
2873 (RenderFlow::paintLineBoxBackgroundBorder): Test paintingRoot before painting.
2874 (RenderFlow::paintLineBoxDecorations): Test paintingRoot before painting.
2875 * khtml/rendering/render_image.cpp:
2876 (RenderImage::paint): Test paintingRoot before painting.
2877 * khtml/rendering/render_inline.cpp:
2878 (RenderInline::paint): Pass along paintingRoot to kids.
2879 * khtml/rendering/render_layer.cpp:
2880 (RenderLayer::paint): Pass along paintingRoot to kids.
2881 (RenderLayer:: paintLayer): Pass along paintingRoot to kids. Test if we are within the
2882 paintingRoot to decide whether to pass the root to our renderer.
2883 * khtml/rendering/render_layer.h:
2884 * khtml/rendering/render_object.cpp:
2885 (RenderObject::hasAncestor): New utility.
2886 (RenderObject::absoluteBoundingBoxRect): Helper for paintingRootRect
2887 (RenderObject::addAbsoluteRectForLayer): Helper for paintingRootRect
2888 (RenderObject::paintingRootRect): Return rect that will be painted if we are
2890 (RenderObject::draggableNode): Add test to avoid rare NULL ptr crash.
2891 * khtml/rendering/render_object.h:
2892 (khtml::RenderObject::PaintInfo::PaintInfo): Add paintingRoot field.
2893 (khtml::RenderObject::paintingRootForChildren): New utility. Return the current
2894 paintingRoot, or nil if we are the root (so kids draw normally).
2895 (khtml::RenderObject::shouldPaintWithinRoot): New utility. We can paint if we
2896 are the paintingRoot, or no root is set.
2897 * khtml/rendering/render_replaced.cpp:
2898 (RenderReplaced::shouldPaint): Pass along paintingRoot to kids.
2899 * khtml/rendering/render_table.cpp:
2900 (RenderTable::paint): Pass along paintingRoot to kids.
2901 * khtml/rendering/render_text.cpp:
2902 (RenderText::paint): Test paintingRoot before painting.
2903 * kwq/KWQKHTMLPart.h:
2904 * kwq/KWQKHTMLPart.mm:
2905 (KWQKHTMLPart::KWQKHTMLPart): Init new _elementToDraw member.
2906 (KWQKHTMLPart::paint): Generalized to handle cases of painting selection or a
2908 (KWQKHTMLPart::khtmlMouseMoveEvent): Make a default image if dragSrc didn't
2910 (KWQKHTMLPart::selectionRect): Moved from bridge.
2911 (KWQKHTMLPart::visibleSelectionRect): Ditto.
2912 (KWQKHTMLPart::imageFromRect): Newly factored code, from bridge.
2913 (KWQKHTMLPart::selectionImage): Moved from bridge, wrapper around imageFromRect.
2914 (KWQKHTMLPart::elementImage): New method, wrapper around imageFromRect.
2915 * kwq/WebCoreBridge.h:
2916 * kwq/WebCoreBridge.mm:
2917 (-[WebCoreBridge drawRect:withPainter:]): Just call part to draw.
2918 (-[WebCoreBridge visibleSelectionRect]): Guts moved to part.
2919 (-[WebCoreBridge selectionImage]): Ditto.
2921 2004-06-07 Darin Adler <darin@apple.com>
2925 - fixed <rdar://problem/3682821>: (setTimeout fails when additional parameters are used and timeout function is a string)
2927 * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Ignore excess arguments instead
2928 of rejecting the argument list for window.scrollBy, scroll, scrollTo, moveBy, moveTo,
2929 resizeBy, resizeTo, and setTimeout (when the timeout is a string rather than an object).
2931 - did a refinement of JSEditor to be slightly more efficient, and not have to edit
2932 both the .cpp file and the .h when adding more implementation
2934 * khtml/khtml_part.h: Hack so we can get to the docImpl and xmlDocImpl without being a friend.
2935 * khtml/editing/jsediting.h: Simplified a bit.
2936 * khtml/editing/jsediting.cpp: Redid to use a table, and simplified a bit.
2938 2004-06-07 Ken Kocienda <kocienda@apple.com>
2944 <rdar://problem/3682354>: "Typing style does not work yet"
2946 Did the final hook-up of support that has landed in the tree in the
2947 recent past as part of ongoing style-application work.
2949 For the most part, this patch modifies the InputNewlineCommandImpl and
2950 InputTextCommandImpl commands to insert a styling span when there is
2951 a typing style active.
2953 * khtml/editing/htmlediting_impl.cpp:
2954 (khtml::CompositeEditCommandImpl::createTypingStyleElement): Helper
2955 shared by the two commands modified.
2956 (khtml::InputNewlineCommandImpl::doApply): Create a styling span if the
2957 part has a typing style. Maintain a nodeToInsert local variable, which is
2958 either the break to insert or a styling span containing the break. Also,
2959 remove some utterly bogus derefs. They are just plain wrong.
2960 (khtml::InputTextCommandImpl::InputTextCommandImpl): Don't need to keep
2961 m_insertedTextNode. The composite commands this command uses will keep
2962 track of that object's lifetime. We do not need to do that here.
2963 (khtml::InputTextCommandImpl::~InputTextCommandImpl): No longer need
2964 to deref obsolete m_insertedTextNode.
2965 (khtml::InputTextCommandImpl::prepareForTextInsertion): Handle the case
2966 where a styling span needs to be added.
2967 (khtml::TypingCommandImpl::insertText): Create a new InputTextCommand when
2968 there is an active typping style.
2969 * khtml/editing/htmlediting_impl.h: Declare createTypingStyleElement helper.
2970 Remove m_insertedTextNode from InputTextCommandImpl.
2971 * kwq/WebCoreBridge.mm:
2972 (-[WebCoreBridge applyStyle:]): Swicth on the state of the selection, calling
2973 setTypingStyle when a caret and ApplyStyleCommand when a range.
2975 2004-06-07 Darin Adler <darin@apple.com>
2979 * khtml/editing/jsediting.h: Elide some unnecessary namespace prefixes.
2980 * khtml/editing/jsediting.cpp: Make typed constants instead of macros.
2981 (DOM::JSEditor::commandDict): Elide unnecessary namespace prefix.
2982 (DOM::JSEditor::execCommand): Remove xxxNotImplemented functions; just return false instead.
2983 (DOM::JSEditor::queryCommandEnabled): Ditto.
2984 (DOM::JSEditor::queryCommandIndeterm): Ditto.
2985 (DOM::JSEditor::queryCommandState): Ditto.
2986 (DOM::JSEditor::queryCommandSupported): Ditto.
2987 (DOM::JSEditor::queryCommandValue): Ditto.
2989 2004-06-05 Trey Matteson <trey@apple.com>
2991 As agreed with Hyatt and Louch, do not post incoming dragging events
2996 * khtml/khtmlview.cpp:
2997 (KHTMLView::updateDragAndDrop): For any drag target that is a text node,
2998 use its parent instead.
3000 2004-06-03 Trey Matteson <trey@apple.com>
3002 DHTML dragging uses the Cocoa NSDragOperation on both the source and dest ends.
3004 In addition, I caught a prime gaffe where I had used "dropAllowed" instead of "effectAllowed"
3005 for that particular WinIE property. That is renamed throughout.
3009 * khtml/ecma/kjs_events.cpp:
3010 (stringOrUndefined): New little helper.
3011 (Clipboard::getValueProperty): Return Undefined if dropEffect or effectAllowed are not set.
3012 (Clipboard::putValue): Rename.
3013 * khtml/ecma/kjs_events.h:
3014 (KJS::Clipboard::): Rename.
3015 * khtml/ecma/kjs_events.lut.h:
3016 * khtml/xml/dom2_eventsimpl.h: Rename.
3017 * kwq/KWQClipboard.h: Rename, add access to Cocoa drag op.
3018 * kwq/KWQClipboard.mm:
3019 (KWQClipboard::dropEffect): These 4 just moved in the file.
3020 (KWQClipboard::setDropEffect):
3021 (KWQClipboard::effectAllowed):
3022 (KWQClipboard::setEffectAllowed):
3023 (cocoaOpFromIEOp): Convert from an IE operation string to a Cocoa DragOp
3024 (IEOpFromCocoaOp): and vice-versa
3025 (KWQClipboard::sourceOperation): Return effectAllowed, converted to a NSDragOp
3026 (KWQClipboard::destinationOperation): Return dropEffect, converted to a NSDragOp
3027 (KWQClipboard::setSourceOperation): Set effectAllowed, using a Cocoa value
3028 (KWQClipboard::setDestinationOperation): Set dropEffect, using a Cocoa value
3029 * kwq/KWQKHTMLPart.h:
3030 * kwq/KWQKHTMLPart.mm:
3031 (KWQKHTMLPart::dispatchDragSrcEvent): Return the drag op specified by the source element.
3032 (KWQKHTMLPart::khtmlMouseMoveEvent): Pass our drag op up to WebKit.
3033 (KWQKHTMLPart::dragSourceMovedTo): Pass NULL for new arg.
3034 (KWQKHTMLPart::dragSourceEndedAt): Ditto
3035 * kwq/WebCoreBridge.h:
3036 * kwq/WebCoreBridge.mm:
3037 (-[WebCoreBridge dragOperationForDraggingInfo:]): Set the incoming dragOp onto the clipboard
3038 so DHTML can access it. In addition, validate whatever op DHTML returns so we play well
3041 2004-06-04 David Hyatt <hyatt@apple.com>
3043 Add support for auto values in flex transitions. Add support for mapping the back end values to
3044 front end values. Next it's time to actually try to use this stuff in render_flexbox.
3048 * khtml/css/css_valueimpl.cpp:
3050 * khtml/css/css_valueimpl.h:
3051 (DOM::FlexGroupTransitionValueImpl::isAuto):
3052 * khtml/css/cssparser.cpp:
3053 (FlexGroupTransitionParseContext::length):
3054 (FlexGroupTransitionParseContext::commitAutoValue):
3055 (FlexGroupTransitionParseContext::commitValue):
3056 (CSSParser::parseFlexGroupTransition):
3057 * khtml/css/cssstyleselector.cpp:
3058 (khtml::CSSStyleSelector::applyProperty):
3059 * khtml/rendering/render_style.cpp:
3060 (FlexGroupTransitionData::operator==):
3061 * khtml/rendering/render_style.h:
3062 (khtml::FlexGroupTransitionData::next):
3063 (khtml::FlexGroupTransitionData::isAuto):
3067 2004-06-04 Kevin Decker <kdecker@apple.com>
3071 - kwq/KWQKHTMLPart.mm: addMessagetoConsole places sourceURL in the dictionary
3072 - khtml/xml/dom_docimpl.cpp: right now, we don't have a way to get a url,
3073 so we leave this blank
3074 - khtml/ecma/kjs_window.cpp: still need to get the real line number and sourceURL
3075 - khtml/ecma/kjs_proxy.cpp: now passing the sourceURL to addMessageToConsole
3076 - khtml/ecma/kjs_events.cpp: still need to grab an accurate line number and sourceURL
3078 * khtml/ecma/kjs_events.cpp:
3079 (JSEventListener::handleEvent):
3080 (JSLazyEventListener::handleEvent):
3081 * khtml/ecma/kjs_proxy.cpp:
3082 (KJSProxyImpl::evaluate):
3083 * khtml/ecma/kjs_window.cpp:
3084 (Window::isSafeScript):
3085 (ScheduledAction::execute):
3086 * khtml/xml/dom_docimpl.cpp:
3087 (DocumentImpl::open):
3088 * kwq/KWQKHTMLPart.h:
3089 * kwq/KWQKHTMLPart.mm:
3090 (KWQKHTMLPart::addMessageToConsole):
3092 2004-06-04 Ken Kocienda <kocienda@apple.com>
3096 Fix a comical little bug where the style-applying code did not take into
3097 account deleting content from the start of a block. After the deletion,
3098 the caret is placed in the node before the deleted content and so
3099 inserting a styled fragment after the deletion position works great.
3100 The problem is that if the selectionis at the start of a block, there
3101 is no "position before the deletion" and the caret is placed in the new
3102 first child of the block. Inserting the styled content after this
3103 node is just plain wrong. Now, this case is handled correctly, and the
3104 styled content is inserted in the proper position.
3106 * khtml/editing/htmlediting_impl.cpp:
3107 (khtml::ApplyStyleCommandImpl::insertFragment):
3109 2004-06-04 Ken Kocienda <kocienda@apple.com>
3113 * khtml/rendering/bidi.cpp:
3114 (khtml::RenderBlock::layoutInlineChildren): Only add additional line height
3115 in for root editable elements. This helps to keep layout from deviating too
3116 much from the intended page layout, but still gives an empty document a line
3117 in which it can blink the caret.
3119 2004-06-04 Ken Kocienda <kocienda@apple.com>
3123 Made some progress on this set of related bugs:
3125 <rdar://problem/3675867>: "Make execCommand work as specified in the Javascript execCommand Compatibility Plan"
3126 <rdar://problem/3675898>: "Make queryCommandEnabled work as specified in the Javascript execCommand Compatibility Plan"
3127 <rdar://problem/3675899>: "Make queryCommandIndeterm work as specified in the Javascript execCommand Compatibility Plan"
3128 <rdar://problem/3675901>: "Make queryCommandState work as specified in the Javascript execCommand Compatibility Plan"
3129 <rdar://problem/3675903>: "Make queryCommandSupported work as specified in the Javascript execCommand Compatibility Plan"
3130 <rdar://problem/3675904>: "Make queryCommandValue work as specified in the Javascript execCommand Compatibility Plan"
3132 I did several things to move the ahead with the plan:
3134 1. The latter five methods did not appear in the tree at all. Now they do, although
3136 2. I removed the implementation for these editing methods from dom_docimpl.cpp, and moved
3137 them out to new js_editing.cpp/js_editing.h files. The remaining code in dom_docimpl.cpp
3138 is glue to call over to the new JSEditor object defined in the new files.
3140 3. For a couple of the command implementations in js_editing.cpp, I made a stab at returning sensible values.
3141 For others, I just return place-holder values. I have added some comments to describe what has been done and
3142 what still needs to be done.
3144 * WebCore.pbproj/project.pbxproj:
3145 * khtml/dom/dom_doc.cpp: Add call-overs for these methods.
3146 (DOM::Document::queryCommandEnabled):
3147 (DOM::Document::queryCommandIndeterm):
3148 (DOM::Document::queryCommandState):
3149 (DOM::Document::queryCommandSupported):
3150 (DOM::Document::queryCommandValue):
3151 * khtml/dom/dom_doc.h:
3152 * khtml/ecma/kjs_dom.cpp: Add queryCommandXXX terminology.
3153 (DOMDocumentProtoFunc::tryCall):
3154 * khtml/ecma/kjs_dom.h:
3155 (KJS::DOMDocument::):
3156 * khtml/ecma/kjs_dom.lut.h:
3158 * khtml/editing/jsediting.cpp: Added. This file implements the guts of editing-related JS methods.
3159 (DOM::execCommandNotImplemented):
3160 (DOM::queryBoolNotImplemented):
3161 (DOM::queryValueNotImplemented):
3162 (DOM::JSEditor::commandDict):
3163 (DOM::JSEditor::JSEditor):
3164 (DOM::JSEditor::~JSEditor):
3165 (DOM::JSEditor::commandIdentifier):
3166 (DOM::JSEditor::addCommand):
3167 (DOM::JSEditor::initDict):
3168 (DOM::JSEditor::execCommand):
3169 (DOM::JSEditor::queryCommandEnabled):
3170 (DOM::JSEditor::queryCommandIndeterm):
3171 (DOM::JSEditor::queryCommandState):
3172 (DOM::JSEditor::queryCommandSupported):
3173 (DOM::JSEditor::queryCommandValue):
3174 (DOM::JSEditor::execCommandCopy):
3175 (DOM::JSEditor::execCommandCut):
3176 (DOM::JSEditor::execCommandDelete):
3177 (DOM::JSEditor::execCommandInsertText):
3178 (DOM::JSEditor::execCommandPaste):
3179 (DOM::JSEditor::execCommandRedo):
3180 (DOM::JSEditor::execCommandSelectAll):
3181 (DOM::JSEditor::execCommandUndo):
3182 (DOM::JSEditor::enabledIfPartNotNull):
3183 (DOM::JSEditor::enabledIfSelectionNotEmpty):
3184 (DOM::JSEditor::enabledIfSelectionIsRange):
3185 (DOM::JSEditor::commandSupported):
3186 * khtml/editing/jsediting.h: Added.
3187 (DOM::JSEditor::CommandIdentifier::CommandIdentifier):
3188 (DOM::JSEditor::document):
3189 (DOM::JSEditor::part):
3190 * khtml/xml/dom_docimpl.cpp: Rework JS editing support into glue that calls over into new JSEditor object.
3191 (DocumentImpl::DocumentImpl):
3192 (DocumentImpl::~DocumentImpl):
3193 (DocumentImpl::jsEditor):
3194 (DocumentImpl::execCommand):
3195 (DocumentImpl::queryCommandEnabled):
3196 (DocumentImpl::queryCommandIndeterm):
3197 (DocumentImpl::queryCommandState):
3198 (DocumentImpl::queryCommandSupported):
3199 (DocumentImpl::queryCommandValue):
3200 * khtml/xml/dom_docimpl.h:
3202 2004-06-03 Richard Williamson <rjw@apple.com>
3204 Added setCompositeOperation method to Context2D.
3205 Actually pass composite operation to drawPixmap (instead of 1).
3209 * khtml/ecma/kjs_html.cpp:
3210 (KJS::Context2DFunction::tryCall):
3211 * khtml/ecma/kjs_html.h:
3213 * khtml/ecma/kjs_html.lut.h:
3216 * kwq/KWQPainter.mm:
3217 (QPainter::compositeOperatorFromString):
3218 (QPainter::drawPixmap):
3220 2004-06-03 David Hyatt <hyatt@apple.com>
3222 Add support for box-flex-group-transition (whew!), a new property that is going to enable some incredibly
3223 complicated flexing layouts in HTML.
3225 This is Stage 1 - wire up the CSS property and make it get parsed into front-end data. Nobody actually looks
3230 * khtml/css/css_valueimpl.cpp:
3231 (CSSInheritedValueImpl::cssText):
3232 (ShadowValueImpl::cssText):
3234 (FlexGroupTransitionValueImpl::~FlexGroupTransitionValueImpl):
3235 (FlexGroupTransitionValueImpl::cssText):
3236 * khtml/css/css_valueimpl.h:
3237 (DOM::FlexGroupTransitionValueImpl::cssValueType):
3238 * khtml/css/cssparser.cpp:
3239 (CSSParser::parseValue):
3240 (CSSParser::parseShadow):
3241 (FlexGroupTransitionParseContext::length):
3242 (FlexGroupTransitionParseContext::~FlexGroupTransitionParseContext):
3243 (FlexGroupTransitionParseContext::failed):
3244 (FlexGroupTransitionParseContext::allowGroup):
3245 (FlexGroupTransitionParseContext::commitGroup):
3246 (FlexGroupTransitionParseContext::commitSlash):
3247 (FlexGroupTransitionParseContext::commitLength):
3248 (FlexGroupTransitionParseContext::commitValue):
3249 (CSSParser::parseFlexGroupTransition):
3250 * khtml/css/cssparser.h:
3251 * khtml/css/cssproperties.c:
3254 * khtml/css/cssproperties.h:
3255 * khtml/css/cssproperties.in:
3256 * khtml/rendering/render_style.cpp:
3257 (StyleFlexibleBoxData::StyleFlexibleBoxData):
3258 (StyleFlexibleBoxData::operator==):
3259 (StyleFlexibleBoxData::transitionDataEquivalent):
3260 (StyleCSS3InheritedData::operator==):
3261 (StyleCSS3InheritedData::shadowDataEquivalent):
3262 (ShadowData::operator==):
3263 (RenderStyle::setBoxFlexGroupTransition):
3265 (FlexGroupTransitionData::operator==):
3266 * khtml/rendering/render_style.h:
3267 (khtml::FlexGroupTransitionData::next):
3268 (khtml::FlexGroupTransitionData::~FlexGroupTransitionData):
3269 (khtml::FlexGroupTransitionData::operator!=):
3270 (khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
3271 (khtml::RenderStyle::boxFlexGroupTransition):
3273 2004-06-03 Richard Williamson <rjw@apple.com>
3275 Add extra sanity check to Image parameter of drawImage...
3279 * khtml/ecma/kjs_html.cpp:
3280 (KJS::Context2DFunction::tryCall):
3282 2004-06-02 David Hyatt <hyatt@apple.com>
3284 Fix for 3673931, negative margins on objects that dodge floats not handled correctly.
3288 * khtml/rendering/render_block.cpp:
3289 (khtml::RenderBlock::layoutBlockChildren):
3291 2004-06-03 Ken Kocienda <kocienda@apple.com>
3295 Fix for layout regression I caused when fixing:
3297 <rdar://problem/3668619>: "REGRESSION: text placed on pasteboard by WebKit is offset by one character"
3299 Extra height is added to empty blocks that are editable, so we can click to place
3300 the caret in them. This extra height was erroneously being added to non-editable
3301 blocks as a result of my earlier change. After looking at this and doing some
3302 code review, there are the following changes:
3304 Change away from "containingBlock" terminology in the NodeImpl class. The
3305 operation we are doing in NodeImpl is not the same as what is done in CSS
3306 when it uses the term "containingBlock" so:
3307 containingBlock changes to enclosingBlockFlowElement, and
3308 rootEditableBlock changes to rootEditableElement
3310 The vast majority of changes here are to make these name changes. The other
3311 significant piece of work, and the fix for the regression, is to change
3312 bidi.cpp to only include this extra line height if a block is empty
3313 and is content-editable.
3315 * khtml/editing/htmlediting_impl.cpp:
3316 (khtml::leadingWhitespacePosition):
3317 (khtml::trailingWhitespacePosition):
3318 (khtml::DeleteSelectionCommandImpl::doApply):
3319 (khtml::InputNewlineCommandImpl::doApply):
3320 (khtml::RemoveNodeAndPruneCommandImpl::doApply):
3321 (khtml::TypingCommandImpl::issueCommandForDeleteKey):
3322 * khtml/rendering/bidi.cpp:
3323 (khtml::RenderBlock::layoutInlineChildren):
3324 * khtml/xml/dom_docimpl.cpp:
3325 (DocumentImpl::relinquishesEditingFocus):
3326 (DocumentImpl::acceptsEditingFocus):
3327 * khtml/xml/dom_nodeimpl.cpp:
3328 * khtml/xml/dom_nodeimpl.h:
3329 * khtml/xml/dom_position.cpp:
3330 (DOM::Position::equivalentLeafPosition):
3331 (DOM::Position::previousCharacterPosition):
3332 (DOM::Position::nextCharacterPosition):
3333 (DOM::Position::previousLinePosition):
3334 (DOM::Position::nextLinePosition):
3335 (DOM::Position::equivalentUpstreamPosition):
3336 (DOM::Position::equivalentDownstreamPosition):
3337 (DOM::Position::atStartOfRootEditableElement):
3338 (DOM::Position::inRenderedContent):
3339 (DOM::Position::rendersOnSameLine):
3340 (DOM::Position::rendersInDifferentPosition):
3341 (DOM::Position::isLastRenderedPositionInEditableBlock):
3342 (DOM::Position::inFirstEditableInRootEditableElement):
3343 (DOM::Position::inLastEditableInRootEditableElement):
3344 (DOM::Position::inFirstEditableInContainingEditableBlock):
3345 (DOM::Position::inLastEditableInContainingEditableBlock):
3346 * khtml/xml/dom_position.h:
3347 * khtml/xml/dom_selection.cpp:
3348 (DOM::Selection::moveToRenderedContent):
3350 2004-06-02 Trey Matteson <trey@apple.com>
3352 Added types property to JS clipboard object.
3354 Reviewed by Richard.