3 2005-02-03 Richard Williamson <rjw@apple.com>
5 Fixed <rdar://problem/3987419> Stocks and Weather leak what appears to XMLHTTPRequest results
7 XMLHTTPRequests were causing massive leaks. _webcore_initWithHeaderString: did funky things with
8 self replacement. Re-wrote to use more traditional factory constructor avoiding self replacement.
10 Reviewed by David Harrison.
13 (+[NSDictionary _webcore_dictionaryWithHeaderString:]):
15 (KWQServeSynchronousRequest):
17 2005-02-03 Chris Blumenberg <cblu@apple.com>
19 Fixed: <rdar://problem/3938763> Cannot view Windows Media Player videos (soundtrack is played twice with delay)
23 * khtml/html/html_objectimpl.cpp:
24 (HTMLObjectElementImpl::attach): set needWidgetUpdate to false right after calling updateWidget because dispatchHTMLEvent can end up calling this method again
25 (HTMLObjectElementImpl::recalcStyle): ditto
27 2005-02-02 John Sullivan <sullivan@apple.com>
31 - WebCore part of fix for <rdar://problem/3980651> REGRESSION (125-180): Huge number of pages printed from certain page,
34 This also fixes the problems with printing from GMail, yay!
36 * khtml/rendering/render_flow.cpp:
37 (RenderFlow::paintLines):
38 If the current line is taller than the entire page height (e.g. tall iFrame), don't try
39 to avoid splitting it across pages.
41 * kwq/WebCoreBridge.mm:
42 (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
43 Handle error cases in a more obvious manner; this will cause future problems like this
44 to print a blank page and complain to the console on debug builds, rather than print a
45 zillionty mostly-blank pages.
47 2005-02-02 Chris Blumenberg <cblu@apple.com>
49 Fixed: <rdar://problem/3960304> can't load a particular applet (at www.escape.de) unless it's the first applet to be loaded
53 * khtml/rendering/render_frames.cpp:
54 (RenderPartObject::updateWidget): when getting the MIME type from the PARAM tag, make sure the MIME type is the text from the left of the semi-colon if there is one. We do this elsewhere as well.
56 2005-02-02 Chris Blumenberg <cblu@apple.com>
58 Fixed: <rdar://problem/3983628> control-click on WebView is not selecting the word under the cursor (Mail, non-editable WebView)
62 * kwq/KWQKHTMLPart.mm:
63 (KWQKHTMLPart::sendContextMenuEvent): check if SPI to always enable selecting closest word is enabled
64 * kwq/WebCoreBridge.h:
66 2005-02-02 Ken Kocienda <kocienda@apple.com>
70 * khtml/editing/markup.cpp:
71 (khtml::createMarkup): Removed debug spam I committed earlier in error.
73 2005-02-02 Ken Kocienda <kocienda@apple.com>
79 <rdar://problem/3823109> WebKit should support -toggleBaseWritingDirection: (bidi editing support)
81 Since base writing direction is a paragraph-level property in AppKit, and we use the CSS direction
82 property in WebCore, which can be applied to inline elements as well as blocks, a new notion has
83 been added to the WebCore apply style logic. It is now possible to force all properties in a
84 style declaration to be applied as though they were block properties.
86 * khtml/editing/htmlediting.cpp:
87 (khtml::ApplyStyleCommand::ApplyStyleCommand): Add an enum and a flag to this command that controls whether to force all
88 properties in the style to be applied as block styles. Default is "no", retaining previous behavior.
89 (khtml::ApplyStyleCommand::doApply): Switch on new flag to apply styles as before, or force all preoperties to be applied
91 * khtml/editing/htmlediting.h:
92 (khtml::ApplyStyleCommand::): Add an enum and a flag, as above.
93 * khtml/khtml_part.cpp:
94 (KHTMLPart::applyParagraphStyle): New method to force application of all style properties as block styles.
95 * khtml/khtml_part.h: Update header declarations.
96 * kwq/KWQKHTMLPart.h: Update header declarations.
97 * kwq/KWQKHTMLPart.mm:
98 (KWQKHTMLPart::baseWritingDirectionForSelectionStart): Accessor to help WebKit do a toggle operation on
100 * kwq/WebCoreBridge.h: Update header declarations.
101 * kwq/WebCoreBridge.mm:
102 (-[WebCoreBridge applyParagraphStyle:withUndoAction:]): New method to force application of all style properties as block styles.
103 (-[WebCoreBridge baseWritingDirectionForSelectionStart]): Accessor to help WebKit do a toggle operation on
108 <rdar://problem/3985035> REGRESSION (Mail): Text copied from wrapped line contains extra character when pasted
110 * khtml/editing/markup.cpp:
111 (khtml::renderedText): Add an enum and a flag to this command that controls whether to force all
112 This is the result of an error in the code that computes the rendered text that is selected
113 when copying. Since spaces collapse at the end of lines, and these spaces need to be copied
114 when the selection spans line endings, code runs to compute this text. However, this code
115 was also running incorrectly in cases where lines wrapped. I have now added the missing
116 test to check that the selection does indeed extend to the end of the line.
119 2005-02-02 Ken Kocienda <kocienda@apple.com>
125 <rdar://problem/3984894> REGRESSION (Mail): Command-right-arrow in reply does the wrong thing (two ways)
126 <rdar://problem/3985130> REGRESSION (Mail): command-right-arrow in pasted RTF selects only up to tab
128 * khtml/editing/visible_units.cpp:
129 (khtml::endOfLine): Two separate problems in this new function recently added to take the place of
130 selectionForLine. In the first, endOfLine did not stop at BR elements, and returned the position
131 beyond them. In the second, the VisiblePosition constructor gives the wrong answer in certain cases.
132 Darin is going to work on a solution for that problem. In the meantime, I can fix the symptom of this
133 bug by going down to the last leaf child of the root line box; a one line change we will roll out when
136 2005-02-01 Richard Williamson <rjw@apple.com>
138 Fixed <rdar://problem/3985535> QT Plug-in JavaScript support now fails in <embed> tag only case
142 * khtml/ecma/kjs_html.cpp:
143 (KJS::HTMLDocument::tryGet):
145 2005-02-01 John Sullivan <sullivan@apple.com>
147 Written by Darin, reviewed and tested by me
149 - fixed <rdar://problem/3969684> Panther-only: extra blank lines between
150 pasted content from Blot
152 * kwq/KWQKHTMLPart.mm:
153 (KWQKHTMLPart::attributedString):
154 don't emit paragraph breaks if the margins are tiny; matches what
155 we do for plain-text conversion
159 2005-02-01 Ken Kocienda <kocienda@apple.com>
165 <rdar://problem/3985160> Deficiencies in pasting architecture blocking progress on other bugs
167 * khtml/editing/html_interchange.h: Move style span text used to mark element added to
168 add style to this header.
169 * khtml/editing/htmlediting.cpp:
170 (khtml::styleSpanClassString): Change to use constant moved to html_interchange.h.
171 (khtml::isStyleSpan): New helper function. Checks if this is a span we added to apply style.
172 (khtml::CompositeEditCommand::insertNodeBefore): Added an assert to check that the node
173 we are inserting before is not the body.
174 (khtml::CompositeEditCommand::insertNodeAfter): Ditto, but check is for after.
175 (khtml::ReplacementFragment::ReplacementFragment): Added code to process the "default style"
176 that is added by the copy code.
177 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): first and last nodes inserted are
178 now member variables instead of function locals. Initialize them here.
179 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): Deref first and last nodes inserted
181 (khtml::ReplaceSelectionCommand::doApply): Change design to fix the bug. Major change is to
182 separate out the code that inserts nodes into the tree so additional styling checks can
183 be done in a centralized way. Also got rid of the notion of "merging into the end block." That
184 concept was just wrong.
185 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Tweak interface now that first and
186 last nodes inserted are member variables.
187 (khtml::ReplaceSelectionCommand::insertNodeAfterAndUpdateNodesInserted): New helper used
188 by replace code to do the stated DOM operation and update state internal to the command.
189 This will also be a catch point to handle the kinds of additional style checks needed to
190 make paste work right.
191 (khtml::ReplaceSelectionCommand::insertNodeAtAndUpdateNodesInserted): Ditto.
192 (khtml::ReplaceSelectionCommand::insertNodeBeforeAndUpdateNodesInserted): Ditto.
193 (khtml::ReplaceSelectionCommand::updateNodesInserted): Ditto.
194 * khtml/editing/htmlediting.h: Update declarations as needed.
195 * khtml/editing/markup.cpp:
196 (khtml::createMarkup): Adds a "default style" span to the content written to the pasteboard.
197 This will help us to fix some of the bugs blocked by the bug above.
198 * khtml/xml/dom_nodeimpl.cpp:
199 (NodeImpl::lastDescendent): New helper.
200 * khtml/xml/dom_nodeimpl.h: Ditto.
201 * khtml/xml/dom_position.cpp:
202 (DOM::Position::upstream): Fixed a bug which would allow the upstream position returned to be
203 in unrendered content.
204 (DOM::Position::downstream): Ditto.
206 * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: Ending positions tweaked due to
207 changes in upstream() and downstream() functions.
208 * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Ditto
209 * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Ditto
210 * layout-tests/editing/selection/extend-by-character-006-expected.txt: Ditto
212 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Changed what we expect, given
213 new behavior of paste code.
215 2005-01-31 John Sullivan <sullivan@apple.com>
217 Reviewed by Dave Hyatt.
219 - fixed <rdar://problem/3983097> Tabbing on RSS pages gets stuck in search field
220 with "full keyboard navigation" off
224 (QSlider::focusPolicy):
225 Implemented this method for KWQSlider. It is needed for our widget subclasses that
226 can become focused in some situations. I missed this when fixing 3949203 because
227 it only comes into play when tab-to-controls is on, and because the other relevant
228 methods are objective-C methods.
230 2005-01-31 David Harrison <harrison@apple.com>
234 <rdar://problem/3964164> AXWebArea needs to unregister on going invisible
236 * khtml/xml/dom_docimpl.cpp:
237 (DocumentImpl::detach):
238 Detach the AX UIElement for the AXWebArea.
240 2005-01-31 David Harrison <harrison@apple.com>
244 <rdar://problem/3850876> AX: button exposed as only an AXImage at http://appleseed.apple.com/ site (<input type=image>)
246 * khtml/rendering/render_form.h:
247 (khtml::RenderImageButton::isImageButton):
249 * khtml/rendering/render_image.h:
250 (khtml::RenderImage::isImageButton):
252 * kwq/KWQAccObject.mm:
253 (-[KWQAccObject isImageButton]):
254 (-[KWQAccObject actionElement]):
255 (-[KWQAccObject role]):
256 (-[KWQAccObject accessibilityActionNames]):
257 (-[KWQAccObject accessibilityPerformAction:]):
258 Represent RenderImageButton elements as buttons instead of images.
260 2005-01-31 David Harrison <harrison@apple.com>
262 Prevent nil dereference in debug code.
264 * khtml/xml/dom_nodeimpl.cpp:
265 (NodeImpl::displayTree):
266 Stop when parent is 0, too.
268 2005-01-31 John Sullivan <sullivan@apple.com>
270 Reviewed by Dave Hyatt.
272 - fixed <rdar://problem/3949203> cannot tab to, within, or out of the RSS sidebar
275 (-[KWQSlider becomeFirstResponder]):
276 (-[KWQSlider resignFirstResponder]):
277 (-[KWQSlider nextKeyView]):
278 (-[KWQSlider previousKeyView]):
279 (-[KWQSlider canBecomeKeyView]):
280 (-[KWQSlider nextValidKeyView]):
281 (-[KWQSlider previousValidKeyView]):
282 Copied these methods from KWQButton. The lack of special handling for first-responder-ness
283 here was causing the focus to get "stuck" on the RSS page's slider widget. Added FIXME
284 about how it would be nice to share more of this code rather than replicating it in each
287 2005-01-31 Darin Adler <darin@apple.com>
289 Reviewed by Harrison.
291 - fixed <rdar://problem/3980066> Double-click on single character moves insertion point to previous line
293 * khtml/khtml_part.cpp:
294 (KHTMLPart::selectClosestWordFromMouseEvent): Set affinity too.
295 (KHTMLPart::handleMousePressEventTripleClick): Ditto.
296 (KHTMLPart::handleMouseMoveEventSelection): Ditto.
297 (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
299 * khtml/editing/selection.cpp:
300 (khtml::Selection::modifyExtendingRightForward): Use endOfLine and endOfDocument.
301 (khtml::Selection::modifyMovingRightForward): Ditto.
302 (khtml::Selection::modifyExtendingLeftBackward): Use startOfLine and startOfDocument.
303 (khtml::Selection::modifyMovingLeftBackward): Ditto.
304 (khtml::Selection::validate): Rewrote the section that handles double-click. Two main fixes: 1) use isStartOfLine to
305 check for another case where we want to select the word to the right, and 2) use isEndOfParagraph, which seems
306 to work correctly in cases where isLastVisiblePositionInParagraph is giving the wrong answer. Also changed the line
307 code to use startOfLine/endOfLine and the document code to use startOfDocument/endOfDocument.
309 2005-01-31 Darin Adler <darin@apple.com>
311 Reviewed by Harrison.
313 - fixed <rdar://problem/3935275> unexpected quit scrolling over link; last.fm (works in IE and Firefox)
315 * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): By using the correct document, fix the crash reported here.
316 The page still crashes when you close the browser window, but it's not trivial to fix so I'll file a new bug after that.
318 2005-01-31 Darin Adler <darin@apple.com>
320 Reviewed by Ken and Harrison.
322 - fixed <rdar://problem/3947901> REGRESSION (Mail): Pasting paragraph of rich text leaves insertion point before pasted text
323 - fixed <rdar://problem/3949790> hitting return after underlined line results in too much or too little underlined
324 - fixed <rdar://problem/3981759> nil-deref and crash when pasting just a paragraph break
325 - fixed a couple problems I discovered while working with bug 3949790
327 * khtml/editing/htmlediting.cpp:
328 (khtml::ApplyStyleCommand::applyInlineStyle): Pass StayInBlock to upstream. Without this, we end up going too far
329 upstream in the test case in bug 3949790.
330 (khtml::ApplyStyleCommand::removeInlineStyle): Pass StayInBlock to upstream and downstream. Same reason as above.
331 (khtml::ReplaceSelectionCommand::doApply): Update endPos if inserting a new node and endPos is using that node's
332 parent and an offset past the node being inserted. That change fixes a problem with the position of the insertion point
333 after pasting into the top level of a document (from test cases in 3947901 and 3949790). When setting insertionPos, use
334 code that works when lastNodeInserted is a block rather than a text node. That change fixes a problem where a newline is
335 not added when pasting an entire paragraph into the end of a document (from test case in 3949790). Added nil check before
336 checking if lastNodeInserted is a <br> element, which fixes the crash when pasting just a paragraph break.
338 * khtml/editing/visible_units.h: Filled out the set of calls to add some boolean checks for lines (needed for the
339 bug fix), and calls for blocks (not yet implemented), and documents. The document checks may need refinement to
340 properly handle documents with a mix of editable and non-editable content, but for now they just refactor code
341 and make things a little clearer. Also removed the "include line break" parameter from endOfSentence.
342 * khtml/editing/visible_units.cpp:
343 (khtml::rootBoxForLine): Added.
344 (khtml::startOfLine): Added. Algorithm taken from selectionForLine in selection.cpp.
345 (khtml::endOfLine): Ditto.
346 (khtml::inSameLine): Added.
347 (khtml::isStartOfLine): Added.
348 (khtml::isEndOfLine): Added.
349 (khtml::endOfSentence): Removed "include line break" parameter.
350 (khtml::inSameParagraph): Added a null check.
351 (khtml::isStartOfParagraph): Ditto.
352 (khtml::isEndOfParagraph): Ditto.
353 (khtml::startOfBlock): Added.
354 (khtml::endOfBlock): Added.
355 (khtml::inSameBlock): Added.
356 (khtml::isStartOfBlock): Added.
357 (khtml::isEndOfBlock): Added.
358 (khtml::startOfDocument): Added.
359 (khtml::endOfDocument): Added.
360 (khtml::inSameDocument): Added.
361 (khtml::isStartOfDocument): Added.
362 (khtml::isEndOfDocument): Added.
364 2005-01-30 Darin Adler <darin@apple.com>
368 - fixed <rdar://problem/3977000> form data set posted for <input type="image" ...> omits name/value pair
370 * khtml/html/html_formimpl.cpp:
371 (DOM::HTMLInputElementImpl::appendFormData): Append a name/value pair for type IMAGE in addition to the X/Y
374 2005-01-30 Darin Adler <darin@apple.com>
378 - fixed <rdar://problem/3974246> REGRESSION (125-180): popup menus are missing item text on Harmony Remote web site
380 * khtml/html/html_formimpl.cpp: (DOM::HTMLOptionElementImpl::text): Change this function to traverse the entire tree
381 and gather all the text rather than just looking at immediate children.
383 * khtml/xml/dom_nodeimpl.h: Added const.
384 * khtml/xml/dom_nodeimpl.cpp:
385 (NodeImpl::traverseNextNode): Added const.
386 (NodeImpl::traverseNextSibling): Ditto.
387 (NodeImpl::traversePreviousNodePostOrder): Ditto.
388 (NodeImpl::detach): Add a missing nil check.
390 2005-01-30 Darin Adler <darin@apple.com>
394 - fixed <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
396 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Added missing ref/deref of newly created element.
398 2005-01-28 Darin Adler <darin@apple.com>
400 * khtml/css/cssproperties.c: Regenerated with newer gperf.
402 2005-01-28 David Harrison <harrison@apple.com>
404 Reviewed by John Sullivan.
406 <rdar://problem/3968144> AX need to be able to focus an AXLink by setting AXFocused to true
408 * kwq/KWQAccObject.mm:
409 (-[KWQAccObject accessibilityPerformAction:]):
410 (-[KWQAccObject accessibilityIsAttributeSettable:]):
411 Add AXFocused for AXLinks.
413 2005-01-28 David Harrison <harrison@apple.com>
417 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
419 Use AppKit SPI _accessibilityParentForSubview to return KWQAccObject parent of AppKit AX object.
421 * kwq/KWQAccObject.mm:
422 (-[KWQAccObject _accessibilityParentForSubview:]):
425 2005-01-27 Adele Amchan <adele@apple.com>
427 fixed by Darin, reviewed by me.
429 <rdar://problem/3976314> REGRESSION (180-TOT): submitting password fields fail on Panther
431 * kwq/KWQTextField.mm: (-[KWQTextFieldController string]): on panther, the secure text field's editor
432 does not contain the real string, so now we just call stringValue on the field in that case.
434 2005-01-26 Maciej Stachowiak <mjs@apple.com>
436 Reviewed by Darin, Hyatt and Ken.
438 <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
440 * khtml/css/css_computedstyle.cpp:
441 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support
442 for -khtml-text-decorations-in-effect property. This works like text-docration
443 but follows proper inline semantics, that is, if a parent is causing text
444 decoration then -khtml-text-decorations-in-effect on this element will reflect that.
445 * khtml/css/cssproperties.in: Add -khtml-text-decorations-in-effect property.
446 * khtml/css/cssproperties.h: regenerated
447 * khtml/css/cssvalues.c: regenerated
448 * khtml/css/cssparser.cpp: regenerated
449 * khtml/css/cssproperties.c: regenerated
451 * khtml/css/css_valueimpl.h: Made copyPropertiesInSet public.
453 * khtml/editing/htmlediting.cpp:
454 (khtml::StyleChange::init): Handle -khtml-text-decorations-in-effect
455 specially, translate to text-decoration
456 (khtml::ApplyStyleCommand::applyInlineStyle): Fix a comment.
457 (khtml::ApplyStyleCommand::removeInlineStyle): Add new way of pushing down
458 text-decoration styles around the edges of the selected range.
459 (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Helper for this.
460 (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): ditto
461 (khtml::ApplyStyleCommand::nodeFullyUnselected): ditto
462 (khtml::hasTextDecorationProperty): ditto
463 (khtml::highestAncestorWithTextDecoration): ditto
464 (khtml::ApplyStyleCommand::extractTextDecorationStyle): ditto
465 (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle): ditto
466 (khtml::ApplyStyleCommand::applyTextDecorationStyle): ditto
467 * khtml/editing/htmlediting.h: Prototype new methods.
468 * khtml/editing/jsediting.cpp: Make underline execCommand use the new CSS property.
470 - as a necessary part of the fix, fixed the longstanding problem
471 that mutating an element's inlineStyleDecl would not property
472 update its style attribute. now it does.
474 * khtml/css/css_valueimpl.cpp:
475 (DOM::CSSMutableStyleDeclarationImpl::setChanged): If this is an inline style
476 declaration, tell the element it's style attribute needs updating.
477 * khtml/html/html_elementimpl.cpp:
478 (HTMLElementImpl::invalidateStyleAttribute): New method, just calls down
480 (HTMLElementImpl::updateStyleAttribute): Regenerate style attribute from
481 inline style declaration.
482 * khtml/html/html_elementimpl.h: Prototype new stuff.
483 * khtml/xml/dom_elementimpl.cpp:
484 (ElementImpl::ElementImpl): Initialize new attribute.
485 (ElementImpl::updateStyleAttributeIfNeeded): New method to check if the style
486 is dirty and this is an html element, and if so call the html element to
487 regenerate the style attribute.
488 (ElementImpl::attributes): update style if needed
489 (ElementImpl::getAttribute): ditto
490 (ElementImpl::hasAttributes): ditto
491 (ElementImpl::dump): ditto
492 (XMLElementImpl::cloneNode): ditto
493 * khtml/xml/dom_elementimpl.h:
494 (DOM::ElementImpl::isStyleAttributeValid): new method to manage style attr
496 (DOM::ElementImpl::setStyleAttributeValid): ditto
498 - added new layout tests for underlining:
500 * layout-tests/editing/editing.js:
501 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: Added.
502 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: Added.
503 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold.html: Added.
504 * layout-tests/editing/style/remove-underline-across-paragraph.html: Added.
505 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: Added.
506 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: Added.
507 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold.html: Added.
508 * layout-tests/editing/style/remove-underline-after-paragraph.html: Added.
509 * layout-tests/editing/style/remove-underline-expected.txt: Added.
510 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt: Added.
511 * layout-tests/editing/style/remove-underline-from-stylesheet.html: Added.
512 * layout-tests/editing/style/remove-underline-in-bold-expected.txt: Added.
513 * layout-tests/editing/style/remove-underline-in-bold.html: Added.
514 * layout-tests/editing/style/remove-underline.html: Added.
515 * layout-tests/editing/style/underline-expected.txt: Added.
516 * layout-tests/editing/style/underline.html: Added.
518 2005-01-27 David Hyatt <hyatt@apple.com>
520 Fix for 3875199, search field needs to be able to show a magnifying glass without a dropdown menu.
524 * khtml/html/html_formimpl.cpp:
525 (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
526 (DOM::HTMLInputElementImpl::parseHTMLAttribute):
527 * kwq/KWQLineEdit.mm:
528 (QLineEdit::setMaxResults):
530 2005-01-27 Ken Kocienda <kocienda@apple.com>
536 <rdar://problem/3973254> Deletions of ranges does not coalesce correctly with subsequent typing
538 * khtml/editing/htmlediting.cpp:
539 (khtml::InsertTextCommand::deleteCharacter): Remove this dead code.
540 (khtml::ReplaceSelectionCommand::editingAction): Moved this code to a better place in the file.
541 It was in with unrelated functions.
542 (khtml::TypingCommand::TypingCommand): Reorganize initialization list so it is easier to read.
543 (khtml::TypingCommand::issueCommandForDeleteKey): Remove dead code. Roll in remaining code into deleteKeyPressed.
544 (khtml::TypingCommand::deleteKeyPressed): Add in support for carrying along smart delete flag.
545 (khtml::TypingCommand::forwardDeleteKeyPressed): New function. Makes forward delete work like
546 "regular" delete in terms of coalescing typing.
547 (khtml::TypingCommand::doApply): Add case for ForwardDeleteKey.
548 (khtml::TypingCommand::preservesTypingStyle): Ditto.
549 * khtml/editing/htmlediting.h:
550 (khtml::TypingCommand::): Add ForwardDeleteKey constant. Remove a couple declarations for now-dead code.
551 (khtml::TypingCommand::smartDelete): New accessor.
552 (khtml::TypingCommand::setSmartDelete): Ditto.
553 * kwq/WebCoreBridge.h:
554 * kwq/WebCoreBridge.mm:
555 (-[WebCoreBridge deleteKeyPressedWithSmartDelete:]): Add smart delete flag.
556 (-[WebCoreBridge forwardDeleteKeyPressedWithSmartDelete:]): New method.
557 * khtml/editing/jsediting.cpp: Add supprt for ForwardDelete command
558 * layout-tests/editing/editing.js: Ditto.
559 * layout-tests/editing/deleting/delete-and-undo-expected.txt: Added.
560 * layout-tests/editing/deleting/delete-and-undo.html: Added.
561 * layout-tests/editing/deleting/forward-delete-expected.txt: Added.
562 * layout-tests/editing/deleting/forward-delete.html: Added.
566 2005-01-27 David Harrison <harrison@apple.com>
570 <rdar://problem/3962214> AX: AXLeftLineTextMarkerRangeForTextMarker returns incorrect range
572 * kwq/KWQAccObject.mm:
573 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
574 Allowed for selection to end of line including the linebreak.
576 2005-01-27 David Harrison <harrison@apple.com>
578 Reviewed by Darin, Ken.
580 <rdar://problem/3964470> AX: Include attachments in AXAttributedStringForTextMarkerRange
582 * kwq/KWQAccObject.mm:
583 (-[KWQAccObject isAttachment]):
584 (-[KWQAccObject attachmentView]):
585 (-[KWQAccObject role]):
586 (-[KWQAccObject subrole]):
587 (-[KWQAccObject roleDescription]):
588 (-[KWQAccObject value]):
589 (-[KWQAccObject title]):
590 (-[KWQAccObject accessibilityDescription]):
591 (-[KWQAccObject accessibilityIsIgnored]):
592 (-[KWQAccObject accessibilityAttributeNames]):
593 (-[KWQAccObject accessibilityAttributeValue:]):
594 Make attachments accessible.
596 (CreateCGColorIfDifferent):
597 (AXAttributeStringSetColor):
598 (AXAttributeStringSetNumber):
599 (AXAttributeStringSetFont):
600 (AXAttributeStringSetStyle):
601 (AXAttributeStringSetElement):
602 (AXLinkElementForNode):
603 (AXAttributedStringAppendText):
604 (AXAttributedStringAppendReplaced):
605 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
606 Add attachments and more text attributes to AXAttributedStringForTextMarkerRange.
608 2005-01-27 Darin Adler <darin@apple.com>
612 - fixed <rdar://problem/3807935> DOM CSS computed style line-height is wrong in two ways
614 * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
615 Use specified size rather than computed size when dealing with a percentage for line height.
617 2005-01-27 Darin Adler <darin@apple.com>
621 - fixed <rdar://problem/3971372> SWB: template function DOM_cast() won't compile with gcc 4.0
622 - fixed other gcc 4.0 compiling problems Patrick Beard pointed out on the phone
624 * kwq/DOMInternal.h: (DOM_cast): Change the "failToCompile()" trick to use a dependent name.
625 Nowadays, if a name is not dependent, it is checked at template definition time. But we want
626 a failure only at template instantiation time.
628 * ForwardingHeaders/editing/text_granularity.h: Added. Needed but a bug in the 3.3 compiler made
629 it compile anyway without this.
633 * khtml/html/html_miscimpl.h: For clarity, mark these functions virtual too. They are automatically
634 virtual because the base class ones are virtual, but it's ugly to leave it this way.
636 2005-01-26 Ken Kocienda <kocienda@apple.com>
642 <rdar://problem/3971609> REGRESSION (Mail): up/down arrow navigation broken after rewrapping text by resizing window
643 <rdar://problem/3975661> REGRESSION (Mail): left/right arrow navigation can place insertion point after last character on line
645 * khtml/editing/selection.cpp:
646 (khtml::Selection::modifyAffinity): PARAGRAPH and LINE movements should not alter affinity. This was
647 just a mistake before when it reset to upstream in some cases.
648 * khtml/rendering/render_line.cpp:
649 (khtml::RootInlineBox::closestLeafChildForXPos): Move this function down from InlineBox, and
650 rework the implementation. This fixes 3971609.
651 * khtml/rendering/render_line.h:
652 * khtml/rendering/render_text.cpp:
653 (RenderText::caretRect): Rework the algorithm to fix 3975661. This regressed when we began placing
654 the spaces on the end of lines in text boxes when lines wrap.
656 2005-01-26 Richard Williamson <rjw@apple.com>
658 Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test
660 I added a member variable to ObjectImp. This changed it's size and consequently
661 hampered the optimizations built into the garbage collector. Objects no longer
662 fit within the allocators cell size, and thus allocation fell back to a slower
665 As a result of this fix I also dramatically cleaned up how runtime objects are
666 accessed. The path mostly *removes* code.
670 * khtml/ecma/kjs_dom.cpp:
671 (DOMDocumentProtoFunc::tryCall):
672 (DOMElementProtoFunc::tryCall):
673 (KJS::getRuntimeObject):
674 * khtml/ecma/kjs_dom.h:
675 * khtml/ecma/kjs_html.cpp:
676 (KJS::HTMLDocument::tryGet):
677 (KJS::HTMLElement::tryGet):
678 (KJS::HTMLElement::implementsCall):
679 (KJS::HTMLElement::call):
680 (KJS::HTMLElement::tryPut):
681 (KJS::HTMLCollection::tryGet):
682 (KJS::HTMLCollection::getNamedItems):
683 * khtml/ecma/kjs_html.h:
684 * khtml/ecma/kjs_window.cpp:
687 2005-01-26 Richard Williamson <rjw@apple.com>
689 Fixed <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
691 For now we are using ICU UBreakIterator to determine grapheme boundaries for
692 cursor and deletion. This does not match what Cocoa does exactly, but does match
693 what Carbon does. The areas are difference are obscure, but, according to
694 Deborah Goldsmith, using the UBreakIterator is the reasonable approach.
698 * khtml/rendering/render_text.cpp:
699 (RenderText::previousOffset):
700 (RenderText::nextOffset):
702 2005-01-25 David Harrison <harrison@apple.com>
704 Reviewed by Maciej and Richard.
706 <rdar://problem/3963731> AX VO: Changing window sizes causes a crash using with Voice Over - KWQPtrDictImpl::clear
708 * khtml/html/html_miscimpl.cpp:
709 (HTMLCollectionImpl::HTMLCollectionImpl):
710 Ensure that isHTMLDocument before calling HTMLDocument-only method.
712 2005-01-25 Richard Williamson <rjw@apple.com>
714 Part one of fix for <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
716 This patch changes the semantics of next() and previous() on
717 VisiblePosition to move a grapheme (character cluster) at a
718 time. This means that cursor navigation with correctly move
719 over an entire cluster.
721 However, the expected behavior for deleting a grapheme is to
722 delete individual code points, thus decomposing the grapheme
723 into it constituent parts. That will be addressed in the next
728 * khtml/editing/visible_position.cpp:
729 (khtml::VisiblePosition::previousPosition):
730 (khtml::VisiblePosition::nextPosition):
731 * khtml/editing/visible_position.h:
732 * khtml/rendering/render_object.cpp:
733 (RenderObject::previousOffset):
734 (RenderObject::nextOffset):
735 * khtml/rendering/render_object.h:
736 * khtml/rendering/render_text.cpp:
737 (RenderText::previousOffset):
738 (RenderText::nextOffset):
739 (RenderText::findNextInlineTextBox):
740 * khtml/rendering/render_text.h:
741 * khtml/xml/dom_nodeimpl.cpp:
742 (NodeImpl::previousOffset):
743 (NodeImpl::nextOffset):
744 * khtml/xml/dom_nodeimpl.h:
746 2005-01-25 David Harrison <harrison@apple.com>
750 <rdar://problem/3973067> AXWebArea for http://apple.netscape.com/ has an empty AXLinkUIElements
752 * kwq/KWQAccObject.mm:
753 (-[KWQAccObject accessibilityAttributeValue:]):
754 Omit ignored AXLinks from AXLinkUIElements result
756 2005-01-25 Ken Kocienda <kocienda@apple.com>
762 <rdar://problem/3972851> REGRESSION (179-180+): Repro crash in ApplyStyleCommand::cleanUpEmptyStyleSpans
764 * khtml/editing/htmlediting.cpp:
765 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): Added two null checks.
767 2005-01-25 Ken Kocienda <kocienda@apple.com>
773 <rdar://problem/3954710> Mail crashed while editing signatures - NodeImpl::isBlockFlow
775 The fix is more general than for this one bug, and may work to fix many crashers. The problem
776 is that the ReplaceSelectionCommand never checked whether its starting selection is empty. If
777 it is, then we need to bail before doing the work of the command, which we need to deref the
778 start and end points of the selection in order to do its work. I think you can see the crash
781 * khtml/editing/htmlediting.cpp:
782 (khtml::ReplaceSelectionCommand::doApply): Assert selection is not empty.
783 * kwq/WebCoreBridge.mm:
784 (partHasSelection): New helper function to test that bridge has a part with a selection.
786 Use new helper function to test part and selection; return from these function if this test fails.
788 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:])
789 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:])
790 (-[WebCoreBridge alterCurrentSelection:direction:granularity:])
791 (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:])
792 (-[WebCoreBridge alterCurrentSelection:verticalDistance:])
793 (-[WebCoreBridge documentFragmentWithText:])
794 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
795 (-[WebCoreBridge insertLineBreak])
796 (-[WebCoreBridge insertParagraphSeparator])
797 (-[WebCoreBridge insertParagraphSeparatorInQuotedContent])
798 (-[WebCoreBridge insertText:selectInsertedText:])
799 (-[WebCoreBridge deleteSelectionWithSmartDelete:])
800 (-[WebCoreBridge ensureSelectionVisible])
802 2005-01-24 Kevin Decker <kdecker@apple.com>
806 Fixed <rdar://problem/3932374> REGRESSION: 'ReferenceError - Can't find variable' JavaScript error at webxpress.fidelity.com
808 * khtml/html/html_miscimpl.h: Missing virtual identifiers for namedItem() and nextNamedItem() exposed a flaw that prevented finding variables in form [HTMLFormCollectionImpl] scopes.
811 2005-01-24 Vicki Murley <vicki@apple.com>
813 Reviewed by kocienda.
815 - fix <rdar://problem/3810661> computed style not handled for Apple extensions
817 * khtml/css/css_computedstyle.cpp: (DOM::):
818 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust
820 2005-01-24 Darin Adler <darin@apple.com>
824 - fixed <rdar://problem/3969884> REGRESSION (179-180): Typing password not echoed as "bullets" at paypal.com when field is first focused
826 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]):
827 Sizing up the form editor, which fixes things for normal fields and search fields,
828 screws things up for password fields. Eventually, I'll need to figure out why this is
829 and file a bug so that the AppKit team fixes it. In the mean time, just check for the
830 case of the secure text field, and don't size up in that case.
832 2005-01-24 Ken Kocienda <kocienda@apple.com>
838 <rdar://problem/3963560> 8A354: Inserting Japanese text to the line head causes line break
840 * khtml/editing/htmlediting.cpp:
841 (khtml::ReplaceSelectionCommand::doApply): Add one more case where we merge content into the
842 existing line. This covers the situation see using the steps to reproduce this bug.
844 2005-01-21 Maciej Stachowiak <mjs@apple.com>
848 <rdar://problem/3967572> Editing should split elements before removing style
850 * khtml/editing/htmlediting.cpp:
851 (khtml::CompositeEditCommand::splitElement):
852 (khtml::CompositeEditCommand::mergeIdenticalElements):
853 (khtml::CompositeEditCommand::wrapContentsInDummySpan):
854 (khtml::CompositeEditCommand::splitTextNodeContainingElement):
855 (khtml::ApplyStyleCommand::applyInlineStyle):
856 (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
857 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
858 (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
859 (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
860 (khtml::areIdenticalElements):
861 (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
862 (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
863 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans):
864 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
865 (khtml::InsertParagraphSeparatorCommand::doApply):
866 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
867 (khtml::InsertTextCommand::prepareForTextInsertion):
868 (khtml::SplitTextNodeCommand::doUnapply):
869 (khtml::SplitElementCommand::SplitElementCommand):
870 (khtml::SplitElementCommand::~SplitElementCommand):
871 (khtml::SplitElementCommand::doApply):
872 (khtml::SplitElementCommand::doUnapply):
873 (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
874 (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
875 (khtml::MergeIdenticalElementsCommand::doApply):
876 (khtml::MergeIdenticalElementsCommand::doUnapply):
877 (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
878 (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
879 (khtml::WrapContentsInDummySpanCommand::doApply):
880 (khtml::WrapContentsInDummySpanCommand::doUnapply):
881 (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
882 (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
883 (khtml::SplitTextNodeContainingElementCommand::doApply):
884 * khtml/editing/htmlediting.h:
886 New layout test that shows the side benefit of this.
888 * layout-tests/editing/style/unbold-in-bold-expected.txt: Added.
889 * layout-tests/editing/style/unbold-in-bold.html: Added.
891 2005-01-24 Darin Adler <darin@apple.com>
895 - fixed <rdar://problem/3933435> -[DOMRange cloneContents] sometimes alters the original DOMRange
897 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Fixed code that was collapsing
898 the range after processing the contents. That's right for extract and delete, but not clone.
900 - fixed <rdar://problem/3714184> inline input works incorrectly when I type Korean slowly in textfield in form on www.google.co.kr
901 - fixed <rdar://problem/3193848> Can't enter SSN to sign up for Chase visa online account (changing focus inside key press handler)
902 - fixed <rdar://problem/3874683> REGRESSION (161-162): Crash after typing command-Z to undo after pasting text with newline in it into a text field <input type=text>
904 * kwq/KWQLineEdit.mm:
905 (QLineEdit::text): Changed to call a new string method on the controller instead of calling
906 stringValue, since stringValue has a bad side effect of ending inline input.
907 (QLineEdit::selectAll): Changed to only call selectText: when the field is already selected.
908 When you are giving the field focus, it automatically gets all selected, and this change
909 is required in the case where we defer the focus change.
911 * kwq/KWQTextField.h: Added a new string method to the controller.
912 * kwq/KWQTextField.mm:
913 (-[KWQTextFieldController setMaximumLength:]): Call the new string method instead of using stringValue.
914 (-[KWQTextFieldController controlTextDidChange:]): Removed the code to truncate at the first CR or LF.
915 That's now handled in the shouldChangeTextInRange method instead.
916 (-[KWQTextFieldController textView:shouldHandleEvent:]): Add new logic to defer responder changes until
917 after the event is handled. This makes sure the key gets into the field that's already handling it at
918 rather than ending up in the newly-focused field if the key press handler focuses a different element.
919 (-[KWQTextFieldController textView:didHandleEvent:]): Turn off deferral here, now that the key press
921 (-[KWQTextFieldController string]): Added. Calls stringValue only if there's no editor. If there is
922 an editor, calls string on that instead.
923 (-[KWQTextFieldController textView:shouldChangeTextInRange:replacementString:]): Added. Called by
924 the three field subclasses. Truncates incoming strings at the first CR or LF character. This works
925 properly with Undo, and the old technique did not.
926 (-[KWQTextFieldController preprocessString:]): Added. Helper used for all the setStringValue methods
927 so they all truncate at the first CR or LF as well as truncating to the appropriate length.
928 (-[KWQTextField setStringValue:]): Changed to call the controller.
929 (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): Added. Calls the controller.
930 (-[KWQSecureTextField setStringValue:]): More of the same.
931 (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
932 (-[KWQSearchField setStringValue:]): Ditto.
933 (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.
935 * kwq/KWQWidget.h: Added the new setDeferFirstResponderChanges function.
937 (QWidget::~QWidget): Clear out the deferredFirstResponder global just in case we are destroyed
938 while we "have the ball".
939 (QWidget::hasFocus): If we are in the deferred mode, use the global to decide who to say is focused.
940 (QWidget::setFocus): If we are in the deferred mode, set the global instead of making something be
942 (QWidget::setDeferFirstResponderChanges): Set the boolean. If the boolean is being cleared, then
943 get the deferred first responder and call setFocus on it again, which will do the work we didn't
946 2005-01-24 Ken Kocienda <kocienda@apple.com>
952 <rdar://problem/3964350> Deleting all content and typing in a message gets one letter, then beeps
954 This is a problem with the way we turn key events, when a user starts typing, into editing commands.
955 Right now, that initial delete key in an empty window is turned into an editing command, and much
956 editing code runs that need not run. What's more, this is confusing the selection machinery. The
957 solution is to detect the "delete in an empty window" case and don't turn this into an editing
960 * khtml/editing/htmlediting.cpp:
961 (khtml::TypingCommand::deleteKeyPressed)
963 2005-01-23 Adele Amchan <adele@apple.com>
965 Fixed <rdar://problem/3964286> REGRESSION (178-179): menus and "go to old site" link at Ameritrade's new site don't work
967 Removed check for document from checkCompleted. In this case, WebCore never knew that a WebImageView was complete because
968 it fell into this document check case in checkCompleted.
969 Added check for document to tokenizerProcessedData (see <rdar://problem/3807144>)
973 * khtml/khtml_part.cpp:
975 (KHTMLPart::checkCompleted):
976 * khtml/khtml_part.h:
977 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tokenizerProcessedData):
979 2005-01-21 Richard Williamson <rjw@apple.com>
981 Fixed <rdar://problem/3759399> Javascript / Liveconnect problems ((event handler):Undefined value)
983 Java applets specified with <object> or <embed> weren't scriptable. Now they are.
987 * khtml/html/html_objectimpl.cpp:
988 (HTMLEmbedElementImpl::getEmbedInstance):
989 (HTMLObjectElementImpl::getObjectInstance):
991 2005-01-21 Ken Kocienda <kocienda@apple.com>
997 <rdar://problem/3959464> REGRESSION (Mail): Insertion point goes back to beginning of document after deleting
999 * khtml/editing/htmlediting.cpp:
1000 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add special case to handle retaining a fully-selected block.
1002 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: Added.
1003 * layout-tests/editing/deleting/delete-3959464-fix.html: Added.
1005 2005-01-21 Richard Williamson <rjw@apple.com>
1007 Fixed <rdar://problem/3966998> REGRESSION(179-TOT) clicking on gmail message brings me to blank screen
1009 getElementById() sometimes returns Undefined() instead of Null().
1013 * khtml/ecma/kjs_dom.cpp:
1014 (DOMDocumentProtoFunc::tryCall):
1016 2005-01-21 David Hyatt <hyatt@apple.com>
1018 Fix for 3773809, make sure that overflow regions never end up at an invalid scroll offset because of a layout change.
1020 Reviewed by kocienda
1022 * khtml/rendering/render_layer.cpp:
1023 (RenderLayer::updateScrollInfoAfterLayout):
1025 2005-01-21 David Hyatt <hyatt@apple.com>
1027 Fix for 3966349, hang loading page. Make sure that loops using popOneBlock properly check for a null
1028 blockStack to avoid an infinite loop.
1030 Reviewed by kocienda
1032 * khtml/html/htmlparser.cpp:
1033 (KHTMLParser::parseToken):
1034 (KHTMLParser::insertNode):
1035 (KHTMLParser::popInlineBlocks):
1037 2005-01-21 Ken Kocienda <kocienda@apple.com>
1043 <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand
1045 * khtml/editing/htmlediting.cpp:
1046 (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
1047 InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
1048 I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled
1049 code path which does not set this variable to something good. In the destructor, we check for null,
1050 and deref if non-null. Obvious "BOOM" potential. Fixed.
1052 2005-01-21 Ken Kocienda <kocienda@apple.com>
1058 <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear
1060 * khtml/editing/htmlediting.cpp:
1061 (khtml::InsertParagraphSeparatorCommand::doApply): When writing the code to insert a block
1062 in response to the return key, I did not write code to cover the case described in the bug.
1064 * layout-tests/editing/inserting/insert-div-025-expected.txt: Added.
1065 * layout-tests/editing/inserting/insert-div-025.html: Added.
1067 2005-01-20 Maciej Stachowiak <mjs@apple.com>
1071 <rdar://problem/3965196> security fix for javascript: exploit missed one case (already fixed in updates)
1073 * khtml/ecma/kjs_window.cpp:
1074 (WindowFunc::tryCall): correct mistake in earlier fix for the following bug, caught by Adele:
1076 2005-01-20 Maciej Stachowiak <mjs@apple.com>
1080 <rdar://problem/3965466> editing needs to insert text before applying typing style
1082 * khtml/editing/htmlediting.cpp:
1083 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment.
1084 (khtml::InsertLineBreakCommand::doApply): Apply style to the BR
1085 node after inserting it.
1086 (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to
1087 apply style to any new nodes created before inserting.
1088 (khtml::InsertTextCommand::input): Apply style to the inserted range
1089 after doing the text insert.
1090 * khtml/editing/htmlediting.h:
1092 This change leads to improved results on one of the layout tests:
1094 * layout-tests/editing/inserting/insert-div-024-expected.txt:
1098 2005-01-20 Ken Kocienda <kocienda@apple.com>
1104 <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear
1106 * khtml/editing/htmlediting.cpp:
1107 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code
1108 caused this regression. The code became too aggressive in removing block placeholders, and would remove them
1109 from blocks other than the block containing the selection.
1110 * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that
1111 I did not notice earlier.
1112 * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto.
1114 2005-01-20 David Hyatt <hyatt@apple.com>
1116 Fix for oddness on albertsons.com. Make sure not to crash when setting/removing style properties on a node
1117 with no document. The bug # is 3813900.
1121 2005-01-20 David Harrison <harrison@apple.com>
1125 PARTIAL fix for following bug. Create attributed string with fonts and links. Still need to add attachments.
1126 <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute
1128 * kwq/KWQAccObject.mm:
1129 (-[KWQAccObject textUnderElement]):
1130 Touched up previous checkin to match code review comments.
1132 (-[KWQAccObject value]):
1133 Use plainText for this one instead of obsolete attributedString.
1135 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1136 Advertise AXAttributedStringForTextMarkerRange.
1138 (AXAttributeStringAddFont):
1139 (AXAttributeStringAddElement):
1140 (-[KWQAccObject linkUIElementForNode:]):
1141 (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1142 (-[KWQAccObject accessibilityAttributedStringForRange:]):
1143 New routines to support AXAttributedStringForTextMarkerRange.
1145 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1146 Use new routines instead of obsolete attributedString.
1148 2005-01-20 David Harrison <harrison@apple.com>
1152 <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore
1154 * khtml/xml/dom_docimpl.cpp:
1155 (DocumentImpl::getAccObjectCache):
1156 Adjust when detecting cache in non-top level WebArea.
1157 * kwq/KWQAccObject.mm:
1158 (-[KWQAccObject textUnderElement]):
1159 (-[KWQAccObject accessibilityAttributeValue:]):
1160 Make sure the elements document is the current one for the part.
1162 2005-01-20 Darin Adler <darin@apple.com>
1166 - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:]
1168 * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions.
1169 The uncaught exception would make the entire program terminate.
1171 - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
1173 * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable
1174 back in November because Mail was stumbling over it.
1176 - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search>
1178 * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields
1179 that position their text in a way that depends on vertical size. In the case of a search field, the text
1180 is centered, so the old logic was broken.
1181 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to
1182 something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into
1183 AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this
1184 bug this happens because we become first responder before being sized and positioned by the HTML layout code.
1186 - improved debugging output when using "po" from gdb with Objective-C DOM
1189 (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node).
1190 (-[DOMRange description]): Tweaked format.
1192 2005-01-19 Richard Williamson <rjw@apple.com>
1194 After further discussion with Real we have decided to NOT include the
1195 additional CLSID for the real plugin. See 3958601.
1199 * khtml/rendering/render_frames.cpp:
1200 (RenderPartObject::updateWidget):
1202 2005-01-19 David Harrison <harrison@apple.com>
1206 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
1208 Previous checkin for this bug was missing some of the patch. Editing snafu with multiple changes in tree.
1210 * kwq/KWQAccObject.mm:
1211 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1212 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1213 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1214 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1215 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
1216 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1217 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
1219 2005-01-19 Ken Kocienda <kocienda@apple.com>
1223 * khtml/editing/htmlediting.cpp:
1224 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided
1225 to do on my last checkin, but I forgot to do before landing.
1227 2005-01-19 Ken Kocienda <kocienda@apple.com>
1233 <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines
1235 * khtml/editing/htmlediting.cpp:
1236 (khtml::CompositeEditCommand::applyStyle):
1237 (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder.
1238 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether
1239 placeholder was added or not.
1240 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block
1241 looking for a placeholder. The old code, which just looked at the last child of a node, started missing
1242 once block placeholders became styled (which started happening with this patch).
1243 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style
1244 to a block placeholder at call time, rather than setting the typing style as a latent style that
1245 might be applied later. This is an important part of the bug fix.
1246 (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded()
1247 and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to
1248 be styled can be detected.
1249 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class
1250 managed style. Before it would calculate and set typing style for the block added. This is not
1251 sufficient. Added blocks need to styled immediately. Some name changes to instance variables in
1252 this class due to the change to accommodate this change.
1253 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above.
1254 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
1255 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
1256 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
1257 (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder
1258 block can be removed in its entirety after the insertion.
1259 * khtml/editing/htmlediting.h: Update header accordingly.
1260 * khtml/khtml_part.cpp:
1261 (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before
1262 doing check when the position is in an empty block (this makes sure any style on any block
1263 placeholder is accounted for).
1265 New layout tests to check bug fix.
1267 * layout-tests/editing/style/block-style-004-expected.txt: Added.
1268 * layout-tests/editing/style/block-style-004.html: Added.
1269 * layout-tests/editing/style/block-style-005-expected.txt: Added.
1270 * layout-tests/editing/style/block-style-005.html: Added.
1271 * layout-tests/editing/style/block-style-006-expected.txt: Added.
1272 * layout-tests/editing/style/block-style-006.html: Added.
1274 Results updated to reflect new block placeholder code.
1276 * layout-tests/editing/inserting/insert-div-004-expected.txt
1277 * layout-tests/editing/inserting/insert-div-005-expected.txt
1278 * layout-tests/editing/inserting/insert-div-006-expected.txt
1279 * layout-tests/editing/inserting/insert-div-008-expected.txt
1280 * layout-tests/editing/inserting/insert-div-011-expected.txt
1281 * layout-tests/editing/inserting/insert-div-012-expected.txt
1282 * layout-tests/editing/inserting/insert-div-013-expected.txt
1283 * layout-tests/editing/inserting/insert-div-014-expected.txt
1284 * layout-tests/editing/inserting/insert-div-015-expected.txt
1285 * layout-tests/editing/inserting/insert-div-016-expected.txt
1286 * layout-tests/editing/inserting/insert-div-017-expected.txt
1287 * layout-tests/editing/inserting/insert-div-018-expected.txt
1288 * layout-tests/editing/inserting/insert-div-019-expected.txt
1289 * layout-tests/editing/inserting/insert-div-021-expected.txt
1290 * layout-tests/editing/inserting/insert-div-022-expected.txt
1291 * layout-tests/editing/inserting/insert-div-023-expected.txt
1292 * layout-tests/editing/inserting/insert-div-024-expected.txt
1294 2005-01-19 David Hyatt <hyatt@apple.com>
1296 Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the
1297 submission to occur. Fixes bug #3477282.
1301 (DOM::HTMLInputElementImpl::defaultEventHandler):
1303 2005-01-18 Richard Williamson <rjw@apple.com>
1305 Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
1307 Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
1308 Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
1309 Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
1310 Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
1312 We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
1313 tags. Also, if any of these elements are named they can be accessed from the document or window objects.
1314 Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
1318 * khtml/dom/html_document.cpp:
1319 (HTMLDocument::objects):
1320 * khtml/dom/html_document.h:
1321 * khtml/ecma/kjs_dom.cpp:
1322 (DOMDocumentProtoFunc::tryCall):
1323 (DOMElementProtoFunc::tryCall):
1324 (KJS::getRuntimeObject):
1325 * khtml/ecma/kjs_dom.h:
1326 * khtml/ecma/kjs_html.cpp:
1327 (KJS::HTMLDocument::tryGet):
1328 (KJS::HTMLElement::tryGet):
1329 (KJS::HTMLCollection::tryGet):
1330 (KJS::HTMLCollection::getNamedItems):
1331 * khtml/ecma/kjs_window.cpp:
1333 * khtml/html/html_miscimpl.cpp:
1334 (HTMLCollectionImpl::traverseNextItem):
1335 * khtml/html/html_miscimpl.h:
1336 (DOM::HTMLCollectionImpl::):
1337 * khtml/html/html_objectimpl.cpp:
1338 (HTMLAppletElementImpl::getAppletInstance):
1339 (HTMLObjectElementImpl::HTMLObjectElementImpl):
1340 (HTMLObjectElementImpl::getObjectInstance):
1341 * khtml/html/html_objectimpl.h:
1342 * khtml/rendering/render_frames.cpp:
1343 (RenderPartObject::updateWidget):
1344 * kwq/KWQKHTMLPart.h:
1345 * kwq/KWQKHTMLPart.mm:
1346 (KWQKHTMLPart::getObjectInstanceForView):
1348 2005-01-18 David Hyatt <hyatt@apple.com>
1350 Fix for 3948123, rolling over link erases nearby text. The repaint rect check for lines was wrong whenever
1351 two lines overlapped.
1353 Reviewed by kocienda
1355 * khtml/rendering/render_flow.cpp:
1356 (RenderFlow::paintLines):
1358 2005-01-18 Ken Kocienda <kocienda@apple.com>
1364 <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages
1366 * khtml/rendering/render_flow.cpp:
1367 (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around
1368 outermost contenteditable elements.
1370 2005-01-18 David Harrison <harrison@apple.com>
1374 <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not
1376 * kwq/KWQAccObject.mm:
1377 (-[KWQAccObject accessibilityFocusedUIElement]):
1378 Return parentObjectUnignored if focused object is ignored.
1380 2005-01-18 Ken Kocienda <kocienda@apple.com>
1386 <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment
1388 * khtml/editing/selection.cpp:
1389 (khtml::nodeForInlineBox): New helper function used in reimplementation of function below.
1390 (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when
1391 I had a less than full understanding of line layout. I can do better now, and my new version no
1392 longer fails to notice attachments when doing the kind of navigation mentioned in the bug.
1394 2005-01-17 David Harrison <harrison@apple.com>
1396 Reviewed by John Sullivan.
1398 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
1399 <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker
1401 Also fixed sentence support in the same way.
1403 * kwq/KWQAccObject.mm:
1404 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1405 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
1406 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1407 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
1408 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
1409 Move one position in desired direction before calling visible_units.cpp code.
1411 2005-01-17 David Harrison <harrison@apple.com>
1413 Updated expected test results.
1415 <rdar://problem/3945880> line-ending space seems not to be present
1417 * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt:
1418 * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt:
1419 * layout-tests/editing/inserting/insert-div-020-expected.txt:
1420 * layout-tests/editing/inserting/insert-div-021-expected.txt:
1421 * layout-tests/editing/inserting/insert-div-022-expected.txt:
1422 * layout-tests/editing/inserting/insert-div-023-expected.txt:
1423 * layout-tests/editing/inserting/insert-div-024-expected.txt:
1425 2005-01-17 David Harrison <harrison@apple.com>
1427 Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp).
1429 <rdar://problem/3945880> line-ending space seems not to be present
1431 * khtml/editing/selection.cpp:
1432 (khtml::Selection::validate):
1433 Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end.
1434 * khtml/rendering/bidi.cpp:
1435 (khtml::RenderBlock::findNextLineBreak):
1436 Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break).
1438 2005-01-17 Darin Adler <darin@apple.com>
1440 Reviewed by John Louch.
1442 - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate
1444 * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead
1445 of using mapToGlobal and screen in a complicated way.
1446 * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function.
1447 * kwq/KWQWindowWidget.h: Ditto.
1448 * kwq/KWQWindowWidget.mm: Ditto.
1450 2005-01-17 David Hyatt <hyatt@apple.com>
1452 Fix a screwup in rightmost/lowets position computation. 3955207. Make sure floats with layers are still checked.
1454 Reviewed by kocienda
1456 * khtml/rendering/render_block.cpp
1458 2005-01-17 Ken Kocienda <kocienda@apple.com>
1462 <rdar://problem/3953366> Problems with typing attributes in HTML compose
1464 * khtml/editing/htmlediting.cpp:
1465 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
1466 that tried to sense when typing style could be cleared without actually doing a style diff between
1467 before-delete and after-delete positions. Removing this extra check and running the
1468 general-purpose code fixes the bug.
1470 2005-01-17 Richard Williamson <rjw@apple.com>
1472 Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
1474 Keep track of originating execution context and target execution
1475 context for native JS object wrappers, and perform appropriate
1478 Reviewed by David Harrison.
1480 * khtml/ecma/kjs_binding.cpp:
1481 (ScriptInterpreter::isGlobalObject):
1482 (ScriptInterpreter::isSafeScript):
1483 (ScriptInterpreter::interpreterForGlobalObject):
1484 * khtml/ecma/kjs_binding.h:
1485 * khtml/ecma/kjs_window.cpp:
1486 (Window::interpreter):
1487 (Window::isSafeScript):
1488 * khtml/ecma/kjs_window.h:
1489 * kwq/DOMInternal.mm:
1490 (-[WebScriptObject _initializeScriptDOMNodeImp]):
1491 * kwq/KWQKHTMLPart.mm:
1492 (KWQKHTMLPart::windowScriptObject):
1493 (KWQKHTMLPart::windowScriptNPObject):
1494 * kwq/WebCoreBridge.mm:
1496 (-[WebCoreBridge init]):
1498 2005-01-17 Ken Kocienda <kocienda@apple.com>
1504 <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with
1505 "size up" and "size down" NSFontManager changes
1507 * khtml/css/cssparser.cpp:
1508 (CSSParser::parseValue): Add support for parsing new font size delta property.
1509 * khtml/css/cssproperties.c: Generated file.
1510 * khtml/css/cssproperties.h: Ditto.
1511 * khtml/css/cssproperties.in: Add support for parsing new font size delta property.
1512 * khtml/editing/htmlediting.cpp:
1513 (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
1514 (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
1515 and running command to do the removal.
1516 (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
1517 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle
1518 relative font size changes.
1519 (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
1520 before or equal to the end. Swap them if not true. I ran into this problem in some similar code in
1521 applyRelativeFontStyleChange(). Moving that goodness here too.
1522 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
1523 Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
1524 I use the bool return value now (I obviously did not need it before).
1525 (khtml::ApplyStyleCommand::computedFontSize): New helper function.
1526 (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
1527 (khtml::createStyleSpanElement): Ditto.
1528 * khtml/editing/htmlediting.h: Update header accordingly.
1529 * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
1531 (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
1532 (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
1533 * kwq/DOMPrivate.h: Declare new conveniences.
1534 * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
1535 * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
1536 * layout-tests/editing/style/relative-font-size-change-001.html: Added.
1537 * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
1538 * layout-tests/editing/style/relative-font-size-change-002.html: Added.
1539 * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
1540 * layout-tests/editing/style/relative-font-size-change-003.html: Added.
1541 * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
1542 * layout-tests/editing/style/relative-font-size-change-004.html: Added.
1544 2005-01-14 Darin Adler <darin@apple.com>
1546 * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
1547 * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
1548 * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
1549 * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
1551 2005-01-14 Chris Blumenberg <cblu@apple.com>
1553 Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page
1557 (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
1558 (KWQKHTMLPart::mousePressNode): new
1559 * kwq/KWQPageState.h:
1560 * kwq/KWQPageState.mm:
1561 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
1562 (-[KWQPageState clear]): clear the mousePressNode
1563 (-[KWQPageState dealloc]): deref the mousePressNode
1564 (-[KWQPageState mousePressNode]): new
1568 2005-01-13 Vicki Murley <vicki@apple.com>
1572 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
1574 * WebCore.pbproj/project.pbxproj: bump "2004" to "2005"
1576 2005-01-13 David Harrison <harrison@apple.com>
1578 Reviewed by Ken Kocienda.
1580 Better fix for 3905066.
1582 * khtml/editing/htmlediting.cpp:
1583 (khtml::InsertParagraphSeparatorCommand::doApply):
1585 2005-01-10 Maciej Stachowiak <mjs@apple.com>
1589 <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
1591 * khtml/rendering/render_text.cpp:
1592 (InlineTextBox::paint): Support painting custom underline markers for
1593 marked text in place of generic yellow.
1594 (InlineTextBox::paintMarkedTextUnderline): New method that handles this.
1595 * khtml/rendering/render_text.h:
1596 * kwq/KWQKHTMLPart.h: Declare new methods and structs.
1597 * kwq/KWQKHTMLPart.mm:
1598 (KWQKHTMLPart::clear): Clear marked test underlines.
1599 (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
1600 (convertAttributesToUnderlines): Converts NSAttributedString attributes
1601 to simplified and C++-friendly form.
1602 (KWQKHTMLPart::markedTextUsesUnderlines): New method.
1603 (KWQKHTMLPart::markedTextUnderlines): New method.
1604 * kwq/KWQPainter.mm:
1605 (QPainter::drawLineForText): Handle pen width.
1606 * kwq/WebCoreBridge.h:
1607 * kwq/WebCoreBridge.mm:
1608 (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
1610 * kwq/WebCoreTextRenderer.h:
1612 2005-01-12 David Harrison <harrison@apple.com>
1614 Reviewed by Dave Hyatt.
1616 <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
1618 * kwq/KWQAccObject.mm:
1619 (-[KWQAccObject addChildrenToArray:]):
1620 Use the widget's outer view.
1622 2005-01-12 David Harrison <harrison@apple.com>
1624 Reviewed by Darin Adler.
1626 <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute
1628 * khtml/xml/dom_nodeimpl.cpp:
1629 (NodeImpl::displayNode):
1630 Add quotes around text node content.
1631 (NodeBaseImpl::childNode):
1632 Add nil check to return nil rather than crash when child node not found.
1633 * kwq/KWQAccObject.mm:
1634 (-[KWQAccObject doAXStringForTextMarkerRange:]):
1635 Pass range compliant positions to TextIterator.
1637 2005-01-12 David Hyatt <hyatt@apple.com>
1639 Fix for 3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during
1640 line layout is smarter about including the overflow for both old states and new states.
1644 * khtml/rendering/bidi.cpp:
1645 (khtml::RenderBlock::layoutInlineChildren):
1647 2005-01-12 David Hyatt <hyatt@apple.com>
1649 Fix for bug 3937608, versiontracker.com flashes and displays the right column below content. Make sure to move
1650 tables/overflows that dont fit within a block only in strict mode.
1652 Fix for bug 3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific
1653 case in editing is hit.
1655 Reviewed by darin (first one), kocienda (second one)
1657 * khtml/rendering/render_block.cpp:
1658 (khtml::RenderBlock::getClearDelta):
1659 * khtml/rendering/render_flow.cpp:
1660 (RenderFlow::dirtyLinesFromChangedChild):
1661 * khtml/rendering/render_line.cpp:
1662 (khtml::InlineFlowBox::verticallyAlignBoxes):
1664 2005-01-12 Ken Kocienda <kocienda@apple.com>
1670 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
1672 * khtml/editing/htmlediting.cpp:
1673 (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
1674 merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
1675 added to visible_position files.
1676 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
1677 tests to determine when to stop moving nodes more complete and correct. Also improved comments.
1678 * khtml/editing/visible_position.cpp:
1679 (khtml::isFirstVisiblePositionInParagraph): New function.
1680 (khtml::isLastVisiblePositionInParagraph): New function.
1681 * khtml/editing/visible_position.h: Update header accordingly.
1682 * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
1683 results but still correct.
1684 * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
1685 * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
1686 * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
1687 * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
1688 * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
1689 * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
1690 * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
1691 * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
1692 * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
1693 * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
1695 2005-01-11 Richard Williamson <rjw@apple.com>
1697 Fixed 3922875. Fall back to DOM object is EMBED element
1698 has no associated runtime object.
1702 * khtml/ecma/kjs_dom.cpp:
1703 (KJS::getRuntimeObject):
1704 * khtml/ecma/kjs_html.cpp:
1705 (KJS::HTMLDocument::tryGet):
1706 (KJS::HTMLElement::tryGet):
1707 (KJS::HTMLCollection::tryGet):
1708 (KJS::HTMLCollection::getNamedItems):
1710 2005-01-11 David Hyatt <hyatt@apple.com>
1712 Fix for 3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match
1717 * khtml/html/htmltokenizer.cpp:
1718 (khtml::HTMLTokenizer::parseTag):
1720 2005-01-11 Chris Blumenberg <cblu@apple.com>
1722 Fixed: <rdar://problem/3930733> Mail prints second page of email blank
1726 * khtml/rendering/render_canvas.cpp:
1727 (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
1728 * khtml/rendering/render_flow.cpp:
1729 (RenderFlow::paintLines): removed null check since the print rect should never be null
1730 * khtml/rendering/render_list.cpp:
1731 (RenderListMarker::paint): ditto
1732 * kwq/KWQKHTMLPart.mm:
1733 (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
1735 2005-01-10 Ken Kocienda <kocienda@apple.com>
1741 <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply
1743 * khtml/editing/htmlediting.cpp:
1744 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a
1745 simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the
1746 result calculated in that deeper scope was not available when tested.
1748 2005-01-10 Ken Kocienda <kocienda@apple.com>
1754 <rdar://problem/3946852> Option-e goes to next line
1756 * khtml/editing/htmlediting.cpp:
1757 (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
1758 into the start line is done. We plan to change pretty substantially soon to better handle
1759 the problem described in <rdar://problem/3937352> Quote level not maintained when copied
1760 and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
1762 2005-01-10 Ken Kocienda <kocienda@apple.com>
1768 <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines
1770 * khtml/editing/htmlediting.cpp:
1771 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
1772 to their own blocks if needed so that a block style can be applied.
1773 (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
1774 (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
1775 (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
1776 This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
1777 paragraph is styled.
1778 (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
1779 Should remove attributue instead.
1780 * khtml/editing/htmlediting.h: Touch function declarations accordingly.
1781 * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
1782 * layout-tests/editing/style/create-block-for-style-001.html: Added.
1783 * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
1784 * layout-tests/editing/style/create-block-for-style-002.html: Added.
1785 * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
1786 * layout-tests/editing/style/create-block-for-style-003.html: Added.
1787 * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
1788 * layout-tests/editing/style/create-block-for-style-004.html: Added.
1789 * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
1790 * layout-tests/editing/style/create-block-for-style-005.html: Added.
1791 * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
1792 * layout-tests/editing/style/create-block-for-style-006.html: Added.
1793 * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
1794 * layout-tests/editing/style/create-block-for-style-007.html: Added.
1795 * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
1796 * layout-tests/editing/style/create-block-for-style-008.html: Added.
1797 * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
1798 * layout-tests/editing/style/create-block-for-style-009.html: Added.
1799 * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
1800 * layout-tests/editing/style/create-block-for-style-010.html: Added.
1801 * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
1802 * layout-tests/editing/style/create-block-for-style-011.html: Added.
1803 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
1804 * layout-tests/editing/style/create-block-for-style-012.html: Added.
1805 * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
1806 * layout-tests/editing/style/create-block-for-style-013.html: Added.
1808 Unrelated updates to these expected results.
1809 * layout-tests/editing/inserting/insert-div-007-expected.txt
1810 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
1812 2005-01-10 Chris Blumenberg <cblu@apple.com>
1814 Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print
1818 * khtml/rendering/render_flow.cpp:
1819 (RenderFlow::paintLines): don't do pagination work if printRect is not set
1820 * khtml/rendering/render_list.cpp:
1821 (RenderListMarker::paint): ditto
1823 2005-01-10 David Harrison <harrison@apple.com>
1827 * kwq/KWQTextUtilities.mm:
1828 (currentTextBreakLocaleID):
1829 Return empty string (AKA root locale) if locale pref can not be canonicalized.
1831 2005-01-10 John Sullivan <sullivan@apple.com>
1833 Fixed broken Panther build.
1835 * kwq/KWQTextUtilities.mm:
1836 (currentTextBreakLocaleID):
1837 This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
1838 That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
1839 To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
1840 function. However, the Tiger-only code was wrong; the string generated using
1841 CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
1844 2005-01-09 David Harrison <harrison@apple.com>
1846 Reviewed by Ken Kocienda.
1848 <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
1850 * khtml/editing/htmlediting.cpp:
1851 (khtml::ReplaceSelectionCommand::doApply):
1852 Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
1854 2005-01-09 Darin Adler <darin@apple.com>
1856 Reviewed by Harrison.
1858 - fixed <rdar://problem/3939176> select() method does not work on <input type=search>
1860 * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
1861 to a switch statement. Added SEARCH to the set of types that treat the renderer as a
1864 2005-01-09 David Harrison <harrison@apple.com>
1866 Reviewed by Ken Kocienda.
1868 <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
1870 Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
1871 whitespace to a single non-breaking space when splitting a text node.
1873 * khtml/editing/htmlediting.cpp:
1874 (khtml::InsertParagraphSeparatorCommand::doApply):
1876 2005-01-08 Kevin Decker <kdecker@apple.com>
1880 Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
1882 * khtml/html/html_elementimpl.cpp:
1883 (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
1885 2005-01-07 Maciej Stachowiak <mjs@apple.com>
1889 <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
1891 * Khtml/khtml_part.cpp:
1892 (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
1893 not started loading yet so it could not possibly be finishing here...
1894 (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
1895 no document, in this case we must have hit an error or been loading a non-HTML
1897 * khtml/khtml_part.h:
1899 2005-01-08 David Harrison <harrison@apple.com>
1903 <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
1905 * khtml/editing/selection.cpp:
1906 (khtml::Selection::validate):
1907 Tune word selections left/right choice to use right if on empty last line.
1909 2005-01-07 David Harrison <harrison@apple.com>
1913 <rdar://problem/3942619> AX: Support sentence ax attributes
1915 Needed to use the unicode utilities properly. Twas lame before.
1917 * khtml/editing/visible_units.cpp:
1918 (khtml::previousBoundary):
1919 (khtml::nextBoundary):
1920 (khtml::startOfWord):
1922 (khtml::previousWordPosition):
1923 (khtml::nextWordPosition):
1924 (khtml::startOfSentence):
1925 (khtml::endOfSentence):
1926 (khtml::previousSentencePosition):
1927 (khtml::nextSentencePosition):
1928 * kwq/KWQAccObject.mm:
1929 (-[KWQAccObject accessibilityAttributeNames]):
1930 (-[KWQAccObject accessibilityAttributeValue:]):
1931 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1932 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1933 * kwq/KWQTextUtilities.mm:
1934 (currentTextBreakLocaleID):
1935 (KWQFindSentenceBoundary):
1936 (KWQFindNextSentenceFromIndex):
1938 2005-01-07 Ken Kocienda <kocienda@apple.com>
1944 <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
1945 <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
1947 * khtml/editing/htmlediting.cpp:
1948 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
1949 Merge the typing style with the computed style for the current position. Fixes both bugs.
1950 * khtml/editing/htmlediting.h:
1951 * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
1952 * layout-tests/editing/inserting/insert-div-023.html: Added.
1953 * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
1954 * layout-tests/editing/inserting/insert-div-024.html: Added.
1956 2005-01-07 David Hyatt <hyatt@apple.com>
1958 Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
1959 behavior on worldofwarcraft.com.
1963 * khtml/rendering/render_table.cpp:
1964 (RenderTable::layout):
1966 2005-01-06 David Hyatt <hyatt@apple.com>
1968 Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables. Bulletproof the hit testing to
1969 ignore inline flows in this case.
1973 * khtml/rendering/render_block.cpp:
1974 (khtml::RenderBlock::nodeAtPoint):
1976 2005-01-07 Ken Kocienda <kocienda@apple.com>
1982 <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view
1984 * kwq/KWQKHTMLPart.mm:
1985 (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
1986 in the document, or if it is not a descendent of the document element. In the case of the bug,
1987 since the selection has not yet been set up, the focus node passed here is the HTML element, and
1988 that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
1990 2005-01-06 Kevin Decker <kdecker@apple.com>
1994 Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
1996 * khtml/khtml_part.cpp:
1997 (KHTMLPart::processObjectRequest): m_bComplete was never true for frames generated by Javascript due to our synchronous loading and as a result, scheduled redirects wouldn't fire in KHTMLPart::scheduleLocationChange(). By virtue of being an empty document, a document is complete. In this special case it's safe at this point to call checkCompleted() which sets m_bComplete true.
2001 2005-01-06 David Harrison <harrison@apple.com>
2005 (addendum to previous checkin for this bug)
2006 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
2008 Fix line navigation. Add AXUIElementForTextMarker.
2010 * kwq/KWQAccObject.mm:
2011 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2012 (-[KWQAccObject doAXUIElementForTextMarker:]):
2013 (-[KWQAccObject doAXLineForTextMarker:]):
2014 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2015 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2016 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2017 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2018 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2020 2005-01-06 Darin Adler <darin@apple.com>
2024 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2026 (turns out the PLT regression was a false alarm)
2028 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2029 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2031 * khtml/html/htmlparser.cpp:
2032 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2033 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2034 to eliminate code that used ID_CLOSE_TAG for an array size.
2035 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2036 that manages isindex to use deref instead of delete.
2037 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2038 mistake of using ID_CLOSE_TAG for the array size too.
2039 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2040 there and it would prevent custom tags from working. Added range check before using the forbidden
2041 tag array with the token ID since custom tags will use index values past the end of the array.
2042 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2043 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2044 createElement call is still here. Last time I left out a few form element types from this switch;
2046 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2047 document if getTagID fails; this creates a unique per-document ID.
2049 * khtml/misc/htmltags.c: Regenerated.
2050 * khtml/misc/htmltags.h: Regenerated.
2052 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
2053 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
2054 Also rewrote getTagName to work with the new scheme.
2056 2005-01-06 David Harrison <harrison@apple.com>
2058 Fixed Panther build. Also, do not advertize sentence support since it is incomplete.
2060 * kwq/KWQAccObject.mm:
2061 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
2062 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2063 (-[KWQAccObject accessibilityIsAttributeSettable:]):
2065 2005-01-06 David Harrison <harrison@apple.com>
2067 Reviewed by Dave Hyatt.
2069 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
2070 <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
2072 Many more AX attributes supported. Numerous fixes to previous AX work.
2074 * khtml/editing/visible_units.cpp:
2075 (khtml::startSentenceBoundary):
2076 (khtml::startOfSentence):
2077 (khtml::endSentenceBoundary):
2078 (khtml::endOfSentence):
2079 (khtml::previousSentencePositionBoundary):
2080 (khtml::previousSentencePosition):
2081 (khtml::nextSentencePositionBoundary):
2082 (khtml::nextSentencePosition):
2083 * khtml/editing/visible_units.h:
2084 * khtml/khtmlview.cpp:
2085 (KHTMLView::layout):
2086 * khtml/misc/helper.cpp:
2087 (khtml::findSentenceBoundary):
2088 (khtml::nextSentenceFromIndex):
2089 * khtml/misc/helper.h:
2090 * khtml/misc/htmltags.c:
2093 * khtml/rendering/render_container.cpp:
2094 (RenderContainer::removeChildNode):
2095 (RenderContainer::appendChildNode):
2096 (RenderContainer::insertChildNode):
2097 * khtml/rendering/render_object.cpp:
2098 (RenderObject::remove):
2099 * khtml/xml/dom_docimpl.cpp:
2100 (DocumentImpl::getAccObjectCache):
2101 (DocumentImpl::updateSelection):
2102 (DocumentImpl::close):
2103 (DocumentImpl::setFocusNode):
2104 (DocumentImpl::parentDocument):
2105 (DocumentImpl::topDocument):
2106 * khtml/xml/dom_docimpl.h:
2107 * kwq/KWQAccObject.mm:
2108 (-[KWQAccObject accessibilityShouldUseUniqueId]):
2109 (-[KWQAccObject detach]):
2110 (-[KWQAccObject anchorElement]):
2111 (-[KWQAccObject firstChild]):
2112 (-[KWQAccObject lastChild]):
2113 (-[KWQAccObject previousSibling]):
2114 (-[KWQAccObject nextSibling]):
2115 (-[KWQAccObject parentObject]):
2116 (-[KWQAccObject value]):
2117 (-[KWQAccObject accessibilityAttributeNames]):
2118 (-[KWQAccObject accessibilityPerformAction:]):
2119 (-[KWQAccObject textMarkerForVisiblePosition:]):
2120 (-[KWQAccObject visiblePositionForTextMarker:]):
2121 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
2122 (-[KWQAccObject topDocument]):
2123 (-[KWQAccObject topRenderer]):
2124 (-[KWQAccObject topView]):
2125 (-[KWQAccObject accessibilityAttributeValue:]):
2126 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2127 (-[KWQAccObject doAXLineForTextMarker:]):
2128 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2129 (-[KWQAccObject doAXStringForTextMarkerRange:]):
2130 (-[KWQAccObject doAXTextMarkerForPosition:]):
2131 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
2132 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2133 (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
2134 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
2135 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
2136 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
2137 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
2138 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
2139 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2140 (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
2141 (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
2142 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
2143 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
2144 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2145 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2146 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
2147 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2148 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
2149 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
2150 (-[KWQAccObject doAXLengthForTextMarkerRange:]):
2151 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2152 (-[KWQAccObject accessibilityHitTest:]):
2153 (-[KWQAccObject accessibilityFocusedUIElement]):
2154 (-[KWQAccObject accessibilityIsAttributeSettable:]):
2155 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
2156 (-[KWQAccObject setAccObjectID:]):
2157 (-[KWQAccObject removeAccObjectID]):
2158 * kwq/KWQAccObjectCache.h:
2159 * kwq/KWQAccObjectCache.mm:
2160 (KWQAccObjectCache::setAccObject):
2161 (KWQAccObjectCache::removeAccObject):
2162 (KWQAccObjectCache::visiblePositionForTextMarker):
2163 (KWQAccObjectCache::postNotificationToTopWebArea):
2164 (KWQAccObjectCache::postNotification):
2165 (KWQAccObjectCache::handleFocusedUIElementChanged):
2166 * kwq/KWQKHTMLPart.mm:
2167 (KWQKHTMLPart::respondToChangedContents):
2168 * kwq/KWQTextUtilities.h:
2169 * kwq/KWQTextUtilities.mm:
2170 (KWQFindNextWordFromIndex):
2171 (KWQFindSentenceBoundary):
2172 (KWQFindNextSentenceFromIndex):
2173 * kwq/WebCoreBridge.mm:
2174 (-[WebCoreBridge accessibilityTree]):
2176 2005-01-05 Darin Adler <darin@apple.com>
2180 - re-landing a subset of my custom tag change that does not fix the bug, but also does
2181 not introduce a performance regression
2183 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2184 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2186 * khtml/editing/htmlediting.cpp:
2187 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2188 per-document tags and is just better all around for things like the document.
2189 (khtml::debugNode): Ditto.
2190 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2191 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2192 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2193 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2195 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2196 non-HTML elements to be nested as desired.
2198 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2199 * khtml/misc/htmlhashes.cpp:
2200 (khtml::getTagID): Changed return type to unsigned short.
2201 (khtml::getAttrID): Ditto.
2203 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
2204 * khtml/xml/dom_docimpl.cpp:
2205 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
2206 Also updated for a few tags that the parser handled but this did not.
2208 * kwq/KWQRenderTreeDebug.cpp:
2209 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
2210 the tag ID directly, which only works for standard nodes.
2211 (operator<<): Update to call getTagName.
2212 (nodePositionRelativeToRoot): Ditto.
2213 (writeSelection): Ditto.
2215 2005-01-05 Ken Kocienda <kocienda@apple.com>
2221 <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place
2223 * khtml/editing/htmlediting.cpp:
2224 (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
2225 this operation work correctly, particularly in the logic to figure out whether to merge content, and
2226 also performing merges.
2227 * khtml/editing/visible_position.cpp:
2228 (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
2229 * khtml/editing/visible_units.cpp:
2230 (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
2231 (khtml::isEndOfParagraph): Ditto.
2232 * khtml/editing/visible_units.h: Declare new functions.
2234 2005-01-04 Ken Kocienda <kocienda@apple.com>
2240 <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
2242 * khtml/editing/htmlediting.cpp:
2243 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
2244 for the block we are adding was being done at the wrong time, which led to the placeholder remaining
2245 in the document when it was not needed. This resulted in the extra space reported in the bug.
2247 2005-01-04 Kevin Decker <kdecker@apple.com>
2251 Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
2253 * khtml/rendering/render_block.cpp:
2254 (khtml::RenderBlock::fillInlineSelectionGaps): Added a nil check. If there is no selection, don't try to get the selection's containing block. If we do, we'll crash.
2256 2005-01-04 David Hyatt <hyatt@apple.com>
2258 Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
2262 * khtml/rendering/render_layer.cpp:
2263 (RenderLayer::updateScrollInfoAfterLayout):
2265 2005-01-04 Ken Kocienda <kocienda@apple.com>
2269 Fix for these two bugs:
2271 <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content
2272 <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
2274 * khtml/editing/htmlediting.cpp:
2275 (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge
2276 neither start nor end. For 3939148, improve the code which adjusts the insertion point during
2277 the process of pasting. It formerly handled only one of the possible cases.
2278 * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
2279 * layout-tests/editing/pasteboard/paste-text-015.html: Added.
2281 2005-01-04 David Hyatt <hyatt@apple.com>
2283 Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
2287 * khtml/rendering/render_form.cpp:
2288 (RenderLineEdit::updateFromElement):
2289 * kwq/KWQLineEdit.mm:
2290 (QLineEdit::setPlaceholderString):
2292 2005-01-04 David Hyatt <hyatt@apple.com>
2294 Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when
2295 returning pseudo-styles.
2299 * khtml/css/cssstyleselector.cpp:
2300 (khtml::CSSStyleSelector::matchRulesForList):
2301 (khtml::CSSStyleSelector::pseudoStyleForElement):
2302 * khtml/rendering/render_style.cpp:
2303 (RenderStyle::addPseudoStyle):
2305 2005-01-04 Darin Adler <darin@apple.com>
2307 - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
2309 * khtml/css/cssstyleselector.cpp:
2310 * khtml/editing/htmlediting.cpp:
2311 * khtml/editing/selection.cpp:
2312 * khtml/editing/visible_position.cpp:
2313 * khtml/html/dtd.cpp:
2314 * khtml/html/htmlparser.cpp:
2315 * khtml/html/htmlparser.h:
2316 * khtml/html/htmltokenizer.cpp:
2317 * khtml/misc/htmlhashes.cpp:
2318 * khtml/misc/htmlhashes.h:
2319 * khtml/misc/htmltags.c:
2320 * khtml/misc/htmltags.h:
2321 * khtml/misc/maketags:
2322 * khtml/xml/dom_docimpl.cpp:
2323 * khtml/xml/dom_docimpl.h:
2324 * khtml/xml/dom_nodeimpl.cpp:
2325 * khtml/xml/dom_position.cpp:
2326 * kwq/KWQRenderTreeDebug.cpp:
2328 2005-01-04 Ken Kocienda <kocienda@apple.com>
2334 <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered
2336 * khtml/editing/htmlediting.cpp:
2337 (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
2338 a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
2339 to be applied. Now the code will detect when at the end of a style run and will not move and apply
2340 that ending style to the new paragraph, though it will place that style into the typing style. This
2341 seems to match NSText behavior.
2342 * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
2343 here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
2344 not have any visible effect on the document.
2345 * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
2346 * layout-tests/editing/inserting/insert-div-022.html: Added.
2348 2005-01-04 David Hyatt <hyatt@apple.com>
2350 Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
2355 * khtml/rendering/render_flow.cpp:
2356 (RenderFlow::paintLines):
2358 2005-01-03 David Hyatt <hyatt@apple.com>
2360 Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint flag setting more
2361 robust and make it work regardless of which objects get a layout or not.
2365 * khtml/rendering/render_block.cpp:
2366 (khtml::RenderBlock::insertFloatingObject):
2367 (khtml::RenderBlock::addOverhangingFloats):
2368 (khtml::RenderBlock::addIntrudingFloats):
2369 * khtml/rendering/render_block.h:
2370 (khtml::RenderBlock::FloatingObject::FloatingObject):
2372 2005-01-03 Maciej Stachowiak <mjs@apple.com>
2376 <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
2378 * khtml/html/html_miscimpl.cpp:
2379 (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
2380 it should not ever be (now).
2381 (HTMLCollectionImpl::item): When traversing items stop when we hit
2382 nil, meaning the end to avoid triggering above assert (formerly crash).
2384 2005-01-03 Maciej Stachowiak <mjs@apple.com>
2386 Reviewed by John and Kevin.
2388 <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
2390 * khtml/ecma/kjs_window.cpp:
2391 (Window::get): Look up frame names before buitin window properties
2392 to match other browsers. This regressed because we added a builtin
2393 "toolbar" property but this site had a frame with that name.
2395 2004-12-21 Maciej Stachowiak <mjs@apple.com>
2399 <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another
2401 Added opener bridge method to help WebKit implement security check
2402 for named frame visibility.
2404 * khtml/khtml_part.h:
2405 * kwq/WebCoreBridge.h:
2406 * kwq/WebCoreBridge.mm:
2407 (-[WebCoreBridge opener]):
2409 2005-01-03 Ken Kocienda <kocienda@apple.com>
2415 <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]
2417 * kwq/WebCoreBridge.mm:
2418 (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.
2420 2005-01-03 David Hyatt <hyatt@apple.com>
2422 Fix for 3936881, make sure positioned objects prooperly update y-position.
2426 * khtml/rendering/render_block.cpp:
2427 (khtml::RenderBlock::layoutPositionedObjects):
2429 2005-01-03 Ken Kocienda <kocienda@apple.com>
2431 Reviewed by Harrison
2435 <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key
2437 * khtml/editing/htmlediting.cpp:
2438 (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
2439 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
2440 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
2441 (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
2442 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
2443 (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
2444 insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
2445 of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
2446 (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
2447 (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
2448 * khtml/editing/htmlediting.h: Declare new functions.
2450 2004-12-25 Kevin Decker <kdecker@apple.com>
2454 Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)
2456 * khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements. Malformed HTML (ugh) is the only reason why we need to do this.
2458 2004-12-23 Darin Adler <darin@apple.com>
2462 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2464 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2465 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2467 * khtml/editing/htmlediting.cpp:
2468 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2469 per-document tags and is just better all around for things like the document.
2470 (khtml::debugNode): Ditto.
2471 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2472 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2473 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2474 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2476 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2477 non-HTML elements to be nested as desired.
2479 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2480 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2482 * khtml/html/htmlparser.cpp:
2483 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2484 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2485 to eliminate code that used ID_CLOSE_TAG for an array size.
2486 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2487 that manages isindex to use deref instead of delete.
2488 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2489 mistake of using ID_CLOSE_TAG for the array size too.
2490 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2491 there and it would prevent custom tags from working. Added range check before using the forbidden
2492 tag array with the token ID since custom tags will use index values past the end of the array.
2493 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2494 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2495 createElement call is still here. Last time I left out a few form element types from this switch;
2497 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2498 document if getTagID fails; this creates a unique per-document ID.
2500 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2501 * khtml/misc/htmlhashes.cpp:
2502 (khtml::getTagID): Changed return type to unsigned short.
2503 (khtml::getAttrID): Ditto.
2505 * khtml/misc/htmltags.c: Regenerated.
2506 * khtml/misc/htmltags.h: Regenerated.
2508 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
2509 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
2510 Also rewrote getTagName to work with the new scheme.
2512 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
2513 * khtml/xml/dom_docimpl.cpp:
2514 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
2515 Also updated for a few tags that the parser handled but this did not.
2517 * kwq/KWQRenderTreeDebug.cpp:
2518 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
2519 the tag ID directly, which only works for standard nodes.
2520 (operator<<): Update to call getTagName.
2521 (nodePositionRelativeToRoot): Ditto.
2522 (writeSelection): Ditto.
2526 2004-12-22 Darin Adler <darin@apple.com>
2528 - rolled out my custom tag name change -- it broke amazon.com
2530 * khtml/css/cssstyleselector.cpp:
2531 * khtml/editing/htmlediting.cpp:
2532 * khtml/editing/selection.cpp:
2533 * khtml/editing/visible_position.cpp:
2534 * khtml/html/dtd.cpp:
2535 * khtml/html/htmlparser.cpp:
2536 * khtml/html/htmlparser.h:
2537 * khtml/html/htmltokenizer.cpp:
2538 * khtml/misc/htmlhashes.cpp:
2539 * khtml/misc/htmlhashes.h:
2540 * khtml/misc/htmltags.c:
2541 * khtml/misc/htmltags.h:
2542 * khtml/misc/maketags:
2543 * khtml/xml/dom_docimpl.cpp:
2544 * khtml/xml/dom_docimpl.h:
2545 * khtml/xml/dom_nodeimpl.cpp:
2546 * khtml/xml/dom_position.cpp:
2547 * kwq/KWQRenderTreeDebug.cpp:
2549 2004-12-22 David Harrison <harrison@apple.com>
2551 Reviewed by Darin Adler.
2553 * khtml/editing/selection.cpp:
2554 (khtml::Selection::validate):
2555 The selecting/deselecting bad behavior is because the Selection code that expands by words
2556 had an inaccurate test for being at the end of the document (where double-clicking needs
2557 to select the last word). Fixed that check.
2559 2004-12-22 Adele Amchan <adele@apple.com>
2563 Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while
2565 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection
2566 so that we match Firefox and WinIE behavior.
2568 2004-12-22 Darin Adler <darin@apple.com>
2572 - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2574 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2575 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2577 * khtml/editing/htmlediting.cpp:
2578 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2579 per-document tags and is just better all around for things like the document.
2580 (khtml::debugNode): Ditto.
2581 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2582 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2583 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2584 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2586 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2587 non-HTML elements to be nested as desired.
2589 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2590 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2592 * khtml/html/htmlparser.cpp:
2593 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2594 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2595 to eliminate code that used ID_CLOSE_TAG for an array size.
2596 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2597 that manages isindex to use deref instead of delete.
2598 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2599 mistake of using ID_CLOSE_TAG for the array size too.
2600 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2601 there and it would prevent custom tags from working. Added range check before using the forbidden
2602 tag array with the token ID since custom tags will use index values past the end of the array.
2603 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2604 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2605 createElement call is still here.
2606 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2607 document if getTagID fails; this creates a unique per-document ID.
2609 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2610 * khtml/misc/htmlhashes.cpp:
2611 (khtml::getTagID): Changed return type to unsigned short.
2612 (khtml::getAttrID): Ditto.
2614 * khtml/misc/htmltags.c: Regenerated.
2615 * khtml/misc/htmltags.h: Regenerated.
2617 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
2618 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
2619 Also rewrote getTagName to work with the new scheme.
2621 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
2622 * khtml/xml/dom_docimpl.cpp:
2623 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
2624 Also updated for a few tags that the parser handled but this did not.
2626 * kwq/KWQRenderTreeDebug.cpp:
2627 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
2628 the tag ID directly, which only works for standard nodes.
2629 (operator<<): Update to call getTagName.
2630 (nodePositionRelativeToRoot): Ditto.
2631 (writeSelection): Ditto.
2633 2004-12-21 David Harrison <harrison@apple.com>
2635 Reviewed by Ken Kocienda.
2637 <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line
2639 Problem was the TextIterator was not handling exitNode() from a P block properly.
2641 * khtml/editing/visible_text.cpp:
2642 (khtml::TextIterator::TextIterator):
2643 Add new param that specifies whether the iterator is for content or for searching.
2644 Search iterators do not prevent newlines at the beginning.
2645 (khtml::TextIterator::advance):
2646 Added some comments.
2647 (khtml::TextIterator::handleTextNode):
2648 Added some comments.
2649 (khtml::TextIterator::exitNode):
2650 Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
2651 (khtml::TextIterator::emitCharacter):
2652 Added some comments.
2653 (khtml::TextIterator::range):
2654 Added some comments.
2655 (khtml::CharacterIterator::CharacterIterator):
2656 Specify search type TextIterator.
2657 (khtml::CharacterIterator::advance):
2658 * khtml/editing/visible_text.h:
2660 Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
2661 * khtml/editing/visible_units.cpp:
2662 (khtml::nextWordBoundary):
2663 Specify search type TextIterator.
2665 2004-12-21 David Harrison <harrison@apple.com>
2667 Reviewed by Ken Kocienda.
2669 <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL
2671 Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
2672 Fixed by pretending the start == end-1 in that situation, as long as end > 0.
2674 * khtml/rendering/render_text.cpp:
2675 (RenderText::setSelectionState)
2677 2004-12-21 Maciej Stachowiak <mjs@apple.com>
2681 <rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain
2683 * khtml/ecma/kjs_window.cpp:
2684 (Window::get): Change most window functions to be restricted by
2687 2004-12-21 Ken Kocienda <kocienda@apple.com>
2693 <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document
2695 * khtml/editing/htmlediting.cpp:
2696 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
2697 formerly undetected and unhandled. This is the crux of the bug fix.
2698 (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
2699 execution of command.
2700 * khtml/editing/htmlediting.h: Declare new function.
2701 * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added.
2702 * layout-tests/editing/deleting/delete-3928305-fix.html: Added.
2704 2004-12-21 Ken Kocienda <kocienda@apple.com>
2708 * khtml/editing/htmlediting.cpp:
2709 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
2710 checking in (aka must return false from function returning bool).
2712 2004-12-21 Ken Kocienda <kocienda@apple.com>
2718 <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*)
2720 * khtml/editing/htmlediting.cpp:
2721 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks.
2722 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto.
2724 2004-12-21 Ken Kocienda <kocienda@apple.com>
2728 * khtml/editing/htmlediting.cpp:
2729 (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on
2730 further experiements.
2731 (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to
2732 be done if the insertion point is in an empty block.
2733 * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added.
2734 * layout-tests/editing/pasteboard/paste-text-012.html: Added.
2735 * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added.
2736 * layout-tests/editing/pasteboard/paste-text-013.html: Added.
2737 * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added.
2738 * layout-tests/editing/pasteboard/paste-text-014.html: Added.
2740 2004-12-21 Darin Adler <darin@apple.com>
2744 - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages)
2746 * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also
2747 add a field to track it. Must make a few things mutable so we can update them in the range accessor.
2748 * khtml/editing/visible_text.cpp:
2749 (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets
2750 using the node's index. We only compute the node index if actually asked for the range.
2751 (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting
2753 (khtml::TextIterator::handleTextBox): Ditto.
2754 (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling
2756 (khtml::TextIterator::handleNonTextNode): Pass 0 for offset.
2757 (khtml::TextIterator::exitNode): More of the same.
2758 (khtml::TextIterator::emitCharacter): Ditto.
2759 (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then
2760 add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search.
2764 * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on.
2768 2004-12-20 Ken Kocienda <kocienda@apple.com>
2772 * khtml/editing/htmlediting.cpp:
2773 (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test
2774 regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
2775 Rolling out until I can develop a real fix.
2777 2004-12-20 David Harrison <harrison@apple.com>
2779 Reviewed by Dave Hyatt.
2781 Initial checkin of AXTextMarkerRef support.
2783 * khtml/xml/dom_docimpl.cpp:
2784 (DocumentImpl::updateSelection):
2785 (DocumentImpl::setFocusNode):
2786 * kwq/KWQAccObject.h:
2787 * kwq/KWQAccObject.mm:
2788 (-[KWQAccObject detach]):
2789 (-[KWQAccObject anchorElement]):
2790 (-[KWQAccObject addChildrenToArray:]):
2791 (-[KWQAccObject accessibilityAttributeNames]):
2792 (-[KWQAccObject accessibilityActionDescription:]):
2793 (-[KWQAccObject accessibilityPerformAction:]):
2794 (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]):
2795 (-[KWQAccObject textMarkerForVisiblePosition:]):
2796 (-[KWQAccObject visiblePositionForTextMarker:]):
2797 (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]):
2798 (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]):
2799 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
2800 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
2801 (-[KWQAccObject accessibilityAttributeValue:]):
2802 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2803 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
2804 (-[KWQAccObject getSelectedTextMarkerRange]):
2805 (-[KWQAccObject doAXLineForTextMarker:]):
2806 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2807 (-[KWQAccObject doAXStringForTextMarkerRange:]):
2808 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
2809 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
2810 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
2811 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
2812 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
2813 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2814 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2815 (-[KWQAccObject accessibilityFocusedUIElement]):
2816 (-[KWQAccObject clearChildren]):
2817 (-[KWQAccObject accObjectID]):
2818 (-[KWQAccObject setAccObjectID:]):
2819 (-[KWQAccObject removeAccObjectID]):
2820 * kwq/KWQAccObjectCache.h:
2821 * kwq/KWQAccObjectCache.mm:
2822 (KWQAccObjectCache::KWQAccObjectCache):
2823 (KWQAccObjectCache::~KWQAccObjectCache):
2824 (KWQAccObjectCache::getAccObjectID):
2825 (KWQAccObjectCache::removeAccObjectID):
2826 (KWQAccObjectCache::textMarkerForVisiblePosition):
2827 (KWQAccObjectCache::visiblePositionForTextMarker):
2829 2004-12-19 Darin Adler <darin@apple.com>
2831 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.
2833 2004-12-19 Darin Adler <darin@apple.com>
2837 - a garbage collection fix
2839 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER
2840 #ifndef to use #if (in practice, either is OK).
2841 * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease.
2843 2004-12-17 David Hyatt <hyatt@apple.com>
2845 Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.
2847 Reviewed by kocienda
2849 * khtml/rendering/render_box.cpp:
2850 (RenderBox::calcPercentageHeight):
2851 * khtml/rendering/render_table.cpp:
2852 (RenderTableSection::layoutRows):
2854 2004-12-17 David Harrison <harrison@apple.com>
2856 Reviewed by Ken Kocienda.
2858 <rdar://problem/3924930> REGRESSION: triple click does not select to end of line
2860 * khtml/editing/visible_units.cpp:
2861 (khtml::endOfParagraph):
2862 When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.
2864 2004-12-17 Ken Kocienda <kocienda@apple.com>
2868 * khtml/editing/htmlediting.cpp:
2869 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
2870 codes when I added the createBreakElement() function.
2872 2004-12-17 Richard Williamson <rjw@apple.com>
2874 Set the floor of max cacheable object size to 40K. This restores
2875 the long standing floor. Lower floor deleteriously impacts the PLT.
2878 * khtml/khtml_part.cpp:
2879 (KHTMLPart::checkCompleted):
2880 * khtml/misc/loader.cpp:
2883 2004-12-17 Ken Kocienda <kocienda@apple.com>
2889 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
2891 * khtml/editing/htmlediting.cpp:
2892 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit.
2893 Formerly checked only for block boundary.
2895 2004-12-17 David Harrison <harrison@apple.com>
2899 Add KWQCFAutorelease for autoreleasing CF objects.
2900 * kwq/KWQFoundationExtras.h:
2904 2004-12-17 David Harrison <harrison@apple.com>
2908 Fix GC compatibility in getNSString.
2911 (QString::getNSString):
2912 Use NSString allocator instead of CFString, so that autorelease works under GC.
2914 2004-12-17 Ken Kocienda <kocienda@apple.com>
2920 <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text
2922 * khtml/editing/htmlediting.cpp:
2923 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not
2924 move it after the <body> element.
2926 2004-12-17 Ken Kocienda <kocienda@apple.com>
2930 Added new layout tests covering cases from recent bug fixes.
2932 * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
2933 * layout-tests/editing/inserting/insert-div-018.html: Added.
2934 * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
2935 * layout-tests/editing/inserting/insert-div-019.html: Added.
2936 * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
2937 * layout-tests/editing/inserting/insert-div-020.html: Added.
2938 * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
2939 * layout-tests/editing/inserting/insert-div-021.html: Added.
2941 2004-12-17 Ken Kocienda <kocienda@apple.com>
2945 Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin.
2947 * layout-tests/editing/inserting/insert-div-013-expected.txt
2948 * layout-tests/editing/inserting/insert-div-014-expected.txt
2950 2004-12-17 Ken Kocienda <kocienda@apple.com>
2956 <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote
2958 * khtml/editing/htmlediting.cpp:
2959 (khtml::InsertParagraphSeparatorCommand::doApply):
2960 * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting
2961 block as the reference node for the insertion of the new block.
2962 (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true.
2963 I worked this all out on the whiteboard this time. This should be the last tweak.
2965 2004-12-17 Kevin Decker <kdecker@apple.com>
2969 Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs
2971 * khtml/xml/xml_tokenizer.cpp:
2972 (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla.
2974 2004-12-16 Ken Kocienda <kocienda@apple.com>
2980 <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline
2982 * khtml/editing/htmlediting.cpp:
2983 (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that
2984 it checks the downstream node for the starting position.
2986 2004-12-16 Ken Kocienda <kocienda@apple.com>
2990 Added new createBreakElement() function that makes creating a <br> element a one-liner.
2991 Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode,
2992 over to this new helper.
2994 * khtml/editing/htmlediting.cpp:
2995 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function.
2996 (khtml::InsertLineBreakCommand::doApply): Ditto.
2997 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
2998 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
2999 (khtml::ReplaceSelectionCommand::doApply): Ditto.
3000 (khtml::createBreakElement): New helper.
3001 * khtml/editing/htmlediting.h: Ditto.
3003 2004-12-16 David Hyatt <hyatt@apple.com>
3005 Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was
3006 vertical-align top or bottom. The bug is 3771007, bankofamerica's ebills page.
3008 Reviewed by kocienda
3010 * khtml/rendering/render_object.cpp:
3011 (RenderObject::getVerticalPosition):
3013 2004-12-16 Ken Kocienda <kocienda@apple.com>
3019 <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline
3020 <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
3022 * khtml/editing/htmlediting.cpp:
3023 (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will
3024 make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after
3025 a check which may move the node used as the reference node for the insertion. Also change this code to
3026 insert the <p> after the last sibling of the starting position, to move it past the nodes we're going
3027 to want to shift into the new <p>.
3029 2004-12-16 Darin Adler <darin@apple.com>
3033 - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em
3034 after talking this over with Dave and Ken
3036 * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement.
3037 * khtml/editing/htmlediting.cpp:
3038 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement
3039 helper so this can share code with the plain-text conversion code.
3040 (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement
3041 helper so this can share code with the plain-text conversion code.
3042 (khtml::createDefaultParagraphElement): Added.
3043 (khtml::createBlockPlaceholderElement): Added.
3045 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than
3046 <br> elements for pasting plain text.
3048 - regenerated these files with the newer gperf
3050 * khtml/css/cssproperties.c: Regenerated.
3051 * khtml/css/cssvalues.c: Regenerated.
3052 * khtml/misc/htmlattrs.c: Regenerated.
3053 * khtml/misc/htmltags.c: Regenerated.
3055 2004-12-16 Ken Kocienda <kocienda@apple.com>
3061 <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element
3063 * khtml/xml/dom_nodeimpl.cpp:
3064 (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for
3065 parent that is not an inline would skip past previous siblings of nodes which were blocks. Now
3066 it stops looking in this situation. This problem eventually caused the delete code to try to
3067 merge a node under a descendent.
3069 2004-12-16 Adele Amchan <adele@apple.com>
3071 Change by Richard, reviewed by me.
3073 Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load
3075 * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading.
3077 2004-12-16 Adele Amchan <adele@apple.com>
3081 Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk
3083 Added a call to ObjectImp::get before Window::get just returns Undefined.
3084 This was preventing us from getting the toString function from a Window object.
3086 * khtml/ecma/kjs_window.cpp: (Window::get):
3088 2004-12-16 Ken Kocienda <kocienda@apple.com>
3094 <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place
3096 * khtml/editing/htmlediting.cpp:
3097 (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
3098 to do a better job than it was doing before. Added several test cases to prove I am on a
3100 * khtml/editing/visible_position.cpp:
3101 (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
3102 leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
3103 This function was returning true for the first position in "bar". Wrong. Also tightened up other
3104 rule: Should not report true when relationship between blocks cannot be determined.
3105 (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
3106 when relationship between blocks cannot be determined.
3107 * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
3108 * layout-tests/editing/inserting/insert-div-010.html: Added.
3109 * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
3110 * layout-tests/editing/inserting/insert-div-011.html: Added.
3111 * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
3112 * layout-tests/editing/inserting/insert-div-012.html: Added.
3113 * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
3114 * layout-tests/editing/inserting/insert-div-013.html: Added.
3115 * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
3116 * layout-tests/editing/inserting/insert-div-014.html: Added.
3117 * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
3118 * layout-tests/editing/inserting/insert-div-015.html: Added.
3119 * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
3120 * layout-tests/editing/inserting/insert-div-016.html: Added.
3121 * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
3122 * layout-tests/editing/inserting/insert-div-017.html: Added.
3124 2004-12-16 Ken Kocienda <kocienda@apple.com>
3128 Added a layout test based on my last checkin.
3130 * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
3131 * layout-tests/editing/selection/move-by-word-001.html: Added.
3133 2004-12-16 Ken Kocienda <kocienda@apple.com>
3139 <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps
3141 * khtml/editing/visible_text.cpp:
3142 (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating
3143 backwards into a different block that is an descendent of the block containing the text node (as in leaving
3144 the "bar" node in this example: <p>foo</p>bar).
3145 (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper.
3146 (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since
3147 it is called from there, and now also from advance().
3149 2004-12-15 Darin Adler <darin@apple.com>
3153 - fixed problem where plain-text would put a blank line between each <p> even when they have no margins
3155 * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the
3156 "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node
3157 type altogether and use the render tree instead.
3159 2004-12-14 John Sullivan <sullivan@apple.com>
3163 - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo"
3164 in the menu, no specific action names
3166 * khtml/editing/edit_actions.h: new header, contains EditAction enum
3167 (renamed from HTMLEditAction, formerly in htmlediting.h)
3169 * ForwardingHeaders/editing/edit_actions.h: new forwarding header
3171 * khtml/editing/htmlediting.h:
3172 removed HTMLEditAction enum in favor of including edit_actions.h; added khtml::
3173 namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand
3175 * khtml/editing/htmlediting.cpp:
3176 (khtml::EditCommandPtr::editingAction):
3177 update for enum name change
3178 (khtml::EditCommand::editingAction):
3180 (khtml::ApplyStyleCommand::ApplyStyleCommand):
3181 added editingAction parameter to this constructor
3182 (khtml::ApplyStyleCommand::editingAction):
3184 (khtml::DeleteSelectionCommand::editingAction):
3185 update for enum name change
3186 (khtml::MoveSelectionCommand::editingAction):
3188 (khtml::TypingCommand::editingAction):
3190 (khtml::ReplaceSelectionCommand::editingAction):
3193 * khtml/khtml_part.h:
3194 added EditAction parameter to applyStyle and computeAndSetTypingStyle
3195 * khtml/khtml_part.cpp:
3196 (KHTMLPart::computeAndSetTypingStyle):
3197 added EditAction parameter
3198 (KHTMLPart::applyStyle):
3201 * kwq/KWQKHTMLPart.mm:
3202 (KWQKHTMLPart::registerCommandForUndoOrRedo):
3203 do the cast from EditAction to WebUndoAction a different way to match other code
3205 * kwq/WebCoreBridge.h:
3206 * kwq/WebCoreBridge.mm:
3207 (-[WebCoreBridge setTypingStyle:withUndoAction:]):
3208 added WebUndoAction parameter, passed into ApplyStyleCommand constructor
3209 (-[WebCoreBridge applyStyle:withUndoAction:]):
3212 * WebCore.pbproj/project.pbxproj:
3213 updated for new files
3215 2004-12-14 David Hyatt <hyatt@apple.com>
3217 Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them. Remove
3218 the ridiculous 1024 limit on the span values.
3220 * khtml/html/html_tableimpl.cpp:
3221 (HTMLTableCellElementImpl::parseHTMLAttribute):
3222 * khtml/rendering/render_table.cpp:
3223 (RenderTableCell::collapsedBottomBorder):
3224 * khtml/rendering/render_table.h:
3225 (khtml::RenderTableCell::colSpan):
3226 (khtml::RenderTableCell::setColSpan):
3227 (khtml::RenderTableCell::rowSpan):
3228 (khtml::RenderTableCell::setRowSpan):
3229 (khtml::RenderTableCol::span):
3230 (khtml::RenderTableCol::setSpan):
3232 2004-12-14 David Hyatt <hyatt@apple.com>
3234 Make sure <col> and <colgroup> can have spans updated dynamically as well.
3238 * khtml/html/html_tableimpl.cpp:
3239 (HTMLTableColElementImpl::parseHTMLAttribute):
3240 * khtml/rendering/render_table.cpp:
3241 (RenderTableCell::updateFromElement):
3242 (RenderTableCol::updateFromElement):
3244 2004-12-14 David Hyatt <hyatt@apple.com>
3246 Fix for 3833123, setting a cell's colspan does not update rendering like it should.
3250 * khtml/html/html_tableimpl.cpp:
3251 (HTMLTableCellElementImpl::parseHTMLAttribute):
3252 * khtml/rendering/render_table.cpp:
3253 (RenderTableCell::RenderTableCell):
3254 (RenderTableCell::updateFromElement):
3256 2004-12-14 Chris Blumenberg <cblu@apple.com>
3258 Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
3262 * khtml/editing/markup.cpp:
3263 (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it
3265 2004-12-14 David Hyatt <hyatt@apple.com>
3267 Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position.
3268 This is actually a regression from my positioned object DHTML optimization.
3270 Reviewed by kocienda
3272 * khtml/rendering/render_object.cpp:
3273 (RenderObject::setStyle):
3275 2004-12-14 David Hyatt <hyatt@apple.com>
3277 Make sure the class attribute works when newlines are present in the attribute.
3279 Reviewed by kocienda
3281 * khtml/html/html_elementimpl.cpp:
3282 (HTMLNamedAttrMapImpl::parseClassAttribute):
3284 2004-12-14 David Hyatt <hyatt@apple.com>
3286 Fix for 3724938, float element is duplicated and paints twice. The logic for when to paint floats was
3287 actually fairly screwed up. This patch simplifies the logic and makes addOverhangingFloats easier to
3288 read by splitting it into two separate functions.
3290 Reviewed by kocienda
3292 * khtml/rendering/render_block.cpp:
3293 (khtml::RenderBlock::layoutBlockChildren):
3294 (khtml::RenderBlock::clearFloats):
3295 (khtml::RenderBlock::addOverhangingFloats):
3296 (khtml::RenderBlock::addIntrudingFloats):
3297 * khtml/rendering/render_block.h:
3299 2004-12-14 John Sullivan <sullivan@apple.com>
3303 - added Undo action names for Cut, Paste, and Drag
3305 * khtml/editing/htmlediting.h:
3306 * khtml/editing/htmlediting.cpp:
3307 (khtml::DeleteSelectionCommand::editingAction):
3308 overridden to return HTMLEditActionCut
3309 (khtml::MoveSelectionCommand::editingAction):
3310 overridden to return HTMLEditActionDrag
3311 (khtml::ReplaceSelectionCommand::editingAction):
3312 overridden to return HTMLEditActionPaste
3314 2004-12-14 John Sullivan <sullivan@apple.com>
3318 - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
3319 no specific action names
3321 The remaining step is to make each EditCommand subclass override editingAction() to return an
3322 appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
3323 is not completely straightforward, so this next step isn't trivial.)