1 2006-07-29 Alexey Proskuryakov <ap@nypop.com>
5 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
6 REGRESSION: custom attribute values set via javascript are not persistent
8 Test: fast/dom/Element/setAttribute-case-insensitivity.html
11 (WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
13 2006-07-28 Timothy Hatcher <timothy@apple.com>
17 Moving the implementation of isContentEditable to the
18 the WebPrivate category.
20 * bindings/objc/DOM.mm:
21 (-[DOMNode isContentEditable]):
23 2006-07-28 Justin Garcia <justin.garcia@apple.com>
28 <rdar://problem/4515463>
29 REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
31 Migrate to isBlock and enclosingBlock.
32 Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
33 to wasBlock so that they don't conflict with isBlock and because
34 it's more descriptive.
36 * editing/ReplaceSelectionCommand.cpp:
37 (WebCore::ReplacementFragment::mergeStartNode):
38 (WebCore::ReplacementFragment::wasBlock):
39 (WebCore::ReplacementFragment::saveRenderingInfo):
40 (WebCore::ReplacementFragment::renderedBlocks):
41 (WebCore::RenderingInfo::RenderingInfo):
42 (WebCore::ReplaceSelectionCommand::shouldMergeStart):
43 (WebCore::ReplaceSelectionCommand::doApply):
44 * editing/ReplaceSelectionCommand.h:
45 (WebCore::RenderingInfo::wasBlock):
47 2006-07-27 Justin Garcia <justin.garcia@apple.com>
52 <rdar://problem/4242293>
53 Poor paste fidelity of http://www.google.com/
56 (WebCore::needInterchangeNewlineAfter): Added.
57 (WebCore::createMarkup):
58 Only add an interchangeNewline if we're annotating for interchange. Can't test
59 this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
60 Remove the FIXME about prepending the interchangeNewline before creating the rest
61 of the markup. Its correct to surround the interchangeNewline in ancestors of the
63 Fixed the check to see if an interchangeNewline is needed (!inSameBlock). This would
64 add an interchangeNewline for a selection that started before a table.
65 Removed the workaround for the bug where markup for a table was not included when
66 selecting the contents of a table, since this change fixes the general problem of
67 markup for ancestors of the startNode being left out.
68 Don't leave out ancestors of the startNode as we leave their subtrees. Execute the
69 code to include them even if we closed ancestors in the ancestorsToClose list.
71 2006-07-28 Timothy Hatcher <timothy@apple.com>
75 Adding isContentEditable to DOMNode's private category.
77 * bindings/objc/DOMPrivate.h:
79 2006-07-28 Alexey Proskuryakov <ap@nypop.com>
81 Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
82 Add better SVGLoad event support.
84 * dom/EventTargetNode.cpp:
85 (WebCore::EventTargetNode::dispatchGenericEvent):
86 * html/HTMLImageLoader.cpp:
87 (WebCore::HTMLImageLoader::dispatchLoadEvent):
88 * html/HTMLImageLoader.h:
89 * ksvg2/misc/SVGImageLoader.cpp:
90 (WebCore::SVGImageLoader::SVGImageLoader):
91 * ksvg2/misc/SVGImageLoader.h:
92 * ksvg2/svg/SVGAElement.cpp:
93 (WebCore::SVGAElement::parseMappedAttribute):
94 * ksvg2/svg/SVGAnimatedBoolean.h:
95 * ksvg2/svg/SVGElement.cpp:
96 (WebCore::SVGElement::SVGElement):
97 (WebCore::SVGElement::parseMappedAttribute):
98 * ksvg2/svg/SVGElement.h:
99 (WebCore::SVGElement::adjustViewportClipping):
100 (WebCore::SVGElement::closeRenderer):
101 (WebCore::SVGElement::rendererIsNeeded):
102 (WebCore::SVGElement::isClosed):
103 (WebCore::svg_dynamic_cast):
104 * ksvg2/svg/SVGExternalResourcesRequired.h:
105 * ksvg2/svg/SVGImageElement.cpp:
106 (SVGImageElement::SVGImageElement):
107 * ksvg2/svg/SVGImageElement.h:
108 * ksvg2/svg/SVGSVGElement.cpp:
109 (WebCore::SVGSVGElement::parseMappedAttribute):
110 * ksvg2/svg/SVGScriptElement.cpp:
111 (SVGScriptElement::SVGScriptElement):
112 (SVGScriptElement::parseMappedAttribute):
113 (SVGScriptElement::executeScript):
114 * xml/xmlhttprequest.cpp:
115 (WebCore::XMLHttpRequest::callReadyStateChangeListener):
117 2006-07-28 Adele Peterson <adele@apple.com>
119 Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
120 SVG with width and height 100% leaves room for scrollbar on the right.
122 * kcanvas/RenderPath.cpp:
123 * kcanvas/RenderPath.h:
124 * kcanvas/RenderSVGContainer.cpp:
125 (WebCore::RenderSVGContainer::layout):
126 * ksvg2/svg/SVGCircleElement.cpp:
127 * ksvg2/svg/SVGCircleElement.h:
128 * ksvg2/svg/SVGEllipseElement.cpp:
129 * ksvg2/svg/SVGEllipseElement.h:
130 * ksvg2/svg/SVGLineElement.cpp:
131 * ksvg2/svg/SVGLineElement.h:
132 * ksvg2/svg/SVGRectElement.cpp:
133 * ksvg2/svg/SVGRectElement.h:
134 * ksvg2/svg/SVGStyledElement.h:
136 2006-07-27 Eric Seidel <eric@eseidel.com>
140 Add better SVGLoad event support.
141 http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
142 There will still need to be additional support added for <link> and <script> elements.
143 Not all of the error -> loaded -> error transition cases work yet.
145 * dom/EventTargetNode.cpp:
146 (WebCore::EventTargetNode::dispatchGenericEvent):
147 * html/HTMLImageLoader.cpp:
148 (WebCore::HTMLImageLoader::dispatchLoadEvent):
149 * html/HTMLImageLoader.h:
150 (WebCore::HTMLImageLoader::haveFiredLoadEvent):
151 (WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
152 * ksvg2/misc/SVGImageLoader.cpp:
153 (WebCore::SVGImageLoader::SVGImageLoader):
154 (WebCore::SVGImageLoader::dispatchLoadEvent):
155 * ksvg2/misc/SVGImageLoader.h:
156 * ksvg2/svg/SVGAElement.cpp:
157 (WebCore::SVGAElement::parseMappedAttribute):
158 * ksvg2/svg/SVGAnimatedBoolean.h:
159 * ksvg2/svg/SVGElement.cpp:
160 (WebCore::SVGElement::SVGElement):
161 (WebCore::SVGElement::parseMappedAttribute):
162 (WebCore::SVGElement::haveLoadedRequiredResources):
163 (WebCore::SVGElement::sendSVGLoadEventIfPossible):
164 (WebCore::SVGElement::closeRenderer):
165 * ksvg2/svg/SVGElement.h:
166 (WebCore::SVGElement::rendererIsNeeded):
167 (WebCore::svg_dynamic_cast):
168 * ksvg2/svg/SVGExternalResourcesRequired.h:
169 * ksvg2/svg/SVGImageElement.cpp:
170 (SVGImageElement::SVGImageElement):
171 (SVGImageElement::haveLoadedRequiredResources):
172 * ksvg2/svg/SVGImageElement.h:
173 * ksvg2/svg/SVGSVGElement.cpp:
174 (WebCore::SVGSVGElement::parseMappedAttribute):
175 * ksvg2/svg/SVGScriptElement.cpp:
176 (WebCore::SVGScriptElement::SVGScriptElement):
177 (WebCore::SVGScriptElement::parseMappedAttribute):
178 (WebCore::SVGScriptElement::executeScript):
179 * xml/xmlhttprequest.cpp:
180 (WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
182 2006-07-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
186 - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
187 Cleanup: remove useless parameters from RenderObject::position()
189 No test possible (no functionality change)
191 * rendering/RenderBox.cpp:
192 (WebCore::RenderBox::position):
193 * rendering/RenderBox.h:
194 * rendering/RenderObject.h:
195 (WebCore::RenderObject::position):
196 * rendering/RenderTableRow.h:
197 (WebCore::RenderTableRow::position):
198 * rendering/RenderTableSection.h:
199 (WebCore::RenderTableSection::position):
200 * rendering/RenderText.cpp:
201 (WebCore::RenderText::position):
202 * rendering/RenderText.h:
203 * rendering/bidi.cpp:
204 (WebCore::RenderBlock::constructLine):
205 (WebCore::RenderBlock::computeVerticalPositionsForLine):
207 2006-07-27 Rob Buis <buis@kde.org>
211 http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
212 SVG with width and height 100% leaves room for scrollbar on the right.
214 Relayout children of svg containers, except svg shapes that do not depend on percentages.
216 * kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
217 * kcanvas/RenderPath.h:
218 * kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
219 * ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
220 * ksvg2/svg/SVGCircleElement.h:
221 * ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
222 * ksvg2/svg/SVGEllipseElement.h:
223 * ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
224 * ksvg2/svg/SVGLineElement.h:
225 * ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
226 * ksvg2/svg/SVGRectElement.h:
227 * ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
229 2006-07-27 Justin Garcia <justin.garcia@apple.com>
233 <rdar://problem/4242293>
234 Poor paste fidelity of http://www.google.com/
236 * editing/ApplyStyleCommand.cpp:
237 (WebCore::ApplyStyleCommand::applyInlineStyle): Fixed crasher with nil-check.
238 * editing/markup.cpp:
239 (WebCore::startMarkup): Style information wasn't added to an element if it had
240 attributes but no style attribute.
242 2006-07-27 Alexander Kellett <lypanov@kde.org>
246 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
247 REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
249 * bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
250 * html/HTMLFormElement.idl:
252 2006-07-27 Rob Buis <buis@kde.org>
256 http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
257 Some HTML DOM attributes have incorrect types
259 Adjust idl and dom source code for HTMLImageElement and
260 HTMLBaseFontElement to choose correct type for
261 HTMLImageElement::border and HTMLBaseFontElement::size
264 * html/HTMLBaseFontElement.cpp:
265 (WebCore::HTMLBaseFontElement::size):
266 (WebCore::HTMLBaseFontElement::setSize):
267 * html/HTMLBaseFontElement.h:
268 * html/HTMLBaseFontElement.idl:
269 * html/HTMLImageElement.cpp:
270 (WebCore::HTMLImageElement::border):
271 (WebCore::HTMLImageElement::setBorder):
272 * html/HTMLImageElement.h:
273 * html/HTMLImageElement.idl:
275 2006-07-27 Justin Garcia <justin.garcia@apple.com>
279 <rdar://problem/4628409>
280 Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
282 * editing/CompositeEditCommand.cpp:
283 (WebCore::CompositeEditCommand::removeBlockPlaceholder):
284 A script on the page shrinks the textarea down to zero rows just
285 before insertion. That gives the shadow div a zero height, removing
286 [div, 0] as a candidate for a VisiblePosition. Then
287 InsertTextCommand::input() tries to create a VisiblePosition from
288 [div, 0] and fails. A nil check is a quick fix. Another might
289 be to make positions where there is a caret selection candidates.
290 Another might be to make any [div, 0] where div is a shadow div inside
291 a form element a candidate.
293 2006-07-27 Graham Dennis <graham.dennis@gmail.com>
297 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
298 Japanese characters improperly rendering in TOT
300 Test: fast/encoding/denormalised-voiced-japanese-chars.html
303 (WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
304 (WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
305 into an argument as WidthIterator::advance doesn't update m_currentCharacter while
308 2006-07-27 Eric Seidel <eric@eseidel.com>
312 Complex entities seem to fail on TOT
313 http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
314 Use an alternative work-around to an XML Entity parsing bug.
316 * dom/XMLTokenizer.cpp:
317 (WebCore::XMLTokenizer::write):
318 (WebCore::hackAroundLibXMLEntityBug): added.
319 (WebCore::startElementNsHandler):
320 (WebCore::endElementNsHandler):
321 (WebCore::charactersHandler):
322 (WebCore::processingInstructionHandler):
323 (WebCore::cdataBlockHandler):
324 (WebCore::commentHandler):
325 (WebCore::getEntityHandler):
327 2006-07-27 Rob Buis <buis@kde.org>
331 http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
332 Fix viewBox issues in Hixie's test
334 Do a more accurate and quicker job of parsing the viewBox
335 attribute. Handle properly on negative width/height and
336 invalid syntax in general.
338 * ksvg2/svg/SVGFitToViewBox.cpp:
339 (SVGFitToViewBox::parseViewBox):
341 2006-07-27 Eric Seidel <eric@eseidel.com>
345 Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
346 http://bugzilla.opendarwin.org/show_bug.cgi?id=9237
347 This patch does not try to autogenerate anything, but enables the SVG functionality.
348 Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
350 * bindings/js/kjs_dom.cpp:
352 * bindings/js/kjs_html.cpp:
353 (KJS::JSHTMLElement::objectGetter):
354 (KJS::HTMLElementFunction::callAsFunction):
355 (KJS::JSHTMLElement::objectSetter):
356 * bindings/js/kjs_html.h:
357 (KJS::JSHTMLElement::):
359 (WebCore::Document::isSVGDocument):
360 * html/HTMLEmbedElement.cpp:
361 (WebCore::HTMLEmbedElement::contentDocument):
362 (WebCore::HTMLEmbedElement::getSVGDocument):
363 * html/HTMLEmbedElement.h:
364 * html/HTMLObjectElement.cpp:
365 (WebCore::HTMLObjectElement::HTMLObjectElement):
366 (WebCore::HTMLObjectElement::getInstance):
367 (WebCore::HTMLObjectElement::parseMappedAttribute):
368 (WebCore::HTMLObjectElement::contentDocument):
369 (WebCore::HTMLObjectElement::rendererIsNeeded):
370 (WebCore::HTMLObjectElement::createRenderer):
371 (WebCore::HTMLObjectElement::setCode):
372 (WebCore::HTMLObjectElement::setArchive):
373 (WebCore::HTMLObjectElement::setBorder):
374 (WebCore::HTMLObjectElement::setCodeBase):
375 (WebCore::HTMLObjectElement::setCodeType):
376 (WebCore::HTMLObjectElement::setData):
377 (WebCore::HTMLObjectElement::hspace):
378 (WebCore::HTMLObjectElement::setHspace):
379 (WebCore::HTMLObjectElement::setStandby):
380 (WebCore::HTMLObjectElement::setType):
381 (WebCore::HTMLObjectElement::setUseMap):
382 (WebCore::HTMLObjectElement::vspace):
383 (WebCore::HTMLObjectElement::setVspace):
384 (WebCore::HTMLObjectElement::getSVGDocument):
385 * html/HTMLObjectElement.h:
386 * ksvg2/svg/SVGDocument.h:
387 (WebCore::SVGDocument::isSVGDocument):
388 * rendering/RenderWidget.h:
389 (WebCore::RenderWidget::frameView):
391 2006-07-26 Alexey Proskuryakov <ap@nypop.com>
395 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
396 XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
398 Test: fast/js/xhtml-serialize.html
400 * editing/markup.cpp:
401 (WebCore::endMarkup): If the element has child nodes, write a closing tag even if it
402 is not permitted in HTML, to make it valid XML.
404 2006-07-26 Alice Liu <alice.liu@apple.com>
406 Reviewed by John Sullivan (and Kevin and Timo).
408 landing this patch for John et al.
409 Fixed <rdar://problem/4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
411 * page/FrameView.cpp:
412 (WebCore::FrameView::layout):
413 moved the call to didFirstLayout to above the check for needsLayout
414 because we need to call didFirstLayout for every webview, not just
415 ones we think need layout.
417 2006-07-26 Justin Garcia <justin.garcia@apple.com>
421 <rdar://problem/4652788>
422 REGRESSION: Can't change size or style of any text in message body
425 (WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
426 * html/HTMLElement.cpp:
427 (WebCore::HTMLElement::isContentRichlyEditable): First check
428 the frame for editability, then userModify, like what
429 HTMLElement::isContentEditable() does.
430 * html/HTMLElement.h:
432 2006-07-26 Mitz Pettel <opendarwin.org@mitzpettel.com>
436 - fix debug-only information() string for table cells
438 * rendering/RenderObject.cpp:
439 (WebCore::RenderObject::information):
441 2006-07-25 David Harrison <harrison@apple.com>
443 Reviewed by timo and Darin.
445 <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
447 * WebCore.xcodeproj/project.pbxproj:
448 * bridge/mac/WebCoreFrameBridge.h:
449 * bridge/mac/WebCoreFrameBridge.mm:
450 (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
451 Add matchStyle parameter for use by WebKit.
453 2006-07-25 Justin Garcia <justin.garcia@apple.com>
457 <rdar://problem/4649560>
458 REGRESSION: Can't Select All when the body is contentEditable="true"
460 * editing/VisiblePosition.cpp:
461 (WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
462 element into an editable body as a convenience.
464 2006-07-25 Justin Garcia <justin.garcia@apple.com>
468 <rdar://problem/4468458> Incoming HTML message is editable <body contenteditable="true">
471 (WebCore::Document::inDesignMode): Removed some spaces.
473 (WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
474 (WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
477 2006-07-25 David Kilzer <ddkilzer@kilzer.net>
481 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
482 Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
484 No test added because there is no change in functionality.
486 * bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
487 * bindings/js/kjs_binding.h: Ditto.
488 * bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
489 * dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
490 * dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
491 Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
492 * page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
494 2006-07-24 Dan Waylonis <waylonis@google.com>
496 Reviewed and tweaked a bunch by Darin.
498 Test: plugins/bindings-test.html
500 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
501 jsNull and NSNull not properly converted between JS and ObjC
503 * bindings/objc/WebScriptObject.mm:
504 (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
505 Added case that converts jsNull to NSNull.
507 2006-07-24 Darin Adler <darin@apple.com>
509 Reviewed by Adele and Justin.
511 - fix <rdar://problem/4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
512 http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
513 - also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
514 REGRESSION: Pasting text into native text area with newline at end does not preserve newline
515 - removed some uses of DeprecatedPtrList in the markup code
517 Test: fast/forms/textarea-type-spaces.html
518 Test: fast/forms/textarea-paste-newline.html
520 * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
521 Updated call to pass a range -- in this case it is the range of the entire document,
522 so this will not handle the whitespace properly.
524 * bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
525 documentFragmentWithText: method, so we can handle whitespace properly.
526 * bridge/mac/WebCoreFrameBridge.mm:
527 (-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
528 (-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
529 (-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
530 (-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
531 parameter -- pass it on to createFragmentFromText.
532 (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
533 DeprecatedPtrList to Vector.
534 (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
535 Pass the range of the current selection as context when creating the fragment.
537 * dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
538 a call to the new containsCaretOffset function -- helps make the caret work right when
539 it is past the end of the last line in a textarea.
541 * editing/CompositeEditCommand.cpp:
542 (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
543 style does not call for collapsing whitespace.
544 (WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
545 to share code, including the new logic mentioned above.
547 * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
548 Use a text node instead of a break element when inserting and the style is preserveNewline.
550 * editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
551 to createFragmentFromText.
553 * editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
554 Assert that we're in a style that collapses whitespace. It's the caller's responsibility
555 not to call otherwise.
557 * editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
558 isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
559 Also changed the constructor to take a selection rather than a pointer to the root
560 editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
561 unused parameter from shouldMergeEnd.
562 * editing/ReplaceSelectionCommand.cpp:
563 (WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
564 Compute root editable element from passed-in selection. Used the start of the selection
565 as a base node for style purposes for the test rendering. Removed the special case
566 "single text node" alternative to createFragmentFromText in the plain text case, since
567 createFragmentFromText now handles that correctly.
568 (WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
569 property from the source location when creating a temporary element for test rendering.
570 (WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
571 parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
572 (WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
573 change code to not remove end BR when it can be re-used instead, don't call the
574 paragraph separator insertion when the position is at the start of a paragraph already,
575 removed redundant computation of identical "next" value, removed unneeded boolean
576 parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
577 a newline character, removed unneeded code to set insertionPos after all code that uses
578 it, and use spaces instead of non-breaking spaces when doing smart paste if the
579 context is one where we do not collapse white space.
580 (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
581 a boolean instead of doing the removal.
583 * editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
584 createFragmentFromText function to take a range for context instead of a document.
585 * editing/markup.cpp:
586 (WebCore::markup): Use Vector instead of DeprecatedPtrList.
587 (WebCore::createMarkup): Ditto.
588 (WebCore::createParagraphContentsFromString): Remove unneeded document parameter
589 and changed a couple places to use isEmpty instead of comparing with "".
590 (WebCore::createFragmentFromText): Given the new context parameter, if the context
591 is one that preserves newlines, then use "\n" instead of <br> elements.
592 (WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
594 * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
595 elements if the context of this node is one where we preserve newlines.
597 * rendering/InlineTextBox.h:
598 * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
599 Added. Implements the appropriate rule for determining if a caret position is
600 in this line or not. Returns true for both one line and the next in cases where
601 affinity must be considered to determine which line the caret is on.
603 * rendering/RenderText.h: Make atLineWrap no longer be a member function.
604 * rendering/RenderText.cpp:
605 (WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
606 which will no longer apply due to the new containsCaretOffset function logic.
607 (WebCore::RenderText::caretRect): Use containsCaretOffset.
608 (WebCore::RenderText::inlineBox): Ditto.
610 * rendering/RenderTextControl.cpp:
611 (WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
612 after calling setInnerText so that the last newline in the string has the effect
613 we expect outside the HTML world (an additional line).
614 (WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
615 too. The layout tests caught this problem, which needs a better solution long term.
616 (WebCore::RenderTextControl::text): Call textContent with the parameter false
617 so it will not include newlines for <br> elements. Now the only <br> element
618 that will ever be in the shadow DOM tree is the one to prevent collapsing, and
619 that one should not show up in the text value.
621 * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
622 that specifically called out the pre whitespace mode and made it work for all
623 the modes that preserve newlines. This makes sure we get a last line box for
624 text after the last "\n" even in cases where there is no <br> afterward.
626 * editing/DeleteSelectionCommand.cpp:
627 (WebCore::DeleteSelectionCommand::fixupWhitespace):
628 * editing/InsertParagraphSeparatorCommand.cpp:
629 (WebCore::InsertParagraphSeparatorCommand::doApply):
630 Added assertions to make sure we don't do anything when we're not collapsing
633 * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
634 Changed to use Vector instead of DeprecatedPtrList.
636 * editing/HTMLInterchange.cpp: Removed obsolete comment.
638 * loader/Cache.h: Removed a stray include.
640 2006-07-24 Adele Peterson <adele@apple.com>
644 - Fix for <rdar://problem/4632132> Changing style of content with mixed editability fails
646 Test: * editing/style/apple-style-editable-mix.html
648 * dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root. It now just
649 checks the user modify property of its own renderer, since that is inherited.
650 * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
651 Adjust the end node to the last descendant of the table, so we don't skip over any runs.
653 2006-07-24 Darin Adler <darin@apple.com>
657 - implement String::createCFString
659 * WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
661 * bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
663 * platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
664 and added the CFStringRef ones.
665 * platform/mac/StringMac.mm: Added. Ditto.
667 2006-07-24 David Hyatt <hyatt@apple.com>
671 (1) Make sure to mark positioned objects that depend on line position to
672 mark themselves as needing layout when their line box placeholder gets
675 * rendering/RenderBox.cpp:
676 (WebCore::RenderBox::position):
678 (2) Improve highlighting to factor the inflation into overflow so that
679 invalidation and repainting will work properly.
681 * rendering/RootInlineBox.cpp:
682 (WebCore::RootInlineBox::addHighlightOverflow):
683 * rendering/RootInlineBox.h:
684 * rendering/bidi.cpp:
685 (WebCore::RenderBlock::layoutInlineChildren):
687 2006-07-24 Anders Carlsson <acarlsson@apple.com>
691 <rdar://problem/4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
693 * html/HTMLInputElement.cpp:
694 (WebCore::HTMLInputElement::defaultEventHandler):
695 Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
696 that onsearch can be invoked.
698 * manual-tests/onsearch-enter.html: Added.
700 2006-07-24 Dave MacLachlan <dmaclach@mac.com>
702 Reviewed by Darin and Alexey.
704 Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425>
705 and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
707 Test: svg/custom/non-opaque-filters.svg
709 * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
710 (WebCore::KCanvasFilterQuartz::prepareFilter):
711 We create an autorelease pool so we can control the deallocation of the
712 CIContext that we're creating. The CIContext retains the CGContext that
713 you pass it internally so when the CIContext is released, the
714 CGContext is released as well.
715 This is all fine and dandy unless you wrap the creation of the CIFilter
716 with a pair of CGBegin/EndTransparencyLayer calls which swap the context
717 out from underneath you. So if you start with context A,
718 CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
719 with it and add a reference to B. CGEndTransparencyLayer swaps out B and
720 gives you back A. Autorelease pool comes and cleans up the Filter, and calls
721 release on A, but A never got the refcount in the first place. B did. BOOM!
722 So we create a pool, then do a retain, then release the pool so that we
723 don't have to worry about the pool releasing it at a later time.
724 See <rdar://problem/4647735> for reduction of CGEndTransparencyLayer case
726 2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
730 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
731 Incomplete repaint when changing an inline's border
733 Test: fast/repaint/line-overflow.html
735 * rendering/RenderBlock.h:
736 * rendering/bidi.cpp:
737 (WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
738 variables to track the vertical edges of the area that changed, accounting for
739 lines that were deleted, inserted or moved. Removed unnecessary updating of
741 (WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
743 (WebCore::RenderBlock::determineEndPosition):
744 (WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
745 arguments, which this method updates to account for deleted lines.
746 (WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
748 2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
752 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
753 REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
755 Test: fast/forms/select-visual-hebrew.html
757 * css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
759 2006-07-24 Alexey Proskuryakov <ap@nypop.com>
763 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
764 REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
767 (WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
770 2006-07-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
774 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
775 REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
777 * rendering/RenderBlock.cpp:
778 (WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
779 for bug 9312: For coordinates outside a replaced object, return the position
780 just before (after) the element if the coordinates are above or to the left (below
783 2006-07-23 Mark Rowe <opendarwin.org@bdash.net.nz>
787 Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
788 http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
790 WebCore portion of the fix.
792 * bridge/mac/WebCoreScriptDebugger.h:
793 (-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
794 * bridge/mac/WebCoreScriptDebugger.mm:
795 (WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
797 2006-07-23 Alice Liu <alice.liu@apple.com>
800 Actually Adele figured out how to fix the layout test failures. Landing this patch for her. Layout test failures exposed but not caused by r15584 (my patch earlier today).
802 * editing/visible_units.cpp:
803 (WebCore::previousLinePosition):
804 When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.
805 (WebCore::nextLinePosition):
808 2006-07-23 David Harrison <harrison@apple.com>
812 <rdar://problem/4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
814 * Test: editing/deleting/delete-mixed-editable-content-001.html
816 * editing/visible_units.cpp:
817 (WebCore::startOfParagraph):
818 Respect editable boundary the same way endOfParagraph does.
820 2006-07-23 Beth Dakin <bdakin@apple.com>
822 Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
824 Fix for <rdar://problem/4529398> WebCore crashes when pasting rich
825 text - WebCore::InlineBox::root()
827 The initial rendering crash was due to a render object having a
828 stale reference to an inline box that had already been deleted and
829 then recreated in the exact same location in memory. (Crazy, I
830 know.) The situation seemed pretty specific to list markers
831 according to Hyatt according to Maciej, so that is what I patched
832 specifically. Fixing this crash unearthed a separate editing crash
833 where we were trying to insert a block into itself. I worked on
834 that with Maciej and Harrison, and Harrison came up with a fix.
836 * editing/CompositeEditCommand.cpp:
837 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic
838 node, insert the new block into the parent instead.
839 * rendering/InlineBox.cpp:
840 (WebCore::InlineBox::isChildOfParent): This function is for
841 posterity. It will help keep the linebox tree in check.
842 * rendering/InlineBox.h:
843 * rendering/InlineFlowBox.cpp:
844 (WebCore::InlineFlowBox::addToLine): Added assert.
845 (WebCore::InlineFlowBox::deleteLine): Added assert.
846 * rendering/ListMarkerBox.cpp:
847 (WebCore::ListMarkerBox::destroy): If this has a parent, call
849 (WebCore::ListMarkerBox::operator delete):
850 * rendering/ListMarkerBox.h:
852 2006-07-23 Alice Liu <alice.liu@apple.com>
856 fixed <rdar://problem/4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
858 * rendering/RenderBlock.cpp:
859 (WebCore::RenderBlock::positionForCoordinates):
860 removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
861 * rendering/RenderTextControl.cpp:
862 (WebCore::RenderTextControl::nodeAtPoint):
864 * rendering/RenderTextControl.h:
865 added function protocol
867 2006-07-23 Adele Peterson <adele@apple.com>
871 Updating fix from last checkin.
873 * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
874 Only tell the view about this flexbox if there isn't another flexbox already cached.
876 2006-07-23 Adele Peterson <adele@apple.com>
880 - Fix for <rdar://problem/4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
882 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
884 * rendering/RenderFlexibleBox.cpp:
885 (WebCore::RenderFlexibleBox::layoutBlock): ditto.
886 (WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
888 * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
889 * rendering/RenderView.h:
890 (WebCore::RenderView::setFlexBoxInFirstLayout):
891 (WebCore::RenderView::flexBoxInFirstLayout):
893 2006-07-22 Alexey Proskuryakov <ap@nypop.com>
897 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
898 REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number
899 of registered mime types
901 * bindings/js/kjs_navigator.cpp:
902 (KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
903 (KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
904 from even being called.
906 2006-07-21 Maciej Stachowiak <mjs@apple.com>
908 Reviewed by Adele and Tim Omernick.
910 <rdar://problem/4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
912 Couldn't figure out how to make layout test, here's a manual test:
913 * manual-tests/remove-select-onchange.html: Added.
915 * rendering/RenderMenuList.cpp:
916 (WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
917 tree so it doesn't get destroyed if we do.
919 The remaining changes are to let the RenderPopupMenu know its menu list w/o having
920 to be in the render tree:
922 * rendering/RenderPopupMenu.cpp:
923 (WebCore::RenderPopupMenu::RenderPopupMenu):
924 * rendering/RenderPopupMenu.h:
925 (WebCore::RenderPopupMenu::menuList):
926 * rendering/RenderPopupMenuMac.h:
927 * rendering/RenderPopupMenuMac.mm:
928 (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
929 * rendering/RenderPopupMenuWin.h:
930 (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
931 * rendering/RenderTheme.h:
932 * rendering/RenderThemeMac.h:
933 * rendering/RenderThemeMac.mm:
934 (WebCore::RenderThemeMac::createPopupMenu):
935 * rendering/RenderThemeWin.cpp:
936 (WebCore::RenderThemeWin::createPopupMenu):
937 * rendering/RenderThemeWin.h:
939 2006-07-21 Adele Peterson <adele@apple.com>
943 Fix for: <rdar://problem/4643238> REGRESSION: Can't set insertion point at the end of a line of text
945 Test: fast/forms/textarea-scrolled-endline-caret.html
947 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
948 When looking for the closest line box, take the scroll offset into account.
950 2006-07-21 Tim Omernick <timo@apple.com>
952 Reviewed by Geoff & Maciej.
954 <rdar://problem/4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
956 Geoff is working on a layout test for this.
958 * bridge/mac/FrameMac.mm:
959 (WebCore::FrameMac::focusWindow):
960 (WebCore::FrameMac::unfocusWindow):
961 Check for a NULL view. The view can be NULL if the frame has not yet loaded any data. This fixes the crash, but the behavior is still
962 wrong -- we should focus the frame once it gets a view. I've filed <rdar://problem/4645685> to track that. It's not as urgent as this
965 2006-07-21 Maciej Stachowiak <mjs@apple.com>
969 <rdar://problem/4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
971 * rendering/RenderTextControl.cpp:
972 (WebCore::RenderTextControl::updateFromElement): Clear the undo
973 chain when the text control contents have been set
975 * bridge/mac/FrameMac.mm:
976 (WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
977 stack, close all open undo groups and then open an equal number,
978 since otherwise NSUndoManager ends up in an inconsistent state
979 leading to uncaught ObjC exceptions.
981 2006-07-21 Beth Dakin <bdakin@apple.com>
985 Just moving this assertion down a couple of lines. It was hitting
986 every time you try to print a page because we put it too early in
989 * bridge/mac/WebCoreFrameBridge.mm:
990 (-[WebCoreFrameBridge drawRect:]):
992 2006-07-21 Justin Garcia <justin.garcia@apple.com>
996 <rdar://problem/4548238>
997 REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
999 * editing/CompositeEditCommand.cpp:
1000 (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1001 Moved from InsertParagraphSeparator. Does its own typing style restoration.
1002 * editing/CompositeEditCommand.h:
1003 * editing/InsertParagraphSeparatorCommand.cpp:
1004 (WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
1005 * editing/TypingCommand.cpp:
1006 (WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
1007 the endingSelection is at the start of an editable region.
1008 * editing/htmlediting.cpp:
1009 (WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
1010 (WebCore::appendedSublist): Ditto.
1011 (WebCore::enclosingEmptyListItem): Ditto.
1012 * editing/htmlediting.h:
1014 === Safari-521.20 ===
1016 2006-07-21 Tim Omernick <timo@apple.com>
1018 Reviewed by Beth Dakin & John Sullivan.
1020 <rdar://problem/4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
1022 Beth is in the middle of making a layout test for this; she will land it soon.
1024 * platform/mac/ScrollBarMac.mm:
1025 (ScrollBar::~ScrollBar):
1026 Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
1027 Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
1028 in view-based widgets to prevent their destruction while the tracking is in progress.
1029 I searched around WebCore and this is the only Widget subclass that directly removes its view rather
1030 than using removeFromSuperview().
1032 2006-07-21 Mitz Pettel <opendarwin.org@mitzpettel.com>
1036 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
1037 REGRESSION: Selection bug in new text fields when selecting past the first letter
1039 Test: editing/selection/select-from-textfield-outwards.html
1041 * editing/Selection.cpp:
1042 (WebCore::Selection::adjustForEditableContent): Added code to handle the case
1043 where the selection starts (resp. ends) in the last (resp. first) visual position
1044 inside an editable root.
1045 * editing/htmlediting.cpp:
1046 (WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
1047 tree with a position in the shadow ancestor.
1048 * rendering/RenderBlock.cpp:
1049 (WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
1050 object, return the position just before (after) the element if the coordinates are above or
1051 to the left (below or to the right).
1052 * rendering/RenderObject.cpp:
1053 (WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
1054 * rendering/RenderText.cpp:
1055 (WebCore::RenderText::positionForCoordinates): Changed to return the last position
1056 in the lowest text box if the y coordinate is below all text boxes.
1058 2006-07-21 Geoffrey Garen <ggaren@apple.com>
1062 - Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on
1063 HousingMaps.com (Google Maps-based site)
1065 - Made style.filter undetectable, like document.all.
1067 Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
1068 which conflicts with IE's custom CSS attribute by the same name. Web programs
1069 like the Google maps API test for style.filter, and assume it's the IE
1070 style.filter if they find it, so we need to make style.filter undetectable
1071 to avoid breaking them.
1073 An alternative solution would be to hotwire a delorean, go back in time,
1074 and beg the web standards makers to make standards that work on the web.
1076 * bindings/js/kjs_css.cpp:
1077 (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
1079 2006-07-20 Justin Garcia <justin.garcia@apple.com>
1083 <rdar://problem/4641033>
1084 REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
1086 * editing/markup.cpp:
1087 (WebCore::createMarkup): We surround the currently accumulated markup with markup
1088 for ancestors of the startNode when the pre-order traversal leaves the trees rooted
1089 at those ancestors. We assumed that any ancestors of the current node not in the
1090 ancestorsToClose list were those kind of ancestors. But we don't add renderer-less
1091 containers to the ancestorsToClose list. So, we were incorrectly surrounding the
1092 currently accumulated markup with markup for render-less containers. Most of the
1093 content at apple.com was being put inside an <optgroup> inside a <select> element.
1094 Then on Paste createContextualFragment would drop it.
1096 2006-07-21 Anders Carlsson <acarlsson@apple.com>
1101 (WebCore::Document::):
1102 * dom/EventTargetNode.cpp:
1103 (WebCore::EventTargetNode::addEventListener):
1104 * page/FrameView.cpp:
1105 (WebCore::FrameView::layout):
1106 * rendering/RenderLayer.cpp:
1107 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1108 Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
1110 2006-07-20 Anders Carlsson <acarlsson@apple.com>
1114 <rdar://problem/4637807> REGRESSION: "Features & Options" page at volvocars.us fails
1116 * xml/XSLTProcessor.cpp:
1117 (WebCore::xsltParamArrayFromParameterMap):
1118 Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
1119 add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
1120 This also works around a bug in libxslt where a hash table isn't allocated.
1122 2006-07-20 Alice Liu <alice.liu@apple.com>
1124 Reviewed by Tim Omernick.
1126 Fixed <rdar://problem/4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
1127 added manual test because there is no way to change the value of an <input type=file> via the DOM. It's not supported because it's a security risk.
1129 * manual-tests/remove-input-file-onchange.html: Added.
1130 * platform/mac/FileButtonMac.mm:
1131 (-[WebFileChooserButton chooseFilename:]):
1132 swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget
1134 2006-07-20 Alice Liu <alice.liu@apple.com>
1138 Fixed <rdar://problem/4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
1139 added a manual test because of the need to use AutoFill.
1142 (WebCore::Node::aboutToUnload):
1143 added virtual function prototype
1144 * html/HTMLInputElement.cpp:
1145 (WebCore::HTMLInputElement::aboutToUnload):
1146 added implementation that sends textFieldDidEndEditing notification
1147 * html/HTMLInputElement.h:
1148 added virtual function prototype
1149 * manual-tests/input-type-file-autocomplete-frame-1.html: Added.
1150 * manual-tests/input-type-file-autocomplete-frame-2.html: Added.
1151 * manual-tests/input-type-file-autocomplete-refresh.html: Added.
1153 (WebCore::Frame::stopLoading):
1154 before unloading, call aboutToUnload on the current focused node
1156 2006-07-20 Brady Eidson <beidson@apple.com>
1160 fixed <rdar://problem/4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
1161 There was an attempt to deref an EventListener that got cleaned up in GC. Changing Document's EventListener list from
1162 vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
1165 (WebCore::Document::Document):
1166 (WebCore::Document::clear):
1167 (WebCore::Document::handleWindowEvent):
1168 (WebCore::Document::getHTMLWindowEventListener):
1169 (WebCore::Document::removeHTMLWindowEventListener):
1170 (WebCore::Document::removeWindowEventListener):
1171 (WebCore::Document::hasWindowEventListener):
1172 Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
1175 Changed the EventListener list to be a vanilla pointer list to a refptr list
1177 2006-07-20 John Sullivan <sullivan@apple.com>
1181 - WebCore part of fix for:
1182 <rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving
1183 closing tabs after clicking in a web page
1185 * bridge/mac/WebCoreFrameBridge.h:
1186 (-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
1187 renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
1188 * bridge/mac/FrameMac.mm:
1189 (WebCore::FrameMac::passMouseDownEventToWidget):
1190 updated for name change
1192 2006-07-19 Alexey Proskuryakov <ap@nypop.com>
1196 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
1197 Use of window.open & window.close can cause crash
1199 * platform/PlatformMouseEvent.h:
1200 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1201 * platform/mac/PlatformMouseEventMac.mm:
1202 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1203 The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
1205 * bridge/mac/FrameMac.mm:
1206 (WebCore::FrameMac::handleMouseMoveEvent):
1207 * rendering/RenderFormElement.cpp:
1208 (WebCore::RenderFormElement::clicked):
1209 Updated for the above changes.
1211 * platform/gdk/MouseEventGdk.cpp:
1212 * platform/gdk/TemporaryLinkStubs.cpp:
1213 (PlatformMouseEvent::PlatformMouseEvent):
1214 * platform/win/MouseEventWin.cpp:
1215 * platform/win/TemporaryLinkStubs.cpp:
1216 (PlatformMouseEvent::PlatformMouseEvent):
1217 Trying not to break other platforms.
1219 * manual-tests/invalid-mouse-event.html: Added.
1221 2006-07-20 Maciej Stachowiak <mjs@apple.com>
1225 - delete line that I only commented in the last patch - meant to do this before landing
1227 * html/HTMLFrameElement.cpp:
1228 (WebCore::HTMLFrameElement::close):
1230 2006-07-19 Maciej Stachowiak <mjs@apple.com>
1234 - fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
1236 I couldn't figure out how to make an automated test case for this,
1237 or even a manual one. It seems to be timing-related in some way.
1239 * html/HTMLFrameElement.cpp:
1240 (WebCore::HTMLFrameElement::close): detach the child frame from
1241 its element, not the frame containing this element.
1243 2006-07-20 Anders Carlsson <acarlsson@apple.com>
1247 * bridge/mac/FrameMac.mm:
1248 (WebCore::FrameMac::nextKeyViewInFrame):
1249 Hold a ref to the node in case it gets destroyed by an event handler.
1251 2006-07-19 Mark Rowe <opendarwin.org@bdash.net.nz>
1255 http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
1256 Bug 10021: REGRESSION: Stack overflow due to infinite recursion in
1257 Image::checkForSolidColor
1259 * platform/Image.cpp:
1260 (WebCore::Image::cacheFrame): Don't call checkForSolidColor unless
1261 the frame was decoded successfully.
1263 2006-07-19 Adele Peterson <adele@apple.com>
1268 <rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
1269 http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
1271 <rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
1272 http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
1274 Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
1276 These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
1277 Now, we detect this case and let setFocusNode be called. And when the stylesheet finishes loading, and the element attaches, a timer will fire,
1278 which will cause the correct selection & scrolling behavior to occur.
1280 This fix removes selection and scrolling behavior from the focus method. This code is now in a new method, updateFocusAppearance.
1281 updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires. This timer gets set
1282 up when an element attaches, and its already been focused by the focus method. We have to use a timer, because updateFocusAppearance can cause
1283 a layout to happen, and we don't want that to happen in the middle of attach().
1285 * bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
1286 * bindings/objc/DOMPrivate.h:
1289 (WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
1290 (WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
1291 (WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode,
1292 and only requiring the element to be focusable now before updating focus appearance.
1293 (WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
1294 (WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
1295 (WebCore::Element::stopUpdateFocusAppearanceTimer): Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
1296 (WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
1297 (WebCore::Element::blur): ditto.
1299 (WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
1300 (WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
1302 * dom/Node.h: (WebCore::Node::supportsFocus): Added. Base class just calls isFocusable.
1303 * html/HTMLAnchorElement.h: Added supportsFocus.
1304 * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
1305 so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
1306 * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
1307 * html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
1309 * html/HTMLInputElement.cpp:
1310 (WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode,
1311 and only requiring the element to be focusable now before updating focus appearance.
1312 (WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
1313 * html/HTMLInputElement.h:
1315 * html/HTMLTextAreaElement.cpp:
1316 (WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode,
1317 and only requiring the element to be focusable now before updating focus appearance.
1318 (WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
1319 * html/HTMLTextAreaElement.h:
1321 2006-07-19 Justin Garcia <justin.garcia@apple.com>
1325 <rdar://problem/4631972>
1326 REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
1329 (WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
1330 (WebCore::Position::downstream): Ditto.
1331 * editing/CompositeEditCommand.cpp:
1332 (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
1333 * editing/htmlediting.cpp:
1334 (WebCore::canHaveChildrenForEditing): Added !iframe.
1335 (WebCore::isBlock): Added, returns !node->renderer()->isInline()
1336 (WebCore::enclosingBlock): Added.
1337 * editing/htmlediting.h:
1339 2006-07-19 Anders Carlsson <acarlsson@apple.com>
1343 <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
1345 * bridge/mac/FrameMac.mm:
1346 (WebCore::FrameMac::nextKeyViewInFrame):
1347 Take into account that focus handlers can cause a node's renderer to be destroyed.
1349 2006-07-19 David Hyatt <hyatt@apple.com>
1351 Fix for 4638376. The 1x1 solid color image optimization was broken when
1352 I re-architected image. This patch restores the optimization for CG. Cairo
1353 will still need the optimization.
1357 WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
1359 * platform/Image.cpp:
1360 (WebCore::Image::Image):
1361 (WebCore::Image::invalidateData):
1362 (WebCore::Image::cacheFrame):
1364 (WebCore::Image::setIsPDF):
1365 * platform/cairo/ImageCairo.cpp:
1366 (WebCore::Image::checkForSolidColor):
1367 * platform/mac/ImageMac.mm:
1368 (WebCore::Image::initNativeData):
1369 (WebCore::Image::invalidateNativeData):
1370 (WebCore::Image::checkForSolidColor):
1371 (WebCore::Image::draw):
1372 (WebCore::Image::drawTiled):
1374 2006-07-19 Justin Garcia <justin.garcia@apple.com>
1378 <rdar://problem/4613519>
1379 REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
1381 * editing/InsertParagraphSeparatorCommand.cpp:
1382 (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
1383 if the enclosingBlockFlowElement doesn't have a parent.
1385 2006-07-19 David Harrison <harrison@apple.com>
1387 Reviewed by Tim Hatcher.
1389 <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
1390 <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table
1392 Better patch than previous checkin.
1394 * test: editing/pasteboard/paste-table-003.html
1396 * editing/markup.cpp:
1397 (WebCore::createMarkup):
1398 Make sure to include the table when including a tbody.
1400 === Safari-521.19 ===
1402 2006-07-19 David Harrison <harrison@apple.com>
1404 Reviewed by Tim Hatcher.
1406 <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
1408 No test case as this can only be reproduced through ObjC APIs.
1410 * editing/markup.cpp:
1411 (WebCore::createMarkup):
1412 Adjust the range for ancestor markup handling when main loop skips first node.
1414 2006-07-18 David Hyatt <hyatt@apple.com>
1416 Fix for radar 4611287, make resizable text fields opt-in rather than
1417 opt-out. Open source users will need to write the pref into their defaults
1418 to see the resizers on textareas now.
1420 Reviewed by mjs and adele
1422 * WebCore.xcodeproj/project.pbxproj:
1423 * bridge/mac/WebCoreSettings.mm:
1424 (-[WebCoreSettings setTextAreasAreResizable:]):
1425 * css/cssparser.cpp:
1426 (WebCore::CSSParser::parseValue):
1427 * css/cssstyleselector.cpp:
1428 (WebCore::CSSStyleSelector::applyProperty):
1431 2006-07-18 Anders Carlsson <acarlsson@apple.com>
1435 http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
1436 REGRESSION: iframes stop rendering after 200th one on successive reloads
1438 * html/HTMLFrameElement.cpp:
1439 (WebCore::HTMLFrameElement::attach):
1440 (WebCore::HTMLFrameElement::close):
1441 * html/HTMLIFrameElement.cpp:
1442 (WebCore::HTMLIFrameElement::insertedIntoDocument):
1443 (WebCore::HTMLIFrameElement::willRemove):
1444 Remove calls to incrementFrameCount and decrementFrameCount.
1447 (WebCore::Frame::Frame):
1448 Call incrementFrameCount here.
1450 (WebCore::Frame::~Frame):
1451 Call disconnectOwnerElement.
1453 (WebCore::Frame::disconnectOwnerElement):
1454 Call decrementFrameCount here.
1456 2006-07-18 Alexey Proskuryakov <ap@nypop.com>
1460 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
1461 Let correct CSS custom cursor declarations parse
1463 * css/cssparser.cpp:
1464 (WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
1465 requiring that it is the only one in the list (which is actually illegal, according to the spec).
1466 This is only a temporary hack, with a real implementation to follow in bug 6001/6002.
1468 * manual-tests/custom-cursors.html: Added a test for this issue.
1469 * manual-tests/resources/helpCursor.tiff: A cursor image used in the test.
1471 2006-07-18 Timothy Hatcher <timothy@apple.com>
1475 <rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols
1477 WebCore needs to add -sub_library libobjc to maintain
1478 backwards compatibility with binaries linked with WebKit
1479 before JavaScriptCore moved out of WebKit.
1481 * WebCore.xcodeproj/project.pbxproj:
1483 2006-07-18 Mitz Pettel <opendarwin.org@mitzpettel.com>
1487 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
1488 REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
1490 Test: editing/selection/click-start-of-line.html
1492 * rendering/RenderText.cpp:
1493 (WebCore::RenderText::positionForCoordinates): Changed to return downstream
1494 affinity if the x coordinate is to the left of the middle of the first character
1497 2006-07-18 Anders Carlsson <acarlsson@apple.com>
1501 http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
1502 <rdar://problem/4614085>
1503 TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)
1505 * editing/SelectionController.cpp:
1506 (WebCore::SelectionController::modifyExtendingRightForward):
1507 (WebCore::SelectionController::modifyMovingRightForward):
1508 (WebCore::SelectionController::modifyExtendingLeftBackward):
1509 (WebCore::SelectionController::modifyMovingLeftBackward):
1510 If the caret is inside an editable region, the beginning/end of the document should actually be the
1511 beginning/end of the editable region.
1513 2006-07-17 Tim Omernick <timo@apple.com>
1517 <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
1520 * bridge/mac/WebCoreFrameBridge.h:
1521 * bridge/mac/WebCoreFrameBridge.mm:
1522 (-[WebCoreFrameBridge setProhibitsScrolling:]):
1524 (WebCore::Frame::prohibitsScrolling):
1525 (WebCore::Frame::setProhibitsScrolling):
1527 * page/FramePrivate.h:
1528 (WebCore::FramePrivate::FramePrivate):
1529 * page/FrameView.cpp:
1530 (WebCore::FrameView::scrollPointRecursively):
1531 (WebCore::FrameView::setContentsPos):
1533 * platform/ScrollView.h:
1535 2006-07-17 Maciej Stachowiak <mjs@apple.com>
1537 Reviewed by Dave Harrison.
1539 - fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/
1541 * editing/htmlediting.cpp:
1542 (WebCore::editingIgnoresContent):
1544 2006-07-17 Justin Garcia <justin.garcia@apple.com>
1548 <rdar://problem/4621728>
1549 REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
1550 <rdar://problem/4604932>
1551 REGRESSION: Dragging too far left on a line will select all lines above it.
1553 No layout test because of 9980.
1555 * rendering/RenderBlock.cpp:
1556 (WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
1557 for coordinates outside those roots, except for coordinates outside a document that is entirely
1560 2006-07-17 Timothy Hatcher <timothy@apple.com>
1564 <rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero
1566 * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1567 (WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
1568 * html/CanvasRenderingContext2D.cpp:
1569 (WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return
1571 2006-07-17 Timothy Hatcher <timothy@apple.com>
1575 <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
1577 Moves WebScriptObject and WebUndefined to WebCore.
1580 * WebCore.xcodeproj/project.pbxproj:
1581 * bindings/objc/DOM.mm:
1582 * bindings/objc/DOMCore.h:
1583 * bindings/objc/DOMInternal.mm:
1584 * bindings/objc/DOMUtility.mm:
1585 * bindings/objc/WebScriptObject.mm: Added.
1586 (+[WebUndefined allocWithZone:]):
1587 (-[WebUndefined initWithCoder:]):
1588 (-[WebUndefined encodeWithCoder:]):
1589 (-[WebUndefined copyWithZone:]):
1590 * bindings/objc/WebScriptObjectPrivate.h: Added.
1591 * bridge/mac/FrameMac.mm:
1592 * bridge/mac/WebCoreScriptDebugger.mm:
1594 2006-07-17 David Hyatt <hyatt@apple.com>
1596 Back out the fix for 5564, since it turns out font:x-small; is a pretty
1597 prominent IE-specific CSS hack. Because Web sites rely on IE's incorrect
1598 font parsing as a means of also correcting IE's incorrect font size rules.
1600 This fixes Yahoo.com.
1604 * css/cssparser.cpp:
1605 (WebCore::CSSParser::parseFont):
1607 2006-07-17 Justin Garcia <justin.garcia@apple.com>
1611 <rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence
1614 (WebCore::Document::updateSelection):
1616 2006-07-17 Maciej Stachowiak <mjs@apple.com>
1620 <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard
1622 * html/HTMLInputElement.cpp:
1623 (WebCore::HTMLInputElement::setChecked):
1624 (WebCore::HTMLInputElement::preDispatchEventHandler):
1625 * html/HTMLInputElement.h:
1627 2006-07-16 David Kilzer <ddkilzer@kilzer.net>
1631 - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
1632 REGRESSION: document.dir should return empty string in <head>
1634 Test: fast/dom/document-dir-property.html
1636 * bindings/js/kjs_html.cpp:
1637 (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
1638 undefined value for an unset document.dir property.
1640 2006-07-16 David Kilzer <ddkilzer@kilzer.net>
1644 * dom/NodeFilter.idl:
1645 Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
1646 * manual-tests/input-empty-on-focus.html:
1647 Removed "Property changes" that snuck in as part of the "apply patch" process.
1649 2006-07-16 Darin Adler <darin@apple.com>
1651 Reviewed by John Sullivan.
1653 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
1654 <rdar://problem/4590613>
1655 REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
1657 The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
1658 I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
1659 Presumably some other bug that we fixed had been compensating.
1661 Test: fast/html/body-offset-properties.html
1663 * rendering/RenderObject.cpp:
1664 (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
1665 (WebCore::RenderObject::offsetTop): Ditto.
1666 (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).
1668 2006-07-16 Beth Dakin <bdakin@apple.com>
1672 Fix for <rdar://problem/4616595> REGRESSION: Problems with world
1673 clock widget clock hand motion on 9A211 + 4604574
1675 The second hand on the widget was jiggling because the rotation was
1676 messing up the use of the affine transformation matrix while
1677 rounding to pixel boundaries in device space. We are mainly
1678 concerned with rounding to pixel boundaries with the scale in mind,
1679 so this patch extracts the scale to device space from the matrix,
1680 and rounds to pixel boundaries using only the scale. This doesn't
1681 seem like it is a perfect solution, but it definitely solves the
1682 immediate problem. We will probably need to re-address what should
1683 happen to avoid pixel cracks with rotations at non-integral scale
1686 * platform/cg/GraphicsContextCG.cpp:
1687 (WebCore::GraphicsContext::roundToDevicePixels):
1689 2006-07-15 Darin Adler <darin@apple.com>
1691 - fix mistake from fix for 8952 that was breaking layout tests
1693 * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
1694 Justin was right! I changed the behavior of the function by accident. Changed it
1695 back so that it doesn't blow away the selection on the DOM side in the case where
1698 I will write 100 times on the blackboard: "When Justin says something about editing,
1699 assume he is right."
1701 2006-07-15 Darin Adler <darin@apple.com>
1703 - try to fix Windows build
1705 * WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.
1707 2006-07-15 Darin Adler <darin@apple.com>
1709 Reviewed by John Sullivan.
1711 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
1712 <rdar://problem/4575185>
1713 REGRESSION: crash on drag of highlighted Google custom home page modules
1715 Test: fast/dynamic/move-node-with-selection.html
1717 * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
1718 Call updateRendering before calling clearSelection(), since it's important to do any
1719 work beforehand, and there are calls inside clearSelection that will indirectly do an
1720 updateRendering. Also change code to make fewer assumptions about object lifetime.
1722 2006-07-15 Darin Adler <darin@apple.com>
1724 Reviewed by John Sullivan.
1726 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
1727 <rdar://problem/4631844>
1728 REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
1730 Test: fast/lists/numeric-markers-outside-list.html
1732 * rendering/RenderListItem.cpp: (WebCore::previousListItem):
1733 Look for list items, even when we're outside any list.
1735 2006-07-15 Adele Peterson <adele@apple.com>
1739 - Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character
1741 This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
1742 interpreted by the form delegate as an actual delete. This fix doesn't notify the form delegate if the deletion is
1743 part of an editing command to replace the selected text.
1745 * editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is
1746 part of a composite command to replace the text being deleted.
1747 * editing/DeleteSelectionCommand.cpp:
1748 (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
1749 (WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
1750 * editing/CompositeEditCommand.h:
1751 * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection):
1752 Added replace argument to construct DeleteSelectionCommand.
1754 * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
1755 * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.
1757 2006-07-15 Geoffrey Garen <ggaren@apple.com>
1759 Reviewed by Maciej, tweaked to match Darin's patch.
1761 - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on
1762 FCKeditor demo (9911)
1764 * WebCore.xcodeproj/project.pbxproj:
1765 * bindings/js/kjs_html.cpp:
1766 (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
1767 forwarding the put request to it. I confirmed that no other parts of the
1768 file use 'body' or 'bodyElement' without checking for null.
1770 Also, use 'body' rather than 'bodyElement' because dir can bet set on
1771 any element, not just HTMLBodyElement.
1773 2006-07-15 Darin Adler <darin@apple.com>
1777 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
1778 <rdar://problem/4575417>
1779 REGRESSION: Pressing Enter/Return in a text input removes the selected text
1781 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
1782 <rdar://problem/4614228>
1783 REGRESSION: crash dispatching JavaScript-created keyboard event to input element
1785 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
1786 Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
1787 enough for the future.
1789 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
1790 Consume Enter key keypress events even if the element is not in a form.
1792 * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
1793 characters that turn into "Enter". Actual keyboard events always are \r or \003 on
1794 the Macintosh, but in layout tests we can use \n, and everything other than the
1795 code path here works, so worth fixing.
1797 2006-07-15 Darin Adler <darin@apple.com>
1799 Reviewed by John Sullivan.
1801 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
1802 <rdar://problem/4631821>
1803 REGRESSION: NativePopups don't work correctly in some forum software
1805 Test: fast/forms/select-selected.html
1807 * rendering/RenderMenuList.h:
1808 * rendering/RenderMenuList.cpp:
1809 (WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
1810 index to a list index before using it to index into the list.
1811 (WebCore::RenderMenuList::showPopup): Added code to map the selection option index
1812 to a list index before passing it to the menu renderer.
1813 (WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
1814 option index before calling setSelectedIndex (that function takes an option index).
1816 2006-07-15 Darin Adler <darin@apple.com>
1818 Reviewed by John Sullivan.
1820 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
1821 REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
1823 * bindings/objc/DOM.mm:
1824 (-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
1825 (-[DOMNode removeEventListener:::]): Ditto.
1826 (-[DOMNode dispatchEvent:]): Ditto.
1828 * WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.
1830 2006-07-15 Maciej Stachowiak <mjs@apple.com>
1834 <rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix
1836 * rendering/RenderTable.cpp:
1837 (WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
1838 just table sections!
1840 2006-07-15 Anders Carlsson <acarlsson@apple.com>
1844 http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
1845 <rdar://problem/4631561>
1846 REGRESSION: Repro crash from mangleme using iframe, only from server.
1848 * html/HTMLIFrameElement.cpp:
1849 (WebCore::HTMLIFrameElement::attach):
1850 Add null check for contentFrame() since content frames won't be created for invalid URLs.
1852 2006-07-14 Alexey Proskuryakov <ap@nypop.com>
1856 Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
1857 REGRESSION: KOI8-U encoding no longer supported.
1860 * http/tests/misc/BOM-override.pl
1861 * http/tests/misc/BOM-override-script.html
1862 * fast/encoding/charset-koi8-u.html
1863 * fast/encoding/charset-x-nextstep.html
1865 Restored a TEC code path for encodings that are not supported by ICU (but which currently
1866 passes all layout tests even by itself with ICU disabled). A lot of refactoring is
1867 still needed - most importantly, round-tripping encoding names via CFStringEncoding
1868 makes little sense now.
1871 * bridge/mac/WebCoreTextDecoder.h: Removed.
1872 * bridge/mac/WebCoreTextDecoder.mm: Removed.
1873 WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
1875 * loader/Decoder.cpp:
1877 (Decoder::setEncodingName):
1879 Use StreamingTextDecoder::create().
1881 * platform/StreamingTextDecoder.cpp:
1882 (WebCore::StreamingTextDecoder::create):
1883 (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
1884 * platform/StreamingTextDecoder.h:
1885 StreamingTextDecoder is just an abstract interface to implementations now.
1887 * platform/StreamingTextDecoderICU.cpp: Added.
1888 (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
1889 (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
1890 (WebCore::StreamingTextDecoderICU::releaseICUConverter):
1891 (WebCore::StreamingTextDecoderICU::textEncodingSupported):
1892 (WebCore::StreamingTextDecoderICU::convertUTF16):
1893 (WebCore::StreamingTextDecoderICU::convertIfASCII):
1894 (WebCore::StreamingTextDecoderICU::createICUConverter):
1895 (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
1896 (WebCore::StreamingTextDecoderICU::convertUsingICU):
1897 (WebCore::StreamingTextDecoderICU::convert):
1898 (WebCore::StreamingTextDecoderICU::toUnicode):
1899 (WebCore::StreamingTextDecoderICU::fromUnicode):
1900 * platform/StreamingTextDecoderICU.h: Added.
1901 Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
1902 supported by the decoder; minor cleanup.
1904 * platform/TextEncoding.cpp:
1905 (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
1906 (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
1907 (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
1909 * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
1911 * platform/mac/StreamingTextDecoderMac.cpp: Added.
1912 (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
1913 (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
1914 (WebCore::StreamingTextDecoderMac::releaseTECConverter):
1915 (WebCore::StreamingTextDecoderMac::textEncodingSupported):
1916 (WebCore::StreamingTextDecoderMac::convertUTF16):
1917 (WebCore::StreamingTextDecoderMac::convertIfASCII):
1918 (WebCore::StreamingTextDecoderMac::createTECConverter):
1919 (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
1920 (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
1921 (WebCore::StreamingTextDecoderMac::convertUsingTEC):
1922 (WebCore::StreamingTextDecoderMac::convert):
1923 (WebCore::StreamingTextDecoderMac::toUnicode):
1924 (WebCore::StreamingTextDecoderMac::fromUnicode):
1925 * platform/mac/StreamingTextDecoderMac.h: Added.
1926 (WebCore::StreamingTextDecoderMac::convert):
1927 This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
1929 * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
1931 * WebCore.xcodeproj/project.pbxproj:
1933 === Safari-521.17 ===
1935 2006-07-14 Timothy Hatcher <timothy@apple.com>
1937 <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
1939 Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
1940 DOMEventTarget protocol that works with GCC 5412.
1942 Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.
1944 Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
1945 we import <Cocoa/Cocoa.h> in the prefix header for ObjC.
1947 * WebCore.xcodeproj/project.pbxproj:
1948 * bindings/objc/DOMCore.h:
1949 * bindings/objc/DOMEvents.h:
1950 * bridge/mac/FormDataMac.h:
1951 * bridge/mac/WebCoreAXObject.h:
1952 * bridge/mac/WebCoreCache.h:
1953 * bridge/mac/WebCoreEncodings.h:
1954 * bridge/mac/WebCoreFrameBridge.h:
1955 * bridge/mac/WebCoreFrameNamespaces.h:
1956 * bridge/mac/WebCoreJavaScript.h:
1957 * bridge/mac/WebCorePageBridge.h:
1958 * bridge/mac/WebCorePageState.h:
1959 * bridge/mac/WebCoreResourceLoader.h:
1960 * bridge/mac/WebCoreScriptDebugger.h:
1961 * bridge/mac/WebCoreSettings.h:
1962 * bridge/mac/WebCoreStringTruncator.h:
1963 * bridge/mac/WebCoreStringTruncator.mm:
1964 * bridge/mac/WebCoreTextDecoder.h:
1965 * bridge/mac/WebDashboardRegion.h:
1966 * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
1967 * platform/mac/CookieJar.mm:
1968 * platform/mac/DeprecatedStringMac.mm:
1969 * platform/mac/FontDataMac.mm:
1970 * platform/mac/FoundationExtras.h:
1971 * platform/mac/TextBoundaries.mm:
1972 * platform/mac/WebCoreHistory.h:
1973 * platform/mac/WebCoreHistory.m:
1974 * platform/mac/WebCoreKeyGenerator.h:
1975 * platform/mac/WebCoreTextArea.h:
1976 * platform/mac/WebCoreTextField.h:
1977 * platform/mac/WebCoreTextRenderer.h:
1978 * platform/mac/WebCoreView.h:
1979 * platform/mac/WebCoreWidgetHolder.h:
1981 2006-07-14 Geoffrey Garen <ggaren@apple.com>
1985 - Updated ScriptInterpreter to work with Interpreter ref-counting in
1988 (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
1991 2006-07-14 Anders Carlsson <acarlsson@apple.com>
1993 Reviewed by Adele and Justin.
1995 http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
1996 <rdar://problem/4613948>
1997 REGRESSION: Check Spelling does not work in textarea elements
1999 * bridge/mac/FrameMac.mm:
2000 (WebCore::FrameMac::advanceToNextMisspelling):
2001 Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
2002 is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
2003 indices respectively.
2006 (WebCore::Range::checkNodeBA):
2007 Allow range operations on shadow trees.
2009 * manual-tests/form-element-spelling.html: Added.
2011 2006-07-14 Beth Dakin <bdakin@apple.com>
2015 Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in
2016 WebCore::FrameView::updateOverflowStatus
2018 m_viewportRenderer is never initialized for framesets, and it
2019 shouldn't be. So we just need to nil-check for it in
2020 updateOverflowStatus() and return early.
2022 * page/FrameView.cpp:
2023 (WebCore::FrameView::updateOverflowStatus): Nil check.
2025 2006-07-14 Adele Peterson <adele@apple.com>
2029 Backing out fix for <rdar://problem/4604703>
2030 REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2032 Darin had a better fix in WebKit for this.
2034 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2036 2006-07-14 Adele Peterson <adele@apple.com>
2040 - Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs
2042 * page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
2043 * bridge/mac/FrameMac.h: ditto.
2044 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
2045 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
2046 if the input manager says there's marked text. I added this code for all text field paths. For widgets, WebCoreTextField.mm
2047 has code to deal with this case. But as we convert search, password, and isindex, they will need to do this check too.
2049 2006-07-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
2053 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
2054 REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel mode
2056 * rendering/RenderText.cpp:
2057 (WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
2060 2006-07-14 Mitz Pettel <opendarwin.org@mitzpettel.com>
2064 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
2065 REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div
2067 Test: editing/deleting/delete-at-start-or-end.html
2069 * editing/TypingCommand.cpp:
2070 (WebCore::TypingCommand::deleteKeyPressed): Added null check.
2071 (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2073 2006-07-14 David Kilzer <ddkilzer@kilzer.net>
2075 Reviewed by Geoffrey.
2077 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
2078 Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()
2080 No test cases since there is no change in functionality.
2082 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2083 (WebCore::JSHTMLOptionsCollection::setLength): Simplified logic by using the
2084 no-argument getNumber() method.
2086 2006-07-14 Geoffrey Garen <ggaren@apple.com>
2090 - Build fix: don't need BLOCK_OBJC_EXCEPTIONS because we already have
2091 one surrounding this function, and the nested one makes the compiler
2092 think our local variable is volatile (seems like a compiler bug to me).
2094 * bridge/mac/FrameMac.mm:
2095 (WebCore::FrameMac::sendContextMenuEvent):
2097 2006-07-14 Timothy Hatcher <timothy@apple.com>
2101 Make JavaScriptCore a public framework. Adjusted the paths.
2103 * WebCore.xcodeproj/project.pbxproj:
2105 2006-07-14 Maciej Stachowiak <mjs@apple.com>
2109 - fixed <rdar://problem/4567031> REGRESSION: Crash at WebCore::RenderBlock::createLineBoxes (seems to be a security hole?)
2111 I also fixed all the similar crash / assertion failure cases I could think of.
2114 (WebCore::Node::nextRendererWithSameParent): Helper function for some of the above.
2116 * rendering/RenderTable.cpp:
2117 (WebCore::RenderTable::addChild): Don't allow inserting forms when not in
2118 an HTML document, since we don't need that quirk and because parsing won't
2119 do certain render tree fixups. Also watch out for case when inserting before
2120 the renderer of a misnested child.
2121 * rendering/RenderTableRow.cpp:
2122 (WebCore::RenderTableRow::addChild): ditto
2123 * rendering/RenderTableSection.cpp:
2124 (WebCore::RenderTableSection::addChild): ditto
2126 2006-07-13 Adele Peterson <adele@apple.com>
2130 - Fix for <rdar://problem/4604703>
2131 REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2134 * manual-tests/password-ctrl-click-lose-focus.html: Added.
2136 * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2137 If we're about to set a selection in the current view, make sure its the first responder.
2138 In this case, this will cause the password field to resign first responder at the right time.
2140 2006-07-13 Mitz Pettel <opendarwin.org@mitzpettel.com>
2144 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
2145 REGRESSION: RTL white-space:pre-wrap text is offset to the right
2147 Test: fast/text/international/rtl-white-space-pre-wrap.html
2149 * rendering/RenderText.cpp:
2150 (WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case
2151 of clipping the caret position to the text box when the caret is after
2152 the trailing space of an autowrapped line.
2153 * rendering/bidi.cpp:
2154 (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate-
2155 to-fit the logically last text box if it contains the trailing spaces of an
2157 (WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run.
2158 In the case of autowrapped text with white space that overflows beyond the line,
2159 the last text run is the one containing the overflowing white space.
2160 (WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a
2161 line that autowraps only after white space into a separate text run.
2163 2006-07-13 David Harrison <harrison@apple.com>
2165 Reviewed by Dave Hyatt.
2167 <rdar://problem/4624203> -webkit-highlight should be behind images
2169 * rendering/RenderImage.cpp:
2170 (WebCore::RenderImage::paint):
2171 * rendering/RenderListMarker.cpp:
2172 (WebCore::RenderListMarker::paint):
2173 * rendering/RenderWidget.cpp:
2174 (WebCore::RenderWidget::paint):
2175 Call custom highlighter before painting the image, marker, or widget.
2177 2006-07-13 David Harrison <harrison@apple.com>
2179 Reviewed by Justin and Levi.
2181 <rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
2184 editing/deleting/delete-by-word-001.html
2185 editing/deleting/delete-by-word-002.html
2187 * editing/TypingCommand.cpp:
2188 (WebCore::TypingCommand::deleteKeyPressed):
2189 (WebCore::TypingCommand::forwardDeleteKeyPressed):
2190 (WebCore::TypingCommand::doApply):
2191 * editing/TypingCommand.h:
2192 Delete and forward delete to use specified granularity.
2193 Undo of delete and forward delete to select what had been deleted (non-char granularity only).
2196 (WebCore::Frame::setSelection):
2197 Close typing and end style even if selection is not changing.
2199 Remove unused setSelection parameter keepTypingStyle.
2201 2006-07-12 Levi Weintraub <lweintraub@apple.com>
2205 <rdar://problem/4622763> Deleting from beginning of paragraph following a table deletes rather than selects the table
2207 * editing/DeleteSelectionCommand.cpp:
2208 (WebCore::DeleteSelectionCommand::initializeStartEnd): Added selection expansion for HRs.
2209 (WebCore::DeleteSelectionCommand::initializePositionData): Now uses enclosingBlockFlowOrTableElement
2210 instead of enclosingBlockFlowElement.
2211 (WebCore::DeleteSelectionCommand::removeNode): Use to identify that we need a placeholder
2212 when the start or end block is removed.
2213 (WebCore::DeleteSelectionCommand::handleGeneralDelete): Added check for canHaveChildrenForEditing
2214 to keep things like HRs from being given children.
2215 (WebCore::DeleteSelectionCommand::doApply): Switched to use member variable for needPlaceholder.
2216 * editing/DeleteSelectionCommand.h: Made needPlaceholder a member variable.
2217 * editing/TypingCommand.cpp:
2218 (WebCore::TypingCommand::deleteKeyPressed): Fixed selection bug for tables and open typing commands.
2219 (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2220 * editing/htmlediting.cpp:
2221 (WebCore::editingIgnoresContent): Added check for HRs, since it's not considered a widget.
2222 * editing/visible_units.cpp:
2223 (WebCore::startOfParagraph): Fix for HRs and tables.
2224 (WebCore::endOfParagraph): Ditto.
2226 2006-07-13 Alexey Proskuryakov <ap@nypop.com>
2230 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9880
2231 Memory leaks running DOM-Hanoi
2233 No change in behavior, thus no test included.
2235 * bridge/mac/FrameMac.mm:
2236 (WebCore::FrameMac::setStatusBarText): Use a local autorelease pool to release the temporaries -
2237 the test runs non-stop, and the enclosing pool doesn't get a chance to be drained.
2239 2006-07-12 Mitz Pettel <opendarwin.org@mitzpettel.com>
2243 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9862
2244 REGRESSION: GMail: Crash in RenderView::repaintViewRectangle when spoofing as FF
2245 - see also <rdar://problem/4622407>
2247 Test: fast/frames/repaint-display-none-crash.html
2249 * rendering/RenderView.cpp:
2250 (WebCore::RenderView::repaintViewRectangle): Added null checking of the owner element's
2251 renderer, which can be null if the iframe is set to display:none.
2253 2006-07-12 Justin Garcia <justin.garcia@apple.com>
2257 <rdar://problem/4509393>
2258 selected DOM range starts with <object>, 0 offset but selection should include the <object>
2260 * editing/ReplaceSelectionCommand.cpp:
2261 (WebCore::ReplaceSelectionCommand::shouldMergeStart):
2262 Don't pull content out of a table cell.
2263 * editing/htmlediting.cpp:
2264 (WebCore::editingIgnoresContent): Added <select> nodes.
2265 (WebCore::rangeCompliantEquivalent): Convert [node, 0] positions to positionBeforeNode(node)
2266 for more types of nodes.
2267 * rendering/RenderContainer.cpp:
2268 (WebCore::RenderContainer::positionForCoordinates):
2269 Fix a crasher when right clicking on an anonymous table.
2271 2006-07-12 John Sullivan <sullivan@apple.com>
2273 Reviewed by Brady Eidson
2275 - fixed <rdar://problem/4611164> REGRESSION: Crash occurs when undoing a series of
2276 misspelled words (WebCore::RenderObject::repaint(bool)
2279 (WebCore::Document::removeMarkers):
2280 put (it - markers.begin()) in a local variable before altering markers, in every case where this was
2281 happening. One of the cases like this was fixed a while back, but other cases were
2282 either missed at that time or crept in since.
2284 2006-07-13 Anders Carlsson <acarlsson@apple.com>
2288 http://bugzilla.opendarwin.org/show_bug.cgi?id=9663
2289 REGRESSION (r14948-r14956): Selection in text field remains highlighted when the text field loses focus
2292 (WebCore::Document::updateSelection):
2293 Don't return early if the selection is empty.
2295 2006-07-12 Anders Carlsson <acarlsson@apple.com>
2299 <rdar://problem/4614656> REGRESSION: onpaste() handlers don't run for textarea elements
2301 * bridge/mac/FrameMac.mm:
2302 (WebCore::FrameMac::dispatchCPPEvent):
2303 If the element is a shadow node, dispatch the event to its real parent.
2305 * manual-tests/textarea-onpaste.html: Added.
2307 2006-07-12 Beth Dakin <bdakin@apple.com>
2311 Fix for layout test regressions after my check-in last night. Just
2312 a silly mistake where I should have asked if we were NOT printing
2313 instead of if we were in the listbox code.
2315 * WebCore.xcodeproj/project.pbxproj: Project file wars. Back to
2317 * platform/mac/ListBoxMac.mm:
2318 (itemTextRenderer): Inverted check.
2319 (groupLabelTextRenderer): Inverted check.
2321 2006-07-12 Darin Adler <darin@apple.com>
2325 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9806
2326 <rdar://problem/4622622>
2327 REGRESSION: Large rowspan causes WebKit to call abort()
2329 Test: fast/table/large-rowspan-crash.html
2331 * rendering/RenderTableSection.cpp:
2332 (WebCore::RenderTableSection::ensureRows):
2333 Use sizeof(RowStruct) instead of sizeof(int).
2334 Clearly we'll need something better to solve this completely.
2335 I expect another smaller, but still huge, value will still cause a problem.
2337 2006-07-12 Anders Carlsson <acarlsson@apple.com>
2341 <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const
2343 * bridge/mac/FrameMac.h:
2344 Add focusCallResultedInViewBeingCreated argument.
2346 * bridge/mac/FrameMac.mm:
2347 (WebCore::FrameMac::nextKeyViewInFrame):
2348 If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.
2350 (WebCore::FrameMac::nextKeyViewInFrameHierarchy):
2351 Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
2352 a text field as the first responder if its field editor already is the current first responder.
2354 * page/FrameView.cpp:
2355 (WebCore::FrameView::handleMousePressEvent):
2356 In some cases, get the event target node again after dispatching the mouse event.
2358 2006-07-12 Beth Dakin <bdakin@apple.com>
2362 Fix for <rdar://problem/4615765> Input[type='search' fields
2363 initially render too large in Widgets
2365 Fundamentally, the problem here is that we were miscalculating
2366 things because [NSGraphicsContext currentContextDrawingToScreen]
2367 was evaluating to false when widgets first load. We only ever used
2368 this check, however, to determine if we were printing or not, so it
2369 should not have evaluated to false for loading in Dashbaord.
2370 Instead, if we query the RenderView about whether or not we are
2371 printing, we will get the right answer.
2373 No test case added since this appears only to affect Dashboard.
2375 * bridge/mac/WebCoreFrameBridge.mm:
2376 (-[WebCoreFrameBridge drawRect:]): Ask the RenderView if we are
2377 printing instead. This is not part of the actual bug fix, but it
2378 seems wise to get rid of all calls to [NSGraphicsContext
2379 currentContextDrawingToScreen] when we are just trying to determine
2380 if we are printing or not.
2381 * platform/mac/ListBoxMac.mm:
2382 (itemTextRenderer):This function now takes a boolean, isPrinting.
2383 (groupLabelTextRenderer): Same as above.
2384 (ListBox::sizeForNumberOfLines): Ask the RenderView if we are
2386 (-[WebCoreTableView drawRow:clipRect:]): Same as above.
2387 * platform/mac/PopUpButtonMac.mm:
2388 (PopUpButton::sizeHint): Same as above.
2389 * platform/mac/TextFieldMac.mm:
2390 (-[NSSearchFieldCell _addStringToRecentSearches:]):
2391 * rendering/RenderLineEdit.cpp: Same as above.
2393 2006-07-12 Adele Peterson <adele@apple.com>
2397 Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9813
2398 OPTION text can paint over select element's scrollbar
2400 Test: fast/forms/option-text-clip.html
2402 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::paintObject):
2403 When calculating the clip to apply to the button text, also consider padding.
2404 In the future, we may have separate renderers for the text part, and the arrow part
2405 of the control, and then the separation should be natural. For now, we use padding.
2407 2006-07-11 David Kilzer <ddkilzer@kilzer.net>
2409 Windows build fix. Reviewed by NOBODY.
2411 * WebCore.vcproj/WebCore/WebCore.vcproj: Added JSHTMLOptionsCollection.cpp/h
2412 and JSHTMLOptionsCollectionCuston.cpp. VC++ Express realphabetized the file list.
2414 2006-07-11 Darin Adler <darin@apple.com>
2418 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9809
2419 <rdar://problem/4619515>
2420 focus ring fails to appear on select element after choosing item from popup
2422 - includes http://bugzilla.opendarwin.org/show_bug.cgi?id=9853
2423 improvements to select element, including some storage leak fixes
2425 * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::index): Use a const
2426 reference for the list items, so we don't have to copy a vector.
2427 * html/HTMLSelectElement.cpp:
2428 (WebCore::HTMLSelectElement::selectedIndex): Ditto.
2429 (WebCore::HTMLSelectElement::setSelectedIndex): Ditto.
2430 (WebCore::HTMLSelectElement::length): Ditto.
2431 (WebCore::HTMLSelectElement::remove): Ditto.
2432 (WebCore::HTMLSelectElement::value): Ditto.
2433 (WebCore::HTMLSelectElement::setValue): Ditto.
2434 (WebCore::HTMLSelectElement::stateValue): Ditto.
2435 (WebCore::HTMLSelectElement::restoreState): Ditto.
2436 (WebCore::HTMLSelectElement::appendFormData): Ditto.
2437 (WebCore::HTMLSelectElement::optionToListIndex): Ditto.
2438 (WebCore::HTMLSelectElement::listToOptionIndex): Ditto.
2439 (WebCore::HTMLSelectElement::recalcListItems): Made const, with the appropriate
2441 (WebCore::HTMLSelectElement::reset): Use a const reference for
2442 the list items, so we don't have to copy the vector. Remove the call to
2443 setSelectionChanged for the RenderMenuList case.
2444 (WebCore::HTMLSelectElement::notifyOptionSelected): Ditto, on both counts.
2445 (WebCore::HTMLSelectElement::defaultEventHandler): Call focus() before showing
2447 * html/HTMLSelectElement.h: The RenderMenuList class is no longer a friend.
2448 Changed the listItems function to return a const reference to the vector so
2449 it no longer copies the vector. Removed the const_cast to the call to
2450 recalcListItems and changed it to a const member function. Made m_recalcListItems
2452 * rendering/DeprecatedRenderSelect.cpp:
2453 (WebCore::DeprecatedRenderSelect::updateFromElement): Removed an unnecessary call
2454 to recalcListItems, which is called automatically. Use a const reference for the
2455 list items so we don't have to copy a vector.
2456 (WebCore::DeprecatedRenderSelect::layout): Ditto.
2457 (WebCore::DeprecatedRenderSelect::selectionChanged): Ditto.
2458 (WebCore::DeprecatedRenderSelect::updateSelection): Ditto.
2459 * rendering/RenderMenuList.cpp:
2460 (WebCore::RenderMenuList::RenderMenuList): Updated for renamed data members.
2461 (WebCore::RenderMenuList::createInnerBlock): Ditto.
2462 (WebCore::RenderMenuList::addChild): Ditto.
2463 (WebCore::RenderMenuList::removeChild): Ditto.
2464 (WebCore::RenderMenuList::setStyle): Ditto. Also removed code to set the style
2465 on the pop-up menu, because it's created with the correct style and destroyed
2466 before it a style change could occur.
2467 (WebCore::RenderMenuList::updateFromElement): Rearranged code to compute the
2468 maximum width in a simpler fashion, and to not bother trying to maintain
2469 the "selected" flags on the elements, since the HTMLSelectElement class
2470 takes care of that. Store the width as an int. Call setText to set the text
2471 based on the selected element's option text.
2472 (WebCore::RenderMenuList::paintObject): Don't check m_inner when setting
2473 up the clip -- always set up the clip.
2474 (WebCore::RenderMenuList::calcMinMaxWidth): Use m_optionsWidth directly
2475 instead of calling ceilf on m_longestWidth.
2476 (WebCore::RenderMenuList::showPopup): Don't use m_popupMenu to store the
2477 menu -- instead keep the pointer in a local variable. Get the selected
2478 index from the HTMLSelectElement.
2479 (WebCore::RenderMenuList::valueChanged): Call HTMLSelectElement::setSelectedIndex
2480 to do most of the work.
2481 * rendering/RenderMenuList.h: Renamed m_inner to m_innerBlock. Removed
2482 m_popupMenu, m_size, m_selectionChanged, and m_selectedIndex. Renamed
2483 m_longestWidth to m_optionsWidth and changed it to be an int. Removed
2484 unneeded override of removeLeftoverAnonymousBoxes function. Removed
2485 unneeded selectionChanged, setSelectionChanged, updateSelection, and
2486 hasPopupMenu functions. Removed extra includes.
2487 * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate):
2488 Change to iterate the list items instead of iterating all children
2490 * rendering/RenderPopupMenu.h: Renamed getRenderMenuList to menuList.
2491 * rendering/RenderPopupMenuMac.mm:
2492 (WebCore::RenderPopupMenuMac::populate): Moved code to clear and create
2493 the pop-up here from the caller. Removed an extra retain that would cause
2494 the NSPopUpButtonCell to leak.
2495 (WebCore::RenderPopupMenuMac::showPopup): Removed unnecessary code to
2496 create the pop-up, which is now in populate, and also the call to the
2497 clear function, for the same reason. Reorganized code to make it a bit
2498 more readable. Removed an unnecessary if to check if frame is nil.
2499 Used a RefPtr to make sure we don't make a call on a frame after it's
2500 deleted. As part of the reorganization fixed a problem where we'd retain
2501 the event and then return early without releasing it in one case.
2502 (WebCore::RenderPopupMenuMac::addSeparator): Tweaked a little.
2503 (WebCore::RenderPopupMenuMac::addGroupLabel): Grouped all the code to
2504 manage the NSMenu at the bottom of the function.
2505 (WebCore::RenderPopupMenuMac::addOption): Ditto.
2507 2006-07-11 Justin Garcia <justin.garcia@apple.com>
2511 <rdar://problem/4620686>
2512 REGRESSION: Mispelling markers are still displayed when using the delete key to place caret into a misspelled word
2514 * bridge/mac/FrameMac.mm:
2515 (WebCore::FrameMac::respondToChangedSelection): Remove markers from newAdjacentWords
2516 even if oldAdjacentWords is equal to newAdjacentWords. This happens during a deletion.
2519 2006-07-11 Tim Omernick <timo@apple.com>
2521 Reviewed by NOBODY (build fix)
2523 * bindings/objc/DOMPrivate.h:
2524 Don't @class NPObject; that breaks files that actually #import <JavaScriptCore/npruntime.h>, since the NPObject
2525 there is of a different type.
2526 Also clarified a highly misleading comment from my last commit. I meant to clarify the comment
2529 2006-07-12 Anders Carlsson <acarlsson@apple.com>
2533 http://bugzilla.opendarwin.org/show_bug.cgi?id=9635
2534 REGRESSION: Crash when adding to cart at <http://www.yemeksepeti.com/>
2536 * html/HTMLTokenizer.cpp:
2537 (WebCore::HTMLTokenizer::scriptHandler):
2538 Don't load external scripts if the parser is stopped.
2540 * manual-tests/open-close-tokenizer-crash.html: Added.
2541 * manual-tests/resources/empty-file.js: Added.
2542 * manual-tests/resources/open-close-tokenizer-crash.html: Added.
2545 2006-07-11 John Sullivan <sullivan@apple.com>
2547 Reviewed by Kevin, Timo O, Brady, Darin, and Hyatt (whee!)
2549 - added support for creating a selection image with white text
2551 * rendering/RenderObject.h:
2553 add PaintRestriction enum
2554 (WebCore::RenderObject::PaintInfo::PaintInfo):
2555 add forceWhiteText boolean to PaintInfo struct
2557 * page/FramePrivate.h:
2558 (WebCore::FramePrivate::FramePrivate):
2559 replaced m_selectionOnly bool with m_paintRestriction, which also handles forcing the
2563 (WebCore::Frame::paint):
2564 updated to use & pass m_paintRestriction where it used to use & pass just m_selectionOnly
2566 * bridge/mac/FrameMac.h:
2567 * bridge/mac/FrameMac.mm:
2568 (WebCore::FrameMac::selectionImage):
2569 now takes forceWhiteText parameter, stored in FramePrivate as part of PaintRestriction
2571 * bridge/mac/WebCoreFrameBridge.h:
2572 * bridge/mac/WebCoreFrameBridge.mm:
2573 (-[WebCoreFrameBridge selectionImageForcingWhiteText:]):
2574 renamed from selectionImage, now takes forceWhiteText parameter, which is passed
2577 * rendering/RenderLayer.h:
2578 * rendering/RenderLayer.cpp:
2579 (WebCore::RenderLayer::paint):
2580 use a PaintRestriction value where we used to use a selectionOnly bool
2581 (WebCore::RenderLayer::paintLayer):
2582 ditto; also stores forceWhiteText in PaintInfo struct
2584 * kcanvas/KCanvasResources.cpp:
2585 (WebCore::KCanvasMarker::draw):
2586 updated for changed signature of PaintInfo constructor
2588 * ksvg2/svg/SVGMaskElement.cpp:
2589 (WebCore::SVGMaskElement::drawMaskerContent):
2592 * ksvg2/svg/SVGPatternElement.cpp:
2593 (WebCore::SVGPatternElement::drawPatternContentIntoTile):
2596 * rendering/InlineTextBox.cpp:
2597 (WebCore::InlineTextBox::paint):
2598 paint with white text color if forceWhiteText is set in PaintInfo struct
2600 2006-07-11 Tim Omernick <timo@apple.com>
2604 <http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
2605 Give Netscape plug-ins access to their own DOM element
2607 * html/HTMLPlugInElement.h:
2608 Just import JSC headers on Mac. The NPObject and Bindings::Instance stuff is only used on Mac anyway.
2609 Changed __APPLE__ to PLATFORM(MAC).
2610 Added m_NPObject ivar.
2611 * html/HTMLPlugInElement.cpp:
2612 (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2613 Initialize the NPObject.
2614 (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
2615 Release the NPObject when the element is destroyed.
2616 (WebCore::HTMLPlugInElement::createNPObject):
2617 Creates an NPObject for the element.
2618 (WebCore::HTMLPlugInElement::getNPObject):
2619 Returns the NPObject for the element, creating and caching it if necessary.
2621 * html/HTMLAppletElement.h:
2622 Changed __APPLE__ to PLATFORM(MAC).
2623 * html/HTMLAppletElement.cpp:
2625 * html/HTMLEmbedElement.h:
2627 * html/HTMLEmbedElement.cpp:
2629 * html/HTMLObjectElement.h:
2631 * html/HTMLObjectElement.cpp:
2634 * bindings/objc/DOMPrivate.h:
2635 Added -[DOMElement _NPObject].
2637 * bindings/objc/DOM.mm:
2638 (-[DOMElement _NPObject]):
2639 Returns the NPObject for the element. Since this is only needed by the Netscape plug-in API, you can only get
2640 the NPObject for applet, embed, and object elements.
2642 2006-07-11 Adele Peterson <adele@apple.com>
2646 - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9861
2647 REGRESSION: Can't dynamically change list box to popup
2649 and updated fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
2650 REGRESSION: Can't dynamically change popup to list box
2652 The original fix for 9859 was in the renderer, and I think we can catch the change
2653 earlier in the element to detach and reattach.
2655 I also did some cleanup to remove the PopupButton code path from DeprecatedRenderSelect
2657 Test: fast/forms/select-change-listbox-to-popup.html
2659 * html/HTMLSelectElement.cpp:
2660 (WebCore::HTMLSelectElement::parseMappedAttribute): If the new attribute value is going to require us to change from listbox to popup or vice versa,
2661 and we're already attached, then detach and reattach to create the correct renderer. If we're not attached, then we'll create the correct renderer
2663 (WebCore::HTMLSelectElement::recalcStyle): Updated shouldUseMenuList since it no longer takes a RenderStyle.
2664 (WebCore::HTMLSelectElement::isKeyboardFocusable): ditto.
2665 (WebCore::HTMLSelectElement::isMouseFocusable): ditto.
2666 (WebCore::HTMLSelectElement::createRenderer): ditto.
2667 (WebCore::HTMLSelectElement::setRecalcListItems): ditto.
2668 (WebCore::HTMLSelectElement::reset): ditto.
2669 (WebCore::HTMLSelectElement::notifyOptionSelected): ditto.
2670 (WebCore::HTMLSelectElement::defaultEventHandler): ditto.
2672 * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList):
2673 This method no longer takes a RenderStyle. That was leftover from when we used to use the appearance
2674 to determine whether or not to use the new menu list implementation.
2676 * rendering/DeprecatedRenderSelect.h: Removed PopupButton code path.
2677 * rendering/DeprecatedRenderSelect.cpp:
2678 (WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
2679 (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
2680 (WebCore::DeprecatedRenderSelect::updateFromElement):
2681 (WebCore::DeprecatedRenderSelect::baselinePosition):
2682 (WebCore::DeprecatedRenderSelect::layout):
2683 (WebCore::DeprecatedRenderSelect::updateSelection):
2685 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
2686 Backed out previous fix since this is now done in HTMLSelectElement.
2688 2006-07-11 Adele Peterson <adele@apple.com>
2692 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
2693 REGRESSION: Can't dynamically change popup to list box
2695 Test: fast/forms/select-change-popup-to-listbox.html
2697 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
2698 If the select element has the multiple property set, or has a size > 1, then it
2699 really should be a list box, so we detach and attach the element so it creates the
2700 correct type of renderer.
2702 2006-07-11 John Sullivan <sullivan@apple.com>
2704 Reviewed by Beth Dakin and Tim Omernick
2706 - fixed <rdar://problem/4622794> HiDPI: dragging the selection in Safari can show pixel cracks
2707 at non-integral scale factors
2709 * bridge/mac/FrameMac.mm:
2710 (WebCore::FrameMac::imageFromRect):
2711 round image rect in window coordinate space
2713 2006-07-10 Darin Adler <darin@apple.com>
2717 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9811
2718 rdar://problem/4619572
2719 OPTION text contained in OPTGROUP appears at the wrong size
2722 * dom/Node.cpp: (WebCore::Node::renderStyle): Made a const member function.
2723 The derived classes were overriding with const member functions, and I could
2724 change either this or the derived -- decided to do this.
2726 2006-07-10 Darin Adler <darin@apple.com>
2730 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9810
2731 rdar://problem/4619534
2732 OPTGROUP label text is using the default font instead of Lucida Grande
2734 * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize):
2735 Code wants the family name, but was calling fontName, which is not the same thing.
2736 Also removed the unneeded conversion to DeprecatedString.
2738 === Safari-521.16 ===
2740 2006-07-10 David Kilzer <ddkilzer@kilzer.net>
2744 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
2745 Implement select.options.add() method
2748 - fast/dom/select-selectedIndex-multiple.html
2749 - fast/dom/select-selectedIndex.html
2750 - fast/js/select-options-add.html
2752 * DerivedSources.make: Added JSHTMLOptionsCollection.h.
2753 * ForwardingHeaders/kjs/operations.h: Added.
2754 * WebCore.xcodeproj/project.pbxproj: Added new source files.
2755 * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
2756 (WebCore::JSHTMLOptionsCollection::length):
2757 (WebCore::JSHTMLOptionsCollection::setLength):
2758 (WebCore::JSHTMLOptionsCollection::indexSetter):
2759 * bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
2760 Renamed classes and methods for consistency.
2761 (KJS::JSHTMLElement::selectGetter):
2762 (KJS::JSHTMLElement::put):
2763 (KJS::JSHTMLElement::selectSetter):
2764 (KJS::JSHTMLCollection::JSHTMLCollection):
2765 (KJS::JSHTMLCollectionProtoFunc::callAsFunction):
2766 (KJS::getHTMLOptionsCollection):
2767 * bindings/js/kjs_html.h: Ditto.
2768 * bindings/scripts/CodeGeneratorJS.pm: Added support for HasCustomIndexSetter class attribute.
2769 Added support for Optional parameter attribute, which makes generated code assume overloaded
2770 implementation methods are available for a JavaScript function with optional arguments. Changed
2771 local 'impl' variables to 'imp' so that impl() methods could be called without class designation.
2772 * html/HTMLOptionElement.idl: Added GenerateNativeConverter attribute.
2773 * html/HTMLOptionsCollection.cpp: Added methods used by generated JSHTMLOptionsCollection class.
2774 (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
2775 (WebCore::HTMLOptionsCollection::add):
2776 (WebCore::HTMLOptionsCollection::selectedIndex):
2777 (WebCore::HTMLOptionsCollection::setSelectedIndex):
2778 (WebCore::HTMLOptionsCollection::setLength):
2779 * html/HTMLOptionsCollection.h: Ditto.
2780 * html/HTMLOptionsCollection.idl: Added.
2782 2006-07-10 David Harrison <harrison@apple.com>
2784 Reviewed by Dave Hyatt.
2786 <rdar://problem/4602408> -webkit-highlight needs to support images and elements other than text
2788 * rendering/RenderBox.cpp:
2789 (WebCore::RenderBox::paintCustomHighlight):
2790 * rendering/RenderBox.h:
2791 Utility for subclasses.
2793 * rendering/RenderImage.cpp:
2794 (WebCore::RenderImage::paint):
2795 Custom highlight in front of images.
2797 * rendering/RenderListMarker.cpp:
2798 (WebCore::RenderListMarker::paint):
2799 Custom highlight in front of list markers.
2801 * rendering/RenderWidget.cpp:
2802 (WebCore::RenderWidget::paint):
2803 Custom highlight in front of objects.
2805 2006-07-10 David Hyatt <hyatt@apple.com>
2807 <rdar://problem/4620557> REGRESSION: In a mail message, text isn't painted
2808 correctly after choosing Redo Typing
2810 Better fix for repainting issue with positioned objects when height
2811 changes. Optimize when only a positioned child changes so that we don't
2812 incorrectly do normal flow layout.
2816 * WebCore.xcodeproj/project.pbxproj:
2817 * rendering/RenderBlock.cpp:
2818 (WebCore::RenderBlock::layoutBlock):
2819 * rendering/RenderFlexibleBox.cpp:
2820 (WebCore::RenderFlexibleBox::layoutBlock):
2821 * rendering/RenderTable.cpp:
2822 (WebCore::RenderTable::layout):
2823 * rendering/RenderView.cpp:
2824 (WebCore::RenderView::layout):
2825 * rendering/bidi.cpp:
2826 (WebCore::RenderBlock::layoutInlineChildren):
2828 2006-07-10 Adele Peterson <adele@apple.com>
2832 - Fix for <rdar://problem/4621442> REGRESSION (NativePopup) : Popup menus aren't drawn correctly on page at orbitz.com; cheaptickets.com
2834 Test: fast/forms/select-style.html
2836 * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::isControlStyled):
2837 Don't let popups be style-able for now. We'll allow it later, when we
2838 have a good way to handle border & backgrounds and still having it look like a control.
2840 2006-07-10 Justin Garcia <justin.garcia@apple.com>
2842 Reviewed by harrison
2844 <rdar://problem/4619260>
2845 9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
2846 <rdar://problem/4619841>
2847 REGRESSION: Dragging selection over input field results in a crash (WebCore::maxDeepOffset(WebCore::Node const*)
2849 * WebCore.xcodeproj/project.pbxproj:
2850 * editing/Selection.cpp:
2851 (WebCore::Selection::adjustForEditableContent): Iterate using next/previousVisuallyDistinctCandidate
2852 instead of traverseNext/Previous node because we were skipping positions. Jump out of shadow trees.
2853 Migrate to isEditablePosition instead of isContentEditable.
2856 2006-07-10 Beth Dakin <bdakin@apple.com>
2860 Shuffling comments around from my last check-in to make things read
2864 * page/DOMWindow.idl:
2866 2006-07-10 Beth Dakin <bdakin@apple.com>
2870 Fix for <rdar://problem/4621095> The should be a way to
2871 access the user interface scale factor through the DOM
2873 window.devicePixelRatio returns the user interface scale factor.
2875 * page/DOMWindow.cpp:
2876 (WebCore::DOMWindow::devicePixelRatio):
2878 * page/DOMWindow.idl:
2880 2006-07-10 Brady Eidson <beidson@apple.com>
2884 Resolved the console error messages people got from the new DB even if they didn't have it enabled
2886 * icon/IconDatabase.cpp:
2887 (WebCore::IconDatabase::pruneUnreferencedIcons):
2888 (WebCore::IconDatabase::pruneUnretainedIcons):
2889 Added quick check to bail if the DB isn't open
2891 2006-07-10 David Harrison <harrison@apple.com>
2893 Reviewed by Tim Hatcher
2896 <rdar://problem/4619260> 9A213 + Safari 521.15.1 Crash with To Do's alarm icon (WebCore::maxDeepOffset(WebCore::Node const*) )
2898 * editing/Selection.cpp:
2899 (WebCore::Selection::adjustForEditableContent):
2900 Allow for node being 0. This is a bandaid fix to prevent the crash. It will still assert in a debug build. See bug for more info.
2902 2006-07-10 Mitz Pettel <opendarwin.org@mitzpettel.com>
2906 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9808
2907 REGRESSION: Incorrect layout (and ERROR) when forcing ATSU For All Text
2909 * manual-tests/ATSU-bad-layout.html: Added.
2910 * platform/mac/FontMac.mm:
2911 (WebCore::Font::floatWidthForComplexText): Return 0 immediately for empty runs.
2913 2006-07-10 Darin Adler <darin@apple.com>
2915 - try to fix the no-SVG build
2917 * ksvg2/misc/SVGImageLoader.cpp: Move namespace brace inside the #if.
2919 2006-07-10 Darin Adler <darin@apple.com>
2923 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9833
2924 REGRESSION: Reproducible crash: RenderMenuList.cpp:58: failed assertion `!m_first'
2926 * manual-tests/empty-title-popup.html: Added.
2928 * rendering/RenderMenuList.h: Add createInnerBlock.
2929 * rendering/RenderMenuList.cpp:
2930 (WebCore::RenderMenuList::createInnerBlock): Factored out of addChild.
2931 (WebCore::RenderMenuList::addChild): Call createInnerBlock.
2932 (WebCore::RenderMenuList::setText): Changed parameter type.
2933 (WebCore::RenderMenuList::showPopup): Call createInnerBlock before calling
2934 the parent class's addChild.
2936 2006-07-10 Rob Buis <buis@kde.org>
2938 Reviewed by Maciej via IRC.
2940 Make sure the attributes are calculated against viewport width value,
2941 as defined in the spec. http://paste.lisp.org/display/22342
2943 * ksvg2/svg/SVGEllipseElement.cpp:
2944 (WebCore::SVGEllipseElement::rx): Changed LM_HEIGHT to LM_WIDTH.
2945 * ksvg2/svg/SVGLineElement.cpp:
2946 (SVGLineElement::x2): Ditto.
2948 2006-07-10 Beth Dakin <bdakin@apple.com>
2952 Fix for <rdar://problem/4610314> Support the CSS3 content property
2955 This patch provides initial support for the CSS3 content property.
2956 It lacks support for any content other than images, and only allows
2957 content for elements that seemed safe for now.
2959 * css/cssstyleselector.cpp:
2960 (WebCore::CSSStyleSelector::applyProperty): Remove restrictions for
2961 just :before and :after
2962 * html/HTMLBRElement.cpp:
2963 (WebCore::HTMLBRElement::createRenderer):
2964 * html/HTMLFrameSetElement.cpp:
2965 (WebCore::HTMLFrameSetElement::createRenderer):
2966 * html/HTMLImageElement.cpp:
2967 (WebCore::HTMLImageElement::createRenderer):
2968 * html/HTMLLegendElement.cpp:
2969 (WebCore::HTMLLegendElement::createRenderer):
2970 * rendering/RenderImage.cpp:
2971 (WebCore::RenderImage::RenderImage):
2972 (WebCore::RenderImage::setCachedImage): Don't allow the image to be
2973 set this way if it was already set with the content property.
2974 * rendering/RenderImage.h:
2975 (WebCore::RenderImage::setIsAnonymousImage): Anonymous images are
2976 those set through the content property.
2977 (WebCore::RenderImage::isAnonymousImage):
2978 * rendering/RenderObject.cpp:
2979 (WebCore::RenderObject::createObject): If there is content
2980 specified, create a RenderImage with the content and initialize the
2981 cached image to whatever was specified in the CSS.
2983 2006-07-10 Brady Eidson <beidson@apple.com>
2985 Reviewed by NOBODY (Build Fix!)
2987 * icon/SiteIcon.cpp:
2988 (SiteIcon::getImage):
2989 Release build made an "unused variable" warning, which is, of course, an error. fixed that.
2991 2006-07-10 Brady Eidson <beidson@apple.com>
2995 SQLite Icon DB now fully replicates functionality of the old DB, including pruning to keep unused
2996 information out to keep down disk usage. For now, it is still off by default, as the critical
2997 feature of importing old icons into the new DB is still unrealized.
2998 If you'd like to test, add #define ICONDEBUG to your WebKitPrefix.h
3000 * icon/IconDatabase.cpp:
3001 (WebCore::IconDatabase::IconDatabase):
3002 (WebCore::IconDatabase::open):
3003 -Sets up a timer for initial pruning
3004 (WebCore::IconDatabase::iconForPageURL):
3005 -Switched away from "dirty blob hack" as the problem is provisionally solved
3006 (WebCore::IconDatabase::retainIconForURL):
3007 (WebCore::IconDatabase::releaseIconForURL):
3008 -Same as found in WebKit
3009 (WebCore::IconDatabase::totalRetainCountForIconURL):
3010 -Adds up all retainers of icon
3011 (WebCore::IconDatabase::forgetIconForIconURLFromDatabase):
3012 -Wipes an Icon table entry out
3013 (WebCore::IconDatabase::establishTemporaryIconIDForIconURL):
3014 (WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
3015 (WebCore::IconDatabase::establishIconIDForIconURL):
3016 (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
3017 -Added ability to get an iconID without creating a new one if a lookup is all
3018 that is genuinely wanted
3019 (WebCore::IconDatabase::pruneUnreferencedIcons):
3020 (WebCore::IconDatabase::pruneUnretainedIcons):
3021 -Called on a timer on DB startup to clean it out
3022 * icon/IconDatabase.h:
3023 * icon/SiteIcon.cpp:
3024 (SiteIcon::SiteIcon):
3025 (SiteIcon::~SiteIcon):
3026 -Deletes the image on deletion
3027 (SiteIcon::getImage):
3028 -Cut down on no-longer-necessary debug info
3030 2006-07-10 Anders Carlsson <acarlsson@apple.com>
3034 http://bugzilla.opendarwin.org/show_bug.cgi?id=9245
3035 Quirksmode: Incorrect handling of disabled BUTTON elements
3037 * html/HTMLButtonElement.cpp:
3038 (WebCore::HTMLButtonElement::defaultEventHandler):
3039 Don't call prepareSubmit if the element is disabled.
3041 * html/HTMLInputElement.cpp:
3042 (WebCore::HTMLInputElement::defaultEventHandler):
3043 Don't call prepareSubmit if the element is disabled.
3045 2006-07-10 Darin Adler <darin@apple.com>
3047 - try to fix Windows build
3049 * platform/win/TemporaryLinkStubs.cpp: Put a few functions in the WebCore namespace.
3050 * platform/gdk/TemporaryLinkStubs.cpp: Ditto.
3052 2006-07-10 Darin Adler <darin@apple.com>
3056 - fix failures seen in layout tests
3058 * bindings/js/kjs_dom.cpp: (KJS::toJS): Restore one of the few WebCore:: prefixes
3059 that really needed to be there -- because we have two classes named JSHTMLDocument
3060 at the moment! (One in KJS and one in WebCore namespace.)
3062 2006-07-10 Darin Adler <darin@apple.com>
3064 - try to fix Windows build
3066 * rendering/RenderLayer.h: Correct a forward declaration of ScrollBar.
3068 2006-07-09 Adele Peterson <adele@apple.com>
3072 Fix for <rdar://problem/4463835> Switch to use new popup menu implementation for <select>
3074 * css/html4.css: Added style for new selects, and for list boxes.
3075 * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Removed check for appearance so new popups can be styled.
3077 * rendering/RenderMenuList.cpp:
3078 (WebCore::RenderMenuList::setStyle): Removed padding. This is now set by the theme.
3079 (WebCore::RenderMenuList::calcMinMaxWidth): Now takes minimum text size into account.
3080 * rendering/RenderMenuList.h: Removed baselinePosition since we're letting the theme calculate that.
3082 * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isControlContainer): Added menuList as a ControlContainer,
3083 so RenderThemeMac will compute its baseline.
3084 * rendering/RenderTheme.h: (WebCore::RenderTheme::minimumTextSize): Added.
3085 * rendering/RenderThemeMac.h: Added minimumTextSize, setPopupPaddingFromControlSize, popupButtonSizes, popupButtonMargins, popupButtonPadding.
3086 Removed sizeOfArrowControl.
3087 * rendering/RenderThemeMac.mm:
3088 (WebCore::): Added enum for padding.
3089 (WebCore::RenderThemeMac::adjustRepaintRect): Now inflates rect to account for control shadow.
3090 (WebCore::RenderThemeMac::baselinePosition): Now calculates baseline for menulist.
3091 (WebCore::RenderThemeMac::popupButtonMargins): Tweaked values.
3092 (WebCore::RenderThemeMac::popupButtonSizes): Added.
3093 (WebCore::RenderThemeMac::popupButtonPadding): Added, so different padding can be set for different control sizes.
3094 (WebCore::RenderThemeMac::setPopupPaddingFromControlSize): Added.
3095 (WebCore::RenderThemeMac::paintMenuList): Now inflates rect to account for control shadow.
3096 (WebCore::RenderThemeMac::adjustMenuListStyle): Resets border, sets padding, sets control size.
3097 (WebCore::RenderThemeMac::setPopupButtonCellState): Removed unnecessary class name.
3098 (WebCore::RenderThemeMac::minimumTextSize): Added.
3100 2006-07-09 Darin Adler <darin@apple.com>
3102 - add back "unused code" for plain text fields, still used by <isindex>!
3104 * platform/TextField.h:
3105 * platform/mac/TextFieldMac.mm:
3106 * platform/mac/WebCoreTextField.h:
3107 * platform/mac/WebCoreTextField.mm:
3108 * rendering/RenderLineEdit.cpp:
3110 2006-07-09 Darin Adler <darin@apple.com>
3112 Reviewed by Tim Hatcher.
3114 - put more into the WebCore namespace
3115 - removed unused code for plain text fields
3117 Put more classes, class templates, enums, functions, and constants into
3118 the WebCore namespace, including all the headers in the platform directory.
3120 Removed lots of unneeded "WebCore::" qualifiers and "using" directives.
3122 Added some "WebCore::" qualifiers in a few places.
3124 Removed "uses WebCore::" in headers that we said we'd remove "when
3125 everything is in the WebCore namespace".
3127 * bindings/js/JSDOMParser.cpp:
3128 * bindings/js/JSHTMLElementWrapperFactory.cpp:
3129 * bindings/js/JSXSLTProcessor.cpp:
3130 * bindings/js/kjs_binding.cpp:
3131 * bindings/js/kjs_css.cpp:
3132 * bindings/js/kjs_dom.cpp:
3133 * bindings/js/kjs_dom.h:
3134 * bindings/js/kjs_events.cpp:
3135 * bindings/js/kjs_proxy.h:
3136 * bindings/js/kjs_window.h:
3137 * bindings/objc/DOM.mm:
3139 * bridge/JavaAppletWidget.h:
3140 * bridge/mac/FormDataMac.h:
3141 * bridge/mac/FormDataMac.mm:
3142 * bridge/mac/WebCoreAXObject.mm:
3143 * bridge/mac/WebCoreEncodings.mm:
3144 * bridge/mac/WebCoreFrameBridge.h:
3145 * bridge/mac/WebCoreIconDatabaseBridge.mm:
3146 * bridge/mac/WebCorePageState.h:
3147 * bridge/mac/WebCoreScriptDebugger.mm:
3148 * bridge/mac/WebCoreSettings.h:
3150 * css/CSSPageRule.cpp:
3151 * css/CSSPageRule.h:
3152 * css/MediaList.cpp:
3153 * css/cssstyleselector.h:
3157 * dom/EventTargetNode.h:
3162 * dom/XMLTokenizer.cpp:
3163 * editing/AppendNodeCommand.h:
3164 * editing/ApplyStyleCommand.cpp:
3165 * editing/BreakBlockquoteCommand.cpp:
3166 * editing/BreakBlockquoteCommand.h:
3167 * editing/CompositeEditCommand.cpp:
3168 * editing/CompositeEditCommand.h:
3169 * editing/CreateLinkCommand.h:
3170 * editing/DeleteFromTextNodeCommand.h:
3171 * editing/DeleteSelectionCommand.h:
3172 * editing/FormatBlockCommand.h:
3173 * editing/HTMLInterchange.cpp:
3174 * editing/HTMLInterchange.h:
3175 * editing/IndentOutdentCommand.h:
3176 * editing/InsertIntoTextNodeCommand.h:
3177 * editing/InsertLineBreakCommand.h:
3178 * editing/InsertListCommand.h:
3179 * editing/InsertNodeBeforeCommand.h:
3180 * editing/InsertTextCommand.cpp:
3181 * editing/InsertTextCommand.h:
3182 * editing/JSEditor.cpp:
3183 * editing/JSEditor.h:
3184 * editing/JoinTextNodesCommand.h:
3185 * editing/MergeIdenticalElementsCommand.cpp:
3186 * editing/MergeIdenticalElementsCommand.h:
3187 * editing/ModifySelectionListLevel.h:
3188 * editing/MoveSelectionCommand.h:
3189 * editing/RebalanceWhitespaceCommand.h:
3190 * editing/RemoveNodeAttributeCommand.h:
3191 * editing/RemoveNodeCommand.h:
3192 * editing/RemoveNodePreservingChildrenCommand.h:
3193 * editing/ReplaceSelectionCommand.h:
3194 * editing/SetNodeAttributeCommand.h:
3195 * editing/SplitElementCommand.cpp:
3196 * editing/SplitElementCommand.h:
3197 * editing/SplitTextNodeCommand.cpp:
3198 * editing/SplitTextNodeCommand.h:
3199 * editing/SplitTextNodeContainingElementCommand.h:
3200 * editing/TypingCommand.cpp:
3201 * editing/TypingCommand.h:
3202 * editing/UnlinkCommand.h:
3203 * editing/VisiblePosition.cpp:
3204 * editing/WrapContentsInDummySpanCommand.cpp:
3205 * editing/WrapContentsInDummySpanCommand.h:
3206 * editing/markup.cpp:
3208 * html/HTMLAnchorElement.cpp:
3209 * html/HTMLBodyElement.cpp:
3210 * html/HTMLButtonElement.h:
3211 * html/HTMLCollection.h:
3212 * html/HTMLDocument.h:
3213 * html/HTMLEmbedElement.cpp:
3214 * html/HTMLFormElement.cpp:
3215 * html/HTMLFormElement.h:
3216 * html/HTMLFrameElement.cpp:
3217 * html/HTMLFrameSetElement.cpp:
3218 * html/HTMLKeygenElement.cpp:
3219 * html/HTMLLabelElement.cpp:
3220 * html/HTMLObjectElement.cpp:
3221 * html/HTMLObjectElement.h:
3222 * html/HTMLTableElement.cpp:
3223 * html/HTMLTablePartElement.cpp:
3224 * icon/IconDatabase.h:
3225 * kcanvas/KCanvasPath.h:
3226 * kcanvas/KCanvasResources.cpp:
3227 * kcanvas/KCanvasResources.h:
3228 * kcanvas/KCanvasTreeDebug.cpp:
3229 * kcanvas/KCanvasTreeDebug.h:
3230 * kcanvas/RenderSVGContainer.cpp:
3231 * kcanvas/RenderSVGText.h:
3232 * kcanvas/device/KRenderingPaintServer.h:
3233 * kcanvas/device/KRenderingPaintServerGradient.h:
3234 * kcanvas/device/KRenderingPaintServerSolid.cpp:
3235 * ksvg2/misc/SVGImageLoader.cpp:
3236 * ksvg2/svg/SVGElement.cpp:
3237 * ksvg2/svg/SVGElement.h:
3238 * ksvg2/svg/SVGForeignObjectElement.cpp:
3239 * ksvg2/svg/SVGForeignObjectElement.h:
3240 * ksvg2/svg/SVGImageElement.cpp:
3241 * ksvg2/svg/SVGPoint.h:
3242 * ksvg2/svg/SVGStylable.h:
3243 * ksvg2/svg/SVGTRefElement.cpp:
3244 * ksvg2/svg/SVGTRefElement.h:
3245 * ksvg2/svg/SVGTSpanElement.cpp:
3246 * ksvg2/svg/SVGTSpanElement.h:
3247 * ksvg2/svg/SVGTextElement.h:
3248 * ksvg2/svg/svgpathparser.cpp:
3249 * ksvg2/svg/svgpathparser.h:
3251 * loader/DocLoader.h:
3252 * loader/LoaderFunctions.h:
3253 * loader/mac/LoaderFunctionsMac.mm:
3258 * platform/AffineTransform.cpp:
3259 * platform/AffineTransform.h:
3260 * platform/Arena.cpp:
3262 * platform/CookieJar.h:
3263 * platform/DeprecatedCString.cpp:
3264 * platform/DeprecatedCString.h:
3265 * platform/DeprecatedPtrList.h:
3266 * platform/DeprecatedPtrListImpl.cpp:
3267 * platform/DeprecatedPtrListImpl.h:
3268 * platform/DeprecatedPtrQueue.h:
3269 * platform/DeprecatedString.cpp:
3270 * platform/DeprecatedString.h:
3271 * platform/DeprecatedStringList.cpp:
3272 * platform/DeprecatedStringList.h:
3273 * platform/DeprecatedValueList.h:
3274 * platform/DeprecatedValueListImpl.cpp:
3275 * platform/DeprecatedValueListImpl.h:
3276 * platform/FileButton.h:
3277 * platform/FloatPoint.h:
3278 * platform/FloatRect.h:
3279 * platform/FloatSize.h:
3280 * platform/FontData.h:
3281 * platform/FontFallbackList.h:
3282 * platform/GraphicsContext.h:
3283 * platform/IntPoint.h:
3284 * platform/IntRect.h:
3285 * platform/IntSize.h:
3286 * platform/KURL.cpp:
3288 * platform/ListBox.h:
3289 * platform/Logging.cpp:
3290 * platform/Logging.h:
3292 * platform/PopUpButton.h:
3293 * platform/RegularExpression.cpp:
3294 * platform/RegularExpression.h:
3295 * platform/SSLKeyGenerator.h:
3296 * platform/ScrollBar.h:
3297 * platform/SegmentedString.h:
3298 * platform/Shared.h:
3299 * platform/Slider.h:
3300 * platform/StringImpl.h:
3301 * platform/TextBox.h:
3302 * platform/TextField.h:
3303 * platform/TextStream.cpp:
3304 * platform/TextStream.h:
3305 * platform/TransferJob.h:
3306 * platform/TransferJobClient.h:
3307 * platform/Widget.h:
3308 * platform/cg/AffineTransformCG.cpp:
3309 * platform/mac/ClipboardMac.h:
3310 * platform/mac/ClipboardMac.mm:
3311 * platform/mac/DeprecatedStringListMac.mm:
3312 * platform/mac/FontCacheMac.mm:
3313 * platform/mac/KURLMac.mm:
3314 * platform/mac/ListBoxMac.mm:
3315 * platform/mac/PopUpButtonMac.mm:
3316 * platform/mac/SSLKeyGeneratorMac.mm:
3317 * platform/mac/TextBoxMac.mm:
3318 * platform/mac/TextFieldMac.mm:
3319 * platform/mac/WebCoreTextArea.h:
3320 * platform/mac/WebCoreTextArea.mm:
3321 * platform/mac/WebCoreTextField.h:
3322 * platform/mac/WebCoreTextField.mm:
3323 * rendering/DeprecatedRenderSelect.h:
3324 * rendering/RenderArena.cpp:
3325 * rendering/RenderArena.h:
3326 * rendering/RenderBlock.cpp:
3327 * rendering/RenderBox.cpp:
3328 * rendering/RenderContainer.cpp:
3329 * rendering/RenderFlexibleBox.cpp:
3330 * rendering/RenderFlow.cpp:
3331 * rendering/RenderLayer.cpp:
3332 * rendering/RenderLineEdit.cpp:
3333 * rendering/RenderObject.h:
3334 * rendering/RenderStyle.cpp:
3335 * rendering/RenderStyle.h:
3336 * rendering/RenderText.cpp:
3337 * rendering/RenderTextFragment.cpp:
3338 * rendering/RenderTheme.h:
3339 * rendering/RenderTreeAsText.cpp:
3340 * rendering/RenderTreeAsText.h:
3341 * rendering/RenderView.h:
3343 * xml/XSLStyleSheet.cpp:
3344 * xml/XSLTProcessor.cpp:
3346 2006-07-09 Geoffrey Garen <ggaren@apple.com>
3350 * bindings/js/kjs_window.cpp:
3351 (KJS::Window::clear): Garbage collect after reinitalizing the global
3352 object, not before, since the reinitialization tends to create garbage.
3354 2006-07-09 Timothy Hatcher <timothy@apple.com>
3358 Bug 9820: Move new DOM API that has been through API review to public headers
3359 http://bugzilla.opendarwin.org/show_bug.cgi?id=9820
3361 * bindings/objc/DOM.mm:
3362 (-[DOMElement focus]):
3363 (-[DOMElement blur]):
3365 (-[DOMRange _text]):
3366 * bindings/objc/DOMCSS.mm:
3367 (-[DOMRGBColor color]):
3368 (-[DOMRGBColor _color]):
3369 * bindings/objc/DOMCore.h:
3370 * bindings/objc/DOMEvents.h:
3371 * bindings/objc/DOMExtensions.h:
3372 * bindings/objc/DOMHTML.mm:
3373 (-[DOMHTMLElement titleDisplayString]):
3374 (-[DOMHTMLDocument createDocumentFragmentWithMarkupString:baseURL:]):
3375 (-[DOMHTMLDocument createDocumentFragmentWithText:]):
3376 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
3377 (-[DOMHTMLDocument _createDocumentFragmentWithText:]):
3378 * bindings/objc/DOMPrivate.h:
3379 * bindings/objc/DOMXPath.h:
3380 * bindings/objc/DOMXPath.mm:
3382 2006-07-09 Beth Dakin <bdakin@apple.com>
3386 Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9749 A
3387 nested content editable div causes unnecessary screen redraws.
3389 We were repainting too much because we were deciding that we needed
3390 a full layout because we didn't have a first line box. Our code
3391 used to hold a lot of assumptions that positioned elements would
3392 always have line boxes, but I fixed a few bugs a while back that
3393 appeared because this assumption isn't true. This assumption was
3394 also causing the extra redraws because the check meant that we
3395 would decide to do a full layout for any positioned element that
3396 did not have any line boxes in the first place. Maciej and I talked
3397 about this, and we couldn't figure out why the check for line boxes
3398 was part of determining if we need a full layout in the first
3399 place. After hunting around the code, we decided to assume that
3400 this check is antiquated. Removing it fixes the bug and doesn't
3401 seem to break any layout tests. So, fingers crossed!
3403 Will add layout test so soon.
3405 * rendering/bidi.cpp:
3406 (WebCore::RenderBlock::layoutInlineChildren): Remove firstLineBox
3409 2006-07-09 David Harrison <harrison@apple.com>
3411 Reviewed by John Sullivan.
3413 <rdar://problem/4598149> Deleting the contents of a DOMRange and then inserting a node into it crashes in WebCore::Font::canUseGlyphCache
3415 Test: fast/dom/delete-contents.html
3418 (WebCore::Range::processContents):
3420 2006-07-09 Darin Adler <darin@apple.com>
3422 - another round of renaming; and KWQ is dead
3424 * WebCore.vcproj/WebCore/WebCore.vcproj: Remove paths for kwq and khtml directories.
3425 Move files to their new locations. Did rename.
3426 * WebCore.xcodeproj/project.pbxproj: Move files to their new locations. Did rename.
3427 * WebCoreSources.bkl: Did rename.
3428 * webcore-base.bkl: Removed kwq.
3430 * kwq/AccessibilityObjectCache.h: Removed.
3431 * kwq/AccessibilityObjectCache.mm: Removed.
3432 * kwq/FormDataMac.h: Removed.
3433 * kwq/FormDataMac.mm: Removed.
3434 * kwq/WebCoreAXObject.h: Removed.
3435 * kwq/WebCoreAXObject.mm: Removed.
3436 * kwq/WebCoreEditCommand.h: Removed.
3437 * kwq/WebCoreEditCommand.mm: Removed.
3438 * kwq/WebCorePageState.h: Removed.
3439 * kwq/WebCorePageState.mm: Removed.
3440 * kwq/WebCoreResourceLoaderImp.h: Removed.
3441 * kwq/WebCoreResourceLoaderImp.mm: Removed.
3443 * bridge/AXObjectCache.h: Added.
3444 * bridge/mac/AXObjectCacheMac.mm: Added.
3445 * bridge/mac/WebCoreAXObject.h: Added.
3446 * bridge/mac/WebCoreAXObject.mm: Added.
3448 * loader/CachedObject.cpp: Removed.
3449 * loader/CachedObject.h: Removed.
3450 * loader/CachedObjectClient.h: Removed.
3451 * loader/CachedObjectClientWalker.cpp: Removed.
3452 * loader/CachedObjectClientWalker.h: Removed.
3454 * loader/CachedResource.cpp: Added.
3455 * loader/CachedResource.h: Added.
3456 * loader/CachedResourceClient.h: Added.
3457 * loader/CachedResourceClientWalker.cpp: Added.
3458 * loader/CachedResourceClientWalker.h: Added.
3460 * bridge/mac/FrameMac.mm:
3461 * bridge/mac/WebCoreFrameBridge.mm:
3462 * css/CSSImageValue.h:
3463 * css/CSSImportRule.h:
3467 * dom/ProcessingInstruction.h:
3468 * dom/XMLTokenizer.cpp:
3469 * html/CanvasPattern.h:
3470 * html/HTMLDocument.h:
3471 * html/HTMLImageLoader.cpp:
3472 * html/HTMLImageLoader.h:
3473 * html/HTMLLinkElement.h:
3474 * html/HTMLScriptElement.cpp:
3475 * html/HTMLScriptElement.h:
3476 * html/HTMLTokenizer.cpp:
3477 * html/HTMLTokenizer.h:
3478 * kcanvas/KCanvasFilters.h:
3479 * ksvg2/svg/SVGCursorElement.cpp:
3480 * ksvg2/svg/SVGCursorElement.h:
3481 * ksvg2/svg/SVGFEImageElement.cpp:
3482 * ksvg2/svg/SVGFEImageElement.h:
3485 * loader/CachedCSSStyleSheet.cpp:
3486 * loader/CachedCSSStyleSheet.h:
3487 * loader/CachedImage.cpp:
3488 * loader/CachedImage.h:
3489 * loader/CachedScript.cpp:
3490 * loader/CachedScript.h:
3491 * loader/CachedXBLDocument.cpp:
3492 * loader/CachedXBLDocument.h:
3493 * loader/CachedXSLStyleSheet.cpp:
3494 * loader/CachedXSLStyleSheet.h:
3495 * loader/DocLoader.cpp:
3496 * loader/DocLoader.h:
3497 * loader/LoaderFunctions.h:
3498 * loader/Request.cpp:
3500 * loader/loader.cpp:
3502 * loader/mac/LoaderFunctionsMac.mm:
3504 * page/FrameView.cpp:
3505 * platform/gdk/TemporaryLinkStubs.cpp:
3506 * platform/mac/ClipboardMac.h:
3507 * platform/win/TemporaryLinkStubs.cpp:
3508 * rendering/RenderBox.h: