aa452f1a917ada24239300bb7884d2d1fb52fc9a
[WebKit-https.git] / WebCore / ChangeLog
1 2006-03-22  Eric Seidel  <eseidel@apple.com>
2
3         Reviewed by darin.
4
5         Replace more DeprecatedString with String.
6         http://bugzilla.opendarwin.org/show_bug.cgi?id=7907
7
8         * WebCore+SVG/kdom.h:
9         * bindings/objc/DOMHTML.mm:
10         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
11         * bridge/BrowserExtension.h:
12         * bridge/mac/BrowserExtensionMac.h:
13         * bridge/mac/BrowserExtensionMac.mm:
14         (WebCore::BrowserExtensionMac::setTypedIconURL):
15         * bridge/mac/FrameMac.h:
16         * bridge/mac/FrameMac.mm:
17         (WebCore::FrameMac::searchForLabelsBeforeElement):
18         (WebCore::nsArray):
19         (WebCore::FrameMac::createPlugin):
20         (WebCore::FrameMac::bindingRootObject):
21         (WebCore::FrameMac::windowScriptObject):
22         (WebCore::FrameMac::windowScriptNPObject):
23         (WebCore::FrameMac::partClearedInBegin):
24         (WebCore::FrameMac::openURLFromPageCache):
25         * bridge/mac/WebCoreFrameBridge.mm:
26         (-[WebCoreFrameBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
27         (-[WebCoreFrameBridge scrollToAnchor:]):
28         (-[WebCoreFrameBridge URLWithAttributeString:]):
29         (-[WebCoreFrameBridge highlightAllMatchesForString:caseSensitive:]):
30         * bridge/mac/WebCoreScriptDebugger.mm:
31         (-[WebCoreScriptCallFrame evaluateWebScript:]):
32         * bridge/mac/WebCoreSettings.mm:
33         (-[WebCoreSettings _updateAllViews]):
34         (-[WebCoreSettings setStandardFontFamily:]):
35         (-[WebCoreSettings setMinimumFontSize:]):
36         (-[WebCoreSettings setMinimumLogicalFontSize:]):
37         (-[WebCoreSettings setDefaultFontSize:]):
38         (-[WebCoreSettings setDefaultFixedFontSize:]):
39         (-[WebCoreSettings setUserStyleSheetLocation:]):
40         * css/CSSComputedStyleDeclaration.cpp:
41         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
42         * css/CSSGrammar.y:
43         * css/css_stylesheetimpl.cpp:
44         (WebCore::MediaList::setMediaText):
45         * css/css_valueimpl.cpp:
46         (WebCore::quoteStringIfNeeded):
47         * css/cssparser.cpp:
48         (WebCore::CSSParser::parseColor):
49         * css/cssstyleselector.cpp:
50         (WebCore::CSSStyleSelector::CSSStyleSelector):
51         * css/cssstyleselector.h:
52         * dom/Document.cpp:
53         (WebCore::Document::resetActiveLinkColor):
54         (WebCore::Document::nextState):
55         (WebCore::Document::setUserStyleSheet):
56         (WebCore::Document::processHttpEquiv):
57         (WebCore::Document::recalcStyleSelector):
58         * dom/Document.h:
59         (WebCore::Document::userStyleSheet):
60         (WebCore::Document::setPrintStyleSheet):
61         (WebCore::Document::printStyleSheet):
62         * editing/markup.cpp:
63         (WebCore::createMarkup):
64         (WebCore::createFragmentFromMarkup):
65         (WebCore::createFragmentFromText):
66         * editing/markup.h:
67         * html/CanvasRenderingContext2D.cpp:
68         (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
69         * html/HTMLTokenizer.cpp:
70         (WebCore::HTMLTokenizer::scriptHandler):
71         * html/html_baseimpl.cpp:
72         (WebCore::HTMLFrameElement::openURL):
73         (WebCore::HTMLFrameElement::attach):
74         * html/html_headimpl.cpp:
75         (WebCore::HTMLLinkElement::process):
76         (WebCore::HTMLLinkElement::setStyleSheet):
77         * html/html_headimpl.h:
78         * html/html_imageimpl.cpp:
79         (WebCore::HTMLImageElement::parseMappedAttribute):
80         * html/html_imageimpl.h:
81         (WebCore::HTMLImageElement::compositeOperator):
82         * html/html_objectimpl.cpp:
83         (WebCore::HTMLAppletElement::createRenderer):
84         * ksvg2/svg/SVGStringList.cpp:
85         (SVGStringList::reset):
86         * kwq/AccessibilityObjectCache.h:
87         * kwq/AccessibilityObjectCache.mm:
88         (AccessibilityObjectCache::textMarkerForVisiblePosition):
89         (AccessibilityObjectCache::postNotificationToTopWebArea):
90         (AccessibilityObjectCache::postNotification):
91         * kwq/ClipboardMac.mm:
92         (WebCore::cocoaTypeFromMIMEType):
93         * kwq/KWQKHTMLSettings.h:
94         (KHTMLSettings::userStyleSheetLocation):
95         (KHTMLSettings::setUserStyleSheetLocation):
96         * kwq/KWQLineEdit.h:
97         * kwq/KWQLineEdit.mm:
98         (QLineEdit::selectedText):
99         * loader/CachedCSSStyleSheet.cpp:
100         (WebCore::CachedCSSStyleSheet::ref):
101         * page/Frame.cpp:
102         (WebCore::UserStyleSheetLoader::setStyleSheet):
103         (WebCore::Frame::jScriptEnabled):
104         (WebCore::Frame::javaEnabled):
105         (WebCore::Frame::pluginsEnabled):
106         (WebCore::Frame::receivedFirstData):
107         (WebCore::Frame::begin):
108         (WebCore::Frame::setUserStyleSheet):
109         (WebCore::Frame::requestObject):
110         (WebCore::Frame::loadPlugin):
111         (WebCore::Frame::referrer):
112         (WebCore::Frame::lastModified):
113         (WebCore::Frame::reparseConfiguration):
114         (WebCore::Frame::handleMousePressEventSingleClick):
115         (WebCore::Frame::appliedEditing):
116         (WebCore::Frame::unappliedEditing):
117         (WebCore::Frame::reappliedEditing):
118         * page/Frame.h:
119         * page/FramePrivate.h:
120         (WebCore::FramePrivate::FramePrivate):
121         * platform/AtomicString.h:
122         (WebCore::AtomicString::AtomicString):
123         * platform/DeprecatedString.cpp:
124         (DeprecatedString::replace):
125         * platform/GraphicsContext.h:
126         * platform/Image.h:
127         * platform/KURL.cpp:
128         * platform/KURL.h:
129         * platform/PlatformString.h:
130         (WebCore::String::String):
131         (WebCore::String::replace):
132         * platform/String.cpp:
133         (WebCore::operator+):
134         * platform/StringImpl.cpp:
135         (WebCore::StringImpl::remove):
136         (WebCore::parseLength):
137         (WebCore::StringImpl::replace):
138         * platform/StringImpl.h:
139         * platform/mac/GraphicsContextMac.mm:
140         (WebCore::GraphicsContext::setCompositeOperation):
141         * rendering/RenderHTMLCanvas.cpp:
142         (WebCore::RenderHTMLCanvas::paint):
143         * rendering/render_form.cpp:
144         (WebCore::RenderSelect::updateFromElement):
145         * rendering/render_frames.cpp:
146         (WebCore::isURLAllowed):
147         (WebCore::mapClassIdToServiceType):
148         (WebCore::RenderPartObject::updateWidget):
149         * rendering/render_style.h:
150         (WebCore::RenderStyle::setDashboardRegion):
151         * xml/xmlhttprequest.cpp:
152         (WebCore::getCharset):
153         (WebCore::XMLHttpRequest::send):
154         (WebCore::XMLHttpRequest::overrideMIMEType):
155
156 2006-03-22  Beth Dakin  <bdakin@apple.com>
157
158         Reviewed by Hyatt
159
160         Fix for <rdar://problem/4471984> repro crash CSS position for html/
161         table=relative causes crash when hiding table
162
163         * css/cssstyleselector.cpp:
164         (WebCore::CSSStyleSelector::adjustRenderStyle): If an object is 
165         positioned, relatively positioned, or transparent, it should always 
166         have auto indexing. Auto z-index for the root should always be 0.
167         * rendering/RenderLayer.cpp:
168         (WebCore::RenderLayer::removeChild): This is not part of the bug 
169         fix; just using a local variable that was created for the stacking 
170         context instead of recalculating it.
171
172 2006-03-22  David Hyatt  <hyatt@apple.com>
173
174         Fix for residual style problem where form elements lose their connection
175         to a degenerate table form because of a residual style fixup.  This is
176         Radar bug #4330765.
177
178         Reviewed by eric
179
180         * khtml/html/HTMLFormElement.cpp:
181         (WebCore::HTMLFormElement::HTMLFormElement):
182         * khtml/html/HTMLFormElement.h:
183         (WebCore::HTMLFormElement::setPreserveFormConnectionAcrossRemove):
184         (WebCore::HTMLFormElement::preserveFormConnectionAcrossRemove):
185         * khtml/html/HTMLGenericFormElement.cpp:
186         (WebCore::HTMLGenericFormElement::removedFromTree):
187         * khtml/html/htmlparser.cpp:
188         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
189
190 2006-03-22  Mitz Pettel  <opendarwin.org@mitzpettel.com>
191
192         Reviewed by Adele.
193
194         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7747
195           REGRESSION: Background tab/window auto-refresh in GMail will take focus.
196
197         * manual-tests/named-window-blank-target.html: Added.
198         * manual-tests/resources/named-window-blank-target-step2.html: Added.
199         * manual-tests/resources/named-window-blank-target-step3.html: Added.
200         * manual-tests/resources/named-window-blank-target-step4.html: Added.
201         * page/FrameTree.cpp:
202         (WebCore::FrameTree::find): If the given name is empty, just return our frame,
203         even if it has a name.
204
205 2006-03-22  Darin Adler  <darin@apple.com>
206
207         Reviewed by Adele.
208
209         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7143
210           <rdar://problem/4483856> REGRESSION (417.8-TOT): onclick handler cannot call a function named OnClick (7143)
211
212         Test: fast/dom/Element/onclick-case.html
213
214         We discussed this with Maciej. In the long run we may need to remove the "all attributes
215         show up as properties in JavaScript" feature entirely. Gecko does not do it, and it's
216         not really the same thing IE does either.
217
218         * khtml/ecma/kjs_dom.cpp:
219         (KJS::DOMElement::attributeGetter): Use getAttributeNS so we're case sensitive.
220         (KJS::DOMElement::getOwnPropertySlot): Ditto.
221
222 2006-03-22  Eric Seidel  <eseidel@apple.com>
223
224         Reviewed by beth.
225
226         <rdar://problem/4486417> REGRESSION: Mail linked against TOT WebKit crashes when composing a message
227
228         No test possible.
229
230         * bridge/mac/WebCoreSettings.mm:
231         (-[WebCoreSettings init]): call AtomicString::init()
232
233 2006-03-21  Darin Adler  <darin@apple.com>
234
235         - fix buildbot (and everyone else)
236
237         * bindings/js/JSDOMCore.cpp: Touch, because Adele's change adds a virtual function,
238         and Xcode doesn't know this needs recompiling.
239         * bindings/js/JSDOMEvents.cpp: Ditto.
240         * bindings/js/JSDOMHTML.cpp: Ditto.
241
242 2006-03-21  Justin Haygood and Bjoern Graf  <jhaygood@spsu.edu> <bjoern.graf@gmail.com>
243
244         Reviewed by Eric and Darin.
245
246         - get Windows building again
247
248         * WebCore.vcproj/WebCore/WebCore.vcproj:
249         * bridge/win/FrameWin.cpp:
250         (WebCore::FrameWin::userAgent):
251         * bridge/win/FrameWin.h:
252         * platform/GraphicsContext.h:
253         * platform/cairo/ImageCairo.cpp:
254         (WebCore::Image::supportsType):
255         * platform/win/TemporaryLinkStubs.cpp:
256         (FrameWin::mimeTypeForFileName):
257         (FrameWin::objectContentType):
258         (FrameWin::createPlugin):
259         (FrameWin::overrideMediaType):
260         (FrameWin::passSubframeEventToSubframe):
261         (FrameWin::createFrame):
262         (FrameWin::incomingReferrer):
263
264 2006-03-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
265
266         Reviewed by Darin.
267
268         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7884
269           REGRESSION: Selecting a custom style sheet crashes 20/3 nightly
270
271         * page/Frame.cpp:
272         (WebCore::UserStyleSheetLoader::setStyleSheet): This was calling the function
273         that sets the stylesheet URL, passing it the actual stylesheet.
274         (WebCore::Frame::begin):
275         (WebCore::Frame::setUserStyleSheetLocation): Renamed the version of
276         setUserStyleSheet() that takes a URL to this.
277         (WebCore::Frame::reparseConfiguration):
278         * page/Frame.h:
279
280 2006-03-21  Adele Peterson  <adele@apple.com>
281
282         Reviewed by Darin.
283
284         - Fix for
285         http://bugzilla.opendarwin.org/show_bug.cgi?id=6813
286         elementAtPoint needs to return input element when clicking on new text field
287         http://bugzilla.opendarwin.org/show_bug.cgi?id=7799
288         New text fields don't respect the disabled attribute
289
290         - Tests:
291         fast/forms/input-appearance-disabled.html
292         fast/forms/input-appearance-elementFromPoint.html
293         fast/forms/input-appearance-preventDefault.html
294
295         * bridge/mac/WebCoreFrameBridge.h: Added allowShadowContent parameter to getInnerNonSharedNode so new elementAtPoint method in WebKit can call this.
296         * bridge/mac/WebCoreFrameBridge.mm:
297         (-[WebCoreFrameBridge getInnerNonSharedNode:innerNode:URLElement:atPoint:allowShadowContent:]): Passes allowShadowContent parameter to nodeInfoAtPoint.
298         (-[WebCoreFrameBridge _visiblePositionForPoint:]): Updated to call nodeInfoAtPoint allowing shadow content.
299         (-[WebCoreFrameBridge RenderObject::nodeInfoAtPoint:allowShadowContent:]): Added allowShadowContent parameter.
300
301         * dom/Node.h:
302         (WebCore::Node::isShadowNode): Added.
303         (WebCore::Node::shadowParentNode): Added.
304         * dom/Node.cpp: (WebCore::Node::shadowAncestorNode): Added.  If an ancestor is a shadow node, return its shadow parent node.
305         * html/HTMLTextFieldInnerElement.h: (WebCore::HTMLTextFieldInnerElement::isShadowNode): Added.
306
307         * dom/Document.cpp: (WebCore::Document::elementFromPoint): Gets the shadowAncestorNode (so we get the input element, and not the inner div).
308         * html/HTMLInputElement.cpp:
309         (WebCore::HTMLInputElement::isKeyboardFocusable): If text fields are focusable, then they should be keyboard focusable.  This works for the
310         old text fields because HTMLGenericFormElement::isKeyboardFocusable does the right thing for RenderWidgets.  That's not needed for the new form
311         elements.
312         (WebCore::HTMLInputElement::defaultEventHandler): let the renderer forward drag, mouse, and wheel events.
313
314         * page/FrameView.cpp:
315         (WebCore::FrameView::updateDragAndDrop): Send drag events to the shadowAncestorNode.
316         (WebCore::FrameView::dispatchMouseEvent): Send mouse events to the shadowAncestorNode.
317         (WebCore::FrameView::handleWheelEvent): Send wheel events to the shadowAncestorNode.
318
319         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::forwardEvent): forwards events to the inner div element.
320         * rendering/RenderTextField.h: Added forwardEvent method.
321
322         * kwq/WebCoreAXObject.mm:
323         (-[WebCoreAXObject accessibilityHitTest:]): Gets the  shadowAncestorNode (so we get the input element, and not the inner div).
324         (-[WebCoreAXObject role]): Gets the right role for text fields, since we no longer get that from AppKit.
325         (-[WebCoreAXObject roleDescription]): Gets the right description for text fields.
326
327 2006-03-21  Darin Adler  <darin@apple.com>
328
329         Reviewed by Tim O.
330
331         - fixed <rdar://problem/4251515> REGRESSION: listing tag broken in TOT
332
333         Test: fast/html/listing.html
334
335         * html/HTMLNames.h: Add listing tag.
336
337         * bindings/objc/DOM.mm: (+[DOMNode _nodeWith:]):
338         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::attributedString):
339         * css/html4.css:
340         * editing/ReplaceSelectionCommand.cpp: (WebCore::isProbablyBlock):
341         * editing/TextIterator.cpp:
342         (WebCore::TextIterator::handleNonTextNode):
343         (WebCore::TextIterator::exitNode):
344         (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode):
345         * editing/markup.cpp:
346         (WebCore::startMarkup):
347         (WebCore::createMarkup):
348         * html/HTMLElement.cpp: (WebCore::blockTagList):
349         * html/HTMLElementFactory.cpp:
350         (WebCore::addTag):
351         (WebCore::createFunctionMap):
352         (WebCore::HTMLElementFactory::createHTMLElement):
353         * html/HTMLParser.cpp: (WebCore::HTMLParser::isAffectedByResidualStyle):
354         * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::parseTag):
355         * khtml/ecma/kjs_html.cpp:
356         (KJS::JSHTMLElement::classInfo):
357         (KJS::JSHTMLElement::accessors):
358         Add listing tags everywhere pre tags are listed.
359
360 2006-03-21  Maciej Stachowiak  <mjs@apple.com>
361
362         Reviewed by Darin.
363         
364         - fix horrible build fallout from my attr fix
365
366         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
367         * bindings/js/JSDOMCore.cpp:
368         * bindings/js/JSDOMEvents.cpp:
369         * bindings/js/JSDOMHTML.cpp:
370         * bindings/scripts/CodeGeneratorJS.pm:
371
372 2006-03-21  Beth Dakin  <bdakin@apple.com>
373
374         Reviewed by Maciej
375
376         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7223 
377         Reproducible crash when tabbing to a frame that has not been loaded
378
379         * bridge/mac/FrameMac.mm:
380         (WebCore::FrameMac::nextKeyViewInFrame): When a renderer doesn't 
381         have a widget, skip it in the focus loop.
382
383 2006-03-20  Eric Seidel  <eseidel@apple.com>
384
385         Reviewed by mjs.
386
387         Fix a unsafe static cast causing intermittent crashes.
388         <rdar://problem/4411663> crash at KXMLCore::RefPtr<WebCore::DOMStringImpl>::get() const + 20 (RefPtr.h:45)
389
390         Test: fast/dom/NodeList/item-by-id-with-no-document.html
391
392         * dom/NodeList.cpp:
393         (WebCore::NodeList::itemById): fix unsafe static cast.
394
395 2006-03-20  Maciej Stachowiak  <mjs@apple.com>
396
397         - touch this file in hopes of fixing build
398
399         * bindings/js/JSDOMCore.cpp:
400
401 2006-03-20  Maciej Stachowiak  <mjs@apple.com>
402
403         Reviewed by Anders.
404         
405         - fixed <rdar://problem/4446749> 10.4.4: safari crash in DOM::NamedAttrMapImpl::setNamedItem
406
407         * bindings/scripts/CodeGeneratorJS.pm: Add a framework for typechecking method
408         arguments. For now only use it for parameters of type Attr.
409         * dom/Element.idl: Arbitrary change to make it regenerate.
410         * dom/dom_elementimpl.cpp:
411         (WebCore::Element::setAttributeNode): ASSERT that attr is not null
412         * khtml/ecma/kjs_dom.cpp:
413         (KJS::toAttr): add bool ok parameter
414         * khtml/ecma/kjs_dom.h:
415
416 2006-03-20  Eric Seidel  <eseidel@apple.com>
417
418         * ksvg2/css/SVGCSSParser.h: Removed unused file.
419
420 2006-03-20  Eric Seidel  <eseidel@apple.com>
421
422         Reviewed by mjs.
423
424         Fix tokenizer crash when document.open() is called from an external script:
425         <rdar://problem/4483882> REGRESSION (417.8-TOT): crash at yourmovies.com.au in WebCore::HTMLTokenizer::reset() + 92 (7818)
426
427         * dom/Document.cpp:
428         (WebCore::Document::open): Check to make sure the current tokenizer isn't executing a script
429         * dom/xml_tokenizer.h:
430         (WebCore::Tokenizer::executingScript): Add a way for others to know if scripts are executing.
431         * html/HTMLTokenizer.cpp:
432         (WebCore::HTMLTokenizer::scriptExecution): Wire into existing m_executingScript member var.
433         * html/HTMLTokenizer.h:
434         (WebCore::HTMLTokenizer::executingScript):
435         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
436         (WebCore::KCanvasFilterQuartz::prepareFilter): Unrelated code cleanup.
437
438 2006-03-20  Justin Garcia  <justin.garcia@apple.com>
439
440         Reviewed by darin
441         
442         <rdar://problem/3997958> 
443         REGRESSION (Mail): Mail takes half of forever to paste >1500 lines - replaceSelectionWithNode
444
445         * dom/Position.cpp:
446         (WebCore::Position::upstream): Avoid calling previous() when we know that 
447         it will 1) end the search and 2) be expensive to compute.
448         (WebCore::Position::downstream): Removed some dead code.
449         (WebCore::Position::inRenderedText): Return false for offsets inside composed characters.
450         * dom/Position.h:
451         * editing/VisiblePosition.cpp:
452         (WebCore::VisiblePosition::init): If there are two visually equivalent candidates, we choose
453         the one that occurs first in document order.  Using upstream() to find the one that occurs first is
454         much faster than the old code.
455
456 2006-03-20  Eric Seidel  <eseidel@apple.com>
457
458         Reviewed by adele & ggaren.
459
460         Added new cachePluginDataIfNecessary function to update
461         plugins and mimes arrays.  Made sure to call this in
462         constructor as well as refresh.  The crash was caused by
463         a refresh rendering a "plugins" object invalid.
464         Changed existing test case to depend on this new correct behavior.
465         
466         <rdar://problem/4480571> Safari crashed at exit at KXMLCore::deleteAllValues + 24
467
468         * khtml/ecma/kjs_navigator.cpp:
469         (KJS::PluginBase::cachePluginDataIfNecessary):
470         (KJS::PluginBase::PluginBase):
471         (KJS::PluginBase::~PluginBase):
472         (KJS::PluginBase::refresh):
473
474 2006-03-20  Adele Peterson  <adele@apple.com>
475
476         Reviewed by Justin.
477
478         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::visiblePositionForIndex):
479         When calculating the VisiblePosition for the first position in the text field, it
480         makes more sense for the position to have a downstream affinity.
481
482 2006-03-20  Maciej Stachowiak  <mjs@apple.com>
483
484         Reviewed by Adele.
485         
486         <rdar://problem/4362396> REGRESSION: (417-420) stopPropagation is not working for click event listener (onclick works fine)
487
488         * dom/EventTargetNode.cpp:
489         (WebCore::EventTargetNode::dispatchGenericEvent): make sure to fire capturing listeners
490         as well as bubbling ones on the target.
491
492 2006-03-20  Maciej Stachowiak  <mjs@apple.com>
493
494         Reviewed by Darin.
495         
496         <rdar://problem/4458568> WebCore should not disclose https referrers
497
498         * bridge/mac/WebCoreFrameBridge.mm:
499         (-[WebCoreFrameBridge canLoadURL:fromReferrer:hideReferrer:]):
500         Don't send https URLs as referrers to non-secure http sites.
501
502 2006-03-20  Darin Adler  <darin@apple.com>
503
504         Reviewed by Geoff.
505
506         - http://bugzilla.opendarwin.org/show_bug.cgi?id=7867
507           get rid of macro hacks for DOM, KDOM, KSVG, khtml, DOMString, QString
508
509         * config.h: Remove the defines for DOM, KDOM, KSVG, khtml, DOMString, QString,
510         and qstring().
511
512         * WebCore.xcodeproj/project.pbxproj: Pass in WebCore instead of KSVG as the
513         namespace for SVG names.
514         * ksvg2/scripts/make_names.pl: Made a couple changes to trick the SVG names into
515         recompiling, since they are in a different namespace now.
516
517         * ForwardingHeaders/kjs/identifier.h: Added.
518
519         * dom/PlatformWheelEvent.idl: Removed.
520         * dom/WheelEvent.idl: Added. This file was renamed by accident.
521
522         * bindings/js/JSDOMCore.cpp:
523         * bindings/js/JSDOMEvents.cpp:
524         * bindings/js/JSDOMHTML.cpp:
525         * dom/Attr.idl:
526         * dom/CharacterData.idl:
527         * dom/DOMImplementation.idl:
528         * dom/DocumentType.idl:
529         * dom/Element.idl:
530         * dom/Entity.idl:
531         * dom/MutationEvent.idl:
532         * dom/Notation.idl:
533         * dom/ProcessingInstruction.idl:
534         * dom/Text.idl:
535         * html/CanvasGradient.idl:
536         * html/CanvasPattern.idl:
537         * html/CanvasRenderingContext2D.idl:
538         Touched, to get CodeGeneratorJS.pm changes to take effect.
539  
540         * css/CSSGrammar.y:
541         * css/css_valueimpl.cpp: (WebCore::propertyID):
542         Changed calls to get CSS property values to use an explicit SVG:: namespace,
543         to match what the script writes out.
544
545         * khtml/ecma/kjs_binding.h: Added forward declaration of WebCore::String.
546
547         * ksvg2/scripts/cssmakeget rid of macro hacks for DOM, KDOM, KSVG, khtml, DOMString, QString
548           props: Made this compile with warnings and strict turned on.
549         Really just a trick to get properties to recompile, which turned out to be unneeded.
550         * ksvg2/scripts/cssmakevalues: Ditto.
551
552         * ksvg2/svg/SVGAElement.cpp:
553         (SVGAElement::parseMappedAttribute):
554         (SVGAElement::defaultEventHandler):
555         * ksvg2/svg/SVGAnimateTransformElement.cpp:
556         (SVGAnimateTransformElement::parseMappedAttribute):
557         * ksvg2/svg/SVGAnimationElement.cpp:
558         (SVGAnimationElement::parseMappedAttribute):
559         * ksvg2/svg/SVGClipPathElement.cpp:
560         (SVGClipPathElement::parseMappedAttribute):
561         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
562         (SVGComponentTransferFunctionElement::parseMappedAttribute):
563         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
564         (SVGExternalResourcesRequired::parseMappedAttribute):
565         * ksvg2/svg/SVGFEBlendElement.cpp:
566         (SVGFEBlendElement::parseMappedAttribute):
567         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
568         (SVGFEColorMatrixElement::parseMappedAttribute):
569         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
570         (SVGFEComponentTransferElement::parseMappedAttribute):
571         * ksvg2/svg/SVGFECompositeElement.cpp:
572         (SVGFECompositeElement::parseMappedAttribute):
573         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
574         (WebCore::SVGFEDiffuseLightingElement::parseMappedAttribute):
575         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
576         (SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
577         (SVGFEDisplacementMapElement::stringToChannel):
578         (SVGFEDisplacementMapElement::parseMappedAttribute):
579         (SVGFEDisplacementMapElement::filterEffect):
580         * ksvg2/svg/SVGFEDisplacementMapElement.h:
581         * ksvg2/svg/SVGFEFloodElement.cpp:
582         (SVGFEFloodElement::parseMappedAttribute):
583         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
584         (SVGFEGaussianBlurElement::parseMappedAttribute):
585         * ksvg2/svg/SVGFEImageElement.cpp:
586         (SVGFEImageElement::parseMappedAttribute):
587         * ksvg2/svg/SVGFELightElement.cpp:
588         (SVGFELightElement::parseMappedAttribute):
589         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
590         (SVGFEMergeNodeElement::parseMappedAttribute):
591         * ksvg2/svg/SVGFEOffsetElement.cpp:
592         (SVGFEOffsetElement::parseMappedAttribute):
593         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
594         (SVGFESpecularLightingElement::parseMappedAttribute):
595         * ksvg2/svg/SVGFETileElement.cpp:
596         (SVGFETileElement::parseMappedAttribute):
597         * ksvg2/svg/SVGFETurbulenceElement.cpp:
598         (SVGFETurbulenceElement::parseMappedAttribute):
599         * ksvg2/svg/SVGFilterElement.cpp:
600         (SVGFilterElement::parseMappedAttribute):
601         * ksvg2/svg/SVGGradientElement.cpp:
602         (SVGGradientElement::parseMappedAttribute):
603         * ksvg2/svg/SVGMaskElement.cpp:
604         (WebCore::SVGMaskElement::parseMappedAttribute):
605         * ksvg2/svg/SVGPolyElement.cpp:
606         (SVGPolyElement::parseMappedAttribute):
607         * ksvg2/svg/SVGStopElement.cpp:
608         (SVGStopElement::parseMappedAttribute):
609         * ksvg2/svg/SVGStyledElement.cpp:
610         (WebCore::SVGStyledElement::parseMappedAttribute):
611         * ksvg2/svg/SVGTests.cpp:
612         (WebCore::SVGTests::parseMappedAttribute):
613         * ksvg2/svg/SVGTextContentElement.cpp:
614         (SVGTextContentElement::parseMappedAttribute):
615         * ksvg2/svg/SVGTextPositioningElement.cpp:
616         (SVGTextPositioningElement::parseMappedAttribute):
617         * ksvg2/svg/SVGViewElement.cpp:
618         (SVGViewElement::parseMappedAttribute):
619         * ksvg2/svg/SVGZoomAndPan.cpp:
620         (SVGZoomAndPan::parseMappedAttribute):
621         Changed code that converts an AtomicString to a String to do it in a
622         more-efficient fashion that works even with all the new conversions.
623
624         * page/Frame.cpp:
625         (WebCore::getString): Removed unneeded .deprecatedString().
626         (WebCore::Frame::begin): Removed the only use of QSTRING_NULL.
627
628         * platform/AtomicString.h: Added conversion to and from KJS::Identifier
629         and KJS::UString.
630         * platform/AtomicString.cpp:
631         (WebCore::AtomicString::add): Added overloads for Identifier and UString.
632         (WebCore::AtomicString::operator Identifier): Added.
633         (WebCore::AtomicString::operator UString): Added.
634
635         * platform/DeprecatedString.h: Added conversion to and from KJS::Identifier
636         and KJS::UString.
637         * platform/DeprecatedString.cpp:
638         (DeprecatedString::DeprecatedString): Added overloads for Identifier and UString.
639         (DeprecatedString::operator Identifier): Added.
640         (DeprecatedString::operator UString): Added.
641
642         * platform/PlatformString.h: Added conversion to and from KJS::Identifier
643         and KJS::UString.
644         * platform/String.cpp:
645         (WebCore::String::String): Added overloads for Identifier and UString.
646         (WebCore::String::operator Identifier): Added.
647         (WebCore::String::operator UString): Added.
648
649         * platform/StringImpl.h: Added constructors that take KJS::Identifier
650         and KJS::UString
651         * platform/StringImpl.cpp:
652         (WebCore::getWordBreakIterator): Changed a use of UChar to say ::UChar
653         instead because of ambiguity with KJS::UChar.
654         (WebCore::StringImpl::StringImpl): Added overloads for Identifier and String.
655
656         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
657         (WebCore::JSCanvasRenderingContext2DBaseProtoFunc::callAsFunction):
658         (WebCore::toHTMLCanvasStyle):
659         * bindings/scripts/CodeGeneratorJS.pm:
660         * bridge/mac/WebCoreFrameBridge.mm:
661         (aeDescFromJSValue):
662         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
663         * dom/QualifiedName.cpp:
664         (WebCore::QualifiedName::toString):
665         * khtml/ecma/JSDOMParser.cpp:
666         (KJS::DOMParserProtoFunc::callAsFunction):
667         * khtml/ecma/JSXMLHttpRequest.cpp:
668         (KJS::JSXMLHttpRequestProtoFunc::callAsFunction):
669         * khtml/ecma/JSXSLTProcessor.cpp:
670         (KJS::XSLTProcessorProtoFunc::callAsFunction):
671         * khtml/ecma/kjs_binding.cpp:
672         (KJS::valueToStringWithNullCheck):
673         * khtml/ecma/kjs_css.cpp:
674         (KJS::cssPropertyName):
675         (KJS::DOMCSSStyleDeclaration::put):
676         (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction):
677         (KJS::DOMStyleSheetList::nameGetter):
678         (KJS::DOMStyleSheetList::getOwnPropertySlot):
679         (KJS::DOMMediaList::put):
680         (KJS::KJS::DOMMediaListProtoFunc::callAsFunction):
681         (KJS::DOMCSSStyleSheetProtoFunc::callAsFunction):
682         (KJS::DOMCSSRule::putValueProperty):
683         (KJS::DOMCSSRuleFunc::callAsFunction):
684         (KJS::DOMCSSValue::put):
685         (KJS::DOMCSSPrimitiveValueProtoFunc::callAsFunction):
686         * khtml/ecma/kjs_dom.cpp:
687         (KJS::DOMNode::putValueProperty):
688         (KJS::DOMNode::toString):
689         (KJS::DOMNodeProtoFunc::callAsFunction):
690         (KJS::DOMEventTargetNodeProtoFunc::callAsFunction):
691         (KJS::DOMNodeList::nameGetter):
692         (KJS::DOMNodeList::getOwnPropertySlot):
693         (KJS::DOMDocument::putValueProperty):
694         (KJS::DOMDocumentProtoFunc::callAsFunction):
695         (KJS::DOMElement::attributeGetter):
696         (KJS::DOMElement::getOwnPropertySlot):
697         (KJS::DOMNamedNodeMap::nameGetter):
698         (KJS::DOMNamedNodeMap::getOwnPropertySlot):
699         (KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
700         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
701         * khtml/ecma/kjs_events.cpp:
702         (KJS::JSAbstractEventListener::handleEvent):
703         (KJS::DOMEvent::getValueProperty):
704         (KJS::DOMEventProtoFunc::callAsFunction):
705         (KJS::DOMUIEventProtoFunc::callAsFunction):
706         (KJS::DOMMouseEventProtoFunc::callAsFunction):
707         (KJS::DOMKeyboardEventProtoFunc::callAsFunction):
708         (KJS::Clipboard::putValueProperty):
709         (KJS::ClipboardProtoFunc::callAsFunction):
710         * khtml/ecma/kjs_html.cpp:
711         (KJS::HTMLDocFunction::callAsFunction):
712         (KJS::JSHTMLDocument::namedItemGetter):
713         (KJS::JSHTMLDocument::getOwnPropertySlot):
714         (KJS::JSHTMLDocument::putValueProperty):
715         (KJS::JSHTMLElement::framesetNameGetter):
716         (KJS::JSHTMLElement::getOwnPropertySlot):
717         (KJS::HTMLElementFunction::callAsFunction):
718         (KJS::JSHTMLElement::putValueProperty):
719         (KJS::JSHTMLCollection::callAsFunction):
720         (KJS::JSHTMLCollection::getNamedItems):
721         (KJS::HTMLCollectionProtoFunc::callAsFunction):
722         (KJS::OptionConstructorImp::construct):
723         * khtml/ecma/kjs_navigator.cpp:
724         (KJS::Plugins::nameGetter):
725         (KJS::Plugins::getOwnPropertySlot):
726         (KJS::MimeTypes::nameGetter):
727         (KJS::MimeTypes::getOwnPropertySlot):
728         (KJS::Plugin::nameGetter):
729         (KJS::Plugin::getOwnPropertySlot):
730         * khtml/ecma/kjs_proxy.cpp:
731         (WebCore::KJSProxy::evaluate):
732         * khtml/ecma/kjs_range.cpp:
733         (KJS::DOMRangeProtoFunc::callAsFunction):
734         * khtml/ecma/kjs_views.cpp:
735         (KJS::DOMAbstractViewProtoFunc::callAsFunction):
736         * khtml/ecma/kjs_window.cpp:
737         (KJS::parseModalDialogFeatures):
738         (KJS::showModalDialog):
739         (KJS::Window::childFrameGetter):
740         (KJS::Window::namedFrameGetter):
741         (KJS::Window::namedItemGetter):
742         (KJS::Window::getOwnPropertySlot):
743         (KJS::Window::put):
744         (KJS::WindowFunc::callAsFunction):
745         (KJS::ScheduledAction::execute):
746         (KJS::Window::installTimeout):
747         (KJS::FrameArray::nameGetter):
748         (KJS::FrameArray::getOwnPropertySlot):
749         (KJS::Location::put):
750         (KJS::LocationFunc::callAsFunction):
751         (KJS::SelectionFunc::callAsFunction):
752         Removed explicit calls to domString(), sometimes replacing with explicit calls to the
753         String() constructor. Other similar changes for AtomicString and DeprecatedString use.
754
755 2006-03-20  Eric Seidel  <eseidel@apple.com>
756
757         Reviewed by darin.
758
759         Remove many, many uses of DeprecatedString.
760         Fix various style issues throughout the touched code.
761
762         * bindings/objc/DOM.mm:
763         (-[DOMRange _text]):
764         * bridge/mac/BrowserExtensionMac.mm:
765         (WebCore::BrowserExtensionMac::createNewWindow):
766         * bridge/mac/FrameMac.h:
767         (WebCore::FrameMac::bridge):
768         (WebCore::FrameMac::markedTextRange):
769         (WebCore::Mac):
770         * bridge/mac/FrameMac.mm:
771         (WebCore::FrameMac::openURLRequest):
772         (WebCore::FrameMac::searchForLabelsAboveCell):
773         (WebCore::FrameMac::searchForLabelsBeforeElement):
774         (WebCore::FrameMac::matchLabelsAgainstElement):
775         (WebCore::FrameMac::findString):
776         (WebCore::FrameMac::submitForm):
777         (WebCore::FrameMac::urlSelected):
778         (WebCore::FrameMac::objectContentType):
779         (WebCore::FrameMac::createPlugin):
780         (WebCore::FrameMac::createFrame):
781         (WebCore::FrameMac::setTitle):
782         (WebCore::FrameMac::setStatusBarText):
783         (WebCore::FrameMac::advanceToNextMisspelling):
784         (WebCore::FrameMac::userAgent):
785         (WebCore::FrameMac::mimeTypeForFileName):
786         (WebCore::FrameMac::openURLFromPageCache):
787         (WebCore::FrameMac::incomingReferrer):
788         (WebCore::FrameMac::attributedString):
789         (WebCore::FrameMac::overrideMediaType):
790         (WebCore::FrameMac::shouldClose):
791         * bridge/mac/WebCoreFrameBridge.mm:
792         (-[WebCoreFrameBridge _documentTypeString]):
793         (-[WebCoreFrameBridge selectedString]):
794         (-[WebCoreFrameBridge stringForRange:]):
795         (-[WebCoreFrameBridge advanceToNextMisspelling]):
796         (-[WebCoreFrameBridge advanceToNextMisspellingStartingJustBeforeSelection]):
797         (-[WebCoreFrameBridge domain]):
798         * bridge/mac/WebCoreSettings.mm:
799         (-[WebCoreSettings setStandardFontFamily:]):
800         (-[WebCoreSettings setFixedFontFamily:]):
801         (-[WebCoreSettings setSerifFontFamily:]):
802         (-[WebCoreSettings setSansSerifFontFamily:]):
803         (-[WebCoreSettings setCursiveFontFamily:]):
804         (-[WebCoreSettings setFantasyFontFamily:]):
805         (-[WebCoreSettings setUserStyleSheetLocation:]):
806         (-[WebCoreSettings setDefaultTextEncoding:]):
807         * css/css_valueimpl.cpp:
808         (WebCore::quoteStringIfNeeded):
809         * css/cssstyleselector.cpp:
810         (WebCore::CSSStyleSelector::CSSStyleSelector):
811         (WebCore::CSSStyleSelector::setEncodedURL):
812         (WebCore::cleanpath):
813         (WebCore::checkPseudoState):
814         (WebCore::CSSStyleSelector::styleForElement):
815         (WebCore::CSSStyleSelector::styleRulesForElement):
816         (WebCore::convertToLength):
817         (WebCore::colorForCSSValue):
818         (WebCore::CSSStyleSelector::applyProperty):
819         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
820         * css/cssstyleselector.h:
821         * dom/CDATASection.cpp:
822         (WebCore::CDATASection::toString):
823         * dom/Document.cpp:
824         (WebCore::Document::recalcStyle):
825         * dom/Document.h:
826         (WebCore::Document::baseTarget):
827         (WebCore::Document::setBaseTarget):
828         * dom/dom_elementimpl.cpp:
829         (WebCore::Element::openTagStartToString):
830         * dom/xml_tokenizer.cpp:
831         (WebCore::handleElementAttributes):
832         (WebCore::XMLTokenizer::startElementNs):
833         * editing/SelectionController.cpp:
834         (WebCore::SelectionController::type):
835         * editing/TextIterator.cpp:
836         (WebCore::TextIterator::advance):
837         (WebCore::TextIterator::handleTextBox):
838         (WebCore::TextIterator::handleNonTextNode):
839         (WebCore::TextIterator::exitNode):
840         (WebCore::SimplifiedBackwardsTextIterator::advance):
841         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
842         (WebCore::CharacterIterator::advance):
843         (WebCore::WordAwareIterator::advance):
844         (WebCore::WordAwareIterator::length):
845         (WebCore::WordAwareIterator::characters):
846         (WebCore::CircularSearchBuffer::CircularSearchBuffer):
847         (WebCore::CircularSearchBuffer::append):
848         (WebCore::TextIterator::rangeFromLocationAndLength):
849         (WebCore::findPlainText):
850         * editing/TextIterator.h:
851         * html/HTMLFormElement.cpp:
852         (WebCore::HTMLFormElement::formData):
853         * khtml/ecma/kjs_navigator.cpp:
854         (KJS::Navigator::getValueProperty):
855         * khtml/ecma/kjs_proxy.cpp:
856         (WebCore::KJSProxy::initScriptIfNeeded):
857         * khtml/ecma/kjs_window.cpp:
858         (KJS::Location::getValueProperty):
859         * ksvg2/misc/KCanvasRenderingStyle.cpp:
860         (WebCore::KSVGPainterFactory::fillPaintServer):
861         (WebCore::KSVGPainterFactory::strokePaintServer):
862         * ksvg2/svg/SVGAngle.cpp:
863         (SVGAngle::calculate):
864         (SVGAngle::setValueAsString):
865         (SVGAngle::valueAsString):
866         (SVGAngle::convertToSpecifiedUnits):
867         (SVGAngle::shortestArcBisector):
868         * ksvg2/svg/SVGAngle.h:
869         * ksvg2/svg/SVGAnimationElement.cpp:
870         (SVGAnimationElement::targetElement):
871         (SVGAnimationElement::parseMappedAttribute):
872         (SVGAnimationElement::parseClockValue):
873         (SVGAnimationElement::targetAttribute):
874         (SVGAnimationElement::setTargetAttribute):
875         (SVGAnimationElement::detectAnimationMode):
876         (SVGAnimationElement::calculateCurrentValueItem):
877         (SVGAnimationElement::calculateRelativeTimePercentage):
878         * ksvg2/svg/SVGColor.cpp:
879         (SVGColor::setRGBColor):
880         * ksvg2/svg/SVGDOMImplementation.cpp:
881         (svgFeatureSet):
882         (SVGDOMImplementation::self):
883         (SVGDOMImplementation::hasFeature):
884         (SVGDOMImplementation::createDocumentType):
885         (SVGDOMImplementation::createDocument):
886         * ksvg2/svg/SVGDOMImplementation.h:
887         * ksvg2/svg/SVGPaint.cpp:
888         (SVGPaint::cssText):
889         * ksvg2/svg/SVGPathSegClosePath.h:
890         (WebCore::SVGPathSegClosePath::toString):
891         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
892         (SVGPreserveAspectRatio::parsePreserveAspectRatio):
893         (SVGPreserveAspectRatio::getCTM):
894         * ksvg2/svg/SVGStopElement.cpp:
895         (SVGStopElement::parseMappedAttribute):
896         * ksvg2/svg/SVGStyleElement.cpp:
897         (SVGStyleElement::childrenChanged):
898         * ksvg2/svg/SVGURIReference.cpp:
899         (SVGURIReference::getTarget):
900         * kwq/ClipboardMac.mm:
901         (WebCore::ClipboardMac::setData):
902         (WebCore::ClipboardMac::types):
903         (WebCore::ClipboardMac::setEffectAllowed):
904         (WebCore::cocoaOpFromIEOp):
905         (WebCore::IEOpFromCocoaOp):
906         (WebCore::ClipboardMac::sourceOperation):
907         (WebCore::ClipboardMac::destinationOperation):
908         * kwq/KWQCString.cpp:
909         (DeprecatedCString::append):
910         * kwq/KWQKHTMLSettings.h:
911         (KHTMLSettings::stdFontName):
912         (KHTMLSettings::fixedFontName):
913         (KHTMLSettings::serifFontName):
914         (KHTMLSettings::sansSerifFontName):
915         (KHTMLSettings::cursiveFontName):
916         (KHTMLSettings::fantasyFontName):
917         (KHTMLSettings::minFontSize):
918         (KHTMLSettings::minLogicalFontSize):
919         (KHTMLSettings::mediumFontSize):
920         (KHTMLSettings::mediumFixedFontSize):
921         (KHTMLSettings::autoLoadImages):
922         (KHTMLSettings::isJavaScriptEnabled):
923         (KHTMLSettings::JavaScriptCanOpenWindowsAutomatically):
924         (KHTMLSettings::isJavaEnabled):
925         (KHTMLSettings::isPluginsEnabled):
926         (KHTMLSettings::encoding):
927         (KHTMLSettings::userStyleSheet):
928         (KHTMLSettings::shouldPrintBackgrounds):
929         (KHTMLSettings::textAreasAreResizable):
930         (KHTMLSettings::setStdFontName):
931         (KHTMLSettings::setFixedFontName):
932         (KHTMLSettings::setSerifFontName):
933         (KHTMLSettings::setSansSerifFontName):
934         (KHTMLSettings::setCursiveFontName):
935         (KHTMLSettings::setFantasyFontName):
936         (KHTMLSettings::setMinFontSize):
937         (KHTMLSettings::setMinLogicalFontSize):
938         (KHTMLSettings::setMediumFontSize):
939         (KHTMLSettings::setMediumFixedFontSize):
940         (KHTMLSettings::setAutoLoadImages):
941         (KHTMLSettings::setIsJavaScriptEnabled):
942         (KHTMLSettings::setIsJavaEnabled):
943         (KHTMLSettings::setArePluginsEnabled):
944         (KHTMLSettings::setJavaScriptCanOpenWindowsAutomatically):
945         (KHTMLSettings::setEncoding):
946         (KHTMLSettings::setUserStyleSheet):
947         (KHTMLSettings::setShouldPrintBackgrounds):
948         (KHTMLSettings::setTextAreasAreResizable):
949         * kwq/KWQLoader.mm:
950         (KWQServeSynchronousRequest):
951         * kwq/KWQTextStream.cpp:
952         (QTextStream::QTextStream):
953         (QTextStream::operator<<):
954         (QTextStream::precision):
955         * kwq/KWQTextStream.h:
956         * kwq/RenderTreeAsText.cpp:
957         (operator<<):
958         (quoteAndEscapeNonPrintables):
959         (writeTextRun):
960         (write):
961         (writeSelection):
962         * loader/Cache.cpp:
963         (WebCore::Cache::init):
964         (WebCore::Cache::requestImage):
965         (WebCore::Cache::requestStyleSheet):
966         (WebCore::Cache::preloadStyleSheet):
967         (WebCore::Cache::requestScript):
968         (WebCore::Cache::preloadScript):
969         (WebCore::Cache::requestXSLStyleSheet):
970         (WebCore::Cache::requestXBLDocument):
971         (WebCore::Cache::remove):
972         * loader/Cache.h:
973         * loader/CachedCSSStyleSheet.cpp:
974         (WebCore::CachedCSSStyleSheet::error):
975         * loader/CachedCSSStyleSheet.h:
976         * loader/CachedImage.cpp:
977         (WebCore::CachedImage::error):
978         * loader/CachedImage.h:
979         * loader/CachedObject.h:
980         * loader/CachedScript.cpp:
981         (WebCore::CachedScript::checkNotify):
982         (WebCore::CachedScript::error):
983         * loader/CachedScript.h:
984         * loader/CachedXBLDocument.cpp:
985         (WebCore::CachedXBLDocument::error):
986         * loader/CachedXBLDocument.h:
987         * loader/CachedXSLStyleSheet.cpp:
988         (WebCore::CachedXSLStyleSheet::error):
989         * loader/CachedXSLStyleSheet.h:
990         * loader/DocLoader.cpp:
991         (WebCore::DocLoader::DocLoader):
992         (WebCore::DocLoader::~DocLoader):
993         (WebCore::DocLoader::needReload):
994         (WebCore::DocLoader::requestImage):
995         (WebCore::DocLoader::requestStyleSheet):
996         (WebCore::DocLoader::requestScript):
997         (WebCore::DocLoader::requestXSLStyleSheet):
998         (WebCore::DocLoader::requestXBLDocument):
999         (WebCore::DocLoader::setAutoloadImages):
1000         (WebCore::DocLoader::setShowAnimations):
1001         (WebCore::DocLoader::removeCachedObject):
1002         * loader/loader.cpp:
1003         (WebCore::Loader::receivedAllData):
1004         (WebCore::Loader::receivedResponse):
1005         * page/Frame.cpp:
1006         (WebCore::UserStyleSheetLoader::setStyleSheet):
1007         (WebCore::Frame::didOpenURL):
1008         (WebCore::Frame::setMetaRefreshEnabled):
1009         (WebCore::Frame::setAutoloadImages):
1010         (WebCore::Frame::autoloadImages):
1011         (WebCore::Frame::clear):
1012         (WebCore::Frame::receivedFirstData):
1013         (WebCore::Frame::begin):
1014         (WebCore::Frame::write):
1015         (WebCore::Frame::baseTarget):
1016         (WebCore::Frame::completeURL):
1017         (WebCore::Frame::scheduleRedirection):
1018         (WebCore::Frame::scheduleLocationChange):
1019         (WebCore::Frame::scheduleHistoryNavigation):
1020         (WebCore::Frame::changeLocation):
1021         (WebCore::Frame::redirectionTimerFired):
1022         (WebCore::Frame::encoding):
1023         (WebCore::Frame::gotoAnchor):
1024         (WebCore::Frame::setStandardFont):
1025         (WebCore::Frame::setFixedFont):
1026         (WebCore::Frame::selectedText):
1027         (WebCore::Frame::selection):
1028         (WebCore::Frame::dragCaret):
1029         (WebCore::Frame::setSelection):
1030         (WebCore::Frame::setDragCaret):
1031         (WebCore::Frame::paintCaret):
1032         (WebCore::Frame::paintDragCaret):
1033         (WebCore::Frame::urlSelected):
1034         (WebCore::Frame::requestFrame):
1035         (WebCore::Frame::requestObject):
1036         (WebCore::Frame::shouldUsePlugin):
1037         (WebCore::Frame::loadPlugin):
1038         (WebCore::Frame::loadSubframe):
1039         (WebCore::Frame::submitForm):
1040         (WebCore::Frame::lastModified):
1041         (WebCore::Frame::reparseConfiguration):
1042         (WebCore::Frame::shouldChangeSelection):
1043         (WebCore::Frame::appliedEditing):
1044         (WebCore::Frame::unappliedEditing):
1045         (WebCore::Frame::reappliedEditing):
1046         (WebCore::Frame::executeScript):
1047         (WebCore::updateState):
1048         (WebCore::Frame::isCharacterSmartReplaceExempt):
1049         (WebCore::Frame::openURL):
1050         (WebCore::Frame::didNotOpenURL):
1051         (WebCore::Frame::setEncoding):
1052         (WebCore::Frame::saveInterpreterBuiltins):
1053         (WebCore::Frame::restoreInterpreterBuiltins):
1054         (WebCore::Frame::mutableInstances):
1055         (WebCore::Frame::setPolicyBaseURL):
1056         (WebCore::Frame::addMetaData):
1057         (WebCore::Frame::scrollToAnchor):
1058         (WebCore::Frame::setMediaType):
1059         (WebCore::Frame::highlightAllMatchesForString):
1060         (WebCore::Frame::tree):
1061         * page/Frame.h:
1062         (WebCore::Frame::instances):
1063         * page/FramePrivate.h:
1064         * page/FrameView.cpp:
1065         (WebCore::FrameViewPrivate::FrameViewPrivate):
1066         (WebCore::FrameView::FrameView):
1067         (WebCore::FrameView::~FrameView):
1068         (WebCore::FrameView::init):
1069         (WebCore::FrameView::setMarginWidth):
1070         (WebCore::FrameView::setMarginHeight):
1071         (WebCore::FrameView::adjustViewSize):
1072         (WebCore::FrameView::layout):
1073         (WebCore::FrameView::dispatchDragEvent):
1074         (WebCore::FrameView::scrollTo):
1075         (WebCore::FrameView::setMediaType):
1076         (WebCore::FrameView::mediaType):
1077         (WebCore::FrameView::setResizingFrameSet):
1078         (WebCore::FrameView::setIgnoreWheelEvents):
1079         * page/FrameView.h:
1080         (WebCore::FrameView::frameWidth):
1081         (WebCore::FrameView::marginWidth):
1082         (WebCore::FrameView::marginHeight):
1083         (WebCore::FrameView::ref):
1084         (WebCore::FrameView::deref):
1085         * page/ResourceRequest.h:
1086         (WebCore::ResourceRequest::contentType):
1087         (WebCore::ResourceRequest::setContentType):
1088         * platform/FontFamily.h:
1089         * platform/Image.h:
1090         * platform/KURL.cpp:
1091         (KURL::KURL):
1092         (KURL::parse):
1093         (urlcmp):
1094         (KURL::encode_string):
1095         (encodeHostname):
1096         * platform/KURL.h:
1097         * platform/PlatformString.h:
1098         (WebCore::String::left):
1099         (WebCore::String::right):
1100         * platform/String.cpp:
1101         (WebCore::String::toInt):
1102         * platform/StringImpl.cpp:
1103         (WebCore::StringImpl::toInt):
1104         * platform/TransferJob.cpp:
1105         (WebCore::TransferJob::queryMetaData):
1106         (WebCore::TransferJob::addMetaData):
1107         * platform/TransferJob.h:
1108         * platform/mac/ImageMac.mm:
1109         (WebCore::Image::supportsType):
1110         * platform/mac/TransferJobMac.mm:
1111         (WebCore::TransferJob::start):
1112         * rendering/RenderObject.cpp:
1113         (WebCore::RenderObject::information):
1114         * rendering/RenderTextField.cpp:
1115         (WebCore::RenderTextField::updateFromElement):
1116         * xml/xmlhttprequest.cpp:
1117         (WebCore::getMIMEType):
1118         (WebCore::getCharset):
1119         (WebCore::XMLHttpRequest::getReadyState):
1120         (WebCore::XMLHttpRequest::getResponseText):
1121         (WebCore::XMLHttpRequest::getResponseXML):
1122         (WebCore::XMLHttpRequest::XMLHttpRequest):
1123         (WebCore::XMLHttpRequest::~XMLHttpRequest):
1124         (WebCore::XMLHttpRequest::changeState):
1125         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
1126         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
1127         (WebCore::XMLHttpRequest::open):
1128         (WebCore::XMLHttpRequest::send):
1129         (WebCore::XMLHttpRequest::abort):
1130         (WebCore::XMLHttpRequest::overrideMIMEType):
1131         (WebCore::XMLHttpRequest::setRequestHeader):
1132         (WebCore::XMLHttpRequest::getRequestHeader):
1133         (WebCore::XMLHttpRequest::getAllResponseHeaders):
1134         (WebCore::XMLHttpRequest::getResponseHeader):
1135         (WebCore::XMLHttpRequest::responseIsXML):
1136         (WebCore::XMLHttpRequest::getStatus):
1137         (WebCore::XMLHttpRequest::getStatusText):
1138         (WebCore::XMLHttpRequest::processSyncLoadResults):
1139         (WebCore::XMLHttpRequest::receivedAllData):
1140         (WebCore::XMLHttpRequest::receivedRedirect):
1141         (WebCore::XMLHttpRequest::receivedData):
1142         (WebCore::XMLHttpRequest::cancelRequests):
1143         (WebCore::XMLHttpRequest::detachRequests):
1144         * xml/xmlhttprequest.h:
1145
1146 2006-03-20  Alexey Proskuryakov  <ap@nypop.com>
1147
1148         Reviewed by Darin.
1149
1150         - http://bugzilla.opendarwin.org/show_bug.cgi?id=3439
1151          mouseover effects can get stuck sometimes due to missing events
1152         - http://bugzilla.opendarwin.org/show_bug.cgi?id=7701
1153          mouseout sent to the wrong element when layout changes simultaneously
1154         
1155         Implemented saving the previous node under the mouse, so that we don't need to 
1156         recalculate it, which is slow and even not really possible. This has fixed a number 
1157         of issues with mouse event dispatching when the content changes.
1158         The code still needs refactoring and cleanup, see bug 3439 for comments.
1159
1160         Tests (both files perform multiple checks):
1161         - fast/events/mouseover-mouseout.html
1162         - fast/events/mouseover-mouseout2.html
1163
1164         * page/Frame.h: Added a Frame parameter to passSubframeEventToSubframe(),
1165         used for mouseMoved events.
1166         * bridge/mac/FrameMac.h: Ditto.
1167         * bridge/mac/FrameMac.mm: 
1168         (WebCore::FrameMac::passSubframeEventToSubframe): Use the passed subframe to target 
1169         NSMouseMoved events.
1170         * page/FrameView.h: Added a prepareMouseEvent() helper that does viewportToContents translation.
1171         * page/FrameView.cpp: Added data members for storing the previous node and subframe 
1172         under the mouse to FrameViewPrivate. Removed the now unused prevMouseX/prevMouseY.
1173         (WebCore::FrameViewPrivate::reset): Reset the new data members.
1174         (WebCore::subframeForEvent): A temporary place for the code that extracts a subframe
1175         pointer from MouseEventWithHitTestResults, moved from FrameMac::passSubframeEventToSubframe().
1176         (WebCore::FrameView::prepareMouseEvent): The new helper.
1177         (WebCore::FrameView::handleMousePressEvent): Use the new helper.
1178         (WebCore::FrameView::handleMouseDoubleClickEvent): Ditto.
1179         (WebCore::FrameView::handleMouseReleaseEvent): Ditto.
1180         (WebCore::FrameView::updateDragAndDrop): Ditto.
1181         (WebCore::FrameView::hoverTimerFired): Ditto.
1182         (WebCore::FrameView::dispatchMouseEvent): Store and use the oldUnder node, don't store 
1183         or use prevMouseX/Y.
1184         (WebCore::FrameView::handleMouseMoveEvent): Rewrote dispatching events to subframes using 
1185         a stored oldSubframe reference. Protect "this" from being removed while in this function.
1186
1187 2006-03-20  Darin Adler  <darin@apple.com>
1188
1189         Reviewed by Anders.
1190
1191         - http://bugzilla.opendarwin.org/show_bug.cgi?id=7875
1192           autogenerate bindings for Range
1193
1194         * dom/Range.idl: Added.
1195         * khtml/ecma/kjs_range.cpp: Removed.
1196         * khtml/ecma/kjs_range.h: Removed.
1197
1198         * WebCore.vcproj/WebCore/build-generated-files.sh: Removed code to generate
1199         kjs_range.lut.h.
1200
1201         * WebCore.xcodeproj/project.pbxproj: Added Range.idl source file.
1202         Removed kjs_range.h and kjs_range.cpp source files. Sorted the "dom" group.
1203         Removed rule to generate kjs_range.lut.h.
1204
1205         * bindings/js/JSDOMCore.cpp: Added include of JSRange.cpp.
1206
1207         * bindings/scripts/CodeGeneratorJS.pm: Added DocumentFragment, Range, CompareHow,
1208         and short to the types this script can handle. Added code to generate toRange
1209         functions and the like. Added separate code to handle exceptions for getters
1210         vs. setters for attributes. Changed return values for the "bad ID" case to 0
1211         -- there's no need to generate the extra code to return jsUndefined() in such
1212         cases, which should be unreachable. Changed exception handling to use setDOMException
1213         directly instead of DOMExceptionTranslator; DOMExceptionTranslator was a trick
1214         to make it easier to convert existing bindings and shouldn't be used going
1215         forward. Fixed names of constructors to use the JavaScript class name (the
1216         interface name), not the name of the C++ implementation class. Fixed generation
1217         of code for functions that have no parameters but do raise exceptions.
1218
1219         * bindings/scripts/IDLParser.pm: Added parsing for separate getter and setter
1220         exceptions in attributes. The syntax is not real IDL, but real IDL doesn't support
1221         declaring exceptions on attributes at all. We'll probably want to revisit our
1222         syntax for this some day.
1223
1224         * bindings/scripts/IDLStructure.pm: Removed unused exceptionName field from
1225         domAttribute, and replaced raisesExceptions field with getterExceptions and
1226         setterExceptions. Added regular expressions for parsing getter/setter syntax.
1227         We'll probably have to redo this whole thing parse in a better way at some
1228         point -- the regular expressions allow any invalid syntax in between them.
1229
1230         * dom/Attr.idl: Change exception declaration for setting the value attribute
1231         to use setter-specific exception syntax.
1232         * dom/CharacterData.idl: Change exception declaration for setting the data
1233         attribute to use setter-specific exception syntax.
1234         * dom/ProcessingInstruction.idl: Change exception declaration for setting the
1235         data attribute to use setter-specific exception syntax.
1236
1237         * khtml/ecma/kjs_dom.cpp: Include JSRange.h instead of kjs_range.h.
1238         * khtml/ecma/kjs_window.cpp: Include JSRange.h instead of kjs_range.h.
1239         (KJS::Window::getValueProperty): Use JSRange::getConstructor instead of
1240         getRangeConstructor.
1241
1242 2006-03-20  Eric Seidel  <eseidel@apple.com>
1243
1244         Reviewed by hyatt.
1245
1246         Fix win32 compile.
1247
1248         * Viewer/ImageView.cpp:
1249         * platform/GraphicsContext.cpp:
1250         (WebCore::WebCore::GraphicsContext::createGraphicsContextPrivate):
1251         (WebCore::WebCore::GraphicsContext::destroyGraphicsContextPrivate):
1252         * platform/cairo/GraphicsContextCairo.cpp:
1253         (WebCore::fillRectSourceOver):
1254         (WebCore::GraphicsContext::drawLine):
1255         (WebCore::GraphicsContext::drawFocusRing):
1256         * platform/win/FontWin.cpp:
1257         (WebCore::Font::drawHighlightForText):
1258         (WebCore::Font::drawLineForText):
1259
1260 2006-03-19  Darin Adler  <darin@apple.com>
1261
1262         Rubber stamped by Eric.
1263
1264         - moved khtml/html files all into html directory
1265
1266         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for new paths.
1267         * WebCore.vcproj/WebCore/build-generated-files.sh: Ditto.
1268         * WebCore.xcodeproj/project.pbxproj: Ditto.
1269
1270         * khtml/html: Removed.
1271
1272         * html/DocTypeStrings.gperf: Moved.
1273         * html/FormDataList.cpp: Ditto.
1274         * html/FormDataList.h: Ditto.
1275         * html/HTMLBaseFontElement.cpp: Ditto.
1276         * html/HTMLBaseFontElement.h: Ditto.
1277         * html/HTMLButtonElement.cpp: Ditto.
1278         * html/HTMLButtonElement.h: Ditto.
1279         * html/HTMLCanvasElement.cpp: Ditto.
1280         * html/HTMLCanvasElement.h: Ditto.
1281         * html/HTMLCollection.cpp: Ditto.
1282         * html/HTMLCollection.h: Ditto.
1283         * html/HTMLDocument.cpp: Ditto.
1284         * html/HTMLDocument.h: Ditto.
1285         * html/HTMLElement.cpp: Ditto.
1286         * html/HTMLElement.h: Ditto.
1287         * html/HTMLElementFactory.cpp: Ditto.
1288         * html/HTMLElementFactory.h: Ditto.
1289         * html/HTMLEntityNames.gperf: Ditto.
1290         * html/HTMLFieldSetElement.cpp: Ditto.
1291         * html/HTMLFieldSetElement.h: Ditto.
1292         * html/HTMLFormCollection.cpp: Ditto.
1293         * html/HTMLFormCollection.h: Ditto.
1294         * html/HTMLFormElement.cpp: Ditto.
1295         * html/HTMLFormElement.h: Ditto.
1296         * html/HTMLGenericFormElement.cpp: Ditto.
1297         * html/HTMLGenericFormElement.h: Ditto.
1298         * html/HTMLInputElement.cpp: Ditto.
1299         * html/HTMLInputElement.h: Ditto.
1300         * html/HTMLIsIndexElement.cpp: Ditto.
1301         * html/HTMLIsIndexElement.h: Ditto.
1302         * html/HTMLKeygenElement.cpp: Ditto.
1303         * html/HTMLKeygenElement.h: Ditto.
1304         * html/HTMLLabelElement.cpp: Ditto.
1305         * html/HTMLLabelElement.h: Ditto.
1306         * html/HTMLLegendElement.cpp: Ditto.
1307         * html/HTMLLegendElement.h: Ditto.
1308         * html/HTMLNameCollection.cpp: Ditto.
1309         * html/HTMLNameCollection.h: Ditto.
1310         * html/HTMLNames.cpp: Ditto.
1311         * html/HTMLNames.h: Ditto.
1312         * html/HTMLOptGroupElement.cpp: Ditto.
1313         * html/HTMLOptGroupElement.h: Ditto.
1314         * html/HTMLOptionElement.cpp: Ditto.
1315         * html/HTMLOptionElement.h: Ditto.
1316         * html/HTMLOptionsCollection.cpp: Ditto.
1317         * html/HTMLOptionsCollection.h: Ditto.
1318         * html/HTMLParser.cpp: Ditto.
1319         * html/HTMLParser.h: Ditto.
1320         * html/HTMLSelectElement.cpp: Ditto.
1321         * html/HTMLSelectElement.h: Ditto.
1322         * html/HTMLTextAreaElement.cpp: Ditto.
1323         * html/HTMLTextAreaElement.h: Ditto.
1324         * html/HTMLTextFieldInnerElement.cpp: Ditto.
1325         * html/HTMLTextFieldInnerElement.h: Ditto.
1326         * html/HTMLTokenizer.cpp: Ditto.
1327         * html/HTMLTokenizer.h: Ditto.
1328         * html/html_baseimpl.cpp: Ditto.
1329         * html/html_baseimpl.h: Ditto.
1330         * html/html_blockimpl.cpp: Ditto.
1331         * html/html_blockimpl.h: Ditto.
1332         * html/html_headimpl.cpp: Ditto.
1333         * html/html_headimpl.h: Ditto.
1334         * html/html_imageimpl.cpp: Ditto.
1335         * html/html_imageimpl.h: Ditto.
1336         * html/html_inlineimpl.cpp: Ditto.
1337         * html/html_inlineimpl.h: Ditto.
1338         * html/html_listimpl.cpp: Ditto.
1339         * html/html_listimpl.h: Ditto.
1340         * html/html_objectimpl.cpp: Ditto.
1341         * html/html_objectimpl.h: Ditto.
1342         * html/html_tableimpl.cpp: Ditto.
1343         * html/html_tableimpl.h: Ditto.
1344
1345         * bindings/objc/DOM.mm:
1346         * bridge/mac/WebCoreEncodings.mm:
1347         * bridge/mac/WebCoreFrameBridge.mm:
1348         * css/CSSGrammar.y:
1349         * css/cssstyleselector.cpp:
1350         * dom/Document.cpp:
1351         * dom/EventTargetNode.cpp:
1352         * dom/NameNodeList.cpp:
1353         * dom/Node.cpp:
1354         * dom/Position.cpp:
1355         * dom/dom_elementimpl.cpp:
1356         * dom/xml_tokenizer.cpp:
1357         * editing/ApplyStyleCommand.cpp:
1358         * editing/BreakBlockquoteCommand.cpp:
1359         * editing/CompositeEditCommand.cpp:
1360         * editing/DeleteSelectionCommand.cpp:
1361         * editing/InsertLineBreakCommand.cpp:
1362         * editing/InsertParagraphSeparatorCommand.cpp:
1363         * editing/JSEditor.cpp:
1364         * editing/ReplaceSelectionCommand.cpp:
1365         * editing/TextIterator.cpp:
1366         * editing/VisiblePosition.cpp:
1367         * editing/htmlediting.cpp:
1368         * editing/markup.cpp:
1369         * editing/visible_units.cpp:
1370         * html/CanvasRenderingContext2D.cpp:
1371         * kcanvas/KCanvasTreeDebug.cpp:
1372         * khtml/ecma/JSDOMParser.cpp:
1373         * khtml/ecma/kjs_css.cpp:
1374         * khtml/ecma/kjs_dom.cpp:
1375         * khtml/ecma/kjs_events.cpp:
1376         * khtml/misc/decoder.cpp:
1377         * khtml/xsl/XSLStyleSheet.cpp:
1378         * khtml/xsl/XSLTProcessor.cpp:
1379         * ksvg2/misc/SVGImageLoader.h:
1380         * ksvg2/svg/SVGElement.cpp:
1381         * ksvg2/svg/SVGSVGElement.cpp:
1382         * kwq/WebCoreAXObject.mm:
1383         * page/Frame.cpp:
1384         * page/FrameView.cpp:
1385         * rendering/RenderBlock.cpp:
1386         * rendering/RenderBox.cpp:
1387         * rendering/RenderFlow.cpp:
1388         * rendering/RenderHTMLCanvas.cpp:
1389         * rendering/RenderImage.cpp:
1390         * rendering/RenderLayer.cpp:
1391         * rendering/RenderObject.cpp:
1392         * rendering/RenderTable.cpp:
1393         * rendering/RenderTableCell.cpp:
1394         * rendering/RenderTableCol.cpp:
1395         * rendering/RenderTableRow.cpp:
1396         * rendering/RenderTableSection.cpp:
1397         * rendering/RenderTextField.cpp:
1398         * rendering/RenderTheme.cpp:
1399         * rendering/render_applet.cpp:
1400         * rendering/render_button.cpp:
1401         * rendering/render_frames.cpp:
1402         * rendering/render_list.cpp:
1403         Updated includes.
1404
1405 2006-03-17  Eric Seidel  <eseidel@apple.com>
1406
1407         Reviewed by darin.
1408
1409         Move Form code from MacFrame to Frame.
1410         Move GraphicsContext code from GraphicsContextMac to GraphicsContext.
1411         Use IntRect, FloatRect in more places throughout the code.
1412         http://bugzilla.opendarwin.org/show_bug.cgi?id=7824
1413
1414         * bridge/mac/MacFrame.h:
1415         * bridge/mac/MacFrame.mm:
1416         (WebCore::MacFrame::MacFrame):
1417         (WebCore::MacFrame::searchForLabelsAboveCell):
1418         (WebCore::MacFrame::searchForLabelsBeforeElement):
1419         (WebCore::dictionaryFromHashMap):
1420         (WebCore::MacFrame::submitForm):
1421         (WebCore::MacFrame::setView):
1422         (WebCore::MacFrame::currentEventIsMouseDownInWidget):
1423         (WebCore::MacFrame::currentEventIsKeyboardOptionTab):
1424         (WebCore::MacFrame::handleKeyboardOptionTabInView):
1425         (WebCore::MacFrame::tabsToAllControls):
1426         (WebCore::MacFrame::shouldDragAutoNode):
1427         (WebCore::MacFrame::selectionImage):
1428         (WebCore::MacFrame::snapshotDragImage):
1429         * bridge/mac/WebCoreFrameBridge.mm:
1430         (-[WebCoreFrameBridge nextKeyView]):
1431         (-[WebCoreFrameBridge previousKeyView]):
1432         (-[WebCoreFrameBridge nextKeyViewInsideWebFrameViews]):
1433         (-[WebCoreFrameBridge previousKeyViewInsideWebFrameViews]):
1434         * kcanvas/RenderSVGImage.cpp:
1435         (WebCore::RenderSVGImage::paint):
1436         * page/Frame.cpp:
1437         (WebCore::Frame::Frame):
1438         (WebCore::Frame::clearRecordedFormValues):
1439         (WebCore::Frame::recordFormValue):
1440         (WebCore::Frame::didNotOpenURL):
1441         (WebCore::scanForForm):
1442         (WebCore::Frame::paint):
1443         (WebCore::Frame::prepareForUserAction):
1444         * page/Frame.h:
1445         * platform/GraphicsContext.cpp:
1446         (WebCore::GraphicsContextState::GraphicsContextState):
1447         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
1448         (WebCore::GraphicsContextPrivate::~GraphicsContextPrivate):
1449         (WebCore::GraphicsContext::save):
1450         (WebCore::GraphicsContext::restore):
1451         (WebCore::GraphicsContext::font):
1452         (WebCore::GraphicsContext::setFont):
1453         (WebCore::GraphicsContext::pen):
1454         (WebCore::GraphicsContext::setPen):
1455         (WebCore::GraphicsContext::setBrush):
1456         (WebCore::GraphicsContext::brush):
1457         (WebCore::GraphicsContext::setUsesInactiveTextBackgroundColor):
1458         (WebCore::GraphicsContext::usesInactiveTextBackgroundColor):
1459         (WebCore::GraphicsContext::updatingControlTints):
1460         (WebCore::GraphicsContext::setUpdatingControlTints):
1461         (WebCore::GraphicsContext::setPaintingDisabled):
1462         (WebCore::GraphicsContext::paintingDisabled):
1463         (WebCore::GraphicsContext::printing):
1464         (WebCore::GraphicsContext::drawImageAtPoint):
1465         (WebCore::GraphicsContext::drawImageInRect):
1466         (WebCore::GraphicsContext::drawImage):
1467         (WebCore::GraphicsContext::initFocusRing):
1468         (WebCore::GraphicsContext::clearFocusRing):
1469         (WebCore::GraphicsContext::addFocusRingRect):
1470         (WebCore::GraphicsContext::focusRingWidth):
1471         (WebCore::GraphicsContext::focusRingOffset):
1472         (WebCore::GraphicsContext::focusRingRects):
1473         * platform/GraphicsContext.h:
1474         * platform/mac/GraphicsContextMac.mm:
1475         (WebCore::fillRectSourceOver):
1476         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1477         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1478         (WebCore::GraphicsContext::GraphicsContext):
1479         (WebCore::GraphicsContext::~GraphicsContext):
1480         (WebCore::GraphicsContext::savePlatformState):
1481         (WebCore::GraphicsContext::restorePlatformState):
1482         (WebCore::GraphicsContext::drawRect):
1483         (WebCore::GraphicsContext::setColorFromBrush):
1484         (WebCore::GraphicsContext::setColorFromPen):
1485         (WebCore::GraphicsContext::drawLine):
1486         (WebCore::GraphicsContext::drawEllipse):
1487         (WebCore::GraphicsContext::drawArc):
1488         (WebCore::GraphicsContext::drawConvexPolygon):
1489         (WebCore::GraphicsContext::drawFloatImage):
1490         (WebCore::GraphicsContext::drawTiledImage):
1491         (WebCore::GraphicsContext::drawScaledAndTiledImage):
1492         (WebCore::GraphicsContext::selectedTextBackgroundColor):
1493         (WebCore::GraphicsContext::fillRect):
1494         (WebCore::GraphicsContext::addClip):
1495         (WebCore::GraphicsContext::addRoundedRectClip):
1496         (WebCore::GraphicsContext::beginTransparencyLayer):
1497         (WebCore::GraphicsContext::endTransparencyLayer):
1498         (WebCore::GraphicsContext::setShadow):
1499         (WebCore::GraphicsContext::clearShadow):
1500         (WebCore::GraphicsContext::drawFocusRing):
1501         * rendering/render_box.cpp:
1502         (WebCore::RenderBox::paintBackgroundExtended):
1503         (WebCore::RenderBox::outlineBox):
1504         * rendering/render_frames.cpp:
1505         (WebCore::RenderFrameSet::userResize):
1506         * rendering/render_image.cpp:
1507         (WebCore::RenderImage::paint):
1508         * rendering/render_list.cpp:
1509         (WebCore::RenderListMarker::paint):
1510         * rendering/render_object.cpp:
1511         (WebCore::RenderObject::drawBorder):
1512         (WebCore::RenderObject::paintBorderImage):
1513
1514 2006-03-19  Darin Adler  <darin@apple.com>
1515
1516         Reviewed by Eric.
1517
1518         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7854
1519           CanvasGradient leaks
1520
1521         * html/CanvasGradient.cpp: (WebCore::CanvasGradient::platformShading):
1522         Don't make the CG shading object keep a reference to the DOM gradient object.
1523         I got confused because in the case of a CanvasPattern, the pattern does need
1524         to keep a reference to the DOM pattern object, but the object lifetime is
1525         handled differently here. The CG shading object is used right away, not set
1526         in a graphics context.
1527
1528 2006-03-19  Darin Adler  <darin@apple.com>
1529
1530         Reviewed by Eric.
1531
1532         - attempt to fix the buildbot by handling DOMImplementation another way
1533
1534         * WebCore.xcodeproj/project.pbxproj: Added DOMImplementationFront.h/cpp.
1535
1536         * bindings/objc/DOMImplementationFront.cpp: Added.
1537         * bindings/objc/DOMImplementationFront.h: Added.
1538
1539         * bindings/objc/DOMInternal.h: Use DOMImplementationFront, not DOMImplementation.
1540         * bindings/objc/DOM.mm:
1541         (-[DOMImplementation dealloc]): Ditto.
1542         (-[DOMImplementation finalize]): Ditto.
1543         (-[DOMImplementation _initWithDOMImplementation:]): Ditto.
1544         (+[DOMImplementation _DOMImplementationWith:]): Ditto.
1545         (-[DOMImplementation _DOMImplementation]): Ditto.
1546         (-[DOMDocument implementation]): Call implementationFront from the
1547         DOMImplementationFront header instead of using the real implementation
1548         function on the Document.
1549
1550 2006-03-19  Darin Adler  <darin@apple.com>
1551
1552         - global rename, done by script
1553
1554         * <lots of files>: Renamed XXXImpl to XXX, and a number of other renames.
1555         See WebKitTools/Scripts/do-webcore-rename version 13392 for details.
1556
1557 2006-03-19  Darin Adler  <darin@apple.com>
1558
1559         - roll out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6314
1560           Unclosed <style> element in <head> makes page completely blank
1561
1562         This fix was breaking major sites -- details in the bug report.
1563
1564         * khtml/html/htmltokenizer.cpp: (WebCore::HTMLTokenizer::parseTag):
1565         Removed the bug fix, added a FIXME about the <title> code that has
1566         the same problem.
1567
1568 2006-03-18  David Carson  <dacarson@gmail.com>
1569
1570         Test: fast/canvas/patternfill-repeat.html
1571
1572         Reviewed by Darin.
1573
1574         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7830
1575           <canvas> createPattern 'repeat' options fail
1576
1577         * CanvasPattern.cpp (CanvasPattern::createPattern)
1578         Change stepping so that repeat-x, repeat-y, and no-repeat repeat 
1579         outside the view area by using large values for repeat interval.
1580
1581 2006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1582
1583         Test: fast/dom/Element/class-attribute-whitespace.html
1584
1585         Reviewed by Darin.
1586
1587         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7761
1588           Tabs in class attribute not treated as whitespace
1589
1590         * dom/dom_elementimpl.cpp:
1591         (WebCore::isClassWhitespace): Helper function to check if a character
1592         in the class attribute should be treated as whitespace. Added \r and \t.
1593         (WebCore::NamedMappedAttrMapImpl::parseClassAttribute): Instead of creating
1594         a QStringList and iterating it, do everything in one pass over the string.
1595
1596 2006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1597
1598         Test: fast/block/float/vertical-move-relayout.html
1599
1600         Reviewed by Hyatt.
1601
1602         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6795
1603           Slow image load causes render problem
1604
1605         * rendering/RenderBlock.cpp:
1606         (WebCore::RenderBlock::layoutBlockChildren): Call markAllDescendantsWithFloatsForLayout
1607         when the child's vertical position changes.
1608
1609 2006-03-18  David Kilzer  <ddkilzer@kilzer.net>
1610
1611         Reviewed by Darin.
1612
1613         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6314
1614         Unclosed <style> element in <head> makes page completely blank
1615
1616         Test: fast/js/exception-linenums-in-html-3.html
1617         Test: fast/js/missing-style-end-tag-js.html
1618         Test: fast/tokenizer/missing-style-end-tag-1.html
1619         Test: fast/tokenizer/missing-style-end-tag-2.html
1620
1621         * khtml/html/htmlparser.cpp:
1622         (WebCore::HTMLParser::handleError): Add check for missing </style> tag and handle
1623         this condition if identified.
1624         * khtml/html/htmltokenizer.cpp:
1625         (WebCore::HTMLTokenizer::parseTag): If parseSpecial() consumes the rest of the
1626         document looking for a </style> tag, reset the state of the tokenizer and
1627         retokenize with no special handling for <style>.  The parser will handle the
1628         missing </style> tag in HTMLParser::handleError().
1629
1630 2006-03-18  Rob Buis  <buis@kde.org>
1631
1632         Reviewed by Darin.
1633
1634         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5351:
1635         SVG: Safari ignores <title> elements
1636
1637         Make SVGTitleElementImpl act the same as HTMLTitleElementImpl,
1638         in the process setting the title on the right triggers.
1639
1640         * ksvg2/svg/SVGTitleElementImpl.cpp:
1641         (SVGTitleElementImpl::SVGTitleElementImpl):
1642         (SVGTitleElementImpl::title):
1643         (SVGTitleElementImpl::closeRenderer):
1644         (SVGTitleElementImpl::insertedIntoDocument):
1645         (SVGTitleElementImpl::removedFromDocument):
1646         (SVGTitleElementImpl::childrenChanged):
1647         * ksvg2/svg/SVGTitleElementImpl.h:
1648
1649 2006-03-18  Darin Adler  <darin@apple.com>
1650
1651         - another try at fixing Windows build
1652
1653         * WebCore.vcproj/WebCore/WebCore.vcproj: Added EventTargetNodeImpl.h and .cpp.
1654
1655 2006-03-18  Darin Adler  <darin@apple.com>
1656
1657         - another try at fixing Windows build
1658
1659         * bridge/win/FrameWin.cpp: (WebCore::FrameWin::keyPress): Added EventTargetNodeCast.
1660
1661 2006-03-18  Darin Adler  <darin@apple.com>
1662
1663         - try to fix Windows build
1664
1665         * bridge/win/FrameWin.h: Remove KURL parameter.
1666         * bridge/win/FrameWin.cpp: (WebCore::FrameWin::urlSelected): Ditto.
1667         * platform/win/TemporaryLinkStubs.cpp: (BrowserExtensionWin::canRunModal): Ditto.
1668
1669 2006-03-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1670
1671         Reviewed by Darin.
1672
1673         - fix leaks caused by the fix for Bugzilla bug 3560
1674
1675         * rendering/RenderContainer.cpp:
1676         (WebCore::RenderContainer::destroyLeftoverChildren): Text renderers with
1677         first-letter pseudo style are children of an existing first-letter inline
1678         that has been updated, and should be destroyed.
1679
1680 2006-03-18  David Hyatt  <hyatt@apple.com>
1681
1682         Fix for bug 7841, tables, table rows, and table row groups should
1683         all support overflow:hidden.
1684
1685         Reviewed by eric
1686
1687         * css/cssstyleselector.cpp:
1688         (WebCore::CSSStyleSelector::adjustRenderStyle):
1689         * rendering/RenderTable.cpp:
1690         (WebCore::RenderTable::layout):
1691         (WebCore::RenderTable::paint):
1692         (WebCore::RenderTable::getOverflowClipRect):
1693         * rendering/RenderTable.h:
1694         * rendering/RenderTableCol.h:
1695         (WebCore::RenderTableCol::requiresLayer):
1696         * rendering/RenderTableRow.h:
1697         (WebCore::RenderTableRow::requiresLayer):
1698         * rendering/render_box.cpp:
1699         (WebCore::RenderBox::setStyle):
1700         * rendering/render_layer.cpp:
1701         (WebCore::RenderLayer::paintLayer):
1702
1703 2006-03-17  Alice Liu  <alice.liu@apple.com>
1704
1705         Reviewed by Hyatt.
1706
1707         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6999
1708           "Dynamically added link-tag disables the use of change styles 
1709            dynamically"
1710
1711         * khtml/html/html_headimpl.cpp:
1712         (WebCore::HTMLLinkElementImpl::process):
1713         - dynamically added link-tags for stylesheets were messing up the
1714           counting of pending stylesheets.  If a head link element 
1715           specifies a new stylesheet but the previously specified 
1716           stylesheet is still loading, tell the document that stylesheets 
1717           are loaded so that there are no remaining requests for it to be 
1718           loaded.
1719
1720 2006-03-17  Geoffrey Garen  <ggaren@apple.com>
1721
1722         Reviewed by Darin.
1723
1724         - Fixed some crashes in event dispatch and settled the question of 
1725         when getDocument() can return NULL, removing superfluous NULL checks.
1726
1727         I promise to check in a test case soon, but I need to land this before
1728         the global rename happens, and I left the test file on my other machine.
1729
1730         Here's what I did:
1731
1732         (1) Removed NULL checks for getDocument() in cases where we know it
1733         should not return NULL (which turned out to be all but one). Replaced 
1734         with ASSERT inside getDocument(). Tested to ensure there was no 
1735         regression @ albertsons.com.
1736
1737         (2) Added the EventTargetNode class, which represents Nodes that
1738         implement the DOM EventTarget interface. Discussed this design with
1739         Maciej and Hyatt. The previous dsign -- assuming that all Nodes were 
1740         EventTargets -- made it possible to crash WebKit by, for example, 
1741         dispatching a mouse event to a documentType node that was not 
1742         associated with a document.
1743
1744         (3) Reflected (2) into the JS bindings and touched JSDOMCore.cpp to 
1745         force a re-build.
1746
1747         (4) Using classInfo checking, strengthened type constraints on 
1748         JavaScript method dispatch so that you can't finagle JavaScript into, 
1749         for example, invoking a document-dependent method belonging to a
1750         node type that's guaranteed to have a document on a node type that may
1751         not have one. 
1752
1753         (5) Pushed some IE-specific JS bindings that depend on a node having a 
1754         document down from DOMNode to DOMElement. (An element always has a 
1755         document.) Tested that Firefox's behavior matched. Confirmed with MSDN.
1756
1757         (6) Updated Objc bindigns to throw an exception if you try to use
1758         the event interface on a node that doesn't support it. Discussed this
1759         design with Maciej and TimH.
1760
1761         (7) Consolidated repeated documentElement-finding code in the Position 
1762         class into the Position::documentElement() method. Did the same for
1763         repeated top-level document finding and DocumentImpl::topDocument().
1764         
1765         * WebCore+SVG/KDOMHeaders.h:
1766         * WebCore.xcodeproj/project.pbxproj:
1767         * bindings/js/JSDOMCore.cpp:
1768         * bindings/objc/DOM.mm:
1769         (-[DOMNode addEventListener:::]):
1770         (-[DOMNode removeEventListener:::]):
1771         (-[DOMNode dispatchEvent:]):
1772         (-[DOMNode KJS::Bindings::]):
1773         * bridge/mac/MacFrame.mm:
1774         (WebCore::MacFrame::keyEvent):
1775         (WebCore::MacFrame::dispatchCPPEvent):
1776         * bridge/mac/WebCoreFrameBridge.mm:
1777         (-[WebCoreFrameBridge setSelectedDOMRange:affinity:closeTyping:]):
1778         (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
1779         * css/css_base.cpp:
1780         (WebCore::StyleBaseImpl::baseURL):
1781         * css/css_computedstyle.cpp:
1782         (WebCore::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
1783         * css/css_valueimpl.cpp:
1784         (WebCore::CSSMutableStyleDeclarationImpl::removeProperty):
1785         (WebCore::CSSMutableStyleDeclarationImpl::setProperty):
1786         * css/cssstyleselector.cpp:
1787         (WebCore::CSSStyleSelector::applyProperty):
1788         * dom/Attr.idl:
1789         * dom/CharacterData.idl:
1790         * dom/CharacterDataImpl.cpp:
1791         (WebCore::CharacterDataImpl::CharacterDataImpl):
1792         (WebCore::CharacterDataImpl::rendererIsNeeded):
1793         (WebCore::CharacterDataImpl::dump):
1794         * dom/CharacterDataImpl.h:
1795         * dom/ContainerNodeImpl.cpp:
1796         (WebCore::ContainerNodeImpl::ContainerNodeImpl):
1797         (WebCore::ContainerNodeImpl::removeChild):
1798         (WebCore::ContainerNodeImpl::attach):
1799         (WebCore::ContainerNodeImpl::detach):
1800         (WebCore::ContainerNodeImpl::insertedIntoDocument):
1801         (WebCore::ContainerNodeImpl::removedFromDocument):
1802         (WebCore::ContainerNodeImpl::insertedIntoTree):
1803         (WebCore::ContainerNodeImpl::removedFromTree):
1804         (WebCore::ContainerNodeImpl::setFocus):
1805         (WebCore::ContainerNodeImpl::setActive):
1806         (WebCore::ContainerNodeImpl::setHovered):
1807         (WebCore::dispatchChildInsertionEvents):
1808         (WebCore::dispatchChildRemovalEvents):
1809         * dom/ContainerNodeImpl.h:
1810         * dom/DOMImplementationImpl.cpp:
1811         (WebCore::DOMImplementationImpl::createDocument):
1812         * dom/DocumentImpl.cpp:
1813         (WebCore::DocumentImpl::removeAllEventListenersFromAllNodes):
1814         (WebCore::DocumentImpl::removeAllDisconnectedNodeEventListeners):
1815         (WebCore::DocumentImpl::getAccObjectCache):
1816         (WebCore::DocumentImpl::setFocusNode):
1817         (WebCore::DocumentImpl::topDocument):
1818         * dom/Element.idl:
1819         * dom/EventTargetNodeImpl.cpp: Added.
1820         (WebCore::EventTargetNodeImpl::EventTargetNodeImpl):
1821         (WebCore::EventTargetNodeImpl::~EventTargetNodeImpl):
1822         (WebCore::EventTargetNodeImpl::insertedIntoDocument):
1823         (WebCore::EventTargetNodeImpl::removedFromDocument):
1824         (WebCore::EventTargetNodeImpl::addEventListener):
1825         (WebCore::EventTargetNodeImpl::removeEventListener):
1826         (WebCore::EventTargetNodeImpl::removeAllEventListeners):
1827         (WebCore::EventTargetNodeImpl::handleLocalEvents):
1828         (WebCore::EventTargetNodeImpl::dispatchGenericEvent):
1829         (WebCore::EventTargetNodeImpl::dispatchEvent):
1830         (WebCore::EventTargetNodeImpl::dispatchSubtreeModifiedEvent):
1831         (WebCore::EventTargetNodeImpl::dispatchWindowEvent):
1832         (WebCore::EventTargetNodeImpl::dispatchUIEvent):
1833         (WebCore::EventTargetNodeImpl::dispatchKeyEvent):
1834         (WebCore::EventTargetNodeImpl::dispatchMouseEvent):
1835         (WebCore::EventTargetNodeImpl::dispatchSimulatedMouseEvent):
1836         (WebCore::EventTargetNodeImpl::dispatchWheelEvent):
1837         (WebCore::EventTargetNodeImpl::dispatchHTMLEvent):
1838         (WebCore::EventTargetNodeImpl::removeHTMLEventListener):
1839         (WebCore::EventTargetNodeImpl::setHTMLEventListener):
1840         (WebCore::EventTargetNodeImpl::getHTMLEventListener):
1841         (WebCore::EventTargetNodeImpl::disabled):
1842         (WebCore::EventTargetNodeImpl::defaultEventHandler):
1843         (WebCore::EventTargetNodeImpl::dump):
1844         * dom/EventTargetNodeImpl.h: Added.
1845         (WebCore::EventTargetNodeImpl::isEventTargetNode):
1846         (WebCore::EventTargetNodeImpl::preDispatchEventHandler):
1847         (WebCore::EventTargetNodeImpl::postDispatchEventHandler):
1848         (WebCore::EventTarget):
1849         (WebCore::forbidEventDispatch):
1850         (WebCore::allowEventDispatch):
1851         (WebCore::eventDispatchForbidden):
1852         * dom/NodeImpl.cpp:
1853         (WebCore::NodeImpl::NodeImpl):
1854         (WebCore::NodeImpl::~NodeImpl):
1855         (WebCore::NodeImpl::dump):
1856         (WebCore::NodeImpl::detach):
1857         (WebCore::NodeImpl::insertedIntoDocument):
1858         (WebCore::NodeImpl::removedFromDocument):
1859         * dom/NodeImpl.h:
1860         (WebCore::NodeImpl::isEventTargetNode):
1861         (WebCore::NodeImpl::isLink):
1862         (WebCore::NodeImpl::getDocument):
1863         (WebCore::NodeImpl::inDocument):
1864         * dom/dom2_eventsimpl.cpp:
1865         (WebCore::MouseRelatedEventImpl::receivedTarget):
1866         * dom/dom2_rangeimpl.cpp:
1867         (WebCore::RangeImpl::commonAncestorContainer):
1868         * dom/dom_elementimpl.cpp:
1869         (WebCore::inHTMLDocument):
1870         (WebCore::ElementImpl::focus):
1871         (WebCore::ElementImpl::blur):
1872         (WebCore::StyledElementImpl::parseMappedAttribute):
1873         * dom/dom_position.cpp:
1874         (WebCore::Position::documentElement):
1875         * dom/dom_position.h:
1876         * editing/ReplaceSelectionCommand.cpp:
1877         (WebCore::computeAndStoreNodeDesiredStyle):
1878         * editing/SelectionController.cpp:
1879         (WebCore::SelectionController::needsCaretRepaint):
1880         * editing/visible_units.cpp:
1881         (WebCore::previousBoundary):
1882         (WebCore::nextBoundary):
1883         (WebCore::previousLinePosition):
1884         (WebCore::nextLinePosition):
1885         (WebCore::startOfDocument):
1886         (WebCore::endOfDocument):
1887         * khtml/ecma/kjs_dom.cpp:
1888         (KJS::DOMNode::mark):
1889         (KJS::DOMNode::getValueProperty):
1890         (KJS::DOMNode::putValueProperty):
1891         (KJS::DOMNodeProtoFunc::callAsFunction):
1892         (KJS::DOMEventTargetNode::DOMEventTargetNode):
1893         (KJS::DOMEventTargetNode::getOwnPropertySlot):
1894         (KJS::DOMEventTargetNode::getValueProperty):
1895         (KJS::DOMEventTargetNode::put):
1896         (KJS::DOMEventTargetNode::putValueProperty):
1897         (KJS::DOMEventTargetNode::setListener):
1898         (KJS::DOMEventTargetNode::getListener):
1899         (KJS::DOMEventTargetNode::pushEventHandlerScope):
1900         (KJS::DOMEventTargetNodeProtoFunc::callAsFunction):
1901         (KJS::):
1902         (KJS::DOMDocument::DOMDocument):
1903         (KJS::DOMDocument::getOwnPropertySlot):
1904         (KJS::DOMDocument::put):
1905         (KJS::DOMDocument::putValueProperty):
1906         (KJS::DOMDocumentProtoFunc::callAsFunction):
1907         (KJS::DOMElement::DOMElement):
1908         (KJS::DOMElement::getValueProperty):
1909         (KJS::DOMElement::put):
1910         (KJS::DOMElement::putValueProperty):
1911         (KJS::DOMElement::getOwnPropertySlot):
1912         (KJS::DOMElementProtoFunc::callAsFunction):
1913         (KJS::checkNodeSecurity):
1914         * khtml/ecma/kjs_dom.h:
1915         (KJS::DOMNode::):
1916         (KJS::DOMEventTargetNode::):
1917         (KJS::DOMElement::):
1918         * khtml/ecma/kjs_events.cpp:
1919         (KJS::JSLazyEventListener::parseCode):
1920         (KJS::getNodeEventListener):
1921         * khtml/ecma/kjs_html.cpp:
1922         (KJS::HTMLElement::bodyGetter):
1923         (KJS::HTMLElement::anchorGetter):
1924         (KJS::HTMLElement::getValueProperty):
1925         (KJS::HTMLElement::bodySetter):
1926         * khtml/ecma/kjs_views.cpp:
1927         (KJS::DOMAbstractViewProtoFunc::callAsFunction):
1928         * khtml/html/HTMLFormElementImpl.cpp:
1929         (WebCore::HTMLFormElementImpl::registerFormElement):
1930         (WebCore::HTMLFormElementImpl::removeFormElement):
1931         * khtml/html/HTMLGenericFormElementImpl.cpp:
1932         (WebCore::HTMLGenericFormElementImpl::insertedIntoTree):
1933         * khtml/html/HTMLInputElementImpl.cpp:
1934         (WebCore::HTMLInputElementImpl::~HTMLInputElementImpl):
1935         (WebCore::HTMLInputElementImpl::focus):
1936         * khtml/html/HTMLOptionElementImpl.cpp:
1937         (WebCore::HTMLOptionElementImpl::text):
1938         * khtml/html/HTMLSelectElementImpl.cpp:
1939         (WebCore::HTMLSelectElementImpl::~HTMLSelectElementImpl):
1940         * khtml/html/HTMLTextAreaElementImpl.cpp:
1941         (WebCore::HTMLTextAreaElementImpl::~HTMLTextAreaElementImpl):
1942         * khtml/html/html_baseimpl.cpp:
1943         (WebCore::HTMLBodyElementImpl::insertedIntoDocument):
1944         (WebCore::HTMLFrameElementImpl::isURLAllowed):
1945         (WebCore::HTMLFrameElementImpl::openURL):
1946         (WebCore::HTMLFrameElementImpl::frameWidth):
1947         (WebCore::HTMLFrameElementImpl::frameHeight):
1948         * khtml/html/html_imageimpl.cpp:
1949         (WebCore::HTMLImageLoader::~HTMLImageLoader):
1950         (WebCore::HTMLImageLoader::updateFromElement):
1951         (WebCore::HTMLImageLoader::notifyFinished):
1952         (WebCore::HTMLImageElementImpl::width):
1953         (WebCore::HTMLImageElementImpl::height):
1954         (WebCore::HTMLMapElementImpl::~HTMLMapElementImpl):
1955         * khtml/html/html_inlineimpl.cpp:
1956         (WebCore::HTMLAnchorElementImpl::defaultEventHandler):
1957         * khtml/html/htmltokenizer.cpp:
1958         (WebCore::HTMLTokenizer::notifyFinished):
1959         * ksvg2/svg/SVGAnimateColorElementImpl.cpp:
1960         (SVGAnimateColorElementImpl::handleTimerEvent):
1961         * ksvg2/svg/SVGAnimateElementImpl.cpp:
1962         (SVGAnimateElementImpl::handleTimerEvent):
1963         * ksvg2/svg/SVGAnimateTransformElementImpl.cpp:
1964         (SVGAnimateTransformElementImpl::handleTimerEvent):
1965         * ksvg2/svg/SVGAnimationElementImpl.cpp:
1966         (SVGAnimationElementImpl::closeRenderer):
1967         * ksvg2/svg/SVGDOMImplementationImpl.cpp:
1968         * ksvg2/svg/SVGDocumentImpl.cpp:
1969         (WebCore::SVGDocumentImpl::dispatchRecursiveEvent):
1970         * ksvg2/svg/SVGDocumentImpl.h:
1971         * ksvg2/svg/SVGImageElementImpl.cpp:
1972         * ksvg2/svg/SVGSetElementImpl.cpp:
1973         (SVGSetElementImpl::handleTimerEvent):
1974         * kwq/KWQAccObject.mm:
1975         (-[KWQAccObject mouseButtonListener]):
1976         (-[KWQAccObject accessibilityPerformAction:]):
1977         * kwq/KWQTextArea.mm:
1978         (-[KWQTextAreaTextView dispatchHTMLEvent:]):
1979         * page/Frame.cpp:
1980         (WebCore::dispatchKHTMLEditableContentChanged):
1981         * page/FrameView.cpp:
1982         (WebCore::FrameView::dispatchDragEvent):
1983         (WebCore::FrameView::dispatchMouseEvent):
1984         (WebCore::FrameView::viewportWheelEvent):
1985         * rendering/render_layer.cpp:
1986         (WebCore::RenderLayer::scrollToOffset):
1987         * rendering/render_object.cpp:
1988         (WebCore::RenderObject::shouldSelect):
1989         (WebCore::RenderObject::backslashAsCurrencySymbol):
1990         * rendering/render_replaced.cpp:
1991         (WebCore::RenderWidget::sendConsumedMouseUp):
1992
1993 2006-03-17  David Hyatt  <hyatt@apple.com>
1994
1995         Fix for 7837, make opacity work with table rows.  Make transparent backgrounds
1996         stack properly in cells (so that the layers behind can show through like they
1997         should).
1998
1999         Reviewed by beth
2000
2001         * rendering/RenderTableCell.cpp:
2002         (WebCore::RenderTableCell::requiresLayer):
2003         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2004         (WebCore::RenderTableCell::paintBoxDecorations):
2005         * rendering/RenderTableCell.h:
2006         * rendering/RenderTableRow.cpp:
2007         (WebCore::RenderTableRow::paint):
2008         * rendering/RenderTableRow.h:
2009         (WebCore::RenderTableRow::requiresLayer):
2010         * rendering/RenderTableSection.cpp:
2011         (WebCore::RenderTableSection::paint):
2012         * rendering/render_layer.cpp:
2013         (WebCore::RenderLayer::updateLayerPosition):
2014         (WebCore::RenderLayer::isTransparent):
2015         (WebCore::RenderLayer::transparentAncestor):
2016         (WebCore::RenderLayer::beginTransparencyLayers):
2017         (WebCore::RenderLayer::paintLayer):
2018         (WebCore::RenderLayer::absoluteBoundingBox):
2019         * rendering/render_object.cpp:
2020         (WebCore::RenderObject::requiresLayer):
2021         * rendering/render_object.h:
2022         (WebCore::RenderObject::isTransparent):
2023         (WebCore::RenderObject::opacity):
2024
2025 2006-03-17  Maciej Stachowiak  <mjs@apple.com>
2026
2027         Reviewed by Adele.
2028
2029         - clean up ResourceRequest to be closer to a proper request interface
2030
2031         * page/ResourceRequest.h: folded URL into ResourceRequest, other cleanup
2032         (WebCore::ResourceRequest::ResourceRequest): Add new explicit constructor
2033         that takes a KURL.
2034         (WebCore::ResourceRequest::url): getter for KURL
2035         (WebCore::ResourceRequest::setURL): corresponding setter
2036         (WebCore::ResourceRequest::referrer): new getter for referrer, instead
2037         of storing it in m_metaData (it was the only remaining real use of it)
2038         (WebCore::ResourceRequest::setReferrer): corresponding setter
2039         * bridge/BrowserExtension.h: 
2040         - removed unused openURLRequest and openURLNotify methods
2041         - folded KURL parameter into ResourceRequest
2042         * bridge/mac/BrowserExtensionMac.h: remove KURL args from methods that
2043         also take a ResourceRequest
2044         * bridge/mac/BrowserExtensionMac.mm:
2045         (WebCore::BrowserExtensionMac::createNewWindow): adjust for ResourceRequest
2046         changes.
2047         * bridge/mac/MacFrame.h: remove KURL args from methods that also take a
2048         ResourceRequest
2049         * bridge/mac/MacFrame.mm:
2050         (WebCore::MacFrame::openURLRequest): adjust for ResourceRequest changes
2051         (WebCore::MacFrame::submitForm): ditto
2052         (WebCore::MacFrame::urlSelected): ditto
2053         * bridge/mac/WebCoreFrameBridge.mm:
2054         (-[WebCoreFrameBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): 
2055         adjust for ResourceRequest changes
2056         * bridge/win/BrowserExtensionWin.h:
2057         * khtml/ecma/kjs_window.cpp:
2058         (KJS::createNewWindow): adjust for ResourceRequest changes
2059         (KJS::WindowFunc::callAsFunction): ditto
2060         * page/Frame.cpp:
2061         (WebCore::Frame::didOpenURL): adjust for ResourceRequest changes
2062         (WebCore::Frame::receivedFirstData): ditto
2063         (WebCore::Frame::begin): ditto
2064         (WebCore::Frame::completeURL): ditto
2065         (WebCore::Frame::changeLocation): ditto
2066         (WebCore::Frame::urlSelected): ditto
2067         (WebCore::Frame::requestFrame): ditto
2068         (WebCore::Frame::submitForm): ditto
2069         * page/Frame.h:
2070         * platform/win/TemporaryLinkStubs.cpp:
2071         (BrowserExtensionWin::createNewWindow): ditto
2072
2073 2006-03-17  Adele Peterson  <adele@apple.com>
2074
2075         Reviewed by Tim H.
2076
2077         Make default backgrounds for new text fields white
2078         instead of transparent.  This will move to html4.css
2079         when we flip the switch.
2080
2081         Test added:
2082         * fast/forms/input-appearance-default-bkcolor.html
2083
2084         * rendering/render_theme_mac.mm:
2085         (WebCore::RenderThemeMac::adjustTextFieldStyle):
2086
2087 2006-03-17  David Hyatt  <hyatt@apple.com>
2088
2089         Make table sections and table captions support opacity.
2090
2091         Reviewed by darin
2092
2093         Covered by some of the new Mozilla table tests.
2094
2095         * rendering/RenderTable.cpp:
2096         (WebCore::RenderTable::paint):
2097
2098 2006-03-17  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2099
2100         Reviewed by Maciej, landed by Beth.
2101
2102         fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3560
2103         page with use of first-letter crashes reproducibly in 
2104         RenderObject::renderArena()
2105
2106         * rendering/RenderBlock.cpp:
2107         (WebCore::RenderBlock::updateFirstLetter): Pass the first-leter 
2108         renderer to the remaining text fragment.
2109         * rendering/RenderContainer.cpp:
2110         (WebCore::RenderContainer::destroyLeftoverChildren): Do not destroy 
2111         first-letter renderers since they are destroyed by their remaining 
2112         text now.
2113         * rendering/RenderTextFragment.cpp:
2114         (khtml::RenderTextFragment::RenderTextFragment):
2115         (khtml::RenderTextFragment::destroy): Destroy the first-letter 
2116         renderer.
2117         * rendering/RenderTextFragment.h:
2118         (khtml::RenderTextFragment::firstLetter):
2119
2120 2006-03-17  Adele Peterson  <adele@apple.com>
2121
2122         Reviewed by Eric.
2123
2124         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7798 
2125         New text fields are much wider than they should be for a specified size
2126
2127         I changed the character we use to calculate the width from "w" back to "0", 
2128         which matches our old behavior.  The original change was intentional, to try
2129         to better match other browsers, but "w" is a little too wide.  For now, lets
2130         go back to the old behavior.
2131
2132         I also set the minWidth = maxWidth.  We were trying to match a WinIE quirk,
2133         but that caused some odd behavior with growth of the text field in table cells.
2134
2135         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::calcMinMaxWidth):
2136
2137 2006-03-17  Eric Seidel  <eseidel@apple.com>
2138
2139         Reviewed by adele.
2140
2141         Fix win32 build.
2142         Add PageWin class.
2143         Add previously forgotten KeyEventWin class.
2144         Pass MouseEvent() instead of 0 in a couple places to make compiler happy.
2145
2146         * WebCore.vcproj/WebCore/WebCore.vcproj:
2147         * bridge/win/BrowserExtensionWin.h:
2148         * bridge/win/FrameWin.cpp:
2149         (WebCore::FrameWin::urlSelected):
2150         (WebCore::FrameWin::keyPress):
2151         * bridge/win/FrameWin.h:
2152         * bridge/win/PageWin.cpp: Added.
2153         (WebCore::rootWindowForFrame):
2154         (WebCore::Page::windowRect):
2155         (WebCore::Page::setWindowRect):
2156         * page/FrameView.cpp:
2157         (WebCore::FrameView::updateDragAndDrop):
2158         (WebCore::FrameView::hoverTimerFired):
2159         * page/Page.h:
2160         (WebCore::Page::mainFrame):
2161         * platform/win/KeyEventWin.cpp: Added.
2162         (WebCore::KeyEvent::KeyEvent):
2163         * platform/win/TemporaryLinkStubs.cpp:
2164         (WebCore::findNextWordFromIndex):
2165         (FrameWin::passMouseDownEventToWidget):
2166         (FrameWin::scheduleClose):
2167         (BrowserExtensionWin::createNewWindow):
2168         (WebCore::findWordBoundary):
2169         (FrameWin::registerCommandForUndo):
2170         (FrameWin::markMisspellingsInAdjacentWords):
2171         (FrameWin::respondToChangedContents):
2172
2173 2006-03-17  David Hyatt  <hyatt@apple.com>
2174
2175         Fix pixel test regression in fast/table/overflowHidden.html.  There was
2176         a borderTopExtra error made in the new boundingBox code for layers that
2177         caused the bottom half of cells with opacity set to be clipped out.
2178
2179         Reviewed by andersca
2180
2181         * rendering/render_layer.cpp:
2182         (WebCore::RenderLayer::absoluteBoundingBox):
2183
2184 2006-03-17  David Hyatt  <hyatt@apple.com>
2185
2186         Give table rows and sections accurate dimensions.  Fix absolutePosition
2187         to work for table cells properly.  Add an absolutePositionForContent method
2188         to make sure callers that want to deal with the content of a cell handle
2189         the cell's extra space correctly.
2190
2191         Reviewed by darin
2192
2193         Existing layout tests cover this change.
2194
2195         * bridge/mac/WebCoreFrameBridge.mm:
2196         (-[WebCoreFrameBridge copyRenderNode:copier:]):
2197         * dom/ContainerNodeImpl.cpp:
2198         (WebCore::ContainerNodeImpl::getUpperLeftCorner):
2199         (WebCore::ContainerNodeImpl::getLowerRightCorner):
2200         * dom/NodeImpl.cpp:
2201         (WebCore::NodeImpl::getRect):
2202         * editing/SelectionController.cpp:
2203         (WebCore::SelectionController::layout):
2204         (WebCore::SelectionController::caretRect):
2205         * editing/visible_units.cpp:
2206         (WebCore::previousLinePosition):
2207         (WebCore::nextLinePosition):
2208         * khtml/html/HTMLInputElementImpl.cpp:
2209         (WebCore::HTMLInputElementImpl::defaultEventHandler):
2210         * kwq/KWQRenderTreeDebug.cpp:
2211         (operator<<):
2212         * rendering/RenderBlock.cpp:
2213         (WebCore::RenderBlock::selectionGapRects):
2214         (WebCore::RenderBlock::positionForCoordinates):
2215         * rendering/RenderContainer.cpp:
2216         (WebCore::RenderContainer::positionForCoordinates):
2217         (WebCore::RenderContainer::lineBoxRects):
2218         * rendering/RenderTableCell.cpp:
2219         (WebCore::RenderTableCell::computeAbsoluteRepaintRect):
2220         (WebCore::RenderTableCell::absolutePosition):
2221         * rendering/RenderTableRow.cpp:
2222         (WebCore::RenderTableRow::addChild):
2223         (WebCore::RenderTableRow::getAbsoluteRepaintRect):
2224         (WebCore::RenderTableRow::nodeAtPoint):
2225         * rendering/RenderTableRow.h:
2226         * rendering/RenderTableSection.cpp:
2227         (WebCore::RenderTableSection::ensureRows):
2228         (WebCore::RenderTableSection::addCell):
2229         (WebCore::RenderTableSection::layoutRows):
2230         (WebCore::RenderTableSection::recalcCells):
2231         (WebCore::RenderTableSection::nodeAtPoint):
2232         * rendering/RenderTableSection.h:
2233         * rendering/RenderText.cpp:
2234         (WebCore::RenderText::lineBoxRects):
2235         (WebCore::RenderText::positionForCoordinates):
2236         (WebCore::RenderText::caretRect):
2237         (WebCore::RenderText::posOfChar):
2238         (WebCore::RenderText::selectionRect):
2239         * rendering/render_box.cpp:
2240         (WebCore::RenderBox::absolutePosition):
2241         (WebCore::RenderBox::caretRect):
2242         * rendering/render_br.cpp:
2243         (WebCore::RenderBR::caretRect):
2244         * rendering/render_canvas.h:
2245         * rendering/render_flow.cpp:
2246         (WebCore::RenderFlow::caretRect):
2247         * rendering/render_frames.cpp:
2248         (WebCore::RenderPart::updateWidgetPosition):
2249         * rendering/render_layer.cpp:
2250         (WebCore::RenderLayer::updateLayerPosition):
2251         * rendering/render_object.cpp:
2252         (WebCore::RenderObject::absoluteRects):
2253         (WebCore::RenderObject::absoluteBoundingBoxRect):
2254         (WebCore::RenderObject::absolutePosition):
2255         * rendering/render_object.h:
2256         (WebCore::RenderObject::absolutePositionForContent):
2257         (WebCore::RenderObject::offsetHeight):
2258         * rendering/render_replaced.cpp:
2259         (WebCore::RenderWidget::updateWidgetPosition):
2260
2261 2006-03-17  Adele Peterson  <adele@apple.com>
2262
2263         Reviewed by Hyatt.
2264
2265         WebCore part of fix for:
2266         http://bugzilla.opendarwin.org/show_bug.cgi?id=7797 
2267         Can't set background color on new text fields
2268
2269         Bezeled NSTextFieldCells always draw a background, so instead we'll use a new 
2270         WebKitSystemInterface function to just draw the border of the cell.
2271
2272         Since the theme is drawing the border and the engine is drawing the background 
2273         (which is different from the other form controls), we have to make sure we let the 
2274         theme paint the border after the engine paints the background.
2275
2276         * platform/mac/WebCoreGraphicsBridge.h:
2277         * platform/mac/WebCoreGraphicsBridge.m:
2278         (-[WebCoreGraphicsBridge drawBezeledTextFieldCell:enabled:]):
2279         * rendering/render_box.cpp: (WebCore::RenderBox::paintBoxDecorations):
2280         * rendering/render_theme.cpp:
2281         (WebCore::RenderTheme::paint):
2282         (WebCore::RenderTheme::paintBorder):
2283         (WebCore::RenderTheme::shouldPaintBorder):
2284         * rendering/render_theme.h:
2285         * rendering/render_theme_mac.mm:
2286         (WebCore::RenderThemeMac::paintTextField):
2287         (WebCore::RenderThemeMac::setTextFieldCellState):
2288
2289 2006-03-16  Darin Adler  <darin@apple.com>
2290
2291         Reviewed by Eric.
2292
2293         - removed KWQWindowWidget
2294         - changed most event handling to use references instead of pointers
2295         - chagned PageMac to no longer be a subclass of Page
2296
2297         Yes, I know there's no detail in this ChangeLog entry.
2298         No, I don't plan to make a habit of doing things this way.
2299         Yes, this will probably break the Windows build again.
2300
2301         * WebCore.xcodeproj/project.pbxproj:
2302         * bridge/mac/BrowserExtensionMac.mm:
2303         (WebCore::BrowserExtensionMac::createNewWindow):
2304         * bridge/mac/FrameViewMac.mm:
2305         * bridge/mac/MacFrame.h:
2306         * bridge/mac/MacFrame.mm:
2307         (WebCore::MacFrame::MacFrame):
2308         (WebCore::MacFrame::~MacFrame):
2309         (WebCore::MacFrame::wheelEvent):
2310         (WebCore::MacFrame::keyEvent):
2311         (WebCore::MacFrame::khtmlMousePressEvent):
2312         (WebCore::MacFrame::khtmlMouseMoveEvent):
2313         (WebCore::MacFrame::khtmlMouseReleaseEvent):
2314         (WebCore::MacFrame::mouseDown):
2315         (WebCore::MacFrame::mouseDragged):
2316         (WebCore::MacFrame::mouseUp):
2317         (WebCore::MacFrame::mouseMoved):
2318         (WebCore::MacFrame::sendContextMenuEvent):
2319         (WebCore::MacFrame::setBridge):
2320         (WebCore::MacFrame::dragSourceMovedTo):
2321         (WebCore::MacFrame::dragSourceEndedAt):
2322         (WebCore::MacFrame::dispatchDragSrcEvent):
2323         * bridge/mac/PageMac.h: Removed.
2324         * bridge/mac/PageMac.mm: Added.
2325         (WebCore::Page::Page):
2326         (WebCore::Page::windowRect):
2327         (WebCore::Page::setWindowRect):
2328         * bridge/mac/WebCoreFrameBridge.h:
2329         * bridge/mac/WebCoreFrameBridge.mm:
2330         (-[WebCoreFrameBridge page]):
2331         (-[WebCoreFrameBridge initializeSettings:]):
2332         (globalPoint):
2333         (createMouseEventFromDraggingInfo):
2334         (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
2335         (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]):
2336         (-[WebCoreFrameBridge concludeDragForDraggingInfo:]):
2337         (-[WebCoreFrameBridge dragSourceMovedTo:]):
2338         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
2339         * bridge/mac/WebCoreFrameNamespaces.mm:
2340         (WebCore::):
2341         * bridge/mac/WebCorePageBridge.h:
2342         * bridge/mac/WebCorePageBridge.mm:
2343         (-[WebCorePageBridge init]):
2344         * dom/DocumentImpl.cpp:
2345         (WebCore::DocumentImpl::prepareMouseEvent):
2346         (WebCore::DocumentImpl::defaultEventHandler):
2347         * dom/DocumentImpl.h:
2348         * dom/NodeImpl.cpp:
2349         (WebCore::NodeImpl::dispatchMouseEvent):
2350         (WebCore::NodeImpl::dispatchKeyEvent):
2351         (WebCore::NodeImpl::dispatchWheelEvent):
2352         * dom/NodeImpl.h:
2353         * dom/dom2_eventsimpl.cpp:
2354         (WebCore::KeyboardEventImpl::KeyboardEventImpl):
2355         * dom/dom2_eventsimpl.h:
2356         (WebCore::KeyboardEventImpl::keyEvent):
2357         * khtml/ecma/kjs_window.cpp:
2358         (KJS::Window::getValueProperty):
2359         (KJS::WindowFunc::callAsFunction):
2360         * khtml/html/html_inlineimpl.cpp:
2361         (WebCore::HTMLAnchorElementImpl::defaultEventHandler):
2362         * ksvg2/svg/SVGDocumentImpl.cpp:
2363         * ksvg2/svg/SVGDocumentImpl.h:
2364         * kwq/KWQWindowWidget.h:
2365         * kwq/KWQWindowWidget.mm: Removed.
2366         * page/Frame.cpp:
2367         (WebCore::Frame::selectClosestWordFromMouseEvent):
2368         (WebCore::Frame::handleMousePressEventDoubleClick):
2369         (WebCore::Frame::handleMousePressEventTripleClick):
2370         (WebCore::Frame::handleMousePressEventSingleClick):
2371         (WebCore::Frame::khtmlMousePressEvent):
2372         (WebCore::Frame::handleMouseMoveEventSelection):
2373         (WebCore::Frame::khtmlMouseMoveEvent):
2374         (WebCore::Frame::khtmlMouseReleaseEvent):
2375         (WebCore::Frame::khtmlMouseDoubleClickEvent):
2376         (WebCore::Frame::passWidgetMouseDownEventToWidget):
2377         * page/Frame.h:
2378         * page/FrameView.cpp:
2379         (WebCore::FrameView::viewportMousePressEvent):
2380         (WebCore::FrameView::viewportMouseDoubleClickEvent):
2381         (WebCore::FrameView::viewportMouseMoveEvent):
2382         (WebCore::FrameView::viewportMouseReleaseEvent):
2383         (WebCore::FrameView::dispatchDragEvent):
2384         (WebCore::FrameView::updateDragAndDrop):
2385         (WebCore::FrameView::cancelDragAndDrop):
2386         (WebCore::FrameView::performDragAndDrop):
2387         (WebCore::FrameView::dispatchMouseEvent):
2388         (WebCore::FrameView::viewportWheelEvent):
2389         * page/FrameView.h:
2390         * page/MouseEventWithHitTestResults.h:
2391         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
2392         (WebCore::MouseEventWithHitTestResults::event):
2393         * page/Page.cpp:
2394         (WebCore::Page::init):
2395         * page/Page.h:
2396         (WebCore::Page::bridge):
2397         * platform/KeyEvent.h:
2398         (WebCore::KeyEvent::isAutoRepeat):
2399         * platform/MouseEvent.h:
2400         (WebCore::MouseEvent::MouseEvent):
2401         * platform/mac/KeyEventMac.mm:
2402         (WebCore::KeyEvent::KeyEvent):
2403         * platform/win/TemporaryLinkStubs.cpp:
2404         (FrameView::isFrameView):
2405         * rendering/render_form.cpp:
2406         (WebCore::RenderFormElement::clicked):
2407
2408 2006-03-16  Eric Seidel  <eseidel@apple.com>
2409
2410         Reviewed by darin.
2411
2412         Add additional hackish Font, focusring and caret code.
2413         http://bugzilla.opendarwin.org/show_bug.cgi?id=7803
2414
2415         * WebCore.vcproj/WebCore/WebCore.vcproj:
2416         * WebCore.vcproj/WebCore/build-generated-files.sh:
2417         * bindings/js/JSCanvasRenderingContext2DBase.cpp:
2418         * bridge/win/FrameWin.cpp:
2419         (WebCore::FrameWin::keyPress):
2420         * bridge/win/FrameWin.h:
2421         * html/CanvasRenderingContext2D.h:
2422         * platform/IntSize.h:
2423         * platform/KeyEvent.h:
2424         * platform/cairo/GraphicsContextCairo.cpp:
2425         (WebCore::GraphicsContext::drawArc):
2426         (WebCore::GraphicsContext::drawFocusRing):
2427         * platform/win/FontWin.cpp:
2428         (WebCore::hackishExtentForString):
2429         (WebCore::Font::floatWidth):
2430         (WebCore::convertRange):
2431         (WebCore::Font::drawText):
2432         (WebCore::Font::drawHighlightForText):
2433         (WebCore::Font::selectionRectForText):
2434         (WebCore::Font::checkSelectionPoint):
2435         (WebCore::Font::drawLineForText):
2436         (WebCore::Font::misspellingLineThickness):
2437         * platform/win/IntSizeWin.cpp: Added.
2438         (WebCore::IntSize::IntSize):
2439         (WebCore::IntSize::operator SIZE):
2440         * platform/win/ScrollViewWin.cpp:
2441         (WebCore::ScrollView::visibleContentRect):
2442         * platform/win/TemporaryLinkStubs.cpp:
2443         (Widget::disableFlushDrawing):
2444         (GraphicsContext::GraphicsContext):
2445         (QListBox::setSelected):
2446         (QListBox::sizeForNumberOfLines):
2447         (QListBox::isSelected):
2448         (QListBox::appendItem):
2449         (QListBox::doneAppendingItems):
2450         (FrameWin::locationbarVisible):
2451         (FrameWin::canUndo):
2452         (FrameWin::mimeTypeForFileName):
2453         (FrameWin::issueTransposeCommand):
2454         (RenderCanvasImage::setNeedsImageUpdate):
2455         (FrameWin::shouldChangeSelection):
2456         (FrameWin::respondToChangedSelection):
2457         (FrameWin::clearRecordedFormValues):
2458         (FrameWin::recordFormValue):
2459         (BrowserExtensionWin::getHistoryLength):
2460         (Widget::setIsSelected):
2461         (GraphicsContext::selectedTextBackgroundColor):
2462         (GraphicsContext::addRoundedRectClip):
2463         (QScrollBar::QScrollBar):
2464         (QScrollBar::~QScrollBar):
2465         (QScrollBar::setSteps):
2466         (QScrollBar::scroll):
2467         (QScrollBar::setValue):
2468         (QScrollBar::setKnobProportion):
2469         (QListBox::QListBox):
2470         (QListBox::~QListBox):
2471         (QListBox::setSelectionMode):
2472         (QListBox::setFont):
2473         * rendering/render_canvasimage.h:
2474
2475 2006-03-16  Maciej Stachowiak  <mjs@apple.com>
2476
2477         Reviewed by Eric.
2478
2479         - renamed URLArgs to ResourceRequest, split it into its own header
2480         - moved methods to get and set ResourceRequest to Frame
2481
2482         * WebCore.xcodeproj/project.pbxproj:
2483         * bridge/BrowserExtension.h:
2484         * bridge/mac/BrowserExtensionMac.h:
2485         * bridge/mac/BrowserExtensionMac.mm:
2486         (WebCore::BrowserExtensionMac::openURLRequest):
2487         (WebCore::BrowserExtensionMac::createNewWindow):
2488         * bridge/mac/MacFrame.h:
2489         * bridge/mac/MacFrame.mm:
2490         (WebCore::MacFrame::openURLRequest):
2491         (WebCore::MacFrame::submitForm):
2492         (WebCore::MacFrame::urlSelected):
2493         * bridge/mac/WebCoreFrameBridge.mm:
2494         (-[WebCoreFrameBridge openURL:reload:contentType:refresh:lastModified:pageCache:]):
2495         * khtml/ecma/kjs_window.cpp:
2496         (KJS::createNewWindow):
2497         (KJS::WindowFunc::callAsFunction):
2498         * page/Frame.cpp:
2499         (WebCore::Frame::didOpenURL):
2500         (WebCore::Frame::receivedFirstData):
2501         (WebCore::Frame::setResourceRequest):
2502         (WebCore::Frame::resourceRequest):
2503         (WebCore::Frame::begin):
2504         (WebCore::Frame::changeLocation):
2505         (WebCore::Frame::urlSelected):
2506         (WebCore::Frame::requestFrame):
2507         (WebCore::Frame::submitForm):
2508         * page/Frame.h:
2509         * page/FramePrivate.h:
2510         * page/ResourceRequest.h: Added.
2511         (WebCore::ResourceRequest::ResourceRequest):
2512         (WebCore::ResourceRequest::contentType):
2513         (WebCore::ResourceRequest::setContentType):
2514         (WebCore::ResourceRequest::doPost):
2515         (WebCore::ResourceRequest::setDoPost):
2516         (WebCore::ResourceRequest::lockHistory):
2517         (WebCore::ResourceRequest::setLockHistory):
2518         (WebCore::ResourceRequest::metaData):
2519
2520 2006-03-16  Darin Adler  <darin@apple.com>
2521
2522         - need to touch one more file to fix the build
2523           (Darn the lack of dependencies for autogenerated bindings!)
2524
2525         * dom/Element.idl: Touch. (Really this time.)
2526
2527 2006-03-16  Eric Seidel  <eseidel@apple.com>
2528
2529         Reviewed by darin.
2530
2531         Pushed focus ring handling down into GraphicsContext.cpp
2532
2533         * bridge/mac/MacFrame.mm:
2534         (WebCore::MacFrame::mouseDown):
2535         * platform/GraphicsContext.cpp:
2536         (WebCore::GraphicsContext::initFocusRing):
2537         (WebCore::GraphicsContext::clearFocusRing):
2538         (WebCore::GraphicsContext::addFocusRingRect):
2539         * platform/GraphicsContext.h:
2540         * platform/mac/GraphicsContextMac.mm:
2541         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
2542         (WebCore::GraphicsContextPrivate::~GraphicsContextPrivate):
2543         (WebCore::GraphicsContext::GraphicsContext):
2544         (WebCore::GraphicsContext::drawFocusRing):
2545         * rendering/render_flow.cpp:
2546         (WebCore::RenderFlow::addFocusRingRects):
2547         * rendering/render_object.cpp:
2548         (WebCore::RenderObject::addFocusRingRects):
2549
2550 2006-03-15  Darin Adler  <darin@apple.com>
2551
2552         Reviewed by Hyatt.
2553
2554         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7749
2555           canvas should be in DOM, not implemented in the JS bindings
2556
2557         * WebCore.xcodeproj/project.pbxproj: Added new files.
2558         Changed bindings-generation code to work on the new html directory
2559         as well as the dom one.
2560
2561         * bindings/js/JSCanvasRenderingContext2DBase.cpp: Added.
2562         * bindings/js/JSCanvasRenderingContext2DBase.h: Added.
2563         * bindings/js/JSDOMHTML.cpp: Added.
2564         * html: Added.
2565         * html/CanvasGradient.cpp: Added.
2566         * html/CanvasGradient.h: Added.
2567         * html/CanvasGradient.idl: Added.
2568         * html/CanvasPattern.cpp: Added.
2569         * html/CanvasPattern.h: Added.
2570         * html/CanvasPattern.idl: Added.
2571         * html/CanvasRenderingContext2D.cpp: Added.
2572         * html/CanvasRenderingContext2D.h: Added.
2573         * html/CanvasRenderingContext2D.idl: Added.
2574         * html/CanvasStyle.cpp: Added.
2575         * html/CanvasStyle.h: Added.
2576
2577         * bindings/js/JSDOMCore.cpp: Touched so that it will recompile.
2578         * bindings/js/JSDOMEvents.cpp: Ditto.
2579         * dom/Attr.idl: Ditto.
2580         * dom/DOMImplementation.idl: Ditto.
2581         * dom/DocumentType.idl: Ditto.
2582         * dom/MutationEvent.idl: Ditto.
2583         * dom/ProcessingInstruction.idl: Ditto.
2584         * dom/Text.idl: Ditto.
2585
2586         * khtml/ecma/kjs_binding.h: (KJS::toJS): Added. Template so that you can call
2587         toJS on a PassRefPtr as well as on a raw pointer.
2588
2589         * bindings/scripts/CodeGeneratorJS.pm: Fixed handling of a class that has only
2590         a legacy parent, no conventional parents. Added JSCanvasRenderingContext2DBase
2591         as a legacy parent, and html as a legacy module. Added CanvasRenderingContext2D,
2592         CanvasGradient, and CanvasPattern to the "waht to include". Added a special
2593         case for strings beginning with Canvas to not add an "Impl" suffix. Made the
2594         generated impl() function be a const member function. Made m_mimpl be private
2595         instead of protected. Generate a toJS function for each class. Added flaot as
2596         a type. Generate String, not DOMString. Made the HashTable const.
2597
2598         * bindings/scripts/IDLParser.pm: Fix a couple small things. I had started to
2599         try to make a missing semicolon trigger an error, but ended up giving up on
2600         that for now.
2601
2602         * khtml/html/html_canvasimpl.h:
2603         * khtml/html/html_canvasimpl.cpp:
2604         (WebCore::HTMLCanvasElementImpl::HTMLCanvasElementImpl): Set m_2DContext to 0.
2605         (WebCore::HTMLCanvasElementImpl::~HTMLCanvasElementImpl): Call detachCanvas
2606         on m_2DContext, if any.
2607         (WebCore::HTMLCanvasElementImpl::detach): Call reset on m_2DContext, if any.
2608         (WebCore::HTMLCanvasElementImpl::getContext): Added.
2609         (WebCore::HTMLCanvasElementImpl::size): Added.
2610         (WebCore::HTMLCanvasElementImpl::createPlatformImage): Added.
2611
2612         * platform/Image.h:
2613         * platform/Image.cpp: (WebCore::Image::compositeOperatorFromString):
2614         Changed to take a String instead of a const char*.
2615
2616         * khtml/html/html_imageimpl.h:
2617         * khtml/html/html_imageimpl.cpp: (WebCore::HTMLMapElementImpl::areas):
2618         Tweaked formatting. Changed to use PassRefPtr.
2619
2620         * bindings/objc/DOMInternal.mm: (-[WebScriptObject _initializeScriptDOMNodeImp]):
2621         * khtml/ecma/JSXMLHttpRequest.cpp: (KJS::JSXMLHttpRequest::getValueProperty):
2622         * khtml/ecma/XSLTProcessor.cpp: (KJS::XSLTProcessorProtoFunc::callAsFunction):
2623         * khtml/ecma/domparser.cpp: (KJS::DOMParserProtoFunc::callAsFunction):
2624         * khtml/ecma/kjs_css.cpp:
2625         (KJS::DOMCSSStyleDeclaration::getValueProperty):
2626         (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction):
2627         (KJS::toJS):
2628         (KJS::DOMStyleSheet::getValueProperty):
2629         (KJS::DOMStyleSheetList::indexGetter):
2630         (KJS::DOMStyleSheetList::nameGetter):
2631         (KJS::DOMStyleSheetListFunc::callAsFunction):
2632         (KJS::DOMCSSStyleSheet::getValueProperty):
2633         (KJS::DOMCSSRuleList::indexGetter):
2634         (KJS::DOMCSSRuleListFunc::callAsFunction):
2635         (KJS::DOMCSSRule::getValueProperty):
2636         (KJS::DOMCSSPrimitiveValueProtoFunc::callAsFunction):
2637         (KJS::DOMCSSValueList::indexGetter):
2638         (KJS::DOMCSSValueListFunc::callAsFunction):
2639         (KJS::DOMRect::getValueProperty):
2640         * khtml/ecma/kjs_css.h:
2641         * khtml/ecma/kjs_dom.cpp:
2642         (KJS::DOMNode::getValueProperty):
2643         (KJS::DOMNodeProtoFunc::callAsFunction):
2644         (KJS::DOMNodeList::indexGetter):
2645         (KJS::DOMNodeList::nameGetter):
2646         (KJS::DOMNodeList::callAsFunction):
2647         (KJS::DOMNodeListFunc::callAsFunction):
2648         (KJS::DOMDocument::getValueProperty):
2649         (KJS::DOMDocumentProtoFunc::callAsFunction):
2650         (KJS::DOMNamedNodeMap::indexGetter):
2651         (KJS::DOMNamedNodeMap::nameGetter):
2652         (KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
2653         (KJS::toJS):
2654         (KJS::DOMNamedNodesCollection::indexGetter):
2655         * khtml/ecma/kjs_dom.h:
2656         * khtml/ecma/kjs_events.cpp:
2657         (KJS::JSAbstractEventListener::handleEvent):
2658         (KJS::JSLazyEventListener::parseCode):
2659         (KJS::DOMEvent::getValueProperty):
2660         (KJS::toJS):
2661         (KJS::DOMUIEvent::getValueProperty):
2662         (KJS::DOMMouseEvent::getValueProperty):
2663         * khtml/ecma/kjs_events.h:
2664         * khtml/ecma/kjs_html.cpp:
2665         (KJS::HTMLDocFunction::callAsFunction):
2666         (KJS::HTMLDocument::namedItemGetter):
2667         (KJS::HTMLDocument::getValueProperty):
2668         (KJS::HTMLDocument::put):
2669         (KJS::HTMLDocument::putValueProperty):
2670         (KJS::HTMLElement::classInfo):
2671         (KJS::HTMLElement::formIndexGetter):
2672         (KJS::HTMLElement::selectIndexGetter):
2673         (KJS::HTMLElement::implementsCall):
2674         (KJS::HTMLElement::callAsFunction):
2675         (KJS::HTMLElement::linkGetter):
2676         (KJS::HTMLElement::isIndexGetter):
2677         (KJS::HTMLElement::styleGetter):
2678         (KJS::HTMLElement::selectGetter):
2679         (KJS::HTMLElement::optionGetter):
2680         (KJS::HTMLElement::inputGetter):
2681         (KJS::HTMLElement::textAreaGetter):
2682         (KJS::HTMLElement::buttonGetter):
2683         (KJS::HTMLElement::labelGetter):
2684         (KJS::HTMLElement::fieldSetGetter):
2685         (KJS::HTMLElement::legendGetter):
2686         (KJS::HTMLElement::objectGetter):
2687         (KJS::HTMLElement::tableGetter):
2688         (KJS::HTMLElement::frameGetter):
2689         (KJS::HTMLElement::iFrameGetter):
2690         (KJS::HTMLElement::getValueProperty):
2691         (KJS::HTMLElement::toString):
2692         (KJS::HTMLElement::pushEventHandlerScope):
2693         (KJS::toJS):
2694         (KJS::HTMLElementFunction::callAsFunction):
2695         (KJS::HTMLElement::put):
2696         (KJS::HTMLCollection::indexGetter):
2697         (KJS::HTMLCollection::callAsFunction):
2698         (KJS::HTMLCollection::getNamedItems):
2699         (KJS::HTMLCollectionProtoFunc::callAsFunction):
2700         (KJS::HTMLSelectCollection::put):
2701         (KJS::OptionConstructorImp::construct):
2702         (KJS::ImageConstructorImp::construct):
2703         * khtml/ecma/kjs_html.h:
2704         * khtml/ecma/kjs_proxy.cpp: (WebCore::KJSProxyImpl::evaluate):
2705         * khtml/ecma/kjs_range.cpp:
2706         (KJS::DOMRange::getValueProperty):
2707         (KJS::DOMRangeProtoFunc::callAsFunction):
2708         (KJS::toJS):
2709         * khtml/ecma/kjs_range.h:
2710         * khtml/ecma/kjs_traversal.cpp:
2711         (KJS::DOMNodeIterator::getValueProperty):
2712         (KJS::DOMNodeIteratorProtoFunc::callAsFunction):
2713         (KJS::toJS):
2714         (KJS::DOMTreeWalker::getValueProperty):
2715         (KJS::DOMTreeWalkerProtoFunc::callAsFunction):
2716         (KJS::JSNodeFilterCondition::acceptNode):
2717         * khtml/ecma/kjs_traversal.h:
2718         * khtml/ecma/kjs_views.cpp:
2719         (KJS::DOMAbstractView::getValueProperty):
2720         (KJS::DOMAbstractViewProtoFunc::callAsFunction):
2721         (KJS::toJS):
2722         * khtml/ecma/kjs_views.h:
2723         * khtml/ecma/kjs_window.cpp:
2724         (KJS::Window::getValueProperty):
2725         (KJS::Window::namedItemGetter):
2726         (KJS::Selection::getValueProperty):
2727         (KJS::SelectionFunc::callAsFunction):
2728         Rename uses and definitions of all the various converstions to JavaScript
2729         wrappers to the new common overloaded name: "toJS".
2730
2731 2006-03-15  Eric Seidel  <eseidel@apple.com>
2732
2733         Reviewed by darin.
2734
2735         Push more of MacFrame down into Frame.
2736         Add visibleContentRect method to ScrollView.
2737
2738         * bridge/mac/MacFrame.h:
2739         * bridge/mac/MacFrame.mm:
2740         (WebCore::MacFrame::imageFromRect):
2741         (WebCore::MacFrame::setDisplaysWithFocusAttributes):
2742         (WebCore::MacFrame::bodyBackgroundColor):
2743         * bridge/mac/WebCoreFrameBridge.mm:
2744         * page/Frame.cpp:
2745         (WebCore::Frame::visibleSelectionRect):
2746         (WebCore::Frame::setDisplaysWithFocusAttributes):
2747         * page/Frame.h:
2748         * platform/ScrollView.h:
2749         * platform/mac/ScrollViewMac.mm:
2750         (WebCore::ScrollView::visibleWidth):
2751         (WebCore::ScrollView::visibleHeight):
2752         (WebCore::ScrollView::visibleContentRect):
2753         (WebCore::ScrollView::contentsWidth):
2754         (WebCore::ScrollView::contentsHeight):
2755         (WebCore::ScrollView::contentsX):
2756         (WebCore::ScrollView::contentsY):
2757         (WebCore::ScrollView::scrollXOffset):
2758         (WebCore::ScrollView::scrollYOffset):
2759         (WebCore::ScrollView::inWindow):
2760
2761 2006-03-15  Eric Seidel  <eseidel@apple.com>
2762
2763         Reviewed by darin.
2764
2765         Remove unused code and clean-up style.
2766
2767         * bridge/mac/MacFrame.mm:
2768         (WebCore::MacFrame::advanceToNextMisspelling):
2769         (WebCore::MacFrame::wheelEvent):
2770         (WebCore::MacFrame::nextKeyViewInFrame):
2771         (WebCore::MacFrame::nextKeyViewInFrameHierarchy):
2772         (WebCore::MacFrame::nextKeyView):
2773         * page/Frame.cpp:
2774         * page/Frame.h:
2775         * page/FrameView.cpp:
2776         (WebCore::FrameView::dispatchMouseEvent):
2777
2778 2006-03-15  Eric Seidel  <eseidel@apple.com>
2779
2780         Reviewed by mjs.
2781
2782         http://bugzilla.opendarwin.org/show_bug.cgi?id=7790
2783         addEventListener does not work with "dblclick" event.
2784         Renamed khtmlDblclickEvent to dblclickEvent to fix.
2785
2786         Test: fast/events/dblclick-addEventListener.html
2787
2788         * WebCore.xcodeproj/project.pbxproj:
2789         * bridge/mac/MacFrame.mm:
2790         (WebCore::MacFrame::mouseUp):
2791         (WebCore::MacFrame::mouseMoved):
2792         (WebCore::MacFrame::shouldDragAutoNode):
2793         (WebCore::MacFrame::sendContextMenuEvent):
2794         * dom/EventNames.h:
2795         * dom/NodeImpl.cpp:
2796         (WebCore::NodeImpl::dispatchMouseEvent):
2797         * dom/NodeImpl.h:
2798         * khtml/ecma/kjs_binding.cpp:
2799         (KJS::ScriptInterpreter::wasRunByUserGesture):
2800         * khtml/ecma/kjs_dom.cpp:
2801         (KJS::DOMNode::getValueProperty):
2802         (KJS::DOMNode::putValueProperty):
2803         * khtml/ecma/kjs_window.cpp:
2804         (KJS::Window::getValueProperty):
2805         (KJS::Window::put):
2806         * khtml/html/HTMLElementImpl.cpp:
2807         (WebCore::HTMLElementImpl::parseMappedAttribute):
2808         * page/FrameView.cpp:
2809         (WebCore::FrameView::dispatchMouseEvent):
2810         * page/FrameView.h:
2811
2812 2006-03-16  Alexey Proskuryakov  <ap@nypop.com>
2813
2814         Reviewed by Maciej.
2815
2816         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4395
2817          REGRESSION: document.open doesn't clear the document
2818
2819         Test: fast/dom/Document/document-reopen.html
2820         Test: fast/dom/Document/doc-open-while-parsing.html
2821
2822         * dom/DocumentImpl.cpp:
2823         (WebCore::DocumentImpl::open): Only ignore open() while the frame is still loading the main resource.
2824         * page/Frame.cpp:
2825         (WebCore::Frame::isComplete): Added const specifier.
2826         (WebCore::Frame::isLoadingMainResource): New function.
2827         * page/Frame.h:
2828
2829 2006-03-15  Adele Peterson  <adele@apple.com>
2830
2831         Reviewed by Eric.
2832
2833         - Fixes win32 build.
2834
2835         * page/Frame.cpp: (WebCore::Frame::autoscrollTimerFired): Calls isMouseButtonDown instead of CG function.
2836         * platform/MouseEvent.h: Added isMouseButtonDown
2837         * platform/mac/MouseEventMac.mm: (WebCore::MouseEvent::isMouseButtonDown): Calls CG function to get state of mouse button.
2838         * platform/win/TemporaryLinkStubs.cpp: (MouseEvent::isMouseButtonDown): Added stub.
2839
2840 2006-03-15  Eric Seidel  <eseidel@apple.com>
2841
2842         Reviewed by geoff.
2843
2844         * platform/KeyEvent.h: Fix #define from QEvent_H to KeyEvent_H
2845
2846 2006-03-15  David Hyatt  <hyatt@apple.com>
2847
2848         Fix the box-sizing layout test by stopping integer overflowing from
2849         occurring in the flexbox code.
2850
2851         Reviewed by beth
2852
2853         * rendering/render_flexbox.cpp:
2854         (khtml::RenderFlexibleBox::allowedChildFlex):
2855
2856 2006-03-15  Beth Dakin  <bdakin@apple.com>
2857
2858         Reviewed by Eric
2859
2860         Fix for some leaks and intermittent broken pipes in the layout 
2861         tests after check-in for http://bugzilla.opendarwin.org/
2862         show_bug.cgi?id=4171.  
2863
2864         * platform/StringImpl.cpp:
2865         (WebCore::StringImpl::capitalize): Call deleteQCharVector() for 
2866         stringWithPrevious and make sure we don't walk off the end of 
2867         stringWithPrevious when copying to capitalizedString.
2868
2869 2006-03-15  Adele Peterson  <adele@apple.com>
2870
2871        Reviewed by Maciej.
2872
2873        Followup fix for previous checkin.
2874        http://bugzilla.opendarwin.org/show_bug.cgi?id=7114
2875        <rdar://problem/3695120> dragging to scroll doesn't work with overflow:auto/scroll/overlay areas 
2876
2877        Many of the bugs related to the Radar bug have to do with autoscrolling in the RSS View.  
2878        This fix walks the layer tree to find the first scrollable layer, so that autoscrolling will 
2879        also work with nested layers, like those in the RSS View.
2880
2881        * bridge/mac/MacFrame.mm: (WebCore::MacFrame::khtmlMouseMoveEvent):
2882
2883 2006-03-15  Adele Peterson  <adele@apple.com>
2884
2885         Reviewed by Maciej.
2886
2887         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7114
2888         Dragging to scroll doesn't work for overflow areas
2889
2890         No test case.  There doesn't appear to be a way to trigger the autoscroll with the EventSender.
2891
2892         * bridge/mac/MacFrame.mm:
2893         (WebCore::MacFrame::khtmlMouseMoveEvent):  If we have a layer that can scroll, let the layer handle its autoscroll.  
2894          Otherwise, call over the bridge to let AppKit scroll the view.
2895         (WebCore::MacFrame::khtmlMouseReleaseEvent): Stops the autoscroll timer.
2896         * page/Frame.cpp:
2897         (WebCore::Frame::khtmlMouseReleaseEvent): Stops the autoscroll timer.
2898         (WebCore::Frame::handleAutoscroll): Added. Saves the layer, and starts the timer.
2899         (WebCore::Frame::autoscrollTimerFired): Added. Calls autoscroll() on the layer.
2900         (WebCore::Frame::startAutoscrollTimer): Added.
2901         (WebCore::Frame::stopAutoscrollTimer): Added.
2902         * page/Frame.h: Added new autoscroll methods.
2903         * page/FramePrivate.h: (WebCore::FramePrivate::FramePrivate): Initialize m_autoscrollTimer and m_autoscrollLayer.
2904         * rendering/render_layer.cpp:
2905         (WebCore::RenderLayer::autoscroll): Calculates how much the layer should scroll, and actually scrolls.
2906         (WebCore::RenderLayer::shouldAutoscroll): If the layer has overflow then it should be able to scroll.  
2907          Except for overflow:hidden areas that aren't editable.  
2908          In the future, we may want to have a css property that indicates an overflow:hidden style that should also scroll.
2909         * rendering/render_layer.h: Added new autoscroll methods.
2910
2911 2006-03-14  Justin Garcia  <justin.garcia@apple.com>
2912
2913         Reviewed by mjs
2914         
2915         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7578>
2916         TinyMCE: Implement execCommand CreateLink
2917         
2918         Used ApplyStyleCommand so that creating a link from
2919         a selection doesn't change document structure.
2920
2921         * WebCore.xcodeproj/project.pbxproj:
2922         * editing/ApplyStyleCommand.cpp:
2923         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2924         (WebCore::ApplyStyleCommand::doApply):
2925         (WebCore::ApplyStyleCommand::removeInlineStyle):
2926         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
2927         * editing/ApplyStyleCommand.h:
2928         * editing/CompositeEditCommand.cpp:
2929         (WebCore::CompositeEditCommand::applyStyle):
2930         * editing/CreateLinkCommand.cpp: Added.
2931         (WebCore::CreateLinkCommand::CreateLinkCommand):
2932         (WebCore::CreateLinkCommand::doApply):
2933         * editing/CreateLinkCommand.h: Added.
2934         * editing/jsediting.cpp:
2935         * page/Frame.cpp:
2936         (WebCore::Frame::computeAndSetTypingStyle):
2937         (WebCore::Frame::applyStyle):
2938         (WebCore::Frame::applyParagraphStyle):
2939
2940 2006-03-14  Beth Dakin  <bdakin@apple.com>
2941
2942         Reviewed by Maciej
2943
2944         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=4171
2945         This patch changes the word-break algorithm used to apply text-
2946         transform:capitalize to use a UBreakIterator. This fixes some 
2947         existing edge cases we have in our text-transform:capitalize 
2948         support and generally makes our results more consistent.
2949
2950         * platform/StringImpl.cpp:
2951         (WebCore::getWordBreakIterator): Returns a UBreakIterator for a 
2952         given string of a given length.
2953         (WebCore::StringImpl::capitalize): Now uses the UBreakIterator to 
2954         step between words and requires the previous character as input.
2955         * platform/StringImpl.h: Change the declaration of capitalize() to 
2956         take the previous character as a parameter. 
2957         * rendering/RenderText.cpp:
2958         (WebCore::RenderText::setText): Find the previous character and 
2959         send it to StringImpl::capitalize()
2960
2961 2006-03-14  Justin Garcia  <justin.garcia@apple.com>
2962
2963         Reviewed by adele
2964         
2965         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7770>
2966         Should only dispatch the khtmlTextInsertedEvent for high level editing operations
2967
2968         Dispatching this event for low level editing operations 
2969         isn't necessary and causes a big performance regression. 
2970         Also renamed the event because it's dispatched for changes
2971         other than just text insertion.
2972
2973         * dom/EventNames.h: 
2974         * editing/EditCommand.cpp:
2975         (WebCore::EditCommand::apply):
2976         (WebCore::EditCommand::unapply):
2977         (WebCore::EditCommand::reapply):
2978         * khtml/html/HTMLTextFieldInnerElementImpl.cpp:
2979         (WebCore::HTMLTextFieldInnerElementImpl::defaultEventHandler):
2980         * page/Frame.cpp:
2981         (WebCore::dispatchKHTMLEditableContentChanged):
2982         (WebCore::Frame::appliedEditing):
2983         (WebCore::Frame::unappliedEditing):
2984         (WebCore::Frame::reappliedEditing):
2985
2986 2006-03-14  Darin Adler  <darin@apple.com>
2987
2988         Reviewed by Eric.
2989
2990         - fix <rdar://problem/4478121> -[WebCoreFrameBridge finalize] crashes under GC
2991
2992         * bridge/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge finalize]):
2993         Don't call setBridge(nil).
2994
2995 2006-03-14  Darin Adler  <darin@apple.com>
2996
2997         - oops, didn't mean to check this in
2998
2999         * dom/dom_elementimpl.cpp: (WebCore::StyledElementImpl::parseMappedAttribute):
3000         Reverted nil-document check that I didn't mean to remove.
3001
3002 2006-03-14  Beth Dakin  <bdakin@apple.com>
3003
3004         Reviewed by Hyatt
3005
3006         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6796
3007         This fix prevents infinite recursion when a block with overflow: 
3008         auto can't decide if it needs scrollbars or not. This fix puts a 
3009         guard in place in updateScrollInforAfterLayout that only allows you 
3010         to re-layout if you are not currently laying out.  
3011
3012         * rendering/render_layer.cpp:
3013         (WebCore::RenderLayer::RenderLayer): Initialize 
3014         m_inOverflowRelayout to false. Fixed spacing too.
3015         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Place guard 
3016         around layout calls in overflow:auto case.
3017         * rendering/render_layer.h: Add m_inOverflowRelayout.
3018
3019 2006-03-14  Darin Adler  <darin@apple.com>
3020
3021         Reviewed by Geoff and Eric.
3022
3023         - fix <http://bugzilla.opendarwin.org/show_bug.cgi?id=7765>, <rdar://problem/4474884>
3024           hasAttribute always returns false for uppercase attribute names like "STYLE"
3025         - re-add missing JavaScript binding for getAttributeNS
3026         - fixed handling of null namespace parameters in getAttributeNS and friends
3027
3028         Test: fast/dom/Element/attribute-uppercase.html
3029
3030         To match Gecko's behavior, the magic "lowercasing" of all attribute names
3031         is only done when calling DOM Level 1 functions that lack an NS suffix.
3032         The functions with an NS suffix are case sensitive, even in HTML documents.
3033
3034         * dom/NamedNodeMapImpl.h: Changed getNamedItem and removeNamedItem to be pure virtual
3035         functions instead of calling through to getNamedItemNS and removeNamedItemNS.
3036
3037         * dom/dom_elementimpl.h: Eliminated inline versions of non-NS functions that called
3038         the NS functions. They can't work that way any more since the lowercasing behavior
3039         is different.
3040         * dom/dom_elementimpl.cpp:
3041         (WebCore::ElementImpl::getAttribute): Added. Lowercases the name if the document
3042         is an HTML document, and then calls through to the qualified name version. Removed
3043         the null check since getDocument is guaranteed to never return 0 now that nodes
3044         hold a reference to their document.
3045         (WebCore::ElementImpl::getAttributeNS): Removed the lowercasing code.
3046         (WebCore::ElementImpl::setAttribute): More of the same.
3047         (WebCore::ElementImpl::setAttributeNS): Ditto.
3048         (WebCore::ElementImpl::removeAttribute): Ditto.
3049         (WebCore::ElementImpl::removeAttributeNS): Ditto.
3050         (WebCore::ElementImpl::getAttributeNode): Ditto.
3051         (WebCore::ElementImpl::getAttributeNodeNS): Ditto.
3052         (WebCore::ElementImpl::hasAttribute): Ditto.
3053         (WebCore::ElementImpl::hasAttributeNS): Ditto.
3054         (WebCore::NamedAttrMapImpl::getNamedItem): Ditto.
3055         (WebCore::NamedAttrMapImpl::getNamedItemNS): Ditto.
3056         (WebCore::NamedAttrMapImpl::removeNamedItem): Ditto.
3057         (WebCore::NamedAttrMapImpl::removeNamedItemNS): Ditto.
3058         (WebCore::StyledElementImpl::parseMappedAttribute): Removed another unneeded null
3059         check like the one mentioned above.
3060
3061         * dom/Element.idl: Set ConvertNullToNullString for all the namespaceURI
3062         parameters, since we don't want null to turn into "null". Added a semicolon
3063         to the end of the hasAttributeNS line -- was causing the next declaration to
3064         be eaten up (so getAttributeNS was completely broken).
3065
3066         * khtml/ecma/kjs_dom.cpp: (KJS::DOMNamedNodeMapProtoFunc::callAsFunction):
3067         Call valueToStringWithNullCheck to do the equivalent of ConvertNullToNullString
3068         for both getNamedItemNS and removeNamedItemNS.
3069
3070         * bindings/js/JSDOMCore.cpp: Touched so that the changes above will take effect.
3071
3072 2006-03-14  David Hyatt  <hyatt@apple.com>
3073
3074         Fix for bug 7259, opacity performs badly.
3075
3076         Reviewed by mjs
3077
3078         Adding some tests in fast/opacity.
3079
3080         * rendering/RenderTableRow.h:
3081         (WebCore::RenderTableRow::requiresLayer):
3082         * rendering/render_layer.cpp:
3083         (WebCore::transparencyClipBox):
3084         (WebCore::RenderLayer::beginTransparencyLayers):
3085         (WebCore::RenderLayer::paintLayer):
3086         (WebCore::RenderLayer::intersectsDamageRect):
3087         (WebCore::RenderLayer::absoluteBoundingBox):
3088         * rendering/render_layer.h:
3089         (WebCore::RenderLayer::root):
3090
3091 2006-03-14  Eric Seidel  <eseidel@apple.com>
3092
3093         Reviewed by mjs.
3094
3095         Fix Gif crasher.
3096
3097         * platform/image-decoders/gif/GIFImageReader.cpp:
3098         (GIFImageReader::do_lzw): Initialize array after new.
3099
3100 2006-03-14  Eric Seidel  <eseidel@apple.com>
3101
3102         Reviewed by mjs.
3103
3104         Make MouseEvents aware of current scroll position.
3105
3106         * platform/win/ScrollViewWin.cpp:
3107         (WebCore::ScrollView::viewportToContents):
3108         (WebCore::ScrollView::contentsToViewport):
3109
3110 2006-03-13  Eric Seidel  <eseidel@apple.com>
3111
3112         Reviewed by mjs.
3113
3114         Fix mouse events to be window-relative.
3115
3116         * platform/win/MouseEventWin.cpp:
3117         (WebCore::positionForEvent):
3118         (WebCore::globalPositionForEvent):
3119         (WebCore::MouseEvent::MouseEvent):
3120
3121 2006-03-13  Eric Seidel  <eseidel@apple.com>
3122
3123         Reviewed by mjs.
3124
3125         Close DeviceContext leaks in Font code.
3126         Also add moveCursor stub to make maps.google.com not crash.
3127
3128         * platform/win/FontWin.cpp:
3129         (WebCore::getFontData):
3130         (WebCore::Font::floatWidth):
3131         (WebCore::Font::drawText):
3132         * platform/win/TemporaryLinkStubs.cpp:
3133         (Cursor::Cursor):
3134         (WebCore::moveCursor):
3135
3136 2006-03-13  Eric Seidel  <eseidel@apple.com>
3137
3138         Reviewed by ggaren & TimH.
3139
3140         <rdar://problem/4473288> XSL file containing <xsl:include href="../Styles/EscapeString.xsl" /> fails to load file
3141         XML_DTD_NODE objects in the tree were causing loadChildSheets to 
3142         fail to preload child stylesheets, this patch causes us to 
3143         correctly ignore all nodes besides the first XML_ELEMENT_NODE at 
3144         the root level when searching the tree for xsl:include statements 
3145         to pre-load.
3146
3147         Test: fast/xsl/xslt-second-level-import.xml
3148
3149         * khtml/xsl/xsl_stylesheetimpl.cpp:
3150         (WebCore::XSLStyleSheetImpl::loadChildSheets):
3151
3152 2006-03-10  Rob Buis  <buis@kde.org>
3153
3154         Reviewed by darin.  Landed by eseidel.
3155
3156         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7666:
3157         dasharray on rounded rectangles is broken
3158
3159         Make sure the rounded rectangle is drawn clockwise, as outlined
3160         in the specification.
3161
3162         Test: svg/custom/dashArrayOrigin.svg
3163
3164         * kcanvas/KCanvasCreator.cpp:
3165         (WebCore::KCanvasCreator::createRoundedRectangle):
3166
3167 2006-03-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3168
3169         Reviewed by Maciej, landed by ap.
3170
3171         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5923
3172           REGRESSION: scrolling on Google maps continues after the mouse is 
3173           released outside the window
3174
3175         Test: fast/events/drag-outside-window.html
3176
3177         * rendering/render_layer.cpp:
3178         (WebCore::RenderLayer::containsPoint): Always return true for the root
3179         object to ensure that mouse events occurring outside the window target
3180         the document.
3181
3182 2006-03-12  Alexey Proskuryakov  <ap@nypop.com>
3183
3184         Reviewed by Maciej.
3185
3186         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7735
3187         REGRESSION: crash on importing bookmarks
3188
3189         No test - only reproducible when Safari imports the bookmarks.
3190
3191         * dom/EventNames.cpp:
3192         (WebCore::EventNames::init): Initialize AtomicString before using it.
3193         * dom/QualifiedName.cpp:
3194         (WebCore::QualifiedName::init): Ditto.
3195         * khtml/html/htmlnames.cpp:
3196         (WebCore::HTMLNames::init): Ditto.
3197         * ksvg2/scripts/make_names.pl: Ditto.
3198
3199 2006-03-12  David Kilzer  <ddkilzer@kilzer.net>
3200
3201         Reviewed by Darin, landed by ap.
3202
3203         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7724
3204         Minor refactoring to HTMLParser::handleError() to remove duplicate code
3205
3206         Test: fast/invalid/missing-address-end-tag.html
3207         Test: fast/invalid/missing-dl-end-tag.html
3208         Test: fast/invalid/missing-dt-end-tag.html
3209         Test: fast/invalid/missing-font-end-tag.html
3210
3211         * khtml/html/htmlparser.cpp:
3212         (WebCore::HTMLParser::handleError): Refactored code.
3213
3214 2006-03-10  Darin Adler  <darin@apple.com>
3215
3216         - fix Windows build
3217
3218         * bridge/win/FrameWin.h: Removed declaration of generateFrameName.
3219
3220 2006-03-10  Darin Adler  <darin@apple.com>
3221
3222         Reviewed by Adele.
3223
3224         - removed some unused stuff from Frame and MacFrame
3225
3226         * page/Frame.h: Removed autoloadImages (the setter), enableMetaRefresh,
3227         setCharset, backgroundURL, findTextBegin, findTextNext, preloadStyleSheet,
3228         preloadScript, restored, onURL, selectionChanged, htmlError, openFile,
3229         updateActions, openURLInFrame, overURL, checkLinkSecurity, and cacheId.
3230         * page/FramePrivate.h: Removed m_restored, m_frameNameId, m_strSelectedURL,
3231         m_strSelectedURLTarget, m_bDnd, m_bClearing, m_bSecurityInQuestion,
3232         m_focusNodeRestored, m_focusNodeNumber, and m_newJSInterpreterExists.
3233         * page/Frame.cpp:
3234         (WebCore::Frame::didOpenURL): Removed use of m_restored, code to set
3235         m_bClearing.
3236         (WebCore::Frame::clear): Removed code to set m_bClearing and m_frameNameId.
3237         (WebCore::Frame::khtmlMousePressEvent): Removed code to set m_strSelectedURL
3238         and m_strSelectedURLTarget.
3239
3240         * bridge/mac/MacFrame.h: Removed scheduleHistoryNavigation and
3241         requestedURLString.
3242         * bridge/mac/MacFrame.mm:
3243         (WebCore::MacFrame::openURLFromPageCache): Removed use of m_restored.
3244         Removed unused requestedURLString.
3245
3246         * bridge/mac/WebCoreFrameBridge.h: Removed requestedURLString.
3247
3248 2006-03-10  Darin Adler  <darin@apple.com>
3249
3250         - fix Windows build
3251
3252         * page/FrameTree.cpp: Add include of <stdarg.h>.
3253
3254 2006-03-10  Darin Adler  <darin@apple.com>
3255
3256         Reviewed by Geoff.
3257
3258         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3308
3259           Pop-up blocking blocks window.open for already open windows
3260
3261         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7422
3262           Setting a frame name to the same value resets it to a generated one
3263
3264         - refactor frame-name-related functions into the FrameTree object
3265
3266         * WebCore.xcodeproj/project.pbxproj: Update for rename.
3267         * bridge/mac/MacFrame.h: Remove generateFrameName.
3268         * bridge/mac/MacFrame.mm: Ditto.
3269         * bridge/mac/PageMac.h: Added a declaration for WebCorePageBridge.
3270
3271         * bridge/mac/WebCoreFrameBridge.h: Remove _frameNamespace, generateFrameName,
3272         setFrameNamespace, frameNamespace.
3273         * bridge/mac/WebCoreFrameBridge.mm:
3274         (-[WebCoreFrameBridge childFrameNamed:]): Change to call the new child
3275         function on the FrameTree.
3276         (-[WebCoreFrameBridge findFrameNamed:]): Change to call the new find
3277         function on the FrameTree.
3278         (-[WebCoreFrameBridge RenderObject::nodeInfoAtPoint:]): Change since the
3279         contentPart function has been renamed to contentFrame.
3280
3281         * bridge/mac/WebCoreFrameNamespaces.h: Removed everything except for the
3282         one method still used on the WebKit side, framesInNamespace:.
3283         * bridge/mac/WebCoreFrameNamespaces.m: Renamed.
3284         * bridge/mac/WebCoreFrameNamespaces.mm: Added. Reimplemented the
3285         framesInNamespace method to use the namespace in WebCore::Page.
3286
3287         * bridge/mac/WebCorePageBridge.h: Added setGroupName and groupName.
3288         * bridge/mac/WebCorePageBridge.mm:
3289         (-[WebCorePageBridge setGroupName:]): Added. Calls through to Page.
3290         (-[WebCorePageBridge groupName]): Ditto.
3291
3292         * khtml/ecma/kjs_html.cpp:
3293         (KJS::HTMLDocument::namedItemGetter): Changed to call contentFrame by its new name.
3294         (KJS::HTMLElement::frameGetter): Ditto.
3295         (KJS::HTMLElement::iFrameGetter): Ditto.
3296
3297         * khtml/ecma/kjs_window.cpp:
3298         (KJS::Window::getValueProperty): Changed to call FrameTree::childCount
3299         instead of Frame::frames.
3300         (KJS::Window::childFrameGetter): Changed to call FrameTree::child
3301         instead of Frame::childFrameNamed.
3302         (KJS::Window::namedFrameGetter): Changed to call FrameTree::find
3303         instead of Frame::findFrame.
3304         (KJS::Window::indexGetter): Changed to call FrameTree::child
3305         instead of Frame::frames.
3306         (KJS::Window::getOwnPropertySlot): Changed to call FrameTree::child,
3307         FrameTree::find, and FrameTree::childCount instead of Frame::childFrameNamed,
3308         and Frame::findFrame, and Frame::frames.
3309         (KJS::WindowFunc::callAsFunction): Call FrameTree::find to check if the window
3310         is already open when considering whether to block a pop-up.
3311         (KJS::FrameArray::getValueProperty): Changed to call FrameTree::childCount
3312         instead of Frame::frames.
3313         (KJS::FrameArray::indexGetter): Changed to call FrameTree::child
3314         instead of Frame::frames.
3315         (KJS::FrameArray::nameGetter): Changed to call FrameTree::child
3316         instead of Frame::findFrame.
3317         (KJS::FrameArray::getOwnPropertySlot): Changed to call FrameTree::child,
3318         and FrameTree::childCount instead of Frame::findFrame and Frame::frames.
3319
3320         * khtml/html/html_baseimpl.h:
3321         * khtml/html/html_baseimpl.cpp:
3322         (WebCore::HTMLFrameElementImpl::isURLAllowed): Changed to call Page::frameCount
3323         instead of Frame::topLevelFrameCount.
3324         (WebCore::HTMLFrameElementImpl::openURL): Changed to call FrameTree::child
3325         instead of Frame::findFrame.
3326         (WebCore::HTMLFrameElementImpl::attach): Changed to call Page::incrementFrameCount
3327         instead of Frame::incrementFrameCount. Changed to call FrameTree::uniqueChildName
3328         instead of Frame::requestFrameName.
3329         (WebCore::HTMLFrameElementImpl::close): Changed to call Page::decrementFrameCount
3330         instead of Frame::decrementFrameCount. Changed to call FrameTree::child
3331         instead of Frame::findFrame.
3332         (WebCore::HTMLFrameElementImpl::contentFrame): Renamed from contentPart. Also
3333         changed to call FrameTree::child instead of Frame::findFrame.
3334         (WebCore::HTMLFrameElementImpl::contentDocument): Updated for name change of
3335         contentFrame from contentPart.
3336         (WebCore::HTMLIFrameElementImpl::attach): Changed to call Page::incrementFrameCount
3337         instead of Frame::incrementFrameCount. Changed to call FrameTree::uniqueChildName
3338         instead of Frame::requestFrameName.
3339
3340         * rendering/render_frames.cpp: (WebCore::isURLAllowed): Changed to call Page::frameCount
3341         instead of Frame::topLevelFrameCount.
3342
3343         * page/Frame.h: Removed frameNames, frames, childFrameNamed, findFrame, currentFrame,
3344         frameExists, incrementFrameCount, decrementFrameCount, topLevelFrameCount,
3345         generateFrameName, and requestFrameName functions.
3346         * page/Frame.cpp: (WebCore::Frame::requestFrame): Changed to use FrameTree::child
3347         instead of Frame::childFrameNamed.
3348
3349         * page/FrameTree.h: Changed name to an atomic string. Changed childCount to unsigned.
3350         Added isDescendantOf, traverseNext, child, find, uniqueChildName.
3351         * page/FrameTree.cpp:
3352         (WebCore::FrameTree::setName): Changed to call uniqueChildName to handle name
3353         duplication logic.
3354         (WebCore::FrameTree::uniqueChildName): Added. Checks for duplication and generates
3355         an appropriate frame name if there is a duplicate.
3356         (WebCore::FrameTree::child): Added.
3357         (WebCore::FrameTree::find): Added.
3358         (WebCore::FrameTree::isDescendantOf): Added.
3359         (WebCore::FrameTree::traverseNext): Added.
3360
3361         * page/Page.h: Added setGroupName, groupName, frameNamespace, incrementFrameCount,
3362         decrementFrameCount, and frameCount.
3363         * page/Page.cpp:
3364         (WebCore::Page::Page): Initialize m_frameCount to 0.
3365         (WebCore::Page::~Page): Call setGroupName to remove the page from any group it's in.
3366         (WebCore::Page::setGroupName): Added.
3367         (WebCore::Page::frameNamespace): Added.
3368
3369         * platform/win/TemporaryLinkStubs.cpp: Removed FrameWin::generateFrameName.
3370
3371 2006-03-10  Justin Garcia  <justin.garcia@apple.com>
3372         
3373         Reviewed by darin, harrison
3374         
3375         ~3x speedup pasting plain text from the console
3376
3377         * dom/dom_position.cpp:
3378         (WebCore::Position::next): 
3379         (WebCore::Position::atEnd): 
3380
3381 2006-03-10  David Hyatt <hyatt@apple.com>
3382
3383         More refactoring.  Split the FontData into cross-platform and
3384         platform-specific components.
3385
3386         Reviewed by eric
3387
3388         * WebCore.vcproj/WebCore/WebCore.vcproj:
3389         * platform/FontData.h: Added.
3390         (WebCore::FontData:::m_platformData):
3391         (WebCore::FontData::platformData):
3392         (WebCore::FontData::setMetrics):
3393         (WebCore::FontData::ascent):
3394         (WebCore::FontData::descent):
3395         (WebCore::FontData::xHeight):
3396         (WebCore::FontData::lineSpacing):
3397         * platform/FontPlatformData.h: Added.
3398         (WebCore::FontPlatformData::hfont):
3399         (WebCore::FontPlatformData::scaledFont):
3400         * platform/win/FontPlatformDataWin.cpp: Added.
3401         (WebCore::FontPlatformData::FontPlatformData):
3402         (WebCore::FontPlatformData::~FontPlatformData):
3403         * platform/win/FontWin.cpp:
3404         (WebCore::Font::floatWidth):
3405         (WebCore::Font::drawText):
3406
3407 2006-03-10  Maciej Stachowiak  <mjs@apple.com>
3408
3409         Reviewed by Eric.
3410
3411         - fix win32 networking to properly use async load API
3412
3413         * platform/win/TransferJobWin.cpp:
3414         (WebCore::TransferJobWndProc):
3415         (WebCore::TransferJob::start):
3416
3417 2006-03-10  Eric Seidel  <eseidel@apple.com>
3418
3419         Fix build.
3420
3421         * platform/win/FontWin.cpp:
3422         (WebCore::getFontData):
3423         * platform/win/TemporaryLinkStubs.cpp:
3424
3425 2006-03-10  Adele Peterson  <adele@apple.com>
3426
3427         Reviewed by Tim Hatcher.
3428
3429         - fix for <rdar://problem/4469419> 
3430         REGRESSION: RadioButtons are not checked in Safari when name attribute comes after checked attribute
3431
3432         Test: fast/forms/radio-attr-order.html
3433
3434         * khtml/html/HTMLInputElementImpl.cpp: (WebCore::HTMLInputElementImpl::parseMappedAttribute):
3435         When the name attribute gets parsed for radio buttons, if its supposed to be checked by default, call setChecked.
3436         Also, when the name changes on a checked button, we don't need to check that 
3437         there's a form before removing it as the checked button for that group.  
3438         That was an old check from when we required a form to keep track of checked buttons.
3439
3440 2006-03-10  Eric Seidel  <eseidel@apple.com>
3441
3442         Reviewed by darin.
3443
3444         Add real ScrollViewWin implementation (fixes redraw bugs, adds ScrollBar support.)
3445
3446         * platform/ScrollView.h:
3447         * platform/Widget.h:
3448         * platform/win/FontWin.cpp:
3449         (WebCore::getCairoFont): Fix crasher.
3450         * platform/win/ScrollViewWin.cpp:
3451         (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
3452         (WebCore::ScrollView::ScrollView):
3453         (WebCore::ScrollView::~ScrollView):
3454         (WebCore::ScrollView::updateContents):
3455         (WebCore::ScrollView::visibleWidth):
3456         (WebCore::ScrollView::visibleHeight):
3457         (WebCore::ScrollView::setContentsPos):
3458         (WebCore::ScrollView::resizeContents):
3459         (WebCore::ScrollView::contentsX):
3460         (WebCore::ScrollView::contentsY):
3461         (WebCore::ScrollView::contentsWidth):
3462         (WebCore::ScrollView::contentsHeight):
3463         (WebCore::ScrollView::viewportToContents):
3464         (WebCore::ScrollView::contentsToViewport):
3465         (WebCore::ScrollView::scrollXOffset):
3466         (WebCore::ScrollView::scrollYOffset):
3467         (WebCore::ScrollView::scrollBy):
3468         (WebCore::ScrollView::hScrollBarMode):
3469         (WebCore::ScrollView::vScrollBarMode):
3470         (WebCore::ScrollView::suppressScrollBars):
3471         (WebCore::ScrollView::setHScrollBarMode):
3472         (WebCore::ScrollView::setVScrollBarMode):
3473         (WebCore::ScrollView::setScrollBarsMode):
3474         (WebCore::ScrollView::setStaticBackground):
3475         (WebCore::ScrollView::updateScrollInfo):
3476         (WebCore::ScrollView::updateScrollBars):
3477         * platform/win/TemporaryLinkStubs.cpp:
3478         (BrowserExtensionWin::goBackOrForward):
3479         (BrowserExtensionWin::setIconURL):
3480         (ScrollView::scrollPointRecursively):
3481         * platform/win/WidgetWin.cpp:
3482         (WebCore::Widget::windowHandle): mark as const
3483
3484 2006-03-10  David Hyatt  <hyatt@apple.com>
3485
3486         Rename the m_renderer variable to m_dataSet now that the class name
3487         has changed.
3488
3489         Reviewed by adele
3490
3491         * platform/Font.cpp:
3492         (WebCore::m_wordSpacing):
3493         (WebCore::Font::Font):
3494         (WebCore::Font::operator=):
3495         (WebCore::Font::update):
3496         * platform/Font.h:
3497         * platform/FontDataSet.h:
3498         * platform/mac/FontMac.mm:
3499         (WebCore::Font::getWebCoreFont):
3500         (WebCore::Font::ascent):
3501         (WebCore::Font::descent):
3502         (WebCore::Font::lineSpacing):
3503         (WebCore::Font::xHeight):
3504         (WebCore::Font::isFixedPitch):
3505         (WebCore::Font::selectionRectForText):
3506         (WebCore::Font::drawText):
3507         (WebCore::Font::drawHighlightForText):
3508         (WebCore::Font::drawLineForText):
3509         (WebCore::Font::drawLineForMisspelling):
3510         (WebCore::Font::misspellingLineThickness):
3511         (WebCore::Font::floatWidth):
3512         (WebCore::Font::checkSelectionPoint):
3513         * platform/win/FontWin.cpp:
3514         (WebCore::FontData::FontData):
3515         (WebCore::FontData::~FontData):
3516         (WebCore::getFontData):
3517         (WebCore::FontDataSet::primaryFont):
3518         (WebCore::Font::floatWidth):
3519         (WebCore::Font::ascent):
3520         (WebCore::Font::descent):
3521         (WebCore::Font::xHeight):
3522         (WebCore::Font::lineSpacing):
3523         (WebCore::Font::isFixedPitch):
3524         (WebCore::Font::drawText):
3525
3526 2006-03-10  David Hyatt  <hyatt@apple.com>
3527
3528         Rename FontRenderer to FontDataSet.
3529
3530         Reviewed by adele
3531
3532         * WebCore.xcodeproj/project.pbxproj:
3533         * platform/Font.cpp:
3534         (WebCore::Font::update):
3535         * platform/Font.h:
3536         * platform/FontDataSet.h: Added.
3537         * platform/FontRenderer.h: Removed.
3538         * platform/mac/FontMac.mm:
3539         (WebCore::FontDataSet::~FontDataSet):
3540         (WebCore::FontDataSet::getWebCoreFont):
3541         (WebCore::FontDataSet::getRenderer):
3542         (WebCore::FontDataSet::determinePitch):
3543         (WebCore::FontDataSet::invalidate):
3544         * platform/win/FontWin.cpp:
3545         (WebCore::getCairoFont):
3546         (WebCore::FontDataSet::~FontDataSet):
3547         (WebCore::FontDataSet::determinePitch):
3548         (WebCore::FontDataSet::invalidate):
3549         (WebCore::FontDataSet::primaryCairoFont):
3550
3551 2006-03-09  Justin Garcia  <justin.garcia@apple.com>
3552
3553         Reviewed by adele
3554         
3555         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7692>
3556         Should use an iterator in CompositeEditCommand::doUnapply()
3557         
3558         ~30% speedup of a big undo
3559
3560         * editing/CompositeEditCommand.cpp:
3561         (WebCore::CompositeEditCommand::doUnapply):
3562         (WebCore::CompositeEditCommand::doReapply):
3563
3564 2006-03-09  Adele Peterson  <adele@apple.com>
3565
3566         Reviewed by Tim O.
3567
3568         Removed unnecessary alerts in TextIterator advance methods.  
3569         We want to be able to use advance() even if the iterator is already at the end.
3570
3571         * editing/visible_text.cpp:
3572         (khtml::TextIterator::advance): remove assert since TextIterator will just do nothing if its already at the end.
3573         (khtml::CharacterIterator::advance): ditto.
3574         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::visiblePositionForIndex):
3575         Since the asserts in the iterator are removed, we don't have to check for it.atEnd() before calling advance.
3576
3577 2006-03-09  David Hyatt <hyatt@apple.com>
3578
3579         Make text paint with the correct foreground color on Windows.
3580         Make the face validation check case insensitive.
3581         Force ClearType to be on for font rendering.
3582
3583         Reviewed by Tim Hatcher
3584
3585         * platform/win/FontWin.cpp:
3586         (WebCore::getCairoFont):
3587         (WebCore::Font::drawText):
3588
3589 2006-03-09  Adele Peterson  <adele@apple.com>
3590
3591         Reviewed by Hyatt.
3592
3593         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7675
3594         When new text fields change from visibility:hidden to visibility:visible, value doesn't display
3595
3596         Test: fast/forms/input-appearance-visibility.html
3597
3598         * rendering/RenderTextField.cpp: (WebCore::RenderTextField::setStyle):
3599         Sets the style directly on the children of the inner div.
3600
3601 2006-03-09  David Hyatt <hyatt@apple.com>
3602
3603         Make basic text rendering work on Win32.
3604
3605         Reviewed by eric
3606
3607         * WebCore.vcproj/WebCore/WebCore.vcproj:
3608         Add FontDescription.h to the Visual Studio project.
3609
3610         * bridge/win/FrameWin.cpp:
3611         (WebCore::FrameWin::FrameWin):
3612         Add some good default font settings to KHTMLSettings.
3613
3614         * platform/Font.cpp:
3615         (WebCore::Font::update):
3616         Renamed the FontRenderer method to invalidate, so that's what
3617         update calls now.
3618
3619         * platform/FontRenderer.h:
3620         * platform/mac/FontMac.mm:
3621         (WebCore::FontRenderer::~FontRenderer):
3622         (WebCore::FontRenderer::invalidate):
3623         Rename the update method to invalidate.  Make sure the Mac
3624         font renderer releases its resources when it gets destroyed.
3625
3626         * platform/win/FontWin.cpp:
3627         (WebCore::CairoFont::CairoFont):
3628         (WebCore::CairoFont::~CairoFont):
3629         (WebCore::CairoFont::hfont):
3630         (WebCore::CairoFont::scaledFont):
3631         (WebCore::CairoFont::setMetrics):
3632         (WebCore::CairoFont::ascent):
3633         (WebCore::CairoFont::descent):
3634         (WebCore::CairoFont::xHeight):
3635         (WebCore::CairoFont::lineSpacing):
3636         Implement a new class called CairoFont that encapsulates
3637         the windows HFONT, the cairo font face, and the cairo scaled
3638         font.
3639
3640         (WebCore::getCairoFont):
3641         The method to look up a Cairo font.  This will eventually use
3642         a hash, but for now it just always makes the fonts over and
3643         over again.
3644
3645         (WebCore:::m_pitch):
3646         (WebCore::FontRenderer::~FontRenderer):
3647         (WebCore::FontRenderer::determinePitch):
3648         (WebCore::FontRenderer::invalidate):
3649         More of the FontRenderer plumbing.
3650
3651         (WebCore::FontRenderer::primaryCairoFont):
3652         Returns the primary Cairo font for a family list.  This is basically
3653         the first family that is present on the system.
3654
3655         (WebCore::Font::floatWidth):
3656         The width method uses GetTextExtentPoint32W for now.  This
3657         is totally wrong and will eventually be replaced by Cairo
3658         code.
3659
3660         (WebCore::Font::ascent):
3661         (WebCore::Font::descent):
3662         (WebCore::Font::xHeight):
3663         (WebCore::Font::lineSpacing):
3664         (WebCore::Font::isFixedPitch):
3665         Accessors for the metrics and pitch info.
3666
3667         (WebCore::Font::drawText):
3668         Drawing of text.  Uses TextOut and is also basically throwaway
3669         code.
3670
3671         * platform/win/TemporaryLinkStubs.cpp:
3672         (Font::checkSelectionPoint):
3673         Move the checkSelectionPoint method back to the link stubs.
3674
3675 2006-03-09  Justin Garcia  <justin.garcia@apple.com>
3676
3677         Reviewed by harrison
3678     
3679         Fixed formatting and changed functions to take in 
3680         a const Selection& instead of a Selection.
3681
3682         * editing/ModifySelectionListLevelCommand.cpp:
3683         (WebCore::ModifySelectionListLevelCommand::canIncreaseSelectionListLevel):
3684         (WebCore::ModifySelectionListLevelCommand::canDecreaseSelectionListLevel):
3685         (WebCore::ModifySelectionListLevelCommand::increaseSelectionListLevel):
3686         (WebCore::ModifySelectionListLevelCommand::decreaseSelectionListLevel):
3687         (WebCore::modifySelectionListLevel):
3688         (WebCore::getStartEndListChildren):
3689         (WebCore::canIncreaseListLevel):
3690         (WebCore::canDecreaseListLevel):
3691         (WebCore::ModifySelectionListLevelCommand::increaseListLevel):
3692         (WebCore::ModifySelectionListLevelCommand::decreaseListLevel):
3693         * editing/ModifySelectionListLevelCommand.h:
3694
3695 2006-03-09  Adele Peterson  <adele@apple.com>
3696
3697         Reviewed by Darin.
3698
3699         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6814
3700         Implement selection methods for RenderTextField
3701
3702         Test: fast/forms/input-appearance-selection.html
3703
3704         * rendering/RenderTextField.cpp:
3705         (WebCore::RenderTextField::createDivStyle): removed extra space.
3706         (WebCore::RenderTextField::select): Removed checks for document and m_div since there should always be a document and 
3707          m_div will be initialized as the renderer gets attached.
3708         (WebCore::RenderTextField::selectionStart): Calls indexForVisiblePosition.
3709         (WebCore::RenderTextField::selectionEnd): ditto.
3710         (WebCore::RenderTextField::setSelectionStart): calls setSelectionRange.
3711         (WebCore::RenderTextField::setSelectionEnd): ditto.
3712         (WebCore::RenderTextField::setSelectionRange): gets VisiblePositions for both indices, and sets the selection.
3713         (WebCore::RenderTextField::visiblePositionForIndex): Added helper method.
3714         (WebCore::RenderTextField::indexForVisiblePosition): Added helper method.
3715         * rendering/RenderTextField.h: Added new helper methods for selection.
3716
3717 2006-03-09  David Carson  <dacarson@gmail.com>
3718
3719         Test: fast/canvas/fillrect_gradient.html
3720
3721         Reviewed by Darin.
3722
3723         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6103
3724           Rectangles are not filled according to the Web Applications Working Draft
3725
3726         * khtml/ecma/kjs_html.cpp: (KJS::Context2DFunction::callAsFunction):
3727         Modified fillrect function to check and use a gradient if set.
3728         Builds a path to fill rects with a gradient.
3729
3730 2006-03-09  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3731
3732         No test because this fixes an existing pixel test (and does not affect
3733         the render tree).
3734
3735         Reviewed by Maciej.
3736
3737         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7664
3738           REGRESSION: tests that include numeric list markers fail in pixel mode
3739
3740         * platform/GraphicsContext.cpp:
3741         (WebCore::GraphicsContext::drawText): Restored AlignRight behavior.
3742
3743 2006-03-09  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3744
3745         No test because we couldn't figure out how to write one.
3746
3747         Reviewed by Darin.
3748
3749         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7680
3750           REGRESSION: Ellipsis painted over the chrome and in invalid contexts
3751
3752         * rendering/render_line.cpp:
3753         (WebCore::EllipsisBox::paint): Replaced call to Font::drawText with
3754         GraphicsContext::drawText, which checks the paintingDisabled flag.
3755
3756 2006-03-09  Maciej Stachowiak  <mjs@apple.com>
3757
3758         Reviewed by Eric.
3759
3760         - make link clicks work by propagating them up to a client
3761
3762         * Viewer/ImageView.cpp:
3763         * bridge/win/FrameWin.cpp:
3764         * bridge/win/FrameWin.h:
3765         * platform/win/TemporaryLinkStubs.cpp:
3766         (FrameWin::incomingReferrer):
3767
3768 2006-03-09  Eric Seidel  <eseidel@apple.com>
3769
3770         Reviewed by mjs.
3771
3772         Add support for Timers under 10ms.
3773         Fix random crashers due to multi-threaded loading.
3774
3775         * platform/TransferJob.h:
3776         * platform/TransferJobInternal.h:
3777         (WebCore::TransferJobInternal::TransferJobInternal):
3778         * platform/Widget.h:
3779         * platform/win/SharedTimerWin.cpp:
3780         (WebCore::TimerWindowWndProc):
3781         (WebCore::initializeOffScreenTimerWindow):
3782         (WebCore::setSharedTimerFireTime):
3783         * platform/win/TemporaryLinkStubs.cpp:
3784         (WebCore::TransferJob::assembleResponseHeaders):
3785         (WebCore::TransferJob::retrieveCharset):
3786         * platform/win/TransferJobWin.cpp:
3787         (WebCore::addToOutstandingJobs):
3788         (WebCore::removeFromOutstandingJobs):
3789         (WebCore::lookupTransferJob):
3790         (WebCore::TransferJobWndProc):
3791         (WebCore::initializeOffScreenTransferJobWindow):
3792         (WebCore::TransferJob::~TransferJob):
3793         (WebCore::transferJobStatusCallback):
3794         (WebCore::TransferJob::start):
3795         (WebCore::TransferJob::cancel):
3796         * platform/win/WidgetWin.cpp:
3797
3798 2006-03-08  Justin Garcia  <justin.garcia@apple.com>
3799
3800         Reviewed by darin
3801         
3802         <http://bugzilla.opendarwin.org/show_bug.cgi?id=7579>
3803         TinyMCE: Implement execCommand(insertImage, ...)
3804         
3805         Implemented InsertImage and also changed paste to use a single 
3806         rule for when to remove junk that remains after node removal. 
3807
3808         * editing/ReplaceSelectionCommand.cpp:
3809         (WebCore::ReplaceSelectionCommand::removeNodeAndPruneAncestors):
3810         (WebCore::ReplaceSelectionCommand::doApply):
3811         (WebCore::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded):
3812         * editing/ReplaceSelectionCommand.h:
3813         * editing/htmlediting.cpp:
3814         * editing/jsediting.cpp:
3815
3816 2006-03-08  Eric Seidel  <eseidel@apple.com>
3817
3818         Reviewed by hyatt.
3819
3820         Fix build script to properly copy dll files.
3821
3822         * WebCore.vcproj/WebCore/build-generated-files.sh:
3823
3824 2006-03-08  Rob Buis  <buis@kde.org>
3825
3826         Reviewed by eseidel.
3827
3828         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6899 SVG <rect> does not respect display: none
3829
3830         For svg elements that can render, call StyledElementImpl::rendererIsNeeded
3831         to decide whether the element should render. In particular this way
3832         any setting of display="none" is handled.
3833
3834         * ksvg2/svg/SVGAElementImpl.h:
3835         (WebCore::SVGAElementImpl::rendererIsNeeded):
3836         * ksvg2/svg/SVGCircleElementImpl.h:
3837         (WebCore::SVGCircleElementImpl::rendererIsNeeded):
3838         * ksvg2/svg/SVGEllipseElementImpl.h:
3839         (WebCore::SVGEllipseElementImpl::rendererIsNeeded):
3840         * ksvg2/svg/SVGForeignObjectElementImpl.h:
3841         (WebCore::SVGForeignObjectElementImpl::rendererIsNeeded):
3842         * ksvg2/svg/SVGGElementImpl.h:
3843         (WebCore::SVGGElementImpl::rendererIsNeeded):
3844         * ksvg2/svg/SVGImageElementImpl.h:
3845         (WebCore::SVGImageElementImpl::rendererIsNeeded):
3846         * ksvg2/svg/SVGLineElementImpl.h:
3847         (WebCore::SVGLineElementImpl::rendererIsNeeded):
3848         * ksvg2/svg/SVGMarkerElementImpl.h:
3849         (WebCore::SVGMarkerElementImpl::rendererIsNeeded):
3850         * ksvg2/svg/SVGMaskElementImpl.h:
3851         (WebCore::SVGMaskElementImpl::rendererIsNeeded):
3852         * ksvg2/svg/SVGPathElementImpl.h:
3853         (WebCore::SVGPathElementImpl::rendererIsNeeded):
3854         * ksvg2/svg/SVGPatternElementImpl.h:
3855         (WebCore::SVGPatternElementImpl::rendererIsNeeded):
3856         * ksvg2/svg/SVGPolyElementImpl.h:
3857         (WebCore::SVGPolyElementImpl::rendererIsNeeded):
3858         * ksvg2/svg/SVGRectElementImpl.h:
3859         (WebCore::SVGRectElementImpl::rendererIsNeeded):
3860         * ksvg2/svg/SVGSVGElementImpl.h:
3861         (WebCore::SVGSVGElementImpl::rendererIsNeeded):
3862         * ksvg2/svg/SVGSwitchElementImpl.h:
3863         (WebCore::SVGSwitchElementImpl::rendererIsNeeded):
3864         * ksvg2/svg/SVGTSpanElementImpl.h:
3865         (WebCore::SVGTSpanElementImpl::rendererIsNeeded):
3866         * ksvg2/svg/SVGTextElementImpl.h:
3867         (WebCore::SVGTextElementImpl::rendererIsNeeded):
3868         * ksvg2/svg/SVGUseElementImpl.h:
3869         (WebCore::SVGUseElementImpl::rendererIsNeeded):
3870
3871 2006-03-08  Eric Seidel  <eseidel@apple.com>
3872
3873         Reviewed by mjs.
3874
3875         Add stubs to allow JavaScript-enabled WebCore to not crash.
3876         Add ScreenWin implementation.
3877         Add alert() support.
3878
3879         * WebCore.vcproj/WebCore/WebCore.vcproj:
3880         * bridge/win/FrameWin.cpp:
3881         (WebCore::FrameWin::runJavaScriptAlert):
3882         (WebCore::FrameWin::runJavaScriptConfirm):
3883         * platform/win/ScreenWin.cpp: Added.
3884         (WebCore::monitorInfoForWidget):
3885         (WebCore::WebCore::screenRect):
3886         (WebCore::WebCore::screenDepth):
3887         (WebCore::WebCore::usableScreenRect):
3888         * platform/win/TemporaryLinkStubs.cpp:
3889         (FrameWin::canUndo):
3890         (FrameWin::runJavaScriptPrompt):
3891         (FrameWin::canPaste):
3892         (WebCore::setCookies):
3893         (WebCore::cookies):
3894         (WebCore::cookiesEnabled):
3895         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
3896         (PlugInInfoStore::pluginCount):
3897         (WebCore::refreshPlugins):
3898         (FrameWin::clearUndoRedoOperations):
3899         (FrameWin::incomingReferrer):
3900
3901 2006-03-08  Darin Adler  <darin@apple.com>
3902
3903         Reviewed by Maciej.
3904
3905         - fix another instance of the bug I just fixed in the Macintosh-specific code path
3906
3907         * platform/image-decoders/gif/GIFImageReader.h: Remove not-so-useful 100ms constant.
3908         * platform/image-decoders/gif/GIFImageReader.cpp: (GIFImageReader::read):
3909         Use the correct rule for minimum frame durations.
3910
3911 2006-03-08  Maciej Stachowiak  <mjs@apple.com>
3912
3913         Reviewed by Eric.
3914
3915         - very rough implementation of networking in TransferJob for windows
3916
3917         * platform/TransferJob.h:
3918         * platform/TransferJobInternal.h:
3919         (WebCore::TransferJobInternal::TransferJobInternal):
3920         * platform/win/TransferJobWin.cpp:
3921         (WebCore::transferJobStatusCallback):
3922         (WebCore::TransferJob::start):
3923
3924 2006-03-08  Maciej Stachowiak  <mjs@apple.com>
3925
3926         Reviewed by Darin.
3927
3928         - fix win32 build
3929
3930         * platform/win/FontWin.cpp:
3931         (WebCore::Font::drawText):
3932         (WebCore::Font::drawHighlightForText):
3933         * platform/win/TemporaryLinkStubs.cpp:
3934         (GraphicsContext::clearFocusRing):
3935         (GraphicsContext::selectedTextBackgroundColor):
3936         (Font::selectionRectForText):
3937
3938 2006-03-08  Darin Adler  <darin@apple.com>
3939
3940         Reviewed by Maciej.
3941
3942         - fix one more thing from http://bugzilla.opendarwin.org/show_bug.cgi?id=7528
3943           REGRESSION: GIF animation speeds are wrong on a page with many animated GIFs
3944
3945         No layout test because I don't know how to test animated GIF speed.
3946
3947         * platform/mac/ImageSourceMac.cpp: (WebCore::ImageSource::frameDurationAtIndex):
3948         Use the correct rule for minimum frame durations. It's a bit non-intuitive, so
3949         I made the comment more explicit. The old code in WebKit had this rule.
3950
3951 2006-03-08  David Hyatt  <hyatt@apple.com>
3952
3953         Make GraphicsContext call into Font to draw all text and eliminate
3954         all knowledge of WebTextRenderers from it.
3955
3956         Reviewed by darin
3957
3958         * platform/Font.h:
3959         * platform/GraphicsContext.cpp:
3960         (WebCore::GraphicsContext::drawText):
3961         (WebCore::GraphicsContext::drawHighlightForText):
3962         (WebCore::GraphicsContext::drawLineForText):
3963         (WebCore::GraphicsContext::drawLineForMisspelling):
3964         (WebCore::GraphicsContext::misspellingLineThickness):
3965         * platform/GraphicsContext.h:
3966         (WebCore::GraphicsContext::platformContext):
3967         * platform/cairo/GraphicsContextCairo.cpp:
3968         (WebCore::GraphicsContext::platformContext):
3969         * platform/mac/FontMac.mm:
3970         (WebCore::Font::drawText):
3971         (WebCore::Font::drawHighlightForText):
3972         (WebCore::Font::drawLineForText):
3973         (WebCore::Font::drawLineForMisspelling):
3974         (WebCore::Font::misspellingLineThickness):
3975         * platform/mac/GraphicsContextMac.mm:
3976         * platform/win/FontWin.cpp:
3977         (WebCore::Font::drawText):
3978         * rendering/InlineTextBox.cpp:
3979         (WebCore::InlineTextBox::paint):
3980         (WebCore::InlineTextBox::paintSelection):
3981         (WebCore::InlineTextBox::paintMarkedTextBackground):
3982         (WebCore::InlineTextBox::paintTextMatchMarker):
3983
3984 2006-03-08  Darin Adler  <darin@apple.com>
3985
3986         Reviewed by Hyatt.
3987
3988         - fixed super-fast animation of many animated GIFs
3989
3990         No layout test because I don't know how to test animated GIF speed.
3991
3992         * platform/mac/ImageSourceMac.cpp: (WebCore::ImageSource::frameDurationAtIndex):
3993         Always take the minimum duration into account, even if there's some kind of failure
3994         getting the duration from the GIF.
3995
3996 2006-03-07  Darin Adler  <darin@apple.com>
3997
3998         Reviewed by Anders.
3999
4000         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7655
4001           unwanted output while running layout tests
4002
4003         * khtml/xsl/xsl_stylesheetimpl.cpp: (WebCore::XSLStyleSheetImpl::parseString):
4004         Pass XML_PARSE_NOERROR and XML_PARSE_NOWARNING. We don't want errors and warnings
4005         to be logged to stdout or stderr. If we later decide we want the error messages,
4006         then we should do the additional work to put them into the web page or the
4007         console (along with the JavaScript errors).
4008
4009         * platform/ArrayImpl.cpp: (WebCore::ArrayImpl::resize): Add a preflight to protect
4010         against integer overflow due to large array size. Noticed this while looking into
4011         the malloc error message.
4012
4013 2006-03-07  Darin Adler  <darin@apple.com>
4014
4015         Reviewed by Adele.
4016
4017         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7647
4018           Crash when typing into text contols
4019
4020         I missed a couple places that were still saying KWQWidgetHolder
4021         in the change I landed late last night.
4022
4023         * kwq/KWQTextArea.h:
4024         * kwq/KWQTextArea.mm:
4025         * kwq/KWQTextField.h:
4026         Changed them all to say WebCoreWidgetHolder.
4027
4028 2006-03-07  Eric Seidel  <eseidel@apple.com>
4029
4030         Reviewed by hyatt.
4031
4032         Fix cursor support on win32.
4033
4034         * platform/win/WidgetWin.cpp:
4035         (WebCore::Widget::setCursor):
4036
4037 2006-03-07  Eric Seidel  <eseidel@apple.com>
4038
4039         Reviewed by hyatt.
4040
4041         Fix basic text support.
4042
4043         * WebCore.vcproj/WebCore/WebCore.vcproj:
4044         * platform/cairo/GraphicsContextCairo.cpp:
4045         (WebCore::GraphicsContext::drawText):
4046
4047 2006-03-07  Dave Hyatt <hyatt@apple.com>
4048
4049         Eliminate the unused parameters of the QString version of drawText.
4050
4051         Reviewed by eric
4052
4053         * platform/GraphicsContext.h:
4054         * platform/cairo/GraphicsContextCairo.cpp:
4055         (WebCore::GraphicsContext::drawText):
4056         * platform/mac/GraphicsContextMac.mm:
4057         (WebCore::GraphicsContext::drawText):
4058         * rendering/render_image.cpp:
4059         (WebCore::RenderImage::paint):
4060         * rendering/render_list.cpp:
4061         (WebCore::RenderListMarker::paint):
4062
4063 2006-03-07  Eric Seidel  <eseidel@apple.com>
4064
4065         Reviewed by hyatt.
4066
4067         Add very basic text support.
4068         Sort a few more stubs.
4069
4070         * WebCore.vcproj/WebCore/WebCore.vcproj:
4071         * platform/cairo/GraphicsContextCairo.cpp:
4072         (WebCore::GraphicsContext::font):
4073         (WebCore::GraphicsContext::setFont):
4074         (WebCore::GraphicsContext::drawText):
4075         * platform/win/FontWin.cpp: Added.
4076         (WebCore::Font::drawText):
4077         * platform/win/TemporaryLinkStubs.cpp:
4078         (QComboBox::focusPolicy):
4079         (ScrollView::scrollXOffset):
4080         (Font::isFixedPitch):
4081         (Path::boundingRect):
4082
4083 2006-03-07  Adele Peterson  <adele@apple.com>
4084
4085         Reviewed by Hyatt.
4086
4087         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=7319
4088         Can't see caret at the end of a contenteditable div with overflow:hidden
4089
4090         No tests added since I don't think the blinking caret will show up in our tests.
4091
4092         * rendering/RenderBlock.cpp:
4093         (WebCore::RenderBlock::rightmostPosition): When calculating the rightmostPosition for editable blocks, 
4094         we need to account for the caret that can be drawn 1 px past the last child inline box.
4095
4096 2006-03-07  David Kilzer  <ddkilzer@kilzer.net>
4097
4098         Reviewed by Darin.
4099
4100         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3905
4101         Missing </title> makes page blank
4102
4103         Test: fast/js/exception-linenums-in-html-1.html
4104         Test: fast/js/exception-linenums-in-html-2.html
4105         Test: fast/js/missing-title-end-tag-js.html
4106         Test: fast/tokenizer/missing-title-end-tag-1.html
4107         Test: fast/tokenizer/missing-title-end-tag-2.html
4108
4109         * khtml/html/htmlparser.cpp:
4110         (WebCore::HTMLParser::handleError): Add check for missing </title> tag and handle
4111         this condition if identified.
4112         * khtml/html/htmltokenizer.cpp:
4113         (WebCore::HTMLTokenizer::parseTag): If parseSpecial() consumes the rest of the
4114         document looking for a </title> tag, reset the state of the tokenizer and
4115         retokenize with no special handling for <title>.  The parser will handle the
4116         missing </title> tag in HTMLParser::handleError().
4117         * platform/SegmentedString.cpp:
4118         (WebCore::SegmentedString::SegmentedString): Added copy constructor.
4119         (WebCore::SegmentedString::operator=): Added assignment operator.  Previously the
4120         compiler was generating a default method for the assignment operator, but it did
4121         not handle m_currentChar properly.
4122         * platform/SegmentedString.h: Added prototypes for copy constructor and
4123         assignment operator.
4124
4125 2006-03-07  Eric Seidel  <eseidel@apple.com>
4126
4127         Fix win32 link stubs.
4128
4129         * platform/win/TemporaryLinkStubs.cpp:
4130         (WebCore::searchableIndexIntroduction):
4131         (WebCore::setCookies):
4132         (WebCore::cookies):
4133         (WebCore::cookiesEnabled):
4134         (WebCore::findNextSentenceFromIndex):
4135         (WebCore::findSentenceBoundary):
4136         (WebCore::findNextWordFromIndex):
4137         (WebCore::findWordBoundary):
4138         (WebCore::submitButtonDefaultLabel):
4139         (WebCore::inputElementAltText):
4140         (WebCore::resetButtonDefaultLabel):
4141         (WebCore::defaultLanguage):
4142
4143 2006-03-07  Darin Adler  <darin@apple.com>
4144
4145         Reviewed by Adele, except for the first change listed.
4146
4147         - fix recently-introduced bug that GuardMalloc found while I was debugging my other change
4148
4149         * rendering/render_frames.cpp: (WebCore::RenderPart::~RenderPart):
4150         Set m_widget to 0 before calling deref so we don't end up trying to do unwanted work.
4151
4152         - removed 10 more files from KWQ
4153
4154         * ForwardingHeaders/klocale.h: Removed.
4155
4156         * khtml/misc/helper.cpp: Removed.
4157         * khtml/misc/helper.h: Removed.
4158
4159         * kwq/KWQCollection.h: Removed.
4160         * kwq/KWQKCookieJar.h: Removed.
4161         * kwq/KWQKCookieJar.mm: Removed.
4162         * kwq/KWQKLocale.h: Removed.
4163         * kwq/KWQKLocale.mm: Removed.
4164         * kwq/KWQKURL.h: Removed.
4165         * kwq/KWQKURL.mm: Removed.
4166         * kwq/KWQTextUtilities.h: Removed.
4167         * kwq/KWQTextUtilities.mm: Removed.
4168         * kwq/KWQView.h: Removed.
4169
4170         * platform/CookieJar.h: Added.
4171         * platform/Language.h: Added.
4172         * platform/LocalizedStrings.h: Added.
4173         * platform/TextBoundaries.h: Added.
4174         * platform/mac/CookieJar.mm: Added.
4175         * platform/mac/Language.mm: Added.
4176         * platform/mac/LocalizedStringsMac.mm: Added.
4177         * platform/mac/TextBoundaries.mm: Added.
4178         * platform/mac/WebCoreWidgetHolder.h: Added.
4179
4180         * WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
4181         * WebCore.vcproj/WebCore/WebCore.vcproj: Updated for removed and added files.
4182
4183         * bridge/mac/WebCoreFrameBridge.mm: Updated includes.
4184         (-[WebCoreFrameBridge elementForView:]): Changed KWQWidgetHolder to WebCoreWidgetHolder.
4185
4186         * editing/visible_units.cpp:
4187         (WebCore::previousWordPositionBoundary):
4188         (WebCore::nextWordPositionBoundary):
4189         (WebCore::previousSentencePositionBoundary):
4190         (WebCore::nextSentencePositionBoundary):
4191         Call TextBoundaries.h functions instead of helper.h ones.
4192
4193         * khtml/ecma/kjs_navigator.cpp: (KJS::Navigator::getValueProperty):
4194         * ksvg2/svg/SVGTestsImpl.cpp: (WebCore::SVGTestsImpl::isValid):
4195         Changed to call defaultLanguage; cleaned up formatting.