1 2005-01-20 Maciej Stachowiak <mjs@apple.com>
5 <rdar://problem/3965466> editing needs to insert text before applying typing style
7 * khtml/editing/htmlediting.cpp:
8 (khtml::ApplyStyleCommand::addInlineStyleIfNeeded): Remove a FIXME comment.
9 (khtml::InsertLineBreakCommand::doApply): Apply style to the BR
10 node after inserting it.
11 (khtml::InsertTextCommand::prepareForTextInsertion): Don't try to
12 apply style to any new nodes created before inserting.
13 (khtml::InsertTextCommand::input): Apply style to the inserted range
14 after doing the text insert.
15 * khtml/editing/htmlediting.h:
17 This change leads to improved results on one of the layout tests:
19 * layout-tests/editing/inserting/insert-div-024-expected.txt:
23 2005-01-20 Ken Kocienda <kocienda@apple.com>
29 <rdar://problem/3964646> REGRESSION (179-180): Typing space at end of line makes following paragraph disappear
31 * khtml/editing/htmlediting.cpp:
32 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Recent change to block placeholder removal code
33 caused this regression. The code became too aggressive in removing block placeholders, and would remove them
34 from blocks other than the block containing the selection.
35 * layout-tests/editing/inserting/insert-div-023-expected.txt: This file had a spurious BR element in it that
36 I did not notice earlier.
37 * layout-tests/editing/inserting/insert-div-024-expected.txt: Ditto.
39 2005-01-20 David Hyatt <hyatt@apple.com>
41 Fix for oddness on albertsons.com. Make sure not to crash when setting/removing style properties on a node
42 with no document. The bug # is 3813900.
46 2005-01-20 David Harrison <harrison@apple.com>
50 PARTIAL fix for following bug. Create attributed string with fonts and links. Still need to add attachments.
51 <rdar://problem/3942606> AX: Support kAXAttributedStringForTextMarkerRangeParameterizedAttribute
53 * kwq/KWQAccObject.mm:
54 (-[KWQAccObject textUnderElement]):
55 Touched up previous checkin to match code review comments.
57 (-[KWQAccObject value]):
58 Use plainText for this one instead of obsolete attributedString.
60 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
61 Advertise AXAttributedStringForTextMarkerRange.
63 (AXAttributeStringAddFont):
64 (AXAttributeStringAddElement):
65 (-[KWQAccObject linkUIElementForNode:]):
66 (-[KWQAccObject _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
67 (-[KWQAccObject accessibilityAttributedStringForRange:]):
68 New routines to support AXAttributedStringForTextMarkerRange.
70 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
71 Use new routines instead of obsolete attributedString.
73 2005-01-20 David Harrison <harrison@apple.com>
77 <rdar://problem/3960196> AX Crash in DOM::Range::setStartBefore
79 * khtml/xml/dom_docimpl.cpp:
80 (DocumentImpl::getAccObjectCache):
81 Adjust when detecting cache in non-top level WebArea.
82 * kwq/KWQAccObject.mm:
83 (-[KWQAccObject textUnderElement]):
84 (-[KWQAccObject accessibilityAttributeValue:]):
85 Make sure the elements document is the current one for the part.
87 2005-01-20 Darin Adler <darin@apple.com>
91 - fixed <rdar://problem/3922980> Mail not crashing, just quitting itself suddenly in -[WebHTMLView(MailExtras) findString:options:]
93 * khtml/dom/dom2_range.cpp: (DOM::operator==): Handle null and detached ranges without raising exceptions.
94 The uncaught exception would make the entire program terminate.
96 - fixed <rdar://problem/3885729> attempting to modify a computed style does nothing, but should raise a DOM exception
98 * kwq/DOM-CSS.mm: (-[DOMCSSStyleDeclaration setProperty:::]): Uncommented this code which I had to disable
99 back in November because Mail was stumbling over it.
101 - fixed <rdar://problem/3943049> focus() called during onload handler results in square text field on <input type=search>
103 * kwq/KWQLineEdit.mm: (QLineEdit::baselinePosition): Change computation so it will work even for fields
104 that position their text in a way that depends on vertical size. In the case of a search field, the text
105 is centered, so the old logic was broken.
106 * kwq/KWQTextField.mm: (-[KWQTextFieldController initWithTextField:QLineEdit:]): Set the frame size to
107 something large enough to accomodate the field editor. If we start the frame at size 0,0 we run into
108 AppKit trouble when it insets the frame to figure out the frame for the field editor. In the case of this
109 bug this happens because we become first responder before being sized and positioned by the HTML layout code.
111 - improved debugging output when using "po" from gdb with Objective-C DOM
114 (-[DOMNode description]): Added. Includes node name ("<tr>") and node value (e.g., string for text node).
115 (-[DOMRange description]): Tweaked format.
117 2005-01-19 Richard Williamson <rjw@apple.com>
119 After further discussion with Real we have decided to NOT include the
120 additional CLSID for the real plugin. See 3958601.
124 * khtml/rendering/render_frames.cpp:
125 (RenderPartObject::updateWidget):
127 2005-01-19 David Harrison <harrison@apple.com>
131 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
133 Previous checkin for this bug was missing some of the patch. Editing snafu with multiple changes in tree.
135 * kwq/KWQAccObject.mm:
136 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
137 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
138 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
139 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
140 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
141 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
142 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
144 2005-01-19 Ken Kocienda <kocienda@apple.com>
148 * khtml/editing/htmlediting.cpp:
149 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Small, cosmetic change John and I decided
150 to do on my last checkin, but I forgot to do before landing.
152 2005-01-19 Ken Kocienda <kocienda@apple.com>
158 <rdar://problem/3959727> REGRESSION (Mail): Style not preserved on blank lines
160 * khtml/editing/htmlediting.cpp:
161 (khtml::CompositeEditCommand::applyStyle):
162 (khtml::CompositeEditCommand::insertBlockPlaceholder): New function that unconditionally adds a block placeholder.
163 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Now returns bool based on whether
164 placeholder was added or not.
165 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now searches all the descendents of a block
166 looking for a placeholder. The old code, which just looked at the last child of a node, started missing
167 once block placeholders became styled (which started happening with this patch).
168 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Now handles applying typing style
169 to a block placeholder at call time, rather than setting the typing style as a latent style that
170 might be applied later. This is an important part of the bug fix.
171 (khtml::DeleteSelectionCommand::doApply): Now uses bool return value from insertBlockPlaceholderIfNeeded()
172 and passes it along to calculateStyleBeforeInsertion, so the case where a block placeholder needs to
173 be styled can be detected.
174 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Changed the way this class
175 managed style. Before it would calculate and set typing style for the block added. This is not
176 sufficient. Added blocks need to styled immediately. Some name changes to instance variables in
177 this class due to the change to accommodate this change.
178 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Name changes, as above.
179 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Ditto.
180 (khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion): Ditto.
181 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
182 (khtml::ReplaceSelectionCommand::doApply): Improve check for testing when a placeholder
183 block can be removed in its entirety after the insertion.
184 * khtml/editing/htmlediting.h: Update header accordingly.
185 * khtml/khtml_part.cpp:
186 (KHTMLPart::selectionComputedStyle): Move position for computed style check downstream before
187 doing check when the position is in an empty block (this makes sure any style on any block
188 placeholder is accounted for).
190 New layout tests to check bug fix.
192 * layout-tests/editing/style/block-style-004-expected.txt: Added.
193 * layout-tests/editing/style/block-style-004.html: Added.
194 * layout-tests/editing/style/block-style-005-expected.txt: Added.
195 * layout-tests/editing/style/block-style-005.html: Added.
196 * layout-tests/editing/style/block-style-006-expected.txt: Added.
197 * layout-tests/editing/style/block-style-006.html: Added.
199 Results updated to reflect new block placeholder code.
201 * layout-tests/editing/inserting/insert-div-004-expected.txt
202 * layout-tests/editing/inserting/insert-div-005-expected.txt
203 * layout-tests/editing/inserting/insert-div-006-expected.txt
204 * layout-tests/editing/inserting/insert-div-008-expected.txt
205 * layout-tests/editing/inserting/insert-div-011-expected.txt
206 * layout-tests/editing/inserting/insert-div-012-expected.txt
207 * layout-tests/editing/inserting/insert-div-013-expected.txt
208 * layout-tests/editing/inserting/insert-div-014-expected.txt
209 * layout-tests/editing/inserting/insert-div-015-expected.txt
210 * layout-tests/editing/inserting/insert-div-016-expected.txt
211 * layout-tests/editing/inserting/insert-div-017-expected.txt
212 * layout-tests/editing/inserting/insert-div-018-expected.txt
213 * layout-tests/editing/inserting/insert-div-019-expected.txt
214 * layout-tests/editing/inserting/insert-div-021-expected.txt
215 * layout-tests/editing/inserting/insert-div-022-expected.txt
216 * layout-tests/editing/inserting/insert-div-023-expected.txt
217 * layout-tests/editing/inserting/insert-div-024-expected.txt
219 2005-01-19 David Hyatt <hyatt@apple.com>
221 Dont null-check the renderer before submitting, since a script can set it to display:none and still expect the
222 submission to occur. Fixes bug #3477282.
226 (DOM::HTMLInputElementImpl::defaultEventHandler):
228 2005-01-18 Richard Williamson <rjw@apple.com>
230 Fixed several issues all arising from analysis of plugin detection code at ifilm.com:
232 Fixed <rdar://problem/3958592> can't script plug-ins if plug-in is invoked with <object> element instead of <embed>
233 Fixed <rdar://problem/3958597> <object> elements with IDs do not show up as named properties of the document
234 Fixed <rdar://problem/3960973> DOM objects for plugin elements are not accessible
235 Fixed <rdar://problem/3958601> need an additional class ID in WebCore for the Real plug-in
237 We now support accessing scriptable plugin objects that are specified with <applet>, <embed>, or <object>
238 tags. Also, if any of these elements are named they can be accessed from the document or window objects.
239 Finally, DOM methods are properties will be forwarded appropriately for the plugin's root scriptable object.
243 * khtml/dom/html_document.cpp:
244 (HTMLDocument::objects):
245 * khtml/dom/html_document.h:
246 * khtml/ecma/kjs_dom.cpp:
247 (DOMDocumentProtoFunc::tryCall):
248 (DOMElementProtoFunc::tryCall):
249 (KJS::getRuntimeObject):
250 * khtml/ecma/kjs_dom.h:
251 * khtml/ecma/kjs_html.cpp:
252 (KJS::HTMLDocument::tryGet):
253 (KJS::HTMLElement::tryGet):
254 (KJS::HTMLCollection::tryGet):
255 (KJS::HTMLCollection::getNamedItems):
256 * khtml/ecma/kjs_window.cpp:
258 * khtml/html/html_miscimpl.cpp:
259 (HTMLCollectionImpl::traverseNextItem):
260 * khtml/html/html_miscimpl.h:
261 (DOM::HTMLCollectionImpl::):
262 * khtml/html/html_objectimpl.cpp:
263 (HTMLAppletElementImpl::getAppletInstance):
264 (HTMLObjectElementImpl::HTMLObjectElementImpl):
265 (HTMLObjectElementImpl::getObjectInstance):
266 * khtml/html/html_objectimpl.h:
267 * khtml/rendering/render_frames.cpp:
268 (RenderPartObject::updateWidget):
269 * kwq/KWQKHTMLPart.h:
270 * kwq/KWQKHTMLPart.mm:
271 (KWQKHTMLPart::getObjectInstanceForView):
273 2005-01-18 David Hyatt <hyatt@apple.com>
275 Fix for 3948123, rolling over link erases nearby text. The repaint rect check for lines was wrong whenever
276 two lines overlapped.
280 * khtml/rendering/render_flow.cpp:
281 (RenderFlow::paintLines):
283 2005-01-18 Ken Kocienda <kocienda@apple.com>
289 <rdar://problem/3960116> Focus rings paint incorrectly for contenteditable blocks in web pages
291 * khtml/rendering/render_flow.cpp:
292 (RenderFlow::addFocusRingRects): Fix painting of focus rings so that ring only paints around
293 outermost contenteditable elements.
295 2005-01-18 David Harrison <harrison@apple.com>
299 <rdar://problem/3959668> accessibilityFocusedUIElement sometimes returns an ignored element; it must not
301 * kwq/KWQAccObject.mm:
302 (-[KWQAccObject accessibilityFocusedUIElement]):
303 Return parentObjectUnignored if focused object is ignored.
305 2005-01-18 Ken Kocienda <kocienda@apple.com>
311 <rdar://problem/3952877> REGRESSION (Mail): Command-left/right-arrows don't work with file attachment
313 * khtml/editing/selection.cpp:
314 (khtml::nodeForInlineBox): New helper function used in reimplementation of function below.
315 (khtml::selectionForLine): Reimplemented using line box smarts. I originally wrote this code when
316 I had a less than full understanding of line layout. I can do better now, and my new version no
317 longer fails to notice attachments when doing the kind of navigation mentioned in the bug.
319 2005-01-17 David Harrison <harrison@apple.com>
321 Reviewed by John Sullivan.
323 <rdar://problem/3949429> AX: word marker routines returns incorrect data for empty line
324 <rdar://problem/3949848> AX: paragraph marker routines do not work when given a paragraph end marker
326 Also fixed sentence support in the same way.
328 * kwq/KWQAccObject.mm:
329 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
330 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
331 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
332 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
333 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
334 Move one position in desired direction before calling visible_units.cpp code.
336 2005-01-17 David Harrison <harrison@apple.com>
338 Updated expected test results.
340 <rdar://problem/3945880> line-ending space seems not to be present
342 * layout-tests/editing/deleting/delete-ws-fixup-001-expected.txt:
343 * layout-tests/editing/deleting/delete-ws-fixup-002-expected.txt:
344 * layout-tests/editing/inserting/insert-div-020-expected.txt:
345 * layout-tests/editing/inserting/insert-div-021-expected.txt:
346 * layout-tests/editing/inserting/insert-div-022-expected.txt:
347 * layout-tests/editing/inserting/insert-div-023-expected.txt:
348 * layout-tests/editing/inserting/insert-div-024-expected.txt:
350 2005-01-17 David Harrison <harrison@apple.com>
352 Reviewed by Dave Hyatt (bidi.cpp) and Darin Adler (selection.cpp).
354 <rdar://problem/3945880> line-ending space seems not to be present
356 * khtml/editing/selection.cpp:
357 (khtml::Selection::validate):
358 Extend AFTER_WHITE_SPACE code to support white spac in the middle of paragraphs, not just the end.
359 * khtml/rendering/bidi.cpp:
360 (khtml::RenderBlock::findNextLineBreak):
361 Pick left/rightness of word selection based on being at the end of paragraph (i.e. after a hard line break).
363 2005-01-17 Darin Adler <darin@apple.com>
365 Reviewed by John Louch.
367 - fixed <rdar://problem/3958503> need screenX and screenY to use WebKit windowFrame delegate
369 * khtml/ecma/kjs_window.cpp: (Window::get): Change screenX and screenY to use frameGeometry instead
370 of using mapToGlobal and screen in a complicated way.
371 * kwq/KWQKHTMLView.mm: Removed unused mapToGlobal function.
372 * kwq/KWQWindowWidget.h: Ditto.
373 * kwq/KWQWindowWidget.mm: Ditto.
375 2005-01-17 David Hyatt <hyatt@apple.com>
377 Fix a screwup in rightmost/lowets position computation. 3955207. Make sure floats with layers are still checked.
381 * khtml/rendering/render_block.cpp
383 2005-01-17 Ken Kocienda <kocienda@apple.com>
387 <rdar://problem/3953366> Problems with typing attributes in HTML compose
389 * khtml/editing/htmlediting.cpp:
390 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete): Remove misguided "optimization"
391 that tried to sense when typing style could be cleared without actually doing a style diff between
392 before-delete and after-delete positions. Removing this extra check and running the
393 general-purpose code fixes the bug.
395 2005-01-17 Richard Williamson <rjw@apple.com>
397 Fixed <rdar://problem/3753030> Need to ensure same origin for plugin binding invocations (origin security rules)
399 Keep track of originating execution context and target execution
400 context for native JS object wrappers, and perform appropriate
403 Reviewed by David Harrison.
405 * khtml/ecma/kjs_binding.cpp:
406 (ScriptInterpreter::isGlobalObject):
407 (ScriptInterpreter::isSafeScript):
408 (ScriptInterpreter::interpreterForGlobalObject):
409 * khtml/ecma/kjs_binding.h:
410 * khtml/ecma/kjs_window.cpp:
411 (Window::interpreter):
412 (Window::isSafeScript):
413 * khtml/ecma/kjs_window.h:
414 * kwq/DOMInternal.mm:
415 (-[WebScriptObject _initializeScriptDOMNodeImp]):
416 * kwq/KWQKHTMLPart.mm:
417 (KWQKHTMLPart::windowScriptObject):
418 (KWQKHTMLPart::windowScriptNPObject):
419 * kwq/WebCoreBridge.mm:
421 (-[WebCoreBridge init]):
423 2005-01-17 Ken Kocienda <kocienda@apple.com>
429 <rdar://problem/3786659> REGRESSION (Mail): editable WebViews don't work with
430 "size up" and "size down" NSFontManager changes
432 * khtml/css/cssparser.cpp:
433 (CSSParser::parseValue): Add support for parsing new font size delta property.
434 * khtml/css/cssproperties.c: Generated file.
435 * khtml/css/cssproperties.h: Ditto.
436 * khtml/css/cssproperties.in: Add support for parsing new font size delta property.
437 * khtml/editing/htmlediting.cpp:
438 (khtml::isEmptyStyleSpan): New helper function. Code existed before, but now factored out for convenient use.
439 (khtml::CompositeEditCommand::removeNodeAttribute): Does check on value to see it exists before creating
440 and running command to do the removal.
441 (khtml::ApplyStyleCommand::doApply): Now calls new applyRelativeFontStyleChange() function as part of its work.
442 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange): New function that does the "heavy lifting" to handle
443 relative font size changes.
444 (khtml::ApplyStyleCommand::applyInlineStyle): Range check the start and end positions to make sure the start is
445 before or equal to the end. Swap them if not true. I ran into this problem in some similar code in
446 applyRelativeFontStyleChange(). Moving that goodness here too.
447 (khtml::ApplyStyleCommand::splitTextAtEndIfNeeded): Uses a local variable to save a value used often.
448 Code is the same, but reads better now. Function now returns bool as well, just like splitTextAtStartIfNeeded.
449 I use the bool return value now (I obviously did not need it before).
450 (khtml::ApplyStyleCommand::computedFontSize): New helper function.
451 (khtml::ApplyStyleCommand::joinChildTextNodes): Ditto.
452 (khtml::createStyleSpanElement): Ditto.
453 * khtml/editing/htmlediting.h: Update header accordingly.
454 * khtml/editing/jsediting.cpp: Add new command string to enable relative font size changes.
456 (-[DOMCSSStyleDeclaration _fontSizeDelta]): New convenience.
457 (-[DOMCSSStyleDeclaration _setFontSizeDelta:]): Ditto.
458 * kwq/DOMPrivate.h: Declare new conveniences.
459 * layout-tests/editing/editing.js: Add new JS to enable relative font size changes, as well as explicit font size setting.
460 * layout-tests/editing/style/relative-font-size-change-001-expected.txt: Added.
461 * layout-tests/editing/style/relative-font-size-change-001.html: Added.
462 * layout-tests/editing/style/relative-font-size-change-002-expected.txt: Added.
463 * layout-tests/editing/style/relative-font-size-change-002.html: Added.
464 * layout-tests/editing/style/relative-font-size-change-003-expected.txt: Added.
465 * layout-tests/editing/style/relative-font-size-change-003.html: Added.
466 * layout-tests/editing/style/relative-font-size-change-004-expected.txt: Added.
467 * layout-tests/editing/style/relative-font-size-change-004.html: Added.
469 2005-01-14 Darin Adler <darin@apple.com>
471 * khtml/css/cssproperties.c: Regenerated with gperf 3.0.1.
472 * khtml/css/cssvalues.c: Regenerated with gperf 3.0.1.
473 * khtml/misc/htmlattrs.c: Regenerated with gperf 3.0.1.
474 * khtml/misc/htmltags.c: Regenerated with gperf 3.0.1.
476 2005-01-14 Chris Blumenberg <cblu@apple.com>
478 Fixed: <rdar://problem/3886415> arrow keys don't work when the user hits Back to return to RSS page
482 (KWQKHTMLPart::openURLFromPageCache): restore mousePressNode
483 (KWQKHTMLPart::mousePressNode): new
484 * kwq/KWQPageState.h:
485 * kwq/KWQPageState.mm:
486 (-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]): save the mousePressNode
487 (-[KWQPageState clear]): clear the mousePressNode
488 (-[KWQPageState dealloc]): deref the mousePressNode
489 (-[KWQPageState mousePressNode]): new
493 2005-01-13 Vicki Murley <vicki@apple.com>
497 - fix <rdar://problem/3946836> Safari about box lists 2004 instead of 2005
499 * WebCore.pbproj/project.pbxproj: bump "2004" to "2005"
501 2005-01-13 David Harrison <harrison@apple.com>
503 Reviewed by Ken Kocienda.
505 Better fix for 3905066.
507 * khtml/editing/htmlediting.cpp:
508 (khtml::InsertParagraphSeparatorCommand::doApply):
510 2005-01-10 Maciej Stachowiak <mjs@apple.com>
514 <rdar://problem/3758033> REGRESSION (Mail): Support attributes in marked text (International input)
516 * khtml/rendering/render_text.cpp:
517 (InlineTextBox::paint): Support painting custom underline markers for
518 marked text in place of generic yellow.
519 (InlineTextBox::paintMarkedTextUnderline): New method that handles this.
520 * khtml/rendering/render_text.h:
521 * kwq/KWQKHTMLPart.h: Declare new methods and structs.
522 * kwq/KWQKHTMLPart.mm:
523 (KWQKHTMLPart::clear): Clear marked test underlines.
524 (KWQKHTMLPart::setMarkedTextRange): Takes attributes and ranges now.
525 (convertAttributesToUnderlines): Converts NSAttributedString attributes
526 to simplified and C++-friendly form.
527 (KWQKHTMLPart::markedTextUsesUnderlines): New method.
528 (KWQKHTMLPart::markedTextUnderlines): New method.
530 (QPainter::drawLineForText): Handle pen width.
531 * kwq/WebCoreBridge.h:
532 * kwq/WebCoreBridge.mm:
533 (-[WebCoreBridge setMarkedTextDOMRange:customAttributes:ranges:]): Take attributes
535 * kwq/WebCoreTextRenderer.h:
537 2005-01-12 David Harrison <harrison@apple.com>
539 Reviewed by Dave Hyatt.
541 <rdar://problem/3888973> AX: Parent AXWebArea of nested AXWebAreas is messed up
543 * kwq/KWQAccObject.mm:
544 (-[KWQAccObject addChildrenToArray:]):
545 Use the widget's outer view.
547 2005-01-12 David Harrison <harrison@apple.com>
549 Reviewed by Darin Adler.
551 <rdar://problem/3949908> Crash when asking for the kAXLengthForTextMarkerRangeParameterizedAttribute
553 * khtml/xml/dom_nodeimpl.cpp:
554 (NodeImpl::displayNode):
555 Add quotes around text node content.
556 (NodeBaseImpl::childNode):
557 Add nil check to return nil rather than crash when child node not found.
558 * kwq/KWQAccObject.mm:
559 (-[KWQAccObject doAXStringForTextMarkerRange:]):
560 Pass range compliant positions to TextIterator.
562 2005-01-12 David Hyatt <hyatt@apple.com>
564 Fix for 3951203, CSS border style incorrectly clipped on inline elements. Make sure the repaint rect set during
565 line layout is smarter about including the overflow for both old states and new states.
569 * khtml/rendering/bidi.cpp:
570 (khtml::RenderBlock::layoutInlineChildren):
572 2005-01-12 David Hyatt <hyatt@apple.com>
574 Fix for bug 3937608, versiontracker.com flashes and displays the right column below content. Make sure to move
575 tables/overflows that dont fit within a block only in strict mode.
577 Fix for bug 3931049, characters dont show up when typing. Make sure to dirty the right lines when this specific
578 case in editing is hit.
580 Reviewed by darin (first one), kocienda (second one)
582 * khtml/rendering/render_block.cpp:
583 (khtml::RenderBlock::getClearDelta):
584 * khtml/rendering/render_flow.cpp:
585 (RenderFlow::dirtyLinesFromChangedChild):
586 * khtml/rendering/render_line.cpp:
587 (khtml::InlineFlowBox::verticallyAlignBoxes):
589 2005-01-12 Ken Kocienda <kocienda@apple.com>
595 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
597 * khtml/editing/htmlediting.cpp:
598 (khtml::DeleteSelectionCommand::initializePositionData): Change test that will prevent block
599 merging. End-of-line test was just wrong. Call new start-of and end-of paragraph functions
600 added to visible_position files.
601 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Add tests for BR elements, which makes
602 tests to determine when to stop moving nodes more complete and correct. Also improved comments.
603 * khtml/editing/visible_position.cpp:
604 (khtml::isFirstVisiblePositionInParagraph): New function.
605 (khtml::isLastVisiblePositionInParagraph): New function.
606 * khtml/editing/visible_position.h: Update header accordingly.
607 * layout-tests/editing/deleting/delete-block-merge-contents-002-expected.txt: New results, slightly different from former
608 results but still correct.
609 * layout-tests/editing/deleting/delete-block-merge-contents-007-expected.txt: Ditto.
610 * layout-tests/editing/deleting/delete-block-merge-contents-018-expected.txt: Added.
611 * layout-tests/editing/deleting/delete-block-merge-contents-018.html: Added.
612 * layout-tests/editing/deleting/delete-block-merge-contents-019-expected.txt: Added.
613 * layout-tests/editing/deleting/delete-block-merge-contents-019.html: Added.
614 * layout-tests/editing/deleting/delete-block-merge-contents-020-expected.txt: Added.
615 * layout-tests/editing/deleting/delete-block-merge-contents-020.html: Added.
616 * layout-tests/editing/deleting/delete-block-merge-contents-021-expected.txt: Added.
617 * layout-tests/editing/deleting/delete-block-merge-contents-021.html: Added.
618 * layout-tests/editing/deleting/delete-line-014-expected.txt: These new results are actually better, and fix a bug.
620 2005-01-11 Richard Williamson <rjw@apple.com>
622 Fixed 3922875. Fall back to DOM object is EMBED element
623 has no associated runtime object.
627 * khtml/ecma/kjs_dom.cpp:
628 (KJS::getRuntimeObject):
629 * khtml/ecma/kjs_html.cpp:
630 (KJS::HTMLDocument::tryGet):
631 (KJS::HTMLElement::tryGet):
632 (KJS::HTMLCollection::tryGet):
633 (KJS::HTMLCollection::getNamedItems):
635 2005-01-11 David Hyatt <hyatt@apple.com>
637 Fix for 3882299, missing content on gibson.com. Change our handling of " and ' in certain states of the parser to match
642 * khtml/html/htmltokenizer.cpp:
643 (khtml::HTMLTokenizer::parseTag):
645 2005-01-11 Chris Blumenberg <cblu@apple.com>
647 Fixed: <rdar://problem/3930733> Mail prints second page of email blank
651 * khtml/rendering/render_canvas.cpp:
652 (RenderCanvas::paint): cache the print rect since the dirty rect can get changed during printing
653 * khtml/rendering/render_flow.cpp:
654 (RenderFlow::paintLines): removed null check since the print rect should never be null
655 * khtml/rendering/render_list.cpp:
656 (RenderListMarker::paint): ditto
657 * kwq/KWQKHTMLPart.mm:
658 (KWQKHTMLPart::adjustPageHeight): don't set the print rect here since this method is not called for the last page
660 2005-01-10 Ken Kocienda <kocienda@apple.com>
666 <rdar://problem/3943648> extra line is inserted after pressing return within quoted text of reply
668 * khtml/editing/htmlediting.cpp:
669 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): This bug was the result of a
670 simple coding mistake. A local variable was erroneously redefined in a deeper scope, and so the
671 result calculated in that deeper scope was not available when tested.
673 2005-01-10 Ken Kocienda <kocienda@apple.com>
679 <rdar://problem/3946852> Option-e goes to next line
681 * khtml/editing/htmlediting.cpp:
682 (khtml::ReplaceSelectionCommand::doApply): Tweak case used to determine when merging content
683 into the start line is done. We plan to change pretty substantially soon to better handle
684 the problem described in <rdar://problem/3937352> Quote level not maintained when copied
685 and pasted within a Mail message. In the meantime, this change does no harm, and fixes the bug.
687 2005-01-10 Ken Kocienda <kocienda@apple.com>
693 <rdar://problem/3907005> Applying block styles to a line of text can unexpectedly affect other lines
695 * khtml/editing/htmlediting.cpp:
696 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): New function which moves "paragraphs"
697 to their own blocks if needed so that a block style can be applied.
698 (khtml::CompositeEditCommand::isMailBlockquote): Moved this function to base class so it can be used more generally.
699 (khtml::ApplyStyleCommand::applyBlockStyle): Pass a node instead of a block to addBlockStyleIfNeeded().
700 (khtml::ApplyStyleCommand::addBlockStyleIfNeeded): Now accepts a node instead of a block for styling.
701 This function also now calls moveParagraphContentsToNewBlockIfNecessary() to make sure that only the current
703 (khtml::SetNodeAttributeCommand::doUnapply): Should not assert on undo if old value of attribute was null.
704 Should remove attributue instead.
705 * khtml/editing/htmlediting.h: Touch function declarations accordingly.
706 * layout-tests/editing/style/create-block-for-style-001-expected.txt: Added.
707 * layout-tests/editing/style/create-block-for-style-001.html: Added.
708 * layout-tests/editing/style/create-block-for-style-002-expected.txt: Added.
709 * layout-tests/editing/style/create-block-for-style-002.html: Added.
710 * layout-tests/editing/style/create-block-for-style-003-expected.txt: Added.
711 * layout-tests/editing/style/create-block-for-style-003.html: Added.
712 * layout-tests/editing/style/create-block-for-style-004-expected.txt: Added.
713 * layout-tests/editing/style/create-block-for-style-004.html: Added.
714 * layout-tests/editing/style/create-block-for-style-005-expected.txt: Added.
715 * layout-tests/editing/style/create-block-for-style-005.html: Added.
716 * layout-tests/editing/style/create-block-for-style-006-expected.txt: Added.
717 * layout-tests/editing/style/create-block-for-style-006.html: Added.
718 * layout-tests/editing/style/create-block-for-style-007-expected.txt: Added.
719 * layout-tests/editing/style/create-block-for-style-007.html: Added.
720 * layout-tests/editing/style/create-block-for-style-008-expected.txt: Added.
721 * layout-tests/editing/style/create-block-for-style-008.html: Added.
722 * layout-tests/editing/style/create-block-for-style-009-expected.txt: Added.
723 * layout-tests/editing/style/create-block-for-style-009.html: Added.
724 * layout-tests/editing/style/create-block-for-style-010-expected.txt: Added.
725 * layout-tests/editing/style/create-block-for-style-010.html: Added.
726 * layout-tests/editing/style/create-block-for-style-011-expected.txt: Added.
727 * layout-tests/editing/style/create-block-for-style-011.html: Added.
728 * layout-tests/editing/style/create-block-for-style-012-expected.txt: Added.
729 * layout-tests/editing/style/create-block-for-style-012.html: Added.
730 * layout-tests/editing/style/create-block-for-style-013-expected.txt: Added.
731 * layout-tests/editing/style/create-block-for-style-013.html: Added.
733 Unrelated updates to these expected results.
734 * layout-tests/editing/inserting/insert-div-007-expected.txt
735 * layout-tests/editing/pasteboard/paste-text-013-expected.txt
737 2005-01-10 Chris Blumenberg <cblu@apple.com>
739 Fixed: <rdar://problem/3936844> Mail: Messages with rich text do not print
743 * khtml/rendering/render_flow.cpp:
744 (RenderFlow::paintLines): don't do pagination work if printRect is not set
745 * khtml/rendering/render_list.cpp:
746 (RenderListMarker::paint): ditto
748 2005-01-10 David Harrison <harrison@apple.com>
752 * kwq/KWQTextUtilities.mm:
753 (currentTextBreakLocaleID):
754 Return empty string (AKA root locale) if locale pref can not be canonicalized.
756 2005-01-10 John Sullivan <sullivan@apple.com>
758 Fixed broken Panther build.
760 * kwq/KWQTextUtilities.mm:
761 (currentTextBreakLocaleID):
762 This recently-added function was using code copy/pasted from CarbonCore UnicodeUtilities.
763 That code used a Tiger-only function, CFLocaleCreateCanonicalLanguageIdentifierFromString.
764 To fix the build, I added a BUILDING_ON_PANTHER #ifdef that avoids the call to the Tiger
765 function. However, the Tiger-only code was wrong; the string generated using
766 CFLocaleCreateCanonicalLanguageIdentifierFromString was not used at all, so I fixed that
769 2005-01-09 David Harrison <harrison@apple.com>
771 Reviewed by Ken Kocienda.
773 <rdar://problem/3786362> REGRESSION (Mail): pasted text loses one newline
775 * khtml/editing/htmlediting.cpp:
776 (khtml::ReplaceSelectionCommand::doApply):
777 Tune check for need for insertParagraphSeparator when hasInterchangeNewline.
779 2005-01-09 Darin Adler <darin@apple.com>
781 Reviewed by Harrison.
783 - fixed <rdar://problem/3939176> select() method does not work on <input type=search>
785 * khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::select): Changed if statement
786 to a switch statement. Added SEARCH to the set of types that treat the renderer as a
789 2005-01-09 David Harrison <harrison@apple.com>
791 Reviewed by Ken Kocienda.
793 <rdar://problem/3905066> REGRESSION (Mail): Hitting return key with caret in front of space causes space to become lost (resize fixes)
795 Problem was that InsertParagraphSeparatorCommand::doApply() was not collapsing
796 whitespace to a single non-breaking space when splitting a text node.
798 * khtml/editing/htmlediting.cpp:
799 (khtml::InsertParagraphSeparatorCommand::doApply):
801 2005-01-08 Kevin Decker <kdecker@apple.com>
805 Fixed: <rdar://problem/3924219> Calling setOuterHTML: on a DOMHTMLHtmlElement can crash a program
807 * khtml/html/html_elementimpl.cpp:
808 (HTMLElementImpl::setOuterHTML): Added a nil check for fragments who don't have parents.
810 2005-01-07 Maciej Stachowiak <mjs@apple.com>
814 <rdar://problem/3807144> REGRESSION (125-TOT): my bank's website doesn't work (Societe Generale, socgen.com)
816 * Khtml/khtml_part.cpp:
817 (KHTMLPart::checkCompleted): If the document is NULL, assume this frame has
818 not started loading yet so it could not possibly be finishing here...
819 (KHTMLPart::stop): ...unless the part is explicitly stopped and there is still
820 no document, in this case we must have hit an error or been loading a non-HTML
822 * khtml/khtml_part.h:
824 2005-01-08 David Harrison <harrison@apple.com>
828 <rdar://problem/3943415> REGRESSION (Mail): double-clicking past word selects previous word instead of only blank space
830 * khtml/editing/selection.cpp:
831 (khtml::Selection::validate):
832 Tune word selections left/right choice to use right if on empty last line.
834 2005-01-07 David Harrison <harrison@apple.com>
838 <rdar://problem/3942619> AX: Support sentence ax attributes
840 Needed to use the unicode utilities properly. Twas lame before.
842 * khtml/editing/visible_units.cpp:
843 (khtml::previousBoundary):
844 (khtml::nextBoundary):
845 (khtml::startOfWord):
847 (khtml::previousWordPosition):
848 (khtml::nextWordPosition):
849 (khtml::startOfSentence):
850 (khtml::endOfSentence):
851 (khtml::previousSentencePosition):
852 (khtml::nextSentencePosition):
853 * kwq/KWQAccObject.mm:
854 (-[KWQAccObject accessibilityAttributeNames]):
855 (-[KWQAccObject accessibilityAttributeValue:]):
856 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
857 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
858 * kwq/KWQTextUtilities.mm:
859 (currentTextBreakLocaleID):
860 (KWQFindSentenceBoundary):
861 (KWQFindNextSentenceFromIndex):
863 2005-01-07 Ken Kocienda <kocienda@apple.com>
869 <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
870 <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
872 * khtml/editing/htmlediting.cpp:
873 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
874 Merge the typing style with the computed style for the current position. Fixes both bugs.
875 * khtml/editing/htmlediting.h:
876 * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
877 * layout-tests/editing/inserting/insert-div-023.html: Added.
878 * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
879 * layout-tests/editing/inserting/insert-div-024.html: Added.
881 2005-01-07 David Hyatt <hyatt@apple.com>
883 Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
884 behavior on worldofwarcraft.com.
888 * khtml/rendering/render_table.cpp:
889 (RenderTable::layout):
891 2005-01-06 David Hyatt <hyatt@apple.com>
893 Fix for 3932418 and 3920998, assertion failures caused by stray inline content inside tables. Bulletproof the hit testing to
894 ignore inline flows in this case.
898 * khtml/rendering/render_block.cpp:
899 (khtml::RenderBlock::nodeAtPoint):
901 2005-01-07 Ken Kocienda <kocienda@apple.com>
907 <rdar://problem/3848412> for forwarded message, tabbing to message view scrolls to bottom of view
909 * kwq/KWQKHTMLPart.mm:
910 (KWQKHTMLPart::nextKeyViewInFrame): Don't scroll the focus node to visible if it is not
911 in the document, or if it is not a descendent of the document element. In the case of the bug,
912 since the selection has not yet been set up, the focus node passed here is the HTML element, and
913 that does not yield a rect that is useful to us here. So now, in the case the bug mentions, we do nothing.
915 2005-01-06 Kevin Decker <kdecker@apple.com>
919 Fixed: <rdar://problem/3932215> REGRESSION (125-177): iFrame example at developer.apple.com fails in Safari
921 * khtml/khtml_part.cpp:
922 (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.
926 2005-01-06 David Harrison <harrison@apple.com>
930 (addendum to previous checkin for this bug)
931 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
933 Fix line navigation. Add AXUIElementForTextMarker.
935 * kwq/KWQAccObject.mm:
936 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
937 (-[KWQAccObject doAXUIElementForTextMarker:]):
938 (-[KWQAccObject doAXLineForTextMarker:]):
939 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
940 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
941 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
942 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
943 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
945 2005-01-06 Darin Adler <darin@apple.com>
949 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
951 (turns out the PLT regression was a false alarm)
953 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
954 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
956 * khtml/html/htmlparser.cpp:
957 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
958 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
959 to eliminate code that used ID_CLOSE_TAG for an array size.
960 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
961 that manages isindex to use deref instead of delete.
962 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
963 mistake of using ID_CLOSE_TAG for the array size too.
964 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
965 there and it would prevent custom tags from working. Added range check before using the forbidden
966 tag array with the token ID since custom tags will use index values past the end of the array.
967 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
968 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
969 createElement call is still here. Last time I left out a few form element types from this switch;
971 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
972 document if getTagID fails; this creates a unique per-document ID.
974 * khtml/misc/htmltags.c: Regenerated.
975 * khtml/misc/htmltags.h: Regenerated.
977 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
978 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
979 Also rewrote getTagName to work with the new scheme.
981 2005-01-06 David Harrison <harrison@apple.com>
983 Fixed Panther build. Also, do not advertize sentence support since it is incomplete.
985 * kwq/KWQAccObject.mm:
986 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
987 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
988 (-[KWQAccObject accessibilityIsAttributeSettable:]):
990 2005-01-06 David Harrison <harrison@apple.com>
992 Reviewed by Dave Hyatt.
994 <rdar://problem/3776056> AX: Editable HTML should not be viewed as AXStaticText
995 <rdar://problem/3588548> AX: tabbing does not work correctly with the screen reader and a focused link; need AXFocusedUIElement to work
997 Many more AX attributes supported. Numerous fixes to previous AX work.
999 * khtml/editing/visible_units.cpp:
1000 (khtml::startSentenceBoundary):
1001 (khtml::startOfSentence):
1002 (khtml::endSentenceBoundary):
1003 (khtml::endOfSentence):
1004 (khtml::previousSentencePositionBoundary):
1005 (khtml::previousSentencePosition):
1006 (khtml::nextSentencePositionBoundary):
1007 (khtml::nextSentencePosition):
1008 * khtml/editing/visible_units.h:
1009 * khtml/khtmlview.cpp:
1010 (KHTMLView::layout):
1011 * khtml/misc/helper.cpp:
1012 (khtml::findSentenceBoundary):
1013 (khtml::nextSentenceFromIndex):
1014 * khtml/misc/helper.h:
1015 * khtml/misc/htmltags.c:
1018 * khtml/rendering/render_container.cpp:
1019 (RenderContainer::removeChildNode):
1020 (RenderContainer::appendChildNode):
1021 (RenderContainer::insertChildNode):
1022 * khtml/rendering/render_object.cpp:
1023 (RenderObject::remove):
1024 * khtml/xml/dom_docimpl.cpp:
1025 (DocumentImpl::getAccObjectCache):
1026 (DocumentImpl::updateSelection):
1027 (DocumentImpl::close):
1028 (DocumentImpl::setFocusNode):
1029 (DocumentImpl::parentDocument):
1030 (DocumentImpl::topDocument):
1031 * khtml/xml/dom_docimpl.h:
1032 * kwq/KWQAccObject.mm:
1033 (-[KWQAccObject accessibilityShouldUseUniqueId]):
1034 (-[KWQAccObject detach]):
1035 (-[KWQAccObject anchorElement]):
1036 (-[KWQAccObject firstChild]):
1037 (-[KWQAccObject lastChild]):
1038 (-[KWQAccObject previousSibling]):
1039 (-[KWQAccObject nextSibling]):
1040 (-[KWQAccObject parentObject]):
1041 (-[KWQAccObject value]):
1042 (-[KWQAccObject accessibilityAttributeNames]):
1043 (-[KWQAccObject accessibilityPerformAction:]):
1044 (-[KWQAccObject textMarkerForVisiblePosition:]):
1045 (-[KWQAccObject visiblePositionForTextMarker:]):
1046 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
1047 (-[KWQAccObject topDocument]):
1048 (-[KWQAccObject topRenderer]):
1049 (-[KWQAccObject topView]):
1050 (-[KWQAccObject accessibilityAttributeValue:]):
1051 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1052 (-[KWQAccObject doAXLineForTextMarker:]):
1053 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
1054 (-[KWQAccObject doAXStringForTextMarkerRange:]):
1055 (-[KWQAccObject doAXTextMarkerForPosition:]):
1056 (-[KWQAccObject doAXBoundsForTextMarkerRange:]):
1057 (-[KWQAccObject doAXAttributedStringForTextMarkerRange:]):
1058 (-[KWQAccObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
1059 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
1060 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
1061 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
1062 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
1063 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
1064 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1065 (-[KWQAccObject doAXSentenceTextMarkerRangeForTextMarker:]):
1066 (-[KWQAccObject doAXParagraphTextMarkerRangeForTextMarker:]):
1067 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
1068 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
1069 (-[KWQAccObject doAXNextLineEndTextMarkerForTextMarker:]):
1070 (-[KWQAccObject doAXPreviousLineStartTextMarkerForTextMarker:]):
1071 (-[KWQAccObject doAXNextSentenceEndTextMarkerForTextMarker:]):
1072 (-[KWQAccObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
1073 (-[KWQAccObject doAXNextParagraphEndTextMarkerForTextMarker:]):
1074 (-[KWQAccObject doAXPreviousParagraphStartTextMarkerForTextMarker:]):
1075 (-[KWQAccObject doAXLengthForTextMarkerRange:]):
1076 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
1077 (-[KWQAccObject accessibilityHitTest:]):
1078 (-[KWQAccObject accessibilityFocusedUIElement]):
1079 (-[KWQAccObject accessibilityIsAttributeSettable:]):
1080 (-[KWQAccObject doSetAXSelectedTextMarkerRange:]):
1081 (-[KWQAccObject setAccObjectID:]):
1082 (-[KWQAccObject removeAccObjectID]):
1083 * kwq/KWQAccObjectCache.h:
1084 * kwq/KWQAccObjectCache.mm:
1085 (KWQAccObjectCache::setAccObject):
1086 (KWQAccObjectCache::removeAccObject):
1087 (KWQAccObjectCache::visiblePositionForTextMarker):
1088 (KWQAccObjectCache::postNotificationToTopWebArea):
1089 (KWQAccObjectCache::postNotification):
1090 (KWQAccObjectCache::handleFocusedUIElementChanged):
1091 * kwq/KWQKHTMLPart.mm:
1092 (KWQKHTMLPart::respondToChangedContents):
1093 * kwq/KWQTextUtilities.h:
1094 * kwq/KWQTextUtilities.mm:
1095 (KWQFindNextWordFromIndex):
1096 (KWQFindSentenceBoundary):
1097 (KWQFindNextSentenceFromIndex):
1098 * kwq/WebCoreBridge.mm:
1099 (-[WebCoreBridge accessibilityTree]):
1101 2005-01-05 Darin Adler <darin@apple.com>
1105 - re-landing a subset of my custom tag change that does not fix the bug, but also does
1106 not introduce a performance regression
1108 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
1109 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
1111 * khtml/editing/htmlediting.cpp:
1112 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
1113 per-document tags and is just better all around for things like the document.
1114 (khtml::debugNode): Ditto.
1115 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
1116 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
1117 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
1118 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
1120 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
1121 non-HTML elements to be nested as desired.
1123 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
1124 * khtml/misc/htmlhashes.cpp:
1125 (khtml::getTagID): Changed return type to unsigned short.
1126 (khtml::getAttrID): Ditto.
1128 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
1129 * khtml/xml/dom_docimpl.cpp:
1130 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
1131 Also updated for a few tags that the parser handled but this did not.
1133 * kwq/KWQRenderTreeDebug.cpp:
1134 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
1135 the tag ID directly, which only works for standard nodes.
1136 (operator<<): Update to call getTagName.
1137 (nodePositionRelativeToRoot): Ditto.
1138 (writeSelection): Ditto.
1140 2005-01-05 Ken Kocienda <kocienda@apple.com>
1146 <rdar://problem/3941203> REGRESSION (Mail): Paste inserts content in wrong place
1148 * khtml/editing/htmlediting.cpp:
1149 (khtml::ReplaceSelectionCommand::doApply): Some cleanup and refinement of the concepts used to make
1150 this operation work correctly, particularly in the logic to figure out whether to merge content, and
1151 also performing merges.
1152 * khtml/editing/visible_position.cpp:
1153 (khtml::isFirstVisiblePositionInBlock): Simplification of test used to make this determination.
1154 * khtml/editing/visible_units.cpp:
1155 (khtml::isStartOfParagraph): New helper, used in khtml::ReplaceSelectionCommand::doApply().
1156 (khtml::isEndOfParagraph): Ditto.
1157 * khtml/editing/visible_units.h: Declare new functions.
1159 2005-01-04 Ken Kocienda <kocienda@apple.com>
1165 <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
1167 * khtml/editing/htmlediting.cpp:
1168 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
1169 for the block we are adding was being done at the wrong time, which led to the placeholder remaining
1170 in the document when it was not needed. This resulted in the extra space reported in the bug.
1172 2005-01-04 Kevin Decker <kdecker@apple.com>
1176 Fixed: <rdar://problem/3936879> nil-deref, crash in InlineFlowBox::nodeAtPoint closing DHTML menus at hrweb.apple.com
1178 * khtml/rendering/render_block.cpp:
1179 (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.
1181 2005-01-04 David Hyatt <hyatt@apple.com>
1183 Fix for 3937203, force an update of the dashboard regions when scrollbars are added/removed.
1187 * khtml/rendering/render_layer.cpp:
1188 (RenderLayer::updateScrollInfoAfterLayout):
1190 2005-01-04 Ken Kocienda <kocienda@apple.com>
1194 Fix for these two bugs:
1196 <rdar://problem/3938935> REGRESSION (Mail): Pasting into an empty document mangles content
1197 <rdar://problem/3939148> REGRESSION (Mail): Pasting mistakenly reverses lines
1199 * khtml/editing/htmlediting.cpp:
1200 (khtml::ReplaceSelectionCommand::doApply): For 3938935, add one more case to handle an empty document; merge
1201 neither start nor end. For 3939148, improve the code which adjusts the insertion point during
1202 the process of pasting. It formerly handled only one of the possible cases.
1203 * layout-tests/editing/pasteboard/paste-text-015-expected.txt: Added.
1204 * layout-tests/editing/pasteboard/paste-text-015.html: Added.
1206 2005-01-04 David Hyatt <hyatt@apple.com>
1208 Fix for 3936571, placeholder attribute should work for normal inputs for Dashboard.
1212 * khtml/rendering/render_form.cpp:
1213 (RenderLineEdit::updateFromElement):
1214 * kwq/KWQLineEdit.mm:
1215 (QLineEdit::setPlaceholderString):
1217 2005-01-04 David Hyatt <hyatt@apple.com>
1219 Fix for 3830936, hang on changeforamerica.com. Make sure to ignore the style not yet available option when
1220 returning pseudo-styles.
1224 * khtml/css/cssstyleselector.cpp:
1225 (khtml::CSSStyleSelector::matchRulesForList):
1226 (khtml::CSSStyleSelector::pseudoStyleForElement):
1227 * khtml/rendering/render_style.cpp:
1228 (RenderStyle::addPseudoStyle):
1230 2005-01-04 Darin Adler <darin@apple.com>
1232 - rolled out my custom tag name change again -- it caused a 1 ms PLT regression
1234 * khtml/css/cssstyleselector.cpp:
1235 * khtml/editing/htmlediting.cpp:
1236 * khtml/editing/selection.cpp:
1237 * khtml/editing/visible_position.cpp:
1238 * khtml/html/dtd.cpp:
1239 * khtml/html/htmlparser.cpp:
1240 * khtml/html/htmlparser.h:
1241 * khtml/html/htmltokenizer.cpp:
1242 * khtml/misc/htmlhashes.cpp:
1243 * khtml/misc/htmlhashes.h:
1244 * khtml/misc/htmltags.c:
1245 * khtml/misc/htmltags.h:
1246 * khtml/misc/maketags:
1247 * khtml/xml/dom_docimpl.cpp:
1248 * khtml/xml/dom_docimpl.h:
1249 * khtml/xml/dom_nodeimpl.cpp:
1250 * khtml/xml/dom_position.cpp:
1251 * kwq/KWQRenderTreeDebug.cpp:
1253 2005-01-04 Ken Kocienda <kocienda@apple.com>
1259 <rdar://problem/3927554> Style info applied to remainder of document after a newline is entered
1261 * khtml/editing/htmlediting.cpp:
1262 (khtml::InsertParagraphSeparatorCommand::doApply): Clean up and simplification in code that inserts
1263 a paragraph separator. The bug was all about applying styles to the new paragraph that did not need
1264 to be applied. Now the code will detect when at the end of a style run and will not move and apply
1265 that ending style to the new paragraph, though it will place that style into the typing style. This
1266 seems to match NSText behavior.
1267 * layout-tests/editing/inserting/insert-div-021-expected.txt: This test result exhibited the bug fixed
1268 here. The only reason it was not noticed is that the erroneously copied inline was a span, and so did
1269 not have any visible effect on the document.
1270 * layout-tests/editing/inserting/insert-div-022-expected.txt: Added.
1271 * layout-tests/editing/inserting/insert-div-022.html: Added.
1273 2005-01-04 David Hyatt <hyatt@apple.com>
1275 Fix for 3904562, make sure to clear the outline dictionary when drawing so that random focus rings dont get drawn
1280 * khtml/rendering/render_flow.cpp:
1281 (RenderFlow::paintLines):
1283 2005-01-03 David Hyatt <hyatt@apple.com>
1285 Fix for float painting regressions 3932524, 3931664, and 3933068. Make the noPaint flag setting more
1286 robust and make it work regardless of which objects get a layout or not.
1290 * khtml/rendering/render_block.cpp:
1291 (khtml::RenderBlock::insertFloatingObject):
1292 (khtml::RenderBlock::addOverhangingFloats):
1293 (khtml::RenderBlock::addIntrudingFloats):
1294 * khtml/rendering/render_block.h:
1295 (khtml::RenderBlock::FloatingObject::FloatingObject):
1297 2005-01-03 Maciej Stachowiak <mjs@apple.com>
1301 <rdar://problem/3935390> Tiger 8A341: nil deref crash in DOM::NodeImpl::traverseNextNode
1303 * khtml/html/html_miscimpl.cpp:
1304 (HTMLCollectionImpl::traverseNextItem): Assert that the starting point is not nil,
1305 it should not ever be (now).
1306 (HTMLCollectionImpl::item): When traversing items stop when we hit
1307 nil, meaning the end to avoid triggering above assert (formerly crash).
1309 2005-01-03 Maciej Stachowiak <mjs@apple.com>
1311 Reviewed by John and Kevin.
1313 <rdar://problem/3870317> REGRESSION(125.9-125.11) broken behavior at test.profoundlearning.com - used to
1315 * khtml/ecma/kjs_window.cpp:
1316 (Window::get): Look up frame names before buitin window properties
1317 to match other browsers. This regressed because we added a builtin
1318 "toolbar" property but this site had a frame with that name.
1320 2004-12-21 Maciej Stachowiak <mjs@apple.com>
1324 <rdar://problem/3888931> frame naming allows malicious site to bring up a window when you click on a link in another
1326 Added opener bridge method to help WebKit implement security check
1327 for named frame visibility.
1329 * khtml/khtml_part.h:
1330 * kwq/WebCoreBridge.h:
1331 * kwq/WebCoreBridge.mm:
1332 (-[WebCoreBridge opener]):
1334 2005-01-03 Ken Kocienda <kocienda@apple.com>
1340 <rdar://problem/3933926> Tiger8A341: Mail crashes while forwarding embedded HTML message in -[WebCoreBridge ensureSelectionVisible]
1342 * kwq/WebCoreBridge.mm:
1343 (-[WebCoreBridge ensureSelectionVisible]): Put in some null checks to prevent crash experienced in bug.
1345 2005-01-03 David Hyatt <hyatt@apple.com>
1347 Fix for 3936881, make sure positioned objects prooperly update y-position.
1351 * khtml/rendering/render_block.cpp:
1352 (khtml::RenderBlock::layoutPositionedObjects):
1354 2005-01-03 Ken Kocienda <kocienda@apple.com>
1356 Reviewed by Harrison
1360 <rdar://problem/3928250> REGRESSION (Mail): Typing style lost after hitting return key
1362 * khtml/editing/htmlediting.cpp:
1363 (khtml::InsertLineBreakCommand::preservesTypingStyle): Now implemented, returning yes for this command.
1364 (khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Initialize new typing style member variable.
1365 (khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand): Deref new typing style member variable.
1366 (khtml::InsertParagraphSeparatorCommand::preservesTypingStyle): Now implemented, returning yes for this command.
1367 (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion): New function to set the typing style
1368 (khtml::InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion): Function called after the <p>
1369 insertion is done. This function diffs the style created in setFullTypingStyleBeforeInsertion() with the style
1370 of the new <p> and only sets those styles needed to preserve the style in effect before the insertion.
1371 (khtml::InsertParagraphSeparatorCommand::doApply): Call new functions.
1372 (khtml::TypingCommand::preservesTypingStyle): Now yes for inserting line breaks and paragraphs.
1373 * khtml/editing/htmlediting.h: Declare new functions.
1375 2004-12-25 Kevin Decker <kdecker@apple.com>
1379 Fixed: <rdar://problem/3505072> hang in KHTMLParser::parseToken (consulting.soroos.net)
1381 * 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.
1383 2004-12-23 Darin Adler <darin@apple.com>
1387 - re-fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
1389 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
1390 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
1392 * khtml/editing/htmlediting.cpp:
1393 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
1394 per-document tags and is just better all around for things like the document.
1395 (khtml::debugNode): Ditto.
1396 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
1397 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
1398 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
1399 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
1401 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
1402 non-HTML elements to be nested as desired.
1404 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
1405 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
1407 * khtml/html/htmlparser.cpp:
1408 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
1409 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
1410 to eliminate code that used ID_CLOSE_TAG for an array size.
1411 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
1412 that manages isindex to use deref instead of delete.
1413 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
1414 mistake of using ID_CLOSE_TAG for the array size too.
1415 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
1416 there and it would prevent custom tags from working. Added range check before using the forbidden
1417 tag array with the token ID since custom tags will use index values past the end of the array.
1418 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
1419 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
1420 createElement call is still here. Last time I left out a few form element types from this switch;
1422 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
1423 document if getTagID fails; this creates a unique per-document ID.
1425 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
1426 * khtml/misc/htmlhashes.cpp:
1427 (khtml::getTagID): Changed return type to unsigned short.
1428 (khtml::getAttrID): Ditto.
1430 * khtml/misc/htmltags.c: Regenerated.
1431 * khtml/misc/htmltags.h: Regenerated.
1433 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
1434 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
1435 Also rewrote getTagName to work with the new scheme.
1437 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
1438 * khtml/xml/dom_docimpl.cpp:
1439 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
1440 Also updated for a few tags that the parser handled but this did not.
1442 * kwq/KWQRenderTreeDebug.cpp:
1443 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
1444 the tag ID directly, which only works for standard nodes.
1445 (operator<<): Update to call getTagName.
1446 (nodePositionRelativeToRoot): Ditto.
1447 (writeSelection): Ditto.
1451 2004-12-22 Darin Adler <darin@apple.com>
1453 - rolled out my custom tag name change -- it broke amazon.com
1455 * khtml/css/cssstyleselector.cpp:
1456 * khtml/editing/htmlediting.cpp:
1457 * khtml/editing/selection.cpp:
1458 * khtml/editing/visible_position.cpp:
1459 * khtml/html/dtd.cpp:
1460 * khtml/html/htmlparser.cpp:
1461 * khtml/html/htmlparser.h:
1462 * khtml/html/htmltokenizer.cpp:
1463 * khtml/misc/htmlhashes.cpp:
1464 * khtml/misc/htmlhashes.h:
1465 * khtml/misc/htmltags.c:
1466 * khtml/misc/htmltags.h:
1467 * khtml/misc/maketags:
1468 * khtml/xml/dom_docimpl.cpp:
1469 * khtml/xml/dom_docimpl.h:
1470 * khtml/xml/dom_nodeimpl.cpp:
1471 * khtml/xml/dom_position.cpp:
1472 * kwq/KWQRenderTreeDebug.cpp:
1474 2004-12-22 David Harrison <harrison@apple.com>
1476 Reviewed by Darin Adler.
1478 * khtml/editing/selection.cpp:
1479 (khtml::Selection::validate):
1480 The selecting/deselecting bad behavior is because the Selection code that expands by words
1481 had an inaccurate test for being at the end of the document (where double-clicking needs
1482 to select the last word). Fixed that check.
1484 2004-12-22 Adele Amchan <adele@apple.com>
1488 Fix for <rdar://problem/3911650> tabs at safeway.com stop working after a while
1490 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::scrollToAnchor): removed call to cancelRedirection
1491 so that we match Firefox and WinIE behavior.
1493 2004-12-22 Darin Adler <darin@apple.com>
1497 - fixed <rdar://problem/3760910> Request to include support for custom tag names in HTML (they already work in XML)
1499 * khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector): Changed
1500 some code that used ID_LAST_TAG in a slightly wrong, but harmless, way.
1502 * khtml/editing/htmlediting.cpp:
1503 (khtml::debugPosition): Use nodeName rather than getTagName, since the latter works for
1504 per-document tags and is just better all around for things like the document.
1505 (khtml::debugNode): Ditto.
1506 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Ditto.
1507 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
1508 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Ditto.
1509 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
1511 * khtml/html/dtd.cpp: (DOM::checkChild): Use ID_LAST_TAG rather than 1000 for the check that allows
1512 non-HTML elements to be nested as desired.
1514 * khtml/html/htmlparser.h: Change forbidden tag array to be allocated in the object rather than on
1515 the heap. Also use ID_LAST_TAG for the array size; the old code used ID_CLOSE_TAG which is now a
1517 * khtml/html/htmlparser.cpp:
1518 (KHTMLParser::KHTMLParser): Remove code that creates the forbidden tag array on the heap; makes more
1519 sense to just have the array be a member so we don't have to use new and delete on it. Also needed
1520 to eliminate code that used ID_CLOSE_TAG for an array size.
1521 (KHTMLParser::~KHTMLParser): Remove code that deletes the forbidden tag array. Also changed the code
1522 that manages isindex to use deref instead of delete.
1523 (KHTMLParser::reset): Use safer sizeof for clearing the forbidden tag array. Old code had the
1524 mistake of using ID_CLOSE_TAG for the array size too.
1525 (KHTMLParser::parseToken): Removed code that checks for bogus tags; it's not clear why it was ever
1526 there and it would prevent custom tags from working. Added range check before using the forbidden
1527 tag array with the token ID since custom tags will use index values past the end of the array.
1528 (KHTMLParser::getElement): Removed most of the code that makes an element by ID; now the work is done
1529 inside the DocumentImpl createHTMLElement. Any code that needs to be different than a dynamic
1530 createElement call is still here.
1531 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseTag): Call the tagId function in the
1532 document if getTagID fails; this creates a unique per-document ID.
1534 * khtml/misc/htmlhashes.h: Changed return types to unsigned short.
1535 * khtml/misc/htmlhashes.cpp:
1536 (khtml::getTagID): Changed return type to unsigned short.
1537 (khtml::getAttrID): Ditto.
1539 * khtml/misc/htmltags.c: Regenerated.
1540 * khtml/misc/htmltags.h: Regenerated.
1542 * khtml/misc/maketags: Changed the generated constants to use "const unsigned short" instead of "#define".
1543 Changed ID_CLOSE_TAG to be a fixed value of 32000 rather than being just past the IDs of the HTML tags.
1544 Also rewrote getTagName to work with the new scheme.
1546 * khtml/xml/dom_docimpl.h: Added overload of createHTMLElement, made it non-virtual since it's not overriden.
1547 * khtml/xml/dom_docimpl.cpp:
1548 (DocumentImpl::createHTMLElement): Refactored into two separate functions, one that takes the tag ID.
1549 Also updated for a few tags that the parser handled but this did not.
1551 * kwq/KWQRenderTreeDebug.cpp:
1552 (getTagName): Added. Works for custom nodes, because it calls nodeName rather than using getTagName on
1553 the tag ID directly, which only works for standard nodes.
1554 (operator<<): Update to call getTagName.
1555 (nodePositionRelativeToRoot): Ditto.
1556 (writeSelection): Ditto.
1558 2004-12-21 David Harrison <harrison@apple.com>
1560 Reviewed by Ken Kocienda.
1562 <rdar://problem/3924934> REGRESSION: double click at end of line selects start of next line
1564 Problem was the TextIterator was not handling exitNode() from a P block properly.
1566 * khtml/editing/visible_text.cpp:
1567 (khtml::TextIterator::TextIterator):
1568 Add new param that specifies whether the iterator is for content or for searching.
1569 Search iterators do not prevent newlines at the beginning.
1570 (khtml::TextIterator::advance):
1571 Added some comments.
1572 (khtml::TextIterator::handleTextNode):
1573 Added some comments.
1574 (khtml::TextIterator::exitNode):
1575 Emit newline for P (and other) blocks with position following the block, instead of the m_lastTextNode.
1576 (khtml::TextIterator::emitCharacter):
1577 Added some comments.
1578 (khtml::TextIterator::range):
1579 Added some comments.
1580 (khtml::CharacterIterator::CharacterIterator):
1581 Specify search type TextIterator.
1582 (khtml::CharacterIterator::advance):
1583 * khtml/editing/visible_text.h:
1585 Add new TextIterator::TextIterator param that specifies whether the iterator is for content or for searching.
1586 * khtml/editing/visible_units.cpp:
1587 (khtml::nextWordBoundary):
1588 Specify search type TextIterator.
1590 2004-12-21 David Harrison <harrison@apple.com>
1592 Reviewed by Ken Kocienda.
1594 <rdar://problem/3924695> REGRESSION (Mail): double-clicking past end of line shows no selection, should select to EOL
1596 Problem was that RenderText::setSelectionState did not handle the SelectionStart case where start and end are the end of the line.
1597 Fixed by pretending the start == end-1 in that situation, as long as end > 0.
1599 * khtml/rendering/render_text.cpp:
1600 (RenderText::setSelectionState)
1602 2004-12-21 Maciej Stachowiak <mjs@apple.com>
1606 <rdar://problem/3929187> WebKit needs to restrict access to certain window operations by domain
1608 * khtml/ecma/kjs_window.cpp:
1609 (Window::get): Change most window functions to be restricted by
1612 2004-12-21 Ken Kocienda <kocienda@apple.com>
1618 <rdar://problem/3928305> selecting an entire line and typing over causes new inserted text at top of document
1620 * khtml/editing/htmlediting.cpp:
1621 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent): New function to detect case
1622 formerly undetected and unhandled. This is the crux of the bug fix.
1623 (khtml::DeleteSelectionCommand::doApply): Call insertPlaceholderForAncestorBlockContent() during
1624 execution of command.
1625 * khtml/editing/htmlediting.h: Declare new function.
1626 * layout-tests/editing/deleting/delete-3928305-fix-expected.txt: Added.
1627 * layout-tests/editing/deleting/delete-3928305-fix.html: Added.
1629 2004-12-21 Ken Kocienda <kocienda@apple.com>
1633 * khtml/editing/htmlediting.cpp:
1634 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Note to self: Must compile code before
1635 checking in (aka must return false from function returning bool).
1637 2004-12-21 Ken Kocienda <kocienda@apple.com>
1643 <rdar://problem/3927752> Crash in khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded(DOM::NodeImpl*)
1645 * khtml/editing/htmlediting.cpp:
1646 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Added some null checks.
1647 (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Ditto.
1649 2004-12-21 Ken Kocienda <kocienda@apple.com>
1653 * khtml/editing/htmlediting.cpp:
1654 (khtml::ReplacementFragment::mergeStartNode): Refine concept of how this node is found based on
1655 further experiements.
1656 (khtml::ReplaceSelectionCommand::doApply): Add a special case for determining merges that need to
1657 be done if the insertion point is in an empty block.
1658 * layout-tests/editing/pasteboard/paste-text-012-expected.txt: Added.
1659 * layout-tests/editing/pasteboard/paste-text-012.html: Added.
1660 * layout-tests/editing/pasteboard/paste-text-013-expected.txt: Added.
1661 * layout-tests/editing/pasteboard/paste-text-013.html: Added.
1662 * layout-tests/editing/pasteboard/paste-text-014-expected.txt: Added.
1663 * layout-tests/editing/pasteboard/paste-text-014.html: Added.
1665 2004-12-21 Darin Adler <darin@apple.com>
1669 - fixed <rdar://problem/3899133> text search in a Safari window takes a very long time on Tiger updates page (and some other pages)
1671 * khtml/editing/visible_text.h: Add an "offset base node" parameter to emitCharacter, and also
1672 add a field to track it. Must make a few things mutable so we can update them in the range accessor.
1673 * khtml/editing/visible_text.cpp:
1674 (khtml::TextIterator::advance): Pass in base node and offsets rather than computing actual offsets
1675 using the node's index. We only compute the node index if actually asked for the range.
1676 (khtml::TextIterator::handleTextNode): Pass 0 for base node and set base node to 0 when setting
1678 (khtml::TextIterator::handleTextBox): Ditto.
1679 (khtml::TextIterator::handleReplacedElement): Pass base node and set base node instead of calling
1681 (khtml::TextIterator::handleNonTextNode): Pass 0 for offset.
1682 (khtml::TextIterator::exitNode): More of the same.
1683 (khtml::TextIterator::emitCharacter): Ditto.
1684 (khtml::TextIterator::range): If an offset base node is stored, then get its node index, and then
1685 add that in to the offsets. Doing the work here guarantees it's done only once when doing a text search.
1689 * khtml/khtml_part.cpp: Removed SPEED_DEBUG define. Not sure why it was on.
1693 2004-12-20 Ken Kocienda <kocienda@apple.com>
1697 * khtml/editing/htmlediting.cpp:
1698 (khtml::DeleteSelectionCommand::moveNodesAfterNode): My one-liner for this bug introduced layout test
1699 regressions: <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
1700 Rolling out until I can develop a real fix.
1702 2004-12-20 David Harrison <harrison@apple.com>
1704 Reviewed by Dave Hyatt.
1706 Initial checkin of AXTextMarkerRef support.
1708 * khtml/xml/dom_docimpl.cpp:
1709 (DocumentImpl::updateSelection):
1710 (DocumentImpl::setFocusNode):
1711 * kwq/KWQAccObject.h:
1712 * kwq/KWQAccObject.mm:
1713 (-[KWQAccObject detach]):
1714 (-[KWQAccObject anchorElement]):
1715 (-[KWQAccObject addChildrenToArray:]):
1716 (-[KWQAccObject accessibilityAttributeNames]):
1717 (-[KWQAccObject accessibilityActionDescription:]):
1718 (-[KWQAccObject accessibilityPerformAction:]):
1719 (-[KWQAccObject textMarkerRangeFromMarkers:andEndMarker:]):
1720 (-[KWQAccObject textMarkerForVisiblePosition:]):
1721 (-[KWQAccObject visiblePositionForTextMarker:]):
1722 (-[KWQAccObject AXTextMarkerRangeCopyStartMarkerWrapper:]):
1723 (-[KWQAccObject AXTextMarkerRangeCopyEndMarkerWrapper:]):
1724 (-[KWQAccObject visiblePositionForStartOfTextMarkerRange:]):
1725 (-[KWQAccObject visiblePositionForEndOfTextMarkerRange:]):
1726 (-[KWQAccObject accessibilityAttributeValue:]):
1727 (-[KWQAccObject accessibilityParameterizedAttributeNames]):
1728 (-[KWQAccObject textMarkerRangeFromVisiblePositions:andEndPos:]):
1729 (-[KWQAccObject getSelectedTextMarkerRange]):
1730 (-[KWQAccObject doAXLineForTextMarker:]):
1731 (-[KWQAccObject doAXTextMarkerRangeForLine:]):
1732 (-[KWQAccObject doAXStringForTextMarkerRange:]):
1733 (-[KWQAccObject doAXNextTextMarkerForTextMarker:]):
1734 (-[KWQAccObject doAXPreviousTextMarkerForTextMarker:]):
1735 (-[KWQAccObject doAXLeftWordTextMarkerRangeForTextMarker:]):
1736 (-[KWQAccObject doAXRightWordTextMarkerRangeForTextMarker:]):
1737 (-[KWQAccObject doAXLeftLineTextMarkerRangeForTextMarker:]):
1738 (-[KWQAccObject doAXRightLineTextMarkerRangeForTextMarker:]):
1739 (-[KWQAccObject accessibilityAttributeValue:forParameter:]):
1740 (-[KWQAccObject accessibilityFocusedUIElement]):
1741 (-[KWQAccObject clearChildren]):
1742 (-[KWQAccObject accObjectID]):
1743 (-[KWQAccObject setAccObjectID:]):
1744 (-[KWQAccObject removeAccObjectID]):
1745 * kwq/KWQAccObjectCache.h:
1746 * kwq/KWQAccObjectCache.mm:
1747 (KWQAccObjectCache::KWQAccObjectCache):
1748 (KWQAccObjectCache::~KWQAccObjectCache):
1749 (KWQAccObjectCache::getAccObjectID):
1750 (KWQAccObjectCache::removeAccObjectID):
1751 (KWQAccObjectCache::textMarkerForVisiblePosition):
1752 (KWQAccObjectCache::visiblePositionForTextMarker):
1754 2004-12-19 Darin Adler <darin@apple.com>
1756 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added nil check.
1758 2004-12-19 Darin Adler <darin@apple.com>
1762 - a garbage collection fix
1764 * kwq/KWQFoundationExtras.h: (KWQCFAutorelease): Added a more-extensive comment and fixed the BUILDING_ON_PANTHER
1765 #ifndef to use #if (in practice, either is OK).
1766 * kwq/KWQKURL.mm: (KURL::getNSURL): Use KWQCFAutorelease instead of autorelease.
1768 2004-12-17 David Hyatt <hyatt@apple.com>
1770 Fix for 3923255, specified percentage heights of divs with overflow auto inside tables not honored.
1772 Reviewed by kocienda
1774 * khtml/rendering/render_box.cpp:
1775 (RenderBox::calcPercentageHeight):
1776 * khtml/rendering/render_table.cpp:
1777 (RenderTableSection::layoutRows):
1779 2004-12-17 David Harrison <harrison@apple.com>
1781 Reviewed by Ken Kocienda.
1783 <rdar://problem/3924930> REGRESSION: triple click does not select to end of line
1785 * khtml/editing/visible_units.cpp:
1786 (khtml::endOfParagraph):
1787 When includeLineBreak is true, allow traversal to next node after enclosingBlockFlowElement.
1789 2004-12-17 Ken Kocienda <kocienda@apple.com>
1793 * khtml/editing/htmlediting.cpp:
1794 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Missed deleting some now-obsolete expcetion
1795 codes when I added the createBreakElement() function.
1797 2004-12-17 Richard Williamson <rjw@apple.com>
1799 Set the floor of max cacheable object size to 40K. This restores
1800 the long standing floor. Lower floor deleteriously impacts the PLT.
1803 * khtml/khtml_part.cpp:
1804 (KHTMLPart::checkCompleted):
1805 * khtml/misc/loader.cpp:
1808 2004-12-17 Ken Kocienda <kocienda@apple.com>
1814 <rdar://problem/3926142> REGRESSION (Mail): Deleting text decreases quote level
1816 * khtml/editing/htmlediting.cpp:
1817 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Stop merging nodes when a <br> is hit.
1818 Formerly checked only for block boundary.
1820 2004-12-17 David Harrison <harrison@apple.com>
1824 Add KWQCFAutorelease for autoreleasing CF objects.
1825 * kwq/KWQFoundationExtras.h:
1829 2004-12-17 David Harrison <harrison@apple.com>
1833 Fix GC compatibility in getNSString.
1836 (QString::getNSString):
1837 Use NSString allocator instead of CFString, so that autorelease works under GC.
1839 2004-12-17 Ken Kocienda <kocienda@apple.com>
1845 <rdar://problem/3890973> REGRESSION (Mail): Deleting reorders remaining text
1847 * khtml/editing/htmlediting.cpp:
1848 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Added check to ensure that moving content will not
1849 move it after the <body> element.
1851 2004-12-17 Ken Kocienda <kocienda@apple.com>
1855 Added new layout tests covering cases from recent bug fixes.
1857 * layout-tests/editing/inserting/insert-div-018-expected.txt: Added.
1858 * layout-tests/editing/inserting/insert-div-018.html: Added.
1859 * layout-tests/editing/inserting/insert-div-019-expected.txt: Added.
1860 * layout-tests/editing/inserting/insert-div-019.html: Added.
1861 * layout-tests/editing/inserting/insert-div-020-expected.txt: Added.
1862 * layout-tests/editing/inserting/insert-div-020.html: Added.
1863 * layout-tests/editing/inserting/insert-div-021-expected.txt: Added.
1864 * layout-tests/editing/inserting/insert-div-021.html: Added.
1866 2004-12-17 Ken Kocienda <kocienda@apple.com>
1870 Changes in layout resulting from giving <p> elements no margin rather than 0.1em margin.
1872 * layout-tests/editing/inserting/insert-div-013-expected.txt
1873 * layout-tests/editing/inserting/insert-div-014-expected.txt
1875 2004-12-17 Ken Kocienda <kocienda@apple.com>
1881 <rdar://problem/3925317> Increase quote in email and with cursor below the quote the new line appears above the quote
1883 * khtml/editing/htmlediting.cpp:
1884 (khtml::InsertParagraphSeparatorCommand::doApply):
1885 * khtml/editing/visible_position.cpp: Refine rules for whether to use the starting node or the starting
1886 block as the reference node for the insertion of the new block.
1887 (khtml::isLastVisiblePositionInBlock): Tweak rules again. Descendants of following blocks should answer true.
1888 I worked this all out on the whiteboard this time. This should be the last tweak.
1890 2004-12-17 Kevin Decker <kdecker@apple.com>
1894 Fixed <rdar://problem/3824438> Need a clean way for Dashboard to detect when an XML parsing error occurs
1896 * khtml/xml/xml_tokenizer.cpp:
1897 (khtml::XMLTokenizer::insertErrorMessageBlock): In the xml error report, instead of a generic <div>, use <parsererror> to match Mozilla.
1899 2004-12-16 Ken Kocienda <kocienda@apple.com>
1905 <rdar://problem/3924888> REGRESSION (Mail): Hitting return key at end of line does not insert visible newline
1907 * khtml/editing/htmlediting.cpp:
1908 (khtml::InsertParagraphSeparatorCommand::doApply): Tweaked code I added just before to fix 3924486, so that
1909 it checks the downstream node for the starting position.
1911 2004-12-16 Ken Kocienda <kocienda@apple.com>
1915 Added new createBreakElement() function that makes creating a <br> element a one-liner.
1916 Converted all the code that used to call the DocumentImpl, and dealt with the exceptionCode,
1917 over to this new helper.
1919 * khtml/editing/htmlediting.cpp:
1920 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Now uses new helper function.
1921 (khtml::InsertLineBreakCommand::doApply): Ditto.
1922 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
1923 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
1924 (khtml::ReplaceSelectionCommand::doApply): Ditto.
1925 (khtml::createBreakElement): New helper.
1926 * khtml/editing/htmlediting.h: Ditto.
1928 2004-12-16 David Hyatt <hyatt@apple.com>
1930 Fix a bug where vertical-align values that depended on their parent's value went crazy if the parent was
1931 vertical-align top or bottom. The bug is 3771007, bankofamerica's ebills page.
1933 Reviewed by kocienda
1935 * khtml/rendering/render_object.cpp:
1936 (RenderObject::getVerticalPosition):
1938 2004-12-16 Ken Kocienda <kocienda@apple.com>
1944 <rdar://problem/3924486> REGRESSION (Mail): Hitting return key does not insert visible newline
1945 <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
1947 * khtml/editing/htmlediting.cpp:
1948 (khtml::InsertParagraphSeparatorCommand::doApply): For the first bug, detect when inserting a <p> will
1949 make a visible <br> collapse. For the second bug, move the code that inserts the new <p> after
1950 a check which may move the node used as the reference node for the insertion. Also change this code to
1951 insert the <p> after the last sibling of the starting position, to move it past the nodes we're going
1952 to want to shift into the new <p>.
1954 2004-12-16 Darin Adler <darin@apple.com>
1958 - use <p> elements rather than <br> when pasting plain text; also use margin of 0 rather than 0.1 em
1959 after talking this over with Dave and Ken
1961 * khtml/editing/htmlediting.h: Added createDefaultParagraphElement and createBlockPlaceholderElement.
1962 * khtml/editing/htmlediting.cpp:
1963 (khtml::CompositeEditCommand::insertBlockPlaceholderIfNeeded): Use new createBlockPlaceholderElement
1964 helper so this can share code with the plain-text conversion code.
1965 (khtml::InsertParagraphSeparatorCommand::createParagraphElement): Use new createDefaultParagraphElement
1966 helper so this can share code with the plain-text conversion code.
1967 (khtml::createDefaultParagraphElement): Added.
1968 (khtml::createBlockPlaceholderElement): Added.
1970 * khtml/editing/markup.cpp: (khtml::createFragmentFromText): Use paragraphs rather than
1971 <br> elements for pasting plain text.
1973 - regenerated these files with the newer gperf
1975 * khtml/css/cssproperties.c: Regenerated.
1976 * khtml/css/cssvalues.c: Regenerated.
1977 * khtml/misc/htmlattrs.c: Regenerated.
1978 * khtml/misc/htmltags.c: Regenerated.
1980 2004-12-16 Ken Kocienda <kocienda@apple.com>
1986 <rdar://problem/3924291> REGRESSION (Mail): Crash deleting content following a <p> element
1988 * khtml/xml/dom_nodeimpl.cpp:
1989 (NodeImpl::enclosingInlineElement): Fixed problem in this function where recursive search for
1990 parent that is not an inline would skip past previous siblings of nodes which were blocks. Now
1991 it stops looking in this situation. This problem eventually caused the delete code to try to
1992 merge a node under a descendent.
1994 2004-12-16 Adele Amchan <adele@apple.com>
1996 Change by Richard, reviewed by me.
1998 Fix for: <rdar://problem/3923983> background image decoding prevents page with 0Kb image from finishing to load
2000 * khtml/misc/loader.cpp: (CachedImage::data): Added call to notifyFinished so the 0Kb image case finishes loading.
2002 2004-12-16 Adele Amchan <adele@apple.com>
2006 Fix for: <rdar://problem/3534824> VIP: some navigation links on safeway.com don't work due to a JavaScript quirk
2008 Added a call to ObjectImp::get before Window::get just returns Undefined.
2009 This was preventing us from getting the toString function from a Window object.
2011 * khtml/ecma/kjs_window.cpp: (Window::get):
2013 2004-12-16 Ken Kocienda <kocienda@apple.com>
2019 <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place
2021 * khtml/editing/htmlediting.cpp:
2022 (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
2023 to do a better job than it was doing before. Added several test cases to prove I am on a
2025 * khtml/editing/visible_position.cpp:
2026 (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
2027 leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
2028 This function was returning true for the first position in "bar". Wrong. Also tightened up other
2029 rule: Should not report true when relationship between blocks cannot be determined.
2030 (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
2031 when relationship between blocks cannot be determined.
2032 * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
2033 * layout-tests/editing/inserting/insert-div-010.html: Added.
2034 * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
2035 * layout-tests/editing/inserting/insert-div-011.html: Added.
2036 * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
2037 * layout-tests/editing/inserting/insert-div-012.html: Added.
2038 * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
2039 * layout-tests/editing/inserting/insert-div-013.html: Added.
2040 * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
2041 * layout-tests/editing/inserting/insert-div-014.html: Added.
2042 * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
2043 * layout-tests/editing/inserting/insert-div-015.html: Added.
2044 * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
2045 * layout-tests/editing/inserting/insert-div-016.html: Added.
2046 * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
2047 * layout-tests/editing/inserting/insert-div-017.html: Added.
2049 2004-12-16 Ken Kocienda <kocienda@apple.com>
2053 Added a layout test based on my last checkin.
2055 * layout-tests/editing/selection/move-by-word-001-expected.txt: Added.
2056 * layout-tests/editing/selection/move-by-word-001.html: Added.
2058 2004-12-16 Ken Kocienda <kocienda@apple.com>
2064 <rdar://problem/3917929> REGRESSION (Mail): Command-left-arrow leaves insertion point too high after specific steps
2066 * khtml/editing/visible_text.cpp:
2067 (khtml::SimplifiedBackwardsTextIterator::advance): Add new check for leaving a text node and iterating
2068 backwards into a different block that is an descendent of the block containing the text node (as in leaving
2069 the "bar" node in this example: <p>foo</p>bar).
2070 (khtml::SimplifiedBackwardsTextIterator::handleNonTextNode): Call new emitNewlineForBROrText helper.
2071 (khtml::SimplifiedBackwardsTextIterator::emitNewlineForBROrText): Factor out code from handleNonTextNode, since
2072 it is called from there, and now also from advance().
2074 2004-12-15 Darin Adler <darin@apple.com>
2078 - fixed problem where plain-text would put a blank line between each <p> even when they have no margins
2080 * khtml/editing/visible_text.cpp: (khtml::TextIterator::exitNode): Add more checks and only set the
2081 "add one more newline" flag if the margin is sufficient. A more complete fix would ignore the node
2082 type altogether and use the render tree instead.
2084 2004-12-14 John Sullivan <sullivan@apple.com>
2088 - rest of WebCore fix for <rdar://problem/3790011> undoable operations all say "Undo"
2089 in the menu, no specific action names
2091 * khtml/editing/edit_actions.h: new header, contains EditAction enum
2092 (renamed from HTMLEditAction, formerly in htmlediting.h)
2094 * ForwardingHeaders/editing/edit_actions.h: new forwarding header
2096 * khtml/editing/htmlediting.h:
2097 removed HTMLEditAction enum in favor of including edit_actions.h; added khtml::
2098 namespace to EditAction usages; added m_editingAction ivar to ApplyStyleCommand
2100 * khtml/editing/htmlediting.cpp:
2101 (khtml::EditCommandPtr::editingAction):
2102 update for enum name change
2103 (khtml::EditCommand::editingAction):
2105 (khtml::ApplyStyleCommand::ApplyStyleCommand):
2106 added editingAction parameter to this constructor
2107 (khtml::ApplyStyleCommand::editingAction):
2109 (khtml::DeleteSelectionCommand::editingAction):
2110 update for enum name change
2111 (khtml::MoveSelectionCommand::editingAction):
2113 (khtml::TypingCommand::editingAction):
2115 (khtml::ReplaceSelectionCommand::editingAction):
2118 * khtml/khtml_part.h:
2119 added EditAction parameter to applyStyle and computeAndSetTypingStyle
2120 * khtml/khtml_part.cpp:
2121 (KHTMLPart::computeAndSetTypingStyle):
2122 added EditAction parameter
2123 (KHTMLPart::applyStyle):
2126 * kwq/KWQKHTMLPart.mm:
2127 (KWQKHTMLPart::registerCommandForUndoOrRedo):
2128 do the cast from EditAction to WebUndoAction a different way to match other code
2130 * kwq/WebCoreBridge.h:
2131 * kwq/WebCoreBridge.mm:
2132 (-[WebCoreBridge setTypingStyle:withUndoAction:]):
2133 added WebUndoAction parameter, passed into ApplyStyleCommand constructor
2134 (-[WebCoreBridge applyStyle:withUndoAction:]):
2137 * WebCore.pbproj/project.pbxproj:
2138 updated for new files
2140 2004-12-14 David Hyatt <hyatt@apple.com>
2142 Fix for 3562458, rowspan and colspan converted to ints so that large values will work for them. Remove
2143 the ridiculous 1024 limit on the span values.
2145 * khtml/html/html_tableimpl.cpp:
2146 (HTMLTableCellElementImpl::parseHTMLAttribute):
2147 * khtml/rendering/render_table.cpp:
2148 (RenderTableCell::collapsedBottomBorder):
2149 * khtml/rendering/render_table.h:
2150 (khtml::RenderTableCell::colSpan):
2151 (khtml::RenderTableCell::setColSpan):
2152 (khtml::RenderTableCell::rowSpan):
2153 (khtml::RenderTableCell::setRowSpan):
2154 (khtml::RenderTableCol::span):
2155 (khtml::RenderTableCol::setSpan):
2157 2004-12-14 David Hyatt <hyatt@apple.com>
2159 Make sure <col> and <colgroup> can have spans updated dynamically as well.
2163 * khtml/html/html_tableimpl.cpp:
2164 (HTMLTableColElementImpl::parseHTMLAttribute):
2165 * khtml/rendering/render_table.cpp:
2166 (RenderTableCell::updateFromElement):
2167 (RenderTableCol::updateFromElement):
2169 2004-12-14 David Hyatt <hyatt@apple.com>
2171 Fix for 3833123, setting a cell's colspan does not update rendering like it should.
2175 * khtml/html/html_tableimpl.cpp:
2176 (HTMLTableCellElementImpl::parseHTMLAttribute):
2177 * khtml/rendering/render_table.cpp:
2178 (RenderTableCell::RenderTableCell):
2179 (RenderTableCell::updateFromElement):
2181 2004-12-14 Chris Blumenberg <cblu@apple.com>
2183 Fixed: <rdar://problem/3864536> crash copying text from other apps and pasting in a sticky in dashboard
2187 * khtml/editing/markup.cpp:
2188 (khtml::createFragmentFromText): ref and deref the fragment since calling appendChild can completely deref it
2190 2004-12-14 David Hyatt <hyatt@apple.com>
2192 Fix for 3785211. Make sure to do a layout with the old position before doing a layout after changing to the new position.
2193 This is actually a regression from my positioned object DHTML optimization.
2195 Reviewed by kocienda
2197 * khtml/rendering/render_object.cpp:
2198 (RenderObject::setStyle):
2200 2004-12-14 David Hyatt <hyatt@apple.com>
2202 Make sure the class attribute works when newlines are present in the attribute.
2204 Reviewed by kocienda
2206 * khtml/html/html_elementimpl.cpp:
2207 (HTMLNamedAttrMapImpl::parseClassAttribute):
2209 2004-12-14 David Hyatt <hyatt@apple.com>
2211 Fix for 3724938, float element is duplicated and paints twice. The logic for when to paint floats was
2212 actually fairly screwed up. This patch simplifies the logic and makes addOverhangingFloats easier to
2213 read by splitting it into two separate functions.
2215 Reviewed by kocienda
2217 * khtml/rendering/render_block.cpp:
2218 (khtml::RenderBlock::layoutBlockChildren):
2219 (khtml::RenderBlock::clearFloats):
2220 (khtml::RenderBlock::addOverhangingFloats):
2221 (khtml::RenderBlock::addIntrudingFloats):
2222 * khtml/rendering/render_block.h:
2224 2004-12-14 John Sullivan <sullivan@apple.com>
2228 - added Undo action names for Cut, Paste, and Drag
2230 * khtml/editing/htmlediting.h:
2231 * khtml/editing/htmlediting.cpp:
2232 (khtml::DeleteSelectionCommand::editingAction):
2233 overridden to return HTMLEditActionCut
2234 (khtml::MoveSelectionCommand::editingAction):
2235 overridden to return HTMLEditActionDrag
2236 (khtml::ReplaceSelectionCommand::editingAction):
2237 overridden to return HTMLEditActionPaste
2239 2004-12-14 John Sullivan <sullivan@apple.com>
2243 - architecture for WebCore part of fix for <rdar://problem/3790011> undoable operations all say "Undo" in the menu,
2244 no specific action names
2246 The remaining step is to make each EditCommand subclass override editingAction() to return an
2247 appropriate value. (Unfortunately the mapping between subclass and user-distinguishable action
2248 is not completely straightforward, so this next step isn't trivial.)
2250 * khtml/editing/htmlediting.h:
2251 new enum for HTMLEditAction
2253 * khtml/editing/htmlediting.cpp:
2254 (khtml::EditCommandPtr::editingAction):
2255 new method, calls through to EditCommand
2256 (khtml::EditCommand::editingAction):
2257 new method for subclasses to override, returns HTMLEditActionUnspecified at this level
2258 (khtml::TypingCommand::editingAction):
2259 proof of concept override, returns HTMLEditActionTyping
2261 * kwq/KWQKHTMLPart.h:
2262 declare new private bottleneck method registerCommandForUndoOrRedo
2263 * kwq/KWQKHTMLPart.mm:
2264 (KWQKHTMLPart::registerCommandForUndoOrRedo):
2265 new bottleneck method to reduce code duplication; now calls over the bridge
2266 to get the localized string to use for the Undo action name
2267 (KWQKHTMLPart::registerCommandForUndo):
2268 now calls new bottleneck method
2269 (KWQKHTMLPart::registerCommandForRedo):
2270 now calls new bottleneck method
2272 * kwq/WebCoreBridge.h:
2273 new enum for WebUndoAction, maps directly to HTMLEditAction.
2274 Declaration of nameForUndoAction:
2276 2004-12-14 Darin Adler <darin@apple.com>
2280 - added a bunch of missing nil checks; our old version of inherits used to work for nil (by accident)
2282 * khtml/rendering/render_frames.cpp:
2283 (RenderPart::~RenderPart): Check widget for nil.
2284 (RenderPart::setWidget): Ditto.
2285 (RenderFrame::slotViewCleared): Ditto.
2286 (RenderPartObject::slotViewCleared): Ditto.
2288 2004-12-13 Darin Adler <darin@apple.com>
2292 - moved markup-related functions into new sources files in the editing directory
2293 - removed all of the uses of dynamic_cast, preparing to turn off RTTI to make our code smaller and slightly faster
2295 * ForwardingHeaders/editing/markup.h: Added.
2296 * khtml/editing/markup.h: Added.
2297 * khtml/editing/markup.cpp: Added.
2299 * WebCore.pbproj/project.pbxproj: Added markup.h/cpp.
2301 * khtml/dom/dom_node.cpp: (Node::toHTML): Call createMarkup since there's no toHTML in NodeImpl any more.
2302 * khtml/html/html_elementimpl.cpp:
2303 (HTMLElementImpl::innerHTML): Changed to call createMarkup.
2304 (HTMLElementImpl::outerHTML): Ditto.
2306 * khtml/ecma/kjs_window.cpp:
2307 (Window::retrieveWindow): Comment out assert that uses dynamic_cast.
2308 (Window::retrieveActive): Ditto.
2310 * khtml/editing/htmlediting.h: Added forward class declaration needed now that I removed one elsewhere.
2311 * khtml/xml/dom_docimpl.h: Ditto.
2313 * khtml/khtml_part.cpp:
2314 (KHTMLPart::slotDebugDOMTree): Use createMarkup instead of toHTML.
2315 (KHTMLPart::processObjectRequest): Use inherits instead of dynamic_cast.
2317 * khtml/rendering/render_image.cpp: (RenderImage::paint): Add an explicit QChar conversion so this code
2318 still works even with the additional replace overloads added to QString.
2319 * kwq/KWQTextCodec.mm: (QTextCodec::fromUnicode): Ditto.
2321 * khtml/rendering/render_object.h: Removed the version of arenaDelete that does not take an object
2322 base pointer, because it used dynamic_cast in its implementation. Made the other version public.
2323 * khtml/rendering/render_object.cpp: Ditto.
2324 * khtml/rendering/render_replaced.cpp: (RenderWidget::deref): Pass object base pointer to arenaDelete.
2326 * khtml/xml/dom2_rangeimpl.h: Removed extra parameters from toHTML, and unneeded includes and declarations.
2327 * khtml/xml/dom2_rangeimpl.cpp: (DOM::RangeImpl::toHTML): Changed to call createMarkup, and moved all
2328 the support code into markup.cpp.
2330 * khtml/xml/dom_nodeimpl.h: Moved toHTML and related functions into markup.cpp.
2331 * khtml/xml/dom_nodeimpl.cpp: Ditto.
2333 * khtml/xml/dom_position.cpp:
2334 (DOM::startPosition): Implemented the version of this that takes a RangeImpl. Also added null checks
2335 so these return null positions rather than raising exceptions.
2336 (DOM::endPosition): Ditto.
2338 * khtml/khtmlview.h: Added an APPLE_CHANGES function so inherits can detect this class without dynamic_cast.
2339 * kwq/KWQFrame.h: Ditto.
2340 * kwq/KWQFrame.mm: (QFrame::isQFrame): Ditto.
2341 * kwq/KWQKPartsPart.h: Ditto.
2342 * kwq/KWQKPartsPart.mm: (KParts::ReadOnlyPart::isKPartsReadOnlyPart): Ditto.
2343 * kwq/KWQScrollView.h: Ditto.
2344 * kwq/KWQScrollView.mm: (QScrollView::isQScrollView): Ditto.
2345 * kwq/KWQKHTMLPart.h: Ditto.
2346 * kwq/KWQKHTMLPart.mm:
2347 (KHTMLView::isKHTMLView): Ditto.
2348 (KWQKHTMLPart::setTitle): Added an explicit QChar conversion so this code still works even with the additional
2349 replace overloads added to QString.
2350 (KWQKHTMLPart::setStatusBarText): Ditto.
2351 (KWQKHTMLPart::runJavaScriptAlert): Ditto.
2352 (KWQKHTMLPart::runJavaScriptConfirm): Ditto.
2353 (KWQKHTMLPart::runJavaScriptPrompt): Ditto.
2354 (KWQKHTMLPart::attributedString): Ditto.
2355 (KWQKHTMLPart::isCharacterSmartReplaceExempt): Ditto.
2356 (KWQKHTMLPart::isKHTMLPart): That dynamic_cast thing (see above).
2358 * kwq/KWQObject.h: Added virtual methods for the few cases where we need dynamic_cast-like behavior.
2360 (QObject::inherits): Changed to not use dynamic cast.
2361 (QObject::isKHTMLPart): Added. Returns false.
2362 (QObject::isKHTMLView): Ditto.
2363 (QObject::isKPartsReadOnlyPart): Ditto.
2364 (QObject::isQFrame): Ditto.
2365 (QObject::isQScrollView): Ditto.
2367 * kwq/KWQRenderTreeDebug.cpp:
2368 (write): Changed to use inherits rather than dynamic_cast.
2369 (writeSelection): Ditto.
2371 * kwq/KWQSlot.mm: (KWQSlot::call): Call through to the version with just a job pointer parameter rather
2372 than going straight on to the "no parameters at all" version.
2375 * kwq/KWQString.mm: (QString::replace): Added overloads.
2376 * kwq/WebCoreBridge.mm:
2377 (-[WebCoreBridge markupStringFromNode:nodes:]): Changed to call functions in markup.h.
2378 (-[WebCoreBridge markupStringFromRange:nodes:]): Ditto.
2379 (-[WebCoreBridge selectedString]): Added an explicit QChar conversion so this code still works even with
2380 the additional replace overloads added to QString.
2381 (-[WebCoreBridge stringForRange:]): Ditto.
2382 (-[WebCoreBridge copyDOMNode:copier:]): Changed to call functions in markup.h.
2383 (-[WebCoreBridge elementAtPoint:]): QChar conversion.
2384 (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): Changed to call functions in markup.h.
2385 (-[WebCoreBridge documentFragmentWithText:]): Changed to call functions in markup.h.
2387 2004-12-13 Ken Kocienda <kocienda@apple.com>
2393 <rdar://problem/3917956> REGRESSION (Mail): pasting can leave insertion point inside pasted text
2395 * khtml/editing/htmlediting.cpp:
2396 (khtml::ReplaceSelectionCommand::doApply): Fix coding mistake. Calculations of bool flag based on
2397 leading and trailing whitespace positions was reversed! I must have introduced this error recently
2398 when changing around this code.
2400 2004-12-13 David Hyatt <hyatt@apple.com>
2402 Fix for 3915787, macobserver doesn't paint. floatRect() needed to be const in the base class. Also hit-testing
2403 and painting was using the wrong rect when setting up the x/y of the rect.
2407 * khtml/rendering/render_block.cpp:
2408 (khtml::RenderBlock::paint):
2409 (khtml::RenderBlock::nodeAtPoint):
2410 * khtml/rendering/render_object.h:
2411 (khtml::RenderObject::floatRect):
2413 2004-12-13 Ken Kocienda <kocienda@apple.com>
2419 <rdar://problem/3917863> REGRESSION (Mail): pasting two lines of plain text copied from an RTF document results in two styles
2421 Code to figuire out the end node to merge was missing the font tag in the second paragraph
2422 written out by AppKit convert-to-HTML function. I refined the algorithm to be smarter.
2424 * khtml/editing/htmlediting.cpp:
2425 (khtml::ReplacementFragment::mergeEndNode): Refine algorithm used to walk through the fragment being pasted
2426 looking for the node that is the last inline in the last block of the fragment. The old algorithm was
2427 insufficiently powerful.
2428 (khtml::ReplacementFragment::enclosingBlock): New helper function.
2429 * khtml/editing/htmlediting.h: Add declaration for new helper function.
2430 * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Added.
2431 * layout-tests/editing/pasteboard/paste-text-011.html: Added.
2433 2004-12-13 Ken Kocienda <kocienda@apple.com>
2437 WebCore side of fix for this bug:
2439 <rdar://problem/3768372> REGRESSION (Mail): paste of text ending in whitespace loses whitespace
2441 Note that we are coordinating with Doug Davidson on the AppKit team to make a complete fix for this
2442 bug. This change involves our half of the needed changes.
2444 Note that a lot of this change has to do with changing code to use a <br> element instead of
2445 a comment node as the mechanism to annotate HTML with information used to fix the bug. In some
2446 other places, code to handle comments in markup can be removed since we do not use comments for
2447 such annotations after this change.
2449 * khtml/editing/htmlediting.cpp: Remove isComment() helper; no longer needed.
2450 (khtml::ReplacementFragment::ReplacementFragment): Change m_hasInterchangeNewlineComment name to m_hasInterchangeNewline.
2451 (khtml::ReplacementFragment::isInterchangeNewlineNode): Name changed from isInterchangeNewlineComment.
2452 (khtml::ReplacementFragment::isInterchangeConvertedSpaceSpan): Local variable name convertedSpaceSpanClass changed to
2453 convertedSpaceSpanClassString to match other uses of the idiom used here.
2454 (khtml::ReplaceSelectionCommand::doApply): Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
2455 * khtml/editing/htmlediting.h: Change names as noted in .cpp file. Remove isComment() helper; no longer needed.
2456 (khtml::ReplacementFragment::hasInterchangeNewline): Change hasInterchangeNewlineComment() name to hasInterchangeNewline().
2457 * khtml/html/html_elementimpl.cpp:
2458 (HTMLElementImpl::createContextualFragment): No longer has includeCommentsInDOM flag; no longer needed as we do not
2459 annotate fragments with comments any longer.
2460 * khtml/html/html_elementimpl.h: Ditto.
2461 * khtml/xml/dom2_rangeimpl.cpp: Remove addCommentToHTMLMarkup() helper. No longer needed.
2462 (DOM::interchangeNewlineMarkupString): New helper to return <br> element markup we use to annotate content for interchange.
2463 (DOM::RangeImpl::toHTML): No longer uses addCommentToHTMLMarkup; now calls interchangeNewlineMarkupString(). Remove
2464 spurious semi-colon.
2465 * khtml/xml/dom2_rangeimpl.h: Remove obsolete addCommentToHTMLMarkup() function and EAddToMarkup enum.
2466 * kwq/WebCoreBridge.mm:
2467 (-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]): No longer pass bool to ask for including comments
2468 in DOM when calling createContextualFragment().
2470 2004-12-10 John Sullivan <sullivan@apple.com>
2472 fixed deployment build bustage that John Louch ran into
2474 * kwq/KWQTextEdit.mm:
2475 (QTextEdit::setScrollBarModes):
2476 move bool declaration inside exception-handling block to avoid obscure
2479 2004-12-10 Maciej Stachowiak <mjs@apple.com>
2481 Reviewed by Richard.
2483 <rdar://problem/3907484> REGRESSION (125-173): crash when KWQTextField is dealloc'ed while setting focus (profoundlearning.com)
2486 (QWidget::setFocus): Handle the case where setting focus removed
2487 us from the superview - this can happen due to style changes on
2490 2004-12-10 Ken Kocienda <kocienda@apple.com>
2496 <rdar://problem/3915008> REGRESSION (Mail): Too much white space between lines separated by carriage returns
2498 There are a number of interesting things we could do to fix this bug, including SPI and involving
2499 the WebKit delegate, etc., however it seems reasonable to start with a hard-coded default that
2500 will fix the bug in the general case until such time as we can come up with more specific
2503 So, I added a helper method to create <p> elements with an inline style that sets top and bottom margins
2506 * khtml/editing/htmlediting.cpp:
2507 (khtml::InsertParagraphSeparatorCommand::createParagraphElement): New factory method to create
2508 paragraph elements to insert. Also adds style information to keep the <p> from having "too-big" margins.
2509 (khtml::InsertParagraphSeparatorCommand::doApply): Call new factory method.
2510 * khtml/editing/htmlediting.h: Add createParagraphElement() declaration.
2512 2004-12-10 Darin Adler <darin@apple.com>
2516 - fixed <rdar://problem/3910419> setting style={overflow:hidden} for <textarea> does not prevent appearance of scrollbars
2518 * khtml/rendering/render_form.h: Remove now-unneeded wrap parameter.
2519 * khtml/rendering/render_form.cpp:
2520 (RenderSubmitButton::rawText): Convert to QChar explicitly.
2521 (RenderLineEdit::updateFromElement): Ditto.
2522 (RenderLineEdit::slotTextChanged): Ditto.
2523 (RenderSelect::updateFromElement): Ditto.
2524 (TextAreaWidget::TextAreaWidget): Moved out most of the initialization since it's not something
2525 that requires a derived class. Now we don't use this class at all for WebCore, but they still
2527 (TextAreaWidget::event): Moved out the ifdefs.
2528 (RenderTextArea::RenderTextArea): Moved setting code from TextAreaWidget here. Put a bunch that
2529 we don't need at all inside !APPLE_CHANGES, and removed the setting for scroll bars, since that's
2530 now done in setStyle.
2531 (RenderTextArea::handleFocusOut): Use type QTextEdit instead of TextAreaWidget since that's all
2532 that's needed and WebCore no longer has TextAreaWidget.
2533 (RenderTextArea::calcMinMaxWidth): Ditto.
2534 (RenderTextArea::setStyle): Add code to set scroll bar modes based on wrap setting combined with
2536 (RenderTextArea::updateFromElement): Use type QTextEdit.
2537 (RenderTextArea::text): Ditto.
2538 (RenderTextArea::select): Ditto.
2540 * kwq/KWQTextArea.mm:
2541 (-[KWQTextArea _configureTextViewForWordWrapMode]): Don't set horizontal scroller visibility here,
2542 since it's now handled by QTextEdit.
2543 (-[KWQTextArea initWithFrame:]): Don't set vertical scroller visibility or scroller auto-hiding.
2545 * kwq/KWQTextEdit.h: Add setScrollBarModes function to be used instead of separate setter for
2546 the horizontal and vertical mode; needed because AppKit switches "autohide" for both at once.
2547 * kwq/KWQTextEdit.mm: (QTextEdit::setScrollBarModes): Added.
2549 2004-12-10 Ken Kocienda <kocienda@apple.com>
2555 <rdar://problem/3915047> HItting return in empty document inserts <p> but
2556 insertion point does not move
2558 * khtml/editing/htmlediting.cpp:
2559 (khtml::InsertParagraphSeparatorCommand::doApply): The issue is that the
2560 code to insert the <p> element for the return is not detecting the fact
2561 that the document is empty. Inserting a <p> into an empty body will not
2562 "add a new line" as the user expects. With this change, we'll add a second
2563 <p> when the root editable element has no rendered kids.
2565 2004-12-10 Maciej Stachowiak <mjs@apple.com>
2569 <rdar://problem/3912979> REGRESSION (125-173): repro crash in HTMLCollectionImpl code (www.clubtravel.ie)
2571 * khtml/html/html_miscimpl.cpp:
2572 (HTMLCollectionImpl::traverseNextItem): Pass base when traversing
2573 the initial one step, otherwise we might inadvertantly step
2574 outside the collection base, thereby causing assertion failures or
2575 other badness later.
2577 2004-12-10 Ken Kocienda <kocienda@apple.com>
2581 * khtml/editing/htmlediting.cpp:
2582 (khtml::InsertParagraphSeparatorCommand::doApply): There is a starting block which is supposed to
2583 act as the root node for this operation. However, a loop was incorrectly coded, and a parent node
2584 search could escape this node. Also, one other piece to code to move nodes to the new <p> element
2585 should do nothing if the starting point for the selection is itself the starting block.
2586 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Similar changes, in spirit, to the above
2587 function, though the names and concepts are slightly different.
2589 2004-12-10 Maciej Stachowiak <mjs@apple.com>
2593 <rdar://problem/3907705> REGRESSION (172-173): DHTML menus are broken at hrweb.apple.com
2595 * khtml/dom/html_document.cpp:
2596 (HTMLDocument::nameableItems): New method, wrapper for HTMLCollection creation.
2597 * khtml/dom/html_document.h:
2598 * khtml/ecma/kjs_html.cpp:
2599 (KJS::HTMLDocument::tryGet): use doc.nameableItems(), not doc.all()!
2600 * khtml/html/html_miscimpl.cpp:
2601 (HTMLCollectionImpl::traverseNextItem): Added new DOC_NAMEABLE_ITEMS type, this represents
2602 the items that can be accessed directly as a document propery, in particular forms, images,
2603 objects, applets and embeds.
2604 (HTMLCollectionImpl::updateNameCache): Fix some nameCache/idCache confusion.
2605 (HTMLFormCollectionImpl::updateNameCache): Ditto.
2606 * khtml/html/html_miscimpl.h:
2607 (DOM::HTMLCollectionImpl::): Added new type.
2609 2004-12-10 Ken Kocienda <kocienda@apple.com>
2615 <rdar://problem/3914779> REGRESSION (Mail): Cannot arrow navigate to position before last character on text-wrapped line
2617 * khtml/rendering/render_text.cpp:
2618 (RenderText::caretRect): Code was not detecting space at the end of a line correctly. Now it does.
2620 2004-12-10 Ken Kocienda <kocienda@apple.com>
2626 <rdar://problem/3914755> REGRESSION (Mail): Insertion point disappears after pasting paragraph
2628 * khtml/editing/htmlediting.cpp:
2629 (khtml::ReplaceSelectionCommand::doApply): Selection could end up in a "placeholder" node
2630 that was removed from the document when pasting. This caused the disappearance. Now this
2631 is detected, and the selection is shifted to a node that is in the document.
2633 2004-12-09 Richard Williamson <rjw@apple.com>
2635 Check to disable threaded decoding during
2636 layout tests wasn't invoking function, just checking address of
2637 function, which would always return true.
2639 * kwq/WebCoreImageRendererFactory.m:
2640 (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
2642 2004-12-09 David Hyatt <hyatt@apple.com>
2644 Fix for 3892686, left/top overflow was not being propagated properly up to containing blocks because of a math
2647 Also fix a bug I noticed on the same page where relative position offsets were not being added in properly for
2648 all inlines when repainting.
2652 * khtml/rendering/render_block.cpp:
2653 (khtml::RenderBlock::layoutBlockChildren):
2654 * khtml/rendering/render_flow.cpp:
2655 (RenderFlow::getAbsoluteRepaintRect):
2657 2004-12-09 David Hyatt <hyatt@apple.com>
2659 Fix for 3867545, finance.yahoo.com lays out incorrectly. Add a quirk that will prevent tables from moving
2660 down below floats when there is insufficient space. Instead we will match Gecko and just spill out of the
2661 containing block to the right. This appears to be the more common desired behavior, despite being wrong.
2662 WinIE sometimes wraps and sometimes doesn't, but it's really hard for us to match its inconsistency.
2666 * khtml/rendering/render_block.cpp:
2667 (khtml::RenderBlock::getClearDelta):
2668 * layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
2669 * layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
2670 * layout-tests/apple-only/base/www.excite.com/index-expected.txt:
2671 * layout-tests/fast/block/margin-collapse/102-expected.txt:
2672 * layout-tests/fast/block/margin-collapse/102.html:
2674 2004-12-09 Richard Williamson <rjw@apple.com>
2676 Fixed <rdar://problem/3914078> worldclock crashing gc related
2678 Use ProtectedValue for Context2D instance members.
2682 * khtml/ecma/kjs_html.h:
2684 2004-12-09 John Sullivan <sullivan@apple.com>
2688 - fixed <rdar://problem/3731099> Move AXTitle string for image elements to AXDescription
2690 * kwq/KWQAccObject.mm:
2691 (-[KWQAccObject title]): moved image alt tag code out of here
2692 (-[KWQAccObject accessibilityDescription]): moved image alt tag code into this new method
2693 (-[KWQAccObject accessibilityAttributeNames]): include AXDescription in the set of attributes
2694 that ordinary elements return; this means that ordinary elements that aren't images will return
2695 a nil description, which isn't ideal, but is in keeping with the way the rest of these attributes
2697 (-[KWQAccObject accessibilityAttributeValue:]):
2698 call accessibilityDescription when asked for AXDescription
2700 2004-12-09 Ken Kocienda <kocienda@apple.com>
2702 Reviewed by Harrison
2706 <rdar://problem/3910425> REGRESSION (Mail): Crash in ReplaceSelectionCommand; selection is empty, leading to null deref
2708 * khtml/editing/htmlediting.cpp:
2709 (khtml::MoveSelectionCommand::doApply): The node representing the destination for the move may have
2710 been deleted. If this is the case, set the destination to the node the delete command provides in
2711 its ending selection.
2715 2004-12-09 Ken Kocienda <kocienda@apple.com>
2721 <rdar://problem/3912841> REGRESSION (173-TOT): Some images report 0x0 dimensions on layout tests, causes spurious test failures
2723 The new threaded image decoding capability can throw off layout tests. The issue is that the decoding
2724 callback may not be delivered before the program asks for the dimensions of an image in order to
2725 wrote the layout dimensions. More generally, I think we need to ensure that there are no races in
2726 layout tests, so I have added a flag to the render tree debug code that we can set when debugging.
2728 * kwq/KWQRenderTreeDebug.cpp:
2729 (debuggingRenderTree): New function. Returns flag which tells whether the program is debugging the render tree.
2730 (externalRepresentation): Sets debuggingRenderTree flag to true;
2731 * kwq/KWQRenderTreeDebug.h:
2732 * kwq/WebCoreImageRendererFactory.m:
2733 (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]): Checks debuggingRenderTree flag and will not
2734 do threaded decoding in any case if the flag is set.
2736 2004-12-09 Chris Blumenberg <cblu@apple.com>
2738 Fix for busting XMLHTTPRequest.
2740 Reviewed by kocienda.
2742 * khtml/misc/loader.cpp:
2743 (Loader::servePendingRequests): pass true for deliverAllData
2745 (KIO::get): take deliverAllData param
2746 (KIO::http_post): ditto
2747 * kwq/KWQKJobClasses.h:
2748 * kwq/KWQKJobClasses.mm:
2749 (KIO::TransferJob::TransferJob): if deliverAllData, create signal with data param
2750 (KIO::TransferJob::emitResult): if deliverAllData, call signal with data param
2752 2004-12-09 Ken Kocienda <kocienda@apple.com>
2756 <rdar://problem/3911011> REGRESSION (Mail): Spaces at end of line causing word wrap lost when copied/pasted
2758 * khtml/xml/dom_nodeimpl.cpp:
2759 (NodeImpl::renderedText): Fixed the code so that spaces at the end of lines are not skipped.
2761 2004-12-07 Richard Williamson <rjw@apple.com>
2763 Support threaded image decoding on machines w/ > 2 CPUs.
2765 Reviewed by Maciej and Chris.
2767 * khtml/misc/loader.cpp:
2768 (CachedImageCallback::notifyUpdate):
2769 (CachedImageCallback::notifyFinished):
2770 (CachedImageCallback::notifyDecodingError):
2771 (CachedImageCallback::handleError):
2772 (CachedImageCallback::clear):
2773 (CachedImage::CachedImage):
2774 (CachedImage::clear):
2775 (CachedImage::data):
2776 (CachedImage::checkNotify):
2777 (Loader::servePendingRequests):
2778 (Loader::slotFinished):
2779 (Loader::numRequests):
2780 (Loader::cancelRequests):
2781 (Loader::removeBackgroundDecodingRequest):
2782 * khtml/misc/loader.h:
2783 (khtml::CachedImageCallback::CachedImageCallback):
2784 (khtml::CachedImageCallback::ref):
2785 (khtml::CachedImageCallback::deref):
2786 (khtml::CachedImage::decoderCallback):
2787 * khtml/rendering/render_object.cpp:
2788 (RenderObject::setPixmap):
2791 (-[WebImageCallback initWithCallback:khtml::]):
2792 (-[WebImageCallback _commonTermination]):
2793 (-[WebImageCallback dealloc]):
2794 (-[WebImageCallback finalize]):
2795 (-[WebImageCallback notify]):
2796 (-[WebImageCallback setImageSourceStatus:]):
2797 (-[WebImageCallback status]):
2798 (QPixmap::shouldUseThreadedDecoding):
2799 (QPixmap::receivedData):
2800 * kwq/WebCoreImageRenderer.h:
2801 * kwq/WebCoreImageRendererFactory.h:
2802 * kwq/WebCoreImageRendererFactory.m:
2803 (+[WebCoreImageRendererFactory shouldUseThreadedDecoding]):
2804 (+[WebCoreImageRendererFactory setShouldUseThreadedDecoding:]):
2806 2004-12-07 Ken Kocienda <kocienda@apple.com>
2810 * khtml/editing/htmlediting.cpp:
2811 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Fix a problem with my
2812 change in thei code yesterday. Call to insertBlockPlaceholderIfNeeded() must be done
2813 after new block has been inserted, otherwise a crash can result. Shuffle down call
2814 to insertBlockPlaceholderIfNeeded() a couple of lines (where the node is inserted),
2817 2004-12-07 Ken Kocienda <kocienda@apple.com>
2823 <rdar://problem/3907422> REGRESSION (Mail): Pasting quoted content can place content after body element
2825 * khtml/editing/htmlediting.cpp:
2826 (khtml::ReplaceSelectionCommand::doApply): Detect when the body element is the "reference block" used
2827 for determining the location for inserting content. Do not allow an insert before or after if the
2828 reference block is the body. Perform insertNodeAt(0) and appendNode, respectively, in the block-is-body case.
2829 * layout-tests/editing/inserting/insert-3907422-fix-expected.txt: Added.
2830 * layout-tests/editing/inserting/insert-3907422-fix.html: Added.
2832 2004-12-07 Darin Adler <darin@apple.com>
2836 - fixed <rdar://problem/3908701> REGRESSION: Cursor does not change to "hand" over active links
2838 * kwq/KWQEvent.mm: (positionForEvent): Add NSMouseMoved to list of events that have mouse location.
2840 2004-12-07 Ken Kocienda <kocienda@apple.com>
2844 Changed name of constant from KHTMLInterchangeNewline to AppleInterchangeNewline.
2845 I discussed this with Hyatt and he agreed that going with "Apple" names was OK.
2847 * khtml/editing/html_interchange.h: Name change, as described above.
2848 * khtml/editing/htmlediting.cpp:
2849 (khtml::ReplacementFragment::isInterchangeNewlineComment): Ditto.
2850 * khtml/xml/dom2_rangeimpl.cpp:
2851 (DOM::RangeImpl::toHTML): Ditto.
2853 2004-12-07 Ken Kocienda <kocienda@apple.com>
2857 Added a couple more layout tests.
2859 * layout-tests/editing/deleting/delete-line-013-expected.txt: Added.
2860 * layout-tests/editing/deleting/delete-line-013.html: Added.
2861 * layout-tests/editing/deleting/delete-line-014-expected.txt: Added.
2862 * layout-tests/editing/deleting/delete-line-014.html: Added.
2864 2004-12-06 Maciej Stachowiak <mjs@apple.com>
2868 - fixed <rdar://problem/3906974> assertion failure in QWidget::beforeMouseDown clicking on <select multiple>
2870 * kwq/KWQListBox.mm:
2871 (QListBox::QListBox): Initialize KWQListBoxScrollView with this.
2872 (-[KWQListBoxScrollView initWithListBox:]): Make this class a KWQWidgetHolder.
2873 (-[KWQListBoxScrollView widget]): See above.
2874 (-[KWQTableView mouseDown:]): Pass outerView rather than self to beforeMouseDown and
2875 afterMouseDown, to avoid triggering an assertion failure.
2877 2004-12-06 David Hyatt <hyatt@apple.com>
2879 Fix for 3615411, the linesAppended optimization was old and broken, and it's easier with the new code fixes
2880 made by me, kocienda and harrison to just remove it.
2884 * khtml/rendering/bidi.cpp:
2885 (khtml::RenderBlock::layoutInlineChildren):
2886 * khtml/rendering/render_block.cpp:
2887 (khtml:::RenderFlow):
2888 * khtml/rendering/render_block.h:
2889 * khtml/rendering/render_flow.cpp:
2890 (RenderFlow::dirtyLinesFromChangedChild):
2892 2004-12-06 David Hyatt <hyatt@apple.com>
2894 Fix for 3787133, some web pages print with many blank pages. Make sure to use the real page print rect and
2895 not a damage rect that can be changed when intersected with the clip regions of the web page.
2899 * khtml/rendering/render_canvas.h:
2900 (khtml::RenderCanvas::printRect):
2901 (khtml::RenderCanvas::setPrintRect):
2902 * khtml/rendering/render_flow.cpp:
2903 (RenderFlow::paintLines):
2904 * khtml/rendering/render_list.cpp:
2905 (RenderListMarker::paint):
2906 * kwq/KWQKHTMLPart.mm:
2907 (KWQKHTMLPart::adjustPageHeight):
2909 2004-12-06 David Harrison <harrison@apple.com>
2911 Reviewed by Ken Kocienda and Dave Hyatt (OOPS!).
2913 <rdar://problem/3849947> Typing after pasting line does not appear until after window resize.
2916 * khtml/rendering/render_flow.cpp:
2917 (RenderFlow::dirtyLinesFromChangedChild):
2918 Dirty the line above because new child can inval the cached line break position of previous line.
2920 2004-12-06 David Hyatt <hyatt@apple.com>
2922 Fix for 3254464, radio buttons do not work for quiz on netscape.com. Left/top overflow needed to be implemented.
2923 This also fixes 3106907, link hover color only partially set on rollover and the more general architecture bug
2924 3126929, handle top/left overflow.
2926 This patch also fixes 3902891, scroll bar of position:fixed content moves when a page is scrolled.
2928 Finally, the Emerson regression 3869718 (error involving computing the rightmost/lowest position of overflow:auto
2929 regions and web pages) has been fixed.
2933 * khtml/rendering/bidi.cpp:
2934 (khtml::RenderBlock::computeHorizontalPositionsForLine):
2935 (khtml::RenderBlock::checkLinesForOverflow):
2936 * khtml/rendering/render_block.cpp:
2937 (khtml:::RenderFlow):
2938 (khtml::RenderBlock::overflowHeight):
2939 (khtml::RenderBlock::overflowWidth):
2940 (khtml::RenderBlock::overflowLeft):
2941 (khtml::RenderBlock::overflowTop):
2942 (khtml::RenderBlock::overflowRect):
2943 (khtml::RenderBlock::layoutBlock):
2944 (khtml::RenderBlock::layoutBlockChildren):
2945 (khtml::RenderBlock::paint):
2946 (khtml::RenderBlock::floatRect):
2947 (khtml::RenderBlock::lowestPosition):
2948 (khtml::RenderBlock::rightmostPosition):
2949 (khtml::RenderBlock::leftmostPosition):
2950 (khtml::RenderBlock::nodeAtPoint):
2951 * khtml/rendering/render_block.h:
2952 * khtml/rendering/render_box.h:
2953 (khtml::RenderBox::borderBox):
2954 (khtml::RenderBox::borderTopExtra):
2955 (khtml::RenderBox::borderBottomExtra):
2956 * khtml/rendering/render_layer.cpp:
2957 (RenderLayer::paintScrollbars):
2958 (mustExamineRenderer):
2959 (RenderLayer::intersectsDamageRect):
2960 (RenderLayer::containsPoint):
2961 * khtml/rendering/render_line.cpp:
2962 (khtml::InlineFlowBox::placeBoxesHorizontally):
2963 (khtml::InlineFlowBox::verticallyAlignBoxes):
2964 * khtml/rendering/render_line.h:
2965 (khtml::InlineBox::leftOverflow):
2966 (khtml::InlineBox::rightOverflow):
2967 (khtml::InlineFlowBox::setVerticalOverflowPositions):
2968 (khtml::RootInlineBox::RootInlineBox):
2969 (khtml::RootInlineBox::leftOverflow):
2970 (khtml::RootInlineBox::rightOverflow):
2971 (khtml::RootInlineBox::setVerticalOverflowPositions):
2972 (khtml::RootInlineBox::setHorizontalOverflowPositions):
2973 * khtml/rendering/render_object.h:
2974 (khtml::RenderObject::borderBox):
2975 (khtml::RenderObject::overflowLeft):
2976 (khtml::RenderObject::overflowTop):
2977 (khtml::RenderObject::overflowRect):
2978 (khtml::RenderObject::floatRect):
2979 * khtml/rendering/render_table.cpp:
2980 (RenderTable::layout):
2981 (RenderTable::paint):
2982 (RenderTable::paintBoxDecorations):
2983 (RenderTable::calcMinMaxWidth):
2984 * khtml/rendering/render_table.h:
2985 (khtml::RenderTableCell::borderTopExtra):
2986 (khtml::RenderTableCell::borderBottomExtra):
2991 2004-12-06 Maciej Stachowiak <mjs@apple.com>
2995 - fixed <rdar://problem/3903797> scripts can cause other frames/windows to execute arbitrary script using javascript: URLs
2997 I changed all unprotected places that can navigate a different
2998 window or frame from script to check for a javascript: URL, and if
2999 found, to check for safety using cross-site-script rules.
3001 I considered a few other possible exploits and made no change:
3003 - document.location is already protected because the document
3004 object itself is protected
3006 - frame.src, frame.location, iframe.src and targetted links are
3007 all safe because setting the URL of a frame to a javascript: URL
3008 executes the script in the context of the parent
3010 * khtml/ecma/kjs_window.cpp:
3011 (WindowFunc::tryCall):
3013 (LocationFunc::tryCall):
3015 2004-12-06 Ken Kocienda <kocienda@apple.com>
3021 <rdar://problem/3890955> 8A314: Forward delete sometimes fails to delete the selected quoted text
3023 * khtml/editing/htmlediting.cpp:
3024 (khtml::DeleteSelectionCommand::handleSpecialCaseBRDelete): Fixed bonehead coding mistake in the
3025 check for one of the special cases being checked for in this function. The specific case
3026 intends to check for a selection that is only a <br> after a block ends (as in </div><br>). If it
3027 sees such markup, it deletes only the <br> and bails. However, this code would run in *any*
3028 case where a selection ended in a <br> after a block and would not delete any part of the
3029 selection preceding the <br>. Bad. I have tightened the check to see that only a <br> is
3032 Fixing the bug above was accomplished with an additional call to DOM::Position::downstream. This
3033 new use of the function exposed this bug:
3035 <rdar://problem/3907666> Incorrectly coded loop in Position::downstream can lead to infinite loop
3037 * khtml/xml/dom_position.cpp:
3038 (DOM::Position::downstream): I am ashamed of my first cut at this. Rewrote the loop so it does
3039 not have this fatal flaw. It is a much better design as well.
3041 * layout-tests/editing/deleting/delete-3800834-fix-expected.txt: Changes made this test
3042 have what I consider to be a better result. Going with it.
3044 2004-12-06 Chris Blumenberg <cblu@apple.com>
3046 Fixed: <rdar://problem/3871718> REGRESSION (125-168): text marked bold with font that does not have bold variant copies as non-bold
3051 (-[DOMElement _font]): new SPI for AppKit
3054 2004-12-06 Darin Adler <darin@apple.com>
3058 - fixed <rdar://problem/3906327> Select All of a large document is slow (>15 secs on my machine for attached specimen)
3060 * kwq/KWQScrollView.mm: (QScrollView::updateContents): Intersect with visibleRect before calling through
3061 to NSView to dirty; NSView could also be more efficient in this case (I filed 3906343).
3063 2004-12-06 John Sullivan <sullivan@apple.com>
3065 Darin found what appears to be the real leak that we were falsely blaming
3066 on the 'leaks' tool (3880245). I made the change, and ran layout tests and PLT to make
3067 sure nothing barfed.
3069 * khtml/css/cssparser.cpp:
3070 (CSSParser::parseValue):
3071 call clearProperties() instead of just setting numParsedProperties to 0
3072 (CSSParser::parseDeclaration):
3074 (CSSParser::createStyleDeclaration):
3077 2004-12-06 Ken Kocienda <kocienda@apple.com>
3083 * layout-tests/editing/inserting/insert-div-001-expected.txt: Added.
3084 * layout-tests/editing/inserting/insert-div-001.html: Added.
3085 * layout-tests/editing/inserting/insert-div-002-expected.txt: Added.
3086 * layout-tests/editing/inserting/insert-div-002.html: Added.
3087 * layout-tests/editing/inserting/insert-div-003-expected.txt: Added.
3088 * layout-tests/editing/inserting/insert-div-003.html: Added.
3089 * layout-tests/editing/inserting/insert-div-004-expected.txt: Added.
3090 * layout-tests/editing/inserting/insert-div-004.html: Added.
3091 * layout-tests/editing/inserting/insert-div-005-expected.txt: Added.
3092 * layout-tests/editing/inserting/insert-div-005.html: Added.
3093 * layout-tests/editing/inserting/insert-div-006-expected.txt: Added.
3094 * layout-tests/editing/inserting/insert-div-006.html: Added.
3095 * layout-tests/editing/inserting/insert-div-007-expected.txt: Added.
3096 * layout-tests/editing/inserting/insert-div-007.html: Added.
3097 * layout-tests/editing/inserting/insert-div-008-expected.txt: Added.
3098 * layout-tests/editing/inserting/insert-div-008.html: Added.
3099 * layout-tests/editing/inserting/insert-div-009-expected.txt: Added.
3100 * layout-tests/editing/inserting/insert-div-009.html: Added.
3102 2004-12-06 Ken Kocienda <kocienda@apple.com>
3104 Reviewed by Harrison
3108 <rdar://problem/3906948> REGRESSION (Mail): Insert paragraph code can make the insertion point "stick" in place.
3110 * khtml/editing/htmlediting.cpp:
3111 (khtml::InsertParagraphSeparatorCommand::doApply): Call insertBlockPlaceholderIfNeeded(), passing block
3112 being added to this function. This ensures that the added block has a height.
3113 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
3115 2004-12-06 Ken Kocienda <kocienda@apple.com>
3119 * khtml/dom/dom_string.cpp:
3120 (DOM::DOMString::substring): Expose method already on DOMStrimgImpl.
3121 * khtml/dom/dom_string.h: Ditto.
3122 * khtml/editing/htmlediting.cpp:
3123 (khtml::CompositeEditCommand::rebalanceWhitespace): New helper to create and execute a
3124 RebalanceWhitespaceCommand instance.
3125 (khtml::DeleteSelectionCommand::doApply): Call rebalanceWhitespace() after running command.
3126 (khtml::InsertLineBreakCommand::doApply): Ditto.
3127 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
3128 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Ditto.
3129 (khtml::InsertTextCommand::input): Ditto.
3130 (khtml::RebalanceWhitespaceCommand::RebalanceWhitespaceCommand): New command.
3131 (khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand): Ditto.
3132 (khtml::RebalanceWhitespaceCommand::doApply): Ditto.
3133 (khtml::RebalanceWhitespaceCommand::doUnapply): Ditto.
3134 (khtml::RebalanceWhitespaceCommand::preservesTypingStyle): Ditto.
3135 (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
3136 * khtml/editing/htmlediting.h: Ditto.
3137 (khtml::RebalanceWhitespaceCommand::): Ditto.
3139 2004-12-05 Darin Adler <darin@apple.com>
3141 - fixed small problem in my check-in from yesterday
3144 (positionForEvent): Get location from event without raising exception if it's the wrong type.
3145 (clickCountForEvent): Same, for clickCount.
3146 (QMouseEvent::QMouseEvent): Use the new helper functions so this can be constructed even with
3147 the wrong type of NSEvent. Required for cases where a keyboard event causes a "click" and we need
3148 to synthesize a QMouseEvent for KHTML internal use, using the key down NSEvent.
3150 2004-12-04 Darin Adler <darin@apple.com>
3154 - fixed <rdar://problem/3878329> REGRESSION (169-170): colors are wrong for my.yahoo.com due to CSS background parsing changes
3156 * khtml/css/cssparser.cpp: (CSSParser::parseBackgroundShorthand): Changed function so it doesn't rely on the position
3157 attribute being at the end of the array and then moved position attribute before color attribute so it takes precedence.
3158 Since "0" can be both the X coordinate of a position and a legal color (meaning black), we need to do position first.
3160 - fixed <rdar://problem/3760869> click events for input type=button or type=checkbox don't have flags like shiftKey set
3162 * khtml/rendering/render_form.h: Remove unused RenderFormElement fields.
3163 * khtml/rendering/render_form.cpp:
3164 (RenderFormElement::RenderFormElement): Take out code to set a bunch of unused fields.
3165 (RenderFormElement::slotClicked): Change to create the QMouseEvent from the actual mouse event rather than
3166 creating it with all the flags set to 0, using the new QMouseEvent constructor that does so.
3168 * kwq/KWQEvent.h: Added constructor that takes no parameters which uses the current event from AppKit.
3169 Made the click count getter const and added an isDoubleClick that matches the logic used elsewhere.
3170 Added a fixState helper method so the constructors can save code.
3172 (QMouseEvent::QMouseEvent): Factored out the state-fixing code that was in the two existing constructors
3173 and added a third constructor that uses the "current event" from AppKit (used above).
3174 (QMouseEvent::fixState): Compute state and click count based on event type.
3176 - fixed first symptom of <rdar://problem/3830936> REGRESSION (125-165): crash due to null font family, hang at changeforamerica.com
3178 * kwq/KWQFontFamily.mm: (KWQFontFamily::getNSFamily): Handle empty strings specially so we don't run into trouble when
3179 the family name is a null string. This prevents the crash, but there are still other problems that may have the same
3180 underlying cause in CSS.
3182 - fixed <rdar://problem/3829808> Safari crashes when adding a DOM node that was removed from an XMLHTTP request result
3184 * khtml/html/html_baseimpl.cpp: (HTMLBodyElementImpl::insertedIntoDocument):
3185 Added nil check before calling scheduleRelayout. This is new code so the nil-dereference is a recent regression.
3187 2004-12-03 Chris Blumenberg <cblu@apple.com>
3190 <rdar://problem/3685766> WebDataSource is missing subresources when they use cached WebCore data
3191 <rdar://problem/3722434> REGRESSION?: Assertion failure trying to drag image in iframe (itapema.sc.gov.br)
3192 <rdar://problem/3903173> REGRESSION (172-TOT): assertion failure and crash in slotAllData logging into hotmail account
3193 <rdar://problem/3902749> REGRESSION (Tiger): missing image symbol does not appear
3195 Reviewed by darin, rjw, kocienda.
3197 * khtml/misc/loader.cpp:
3198 (CachedObject::~CachedObject):
3199 (CachedCSSStyleSheet::checkNotify):
3200 (Loader::servePendingRequests):
3201 (Loader::slotFinished):
3202 (Loader::slotReceivedResponse):
3203 (Cache::requestImage):
3204 (Cache::requestScript):
3205 * khtml/misc/loader.h:
3206 (khtml::CachedObject::CachedObject):
3207 (khtml::CachedObject::response):
3208 (khtml::CachedObject::allData):
3209 * kwq/KWQKJobClasses.h:
3210 * kwq/KWQKJobClasses.mm:
3211 (KIO::TransferJobPrivate::TransferJobPrivate):
3212 (KIO::TransferJobPrivate::~TransferJobPrivate):
3213 (KIO::TransferJob::TransferJob):
3214 (KIO::TransferJob::assembleResponseHeaders):
3215 (KIO::TransferJob::retrieveCharset):
3216 (KIO::TransferJob::emitResult):
3217 (KIO::TransferJob::emitReceivedResponse):
3220 (KWQHeaderStringFromDictionary):
3221 (KWQCheckCacheObjectStatus):
3222 (KWQIsResponseURLEqualToURL):
3224 (KWQResponseMIMEType):
3225 (KWQCacheObjectExpiresTime):
3226 (khtml::CachedObject::setResponse):
3227 (khtml::CachedObject::setAllData):
3231 * kwq/KWQResourceLoader.mm:
3232 (-[KWQResourceLoader finishJobAndHandle:]):
3233 (-[KWQResourceLoader cancel]):
3234 (-[KWQResourceLoader reportError]):
3235 (-[KWQResourceLoader finishWithData:]):
3243 * kwq/WebCoreBridge.h:
3244 * kwq/WebCoreResourceLoader.h:
3246 2004-12-04 Darin Adler <darin@apple.com>
3250 - fixed <rdar://problem/3876093> REGRESSION (166-167): Setting slider control's value from JavaScript has no effect (breaks RSS)
3252 * khtml/rendering/render_form.cpp:
3253 (RenderSlider::updateFromElement): Call setValue to update the value of the DOM element rather than
3254 modifying the m_value data member directly. We don't use m_value at all for sliders now, and in fact
3255 the code relies on the fact that m_value is null. Setting m_value to a non-null value was causing the bug.
3256 (RenderSlider::slotSliderValueChanged): Ditto.
3258 2004-12-03 John Sullivan <sullivan@apple.com>
3262 - fixed <rdar://problem/3889411> REGRESSION (125-172): repro crash in
3263 khtml::BackgroundLayer::cullEmptyLayers
3265 * khtml/rendering/render_style.cpp:
3266 (BackgroundLayer::cullEmptyLayers):
3267 added missing nil check
3271 2004-12-03 Ken Kocienda <kocienda@apple.com>
3275 Roll out some recent changes by Chris that caused a performance regression.
3276 Fix is in hand, but it is a little risky this close to a submission. So,
3277 we have decided to roll back the change with the regression and roll in
3278 the new code after we submit.
3280 * khtml/css/cssproperties.c:
3283 * khtml/css/cssvalues.c:
3286 * khtml/misc/htmlattrs.c:
3289 * khtml/misc/htmltags.c:
3292 * khtml/misc/loader.cpp:
3293 (CachedObject::~CachedObject):
3294 (CachedObject::setResponse):
3295 (CachedCSSStyleSheet::checkNotify):
3296 (Loader::servePendingRequests):
3297 (Loader::slotFinished):
3298 (Loader::slotReceivedResponse):
3299 (Cache::requestImage):
3300 (Cache::requestScript):
3301 * khtml/misc/loader.h:
3302 (khtml::CachedObject::CachedObject):
3303 (khtml::CachedObject::response):
3304 * kwq/KWQKJobClasses.h:
3305 * kwq/KWQKJobClasses.mm:
3306 (KIO::TransferJobPrivate::TransferJobPrivate):
3307 (KIO::TransferJobPrivate::~TransferJobPrivate):
3308 (KIO::TransferJob::TransferJob):
3309 (KIO::TransferJob::assembleResponseHeaders):
3310 (KIO::TransferJob::retrieveCharset):
3311 (KIO::TransferJob::emitResult):
3312 (KIO::TransferJob::emitReceivedResponse):
3315 (KWQHeaderStringFromDictionary):
3316 (KWQCheckCacheObjectStatus):
3317 (KWQRetainResponse):
3318 (KWQReleaseResponse):
3319 (KWQIsResponseURLEqualToURL):
3321 (KWQResponseMIMEType):
3322 (KWQResponseTextEncodingName):
3323 (KWQResponseHeaderString):
3324 (KWQCacheObjectExpiresTime):
3325 (KWQLoader::KWQLoader):
3329 * kwq/KWQResourceLoader.mm:
3330 (-[KWQResourceLoader finishJobAndHandle]):
3331 (-[KWQResourceLoader cancel]):
3332 (-[KWQResourceLoader reportError]):
3333 (-[KWQResourceLoader finish]):