1 2005-05-10 Darin Adler <darin@apple.com>
3 Reviewed by Dave Hyatt.
4 No new layout tests needed.
6 - remove all remaining uses of QMIN/QMAX and KMIN/KMAX.
8 * kwq/KWQDef.h: Remove the macros.
10 Remove all use of the macros (and fix a few compile errors by changing the types of
11 some integer and floating point constants).
13 * khtml/css/cssparser.cpp:
14 (CSSParser::parseColorFromValue):
15 * khtml/css/cssstyleselector.cpp:
16 (khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
17 * khtml/html/html_elementimpl.cpp:
18 (HTMLElementImpl::addHTMLColor):
19 * khtml/html/html_formimpl.cpp:
20 (DOM::HTMLSelectElementImpl::parseHTMLAttribute):
21 * khtml/html/htmltokenizer.cpp:
22 (khtml::HTMLTokenizer::parseComment):
23 * khtml/rendering/render_block.cpp:
24 (khtml::RenderBlock::nearestFloatBottom):
25 (khtml::RenderBlock::calcMinMaxWidth):
26 * khtml/rendering/render_flow.cpp:
27 (RenderFlow::paintOutlineForLine):
28 * khtml/rendering/render_form.cpp:
29 (RenderLineEdit::calcMinMaxWidth):
30 (RenderFieldset::layoutLegend):
31 (RenderFileButton::calcMinMaxWidth):
32 (RenderSelect::layout):
33 (RenderTextArea::calcMinMaxWidth):
34 * khtml/rendering/render_object.cpp:
35 (RenderObject::drawBorder):
36 * khtml/rendering/render_replaced.cpp:
37 (RenderWidget::resizeWidget):
38 * khtml/rendering/render_table.cpp:
39 (RenderTableSection::layoutRows):
40 * khtml/rendering/table_layout.cpp:
41 (AutoTableLayout::recalcColumn):
42 (AutoTableLayout::calcEffectiveWidth):
44 2005-05-10 Darin Adler <darin@apple.com>
46 Reviewed by Chris Blumenberg.
48 - next pass of moving code from C++ DOM wrappers into the DOM impl. classes
49 (this step adds still more member functions missing from the DOM impl. and
50 changes some of the C++ and Objective-C DOM to call the new ones; also
51 changes various places that use the C++ DOM to use the DOM impl. instead)
53 * khtml/css/css_computedstyle.cpp:
54 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
55 * khtml/css/css_computedstyle.h:
56 * khtml/css/css_stylesheetimpl.cpp:
57 (CSSStyleSheetImpl::cssRules):
58 * khtml/css/css_stylesheetimpl.h:
59 * khtml/css/css_valueimpl.cpp:
60 (DOM::CSSStyleDeclarationImpl::getPropertyCSSValue):
61 (DOM::CSSStyleDeclarationImpl::getPropertyValue):
62 (DOM::CSSStyleDeclarationImpl::getPropertyPriority):
63 (DOM::CSSStyleDeclarationImpl::setProperty):
64 (DOM::CSSStyleDeclarationImpl::removeProperty):
65 (DOM::CSSMutableStyleDeclarationImpl::getPropertyValue):
66 (DOM::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
68 (DOM::CSSStyleDeclarationImpl::propertyID):
69 * khtml/css/css_valueimpl.h:
70 (DOM::CSSValueImpl::setCssText):
71 (DOM::CSSPrimitiveValueImpl::getDashboardRegionValue):
72 * khtml/dom/css_rule.cpp:
73 * khtml/dom/css_rule.h:
74 * khtml/dom/css_stylesheet.h:
75 (DOM::CSSException::):
76 * khtml/dom/css_value.cpp:
77 (DOM::CSSStyleDeclaration::getPropertyValue):
78 (DOM::CSSStyleDeclaration::getPropertyCSSValue):
79 (DOM::CSSStyleDeclaration::removeProperty):
80 (DOM::CSSStyleDeclaration::getPropertyPriority):
81 (DOM::CSSStyleDeclaration::setProperty):
82 * khtml/dom/css_value.h:
83 * khtml/dom/dom2_events.cpp:
84 (EventListener::handleEvent):
85 * khtml/dom/dom2_events.h:
86 * khtml/dom/dom2_traversal.h:
87 * khtml/dom/dom_doc.cpp:
88 (DOM::DOMImplementation::createHTMLDocument):
89 (DOM::DOMImplementation::createCSSStyleSheet):
90 (DOM::Document::doctype):
91 (DOM::Document::createAttribute):
92 (DOM::Document::createAttributeNS):
93 (DOM::Document::queryCommandValue):
94 (DOM::Document::handle):
95 * khtml/dom/dom_doc.h:
96 * khtml/dom/dom_element.cpp:
99 (Element::getAttribute):
100 (Element::setAttribute):
101 (Element::removeAttribute):
102 (Element::getAttributeNode):
103 (Element::setAttributeNode):
104 (Element::removeAttributeNode):
105 (Element::getElementsByTagName):
106 (Element::getElementsByTagNameNS):
107 (Element::getAttributeNS):
108 (Element::setAttributeNS):
109 (Element::removeAttributeNS):
110 (Element::getAttributeNodeNS):
111 (Element::setAttributeNodeNS):
112 (Element::hasAttribute):
113 (Element::hasAttributeNS):
115 * khtml/dom/dom_exception.h:
116 * khtml/dom/dom_misc.cpp:
117 (DOM::DomShared::deleteMe):
118 * khtml/dom/dom_misc.h:
119 (DOM::DomShared::deleteMe):
120 * khtml/dom/dom_node.cpp:
121 (NamedNodeMap::getNamedItemNS):
122 (NamedNodeMap::setNamedItemNS):
123 (NamedNodeMap::removeNamedItemNS):
124 (Node::ownerDocument):
125 (Node::hasAttributes):
127 (Node::addEventListener):
128 (Node::removeEventListener):
129 * khtml/dom/dom_node.h:
130 * khtml/dom/html_document.cpp:
131 (HTMLDocument::setTitle):
132 (HTMLDocument::completeURL):
133 (HTMLDocument::getElementsByName):
134 * khtml/dom/html_element.cpp:
135 (HTMLElement::setInnerHTML):
136 (HTMLElement::setInnerText):
137 (HTMLElement::setOuterHTML):
138 (HTMLElement::setOuterText):
139 * khtml/dom/html_form.cpp:
140 (HTMLLabelElement::form):
141 (HTMLSelectElement::setValue):
142 (HTMLSelectElement::options):
143 (HTMLOptionElement::setValue):
144 * khtml/dom/html_inline.cpp:
145 (HTMLAnchorElement::accessKey):
146 (HTMLAnchorElement::setAccessKey):
147 (HTMLAnchorElement::charset):
148 (HTMLAnchorElement::setCharset):
149 (HTMLAnchorElement::coords):
150 (HTMLAnchorElement::setCoords):
151 (HTMLAnchorElement::href):
152 (HTMLAnchorElement::setHref):
153 (HTMLAnchorElement::hreflang):
154 (HTMLAnchorElement::setHreflang):
155 (HTMLAnchorElement::name):
156 (HTMLAnchorElement::setName):
157 (HTMLAnchorElement::rel):
158 (HTMLAnchorElement::setRel):
159 (HTMLAnchorElement::rev):
160 (HTMLAnchorElement::setRev):
161 (HTMLAnchorElement::shape):
162 (HTMLAnchorElement::setShape):
163 (HTMLAnchorElement::tabIndex):
164 (HTMLAnchorElement::setTabIndex):
165 (HTMLAnchorElement::target):
166 (HTMLAnchorElement::setTarget):
167 (HTMLAnchorElement::type):
168 (HTMLAnchorElement::setType):
169 (HTMLAnchorElement::blur):
170 (HTMLAnchorElement::focus):
171 (HTMLBRElement::clear):
172 (HTMLBRElement::setClear):
173 (HTMLFontElement::color):
174 (HTMLFontElement::setColor):
175 (HTMLFontElement::face):
176 (HTMLFontElement::setFace):
177 (HTMLFontElement::size):
178 (HTMLFontElement::setSize):
179 (HTMLModElement::cite):
180 (HTMLModElement::setCite):
181 (HTMLModElement::dateTime):
182 (HTMLModElement::setDateTime):
183 (HTMLQuoteElement::cite):
184 (HTMLQuoteElement::setCite):
185 * khtml/dom/html_misc.cpp:
186 (HTMLCollection::HTMLCollection):
187 (HTMLCollection::base):
188 (HTMLCollection::namedItems):
189 * khtml/dom/html_misc.h:
190 * khtml/editing/htmlediting.cpp:
191 * khtml/editing/selection.cpp:
192 * khtml/html/html_documentimpl.cpp:
193 (DOM::HTMLDocumentImpl::determineParseMode):
194 (DOM::HTMLDocumentImpl::doctype):
195 * khtml/html/html_documentimpl.h:
196 * khtml/html/html_elementimpl.cpp:
197 (HTMLElementImpl::setInnerHTML):
198 (HTMLElementImpl::setOuterHTML):
199 (HTMLElementImpl::setInnerText):
200 (HTMLElementImpl::setOuterText):
201 (HTMLElementImpl::style):
202 (HTMLElementImpl::idDOM):
203 (HTMLElementImpl::setId):
204 (HTMLElementImpl::title):
205 (HTMLElementImpl::setTitle):
206 (HTMLElementImpl::lang):
207 (HTMLElementImpl::setLang):
208 (HTMLElementImpl::dir):
209 (HTMLElementImpl::setDir):
210 (HTMLElementImpl::className):
211 (HTMLElementImpl::setClassName):
212 (HTMLElementImpl::children):
213 (HTMLGenericElementImpl::HTMLGenericElementImpl):
214 (HTMLGenericElementImpl::id):
215 * khtml/html/html_elementimpl.h:
216 (DOM::HTMLElementImpl::isGenericFormElement):
217 * khtml/html/html_formimpl.cpp:
218 (DOM::HTMLFormElementImpl::parseEnctype):
219 (DOM::HTMLFormElementImpl::parseHTMLAttribute):
220 (DOM::HTMLFormElementImpl::elements):
221 (DOM::HTMLFormElementImpl::name):
222 (DOM::HTMLFormElementImpl::setName):
223 (DOM::HTMLFormElementImpl::acceptCharset):
224 (DOM::HTMLFormElementImpl::setAcceptCharset):
225 (DOM::HTMLFormElementImpl::action):
226 (DOM::HTMLFormElementImpl::setAction):
227 (DOM::HTMLFormElementImpl::setEnctype):
228 (DOM::HTMLFormElementImpl::method):
229 (DOM::HTMLFormElementImpl::setMethod):
230 (DOM::HTMLFormElementImpl::target):
231 (DOM::HTMLFormElementImpl::setTarget):
232 (DOM::HTMLGenericFormElementImpl::HTMLGenericFormElementImpl):
233 (DOM::HTMLGenericFormElementImpl::~HTMLGenericFormElementImpl):
234 (DOM::HTMLGenericFormElementImpl::parseHTMLAttribute):
235 (DOM::HTMLGenericFormElementImpl::name):
236 (DOM::HTMLGenericFormElementImpl::setName):
237 (DOM::HTMLGenericFormElementImpl::setOverrideName):
238 (DOM::HTMLGenericFormElementImpl::setDisabled):
239 (DOM::HTMLGenericFormElementImpl::setReadOnly):
240 (DOM::HTMLGenericFormElementImpl::tabIndex):
241 (DOM::HTMLGenericFormElementImpl::setTabIndex):
242 (DOM::HTMLButtonElementImpl::accessKey):
243 (DOM::HTMLButtonElementImpl::setAccessKey):
244 (DOM::HTMLButtonElementImpl::value):
245 (DOM::HTMLButtonElementImpl::setValue):
246 (DOM::HTMLInputElementImpl::HTMLInputElementImpl):
247 (DOM::HTMLInputElementImpl::parseHTMLAttribute):
248 (DOM::HTMLInputElementImpl::defaultValue):
249 (DOM::HTMLInputElementImpl::setDefaultValue):
250 (DOM::HTMLInputElementImpl::defaultChecked):
251 (DOM::HTMLInputElementImpl::setDefaultChecked):
252 (DOM::HTMLInputElementImpl::accept):
253 (DOM::HTMLInputElementImpl::setAccept):
254 (DOM::HTMLInputElementImpl::accessKey):
255 (DOM::HTMLInputElementImpl::setAccessKey):
256 (DOM::HTMLInputElementImpl::align):
257 (DOM::HTMLInputElementImpl::setAlign):
258 (DOM::HTMLInputElementImpl::alt):
259 (DOM::HTMLInputElementImpl::setAlt):
260 (DOM::HTMLInputElementImpl::setMaxLength):
261 (DOM::HTMLInputElementImpl::sizeDOM):
262 (DOM::HTMLInputElementImpl::setSize):
263 (DOM::HTMLInputElementImpl::src):
264 (DOM::HTMLInputElementImpl::setSrc):
265 (DOM::HTMLInputElementImpl::useMap):
266 (DOM::HTMLInputElementImpl::setUseMap):
267 (DOM::HTMLLabelElementImpl::form):
268 (DOM::HTMLLabelElementImpl::accessKey):
269 (DOM::HTMLLabelElementImpl::setAccessKey):
270 (DOM::HTMLLabelElementImpl::htmlFor):
271 (DOM::HTMLLabelElementImpl::setHtmlFor):
272 (DOM::HTMLLegendElementImpl::accessKey):
273 (DOM::HTMLLegendElementImpl::setAccessKey):
274 (DOM::HTMLLegendElementImpl::align):
275 (DOM::HTMLLegendElementImpl::setAlign):
276 (DOM::HTMLSelectElementImpl::setValue):
277 (DOM::HTMLSelectElementImpl::optionsHTMLCollection):
278 (DOM::HTMLSelectElementImpl::setMultiple):
279 (DOM::HTMLSelectElementImpl::setSize):
280 (DOM::HTMLOptGroupElementImpl::label):
281 (DOM::HTMLOptGroupElementImpl::setLabel):
282 (DOM::HTMLOptionElementImpl::setText):
283 (DOM::HTMLOptionElementImpl::setIndex):
284 (DOM::HTMLOptionElementImpl::setValue):
285 (DOM::HTMLOptionElementImpl::defaultSelected):
286 (DOM::HTMLOptionElementImpl::setDefaultSelected):
287 (DOM::HTMLOptionElementImpl::label):
288 (DOM::HTMLOptionElementImpl::setLabel):
289 (DOM::HTMLTextAreaElementImpl::accessKey):
290 (DOM::HTMLTextAreaElementImpl::setAccessKey):
291 (DOM::HTMLTextAreaElementImpl::setCols):
292 (DOM::HTMLTextAreaElementImpl::setRows):
293 (DOM::HTMLIsIndexElementImpl::HTMLIsIndexElementImpl):
294 (DOM::HTMLIsIndexElementImpl::parseHTMLAttribute):
295 (DOM::HTMLIsIndexElementImpl::prompt):
296 (DOM::HTMLIsIndexElementImpl::setPrompt):
297 * khtml/html/html_formimpl.h:
298 * khtml/html/html_headimpl.cpp:
299 (HTMLBaseElementImpl::setHref):
300 (HTMLBaseElementImpl::setTarget):
301 (HTMLLinkElementImpl::disabled):
302 (HTMLLinkElementImpl::setDisabled):
303 (HTMLLinkElementImpl::charset):
304 (HTMLLinkElementImpl::setCharset):
305 (HTMLLinkElementImpl::href):
306 (HTMLLinkElementImpl::setHref):
307 (HTMLLinkElementImpl::hreflang):
308 (HTMLLinkElementImpl::setHreflang):
309 (HTMLLinkElementImpl::media):
310 (HTMLLinkElementImpl::setMedia):
311 (HTMLLinkElementImpl::rel):
312 (HTMLLinkElementImpl::setRel):
313 (HTMLLinkElementImpl::rev):
314 (HTMLLinkElementImpl::setRev):
315 (HTMLLinkElementImpl::target):
316 (HTMLLinkElementImpl::setTarget):
317 (HTMLLinkElementImpl::type):
318 (HTMLLinkElementImpl::setType):
319 (HTMLMetaElementImpl::content):
320 (HTMLMetaElementImpl::setContent):
321 (HTMLMetaElementImpl::httpEquiv):
322 (HTMLMetaElementImpl::setHttpEquiv):
323 (HTMLMetaElementImpl::name):
324 (HTMLMetaElementImpl::setName):
325 (HTMLMetaElementImpl::scheme):
326 (HTMLMetaElementImpl::setScheme):
327 (HTMLScriptElementImpl::id):
328 (HTMLScriptElementImpl::isURLAttribute):
329 (HTMLScriptElementImpl::insertedIntoDocument):
330 (HTMLScriptElementImpl::notifyFinished):
331 (HTMLScriptElementImpl::text):
332 (HTMLScriptElementImpl::setText):
333 (HTMLScriptElementImpl::htmlFor):
334 (HTMLScriptElementImpl::setHtmlFor):
335 (HTMLScriptElementImpl::event):
336 (HTMLScriptElementImpl::setEvent):
337 (HTMLScriptElementImpl::charset):
338 (HTMLScriptElementImpl::setCharset):
339 (HTMLScriptElementImpl::defer):
340 (HTMLScriptElementImpl::setDefer):
341 (HTMLScriptElementImpl::src):
342 (HTMLScriptElementImpl::setSrc):
343 (HTMLScriptElementImpl::type):
344 (HTMLScriptElementImpl::setType):
345 (HTMLStyleElementImpl::disabled):
346 (HTMLStyleElementImpl::setDisabled):
347 (HTMLStyleElementImpl::media):
348 (HTMLStyleElementImpl::setMedia):
349 (HTMLStyleElementImpl::type):
350 (HTMLStyleElementImpl::setType):
351 (HTMLTitleElementImpl::insertedIntoDocument):
352 (HTMLTitleElementImpl::childrenChanged):
353 (HTMLTitleElementImpl::text):
354 (HTMLTitleElementImpl::setText):
355 * khtml/html/html_headimpl.h:
356 * khtml/html/html_miscimpl.cpp:
357 (DOM::HTMLBaseFontElementImpl::id):
358 (DOM::HTMLBaseFontElementImpl::color):
359 (DOM::HTMLBaseFontElementImpl::setColor):
360 (DOM::HTMLBaseFontElementImpl::face):
361 (DOM::HTMLBaseFontElementImpl::setFace):
362 (DOM::HTMLBaseFontElementImpl::size):
363 (DOM::HTMLBaseFontElementImpl::setSize):
364 (DOM::HTMLCollectionImpl::HTMLCollectionImpl):
365 (DOM::HTMLCollectionImpl::~HTMLCollectionImpl):
366 (DOM::HTMLCollectionImpl::resetCollectionInfo):
367 (DOM::HTMLCollectionImpl::traverseNextItem):
368 (DOM::HTMLCollectionImpl::calcLength):
369 (DOM::HTMLCollectionImpl::item):
370 (DOM::HTMLCollectionImpl::namedItem):
371 (DOM::HTMLCollectionImpl::updateNameCache):
372 (DOM::HTMLCollectionImpl::namedItems):
373 (DOM::HTMLCollectionImpl::nextNamedItem):
374 (DOM::HTMLFormCollectionImpl::HTMLFormCollectionImpl):
375 (DOM::HTMLFormCollectionImpl::calcLength):
376 (DOM::HTMLFormCollectionImpl::item):
377 (DOM::HTMLFormCollectionImpl::getNamedFormItem):
378 (DOM::HTMLFormCollectionImpl::nextNamedItemInternal):
379 (DOM::HTMLFormCollectionImpl::namedItem):
380 (DOM::HTMLFormCollectionImpl::updateNameCache):
381 * khtml/html/html_miscimpl.h:
382 (DOM::HTMLCollectionImpl::base):
383 * khtml/html/htmlparser.cpp:
384 (KHTMLParser::parseToken):
385 (KHTMLParser::insertNode):
386 * khtml/html/htmltokenizer.cpp:
387 (khtml::HTMLTokenizer::scriptExecution):
388 * khtml/khtml_events.cpp:
389 (khtml::MouseEvent::MouseEvent):
390 (khtml::MouseEvent::offset):
391 * khtml/khtml_events.h:
392 (khtml::MouseEvent::innerNode):
393 (khtml::MousePressEvent::MousePressEvent):
394 (khtml::MouseDoubleClickEvent::MouseDoubleClickEvent):
395 (khtml::MouseMoveEvent::MouseMoveEvent):
396 (khtml::MouseReleaseEvent::MouseReleaseEvent):
397 * khtml/khtml_part.cpp:
398 (KHTMLPart::closeURL):
399 (KHTMLPart::executeScript):
400 (KHTMLPart::scheduleScript):
401 (KHTMLPart::executeScheduledScript):
403 (KHTMLPart::selectClosestWordFromMouseEvent):
404 (KHTMLPart::handleMousePressEventDoubleClick):
405 (KHTMLPart::handleMousePressEventTripleClick):
406 (KHTMLPart::handleMousePressEventSingleClick):
407 (KHTMLPart::khtmlMousePressEvent):
408 (KHTMLPart::handleMouseMoveEventDrag):
409 (KHTMLPart::handleMouseMoveEventOver):
410 (KHTMLPart::handleMouseMoveEventSelection):
411 (KHTMLPart::khtmlMouseReleaseEvent):
412 (KHTMLPart::selectionHasStyle):
413 (KHTMLPart::selectionStartHasStyle):
414 * khtml/khtml_part.h:
415 * khtml/khtmlpart_p.h:
416 * khtml/khtmlview.cpp:
417 (KHTMLViewPrivate::reset):
418 (KHTMLView::viewportMousePressEvent):
419 (KHTMLView::viewportMouseDoubleClickEvent):
420 (KHTMLView::contentsContextMenuEvent):
421 (KHTMLView::updateDragAndDrop):
422 (KHTMLView::cancelDragAndDrop):
423 (KHTMLView::performDragAndDrop):
424 (KHTMLView::focusNextPrevNode):
426 (-[DOMCSSStyleSheet cssRules]):
427 (-[DOMCSSStyleDeclaration getPropertyValue:]):
428 (-[DOMCSSStyleDeclaration getPropertyCSSValue:]):
429 (-[DOMCSSStyleDeclaration removeProperty:]):
430 (-[DOMCSSStyleDeclaration getPropertyPriority:]):
431 (-[DOMCSSStyleDeclaration setProperty:::]):
432 (-[DOMCSSValue setCssText:]):
435 (-[DOMHTMLElement setInnerHTML:]):
436 (-[DOMHTMLElement setOuterHTML:]):
437 (-[DOMHTMLElement setInnerText:]):
438 (-[DOMHTMLElement setOuterText:]):
439 (-[DOMHTMLSelectElement setLength:]):
440 (-[DOMHTMLTableSectionElement insertRow:]):
442 * kwq/DOMInternal.mm:
444 (-[WebScriptObject _initializeScriptDOMNodeImp]):
446 (KJS::ScriptInterpreter::createObjcInstanceForValue):
447 * kwq/KWQAccObject.mm:
448 (-[KWQAccObject accessibilityAttributeValue:]):
449 * kwq/KWQKHTMLPart.h:
450 * kwq/KWQKHTMLPart.mm:
451 (KWQKHTMLPart::KWQKHTMLPart):
452 (KWQKHTMLPart::advanceToNextMisspelling):
453 (KWQKHTMLPart::scrollOverflow):
454 (KWQKHTMLPart::paint):
455 (KWQKHTMLPart::openURLFromPageCache):
456 (KWQKHTMLPart::khtmlMousePressEvent):
457 (KWQKHTMLPart::passWidgetMouseDownEventToWidget):
458 (KWQKHTMLPart::dispatchDragSrcEvent):
459 (KWQKHTMLPart::eventMayStartDrag):
460 (KWQKHTMLPart::khtmlMouseMoveEvent):
461 (KWQKHTMLPart::dragSourceEndedAt):
462 (KWQKHTMLPart::mouseDown):
463 (KWQKHTMLPart::sendContextMenuEvent):
465 (isTextFirstInListItem):
466 (KWQKHTMLPart::attributedString):
467 (KWQKHTMLPart::snapshotDragImage):
468 (KWQKHTMLPart::mousePressNode):
469 * kwq/WebCoreBridge.mm:
470 (updateRenderingForBindings):
471 (-[WebCoreBridge _documentTypeString]):
473 2005-05-10 Maciej Stachowiak <mjs@apple.com>
477 - rename hasAnchor method to isLink
479 * khtml/css/cssstyleselector.cpp:
480 (khtml::checkPseudoState):
481 (khtml::CSSStyleSelector::canShareStyleWithElement):
482 (khtml::CSSStyleSelector::styleForElement):
483 (khtml::CSSStyleSelector::checkOneSelector):
484 * khtml/editing/htmlediting.cpp:
485 (khtml::isSpecialElement):
486 * khtml/html/html_imageimpl.cpp:
487 (HTMLImageElementImpl::parseHTMLAttribute):
488 * khtml/html/html_inlineimpl.cpp:
489 (DOM::HTMLAnchorElementImpl::isFocusable):
490 (DOM::HTMLAnchorElementImpl::defaultEventHandler):
491 (DOM::HTMLAnchorElementImpl::parseHTMLAttribute):
492 * khtml/rendering/render_flexbox.cpp:
493 (khtml::RenderFlexibleBox::layoutVerticalBox):
494 * khtml/rendering/render_layer.cpp:
495 (RenderLayer::hitTest):
496 * khtml/rendering/render_object.cpp:
497 (RenderObject::information):
498 * khtml/xml/dom_nodeimpl.cpp:
499 (NodeImpl::NodeImpl):
500 * khtml/xml/dom_nodeimpl.h:
501 (DOM::NodeImpl::isLink):
502 * kwq/KWQAccObject.mm:
503 (-[KWQAccObject anchorElement]):
504 (-[KWQAccObject addChildrenToArray:]):
505 (-[KWQAccObject role]):
506 (-[KWQAccObject title]):
507 (-[KWQAccObject accessibilityIsIgnored]):
508 (-[KWQAccObject accessibilityAttributeNames]):
509 (-[KWQAccObject accessibilityAttributeValue:]):
510 * kwq/KWQKHTMLPart.mm:
511 (KWQKHTMLPart::khtmlMouseMoveEvent):
513 2005-05-09 Maciej Stachowiak <mjs@apple.com>
517 - remove init hint argument from VisiblePosition
519 * khtml/editing/visible_position.cpp:
520 (khtml::VisiblePosition::VisiblePosition):
521 (khtml::VisiblePosition::init):
522 * khtml/editing/visible_position.h:
523 * khtml/editing/visible_units.cpp:
524 (khtml::previousBoundary):
525 (khtml::nextBoundary):
526 * khtml/xml/dom_docimpl.cpp:
527 (DocumentImpl::updateSelection):
528 * kwq/KWQKHTMLPart.mm:
529 (KWQKHTMLPart::styleForSelectionStart):
530 * kwq/WebCoreBridge.mm:
531 (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]):
533 2005-05-10 Darin Adler <darin@apple.com>
535 Reviewed by David Harrison.
537 - next pass of moving code from C++ DOM wrappers into the DOM impl. classes
538 (this step adds more member functions missing from the DOM impl. and
539 changes some of the Objective-C DOM to call the new ones; also changes some
540 parameter types in the DOM impl.)
542 * khtml/dom/dom2_events.cpp:
543 (UIEvent::initUIEvent):
544 (MouseEvent::initMouseEvent):
545 (MutationEvent::initMutationEvent):
546 (KeyboardEvent::initKeyboardEvent):
547 * khtml/dom/dom_doc.cpp:
548 (DOM::DOMImplementation::createDocument):
549 (DOM::Document::getElementsByTagName):
550 (DOM::Document::getElementsByTagNameNS):
551 * khtml/dom/dom_element.cpp:
552 (Element::removeAttributeNode):
553 (Element::getElementsByTagName):
554 (Element::getElementsByTagNameNS):
555 (Element::setAttributeNodeNS):
556 * khtml/dom/dom_node.cpp:
557 (NamedNodeMap::setNamedItemNS):
558 (NamedNodeMap::removeNamedItemNS):
559 * khtml/ecma/kjs_binding.cpp:
560 * khtml/ecma/kjs_events.cpp:
561 (ClipboardProtoFunc::tryCall):
562 * khtml/editing/jsediting.cpp:
563 * khtml/khtml_part.cpp:
564 (KHTMLPart::applyEditingStyleToBodyElement):
565 (KHTMLPart::removeEditingStyleFromBodyElement):
566 * khtml/khtmlview.cpp:
567 (KHTMLView::viewportMousePressEvent):
568 (KHTMLView::viewportMouseDoubleClickEvent):
569 (KHTMLView::viewportMouseMoveEvent):
570 (KHTMLView::viewportMouseReleaseEvent):
571 (KHTMLView::updateDragAndDrop):
572 (KHTMLView::dispatchMouseEvent):
573 * khtml/misc/shared.h:
574 (khtml::SharedPtr::reset):
576 (khtml::static_pointer_cast):
577 (khtml::const_pointer_cast):
578 * khtml/xml/dom2_eventsimpl.cpp:
579 (UIEventImpl::initUIEvent):
580 (UIEventImpl::keyCode):
581 (UIEventImpl::charCode):
582 (UIEventImpl::layerX):
583 (UIEventImpl::layerY):
584 (UIEventImpl::pageX):
585 (UIEventImpl::pageY):
586 (UIEventImpl::which):
587 (MouseRelatedEventImpl::pageX):
588 (MouseRelatedEventImpl::pageY):
589 (MouseEventImpl::initMouseEvent):
590 (MouseEventImpl::which):
591 (KeyboardEventImpl::initKeyboardEvent):
592 (KeyboardEventImpl::which):
593 (MutationEventImpl::MutationEventImpl):
594 (MutationEventImpl::initMutationEvent):
595 * khtml/xml/dom2_eventsimpl.h:
596 (DOM::MutationEventImpl::relatedNode):
597 * khtml/xml/dom2_rangeimpl.h:
598 * khtml/xml/dom2_traversalimpl.cpp:
599 (DOM::NodeFilterImpl::acceptNode):
600 * khtml/xml/dom2_traversalimpl.h:
601 * khtml/xml/dom_docimpl.cpp:
602 (DOMImplementationImpl::createDocument):
603 (DOMImplementationImpl::createCSSStyleSheet):
604 (DOMImplementationImpl::createHTMLDocument):
605 (DocumentImpl::createAttribute):
606 (DocumentImpl::createHTMLElement):
607 (DocumentImpl::getOverrideStyle):
608 (DocumentImpl::defaultEventHandler):
609 (DocumentImpl::completeURL):
610 (DocumentImpl::topDocument):
611 (DocumentImpl::createAttributeNS):
612 (DocumentImpl::images):
613 (DocumentImpl::applets):
614 (DocumentImpl::embeds):
615 (DocumentImpl::objects):
616 (DocumentImpl::links):
617 (DocumentImpl::forms):
618 (DocumentImpl::anchors):
620 (DocumentImpl::nameableItems):
621 (DocumentImpl::getElementsByName):
622 * khtml/xml/dom_docimpl.h:
623 (DOM::DocumentImpl::realDocType):
624 (DOM::DocumentImpl::createAttribute):
625 * khtml/xml/dom_elementimpl.cpp:
626 (AttrImpl::nodeName):
627 (AttrImpl::nodeValue):
630 (ElementImpl::attributes):
631 (ElementImpl::isURLAttribute):
632 (ElementImpl::setAttributeNode):
633 (ElementImpl::removeAttributeNode):
634 (ElementImpl::setAttributeNS):
635 (ElementImpl::removeAttributeNS):
636 (ElementImpl::getAttributeNodeNS):
637 (ElementImpl::hasAttributeNS):
638 (ElementImpl::style):
639 (XMLElementImpl::cloneNode):
640 (NamedAttrMapImpl::setNamedItem):
641 (NamedAttrMapImpl::removeNamedItem):
642 * khtml/xml/dom_elementimpl.h:
643 (DOM::ElementImpl::hasAttribute):
644 (DOM::ElementImpl::getAttribute):
645 (DOM::ElementImpl::setAttribute):
646 (DOM::ElementImpl::removeAttribute):
647 (DOM::ElementImpl::getAttributeNode):
648 (DOM::ElementImpl::setAttributeNodeNS):
649 * khtml/xml/dom_nodeimpl.cpp:
650 (NodeImpl::handleLocalEvents):
651 (NodeImpl::isAncestor):
652 (NodeImpl::addEventListener):
653 (NodeImpl::removeEventListener):
654 (NodeImpl::getElementsByTagNameNS):
655 (NodeImpl::isSupported):
656 (NodeImpl::ownerDocument):
657 (NodeImpl::hasAttributes):
658 (NodeImpl::attributes):
659 (ContainerNodeImpl::removeChildren):
660 (NamedNodeMapImpl::~NamedNodeMapImpl):
661 (NamedNodeMapImpl::getNamedItemNS):
662 (NamedNodeMapImpl::removeNamedItemNS):
663 * khtml/xml/dom_nodeimpl.h:
664 (DOM::NodeImpl::getElementsByTagName):
665 (DOM::NamedNodeMapImpl::NamedNodeMapImpl):
666 (DOM::NamedNodeMapImpl::getNamedItem):
667 (DOM::NamedNodeMapImpl::removeNamedItem):
668 (DOM::NamedNodeMapImpl::setNamedItemNS):
669 (DOM::NamedNodeMapImpl::isReadOnly):
670 * khtml/xml/dom_textimpl.h:
671 * khtml/xml/dom_xmlimpl.h:
673 (-[DOMNode isSupported::]):
674 (-[DOMNode namespaceURI]):
675 (-[DOMNode hasAttributes]):
676 (-[DOMNamedNodeMap getNamedItem:]):
677 (-[DOMNamedNodeMap setNamedItem:]):
678 (-[DOMNamedNodeMap removeNamedItem:]):
679 (-[DOMNamedNodeMap getNamedItemNS::]):
680 (-[DOMNamedNodeMap setNamedItemNS:]):
681 (-[DOMNamedNodeMap removeNamedItemNS::]):
682 (-[DOMImplementation createDocument:::]):
683 (-[DOMImplementation createCSSStyleSheet::]):
684 (-[DOMDocument createAttribute:]):
685 (-[DOMDocument getElementsByTagName:]):
686 (-[DOMDocument createAttributeNS::]):
687 (-[DOMDocument getElementsByTagNameNS::]):
688 (-[DOMElement setAttribute::]):
689 (-[DOMElement removeAttribute:]):
690 (-[DOMElement getAttributeNode:]):
691 (-[DOMElement setAttributeNode:]):
692 (-[DOMElement removeAttributeNode:]):
693 (-[DOMElement getElementsByTagName:]):
694 (-[DOMElement getAttributeNS::]):
695 (-[DOMElement setAttributeNS:::]):
696 (-[DOMElement removeAttributeNS::]):
697 (-[DOMElement getAttributeNodeNS::]):
698 (-[DOMElement setAttributeNodeNS:]):
699 (-[DOMElement getElementsByTagNameNS::]):
700 (-[DOMElement hasAttribute:]):
701 (-[DOMElement hasAttributeNS::]):
702 (-[DOMElement style]):
703 (-[DOMDocumentType _documentTypeImpl]):
704 (ObjCNodeFilterCondition::acceptNode):
706 (-[DOMMutationEvent relatedNode]):
707 * kwq/KWQClipboard.h:
708 * kwq/KWQClipboard.mm:
709 (KWQClipboard::KWQClipboard):
710 (KWQClipboard::setDragImage):
711 (KWQClipboard::dragImageElement):
712 (KWQClipboard::setDragImageElement):
713 (KWQClipboard::dragNSImage):
714 * kwq/KWQKHTMLPart.mm:
715 (KWQKHTMLPart::khtmlMouseMoveEvent):
716 (KWQKHTMLPart::passSubframeEventToSubframe):
717 (KWQKHTMLPart::sendContextMenuEvent):
719 2005-05-10 Darin Adler <darin@apple.com>
721 Reviewed by David Harrison.
723 - first pass of moving code from C++ DOM wrappers into the DOM impl. classes
724 (this step mostly adds member functions missing from the DOM impl.; later steps
725 will change the C++, JavaScript, and ObjC wrappers to call these functions)
727 * khtml/css/parser.y:
728 * khtml/css/css_ruleimpl.cpp:
729 (CSSRuleListImpl::CSSRuleListImpl):
730 * khtml/css/css_ruleimpl.h:
731 (DOM::CSSRuleListImpl::CSSRuleListImpl):
732 * khtml/html/html_baseimpl.cpp:
733 (HTMLBodyElementImpl::aLink):
734 (HTMLBodyElementImpl::setALink):
735 (HTMLBodyElementImpl::background):
736 (HTMLBodyElementImpl::setBackground):
737 (HTMLBodyElementImpl::bgColor):
738 (HTMLBodyElementImpl::setBgColor):
739 (HTMLBodyElementImpl::link):
740 (HTMLBodyElementImpl::setLink):
741 (HTMLBodyElementImpl::text):
742 (HTMLBodyElementImpl::setText):
743 (HTMLBodyElementImpl::vLink):
744 (HTMLBodyElementImpl::setVLink):
745 (HTMLFrameElementImpl::HTMLFrameElementImpl):
746 (HTMLFrameElementImpl::updateForNewURL):
747 (HTMLFrameElementImpl::openURL):
748 (HTMLFrameElementImpl::parseHTMLAttribute):
749 (HTMLFrameElementImpl::rendererIsNeeded):
750 (HTMLFrameElementImpl::attach):
751 (HTMLFrameElementImpl::detach):
752 (HTMLFrameElementImpl::setLocation):
753 (HTMLFrameElementImpl::contentPart):
754 (HTMLFrameElementImpl::frameBorder):
755 (HTMLFrameElementImpl::setFrameBorder):
756 (HTMLFrameElementImpl::longDesc):
757 (HTMLFrameElementImpl::setLongDesc):
758 (HTMLFrameElementImpl::marginHeight):
759 (HTMLFrameElementImpl::setMarginHeight):
760 (HTMLFrameElementImpl::marginWidth):
761 (HTMLFrameElementImpl::setMarginWidth):
762 (HTMLFrameElementImpl::name):
763 (HTMLFrameElementImpl::setName):
764 (HTMLFrameElementImpl::setNoResize):
765 (HTMLFrameElementImpl::scrolling):
766 (HTMLFrameElementImpl::setScrolling):
767 (HTMLFrameElementImpl::src):
768 (HTMLFrameElementImpl::setSrc):
769 (HTMLFrameSetElementImpl::parseHTMLAttribute):
770 (HTMLFrameSetElementImpl::cols):
771 (HTMLFrameSetElementImpl::setCols):
772 (HTMLFrameSetElementImpl::rows):
773 (HTMLFrameSetElementImpl::setRows):
774 (HTMLHeadElementImpl::profile):
775 (HTMLHeadElementImpl::setProfile):
776 (HTMLHtmlElementImpl::version):
777 (HTMLHtmlElementImpl::setVersion):
778 (HTMLIFrameElementImpl::HTMLIFrameElementImpl):
779 (HTMLIFrameElementImpl::rendererIsNeeded):
780 (HTMLIFrameElementImpl::attach):
781 (HTMLIFrameElementImpl::isURLAttribute):
782 (HTMLIFrameElementImpl::align):
783 (HTMLIFrameElementImpl::setAlign):
784 (HTMLIFrameElementImpl::height):
785 (HTMLIFrameElementImpl::setHeight):
786 (HTMLIFrameElementImpl::src):
787 (HTMLIFrameElementImpl::width):
788 (HTMLIFrameElementImpl::setWidth):
789 * khtml/html/html_baseimpl.h:
790 (DOM::HTMLFrameElementImpl::noResize):
791 (DOM::HTMLFrameElementImpl::scrollingMode):
792 (DOM::HTMLFrameElementImpl::getMarginWidth):
793 (DOM::HTMLFrameElementImpl::getMarginHeight):
794 * khtml/html/html_blockimpl.cpp:
795 (HTMLBlockquoteElementImpl::cite):
796 (HTMLBlockquoteElementImpl::setCite):
797 (HTMLDivElementImpl::align):
798 (HTMLDivElementImpl::setAlign):
799 (HTMLHRElementImpl::align):
800 (HTMLHRElementImpl::setAlign):
801 (HTMLHRElementImpl::noShade):
802 (HTMLHRElementImpl::setNoShade):
803 (HTMLHRElementImpl::size):
804 (HTMLHRElementImpl::setSize):
805 (HTMLHRElementImpl::width):
806 (HTMLHRElementImpl::setWidth):
807 (HTMLHeadingElementImpl::align):
808 (HTMLHeadingElementImpl::setAlign):
809 (HTMLParagraphElementImpl::align):
810 (HTMLParagraphElementImpl::setAlign):
811 (HTMLPreElementImpl::width):
812 (HTMLPreElementImpl::setWidth):
813 * khtml/html/html_blockimpl.h:
814 * khtml/html/html_imageimpl.cpp:
815 (HTMLImageElementImpl::name):
816 (HTMLImageElementImpl::setName):
817 (HTMLImageElementImpl::align):
818 (HTMLImageElementImpl::setAlign):
819 (HTMLImageElementImpl::alt):
820 (HTMLImageElementImpl::setAlt):
821 (HTMLImageElementImpl::border):
822 (HTMLImageElementImpl::setBorder):
823 (HTMLImageElementImpl::setHeight):
824 (HTMLImageElementImpl::hspace):
825 (HTMLImageElementImpl::setHspace):
826 (HTMLImageElementImpl::isMap):
827 (HTMLImageElementImpl::setIsMap):
828 (HTMLImageElementImpl::longDesc):
829 (HTMLImageElementImpl::setLongDesc):
830 (HTMLImageElementImpl::src):
831 (HTMLImageElementImpl::setSrc):
832 (HTMLImageElementImpl::useMap):
833 (HTMLImageElementImpl::setUseMap):
834 (HTMLImageElementImpl::vspace):
835 (HTMLImageElementImpl::setVspace):
836 (HTMLImageElementImpl::setWidth):
837 (HTMLImageElementImpl::x):
838 (HTMLImageElementImpl::y):
839 (HTMLMapElementImpl::parseHTMLAttribute):
840 (HTMLMapElementImpl::areas):
841 (HTMLMapElementImpl::name):
842 (HTMLMapElementImpl::setName):
843 (HTMLAreaElementImpl::HTMLAreaElementImpl):
844 (HTMLAreaElementImpl::parseHTMLAttribute):
845 (HTMLAreaElementImpl::getRegion):
846 (HTMLAreaElementImpl::accessKey):
847 (HTMLAreaElementImpl::setAccessKey):
848 (HTMLAreaElementImpl::alt):
849 (HTMLAreaElementImpl::setAlt):
850 (HTMLAreaElementImpl::coords):
851 (HTMLAreaElementImpl::setCoords):
852 (HTMLAreaElementImpl::href):
853 (HTMLAreaElementImpl::setHref):
854 (HTMLAreaElementImpl::noHref):
855 (HTMLAreaElementImpl::setNoHref):
856 (HTMLAreaElementImpl::shape):
857 (HTMLAreaElementImpl::setShape):
858 (HTMLAreaElementImpl::tabIndex):
859 (HTMLAreaElementImpl::setTabIndex):
860 (HTMLAreaElementImpl::target):
861 (HTMLAreaElementImpl::setTarget):
862 * khtml/html/html_imageimpl.h:
863 (DOM::HTMLImageElementImpl::pixmap):
864 (DOM::HTMLAreaElementImpl::isDefault):
865 (DOM::HTMLMapElementImpl::getName):
866 * khtml/html/html_inlineimpl.cpp:
867 (DOM::HTMLAnchorElementImpl::accessKey):
868 (DOM::HTMLAnchorElementImpl::setAccessKey):
869 (DOM::HTMLAnchorElementImpl::charset):
870 (DOM::HTMLAnchorElementImpl::setCharset):
871 (DOM::HTMLAnchorElementImpl::coords):
872 (DOM::HTMLAnchorElementImpl::setCoords):
873 (DOM::HTMLAnchorElementImpl::href):
874 (DOM::HTMLAnchorElementImpl::setHref):
875 (DOM::HTMLAnchorElementImpl::hreflang):
876 (DOM::HTMLAnchorElementImpl::setHreflang):
877 (DOM::HTMLAnchorElementImpl::name):
878 (DOM::HTMLAnchorElementImpl::setName):
879 (DOM::HTMLAnchorElementImpl::rel):
880 (DOM::HTMLAnchorElementImpl::setRel):
881 (DOM::HTMLAnchorElementImpl::rev):
882 (DOM::HTMLAnchorElementImpl::setRev):
883 (DOM::HTMLAnchorElementImpl::shape):
884 (DOM::HTMLAnchorElementImpl::setShape):
885 (DOM::HTMLAnchorElementImpl::tabIndex):
886 (DOM::HTMLAnchorElementImpl::setTabIndex):
887 (DOM::HTMLAnchorElementImpl::target):
888 (DOM::HTMLAnchorElementImpl::setTarget):
889 (DOM::HTMLAnchorElementImpl::type):
890 (DOM::HTMLAnchorElementImpl::setType):
891 (DOM::HTMLAnchorElementImpl::blur):
892 (DOM::HTMLAnchorElementImpl::focus):
893 (DOM::HTMLBRElementImpl::clear):
894 (DOM::HTMLBRElementImpl::setClear):
895 (DOM::HTMLFontElementImpl::parseHTMLAttribute):
896 (DOM::HTMLFontElementImpl::color):
897 (DOM::HTMLFontElementImpl::setColor):
898 (DOM::HTMLFontElementImpl::face):
899 (DOM::HTMLFontElementImpl::setFace):
900 (DOM::HTMLFontElementImpl::size):
901 (DOM::HTMLFontElementImpl::setSize):
902 (DOM::HTMLModElementImpl::HTMLModElementImpl):
903 (DOM::HTMLModElementImpl::cite):
904 (DOM::HTMLModElementImpl::setCite):
905 (DOM::HTMLModElementImpl::dateTime):
906 (DOM::HTMLModElementImpl::setDateTime):
907 (DOM::HTMLQuoteElementImpl::HTMLQuoteElementImpl):
908 (DOM::HTMLQuoteElementImpl::id):
909 (DOM::HTMLQuoteElementImpl::cite):
910 (DOM::HTMLQuoteElementImpl::setCite):
911 * khtml/html/html_inlineimpl.h:
912 * khtml/html/html_listimpl.cpp:
913 (DOM::HTMLUListElementImpl::compact):
914 (DOM::HTMLUListElementImpl::setCompact):
915 (DOM::HTMLUListElementImpl::type):
916 (DOM::HTMLUListElementImpl::setType):
917 (DOM::HTMLDirectoryElementImpl::compact):
918 (DOM::HTMLDirectoryElementImpl::setCompact):
919 (DOM::HTMLMenuElementImpl::compact):
920 (DOM::HTMLMenuElementImpl::setCompact):
921 (DOM::HTMLOListElementImpl::compact):
922 (DOM::HTMLOListElementImpl::setCompact):
923 (DOM::HTMLOListElementImpl::setStart):
924 (DOM::HTMLOListElementImpl::type):
925 (DOM::HTMLOListElementImpl::setType):
926 (DOM::HTMLLIElementImpl::type):
927 (DOM::HTMLLIElementImpl::setType):
928 (DOM::HTMLLIElementImpl::value):
929 (DOM::HTMLLIElementImpl::setValue):
930 (DOM::HTMLDListElementImpl::compact):
931 (DOM::HTMLDListElementImpl::setCompact):
932 * khtml/html/html_listimpl.h:
933 (DOM::HTMLUListElementImpl::start):
934 (DOM::HTMLDirectoryElementImpl::HTMLDirectoryElementImpl):
935 (DOM::HTMLMenuElementImpl::HTMLMenuElementImpl):
936 (DOM::HTMLOListElementImpl::HTMLOListElementImpl):
937 (DOM::HTMLOListElementImpl::start):
938 * khtml/html/html_objectimpl.cpp:
939 (DOM::HTMLAppletElementImpl::align):
940 (DOM::HTMLAppletElementImpl::setAlign):
941 (DOM::HTMLAppletElementImpl::alt):
942 (DOM::HTMLAppletElementImpl::setAlt):
943 (DOM::HTMLAppletElementImpl::archive):
944 (DOM::HTMLAppletElementImpl::setArchive):
945 (DOM::HTMLAppletElementImpl::code):
946 (DOM::HTMLAppletElementImpl::setCode):
947 (DOM::HTMLAppletElementImpl::codeBase):
948 (DOM::HTMLAppletElementImpl::setCodeBase):
949 (DOM::HTMLAppletElementImpl::height):
950 (DOM::HTMLAppletElementImpl::setHeight):
951 (DOM::HTMLAppletElementImpl::hspace):
952 (DOM::HTMLAppletElementImpl::setHspace):
953 (DOM::HTMLAppletElementImpl::name):
954 (DOM::HTMLAppletElementImpl::setName):
955 (DOM::HTMLAppletElementImpl::object):
956 (DOM::HTMLAppletElementImpl::setObject):
957 (DOM::HTMLAppletElementImpl::vspace):
958 (DOM::HTMLAppletElementImpl::setVspace):
959 (DOM::HTMLAppletElementImpl::width):
960 (DOM::HTMLAppletElementImpl::setWidth):
961 (DOM::HTMLObjectElementImpl::code):
962 (DOM::HTMLObjectElementImpl::setCode):
963 (DOM::HTMLObjectElementImpl::align):
964 (DOM::HTMLObjectElementImpl::setAlign):
965 (DOM::HTMLObjectElementImpl::archive):
966 (DOM::HTMLObjectElementImpl::setArchive):
967 (DOM::HTMLObjectElementImpl::border):
968 (DOM::HTMLObjectElementImpl::setBorder):
969 (DOM::HTMLObjectElementImpl::codeBase):
970 (DOM::HTMLObjectElementImpl::setCodeBase):
971 (DOM::HTMLObjectElementImpl::codeType):
972 (DOM::HTMLObjectElementImpl::setCodeType):
973 (DOM::HTMLObjectElementImpl::data):
974 (DOM::HTMLObjectElementImpl::setData):
975 (DOM::HTMLObjectElementImpl::declare):
976 (DOM::HTMLObjectElementImpl::setDeclare):
977 (DOM::HTMLObjectElementImpl::height):
978 (DOM::HTMLObjectElementImpl::setHeight):
979 (DOM::HTMLObjectElementImpl::hspace):
980 (DOM::HTMLObjectElementImpl::setHspace):
981 (DOM::HTMLObjectElementImpl::name):
982 (DOM::HTMLObjectElementImpl::setName):
983 (DOM::HTMLObjectElementImpl::standby):
984 (DOM::HTMLObjectElementImpl::setStandby):
985 (DOM::HTMLObjectElementImpl::tabIndex):
986 (DOM::HTMLObjectElementImpl::setTabIndex):
987 (DOM::HTMLObjectElementImpl::type):
988 (DOM::HTMLObjectElementImpl::setType):
989 (DOM::HTMLObjectElementImpl::useMap):
990 (DOM::HTMLObjectElementImpl::setUseMap):
991 (DOM::HTMLObjectElementImpl::vspace):
992 (DOM::HTMLObjectElementImpl::setVspace):
993 (DOM::HTMLObjectElementImpl::width):
994 (DOM::HTMLObjectElementImpl::setWidth):
995 (DOM::HTMLParamElementImpl::isURLAttribute):
996 (DOM::HTMLParamElementImpl::setName):
997 (DOM::HTMLParamElementImpl::type):
998 (DOM::HTMLParamElementImpl::setType):
999 (DOM::HTMLParamElementImpl::setValue):
1000 (DOM::HTMLParamElementImpl::valueType):
1001 (DOM::HTMLParamElementImpl::setValueType):
1002 * khtml/html/html_objectimpl.h:
1003 (DOM::HTMLParamElementImpl::name):
1004 (DOM::HTMLParamElementImpl::value):
1005 * khtml/html/html_tableimpl.cpp:
1006 (DOM::HTMLTableElementImpl::rows):
1007 (DOM::HTMLTableElementImpl::tBodies):
1008 (DOM::HTMLTableElementImpl::align):
1009 (DOM::HTMLTableElementImpl::setAlign):
1010 (DOM::HTMLTableElementImpl::bgColor):
1011 (DOM::HTMLTableElementImpl::setBgColor):
1012 (DOM::HTMLTableElementImpl::border):
1013 (DOM::HTMLTableElementImpl::setBorder):
1014 (DOM::HTMLTableElementImpl::cellPadding):
1015 (DOM::HTMLTableElementImpl::setCellPadding):
1016 (DOM::HTMLTableElementImpl::cellSpacing):
1017 (DOM::HTMLTableElementImpl::setCellSpacing):
1018 (DOM::HTMLTableElementImpl::frame):
1019 (DOM::HTMLTableElementImpl::setFrame):
1020 (DOM::HTMLTableElementImpl::rules):
1021 (DOM::HTMLTableElementImpl::setRules):
1022 (DOM::HTMLTableElementImpl::summary):
1023 (DOM::HTMLTableElementImpl::setSummary):
1024 (DOM::HTMLTableElementImpl::width):
1025 (DOM::HTMLTableElementImpl::setWidth):
1026 (DOM::HTMLTableSectionElementImpl::align):
1027 (DOM::HTMLTableSectionElementImpl::setAlign):
1028 (DOM::HTMLTableSectionElementImpl::ch):
1029 (DOM::HTMLTableSectionElementImpl::setCh):
1030 (DOM::HTMLTableSectionElementImpl::chOff):
1031 (DOM::HTMLTableSectionElementImpl::setChOff):
1032 (DOM::HTMLTableSectionElementImpl::vAlign):
1033 (DOM::HTMLTableSectionElementImpl::setVAlign):
1034 (DOM::HTMLTableSectionElementImpl::rows):
1035 (DOM::HTMLTableRowElementImpl::cells):
1036 (DOM::HTMLTableRowElementImpl::setCells):
1037 (DOM::HTMLTableRowElementImpl::align):
1038 (DOM::HTMLTableRowElementImpl::setAlign):
1039 (DOM::HTMLTableRowElementImpl::bgColor):
1040 (DOM::HTMLTableRowElementImpl::setBgColor):
1041 (DOM::HTMLTableRowElementImpl::ch):
1042 (DOM::HTMLTableRowElementImpl::setCh):
1043 (DOM::HTMLTableRowElementImpl::chOff):
1044 (DOM::HTMLTableRowElementImpl::setChOff):
1045 (DOM::HTMLTableRowElementImpl::vAlign):
1046 (DOM::HTMLTableRowElementImpl::setVAlign):
1047 (DOM::HTMLTableCellElementImpl::abbr):
1048 (DOM::HTMLTableCellElementImpl::setAbbr):
1049 (DOM::HTMLTableCellElementImpl::align):
1050 (DOM::HTMLTableCellElementImpl::setAlign):
1051 (DOM::HTMLTableCellElementImpl::axis):
1052 (DOM::HTMLTableCellElementImpl::setAxis):
1053 (DOM::HTMLTableCellElementImpl::bgColor):
1054 (DOM::HTMLTableCellElementImpl::setBgColor):
1055 (DOM::HTMLTableCellElementImpl::ch):
1056 (DOM::HTMLTableCellElementImpl::setCh):
1057 (DOM::HTMLTableCellElementImpl::chOff):
1058 (DOM::HTMLTableCellElementImpl::setChOff):
1059 (DOM::HTMLTableCellElementImpl::setColSpan):
1060 (DOM::HTMLTableCellElementImpl::headers):
1061 (DOM::HTMLTableCellElementImpl::setHeaders):
1062 (DOM::HTMLTableCellElementImpl::height):
1063 (DOM::HTMLTableCellElementImpl::setHeight):
1064 (DOM::HTMLTableCellElementImpl::noWrap):
1065 (DOM::HTMLTableCellElementImpl::setNoWrap):
1066 (DOM::HTMLTableCellElementImpl::setRowSpan):
1067 (DOM::HTMLTableCellElementImpl::scope):
1068 (DOM::HTMLTableCellElementImpl::setScope):
1069 (DOM::HTMLTableCellElementImpl::vAlign):
1070 (DOM::HTMLTableCellElementImpl::setVAlign):
1071 (DOM::HTMLTableCellElementImpl::width):
1072 (DOM::HTMLTableCellElementImpl::setWidth):
1073 (DOM::HTMLTableColElementImpl::align):
1074 (DOM::HTMLTableColElementImpl::setAlign):
1075 (DOM::HTMLTableColElementImpl::ch):
1076 (DOM::HTMLTableColElementImpl::setCh):
1077 (DOM::HTMLTableColElementImpl::chOff):
1078 (DOM::HTMLTableColElementImpl::setChOff):
1079 (DOM::HTMLTableColElementImpl::setSpan):
1080 (DOM::HTMLTableColElementImpl::vAlign):
1081 (DOM::HTMLTableColElementImpl::setVAlign):
1082 (DOM::HTMLTableColElementImpl::width):
1083 (DOM::HTMLTableColElementImpl::setWidth):
1084 (DOM::HTMLTableCaptionElementImpl::parseHTMLAttribute):
1085 (DOM::HTMLTableCaptionElementImpl::align):
1086 (DOM::HTMLTableCaptionElementImpl::setAlign):
1087 * khtml/html/html_tableimpl.h:
1088 (DOM::HTMLTableColElementImpl::span):
1089 * khtml/rendering/render_applet.cpp:
1090 (RenderApplet::createWidgetIfNecessary):
1091 * khtml/rendering/render_frames.cpp:
1092 (RenderFrame::slotViewCleared):
1093 (RenderPartObject::updateWidget):
1094 (RenderPartObject::slotViewCleared):
1095 * khtml/xml/dom_docimpl.cpp:
1096 (DocumentImpl::completeURL):
1097 * khtml/xml/dom_docimpl.h:
1099 2005-05-09 Maciej Stachowiak <mjs@apple.com>
1103 - remove more isFirst/isLast functions and use isStart/isEnd verions instead
1105 * khtml/editing/htmlediting.cpp:
1106 (khtml::DeleteSelectionCommand::initializePositionData):
1107 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
1108 (khtml::InsertTextCommand::input):
1109 (khtml::ReplaceSelectionCommand::doApply):
1110 (khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded):
1111 * khtml/editing/visible_position.cpp:
1112 (khtml::VisiblePosition::previous):
1113 (khtml::setAffinityUsingLinePosition):
1114 (khtml::isFirstVisiblePositionInNode):
1115 * khtml/editing/visible_position.h:
1116 * khtml/editing/visible_units.cpp:
1118 (khtml::previousLinePosition):
1119 * khtml/xml/dom_position.cpp:
1120 (DOM::Position::previousCharacterPosition):
1121 (DOM::Position::nextCharacterPosition):
1122 * kwq/WebCoreBridge.mm:
1123 (-[WebCoreBridge smartInsertForString:replacingRange:beforeString:afterString:]):
1125 2005-05-09 Maciej Stachowiak <mjs@apple.com>
1129 - remove isFirstVisiblePositionInBlock and isLastVisiblePositionInBlock, in favor of isStartOfBlock and isEndOfBlock
1131 It turned out that both isEndOfBlock and isLastVisiblePositionInBlock had (different) bugs,
1132 and there was code relying on the bugs of each. So in addition I fixed isEndOfBlock and fixed
1133 the parts of the code relying on buggy behavior.
1135 I also removed the includeEndOfLine parameter to endOfBlock since no one used it and it's not
1136 clear if it would ever be useful.
1138 * khtml/editing/htmlediting.cpp:
1139 (khtml::InsertLineBreakCommand::doApply): Use new calls.
1140 (khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion): Don't gratuitously make
1141 an UPSTREAM VisiblePosition, as this will cause trouble comparing it to end of block.
1142 (khtml::InsertParagraphSeparatorCommand::doApply): Use new calls.
1143 (khtml::ReplaceSelectionCommand::doApply): Use new calls. Also, don't make a position <BR,0> and test
1144 if it is the end of a block, that can never be true, although the buggy code in
1145 isLastVisiblePositionInBlock would say it is. Make <BR,1> instead.
1146 * khtml/editing/markup.cpp:
1147 (khtml::createMarkup): Instead of checking isEndOfBlock on the start position, check if the start's
1148 next is in a different block, to avoid relying on the buggy old isEndOfBlock behavior.
1149 * khtml/editing/visible_position.cpp:
1150 (khtml::isFirstVisiblePositionInParagraph): Use isStartOfBlock.
1151 (khtml::isLastVisiblePositionInParagraph): Use isEndOfBlock.
1152 * khtml/editing/visible_position.h:
1153 * khtml/editing/visible_units.cpp:
1154 (khtml::endOfBlock): Greatly simplify, and no longer consider the start of a descendant
1155 block to be the end of the block. That's inconsistent with how startOfBlock works. Also
1156 remove include end of line parameter.
1157 (khtml::isEndOfBlock): Don't pass unneeded parameter.
1158 * khtml/editing/visible_units.h:
1160 2005-05-09 Adele Peterson <adele@apple.com>
1162 fix for <rdar://problem/4110775> Crash will occur when double-clicking outerHTML link on W3 DOM test
1166 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::setOuterHTML): added nil check.
1167 This was causing a crash when you tried to set the outerHTML on an element that was no longer in the DOM tree.
1169 * layout-tests/fast/dom/outerText-no-element.html: Added. Tests case where you try to set outerText on an element no longer in the DOM tree.
1170 * layout-tests/fast/dom/outerText-no-element-expected.txt: Added.
1171 * layout-tests/fast/dynamic/outerHTML-doc.html: Added. Tests case where someone tries to set outerHTML on the document.
1172 * layout-tests/fast/dynamic/outerHTML-doc-expected.txt: Added..
1173 * layout-tests/fast/dynamic/outerHTML-no-element.html: Added. Tests case where you try to set outerHTML on an element no longer in the DOM tree.
1174 * layout-tests/fast/dynamic/outerHTML-no-element-expected.txt: Added.
1175 * layout-tests/fast/dynamic/outerHTML-img.html: moved images to resources directory
1176 * layout-tests/fast/dynamic/resources/apple.gif: Added.
1177 * layout-tests/fast/dynamic/resources/mozilla.gif: Added.
1179 2005-05-09 Maciej Stachowiak <mjs@apple.com>
1183 - remove code for DoNotStayInBlock variant of upstream/downstream and make
1184 the methods take no parameters
1186 * khtml/editing/htmlediting.cpp:
1187 (khtml::CompositeEditCommand::deleteInsignificantTextDownstream):
1188 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1189 (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
1190 (khtml::ApplyStyleCommand::applyInlineStyle):
1191 (khtml::ApplyStyleCommand::removeInlineStyle):
1192 (khtml::ApplyStyleCommand::nodeFullySelected):
1193 (khtml::ApplyStyleCommand::nodeFullyUnselected):
1194 (khtml::DeleteSelectionCommand::initializePositionData):
1195 (khtml::DeleteSelectionCommand::fixupWhitespace):
1196 (khtml::InsertLineBreakCommand::insertNodeAfterPosition):
1197 (khtml::InsertLineBreakCommand::insertNodeBeforePosition):
1198 (khtml::InsertLineBreakCommand::doApply):
1199 (khtml::InsertParagraphSeparatorCommand::doApply):
1200 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1201 (khtml::InsertTextCommand::prepareForTextInsertion):
1202 (khtml::InsertTextCommand::input):
1203 (khtml::InsertTextCommand::insertSpace):
1204 (khtml::ReplaceSelectionCommand::doApply):
1205 * khtml/editing/selection.cpp:
1206 (khtml::Selection::toRange):
1207 (khtml::Selection::validate):
1208 * khtml/editing/visible_position.cpp:
1209 (khtml::VisiblePosition::previousVisiblePosition):
1210 (khtml::VisiblePosition::nextVisiblePosition):
1211 (khtml::VisiblePosition::downstreamDeepEquivalent):
1212 (khtml::isFirstVisiblePositionInParagraph):
1213 (khtml::isFirstVisiblePositionInBlock):
1214 (khtml::isLastVisiblePositionInParagraph):
1215 * khtml/xml/dom2_rangeimpl.cpp:
1216 (DOM::RangeImpl::editingStartPosition):
1217 * khtml/xml/dom_position.cpp:
1219 (DOM::Position::upstream):
1220 (DOM::Position::downstream):
1221 (DOM::Position::leadingWhitespacePosition):
1222 (DOM::Position::trailingWhitespacePosition):
1223 * khtml/xml/dom_position.h:
1224 * kwq/WebCoreBridge.mm:
1225 (-[WebCoreBridge smartDeleteRangeForProposedRange:]):
1227 2005-05-08 Maciej Stachowiak <mjs@apple.com>
1229 Reviewed by Dave Harrison.
1231 - remove remaining uses of upstream/downstream DoNotStayInBlock
1233 * khtml/editing/htmlediting.cpp:
1234 (khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1235 (khtml::ApplyStyleCommand::nodeFullySelected):
1236 (khtml::ApplyStyleCommand::nodeFullyUnselected):
1237 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
1238 (khtml::InsertParagraphSeparatorCommand::doApply):
1239 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1240 (khtml::InsertTextCommand::insertSpace):
1241 (khtml::ReplaceSelectionCommand::doApply):
1243 * khtml/editing/visible_position.cpp:
1244 (khtml::enclosingBlockFlowElement): New helper function.
1245 * khtml/editing/visible_position.h:
1247 * khtml/editing/visible_units.cpp:
1248 (khtml::inSameBlock): Check enclosing block flows instead of comparing
1249 visible block starts. Two nested blocks may have the same visible start but
1250 different visible ends, so the old check would give false positives.
1252 2005-05-09 David Harrison <harrison@apple.com>
1254 Add layout test for <rdar://problem/4110366>.
1256 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011-expected.txt: Added.
1257 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-011.html: Added.
1259 2005-05-09 Darin Adler <darin@apple.com>
1261 - checked in a result for the Flash replacement test that Dave added
1263 * layout-tests/fast/dynamic/flash-replacement-test-expected.txt: Added.
1264 Hope it's right! If not, Dave can update it.
1266 2005-05-09 Darin Adler <darin@apple.com>
1268 * Makefile.am: Don't set up PBXIntermediatesDirectory explicitly;
1269 Not needed to make builds work, spews undesirable error messages too.
1271 * WebCore.pbproj/project.pbxproj: Remove unneeded $(DSTROOT) in framework paths.
1273 2005-05-07 Maciej Stachowiak <mjs@apple.com>
1277 - remove some of the uses of upstream/downstream DoNotStayInBlock
1279 * khtml/editing/markup.cpp:
1280 (khtml::createMarkup): Instead of using upstream to decide if a line break should be
1281 added at the end, use inSameParagraph.
1282 * khtml/editing/selection.cpp:
1283 (khtml::Selection::debugPosition): Remove the code to print upstream and downstream,
1284 the selection endpoints themselves are adequate for debugging and are what we use for
1286 * khtml/xml/dom2_rangeimpl.cpp:
1287 (DOM::RangeImpl::editingStartPosition): Skip a possible paragraph break at the start
1288 of the selection in a more explicit way to avoid DoNotStayInBlock.
1290 2005-05-07 David Harrison <harrison@apple.com>
1294 <rdar://problem/4110366> Deleting text at the end of email moves insertion point to the top of the document
1296 * khtml/editing/htmlediting.cpp:
1297 (khtml::DeleteSelectionCommand::handleGeneralDelete):
1298 Update m_upstreamStart when deleting m_downstreamEnd.node() if the former is no longer in the document.
1299 Better to update here than trying to recover later in calculateEndingPosition().
1301 2005-05-07 David Harrison <harrison@apple.com>
1303 Remove workaround for <rdar://problem/4103339>.
1305 * khtml/editing/htmlediting.cpp:
1306 (khtml::DeleteSelectionCommand::initializePositionData):
1308 2005-05-06 Maciej Stachowiak <mjs@apple.com>
1310 Reviewed by Dave Harrison.
1312 - make StayInBlock vs DoNotStayInBlock explicit in all calls to
1313 upstream/downstream, in preparation for phasing out the
1314 DoNotStayInBlock variant.
1316 * khtml/editing/htmlediting.cpp:
1317 (khtml::ApplyStyleCommand::nodeFullySelected):
1318 (khtml::ApplyStyleCommand::nodeFullyUnselected):
1319 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
1320 (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
1321 (khtml::InsertTextCommand::insertSpace):
1322 (khtml::ReplaceSelectionCommand::doApply):
1323 * khtml/editing/markup.cpp:
1324 (khtml::createMarkup):
1325 * khtml/editing/selection.cpp:
1326 (khtml::Selection::debugPosition):
1327 * khtml/xml/dom_position.h:
1329 2005-05-06 David Harrison <harrison@apple.com>
1331 Reviewed by Maciej, Darin.
1333 <rdar://problem/4103339> VisiblePosition and PositionIterator iterators do not return positions in order
1335 * WebCore.pbproj/project.pbxproj:
1336 Removed dom_positioniterator.h and dom_positioniterator.cpp.
1338 * khtml/editing/htmlediting.cpp:
1339 Removed unused include of dom_positioniterator.h and "using" of PositionIterator.
1341 * khtml/editing/selection.cpp:
1342 Removed unused include of dom_positioniterator.h.
1344 * khtml/editing/visible_position.h:
1345 * khtml/editing/visible_position.cpp:
1346 (khtml::VisiblePosition::previousVisiblePosition):
1347 (khtml::VisiblePosition::nextVisiblePosition):
1348 (khtml::VisiblePosition::downstreamDeepEquivalent):
1349 Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of duplicated code.
1351 * khtml/xml/dom_nodeimpl.h:
1352 * khtml/xml/dom_nodeimpl.cpp:
1353 (NodeImpl::maxDeepOffset):
1354 Added to support Position::next(), Position::previous(), Position::atStart(), Position::atEnd()
1356 * khtml/xml/dom_position.h:
1357 * khtml/xml/dom_position.cpp:
1358 (DOM::Position::previous):
1359 (DOM::Position::next):
1360 (DOM::Position::atStart):
1361 (DOM::Position::atEnd):
1362 Moved here, replacing VisiblePosition's duplicate and PositionIterator. Fixed to
1363 return positions in order and not skip positions.
1365 (DOM::Position::previousCharacterPosition):
1366 (DOM::Position::nextCharacterPosition):
1367 Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of PositionIterator.
1370 (DOM::Position::upstream):
1371 (DOM::Position::downstream):
1372 Use Position::next(), Position::previous(), Position::atStart(), Position::atEnd() instead of PositionIterator.
1374 * khtml/xml/dom_positioniterator.cpp: Removed.
1375 * khtml/xml/dom_positioniterator.h: Removed.
1376 Removed in favor of Position::next(), Position::previous(), Position::atStart(), Position::atEnd()
1378 2005-05-05 Maciej Stachowiak <mjs@apple.com>
1382 <rdar://problem/4058167> Unit Converter and Weather widgets crashed in KJS::Collector::markCurrentThreadConservatively
1384 Avoid possibly allocating new prototype objects as parameters to
1385 superclass constructors - there may be an allocated but
1386 uninitilized object so this is a bad time to allocate. Instead,
1387 set the prototype in the constructor body, since the object is
1388 happily allocated by then.
1390 * khtml/ecma/kjs_binding.h:
1391 * khtml/ecma/kjs_css.cpp:
1392 (DOMCSSStyleDeclaration::DOMCSSStyleDeclaration):
1393 (DOMMediaList::DOMMediaList):
1394 (DOMCSSStyleSheet::DOMCSSStyleSheet):
1395 (DOMCSSPrimitiveValue::DOMCSSPrimitiveValue):
1396 (DOMCSSValueList::DOMCSSValueList):
1397 * khtml/ecma/kjs_css.h:
1398 (KJS::DOMStyleSheet::DOMStyleSheet):
1399 (KJS::DOMCSSValue::DOMCSSValue):
1400 * khtml/ecma/kjs_dom.cpp:
1402 (DOMDocument::DOMDocument):
1403 (DOMElement::DOMElement):
1404 (DOMDOMImplementation::DOMDOMImplementation):
1405 (DOMNamedNodeMap::DOMNamedNodeMap):
1406 (DOMNamedNodesCollection::DOMNamedNodesCollection):
1407 (DOMCharacterData::DOMCharacterData):
1409 * khtml/ecma/kjs_dom.h:
1410 (KJS::NodeConstructor::NodeConstructor):
1411 (KJS::DOMExceptionConstructor::DOMExceptionConstructor):
1412 * khtml/ecma/kjs_events.cpp:
1413 (DOMEvent::DOMEvent):
1414 (Clipboard::Clipboard):
1415 * khtml/ecma/kjs_html.cpp:
1416 (HTMLCollection::HTMLCollection):
1417 * khtml/ecma/kjs_range.cpp:
1418 (DOMRange::DOMRange):
1419 * khtml/ecma/kjs_traversal.cpp:
1420 (DOMNodeIterator::DOMNodeIterator):
1421 (DOMNodeFilter::DOMNodeFilter):
1422 (DOMTreeWalker::DOMTreeWalker):
1423 * khtml/ecma/xmlhttprequest.cpp:
1424 (KJS::XMLHttpRequest::XMLHttpRequest):
1425 * khtml/ecma/xmlserializer.cpp:
1426 (KJS::XMLSerializer::XMLSerializer):
1428 2005-05-06 Darin Adler <darin@apple.com>
1432 - make building multiple trees with make work better
1434 * Makefile.am: Set up Xcode build directory before invoking xcodebuild.
1436 2005-05-05 David Hyatt <hyatt@apple.com>
1438 Eliminate the FOUCS on wired.com. innerWidth and innerHeight on window should not do a layout that ignores
1439 pending stylesheets, since even if stylesheets are loading the correct window dimensions can be determined with
1442 The radar # is 4109888.
1446 * khtml/ecma/kjs_window.cpp:
1448 (Window::updateLayout):
1449 * khtml/ecma/kjs_window.h:
1451 2005-05-05 David Hyatt <hyatt@apple.com>
1453 Fix for 4109667, sIFR flash replacement technique often malfunctions. This bug occurs when the plugin
1454 widget update causes the onload for the document to fire. Because you can be in the middle of a style
1455 recalc when doing an attach (in response to a stylesheet load), the onload fires in the middle of the attach
1456 process when the tree is in a bogus state.
1458 The fix is to add a bit to the document that tells style recalc that the implicitClose() method was invoked
1459 during the style recalc process and the code has been patched so that when this situation occurs, the close is
1460 deferred until after the style recalc has finished.
1462 Reviewed by John Sullivan
1464 * khtml/xml/dom_docimpl.cpp:
1465 (DocumentImpl::DocumentImpl):
1466 (DocumentImpl::recalcStyle):
1467 (DocumentImpl::implicitClose):
1468 * khtml/xml/dom_docimpl.h:
1469 * layout-tests/fast/dynamic/flash-replacement-test.html: Added.
1471 2005-05-05 Darin Adler <darin@apple.com>
1473 Reviewed by Dave Hyatt.
1475 - fixed <rdar://problem/4109564> REGRESSION (Atlanta): maps.google.com doesn't always center California correctly
1477 * khtml/ecma/kjs_events.cpp: (offsetFromTarget): Fix two places that said X where they should say Y.
1479 2005-05-05 David Harrison <harrison@apple.com>
1481 Restore fixed setEndingSelection. Fixed method was ifdef'd out
1482 because change was at end of Tiger development, but method is
1483 unused. You just can never be _too_ safe.
1485 * khtml/editing/htmlediting.cpp:
1486 (khtml::EditCommandPtr::setEndingSelection):
1488 2005-05-02 Maciej Stachowiak <mjs@apple.com>
1492 - renamed NodeBaseImpl to ContainerNodeImpl
1494 * khtml/ecma/kjs_dom.cpp:
1495 (DOMNodeProtoFunc::tryCall): Avoid use of NodeBaseImpl and avoid
1496 use of obsolete checkNoOwner call, use isAncestor instead.
1497 * khtml/html/html_elementimpl.cpp:
1498 (HTMLElementImpl::setOuterText): Avoid gratuitous use of
1500 * khtml/xml/dom_nodeimpl.cpp:
1501 (NodeBaseImpl::checkNoOwner): Removed.
1503 Ther rest is all just simple renaming.
1505 * khtml/xml/dom_docimpl.cpp:
1506 (DocumentImpl::DocumentImpl):
1507 (DocumentImpl::attach):
1508 (DocumentImpl::detach):
1509 (DocumentFragmentImpl::DocumentFragmentImpl):
1510 * khtml/xml/dom_docimpl.h:
1511 * khtml/xml/dom_elementimpl.cpp:
1512 (AttrImpl::AttrImpl):
1513 (ElementImpl::ElementImpl):
1514 (ElementImpl::insertedIntoDocument):
1515 (ElementImpl::removedFromDocument):
1516 (ElementImpl::attach):
1517 (ElementImpl::dump):
1518 * khtml/xml/dom_elementimpl.h:
1519 * khtml/xml/dom_nodeimpl.cpp:
1520 (ContainerNodeImpl::ContainerNodeImpl):
1521 (ContainerNodeImpl::~ContainerNodeImpl):
1522 (ContainerNodeImpl::firstChild):
1523 (ContainerNodeImpl::lastChild):
1524 (ContainerNodeImpl::insertBefore):
1525 (ContainerNodeImpl::replaceChild):
1526 (ContainerNodeImpl::removeChild):
1527 (ContainerNodeImpl::removeChildren):
1528 (ContainerNodeImpl::appendChild):
1529 (ContainerNodeImpl::hasChildNodes):
1530 (ContainerNodeImpl::setFirstChild):
1531 (ContainerNodeImpl::setLastChild):
1532 (ContainerNodeImpl::checkSameDocument):
1533 (ContainerNodeImpl::checkIsChild):
1534 (ContainerNodeImpl::addChild):
1535 (ContainerNodeImpl::attach):
1536 (ContainerNodeImpl::detach):
1537 (ContainerNodeImpl::insertedIntoDocument):
1538 (ContainerNodeImpl::removedFromDocument):
1539 (ContainerNodeImpl::cloneChildNodes):
1540 (ContainerNodeImpl::getElementsByTagNameNS):
1541 (ContainerNodeImpl::getUpperLeftCorner):
1542 (ContainerNodeImpl::getLowerRightCorner):
1543 (ContainerNodeImpl::getRect):
1544 (ContainerNodeImpl::setFocus):
1545 (ContainerNodeImpl::setActive):
1546 (ContainerNodeImpl::childNodeCount):
1547 (ContainerNodeImpl::childNode):
1548 (ContainerNodeImpl::dispatchChildInsertedEvents):
1549 (ContainerNodeImpl::dispatchChildRemovalEvents):
1550 * khtml/xml/dom_nodeimpl.h:
1551 * khtml/xml/dom_xmlimpl.cpp:
1552 (DOM::EntityImpl::EntityImpl):
1553 (DOM::EntityReferenceImpl::EntityReferenceImpl):
1554 (DOM::NotationImpl::NotationImpl):
1555 (DOM::ProcessingInstructionImpl::ProcessingInstructionImpl):
1556 * khtml/xml/dom_xmlimpl.h:
1558 2005-05-04 Vicki Murley <vicki@apple.com>
1562 - fix mismatched parentheses in one of the ifdefs
1564 * khtml/html/html_headimpl.cpp:
1565 (HTMLTitleElementImpl::childrenChanged):
1567 2005-05-04 Darin Adler <darin@apple.com>
1569 Reviewed by Dave Hyatt.
1571 - fixed build rules to match other projects
1573 * WebCore.pbproj/project.pbxproj: Set deployment target to 10.3 in the build styles.
1574 When built without a build style (by Apple B&I) we want to get the target from the
1575 environment. But when built with a build style (by Safari engineers and others), we want
1578 * Makefile.am: Took out extra parameters that make command-line building different from
1579 Xcode building. Now that this is fixed, you should not get a full rebuild if you switch
1580 from command line to Xcode or back.
1582 2005-05-04 Vicki Murley <vicki@apple.com>
1586 - fixed <rdar://problem/3986228> Not able to load additional script blocks dynamically
1588 Run scripts when they're inserted into the document. Use createdByParser bit to make sure
1589 that scripts aren't run twice, once while parsing and again when inserting.
1591 * khtml/html/html_headimpl.cpp:
1592 (HTMLScriptElementImpl::HTMLScriptElementImpl):
1593 (HTMLScriptElementImpl::~HTMLScriptElementImpl):
1594 (HTMLScriptElementImpl::insertedIntoDocument):
1595 (HTMLScriptElementImpl::removedFromDocument):
1596 (HTMLScriptElementImpl::notifyFinished):
1597 * khtml/html/html_headimpl.h:
1598 (DOM::HTMLScriptElementImpl::setCreatedByParser):
1599 * khtml/html/htmlparser.cpp:
1600 (KHTMLParser::getElement):
1601 * khtml/xml/xml_tokenizer.cpp:
1602 (khtml::XMLTokenizer::startElement):
1604 2005-05-03 David Hyatt <hyatt@apple.com>
1606 Normalize all our custom properties in our implementation to be -khtml (remove all the -apple).
1608 Make sure that -apple, -khtml, and -moz are all able to be used. -apple and -moz just map to -khtml.
1610 Add support for automatically converting -khtml-opacity to opacity (for legacy Safari 1.1 compat).
1614 * khtml/css/css_computedstyle.cpp:
1616 (DOM::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1617 * khtml/css/cssparser.cpp:
1618 (CSSParser::parseValue):
1619 * khtml/css/cssproperties.in:
1620 * khtml/css/cssstyleselector.cpp:
1621 (khtml::CSSStyleSelector::applyDeclarations):
1622 (khtml::CSSStyleSelector::applyProperty):
1623 * khtml/css/parser.y:
1624 * khtml/ecma/kjs_css.cpp:
1627 2005-05-03 Darin Adler <darin@apple.com>
1631 * WebCore.pbproj/project.pbxproj: Fix some SYMROOTS that should have been SYMROOT.
1633 2005-05-03 David Hyatt <hyatt@apple.com>
1635 Fix for 4098281, news.com missing a bunch of content. Make sure not to apply strict SGML parsing
1636 when stripping comments out of scripts.
1638 New test is comments-in-script.html
1640 * khtml/html/htmltokenizer.cpp:
1641 (khtml::HTMLTokenizer::parseComment):
1643 2005-05-03 David Hyatt <hyatt@apple.com>
1645 Remove unused notification to avoid ERROR messages spewing on the acid2 test.
1649 * khtml/khtml_part.cpp:
1650 (KHTMLPart::processObjectRequest):
1651 * khtml/rendering/render_frames.cpp:
1652 (RenderPartObject::updateWidget):
1653 * khtml/rendering/render_frames.h:
1655 2005-05-03 Darin Adler <darin@apple.com>
1657 Reviewed by Dave Hyatt.
1658 No new layout tests needed.
1660 - eliminated the bogus kMin/kMax macros that we had in addition to inline functions
1663 * kwq/KWQKGlobal.h: Remove the kMin/kMax macros.
1665 * khtml/css/cssstyleselector.cpp:
1666 (khtml::CSSStyleSelector::applyProperty): Change type of constant so both sides
1667 of kMin calls match.
1668 (khtml::CSSStyleSelector::fontSizeForKeyword): Ditto.
1669 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::parseEntity): Ditto.
1671 - remove unused parameter to dirtyLinesFromChangedChild for clarity
1673 * khtml/rendering/render_object.h: Don't take the parameter.
1674 * khtml/rendering/render_object.cpp: (RenderObject::dirtyLinesFromChangedChild): Ditto.
1676 * khtml/rendering/render_flow.h: Don't take the parameter.
1677 * khtml/rendering/render_flow.cpp:
1678 (RenderFlow::detach): Don't pass the parameter.
1679 (RenderFlow::dirtyLinesFromChangedChild): Don't take the parameter.
1681 * khtml/rendering/render_text.cpp: (RenderText::detach): Don't pass the parameter.
1683 - convert DOM::NodeImpl into an abstract base class by making a couple of functions
1684 pure virtual for clarity
1686 * khtml/xml/dom_nodeimpl.h: Made nodeName and nodeType pure virtual.
1687 * khtml/xml/dom_nodeimpl.cpp: Remove bodies of nodeName and nodeType.
1689 2005-05-03 David Hyatt <hyatt@apple.com>
1691 Fix for object element to support fallback content. WIth this change Safari passes the Acid2 test.
1695 * khtml/css/html4.css:
1696 * khtml/html/html_objectimpl.cpp:
1697 (HTMLObjectElementImpl::HTMLObjectElementImpl):
1698 (HTMLObjectElementImpl::parseHTMLAttribute):
1699 (HTMLObjectElementImpl::rendererIsNeeded):
1700 (HTMLObjectElementImpl::createRenderer):
1701 (HTMLObjectElementImpl::attach):
1702 (HTMLObjectElementImpl::detach):
1703 (HTMLObjectElementImpl::recalcStyle):
1704 (HTMLObjectElementImpl::childrenChanged):
1705 (HTMLObjectElementImpl::isURLAttribute):
1706 (HTMLObjectElementImpl::isImageType):
1707 (HTMLObjectElementImpl::renderFallbackContent):
1708 * khtml/html/html_objectimpl.h:
1709 * khtml/khtml_part.cpp:
1710 (KHTMLPart::requestObject):
1711 (KHTMLPart::selectFrameElementInParentIfFullySelected):
1712 (KHTMLPart::handleFallbackContent):
1713 * khtml/khtml_part.h:
1714 * khtml/khtmlpart_p.h:
1715 (khtml::ChildFrame::ChildFrame):
1716 * khtml/rendering/render_frames.cpp:
1717 (RenderPartObject::RenderPartObject):
1718 (RenderPartObject::updateWidget):
1719 * khtml/rendering/render_frames.h:
1720 (khtml::RenderPart::hasFallbackContent):
1721 * khtml/rendering/render_replaced.cpp:
1722 (RenderReplaced::RenderReplaced):
1723 * kwq/KWQKHTMLPart.mm:
1724 (KWQKHTMLPart::createPart):
1725 * kwq/WebCoreBridge.h:
1726 * kwq/WebCoreBridge.mm:
1727 (-[WebCoreBridge mainResourceError]):
1729 2005-05-01 Darin Adler <darin@apple.com>
1731 - move to Xcode native targets and stop checking in generated files
1733 * WebCore.pbproj/project.pbxproj: Updated to use native targets and generate all the generated
1734 files, so we don't have to check them in any more.
1735 * Info.plist: Added. Native targets use a separate file for this.
1737 * Makefile.am: Removed rule to generate WebCore-combined.exp since this is now handled by the
1738 Xcode project. Removed the code to remove the embedded copy of the framework since we don't
1739 do that any more. Removed timestamp cleaning rules since we don't use those any more.
1741 * WebCore-tests.exp: Removed symbols that aren't really needed. The native target gives an
1742 error when you mention a nonexistent symbol, so we can't have them any more.
1744 * khtml/css/parser_wrapper.cpp: Added. Shell used to compile parser.cpp since we can't add
1745 a generated file easily to the list of files to be compiled.
1747 * .cvsignore: Removed various timestamp files.
1749 * WebCore-combined.exp: Removed.
1750 * force-clean-timestamp: Removed.
1751 * force-js-clean-timestamp: Removed.
1752 * khtml/.cvsignore: Removed.
1753 * khtml/Makefile.am: Removed.
1754 * khtml/css/.cvsignore: Removed.
1755 * khtml/css/Makefile.am: Removed.
1756 * khtml/css/cssproperties.c: Removed.
1757 * khtml/css/cssproperties.h: Removed.
1758 * khtml/css/cssvalues.c: Removed.
1759 * khtml/css/cssvalues.h: Removed.
1760 * khtml/css/parser.cpp: Removed.
1761 * khtml/css/parser.h: Removed.
1762 * khtml/css/tokenizer.cpp: Removed.
1763 * khtml/ecma/.cvsignore: Removed.
1764 * khtml/ecma/Makefile.am: Removed.
1765 * khtml/ecma/kjs_css.lut.h: Removed.
1766 * khtml/ecma/kjs_dom.lut.h: Removed.
1767 * khtml/ecma/kjs_events.lut.h: Removed.
1768 * khtml/ecma/kjs_html.lut.h: Removed.
1769 * khtml/ecma/kjs_navigator.lut.h: Removed.
1770 * khtml/ecma/kjs_range.lut.h: Removed.
1771 * khtml/ecma/kjs_traversal.lut.h: Removed.
1772 * khtml/ecma/kjs_views.lut.h: Removed.
1773 * khtml/ecma/kjs_window.lut.h: Removed.
1774 * khtml/ecma/xmlhttprequest.lut.h: Removed.
1775 * khtml/ecma/xmlserializer.lut.h: Removed.
1776 * khtml/html/.cvsignore: Removed.
1777 * khtml/html/Makefile.am: Removed.
1778 * khtml/html/doctypes.cpp: Removed.
1779 * khtml/html/kentities.c: Removed.
1780 * khtml/misc/.cvsignore: Removed.
1781 * khtml/misc/Makefile.am: Removed.
1782 * khtml/misc/htmlattrs.c: Removed.
1783 * khtml/misc/htmlattrs.h: Removed.
1784 * khtml/misc/htmltags.c: Removed.
1785 * khtml/misc/htmltags.h: Removed.
1786 * kwq/.cvsignore: Removed.
1787 * kwq/KWQCharsetData.c: Removed.
1788 * kwq/KWQColorData.c: Removed.
1789 * kwq/Makefile.am: Removed.
1791 2005-05-02 Darin Adler <darin@apple.com>
1794 Added two layout tests for regression testing.
1796 - redid frameElement (fix for 4091082 below)
1798 The first version lacked a security check, and was also broken.
1800 * khtml/ecma/kjs_window.cpp:
1801 (frameElement): Refactored into separate function; added isSafeScript check.
1802 (Window::get): Call the new frameElement function.
1804 * layout-tests/fast/frames/frameElement-frame.html: Added.
1805 * layout-tests/fast/frames/frameElement-frame-expected.txt: Added.
1806 * layout-tests/fast/frames/frameElement-iframe.html: Added.
1807 * layout-tests/fast/frames/frameElement-iframe-expected.txt: Added.
1808 * layout-tests/fast/frames/resources/frameElement-contents.html: Added.
1810 2005-05-02 David Harrison <harrison@apple.com>
1814 Fix isStartOfEditableContent and isEndOfEditableContent to return actual, rather than inverted, answers.
1815 No Radar. Found this when trying to use isEndOfEditableContent() in some new code.
1817 * khtml/editing/visible_units.cpp:
1818 (khtml::isStartOfEditableContent):
1819 (khtml::isEndOfEditableContent):
1822 2005-04-29 Darin Adler <darin@apple.com>
1824 Reviewed by David Harrison.
1826 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::displayNode): Turn newlines into \n for better dumping.
1828 2005-04-29 David Harrison <harrison@apple.com>
1832 <rdar://problem/4083333> When deleting link at end of sentence, entire sentence gets deleted
1834 * khtml/editing/htmlediting.cpp:
1835 (khtml::DeleteSelectionCommand::initializePositionData):
1836 Work around bug #4103339 (whose real fix is somewhat risky), so this fix can get into a software update.
1838 (khtml::DeleteSelectionCommand::handleGeneralDelete):
1839 Add isAncestor check when comparing m_downstreamEnd.node() and m_startNode.
1841 * layout-tests/editing/deleting/delete-4083333-fix-expected.txt: Added.
1842 * layout-tests/editing/deleting/delete-4083333-fix.html: Added.
1844 2005-04-29 Darin Adler <darin@apple.com>
1846 Reviewed by Dave Harrison.
1848 - changed layout tests to dump more minimal information about caret and selection
1850 * kwq/KWQRenderTreeDebug.cpp:
1851 (nodePosition): Changed name; now does position relative to document.
1852 (writeSelection): Removed upstream/downstream code and changed format slightly.
1854 * layout-tests/editing/*-expected.txt: Regenerated in new format.
1856 2005-04-29 Darin Adler <darin@apple.com>
1858 Reviewed by Chris Blumenberg.
1859 Added two layout tests for regression testing.
1861 - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
1863 * khtml/xml/dom_docimpl.cpp:
1864 (DocumentImpl::importNode): Reorganized and partly rewrote this. The change that fixes the bug at
1865 hand is to explicitly use XHTML_NAMESPACE for HTML elements, since the old way of getting the namespace
1866 will return the null string for HTML elements, and createElementNS will not create an HTML element
1867 if passed a null string for the namespace.
1868 (DocumentImpl::processHttpEquiv): Removed some bogus getDocument() calls -- no need to call getDocument()
1869 in a document object.
1870 (DocumentImpl::attrName): Ditto.
1871 (DocumentImpl::tagName): Ditto.
1872 (DocumentImpl::setFocusNode): Ditto.
1874 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::cloneNode): Moved the actual cloning here
1875 from ElementImpl::cloneNode, because XMLElementImpl already had its own version, and in here
1876 we can use createHTMLElement, which will work properly even in an XML document, and is also slightly
1879 * khtml/xml/dom_nodeimpl.h: Added a namespaceURI method function to go along with localName.
1880 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::namespaceURI): Added. Returns null string to be consistent
1881 with localName (only works on certain types of elements as documented).
1882 * khtml/xml/dom_elementimpl.h: Removed ElementImpl::cloneNode (see above). Added an override of
1883 namespaceURI for XMLElementImpl.
1884 * khtml/xml/dom_elementimpl.cpp: (XMLElementImpl::namespaceURI): Added. Returns the namespace
1885 (consistent with localName).
1887 * layout-tests/fast/dom/importNodeHTML.html: Added. Tests both importNode and cloneNode (for comparison).
1888 * layout-tests/fast/dom/importNodeHTML-expected.txt: Added.
1889 * layout-tests/fast/dom/importNodeXML.xhtml: Added. XML version of the same test as above. Tests a different
1890 code path, so useful to have.
1891 * layout-tests/fast/dom/importNodeXML-expected.txt: Added.
1893 2005-04-28 Darin Adler <darin@apple.com>
1895 Reviewed by Dave Harrison.
1897 - fixed problems preventing us from compiling with gcc 4.0
1899 * WebCore.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
1900 way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
1901 WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
1903 * khtml/css/parser.y: Changed some rules that were using a float to pass around an enum to use an
1904 int instead to avoid a warning.
1905 * khtml/css/parser.cpp: Regenerated.
1906 * khtml/css/parser.h: Regenerated.
1908 * khtml/ecma/kjs_dom.cpp: (DOMTextProtoFunc::tryCall): Rearranged a return statement to avoid an incorrect
1910 * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Initialized a couple of variables to avoid
1911 an incorrect warning.
1912 * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): Rearranged how we exit from the function to avoid
1913 an incorret warning.
1914 * khtml/editing/selection.cpp: (khtml::Selection::debugPosition): Changed some %d to %ld where the
1915 parameters where long ints.
1916 * khtml/editing/visible_position.cpp: (khtml::VisiblePosition::debugPosition): Ditto.
1917 * khtml/xml/dom_position.cpp: (DOM::Position::debugPosition): Ditto.
1918 * kwq/DOMEvents.mm: (-[DOMMouseEvent initMouseEvent:::::::::::::::]): Rearranged code to avoid a cast
1919 that was causing an incorrect warning.
1920 * kwq/DOMUtility.mm:
1921 (createObjCDOMNode): Broke out as a separate function.
1922 (KJS::ScriptInterpreter::createObjcInstanceForValue): Rearranged code to avoid a namespace collision with
1923 KJS::DOMNode and the Objective-C DOMNode class.
1924 * kwq/KWQFileButton.mm: Made fields of KWQFileButtonAdapter public to avoid an error, new to gcc 4.0,
1925 about accessing protected Objective-C fields.
1926 * kwq/KWQKHTMLPart.mm:
1927 (KWQKHTMLPart::matchLabelsAgainstElement): Rearranged a return statement to avoid an incorrect warning.
1928 (KWQKHTMLPart::imageFromRect): Rearranged how this function does its exception handling to avoid a
1929 "may be clobbered" warning.
1930 * kwq/KWQKJavaAppletWidget.mm: Fixed incorrect import that said "KHTMLView.h" instead of "khtmlview.h".
1931 * kwq/KWQObject.mm: Made fields of KWQObjectTimerTarget public to avoid an error, new to gcc 4.0,
1932 about accessing protected Objective-C fields.
1933 * kwq/WebCoreBridge.mm: (partHasSelection): Used [bridge part] instead of getting directly at instance
1934 variable to avoid an error, new to gcc 4.0, about accessing protected Objective-C fields.
1936 * WebCore-combined.exp: Regenerated.
1937 * WebCore-tests.exp: Added some additional symbols needed by the tests under gcc 4.0.
1939 2005-04-28 Darin Adler <darin@apple.com>
1941 * WebCore.pbproj/project.pbxproj: Add back the main_thread_malloc files, rolled out by accident.
1943 2005-04-27 Adele Peterson <adele@apple.com>
1945 Rolling out fix for <rdar://problem/4097849> because the following layout tests were failing:
1947 fast/css/namespaces/001
1948 fast/css/namespaces/002
1949 fast/css/namespaces/004
1950 fast/css/namespaces/005
1951 fast/css/namespaces/006
1955 * khtml/html/html_documentimpl.cpp:
1956 * khtml/html/html_documentimpl.h:
1957 * khtml/html/html_elementimpl.cpp:
1958 (HTMLElementImpl::namespaceURI):
1959 * khtml/xml/dom_docimpl.cpp:
1960 (DocumentImpl::importNode):
1961 (DocumentImpl::createElementNS):
1962 (DocumentImpl::createHTMLElement):
1963 (DocumentImpl::attrId):
1964 (DocumentImpl::tagId):
1965 * khtml/xml/dom_docimpl.h:
1967 2005-04-27 John Sullivan <sullivan@apple.com>
1971 Experimental prototype of user-resizable textareas. All the new code is guarded by
1972 #if ALLOW_RESIZING_TEXTAREAS, which is false unless you remove a comment and rebuild.
1974 This code allows you to press near the bottom-right corner of any textarea and drag
1975 to resize the textarea on the page. It works correctly with textareas in left-aligned
1976 or centered blocks, but is weird in right-aligned blocks. It also does something
1977 sensible if the width is specified as a % (in that case, you can resize vertically only).
1978 The user-created-size survives resizing the window and survives the back/forward cache.
1979 It does not survive reloading the page.
1981 This complete-lack-of-affordance UI is obviously not shippable, but this proof of concept
1982 code could lead to a real user feature.
1984 * kwq/KWQTextArea.mm:
1985 (-[KWQTextArea getNumColumns:andNumRows:forSize:]):
1986 new method that determines cols and rows for a given textarea frame size
1987 (-[KWQTextAreaTextView _trackResizeFromMouseDown:]):
1988 new method that tracks a drag and does a live resize-and-relayout
1989 (-[KWQTextAreaTextView mouseDown:]):
1990 if the mouse down is in the bottom-right corner, call _trackResizeFromMouseDown:
1992 2005-04-27 John Sullivan <sullivan@apple.com>
1996 - fixed problem with mouse wheel patch where alt and shift keys were switched
1998 * khtml/xml/dom2_eventsimpl.h:
1999 use the order cntl, alt, shift, meta in KeyboardEventImpl constructors to match
2000 superclass. This isn't necessary to fix the bug, but is better for clarity.
2002 * khtml/xml/dom2_eventsimpl.cpp:
2003 (KeyboardEventImpl::KeyboardEventImpl):
2004 switch parameter order to match superclass. Then pass the parameters to superclass's
2005 constructor in the right order.
2006 (KeyboardEventImpl::initKeyboardEvent):
2007 Pass parameters to superclass's constructor in the right order.
2009 2005-04-26 Adele Peterson <adele@apple.com>
2011 Fixed by Darin, reviewed by me.
2013 Fix for <rdar://problem/4084029> designMode doesn't allow editing when iframe src = "" or = about:blank
2015 This change will add an HTML element for empty documents. Now that there will be an HTMLDocument in this case,
2016 a body will also be created (see rdar://problem/3758785). This was preventing frames with empty documents from
2019 * khtml/html/htmlparser.cpp: (KHTMLParser::finished):
2021 Updated these tests to expect the HTML and BODY elements
2022 * layout-tests/fast/flexbox/016-expected.txt:
2023 * layout-tests/fast/frames/001-expected.txt:
2024 * layout-tests/fast/frames/002-expected.txt:
2025 * layout-tests/fast/frames/contentWindow_Frame-expected.txt:
2026 * layout-tests/fast/frames/contentWindow_iFrame-expected.txt:
2027 * layout-tests/fast/frames/empty-frame-src-expected.txt:
2029 2005-04-26 Maciej Stachowiak <mjs@apple.com>
2031 New test case for <rdar://problem/4092136> reproducible crash in KJS::kjs_fast_realloc loading maps.google.com
2033 * layout-tests/fast/js/string-from-char-code-expected.txt: Added.
2034 * layout-tests/fast/js/string-from-char-code.html: Added.
2036 2005-04-26 Darin Adler <darin@apple.com>
2040 - fixed <rdar://problem/3655817> please add support for mouse wheel events and the onmousewheel handler
2044 - need to test behavior of Windows IE with horizontal scroll wheeling; we currently send a distinct event
2045 for that relatively obscure case, which means the event handlers won't fire at all; might be incorrect
2046 - overflow scrolling is done after all DOM event handling, but ideally should be done in the overflowing
2047 element's default event handler; not important in practice
2048 - frame scrolling is done after all DOM event handling, but probably should be done in a default event handler;
2049 not sure about this, but it's probably not important in practice and definitely not required
2053 * khtml/ecma/kjs_events.h: Added DOMWheelEvent.
2054 * khtml/ecma/kjs_events.cpp:
2055 (KJS::getDOMEvent): Added a case for wheel event. To be forward looking, I use the event's impl pointer
2056 instead of a C++ DOM wrapper. Eventually it will all work this way.
2057 (offsetFromTarget): Added. Factored out code to compute offsetX/Y for an event.
2058 (DOMMouseEvent::getValueProperty): Changed to call offsetFromTarget for offsetX/Y.
2059 (DOMWheelEvent::DOMWheelEvent): Added.
2060 (DOMWheelEvent::tryGet): Added.
2061 (DOMWheelEvent::getValueProperty): Added.
2062 (DOMWheelEventProtoFunc::tryCall): Added. Nothing at the moment, but might get contents later.
2064 * khtml/ecma/kjs_dom.h: Added OnMouseWheel to the enum with the list of properties.
2065 * khtml/ecma/kjs_dom.cpp: Added onmousewheel as a property of DOM nodes.
2066 (DOMNode::getValueProperty): Return the mouse wheel event handler.
2067 (DOMNode::putValue): Set the mouse wheel event handler.
2069 * khtml/ecma/kjs_window.cpp: Added onmousewheel as a property of the window.
2070 (Window::get): Return the mouse wheel event handler.
2071 (Window::put): Set the mouse wheel event handler.
2073 * khtml/ecma/kjs_window.h: Added OnWindowMouseWheel to the enum with the list of properties.
2074 (Other properties distinguish the window handler by lower-casing the initial letter, way too subtle,
2075 so I did this one a good way.)
2077 * khtml/dom/dom2_events.h: Made the constructors for Event and UIEvent public. There's no good reason
2078 for them to be private, and I had to use the UIEvent one in the JavaScript implementation.
2082 * khtml/xml/dom2_eventsimpl.h: Added events for mouse wheel and horizontal mouse wheel.
2083 Added isWheelEvent function to EventImpl.
2084 (DOM::UIEventWithKeyStateImpl): Added. Base class shared by mouse, wheel, and keyboard events.
2085 (DOM::MouseRelatedEventImpl): Added. Base class shared by mouse and wheel events.
2086 (DOM::WheelEventImpl): Added.
2088 * khtml/xml/dom2_eventsimpl.cpp: Added "mousewheel" to list of event names and a placeholder for
2089 the horizontal mouse wheel.
2090 (EventImpl::isWheelEvent): Added. Returns false.
2091 (MouseRelatedEventImpl::MouseRelatedEventImpl): Added. Factored out what's shared between mouse
2092 events and wheel events to avoid duplicated code.
2093 (MouseRelatedEventImpl::computeLayerPos): Moved to MouseRelatedWheelEventImpl.
2094 (MouseEventImpl::MouseEventImpl): Changed since MouseRelatedWheelEventImpl is now the base class
2095 so we can share more code with wheel events.
2096 (KeyboardEventImpl::KeyboardEventImpl): Changed since UIEventWithKeyStateImpl is now the base class
2097 so we can share more code with mouse and wheel events.
2098 (WheelEventImpl::WheelEventImpl): Added.
2099 (WheelEventImpl::isWheelEvent): Added. Returns true.
2101 * khtml/misc/htmlattrs.in: Added "onmousewheel" attribute name.
2102 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::parseHTMLAttribute): Added parsing of the
2103 "onmousewheel" atribute, consistent with other event handler attributes.
2107 * kwq/WebCoreBridge.h: Renamed scrollOverflowWithScrollWheelEvent to sendScrollWheelEvent.
2108 * kwq/WebCoreBridge.mm: (-[WebCoreBridge sendScrollWheelEvent:]): Renamed.
2110 * kwq/KWQEvent.h: Added Wheel as an event type value.
2111 (QWheelEvent::QWheelEvent): Added.
2113 (positionForEvent): Updated to know that wheel events have valid positions in them.
2114 (orientationForEvent): Added.
2115 (deltaForEvent): Added.
2116 (QWheelEvent::QWheelEvent): Added.
2118 * kwq/KWQKHTMLPart.h: Renamed scrollOverflowWithScrollWheelEvent to wheelEvent.
2119 * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::wheelEvent): Renamed and added code to construct a QWheelEvent
2120 and send it along to KHTMLView::viewportWheelEvent, consistent with how mouse events work.
2122 * khtml/khtmlview.cpp: (KHTMLView::viewportWheelEvent): Do a hit test to figure out which node to
2123 send the event to, and then call dispatchWheelEvent.
2125 * khtml/xml/dom_nodeimpl.h: Added dispatchWheelEvent.
2126 * khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWheelEvent): Added.
2130 * khtml/ecma/kjs_dom.lut.h: Regenerated.
2131 * khtml/ecma/kjs_events.lut.h: Regenerated.
2132 * khtml/ecma/kjs_window.lut.h: Regenerated.
2133 * khtml/misc/htmlattrs.c: Regenerated.
2134 * khtml/misc/htmlattrs.h: Regenerated.
2136 2005-04-26 David Harrison <harrison@apple.com>
2138 Reviewed by Darin, Maciej.
2140 <rdar://problem/4075576> Deleting text in new message borks content
2142 Fixed by removing the methods that attempted to preserve the position. The idea
2143 of preserving position is a very recent one, and turned out to not actually address
2144 the problem it was intended to fix (see below). Further, is unclear how the position
2145 could be preserved in a form that could be properly used later on. Therefore,
2146 removing the code to work like before is the preferred alternative for this software
2147 update. I've written <rdar://problem/4099839> to cover the bug that position
2148 preservation was supposed to fix (but did not). Added layout tests for
2149 both this bug and 4099839. Also, updated existing tests with correct expected results
2150 (delete-at-paragraph-boundaries-003 and 004).
2152 * khtml/editing/htmlediting.cpp:
2153 (khtml::CompositeEditCommand::removeFullySelectedNode):
2154 (khtml::CompositeEditCommand::removeChildrenInRange):
2155 (khtml::DeleteSelectionCommand::handleGeneralDelete):
2156 * khtml/editing/htmlediting.h:
2157 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
2158 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
2159 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt: Added.
2160 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-007.html: Added.
2161 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt: Added.
2162 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-008.html: Added.
2163 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt: Added.
2164 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-009.html: Added.
2165 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt: Added.
2166 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-010.html: Added.
2168 2005-04-26 Darin Adler <darin@apple.com>
2170 - fixed development builds
2172 * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions.
2174 2005-04-25 David Hyatt <hyatt@apple.com>
2176 Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line. Make sure to
2177 update line break info for the last dirty line so that when a clean line tries to figure out where it
2178 started, it will get an accurate position taking into account the updated string. By doing this, the code
2179 will be able to properly distinguish between the old and new positions and not accidentally assume they are
2184 * khtml/rendering/render_text.cpp:
2185 (RenderText::setTextWithOffset):
2187 2005-04-26 Darin Adler <darin@apple.com>
2191 - fixed <rdar://problem/4098826> Bezier curves broken in new Safari canvas object (last two parameters parsed incorrectly)
2193 * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::tryCall): Fixed incorrect argument indices.
2194 Thanks to Brian Campbell who figured out what was wrong.
2196 2005-04-17 Maciej Stachowiak <mjs@apple.com>
2200 - use single-threaded malloc in places where malloc is hot for an
2201 8% speed improvement on cvs-base
2203 * ForwardingHeaders/misc/fast_malloc.h: Added.
2204 * WebCore.pbproj/project.pbxproj:
2205 * khtml/css/css_base.h:
2206 * khtml/css/css_ruleimpl.h:
2207 * khtml/css/css_valueimpl.h:
2208 * khtml/css/cssstyleselector.h:
2209 * khtml/misc/arena.cpp:
2213 * khtml/misc/main_thread_malloc.cpp: Added.
2214 * khtml/misc/main_thread_malloc.h: Added.
2215 * khtml/rendering/render_style.h:
2216 * khtml/xml/dom2_eventsimpl.h:
2217 * khtml/xml/dom2_rangeimpl.h:
2218 * khtml/xml/dom2_traversalimpl.h:
2219 * khtml/xml/dom2_viewsimpl.h:
2220 * khtml/xml/dom_docimpl.h:
2221 * khtml/xml/dom_elementimpl.cpp:
2222 (NamedAttrMapImpl::NamedAttrMapImpl):
2223 (NamedAttrMapImpl::clearAttributes):
2224 (NamedAttrMapImpl::operator=):
2225 (NamedAttrMapImpl::addAttribute):
2226 (NamedAttrMapImpl::removeAttribute):
2227 * khtml/xml/dom_elementimpl.h:
2228 * khtml/xml/dom_nodeimpl.h:
2229 * khtml/xml/dom_stringimpl.h:
2230 * kwq/KWQFontFamily.h:
2231 * kwq/KWQListImpl.mm:
2236 (QString::setBufferFromCFString):
2239 2005-04-25 John Sullivan <sullivan@apple.com>
2241 Reviewed by Dave Harrison.
2243 - fixed <rdar://problem/4098731> [DOMHTMLTextAreaElement cols] returns wrong value (usually zero)
2246 (-[DOMHTMLTextAreaElement cols]):
2247 use ATTR_COLS instead of ATTR_ACCESSKEY (D'oh!)
2248 (-[DOMHTMLTextAreaElement setCols:]):
2251 2005-04-25 Darin Adler <darin@apple.com>
2255 - fixed <rdar://problem/4097849> REGRESSION (162-163): importNode creates non-HTML elements, thus style attributes (and some others) don't work
2257 * khtml/xml/dom_docimpl.h: Add virtual functions HTMLElementNamespace and isHTMLNamespace.
2258 * khtml/xml/dom_docimpl.cpp:
2259 (DocumentImpl::importNode): Rearranged this function and fixed the following problems: 1) made sure to ref node while attributes are
2260 being set on it so it doesn't get destroyed; 2) fixed code to get namespace from the element we are importing to use the IDs from
2261 the source document, not the destination document; 3) removed unneeded getDocument() call which just returns this; 4) fixed error
2262 handling for cases where an exception happens while processing the children.
2263 (DocumentImpl::HTMLElementNamespace): Added. Returns XHTML_NAMESPACE.
2264 (DocumentImpl::isHTMLNamespace): Added. Returns true for any namespace that matches XHTML_NAMESPACE (case insensitive).
2265 (DocumentImpl::createElementNS): Changed to call isHTMLNamespace, which will cause it to accept the null namespace in an HTML document.
2266 This is the change that fixes the bug. Also fixed the code path to do a little less wasteful work in the non-XHTML case.
2267 (DocumentImpl::createHTMLElement): Pass in HTMLElementNamespace() rather than 0 to tagId.
2268 (DocumentImpl::attrId): Use isHTMLNamespace instead of allowing the null namespace explicitly.
2269 (DocumentImpl::tagId): Ditto.
2271 * khtml/html/html_documentimpl.h: Add overrides for HTMLElementNamespace and isHTMLNamespace.
2272 * khtml/html/html_documentimpl.cpp:
2273 (HTMLDocumentImpl::HTMLElementNamespace): Added. Returns 0 so we use the null string for HTML elements inside HTML documents (as before).
2274 (HTMLDocumentImpl::isHTMLNamespace): Added. Allows 0, and then calls base class to check for the actual XHTML namespace. Thus, we allow
2275 both no namespace at all and the XHTML namespace inside HTML documents.
2277 * khtml/html/html_elementimpl.cpp: (HTMLElementImpl::namespaceURI): Changed to call HTMLElementNamespace rather than checking
2278 isHTMLDocument. Same result as before, but better division of responsibilities.
2280 2005-04-25 Darin Adler <darin@apple.com>
2284 - fixed <rdar://problem/4091956> JavaScript drop handlers don't receive more than one dropped item
2286 * kwq/KWQClipboard.mm:
2287 (cocoaTypeFromMIMEType): Remove some use of compare -- less efficient than a simpler "==" check.
2288 Fixed non-GC-safe code to use KWQCFAutorelease instead.
2289 (MIMETypeFromCocoaType): Use fromCFString instead of fromNSString to avoid a cast.
2290 (KWQClipboard::getData): Rearrange so that we'll use filenames if both filenames and a URL are present, since
2291 filenames can accomodate multiple items. Fix bug where we'd return multiple filenames when the type requested
2292 is "URL". Fixed loop that computed the count over and over again for the loop termination condition. Check
2293 that the data for NSFilenamesPboardType is an NSArray instead of assuming it is.
2294 (KWQClipboard::setData): Use isEqualToString: instead of == when comparing types.
2296 2005-04-22 David Hyatt <hyatt@apple.com>
2298 Fix for 4096878, drop shadow effect not displayed correctly on tbray.org/ongoing/. Block minmaxwidth was
2299 broken when negative margins were used and did not properly decrease the max width.
2303 * khtml/rendering/render_block.cpp:
2304 (khtml::RenderBlock::calcBlockMinMaxWidth):
2305 * layout-tests/fast/block/float/034-expected.txt: Added.
2306 * layout-tests/fast/block/float/034.html: Added.
2307 * layout-tests/fast/block/float/035-expected.txt: Added.
2308 * layout-tests/fast/block/float/035.html: Added.
2310 2005-04-22 David Hyatt <hyatt@apple.com>
2312 Remove some dead code from css_valueimpl. It wasn't used at all.
2314 * khtml/css/css_valueimpl.cpp:
2315 * khtml/css/css_valueimpl.h:
2317 2005-04-22 Darin Adler <darin@apple.com>
2319 * khtml/ecma/kjs_html.h: Removed unnecessary bogus class name qualifiers.
2321 2005-04-22 David Hyatt <hyatt@apple.com>
2323 Fix for 4096681, fix regression in how the list-style property is parsed. It no longer parses when it hits
2324 a url in the property value list now, because the list pointer did not get advanced. This fixes alistapart.com.
2328 * khtml/css/cssparser.cpp:
2329 (CSSParser::parseValue):
2330 * layout-tests/fast/lists/009-expected.txt: Added.
2331 * layout-tests/fast/lists/009.html: Added.
2332 * layout-tests/fast/lists/resources/listmark.gif: Added.
2334 2005-04-22 Darin Adler <darin@apple.com>
2338 - fixed <rdar://problem/4091082> Google Suggest no longer works due to lack of "frameElement"
2340 * khtml/ecma/kjs_window.h: Added FrameElement.
2341 * khtml/ecma/kjs_window.cpp: (Window::get): Added "frameElement".
2342 * khtml/ecma/kjs_window.lut.h: Regenerated.
2344 2005-04-22 Darin Adler <darin@apple.com>
2348 - a small editing-related code cleanup
2350 * khtml/rendering/render_text.h: Added positionForOffset and made offsetForPosition const.
2351 * khtml/rendering/render_text.cpp:
2352 (InlineTextBox::offsetForPosition): Made const.
2353 (InlineTextBox::positionForOffset): Added. Moved code here from caretRect.
2354 (RenderText::caretRect): Call positionForOffset instead of doing the work here.
2356 2005-04-21 David Hyatt <hyatt@apple.com>
2358 Fix for 4095839, wrong background image used on flechtwerk.de. Make sure that the global mapped
2359 attribute cache hashed background attributes into per-document buckets.
2361 * khtml/html/html_baseimpl.cpp:
2362 (HTMLBodyElementImpl::mapToEntry):
2363 * khtml/html/html_elementimpl.h:
2365 * khtml/html/html_tableimpl.cpp:
2366 (HTMLTableElementImpl::mapToEntry):
2367 (HTMLTablePartElementImpl::mapToEntry):
2368 * khtml/xml/dom_docimpl.cpp:
2369 (DocumentImpl::DocumentImpl):
2370 * khtml/xml/dom_docimpl.h:
2371 (DOM::DocumentImpl::docID):
2373 2005-04-21 Vicki Murley <vicki@apple.com>
2375 - layout test for 4065447, outerHTML on images
2377 * layout-tests/fast/dynamic/outerHTML-img-expected.txt: Added.
2378 * layout-tests/fast/dynamic/outerHTML-img.html: Added.
2380 2005-04-20 Vicki Murley <vicki@apple.com>
2384 - fixed <rdar://problem/4065447> support outerHTML on IMG elements
2386 * khtml/html/html_elementimpl.cpp:
2387 (HTMLElementImpl::setOuterHTML):
2389 2005-04-18 David Hyatt <hyatt@apple.com>
2391 Fix min-height so that when it resolves to auto it does not use the box's intrinsic height.
2393 * khtml/rendering/render_box.cpp:
2394 (RenderBox::calcHeight):
2395 (RenderBox::calcHeightUsing):
2397 2005-04-18 David Hyatt <hyatt@apple.com>
2399 Back out fix for 4032346, since it is causing garbled image content on many sites.
2401 The bug tracking the fix is 4069093.
2403 (khtml::RenderBlock::matchedEndLine):
2405 2005-04-18 David Hyatt <hyatt@apple.com>
2407 Fix the smile in the Acid2 test. Floats should not grow to contain other floats unless height is auto. Otherwise
2408 the float should use the specified height.
2410 Also fix row 14 of the Acid2 test. Although ambiguous, just modify the table cell baseline alignment code to align
2411 to the bottom of the cell's content height if no suitable baseline could be found.
2413 * khtml/rendering/render_block.cpp:
2414 (khtml::RenderBlock::layoutBlock):
2415 * khtml/rendering/render_block.h:
2416 (khtml::RenderBlock::firstRootBox):
2417 (khtml::RenderBlock::lastRootBox):
2418 * khtml/rendering/render_table.cpp:
2419 (RenderTableSection::calcRowHeight):
2420 (RenderTableCell::baselinePosition):
2422 2005-04-15 David Hyatt <hyatt@apple.com>
2424 Make sure empty tables honor CSS-specified heights when they have no rows or sections. This is done only
2425 in strict mode, since it is not compatible with WinIE.
2427 * khtml/rendering/render_table.cpp:
2428 (RenderTable::layout):
2430 2005-04-15 David Hyatt <hyatt@apple.com>
2432 Fix for row 13 of the Acid2 test. Change HTML comment parsing in strict mode to do proper SGML parsing,
2433 checking for pairs of -- and only being willing to close the comment if every -- is paired up.
2435 * khtml/html/htmltokenizer.cpp:
2436 (khtml::HTMLTokenizer::parseComment):
2438 2005-04-12 Maciej Stachowiak <mjs@apple.com>
2440 Reviewed by Richard.
2442 - use custom single-threaded malloc for all non-GC JavaScriptCore
2443 allocations, for a 9.1% speedup on JavaScript iBench
2445 * khtml/ecma/kjs_binding.cpp:
2447 * khtml/ecma/kjs_proxy.cpp:
2448 (KJSProxyImpl::evaluate):
2450 2005-04-15 David Hyatt <hyatt@apple.com>
2452 Fix the six pixel gap between rows nine and ten of the Acid2 test. Make sure that percentage heights that
2453 resolve to auto are properly treated as though they have auto height by the self-collapsing block check (as per
2454 section 8.3.1, paragraph 7 of the CSS2.1 spec).
2456 * khtml/rendering/render_block.cpp:
2457 (khtml::RenderBlock::isSelfCollapsingBlock):
2459 2005-04-15 David Hyatt <hyatt@apple.com>
2461 The Acid2 test and the reference rendering both make use of overflow:hidden on the <html> element. Turns out
2462 the CSS2.1 wording for this behavior has been revised (based off WinIE/Mozilla behavior). Change our behavior
2463 to match and make <html> overflow apply to the viewport.
2465 * khtml/khtmlview.cpp:
2466 (KHTMLView::applyOverflowToViewport):
2467 (KHTMLView::layout):
2468 * khtml/khtmlview.h:
2469 * khtml/rendering/render_box.cpp:
2470 (RenderBox::setStyle):
2472 2005-04-14 David Hyatt <hyatt@apple.com>
2474 3258403 and 3258402 can now be fixed. min/max-width/height support is now complete. This patch makes them
2475 work for positioned elements and enables us to pass row one of the Acid2 test.
2477 * khtml/rendering/render_box.cpp:
2478 (RenderBox::calcAbsoluteHorizontal):
2479 (RenderBox::calcAbsoluteHorizontalValues):
2480 (RenderBox::calcAbsoluteVertical):
2481 (RenderBox::calcAbsoluteVerticalValues):
2482 * khtml/rendering/render_box.h:
2484 2005-04-12 David Hyatt <hyatt@apple.com>
2486 Working on the Acid2 test, Row 1.
2488 Improve checkChild for the DTD so that it knows what mode a document is in. This allows it to adhere more
2489 strictly to the actual DTD in strict mode and almost strict mode.
2491 Change the <table>-inside-<p> check so that <table> is disallowed inside <p> in
2492 strict mode and almost strict mode. This matches Firefox behavior, which allows <table>
2493 inside <p> only in quirks mode.
2495 * khtml/html/dtd.cpp:
2498 * khtml/html/htmlparser.cpp:
2499 (KHTMLParser::insertNode):
2500 * khtml/html/htmltokenizer.cpp:
2501 (khtml::HTMLTokenizer::parseTag):
2502 * khtml/xml/dom_elementimpl.cpp:
2503 (ElementImpl::childAllowed):
2505 2005-04-12 Vicki Murley <vicki@apple.com>
2509 - fixed <rdar://problem/3760895> Request for including an implementation of the elementFromPoint function
2511 * khtml/dom/dom_doc.cpp:
2512 (DOM::Document::elementFromPoint):
2513 * khtml/dom/dom_doc.h:
2514 * khtml/ecma/kjs_dom.cpp:
2515 (DOMDocumentProtoFunc::tryCall):
2516 * khtml/ecma/kjs_dom.h:
2517 (KJS::DOMDocument::):
2518 * khtml/ecma/kjs_dom.lut.h:
2520 * khtml/xml/dom_docimpl.cpp:
2521 (DocumentImpl::elementFromPoint):
2522 * khtml/xml/dom_docimpl.h:
2524 2005-04-12 David Hyatt <hyatt@apple.com>
2526 Beginning of work to support the Acid2 CSS test put forward by the Web Standards Project. Fix
2527 our handling of the rel attribute on <link> elements to do a proper tokenization so that stylesheets
2528 can be recognized even when other keywords are present in the rel attribute.
2530 * khtml/html/html_headimpl.cpp:
2531 (HTMLLinkElementImpl::HTMLLinkElementImpl):
2532 (HTMLLinkElementImpl::parseHTMLAttribute):
2533 (HTMLLinkElementImpl::tokenizeRelAttribute):
2534 (HTMLLinkElementImpl::process):
2535 * khtml/html/html_headimpl.h:
2537 2005-04-12 John Sullivan <sullivan@apple.com>
2539 - fixed these two bugs (I also fixed these on the experimental-ui-branch)
2540 <rdar://problem/3154293> Find Next should not scroll page if the next target is already visible
2541 <rdar://problem/3121828> scrollToVisible on find cuts off the left part of the view due to needless horiz. scroll
2545 * kwq/KWQKHTMLPart.mm:
2546 (KWQKHTMLPart::jumpToSelection):
2547 Trey had written code to address these issues, but left it commented out due to other
2548 problems. The other problems no longer occur, so I uncommented Trey's code, and then
2549 discovered that I could make it behave more like TextEdit with many fewer lines of
2552 2005-04-08 David Harrison <harrison@apple.com>
2554 Reviewed by Dave Hyatt.
2556 <rdar://problem/4084106> Remove NSAccessibilityForegroundColorTextAttributeWrapper
2558 * kwq/KWQAccObject.mm:
2559 (AXAttributeStringSetStyle):
2560 Use NSAccessibilityForegroundColorTextAttribute directly.
2562 2005-04-05 David Hyatt <hyatt@apple.com>
2564 Fix for 4077106, make sure that mouse wheeling in overflow sections uses 40 rather than 10 as the base line
2569 * khtml/rendering/render_layer.cpp:
2570 (RenderLayer::positionScrollbars):
2571 * kwq/KWQScrollBar.mm:
2572 (QScrollBar::scroll):
2574 2005-04-04 Vicki Murley <vicki@apple.com>
2578 - fixed <rdar://problem/3871669> no focus or blur methods on HTML button elements
2580 * khtml/dom/html_form.cpp:
2581 (HTMLButtonElement::focus):
2582 (HTMLButtonElement::blur):
2583 * khtml/dom/html_form.h:
2584 * khtml/ecma/kjs_html.cpp:
2585 (KJS::HTMLElementFunction::tryCall):
2586 * khtml/ecma/kjs_html.h:
2587 (KJS::HTMLElement::):
2588 * khtml/ecma/kjs_html.lut.h:
2590 * khtml/html/html_formimpl.cpp:
2591 (DOM::HTMLButtonElementImpl::blur):
2592 (DOM::HTMLButtonElementImpl::focus):
2593 * khtml/html/html_formimpl.h:
2597 2005-03-28 David Harrison <harrison@apple.com>
2601 <rdar://problem/4069161> REGRESSION (8A416-8A419): Safari crash bringing up context menu for non-HTML content in a frame
2603 * kwq/KWQAccObject.mm:
2604 (-[KWQAccObject rendererForView:]):
2605 Nil-check node variable instead of rechecking document variable.
2609 2005-03-27 Darin Adler <darin@apple.com>
2611 Reviewed by me, fix by Kida-san.
2613 - fixed <rdar://problem/4067474> 8A424: Safari immediately quit by Cmd+Ctrll+'D'
2615 * kwq/WebCoreBridge.mm: (-[WebCoreBridge convertToNSRange:DOM::]):
2620 2005-03-24 Richard Williamson <rjw@apple.com>
2622 Fixed <rdar://problem/4052683> After adding/removing stocks from Stocks Widget, stock areas went blank
2624 The request was being collected before firing it's load handler.
2625 We now gc protect the request while it's loading.
2629 * khtml/ecma/xmlhttprequest.cpp:
2630 (KJS::XMLHttpRequest::send):
2631 (KJS::XMLHttpRequest::abort):
2632 (KJS::XMLHttpRequest::slotFinished):
2633 (KJS::XMLHttpRequestProtoFunc::tryCall):
2637 2005-03-23 Darin Adler <darin@apple.com>
2639 Further fix for 4053515.
2641 Covered cases where text position doesn't lie inside a
2644 Reviewed by Richard.
2646 * khtml/editing/visible_text.cpp:
2647 (khtml::TextIterator::setRangeFromLocationAndLength):
2649 2005-03-23 Richard Williamson <rjw@apple.com>
2651 Fixed <rdar://problem/4053515> REGRESSION (Mail): Kotoeri input method reconversion does not work in WebViews
2653 We now use actual document NSRanges to represent both marked text
2654 ranges and selection ranges.
2658 * khtml/editing/visible_text.cpp:
2659 (khtml::TextIterator::rangeLength):
2660 (khtml::TextIterator::setRangeFromLocationAndLength):
2661 * khtml/editing/visible_text.h:
2662 * kwq/WebCoreBridge.h:
2663 * kwq/WebCoreBridge.mm:
2664 (-[WebCoreBridge convertToNSRange:DOM::]):
2665 (-[WebCoreBridge DOM::convertToDOMRange:]):
2666 (-[WebCoreBridge selectNSRange:]):
2667 (-[WebCoreBridge markedTextDOMRange]):
2668 (-[WebCoreBridge markedTextNSRange]):
2670 2005-03-22 Kevin Decker <kdecker@apple.com>
2674 Fixed <rdar://problem/4062336> REGRESSION (406-407): HTML submenus not working at hrweb.apple.com after going back
2676 Rolled out the fix for <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
2678 We clearly need a better solution to 4041374. We can't indiscriminately remove event listeners in closeURL() after-all. Since event listeners are registered in a <script> tag, which is evaluated and executed at page load time, this becomes a problem since we don't reevaluate a page's <script> that is in the back/forward cache. Thus once you leave the page, the listeners are gone for good. This is the problem.
2680 * khtml/khtml_part.cpp:
2681 (KHTMLPart::closeURL):
2682 * khtml/xml/dom_docimpl.cpp:
2683 (DocumentImpl::detach):
2687 2005-03-22 Vicki Murley <vicki@apple.com>
2689 - roll the fix for <rdar://problem/4060266> back in, since its
2692 * khtml/editing/visible_text.cpp:
2693 (khtml::TextIterator::handleTextBox):
2695 2005-03-22 Vicki Murley <vicki@apple.com>
2697 - roll out the fix for <rdar://problem/4060266> since it was denied by CCC
2699 * khtml/editing/visible_text.cpp:
2700 (khtml::TextIterator::handleTextBox):
2702 2005-03-22 David Harrison <harrison@apple.com>
2706 <rdar://problem/4060266> Double-clicking in Dictionary.app doesn't work for some words (coming just after style change)
2708 * khtml/editing/visible_text.cpp:
2709 (khtml::TextIterator::handleTextBox):
2710 Complete the check of whether to emit space for collapsed space.
2712 2005-03-22 David Harrison <harrison@apple.com>
2716 <rdar://problem/4061443> REGRESSION (8A420-8A421): Pasting in the Stickies widget is broken again
2718 * khtml/editing/htmlediting.cpp:
2719 (khtml::positionBeforeContainingSpecialElement):
2720 (khtml::positionAfterContainingSpecialElement):
2721 Return unchanged Position rather than a null or non-editable one.
2725 2005-03-20 Ken Kocienda <kocienda@apple.com>
2729 I made an error in this test earlier. It was not testing what I intended. Fixed.
2731 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt
2732 * layout-tests/editing/unsupported-content/list-delete-001.html
2736 * layout-tests/editing/unsupported-content/table-delete-001-expected.txt: Added.
2737 * layout-tests/editing/unsupported-content/table-delete-001.html: Added.
2738 * layout-tests/editing/unsupported-content/table-delete-002-expected.txt: Added.
2739 * layout-tests/editing/unsupported-content/table-delete-002.html: Added.
2740 * layout-tests/editing/unsupported-content/table-delete-003-expected.txt: Added.
2741 * layout-tests/editing/unsupported-content/table-delete-003.html: Added.
2742 * layout-tests/editing/unsupported-content/table-type-after-expected.txt: Added.
2743 * layout-tests/editing/unsupported-content/table-type-after.html: Added.
2744 * layout-tests/editing/unsupported-content/table-type-before-expected.txt: Added.
2745 * layout-tests/editing/unsupported-content/table-type-before.html: Added.
2747 2005-03-20 Darin Adler <darin@apple.com>
2751 - fixed <rdar://problem/3923903> REGRESSION (164-165): Repro Safari crash in khtml::RenderLayer::scrollToOffset
2753 * khtml/rendering/render_layer.cpp: (RenderLayer::scrollToOffset): Check canvas for nil.
2755 2005-03-20 David Harrison <harrison@apple.com>
2759 <rdar://problem/4055127> Dictionary pop-up panel misplaced at beginning of text blocks (breaks double-clicking in Dictionary.app)
2761 SimplifiedBackwardsTextIterator::advance() needed to not limit to textnodes
2762 when checking whether moving back across block boundaries
2764 VisibleUnits previousBoundary() needed to INIT_DOWN when creating result VisiblePosition
2766 All editing tests pass.
2768 * khtml/editing/visible_text.cpp:
2769 (khtml::SimplifiedBackwardsTextIterator::advance):
2770 * khtml/editing/visible_units.cpp:
2771 (khtml::previousBoundary):
2773 2005-03-20 Darin Adler <darin@apple.com>
2775 Reviewed by Harrison.
2777 - fixed <rdar://problem/4059914> when you select all of a frame's content, need to select the frame in the parent document so it can be easily deleted
2779 * khtml/khtml_part.h: Added selectFrameElementInParentIfFullySelected.
2780 * khtml/khtml_part.cpp:
2782 (KHTMLPart::setFocusNodeIfNeeded): Changed to not set focus to a frame; was not what this function was
2783 intended to do, and caused trouble when trying to select a frame element.
2784 (KHTMLPart::khtmlMouseReleaseEvent): Call selectFrameElementInParentIfFullySelected.
2785 (KHTMLPart::selectAll): Call selectFrameElementInParentIfFullySelected.
2786 (KHTMLPart::selectFrameElementInParentIfFullySelected): Added. Selects the frame element in the parent
2787 if a frame is entirely selected, which makes it easier to delete or replace the frame and is consistent
2788 with the changes Maciej made recently for other elements.
2790 * kwq/WebCoreBridge.mm:
2791 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]): Call selectFrameElementInParentIfFullySelected.
2792 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]): Call selectFrameElementInParentIfFullySelected.
2794 2005-03-20 Darin Adler <darin@apple.com>
2796 Reviewed by me, code change by Ken.
2798 - fixed <rdar://problem/4059852> Deleting from first element of list makes content jump to wrong place
2800 * khtml/editing/htmlediting.cpp:
2801 (khtml::isListStructureNode): Added.
2802 (khtml::DeleteSelectionCommand::moveNodesAfterNode): Check for list nodes as well as table nodes.
2804 2005-03-20 Ken Kocienda <kocienda@apple.com>
2808 Added tests to cover new "unsupported content" editing code.
2810 * layout-tests/editing/unsupported-content/list-delete-001-expected.txt: Added.
2811 * layout-tests/editing/unsupported-content/list-delete-001.html: Added.
2812 * layout-tests/editing/unsupported-content/list-delete-002-expected.txt: Added.
2813 * layout-tests/editing/unsupported-content/list-delete-002.html: Added.
2814 * layout-tests/editing/unsupported-content/list-delete-003-expected.txt: Added.
2815 * layout-tests/editing/unsupported-content/list-delete-003.html: Added.
2816 * layout-tests/editing/unsupported-content/list-type-after-expected.txt: Added.
2817 * layout-tests/editing/unsupported-content/list-type-after.html: Added.
2818 * layout-tests/editing/unsupported-content/list-type-before-expected.txt: Added.
2819 * layout-tests/editing/unsupported-content/list-type-before.html: Added.
2821 2005-03-20 Ken Kocienda <kocienda@apple.com>
2827 <rdar://problem/4059578> Entire list deleted, and caret disappears, when delete key hit at end of list
2829 The problem is that a new case in the delete code did not consider when the
2830 downstream end node of the selection might be an ancestor of the upstream start
2831 node. That is the case in this bug. The downstream end is the body element, and
2832 this line of code would delete all the children of the downstream end:
2833 removeChildrenInRangePreservingPosition(m_downstreamEnd.node(), 0,
2834 m_downstreamEnd.offset(), m_upstreamStart);
2836 The fix is to check for this "is ancestor" case, and do some tree logic to find
2837 the right offset of the downstream end node for the call to
2838 removeChildrenInRangePreservingPosition().
2840 * khtml/editing/htmlediting.cpp:
2841 (khtml::DeleteSelectionCommand::handleGeneralDelete): Fixed as described.
2843 2005-03-19 Ken Kocienda <kocienda@apple.com>
2849 <rdar://problem/4059384> Cannot place insertion point correctly in editable text that avoids floating elements
2851 Note: I strongly suspect this bug blocks a complete solution to this other Tiger/P2:
2852 <rdar://problem/4055748> AX: Dictionary pop-up panel shows at wrong place on specific parts of particular pages
2854 * khtml/rendering/render_text.cpp:
2855 (RenderText::caretRect): Change the y-coordinate used to calculate the available width for a line. Height is wrong.
2856 Top of the box containing the text where the click is done is correct. Also, add in the x-offset for the start
2857 of the text box when calculating the available width. If this text box is avoiding a float at the y-coordinate
2858 for the relevant box, failure to add in the amount of float-avoidance will make the text at the coordinates
2859 greater than end-of-line minus float-avoidance ineligible for caret placement.
2861 2005-03-19 Darin Adler <darin@apple.com>
2865 - fixed <rdar://problem/4057594> REGRESSION (125-406): Unrepro crash in HTMLTokenizer::allDataProcessed after hitting Back button
2867 * khtml/html/htmltokenizer.cpp: (khtml::HTMLTokenizer::allDataProcessed):
2868 To get the part safely after calling end, save a guarded pointer to the view.
2869 The old way could end trying to call a virtual function a part that was destroyed.
2871 2005-03-19 Maciej Stachowiak <mjs@apple.com>
2875 <rdar://problem/4053506> Pasting Tables and Cells in Mail does not allow editing before or after
2876 <rdar://problem/4005954> REGRESSION (Mail): After copy/paste of content containing list element cannot go back to entering text at left side of page
2878 * khtml/editing/htmlediting.cpp:
2879 (khtml::maxDeepOffset):
2880 (khtml::CompositeEditCommand::removeFullySelectedNodePreservingPosition):
2881 (khtml::CompositeEditCommand::removeChildrenInRangePreservingPosition):
2882 (khtml::CompositeEditCommand::removeNodePreservingPosition):
2883 (khtml::CompositeEditCommand::insertBlockPlaceholder):
2884 (khtml::CompositeEditCommand::appendBlockPlaceholder):
2885 (khtml::CompositeEditCommand::forceBlockPlaceholder):
2886 (khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
2887 (khtml::isSpecialElement):
2888 (khtml::isFirstVisiblePositionInSpecialElementInFragment):
2889 (khtml::positionBeforePossibleContainingSpecialElement):
2890 (khtml::positionAfterPossibleContainingSpecialElement):
2891 (khtml::ApplyStyleCommand::applyInlineStyle):
2892 (khtml::DeleteSelectionCommand::initializePositionData):
2893 (khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
2894 (khtml::DeleteSelectionCommand::handleGeneralDelete):
2895 (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
2896 (khtml::DeleteSelectionCommand::doApply):
2897 (khtml::InsertParagraphSeparatorCommand::doApply):
2898 (khtml::ReplacementFragment::ReplacementFragment):
2899 (khtml::ReplaceSelectionCommand::doApply):
2900 * khtml/editing/htmlediting.h:
2901 * khtml/editing/visible_position.cpp:
2902 (khtml::isRenderedBR):
2903 (khtml::VisiblePosition::initDownstream):
2904 (khtml::isLastVisiblePositionInBlock):
2905 * khtml/rendering/render_line.cpp:
2906 (khtml::RootInlineBox::closestLeafChildForXPos):
2907 * khtml/xml/dom_nodeimpl.cpp:
2908 (NodeImpl::isBlockFlowOrTable):
2909 (NodeImpl::isEditableBlock):
2910 (NodeImpl::enclosingBlockFlowOrTableElement):
2911 * khtml/xml/dom_nodeimpl.h:
2912 * khtml/xml/dom_position.cpp:
2913 (DOM::Position::upstream):
2914 (DOM::Position::downstream):
2915 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt:
2916 * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt:
2917 * layout-tests/editing/deleting/delete-select-all-001-expected.txt:
2918 * layout-tests/editing/deleting/delete-select-all-003-expected.txt:
2919 * layout-tests/editing/inserting/insert-3786362-fix-expected.txt:
2921 2005-03-19 John Sullivan <sullivan@apple.com>
2925 - fixed <rdar://problem/4058740> Crash (nil-deref) editing Mail reply
2926 message in KWQKHTMLPart::fontForSelection (MailViewer-723)
2928 * kwq/KWQKHTMLPart.mm:
2929 (KWQKHTMLPart::fontForSelection):
2930 Add nil check to loop. It shouldn't be necessary, but this crash trace seems to be
2931 running into it. We're not completely certain, but the check is harmless at worst.
2935 2005-03-18 David Harrison <harrison@apple.com>
2939 <rdar://problem/3584942> AX: Safari Accessibility parent-child mismatch
2941 Also changed WebKit.
2943 * kwq/KWQAccObject.mm:
2944 (-[KWQAccObject rendererForView:]):
2945 New to cover both the WebCore and WebKit NSViews.
2947 (-[KWQAccObject _accessibilityParentForSubview:]):
2948 Use rendererForView.
2950 * kwq/WebCoreFrameView.h:
2951 Add WebCoreBridgeHolder protocol to get access to WebKit NSViews.
2953 2005-03-18 David Harrison <harrison@apple.com>
2955 Reviewed by Darin, Ken.
2957 <rdar://problem/3735625> AX: add AXPress action if an element has an onclick handler
2959 * khtml/dom/html_form.cpp:
2960 (HTMLInputElement::click):
2961 * khtml/html/html_elementimpl.cpp:
2962 (HTMLElementImpl::click):
2963 (HTMLElementImpl::accessKeyAction):
2964 * khtml/html/html_elementimpl.h:
2965 * khtml/html/html_formimpl.cpp:
2966 (DOM::HTMLFormElementImpl::submitClick):
2967 (DOM::HTMLButtonElementImpl::click):
2968 (DOM::HTMLButtonElementImpl::accessKeyAction):
2969 (DOM::HTMLInputElementImpl::click):
2970 (DOM::HTMLInputElementImpl::accessKeyAction):
2971 (DOM::HTMLInputElementImpl::defaultEventHandler):
2972 (DOM::HTMLLabelElementImpl::accessKeyAction):
2973 (DOM::HTMLSelectElementImpl::accessKeyAction):
2974 (DOM::HTMLTextAreaElementImpl::accessKeyAction):
2975 * khtml/html/html_formimpl.h:
2976 * khtml/html/html_inlineimpl.cpp:
2977 (HTMLAnchorElementImpl::defaultEventHandler):
2978 (HTMLAnchorElementImpl::accessKeyAction):
2979 * khtml/html/html_inlineimpl.h:
2980 * khtml/rendering/render_form.cpp:
2981 (RenderFileButton::click):
2982 * khtml/rendering/render_form.h:
2983 * khtml/xml/dom_docimpl.cpp:
2984 (DocumentImpl::defaultEventHandler):
2985 * khtml/xml/dom_elementimpl.h:
2986 (DOM::ElementImpl::accessKeyAction):
2988 (-[DOMHTMLInputElement click]):
2992 * kwq/KWQFileButton.h:
2993 * kwq/KWQFileButton.mm:
2994 (KWQFileButton::click):
2996 Add accessKeyAction parameter about whether to limit to HTMLElementImpl subclasses that JavaScript wants, or to apply to others as well.
2998 Add click() parameter about whether to send the mousedown and mouseup events in addition to the click event.
3000 * kwq/KWQAccObject.mm:
3001 (-[KWQAccObject mouseButtonListener]):
3002 Locate a mousedown, mouseup, or click handler in the current element and its ancestors.
3004 (-[KWQAccObject actionElement]):
3005 (-[KWQAccObject accessibilityIsIgnored]):
3006 (-[KWQAccObject accessibilityPerformAction:]):
3007 Consider mouseButtonListener.
3009 2005-03-18 John Sullivan <sullivan@apple.com>
3013 - fixed <rdar://problem/4002164> maps that include start and end
3014 location don't print right from maps.google.com
3016 I thought I checked this in yesterday but a ChangeLog conflict aborted my checkin
3017 without me noticing.
3019 * khtml/rendering/render_style.cpp:
3020 (RenderStyle::diff):
3021 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
3023 * khtml/rendering/render_style.h:
3024 (khtml::RenderStyle::InheritedFlags::operator==):
3025 flag name changed from _should_correct_text_color to _force_backgrounds_to_white
3026 (khtml::RenderStyle::setBitDefaults):
3028 (khtml::RenderStyle::forceBackgroundsToWhite):
3029 ditto, and method name changed too
3030 (khtml::RenderStyle::setForceBackgroundsToWhite):
3033 * khtml/rendering/render_text.cpp:
3034 (InlineTextBox::paint):
3035 updated for name change; also, compare text against white instead of current bg color
3036 because we no longer actually modify the bg color (previously we would always set
3037 the bg color to white, so the result is the same)
3039 * khtml/xml/dom_docimpl.cpp:
3040 (DocumentImpl::recalcStyle):
3041 updated for name change
3043 * kwq/WebCoreBridge.mm:
3044 (-[WebCoreBridge styleSheetForPrinting]):
3046 (-[WebCoreBridge reapplyStylesForDeviceType:]):
3047 removed the code that called styleSheetForPrinting; we no longer use a stylesheet
3050 * khtml/rendering/render_box.cpp:
3051 (RenderBox::paintBackgroundExtended):
3052 If forceBackgroundsToWhite flag is set, convert background images and
3053 background colors to white background color with no background image.
3055 2005-03-18 Ken Kocienda <kocienda@apple.com>
3061 <rdar://problem/4056718> Pasting quotes the entire message
3063 * khtml/editing/htmlediting.cpp:
3064 (khtml::ReplaceSelectionCommand::doApply): After pasting, nodes are moved to the block containing
3065 the end of the pasted content in certain cases. This move logic used to stop once it moved all the
3066 siblings of the node following the last node of the pasted-in content. This means that block elements
3067 could get moved, and if the pasted-in content included a mail blockquote, this could result in
3068 one quote level getting added. The fix is to stop the move of nodes once a <br>, block element, or
3069 <table> is seen. This only affected one of the many test cases we have for such scenarios, and
3070 the change to that result makes sense given the code change.
3071 * layout-tests/editing/pasteboard/paste-text-003-expected.txt: This test result changed in a way that
3072 adequately tests the behavior change, so I did not add a new test.
3074 2005-03-17 Ken Kocienda <kocienda@apple.com>
3076 Reviewed by Harrison
3080 <rdar://problem/4051809> 8A413: Cursor-up in a mail message sometimes gets stuck (with specific reproducible case)
3082 * khtml/rendering/render_text.cpp:
3083 (RenderText::positionForCoordinates): Consider two lines: line-above and line-below. If the caret position in line-below
3084 was at an x coordinate between half way through the x coordinate of the last character on the line-above and the
3085 end of that same character, this bug would happen since the positioning code would assume that it could create a
3086 VisiblePosition with a DOWNSTREAM affinity. Now, I check to see if the character position on the line-above is the
3087 last character on that line, and if it is, I use UPSTREAM as the affinity.
3091 2005-03-17 David Harrison <harrison@apple.com>
3093 Reviewed by Darin, Ken.
3095 * khtml/editing/htmlediting.cpp:
3096 (khtml::EditCommandPtr::setEndingSelection):
3097 Fixed typo so that it calls setEndingSelection rather than setStartingSelection.
3098 Commented out this unused method, tho, since this is late in Tiger. Proved unused by successful build after temporarily removing method declaration or implemenation.
3100 2005-03-16 Kevin Decker <kdecker@apple.com>
3104 Fixed <rdar://problem/4046665> REGRESSION (403-405): mypage.apple.com login does not work (hits assertion in Development build)
3106 * kwq/WebCoreBridge.mm:
3107 (-[WebCoreBridge canLoadURL:fromReferrer:hideReferrer:]): Check always came back false when callers would send a nil NSURL to this method. Now we allow the empty url cases, eg., <frame src="">
3109 2005-03-16 Darin Adler <darin@apple.com>
3113 - fixed <rdar://problem/4045203> REGRESSION (125-188): Redundant JS imports crash Safari
3115 * khtml/html/htmltokenizer.h: Take inWRite bool out of NDEBUG ifdef.
3116 * khtml/html/htmltokenizer.cpp:
3117 (khtml::HTMLTokenizer::HTMLTokenizer): Take inWrite bool management code out of NDEBUG ifdef.
3118 (khtml::HTMLTokenizer::write): Ditto. Don't call end if inWrite is true, since it will be called
3119 when you return to the body of the outer write() call.
3120 (khtml::HTMLTokenizer::allDataProcessed): Don't call end() if inWrite is true for the same reason.
3121 (khtml::HTMLTokenizer::finish): Ditto.
3123 * kwq/KWQWidget.mm: (QWidget::getOuterView): Removed bogus assertion that has been vexing us of late.
3125 2005-03-16 David Harrison <harrison@apple.com>
3127 Reviewed by me (written by Patti Yeh).
3129 * kwq/KWQAccObject.mm:
3130 (-[KWQAccObject doAXNextWordEndTextMarkerForTextMarker:]):
3131 Use LeftWordIfOnBoundary instead of RightWordIfOnBoundary.
3133 (-[KWQAccObject doAXPreviousWordStartTextMarkerForTextMarker:]):
3134 Use RightWordIfOnBoundary instead of LeftWordIfOnBoundary.
3136 2005-03-16 David Harrison <harrison@apple.com>
3140 <rdar://problem/4054590> AX: Dictionary panel does not work when page is scrolled on Safari
3142 * kwq/KWQAccObject.mm:
3143 (-[KWQAccObject doAXTextMarkerForPosition:]):
3144 Add in the view's contentsX and contentsY to the point.
3146 2005-03-16 David Harrison <harrison@apple.com>
3150 <rdar://problem/4048506> Deleting from beginning of editable div deletes other document elements
3152 Also changed WebKit.
3154 * khtml/editing/visible_units.h:
3155 * khtml/editing/visible_units.cpp:
3156 (khtml::startOfEditableContent):
3157 (khtml::endOfEditableContent):
3158 (khtml::inSameEditableContent):
3159 (khtml::isStartOfEditableContent):
3160 (khtml::isEndOfEditableContent):
3163 * kwq/WebCoreBridge.h:
3164 * kwq/WebCoreBridge.mm:
3165 (-[WebCoreBridge canDeleteRange:]):
3168 2005-03-16 Ken Kocienda <kocienda@apple.com>
3174 <rdar://problem/4042935> undo doesn't work properly during inline input
3176 * kwq/WebCoreBridge.h: Declare new method below.
3177 * kwq/WebCoreBridge.mm:
3178 (-[WebCoreBridge replaceMarkedTextWithText:]): New method. Wraps calls to TypingCommand::deleteKeyPressed and
3179 TypingCommand::insertText to map the way that international text input works onto the typing undo system.
3181 2005-03-16 David Harrison <harrison@apple.com>
3185 <rdar://problem/4044336> REGRESSION (8A398-8A409): Option-Delete also deletes space to left of deleted word
3187 * khtml/editing/htmlediting.cpp:
3188 (khtml::DeleteSelectionCommand::initializePositionData):
3189 - skip smart delete if the selection to delete already starts or ends with whitespace
3191 * khtml/khtml_part.cpp:
3192 (KHTMLPart::handleMousePressEventDoubleClick):
3193 - preserve selection on double-click when range is already selected
3195 * khtml/xml/dom_position.cpp:
3196 (DOM::Position::leadingWhitespacePosition):
3197 (DOM::Position::trailingWhitespacePosition):
3198 - fix considerNonCollapsibleWhitespace action (logic was reversed)
3199 - add non-breaking space to the non-collapsable ones
3201 * kwq/WebCoreBridge.mm:
3202 (-[WebCoreBridge rangeByExpandingSelectionWithGranularity:]):
3203 (-[WebCoreBridge rangeByAlteringCurrentSelection:direction:granularity:]):
3204 - these methods do not set the selection, so remove calls to setSelectionGranularity
3206 (-[WebCoreBridge alterCurrentSelection:direction:granularity:]):
3207 (-[WebCoreBridge alterCurrentSelection:verticalDistance:]):
3208 - set the granularity back to character
3209 - the one exception is that we need to keep word granularity
3210 to preserve smart delete behavior when extending by word
3212 2005-03-15 Maciej Stachowiak <mjs@apple.com>
3216 <rdar://problem/4053266> Pressing return a few times right after a link makes the new blank lines part of the link
3218 * khtml/editing/htmlediting.cpp:
3219 (khtml::InsertLineBreakCommand::doApply): Use
3220 positionOutsideContainingSpecialElement in the right two places.
3221 (khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
3223 - move all these helper functions higher in the file
3225 * khtml/editing/htmlediting.cpp:
3226 (khtml::isSpecialElement):
3227 (khtml::isFirstVisiblePositionInSpecialElement):
3228 (khtml::positionBeforeNode):
3229 (khtml::positionBeforeContainingSpecialElement):
3230 (khtml::maxRangeOffset):
3231 (khtml::isLastVisiblePositionInSpecialElement):
3232 (khtml::positionAfterNode):
3233 (khtml::positionAfterContainingSpecialElement):
3234 (khtml::positionOutsideContainingSpecialElement):
3236 2005-03-14 Maciej Stachowiak <mjs@apple.com>
3240 <rdar://problem/4049925> Pasting right after a link makes pasted content part of the link (without visible style change)
3242 * khtml/editing/htmlediting.cpp:
3243 (khtml::positionOutsideContainingSpecialElement): made a helper
3244 function that computes a position outside the outermost containing
3245 special element if the passed in position is right at the start or
3247 (khtml::InsertTextCommand::prepareForTextInsertion): use new helper here
3248 (khtml::ReplaceSelectionCommand::doApply): use it here too: this is the fix
3249 (khtml::positionBeforeNode): made static
3250 (khtml::positionBeforeContainingSpecialElement): made static
3251 (khtml::positionAfterNode): made static
3252 (khtml::positionAfterContainingSpecialElement): made static
3254 2005-03-15 Richard Williamson <rjw@apple.com>
3256 Fixed <rdar://problem/4053658> Crash getting direction at maps.google.com
3258 Add non nil style() check.
3260 Reviewed by Dave Harrison.
3262 * khtml/rendering/render_table.cpp:
3263 (RenderTableCell::collapsedRightBorder):
3265 2005-03-15 Kevin Decker <kdecker@apple.com>
3269 Fixed: <rdar://problem/4041374> REGRESSION (185-186): unload handlers (at least those added with addEventListener) are broken
3271 The reason why UNLOAD_EVENT wouldn't dispatch was because the code would delete all event listeners at the detach() phase which is prior to closeURL().
3273 This fixes a recent regression from:
3275 <rdar://problem/3977973> pages on ebay leak referenced JavaScript objects -- over time browsing becomes super-slow
3277 * khtml/khtml_part.cpp:
3278 (KHTMLPart::closeURL): After dispatching event handlers, go ahead and remove them from the DOM.
3279 * khtml/xml/dom_docimpl.cpp:
3280 (DocumentImpl::detach): Took out the call to removeAllEventListenersFromAllNodes(). If we remove all event listeners here then when KHTMLPart::closeURL() checks for even listeners, it will never have any because they'll already be gone.
3282 2005-03-15 Ken Kocienda <kocienda@apple.com>
3288 <rdar://problem/4052642> Each delete keystroke is in its own undo group; not included in undo group with other typing
3290 Calling -[WebCore setSelectedDOMRange:range affinity:] had the result of "closing" any active set of typing
3291 keystrokes grouped together in a single undo operation. A change on 27 Jan in WebKit to change the way delete
3292 keystrokes are handled made this feature regress. Previous to that change, the backwards delete
3293 key went through separate code that is no longer in the tree that did not set the selection in the way
3296 The solution is to add an extra argument to the set-selection call. The WebCoreBridge now offers this method:
3297 -[WebCore setSelectedDOMRange:range affinity:closeTyping:]. Now, callers must indicate whether setting the
3298 selection will act to close typing or not.
3300 * kwq/WebCoreBridge.h: Changed header accordingly to change method shown below.
3301 * kwq/WebCoreBridge.mm:
3302 (-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Added closeTyping argument to this method.
3304 2005-03-15 John Sullivan <sullivan@apple.com>
3308 - fixed <rdar://problem/4052246> crash in KWQKHTMLPart::createPart() trying to display local file in frame
3310 * kwq/KWQKHTMLPart.mm:
3311 (KWQKHTMLPart::createPart):
3312 Check part for nil before trying to ref. This was probably a longstanding code flaw revealed by
3313 the recent security fix.
3315 2005-03-15 Kevin Decker <kdecker@apple.com>
3317 Reviewed by Ken and Maciej.
3319 New fix for <rdar://problem/3667701> crash in KHTMLPart::jScriptEnabled()
3321 The tokenizer has buffers which mean parsing can continue even after loading is supposed to be stopped. If the loading process was aborted, the tokenizer should abort, too.
3323 * khtml/html/htmltokenizer.cpp:
3324 (khtml::HTMLTokenizer::HTMLTokenizer): Initialize loadStopped to false.
3325 (khtml::HTMLTokenizer::write): Go ahead and bail out if loadStopped is true.
3326 (khtml::HTMLTokenizer::processToken):
3327 * khtml/html/htmltokenizer.h: Added loadStopped flag. Changed the view pointer from a standard pointer to a QGuardedPtr. This fixes the crash. Now the tokenizer's handle to the view will now automatically nil-out and never dangle.
3328 * khtml/khtml_part.cpp:
3329 (KHTMLPart::closeURL): Notify the tokenizer to stop parsing.
3330 * khtml/xml/xml_tokenizer.cpp:
3331 (khtml::XMLTokenizer::XMLTokenizer): Initialize loadStopped to false.
3332 * khtml/xml/xml_tokenizer.h:
3333 (khtml::Tokenizer::stopParsing): Added.
3335 2005-03-14 David Harrison <harrison@apple.com>
3337 Reviewed by Darin, Maciej.
3339 <rdar://problem/4046103> REGRESSION (Mail): clicking after style change sets insertion point incorrectly
3341 Also fixes crash by adding nil check.
3343 * khtml/editing/htmlediting.cpp:
3344 (khtml::MoveSelectionCommand::doApply):
3345 Check the node for nil.
3347 * khtml/khtml_part.cpp:
3348 (KHTMLPart::khtmlMouseReleaseEvent):
3349 Use the node from the event rather than from the selection.
3351 2005-03-14 Darin Adler <darin@apple.com>
3353 Reviewed by Harrison.
3355 - fixed <rdar://problem/4049776> Seed: Mail: Disable spellcheck leaves red artifacts
3357 * khtml/xml/dom_docimpl.cpp:
3358 (DocumentImpl::DocumentImpl): Set markers list to be "auto-delete" so they don't all leak.
3359 (DocumentImpl::removeMarker): Remove markers list for a node when the last marker is removed
3360 for that node. Otherwise, we can have empty marker lists for each node forever until the
3362 (DocumentImpl::removeAllMarkers): Added code to dirty the markers.
3363 (DocumentImpl::shiftMarkers): Remove unneeded empty check.
3365 * kwq/WebCoreBridge.h: Added unmarkAllMisspellings for WebKit.
3366 * kwq/WebCoreBridge.mm: (-[WebCoreBridge unmarkAllMisspellings]): Added. Calls removeAllMarkers.
3368 2005-03-14 Richard Williamson <rjw@apple.com>
3370 Fixed <rdar://problem/4027928> Tiger_8A394:Acrobat crashes while tried to remove the subscription errors by clicking on "Would you like to remove the subscription" from Tracker details view pane
3372 A document may be deleted as a consequence of handling an event,
3373 as was the case with Acrobat.app. Ensure that the document is still valid
3374 before passing the event on for further handling.
3376 * khtml/xml/dom_nodeimpl.cpp:
3377 (NodeImpl::dispatchUIEvent):
3379 2005-03-14 Ken Kocienda <kocienda@apple.com>
3383 Added a couple of comments about setChanged() to this code based on my experiences with 4047028.
3385 * khtml/css/css_valueimpl.cpp:
3386 (DOM::CSSMutableStyleDeclarationImpl::addParsedProperties)
3387 (DOM::CSSMutableStyleDeclarationImpl::merge)