1 2005-02-09 Chris Blumenberg <cblu@apple.com>
3 Fixed: <rdar://problem/3999213> Sometimes 2 Windows Media Player plugin instances are loaded
7 * khtml/html/html_objectimpl.cpp:
8 (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.
9 (HTMLObjectElementImpl::recalcStyle): ditto
11 2005-02-09 David Harrison <harrison@apple.com>
15 <rdar://problem/3937447> Mail-689: Arrow key navigation in new message body stops working when a line ends with a bold word
17 Added affinity to VisiblePosition. Changed Selection code to use affinity more.
19 (Partial) <rdar://problem/3982096> editing/pasteboard/paste-text-007 is failing
21 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.
23 * khtml/ecma/kjs_window.cpp:
24 (SelectionFunc::tryCall):
25 * khtml/editing/htmlediting.cpp:
26 (khtml::EditCommandPtr::setStartingSelection):
27 (khtml::EditCommandPtr::setEndingSelection):
28 (khtml::EditCommand::setStartingSelection):
29 (khtml::EditCommand::setEndingSelection):
30 (khtml::CompositeEditCommand::deleteInsignificantTextDownstream):
31 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
32 (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
33 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
34 (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
35 (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
36 (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
37 (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
38 (khtml::ApplyStyleCommand::joinChildTextNodes):
39 (khtml::DeleteSelectionCommand::initializePositionData):
40 (khtml::DeleteSelectionCommand::handleGeneralDelete):
41 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
42 (khtml::DeleteSelectionCommand::doApply):
43 (khtml::InsertLineBreakCommand::doApply):
44 (khtml::InsertParagraphSeparatorCommand::doApply):
45 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
46 (khtml::InsertTextCommand::input):
47 (khtml::MoveSelectionCommand::doApply):
48 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
49 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
50 (khtml::ReplaceSelectionCommand::doApply):
51 (khtml::ReplaceSelectionCommand::completeHTMLReplacement):
52 (khtml::ReplaceSelectionCommand::updateNodesInserted):
53 (khtml::TypingCommand::deleteKeyPressed):
54 (khtml::TypingCommand::forwardDeleteKeyPressed):
55 (khtml::TypingCommand::markMisspellingsAfterTyping):
56 * khtml/editing/htmlediting.h:
57 * khtml/editing/selection.cpp:
58 (khtml::Selection::Selection):
59 (khtml::Selection::init):
60 (khtml::Selection::moveTo):
61 (khtml::Selection::modifyExtendingRightForward):
62 (khtml::Selection::modifyMovingRightForward):
63 (khtml::Selection::modifyExtendingLeftBackward):
64 (khtml::Selection::modifyMovingLeftBackward):
65 (khtml::Selection::modify):
66 (khtml::Selection::xPosForVerticalArrowNavigation):
67 (khtml::Selection::clear):
68 (khtml::Selection::setBase):
69 (khtml::Selection::setExtent):
70 (khtml::Selection::setBaseAndExtent):
71 (khtml::Selection::layout):
72 (khtml::Selection::validate):
73 * khtml/editing/selection.h:
74 (khtml::Selection::startAffinity):
75 (khtml::Selection::endAffinity):
76 (khtml::Selection::baseAffinity):
77 (khtml::Selection::extentAffinity):
79 * khtml/editing/text_affinity.h:
81 * khtml/editing/visible_position.cpp:
82 (khtml::VisiblePosition::VisiblePosition):
83 (khtml::VisiblePosition::init):
84 (khtml::VisiblePosition::initUpstream):
85 (khtml::VisiblePosition::initDownstream):
86 (khtml::VisiblePosition::next):
87 (khtml::VisiblePosition::previous):
88 (khtml::startVisiblePosition):
89 (khtml::endVisiblePosition):
90 * khtml/editing/visible_position.h:
91 (khtml::VisiblePosition::):
92 (khtml::VisiblePosition::VisiblePosition):
93 (khtml::VisiblePosition::affinity):
94 (khtml::VisiblePosition::setAffinity):
96 * khtml/editing/visible_units.cpp:
97 (khtml::previousBoundary):
98 (khtml::nextBoundary):
101 (khtml::previousLinePosition):
102 (khtml::nextLinePosition):
103 (khtml::startOfParagraph):
104 (khtml::endOfParagraph):
105 (khtml::previousParagraphPosition):
106 (khtml::nextParagraphPosition):
107 (khtml::startOfBlock):
109 (khtml::startOfDocument):
110 (khtml::endOfDocument):
111 * khtml/editing/visible_units.h:
112 * khtml/khtml_part.cpp:
113 (KHTMLPart::findTextNext):
114 (KHTMLPart::selectClosestWordFromMouseEvent):
115 (KHTMLPart::handleMousePressEventTripleClick):
116 (KHTMLPart::handleMousePressEventSingleClick):
117 (KHTMLPart::handleMouseMoveEventSelection):
118 (KHTMLPart::khtmlMouseReleaseEvent):
119 (KHTMLPart::selectAll):
120 (KHTMLPart::computeAndSetTypingStyle):
121 (KHTMLPart::selectionComputedStyle):
122 * khtml/rendering/render_br.cpp:
123 (RenderBR::positionForCoordinates):
124 * khtml/xml/dom_docimpl.cpp:
125 (DocumentImpl::updateSelection):
126 * khtml/xml/dom_nodeimpl.cpp:
127 (NodeBaseImpl::setFocus):
128 * khtml/xml/dom_position.cpp:
129 (DOM::Position::previousCharacterPosition):
130 (DOM::Position::nextCharacterPosition):
131 * khtml/xml/dom_position.h:
132 * kwq/KWQAccObject.mm:
133 (-[KWQAccObject value]):
134 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
135 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
136 (-[KWQAccObject accessibilityAttributeValue:]):
137 (-[KWQAccObject doAXLineForTextMarker:]):
138 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
139 (-[KWQAccObject doAXTextMarkerForPosition:]):
140 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
141 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
142 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
143 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
144 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
145 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
146 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
147 * kwq/KWQAccObjectCache.mm:
148 (KWQAccObjectCache::textMarkerForVisiblePosition):
149 (KWQAccObjectCache::visiblePositionForTextMarker):
150 * kwq/KWQKHTMLPart.mm:
151 (KWQKHTMLPart::findString):
152 (KWQKHTMLPart::advanceToNextMisspelling):
153 (KWQKHTMLPart::styleForSelectionStart):
154 (KWQKHTMLPart::baseWritingDirectionForSelectionStart):
155 (KWQKHTMLPart::setSelectionFromNone):
156 (KWQKHTMLPart::respondToChangedSelection):
157 * kwq/WebCoreBridge.mm:
158 (-[WebCoreBridge setSelectedDOMRange:affinity:]):
159 (-[WebCoreBridge selectionAffinity]):
160 (-[WebCoreBridge setMarkDOMRange:]):
161 (-[WebCoreBridge _visiblePositionForPoint:]):
162 (-[WebCoreBridge moveDragCaretToPoint:]):
163 (-[WebCoreBridge editableDOMRangeForPoint:]):
164 (-[WebCoreBridge ensureSelectionVisible]):
165 (-[WebCoreBridge rangeOfCharactersAroundCaret]):
167 2005-02-09 Chris Blumenberg <cblu@apple.com>
169 Fixed: <rdar://problem/3985211> Seed: Mail: Drag-and-drop destination indicator / insertion point disappears
171 Reviewed by kocienda.
173 * khtml/rendering/render_block.cpp:
174 (khtml::RenderBlock::paintCaret): new
175 (khtml::RenderBlock::paintObject): call paintCaret for the cursor caret and the drag caret
176 * khtml/rendering/render_block.h:
180 2005-02-08 Ken Kocienda <kocienda@apple.com>
186 <rdar://problem/3996344> Entire document content is deleted when only the first paragraph was supposed to be
188 Problem stems from my attempt to fix this bug: <rdar://problem/3986155> Insertion point goes
189 to beginning of doc after deleting.
191 I added an "optimization" that proved to do more harm than good. So, basically, the fix is to remove code.
193 * khtml/editing/htmlediting.cpp:
194 (khtml::DeleteSelectionCommand::handleGeneralDelete)
196 2005-02-07 Darin Adler <darin@apple.com>
200 - fixed <rdar://problem/3890352> REGRESSION (125-170, Panther-only): pasted textarea contents disappear (exception in NSText)
202 * kwq/KWQTextArea.mm: (-[KWQTextArea tile]): Don't resize the text view immediately here.
203 Use performWithDelay to defer it to avoid the re-entrancy that bothers the Panther version
204 of NSTextView. On Tiger, leave the code alone.
206 2005-02-07 Adele Amchan <adele@apple.com>
210 Fix for <rdar://problem/3993628> REGRESSION (180-181): Logitelnet bank's website doesn't work
212 This fixes an oversight in the fix for <rdar://problem/3964286>.
213 We're now making sure there is a document before calling checkCompleted in slotLoaderRequestDone.
214 That function is called even when other parts finish loads of their subresources, so we could end
215 up calling checkCompleted before we had a document. We also looked over all the other calls to
216 checkCompleted to convince ourselves no other call sites had a similar issue.
218 * khtml/khtml_part.cpp: (KHTMLPart::slotLoaderRequestDone): Check if doc is nil before calling
221 2005-02-07 Ken Kocienda <kocienda@apple.com>
227 <rdar://problem/3953302> Replacing quoted text ends up with blue-colored text that is not quoted
229 * khtml/editing/htmlediting.cpp:
230 (khtml::DeleteSelectionCommand::doApply): Removed special case delete code for select all. It was
231 causing as many bugs as it fixed. What's more, the design concept is a bit shaky. By removing
232 this special case, the bug goes away.
233 * khtml/editing/htmlediting.h: Remove declaration.
235 Test results using selectAll() updated to reflect changed behavior.
237 * layout-tests/editing/deleting/delete-3775172-fix-expected.txt:
238 * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
239 * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
240 * layout-tests/editing/inserting/insert-3654864-fix-expected.txt:
241 * layout-tests/editing/inserting/insert-3775316-fix-expected.txt:
242 * layout-tests/editing/inserting/insert-3851164-fix-expected.txt:
243 * layout-tests/editing/inserting/insert-3907422-fix-expected.txt:
244 * layout-tests/editing/pasteboard/paste-text-015-expected.txt:
246 2005-02-06 Darin Adler <darin@apple.com>
250 - fixed <rdar://problem/3994164> setting a new style attribute with setAttribute("style") doesn't blow away the old style
252 * khtml/css/css_valueimpl.h: Renamed parseProperty to parseDeclaration, since it's used to parse
253 an entire style declaration, not a single property.
254 * khtml/css/css_valueimpl.cpp: (DOM::CSSMutableStyleDeclarationImpl::parseDeclaration): Renamed,
255 and added code to clear m_values.
256 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Call function by its
257 new name, and remove some unnecessary comments.
259 2005-02-06 Darin Adler <darin@apple.com>
263 - fixed <rdar://problem/3993722> need oncut and onpaste handlers implemented for <textarea> (needed for widgets)
265 * kwq/KWQTextArea.mm:
266 (-[KWQTextAreaTextView dispatchHTMLEvent:]): Added.
267 (-[KWQTextAreaTextView cut:]): Dispatch "before cut" and "cut" events.
268 (-[KWQTextAreaTextView copy:]): Dispatch "before copy" and "copy" events.
269 (-[KWQTextAreaTextView paste:]): Dispatch "before paste" and "paste" events.
270 (-[KWQTextAreaTextView pasteAsPlainText:]): Ditto.
271 (-[KWQTextAreaTextView pasteAsRichText:]): Ditto.
273 2005-02-06 Darin Adler <darin@apple.com>
277 - fixed <rdar://problem/3943038> <input type=search> that is focused in onload handler doesn't have a visible editor
279 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::setFocusNode): Always update layout before giving focus to a widget.
280 This prevents the bad case where we give a widget focus before it has been positioned or sized, causing us to
281 exercise edge cases AppKit doesn't handle well.
283 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Remove workaround code I added
284 to fix bug 3943049. Updating the layout fixes the same problem in a cleaner, safer way, and solves another problem,
285 with the way the clip view is set up.
287 2005-02-06 Darin Adler <darin@apple.com>
291 - fixed <rdar://problem/3425232> textarea won't trigger onchange action when clicking to new field
293 * khtml/rendering/render_form.h: Added new m_dirty data member.
294 * khtml/rendering/render_form.cpp:
295 (RenderTextArea::RenderTextArea): Initialize m_dirty to false.
296 (RenderTextArea::detach): Call value() on the DOM element to cause it to fetch the value from this object.
297 (RenderTextArea::handleFocusOut): Ditto. Also send the onchange event based only on the m_dirty flag.
298 (RenderTextArea::updateFromElement): Clear the m_dirty flag if the edited value is blown away by a value
299 that comes from the DOM element. Remove code to clear the element's m_dirtyvalue flag; that's an unnecessary
300 optimization, and ideally we'll stop having code in the render object that knows about that flag later.
301 (RenderTextArea::slotTextChanged): Set the m_dirty flag.
303 2005-02-06 Darin Adler <darin@apple.com>
307 - re-fixed <rdar://problem/3760910> please add support for custom tag names in HTML
309 * khtml/xml/dom_docimpl.cpp:
310 (DocumentImpl::tagId): Use ID_LAST_TAG + 1 for the ID of the first assigned tag ID. Before we'd use ID_LAST_TAG,
311 which resulted in the same number being used for ID_COMMENT and the first custom tag.
312 (DocumentImpl::tagName): Use ID_LAST_TAG + 1, as above.
313 (DocumentImpl::namespaceURI): Change a < ID_LAST_TAG to <= ID_LAST_TAG in the same spirit as above.
315 2005-02-06 Darin Adler <darin@apple.com>
319 - fixed <rdar://problem/3986639> Crash occurs after choosing Undo Typing from the Edit menu
321 * kwq/KWQTextArea.mm: (-[KWQTextArea viewWillMoveToWindow:]): Remove actions from undo manager when the view is
322 removed from the window. Unfortunately, to do this the code has to know that the target of NSTextView actions
323 will be the text storage object, but given the NSText architecture, that's pretty clear.
325 2005-02-05 Chris Blumenberg <cblu@apple.com>
327 Fixed: <rdar://problem/3991974> REGRESSION: www.jabra.com world location screen does not work
331 * kwq/KWQKJavaAppletWidget.mm:
332 (KJavaAppletWidget::KJavaAppletWidget): fallback to the document's base URL if there is no baseURL attribute
333 * kwq/WebCoreBridge.h:
334 * kwq/WebCoreBridge.mm:
335 (-[WebCoreBridge baseURL]): new
337 2005-02-04 David Harrison <harrison@apple.com>
341 Rolled out Ken's accidental checkin when committing <rdar://problem/3986155> fix yesterday.
343 * khtml/editing/selection.cpp:
344 (khtml::Selection::validate):
346 2005-02-04 Adele Amchan <adele@apple.com>
350 Fix for <rdar://problem/3758785> Safari no longer works at BankOfAmerica online banking for military users
352 When closing the document, if a body doesn't exist we now create one. This bug was preventing the onload handler from
353 firing in cases where there wasn't a body. In the BankOfAmerica case, the page was just a bit of script where the onload
354 handler redirected to the correct page.
356 * khtml/xml/dom_docimpl.cpp: (DocumentImpl::close):
358 2005-02-03 Ken Kocienda <kocienda@apple.com>
364 <rdar://problem/3986155> Insertion point goes to beginning of doc after deleting
366 * khtml/editing/htmlediting.cpp:
367 (khtml::DeleteSelectionCommand::setStartNode): New convenience to handle reference counting when setting.
368 (khtml::DeleteSelectionCommand::handleGeneralDelete): This contains the crux of the bug fix. Improve tests
369 that detect when a selected node needs to be retained, rather than deleted, to preserve the intent of the user.
370 This has the side effect of causing the insertion point placement code to succeed rather than fail. Before
371 this fix, the failure of the insertion point placement code caused the insertion point to jump to the start
372 of the document, which is the symptom that can be perceived by users when editing.
373 * khtml/editing/htmlediting.h: Add setStartNode declaration.
374 * khtml/editing/visible_units.cpp:
375 (khtml::startOfBlock): This function had a stubbed-in non-tested implementation. Implement and
376 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt: Added.
377 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001.html: Added.
378 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt: Added.
379 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002.html: Added.
380 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: Added.
381 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003.html: Added.
382 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: Added.
383 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004.html: Added.
384 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt: Added.
385 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005.html: Added.
386 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt: Added.
387 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006.html: Added.
391 2005-02-03 Richard Williamson <rjw@apple.com>
393 Fixed <rdar://problem/3987419> Stocks and Weather leak what appears to XMLHTTPRequest results
395 XMLHTTPRequests were causing massive leaks. _webcore_initWithHeaderString: did funky things with
396 self replacement. Re-wrote to use more traditional factory constructor avoiding self replacement.
398 Reviewed by David Harrison.
401 (+[NSDictionary _webcore_dictionaryWithHeaderString:]):
403 (KWQServeSynchronousRequest):
405 2005-02-03 Chris Blumenberg <cblu@apple.com>
407 Fixed: <rdar://problem/3938763> Cannot view Windows Media Player videos (soundtrack is played twice with delay)
411 * khtml/html/html_objectimpl.cpp:
412 (HTMLObjectElementImpl::attach): set needWidgetUpdate to false right after calling updateWidget because dispatchHTMLEvent can end up calling this method again
413 (HTMLObjectElementImpl::recalcStyle): ditto
415 2005-02-02 John Sullivan <sullivan@apple.com>
419 - WebCore part of fix for <rdar://problem/3980651> REGRESSION (125-180): Huge number of pages printed from certain page,
422 This also fixes the problems with printing from GMail, yay!
424 * khtml/rendering/render_flow.cpp:
425 (RenderFlow::paintLines):
426 If the current line is taller than the entire page height (e.g. tall iFrame), don't try
427 to avoid splitting it across pages.
429 * kwq/WebCoreBridge.mm:
430 (-[WebCoreBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
431 Handle error cases in a more obvious manner; this will cause future problems like this
432 to print a blank page and complain to the console on debug builds, rather than print a
433 zillionty mostly-blank pages.
435 2005-02-02 Chris Blumenberg <cblu@apple.com>
437 Fixed: <rdar://problem/3960304> can't load a particular applet (at www.escape.de) unless it's the first applet to be loaded
441 * khtml/rendering/render_frames.cpp:
442 (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.
444 2005-02-02 Chris Blumenberg <cblu@apple.com>
446 Fixed: <rdar://problem/3983628> control-click on WebView is not selecting the word under the cursor (Mail, non-editable WebView)
450 * kwq/KWQKHTMLPart.mm:
451 (KWQKHTMLPart::sendContextMenuEvent): check if SPI to always enable selecting closest word is enabled
452 * kwq/WebCoreBridge.h:
454 2005-02-02 Ken Kocienda <kocienda@apple.com>
458 * khtml/editing/markup.cpp:
459 (khtml::createMarkup): Removed debug spam I committed earlier in error.
461 2005-02-02 Ken Kocienda <kocienda@apple.com>
467 <rdar://problem/3823109> WebKit should support -toggleBaseWritingDirection: (bidi editing support)
469 Since base writing direction is a paragraph-level property in AppKit, and we use the CSS direction
470 property in WebCore, which can be applied to inline elements as well as blocks, a new notion has
471 been added to the WebCore apply style logic. It is now possible to force all properties in a
472 style declaration to be applied as though they were block properties.
474 * khtml/editing/htmlediting.cpp:
475 (khtml::ApplyStyleCommand::ApplyStyleCommand): Add an enum and a flag to this command that controls whether to force all
476 properties in the style to be applied as block styles. Default is "no", retaining previous behavior.
477 (khtml::ApplyStyleCommand::doApply): Switch on new flag to apply styles as before, or force all preoperties to be applied
479 * khtml/editing/htmlediting.h:
480 (khtml::ApplyStyleCommand::): Add an enum and a flag, as above.
481 * khtml/khtml_part.cpp:
482 (KHTMLPart::applyParagraphStyle): New method to force application of all style properties as block styles.
483 * khtml/khtml_part.h: Update header declarations.
484 * kwq/KWQKHTMLPart.h: Update header declarations.
485 * kwq/KWQKHTMLPart.mm:
486 (KWQKHTMLPart::baseWritingDirectionForSelectionStart): Accessor to help WebKit do a toggle operation on
488 * kwq/WebCoreBridge.h: Update header declarations.
489 * kwq/WebCoreBridge.mm:
490 (-[WebCoreBridge applyParagraphStyle:withUndoAction:]): New method to force application of all style properties as block styles.
491 (-[WebCoreBridge baseWritingDirectionForSelectionStart]): Accessor to help WebKit do a toggle operation on
496 <rdar://problem/3985035> REGRESSION (Mail): Text copied from wrapped line contains extra character when pasted
498 * khtml/editing/markup.cpp:
499 (khtml::renderedText): Add an enum and a flag to this command that controls whether to force all
500 This is the result of an error in the code that computes the rendered text that is selected
501 when copying. Since spaces collapse at the end of lines, and these spaces need to be copied
502 when the selection spans line endings, code runs to compute this text. However, this code
503 was also running incorrectly in cases where lines wrapped. I have now added the missing
504 test to check that the selection does indeed extend to the end of the line.
507 2005-02-02 Ken Kocienda <kocienda@apple.com>
513 <rdar://problem/3984894> REGRESSION (Mail): Command-right-arrow in reply does the wrong thing (two ways)
514 <rdar://problem/3985130> REGRESSION (Mail): command-right-arrow in pasted RTF selects only up to tab
516 * khtml/editing/visible_units.cpp:
517 (khtml::endOfLine): Two separate problems in this new function recently added to take the place of
518 selectionForLine. In the first, endOfLine did not stop at BR elements, and returned the position
519 beyond them. In the second, the VisiblePosition constructor gives the wrong answer in certain cases.
520 Darin is going to work on a solution for that problem. In the meantime, I can fix the symptom of this
521 bug by going down to the last leaf child of the root line box; a one line change we will roll out when
524 2005-02-01 Richard Williamson <rjw@apple.com>
526 Fixed <rdar://problem/3985535> QT Plug-in JavaScript support now fails in <embed> tag only case
530 * khtml/ecma/kjs_html.cpp:
531 (KJS::HTMLDocument::tryGet):
533 2005-02-01 John Sullivan <sullivan@apple.com>
535 Written by Darin, reviewed and tested by me
537 - fixed <rdar://problem/3969684> Panther-only: extra blank lines between
538 pasted content from Blot
540 * kwq/KWQKHTMLPart.mm:
541 (KWQKHTMLPart::attributedString):
542 don't emit paragraph breaks if the margins are tiny; matches what
543 we do for plain-text conversion
547 2005-02-01 Ken Kocienda <kocienda@apple.com>
553 <rdar://problem/3985160> Deficiencies in pasting architecture blocking progress on other bugs
555 * khtml/editing/html_interchange.h: Move style span text used to mark element added to
556 add style to this header.
557 * khtml/editing/htmlediting.cpp:
558 (khtml::styleSpanClassString): Change to use constant moved to html_interchange.h.
559 (khtml::isStyleSpan): New helper function. Checks if this is a span we added to apply style.
560 (khtml::CompositeEditCommand::insertNodeBefore): Added an assert to check that the node
561 we are inserting before is not the body.
562 (khtml::CompositeEditCommand::insertNodeAfter): Ditto, but check is for after.
563 (khtml::ReplacementFragment::ReplacementFragment): Added code to process the "default style"
564 that is added by the copy code.
565 (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): first and last nodes inserted are
566 now member variables instead of function locals. Initialize them here.
567 (khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand): Deref first and last nodes inserted
569 (khtml::ReplaceSelectionCommand::doApply): Change design to fix the bug. Major change is to
570 separate out the code that inserts nodes into the tree so additional styling checks can
571 be done in a centralized way. Also got rid of the notion of "merging into the end block." That
572 concept was just wrong.
573 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Tweak interface now that first and
574 last nodes inserted are member variables.
575 (khtml::ReplaceSelectionCommand::insertNodeAfterAndUpdateNodesInserted): New helper used
576 by replace code to do the stated DOM operation and update state internal to the command.
577 This will also be a catch point to handle the kinds of additional style checks needed to
578 make paste work right.
579 (khtml::ReplaceSelectionCommand::insertNodeAtAndUpdateNodesInserted): Ditto.
580 (khtml::ReplaceSelectionCommand::insertNodeBeforeAndUpdateNodesInserted): Ditto.
581 (khtml::ReplaceSelectionCommand::updateNodesInserted): Ditto.
582 * khtml/editing/htmlediting.h: Update declarations as needed.
583 * khtml/editing/markup.cpp:
584 (khtml::createMarkup): Adds a "default style" span to the content written to the pasteboard.
585 This will help us to fix some of the bugs blocked by the bug above.
586 * khtml/xml/dom_nodeimpl.cpp:
587 (NodeImpl::lastDescendent): New helper.
588 * khtml/xml/dom_nodeimpl.h: Ditto.
589 * khtml/xml/dom_position.cpp:
590 (DOM::Position::upstream): Fixed a bug which would allow the upstream position returned to be
591 in unrendered content.
592 (DOM::Position::downstream): Ditto.
594 * layout-tests/editing/deleting/delete-3775172-fix-expected.txt: Ending positions tweaked due to
595 changes in upstream() and downstream() functions.
596 * layout-tests/editing/inserting/insert-3851164-fix-expected.txt: Ditto
597 * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Ditto
598 * layout-tests/editing/selection/extend-by-character-006-expected.txt: Ditto
600 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: Changed what we expect, given
601 new behavior of paste code.
603 2005-01-31 John Sullivan <sullivan@apple.com>
605 Reviewed by Dave Hyatt.
607 - fixed <rdar://problem/3983097> Tabbing on RSS pages gets stuck in search field
608 with "full keyboard navigation" off
612 (QSlider::focusPolicy):
613 Implemented this method for KWQSlider. It is needed for our widget subclasses that
614 can become focused in some situations. I missed this when fixing 3949203 because
615 it only comes into play when tab-to-controls is on, and because the other relevant
616 methods are objective-C methods.
618 2005-01-31 David Harrison <harrison@apple.com>
622 <rdar://problem/3964164> AXWebArea needs to unregister on going invisible
624 * khtml/xml/dom_docimpl.cpp:
625 (DocumentImpl::detach):
626 Detach the AX UIElement for the AXWebArea.
628 2005-01-31 David Harrison <harrison@apple.com>
632 <rdar://problem/3850876> AX: button exposed as only an AXImage at http://appleseed.apple.com/ site (<input type=image>)
634 * khtml/rendering/render_form.h:
635 (khtml::RenderImageButton::isImageButton):
637 * khtml/rendering/render_image.h:
638 (khtml::RenderImage::isImageButton):
640 * kwq/KWQAccObject.mm:
641 (-[KWQAccObject isImageButton]):
642 (-[KWQAccObject actionElement]):
643 (-[KWQAccObject role]):
644 (-[KWQAccObject accessibilityActionNames]):
645 (-[KWQAccObject accessibilityPerformAction:]):
646 Represent RenderImageButton elements as buttons instead of images.
648 2005-01-31 David Harrison <harrison@apple.com>
650 Prevent nil dereference in debug code.
652 * khtml/xml/dom_nodeimpl.cpp:
653 (NodeImpl::displayTree):
654 Stop when parent is 0, too.
656 2005-01-31 John Sullivan <sullivan@apple.com>
658 Reviewed by Dave Hyatt.
660 - fixed <rdar://problem/3949203> cannot tab to, within, or out of the RSS sidebar
663 (-[KWQSlider becomeFirstResponder]):
664 (-[KWQSlider resignFirstResponder]):
665 (-[KWQSlider nextKeyView]):
666 (-[KWQSlider previousKeyView]):
667 (-[KWQSlider canBecomeKeyView]):
668 (-[KWQSlider nextValidKeyView]):
669 (-[KWQSlider previousValidKeyView]):
670 Copied these methods from KWQButton. The lack of special handling for first-responder-ness
671 here was causing the focus to get "stuck" on the RSS page's slider widget. Added FIXME
672 about how it would be nice to share more of this code rather than replicating it in each
675 2005-01-31 Darin Adler <darin@apple.com>
677 Reviewed by Harrison.
679 - fixed <rdar://problem/3980066> Double-click on single character moves insertion point to previous line
681 * khtml/khtml_part.cpp:
682 (KHTMLPart::selectClosestWordFromMouseEvent): Set affinity too.
683 (KHTMLPart::handleMousePressEventTripleClick): Ditto.
684 (KHTMLPart::handleMouseMoveEventSelection): Ditto.
685 (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
687 * khtml/editing/selection.cpp:
688 (khtml::Selection::modifyExtendingRightForward): Use endOfLine and endOfDocument.
689 (khtml::Selection::modifyMovingRightForward): Ditto.
690 (khtml::Selection::modifyExtendingLeftBackward): Use startOfLine and startOfDocument.
691 (khtml::Selection::modifyMovingLeftBackward): Ditto.
692 (khtml::Selection::validate): Rewrote the section that handles double-click. Two main fixes: 1) use isStartOfLine to
693 check for another case where we want to select the word to the right, and 2) use isEndOfParagraph, which seems
694 to work correctly in cases where isLastVisiblePositionInParagraph is giving the wrong answer. Also changed the line
695 code to use startOfLine/endOfLine and the document code to use startOfDocument/endOfDocument.
697 2005-01-31 Darin Adler <darin@apple.com>
699 Reviewed by Harrison.
701 - fixed <rdar://problem/3935275> unexpected quit scrolling over link; last.fm (works in IE and Firefox)
703 * kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): By using the correct document, fix the crash reported here.
704 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.
706 2005-01-31 Darin Adler <darin@apple.com>
708 Reviewed by Ken and Harrison.
710 - fixed <rdar://problem/3947901> REGRESSION (Mail): Pasting paragraph of rich text leaves insertion point before pasted text
711 - fixed <rdar://problem/3949790> hitting return after underlined line results in too much or too little underlined
712 - fixed <rdar://problem/3981759> nil-deref and crash when pasting just a paragraph break
713 - fixed a couple problems I discovered while working with bug 3949790
715 * khtml/editing/htmlediting.cpp:
716 (khtml::ApplyStyleCommand::applyInlineStyle): Pass StayInBlock to upstream. Without this, we end up going too far
717 upstream in the test case in bug 3949790.
718 (khtml::ApplyStyleCommand::removeInlineStyle): Pass StayInBlock to upstream and downstream. Same reason as above.
719 (khtml::ReplaceSelectionCommand::doApply): Update endPos if inserting a new node and endPos is using that node's
720 parent and an offset past the node being inserted. That change fixes a problem with the position of the insertion point
721 after pasting into the top level of a document (from test cases in 3947901 and 3949790). When setting insertionPos, use
722 code that works when lastNodeInserted is a block rather than a text node. That change fixes a problem where a newline is
723 not added when pasting an entire paragraph into the end of a document (from test case in 3949790). Added nil check before
724 checking if lastNodeInserted is a <br> element, which fixes the crash when pasting just a paragraph break.
726 * khtml/editing/visible_units.h: Filled out the set of calls to add some boolean checks for lines (needed for the
727 bug fix), and calls for blocks (not yet implemented), and documents. The document checks may need refinement to
728 properly handle documents with a mix of editable and non-editable content, but for now they just refactor code
729 and make things a little clearer. Also removed the "include line break" parameter from endOfSentence.
730 * khtml/editing/visible_units.cpp:
731 (khtml::rootBoxForLine): Added.
732 (khtml::startOfLine): Added. Algorithm taken from selectionForLine in selection.cpp.
733 (khtml::endOfLine): Ditto.
734 (khtml::inSameLine): Added.
735 (khtml::isStartOfLine): Added.
736 (khtml::isEndOfLine): Added.
737 (khtml::endOfSentence): Removed "include line break" parameter.
738 (khtml::inSameParagraph): Added a null check.
739 (khtml::isStartOfParagraph): Ditto.
740 (khtml::isEndOfParagraph): Ditto.
741 (khtml::startOfBlock): Added.
742 (khtml::endOfBlock): Added.
743 (khtml::inSameBlock): Added.
744 (khtml::isStartOfBlock): Added.
745 (khtml::isEndOfBlock): Added.
746 (khtml::startOfDocument): Added.
747 (khtml::endOfDocument): Added.
748 (khtml::inSameDocument): Added.
749 (khtml::isStartOfDocument): Added.
750 (khtml::isEndOfDocument): Added.
752 2005-01-30 Darin Adler <darin@apple.com>
756 - fixed <rdar://problem/3977000> form data set posted for <input type="image" ...> omits name/value pair
758 * khtml/html/html_formimpl.cpp:
759 (DOM::HTMLInputElementImpl::appendFormData): Append a name/value pair for type IMAGE in addition to the X/Y
762 2005-01-30 Darin Adler <darin@apple.com>
766 - fixed <rdar://problem/3974246> REGRESSION (125-180): popup menus are missing item text on Harmony Remote web site
768 * khtml/html/html_formimpl.cpp: (DOM::HTMLOptionElementImpl::text): Change this function to traverse the entire tree
769 and gather all the text rather than just looking at immediate children.
771 * khtml/xml/dom_nodeimpl.h: Added const.
772 * khtml/xml/dom_nodeimpl.cpp:
773 (NodeImpl::traverseNextNode): Added const.
774 (NodeImpl::traverseNextSibling): Ditto.
775 (NodeImpl::traversePreviousNodePostOrder): Ditto.
776 (NodeImpl::detach): Add a missing nil check.
778 2005-01-30 Darin Adler <darin@apple.com>
782 - fixed <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
784 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Added missing ref/deref of newly created element.
786 2005-01-28 Darin Adler <darin@apple.com>
788 * khtml/css/cssproperties.c: Regenerated with newer gperf.
790 2005-01-28 David Harrison <harrison@apple.com>
792 Reviewed by John Sullivan.
794 <rdar://problem/3968144> AX need to be able to focus an AXLink by setting AXFocused to true
796 * kwq/KWQAccObject.mm:
797 (-[KWQAccObject accessibilityPerformAction:]):
798 (-[KWQAccObject accessibilityIsAttributeSettable:]):
799 Add AXFocused for AXLinks.
801 2005-01-28 David Harrison <harrison@apple.com>
805 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
807 Use AppKit SPI _accessibilityParentForSubview to return KWQAccObject parent of AppKit AX object.
809 * kwq/KWQAccObject.mm:
810 (-[KWQAccObject _accessibilityParentForSubview:]):
813 2005-01-27 Adele Amchan <adele@apple.com>
815 fixed by Darin, reviewed by me.
817 <rdar://problem/3976314> REGRESSION (180-TOT): submitting password fields fail on Panther
819 * kwq/KWQTextField.mm: (-[KWQTextFieldController string]): on panther, the secure text field's editor
820 does not contain the real string, so now we just call stringValue on the field in that case.
822 2005-01-26 Maciej Stachowiak <mjs@apple.com>
824 Reviewed by Darin, Hyatt and Ken.
826 <rdar://problem/3790449> REGRESSION (Mail): underline behavior is flaky because of how CSS handles text-decoration
828 * khtml/css/css_computedstyle.cpp:
829 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): Add support
830 for -khtml-text-decorations-in-effect property. This works like text-docration
831 but follows proper inline semantics, that is, if a parent is causing text
832 decoration then -khtml-text-decorations-in-effect on this element will reflect that.
833 * khtml/css/cssproperties.in: Add -khtml-text-decorations-in-effect property.
834 * khtml/css/cssproperties.h: regenerated
835 * khtml/css/cssvalues.c: regenerated
836 * khtml/css/cssparser.cpp: regenerated
837 * khtml/css/cssproperties.c: regenerated
839 * khtml/css/css_valueimpl.h: Made copyPropertiesInSet public.
841 * khtml/editing/htmlediting.cpp:
842 (khtml::StyleChange::init): Handle -khtml-text-decorations-in-effect
843 specially, translate to text-decoration
844 (khtml::ApplyStyleCommand::applyInlineStyle): Fix a comment.
845 (khtml::ApplyStyleCommand::removeInlineStyle): Add new way of pushing down
846 text-decoration styles around the edges of the selected range.
847 (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Helper for this.
848 (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): ditto
849 (khtml::ApplyStyleCommand::nodeFullyUnselected): ditto
850 (khtml::hasTextDecorationProperty): ditto
851 (khtml::highestAncestorWithTextDecoration): ditto
852 (khtml::ApplyStyleCommand::extractTextDecorationStyle): ditto
853 (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle): ditto
854 (khtml::ApplyStyleCommand::applyTextDecorationStyle): ditto
855 * khtml/editing/htmlediting.h: Prototype new methods.
856 * khtml/editing/jsediting.cpp: Make underline execCommand use the new CSS property.
858 - as a necessary part of the fix, fixed the longstanding problem
859 that mutating an element's inlineStyleDecl would not property
860 update its style attribute. now it does.
862 * khtml/css/css_valueimpl.cpp:
863 (DOM::CSSMutableStyleDeclarationImpl::setChanged): If this is an inline style
864 declaration, tell the element it's style attribute needs updating.
865 * khtml/html/html_elementimpl.cpp:
866 (HTMLElementImpl::invalidateStyleAttribute): New method, just calls down
868 (HTMLElementImpl::updateStyleAttribute): Regenerate style attribute from
869 inline style declaration.
870 * khtml/html/html_elementimpl.h: Prototype new stuff.
871 * khtml/xml/dom_elementimpl.cpp:
872 (ElementImpl::ElementImpl): Initialize new attribute.
873 (ElementImpl::updateStyleAttributeIfNeeded): New method to check if the style
874 is dirty and this is an html element, and if so call the html element to
875 regenerate the style attribute.
876 (ElementImpl::attributes): update style if needed
877 (ElementImpl::getAttribute): ditto
878 (ElementImpl::hasAttributes): ditto
879 (ElementImpl::dump): ditto
880 (XMLElementImpl::cloneNode): ditto
881 * khtml/xml/dom_elementimpl.h:
882 (DOM::ElementImpl::isStyleAttributeValid): new method to manage style attr
884 (DOM::ElementImpl::setStyleAttributeValid): ditto
886 - added new layout tests for underlining:
888 * layout-tests/editing/editing.js:
889 * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt: Added.
890 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt: Added.
891 * layout-tests/editing/style/remove-underline-across-paragraph-in-bold.html: Added.
892 * layout-tests/editing/style/remove-underline-across-paragraph.html: Added.
893 * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt: Added.
894 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt: Added.
895 * layout-tests/editing/style/remove-underline-after-paragraph-in-bold.html: Added.
896 * layout-tests/editing/style/remove-underline-after-paragraph.html: Added.
897 * layout-tests/editing/style/remove-underline-expected.txt: Added.
898 * layout-tests/editing/style/remove-underline-from-stylesheet-expected.txt: Added.
899 * layout-tests/editing/style/remove-underline-from-stylesheet.html: Added.
900 * layout-tests/editing/style/remove-underline-in-bold-expected.txt: Added.
901 * layout-tests/editing/style/remove-underline-in-bold.html: Added.
902 * layout-tests/editing/style/remove-underline.html: Added.
903 * layout-tests/editing/style/underline-expected.txt: Added.
904 * layout-tests/editing/style/underline.html: Added.
906 2005-01-27 David Hyatt <hyatt@apple.com>
908 Fix for 3875199, search field needs to be able to show a magnifying glass without a dropdown menu.
912 * khtml/html/html_formimpl.cpp:
913 (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
914 (DOM::HTMLInputElementImpl::parseHTMLAttribute):
915 * kwq/KWQLineEdit.mm:
916 (QLineEdit::setMaxResults):
918 2005-01-27 Ken Kocienda <kocienda@apple.com>
924 <rdar://problem/3973254> Deletions of ranges does not coalesce correctly with subsequent typing
926 * khtml/editing/htmlediting.cpp:
927 (khtml::InsertTextCommand::deleteCharacter): Remove this dead code.
928 (khtml::ReplaceSelectionCommand::editingAction): Moved this code to a better place in the file.
929 It was in with unrelated functions.
930 (khtml::TypingCommand::TypingCommand): Reorganize initialization list so it is easier to read.
931 (khtml::TypingCommand::issueCommandForDeleteKey): Remove dead code. Roll in remaining code into deleteKeyPressed.
932 (khtml::TypingCommand::deleteKeyPressed): Add in support for carrying along smart delete flag.
933 (khtml::TypingCommand::forwardDeleteKeyPressed): New function. Makes forward delete work like
934 "regular" delete in terms of coalescing typing.
935 (khtml::TypingCommand::doApply): Add case for ForwardDeleteKey.
936 (khtml::TypingCommand::preservesTypingStyle): Ditto.
937 * khtml/editing/htmlediting.h:
938 (khtml::TypingCommand::): Add ForwardDeleteKey constant. Remove a couple declarations for now-dead code.
939 (khtml::TypingCommand::smartDelete): New accessor.
940 (khtml::TypingCommand::setSmartDelete): Ditto.
941 * kwq/WebCoreBridge.h:
942 * kwq/WebCoreBridge.mm:
943 (-[WebCoreBridge deleteKeyPressedWithSmartDelete:]): Add smart delete flag.
944 (-[WebCoreBridge forwardDeleteKeyPressedWithSmartDelete:]): New method.
945 * khtml/editing/jsediting.cpp: Add supprt for ForwardDelete command
946 * layout-tests/editing/editing.js: Ditto.
947 * layout-tests/editing/deleting/delete-and-undo-expected.txt: Added.
948 * layout-tests/editing/deleting/delete-and-undo.html: Added.
949 * layout-tests/editing/deleting/forward-delete-expected.txt: Added.
950 * layout-tests/editing/deleting/forward-delete.html: Added.
954 2005-01-27 David Harrison <harrison@apple.com>
958 <rdar://problem/3962214> AX: AXLeftLineTextMarkerRangeForTextMarker returns incorrect range
960 * kwq/KWQAccObject.mm:
961 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
962 Allowed for selection to end of line including the linebreak.
964 2005-01-27 David Harrison <harrison@apple.com>
966 Reviewed by Darin, Ken.
968 <rdar://problem/3964470> AX: Include attachments in AXAttributedStringForTextMarkerRange
970 * kwq/KWQAccObject.mm:
971 (-[KWQAccObject isAttachment]):
972 (-[KWQAccObject attachmentView]):
973 (-[KWQAccObject role]):
974 (-[KWQAccObject subrole]):
975 (-[KWQAccObject roleDescription]):
976 (-[KWQAccObject value]):
977 (-[KWQAccObject title]):
978 (-[KWQAccObject accessibilityDescription]):
979 (-[KWQAccObject accessibilityIsIgnored]):
980 (-[KWQAccObject accessibilityAttributeNames]):
981 (-[KWQAccObject accessibilityAttributeValue:]):
982 Make attachments accessible.
984 (CreateCGColorIfDifferent):
985 (AXAttributeStringSetColor):
986 (AXAttributeStringSetNumber):
987 (AXAttributeStringSetFont):
988 (AXAttributeStringSetStyle):
989 (AXAttributeStringSetElement):
990 (AXLinkElementForNode):
991 (AXAttributedStringAppendText):
992 (AXAttributedStringAppendReplaced):
993 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
994 Add attachments and more text attributes to AXAttributedStringForTextMarkerRange.
996 2005-01-27 Darin Adler <darin@apple.com>
1000 - fixed <rdar://problem/3807935> DOM CSS computed style line-height is wrong in two ways
1002 * khtml/css/css_computedstyle.cpp: (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1003 Use specified size rather than computed size when dealing with a percentage for line height.
1005 2005-01-27 Darin Adler <darin@apple.com>
1009 - fixed <rdar://problem/3971372> SWB: template function DOM_cast() won't compile with gcc 4.0
1010 - fixed other gcc 4.0 compiling problems Patrick Beard pointed out on the phone
1012 * kwq/DOMInternal.h: (DOM_cast): Change the "failToCompile()" trick to use a dependent name.
1013 Nowadays, if a name is not dependent, it is checked at template definition time. But we want
1014 a failure only at template instantiation time.
1016 * ForwardingHeaders/editing/text_granularity.h: Added. Needed but a bug in the 3.3 compiler made
1017 it compile anyway without this.
1021 * khtml/html/html_miscimpl.h: For clarity, mark these functions virtual too. They are automatically
1022 virtual because the base class ones are virtual, but it's ugly to leave it this way.
1024 2005-01-26 Ken Kocienda <kocienda@apple.com>
1030 <rdar://problem/3971609> REGRESSION (Mail): up/down arrow navigation broken after rewrapping text by resizing window
1031 <rdar://problem/3975661> REGRESSION (Mail): left/right arrow navigation can place insertion point after last character on line
1033 * khtml/editing/selection.cpp:
1034 (khtml::Selection::modifyAffinity): PARAGRAPH and LINE movements should not alter affinity. This was
1035 just a mistake before when it reset to upstream in some cases.
1036 * khtml/rendering/render_line.cpp:
1037 (khtml::RootInlineBox::closestLeafChildForXPos): Move this function down from InlineBox, and
1038 rework the implementation. This fixes 3971609.
1039 * khtml/rendering/render_line.h:
1040 * khtml/rendering/render_text.cpp:
1041 (RenderText::caretRect): Rework the algorithm to fix 3975661. This regressed when we began placing
1042 the spaces on the end of lines in text boxes when lines wrap.
1044 2005-01-26 Richard Williamson <rjw@apple.com>
1046 Fixed <rdar://problem/3972522> (179-180) 40% slowdown on iBench JavaScript test
1048 I added a member variable to ObjectImp. This changed it's size and consequently
1049 hampered the optimizations built into the garbage collector. Objects no longer
1050 fit within the allocators cell size, and thus allocation fell back to a slower
1053 As a result of this fix I also dramatically cleaned up how runtime objects are
1054 accessed. The path mostly *removes* code.
1058 * khtml/ecma/kjs_dom.cpp:
1059 (DOMDocumentProtoFunc::tryCall):
1060 (DOMElementProtoFunc::tryCall):
1061 (KJS::getRuntimeObject):
1062 * khtml/ecma/kjs_dom.h:
1063 * khtml/ecma/kjs_html.cpp:
1064 (KJS::HTMLDocument::tryGet):
1065 (KJS::HTMLElement::tryGet):
1066 (KJS::HTMLElement::implementsCall):
1067 (KJS::HTMLElement::call):
1068 (KJS::HTMLElement::tryPut):
1069 (KJS::HTMLCollection::tryGet):
1070 (KJS::HTMLCollection::getNamedItems):
1071 * khtml/ecma/kjs_html.h:
1072 * khtml/ecma/kjs_window.cpp:
1075 2005-01-26 Richard Williamson <rjw@apple.com>
1077 Fixed <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
1079 For now we are using ICU UBreakIterator to determine grapheme boundaries for
1080 cursor and deletion. This does not match what Cocoa does exactly, but does match
1081 what Carbon does. The areas are difference are obscure, but, according to
1082 Deborah Goldsmith, using the UBreakIterator is the reasonable approach.
1086 * khtml/rendering/render_text.cpp:
1087 (RenderText::previousOffset):
1088 (RenderText::nextOffset):
1090 2005-01-25 David Harrison <harrison@apple.com>
1092 Reviewed by Maciej and Richard.
1094 <rdar://problem/3963731> AX VO: Changing window sizes causes a crash using with Voice Over - KWQPtrDictImpl::clear
1096 * khtml/html/html_miscimpl.cpp:
1097 (HTMLCollectionImpl::HTMLCollectionImpl):
1098 Ensure that isHTMLDocument before calling HTMLDocument-only method.
1100 2005-01-25 Richard Williamson <rjw@apple.com>
1102 Part one of fix for <rdar://problem/3757712> REGRESSION (Mail): WebCore does not allow Devanagari ligature input
1104 This patch changes the semantics of next() and previous() on
1105 VisiblePosition to move a grapheme (character cluster) at a
1106 time. This means that cursor navigation with correctly move
1107 over an entire cluster.
1109 However, the expected behavior for deleting a grapheme is to
1110 delete individual code points, thus decomposing the grapheme
1111 into it constituent parts. That will be addressed in the next
1116 * khtml/editing/visible_position.cpp:
1117 (khtml::VisiblePosition::previousPosition):
1118 (khtml::VisiblePosition::nextPosition):
1119 * khtml/editing/visible_position.h:
1120 * khtml/rendering/render_object.cpp:
1121 (RenderObject::previousOffset):
1122 (RenderObject::nextOffset):
1123 * khtml/rendering/render_object.h:
1124 * khtml/rendering/render_text.cpp:
1125 (RenderText::previousOffset):
1126 (RenderText::nextOffset):
1127 (RenderText::findNextInlineTextBox):
1128 * khtml/rendering/render_text.h:
1129 * khtml/xml/dom_nodeimpl.cpp:
1130 (NodeImpl::previousOffset):
1131 (NodeImpl::nextOffset):
1132 * khtml/xml/dom_nodeimpl.h:
1134 2005-01-25 David Harrison <harrison@apple.com>
1138 <rdar://problem/3973067> AXWebArea for http://apple.netscape.com/ has an empty AXLinkUIElements
1140 * kwq/KWQAccObject.mm:
1141 (-[KWQAccObject accessibilityAttributeValue:]):
1142 Omit ignored AXLinks from AXLinkUIElements result
1144 2005-01-25 Ken Kocienda <kocienda@apple.com>
1150 <rdar://problem/3972851> REGRESSION (179-180+): Repro crash in ApplyStyleCommand::cleanUpEmptyStyleSpans
1152 * khtml/editing/htmlediting.cpp:
1153 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans): Added two null checks.
1155 2005-01-25 Ken Kocienda <kocienda@apple.com>
1161 <rdar://problem/3954710> Mail crashed while editing signatures - NodeImpl::isBlockFlow
1163 The fix is more general than for this one bug, and may work to fix many crashers. The problem
1164 is that the ReplaceSelectionCommand never checked whether its starting selection is empty. If
1165 it is, then we need to bail before doing the work of the command, which we need to deref the
1166 start and end points of the selection in order to do its work. I think you can see the crash
1169 * khtml/editing/htmlediting.cpp:
1170 (khtml::ReplaceSelectionCommand::doApply): Assert selection is not empty.
1171 * kwq/WebCoreBridge.mm:
1172 (partHasSelection): New helper function to test that bridge has a part with a selection.
1174 Use new helper function to test part and selection; return from these function if this test fails.
1176 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:])
1177 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:])
1178 (-[WebCoreBridge alterCurrentSelection:direction:granularity:])
1179 (-[WebCoreBridge rangeByAlteringCurrentSelection:verticalDistance:])
1180 (-[WebCoreBridge alterCurrentSelection:verticalDistance:])
1181 (-[WebCoreBridge documentFragmentWithText:])
1182 (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:])
1183 (-[WebCoreBridge insertLineBreak])
1184 (-[WebCoreBridge insertParagraphSeparator])
1185 (-[WebCoreBridge insertParagraphSeparatorInQuotedContent])
1186 (-[WebCoreBridge insertText:selectInsertedText:])
1187 (-[WebCoreBridge deleteSelectionWithSmartDelete:])
1188 (-[WebCoreBridge ensureSelectionVisible])
1190 2005-01-24 Kevin Decker <kdecker@apple.com>
1194 Fixed <rdar://problem/3932374> REGRESSION: 'ReferenceError - Can't find variable' JavaScript error at webxpress.fidelity.com
1196 * khtml/html/html_miscimpl.h: Missing virtual identifiers for namedItem() and nextNamedItem() exposed a flaw that prevented finding variables in form [HTMLFormCollectionImpl] scopes.
1199 2005-01-24 Vicki Murley <vicki@apple.com>
1201 Reviewed by kocienda.
1203 - fix <rdar://problem/3810661> computed style not handled for Apple extensions
1205 * khtml/css/css_computedstyle.cpp: (DOM::):
1206 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue): add -apple-line-clamp and -apple-text-size-adjust
1208 2005-01-24 Darin Adler <darin@apple.com>
1212 - fixed <rdar://problem/3969884> REGRESSION (179-180): Typing password not echoed as "bullets" at paypal.com when field is first focused
1214 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]):
1215 Sizing up the form editor, which fixes things for normal fields and search fields,
1216 screws things up for password fields. Eventually, I'll need to figure out why this is
1217 and file a bug so that the AppKit team fixes it. In the mean time, just check for the
1218 case of the secure text field, and don't size up in that case.
1220 2005-01-24 Ken Kocienda <kocienda@apple.com>
1226 <rdar://problem/3963560> 8A354: Inserting Japanese text to the line head causes line break
1228 * khtml/editing/htmlediting.cpp:
1229 (khtml::ReplaceSelectionCommand::doApply): Add one more case where we merge content into the
1230 existing line. This covers the situation see using the steps to reproduce this bug.
1232 2005-01-21 Maciej Stachowiak <mjs@apple.com>
1236 <rdar://problem/3967572> Editing should split elements before removing style
1238 * khtml/editing/htmlediting.cpp:
1239 (khtml::CompositeEditCommand::splitElement):
1240 (khtml::CompositeEditCommand::mergeIdenticalElements):
1241 (khtml::CompositeEditCommand::wrapContentsInDummySpan):
1242 (khtml::CompositeEditCommand::splitTextNodeContainingElement):
1243 (khtml::ApplyStyleCommand::applyInlineStyle):
1244 (khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
1245 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
1246 (khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1247 (khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1248 (khtml::areIdenticalElements):
1249 (khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1250 (khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1251 (khtml::ApplyStyleCommand::cleanUpEmptyStyleSpans):
1252 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
1253 (khtml::InsertParagraphSeparatorCommand::doApply):
1254 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1255 (khtml::InsertTextCommand::prepareForTextInsertion):
1256 (khtml::SplitTextNodeCommand::doUnapply):
1257 (khtml::SplitElementCommand::SplitElementCommand):
1258 (khtml::SplitElementCommand::~SplitElementCommand):
1259 (khtml::SplitElementCommand::doApply):
1260 (khtml::SplitElementCommand::doUnapply):
1261 (khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
1262 (khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
1263 (khtml::MergeIdenticalElementsCommand::doApply):
1264 (khtml::MergeIdenticalElementsCommand::doUnapply):
1265 (khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
1266 (khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
1267 (khtml::WrapContentsInDummySpanCommand::doApply):
1268 (khtml::WrapContentsInDummySpanCommand::doUnapply):
1269 (khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
1270 (khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
1271 (khtml::SplitTextNodeContainingElementCommand::doApply):
1272 * khtml/editing/htmlediting.h:
1274 New layout test that shows the side benefit of this.
1276 * layout-tests/editing/style/unbold-in-bold-expected.txt: Added.
1277 * layout-tests/editing/style/unbold-in-bold.html: Added.
1279 2005-01-24 Darin Adler <darin@apple.com>
1283 - fixed <rdar://problem/3933435> -[DOMRange cloneContents] sometimes alters the original DOMRange
1285 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::processContents): Fixed code that was collapsing
1286 the range after processing the contents. That's right for extract and delete, but not clone.
1288 - fixed <rdar://problem/3714184> inline input works incorrectly when I type Korean slowly in textfield in form on www.google.co.kr
1289 - fixed <rdar://problem/3193848> Can't enter SSN to sign up for Chase visa online account (changing focus inside key press handler)
1290 - 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>
1292 * kwq/KWQLineEdit.mm:
1293 (QLineEdit::text): Changed to call a new string method on the controller instead of calling
1294 stringValue, since stringValue has a bad side effect of ending inline input.
1295 (QLineEdit::selectAll): Changed to only call selectText: when the field is already selected.
1296 When you are giving the field focus, it automatically gets all selected, and this change
1297 is required in the case where we defer the focus change.
1299 * kwq/KWQTextField.h: Added a new string method to the controller.
1300 * kwq/KWQTextField.mm:
1301 (-[KWQTextFieldController setMaximumLength:]): Call the new string method instead of using stringValue.
1302 (-[KWQTextFieldController controlTextDidChange:]): Removed the code to truncate at the first CR or LF.
1303 That's now handled in the shouldChangeTextInRange method instead.
1304 (-[KWQTextFieldController textView:shouldHandleEvent:]): Add new logic to defer responder changes until
1305 after the event is handled. This makes sure the key gets into the field that's already handling it at
1306 rather than ending up in the newly-focused field if the key press handler focuses a different element.
1307 (-[KWQTextFieldController textView:didHandleEvent:]): Turn off deferral here, now that the key press
1309 (-[KWQTextFieldController string]): Added. Calls stringValue only if there's no editor. If there is
1310 an editor, calls string on that instead.
1311 (-[KWQTextFieldController textView:shouldChangeTextInRange:replacementString:]): Added. Called by
1312 the three field subclasses. Truncates incoming strings at the first CR or LF character. This works
1313 properly with Undo, and the old technique did not.
1314 (-[KWQTextFieldController preprocessString:]): Added. Helper used for all the setStringValue methods
1315 so they all truncate at the first CR or LF as well as truncating to the appropriate length.
1316 (-[KWQTextField setStringValue:]): Changed to call the controller.
1317 (-[KWQTextField textView:shouldChangeTextInRange:replacementString:]): Added. Calls the controller.
1318 (-[KWQSecureTextField setStringValue:]): More of the same.
1319 (-[KWQSecureTextField textView:shouldChangeTextInRange:replacementString:]): Ditto.
1320 (-[KWQSearchField setStringValue:]): Ditto.
1321 (-[KWQSearchField textView:shouldChangeTextInRange:replacementString:]): Ditto.
1323 * kwq/KWQWidget.h: Added the new setDeferFirstResponderChanges function.
1325 (QWidget::~QWidget): Clear out the deferredFirstResponder global just in case we are destroyed
1326 while we "have the ball".
1327 (QWidget::hasFocus): If we are in the deferred mode, use the global to decide who to say is focused.
1328 (QWidget::setFocus): If we are in the deferred mode, set the global instead of making something be
1329 the first responder.
1330 (QWidget::setDeferFirstResponderChanges): Set the boolean. If the boolean is being cleared, then
1331 get the deferred first responder and call setFocus on it again, which will do the work we didn't
1334 2005-01-24 Ken Kocienda <kocienda@apple.com>
1340 <rdar://problem/3964350> Deleting all content and typing in a message gets one letter, then beeps
1342 This is a problem with the way we turn key events, when a user starts typing, into editing commands.
1343 Right now, that initial delete key in an empty window is turned into an editing command, and much
1344 editing code runs that need not run. What's more, this is confusing the selection machinery. The
1345 solution is to detect the "delete in an empty window" case and don't turn this into an editing
1348 * khtml/editing/htmlediting.cpp:
1349 (khtml::TypingCommand::deleteKeyPressed)
1351 2005-01-23 Adele Amchan <adele@apple.com>
1353 Fixed <rdar://problem/3964286> REGRESSION (178-179): menus and "go to old site" link at Ameritrade's new site don't work
1355 Removed check for document from checkCompleted. In this case, WebCore never knew that a WebImageView was complete because
1356 it fell into this document check case in checkCompleted.
1357 Added check for document to tokenizerProcessedData (see <rdar://problem/3807144>)
1361 * khtml/khtml_part.cpp:
1363 (KHTMLPart::checkCompleted):
1364 * khtml/khtml_part.h:
1365 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::tokenizerProcessedData):
1367 2005-01-21 Richard Williamson <rjw@apple.com>
1369 Fixed <rdar://problem/3759399> Javascript / Liveconnect problems ((event handler):Undefined value)
1371 Java applets specified with <object> or <embed> weren't scriptable. Now they are.
1375 * khtml/html/html_objectimpl.cpp:
1376 (HTMLEmbedElementImpl::getEmbedInstance):
1377 (HTMLObjectElementImpl::getObjectInstance):
1379 2005-01-21 Ken Kocienda <kocienda@apple.com>
1385 <rdar://problem/3959464> REGRESSION (Mail): Insertion point goes back to beginning of document after deleting
1387 * khtml/editing/htmlediting.cpp:
1388 (khtml::DeleteSelectionCommand::handleGeneralDelete): Add special case to handle retaining a fully-selected block.
1390 * layout-tests/editing/deleting/delete-3959464-fix-expected.txt: Added.
1391 * layout-tests/editing/deleting/delete-3959464-fix.html: Added.
1393 2005-01-21 Richard Williamson <rjw@apple.com>
1395 Fixed <rdar://problem/3966998> REGRESSION(179-TOT) clicking on gmail message brings me to blank screen
1397 getElementById() sometimes returns Undefined() instead of Null().
1401 * khtml/ecma/kjs_dom.cpp:
1402 (DOMDocumentProtoFunc::tryCall):
1404 2005-01-21 David Hyatt <hyatt@apple.com>
1406 Fix for 3773809, make sure that overflow regions never end up at an invalid scroll offset because of a layout change.
1408 Reviewed by kocienda
1410 * khtml/rendering/render_layer.cpp:
1411 (RenderLayer::updateScrollInfoAfterLayout):
1413 2005-01-21 David Hyatt <hyatt@apple.com>
1415 Fix for 3966349, hang loading page. Make sure that loops using popOneBlock properly check for a null
1416 blockStack to avoid an infinite loop.
1418 Reviewed by kocienda
1420 * khtml/html/htmlparser.cpp:
1421 (KHTMLParser::parseToken):
1422 (KHTMLParser::insertNode):
1423 (KHTMLParser::popInlineBlocks):
1425 2005-01-21 Ken Kocienda <kocienda@apple.com>
1431 <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand
1433 * khtml/editing/htmlediting.cpp:
1434 (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
1435 InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
1436 I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled
1437 code path which does not set this variable to something good. In the destructor, we check for null,
1438 and deref if non-null. Obvious "BOOM" potential. Fixed.
1440 2005-01-21 Ken Kocienda <kocienda@apple.com>
1446 <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear
1448 * khtml/editing/htmlediting.cpp:
1449 (khtml::InsertParagraphSeparatorCommand::doApply): When writing the code to insert a block
1450 in response to the return key, I did not write code to cover the case described in the bug.
1452 * layout-tests/editing/inserting/insert-div-025-expected.txt: Added.
1453 * layout-tests/editing/inserting/insert-div-025.html: Added.
1455 2005-01-20 Maciej Stachowiak <mjs@apple.com>
1459 <rdar://problem/3965196> security fix for javascript: exploit missed one case (already fixed in updates)
1461 * khtml/ecma/kjs_window.cpp:
1462 (WindowFunc::tryCall): correct mistake in earlier fix for the following bug, caught by Adele:
1464 2005-01-20 Maciej Stachowiak <mjs@apple.com>
1468 <rdar://problem/3965466> editing needs to insert text before applying typing style
1470 * khtml/editing/htmlediting.cpp:
1471 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment.
1472 (khtml::InsertLineBreakCommand::doApply): Apply style to the BR
1473 node after inserting it.
1474 (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to
1475 apply style to any new nodes created before inserting.
1476 (khtml::InsertTextCommand::input): Apply style to the inserted range
1477 after doing the text insert.
1478 * khtml/editing/htmlediting.h:
1480 This change leads to improved results on one of the layout tests:
1482 * layout-tests/editing/inserting/insert-div-024-expected.txt:
1486 2005-01-20 Ken Kocienda <kocienda@apple.com>
1492 <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear
1494 * khtml/editing/htmlediting.cpp:
1495 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code
1496 caused this regression. The code became too aggressive in removing block placeholders, and would remove them
1497 from blocks other than the block containing the selection.
1498 * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that
1499 I did not notice earlier.
1500 * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto.
1502 2005-01-20 David Hyatt <hyatt@apple.com>
1504 Fix for oddness on albertsons.com. Make sure not to crash when setting/removing style properties on a node
1505 with no document. The bug # is 3813900.
1509 2005-01-20 David Harrison <harrison@apple.com>
1513 PARTIAL fix for following bug. Create attributed string with fonts and links. Still need to add attachments.
1514 <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute
1516 * kwq/KWQAccObject.mm:
1517 (-[KWQAccObject textUnderElement]):
1518 Touched up previous checkin to match code review comments.
1520 (-[KWQAccObject value]):
1521 Use plainText for this one instead of obsolete attributedString.
1523 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1524 Advertise AXAttributedStringForTextMarkerRange.
1526 (AXAttributeStringAddFont):
1527 (AXAttributeStringAddElement):
1528 (-[KWQAccObject linkUIElementForNode:]):
1529 (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1530 (-[KWQAccObject accessibilityAttributedStringForRange:]):
1531 New routines to support AXAttributedStringForTextMarkerRange.
1533 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1534 Use new routines instead of obsolete attributedString.
1536 2005-01-20 David Harrison <harrison@apple.com>
1540 <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore
1542 * khtml/xml/dom_docimpl.cpp:
1543 (DocumentImpl::getAccObjectCache):
1544 Adjust when detecting cache in non-top level WebArea.
1545 * kwq/KWQAccObject.mm:
1546 (-[KWQAccObject textUnderElement]):
1547 (-[KWQAccObject accessibilityAttributeValue:]):
1548 Make sure the elements document is the current one for the part.
1550 2005-01-20 Darin Adler <darin@apple.com>
1554 - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:]
1556 * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions.
1557 The uncaught exception would make the entire program terminate.
1559 - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
1561 * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable
1562 back in November because Mail was stumbling over it.
1564 - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search>
1566 * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields
1567 that position their text in a way that depends on vertical size. In the case of a search field, the text
1568 is centered, so the old logic was broken.
1569 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to
1570 something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into
1571 AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this
1572 bug this happens because we become first responder before being sized and positioned by the HTML layout code.
1574 - improved debugging output when using "po" from gdb with Objective-C DOM
1577 (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node).
1578 (-[DOMRange description]): Tweaked format.
1580 2005-01-19 Richard Williamson <rjw@apple.com>
1582 After further discussion with Real we have decided to NOT include the
1583 additional CLSID for the real plugin. See 3958601.
1587 * khtml/rendering/render_frames.cpp:
1588 (RenderPartObject::updateWidget):
1590 2005-01-19 David Harrison <harrison@apple.com>
1594 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
1596 Previous checkin for this bug was missing some of the patch. Editing snafu with multiple changes in tree.
1598 * kwq/KWQAccObject.mm:
1599 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1600 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1601 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1602 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1603 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
1604 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1605 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
1607 2005-01-19 Ken Kocienda <kocienda@apple.com>
1611 * khtml/editing/htmlediting.cpp:
1612 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided
1613 to do on my last checkin, but I forgot to do before landing.
1615 2005-01-19 Ken Kocienda <kocienda@apple.com>
1621 <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines
1623 * khtml/editing/htmlediting.cpp:
1624 (khtml::CompositeEditCommand::applyStyle):
1625 (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder.
1626 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether
1627 placeholder was added or not.
1628 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block
1629 looking for a placeholder. The old code, which just looked at the last child of a node, started missing
1630 once block placeholders became styled (which started happening with this patch).
1631 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style
1632 to a block placeholder at call time, rather than setting the typing style as a latent style that
1633 might be applied later. This is an important part of the bug fix.
1634 (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded()
1635 and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to
1636 be styled can be detected.
1637 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class
1638 managed style. Before it would calculate and set typing style for the block added. This is not
1639 sufficient. Added blocks need to styled immediately. Some name changes to instance variables in
1640 this class due to the change to accommodate this change.
1641 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above.
1642 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
1643 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
1644 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
1645 (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder
1646 block can be removed in its entirety after the insertion.
1647 * khtml/editing/htmlediting.h: Update header accordingly.
1648 * khtml/khtml_part.cpp:
1649 (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before
1650 doing check when the position is in an empty block (this makes sure any style on any block
1651 placeholder is accounted for).
1653 New layout tests to check bug fix.
1655 * layout-tests/editing/style/block-style-004-expected.txt: Added.
1656 * layout-tests/editing/style/block-style-004.html: Added.
1657 * layout-tests/editing/style/block-style-005-expected.txt: Added.
1658 * layout-tests/editing/style/block-style-005.html: Added.
1659 * layout-tests/editing/style/block-style-006-expected.txt: Added.
1660 * layout-tests/editing/style/block-style-006.html: Added.
1662 Results updated to reflect new block placeholder code.
1664 * layout-tests/editing/inserting/insert-div-004-expected.txt
1665 * layout-tests/editing/inserting/insert-div-005-expected.txt
1666 * layout-tests/editing/inserting/insert-div-006-expected.txt
1667 * layout-tests/editing/inserting/insert-div-008-expected.txt
1668 * layout-tests/editing/inserting/insert-div-011-expected.txt
1669 * layout-tests/editing/inserting/insert-div-012-expected.txt
1670 * layout-tests/editing/inserting/insert-div-013-expected.txt
1671 * layout-tests/editing/inserting/insert-div-014-expected.txt
1672 * layout-tests/editing/inserting/insert-div-015-expected.txt
1673 * layout-tests/editing/inserting/insert-div-016-expected.txt
1674 * layout-tests/editing/inserting/insert-div-017-expected.txt
1675 * layout-tests/editing/inserting/insert-div-018-expected.txt
1676 * layout-tests/editing/inserting/insert-div-019-expected.txt
1677 * layout-tests/editing/inserting/insert-div-021-expected.txt
1678 * layout-tests/editing/inserting/insert-div-022-expected.txt
1679 * layout-tests/editing/inserting/insert-div-023-expected.txt
1680 * layout-tests/editing/inserting/insert-div-024-expected.txt
1682 2005-01-19 David Hyatt <hyatt@apple.com>
1684 Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the
1685 submission to occur. Fixes bug #3477282.
1689 (DOM::HTMLInputElementImpl::defaultEventHandler):
1691 2005-01-18 Richard Williamson <rjw@apple.com>
1693 Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
1695 Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
1696 Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
1697 Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
1698 Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
1700 We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
1701 tags. Also, if any of these elements are named they can be accessed from the document or window objects.
1702 Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
1706 * khtml/dom/html_document.cpp:
1707 (HTMLDocument::objects):
1708 * khtml/dom/html_document.h:
1709 * khtml/ecma/kjs_dom.cpp:
1710 (DOMDocumentProtoFunc::tryCall):
1711 (DOMElementProtoFunc::tryCall):
1712 (KJS::getRuntimeObject):
1713 * khtml/ecma/kjs_dom.h:
1714 * khtml/ecma/kjs_html.cpp:
1715 (KJS::HTMLDocument::tryGet):
1716 (KJS::HTMLElement::tryGet):
1717 (KJS::HTMLCollection::tryGet):
1718 (KJS::HTMLCollection::getNamedItems):
1719 * khtml/ecma/kjs_window.cpp:
1721 * khtml/html/html_miscimpl.cpp:
1722 (HTMLCollectionImpl::traverseNextItem):
1723 * khtml/html/html_miscimpl.h:
1724 (DOM::HTMLCollectionImpl::):
1725 * khtml/html/html_objectimpl.cpp:
1726 (HTMLAppletElementImpl::getAppletInstance):
1727 (HTMLObjectElementImpl::HTMLObjectElementImpl):
1728 (HTMLObjectElementImpl::getObjectInstance):
1729 * khtml/html/html_objectimpl.h:
1730 * khtml/rendering/render_frames.cpp:
1731 (RenderPartObject::updateWidget):
1732 * kwq/KWQKHTMLPart.h:
1733 * kwq/KWQKHTMLPart.mm:
1734 (KWQKHTMLPart::getObjectInstanceForView):
1736 2005-01-18 David Hyatt <hyatt@apple.com>
1738 Fix for 3948123, rolling over link erases nearby text. The repaint rect check for lines was wrong whenever
1739 two lines overlapped.
1741 Reviewed by kocienda
1743 * khtml/rendering/render_flow.cpp:
1744 (RenderFlow::paintLines):
1746 2005-01-18 Ken Kocienda <kocienda@apple.com>
1752 <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages
1754 * khtml/rendering/render_flow.cpp:
1755 (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around
1756 outermost contenteditable elements.
1758 2005-01-18 David Harrison <harrison@apple.com>
1762 <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not
1764 * kwq/KWQAccObject.mm:
1765 (-[KWQAccObject accessibilityFocusedUIElement]):
1766 Return parentObjectUnignored if focused object is ignored.
1768 2005-01-18 Ken Kocienda <kocienda@apple.com>
1774 <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment
1776 * khtml/editing/selection.cpp:
1777 (khtml::nodeForInlineBox): New helper function used in reimplementation of function below.
1778 (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when
1779 I had a less than full understanding of line layout. I can do better now, and my new version no
1780 longer fails to notice attachments when doing the kind of navigation mentioned in the bug.
1782 2005-01-17 David Harrison <harrison@apple.com>
1784 Reviewed by John Sullivan.
1786 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
1787 <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker
1789 Also fixed sentence support in the same way.
1791 * kwq/KWQAccObject.mm:
1792 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1793 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
1794 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1795 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
1796 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
1797 Move one position in desired direction before calling visible_units.cpp code.
1799 2005-01-17 David Harrison <harrison@apple.com>
1801 Updated expected test results.
1803 <rdar://problem/3945880> line-ending space seems not to be present
1805 * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt:
1806 * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt:
1807 * layout-tests/editing/inserting/insert-div-020-expected.txt:
1808 * layout-tests/editing/inserting/insert-div-021-expected.txt:
1809 * layout-tests/editing/inserting/insert-div-022-expected.txt:
1810 * layout-tests/editing/inserting/insert-div-023-expected.txt:
1811 * layout-tests/editing/inserting/insert-div-024-expected.txt:
1813 2005-01-17 David Harrison <harrison@apple.com>
1815 Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp).
1817 <rdar://problem/3945880> line-ending space seems not to be present
1819 * khtml/editing/selection.cpp:
1820 (khtml::Selection::validate):
1821 Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end.
1822 * khtml/rendering/bidi.cpp:
1823 (khtml::RenderBlock::findNextLineBreak):
1824 Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break).
1826 2005-01-17 Darin Adler <darin@apple.com>
1828 Reviewed by John Louch.
1830 - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate
1832 * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead
1833 of using mapToGlobal and screen in a complicated way.
1834 * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function.
1835 * kwq/KWQWindowWidget.h: Ditto.
1836 * kwq/KWQWindowWidget.mm: Ditto.
1838 2005-01-17 David Hyatt <hyatt@apple.com>
1840 Fix a screwup in rightmost/lowets position computation. 3955207. Make sure floats with layers are still checked.
1842 Reviewed by kocienda
1844 * khtml/rendering/render_block.cpp
1846 2005-01-17 Ken Kocienda <kocienda@apple.com>
1850 <rdar://problem/3953366> Problems with typing attributes in HTML compose
1852 * khtml/editing/htmlediting.cpp:
1853 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
1854 that tried to sense when typing style could be cleared without actually doing a style diff between
1855 before-delete and after-delete positions. Removing this extra check and running the
1856 general-purpose code fixes the bug.
1858 2005-01-17 Richard Williamson <rjw@apple.com>
1860 Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
1862 Keep track of originating execution context and target execution
1863 context for native JS object wrappers, and perform appropriate
1866 Reviewed by David Harrison.
1868 * khtml/ecma/kjs_binding.cpp:
1869 (ScriptInterpreter::isGlobalObject):
1870 (ScriptInterpreter::isSafeScript):
1871 (ScriptInterpreter::interpreterForGlobalObject):
1872 * khtml/ecma/kjs_binding.h:
1873 * khtml/ecma/kjs_window.cpp:
1874 (Window::interpreter):
1875 (Window::isSafeScript):
1876 * khtml/ecma/kjs_window.h:
1877 * kwq/DOMInternal.mm:
1878 (-[WebScriptObject _initializeScriptDOMNodeImp]):
1879 * kwq/KWQKHTMLPart.mm:
1880 (KWQKHTMLPart::windowScriptObject):
1881 (KWQKHTMLPart::windowScriptNPObject):
1882 * kwq/WebCoreBridge.mm:
1884 (-[WebCoreBridge init]):
1886 2005-01-17 Ken Kocienda <kocienda@apple.com>
1892 <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with
1893 "size up" and "size down" NSFontManager changes
1895 * khtml/css/cssparser.cpp:
1896 (CSSParser::parseValue): Add support for parsing new font size delta property.
1897 * khtml/css/cssproperties.c: Generated file.
1898 * khtml/css/cssproperties.h: Ditto.
1899 * khtml/css/cssproperties.in: Add support for parsing new font size delta property.
1900 * khtml/editing/htmlediting.cpp:
1901 (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
1902 (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
1903 and running command to do the removal.
1904 (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
1905 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle
1906 relative font size changes.
1907 (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
1908 before or equal to the end. Swap them if not true. I ran into this problem in some similar code in
1909 applyRelativeFontStyleChange(). Moving that goodness here too.
1910 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
1911 Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
1912 I use the bool return value now (I obviously did not need it before).
1913 (khtml::ApplyStyleCommand::computedFontSize): New helper function.
1914 (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
1915 (khtml::createStyleSpanElement): Ditto.
1916 * khtml/editing/htmlediting.h: Update header accordingly.
1917 * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
1919 (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
1920 (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
1921 * kwq/DOMPrivate.h: Declare new conveniences.
1922 * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
1923 * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
1924 * layout-tests/editing/style/relative-font-size-change-001.html: Added.
1925 * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
1926 * layout-tests/editing/style/relative-font-size-change-002.html: Added.
1927 * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
1928 * layout-tests/editing/style/relative-font-size-change-003.html: Added.
1929 * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
1930 * layout-tests/editing/style/relative-font-size-change-004.html: Added.
1932 2005-01-14 Darin Adler <darin@apple.com>
1934 * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
1935 * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
1936 * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
1937 * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
1939 2005-01-14 Chris Blumenberg <cblu@apple.com>
1941 Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page
1945 (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
1946 (KWQKHTMLPart::mousePressNode): new
1947 * kwq/KWQPageState.h:
1948 * kwq/KWQPageState.mm:
1949 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
1950 (-[KWQPageState clear]): clear the mousePressNode
1951 (-[KWQPageState dealloc]): deref the mousePressNode
1952 (-[KWQPageState mousePressNode]): new
1956 2005-01-13 Vicki Murley <vicki@apple.com>
1960 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
1962 * WebCore.pbproj/project.pbxproj: bump "2004" to "2005"
1964 2005-01-13 David Harrison <harrison@apple.com>
1966 Reviewed by Ken Kocienda.
1968 Better fix for 3905066.
1970 * khtml/editing/htmlediting.cpp:
1971 (khtml::InsertParagraphSeparatorCommand::doApply):
1973 2005-01-10 Maciej Stachowiak <mjs@apple.com>
1977 <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
1979 * khtml/rendering/render_text.cpp:
1980 (InlineTextBox::paint): Support painting custom underline markers for
1981 marked text in place of generic yellow.
1982 (InlineTextBox::paintMarkedTextUnderline): New method that handles this.
1983 * khtml/rendering/render_text.h:
1984 * kwq/KWQKHTMLPart.h: Declare new methods and structs.
1985 * kwq/KWQKHTMLPart.mm:
1986 (KWQKHTMLPart::clear): Clear marked test underlines.
1987 (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
1988 (convertAttributesToUnderlines): Converts NSAttributedString attributes
1989 to simplified and C++-friendly form.
1990 (KWQKHTMLPart::markedTextUsesUnderlines): New method.
1991 (KWQKHTMLPart::markedTextUnderlines): New method.
1992 * kwq/KWQPainter.mm:
1993 (QPainter::drawLineForText): Handle pen width.
1994 * kwq/WebCoreBridge.h:
1995 * kwq/WebCoreBridge.mm:
1996 (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
1998 * kwq/WebCoreTextRenderer.h:
2000 2005-01-12 David Harrison <harrison@apple.com>
2002 Reviewed by Dave Hyatt.
2004 <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
2006 * kwq/KWQAccObject.mm:
2007 (-[KWQAccObject addChildrenToArray:]):
2008 Use the widget's outer view.
2010 2005-01-12 David Harrison <harrison@apple.com>
2012 Reviewed by Darin Adler.
2014 <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute
2016 * khtml/xml/dom_nodeimpl.cpp:
2017 (NodeImpl::displayNode):
2018 Add quotes around text node content.
2019 (NodeBaseImpl::childNode):
2020 Add nil check to return nil rather than crash when child node not found.
2021 * kwq/KWQAccObject.mm:
2022 (-[KWQAccObject doAXStringForTextMarkerRange:]):
2023 Pass range compliant positions to TextIterator.
2025 2005-01-12 David Hyatt <hyatt@apple.com>
2027 Fix for 3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during
2028 line layout is smarter about including the overflow for both old states and new states.
2032 * khtml/rendering/bidi.cpp:
2033 (khtml::RenderBlock::layoutInlineChildren):
2035 2005-01-12 David Hyatt <hyatt@apple.com>
2037 Fix for bug 3937608, versiontracker.com flashes and displays the right column below content. Make sure to move
2038 tables/overflows that dont fit within a block only in strict mode.
2040 Fix for bug 3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific
2041 case in editing is hit.
2043 Reviewed by darin (first one), kocienda (second one)
2045 * khtml/rendering/render_block.cpp:
2046 (khtml::RenderBlock::getClearDelta):
2047 * khtml/rendering/render_flow.cpp:
2048 (RenderFlow::dirtyLinesFromChangedChild):
2049 * khtml/rendering/render_line.cpp:
2050 (khtml::InlineFlowBox::verticallyAlignBoxes):
2052 2005-01-12 Ken Kocienda <kocienda@apple.com>
2058 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
2060 * khtml/editing/htmlediting.cpp:
2061 (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
2062 merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
2063 added to visible_position files.
2064 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
2065 tests to determine when to stop moving nodes more complete and correct. Also improved comments.
2066 * khtml/editing/visible_position.cpp:
2067 (khtml::isFirstVisiblePositionInParagraph): New function.
2068 (khtml::isLastVisiblePositionInParagraph): New function.
2069 * khtml/editing/visible_position.h: Update header accordingly.
2070 * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
2071 results but still correct.
2072 * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
2073 * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
2074 * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
2075 * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
2076 * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
2077 * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
2078 * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
2079 * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
2080 * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
2081 * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
2083 2005-01-11 Richard Williamson <rjw@apple.com>
2085 Fixed 3922875. Fall back to DOM object is EMBED element
2086 has no associated runtime object.
2090 * khtml/ecma/kjs_dom.cpp:
2091 (KJS::getRuntimeObject):
2092 * khtml/ecma/kjs_html.cpp:
2093 (KJS::HTMLDocument::tryGet):
2094 (KJS::HTMLElement::tryGet):
2095 (KJS::HTMLCollection::tryGet):
2096 (KJS::HTMLCollection::getNamedItems):
2098 2005-01-11 David Hyatt <hyatt@apple.com>
2100 Fix for 3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match
2105 * khtml/html/htmltokenizer.cpp:
2106 (khtml::HTMLTokenizer::parseTag):
2108 2005-01-11 Chris Blumenberg <cblu@apple.com>
2110 Fixed: <rdar://problem/3930733> Mail prints second page of email blank
2114 * khtml/rendering/render_canvas.cpp:
2115 (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
2116 * khtml/rendering/render_flow.cpp:
2117 (RenderFlow::paintLines): removed null check since the print rect should never be null
2118 * khtml/rendering/render_list.cpp:
2119 (RenderListMarker::paint): ditto
2120 * kwq/KWQKHTMLPart.mm:
2121 (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
2123 2005-01-10 Ken Kocienda <kocienda@apple.com>
2129 <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply
2131 * khtml/editing/htmlediting.cpp:
2132 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a
2133 simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the
2134 result calculated in that deeper scope was not available when tested.
2136 2005-01-10 Ken Kocienda <kocienda@apple.com>
2142 <rdar://problem/3946852> Option-e goes to next line
2144 * khtml/editing/htmlediting.cpp:
2145 (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
2146 into the start line is done. We plan to change pretty substantially soon to better handle
2147 the problem described in <rdar://problem/3937352> Quote level not maintained when copied
2148 and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
2150 2005-01-10 Ken Kocienda <kocienda@apple.com>
2156 <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines
2158 * khtml/editing/htmlediting.cpp:
2159 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
2160 to their own blocks if needed so that a block style can be applied.
2161 (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
2162 (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
2163 (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
2164 This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
2165 paragraph is styled.
2166 (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
2167 Should remove attributue instead.
2168 * khtml/editing/htmlediting.h: Touch function declarations accordingly.
2169 * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
2170 * layout-tests/editing/style/create-block-for-style-001.html: Added.
2171 * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
2172 * layout-tests/editing/style/create-block-for-style-002.html: Added.
2173 * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
2174 * layout-tests/editing/style/create-block-for-style-003.html: Added.
2175 * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
2176 * layout-tests/editing/style/create-block-for-style-004.html: Added.
2177 * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
2178 * layout-tests/editing/style/create-block-for-style-005.html: Added.
2179 * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
2180 * layout-tests/editing/style/create-block-for-style-006.html: Added.
2181 * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
2182 * layout-tests/editing/style/create-block-for-style-007.html: Added.
2183 * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
2184 * layout-tests/editing/style/create-block-for-style-008.html: Added.
2185 * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
2186 * layout-tests/editing/style/create-block-for-style-009.html: Added.
2187 * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
2188 * layout-tests/editing/style/create-block-for-style-010.html: Added.
2189 * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
2190 * layout-tests/editing/style/create-block-for-style-011.html: Added.
2191 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
2192 * layout-tests/editing/style/create-block-for-style-012.html: Added.
2193 * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
2194 * layout-tests/editing/style/create-block-for-style-013.html: Added.
2196 Unrelated updates to these expected results.
2197 * layout-tests/editing/inserting/insert-div-007-expected.txt
2198 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
2200 2005-01-10 Chris Blumenberg <cblu@apple.com>
2202 Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print
2206 * khtml/rendering/render_flow.cpp:
2207 (RenderFlow::paintLines): don't do pagination work if printRect is not set
2208 * khtml/rendering/render_list.cpp:
2209 (RenderListMarker::paint): ditto
2211 2005-01-10 David Harrison <harrison@apple.com>
2215 * kwq/KWQTextUtilities.mm:
2216 (currentTextBreakLocaleID):
2217 Return empty string (AKA root locale) if locale pref can not be canonicalized.
2219 2005-01-10 John Sullivan <sullivan@apple.com>
2221 Fixed broken Panther build.
2223 * kwq/KWQTextUtilities.mm:
2224 (currentTextBreakLocaleID):
2225 This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
2226 That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
2227 To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
2228 function. However, the Tiger-only code was wrong; the string generated using
2229 CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
2232 2005-01-09 David Harrison <harrison@apple.com>
2234 Reviewed by Ken Kocienda.
2236 <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
2238 * khtml/editing/htmlediting.cpp:
2239 (khtml::ReplaceSelectionCommand::doApply):
2240 Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
2242 2005-01-09 Darin Adler <darin@apple.com>
2244 Reviewed by Harrison.
2246 - fixed <rdar://problem/3939176> select() method does not work on <input type=search>
2248 * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
2249 to a switch statement. Added SEARCH to the set of types that treat the renderer as a
2252 2005-01-09 David Harrison <harrison@apple.com>
2254 Reviewed by Ken Kocienda.
2256 <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
2258 Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
2259 whitespace to a single non-breaking space when splitting a text node.
2261 * khtml/editing/htmlediting.cpp:
2262 (khtml::InsertParagraphSeparatorCommand::doApply):
2264 2005-01-08 Kevin Decker <kdecker@apple.com>
2268 Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
2270 * khtml/html/html_elementimpl.cpp:
2271 (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
2273 2005-01-07 Maciej Stachowiak <mjs@apple.com>
2277 <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
2279 * Khtml/khtml_part.cpp:
2280 (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
2281 not started loading yet so it could not possibly be finishing here...
2282 (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
2283 no document, in this case we must have hit an error or been loading a non-HTML
2285 * khtml/khtml_part.h:
2287 2005-01-08 David Harrison <harrison@apple.com>
2291 <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
2293 * khtml/editing/selection.cpp:
2294 (khtml::Selection::validate):
2295 Tune word selections left/right choice to use right if on empty last line.
2297 2005-01-07 David Harrison <harrison@apple.com>
2301 <rdar://problem/3942619> AX: Support sentence ax attributes
2303 Needed to use the unicode utilities properly. Twas lame before.
2305 * khtml/editing/visible_units.cpp:
2306 (khtml::previousBoundary):
2307 (khtml::nextBoundary):
2308 (khtml::startOfWord):
2310 (khtml::previousWordPosition):
2311 (khtml::nextWordPosition):
2312 (khtml::startOfSentence):
2313 (khtml::endOfSentence):
2314 (khtml::previousSentencePosition):
2315 (khtml::nextSentencePosition):
2316 * kwq/KWQAccObject.mm:
2317 (-[KWQAccObject accessibilityAttributeNames]):
2318 (-[KWQAccObject accessibilityAttributeValue:]):
2319 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2320 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2321 * kwq/KWQTextUtilities.mm:
2322 (currentTextBreakLocaleID):
2323 (KWQFindSentenceBoundary):
2324 (KWQFindNextSentenceFromIndex):
2326 2005-01-07 Ken Kocienda <kocienda@apple.com>
2332 <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
2333 <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
2335 * khtml/editing/htmlediting.cpp:
2336 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
2337 Merge the typing style with the computed style for the current position. Fixes both bugs.
2338 * khtml/editing/htmlediting.h:
2339 * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
2340 * layout-tests/editing/inserting/insert-div-023.html: Added.
2341 * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
2342 * layout-tests/editing/inserting/insert-div-024.html: Added.
2344 2005-01-07 David Hyatt <hyatt@apple.com>
2346 Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
2347 behavior on worldofwarcraft.com.
2351 * khtml/rendering/render_table.cpp:
2352 (RenderTable::layout):
2354 2005-01-06 David Hyatt <hyatt@apple.com>
2356 Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables. Bulletproof the hit testing to
2357 ignore inline flows in this case.
2361 * khtml/rendering/render_block.cpp:
2362 (khtml::RenderBlock::nodeAtPoint):
2364 2005-01-07 Ken Kocienda <kocienda@apple.com>
2370 <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view
2372 * kwq/KWQKHTMLPart.mm:
2373 (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
2374 in the document, or if it is not a descendent of the document element. In the case of the bug,
2375 since the selection has not yet been set up, the focus node passed here is the HTML element, and
2376 that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
2378 2005-01-06 Kevin Decker <kdecker@apple.com>
2382 Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
2384 * khtml/khtml_part.cpp:
2385 (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.
2389 2005-01-06 David Harrison <harrison@apple.com>
2393 (addendum to previous checkin for this bug)
2394 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
2396 Fix line navigation. Add AXUIElementForTextMarker.
2398 * kwq/KWQAccObject.mm:
2399 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2400 (-[KWQAccObject doAXUIElementForTextMarker:]):
2401 (-[KWQAccObject doAXLineForTextMarker:]):
2402 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2403 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2404 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2405 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2406 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2408 2005-01-06 Darin Adler <darin@apple.com>
2412 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2414 (turns out the PLT regression was a false alarm)
2416 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2417 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2419 * khtml/html/htmlparser.cpp:
2420 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2421 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2422 to eliminate code that used ID_CLOSE_TAG for an array size.
2423 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2424 that manages isindex to use deref instead of delete.
2425 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2426 mistake of using ID_CLOSE_TAG for the array size too.
2427 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2428 there and it would prevent custom tags from working. Added range check before using the forbidden
2429 tag array with the token ID since custom tags will use index values past the end of the array.
2430 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2431 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2432 createElement call is still here. Last time I left out a few form element types from this switch;
2434 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2435 document if getTagID fails; this creates a unique per-document ID.
2437 * khtml/misc/htmltags.c: Regenerated.
2438 * khtml/misc/htmltags.h: Regenerated.
2440 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
2441 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
2442 Also rewrote getTagName to work with the new scheme.
2444 2005-01-06 David Harrison <harrison@apple.com>
2446 Fixed Panther build. Also, do not advertize sentence support since it is incomplete.
2448 * kwq/KWQAccObject.mm:
2449 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
2450 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2451 (-[KWQAccObject accessibilityIsAttributeSettable:]):
2453 2005-01-06 David Harrison <harrison@apple.com>
2455 Reviewed by Dave Hyatt.
2457 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
2458 <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
2460 Many more AX attributes supported. Numerous fixes to previous AX work.
2462 * khtml/editing/visible_units.cpp:
2463 (khtml::startSentenceBoundary):
2464 (khtml::startOfSentence):
2465 (khtml::endSentenceBoundary):
2466 (khtml::endOfSentence):
2467 (khtml::previousSentencePositionBoundary):
2468 (khtml::previousSentencePosition):
2469 (khtml::nextSentencePositionBoundary):
2470 (khtml::nextSentencePosition):
2471 * khtml/editing/visible_units.h:
2472 * khtml/khtmlview.cpp:
2473 (KHTMLView::layout):
2474 * khtml/misc/helper.cpp:
2475 (khtml::findSentenceBoundary):
2476 (khtml::nextSentenceFromIndex):
2477 * khtml/misc/helper.h:
2478 * khtml/misc/htmltags.c:
2481 * khtml/rendering/render_container.cpp:
2482 (RenderContainer::removeChildNode):
2483 (RenderContainer::appendChildNode):
2484 (RenderContainer::insertChildNode):
2485 * khtml/rendering/render_object.cpp:
2486 (RenderObject::remove):
2487 * khtml/xml/dom_docimpl.cpp:
2488 (DocumentImpl::getAccObjectCache):
2489 (DocumentImpl::updateSelection):
2490 (DocumentImpl::close):
2491 (DocumentImpl::setFocusNode):
2492 (DocumentImpl::parentDocument):
2493 (DocumentImpl::topDocument):
2494 * khtml/xml/dom_docimpl.h:
2495 * kwq/KWQAccObject.mm:
2496 (-[KWQAccObject accessibilityShouldUseUniqueId]):
2497 (-[KWQAccObject detach]):
2498 (-[KWQAccObject anchorElement]):
2499 (-[KWQAccObject firstChild]):
2500 (-[KWQAccObject lastChild]):
2501 (-[KWQAccObject previousSibling]):
2502 (-[KWQAccObject nextSibling]):
2503 (-[KWQAccObject parentObject]):
2504 (-[KWQAccObject value]):
2505 (-[KWQAccObject accessibilityAttributeNames]):
2506 (-[KWQAccObject accessibilityPerformAction:]):
2507 (-[KWQAccObject textMarkerForVisiblePosition:]):
2508 (-[KWQAccObject visiblePositionForTextMarker:]):
2509 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
2510 (-[KWQAccObject topDocument]):
2511 (-[KWQAccObject topRenderer]):
2512 (-[KWQAccObject topView]):
2513 (-[KWQAccObject accessibilityAttributeValue:]):
2514 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
2515 (-[KWQAccObject doAXLineForTextMarker:]):
2516 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
2517 (-[KWQAccObject doAXStringForTextMarkerRange:]):
2518 (-[KWQAccObject doAXTextMarkerForPosition:]):
2519 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
2520 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
2521 (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
2522 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
2523 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
2524 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
2525 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
2526 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
2527 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
2528 (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
2529 (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
2530 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
2531 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
2532 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
2533 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
2534 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
2535 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
2536 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
2537 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
2538 (-[KWQAccObject doAXLengthForTextMarkerRange:]):
2539 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
2540 (-[KWQAccObject accessibilityHitTest:]):
2541 (-[KWQAccObject accessibilityFocusedUIElement]):
2542 (-[KWQAccObject accessibilityIsAttributeSettable:]):
2543 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
2544 (-[KWQAccObject setAccObjectID:]):
2545 (-[KWQAccObject removeAccObjectID]):
2546 * kwq/KWQAccObjectCache.h:
2547 * kwq/KWQAccObjectCache.mm:
2548 (KWQAccObjectCache::setAccObject):
2549 (KWQAccObjectCache::removeAccObject):
2550 (KWQAccObjectCache::visiblePositionForTextMarker):
2551 (KWQAccObjectCache::postNotificationToTopWebArea):
2552 (KWQAccObjectCache::postNotification):
2553 (KWQAccObjectCache::handleFocusedUIElementChanged):
2554 * kwq/KWQKHTMLPart.mm:
2555 (KWQKHTMLPart::respondToChangedContents):
2556 * kwq/KWQTextUtilities.h:
2557 * kwq/KWQTextUtilities.mm:
2558 (KWQFindNextWordFromIndex):
2559 (KWQFindSentenceBoundary):
2560 (KWQFindNextSentenceFromIndex):
2561 * kwq/WebCoreBridge.mm:
2562 (-[WebCoreBridge accessibilityTree]):
2564 2005-01-05 Darin Adler <darin@apple.com>
2568 - re-landing a subset of my custom tag change that does not fix the bug, but also does
2569 not introduce a performance regression
2571 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2572 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2574 * khtml/editing/htmlediting.cpp:
2575 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2576 per-document tags and is just better all around for things like the document.
2577 (khtml::debugNode): Ditto.
2578 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2579 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2580 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2581 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2583 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2584 non-HTML elements to be nested as desired.
2586 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2587 * khtml/misc/htmlhashes.cpp:
2588 (khtml::getTagID): Changed return type to unsigned short.
2589 (khtml::getAttrID): Ditto.
2591 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
2592 * khtml/xml/dom_docimpl.cpp:
2593 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
2594 Also updated for a few tags that the parser handled but this did not.
2596 * kwq/KWQRenderTreeDebug.cpp:
2597 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
2598 the tag ID directly, which only works for standard nodes.
2599 (operator<<): Update to call getTagName.
2600 (nodePositionRelativeToRoot): Ditto.
2601 (writeSelection): Ditto.
2603 2005-01-05 Ken Kocienda <kocienda@apple.com>
2609 <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place
2611 * khtml/editing/htmlediting.cpp:
2612 (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
2613 this operation work correctly, particularly in the logic to figure out whether to merge content, and
2614 also performing merges.
2615 * khtml/editing/visible_position.cpp:
2616 (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
2617 * khtml/editing/visible_units.cpp:
2618 (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
2619 (khtml::isEndOfParagraph): Ditto.
2620 * khtml/editing/visible_units.h: Declare new functions.
2622 2005-01-04 Ken Kocienda <kocienda@apple.com>
2628 <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
2630 * khtml/editing/htmlediting.cpp:
2631 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
2632 for the block we are adding was being done at the wrong time, which led to the placeholder remaining
2633 in the document when it was not needed. This resulted in the extra space reported in the bug.
2635 2005-01-04 Kevin Decker <kdecker@apple.com>
2639 Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
2641 * khtml/rendering/render_block.cpp:
2642 (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.
2644 2005-01-04 David Hyatt <hyatt@apple.com>
2646 Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
2650 * khtml/rendering/render_layer.cpp:
2651 (RenderLayer::updateScrollInfoAfterLayout):
2653 2005-01-04 Ken Kocienda <kocienda@apple.com>
2657 Fix for these two bugs:
2659 <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content
2660 <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
2662 * khtml/editing/htmlediting.cpp:
2663 (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge
2664 neither start nor end. For 3939148, improve the code which adjusts the insertion point during
2665 the process of pasting. It formerly handled only one of the possible cases.
2666 * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
2667 * layout-tests/editing/pasteboard/paste-text-015.html: Added.
2669 2005-01-04 David Hyatt <hyatt@apple.com>
2671 Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
2675 * khtml/rendering/render_form.cpp:
2676 (RenderLineEdit::updateFromElement):
2677 * kwq/KWQLineEdit.mm:
2678 (QLineEdit::setPlaceholderString):
2680 2005-01-04 David Hyatt <hyatt@apple.com>
2682 Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when
2683 returning pseudo-styles.
2687 * khtml/css/cssstyleselector.cpp:
2688 (khtml::CSSStyleSelector::matchRulesForList):
2689 (khtml::CSSStyleSelector::pseudoStyleForElement):
2690 * khtml/rendering/render_style.cpp:
2691 (RenderStyle::addPseudoStyle):
2693 2005-01-04 Darin Adler <darin@apple.com>
2695 - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
2697 * khtml/css/cssstyleselector.cpp:
2698 * khtml/editing/htmlediting.cpp:
2699 * khtml/editing/selection.cpp:
2700 * khtml/editing/visible_position.cpp:
2701 * khtml/html/dtd.cpp:
2702 * khtml/html/htmlparser.cpp:
2703 * khtml/html/htmlparser.h:
2704 * khtml/html/htmltokenizer.cpp:
2705 * khtml/misc/htmlhashes.cpp:
2706 * khtml/misc/htmlhashes.h:
2707 * khtml/misc/htmltags.c:
2708 * khtml/misc/htmltags.h:
2709 * khtml/misc/maketags:
2710 * khtml/xml/dom_docimpl.cpp:
2711 * khtml/xml/dom_docimpl.h:
2712 * khtml/xml/dom_nodeimpl.cpp:
2713 * khtml/xml/dom_position.cpp:
2714 * kwq/KWQRenderTreeDebug.cpp:
2716 2005-01-04 Ken Kocienda <kocienda@apple.com>
2722 <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered
2724 * khtml/editing/htmlediting.cpp:
2725 (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
2726 a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
2727 to be applied. Now the code will detect when at the end of a style run and will not move and apply
2728 that ending style to the new paragraph, though it will place that style into the typing style. This
2729 seems to match NSText behavior.
2730 * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
2731 here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
2732 not have any visible effect on the document.
2733 * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
2734 * layout-tests/editing/inserting/insert-div-022.html: Added.
2736 2005-01-04 David Hyatt <hyatt@apple.com>
2738 Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
2743 * khtml/rendering/render_flow.cpp:
2744 (RenderFlow::paintLines):
2746 2005-01-03 David Hyatt <hyatt@apple.com>
2748 Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint flag setting more
2749 robust and make it work regardless of which objects get a layout or not.
2753 * khtml/rendering/render_block.cpp:
2754 (khtml::RenderBlock::insertFloatingObject):
2755 (khtml::RenderBlock::addOverhangingFloats):
2756 (khtml::RenderBlock::addIntrudingFloats):
2757 * khtml/rendering/render_block.h:
2758 (khtml::RenderBlock::FloatingObject::FloatingObject):
2760 2005-01-03 Maciej Stachowiak <mjs@apple.com>
2764 <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
2766 * khtml/html/html_miscimpl.cpp:
2767 (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
2768 it should not ever be (now).
2769 (HTMLCollectionImpl::item): When traversing items stop when we hit
2770 nil, meaning the end to avoid triggering above assert (formerly crash).
2772 2005-01-03 Maciej Stachowiak <mjs@apple.com>
2774 Reviewed by John and Kevin.
2776 <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
2778 * khtml/ecma/kjs_window.cpp:
2779 (Window::get): Look up frame names before buitin window properties
2780 to match other browsers. This regressed because we added a builtin
2781 "toolbar" property but this site had a frame with that name.
2783 2004-12-21 Maciej Stachowiak <mjs@apple.com>
2787 <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another
2789 Added opener bridge method to help WebKit implement security check
2790 for named frame visibility.
2792 * khtml/khtml_part.h:
2793 * kwq/WebCoreBridge.h:
2794 * kwq/WebCoreBridge.mm:
2795 (-[WebCoreBridge opener]):
2797 2005-01-03 Ken Kocienda <kocienda@apple.com>
2803 <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]
2805 * kwq/WebCoreBridge.mm:
2806 (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.
2808 2005-01-03 David Hyatt <hyatt@apple.com>
2810 Fix for 3936881, make sure positioned objects prooperly update y-position.
2814 * khtml/rendering/render_block.cpp:
2815 (khtml::RenderBlock::layoutPositionedObjects):
2817 2005-01-03 Ken Kocienda <kocienda@apple.com>
2819 Reviewed by Harrison
2823 <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key
2825 * khtml/editing/htmlediting.cpp:
2826 (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
2827 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
2828 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
2829 (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
2830 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
2831 (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
2832 insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
2833 of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
2834 (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
2835 (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
2836 * khtml/editing/htmlediting.h: Declare new functions.
2838 2004-12-25 Kevin Decker <kdecker@apple.com>
2842 Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)
2844 * khtml/html/dtd.cpp: <label> needed a much higher priority such that it will close block elements. Malformed HTML (ugh) is the only reason why we need to do this.
2846 2004-12-23 Darin Adler <darin@apple.com>
2850 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2852 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2853 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2855 * khtml/editing/htmlediting.cpp:
2856 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2857 per-document tags and is just better all around for things like the document.
2858 (khtml::debugNode): Ditto.
2859 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2860 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2861 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2862 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2864 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2865 non-HTML elements to be nested as desired.
2867 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2868 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2870 * khtml/html/htmlparser.cpp:
2871 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2872 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2873 to eliminate code that used ID_CLOSE_TAG for an array size.
2874 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2875 that manages isindex to use deref instead of delete.
2876 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2877 mistake of using ID_CLOSE_TAG for the array size too.
2878 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2879 there and it would prevent custom tags from working. Added range check before using the forbidden
2880 tag array with the token ID since custom tags will use index values past the end of the array.
2881 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2882 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2883 createElement call is still here. Last time I left out a few form element types from this switch;
2885 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2886 document if getTagID fails; this creates a unique per-document ID.
2888 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2889 * khtml/misc/htmlhashes.cpp:
2890 (khtml::getTagID): Changed return type to unsigned short.
2891 (khtml::getAttrID): Ditto.
2893 * khtml/misc/htmltags.c: Regenerated.
2894 * khtml/misc/htmltags.h: Regenerated.
2896 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
2897 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
2898 Also rewrote getTagName to work with the new scheme.
2900 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
2901 * khtml/xml/dom_docimpl.cpp:
2902 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
2903 Also updated for a few tags that the parser handled but this did not.
2905 * kwq/KWQRenderTreeDebug.cpp:
2906 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
2907 the tag ID directly, which only works for standard nodes.
2908 (operator<<): Update to call getTagName.
2909 (nodePositionRelativeToRoot): Ditto.
2910 (writeSelection): Ditto.
2914 2004-12-22 Darin Adler <darin@apple.com>
2916 - rolled out my custom tag name change -- it broke amazon.com
2918 * khtml/css/cssstyleselector.cpp:
2919 * khtml/editing/htmlediting.cpp:
2920 * khtml/editing/selection.cpp:
2921 * khtml/editing/visible_position.cpp:
2922 * khtml/html/dtd.cpp:
2923 * khtml/html/htmlparser.cpp:
2924 * khtml/html/htmlparser.h:
2925 * khtml/html/htmltokenizer.cpp:
2926 * khtml/misc/htmlhashes.cpp:
2927 * khtml/misc/htmlhashes.h:
2928 * khtml/misc/htmltags.c:
2929 * khtml/misc/htmltags.h:
2930 * khtml/misc/maketags:
2931 * khtml/xml/dom_docimpl.cpp:
2932 * khtml/xml/dom_docimpl.h:
2933 * khtml/xml/dom_nodeimpl.cpp:
2934 * khtml/xml/dom_position.cpp:
2935 * kwq/KWQRenderTreeDebug.cpp:
2937 2004-12-22 David Harrison <harrison@apple.com>
2939 Reviewed by Darin Adler.
2941 * khtml/editing/selection.cpp:
2942 (khtml::Selection::validate):
2943 The selecting/deselecting bad behavior is because the Selection code that expands by words
2944 had an inaccurate test for being at the end of the document (where double-clicking needs
2945 to select the last word). Fixed that check.
2947 2004-12-22 Adele Amchan <adele@apple.com>
2951 Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while
2953 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection
2954 so that we match Firefox and WinIE behavior.
2956 2004-12-22 Darin Adler <darin@apple.com>
2960 - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
2962 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
2963 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
2965 * khtml/editing/htmlediting.cpp:
2966 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
2967 per-document tags and is just better all around for things like the document.
2968 (khtml::debugNode): Ditto.
2969 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
2970 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
2971 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
2972 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
2974 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
2975 non-HTML elements to be nested as desired.
2977 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
2978 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
2980 * khtml/html/htmlparser.cpp:
2981 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
2982 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
2983 to eliminate code that used ID_CLOSE_TAG for an array size.
2984 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
2985 that manages isindex to use deref instead of delete.
2986 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
2987 mistake of using ID_CLOSE_TAG for the array size too.
2988 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
2989 there and it would prevent custom tags from working. Added range check before using the forbidden
2990 tag array with the token ID since custom tags will use index values past the end of the array.
2991 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
2992 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
2993 createElement call is still here.
2994 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
2995 document if getTagID fails; this creates a unique per-document ID.
2997 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
2998 * khtml/misc/htmlhashes.cpp:
2999 (khtml::getTagID): Changed return type to unsigned short.
3000 (khtml::getAttrID): Ditto.
3002 * khtml/misc/htmltags.c: Regenerated.
3003 * khtml/misc/htmltags.h: Regenerated.
3005 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
3006 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
3007 Also rewrote getTagName to work with the new scheme.
3009 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
3010 * khtml/xml/dom_docimpl.cpp:
3011 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
3012 Also updated for a few tags that the parser handled but this did not.
3014 * kwq/KWQRenderTreeDebug.cpp:
3015 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
3016 the tag ID directly, which only works for standard nodes.
3017 (operator<<): Update to call getTagName.
3018 (nodePositionRelativeToRoot): Ditto.
3019 (writeSelection): Ditto.
3021 2004-12-21 David Harrison <harrison@apple.com>
3023 Reviewed by Ken Kocienda.
3025 <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line
3027 Problem was the TextIterator was not handling exitNode() from a P block properly.
3029 * khtml/editing/visible_text.cpp:
3030 (khtml::TextIterator::TextIterator):
3031 Add new param that specifies whether the iterator is for content or for searching.
3032 Search iterators do not prevent newlines at the beginning.
3033 (khtml::TextIterator::advance):
3034 Added some comments.
3035 (khtml::TextIterator::handleTextNode):
3036 Added some comments.
3037 (khtml::TextIterator::exitNode):
3038 Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
3039 (khtml::TextIterator::emitCharacter):
3040 Added some comments.
3041 (khtml::TextIterator::range):
3042 Added some comments.
3043 (khtml::CharacterIterator::CharacterIterator):
3044 Specify search type TextIterator.
3045 (khtml::CharacterIterator::advance):
3046 * khtml/editing/visible_text.h:
3048 Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
3049 * khtml/editing/visible_units.cpp:
3050 (khtml::nextWordBoundary):
3051 Specify search type TextIterator.
3053 2004-12-21 David Harrison <harrison@apple.com>
3055 Reviewed by Ken Kocienda.
3057 <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL
3059 Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
3060 Fixed by pretending the start == end-1 in that situation, as long as end > 0.
3062 * khtml/rendering/render_text.cpp:
3063 (RenderText::setSelectionState)
3065 2004-12-21 Maciej Stachowiak <mjs@apple.com>
3069 <rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain
3071 * khtml/ecma/kjs_window.cpp:
3072 (Window::get): Change most window functions to be restricted by
3075 2004-12-21 Ken Kocienda <kocienda@apple.com>
3081 <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document
3083 * khtml/editing/htmlediting.cpp:
3084 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
3085 formerly undetected and unhandled. This is the crux of the bug fix.
3086 (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
3087 execution of command.
3088 * khtml/editing/htmlediting.h: Declare new function.
3089 * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added.
3090 * layout-tests/editing/deleting/delete-3928305-fix.html: Added.
3092 2004-12-21 Ken Kocienda <kocienda@apple.com>
3096 * khtml/editing/htmlediting.cpp:
3097 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
3098 checking in (aka must return false from function returning bool).
3100 2004-12-21 Ken Kocienda <kocienda@apple.com>
3106 <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*)
3108 * khtml/editing/htmlediting.cpp:
3109 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks.
3110 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto.
3112 2004-12-21 Ken Kocienda <kocienda@apple.com>
3116 * khtml/editing/htmlediting.cpp:
3117 (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on
3118 further experiements.
3119 (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to
3120 be done if the insertion point is in an empty block.
3121 * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added.
3122 * layout-tests/editing/pasteboard/paste-text-012.html: Added.
3123 * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added.
3124 * layout-tests/editing/pasteboard/paste-text-013.html: Added.
3125 * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added.
3126 * layout-tests/editing/pasteboard/paste-text-014.html: Added.
3128 2004-12-21 Darin Adler <darin@apple.com>
3132 - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages)
3134 * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also
3135 add a field to track it. Must make a few things mutable so we can update them in the range accessor.
3136 * khtml/editing/visible_text.cpp:
3137 (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets
3138 using the node's index. We only compute the node index if actually asked for the range.
3139 (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting
3141 (khtml::TextIterator::handleTextBox): Ditto.
3142 (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling
3144 (khtml::TextIterator::handleNonTextNode): Pass 0 for offset.
3145 (khtml::TextIterator::exitNode): More of the same.
3146 (khtml::TextIterator::emitCharacter): Ditto.
3147 (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then
3148 add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search.
3152 * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on.
3156 2004-12-20 Ken Kocienda <kocienda@apple.com>
3160 * khtml/editing/htmlediting.cpp:
3161 (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test
3162 regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
3163 Rolling out until I can develop a real fix.
3165 2004-12-20 David Harrison <harrison@apple.com>
3167 Reviewed by Dave Hyatt.
3169 Initial checkin of AXTextMarkerRef support.
3171 * khtml/xml/dom_docimpl.cpp:
3172 (DocumentImpl::updateSelection):
3173 (DocumentImpl::setFocusNode):
3174 * kwq/KWQAccObject.h:
3175 * kwq/KWQAccObject.mm:
3176 (-[KWQAccObject detach]):
3177 (-[KWQAccObject anchorElement]):
3178 (-[KWQAccObject addChildrenToArray:]):
3179 (-[KWQAccObject accessibilityAttributeNames]):
3180 (-[KWQAccObject accessibilityActionDescription:]):
3181 (-[KWQAccObject accessibilityPerformAction:]):
3182 (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]):
3183 (-[KWQAccObject textMarkerForVisiblePosition:]):
3184 (-[KWQAccObject visiblePositionForTextMarker:]):
3185 (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]):
3186 (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]):
3187 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
3188 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
3189 (-[KWQAccObject accessibilityAttributeValue:]):
3190 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
3191 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
3192 (-[KWQAccObject getSelectedTextMarkerRange]):
3193 (-[KWQAccObject doAXLineForTextMarker:]):
3194 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
3195 (-[KWQAccObject doAXStringForTextMarkerRange:]):
3196 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
3197 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
3198 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
3199 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
3200 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
3201 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
3202 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
3203 (-[KWQAccObject accessibilityFocusedUIElement]):
3204 (-[KWQAccObject clearChildren]):
3205 (-[KWQAccObject accObjectID]):
3206 (-[KWQAccObject setAccObjectID:]):
3207 (-[KWQAccObject removeAccObjectID]):
3208 * kwq/KWQAccObjectCache.h:
3209 * kwq/KWQAccObjectCache.mm:
3210 (KWQAccObjectCache::KWQAccObjectCache):
3211 (KWQAccObjectCache::~KWQAccObjectCache):
3212 (KWQAccObjectCache::getAccObjectID):
3213 (KWQAccObjectCache::removeAccObjectID):
3214 (KWQAccObjectCache::textMarkerForVisiblePosition):
3215 (KWQAccObjectCache::visiblePositionForTextMarker):
3217 2004-12-19 Darin Adler <darin@apple.com>
3219 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.
3221 2004-12-19 Darin Adler <darin@apple.com>
3225 - a garbage collection fix
3227 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER
3228 #ifndef to use #if (in practice, either is OK).
3229 * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease.
3231 2004-12-17 David Hyatt <hyatt@apple.com>
3233 Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.
3235 Reviewed by kocienda
3237 * khtml/rendering/render_box.cpp:
3238 (RenderBox::calcPercentageHeight):
3239 * khtml/rendering/render_table.cpp:
3240 (RenderTableSection::layoutRows):
3242 2004-12-17 David Harrison <harrison@apple.com>
3244 Reviewed by Ken Kocienda.
3246 <rdar://problem/3924930> REGRESSION: triple click does not select to end of line
3248 * khtml/editing/visible_units.cpp:
3249 (khtml::endOfParagraph):
3250 When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.
3252 2004-12-17 Ken Kocienda <kocienda@apple.com>
3256 * khtml/editing/htmlediting.cpp:
3257 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
3258 codes when I added the createBreakElement() function.
3260 2004-12-17 Richard Williamson <rjw@apple.com>
3262 Set the floor of max cacheable object size to 40K. This restores
3263 the long standing floor. Lower floor deleteriously impacts the PLT.
3266 * khtml/khtml_part.cpp:
3267 (KHTMLPart::checkCompleted):
3268 * khtml/misc/loader.cpp:
3271 2004-12-17 Ken Kocienda <kocienda@apple.com>
3277 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
3279 * khtml/editing/htmlediting.cpp:
3280 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit.
3281 Formerly checked only for block boundary.
3283 2004-12-17 David Harrison <harrison@apple.com>
3287 Add KWQCFAutorelease for autoreleasing CF objects.
3288 * kwq/KWQFoundationExtras.h:
3292 2004-12-17 David Harrison <harrison@apple.com>
3296 Fix GC compatibility in getNSString.
3299 (QString::getNSString):
3300 Use NSString allocator instead of CFString, so that autorelease works under GC.
3302 2004-12-17 Ken Kocienda <kocienda@apple.com>
3308 <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text
3310 * khtml/editing/htmlediting.cpp:
3311 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not
3312 move it after the <body> element.
3314 2004-12-17 Ken Kocienda <kocienda@apple.com>
3318 Added new layout tests covering cases from recent bug fixes.
3320 * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
3321 * layout-tests/editing/inserting/insert-div-018.html: Added.
3322 * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
3323 * layout-tests/editing/inserting/insert-div-019.html: Added.
3324 * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
3325 * layout-tests/editing/inserting/insert-div-020.html: Added.
3326 * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
3327 * layout-tests/editing/inserting/insert-div-021.html: Added.
3329 2004-12-17 Ken Kocienda <kocienda@apple.com>
3333 Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin.
3335 * layout-tests/editing/inserting/insert-div-013-expected.txt
3336 * layout-tests/editing/inserting/insert-div-014-expected.txt
3338 2004-12-17 Ken Kocienda <kocienda@apple.com>
3344 <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote
3346 * khtml/editing/htmlediting.cpp:
3347 (khtml::InsertParagraphSeparatorCommand::doApply):
3348 * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting
3349 block as the reference node for the insertion of the new block.
3350 (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true.
3351 I worked this all out on the whiteboard this time. This should be the last tweak.
3353 2004-12-17 Kevin Decker <kdecker@apple.com>
3357 Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs
3359 * khtml/xml/xml_tokenizer.cpp:
3360 (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla.
3362 2004-12-16 Ken Kocienda <kocienda@apple.com>
3368 <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline
3370 * khtml/editing/htmlediting.cpp:
3371 (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that
3372 it checks the downstream node for the starting position.
3374 2004-12-16 Ken Kocienda <kocienda@apple.com>
3378 Added new createBreakElement() function that makes creating a <br> element a one-liner.
3379 Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode,
3380 over to this new helper.
3382 * khtml/editing/htmlediting.cpp:
3383 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function.
3384 (khtml::InsertLineBreakCommand::doApply): Ditto.
3385 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
3386 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
3387 (khtml::ReplaceSelectionCommand::doApply): Ditto.
3388 (khtml::createBreakElement): New helper.
3389 * khtml/editing/htmlediting.h: Ditto.
3391 2004-12-16 David Hyatt <hyatt@apple.com>
3393 Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was
3394 vertical-align top or bottom. The bug is 3771007, bankofamerica's ebills page.
3396 Reviewed by kocienda
3398 * khtml/rendering/render_object.cpp:
3399 (RenderObject::getVerticalPosition):
3401 2004-12-16 Ken Kocienda <kocienda@apple.com>
3407 <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline
3408 <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
3410 * khtml/editing/htmlediting.cpp:
3411 (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will
3412 make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after
3413 a check which may move the node used as the reference node for the insertion. Also change this code to
3414 insert the <p> after the last sibling of the starting position, to move it past the nodes we're going
3415 to want to shift into the new <p>.
3417 2004-12-16 Darin Adler <darin@apple.com>
3421 - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em
3422 after talking this over with Dave and Ken
3424 * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement.
3425 * khtml/editing/htmlediting.cpp:
3426 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement
3427 helper so this can share code with the plain-text conversion code.
3428 (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement
3429 helper so this can share code with the plain-text conversion code.
3430 (khtml::createDefaultParagraphElement): Added.
3431 (khtml::createBlockPlaceholderElement): Added.
3433 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than
3434 <br> elements for pasting plain text.
3436 - regenerated these files with the newer gperf
3438 * khtml/css/cssproperties.c: Regenerated.
3439 * khtml/css/cssvalues.c: Regenerated.
3440 * khtml/misc/htmlattrs.c: Regenerated.
3441 * khtml/misc/htmltags.c: Regenerated.
3443 2004-12-16 Ken Kocienda <kocienda@apple.com>
3449 <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element
3451 * khtml/xml/dom_nodeimpl.cpp:
3452 (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for
3453 parent that is not an inline would skip past previous siblings of nodes which were blocks. Now
3454 it stops looking in this situation. This problem eventually caused the delete code to try to
3455 merge a node under a descendent.
3457 2004-12-16 Adele Amchan <adele@apple.com>
3459 Change by Richard, reviewed by me.
3461 Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load
3463 * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading.
3465 2004-12-16 Adele Amchan <adele@apple.com>
3469 Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk
3471 Added a call to ObjectImp::get before Window::get just returns Undefined.
3472 This was preventing us from getting the toString function from a Window object.
3474 * khtml/ecma/kjs_window.cpp: (Window::get):
3476 2004-12-16 Ken Kocienda <kocienda@apple.com>
3482 <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place
3484 * khtml/editing/htmlediting.cpp:
3485 (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
3486 to do a better job than it was doing before. Added several test cases to prove I am on a
3488 * khtml/editing/visible_position.cpp:
3489 (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
3490 leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
3491 This function was returning true for the first position in "bar". Wrong. Also tightened up other
3492 rule: Should not report true when relationship between blocks cannot be determined.
3493 (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
3494 when relationship between blocks cannot be determined.
3495 * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
3496 * layout-tests/editing/inserting/insert-div-010.html: Added.
3497 * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
3498 * layout-tests/editing/inserting/insert-div-011.html: Added.
3499 * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
3500 * layout-tests/editing/inserting/insert-div-012.html: Added.
3501 * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
3502 * layout-tests/editing/inserting/insert-div-013.html: Added.
3503 * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
3504 * layout-tests/editing/inserting/insert-div-014.html: Added.
3505 * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
3506 * layout-tests/editing/inserting/insert-div-015.html: Added.
3507 * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
3508 * layout-tests/editing/inserting/insert-div-016.html: Added.
3509 * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
3510 * layout-tests/editing/inserting/insert-div-017.html: Added.
3512 2004-12-16 Ken Kocienda <kocienda@apple.com>
3516 Added a layout test based on my last checkin.
3518 * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
3519 * layout-tests/editing/selection/move-by-word-001.html: Added.
3521 2004-12-16 Ken Kocienda <kocienda@apple.com>
3527 <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps
3529 * khtml/editing/visible_text.cpp:
3530 (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating
3531 backwards into a different block that is an descendent of the block containing the text node (as in leaving
3532 the "bar" node in this example: <p>foo</p>bar).
3533 (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper.
3534 (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since
3535 it is called from there, and now also from advance().
3537 2004-12-15 Darin Adler <darin@apple.com>
3541 - fixed problem where plain-text would put a blank line between each <p> even when they have no margins
3543 * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the
3544 "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node
3545 type altogether and use the render tree instead.
3547 2004-12-14 John Sullivan <sullivan@apple.com>
3551 - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo"
3552 in the menu, no specific action names
3554 * khtml/editing/edit_actions.h: new header, contains EditAction enum
3555 (renamed from HTMLEditAction, formerly in htmlediting.h)
3557 * ForwardingHeaders/editing/edit_actions.h: new forwarding header
3559 * khtml/editing/htmlediting.h:
3560 removed HTMLEditAction enum in favor of including edit_actions.h; added khtml::
3561 namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand
3563 * khtml/editing/htmlediting.cpp:
3564 (khtml::EditCommandPtr::editingAction):
3565 update for enum name change
3566 (khtml::EditCommand::editingAction):
3568 (khtml::ApplyStyleCommand::ApplyStyleCommand):
3569 added editingAction parameter to this constructor
3570 (khtml::ApplyStyleCommand::editingAction):
3572 (khtml::DeleteSelectionCommand::editingAction):
3573 update for enum name change
3574 (khtml::MoveSelectionCommand::editingAction):
3576 (khtml::TypingCommand::editingAction):
3578 (khtml::ReplaceSelectionCommand::editingAction):
3581 * khtml/khtml_part.h:
3582 added EditAction parameter to applyStyle and computeAndSetTypingStyle
3583 * khtml/khtml_part.cpp:
3584 (KHTMLPart::computeAndSetTypingStyle):
3585 added EditAction parameter
3586 (KHTMLPart::applyStyle):
3589 * kwq/KWQKHTMLPart.mm:
3590 (KWQKHTMLPart::registerCommandForUndoOrRedo):
3591 do the cast from EditAction to WebUndoAction a different way to match other code
3593 * kwq/WebCoreBridge.h:
3594 * kwq/WebCoreBridge.mm:
3595 (-[WebCoreBridge setTypingStyle:withUndoAction:]):
3596 added WebUndoAction parameter, passed into ApplyStyleCommand constructor
3597 (-[WebCoreBridge applyStyle:withUndoAction:]):
3600 * WebCore.pbproj/project.pbxproj:
3601 updated for new files
3603 2004-12-14 David Hyatt <hyatt@apple.com>
3605 Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them. Remove
3606 the ridiculous 1024 limit on the span values.
3608 * khtml/html/html_tableimpl.cpp:
3609 (HTMLTableCellElementImpl::parseHTMLAttribute):
3610 * khtml/rendering/render_table.cpp:
3611 (RenderTableCell::collapsedBottomBorder):
3612 * khtml/rendering/render_table.h:
3613 (khtml::RenderTableCell::colSpan):
3614 (khtml::RenderTableCell::setColSpan):
3615 (khtml::RenderTableCell::rowSpan):
3616 (khtml::RenderTableCell::setRowSpan):
3617 (khtml::RenderTableCol::span):
3618 (khtml::RenderTableCol::setSpan):
3620 2004-12-14 David Hyatt <hyatt@apple.com>
3622 Make sure <col> and <colgroup> can have spans updated dynamically as well.
3626 * khtml/html/html_tableimpl.cpp:
3627 (HTMLTableColElementImpl::parseHTMLAttribute):
3628 * khtml/rendering/render_table.cpp:
3629 (RenderTableCell::updateFromElement):
3630 (RenderTableCol::updateFromElement):
3632 2004-12-14 David Hyatt <hyatt@apple.com>
3634 Fix for 3833123, setting a cell's colspan does not update rendering like it should.
3638 * khtml/html/html_tableimpl.cpp:
3639 (HTMLTableCellElementImpl::parseHTMLAttribute):
3640 * khtml/rendering/render_table.cpp:
3641 (RenderTableCell::RenderTableCell):
3642 (RenderTableCell::updateFromElement):
3644 2004-12-14 Chris Blumenberg <cblu@apple.com>
3646 Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
3650 * khtml/editing/markup.cpp:
3651 (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it
3653 2004-12-14 David Hyatt <hyatt@apple.com>
3655 Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position.
3656 This is actually a regression from my positioned object DHTML optimization.
3658 Reviewed by kocienda
3660 * khtml/rendering/render_object.cpp:
3661 (RenderObject::setStyle):
3663 2004-12-14 David Hyatt <hyatt@apple.com>
3665 Make sure the class attribute works when newlines are present in the attribute.
3667 Reviewed by kocienda
3669 * khtml/html/html_elementimpl.cpp:
3670 (HTMLNamedAttrMapImpl::parseClassAttribute):
3672 2004-12-14 David Hyatt <hyatt@apple.com>
3674 Fix for 3724938, float element is duplicated and paints twice. The logic for when to paint floats was
3675 actually fairly screwed up. This patch simplifies the logic and makes addOverhangingFloats easier to
3676 read by splitting it into two separate functions.
3678 Reviewed by kocienda
3680 * khtml/rendering/render_block.cpp:
3681 (khtml::RenderBlock::layoutBlockChildren):
3682 (khtml::RenderBlock::clearFloats):
3683 (khtml::RenderBlock::addOverhangingFloats):
3684 (khtml::RenderBlock::addIntrudingFloats):
3685 * khtml/rendering/render_block.h:
3687 2004-12-14 John Sullivan <sullivan@apple.com>
3691 - added Undo action names for Cut, Paste, and Drag
3693 * khtml/editing/htmlediting.h:
3694 * khtml/editing/htmlediting.cpp:
3695 (khtml::DeleteSelectionCommand::editingAction):
3696 overridden to return HTMLEditActionCut
3697 (khtml::MoveSelectionCommand::editingAction):
3698 overridden to return HTMLEditActionDrag
3699 (khtml::ReplaceSelectionCommand::editingAction):
3700 overridden to return HTMLEditActionPaste
3702 2004-12-14 John Sullivan <sullivan@apple.com>
3706 - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
3707 no specific action names
3709 The remaining step is to make each EditCommand subclass override editingAction() to return an
3710 appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
3711 is not completely straightforward, so this next step isn't trivial.)
3713 * khtml/editing/htmlediting.h:
3714 new enum for HTMLEditAction
3716 * khtml/editing/htmlediting.cpp:
3717 (khtml::EditCommandPtr::editingAction):
3718 new method, calls through to EditCommand
3719 (khtml::EditCommand::editingAction):
3720 new method for subclasses to override, returns HTMLEditActionUnspecified at this level
3721 (khtml::TypingCommand::editingAction):
3722 proof of concept override, returns HTMLEditActionTyping
3724 * kwq/KWQKHTMLPart.h:
3725 declare new private bottleneck method registerCommandForUndoOrRedo
3726 * kwq/KWQKHTMLPart.mm:
3727 (KWQKHTMLPart::registerCommandForUndoOrRedo):
3728 new bottleneck method to reduce code duplication; now calls over the bridge
3729 to get the localized string to use for the Undo action name
3730 (KWQKHTMLPart::registerCommandForUndo):
3731 now calls new bottleneck method
3732 (KWQKHTMLPart::registerCommandForRedo):
3733 now calls new bottleneck method
3735 * kwq/WebCoreBridge.h:
3736 new enum for WebUndoAction, maps directly to HTMLEditAction.
3737 Declaration of nameForUndoAction:
3739 2004-12-14 Darin Adler <darin@apple.com>
3743 - added a bunch of missing nil checks; our old version of inherits used to work for nil (by accident)
3745 * khtml/rendering/render_frames.cpp:
3746 (RenderPart::~RenderPart): Check widget for nil.
3747 (RenderPart::setWidget): Ditto.
3748 (RenderFrame::slotViewCleared): Ditto.
3749 (RenderPartObject::slotViewCleared): Ditto.
3751 2004-12-13 Darin Adler <darin@apple.com>
3755 - moved markup-related functions into new sources files in the editing directory
3756 - removed all of the uses of dynamic_cast, preparing to turn off RTTI to make our code smaller and slightly faster
3758 * ForwardingHeaders/editing/markup.h: Added.
3759 * khtml/editing/markup.h: Added.
3760 * khtml/editing/markup.cpp: Added.
3762 * WebCore.pbproj/project.pbxproj: Added markup.h/cpp.
3764 * khtml/dom/dom_node.cpp: (Node::toHTML): Call createMarkup since there's no toHTML in NodeImpl any more.
3765 * khtml/html/html_elementimpl.cpp:
3766 (HTMLElementImpl::innerHTML): Changed to call createMarkup.
3767 (HTMLElementImpl::outerHTML): Ditto.
3769 * khtml/ecma/kjs_window.cpp:
3770 (Window::retrieveWindow): Comment out assert that uses dynamic_cast.
3771 (Window::retrieveActive): Ditto.
3773 * khtml/editing/htmlediting.h: Added forward class declaration needed now that I removed one elsewhere.
3774 * khtml/xml/dom_docimpl.h: Ditto.
3776 * khtml/khtml_part.cpp:
3777 (KHTMLPart::slotDebugDOMTree): Use createMarkup instead of toHTML.
3778 (KHTMLPart::processObjectRequest): Use inherits instead of dynamic_cast.
3780 * khtml/rendering/render_image.cpp: (RenderImage::paint): Add an explicit QChar conversion so this code
3781 still works even with the additional replace overloads added to QString.
3782 * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Ditto.
3784 * khtml/rendering/render_object.h: Removed the version of arenaDelete that does not take an object
3785 base pointer, because it used dynamic_cast in its implementation. Made the other version public.
3786 * khtml/rendering/render_object.cpp: Ditto.
3787 * khtml/rendering/render_replaced.cpp: (RenderWidget::deref): Pass object base pointer to arenaDelete.
3789 * khtml/xml/dom2_rangeimpl.h: Removed extra parameters from toHTML, and unneeded includes and declarations.
3790 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Changed to call createMarkup, and moved all
3791 the support code into markup.cpp.
3793 * khtml/xml/dom_nodeimpl.h: Moved toHTML and related functions into markup.cpp.
3794 * khtml/xml/dom_nodeimpl.cpp: Ditto.
3796 * khtml/xml/dom_position.cpp:
3797 (DOM::startPosition): Implemented the version of this that takes a RangeImpl. Also added null checks
3798 so these return null positions rather than raising exceptions.
3799 (DOM::endPosition): Ditto.
3801 * khtml/khtmlview.h: Added an APPLE_CHANGES function so inherits can detect this class without dynamic_cast.
3802 * kwq/KWQFrame.h: Ditto.
3803 * kwq/KWQFrame.mm: (QFrame::isQFrame): Ditto.
3804 * kwq/KWQKPartsPart.h: Ditto.
3805 * kwq/KWQKPartsPart.mm: (KParts::ReadOnlyPart::isKPartsReadOnlyPart): Ditto.
3806 * kwq/KWQScrollView.h: Ditto.
3807 * kwq/KWQScrollView.mm: (QScrollView::isQScrollView): Ditto.
3808 * kwq/KWQKHTMLPart.h: Ditto.
3809 * kwq/KWQKHTMLPart.mm:
3810 (KHTMLView::isKHTMLView): Ditto.
3811 (KWQKHTMLPart::setTitle): Added an explicit QChar conversion so this code still works even with the additional
3812 replace overloads added to QString.
3813 (KWQKHTMLPart::setStatusBarText): Ditto.
3814 (KWQKHTMLPart::runJavaScriptAlert): Ditto.
3815 (KWQKHTMLPart::runJavaScriptConfirm): Ditto.
3816 (KWQKHTMLPart::runJavaScriptPrompt): Ditto.
3817 (KWQKHTMLPart::attributedString): Ditto.
3818 (KWQKHTMLPart::isCharacterSmartReplaceExempt): Ditto.
3819 (KWQKHTMLPart::isKHTMLPart): That dynamic_cast thing (see above).
3821 * kwq/KWQObject.h: Added virtual methods for the few cases where we need dynamic_cast-like behavior.
3823 (QObject::inherits): Changed to not use dynamic cast.
3824 (QObject::isKHTMLPart): Added. Returns false.
3825 (QObject::isKHTMLView): Ditto.
3826 (QObject::isKPartsReadOnlyPart): Ditto.
3827 (QObject::isQFrame): Ditto.
3828 (QObject::isQScrollView): Ditto.
3830 * kwq/KWQRenderTreeDebug.cpp:
3831 (write): Changed to use inherits rather than dynamic_cast.
3832 (writeSelection): Ditto.
3834 * kwq/KWQSlot.mm: (KWQSlot::call): Call through to the version with just a job pointer parameter rather
3835 than going straight on to the "no parameters at all" version.
3838 * kwq/KWQString.mm: (QString::replace): Added overloads.
3839 * kwq/WebCoreBridge.mm:
3840 (-[WebCoreBridge markupStringFromNode:nodes:]): Changed to call functions in markup.h.
3841 (-[WebCoreBridge markupStringFromRange:nodes:]): Ditto.
3842 (-[WebCoreBridge selectedString]): Added an explicit QChar conversion so this code still works even with
3843 the additional replace overloads added to QString.
3844 (-[WebCoreBridge stringForRange:]): Ditto.
3845 (-[WebCoreBridge copyDOMNode:copier:]): Changed to call functions in markup.h.
3846 (-[WebCoreBridge elementAtPoint:]): QChar conversion.
3847 (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Changed to call functions in markup.h.
3848 (-[WebCoreBridge documentFragmentWithText:]): Changed to call functions in markup.h.
3850 2004-12-13 Ken Kocienda <kocienda@apple.com>
3856 <rdar://problem/3917956> REGRESSION (Mail): pasting can leave insertion point inside pasted text
3858 * khtml/editing/htmlediting.cpp:
3859 (khtml::ReplaceSelectionCommand::doApply): Fix coding mistake. Calculations of bool flag based on
3860 leading and trailing whitespace positions was reversed! I must have introduced this error recently
3861 when changing around this code.
3863 2004-12-13 David Hyatt <hyatt@apple.com>