1 2005-02-21 Darin Adler <darin@apple.com>
3 - fixed Panther deployment build
5 * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Put more stuff inside #if.
7 2005-02-21 David Harrison <harrison@apple.com>
11 <rdar://problem/3943090> REGRESSION (Mail): Spelling underline incompletely erased following certain steps
13 * khtml/rendering/render_text.cpp:
14 (InlineTextBox::paintMarker):
15 Make sure underline is placed within the text bounds.
19 (QPainter::misspellingLineThickness):
20 * kwq/WebCoreTextRenderer.h:
21 Add misspellingLineThickness for use by InlineTextBox::paintMarker.
23 2005-02-21 Darin Adler <darin@apple.com>
27 - fixed <rdar://problem/4012978> -[DOMRange markupString] crashes when range contains only a text node with a single space
29 * khtml/editing/markup.cpp: (khtml::createMarkup): Added updateLayout calls, and added a missing
32 2005-02-21 Darin Adler <darin@apple.com>
36 - fixed <rdar://problem/4005435> Safari hung while pasting text into a <textarea> (Panther-only)
38 * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Don't setAutohidesScrollers:YES on Panther.
40 2005-02-21 Ken Kocienda <kocienda@apple.com>
46 <rdar://problem/4015499> REGRESSION (186-187): pasted quoted text starting with a blank line increases quote level of pasted text when pasted
48 * khtml/editing/markup.cpp:
49 (khtml::markup): Changed over to ASSERT instead of assert.
50 (khtml::createMarkup): The issue was that the code to add parents all the way back to the common ancestor
51 block did not check for blocks whose markup had already been added, and could result in adding markup for
52 nodes twice (hence the additional and erroneous quote level). Now there is a new check that will
53 only add markup for those nodes before the start of the selection range. This fixes the bug.
54 (khtml::createFragmentFromMarkup): Changed over to ASSERT instead of assert.
55 (khtml::createFragmentFromText): Ditto.
57 2005-02-21 Ken Kocienda <kocienda@apple.com>
63 <rdar://problem/4015494> REGRESSION (186-187) <cr> removed if quoted word is copy/pasted on line immediately above quoted text
65 * khtml/editing/htmlediting.cpp:
66 (khtml::ReplaceSelectionCommand::doApply): Relatively new check designed to remove a <br> element when
67 that element was on a line by itself did not do an adequate check for this condition, causing the
68 failure described in the bug. Fixed.
70 2005-02-19 Ken Kocienda <kocienda@apple.com>
74 * khtml/editing/htmlediting.cpp:
75 (khtml::matchNearestBlockquoteColorString): New function which abstracts away the CSS property we use
76 for this pseudo-color.
77 (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Set the new nearestBlockquoteColorString
78 psuedo-color here, rather than removing colors as was done before.
79 (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): Check for the pseudo-color in the desired
80 style, and determine the real color based on the nearest blockquote (or none) to the node.
81 (khtml::nearestMailBlockquote): Name change from closestMailBlockquote to match new property better.
83 All the rest of this change is the mechanical coding you need to do to add a new CSS property, in this
84 case, -khtml-match-nearest-mail-blockquote-color.
86 * khtml/css/css_computedstyle.cpp:
87 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue)
88 * khtml/css/cssparser.cpp:
89 (CSSParser::parseValue):
90 * khtml/css/cssproperties.c:
93 * khtml/css/cssproperties.h:
94 * khtml/css/cssproperties.in:
95 * khtml/css/cssstyleselector.cpp:
96 (khtml::CSSStyleSelector::applyProperty)
97 * khtml/css/cssvalues.c:
99 * khtml/css/cssvalues.h:
100 * khtml/css/cssvalues.in:
101 * khtml/rendering/render_style.h:
102 (khtml::RenderStyle::matchNearestMailBlockquoteColor)
103 (khtml::RenderStyle::setMatchNearestMailBlockquoteColor)
104 (khtml::RenderStyle::initialMatchNearestMailBlockquoteColor)
106 2005-02-19 Ken Kocienda <kocienda@apple.com>
112 <rdar://problem/4014228> REGRESSION (186-187) extra, uneditable lines inserted above and below a line of pasted quoted text
113 <rdar://problem/4014393> REGRESSION (186-187) pasted quoted text gets extra <cr>s when pasted at top of document
115 * khtml/editing/htmlediting.cpp:
116 (khtml::ReplacementFragment::ReplacementFragment): Part of a general refactoring of how
117 the fragment is inserted into the document, rendered, and then tested for certain
118 important pieces of information that are required for pasting.
119 (khtml::ReplacementFragment::insertFragmentForTestRendering): New helper. Handles inserting
120 the fragment nodes into the document.
121 (khtml::ReplacementFragment::restoreTestRenderingNodesToFragment): Removes nodes from the
122 document, and restores them to the fragment.
123 (khtml::ReplacementFragment::computeStylesUsingTestRendering): Factored out code that
124 did this before into its own function.
125 (khtml::ReplacementFragment::removeUnrenderedNodesUsingTestRendering): Ditto.
126 (khtml::ReplacementFragment::countRenderedBlocks): This is a real improvement, as it
127 eliminates a major use of the isProbablyBlock() function. Now, the blocks that are
128 counted are real, rendered blocks.
129 (khtml::ReplacementFragment::removeStyleNodes): Made this function retain margin-zeroing
130 CSS properties on paragraphs. This does two things: 1) It helps us to maintain good behavior
131 in the short term while there are still versions of Mail out there that use <p> elements
132 instead of <div> elements for new paragraphs; and 2) It will help to maintain the compatibility
133 with other mail clients that use <p> elements for their paragraphs but render them themselves
134 with no margins as the result of quirks.
135 (khtml::ReplaceSelectionCommand::doApply): Do some work to fix up and improve the handling
136 of blank lines, be they <p> elements or <br> elements, that can be removed after pasting. This,
137 coupled with the refactoring, fixes 4014393.
138 * khtml/editing/htmlediting.h: Updated for new functions.
139 * layout-tests/editing/pasteboard/paste-text-010-expected.txt: Updated results, actually improved with this change.
140 * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Ditto.
142 2005-02-19 Kevin Decker <kdecker@apple.com>
146 Fixed <rdar://problem/4010765> Flash player can be used to arbitrarily open popup windows without user permission
148 Our window.open() policy is to refuse the <script>window.open(...)</script> case and allow the inline the <a href="javascript:window.open('foo')> case. Clever advertisers at some point realized that by executing their Javascript through the Flash plugin, Safari would always treat their code as the inline case, and thus, they were able to work around our popup blocker.
150 * kwq/WebCoreBridge.h:
151 * kwq/WebCoreBridge.mm:
152 (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:]): Changed this to invoke the new stringByEvaluatingJavaScriptFromString:forceUserGesture method below.
153 (-[WebCoreBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Let the WebKit make the determination if this was a user originated gesture or not; we must no longer assume this is always the case.
155 2005-02-18 Chris Blumenberg <cblu@apple.com>
157 Fixed: <rdar://problem/3951196> REGRESSION (Mail): too many levels of reply quotes after certain steps
159 Reviewed by kocienda.
161 * khtml/editing/htmlediting.cpp:
162 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
163 - If we find a new start node, update topBlockquote so we don't use too many block quotes for the contents following the new line.
164 - Build up the list of ancestors after we've determined the actual topBlockquote.
165 - Don't insert an extra new line if there is a new start node.
167 2005-02-19 Chris Blumenberg <cblu@apple.com>
169 Fixed: <rdar://problem/3978461> smart paste is broken
173 * khtml/editing/htmlediting.cpp:
174 (khtml::ReplaceSelectionCommand::doApply): properly check for leading and trailing whitespace. These checks were incorrectly reversed. Also check if we're pasting at the beginning or end of a line. We should not insert spaces in either case.
176 2005-02-18 Adele Amchan <adele@apple.com>
180 Fix for <rdar://problem/3975568> REGRESSION(125-180)Australian Open pages have drawing problem
182 This patch fixes two problems caused by our added support for custom tags. First, the layout problem at the sites mentioned in the bug
183 was caused by custom tags within tables. In checkChild, we needed to treat these tags as spans so they get placed correctly in the DOM tree.
184 Also, we were indexing the tagPriority and endTag arrays with id values from the custom tags that were greater than the size of the array. So now
185 we have functions to check for the custom tags, and again, treat them as spans. To avoid confusion, we changed the names of the arrays to
186 endTagArray and tagPriorityArray.
188 * khtml/html/dtd.h: changed all uses of the endTag array to endTagArray for our new wrapper functions
189 (DOM::tagPriority): added function to check array bounds and to treat custom tags as spans
190 (DOM::endTagRequirement): added function to check array bounds and to treat custom tags as spans
191 * khtml/html/dtd.cpp: changed name of endTag and tagPriority arrays to endTagArray and tagPriorityArray
192 (DOM::checkChild): treat custom tags as spans during this check
193 * khtml/html/html_elementimpl.cpp: changed all uses of the endTag array to the endTagRequirement function
194 (HTMLElementImpl::createContextualFragment):
195 (HTMLElementImpl::setInnerText):
196 (HTMLElementImpl::setOuterText):
197 (HTMLElementImpl::toString):
198 * khtml/html/htmlparser.cpp: changed all uses of the endTag array to the endTagRequirement function and all uses of the tagPriority array to the tagPriority function.
199 (KHTMLParser::parseToken):
200 (KHTMLParser::insertNode):
201 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): changed all uses of the endTag array to the endTagRequirement function
202 * khtml/editing/markup.cpp: changed all uses of the endTag array to the endTagRequirement function
206 2005-02-18 Jens Alfke <jens@apple.com>
210 Fixed build: Whoops, setNeedsLayout's parameter is NOT optional.
212 * khtml/html/html_objectimpl.cpp:
213 (HTMLAppletElementImpl::setAllParamsAvailable):
215 2005-02-18 Jens Alfke <jens@apple.com>
217 Reviewed by cblu, hyatt.
219 Fixes <rdar://problem/3603191> "REGRESSION: Applets not receiving all of the Applet Parameters in Java 1.4.1/1.4.2"
220 Defer instantiation of Java applet plugin until after all of the <applet> tag's nested <param> tags have been parsed, otherwise the list of parameters passed to the applet is incomplete. The regression was introduced (says Dave) when the parser's close-tag notifications were removed in the name of performance.
222 * khtml/html/html_objectimpl.cpp:
223 (HTMLAppletElementImpl::HTMLAppletElementImpl):
224 (HTMLAppletElementImpl::getAppletInstance):
225 (HTMLAppletElementImpl::setAllParamsAvailable):
226 (HTMLAppletElementImpl::allParamsAvailable):
227 * khtml/html/html_objectimpl.h:
228 * khtml/html/htmlparser.cpp:
229 (KHTMLParser::processCloseTag):
230 * khtml/rendering/render_applet.cpp:
231 (RenderApplet::createWidgetIfNecessary):
233 2005-02-18 Richard Williamson <rjw@apple.com>
235 Fixed <rdar://problem/4006161> Tiger8A380: Widgets leak dashboard regions
237 We were leaking the DashboardRegionImpls.
241 * khtml/css/css_valueimpl.cpp:
242 (DOM::CSSPrimitiveValueImpl::cleanup):
244 2005-02-18 Chris Blumenberg <cblu@apple.com>
246 Fixed: <rdar://problem/3945271> REGRESSION (Mail): pasted plain text should pick up typing style instead of being unstyled
248 Reviewed by kocienda.
250 * khtml/editing/htmlediting.cpp:
251 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): don't set class on element returned by createStyleSpanElement since that's already done
252 (khtml::ReplacementFragment::ReplacementFragment): take matchStyle param, don't call computeStylesAndRemoveUnrendered() if !matchStyle
253 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take matchStyle param
254 (khtml::ReplaceSelectionCommand::doApply): if m_matchStyle, use selection.start() as the insertion position and don't call applyStyleToInsertedNodes()
255 * khtml/editing/htmlediting.h:
256 * kwq/WebCoreBridge.h:
257 * kwq/WebCoreBridge.mm:
258 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): take matchStyle param and pass it
259 (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): pass NO for matchStyle
260 (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): pass NO for matchStyle
261 (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): pass YES for matchStyle
263 2005-02-18 Ken Kocienda <kocienda@apple.com>
269 <rdar://problem/4013025> Copy/Paste of quoted word results in removal of any following <cr>
270 <rdar://problem/4013100> Copy/Paste quoted text and then decrease quote level does not change text color
272 For the most part, these bugs were caused by errors and lack of foresight on my part when
273 I added the better paste code. Chalk these fixes up to the result of bake time.
275 * khtml/editing/htmlediting.cpp:
276 (khtml::ReplacementFragment::ReplacementFragment): Need to move count of number of blocks in
277 fragment after the call to remove unrendered nodes. Meant to do this before, but forgot to.
278 (khtml::ReplacementFragment::removeStyleNodes): Need to remove inline styles from elements!
279 Terrible omission now fixed.
280 (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): Remove blockquote colors for now.
281 Code has a more extensive comment in it now to explain the difficulty, and the need for more
283 (khtml::ReplaceSelectionCommand::doApply): Need to call applyStyleToInsertedNodes() in the
284 m_fragment.hasInterchangeNewline() case. This was just missed before.
285 * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Updated results, subtly different, but OK.
286 * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Updated for <p> to <div> change in test content.
287 * layout-tests/editing/pasteboard/paste-text-017.html: Needed to change <p> to <div> to
288 make this test go with the new design of using <div> tags for default paragraphs.
290 2005-02-18 David Hyatt <hyatt@apple.com>
292 Fix for 3974263 (and possibly others). Don't let fixed tables use maxint as their maxwidth when some
293 cells have percentage values.
297 * khtml/misc/arena.cpp:
299 * khtml/rendering/table_layout.cpp:
300 (FixedTableLayout::calcWidthArray):
301 (FixedTableLayout::calcMinMaxWidth):
302 (AutoTableLayout::layout):
304 2005-02-17 Darin Adler <darin@apple.com>
308 - fixed <rdar://problem/3998627> WebKit crashes when deleting text in a modified div
310 * khtml/khtml_part.cpp: (KHTMLPart::selectionComputedStyle): Add a ref and deref to keep
311 the element alive until it's added to the DOM tree.
312 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::styleForSelectionStart): Ditto.
314 2005-02-17 Richard Williamson <rjw@apple.com>
316 Fixed <rdar://problem/3999467> when Osaka-Mono is specified as fixed width font, Osaka used instead
318 Fixed w/o introducing a performance regression. Add early
319 check for Osaka-Mono to avoid expensive call into WebKit.
324 (QFont::isFixedPitch):
326 2005-02-17 Darin Adler <darin@apple.com>
330 - fixed <rdar://problem/4011210> REGRESSION (180-181): Maxlength property for INPUT object not working
332 * kwq/KWQTextField.mm:
333 (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): If controller returns
334 YES, go on to call super, since super does the text formatter handling, which we need.
335 (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
336 (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.
340 2005-02-17 Ken Kocienda <kocienda@apple.com>
346 <rdar://problem/4012058> Copy from quoted text and paste results in blue text
348 The relatively-new paste code tries hard to retain style of the content from the
349 source location. However, in the case of quoted material in mail messages, we do
350 not want to carry the quoting color along. This fixes the problem by factoring
353 * khtml/editing/htmlediting.cpp:
354 (khtml::ReplacementFragment::computeStylesAndRemoveUnrendered): Now calls removeBlockquoteColorsIfNeeded()
356 (khtml::ReplacementFragment::removeBlockquoteColorsIfNeeded): New function. Factors out colors that are
357 the result of text being quoted.
358 (khtml::isNodeRendered): Function moved in file. No other change.
359 (khtml::isProbablyBlock): Function moved in file. No other change.
360 (khtml::closestMailBlockquote): New function. Helps fix bug.
361 (khtml::isMailBlockquote): Function moved to be free-floating instead of being a
362 member of CompositeEditCommand. No other change.
363 * khtml/editing/htmlediting.h: Moved around some functions. Added removeBlockquoteColorsIfNeeded().
364 * khtml/editing/markup.cpp: Remove redundant static implementation of isMailBlockquote.
366 2005-02-17 Richard Williamson <rjw@apple.com>
368 Fixed <rdar://problem/4008163> dynamic support for -apple-dashboard-region is flakey
370 Style operator== wasn't including regions.
374 * khtml/rendering/render_style.cpp:
375 (StyleCSS3NonInheritedData::operator==):
377 2005-02-17 Adele Amchan <adele@apple.com>
381 fix for <rdar://problem/4010028> 8A383: Safari v185 crash loading united.com multi city fare finder page.
383 * khtml/dom/dom_string.cpp: (DOM::DOMString::operator += ): prevent nil dereference when DOMString being added is nil
385 2005-02-17 Jens Alfke <jens@apple.com>
389 Fix for rdar://3963151 "Mail only pasted ~950 of 1407 text lines into my message!"
390 Force tokenizer to run synchronously while parsing document fragments, so it doesn't stop halfway through and cause truncated content.
392 * khtml/html/html_elementimpl.cpp:
393 (HTMLElementImpl::createContextualFragment):
394 * khtml/html/htmltokenizer.cpp:
395 (khtml::HTMLTokenizer::reset):
396 (khtml::HTMLTokenizer::begin):
397 (khtml::HTMLTokenizer::setForceSynchronous):
398 (khtml::HTMLTokenizer::continueProcessing):
399 * khtml/html/htmltokenizer.h:
401 2005-02-17 Ken Kocienda <kocienda@apple.com>
407 <rdar://problem/3982183> Mail's HTML paragraphs appear with unintended margins in Entourage and Eudora
409 * khtml/editing/htmlediting.cpp:
410 (khtml::createDefaultParagraphElement): Change element we make from <p> to <div>.
411 This fixes the problem, as these other mailers show <div> elements without margins.
413 Some test files needed to change to preserve the ability to "eyeball" the results.
414 Many others changed just because their <p> elements changed to <div> elements.
416 * layout-tests/editing/deleting/delete-3928305-fix-expected.txt
417 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt
418 * layout-tests/editing/inserting/insert-div-013-expected.txt
419 * layout-tests/editing/inserting/insert-div-013.html
420 * layout-tests/editing/inserting/insert-div-014-expected.txt
421 * layout-tests/editing/inserting/insert-div-014.html
422 * layout-tests/editing/inserting/insert-div-018-expected.txt
423 * layout-tests/editing/inserting/insert-div-018.html
424 * layout-tests/editing/inserting/insert-div-019-expected.txt
425 * layout-tests/editing/inserting/insert-div-019.html
426 * layout-tests/editing/inserting/insert-div-020-expected.txt
427 * layout-tests/editing/inserting/insert-div-020.html
428 * layout-tests/editing/inserting/insert-div-021-expected.txt
429 * layout-tests/editing/inserting/insert-div-021.html
430 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt
431 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt
432 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt
433 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt
435 2005-02-17 Ken Kocienda <kocienda@apple.com>
441 <rdar://problem/3996737> REGRESSION (Mail): Copy/paste in Mail inserts returns
443 The root cause of the problem is that a couple of pieces of code in AppKit and Mail
444 insert newlines into markup as it is generated, and the paste code in WebCore was
445 not smart about nodes that do not render (as is the case with these added newlines).
446 So, the solution is to remove these unrendered nodes in the paste code in a pre-pass.
447 Fortunately, my recent addition of such a pass to the paste code to handle styles
448 gave me a convenient place to put this new logic.
450 * khtml/editing/htmlediting.cpp:
451 (khtml::ReplacementFragment::ReplacementFragment): Use new name for function below.
452 (khtml::ReplacementFragment::computeStylesAndRemoveUnrendered): Name change from computeStylesForNodes().
453 Now does the additional work of removing unrendered nodes, as mentioned above.
454 (khtml::isNodeRendered): New helper function.
455 * khtml/editing/htmlediting.h: Updated as necessary.
457 2005-02-17 Ken Kocienda <kocienda@apple.com>
463 <rdar://problem/3998892> REGRESSION (Mail): bolding a selection from end of line changes unselected text on starting line.
465 The styling code did not move to the next node when the starting position was
466 at the last offset of a node. Instead, it styled it. Clearly wrong. Solution
467 is to borrow a check from the delete algorithm. Though I call caretMaxOffset(),
468 which I consider deprecated, it is still the simplest and most strightforward
469 way to ask the right question for this kind of problem.
471 * khtml/editing/htmlediting.cpp:
472 (khtml::ApplyStyleCommand::applyInlineStyle): Fixed, as described above.
473 * layout-tests/editing/style/style-3998892-fix-expected.txt: Added.
474 * layout-tests/editing/style/style-3998892-fix.html: Added.
476 2005-02-16 Chris Blumenberg <cblu@apple.com>
478 Fixed: <rdar://problem/3954842> Forward/reply to an HTML email can result in nothing (in cases with <link> tags for CSS)
482 * khtml/xml/dom_nodeimpl.cpp:
483 (NodeBaseImpl::addChild): don't call insertedIntoDocument on the added child if "this" itself is not in the document.
485 2005-02-16 John Sullivan <sullivan@apple.com>
487 Written by Darin, reviewed by Maciej and me
489 - change required to make previous checkin work with English language RSS pages
492 new private method isHierarchical
495 add hierarchical base URL check when determining whether the URL is absolute
496 (KURL::isHierarchical):
497 new method, returns true if this is a valid URL with a slash just past the scheme's trailing colon
499 2005-02-16 John Sullivan <sullivan@apple.com>
501 Written by Darin, reviewed by me.
503 - WebCore part of fix for <rdar://problem/4007384>
504 FILTER: Bookmark of RSS with Japanese search word & multiple RSS pages loses filter
507 (-[DOMElement _getURLAttribute:]):
508 new SPI method, uses parseURL and completeURL to get valid URL from attribute value
511 declare new SPI method
513 2005-02-15 Maciej Stachowiak <mjs@apple.com>
517 <rdar://problem/3942428> reproducible crash loading cbs.sportsline.com
519 This change reverts the fix for <rdar://problem/3805311>, and
520 re-fixes it in a different (better) way. Instead of preventing
521 programmatic open from setting the parsing flag, instead make sure
522 that programmatic close resets it.
524 * khtml/khtml_part.cpp:
525 (KHTMLPart::openURL):
526 (KHTMLPart::didExplicitOpen):
527 (KHTMLPart::closeURL):
530 (KHTMLPart::endIfNotLoading):
531 (KHTMLPart::slotFinishedParsing):
532 (KHTMLPart::checkEmitLoadEvent):
533 * khtml/khtml_part.h:
534 * khtml/khtmlpart_p.h:
535 (KHTMLPartPrivate::KHTMLPartPrivate):
536 * khtml/xml/dom_docimpl.cpp:
537 (DocumentImpl::open):
538 (DocumentImpl::implicitOpen):
539 (DocumentImpl::close):
540 (DocumentImpl::implicitClose):
541 * khtml/xml/dom_docimpl.h:
543 2005-02-15 David Harrison <harrison@apple.com>
547 <rdar://problem/3933665> smart delete seems to delete too much after expanding selection with arrow keys
549 Fixed by updating the selection granularity. Only byWord granularity enables smart delete, but in this
550 case the granularity changed from byWord to byCharacter.
552 * khtml/khtml_part.cpp:
553 (KHTMLPart::setSelectionGranularity):
554 * khtml/khtml_part.h:
555 * kwq/WebCoreBridge.mm:
556 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
557 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
558 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
560 2005-02-15 David Harrison <harrison@apple.com>
564 (continued) <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
566 This was supposed have been committed yesterday with the other part of the fix, but was not.
568 * khtml/editing/visible_units.cpp:
571 2005-02-15 Ken Kocienda <kocienda@apple.com>
577 <rdar://problem/3951178> REGRESSION (Mail): blank line lost after pasting as quotation
579 Problem was that the blank line after the selection was getting deleted incorrectly since the
580 paste code thought this was an unneeded placeholder rather than a placeholder outside of the
583 * khtml/editing/htmlediting.cpp:
584 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now calls findBlockPlaceholder.
585 (khtml::CompositeEditCommand::findBlockPlaceholder): Moved finding code formerly in
586 removeBlockPlaceholderIfNeeded to this new helper.
587 (khtml::ReplaceSelectionCommand::doApply): Do not delete placeholder up front. Call
588 findBlockPlaceholder, and delete it later if needed in the already-existing cleanup step.
589 * khtml/editing/htmlediting.h: Add new function.
593 * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Added.
594 * layout-tests/editing/pasteboard/paste-text-017.html: Added.
596 Result changed for the better.
598 * layout-tests/editing/pasteboard/paste-text-011-expected.txt
600 2005-02-14 David Harrison <harrison@apple.com>
604 <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
608 <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
610 * khtml/editing/visible_text.cpp:
611 (khtml::SimplifiedBackwardsTextIterator::advance):
612 Add BR in for <rdar://problem/3917929> fix only if leaving a visible text node.
614 * khtml/editing/visible_units.cpp:
616 Do not move left over a paragraph boundary.
618 2005-02-14 Darin Adler <darin@apple.com>
622 - fixed <rdar://problem/3686434> Safari uses too much RAM on file upload, leading to malloc errors and crashes (HP printers)
624 * khtml/html/html_formimpl.cpp:
625 (DOM::FormDataList::begin): Updated to use a list of FormDataListItem instead of QCString.
626 (DOM::FormDataList::end): Ditto.
627 (DOM::HTMLFormElementImpl::formData): Same here, and also use appendFile rather than appendData
628 when we encounter a path name rather than data.
629 (DOM::HTMLInputElementImpl::appendFormData): Use appendFile here rather than reading the file
630 in; the reading now happens inside WebKit.
631 (DOM::FormDataList::appendString): Updated for FormDataListItem.
632 (DOM::FormDataList::appendFile): Added.
634 * ForwardingHeaders/kfileitem.h: Emptied out the file; no longer includes KWQKFileItem.h.
635 * ForwardingHeaders/netaccess.h: Emptied out the file; no longer includes KWQKIONetAccess.h.
636 * kwq/KWQKFileItem.h: Removed.
637 * kwq/KWQKFileItem.mm: Removed.
638 * kwq/KWQKIONetAccess.h: Removed.
639 * kwq/KWQKIONetAccess.mm: Removed.
640 * WebCore.pbproj/project.pbxproj: Removed the 4 files above.
642 - small unrelated fix (not reviewed by John)
644 * khtml/ecma/kjs_window.cpp: (Window::isSafeScript): Put some logging code outside if statements so it works all the time.
646 2005-02-14 David Harrison <harrison@apple.com>
650 <rdar://problem/4004305> REGRESSION (Mail): Command-right-arrow on wrapped text goes to end of previous line
652 Fixed nextLinePosition to calculate affinity rather than take it as a parameter. Propagated the parameter change out to related methods.
654 * khtml/editing/htmlediting.cpp:
655 (khtml::DeleteSelectionCommand::initializePositionData):
656 (khtml::InsertLineBreakCommand::doApply):
657 (khtml::InsertParagraphSeparatorCommand::doApply):
658 (khtml::InsertTextCommand::input):
659 (khtml::ReplaceSelectionCommand::doApply):
660 (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes):
661 * khtml/editing/selection.cpp:
662 (khtml::Selection::modifyExtendingRightForward):
663 (khtml::Selection::modifyMovingRightForward):
664 (khtml::Selection::modifyExtendingLeftBackward):
665 (khtml::Selection::modifyMovingLeftBackward):
666 (khtml::Selection::modify):
667 (khtml::Selection::validate):
668 * khtml/editing/visible_position.cpp:
669 (khtml::visiblePositionsOnDifferentLines):
670 * khtml/editing/visible_units.cpp:
671 (khtml::rootBoxForLine):
672 (khtml::startOfLine):
675 (khtml::isStartOfLine):
676 (khtml::isEndOfLine):
677 (khtml::previousLinePosition):
678 (khtml::nextLinePosition):
679 (khtml::previousSentencePosition):
680 (khtml::nextSentencePosition):
681 (khtml::previousParagraphPosition):
682 (khtml::nextParagraphPosition):
683 * khtml/editing/visible_units.h:
684 * khtml/khtml_events.cpp:
685 (khtml::MouseEvent::offset):
686 * khtml/khtml_part.cpp:
687 (KHTMLPart::isPointInsideSelection):
688 (KHTMLPart::selectClosestWordFromMouseEvent):
689 (KHTMLPart::handleMousePressEventTripleClick):
690 (KHTMLPart::handleMousePressEventSingleClick):
691 (KHTMLPart::handleMouseMoveEventSelection):
692 (KHTMLPart::khtmlMouseReleaseEvent):
693 * khtml/rendering/render_block.cpp:
694 (khtml::RenderBlock::positionForCoordinates):
695 * khtml/rendering/render_block.h:
696 * khtml/rendering/render_br.cpp:
697 (RenderBR::positionForCoordinates):
698 * khtml/rendering/render_br.h:
699 * khtml/rendering/render_container.cpp:
700 (RenderContainer::positionForCoordinates):
701 * khtml/rendering/render_container.h:
702 * khtml/rendering/render_inline.cpp:
703 (RenderInline::positionForCoordinates):
704 * khtml/rendering/render_inline.h:
705 * khtml/rendering/render_object.cpp:
706 (RenderObject::caretRect):
707 (RenderObject::positionForCoordinates):
708 * khtml/rendering/render_object.h:
709 * khtml/rendering/render_replaced.cpp:
710 (RenderReplaced::positionForCoordinates):
711 * khtml/rendering/render_replaced.h:
712 * khtml/rendering/render_text.cpp:
713 (RenderText::positionForCoordinates):
714 * khtml/rendering/render_text.h:
715 * khtml/xml/dom_position.cpp:
716 (DOM::Position::previousCharacterPosition):
717 (DOM::Position::nextCharacterPosition):
718 (DOM::Position::leadingWhitespacePosition):
719 (DOM::Position::trailingWhitespacePosition):
720 * khtml/xml/dom_position.h:
721 * kwq/KWQAccObject.mm:
722 (-[KWQAccObject value]):
723 (-[KWQAccObject accessibilityAttributeValue:]):
724 (-[KWQAccObject doAXLineForTextMarker:]):
725 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
726 (-[KWQAccObject doAXTextMarkerForPosition:]):
727 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
728 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
729 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
730 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
731 * kwq/KWQKHTMLPart.mm:
732 * kwq/WebCoreBridge.mm:
733 (-[WebCoreBridge _visiblePositionForPoint:]):
735 05-02-07 Maciej Stachowiak <mjs@apple.com>
737 Reviewed by Ken and John.
739 Re-fixed a specific case of the following:
741 <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
743 Oddly, Cmd-B, Cmd-U, type some text, return, Cmd-U, Cmd-B, type
744 some text, worked fine. But hitting the second Cmd-B before the
745 second Cmd-U still failed to remove underlining. The reason for
746 this is that our code to compute the style of the current position
747 did not work when you had a typing style and were positioned right
748 at a <br> element. For various reasons, this did not show up for
749 bold and italic, since those are handled through the font manager.
751 The following change fixes this - for elements that can't have
752 children, we add the dummy span after the element of interest,
753 rather than as a child of it.
755 * khtml/khtml_part.cpp:
756 (KHTMLPart::selectionComputedStyle):
758 2005-02-11 David Harrison <harrison@apple.com>
762 <rdar://problem/3978980> Double Clicking on a line in Mail selected the entire body
764 * khtml/editing/visible_units.cpp:
765 (khtml::startOfWord):
767 Pay attention to being at the end of a paragraph.
769 (khtml::previousLinePosition):
770 (khtml::nextLinePosition):
771 (khtml::endOfParagraph):
772 Use DOWNSTREAM per recent affinity changes.
774 2005-02-11 Richard Williamson <rjw@apple.com>
776 Fixed <rdar://problem/3985118> DOM objects not being marshaled on JS->native calls
778 Re-factored how 'native' wrappers for JS objects are created. The interpreter now
779 creates these wrappers. The WebCore subclass of the interpreter now overrides
780 createLanguageInstanceForValue() and creates a DOM ObjC wrapper for DOM objects.
782 * WebCore.pbproj/project.pbxproj:
783 * khtml/ecma/kjs_binding.cpp:
784 (ScriptInterpreter::createLanguageInstanceForValue):
785 * khtml/ecma/kjs_binding.h:
786 * kwq/DOMUtility.mm: Added.
787 (KJS::ScriptInterpreter::createObjcInstanceForValue):
788 * kwq/KWQKHTMLPart.mm:
789 (KWQKHTMLPart::getAppletInstanceForView):
790 (getInstanceForView):
791 (KWQKHTMLPart::getEmbedInstanceForView):
792 (KWQKHTMLPart::getObjectInstanceForView):
794 2005-02-11 Chris Blumenberg <cblu@apple.com>
796 Fixed: <rdar://problem/3937352> Quote level not maintained when copied and pasted within a Mail message
798 Reviewed by harrison.
800 * khtml/editing/markup.cpp:
801 (khtml::isMailBlockquote): new
802 (khtml::createMarkup): retain the Mail quote level by including all ancestor mail block quotes
803 * khtml/rendering/render_block.cpp:
804 (khtml::RenderBlock::positionForCoordinates): default to downstream for the affinity since the affinity is only upstream when the cursor is clicked to the right of a wrapped line
805 * khtml/rendering/render_text.cpp:
806 (RenderText::positionForCoordinates): ditto
808 2005-02-11 Adele Amchan <adele@apple.com>
812 fix for <rdar://problem/4004004> no need to add body element for xml documents
814 In the fix for <rdar://problem/3758785> we decided to add a body element when closing a document
815 to ensure that the onload handler would fire. This is unnecessary for xml documents,
816 so now we also check to see if we're dealing with an html document before adding the body element.
818 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close):
820 2005-02-11 Adele Amchan <adele@apple.com>
824 * layout-tests/apple-only/base/www.excite.com/index-expected.txt: updates tests because of custom tag change.
825 * layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
826 * layout-tests/apple-only/base/www.time.com/index-expected.txt:
827 * layout-tests/apple-only/base/www.travelocity.com/index-expected.txt:
828 * layout-tests/apple-only/base/www.zdnet.com/index-expected.txt:
829 * layout-tests/fast/overflow/003-expected.txt:
831 * layout-tests/fast/js/window-object-cross-frame-calls-expected.txt: updated test because of added Body (see rdar://problem/3758785)
835 2005-02-11 Darin Adler <darin@apple.com>
839 - fixed <rdar://problem/3915449> paths are relative to the old src URL after document.open, which is supposed to clear the document, including the URL
841 * khtml/xml/dom_docimpl.h: Added a new openInternal function for use by KHTMLPart.
842 * khtml/xml/dom_docimpl.cpp:
843 (DocumentImpl::open): Changed to do everything we did before, but also clear the URL and set the
844 base URL based on the enclosing document. This is the basic JavaScript/DOM operation of opening a
845 document, which is supposed to clear the document, including the URL. In the long run we might want
846 to do even more document "resetting and clearing" in here, but this URL clearing is what's needed
847 now to fix the most important problem.
848 (DocumentImpl::openInternal): Moved the old open code in here, except for the "parsing" check, which
849 is unnecessary and inappropriate in the one place we call this.
851 * khtml/khtml_part.cpp: (KHTMLPart::begin): Call openInternal instead of open.
853 2005-02-10 Ken Kocienda <kocienda@apple.com>
859 <rdar://problem/3992092> 8A374: Mail crash while pasting - RemoveNodeCommand
861 * khtml/editing/htmlediting.cpp:
862 (khtml::ReplaceSelectionCommand::doApply): Code tried to remove a node that was no longer in
863 the document. We try to do a good job of detecting all these cases, and generally do. This
864 one was missed. Fixed.
866 2005-02-10 Darin Adler <darin@apple.com>
868 Reviewed by Harrison.
870 - added support needed to fix <rdar://problem/3991225> Format->Style->Underline menu item does not get checked when selected text is underlined
872 * kwq/WebCoreBridge.h: Added selectionHasStyle: method.
873 * kwq/WebCoreBridge.mm: (-[WebCoreBridge selectionHasStyle:]): Added. Calls selectionHasStyle on the part.
875 2005-02-10 Darin Adler <darin@apple.com>
877 Reviewed by Harrison.
879 - fixed <rdar://problem/3990484> cursor changes to I-beam when moving over text in widgets, even when selection off via CSS
881 * khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent): Changed code to check canSelect when deciding
882 whether to show an I-beam cursor.
884 * khtml/rendering/render_object.h: Added canSelect.
885 * khtml/rendering/render_object.cpp:
886 (selectStartNode): Added. Helper function with the guts of shouldSelect.
887 (RenderObject::canSelect): Added. Like shouldSelect, but does not call the "start selecting" event handler.
888 (RenderObject::shouldSelect): Refactored to use selectStartNode.
890 * khtml/css/cssvalues.c: Regnerated with newer gperf.
892 2005-02-10 David Hyatt <hyatt@apple.com>
894 Fix for 3867759, .mac regression where scrollers don't show up. Make sure you can set the .width and
895 .height properties on the Image object.
897 Reviewed by John Sullivan
899 * khtml/ecma/kjs_html.cpp:
900 (ImageConstructorImp::construct):
901 (Image::getValueProperty):
904 * khtml/ecma/kjs_html.h:
906 2005-02-10 Ken Kocienda <kocienda@apple.com>
912 <rdar://problem/3965158> Drag-n-drop within a rich text message sometimes changes the color of the dragged text
914 This change fixes the bug....and much more. Now, for the first time, the paste code can do "smart merging"
915 or "smooshing" of styles during its operation. Since this new code is actively, rather than passively
916 working with styles, it fixes the bug, and lays the groundwork for similar work we need to do to
917 preserve quote levels in Mail.
919 * khtml/css/css_valueimpl.cpp:
920 (DOM::CSSMutableStyleDeclarationImpl::clear): New method.
921 (DOM::CSSMutableStyleDeclarationImpl::removeBlockProperties): Ditto.
922 (DOM::CSSMutableStyleDeclarationImpl::removePropertiesInSet): Ditto.
923 (DOM::operator==): Add operator for CSSProperty.
924 * khtml/css/css_valueimpl.h: Declare new functions.
925 * khtml/editing/htmlediting.cpp:
926 (khtml::isEmptyStyleSpan): Improved the test in this function, rolling together the old implementation
927 with some code that did this work inline elsewhere. Sum of the parts is better than either test was by itself.
928 (khtml::isStyleSpan): Check for ID_SPAN.
929 (khtml::ApplyStyleCommand::removeCSSStyle): Call isEmptyStyleSpan. This was the place with an inline implementation before.
930 (khtml::ReplacementFragment::ReplacementFragment): Now takes a DocumentImpl argument. No longer does a "default style"
931 check, but rather calls functions which do a similar check to that, and much more.
932 (khtml::ReplacementFragment::~ReplacementFragment): Deref document, and computed styles.
933 (khtml::ReplacementFragment::styleForNode): New helper. Looks up and returns computed style for a node.
934 (khtml::ReplacementFragment::removeNodePreservingChildren): New helper.
935 (khtml::ReplacementFragment::computeStylesForNodes): New function which computes the "desired" style for
936 every node in the fragment. This information is used later after paste is done as a reference for testing
937 what styles need to be added, and which can be removed as redundant, from all the nodes inserted by the
939 (khtml::ReplacementFragment::removeStyleNodes): Clears out all style nodes from the fragment. They are
940 no longer needed after the call to computeStylesForNodes(),
941 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): Add a document to the call to initialize the
942 command's ReplacementFragment.
943 (khtml::ReplaceSelectionCommand::doApply): Call applyStyleToInsertedNodes() after inserting nodes to make
944 styles come out right.
945 (khtml::ReplaceSelectionCommand::applyStyleToInsertedNodes): This is the "style smooshing" function. It
946 computes the styles that need to be added to each node inserted, comparing the style it gets from just
947 being inserted into its correct destination with the computed "desired style" done in the
948 ReplacementFragment constructor. It then adds in all the necessary styles, and will also remove redundant styles.
949 * khtml/editing/htmlediting.h: Update declarations and member variables as needed.
950 * khtml/editing/markup.cpp:
951 (khtml::startMarkup): Add additional style annotations to the markup we generate, so that paste code can preserve it.
952 (khtml::markup): Ditto.
953 (khtml::createMarkup): Ditto.
955 These test results are subtly better with this change. They no longer have an unneeded empty span.
956 Visually the same as before.
958 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt
959 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt
960 * layout-tests/editing/style/remove-underline-expected.txt
961 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt
965 * layout-tests/editing/style/smoosh-styles-001-expected.txt
966 * layout-tests/editing/style/smoosh-styles-002-expected.txt
967 * layout-tests/editing/style/smoosh-styles-001.html
968 * layout-tests/editing/style/smoosh-styles-002.html
970 2005-02-10 Darin Adler <darin@apple.com>
974 - fixed <rdar://problem/3974988> WebHTMLView drops scroll wheel events when deltas are 0
976 * kwq/WebCoreScrollView.m: (-[WebCoreScrollView autoforwardsScrollWheelEvents]): Added, for Tiger only.
977 For Tiger, removed the override of scrollWheel:, which doesn't work quite right because of how the
978 delta attributes return all 0 for newfangled scrolling events from the new trackpads.
980 2005-02-10 David Harrison <harrison@apple.com>
984 <rdar://problem/3991532> REGRESSION (Mail): Triple-click on trailing blank line should select previous line but doesn't
986 * khtml/css/cssvalues.c:
989 * khtml/editing/selection.cpp:
990 (khtml::Selection::validate):
991 Do moral equiavalent of LeftWordIfOnBoundary for PARAGRAPH.
993 2005-02-10 David Harrison <harrison@apple.com>
997 <rdar://problem/3991848> Double-click on first character selects wrong item
999 * khtml/editing/selection.cpp:
1000 (khtml::Selection::validate):
1001 Honor the fact that clicking on a character positions the cursor on the left side of the character.
1003 2005-02-10 David Hyatt <hyatt@apple.com>
1005 Fix for 3980778, repro crash in RootInlineBox::paint. Make sure that when merging blocks we dirty them for layout
1006 up front. That way as we do the merge, we dont attempt to examine the lines in dirtyLinesForChangedChild.
1010 * khtml/rendering/render_block.cpp:
1011 (khtml::RenderBlock::removeChild):
1013 2005-02-10 David Hyatt <hyatt@apple.com>
1015 Fix for 3987010, fix a bug that caused the self-collapsing-block-cleared-float bit to never get set correctly.
1019 * khtml/rendering/render_block.h:
1020 (khtml::RenderBlock::MarginInfo::setSelfCollapsingBlockClearedFloat):
1022 2005-02-10 David Hyatt <hyatt@apple.com>
1024 Fix for 3992440, text not wrapping correctly on half moon bay web site. Refine an incorrect optimization I
1025 added to be less restrictive.
1029 * khtml/rendering/render_block.cpp:
1030 (khtml::RenderBlock::layoutBlockChildren):
1032 2005-02-08 Maciej Stachowiak <mjs@apple.com>
1036 <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
1038 I fixed this by removing all event listeners for a document, it's
1039 children, and any disconnected nodes that used to be in the
1040 document at document detach time. Mozilla temporarily disables
1041 event listeners on such nodes, but re-enables them if you
1042 re-parant a node into a new document. However, in WebCore, you
1043 can't re-parent a node into another document, so there is no
1044 observable change in behavior.
1046 We have to do this to break the possible reference cycles between
1047 event listeners and the dom nodes they are attached to (e.g. via
1048 scope chain, as in this case).
1050 * khtml/xml/dom_docimpl.cpp:
1051 (DocumentImpl::detach):
1052 (DocumentImpl::removeAllEventListenersFromAllNodesx):
1053 (DocumentImpl::registerDisconnectedNodeWithEventListeners):
1054 (DocumentImpl::unregisterDisconnectedNodeWithEventListeners):
1055 (DocumentImpl::removeAllDisconnectedNodeEventListeners):
1056 * khtml/xml/dom_docimpl.h:
1057 * khtml/xml/dom_nodeimpl.cpp:
1058 (NodeImpl::~NodeImpl):
1059 (NodeImpl::addEventListener):
1060 (NodeImpl::removeEventListener):
1061 (NodeImpl::removeAllEventListeners):
1062 (NodeImpl::removeHTMLEventListener):
1063 (NodeImpl::insertedIntoDocument):
1064 (NodeImpl::removedFromDocument):
1065 * khtml/xml/dom_nodeimpl.h:
1067 2005-02-09 Chris Blumenberg <cblu@apple.com>
1069 Fixed: <rdar://problem/3999213> Sometimes 2 Windows Media Player plugin instances are loaded
1073 * khtml/html/html_objectimpl.cpp:
1074 (HTMLObjectElementImpl::attach): Set needWidgetUpdate to false before calling updateWidget because updateWidget may cause this method or another method (which also calls updateWidget) to be called.
1075 (HTMLObjectElementImpl::recalcStyle): ditto
1077 2005-02-09 David Harrison <harrison@apple.com>
1081 <rdar://problem/3937447> Mail-689: Arrow key navigation in new message body stops working when a line ends with a bold word
1083 Added affinity to VisiblePosition. Changed Selection code to use affinity more.
1085 (Partial) <rdar://problem/3982096> editing/pasteboard/paste-text-007 is failing
1087 Changed ReplaceSelectionCommand to also pay attention to the top children of the incoming fragment, not just the very last node inserted, when deciding whether to insert a paragraph for the Apple interchange newline.
1089 * khtml/ecma/kjs_window.cpp:
1090 (SelectionFunc::tryCall):
1091 * khtml/editing/htmlediting.cpp:
1092 (khtml::EditCommandPtr::setStartingSelection):
1093 (khtml::EditCommandPtr::setEndingSelection):
1094 (khtml::EditCommand::setStartingSelection):
1095 (khtml::EditCommand::setEndingSelection):
1096 (khtml::CompositeEditCommand::deleteInsignificantTextDownstream):
1097 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1098 (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
1099 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
1100 (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1101 (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1102 (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1103 (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1104 (khtml::ApplyStyleCommand::joinChildTextNodes):
1105 (khtml::DeleteSelectionCommand::initializePositionData):
1106 (khtml::DeleteSelectionCommand::handleGeneralDelete):
1107 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
1108 (khtml::DeleteSelectionCommand::doApply):
1109 (khtml::InsertLineBreakCommand::doApply):
1110 (khtml::InsertParagraphSeparatorCommand::doApply):
1111 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1112 (khtml::InsertTextCommand::input):
1113 (khtml::MoveSelectionCommand::doApply):
1114 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
1115 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
1116 (khtml::ReplaceSelectionCommand::doApply):
1117 (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
1118 (khtml::ReplaceSelectionCommand::updateNodesInserted):
1119 (khtml::TypingCommand::deleteKeyPressed):
1120 (khtml::TypingCommand::forwardDeleteKeyPressed):
1121 (khtml::TypingCommand::markMisspellingsAfterTyping):
1122 * khtml/editing/htmlediting.h:
1123 * khtml/editing/selection.cpp:
1124 (khtml::Selection::Selection):
1125 (khtml::Selection::init):
1126 (khtml::Selection::moveTo):
1127 (khtml::Selection::modifyExtendingRightForward):
1128 (khtml::Selection::modifyMovingRightForward):
1129 (khtml::Selection::modifyExtendingLeftBackward):
1130 (khtml::Selection::modifyMovingLeftBackward):
1131 (khtml::Selection::modify):
1132 (khtml::Selection::xPosForVerticalArrowNavigation):
1133 (khtml::Selection::clear):
1134 (khtml::Selection::setBase):
1135 (khtml::Selection::setExtent):
1136 (khtml::Selection::setBaseAndExtent):
1137 (khtml::Selection::layout):
1138 (khtml::Selection::validate):
1139 * khtml/editing/selection.h:
1140 (khtml::Selection::startAffinity):
1141 (khtml::Selection::endAffinity):
1142 (khtml::Selection::baseAffinity):
1143 (khtml::Selection::extentAffinity):
1144 (khtml::operator==):
1145 * khtml/editing/text_affinity.h:
1147 * khtml/editing/visible_position.cpp:
1148 (khtml::VisiblePosition::VisiblePosition):
1149 (khtml::VisiblePosition::init):
1150 (khtml::VisiblePosition::initUpstream):
1151 (khtml::VisiblePosition::initDownstream):
1152 (khtml::VisiblePosition::next):
1153 (khtml::VisiblePosition::previous):
1154 (khtml::startVisiblePosition):
1155 (khtml::endVisiblePosition):
1156 * khtml/editing/visible_position.h:
1157 (khtml::VisiblePosition::):
1158 (khtml::VisiblePosition::VisiblePosition):
1159 (khtml::VisiblePosition::affinity):
1160 (khtml::VisiblePosition::setAffinity):
1161 (khtml::operator==):
1162 * khtml/editing/visible_units.cpp:
1163 (khtml::previousBoundary):
1164 (khtml::nextBoundary):
1165 (khtml::startOfLine):
1167 (khtml::previousLinePosition):
1168 (khtml::nextLinePosition):
1169 (khtml::startOfParagraph):
1170 (khtml::endOfParagraph):
1171 (khtml::previousParagraphPosition):
1172 (khtml::nextParagraphPosition):
1173 (khtml::startOfBlock):
1174 (khtml::endOfBlock):
1175 (khtml::startOfDocument):
1176 (khtml::endOfDocument):
1177 * khtml/editing/visible_units.h:
1178 * khtml/khtml_part.cpp:
1179 (KHTMLPart::findTextNext):
1180 (KHTMLPart::selectClosestWordFromMouseEvent):
1181 (KHTMLPart::handleMousePressEventTripleClick):
1182 (KHTMLPart::handleMousePressEventSingleClick):
1183 (KHTMLPart::handleMouseMoveEventSelection):
1184 (KHTMLPart::khtmlMouseReleaseEvent):
1185 (KHTMLPart::selectAll):
1186 (KHTMLPart::computeAndSetTypingStyle):
1187 (KHTMLPart::selectionComputedStyle):
1188 * khtml/rendering/render_br.cpp:
1189 (RenderBR::positionForCoordinates):
1190 * khtml/xml/dom_docimpl.cpp:
1191 (DocumentImpl::updateSelection):
1192 * khtml/xml/dom_nodeimpl.cpp:
1193 (NodeBaseImpl::setFocus):
1194 * khtml/xml/dom_position.cpp:
1195 (DOM::Position::previousCharacterPosition):
1196 (DOM::Position::nextCharacterPosition):
1197 * khtml/xml/dom_position.h:
1198 * kwq/KWQAccObject.mm:
1199 (-[KWQAccObject value]):
1200 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
1201 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
1202 (-[KWQAccObject accessibilityAttributeValue:]):
1203 (-[KWQAccObject doAXLineForTextMarker:]):
1204 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
1205 (-[KWQAccObject doAXTextMarkerForPosition:]):
1206 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
1207 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1208 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1209 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1210 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1211 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
1212 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
1213 * kwq/KWQAccObjectCache.mm:
1214 (KWQAccObjectCache::textMarkerForVisiblePosition):
1215 (KWQAccObjectCache::visiblePositionForTextMarker):
1216 * kwq/KWQKHTMLPart.mm:
1217 (KWQKHTMLPart::findString):
1218 (KWQKHTMLPart::advanceToNextMisspelling):
1219 (KWQKHTMLPart::styleForSelectionStart):
1220 (KWQKHTMLPart::baseWritingDirectionForSelectionStart):
1221 (KWQKHTMLPart::setSelectionFromNone):
1222 (KWQKHTMLPart::respondToChangedSelection):
1223 * kwq/WebCoreBridge.mm:
1224 (-[WebCoreBridge setSelectedDOMRange:affinity:]):
1225 (-[WebCoreBridge selectionAffinity]):
1226 (-[WebCoreBridge setMarkDOMRange:]):
1227 (-[WebCoreBridge _visiblePositionForPoint:]):
1228 (-[WebCoreBridge moveDragCaretToPoint:]):
1229 (-[WebCoreBridge editableDOMRangeForPoint:]):
1230 (-[WebCoreBridge ensureSelectionVisible]):
1231 (-[WebCoreBridge rangeOfCharactersAroundCaret]):
1233 2005-02-09 Chris Blumenberg <cblu@apple.com>
1235 Fixed: <rdar://problem/3985211> Seed: Mail: Drag-and-drop destination indicator / insertion point disappears
1237 Reviewed by kocienda.
1239 * khtml/rendering/render_block.cpp:
1240 (khtml::RenderBlock::paintCaret): new
1241 (khtml::RenderBlock::paintObject): call paintCaret for the cursor caret and the drag caret
1242 * khtml/rendering/render_block.h:
1246 2005-02-08 Ken Kocienda <kocienda@apple.com>
1252 <rdar://problem/3996344> Entire document content is deleted when only the first paragraph was supposed to be
1254 Problem stems from my attempt to fix this bug: <rdar://problem/3986155> Insertion point goes
1255 to beginning of doc after deleting.
1257 I added an "optimization" that proved to do more harm than good. So, basically, the fix is to remove code.
1259 * khtml/editing/htmlediting.cpp:
1260 (khtml::DeleteSelectionCommand::handleGeneralDelete)
1262 2005-02-07 Darin Adler <darin@apple.com>
1266 - fixed <rdar://problem/3890352> REGRESSION (125-170, Panther-only): pasted textarea contents disappear (exception in NSText)
1268 * kwq/KWQTextArea.mm: (-[KWQTextArea tile]): Don't resize the text view immediately here.
1269 Use performWithDelay to defer it to avoid the re-entrancy that bothers the Panther version
1270 of NSTextView. On Tiger, leave the code alone.
1272 2005-02-07 Adele Amchan <adele@apple.com>
1276 Fix for <rdar://problem/3993628> REGRESSION (180-181): Logitelnet bank's website doesn't work
1278 This fixes an oversight in the fix for <rdar://problem/3964286>.
1279 We're now making sure there is a document before calling checkCompleted in slotLoaderRequestDone.
1280 That function is called even when other parts finish loads of their subresources, so we could end
1281 up calling checkCompleted before we had a document. We also looked over all the other calls to
1282 checkCompleted to convince ourselves no other call sites had a similar issue.
1284 * khtml/khtml_part.cpp: (KHTMLPart::slotLoaderRequestDone): Check if doc is nil before calling
1287 2005-02-07 Ken Kocienda <kocienda@apple.com>
1293 <rdar://problem/3953302> Replacing quoted text ends up with blue-colored text that is not quoted
1295 * khtml/editing/htmlediting.cpp:
1296 (khtml::DeleteSelectionCommand::doApply): Removed special case delete code for select all. It was
1297 causing as many bugs as it fixed. What's more, the design concept is a bit shaky. By removing
1298 this special case, the bug goes away.
1299 * khtml/editing/htmlediting.h: Remove declaration.
1301 Test results using selectAll() updated to reflect changed behavior.
1303 * layout-tests/editing/deleting/delete-3775172-fix-expected.txt:
1304 * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
1305 * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
1306 * layout-tests/editing/inserting/insert-3654864-fix-expected.txt:
1307 * layout-tests/editing/inserting/insert-3775316-fix-expected.txt:
1308 * layout-tests/editing/inserting/insert-3851164-fix-expected.txt:
1309 * layout-tests/editing/inserting/insert-3907422-fix-expected.txt:
1310 * layout-tests/editing/pasteboard/paste-text-015-expected.txt:
1312 2005-02-06 Darin Adler <darin@apple.com>
1316 - fixed <rdar://problem/3994164> setting a new style attribute with setAttribute("style") doesn't blow away the old style
1318 * khtml/css/css_valueimpl.h: Renamed parseProperty to parseDeclaration, since it's used to parse
1319 an entire style declaration, not a single property.
1320 * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::parseDeclaration): Renamed,
1321 and added code to clear m_values.
1322 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Call function by its
1323 new name, and remove some unnecessary comments.
1325 2005-02-06 Darin Adler <darin@apple.com>
1329 - fixed <rdar://problem/3993722> need oncut and onpaste handlers implemented for <textarea> (needed for widgets)
1331 * kwq/KWQTextArea.mm:
1332 (-[KWQTextAreaTextView dispatchHTMLEvent:]): Added.
1333 (-[KWQTextAreaTextView cut:]): Dispatch "before cut" and "cut" events.
1334 (-[KWQTextAreaTextView copy:]): Dispatch "before copy" and "copy" events.
1335 (-[KWQTextAreaTextView paste:]): Dispatch "before paste" and "paste" events.
1336 (-[KWQTextAreaTextView pasteAsPlainText:]): Ditto.
1337 (-[KWQTextAreaTextView pasteAsRichText:]): Ditto.
1339 2005-02-06 Darin Adler <darin@apple.com>
1343 - fixed <rdar://problem/3943038> <input type=search> that is focused in onload handler doesn't have a visible editor
1345 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): Always update layout before giving focus to a widget.
1346 This prevents the bad case where we give a widget focus before it has been positioned or sized, causing us to
1347 exercise edge cases AppKit doesn't handle well.
1349 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Remove workaround code I added
1350 to fix bug 3943049. Updating the layout fixes the same problem in a cleaner, safer way, and solves another problem,
1351 with the way the clip view is set up.
1353 2005-02-06 Darin Adler <darin@apple.com>
1357 - fixed <rdar://problem/3425232> textarea won't trigger onchange action when clicking to new field
1359 * khtml/rendering/render_form.h: Added new m_dirty data member.
1360 * khtml/rendering/render_form.cpp:
1361 (RenderTextArea::RenderTextArea): Initialize m_dirty to false.
1362 (RenderTextArea::detach): Call value() on the DOM element to cause it to fetch the value from this object.
1363 (RenderTextArea::handleFocusOut): Ditto. Also send the onchange event based only on the m_dirty flag.
1364 (RenderTextArea::updateFromElement): Clear the m_dirty flag if the edited value is blown away by a value
1365 that comes from the DOM element. Remove code to clear the element's m_dirtyvalue flag; that's an unnecessary
1366 optimization, and ideally we'll stop having code in the render object that knows about that flag later.
1367 (RenderTextArea::slotTextChanged): Set the m_dirty flag.
1369 2005-02-06 Darin Adler <darin@apple.com>
1373 - re-fixed <rdar://problem/3760910> please add support for custom tag names in HTML
1375 * khtml/xml/dom_docimpl.cpp:
1376 (DocumentImpl::tagId): Use ID_LAST_TAG + 1 for the ID of the first assigned tag ID. Before we'd use ID_LAST_TAG,
1377 which resulted in the same number being used for ID_COMMENT and the first custom tag.
1378 (DocumentImpl::tagName): Use ID_LAST_TAG + 1, as above.
1379 (DocumentImpl::namespaceURI): Change a < ID_LAST_TAG to <= ID_LAST_TAG in the same spirit as above.
1381 2005-02-06 Darin Adler <darin@apple.com>
1385 - fixed <rdar://problem/3986639> Crash occurs after choosing Undo Typing from the Edit menu
1387 * kwq/KWQTextArea.mm: (-[KWQTextArea viewWillMoveToWindow:]): Remove actions from undo manager when the view is
1388 removed from the window. Unfortunately, to do this the code has to know that the target of NSTextView actions
1389 will be the text storage object, but given the NSText architecture, that's pretty clear.
1391 2005-02-05 Chris Blumenberg <cblu@apple.com>
1393 Fixed: <rdar://problem/3991974> REGRESSION: www.jabra.com world location screen does not work
1397 * kwq/KWQKJavaAppletWidget.mm:
1398 (KJavaAppletWidget::KJavaAppletWidget): fallback to the document's base URL if there is no baseURL attribute
1399 * kwq/WebCoreBridge.h:
1400 * kwq/WebCoreBridge.mm:
1401 (-[WebCoreBridge baseURL]): new
1403 2005-02-04 David Harrison <harrison@apple.com>
1407 Rolled out Ken's accidental checkin when committing <rdar://problem/3986155> fix yesterday.
1409 * khtml/editing/selection.cpp:
1410 (khtml::Selection::validate):
1412 2005-02-04 Adele Amchan <adele@apple.com>
1416 Fix for <rdar://problem/3758785> Safari no longer works at BankOfAmerica online banking for military users
1418 When closing the document, if a body doesn't exist we now create one. This bug was preventing the onload handler from
1419 firing in cases where there wasn't a body. In the BankOfAmerica case, the page was just a bit of script where the onload
1420 handler redirected to the correct page.
1422 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close):
1424 2005-02-03 Ken Kocienda <kocienda@apple.com>
1430 <rdar://problem/3986155> Insertion point goes to beginning of doc after deleting
1432 * khtml/editing/htmlediting.cpp:
1433 (khtml::DeleteSelectionCommand::setStartNode): New convenience to handle reference counting when setting.
1434 (khtml::DeleteSelectionCommand::handleGeneralDelete): This contains the crux of the bug fix. Improve tests
1435 that detect when a selected node needs to be retained, rather than deleted, to preserve the intent of the user.
1436 This has the side effect of causing the insertion point placement code to succeed rather than fail. Before
1437 this fix, the failure of the insertion point placement code caused the insertion point to jump to the start
1438 of the document, which is the symptom that can be perceived by users when editing.
1439 * khtml/editing/htmlediting.h: Add setStartNode declaration.
1440 * khtml/editing/visible_units.cpp:
1441 (khtml::startOfBlock): This function had a stubbed-in non-tested implementation. Implement and
1442 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt: Added.
1443 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001.html: Added.
1444 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt: Added.
1445 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002.html: Added.
1446 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: Added.
1447 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003.html: Added.
1448 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: Added.
1449 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004.html: Added.
1450 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt: Added.
1451 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005.html: Added.
1452 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt: Added.
1453 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006.html: Added.
1457 2005-02-03 Richard Williamson <rjw@apple.com>
1459 Fixed <rdar://problem/3987419> Stocks and Weather leak what appears to XMLHTTPRequest results
1461 XMLHTTPRequests were causing massive leaks. _webcore_initWithHeaderString: did funky things with
1462 self replacement. Re-wrote to use more traditional factory constructor avoiding self replacement.
1464 Reviewed by David Harrison.
1467 (+[NSDictionary _webcore_dictionaryWithHeaderString:]):
1469 (KWQServeSynchronousRequest):
1471 2005-02-03 Chris Blumenberg <cblu@apple.com>
1473 Fixed: <rdar://problem/3938763> Cannot view Windows Media Player videos (soundtrack is played twice with delay)
1477 * khtml/html/html_objectimpl.cpp:
1478 (HTMLObjectElementImpl::attach): set needWidgetUpdate to false right after calling updateWidget because dispatchHTMLEvent can end up calling this method again
1479 (HTMLObjectElementImpl::recalcStyle): ditto
1481 2005-02-02 John Sullivan <sullivan@apple.com>
1485 - WebCore part of fix for <rdar://problem/3980651> REGRESSION (125-180): Huge number of pages printed from certain page,
1488 This also fixes the problems with printing from GMail, yay!
1490 * khtml/rendering/render_flow.cpp:
1491 (RenderFlow::paintLines):
1492 If the current line is taller than the entire page height (e.g. tall iFrame), don't try
1493 to avoid splitting it across pages.
1495 * kwq/WebCoreBridge.mm:
1496 (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1497 Handle error cases in a more obvious manner; this will cause future problems like this
1498 to print a blank page and complain to the console on debug builds, rather than print a
1499 zillionty mostly-blank pages.
1501 2005-02-02 Chris Blumenberg <cblu@apple.com>
1503 Fixed: <rdar://problem/3960304> can't load a particular applet (at www.escape.de) unless it's the first applet to be loaded
1507 * khtml/rendering/render_frames.cpp:
1508 (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.
1510 2005-02-02 Chris Blumenberg <cblu@apple.com>
1512 Fixed: <rdar://problem/3983628> control-click on WebView is not selecting the word under the cursor (Mail, non-editable WebView)
1516 * kwq/KWQKHTMLPart.mm:
1517 (KWQKHTMLPart::sendContextMenuEvent): check if SPI to always enable selecting closest word is enabled
1518 * kwq/WebCoreBridge.h:
1520 2005-02-02 Ken Kocienda <kocienda@apple.com>
1524 * khtml/editing/markup.cpp:
1525 (khtml::createMarkup): Removed debug spam I committed earlier in error.
1527 2005-02-02 Ken Kocienda <kocienda@apple.com>
1533 <rdar://problem/3823109> WebKit should support -toggleBaseWritingDirection: (bidi editing support)
1535 Since base writing direction is a paragraph-level property in AppKit, and we use the CSS direction
1536 property in WebCore, which can be applied to inline elements as well as blocks, a new notion has
1537 been added to the WebCore apply style logic. It is now possible to force all properties in a
1538 style declaration to be applied as though they were block properties.
1540 * khtml/editing/htmlediting.cpp:
1541 (khtml::ApplyStyleCommand::ApplyStyleCommand): Add an enum and a flag to this command that controls whether to force all
1542 properties in the style to be applied as block styles. Default is "no", retaining previous behavior.
1543 (khtml::ApplyStyleCommand::doApply): Switch on new flag to apply styles as before, or force all preoperties to be applied
1545 * khtml/editing/htmlediting.h:
1546 (khtml::ApplyStyleCommand::): Add an enum and a flag, as above.
1547 * khtml/khtml_part.cpp:
1548 (KHTMLPart::applyParagraphStyle): New method to force application of all style properties as block styles.
1549 * khtml/khtml_part.h: Update header declarations.
1550 * kwq/KWQKHTMLPart.h: Update header declarations.
1551 * kwq/KWQKHTMLPart.mm:
1552 (KWQKHTMLPart::baseWritingDirectionForSelectionStart): Accessor to help WebKit do a toggle operation on
1554 * kwq/WebCoreBridge.h: Update header declarations.
1555 * kwq/WebCoreBridge.mm:
1556 (-[WebCoreBridge applyParagraphStyle:withUndoAction:]): New method to force application of all style properties as block styles.
1557 (-[WebCoreBridge baseWritingDirectionForSelectionStart]): Accessor to help WebKit do a toggle operation on
1562 <rdar://problem/3985035> REGRESSION (Mail): Text copied from wrapped line contains extra character when pasted
1564 * khtml/editing/markup.cpp:
1565 (khtml::renderedText): Add an enum and a flag to this command that controls whether to force all
1566 This is the result of an error in the code that computes the rendered text that is selected
1567 when copying. Since spaces collapse at the end of lines, and these spaces need to be copied
1568 when the selection spans line endings, code runs to compute this text. However, this code
1569 was also running incorrectly in cases where lines wrapped. I have now added the missing
1570 test to check that the selection does indeed extend to the end of the line.
1573 2005-02-02 Ken Kocienda <kocienda@apple.com>
1579 <rdar://problem/3984894> REGRESSION (Mail): Command-right-arrow in reply does the wrong thing (two ways)
1580 <rdar://problem/3985130> REGRESSION (Mail): command-right-arrow in pasted RTF selects only up to tab
1582 * khtml/editing/visible_units.cpp:
1583 (khtml::endOfLine): Two separate problems in this new function recently added to take the place of
1584 selectionForLine. In the first, endOfLine did not stop at BR elements, and returned the position
1585 beyond them. In the second, the VisiblePosition constructor gives the wrong answer in certain cases.
1586 Darin is going to work on a solution for that problem. In the meantime, I can fix the symptom of this
1587 bug by going down to the last leaf child of the root line box; a one line change we will roll out when
1590 2005-02-01 Richard Williamson <rjw@apple.com>
1592 Fixed <rdar://problem/3985535> QT Plug-in JavaScript support now fails in <embed> tag only case
1596 * khtml/ecma/kjs_html.cpp:
1597 (KJS::HTMLDocument::tryGet):
1599 2005-02-01 John Sullivan <sullivan@apple.com>
1601 Written by Darin, reviewed and tested by me
1603 - fixed <rdar://problem/3969684> Panther-only: extra blank lines between
1604 pasted content from Blot
1606 * kwq/KWQKHTMLPart.mm:
1607 (KWQKHTMLPart::attributedString):
1608 don't emit paragraph breaks if the margins are tiny; matches what
1609 we do for plain-text conversion
1613 2005-02-01 Ken Kocienda <kocienda@apple.com>
1619 <rdar://problem/3985160> Deficiencies in pasting architecture blocking progress on other bugs
1621 * khtml/editing/html_interchange.h: Move style span text used to mark element added to
1622 add style to this header.
1623 * khtml/editing/htmlediting.cpp:
1624 (khtml::styleSpanClassString): Change to use constant moved to html_interchange.h.
1625 (khtml::isStyleSpan): New helper function. Checks if this is a span we added to apply style.
1626 (khtml::CompositeEditCommand::insertNodeBefore): Added an assert to check that the node
1627 we are inserting before is not the body.
1628 (khtml::CompositeEditCommand::insertNodeAfter): Ditto, but check is for after.
1629 (khtml::ReplacementFragment::ReplacementFragment): Added code to process the "default style"
1630 that is added by the copy code.
1631 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): first and last nodes inserted are
1632 now member variables instead of function locals. Initialize them here.
1633 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): Deref first and last nodes inserted
1635 (khtml::ReplaceSelectionCommand::doApply): Change design to fix the bug. Major change is to
1636 separate out the code that inserts nodes into the tree so additional styling checks can
1637 be done in a centralized way. Also got rid of the notion of "merging into the end block." That
1638 concept was just wrong.
1639 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Tweak interface now that first and
1640 last nodes inserted are member variables.
1641 (khtml::ReplaceSelectionCommand::insertNodeAfterAndUpdateNodesInserted): New helper used
1642 by replace code to do the stated DOM operation and update state internal to the command.
1643 This will also be a catch point to handle the kinds of additional style checks needed to
1644 make paste work right.
1645 (khtml::ReplaceSelectionCommand::insertNodeAtAndUpdateNodesInserted): Ditto.
1646 (khtml::ReplaceSelectionCommand::insertNodeBeforeAndUpdateNodesInserted): Ditto.
1647 (khtml::ReplaceSelectionCommand::updateNodesInserted): Ditto.
1648 * khtml/editing/htmlediting.h: Update declarations as needed.
1649 * khtml/editing/markup.cpp:
1650 (khtml::createMarkup): Adds a "default style" span to the content written to the pasteboard.
1651 This will help us to fix some of the bugs blocked by the bug above.
1652 * khtml/xml/dom_nodeimpl.cpp:
1653 (NodeImpl::lastDescendent): New helper.
1654 * khtml/xml/dom_nodeimpl.h: Ditto.
1655 * khtml/xml/dom_position.cpp:
1656 (DOM::Position::upstream): Fixed a bug which would allow the upstream position returned to be
1657 in unrendered content.
1658 (DOM::Position::downstream): Ditto.
1660 * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: Ending positions tweaked due to
1661 changes in upstream() and downstream() functions.
1662 * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Ditto
1663 * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Ditto
1664 * layout-tests/editing/selection/extend-by-character-006-expected.txt: Ditto
1666 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Changed what we expect, given
1667 new behavior of paste code.
1669 2005-01-31 John Sullivan <sullivan@apple.com>
1671 Reviewed by Dave Hyatt.
1673 - fixed <rdar://problem/3983097> Tabbing on RSS pages gets stuck in search field
1674 with "full keyboard navigation" off
1678 (QSlider::focusPolicy):
1679 Implemented this method for KWQSlider. It is needed for our widget subclasses that
1680 can become focused in some situations. I missed this when fixing 3949203 because
1681 it only comes into play when tab-to-controls is on, and because the other relevant
1682 methods are objective-C methods.
1684 2005-01-31 David Harrison <harrison@apple.com>
1688 <rdar://problem/3964164> AXWebArea needs to unregister on going invisible
1690 * khtml/xml/dom_docimpl.cpp:
1691 (DocumentImpl::detach):
1692 Detach the AX UIElement for the AXWebArea.
1694 2005-01-31 David Harrison <harrison@apple.com>
1698 <rdar://problem/3850876> AX: button exposed as only an AXImage at http://appleseed.apple.com/ site (<input type=image>)
1700 * khtml/rendering/render_form.h:
1701 (khtml::RenderImageButton::isImageButton):
1703 * khtml/rendering/render_image.h:
1704 (khtml::RenderImage::isImageButton):
1706 * kwq/KWQAccObject.mm:
1707 (-[KWQAccObject isImageButton]):
1708 (-[KWQAccObject actionElement]):
1709 (-[KWQAccObject role]):
1710 (-[KWQAccObject accessibilityActionNames]):
1711 (-[KWQAccObject accessibilityPerformAction:]):
1712 Represent RenderImageButton elements as buttons instead of images.
1714 2005-01-31 David Harrison <harrison@apple.com>
1716 Prevent nil dereference in debug code.
1718 * khtml/xml/dom_nodeimpl.cpp:
1719 (NodeImpl::displayTree):
1720 Stop when parent is 0, too.
1722 2005-01-31 John Sullivan <sullivan@apple.com>
1724 Reviewed by Dave Hyatt.
1726 - fixed <rdar://problem/3949203> cannot tab to, within, or out of the RSS sidebar
1729 (-[KWQSlider becomeFirstResponder]):
1730 (-[KWQSlider resignFirstResponder]):
1731 (-[KWQSlider nextKeyView]):
1732 (-[KWQSlider previousKeyView]):
1733 (-[KWQSlider canBecomeKeyView]):
1734 (-[KWQSlider nextValidKeyView]):
1735 (-[KWQSlider previousValidKeyView]):
1736 Copied these methods from KWQButton. The lack of special handling for first-responder-ness
1737 here was causing the focus to get "stuck" on the RSS page's slider widget. Added FIXME
1738 about how it would be nice to share more of this code rather than replicating it in each
1739 KWQ widget subclass.
1741 2005-01-31 Darin Adler <darin@apple.com>
1743 Reviewed by Harrison.
1745 - fixed <rdar://problem/3980066> Double-click on single character moves insertion point to previous line
1747 * khtml/khtml_part.cpp:
1748 (KHTMLPart::selectClosestWordFromMouseEvent): Set affinity too.
1749 (KHTMLPart::handleMousePressEventTripleClick): Ditto.
1750 (KHTMLPart::handleMouseMoveEventSelection): Ditto.
1751 (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
1753 * khtml/editing/selection.cpp:
1754 (khtml::Selection::modifyExtendingRightForward): Use endOfLine and endOfDocument.
1755 (khtml::Selection::modifyMovingRightForward): Ditto.
1756 (khtml::Selection::modifyExtendingLeftBackward): Use startOfLine and startOfDocument.
1757 (khtml::Selection::modifyMovingLeftBackward): Ditto.
1758 (khtml::Selection::validate): Rewrote the section that handles double-click. Two main fixes: 1) use isStartOfLine to
1759 check for another case where we want to select the word to the right, and 2) use isEndOfParagraph, which seems
1760 to work correctly in cases where isLastVisiblePositionInParagraph is giving the wrong answer. Also changed the line
1761 code to use startOfLine/endOfLine and the document code to use startOfDocument/endOfDocument.
1763 2005-01-31 Darin Adler <darin@apple.com>
1765 Reviewed by Harrison.
1767 - fixed <rdar://problem/3935275> unexpected quit scrolling over link; last.fm (works in IE and Firefox)
1769 * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): By using the correct document, fix the crash reported here.
1770 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.
1772 2005-01-31 Darin Adler <darin@apple.com>
1774 Reviewed by Ken and Harrison.
1776 - fixed <rdar://problem/3947901> REGRESSION (Mail): Pasting paragraph of rich text leaves insertion point before pasted text
1777 - fixed <rdar://problem/3949790> hitting return after underlined line results in too much or too little underlined
1778 - fixed <rdar://problem/3981759> nil-deref and crash when pasting just a paragraph break
1779 - fixed a couple problems I discovered while working with bug 3949790
1781 * khtml/editing/htmlediting.cpp:
1782 (khtml::ApplyStyleCommand::applyInlineStyle): Pass StayInBlock to upstream. Without this, we end up going too far
1783 upstream in the test case in bug 3949790.
1784 (khtml::ApplyStyleCommand::removeInlineStyle): Pass StayInBlock to upstream and downstream. Same reason as above.
1785 (khtml::ReplaceSelectionCommand::doApply): Update endPos if inserting a new node and endPos is using that node's
1786 parent and an offset past the node being inserted. That change fixes a problem with the position of the insertion point
1787 after pasting into the top level of a document (from test cases in 3947901 and 3949790). When setting insertionPos, use
1788 code that works when lastNodeInserted is a block rather than a text node. That change fixes a problem where a newline is
1789 not added when pasting an entire paragraph into the end of a document (from test case in 3949790). Added nil check before
1790 checking if lastNodeInserted is a <br> element, which fixes the crash when pasting just a paragraph break.
1792 * khtml/editing/visible_units.h: Filled out the set of calls to add some boolean checks for lines (needed for the
1793 bug fix), and calls for blocks (not yet implemented), and documents. The document checks may need refinement to
1794 properly handle documents with a mix of editable and non-editable content, but for now they just refactor code
1795 and make things a little clearer. Also removed the "include line break" parameter from endOfSentence.
1796 * khtml/editing/visible_units.cpp:
1797 (khtml::rootBoxForLine): Added.
1798 (khtml::startOfLine): Added. Algorithm taken from selectionForLine in selection.cpp.
1799 (khtml::endOfLine): Ditto.
1800 (khtml::inSameLine): Added.
1801 (khtml::isStartOfLine): Added.
1802 (khtml::isEndOfLine): Added.
1803 (khtml::endOfSentence): Removed "include line break" parameter.
1804 (khtml::inSameParagraph): Added a null check.
1805 (khtml::isStartOfParagraph): Ditto.
1806 (khtml::isEndOfParagraph): Ditto.
1807 (khtml::startOfBlock): Added.
1808 (khtml::endOfBlock): Added.
1809 (khtml::inSameBlock): Added.
1810 (khtml::isStartOfBlock): Added.
1811 (khtml::isEndOfBlock): Added.
1812 (khtml::startOfDocument): Added.
1813 (khtml::endOfDocument): Added.
1814 (khtml::inSameDocument): Added.
1815 (khtml::isStartOfDocument): Added.
1816 (khtml::isEndOfDocument): Added.
1818 2005-01-30 Darin Adler <darin@apple.com>
1822 - fixed <rdar://problem/3977000> form data set posted for <input type="image" ...> omits name/value pair
1824 * khtml/html/html_formimpl.cpp:
1825 (DOM::HTMLInputElementImpl::appendFormData): Append a name/value pair for type IMAGE in addition to the X/Y
1828 2005-01-30 Darin Adler <darin@apple.com>
1832 - fixed <rdar://problem/3974246> REGRESSION (125-180): popup menus are missing item text on Harmony Remote web site
1834 * khtml/html/html_formimpl.cpp: (DOM::HTMLOptionElementImpl::text): Change this function to traverse the entire tree
1835 and gather all the text rather than just looking at immediate children.
1837 * khtml/xml/dom_nodeimpl.h: Added const.
1838 * khtml/xml/dom_nodeimpl.cpp:
1839 (NodeImpl::traverseNextNode): Added const.
1840 (NodeImpl::traverseNextSibling): Ditto.
1841 (NodeImpl::traversePreviousNodePostOrder): Ditto.
1842 (NodeImpl::detach): Add a missing nil check.
1844 2005-01-30 Darin Adler <darin@apple.com>
1848 - fixed <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
1850 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Added missing ref/deref of newly created element.
1852 2005-01-28 Darin Adler <darin@apple.com>
1854 * khtml/css/cssproperties.c: Regenerated with newer gperf.
1856 2005-01-28 David Harrison <harrison@apple.com>
1858 Reviewed by John Sullivan.
1860 <rdar://problem/3968144> AX need to be able to focus an AXLink by setting AXFocused to true
1862 * kwq/KWQAccObject.mm:
1863 (-[KWQAccObject accessibilityPerformAction:]):
1864 (-[KWQAccObject accessibilityIsAttributeSettable:]):
1865 Add AXFocused for AXLinks.
1867 2005-01-28 David Harrison <harrison@apple.com>
1871 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
1873 Use AppKit SPI _accessibilityParentForSubview to return KWQAccObject parent of AppKit AX object.
1875 * kwq/KWQAccObject.mm:
1876 (-[KWQAccObject _accessibilityParentForSubview:]):
1879 2005-01-27 Adele Amchan <adele@apple.com>
1881 fixed by Darin, reviewed by me.
1883 <rdar://problem/3976314> REGRESSION (180-TOT): submitting password fields fail on Panther
1885 * kwq/KWQTextField.mm: (-[KWQTextFieldController string]): on panther, the secure text field's editor
1886 does not contain the real string, so now we just call stringValue on the field in that case.
1888 2005-01-26 Maciej Stachowiak <mjs@apple.com>
1890 Reviewed by Darin, Hyatt and Ken.
1892 <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
1894 * khtml/css/css_computedstyle.cpp:
1895 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support
1896 for -khtml-text-decorations-in-effect property. This works like text-docration
1897 but follows proper inline semantics, that is, if a parent is causing text
1898 decoration then -khtml-text-decorations-in-effect on this element will reflect that.
1899 * khtml/css/cssproperties.in: Add -khtml-text-decorations-in-effect property.
1900 * khtml/css/cssproperties.h: regenerated
1901 * khtml/css/cssvalues.c: regenerated
1902 * khtml/css/cssparser.cpp: regenerated
1903 * khtml/css/cssproperties.c: regenerated
1905 * khtml/css/css_valueimpl.h: Made copyPropertiesInSet public.
1907 * khtml/editing/htmlediting.cpp:
1908 (khtml::StyleChange::init): Handle -khtml-text-decorations-in-effect
1909 specially, translate to text-decoration
1910 (khtml::ApplyStyleCommand::applyInlineStyle): Fix a comment.
1911 (khtml::ApplyStyleCommand::removeInlineStyle): Add new way of pushing down
1912 text-decoration styles around the edges of the selected range.
1913 (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Helper for this.
1914 (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): ditto
1915 (khtml::ApplyStyleCommand::nodeFullyUnselected): ditto
1916 (khtml::hasTextDecorationProperty): ditto
1917 (khtml::highestAncestorWithTextDecoration): ditto
1918 (khtml::ApplyStyleCommand::extractTextDecorationStyle): ditto
1919 (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle): ditto
1920 (khtml::ApplyStyleCommand::applyTextDecorationStyle): ditto
1921 * khtml/editing/htmlediting.h: Prototype new methods.
1922 * khtml/editing/jsediting.cpp: Make underline execCommand use the new CSS property.
1924 - as a necessary part of the fix, fixed the longstanding problem
1925 that mutating an element's inlineStyleDecl would not property
1926 update its style attribute. now it does.
1928 * khtml/css/css_valueimpl.cpp:
1929 (DOM::CSSMutableStyleDeclarationImpl::setChanged): If this is an inline style
1930 declaration, tell the element it's style attribute needs updating.
1931 * khtml/html/html_elementimpl.cpp:
1932 (HTMLElementImpl::invalidateStyleAttribute): New method, just calls down
1934 (HTMLElementImpl::updateStyleAttribute): Regenerate style attribute from
1935 inline style declaration.
1936 * khtml/html/html_elementimpl.h: Prototype new stuff.
1937 * khtml/xml/dom_elementimpl.cpp:
1938 (ElementImpl::ElementImpl): Initialize new attribute.
1939 (ElementImpl::updateStyleAttributeIfNeeded): New method to check if the style
1940 is dirty and this is an html element, and if so call the html element to
1941 regenerate the style attribute.
1942 (ElementImpl::attributes): update style if needed
1943 (ElementImpl::getAttribute): ditto
1944 (ElementImpl::hasAttributes): ditto
1945 (ElementImpl::dump): ditto
1946 (XMLElementImpl::cloneNode): ditto
1947 * khtml/xml/dom_elementimpl.h:
1948 (DOM::ElementImpl::isStyleAttributeValid): new method to manage style attr
1950 (DOM::ElementImpl::setStyleAttributeValid): ditto
1952 - added new layout tests for underlining:
1954 * layout-tests/editing/editing.js:
1955 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: Added.
1956 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: Added.
1957 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold.html: Added.
1958 * layout-tests/editing/style/remove-underline-across-paragraph.html: Added.
1959 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: Added.
1960 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: Added.
1961 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold.html: Added.
1962 * layout-tests/editing/style/remove-underline-after-paragraph.html: Added.
1963 * layout-tests/editing/style/remove-underline-expected.txt: Added.
1964 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt: Added.
1965 * layout-tests/editing/style/remove-underline-from-stylesheet.html: Added.
1966 * layout-tests/editing/style/remove-underline-in-bold-expected.txt: Added.
1967 * layout-tests/editing/style/remove-underline-in-bold.html: Added.
1968 * layout-tests/editing/style/remove-underline.html: Added.
1969 * layout-tests/editing/style/underline-expected.txt: Added.
1970 * layout-tests/editing/style/underline.html: Added.
1972 2005-01-27 David Hyatt <hyatt@apple.com>
1974 Fix for 3875199, search field needs to be able to show a magnifying glass without a dropdown menu.
1976 Reviewed by kocienda
1978 * khtml/html/html_formimpl.cpp:
1979 (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
1980 (DOM::HTMLInputElementImpl::parseHTMLAttribute):
1981 * kwq/KWQLineEdit.mm:
1982 (QLineEdit::setMaxResults):
1984 2005-01-27 Ken Kocienda <kocienda@apple.com>
1990 <rdar://problem/3973254> Deletions of ranges does not coalesce correctly with subsequent typing
1992 * khtml/editing/htmlediting.cpp:
1993 (khtml::InsertTextCommand::deleteCharacter): Remove this dead code.
1994 (khtml::ReplaceSelectionCommand::editingAction): Moved this code to a better place in the file.
1995 It was in with unrelated functions.
1996 (khtml::TypingCommand::TypingCommand): Reorganize initialization list so it is easier to read.
1997 (khtml::TypingCommand::issueCommandForDeleteKey): Remove dead code. Roll in remaining code into deleteKeyPressed.
1998 (khtml::TypingCommand::deleteKeyPressed): Add in support for carrying along smart delete flag.
1999 (khtml::TypingCommand::forwardDeleteKeyPressed): New function. Makes forward delete work like
2000 "regular" delete in terms of coalescing typing.
2001 (khtml::TypingCommand::doApply): Add case for ForwardDeleteKey.
2002 (khtml::TypingCommand::preservesTypingStyle): Ditto.
2003 * khtml/editing/htmlediting.h:
2004 (khtml::TypingCommand::): Add ForwardDeleteKey constant. Remove a couple declarations for now-dead code.
2005 (khtml::TypingCommand::smartDelete): New accessor.
2006 (khtml::TypingCommand::setSmartDelete): Ditto.
2007 * kwq/WebCoreBridge.h:
2008 * kwq/WebCoreBridge.mm:
2009 (-[WebCoreBridge deleteKeyPressedWithSmartDelete:]): Add smart delete flag.
2010 (-[WebCoreBridge forwardDeleteKeyPressedWithSmartDelete:]): New method.
2011 * khtml/editing/jsediting.cpp: Add supprt for ForwardDelete command
2012 * layout-tests/editing/editing.js: Ditto.
2013 * layout-tests/editing/deleting/delete-and-undo-expected.txt: Added.
2014 * layout-tests/editing/deleting/delete-and-undo.html: Added.
2015 * layout-tests/editing/deleting/forward-delete-expected.txt: Added.
2016 * layout-tests/editing/deleting/forward-delete.html: Added.
2020 2005-01-27 David Harrison <harrison@apple.com>
2024 <rdar://problem/3962214> AX: AXLeftLineTextMarkerRangeForTextMarker returns incorrect range
2026 * kwq/KWQAccObject.mm:
2027 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2028 Allowed for selection to end of line including the linebreak.
2030 2005-01-27 David Harrison <harrison@apple.com>
2032 Reviewed by Darin, Ken.
2034 <rdar://problem/3964470> AX: Include attachments in AXAttributedStringForTextMarkerRange
2036 * kwq/KWQAccObject.mm:
2037 (-[KWQAccObject isAttachment]):
2038 (-[KWQAccObject attachmentView]):
2039 (-[KWQAccObject role]):
2040 (-[KWQAccObject subrole]):
2041 (-[KWQAccObject roleDescription]):
2042 (-[KWQAccObject value]):
2043 (-[KWQAccObject title]):
2044 (-[KWQAccObject accessibilityDescription]):
2045 (-[KWQAccObject accessibilityIsIgnored]):
2046 (-[KWQAccObject accessibilityAttributeNames]):
2047 (-[KWQAccObject accessibilityAttributeValue:]):
2048 Make attachments accessible.
2050 (CreateCGColorIfDifferent):
2051 (AXAttributeStringSetColor):
2052 (AXAttributeStringSetNumber):
2053 (AXAttributeStringSetFont):
2054 (AXAttributeStringSetStyle):
2055 (AXAttributeStringSetElement):
2056 (AXLinkElementForNode):
2057 (AXAttributedStringAppendText):
2058 (AXAttributedStringAppendReplaced):
2059 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2060 Add attachments and more text attributes to AXAttributedStringForTextMarkerRange.
2062 2005-01-27 Darin Adler <darin@apple.com>
2066 - fixed <rdar://problem/3807935> DOM CSS computed style line-height is wrong in two ways
2068 * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
2069 Use specified size rather than computed size when dealing with a percentage for line height.
2071 2005-01-27 Darin Adler <darin@apple.com>
2075 - fixed <rdar://problem/3971372> SWB: template function DOM_cast() won't compile with gcc 4.0
2076 - fixed other gcc 4.0 compiling problems Patrick Beard pointed out on the phone
2078 * kwq/DOMInternal.h: (DOM_cast): Change the "failToCompile()" trick to use a dependent name.
2079 Nowadays, if a name is not dependent, it is checked at template definition time. But we want
2080 a failure only at template instantiation time.
2082 * ForwardingHeaders/editing/text_granularity.h: Added. Needed but a bug in the 3.3 compiler made
2083 it compile anyway without this.
2087 * khtml/html/html_miscimpl.h: For clarity, mark these functions virtual too. They are automatically
2088 virtual because the base class ones are virtual, but it's ugly to leave it this way.
2090 2005-01-26 Ken Kocienda <kocienda@apple.com>
2096 <rdar://problem/3971609> REGRESSION (Mail): up/down arrow navigation broken after rewrapping text by resizing window
2097 <rdar://problem/3975661> REGRESSION (Mail): left/right arrow navigation can place insertion point after last character on line
2099 * khtml/editing/selection.cpp:
2100 (khtml::Selection::modifyAffinity): PARAGRAPH and LINE movements should not alter affinity. This was
2101 just a mistake before when it reset to upstream in some cases.
2102 * khtml/rendering/render_line.cpp:
2103 (khtml::RootInlineBox::closestLeafChildForXPos): Move this function down from InlineBox, and
2104 rework the implementation. This fixes 3971609.
2105 * khtml/rendering/render_line.h:
2106 * khtml/rendering/render_text.cpp:
2107 (RenderText::caretRect): Rework the algorithm to fix 3975661. This regressed when we began placing
2108 the spaces on the end of lines in text boxes when lines wrap.
2110 2005-01-26 Richard Williamson <rjw@apple.com>
2112 Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test
2114 I added a member variable to ObjectImp. This changed it's size and consequently
2115 hampered the optimizations built into the garbage collector. Objects no longer
2116 fit within the allocators cell size, and thus allocation fell back to a slower
2119 As a result of this fix I also dramatically cleaned up how runtime objects are
2120 accessed. The path mostly *removes* code.
2124 * khtml/ecma/kjs_dom.cpp:
2125 (DOMDocumentProtoFunc::tryCall):
2126 (DOMElementProtoFunc::tryCall):
2127 (KJS::getRuntimeObject):
2128 * khtml/ecma/kjs_dom.h:
2129 * khtml/ecma/kjs_html.cpp:
2130 (KJS::HTMLDocument::tryGet):
2131 (KJS::HTMLElement::tryGet):
2132 (KJS::HTMLElement::implementsCall):
2133 (KJS::HTMLElement::call):
2134 (KJS::HTMLElement::tryPut):
2135 (KJS::HTMLCollection::tryGet):
2136 (KJS::HTMLCollection::getNamedItems):
2137 * khtml/ecma/kjs_html.h:
2138 * khtml/ecma/kjs_window.cpp:
2141 2005-01-26 Richard Williamson <rjw@apple.com>
2143 Fixed <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
2145 For now we are using ICU UBreakIterator to determine grapheme boundaries for
2146 cursor and deletion. This does not match what Cocoa does exactly, but does match
2147 what Carbon does. The areas are difference are obscure, but, according to
2148 Deborah Goldsmith, using the UBreakIterator is the reasonable approach.
2152 * khtml/rendering/render_text.cpp:
2153 (RenderText::previousOffset):
2154 (RenderText::nextOffset):
2156 2005-01-25 David Harrison <harrison@apple.com>
2158 Reviewed by Maciej and Richard.
2160 <rdar://problem/3963731> AX VO: Changing window sizes causes a crash using with Voice Over - KWQPtrDictImpl::clear
2162 * khtml/html/html_miscimpl.cpp:
2163 (HTMLCollectionImpl::HTMLCollectionImpl):
2164 Ensure that isHTMLDocument before calling HTMLDocument-only method.
2166 2005-01-25 Richard Williamson <rjw@apple.com>
2168 Part one of fix for <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
2170 This patch changes the semantics of next() and previous() on
2171 VisiblePosition to move a grapheme (character cluster) at a
2172 time. This means that cursor navigation with correctly move
2173 over an entire cluster.
2175 However, the expected behavior for deleting a grapheme is to
2176 delete individual code points, thus decomposing the grapheme
2177 into it constituent parts. That will be addressed in the next
2182 * khtml/editing/visible_position.cpp:
2183 (khtml::VisiblePosition::previousPosition):
2184 (khtml::VisiblePosition::nextPosition):
2185 * khtml/editing/visible_position.h:
2186 * khtml/rendering/render_object.cpp:
2187 (RenderObject::previousOffset):
2188 (RenderObject::nextOffset):
2189 * khtml/rendering/render_object.h:
2190 * khtml/rendering/render_text.cpp:
2191 (RenderText::previousOffset):
2192 (RenderText::nextOffset):
2193 (RenderText::findNextInlineTextBox):
2194 * khtml/rendering/render_text.h:
2195 * khtml/xml/dom_nodeimpl.cpp:
2196 (NodeImpl::previousOffset):
2197 (NodeImpl::nextOffset):
2198 * khtml/xml/dom_nodeimpl.h:
2200 2005-01-25 David Harrison <harrison@apple.com>
2204 <rdar://problem/3973067> AXWebArea for http://apple.netscape.com/ has an empty AXLinkUIElements
2206 * kwq/KWQAccObject.mm:
2207 (-[KWQAccObject accessibilityAttributeValue:]):
2208 Omit ignored AXLinks from AXLinkUIElements result
2210 2005-01-25 Ken Kocienda <kocienda@apple.com>
2216 <rdar://problem/3972851> REGRESSION (179-180+): Repro crash in ApplyStyleCommand::cleanUpEmptyStyleSpans
2218 * khtml/editing/htmlediting.cpp:
2219 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): Added two null checks.
2221 2005-01-25 Ken Kocienda <kocienda@apple.com>
2227 <rdar://problem/3954710> Mail crashed while editing signatures - NodeImpl::isBlockFlow
2229 The fix is more general than for this one bug, and may work to fix many crashers. The problem
2230 is that the ReplaceSelectionCommand never checked whether its starting selection is empty. If
2231 it is, then we need to bail before doing the work of the command, which we need to deref the
2232 start and end points of the selection in order to do its work. I think you can see the crash
2235 * khtml/editing/htmlediting.cpp:
2236 (khtml::ReplaceSelectionCommand::doApply): Assert selection is not empty.
2237 * kwq/WebCoreBridge.mm:
2238 (partHasSelection): New helper function to test that bridge has a part with a selection.
2240 Use new helper function to test part and selection; return from these function if this test fails.
2242 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:])
2243 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:])
2244 (-[WebCoreBridge alterCurrentSelection:direction:granularity:])
2245 (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:])
2246 (-[WebCoreBridge alterCurrentSelection:verticalDistance:])
2247 (-[WebCoreBridge documentFragmentWithText:])
2248 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
2249 (-[WebCoreBridge insertLineBreak])
2250 (-[WebCoreBridge insertParagraphSeparator])
2251 (-[WebCoreBridge insertParagraphSeparatorInQuotedContent])
2252 (-[WebCoreBridge insertText:selectInsertedText:])
2253 (-[WebCoreBridge deleteSelectionWithSmartDelete:])
2254 (-[WebCoreBridge ensureSelectionVisible])
2256 2005-01-24 Kevin Decker <kdecker@apple.com>
2260 Fixed <rdar://problem/3932374> REGRESSION: 'ReferenceError - Can't find variable' JavaScript error at webxpress.fidelity.com
2262 * khtml/html/html_miscimpl.h: Missing virtual identifiers for namedItem() and nextNamedItem() exposed a flaw that prevented finding variables in form [HTMLFormCollectionImpl] scopes.
2265 2005-01-24 Vicki Murley <vicki@apple.com>
2267 Reviewed by kocienda.
2269 - fix <rdar://problem/3810661> computed style not handled for Apple extensions
2271 * khtml/css/css_computedstyle.cpp: (DOM::):
2272 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust
2274 2005-01-24 Darin Adler <darin@apple.com>
2278 - fixed <rdar://problem/3969884> REGRESSION (179-180): Typing password not echoed as "bullets" at paypal.com when field is first focused
2280 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]):
2281 Sizing up the form editor, which fixes things for normal fields and search fields,
2282 screws things up for password fields. Eventually, I'll need to figure out why this is
2283 and file a bug so that the AppKit team fixes it. In the mean time, just check for the
2284 case of the secure text field, and don't size up in that case.
2286 2005-01-24 Ken Kocienda <kocienda@apple.com>
2292 <rdar://problem/3963560> 8A354: Inserting Japanese text to the line head causes line break
2294 * khtml/editing/htmlediting.cpp:
2295 (khtml::ReplaceSelectionCommand::doApply): Add one more case where we merge content into the
2296 existing line. This covers the situation see using the steps to reproduce this bug.
2298 2005-01-21 Maciej Stachowiak <mjs@apple.com>
2302 <rdar://problem/3967572> Editing should split elements before removing style
2304 * khtml/editing/htmlediting.cpp:
2305 (khtml::CompositeEditCommand::splitElement):
2306 (khtml::CompositeEditCommand::mergeIdenticalElements):
2307 (khtml::CompositeEditCommand::wrapContentsInDummySpan):
2308 (khtml::CompositeEditCommand::splitTextNodeContainingElement):
2309 (khtml::ApplyStyleCommand::applyInlineStyle):
2310 (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
2311 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
2312 (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
2313 (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
2314 (khtml::areIdenticalElements):
2315 (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
2316 (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2317 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans):
2318 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
2319 (khtml::InsertParagraphSeparatorCommand::doApply):
2320 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
2321 (khtml::InsertTextCommand::prepareForTextInsertion):
2322 (khtml::SplitTextNodeCommand::doUnapply):
2323 (khtml::SplitElementCommand::SplitElementCommand):
2324 (khtml::SplitElementCommand::~SplitElementCommand):
2325 (khtml::SplitElementCommand::doApply):
2326 (khtml::SplitElementCommand::doUnapply):
2327 (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
2328 (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
2329 (khtml::MergeIdenticalElementsCommand::doApply):
2330 (khtml::MergeIdenticalElementsCommand::doUnapply):
2331 (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
2332 (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
2333 (khtml::WrapContentsInDummySpanCommand::doApply):
2334 (khtml::WrapContentsInDummySpanCommand::doUnapply):
2335 (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
2336 (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
2337 (khtml::SplitTextNodeContainingElementCommand::doApply):
2338 * khtml/editing/htmlediting.h:
2340 New layout test that shows the side benefit of this.
2342 * layout-tests/editing/style/unbold-in-bold-expected.txt: Added.
2343 * layout-tests/editing/style/unbold-in-bold.html: Added.
2345 2005-01-24 Darin Adler <darin@apple.com>
2349 - fixed <rdar://problem/3933435> -[DOMRange cloneContents] sometimes alters the original DOMRange
2351 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Fixed code that was collapsing
2352 the range after processing the contents. That's right for extract and delete, but not clone.
2354 - fixed <rdar://problem/3714184> inline input works incorrectly when I type Korean slowly in textfield in form on www.google.co.kr
2355 - fixed <rdar://problem/3193848> Can't enter SSN to sign up for Chase visa online account (changing focus inside key press handler)
2356 - 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>
2358 * kwq/KWQLineEdit.mm:
2359 (QLineEdit::text): Changed to call a new string method on the controller instead of calling
2360 stringValue, since stringValue has a bad side effect of ending inline input.
2361 (QLineEdit::selectAll): Changed to only call selectText: when the field is already selected.
2362 When you are giving the field focus, it automatically gets all selected, and this change
2363 is required in the case where we defer the focus change.
2365 * kwq/KWQTextField.h: Added a new string method to the controller.
2366 * kwq/KWQTextField.mm:
2367 (-[KWQTextFieldController setMaximumLength:]): Call the new string method instead of using stringValue.
2368 (-[KWQTextFieldController controlTextDidChange:]): Removed the code to truncate at the first CR or LF.
2369 That's now handled in the shouldChangeTextInRange method instead.
2370 (-[KWQTextFieldController textView:shouldHandleEvent:]): Add new logic to defer responder changes until
2371 after the event is handled. This makes sure the key gets into the field that's already handling it at
2372 rather than ending up in the newly-focused field if the key press handler focuses a different element.
2373 (-[KWQTextFieldController textView:didHandleEvent:]): Turn off deferral here, now that the key press
2375 (-[KWQTextFieldController string]): Added. Calls stringValue only if there's no editor. If there is
2376 an editor, calls string on that instead.
2377 (-[KWQTextFieldController textView:shouldChangeTextInRange:replacementString:]): Added. Called by
2378 the three field subclasses. Truncates incoming strings at the first CR or LF character. This works
2379 properly with Undo, and the old technique did not.
2380 (-[KWQTextFieldController preprocessString:]): Added. Helper used for all the setStringValue methods
2381 so they all truncate at the first CR or LF as well as truncating to the appropriate length.
2382 (-[KWQTextField setStringValue:]): Changed to call the controller.
2383 (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): Added. Calls the controller.
2384 (-[KWQSecureTextField setStringValue:]): More of the same.
2385 (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
2386 (-[KWQSearchField setStringValue:]): Ditto.
2387 (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.
2389 * kwq/KWQWidget.h: Added the new setDeferFirstResponderChanges function.
2391 (QWidget::~QWidget): Clear out the deferredFirstResponder global just in case we are destroyed
2392 while we "have the ball".
2393 (QWidget::hasFocus): If we are in the deferred mode, use the global to decide who to say is focused.
2394 (QWidget::setFocus): If we are in the deferred mode, set the global instead of making something be
2395 the first responder.
2396 (QWidget::setDeferFirstResponderChanges): Set the boolean. If the boolean is being cleared, then
2397 get the deferred first responder and call setFocus on it again, which will do the work we didn't
2400 2005-01-24 Ken Kocienda <kocienda@apple.com>
2406 <rdar://problem/3964350> Deleting all content and typing in a message gets one letter, then beeps
2408 This is a problem with the way we turn key events, when a user starts typing, into editing commands.
2409 Right now, that initial delete key in an empty window is turned into an editing command, and much
2410 editing code runs that need not run. What's more, this is confusing the selection machinery. The
2411 solution is to detect the "delete in an empty window" case and don't turn this into an editing
2414 * khtml/editing/htmlediting.cpp:
2415 (khtml::TypingCommand::deleteKeyPressed)
2417 2005-01-23 Adele Amchan <adele@apple.com>
2419 Fixed <rdar://problem/3964286> REGRESSION (178-179): menus and "go to old site" link at Ameritrade's new site don't work
2421 Removed check for document from checkCompleted. In this case, WebCore never knew that a WebImageView was complete because
2422 it fell into this document check case in checkCompleted.
2423 Added check for document to tokenizerProcessedData (see <rdar://problem/3807144>)
2427 * khtml/khtml_part.cpp:
2429 (KHTMLPart::checkCompleted):
2430 * khtml/khtml_part.h:
2431 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tokenizerProcessedData):
2433 2005-01-21 Richard Williamson <rjw@apple.com>
2435 Fixed <rdar://problem/3759399> Javascript / Liveconnect problems ((event handler):Undefined value)
2437 Java applets specified with <object> or <embed> weren't scriptable. Now they are.
2441 * khtml/html/html_objectimpl.cpp:
2442 (HTMLEmbedElementImpl::getEmbedInstance):
2443 (HTMLObjectElementImpl::getObjectInstance):
2445 2005-01-21 Ken Kocienda <kocienda@apple.com>
2451 <rdar://problem/3959464> REGRESSION (Mail): Insertion point goes back to beginning of document after deleting
2453 * khtml/editing/htmlediting.cpp:
2454 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add special case to handle retaining a fully-selected block.
2456 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: Added.
2457 * layout-tests/editing/deleting/delete-3959464-fix.html: Added.
2459 2005-01-21 Richard Williamson <rjw@apple.com>
2461 Fixed <rdar://problem/3966998> REGRESSION(179-TOT) clicking on gmail message brings me to blank screen
2463 getElementById() sometimes returns Undefined() instead of Null().
2467 * khtml/ecma/kjs_dom.cpp:
2468 (DOMDocumentProtoFunc::tryCall):
2470 2005-01-21 David Hyatt <hyatt@apple.com>
2472 Fix for 3773809, make sure that overflow regions never end up at an invalid scroll offset because of a layout change.
2474 Reviewed by kocienda
2476 * khtml/rendering/render_layer.cpp:
2477 (RenderLayer::updateScrollInfoAfterLayout):
2479 2005-01-21 David Hyatt <hyatt@apple.com>
2481 Fix for 3966349, hang loading page. Make sure that loops using popOneBlock properly check for a null
2482 blockStack to avoid an infinite loop.
2484 Reviewed by kocienda
2486 * khtml/html/htmlparser.cpp:
2487 (KHTMLParser::parseToken):
2488 (KHTMLParser::insertNode):
2489 (KHTMLParser::popInlineBlocks):
2491 2005-01-21 Ken Kocienda <kocienda@apple.com>
2497 <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand
2499 * khtml/editing/htmlediting.cpp:
2500 (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
2501 InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
2502 I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled
2503 code path which does not set this variable to something good. In the destructor, we check for null,
2504 and deref if non-null. Obvious "BOOM" potential. Fixed.
2506 2005-01-21 Ken Kocienda <kocienda@apple.com>
2512 <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear
2514 * khtml/editing/htmlediting.cpp:
2515 (khtml::InsertParagraphSeparatorCommand::doApply): When writing the code to insert a block
2516 in response to the return key, I did not write code to cover the case described in the bug.
2518 * layout-tests/editing/inserting/insert-div-025-expected.txt: Added.
2519 * layout-tests/editing/inserting/insert-div-025.html: Added.
2521 2005-01-20 Maciej Stachowiak <mjs@apple.com>
2525 <rdar://problem/3965196> security fix for javascript: exploit missed one case (already fixed in updates)
2527 * khtml/ecma/kjs_window.cpp:
2528 (WindowFunc::tryCall): correct mistake in earlier fix for the following bug, caught by Adele:
2530 2005-01-20 Maciej Stachowiak <mjs@apple.com>
2534 <rdar://problem/3965466> editing needs to insert text before applying typing style
2536 * khtml/editing/htmlediting.cpp:
2537 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment.
2538 (khtml::InsertLineBreakCommand::doApply): Apply style to the BR
2539 node after inserting it.
2540 (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to
2541 apply style to any new nodes created before inserting.
2542 (khtml::InsertTextCommand::input): Apply style to the inserted range
2543 after doing the text insert.
2544 * khtml/editing/htmlediting.h:
2546 This change leads to improved results on one of the layout tests:
2548 * layout-tests/editing/inserting/insert-div-024-expected.txt:
2552 2005-01-20 Ken Kocienda <kocienda@apple.com>
2558 <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear
2560 * khtml/editing/htmlediting.cpp:
2561 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code
2562 caused this regression. The code became too aggressive in removing block placeholders, and would remove them
2563 from blocks other than the block containing the selection.
2564 * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that
2565 I did not notice earlier.
2566 * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto.
2568 2005-01-20 David Hyatt <hyatt@apple.com>
2570 Fix for oddness on albertsons.com. Make sure not to crash when setting/removing style properties on a node
2571 with no document. The bug # is 3813900.
2575 2005-01-20 David Harrison <harrison@apple.com>
2579 PARTIAL fix for following bug. Create attributed string with fonts and links. Still need to add attachments.
2580 <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute
2582 * kwq/KWQAccObject.mm:
2583 (-[KWQAccObject textUnderElement]):
2584 Touched up previous checkin to match code review comments.
2586 (-[KWQAccObject value]):
2587 Use plainText for this one instead of obsolete attributedString.
2589 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2590 Advertise AXAttributedStringForTextMarkerRange.
2592 (AXAttributeStringAddFont):
2593 (AXAttributeStringAddElement):
2594 (-[KWQAccObject linkUIElementForNode:]):
2595 (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
2596 (-[KWQAccObject accessibilityAttributedStringForRange:]):
2597 New routines to support AXAttributedStringForTextMarkerRange.
2599 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2600 Use new routines instead of obsolete attributedString.
2602 2005-01-20 David Harrison <harrison@apple.com>
2606 <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore
2608 * khtml/xml/dom_docimpl.cpp:
2609 (DocumentImpl::getAccObjectCache):
2610 Adjust when detecting cache in non-top level WebArea.
2611 * kwq/KWQAccObject.mm:
2612 (-[KWQAccObject textUnderElement]):
2613 (-[KWQAccObject accessibilityAttributeValue:]):
2614 Make sure the elements document is the current one for the part.
2616 2005-01-20 Darin Adler <darin@apple.com>
2620 - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:]
2622 * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions.
2623 The uncaught exception would make the entire program terminate.
2625 - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
2627 * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable
2628 back in November because Mail was stumbling over it.
2630 - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search>
2632 * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields
2633 that position their text in a way that depends on vertical size. In the case of a search field, the text
2634 is centered, so the old logic was broken.
2635 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to
2636 something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into
2637 AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this
2638 bug this happens because we become first responder before being sized and positioned by the HTML layout code.
2640 - improved debugging output when using "po" from gdb with Objective-C DOM
2643 (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node).
2644 (-[DOMRange description]): Tweaked format.
2646 2005-01-19 Richard Williamson <rjw@apple.com>
2648 After further discussion with Real we have decided to NOT include the
2649 additional CLSID for the real plugin. See 3958601.
2653 * khtml/rendering/render_frames.cpp:
2654 (RenderPartObject::updateWidget):
2656 2005-01-19 David Harrison <harrison@apple.com>
2660 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
2662 Previous checkin for this bug was missing some of the patch. Editing snafu with multiple changes in tree.
2664 * kwq/KWQAccObject.mm:
2665 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2666 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
2667 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
2668 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2669 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2670 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2671 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
2673 2005-01-19 Ken Kocienda <kocienda@apple.com>
2677 * khtml/editing/htmlediting.cpp:
2678 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided
2679 to do on my last checkin, but I forgot to do before landing.
2681 2005-01-19 Ken Kocienda <kocienda@apple.com>
2687 <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines
2689 * khtml/editing/htmlediting.cpp:
2690 (khtml::CompositeEditCommand::applyStyle):
2691 (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder.
2692 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether
2693 placeholder was added or not.
2694 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block
2695 looking for a placeholder. The old code, which just looked at the last child of a node, started missing
2696 once block placeholders became styled (which started happening with this patch).
2697 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style
2698 to a block placeholder at call time, rather than setting the typing style as a latent style that
2699 might be applied later. This is an important part of the bug fix.
2700 (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded()
2701 and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to
2702 be styled can be detected.
2703 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class
2704 managed style. Before it would calculate and set typing style for the block added. This is not
2705 sufficient. Added blocks need to styled immediately. Some name changes to instance variables in
2706 this class due to the change to accommodate this change.
2707 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above.
2708 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
2709 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
2710 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
2711 (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder
2712 block can be removed in its entirety after the insertion.
2713 * khtml/editing/htmlediting.h: Update header accordingly.
2714 * khtml/khtml_part.cpp:
2715 (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before
2716 doing check when the position is in an empty block (this makes sure any style on any block
2717 placeholder is accounted for).
2719 New layout tests to check bug fix.
2721 * layout-tests/editing/style/block-style-004-expected.txt: Added.
2722 * layout-tests/editing/style/block-style-004.html: Added.
2723 * layout-tests/editing/style/block-style-005-expected.txt: Added.
2724 * layout-tests/editing/style/block-style-005.html: Added.
2725 * layout-tests/editing/style/block-style-006-expected.txt: Added.
2726 * layout-tests/editing/style/block-style-006.html: Added.
2728 Results updated to reflect new block placeholder code.
2730 * layout-tests/editing/inserting/insert-div-004-expected.txt
2731 * layout-tests/editing/inserting/insert-div-005-expected.txt
2732 * layout-tests/editing/inserting/insert-div-006-expected.txt
2733 * layout-tests/editing/inserting/insert-div-008-expected.txt
2734 * layout-tests/editing/inserting/insert-div-011-expected.txt
2735 * layout-tests/editing/inserting/insert-div-012-expected.txt
2736 * layout-tests/editing/inserting/insert-div-013-expected.txt
2737 * layout-tests/editing/inserting/insert-div-014-expected.txt
2738 * layout-tests/editing/inserting/insert-div-015-expected.txt
2739 * layout-tests/editing/inserting/insert-div-016-expected.txt
2740 * layout-tests/editing/inserting/insert-div-017-expected.txt
2741 * layout-tests/editing/inserting/insert-div-018-expected.txt
2742 * layout-tests/editing/inserting/insert-div-019-expected.txt
2743 * layout-tests/editing/inserting/insert-div-021-expected.txt
2744 * layout-tests/editing/inserting/insert-div-022-expected.txt
2745 * layout-tests/editing/inserting/insert-div-023-expected.txt
2746 * layout-tests/editing/inserting/insert-div-024-expected.txt
2748 2005-01-19 David Hyatt <hyatt@apple.com>
2750 Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the
2751 submission to occur. Fixes bug #3477282.
2755 (DOM::HTMLInputElementImpl::defaultEventHandler):
2757 2005-01-18 Richard Williamson <rjw@apple.com>
2759 Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
2761 Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
2762 Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
2763 Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
2764 Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
2766 We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
2767 tags. Also, if any of these elements are named they can be accessed from the document or window objects.
2768 Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
2772 * khtml/dom/html_document.cpp:
2773 (HTMLDocument::objects):
2774 * khtml/dom/html_document.h:
2775 * khtml/ecma/kjs_dom.cpp:
2776 (DOMDocumentProtoFunc::tryCall):
2777 (DOMElementProtoFunc::tryCall):
2778 (KJS::getRuntimeObject):
2779 * khtml/ecma/kjs_dom.h:
2780 * khtml/ecma/kjs_html.cpp:
2781 (KJS::HTMLDocument::tryGet):
2782 (KJS::HTMLElement::tryGet):
2783 (KJS::HTMLCollection::tryGet):
2784 (KJS::HTMLCollection::getNamedItems):
2785 * khtml/ecma/kjs_window.cpp:
2787 * khtml/html/html_miscimpl.cpp:
2788 (HTMLCollectionImpl::traverseNextItem):
2789 * khtml/html/html_miscimpl.h:
2790 (DOM::HTMLCollectionImpl::):
2791 * khtml/html/html_objectimpl.cpp:
2792 (HTMLAppletElementImpl::getAppletInstance):
2793 (HTMLObjectElementImpl::HTMLObjectElementImpl):
2794 (HTMLObjectElementImpl::getObjectInstance):
2795 * khtml/html/html_objectimpl.h:
2796 * khtml/rendering/render_frames.cpp:
2797 (RenderPartObject::updateWidget):
2798 * kwq/KWQKHTMLPart.h:
2799 * kwq/KWQKHTMLPart.mm:
2800 (KWQKHTMLPart::getObjectInstanceForView):
2802 2005-01-18 David Hyatt <hyatt@apple.com>
2804 Fix for 3948123, rolling over link erases nearby text. The repaint rect check for lines was wrong whenever
2805 two lines overlapped.
2807 Reviewed by kocienda
2809 * khtml/rendering/render_flow.cpp:
2810 (RenderFlow::paintLines):
2812 2005-01-18 Ken Kocienda <kocienda@apple.com>
2818 <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages
2820 * khtml/rendering/render_flow.cpp:
2821 (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around
2822 outermost contenteditable elements.
2824 2005-01-18 David Harrison <harrison@apple.com>
2828 <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not
2830 * kwq/KWQAccObject.mm:
2831 (-[KWQAccObject accessibilityFocusedUIElement]):
2832 Return parentObjectUnignored if focused object is ignored.
2834 2005-01-18 Ken Kocienda <kocienda@apple.com>
2840 <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment
2842 * khtml/editing/selection.cpp:
2843 (khtml::nodeForInlineBox): New helper function used in reimplementation of function below.
2844 (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when
2845 I had a less than full understanding of line layout. I can do better now, and my new version no
2846 longer fails to notice attachments when doing the kind of navigation mentioned in the bug.
2848 2005-01-17 David Harrison <harrison@apple.com>
2850 Reviewed by John Sullivan.
2852 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
2853 <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker
2855 Also fixed sentence support in the same way.
2857 * kwq/KWQAccObject.mm:
2858 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2859 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
2860 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2861 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
2862 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
2863 Move one position in desired direction before calling visible_units.cpp code.
2865 2005-01-17 David Harrison <harrison@apple.com>
2867 Updated expected test results.
2869 <rdar://problem/3945880> line-ending space seems not to be present
2871 * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt:
2872 * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt:
2873 * layout-tests/editing/inserting/insert-div-020-expected.txt:
2874 * layout-tests/editing/inserting/insert-div-021-expected.txt:
2875 * layout-tests/editing/inserting/insert-div-022-expected.txt:
2876 * layout-tests/editing/inserting/insert-div-023-expected.txt:
2877 * layout-tests/editing/inserting/insert-div-024-expected.txt:
2879 2005-01-17 David Harrison <harrison@apple.com>
2881 Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp).
2883 <rdar://problem/3945880> line-ending space seems not to be present
2885 * khtml/editing/selection.cpp:
2886 (khtml::Selection::validate):
2887 Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end.
2888 * khtml/rendering/bidi.cpp:
2889 (khtml::RenderBlock::findNextLineBreak):
2890 Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break).
2892 2005-01-17 Darin Adler <darin@apple.com>
2894 Reviewed by John Louch.
2896 - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate
2898 * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead
2899 of using mapToGlobal and screen in a complicated way.
2900 * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function.
2901 * kwq/KWQWindowWidget.h: Ditto.
2902 * kwq/KWQWindowWidget.mm: Ditto.
2904 2005-01-17 David Hyatt <hyatt@apple.com>
2906 Fix a screwup in rightmost/lowets position computation. 3955207. Make sure floats with layers are still checked.
2908 Reviewed by kocienda
2910 * khtml/rendering/render_block.cpp
2912 2005-01-17 Ken Kocienda <kocienda@apple.com>
2916 <rdar://problem/3953366> Problems with typing attributes in HTML compose
2918 * khtml/editing/htmlediting.cpp:
2919 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
2920 that tried to sense when typing style could be cleared without actually doing a style diff between
2921 before-delete and after-delete positions. Removing this extra check and running the
2922 general-purpose code fixes the bug.
2924 2005-01-17 Richard Williamson <rjw@apple.com>
2926 Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
2928 Keep track of originating execution context and target execution
2929 context for native JS object wrappers, and perform appropriate
2932 Reviewed by David Harrison.
2934 * khtml/ecma/kjs_binding.cpp:
2935 (ScriptInterpreter::isGlobalObject):
2936 (ScriptInterpreter::isSafeScript):
2937 (ScriptInterpreter::interpreterForGlobalObject):
2938 * khtml/ecma/kjs_binding.h:
2939 * khtml/ecma/kjs_window.cpp:
2940 (Window::interpreter):
2941 (Window::isSafeScript):
2942 * khtml/ecma/kjs_window.h:
2943 * kwq/DOMInternal.mm:
2944 (-[WebScriptObject _initializeScriptDOMNodeImp]):
2945 * kwq/KWQKHTMLPart.mm:
2946 (KWQKHTMLPart::windowScriptObject):
2947 (KWQKHTMLPart::windowScriptNPObject):
2948 * kwq/WebCoreBridge.mm:
2950 (-[WebCoreBridge init]):
2952 2005-01-17 Ken Kocienda <kocienda@apple.com>
2958 <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with
2959 "size up" and "size down" NSFontManager changes
2961 * khtml/css/cssparser.cpp:
2962 (CSSParser::parseValue): Add support for parsing new font size delta property.
2963 * khtml/css/cssproperties.c: Generated file.
2964 * khtml/css/cssproperties.h: Ditto.
2965 * khtml/css/cssproperties.in: Add support for parsing new font size delta property.
2966 * khtml/editing/htmlediting.cpp:
2967 (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
2968 (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
2969 and running command to do the removal.
2970 (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
2971 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle
2972 relative font size changes.
2973 (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
2974 before or equal to the end. Swap them if not true. I ran into this problem in some similar code in
2975 applyRelativeFontStyleChange(). Moving that goodness here too.
2976 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
2977 Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
2978 I use the bool return value now (I obviously did not need it before).
2979 (khtml::ApplyStyleCommand::computedFontSize): New helper function.
2980 (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
2981 (khtml::createStyleSpanElement): Ditto.
2982 * khtml/editing/htmlediting.h: Update header accordingly.
2983 * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
2985 (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
2986 (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
2987 * kwq/DOMPrivate.h: Declare new conveniences.
2988 * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
2989 * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
2990 * layout-tests/editing/style/relative-font-size-change-001.html: Added.
2991 * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
2992 * layout-tests/editing/style/relative-font-size-change-002.html: Added.
2993 * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
2994 * layout-tests/editing/style/relative-font-size-change-003.html: Added.
2995 * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
2996 * layout-tests/editing/style/relative-font-size-change-004.html: Added.
2998 2005-01-14 Darin Adler <darin@apple.com>
3000 * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
3001 * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
3002 * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
3003 * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
3005 2005-01-14 Chris Blumenberg <cblu@apple.com>
3007 Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page
3011 (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
3012 (KWQKHTMLPart::mousePressNode): new
3013 * kwq/KWQPageState.h:
3014 * kwq/KWQPageState.mm:
3015 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
3016 (-[KWQPageState clear]): clear the mousePressNode
3017 (-[KWQPageState dealloc]): deref the mousePressNode
3018 (-[KWQPageState mousePressNode]): new
3022 2005-01-13 Vicki Murley <vicki@apple.com>
3026 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
3028 * WebCore.pbproj/project.pbxproj: bump "2004" to "2005"
3030 2005-01-13 David Harrison <harrison@apple.com>
3032 Reviewed by Ken Kocienda.
3034 Better fix for 3905066.
3036 * khtml/editing/htmlediting.cpp:
3037 (khtml::InsertParagraphSeparatorCommand::doApply):
3039 2005-01-10 Maciej Stachowiak <mjs@apple.com>
3043 <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
3045 * khtml/rendering/render_text.cpp:
3046 (InlineTextBox::paint): Support painting custom underline markers for
3047 marked text in place of generic yellow.
3048 (InlineTextBox::paintMarkedTextUnderline): New method that handles this.
3049 * khtml/rendering/render_text.h:
3050 * kwq/KWQKHTMLPart.h: Declare new methods and structs.
3051 * kwq/KWQKHTMLPart.mm:
3052 (KWQKHTMLPart::clear): Clear marked test underlines.
3053 (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
3054 (convertAttributesToUnderlines): Converts NSAttributedString attributes
3055 to simplified and C++-friendly form.
3056 (KWQKHTMLPart::markedTextUsesUnderlines): New method.
3057 (KWQKHTMLPart::markedTextUnderlines): New method.
3058 * kwq/KWQPainter.mm:
3059 (QPainter::drawLineForText): Handle pen width.
3060 * kwq/WebCoreBridge.h:
3061 * kwq/WebCoreBridge.mm:
3062 (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
3064 * kwq/WebCoreTextRenderer.h:
3066 2005-01-12 David Harrison <harrison@apple.com>
3068 Reviewed by Dave Hyatt.
3070 <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
3072 * kwq/KWQAccObject.mm:
3073 (-[KWQAccObject addChildrenToArray:]):
3074 Use the widget's outer view.
3076 2005-01-12 David Harrison <harrison@apple.com>
3078 Reviewed by Darin Adler.
3080 <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute
3082 * khtml/xml/dom_nodeimpl.cpp:
3083 (NodeImpl::displayNode):
3084 Add quotes around text node content.
3085 (NodeBaseImpl::childNode):
3086 Add nil check to return nil rather than crash when child node not found.
3087 * kwq/KWQAccObject.mm:
3088 (-[KWQAccObject doAXStringForTextMarkerRange:]):
3089 Pass range compliant positions to TextIterator.
3091 2005-01-12 David Hyatt <hyatt@apple.com>
3093 Fix for 3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during
3094 line layout is smarter about including the overflow for both old states and new states.
3098 * khtml/rendering/bidi.cpp:
3099 (khtml::RenderBlock::layoutInlineChildren):
3101 2005-01-12 David Hyatt <hyatt@apple.com>
3103 Fix for bug 3937608, versiontracker.com flashes and displays the right column below content. Make sure to move
3104 tables/overflows that dont fit within a block only in strict mode.
3106 Fix for bug 3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific
3107 case in editing is hit.
3109 Reviewed by darin (first one), kocienda (second one)
3111 * khtml/rendering/render_block.cpp:
3112 (khtml::RenderBlock::getClearDelta):
3113 * khtml/rendering/render_flow.cpp:
3114 (RenderFlow::dirtyLinesFromChangedChild):
3115 * khtml/rendering/render_line.cpp:
3116 (khtml::InlineFlowBox::verticallyAlignBoxes):
3118 2005-01-12 Ken Kocienda <kocienda@apple.com>
3124 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
3126 * khtml/editing/htmlediting.cpp:
3127 (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
3128 merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
3129 added to visible_position files.
3130 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
3131 tests to determine when to stop moving nodes more complete and correct. Also improved comments.
3132 * khtml/editing/visible_position.cpp:
3133 (khtml::isFirstVisiblePositionInParagraph): New function.
3134 (khtml::isLastVisiblePositionInParagraph): New function.
3135 * khtml/editing/visible_position.h: Update header accordingly.
3136 * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
3137 results but still correct.
3138 * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
3139 * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
3140 * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
3141 * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
3142 * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
3143 * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
3144 * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
3145 * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
3146 * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
3147 * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
3149 2005-01-11 Richard Williamson <rjw@apple.com>
3151 Fixed 3922875. Fall back to DOM object is EMBED element
3152 has no associated runtime object.
3156 * khtml/ecma/kjs_dom.cpp:
3157 (KJS::getRuntimeObject):
3158 * khtml/ecma/kjs_html.cpp:
3159 (KJS::HTMLDocument::tryGet):
3160 (KJS::HTMLElement::tryGet):
3161 (KJS::HTMLCollection::tryGet):
3162 (KJS::HTMLCollection::getNamedItems):
3164 2005-01-11 David Hyatt <hyatt@apple.com>
3166 Fix for 3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match
3171 * khtml/html/htmltokenizer.cpp:
3172 (khtml::HTMLTokenizer::parseTag):
3174 2005-01-11 Chris Blumenberg <cblu@apple.com>
3176 Fixed: <rdar://problem/3930733> Mail prints second page of email blank
3180 * khtml/rendering/render_canvas.cpp:
3181 (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
3182 * khtml/rendering/render_flow.cpp:
3183 (RenderFlow::paintLines): removed null check since the print rect should never be null
3184 * khtml/rendering/render_list.cpp:
3185 (RenderListMarker::paint): ditto
3186 * kwq/KWQKHTMLPart.mm:
3187 (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
3189 2005-01-10 Ken Kocienda <kocienda@apple.com>
3195 <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply
3197 * khtml/editing/htmlediting.cpp:
3198 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a
3199 simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the
3200 result calculated in that deeper scope was not available when tested.
3202 2005-01-10 Ken Kocienda <kocienda@apple.com>
3208 <rdar://problem/3946852> Option-e goes to next line
3210 * khtml/editing/htmlediting.cpp:
3211 (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
3212 into the start line is done. We plan to change pretty substantially soon to better handle
3213 the problem described in <rdar://problem/3937352> Quote level not maintained when copied
3214 and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
3216 2005-01-10 Ken Kocienda <kocienda@apple.com>
3222 <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines
3224 * khtml/editing/htmlediting.cpp:
3225 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
3226 to their own blocks if needed so that a block style can be applied.
3227 (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
3228 (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
3229 (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
3230 This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
3231 paragraph is styled.
3232 (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
3233 Should remove attributue instead.
3234 * khtml/editing/htmlediting.h: Touch function declarations accordingly.
3235 * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
3236 * layout-tests/editing/style/create-block-for-style-001.html: Added.
3237 * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
3238 * layout-tests/editing/style/create-block-for-style-002.html: Added.
3239 * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
3240 * layout-tests/editing/style/create-block-for-style-003.html: Added.
3241 * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
3242 * layout-tests/editing/style/create-block-for-style-004.html: Added.
3243 * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
3244 * layout-tests/editing/style/create-block-for-style-005.html: Added.
3245 * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
3246 * layout-tests/editing/style/create-block-for-style-006.html: Added.
3247 * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
3248 * layout-tests/editing/style/create-block-for-style-007.html: Added.
3249 * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
3250 * layout-tests/editing/style/create-block-for-style-008.html: Added.
3251 * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
3252 * layout-tests/editing/style/create-block-for-style-009.html: Added.
3253 * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
3254 * layout-tests/editing/style/create-block-for-style-010.html: Added.
3255 * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
3256 * layout-tests/editing/style/create-block-for-style-011.html: Added.
3257 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
3258 * layout-tests/editing/style/create-block-for-style-012.html: Added.
3259 * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
3260 * layout-tests/editing/style/create-block-for-style-013.html: Added.
3262 Unrelated updates to these expected results.
3263 * layout-tests/editing/inserting/insert-div-007-expected.txt
3264 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
3266 2005-01-10 Chris Blumenberg <cblu@apple.com>
3268 Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print
3272 * khtml/rendering/render_flow.cpp:
3273 (RenderFlow::paintLines): don't do pagination work if printRect is not set
3274 * khtml/rendering/render_list.cpp:
3275 (RenderListMarker::paint): ditto
3277 2005-01-10 David Harrison <harrison@apple.com>
3281 * kwq/KWQTextUtilities.mm:
3282 (currentTextBreakLocaleID):
3283 Return empty string (AKA root locale) if locale pref can not be canonicalized.
3285 2005-01-10 John Sullivan <sullivan@apple.com>
3287 Fixed broken Panther build.
3289 * kwq/KWQTextUtilities.mm:
3290 (currentTextBreakLocaleID):
3291 This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
3292 That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
3293 To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
3294 function. However, the Tiger-only code was wrong; the string generated using
3295 CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
3298 2005-01-09 David Harrison <harrison@apple.com>
3300 Reviewed by Ken Kocienda.
3302 <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
3304 * khtml/editing/htmlediting.cpp:
3305 (khtml::ReplaceSelectionCommand::doApply):
3306 Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
3308 2005-01-09 Darin Adler <darin@apple.com>
3310 Reviewed by Harrison.
3312 - fixed <rdar://problem/3939176> select() method does not work on <input type=search>
3314 * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
3315 to a switch statement. Added SEARCH to the set of types that treat the renderer as a
3318 2005-01-09 David Harrison <harrison@apple.com>
3320 Reviewed by Ken Kocienda.
3322 <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
3324 Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
3325 whitespace to a single non-breaking space when splitting a text node.
3327 * khtml/editing/htmlediting.cpp:
3328 (khtml::InsertParagraphSeparatorCommand::doApply):
3330 2005-01-08 Kevin Decker <kdecker@apple.com>
3334 Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
3336 * khtml/html/html_elementimpl.cpp:
3337 (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
3339 2005-01-07 Maciej Stachowiak <mjs@apple.com>
3343 <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
3345 * Khtml/khtml_part.cpp:
3346 (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
3347 not started loading yet so it could not possibly be finishing here...
3348 (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
3349 no document, in this case we must have hit an error or been loading a non-HTML
3351 * khtml/khtml_part.h:
3353 2005-01-08 David Harrison <harrison@apple.com>
3357 <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
3359 * khtml/editing/selection.cpp:
3360 (khtml::Selection::validate):
3361 Tune word selections left/right choice to use right if on empty last line.
3363 2005-01-07 David Harrison <harrison@apple.com>
3367 <rdar://problem/3942619> AX: Support sentence ax attributes
3369 Needed to use the unicode utilities properly. Twas lame before.
3371 * khtml/editing/visible_units.cpp:
3372 (khtml::previousBoundary):
3373 (khtml::nextBoundary):
3374 (khtml::startOfWord):
3376 (khtml::previousWordPosition):
3377 (khtml::nextWordPosition):
3378 (khtml::startOfSentence):
3379 (khtml::endOfSentence):
3380 (khtml::previousSentencePosition):
3381 (khtml::nextSentencePosition):
3382 * kwq/KWQAccObject.mm:
3383 (-[KWQAccObject accessibilityAttributeNames]):
3384 (-[KWQAccObject accessibilityAttributeValue:]):
3385 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3386 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
3387 * kwq/KWQTextUtilities.mm:
3388 (currentTextBreakLocaleID):
3389 (KWQFindSentenceBoundary):
3390 (KWQFindNextSentenceFromIndex):
3392 2005-01-07 Ken Kocienda <kocienda@apple.com>
3398 <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
3399 <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
3401 * khtml/editing/htmlediting.cpp:
3402 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
3403 Merge the typing style with the computed style for the current position. Fixes both bugs.
3404 * khtml/editing/htmlediting.h:
3405 * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
3406 * layout-tests/editing/inserting/insert-div-023.html: Added.
3407 * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
3408 * layout-tests/editing/inserting/insert-div-024.html: Added.
3410 2005-01-07 David Hyatt <hyatt@apple.com>
3412 Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
3413 behavior on worldofwarcraft.com.
3417 * khtml/rendering/render_table.cpp:
3418 (RenderTable::layout):
3420 2005-01-06 David Hyatt <hyatt@apple.com>
3422 Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables. Bulletproof the hit testing to
3423 ignore inline flows in this case.
3427 * khtml/rendering/render_block.cpp:
3428 (khtml::RenderBlock::nodeAtPoint):
3430 2005-01-07 Ken Kocienda <kocienda@apple.com>
3436 <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view
3438 * kwq/KWQKHTMLPart.mm:
3439 (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
3440 in the document, or if it is not a descendent of the document element. In the case of the bug,
3441 since the selection has not yet been set up, the focus node passed here is the HTML element, and
3442 that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
3444 2005-01-06 Kevin Decker <kdecker@apple.com>
3448 Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
3450 * khtml/khtml_part.cpp:
3451 (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.
3455 2005-01-06 David Harrison <harrison@apple.com>
3459 (addendum to previous checkin for this bug)
3460 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
3462 Fix line navigation. Add AXUIElementForTextMarker.
3464 * kwq/KWQAccObject.mm:
3465 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3466 (-[KWQAccObject doAXUIElementForTextMarker:]):
3467 (-[KWQAccObject doAXLineForTextMarker:]):
3468 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
3469 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
3470 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
3471 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
3472 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
3474 2005-01-06 Darin Adler <darin@apple.com>
3478 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
3480 (turns out the PLT regression was a false alarm)
3482 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
3483 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
3485 * khtml/html/htmlparser.cpp:
3486 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
3487 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
3488 to eliminate code that used ID_CLOSE_TAG for an array size.
3489 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
3490 that manages isindex to use deref instead of delete.
3491 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
3492 mistake of using ID_CLOSE_TAG for the array size too.
3493 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
3494 there and it would prevent custom tags from working. Added range check before using the forbidden
3495 tag array with the token ID since custom tags will use index values past the end of the array.
3496 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
3497 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
3498 createElement call is still here. Last time I left out a few form element types from this switch;
3500 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
3501 document if getTagID fails; this creates a unique per-document ID.
3503 * khtml/misc/htmltags.c: Regenerated.
3504 * khtml/misc/htmltags.h: Regenerated.
3506 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
3507 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
3508 Also rewrote getTagName to work with the new scheme.
3510 2005-01-06 David Harrison <harrison@apple.com>
3512 Fixed Panther build. Also, do not advertize sentence support since it is incomplete.
3514 * kwq/KWQAccObject.mm:
3515 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
3516 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3517 (-[KWQAccObject accessibilityIsAttributeSettable:]):
3519 2005-01-06 David Harrison <harrison@apple.com>
3521 Reviewed by Dave Hyatt.
3523 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
3524 <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
3526 Many more AX attributes supported. Numerous fixes to previous AX work.
3528 * khtml/editing/visible_units.cpp:
3529 (khtml::startSentenceBoundary):
3530 (khtml::startOfSentence):
3531 (khtml::endSentenceBoundary):
3532 (khtml::endOfSentence):
3533 (khtml::previousSentencePositionBoundary):
3534 (khtml::previousSentencePosition):
3535 (khtml::nextSentencePositionBoundary):
3536 (khtml::nextSentencePosition):
3537 * khtml/editing/visible_units.h:
3538 * khtml/khtmlview.cpp:
3539 (KHTMLView::layout):
3540 * khtml/misc/helper.cpp:
3541 (khtml::findSentenceBoundary):
3542 (khtml::nextSentenceFromIndex):
3543 * khtml/misc/helper.h:
3544 * khtml/misc/htmltags.c:
3547 * khtml/rendering/render_container.cpp:
3548 (RenderContainer::removeChildNode):
3549 (RenderContainer::appendChildNode):
3550 (RenderContainer::insertChildNode):
3551 * khtml/rendering/render_object.cpp:
3552 (RenderObject::remove):
3553 * khtml/xml/dom_docimpl.cpp:
3554 (DocumentImpl::getAccObjectCache):
3555 (DocumentImpl::updateSelection):
3556 (DocumentImpl::close):
3557 (DocumentImpl::setFocusNode):
3558 (DocumentImpl::parentDocument):
3559 (DocumentImpl::topDocument):
3560 * khtml/xml/dom_docimpl.h:
3561 * kwq/KWQAccObject.mm:
3562 (-[KWQAccObject accessibilityShouldUseUniqueId]):
3563 (-[KWQAccObject detach]):
3564 (-[KWQAccObject anchorElement]):
3565 (-[KWQAccObject firstChild]):
3566 (-[KWQAccObject lastChild]):
3567 (-[KWQAccObject previousSibling]):
3568 (-[KWQAccObject nextSibling]):
3569 (-[KWQAccObject parentObject]):
3570 (-[KWQAccObject value]):
3571 (-[KWQAccObject accessibilityAttributeNames]):
3572 (-[KWQAccObject accessibilityPerformAction:]):
3573 (-[KWQAccObject textMarkerForVisiblePosition:]):
3574 (-[KWQAccObject visiblePositionForTextMarker:]):
3575 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
3576 (-[KWQAccObject topDocument]):
3577 (-[KWQAccObject topRenderer]):
3578 (-[KWQAccObject topView]):
3579 (-[KWQAccObject accessibilityAttributeValue:]):
3580 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3581 (-[KWQAccObject doAXLineForTextMarker:]):
3582 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
3583 (-[KWQAccObject doAXStringForTextMarkerRange:]):
3584 (-[KWQAccObject doAXTextMarkerForPosition:]):
3585 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
3586 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
3587 (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
3588 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
3589 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
3590 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
3591 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
3592 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
3593 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
3594 (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
3595 (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
3596 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
3597 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
3598 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
3599 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
3600 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
3601 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
3602 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
3603 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
3604 (-[KWQAccObject doAXLengthForTextMarkerRange:]):
3605 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
3606 (-[KWQAccObject accessibilityHitTest:]):
3607 (-[KWQAccObject accessibilityFocusedUIElement]):
3608 (-[KWQAccObject accessibilityIsAttributeSettable:]):
3609 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
3610 (-[KWQAccObject setAccObjectID:]):
3611 (-[KWQAccObject removeAccObjectID]):
3612 * kwq/KWQAccObjectCache.h:
3613 * kwq/KWQAccObjectCache.mm:
3614 (KWQAccObjectCache::setAccObject):
3615 (KWQAccObjectCache::removeAccObject):
3616 (KWQAccObjectCache::visiblePositionForTextMarker):
3617 (KWQAccObjectCache::postNotificationToTopWebArea):
3618 (KWQAccObjectCache::postNotification):
3619 (KWQAccObjectCache::handleFocusedUIElementChanged):
3620 * kwq/KWQKHTMLPart.mm:
3621 (KWQKHTMLPart::respondToChangedContents):
3622 * kwq/KWQTextUtilities.h:
3623 * kwq/KWQTextUtilities.mm:
3624 (KWQFindNextWordFromIndex):
3625 (KWQFindSentenceBoundary):
3626 (KWQFindNextSentenceFromIndex):
3627 * kwq/WebCoreBridge.mm:
3628 (-[WebCoreBridge accessibilityTree]):
3630 2005-01-05 Darin Adler <darin@apple.com>
3634 - re-landing a subset of my custom tag change that does not fix the bug, but also does
3635 not introduce a performance regression
3637 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
3638 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
3640 * khtml/editing/htmlediting.cpp:
3641 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
3642 per-document tags and is just better all around for things like the document.
3643 (khtml::debugNode): Ditto.
3644 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
3645 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
3646 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
3647 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
3649 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
3650 non-HTML elements to be nested as desired.
3652 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
3653 * khtml/misc/htmlhashes.cpp:
3654 (khtml::getTagID): Changed return type to unsigned short.
3655 (khtml::getAttrID): Ditto.
3657 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
3658 * khtml/xml/dom_docimpl.cpp:
3659 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
3660 Also updated for a few tags that the parser handled but this did not.
3662 * kwq/KWQRenderTreeDebug.cpp:
3663 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
3664 the tag ID directly, which only works for standard nodes.
3665 (operator<<): Update to call getTagName.
3666 (nodePositionRelativeToRoot): Ditto.
3667 (writeSelection): Ditto.
3669 2005-01-05 Ken Kocienda <kocienda@apple.com>
3675 <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place
3677 * khtml/editing/htmlediting.cpp:
3678 (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
3679 this operation work correctly, particularly in the logic to figure out whether to merge content, and
3680 also performing merges.
3681 * khtml/editing/visible_position.cpp:
3682 (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
3683 * khtml/editing/visible_units.cpp:
3684 (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
3685 (khtml::isEndOfParagraph): Ditto.
3686 * khtml/editing/visible_units.h: Declare new functions.
3688 2005-01-04 Ken Kocienda <kocienda@apple.com>
3694 <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
3696 * khtml/editing/htmlediting.cpp:
3697 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
3698 for the block we are adding was being done at the wrong time, which led to the placeholder remaining
3699 in the document when it was not needed. This resulted in the extra space reported in the bug.
3701 2005-01-04 Kevin Decker <kdecker@apple.com>
3705 Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
3707 * khtml/rendering/render_block.cpp:
3708 (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.
3710 2005-01-04 David Hyatt <hyatt@apple.com>
3712 Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
3716 * khtml/rendering/render_layer.cpp:
3717 (RenderLayer::updateScrollInfoAfterLayout):
3719 2005-01-04 Ken Kocienda <kocienda@apple.com>
3723 Fix for these two bugs:
3725 <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content
3726 <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
3728 * khtml/editing/htmlediting.cpp:
3729 (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge
3730 neither start nor end. For 3939148, improve the code which adjusts the insertion point during
3731 the process of pasting. It formerly handled only one of the possible cases.
3732 * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
3733 * layout-tests/editing/pasteboard/paste-text-015.html: Added.
3735 2005-01-04 David Hyatt <hyatt@apple.com>
3737 Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
3741 * khtml/rendering/render_form.cpp:
3742 (RenderLineEdit::updateFromElement):
3743 * kwq/KWQLineEdit.mm:
3744 (QLineEdit::setPlaceholderString):
3746 2005-01-04 David Hyatt <hyatt@apple.com>
3748 Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when
3749 returning pseudo-styles.
3753 * khtml/css/cssstyleselector.cpp:
3754 (khtml::CSSStyleSelector::matchRulesForList):
3755 (khtml::CSSStyleSelector::pseudoStyleForElement):
3756 * khtml/rendering/render_style.cpp:
3757 (RenderStyle::addPseudoStyle):
3759 2005-01-04 Darin Adler <darin@apple.com>
3761 - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
3763 * khtml/css/cssstyleselector.cpp:
3764 * khtml/editing/htmlediting.cpp:
3765 * khtml/editing/selection.cpp:
3766 * khtml/editing/visible_position.cpp:
3767 * khtml/html/dtd.cpp:
3768 * khtml/html/htmlparser.cpp:
3769 * khtml/html/htmlparser.h:
3770 * khtml/html/htmltokenizer.cpp:
3771 * khtml/misc/htmlhashes.cpp:
3772 * khtml/misc/htmlhashes.h:
3773 * khtml/misc/htmltags.c:
3774 * khtml/misc/htmltags.h:
3775 * khtml/misc/maketags:
3776 * khtml/xml/dom_docimpl.cpp:
3777 * khtml/xml/dom_docimpl.h:
3778 * khtml/xml/dom_nodeimpl.cpp:
3779 * khtml/xml/dom_position.cpp:
3780 * kwq/KWQRenderTreeDebug.cpp:
3782 2005-01-04 Ken Kocienda <kocienda@apple.com>
3788 <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered
3790 * khtml/editing/htmlediting.cpp:
3791 (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
3792 a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
3793 to be applied. Now the code will detect when at the end of a style run and will not move and apply
3794 that ending style to the new paragraph, though it will place that style into the typing style. This
3795 seems to match NSText behavior.
3796 * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
3797 here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
3798 not have any visible effect on the document.
3799 * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
3800 * layout-tests/editing/inserting/insert-div-022.html: Added.
3802 2005-01-04 David Hyatt <hyatt@apple.com>
3804 Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
3809 * khtml/rendering/render_flow.cpp:
3810 (RenderFlow::paintLines):
3812 2005-01-03 David Hyatt <hyatt@apple.com>
3814 Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint flag setting more
3815 robust and make it work regardless of which objects get a layout or not.
3819 * khtml/rendering/render_block.cpp:
3820 (khtml::RenderBlock::insertFloatingObject):
3821 (khtml::RenderBlock::addOverhangingFloats):
3822 (khtml::RenderBlock::addIntrudingFloats):
3823 * khtml/rendering/render_block.h:
3824 (khtml::RenderBlock::FloatingObject::FloatingObject):
3826 2005-01-03 Maciej Stachowiak <mjs@apple.com>
3830 <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
3832 * khtml/html/html_miscimpl.cpp:
3833 (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
3834 it should not ever be (now).
3835 (HTMLCollectionImpl::item): When traversing items stop when we hit
3836 nil, meaning the end to avoid triggering above assert (formerly crash).
3838 2005-01-03 Maciej Stachowiak <mjs@apple.com>
3840 Reviewed by John and Kevin.
3842 <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
3844 * khtml/ecma/kjs_window.cpp:
3845 (Window::get): Look up frame names before buitin window properties
3846 to match other browsers. This regressed because we added a builtin
3847 "toolbar" property but this site had a frame with that name.
3849 2004-12-21 Maciej Stachowiak <mjs@apple.com>
3853 <rdar://problem/3888931> frame naming allows malicious site to br