87d69f8222f0837044419a657089646265687a88
[WebKit-https.git] / WebCore / ChangeLog
1 2008-02-15  Darin Adler  <darin@apple.com>
2
3         - another Qt build fix
4
5         * platform/qt/KURLQt.cpp:
6         (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
7         Eliminate references to urlString.
8
9 2008-02-15  Darin Adler  <darin@apple.com>
10
11         - another Qt build fix
12
13         * platform/qt/ClipboardQt.cpp:
14         (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
15
16 2008-02-14  Darin Adler  <darin@apple.com>
17
18         - another round of build fixes
19
20         * platform/KURL.cpp:
21         (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
22         * platform/network/curl/ResourceHandleManager.cpp:
23         (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
24
25 2008-02-14  Darin Adler  <darin@apple.com>
26
27         - added back accidentally-removed files
28
29         * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
30         * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
31         * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
32
33 2008-02-14  Darin Adler  <darin@apple.com>
34
35         - more build fixes
36
37         * platform/KURL.cpp:
38         (WebCore::appendEncodedHostname): Use String to make a QString.
39         * platform/network/cf/ResourceRequest.h:
40         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
41         * platform/network/curl/ResourceHandleManager.cpp:
42         (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
43
44 2008-02-14  Darin Adler  <darin@apple.com>
45
46         - next Qt build fix
47
48         * platform/network/qt/ResourceRequest.h:
49         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
50
51 2008-02-14  Darin Adler  <darin@apple.com>
52
53         - another build fix
54
55         * platform/network/curl/ResourceRequest.h:
56         (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
57
58 2008-02-14  Darin Adler  <darin@apple.com>
59
60         - first Qt build fix
61
62         * dom/XMLTokenizer.cpp:
63         (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
64
65 2008-02-14  Darin Adler  <darin@apple.com>
66
67         Reviewed by Eric Seidel.
68
69         Based on work by Marvin Decker <marv.decker@gmail.com>
70
71         - fix http://bugs.webkit.org/show_bug.cgi?id=16538
72           KURL should use String instead of DeprecatedString
73
74         - fix http://bugs.webkit.org/show_bug.cgi?id=16485
75           DocLoader::checkForReload will crash if the URL isNull
76           and a similar problem in IconDatabase
77
78         - fix http://bugs.webkit.org/show_bug.cgi?id=16487
79           KURL doesn't preserve isNull when constructed with a DeprecatedString
80
81         - changed completeURL and various DOM getters to return KURL, to avoid
82           conversion back and forth from KURL to String
83
84         - changed the conversion of KURL to NSURL or NSString to be automatic,
85           to ease the use of KURL in Objective C DOM bindings, and eliminated
86           the getNSURL function
87
88         - because I had to visit the DOM bindings anyway, eliminated almost all
89           the use of the KJS namespace for things in WebCore
90
91         - fixed HTMLOptionElement constructor to check for undefined rather
92           than size of the arguments array
93
94         - eliminated some other unnecessary uses of DeprecatedString
95
96         - changed String::split to take a Vector parameter instead of returning
97           a Vector, for better performance
98
99         - added a couple of missing calls to do layout in SVG image handling;
100           I was able to reproduce these only because I had broken URLs for a
101           while -- not sure how to reproduce them now but the changes are
102           clearly needed
103
104         Performance testing shows this to be at least a 1% speedup.
105
106         Added a new function protocolIs to efficiently compare protocols
107         without case errors and a blankURL function so we don't have to
108         code "about:blank" in multiple places in the code and don't have to
109         construct a frash KURL each time. Moved decode_string and encode_string
110         out of KURL and gave them clearer names.
111
112         Made KURL constructors explicit to highlight potentially-expensive
113         operations and the poor semantics of KURL's constructor that takes
114         a String.
115
116         * WebCore.base.exp: Updated.
117
118         * bindings/js/JSAttrCustom.cpp:
119         (WebCore::JSAttr::setValue): Use protocolIs.
120         * bindings/js/JSAudioConstructor.h: KJS namespace change.
121         * bindings/js/JSCSSRuleCustom.cpp:
122         (WebCore::toJS): Ditto.
123         * bindings/js/JSCSSValueCustom.cpp:
124         (WebCore::toJS): Ditto.
125         * bindings/js/JSDocumentCustom.cpp:
126         (WebCore::JSDocument::location): Ditto.
127         (WebCore::JSDocument::setLocation): Updated for KURL change.
128         (WebCore::toJS): KJS namespace change.
129         * bindings/js/JSElementCustom.cpp:
130         (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
131         (WebCore::JSElement::setAttribute): KJS namespace change.
132         (WebCore::JSElement::setAttributeNode): Ditto.
133         (WebCore::JSElement::setAttributeNS): Ditto.
134         (WebCore::JSElement::setAttributeNodeNS): Ditto.
135         * bindings/js/JSHTMLFrameElementCustom.cpp:
136         (WebCore::allowSettingJavascriptURL): Use protocolIs.
137         (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.
138         (WebCore::JSHTMLFrameElement::setLocation): Ditto.
139         * bindings/js/JSHTMLIFrameElementCustom.cpp:
140         (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs.
141         * bindings/js/JSHTMLOptionElementConstructor.cpp:
142         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
143         (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the
144         structure a bit and changed checking to check for undefined rather than
145         number of arguments.
146         * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change.
147         * bindings/js/JSLocation.cpp:
148         (WebCore::JSLocation::put): Eliminated some DeprecatedString use,
149         and use protocolIs.
150         (WebCore::jsLocationProtoFuncReplace): Ditto.
151         (WebCore::jsLocationProtoFuncReload): Ditto.
152         (WebCore::jsLocationProtoFuncAssign): Ditto.
153         * bindings/js/JSLocation.h: KJS namespace change.
154         * bindings/js/JSNamedNodeMapCustom.cpp:
155         (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto.
156         (WebCore::JSNamedNodeMap::nameGetter): Ditto.
157         * bindings/js/JSNamedNodesCollection.cpp:
158         (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto.
159         * bindings/js/JSNamedNodesCollection.h: Ditto.
160         * bindings/js/JSXMLHttpRequest.cpp:
161         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed
162         DeprecatedString use.
163         (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto.
164         * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore
165         namespace.
166         * bindings/js/JSXSLTProcessor.cpp: Namespace change.
167         * bindings/js/JSXSLTProcessor.h: Ditto.
168
169         * bindings/js/kjs_binding.cpp: Updated for namespace change.
170         (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM
171         classes to return KURL even if the DOM expects a string.
172         (WebCore::jsStringOrUndefined): Ditto.
173         (WebCore::jsStringOrFalse): Ditto.
174         * bindings/js/kjs_binding.h: Moved everything into the WebCore
175         namespace.
176
177         * bindings/js/kjs_css.h: Namespace change.
178         * bindings/js/kjs_events.cpp: Removed an include.
179         * bindings/js/kjs_events.h: Namespace change.
180         * bindings/js/kjs_html.h: Namespace change.
181
182         * bindings/js/kjs_navigator.cpp: Moved everything into the
183         WebCore namespace.
184         * bindings/js/kjs_navigator.h: Ditto.
185
186         * bindings/js/kjs_window.cpp:
187         (KJS::parseModalDialogFeatures): Updated for String::split change.
188         (KJS::createWindow): Use protocolIs and removed some DeprecatedString.
189         (KJS::Window::put): Ditto.
190         (KJS::Window::allowsAccessFrom): Ditto.
191         (KJS::windowProtoFuncOpen): Ditto.
192
193         * bindings/objc/DOM.mm:
194         (-[DOMElement _getURLAttribute:]): Removed getNSURL call.
195         * bindings/objc/DOMHTML.mm:
196         (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
197
198         * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from
199         KURL will work.
200         * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also
201         updated includes so conversions from KURL will work.
202         * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from
203         KURL will work.
204
205         * bridge/mac/WebCoreAXObject.mm:
206         (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call.
207         Also streamlined the logic.
208         (AXAttributedStringAppendText): Ditto.
209
210         * bridge/mac/WebCoreScriptDebugger.mm:
211         (toNSString): Tweaked.
212         (toNSURL): Removed getNSURL call.
213
214         * css/CSSImageValue.cpp:
215         (WebCore::CSSImageValue::image): Removed DeprecatedString use.
216         * css/CSSImportRule.cpp:
217         (WebCore::CSSImportRule::insertedIntoParent): Ditto.
218         * css/CSSParser.cpp:
219         (WebCore::CSSParser::parseValue): Ditto.
220         (WebCore::CSSParser::parseContent): Ditto.
221         (WebCore::CSSParser::parseBackgroundImage): Ditto.
222         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
223         (WebCore::CSSParser::parseBorderImage): Ditto.
224         * css/CSSStyleSelector.cpp:
225         (WebCore::CSSStyleSelector::setEncodedURL): Ditto.
226         (WebCore::checkPseudoState): Ditto.
227         * css/CSSStyleSelector.h: Ditto.
228
229         * css/MediaList.cpp:
230         (WebCore::MediaList::setMediaText): Updated for String::split change.
231
232         * css/StyleBase.cpp:
233         (WebCore::StyleBase::baseURL): Return KURL.
234         * css/StyleBase.h: DItto.
235
236         * dom/Document.cpp:
237         (WebCore::Document::~Document): Updated for namespace change.
238         (WebCore::Document::documentURI): Return KURL.
239         (WebCore::Document::setDocumentURI): Removed DeprecatedString use.
240         (WebCore::Document::baseURI): Return KURL.
241         (WebCore::Document::open): Updated to use blankURL.
242         (WebCore::Document::setURL): Take KURL.
243         (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for
244         change to use KURL
245         (WebCore::Document::setBaseURL): Take KURL.
246         (WebCore::Document::elementSheet): Updated for KURL change.
247         (WebCore::Document::mappedElementSheet): Ditto.
248         (WebCore::Document::processHttpEquiv): Ditto.
249         (WebCore::Document::recalcStyleSelector): Removed use of
250         DeprecatedString -- also noticed some dead code here!
251         (WebCore::Document::setCookie): Ditto.
252         (WebCore::Document::completeURL): Return KURL.
253         * dom/Document.h: Use KURL instead of String in a few places.
254
255         * dom/DocumentType.cpp:
256         (WebCore::DocumentType::baseURI): Return KURL.
257         * dom/DocumentType.h: Ditto.
258
259         * dom/Element.cpp:
260         (WebCore::Element::baseURI): Return KURL.
261         * dom/Element.h: Ditto.
262
263         * dom/Node.cpp:
264         (WebCore::Node::setDocument): Namespace change.
265         (WebCore::Node::baseURI): Return KURL.
266         * dom/Node.h: Ditto.
267
268         * dom/ProcessingInstruction.cpp:
269         (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change.
270         * dom/StyleElement.cpp:
271         (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of
272         String for better performance.
273         (WebCore::StyleElement::createSheet): Removed use of DeprecateString.
274         * dom/XMLTokenizer.cpp:
275         (WebCore::XMLTokenizer::endElementNs): Updated for KURL change.
276         (WebCore::XMLTokenizer::end): Ditto.
277         (WebCore::xmlDocPtrForString): Removed use of DeprecateString.
278         * dom/XMLTokenizer.h: Ditto.
279
280         * editing/markup.cpp: Moved appendString to PlatformString.h.
281         (WebCore::appendQuotedURLAttributeValue): Use protocolIs.
282         (WebCore::completeURLs): Removed DeprecatedString use.
283         (WebCore::createFragmentFromMarkup): Use blankURL.
284         (WebCore::fillContainerFromString): Removed DeprecatedString use.
285         (WebCore::createFragmentFromText): Ditto.
286
287         * history/HistoryItem.cpp:
288         (WebCore::HistoryItem::url): Removed DeprecatedString use.
289         (WebCore::HistoryItem::originalURL): Ditto.
290         * history/HistoryItem.h: Removed include.
291
292         * html/HTMLAnchorElement.cpp:
293         (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of
294         DeprecatedString.
295         (WebCore::HTMLAnchorElement::href): Return KURL.
296         (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use.
297         (WebCore::HTMLAnchorElement::host): Ditto.
298         (WebCore::HTMLAnchorElement::hostname): Ditto.
299         (WebCore::HTMLAnchorElement::pathname): Ditto.
300         (WebCore::HTMLAnchorElement::port): Ditto.
301         (WebCore::HTMLAnchorElement::protocol): Ditto.
302         (WebCore::HTMLAnchorElement::search): Ditto.
303         (WebCore::HTMLAnchorElement::toString): Ditto.
304         * html/HTMLAnchorElement.h: Ditto.
305         * html/HTMLAppletElement.cpp:
306         (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change.
307         * html/HTMLAreaElement.cpp:
308         (WebCore::HTMLAreaElement::href): Return KURL.
309         * html/HTMLAreaElement.h: Ditto.
310         * html/HTMLBaseElement.cpp:
311         (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change.
312         (WebCore::HTMLBaseElement::process): Removed DeprecatedString use.
313         * html/HTMLBodyElement.cpp:
314         (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change.
315         * html/HTMLEmbedElement.cpp:
316         (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of
317         DeprecatedString.
318         * html/HTMLEmbedElement.h: Removed DeprecatedString use.
319         * html/HTMLFormElement.cpp:
320         (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs.
321         (WebCore::encodeCString): Updated for change to String::split.
322         (WebCore::HTMLFormElement::dataEncoding): Ditto.
323         (WebCore::HTMLFormElement::formData): Removed DeprecatedString use.
324         (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs.
325         (WebCore::HTMLFormElement::submit): Updated for KURL change.
326         (WebCore::HTMLFormElement::reset): Ditto.
327         * html/HTMLFrameElementBase.cpp:
328         (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change
329         and use equalIgnoringRef instead of doing a setRef to get the same effect.
330         (WebCore::HTMLFrameElementBase::openURL): Use blankURL.
331         (WebCore::HTMLFrameElementBase::location): Return KURL.
332         (WebCore::HTMLFrameElementBase::src): Return KURL.
333         * html/HTMLFrameElementBase.h: Ditto.
334         * html/HTMLImageElement.cpp:
335         (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change.
336         (WebCore::HTMLImageElement::longDesc): Return KURL.
337         (WebCore::HTMLImageElement::lowsrc): Return KURL.
338         (WebCore::HTMLImageElement::src): Return KURL.
339         * html/HTMLImageElement.h: Ditto. Also removed imageMap() function.
340         * html/HTMLInputElement.cpp:
341         (WebCore::HTMLInputElement::src): Return KURL.
342         * html/HTMLInputElement.h: Ditto.
343         * html/HTMLLinkElement.cpp:
344         (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change.
345         (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change.
346         (WebCore::HTMLLinkElement::href): Return KURL.
347         * html/HTMLLinkElement.h: Ditto.
348         * html/HTMLMediaElement.cpp:
349         (WebCore::HTMLMediaElement::src): Return KURL.
350         (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change.
351         * html/HTMLMediaElement.h: Ditto.
352         * html/HTMLObjectElement.cpp:
353         (WebCore::HTMLObjectElement::isImageType): Use protocolIs.
354         (WebCore::HTMLObjectElement::data): Return KURL.
355         * html/HTMLObjectElement.h: Ditto.
356         * html/HTMLOptGroupElement.cpp:
357         (WebCore::HTMLOptGroupElement::groupLabelText): Removed DeprecatedString use.
358         * html/HTMLParser.cpp:
359         (WebCore::HTMLParser::reportErrorToConsole): Updated for KURL change.
360         * html/HTMLScriptElement.cpp:
361         (WebCore::HTMLScriptElement::insertedIntoDocument): Ditto.
362         (WebCore::HTMLScriptElement::text): Changed to use Vector<UChar> instead of
363         String for better performance.
364         (WebCore::HTMLScriptElement::src): Return KURL.
365         * html/HTMLScriptElement.h: Ditto.
366         * html/HTMLSourceElement.cpp:
367         (WebCore::HTMLSourceElement::src): Return KURL.
368         * html/HTMLSourceElement.h: Ditto.
369         * html/HTMLTableElement.cpp:
370         (WebCore::HTMLTableElement::parseMappedAttribute): Updated for KURL change.
371         * html/HTMLTablePartElement.cpp:
372         (WebCore::HTMLTablePartElement::parseMappedAttribute): Updated for KURL change.
373         * html/HTMLTextAreaElement.cpp:
374         (WebCore::HTMLTextAreaElement::setValue): Removed DeprecatedString use.
375         * html/HTMLTokenizer.cpp:
376         (WebCore::HTMLTokenizer::scriptExecution): Ditto.
377         (WebCore::HTMLTokenizer::notifyFinished): Use protocolIs.
378         * html/HTMLVideoElement.cpp:
379         (WebCore::HTMLVideoElement::poster): Return KURL.
380         * html/HTMLVideoElement.h: Ditto.
381         * html/HTMLViewSourceDocument.cpp:
382         (WebCore::HTMLViewSourceDocument::addText): Updated for String::split change.
383
384         * loader/DocLoader.cpp:
385         (WebCore::DocLoader::checkForReload): Add an explicit check for an empty URL
386         here to avoid problems using its string as a hash table key later.
387         (WebCore::DocLoader::requestResource): Removed DeprecatedString use.
388
389         * loader/FTPDirectoryDocument.cpp:
390         (WebCore::FTPDirectoryTokenizer::createTDForFilename): Updated for KURL change.
391         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Removed use of
392         DeprecatedString.
393
394         * loader/FrameLoader.cpp:
395         (WebCore::FrameLoader::requestFrame): Use protocolIs.
396         (WebCore::FrameLoader::loadSubframe): Use blankURL.
397         (WebCore::FrameLoader::submitForm): Use protocolIs and removed use of
398         DeprecatedString.
399         (WebCore::FrameLoader::iconURL): Return KURL. Use protcolIs.
400         (WebCore::FrameLoader::didOpenURL): Use protocolIs.
401         (WebCore::FrameLoader::didExplicitOpen): Use blankURL.
402         (WebCore::FrameLoader::executeIfJavaScriptURL): Use protocolIs.
403         Update for name change to decodeURLEscapeSequences.
404         (WebCore::FrameLoader::receivedFirstData): Updated for KURL changes.
405         (WebCore::FrameLoader::begin): Removed DeprecatedString use.
406         Renamed baseurl to baseURL. Updated to use KURL more.
407         (WebCore::FrameLoader::gotoAnchor): Removed use of encodedHtmlRef
408         function, which is no different from ref.
409         (WebCore::FrameLoader::completeURL): Updated for KURL change.
410         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
411         (WebCore::FrameLoader::canCachePage): Use protocolIs.
412         (WebCore::FrameLoader::updatePolicyBaseURL): Update for KURL change.
413         (WebCore::FrameLoader::setPolicyBaseURL): Take KURL.
414         (WebCore::FrameLoader::startRedirectionTimer): Removed use of
415         DeprecatedString.
416         (WebCore::FrameLoader::load): Use protocolIs.
417         (WebCore::FrameLoader::shouldHideReferrer): Use protocolIs.
418         (WebCore::FrameLoader::shouldAllowNavigation): Updated for KURL change.
419         (WebCore::FrameLoader::commitProvisionalLoad): Use blankURL.
420         (WebCore::FrameLoader::open): Use protcolIs.
421         (WebCore::FrameLoader::createHistoryItem): Use blankURL.
422         (WebCore::FrameLoader::createJavaAppletWidget): Updated for KURL change.
423         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Removed
424         DeprecatedString use.
425         * loader/FrameLoader.h: Ditto.
426
427         * loader/ImageDocument.cpp:
428         (WebCore::ImageDocument::createDocumentStructure): Updated for KURL change.
429         * loader/PluginDocument.cpp:
430         (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
431
432         * loader/icon/IconDatabase.cpp:
433         (WebCore::IconDatabase::iconForPageURL): Added a check for an empty URL
434         before trying to use it as a hash table key.
435
436         * loader/icon/IconLoader.h: Tweaked includes.
437
438         * loader/loader.cpp:
439         (WebCore::Loader::servePendingRequests): Use protcolIs. Also removed some
440         code to set up a local variable that is never used (and a DeprecatedString
441         on to boot!).
442
443         * loader/mac/LoaderNSURLExtras.m:
444         (suggestedFilenameWithMIMEType): Removed unnecessary typecast.
445
446         * page/ContextMenuController.cpp: Removed include.
447
448         * page/mac/EventHandlerMac.mm:
449         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
450         Use protocolIs.
451
452         * page/mac/WebCoreFrameBridge.mm:
453         (-[WebCoreFrameBridge URLWithAttributeString:]): Removed getNSURL call.
454         (-[WebCoreFrameBridge baseURL]): Ditto.
455
456         * platform/KURL.cpp:
457         (WebCore::isSchemeFirstChar): Fixed bug in handling of values >= 0x80.
458         (WebCore::isSchemeChar): Ditto.
459         (WebCore::isPathSegmentEndChar): Ditto.
460         (WebCore::hexDigitValue): Changed parameter type to UChar.
461         (WebCore::copyASCII): Added.
462         (WebCore::findFirstOf): Added.
463         (WebCore::KURL::protocolIs): Added.
464         (WebCore::KURL::KURL): Tightened logic up quite a bit. Changed parameter
465         types from DeprecatedString to String.
466         (WebCore::KURL::init): Changed parameter type to String. Preserved the
467         passed-in string even if the base is invalid. Cleaned up logic to determine
468         if the originalString should be pased in to the parse function. Simplified
469         by calling the new parse overload that takes String in many cases.
470         (WebCore::KURL::lastPathComponent): Return String.
471         (WebCore::KURL::protocol): Ditto.
472         (WebCore::KURL::host): Ditto.
473         (WebCore::KURL::port): Changed logic to use early return for clarity.
474         (WebCore::KURL::pass): Return String.
475         (WebCore::KURL::user): Ditto.
476         (WebCore::KURL::ref): Ditto.
477         (WebCore::assertProtocolIsGood): Added.
478         (WebCore::KURL::protocolIs): Added.
479         (WebCore::KURL::query): Return String.
480         (WebCore::KURL::path): Ditto.
481         (WebCore::KURL::setProtocol): Take String.
482         (WebCore::KURL::setHost): Ditto.
483         (WebCore::KURL::setPort): Use String.
484         (WebCore::KURL::setHostAndPort): Take String.
485         (WebCore::KURL::setUser): Ditto.
486         (WebCore::KURL::setPass): Ditto.
487         (WebCore::KURL::setRef): Ditto.
488         (WebCore::KURL::setQuery): Ditto.
489         (WebCore::KURL::setPath): Ditto.
490         (WebCore::KURL::prettyURL): Return String. Use Vector<UChar> to build it.
491         (WebCore::decodeURLEscapeSequences): Renamed from KURL::decode_string.
492         Return String. Use Vector<UChar> to build it.
493         (WebCore::KURL::isLocalFile): Use protocolIs.
494         (WebCore::KURL::parse): Added an overload that takes a String to replace
495         the use of DeprecatedString::ascii at various call sites. Updated for
496         name change (urlString -> m_string).
497         (WebCore::equalIgnoringRef): Wrote a new implementation that doesn't
498         do any allocation.
499         (WebCore::encodeWithURLEscapeSequences): Renamed from KURL::encode_string.
500         Return String.
501         (WebCore::appendEncodedHostname): Added. Replaces encodeHostname and
502         avoids the need to allocate a string.
503         (WebCore::findHostnamesInMailToURL): Update to use findFirstOf instead of
504         regular expressions.
505         (WebCore::findHostnameInHierarchicalURL): Ditto.
506         (WebCore::encodeHostnames): Use protocolIs and the other helpers above.
507         (WebCore::encodeRelativeString): Changed to put result into a CharBuffer.
508         (WebCore::substituteBackslashes): Updated to use String.
509         (WebCore::KURL::copyToBuffer): Added.
510         (WebCore::protocolIs): Added.
511         (WebCore::blankURL): Added.
512         (WebCore::KURL::print): Updated.
513         * platform/KURL.h: Added a number of comments. Reorganized the header a bit.
514         Made the string constructors explicit. Changed to use String instead of
515         DeprecatedString. Removed encodedHTMLRef. Renamed and added a few functions.
516
517         * platform/cf/KURLCFNet.cpp:
518         (WebCore::KURL::KURL): Streamlined the logic a bit.
519         (WebCore::KURL::createCFURL): Changed to use copyToBuffer.
520
521         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
522         (WebCore::MediaPlayerPrivate::createQTMovie): Removed getNSURL call.
523         Use protocolIs.
524         * platform/mac/ClipboardMac.mm:
525         (WebCore::ClipboardMac::declareAndWriteDragImage): Removed getNSURL call.
526         * platform/mac/CookieJar.mm:
527         (WebCore::cookies): Removed getNSURL call.
528         (WebCore::setCookies): Removed getNSURL call.
529         * platform/mac/KURLMac.mm:
530         (WebCore::KURL::KURL): Streamlined the logic a bit.
531         * platform/mac/PasteboardMac.mm:
532         (WebCore::Pasteboard::writeURL): Removed getNSURL call.
533         (WebCore::Pasteboard::writeImage): Ditto.
534         * platform/mac/SSLKeyGeneratorMac.mm:
535         (WebCore::signedPublicKeyAndChallengeString): Ditto.
536
537         * platform/network/HTTPParsers.cpp:
538         (WebCore::filenameFromHTTPContentDisposition): Updated for String::split.
539         * platform/network/ResourceHandle.cpp:
540         (WebCore::ResourceHandle::portAllowed): Use protocolIs.
541
542         * platform/network/cf/ResourceErrorCF.cpp:
543         (WebCore::ResourceError::operator CFErrorRef): Removed deprecatedString call.
544         * platform/network/curl/ResourceHandleManager.cpp:
545         (WebCore::headerCallback): Ditto.
546         (WebCore::parseDataUrl): Use String instead of DeprecatedString.
547         (WebCore::ResourceHandleManager::startJob): Updated for KURL changes.
548         * platform/network/mac/ResourceErrorMac.mm:
549         (WebCore::ResourceError::operator NSError*): Removed getNSURL call.
550         * platform/network/mac/ResourceRequest.h:
551         (WebCore::ResourceRequest::ResourceRequest): Removed DeprecatedString use.
552         * platform/network/mac/ResourceRequestMac.mm:
553         (WebCore::ResourceRequest::doUpdatePlatformRequest): Removed getNSURL call.
554         * platform/network/mac/ResourceResponseMac.mm:
555         (WebCore::ResourceResponse::nsURLResponse): Removed getNSURL call.
556
557         * platform/qt/ClipboardQt.cpp:
558         (WebCore::ClipboardQt::writeURL): Removed deprecatedString call.
559
560         * platform/text/CString.h:
561         (WebCore::CStringBuffer::length): Fixed size_t/unsigned mismatch to make it
562         possible to compile this on Windows with higher warning level
563
564         * platform/text/PlatformString.h: Updated split to modify a result parameter
565         rather than returning a Vector. Added charactersAreAllASCII and an append
566         function that appends a String to a Vector<UChar>.
567         * platform/text/String.cpp:
568         (WebCore::String::split): Updated.
569
570         * platform/win/BString.cpp:
571         (WebCore::BString::BString): Added conversion from KURL.
572         * platform/win/BString.h: Ditto.
573
574         * platform/win/ClipboardUtilitiesWin.cpp:
575         (WebCore::markupToCF_HTML): Removed use of deprecatedString.
576         * platform/win/ClipboardWin.cpp:
577         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
578         (WebCore::createGlobalHDropContent): Ditto.
579         (WebCore::ClipboardWin::setData): Ditto.
580         (WebCore::ClipboardWin::writeRange): Ditto.
581         * platform/win/PasteboardWin.cpp:
582         (WebCore::Pasteboard::writeSelection): Ditto.
583         * plugins/PluginStream.cpp:
584         (WebCore::PluginStream::startStream): Ditto.
585         (WebCore::PluginStream::destroyStream): Ditto.
586         * plugins/win/PluginViewWin.cpp:
587         (WebCore::scriptStringIfJavaScriptURL): Ditto.
588         (WebCore::PluginView::performRequest): Ditto.
589         (WebCore::PluginView::PluginView): Ditto.
590
591         * rendering/HitTestResult.cpp:
592         (WebCore::HitTestResult::absoluteImageURL): Removed DeprecatedString use.
593         (WebCore::HitTestResult::absoluteLinkURL): Ditto.
594
595         * rendering/RenderFrameSet.cpp:
596         (WebCore::RenderFrameSet::layOutAxis): Fixed comment wording.
597         * rendering/RenderImage.cpp:
598         (WebCore::RenderImage::paintReplaced): Removed use of DeperecatedString,
599         (WebCore::RenderImage::imageMap): Changed to call useMap instead of imageMap;
600         both do the same thing, and the first is standard DOM.
601
602         * rendering/RenderObject.cpp:
603         (WebCore::RenderObject::addPDFURLRect): Rewrote and streamlined to remove
604         DeprecatedString use.
605         * rendering/RenderObject.h: Changed addPDFURLRect to take const IntRect&.
606
607         * rendering/RenderPartObject.cpp:
608         (WebCore::isURLAllowed): Updated for KURL change and use equalIgnoringRef
609         instead of doing a setRef to get the same effect.
610         (WebCore::RenderPartObject::updateWidget): Updated for KURL change.
611
612         * rendering/RenderText.cpp:
613         (WebCore::charactersAreAllASCII): Moved the guts to PlatformString.h.
614
615         * rendering/SVGRenderSupport.cpp:
616         (WebCore::renderSubtreeToImage): Added missing call to do layout. I ran
617         into this while doing some layout tests while URL processing was broken.
618
619         * rendering/SVGRenderTreeAsText.h: Removed include.
620
621         * svg/SVGImageLoader.cpp:
622         (WebCore::SVGImageLoader::updateFromElement): Removed DeprecatedString use.
623
624         * svg/graphics/SVGImage.cpp:
625         (WebCore::SVGImage::draw): Added missing call to do layout. I ran
626         into this while doing some layout tests while URL processing was broken.
627         (WebCore::SVGImage::dataChanged): Use a null URL rather than an arbitrary
628         string for the document.
629
630         * xml/XMLHttpRequest.cpp:
631         (WebCore::XMLHttpRequest::getResponseXML): Removed DeprecatedString use.
632         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): Ditto.
633         (WebCore::XMLHttpRequest::open): Ditto.
634         (WebCore::XMLHttpRequest::send):  Namespace change.
635         (WebCore::XMLHttpRequest::dropProtection): Ditto.
636         * xml/XMLHttpRequest.h: Removed DeprecatedString use.
637
638         * xml/XSLImportRule.cpp:
639         (WebCore::XSLImportRule::loadSheet): Removed DeprecatedString use.
640         * xml/XSLStyleSheet.cpp:
641         (WebCore::XSLStyleSheet::loadChildSheets): Ditto.
642         (WebCore::XSLStyleSheet::loadChildSheet): Ditto.
643         * xml/XSLStyleSheet.h: Ditto.
644         * xml/XSLTProcessor.cpp:
645         (WebCore::docLoaderFunc): Ditto.
646         (WebCore::xsltStylesheetPointer): Ditto.
647         (WebCore::xmlDocPtrFromNode): Ditto.
648
649 2008-02-14  Ada Chan  <adachan@apple.com>
650
651         <rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
652         
653         Reviewed by Jon and Darin.
654
655         * page/Frame.cpp:
656         (WebCore::createRegExpForLabels):
657         (WebCore::Frame::searchForLabelsBeforeElement):
658         (WebCore::Frame::matchLabelsAgainstElement):
659
660 2008-02-14  Stephanie Lewis  <slewis@apple.com>
661
662         Reviewed by Geoff.
663
664         Update order files.
665
666         * WebCore.order:
667
668 2008-02-14  Oliver Hunt  <oliver@apple.com>
669
670         Reviewed by Geoff G and Weinig.
671
672         <rdar://problem/5726608> REGRESSION (r29428): Assigning to window.status does not update status bar
673
674         Revert the portions of r29428 responsible for breaking the ability to
675         set window.status
676
677         * page/DOMWindow.cpp:
678         (WebCore::DOMWindow::setStatus):
679         (WebCore::DOMWindow::defaultStatus):
680         (WebCore::DOMWindow::setDefaultStatus):
681         * page/DOMWindow.h:
682         * page/DOMWindow.idl:
683
684 2008-02-14  Anders Carlsson  <andersca@apple.com>
685
686         Reviewed by Darin.
687
688         <rdar://problem/5721790>
689         Crash in WebCore::DeprecatedString::operator= + 31 at news.google.com
690         
691         Use pointers in the cache map tables. Otherwise when we rehash, 
692         we will end up destroying Cache objects that node lists might point to.
693         
694         * dom/Node.cpp:
695         (WebCore::NodeListsNodeData::~NodeListsNodeData):
696         (WebCore::Node::getElementsByName):
697         (WebCore::Node::getElementsByClassName):
698
699 2008-02-14  Alp Toker  <alp@atoker.com>
700
701         Reviewed by Darin.
702
703         http://bugs.webkit.org/show_bug.cgi?id=17353
704         XMLTokenizer installs global libxml2 callbacks that can break client applications
705
706         Patch by Mark Rowe (with a few changes).
707
708         The xmlRegisterInputCallbacks/xmlRegisterOutputCallbacks done at
709         init are global so we need to make sure these callbacks only get used
710         by XMLTokenizer and never by libxml2 calls in user applications.
711
712         This patch modifies the match and open functions to only apply when we
713         are certain the caller is XMLTokenizer by checking globalDocLoader and
714         ensuring we're on the correct thread.
715
716         Some possible issues remain. See the bug report for details.
717
718         * dom/XMLTokenizer.cpp:
719         (WebCore::matchFunc):
720         (WebCore::openFunc):
721         (WebCore::createStringParser):
722
723 2008-02-14  Timothy Hatcher  <timothy@apple.com>
724
725         Reviewed by Darin Adler.
726
727         <rdar://problem/5743768> A deadlock during storage layout tests
728
729         Make sure not to hold the m_openDatabaseMapGuard mutex when calling
730         Database::markAsDeletedAndClose(), since that can cause a deadlock
731         during the synchronous DatabaseThread call it triggers.
732
733         * storage/DatabaseTracker.cpp:
734         (WebCore::DatabaseTracker::deleteDatabaseFile):
735
736 2008-02-14  Adam Roben  <aroben@apple.com>
737
738         Conditionalize cross-document messaging support
739
740         The cross-document messaging parts of HTML 5 are in flux and we want
741         ports to be able to turn off the support as needed.
742
743         Note that the support is turned off by default right now. A subsequent
744         commit will turn it on by default.
745
746         Reviewed by Darin.
747
748         * GNUmakefile.am:
749         * WebCore.vcproj/build-generated-files.sh:
750         * bindings/js/JSDOMWindowCustom.cpp:
751         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
752         * bindings/js/JSEventCustom.cpp:
753         (WebCore::toJS):
754         * dom/Event.cpp:
755         (WebCore::Event::isMessageEvent):
756         * dom/Event.h:
757         * dom/MessageEvent.cpp:
758         * dom/MessageEvent.h:
759         * dom/MessageEvent.idl:
760         * page/DOMWindow.cpp:
761         (WebCore::DOMWindow::postMessage):
762         * page/DOMWindow.h:
763         * page/DOMWindow.idl:
764
765 2008-02-14  Adam Roben  <aroben@apple.com>
766
767         Improve the efficiency of SecurityOriginHash
768
769         Reviewed by Alexey.
770
771         * platform/SecurityOriginHash.h:
772         (WebCore::SecurityOriginHash::hash): Now takes a const
773         RefPtr<SecurityOrigin>& to reduce ref-count churn.
774         (WebCore::SecurityOriginHash::equal): Ditto.
775
776 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
777
778         Reviewed by Oliver Hunt.
779
780         Fixes the editing/deleting/5729680.html failure.  It succeeds when run by itself
781         but fails when run with other tests because FramePrivate's m_selectionGranularity
782         isn't reset when a Frame receives a new document.  It was also uninitialized in
783         the constructor.
784
785         * loader/FrameLoader.cpp:
786         (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
787         * page/Frame.cpp:
788         (WebCore::FramePrivate::FramePrivate): Ditto.
789
790 2008-02-13  Jon Honeycutt  <jhoneycutt@apple.com>
791
792         Reviewed by Anders.
793
794         <rdar://problem/5739282> Hangs after closing video trailer popup with
795         VLC plugin
796
797         VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
798         handle.
799
800         * plugins/PluginQuirkSet.h: Added new quirk
801         PluginQuirkDontSetNullWindowHandleOnDestroy.
802         (WebCore::):
803         * plugins/win/PluginViewWin.cpp:
804         (WebCore::PluginView::stop): Selectively call NPP_SetWindow.
805         (WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
806
807 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
808
809         Reviewed by Alp Toker.
810
811         Fix non-SVG builds.
812
813         * css/CSSCursorImageValue.cpp:
814
815 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
816
817         Reviewed by Adam Roben.
818
819         <rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
820         
821         * editing/Editor.cpp:
822         (WebCore::Editor::deleteWithDirection): Fixed a typo.
823
824 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
825
826         Reviewed by Oliver.
827
828         Actually fix the manual-tests/svg-cursor-changes.svg testcase.
829         I only reran layout tests when fixing the last issues with the patch,
830         instead of trying the manual-test :( Fixed.
831
832         * css/CSSCursorImageValue.cpp:
833         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
834         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
835         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
836         * css/CSSCursorImageValue.h:
837
838 2008-02-13  Adam Roben  <aroben@apple.com>
839
840         Windows build fix
841
842         * css/CSSCursorImageValue.cpp: #include MathExtras.h to get roundf.
843
844 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
845
846         Reviewed by Darin & Eric.
847
848         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation)
849
850         SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
851         SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
852         CachedResourceClient itself, handling remote-image acquisation on its own.
853
854         RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image"
855         and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id).
856
857         SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
858         instead of storing the CachedImage in the CursorData class, as it's supposed to be.
859         Because of that several places in WebCore contain special SVG cursor handling - which
860         is unneeded.
861
862         Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId'
863         from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute
864         changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). Now you
865         can script the mouse cursor location using SVG - the feature anyone has waited for.
866
867         Added manual test case: manual-tests/svg-cursor-changes.svg (no support for cursors in DRT)
868
869         * css/CSSCursorImageValue.cpp:
870         (WebCore::isSVGCursorIdentifier):
871         (WebCore::resourceReferencedByCursorElement):
872         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
873         (WebCore::CSSCursorImageValue::updateIfNeeded):
874         (WebCore::CSSCursorImageValue::image):
875         * css/CSSCursorImageValue.h:
876         * css/CSSImageValue.cpp:
877         (WebCore::CSSImageValue::image):
878         * css/CSSImageValue.h:
879         * css/CSSParser.cpp:
880         (WebCore::CSSParser::parseValue):
881         * css/CSSStyleSelector.cpp:
882         (WebCore::CSSStyleSelector::applyProperty):
883         * manual-tests/svg-cursor-changes.svg: Added.
884         * page/EventHandler.cpp:
885         (WebCore::EventHandler::selectCursor):
886         * rendering/RenderStyle.cpp:
887         * rendering/RenderStyle.h:
888         (WebCore::CursorData::operator==):
889         * svg/SVGCursorElement.cpp:
890         (WebCore::SVGCursorElement::SVGCursorElement):
891         (WebCore::SVGCursorElement::~SVGCursorElement):
892         (WebCore::SVGCursorElement::parseMappedAttribute):
893         (WebCore::SVGCursorElement::addClient):
894         (WebCore::SVGCursorElement::removeClient):
895         (WebCore::SVGCursorElement::svgAttributeChanged):
896         * svg/SVGCursorElement.h:
897         (WebCore::SVGCursorElement::isValid):
898
899 2008-02-13  Alp Toker  <alp@atoker.com>
900
901         Reviewed by Adam Roben.
902
903         Split out pure-cairo Font code to FontCairo.cpp.
904
905         Part of the ongoing work to share code with the Win port.
906
907         * GNUmakefile.am:
908         * WebCore.pro:
909         * platform/graphics/cairo/FontCairo.cpp: Added.
910         (WebCore::Font::drawGlyphs):
911         * platform/graphics/gtk/FontGtk.cpp:
912
913 2008-02-13  Kevin Ollivier <kevino@theolliviers.com>
914
915         Reviewed by Darin Adler.
916
917         Import wx/defs.h to keep windows.h from using ANSI functions
918         (see note in file for more info) and use the 8-bit string friendly
919         version of StringImpl::computeHash since we're passing it un UTF8
920         string. Also, don't cache the hash result.
921         
922         http://bugs.webkit.org/show_bug.cgi?id=17321
923
924         * config.h:
925         * platform/graphics/wx/FontPlatformData.h:
926         (WebCore::FontPlatformData::hash):
927         (WebCore::FontPlatformData::computeHash):
928
929 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
930
931         Fix Bug 17220: Illogical dependency between PluginView and
932         PluginDatabase
933         
934         <http://bugs.webkit.org/show_bug.cgi?id=17220>
935
936         Reviewed by Adam and Darin.
937
938         Rename PluginDatabase::createPluginView to PluginView::create, to make
939         the illogical dependency between the two, logical
940         Make PluginDatabase::findPlugin a public method
941         Update the includes in PluginView and PluginDatabase for the change
942
943         * plugins/PluginDatabase.h:
944         * plugins/PluginView.h:
945         * plugins/win/PluginDatabaseWin.cpp:
946         * plugins/win/PluginViewWin.cpp:
947
948 2008-02-13  Adam Roben  <aroben@apple.com>
949
950         Build fix
951
952         * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
953
954 2008-02-13  Matt Lilek  <webkit@mattlilek.com>
955
956         Not reviewed, build fix.
957
958         * platform/graphics/cg/GraphicsContextCG.cpp:
959         (WebCore::GraphicsContext::paintBuffer):
960
961 2008-02-13  Darin Adler  <darin@apple.com>
962
963         - try to fix Wx build
964
965         * platform/graphics/wx/GraphicsContextWx.cpp:
966         (WebCore::GraphicsContext::paintBuffer): Added.
967
968         * platform/graphics/cairo/GraphicsContextCairo.cpp:
969         (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
970         * platform/graphics/cg/GraphicsContextCG.cpp:
971         (WebCore::GraphicsContext::paintBuffer): Ditto.
972         * platform/graphics/qt/GraphicsContextQt.cpp:
973         (WebCore::GraphicsContext::paintBuffer): Ditto.
974
975 2008-02-13  Darin Adler  <darin@apple.com>
976
977         - try to fix Wx build
978
979         * platform/wx/LocalizedStringsWx.cpp: Add missing include.
980
981 2008-02-11  Darin Adler  <darin@apple.com>
982
983         - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
984           incorrectly due to visibility fix
985
986         Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
987
988         * WebCore.base.exp: Rolled out change.
989         * css/CSSMutableStyleDeclaration.cpp:
990         (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
991         * page/Settings.cpp:
992         (WebCore::Settings::Settings): Ditto. But keep the initialization of
993         m_fontRenderingMode.
994         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
995         * page/Settings.h:
996         (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
997
998 2008-02-13  Alexey Proskuryakov  <ap@webkit.org>
999
1000         Reviewed by Darin.
1001
1002         <rdar://problem/5740042> Database termination issues
1003
1004         Test: storage/close-during-stress-test.html
1005
1006         * dom/Document.cpp:
1007         (WebCore::Document::databaseThread):
1008         * dom/Document.h:
1009         Don't re-create the database thread if it has been already terminated.
1010
1011         * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
1012         having a hanging reference.
1013
1014         * storage/DatabaseThread.cpp:
1015         (WebCore::DatabaseThread::requestTermination):
1016
1017         * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
1018         Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
1019
1020 2008-02-12  Bernhard Rosenkraenzer  <bero@arklinux.org>
1021
1022         Reviewed by Darin.
1023
1024         - fix http://bugs.webkit.org/show_bug.cgi?id=17340
1025           WebCore/platform/Timer.cpp fails to build with gcc 4.3
1026
1027         * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
1028
1029 2008-02-12  Timothy Hatcher  <timothy@apple.com>
1030
1031         Reviewed by Brady Eidson.
1032
1033         <rdar://problem/5652560> Can't delete database if the website that
1034         uses it has been opened in this session
1035
1036         Close the Database on the database thread before deleting the file.
1037         Tested and works on Windows and Mac.
1038
1039         * platform/sql/SQLiteDatabase.cpp:
1040         (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
1041         * storage/Database.cpp:
1042         (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
1043         Database tasks, and start and imediate DatabaseCloseTask.
1044         (WebCore::Database::close): Close the SQLDatabase.
1045         * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
1046         * storage/DatabaseTask.cpp:
1047         (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
1048         (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
1049         (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
1050         * storage/DatabaseTask.h: Add DatabaseCloseTask.
1051         * storage/DatabaseTracker.cpp:
1052         (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
1053           markAsDeletedAndClose.
1054
1055 2008-02-12  Oliver Hunt  <oliver@apple.com>
1056
1057         Reviewed by NOBODY (Build fix).
1058
1059         Endeavour to fix qt and gtk builds
1060
1061         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1062         * platform/graphics/qt/GraphicsContextQt.cpp:
1063
1064 2008-02-12  Oliver Hunt  <oliver@apple.com>
1065
1066         Reviewed by Eric S.
1067
1068         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
1069         Remove ifdef's from canvas paint code
1070
1071         By making GraphicsContext aware of the crossplatform ImageBuffer
1072         type we can migrate the ifdef-ified paint code in HTMLCanvasElement
1073         into platform implementations of GraphicsContext.
1074
1075         * html/HTMLCanvasElement.cpp:
1076         (WebCore::HTMLCanvasElement::paint):
1077         * platform/graphics/GraphicsContext.h:
1078         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1079         (WebCore::GraphicsContext::paintBuffer):
1080         * platform/graphics/cg/GraphicsContextCG.cpp:
1081         (WebCore::GraphicsContext::paintBuffer):
1082         * platform/graphics/qt/GraphicsContextQt.cpp:
1083         (WebCore::GraphicsContext::paintBuffer):
1084
1085 2008-02-12  Brady Eidson  <beidson@apple.com>
1086
1087         Reviewed by Darin Adler
1088
1089         Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
1090
1091         Layout tests will come shortly with a mess of DRT changes
1092
1093         * platform/SecurityOrigin.cpp:
1094         (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
1095           as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
1096           SecurityOrigin
1097
1098         * storage/Database.cpp:
1099         (WebCore::Database::changeVersion): Pass in the successCallback
1100         (WebCore::Database::transaction): Ditto
1101
1102         * storage/SQLTransaction.cpp:
1103         (WebCore::SQLTransaction::SQLTransaction):
1104         (WebCore::SQLTransaction::debugStepName):
1105         (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
1106         (WebCore::SQLTransaction::performPendingCallback): Ditto
1107         (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
1108           skip straight to cleanupAfterSuccessCallback()
1109         (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
1110           schedule cleanupAfterSuccessCallback()
1111         (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
1112         (WebCore::SQLTransaction::handleTransactionError):
1113         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
1114         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1115         * storage/SQLTransaction.h:
1116
1117 2008-02-12  Steve Falkenburg  <sfalken@apple.com>
1118
1119         Changes to support merged MIDL output.
1120         
1121         All COM interfaces are now generated to WebKit.h.
1122         
1123         Reviewed by Sam, Ada.
1124
1125         * bindings/scripts/CodeGeneratorCOM.pm:
1126
1127 2008-02-12  Dan Bernstein  <mitz@apple.com>
1128
1129         Reviewed by Adam Roben.
1130
1131         - fix http://bugs.webkit.org/show_bug.cgi?id=17041
1132           <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
1133
1134         Revised the system fallback font lookup logic to use MLang font linking
1135         again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
1136         for CJK characters, try linking based on a single code page at a time,
1137         starting with the user's default code page (if it is one of the CJK
1138         code pages) followed by the other CJK code pages in a prescribed order
1139         that matches what Firefox does.
1140
1141         * platform/graphics/win/FontCacheWin.cpp:
1142         (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
1143         code pages, with the user's default code page first.
1144         (WebCore::currentFontContainsCharacter): Factored out of
1145         getFontDataForCharacters().
1146         (WebCore::createMLangFont): Ditto.
1147         (WebCore::FontCache::getFontDataForCharacters):
1148
1149 2008-02-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1150
1151         Reviewed by Alp Toker.
1152
1153         Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
1154         Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
1155
1156         * WebCore.pro:
1157
1158 2008-02-12  Dan Bernstein  <mitz@apple.com>
1159
1160         Reviewed by Timothy Hatcher.
1161
1162         - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
1163
1164         * platform/graphics/cg/GraphicsContextCG.cpp:
1165         (WebCore::GraphicsContext::setShadow):
1166
1167 2008-02-12  Brady Eidson  <beidson@apple.com>
1168
1169         Release build fix
1170
1171         * storage/DatabaseTask.cpp:
1172
1173 2008-02-12  Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
1174
1175         Reviewed by Brady.
1176
1177         http://bugs.webkit.org/show_bug.cgi?id=17177
1178         <rdar://problem/5729619> Storage tasks are getting lost
1179
1180         <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
1181
1182         <rdar://problem/5729446> Major thread safety issue in Database code
1183
1184         * platform/MessageQueue.h: Added a thread-safe queue abstraction.
1185
1186         * WebCore.vcproj/WebCore.vcproj:
1187         * WebCore.xcodeproj/project.pbxproj:
1188         Added MessageQueue.h.
1189
1190         * dom/Document.cpp:
1191         (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
1192
1193         * storage/Database.idl: Fixed parameter declarations to actually match implementation
1194         (which is custom, so it got out of sync).
1195
1196         * storage/DatabaseTask.h:
1197         (WebCore::DatabaseTask::database):
1198         (WebCore::DatabaseTransactionTask::transaction):
1199         Changed tasks to hold more information internally. Added helpers for better debug logging.
1200
1201         * storage/DatabaseTask.cpp:
1202         (WebCore::DatabaseTask::DatabaseTask):
1203         (WebCore::DatabaseTask::performTask):
1204         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1205         (WebCore::DatabaseOpenTask::doPerformTask):
1206         (WebCore::DatabaseOpenTask::debugTaskName):
1207         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1208         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
1209         (WebCore::DatabaseTransactionTask::doPerformTask):
1210         (WebCore::DatabaseTransactionTask::debugTaskName):
1211         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1212         (WebCore::DatabaseTableNamesTask::doPerformTask):
1213         (WebCore::DatabaseTableNamesTask::debugTaskName):
1214         Implementation for the above.
1215
1216         (WebCore::DatabaseTask::lockForSynchronousScheduling):
1217         (WebCore::DatabaseTask::waitForSynchronousCompletion):
1218         Fixed a potential race condition: if the task completed before we entered a wait, we'd never
1219         wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
1220
1221         * storage/DatabaseThread.cpp:
1222         (WebCore::DatabaseThread::DatabaseThread):
1223         (WebCore::DatabaseThread::requestTermination):
1224         (WebCore::DatabaseThread::databaseThread):
1225         (WebCore::DatabaseThread::scheduleTask):
1226         (WebCore::DatabaseThread::scheduleImmediateTask):
1227         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
1228         * storage/DatabaseThread.h:
1229         Changed to use MessageQueue.
1230
1231         * storage/Database.cpp:
1232         (WebCore::guidMutex):
1233         (WebCore::guidToVersionMap):
1234         (WebCore::guidToDatabaseMap):
1235         (WebCore::Database::openDatabase):
1236         (WebCore::Database::Database):
1237         (WebCore::Database::~Database):
1238         (WebCore::Database::openAndVerifyVersion):
1239         (WebCore::guidForOriginAndName):
1240         (WebCore::Database::changeVersion):
1241         (WebCore::Database::transaction):
1242         (WebCore::Database::scheduleTransaction):
1243         (WebCore::Database::scheduleTransactionStep):
1244         (WebCore::Database::scheduleTransactionCallback):
1245         (WebCore::Database::version):
1246         (WebCore::Database::deliverPendingCallback):
1247         (WebCore::Database::tableNames):
1248         * storage/Database.h:
1249         Changed m_transactionQueue to a MessageQueue.
1250         Got rid of callback tracking - these can take care of themselves.
1251         Got rid of a DatabaseThread member, as the Document can be asked for it.
1252         Moved private static members and helpers out of the header.
1253         Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
1254
1255         * storage/SQLTransaction.h:
1256         * storage/SQLTransaction.cpp: Added a lot of debug logging.
1257         (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
1258         as it created a race condition. Everything seems to work better without it, although a real fix
1259         would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
1260
1261         * manual-tests/database-threading-stress-test-2.html: Added.
1262         * manual-tests/database-threading-stress-test.html: Added.
1263
1264 2008-02-12  Adam Roben  <aroben@apple.com>
1265
1266         Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
1267
1268         <http://bugs.webkit.org/show_bug.cgi?id=17328>
1269         <rdar://5737946>
1270
1271         Reviewed by Mitz.
1272
1273         Test: fast/loader/local-css-allowed-in-strict-mode.html
1274
1275         * platform/network/cf/ResourceResponseCFNet.cpp:
1276         (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
1277         .css files.
1278
1279 2008-02-12  Anders Carlsson  <andersca@apple.com>
1280
1281         Build fix.
1282         
1283         * loader/ImageDocument.cpp:
1284
1285 2008-02-12  Anders Carlsson  <andersca@apple.com>
1286
1287         Reviewed by Mitz.
1288
1289         Make the code that sets the image title cross platform.
1290
1291         * WebCore.xcodeproj/project.pbxproj:
1292         Remove ImageDocumentMac.
1293         
1294         * loader/ImageDocument.cpp:
1295         (WebCore::ImageTokenizer::finish):
1296
1297         * loader/mac/ImageDocumentMac.h: Removed.
1298         * loader/mac/ImageDocumentMac.mm: Removed.
1299         
1300         * page/mac/WebCoreFrameBridge.h:
1301         * page/mac/WebCoreViewFactory.h:
1302         Move imageTitleForFilename:size from the bridge to
1303         the view factory.
1304         
1305         * platform/LocalizedStrings.h:
1306         Add imageTitle.
1307         
1308         * platform/mac/LocalizedStringsMac.mm:
1309         (WebCore::imageTitle):
1310         Have imageTitle call the view factory.
1311         
1312         * platform/qt/Localizations.cpp:
1313         (WebCore::imageTitle):
1314         * platform/wx/LocalizedStringsWx.cpp:
1315         (WebCore::imageTitle):
1316         * platform/gtk/LocalizedStringsGtk.cpp:
1317         (WebCore::imageTitle):
1318         Add stubs.
1319         
1320 2008-02-12  Oliver Hunt  <oliver@apple.com>
1321
1322         Reviewed by NOBODY (Build fix).
1323
1324         more Qt fixes
1325
1326         * html/HTMLCanvasElement.cpp:
1327         (WebCore::HTMLCanvasElement::paint):
1328
1329 2008-02-12  Oliver Hunt  <oliver@apple.com>
1330
1331         Reviewed by NOBODY (Build fix).
1332
1333         And another attempt to fixerate Qt
1334
1335         * html/HTMLCanvasElement.cpp:
1336         (WebCore::HTMLCanvasElement::paint):
1337
1338 2008-02-12  Oliver Hunt  <oliver@apple.com>
1339
1340         Reviewed by NOBODY (Build fix).
1341
1342         Attempt to fix Qt build
1343
1344         * html/HTMLCanvasElement.h:
1345
1346 2008-02-11  Oliver Hunt  <oliver@apple.com>
1347
1348         Reviewed by Alp Toker.
1349
1350         Make canvas use an ImageBuffer for its backing store
1351
1352         In order to make the canvas implementation less platform dependent
1353         (and thus reduce the current quagmire of ifdefs) we now use an 
1354         ImageBuffer to provide the backing buffer, an immediate consequence
1355         of this is to remove multiple ifdefs in the construction of the
1356         buffer.  This patch allows us to further reduce the platform
1357         dependencies in later patches.
1358
1359
1360         * html/CanvasRenderingContext2D.cpp:
1361         (WebCore::CanvasRenderingContext2D::drawImage):
1362         * html/HTMLCanvasElement.cpp:
1363         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1364         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1365         (WebCore::HTMLCanvasElement::reset):
1366         (WebCore::HTMLCanvasElement::paint):
1367         (WebCore::HTMLCanvasElement::createDrawingContext):
1368         (WebCore::HTMLCanvasElement::drawingContext):
1369         (WebCore::HTMLCanvasElement::createPlatformImage):
1370         * html/HTMLCanvasElement.h:
1371
1372 2008-02-11  Dan Bernstein  <mitz@apple.com>
1373
1374         Reviewed by Dave Hyatt.
1375
1376         - fix http://bugs.webkit.org/show_bug.cgi?id=17320
1377           <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
1378
1379         Test: fast/css/last-child-style-sharing.html
1380
1381         * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
1382         CSS3 selectors that require it.
1383
1384 2008-02-11  Sam Weinig  <sam@webkit.org>
1385
1386         Reviewed by Darin Adler.
1387
1388         Make the cross-domain security model more closely match Firefox by always returning the
1389         native built-in functions when accessing functions cross-domain.
1390
1391         Fixes for:
1392         <rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
1393         <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
1394
1395         Tests: fast/dom/Window/window-custom-prototype-crash.html
1396                fast/dom/Window/window-function-frame-getter-precedence.html
1397                http/tests/security/cross-frame-access-get-override.html
1398                http/tests/security/cross-frame-access-location-get-override.html
1399                http/tests/security/cross-frame-access-location-get.html
1400                http/tests/security/cross-frame-access-location-put.html
1401
1402         * bindings/js/JSDOMWindowCustom.cpp:
1403         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1404         - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
1405           not it has been overridden, instead of undefined.
1406         - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable) 
1407           instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
1408         - Allow access to the native toString function cross-domain.  It always returns "[object Window]".
1409         - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
1410           the function an overridden function is not inadvertantly returned from the PropertyMap.\
1411
1412         * bindings/js/JSHistoryCustom.cpp:
1413         (WebCore::JSHistory::customGetOwnPropertySlot):
1414         - Implement the same model as described above for the History object, always returning the
1415           native built-in function cross-domain.
1416         - Allow access to the native toString function cross-domain.
1417         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1418           access.
1419
1420         * bindings/js/JSLocation.cpp:
1421         (WebCore::JSLocation::getOwnPropertySlot):
1422         - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
1423           function.  This will help moving to a generated class in the future.
1424         (WebCore::JSLocation::customGetOwnPropertySlot):
1425         - Implement the same model as described above for the Location object, always returning the
1426           native built-in function cross-domain.
1427         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1428           access.
1429         (WebCore::JSLocation::put):
1430         (WebCore::JSLocation::deleteProperty):
1431         (WebCore::JSLocation::getPropertyNames):
1432         * bindings/js/JSLocation.h:
1433         - Clean up to match the rest of the file a little better.
1434
1435         * bindings/js/kjs_binding.cpp:
1436         (WebCore::allowsAccessFromFrame):
1437         (WebCore::printErrorMessageForFrame):
1438         (WebCore::nonCachingStaticFunctionGetter):
1439         (WebCore::objectToStringFunctionGetter):
1440         * bindings/js/kjs_binding.h:
1441         - Put common functionality related to cross-domain access here to serve as a central shared point.
1442           This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
1443           and JSLocation.cpp.
1444
1445         * bindings/js/kjs_dom.cpp:
1446         (WebCore::checkNodeSecurity):
1447         - Use the new allowsAccessFromFrame method.
1448
1449         * bindings/js/kjs_window.cpp:
1450         (KJS::Window::childFrameGetter): Cleanup.
1451         (KJS::Window::namedItemGetter): Cleanup.
1452         (KJS::Window::getOwnPropertySlot):
1453         - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
1454           than the index or shortcut name getters.
1455         - Cleanup function to make it more understandable and slightly more efficient.
1456         (KJS::Window::allowsAccessFrom):
1457         - Add a new variant of this method that takes a reference to a String, which, on failure, will
1458           contain the error message to print out.  The caller can then pass this to printErrorMessage.
1459           This allows for code to check allowsAccessFrom and act on the result without printing out the
1460           error message. For convenience, a version with out the String parameter has been left which 
1461           prints out the message automatically.
1462         (KJS::Window::printErrorMessage):
1463         * bindings/js/kjs_window.h:
1464
1465 2008-02-11  Darin Adler  <darin@apple.com>
1466
1467         Reviewed by Mitz.
1468
1469         - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
1470           incorrectly due to visibility fix
1471
1472         Added an Xcode-specific quirk.
1473
1474         * WebCore.base.exp: Added export for new Settings function.
1475         * css/CSSMutableStyleDeclaration.cpp:
1476         (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
1477         If you try to change the visibilty on a node with the class name tab_content,
1478         instead it will use display:none.
1479         * page/Settings.cpp:
1480         (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
1481         initialize m_fontRenderingMode! This seems like it was a bug before, but we
1482         probably were getting lucky and always getting 0 on Windows, which is the
1483         only place the setting matters.
1484         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
1485         * page/Settings.h:
1486         (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
1487
1488 2008-02-11  Timothy Hatcher  <timothy@apple.com>
1489
1490         Reviewed by Brady Eidson.
1491
1492         <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
1493
1494         * storage/DatabaseTracker.cpp:
1495         (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1496         (WebCore::DatabaseTracker::origins): Ditto.
1497         (WebCore::DatabaseTracker::setQuota): Ditto.
1498         (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
1499         origins to call deleteOrigin().
1500         (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1501
1502 2008-02-11  David Hyatt  <hyatt@apple.com>
1503
1504         Fix for bug 17286, crash accessing a null RenderStyle.  Add a simple null check.
1505
1506         Reviewed by aroben
1507
1508         Added fast/css/empty-generated-content.html
1509
1510         * css/CSSStyleSelector.cpp:
1511         (WebCore::CSSStyleSelector::checkOneSelector):
1512
1513 2008-02-11  Rob Buis  <buis@kde.org>
1514
1515         Reviewed by David Kilzer.
1516
1517         http://bugs.webkit.org/show_bug.cgi?id=17201
1518         Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
1519
1520         Gets rid of goto usage in parseFont.
1521
1522         * css/CSSParser.cpp:
1523         (WebCore::CSSParser::parseFont):
1524
1525 2008-02-11  David Hyatt  <hyatt@apple.com>
1526
1527         Fix for bug 17298, Acid3 text should be black and not red.  Make sure stylesheets with the wrong MIME type
1528         are not accepted in strict mode.
1529
1530         Reviewed by darin
1531
1532         Added http/tests/misc/css-reject-in-strict-mode.html
1533
1534         * css/CSSImportRule.cpp:
1535         (WebCore::CSSImportRule::setCSSStyleSheet):
1536         * css/CSSImportRule.h:
1537         * dom/Document.cpp:
1538         (WebCore::Document::setCSSStyleSheet):
1539         * dom/Document.h:
1540         * dom/ProcessingInstruction.cpp:
1541         (WebCore::ProcessingInstruction::setCSSStyleSheet):
1542         * dom/ProcessingInstruction.h:
1543         * html/HTMLLinkElement.cpp:
1544         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1545         * html/HTMLLinkElement.h:
1546         * html/HTMLMediaElement.cpp:
1547         (WebCore::HTMLMediaElement::pickMedia):
1548         * loader/CachedCSSStyleSheet.cpp:
1549         (WebCore::CachedCSSStyleSheet::ref):
1550         (WebCore::CachedCSSStyleSheet::checkNotify):
1551         (WebCore::CachedCSSStyleSheet::canUseSheet):
1552         * loader/CachedCSSStyleSheet.h:
1553         (WebCore::CachedCSSStyleSheet::sheetText):
1554         * loader/CachedResourceClient.h:
1555         (WebCore::CachedResourceClient::setCSSStyleSheet):
1556         * loader/mac/UserStyleSheetLoader.cpp:
1557         (UserStyleSheetLoader::setCSSStyleSheet):
1558         * loader/mac/UserStyleSheetLoader.h:
1559
1560 2008-02-11  Adam Roben  <aroben@apple.com>
1561
1562         Fix Bug 14316: Inspector's Console truncates long strings
1563
1564         <http://bugs.webkit.org/show_bug.cgi?id=14316>
1565         <rdar://5357695>
1566
1567         We no longer call Object.describe to format all the output of commands
1568         enetered into the Console. The ConsolePanel object now has a set of
1569         formatting functions that append a formatted representation of the
1570         passed-in object to the passed-in container node.
1571
1572         Reviewed by Sam.
1573
1574         * page/inspector/ConsolePanel.js:
1575         (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
1576         _outputToNode to _format.
1577         (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
1578         Object.type to get the type of the object, then call the appropriate
1579         formatting function.
1580         (WebInspector.ConsolePanel._formatvalue): Added.
1581         (WebInspector.ConsolePanel._formatstring): Added. This function
1582         contains the actual fix for the bug, since it doesn't truncate the
1583         string no matter how long it is.
1584         (WebInspector.ConsolePanel._formatregexp): Added.
1585         (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
1586         functional than Object.describe for arrays, since it recursively
1587         formats each item in the array. One advantage of this is that Nodes in
1588         arrays will be linkified instead of just turning into "[Object
1589         HTMLBodyElement]" or similar.
1590         (WebInspector.ConsolePanel._formatnode): Added.
1591         (WebInspector.ConsolePanel._formatobject): Added.
1592         (WebInspector.ConsolePanel.
1593         * page/inspector/utilities.js:
1594         (Object.type): Added. Code was pulled out of Object.describe and
1595         reorganized slightly.
1596         (Object.describe): Call Object.type. There should be no change in
1597         behavior of this function.
1598
1599 2008-02-11  Alp Toker  <alp@atoker.com>
1600
1601         Wx build fix for breakage introduced in r30142. Spotted by Darin.
1602
1603         * platform/network/curl/ResourceHandleManager.cpp:
1604         (WebCore::parseDataUrl):
1605
1606 2008-02-11  Brent Fulgham  <bfulgham@gmail.com>
1607
1608         Reviewed and tweaked by Darin
1609
1610         - http://bugs.webkit.org/show_bug.cgi?id=17299
1611           a couple compilation fixes for Cairo/Win32 configuration
1612
1613         * platform/graphics/cairo/ImageSourceCairo.cpp:
1614         (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
1615         * rendering/RenderThemeWin.cpp:
1616         (WebCore::prepareForDrawing): Added IntRect parameter.
1617         (WebCore::doneDrawing): Ditto.
1618         (WebCore::RenderThemeWin::paintButton): Ditto.
1619         (WebCore::RenderThemeWin::paintTextField): Ditto.
1620         (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
1621         (WebCore::RenderThemeWin::systemFont): Added.
1622
1623 2008-02-11  Alp Toker  <alp@atoker.com>
1624
1625         Reviewed by Alexey.
1626
1627         Acid3 data URL parsing fix for the GTK+ port.
1628
1629         Avoid WebCore's base64Decode() when possible since it's not a
1630         general-purpose Base64 decoder and fails on newlines.
1631
1632         * platform/network/curl/ResourceHandleManager.cpp:
1633         (WebCore::parseDataUrl):
1634
1635 2008-02-11  Darin Adler  <darin@apple.com>
1636
1637         - another Qt build fix
1638
1639         * platform/qt/PopupMenuQt.cpp:
1640         (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
1641
1642 2008-02-10  Darin Adler  <darin@apple.com>
1643
1644         - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
1645
1646         * platform/qt/FileChooserQt.cpp:
1647         (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
1648
1649 2008-02-10  Darin Adler  <darin@apple.com>
1650
1651         - another Qt build fix
1652
1653         * platform/graphics/qt/IconQt.cpp:
1654         (WebCore::Icon::Icon): Added explicit RefCounted constructor.
1655
1656 2008-02-10  Alp Toker  <alp@atoker.com>
1657
1658         Another Win build fix for r30133 breakage.
1659
1660         * plugins/win/PluginPackageWin.cpp:
1661         (WebCore::PluginPackage::PluginPackage):
1662
1663 2008-02-10  Alp Toker  <alp@atoker.com>
1664
1665         Build fix GTK+ and prospective build fix for Win breakage introduced
1666         in r30133.
1667
1668         * platform/Cursor.h:
1669         (WebCore::SharedCursor::SharedCursor):
1670         * platform/graphics/gtk/IconGtk.cpp:
1671         (WebCore::Icon::Icon):
1672         * platform/gtk/FileChooserGtk.cpp:
1673         (WebCore::FileChooser::FileChooser):
1674         * platform/gtk/PopupMenuGtk.cpp:
1675         (WebCore::PopupMenu::PopupMenu):
1676
1677 2008-02-10  Darin Adler  <darin@apple.com>
1678
1679         - try to fix Win, Qt, GTK, and WX builds
1680
1681         * platform/Cursor.h:
1682         (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
1683         * platform/graphics/win/IconWin.cpp:
1684         (WebCore::Icon::Icon): Ditto.
1685         * platform/win/FileChooserWin.cpp:
1686         (WebCore::FileChooser::FileChooser): Ditto.
1687         * platform/win/PopupMenuWin.cpp:
1688         (WebCore::PopupMenu::PopupMenu): Ditto.
1689         * platform/wx/TemporaryLinkStubs.cpp:
1690         (FileChooser::FileChooser): Ditto.
1691         (PopupMenu::PopupMenu): Ditto.
1692         (Icon::Icon): Ditto.
1693         * plugins/PluginStream.cpp:
1694         (WebCore::PluginStream::PluginStream): Ditto.
1695
1696 2008-02-10  David Hyatt  <hyatt@apple.com>
1697
1698         Fix for bug 17082, cssRules should be live.
1699
1700         Reviewed by olliej
1701
1702         Added fast/css/live-cssrules.html
1703
1704         * css/CSSRuleList.cpp:
1705         (WebCore::CSSRuleList::CSSRuleList):
1706         (WebCore::CSSRuleList::length):
1707         (WebCore::CSSRuleList::item):
1708         (WebCore::CSSRuleList::deleteRule):
1709         (WebCore::CSSRuleList::insertRule):
1710         * css/CSSRuleList.h:
1711
1712 2008-02-10  David Hyatt  <hyatt@apple.com>
1713
1714         Fix for bug 17253.  <iframe> contents need to be reflected into the DOM as a single text node.
1715
1716         Reviewed by olliej
1717
1718         fast/frames/iframe-text-contents.html
1719
1720         * html/HTMLParser.cpp:
1721         (WebCore::HTMLParser::getNode):
1722         * html/HTMLTokenizer.cpp:
1723         (WebCore::HTMLTokenizer::parseSpecial):
1724         (WebCore::HTMLTokenizer::parseComment):
1725         (WebCore::HTMLTokenizer::parseTag):
1726         * html/HTMLTokenizer.h:
1727         (WebCore::HTMLTokenizer::State::inIFrame):
1728         (WebCore::HTMLTokenizer::State::setInIFrame):
1729         (WebCore::HTMLTokenizer::State::inAnySpecial):
1730         (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
1731         (WebCore::HTMLTokenizer::State::):
1732
1733 2008-02-10  Andrew Wellington  <proton@wiretapped.net>
1734
1735         Reviewed and tweaked by Darin.
1736         
1737         DOMRange.surroundContents throws wrong exception (Acid3 bug)
1738         http://bugs.webkit.org/show_bug.cgi?id=16749
1739         
1740         Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
1741         has offsets in characters.
1742
1743         * dom/Range.cpp:
1744         (WebCore::Range::surroundContents):
1745
1746 2008-02-10  Darin Adler  <darin@apple.com>
1747
1748         Reviewed by Eric.
1749
1750         - http://bugs.webkit.org/show_bug.cgi?id=17256
1751           Make clients of RefCounted explicitly set the count to 0.
1752
1753         * bindings/js/JSSVGPODTypeWrapper.h:
1754         (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
1755         * css/CSSFontFace.h:
1756         (WebCore::CSSFontFace::CSSFontFace):
1757         * css/CSSRuleList.cpp:
1758         (WebCore::CSSRuleList::CSSRuleList):
1759         * css/CSSSegmentedFontFace.cpp:
1760         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
1761         * css/Counter.h:
1762         (WebCore::Counter::Counter):
1763         * css/Pair.h:
1764         (WebCore::Pair::Pair):
1765         * css/Rect.h:
1766         (WebCore::Rect::Rect):
1767         * css/StyleBase.h:
1768         (WebCore::StyleBase::StyleBase):
1769         * css/StyleSheetList.cpp:
1770         (WebCore::StyleSheetList::StyleSheetList):
1771         * dom/Attr.cpp:
1772         (WebCore::Attr::Attr):
1773         * dom/Attr.h:
1774         * dom/Attribute.h:
1775         (WebCore::Attribute::Attribute):
1776         * dom/Clipboard.cpp:
1777         (WebCore::Clipboard::Clipboard):
1778         * dom/DOMImplementation.h:
1779         (WebCore::DOMImplementation::DOMImplementation):
1780         * dom/Event.cpp:
1781         (WebCore::Event::Event):
1782         * dom/EventListener.h:
1783         (WebCore::EventListener::EventListener):
1784         * dom/ExceptionBase.cpp:
1785         (WebCore::ExceptionBase::ExceptionBase):
1786         * dom/NamedAttrMap.h:
1787         (WebCore::NamedAttrMap::insertAttribute):
1788         * dom/NamedNodeMap.h:
1789         (WebCore::NamedNodeMap::NamedNodeMap):
1790         * dom/NodeFilter.h:
1791         (WebCore::NodeFilter::NodeFilter):
1792         * dom/NodeFilterCondition.h:
1793         (WebCore::NodeFilterCondition::NodeFilterCondition):
1794         * dom/NodeList.h:
1795         (WebCore::NodeList::NodeList):
1796         * dom/QualifiedName.h:
1797         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
1798         (WebCore::QualifiedName::ref):
1799         * dom/Range.cpp:
1800         (WebCore::Range::Range):
1801         * dom/RegisteredEventListener.cpp:
1802         (WebCore::RegisteredEventListener::RegisteredEventListener):
1803         * dom/StyledElement.h:
1804         * dom/Traversal.cpp:
1805         (WebCore::Traversal::Traversal):
1806         * editing/EditCommand.cpp:
1807         (WebCore::EditCommand::EditCommand):
1808         * history/BackForwardList.cpp:
1809         (WebCore::BackForwardList::BackForwardList):
1810         * history/CachedPage.cpp:
1811         (WebCore::CachedPage::CachedPage):
1812         * history/HistoryItem.cpp:
1813         (WebCore::HistoryItem::HistoryItem):
1814         * html/CanvasGradient.cpp:
1815         (WebCore::CanvasGradient::CanvasGradient):
1816         * html/CanvasPattern.cpp:
1817         (WebCore::CanvasPattern::CanvasPattern):
1818         * html/CanvasRenderingContext2D.cpp:
1819         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1820         * html/CanvasStyle.cpp:
1821         (WebCore::CanvasStyle::CanvasStyle):
1822         * html/HTMLCollection.cpp:
1823         (WebCore::HTMLCollection::HTMLCollection):
1824         * html/MediaError.h:
1825         (WebCore::MediaError::MediaError):
1826         * html/TimeRanges.cpp:
1827         (TimeRanges::TimeRanges):
1828         * html/TimeRanges.h:
1829         (WebCore::TimeRanges::TimeRanges):
1830         * html/VoidCallback.h:
1831         (WebCore::VoidCallback::VoidCallback):
1832         * loader/DocumentLoader.cpp:
1833         (WebCore::DocumentLoader::DocumentLoader):
1834         * loader/FormState.cpp:
1835         (WebCore::FormState::FormState):
1836         * loader/ResourceLoader.cpp:
1837         (WebCore::ResourceLoader::ResourceLoader):
1838         * loader/TextResourceDecoder.cpp:
1839         (WebCore::TextResourceDecoder::TextResourceDecoder):
1840         * loader/icon/IconRecord.cpp:
1841         (WebCore::IconRecord::IconRecord):
1842         * page/BarInfo.cpp:
1843         (WebCore::BarInfo::BarInfo):
1844         * page/Console.cpp:
1845         (WebCore::Console::Console):
1846         * page/DOMSelection.cpp:
1847         (WebCore::DOMSelection::DOMSelection):
1848         * page/DOMWindow.cpp:
1849         (WebCore::DOMWindow::DOMWindow):
1850         * page/Frame.cpp:
1851         (WebCore::Frame::Frame):
1852         * page/History.cpp:
1853         (WebCore::History::History):
1854         * page/InspectorController.cpp:
1855         (WebCore::InspectorResource::InspectorResource):
1856         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
1857         * page/Plugin.h:
1858         (WebCore::Plugin::Plugin):
1859         * page/Screen.cpp:
1860         (WebCore::Screen::Screen):
1861         * platform/ArrayImpl.cpp:
1862         (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
1863         * platform/DeprecatedValueListImpl.cpp:
1864         (WebCore::DeprecatedValueListImpl::Private::Private):
1865         * platform/ScrollBar.cpp:
1866         (WebCore::Scrollbar::Scrollbar):
1867         * platform/SharedBuffer.cpp:
1868         (WebCore::SharedBuffer::SharedBuffer):
1869         * platform/graphics/FontFallbackList.cpp:
1870         (WebCore::FontFallbackList::FontFallbackList):
1871         * platform/graphics/FontFamily.cpp:
1872         (WebCore::FontFamily::FontFamily):
1873         * platform/graphics/FontFamily.h:
1874         (WebCore::FontFamily::FontFamily):
1875         * platform/graphics/FontSelector.h:
1876         (WebCore::FontSelector::FontSelector):
1877         (WebCore::FontSelector::~FontSelector):
1878         * platform/graphics/GlyphPageTreeNode.h:
1879         (WebCore::GlyphPage::GlyphPage):
1880         * platform/graphics/mac/IconMac.mm:
1881         (WebCore::Icon::Icon):
1882         * platform/mac/FileChooserMac.mm:
1883         (WebCore::FileChooser::FileChooser):
1884         * platform/mac/PopupMenuMac.mm:
1885         (WebCore::PopupMenu::PopupMenu):
1886         * platform/mac/SharedBufferMac.mm:
1887         (WebCore::SharedBuffer::SharedBuffer):
1888         * platform/network/FormData.cpp:
1889         (WebCore::FormData::FormData):
1890         * platform/network/FormData.h:
1891         (WebCore::FormData::FormData):
1892         * platform/network/ResourceHandle.cpp:
1893         (WebCore::ResourceHandle::ResourceHandle):
1894         * platform/text/CString.h:
1895         (WebCore::CStringBuffer::CStringBuffer):
1896         * platform/text/RegularExpression.cpp:
1897         (WebCore::RegularExpression::Private::Private):
1898         * rendering/RenderStyle.cpp:
1899         (WebCore::StyleSurroundData::StyleSurroundData):
1900         (WebCore::StyleBoxData::StyleBoxData):
1901         (WebCore::StyleVisualData::StyleVisualData):
1902         (WebCore::StyleBackgroundData::StyleBackgroundData):
1903         (WebCore::StyleMarqueeData::StyleMarqueeData):
1904         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1905         (WebCore::StyleMultiColData::StyleMultiColData):
1906         (WebCore::StyleTransformData::StyleTransformData):
1907         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1908         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1909         (WebCore::StyleInheritedData::StyleInheritedData):
1910         * rendering/RenderStyle.h:
1911         (WebCore::TransformOperation::TransformOperation):
1912         (WebCore::CursorList::CursorList):
1913         * rendering/SVGCharacterLayoutInfo.h:
1914         (WebCore::SVGCharOnPath::SVGCharOnPath):
1915         * rendering/SVGRenderStyle.cpp:
1916         (WebCore::SVGRenderStyle::SVGRenderStyle):
1917         * rendering/SVGRenderStyle.h:
1918         (WebCore::SVGRenderStyle::SVGRenderStyle):
1919         * rendering/SVGRenderStyleDefs.cpp:
1920         (StyleFillData::StyleFillData):
1921         (StyleStrokeData::StyleStrokeData):
1922         (StyleStopData::StyleStopData):
1923         (StyleTextData::StyleTextData):
1924         (StyleClipData::StyleClipData):
1925         (StyleMaskData::StyleMaskData):
1926         (StyleMarkerData::StyleMarkerData):
1927         (StyleMiscData::StyleMiscData):
1928         * storage/SQLResultSetRowList.h:
1929         (WebCore::SQLResultSetRowList::SQLResultSetRowList):
1930         * svg/SVGAngle.cpp:
1931         (WebCore::SVGAngle::SVGAngle):
1932         * svg/SVGAnimatedTemplate.h:
1933         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
1934         * svg/SVGElementInstanceList.cpp:
1935         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
1936         * svg/SVGList.h:
1937         (WebCore::SVGList::SVGList):
1938         (WebCore::SVGPODListItem::SVGPODListItem):
1939         * svg/SVGPathSeg.h:
1940         (WebCore::SVGPathSeg::SVGPathSeg):
1941         * svg/SVGPreserveAspectRatio.cpp:
1942         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
1943         * svg/SVGRenderingIntent.h:
1944         (WebCore::SVGRenderingIntent::SVGRenderingIntent):
1945         * svg/SVGUnitTypes.h:
1946         (WebCore::SVGUnitTypes::SVGUnitTypes):
1947         * svg/graphics/SVGPaintServerGradient.h:
1948         (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
1949         * svg/graphics/SVGResource.cpp:
1950         (WebCore::SVGResource::SVGResource):
1951         * xml/DOMParser.h:
1952         (WebCore::DOMParser::DOMParser):
1953         * xml/XMLHttpRequest.cpp:
1954         (WebCore::XMLHttpRequest::XMLHttpRequest):
1955         * xml/XMLSerializer.h:
1956         (WebCore::XMLSerializer::XMLSerializer):
1957         * xml/XPathEvaluator.h:
1958         (WebCore::XPathEvaluator::XPathEvaluator):
1959         * xml/XPathExpression.h:
1960         (WebCore::XPathExpression::XPathExpression):
1961         * xml/XPathNSResolver.h:
1962         (WebCore::XPathNSResolver::XPathNSResolver):
1963         * xml/XPathResult.cpp:
1964         (WebCore::XPathResult::XPathResult):
1965         * xml/XPathValue.h:
1966         (WebCore::XPath::ValueData::ValueData):
1967         * xml/XSLTProcessor.h:
1968         (WebCore::XSLTProcessor::XSLTProcessor):
1969
1970 2008-02-09  Kevin Ollivier  <kevino@theolliviers.com>
1971
1972         Reviewed by Eric Seidel.
1973
1974         Calling select() when all the file descriptors are NULL
1975         stops the file download on Windows. As a result, do not
1976         call select() when there are no valid descriptors.
1977
1978         http://bugs.webkit.org/show_bug.cgi?id=17178
1979
1980         * platform/network/curl/ResourceHandleManager.cpp:
1981         (WebCore::ResourceHandleManager::downloadTimerCallback):
1982
1983 2008-02-09  Dan Bernstein  <mitz@apple.com>
1984
1985         Reviewed by Sam Weinig.
1986
1987         - fix http://bugs.webkit.org/show_bug.cgi?id=17259
1988           Element::recalcStyle() needlessly null-checks the result of styleForElement()
1989
1990         * dom/Element.cpp:
1991         (WebCore::Element::recalcStyle): Removed unneeded null checks.
1992         styleForElement() can never return null.
1993
1994 2008-02-09  David Hyatt  <hyatt@apple.com>
1995
1996         Fix for bug 17254, nth-* selectors do not work with negative coefficients.
1997
1998         Reviewed by Mitz.
1999
2000         fast/css/negative-nth-child.html
2001
2002         * css/CSSStyleSelector.cpp:
2003         (WebCore::parseNth):
2004
2005 2008-02-09  David Hyatt  <hyatt@apple.com>
2006
2007         Fix for bug 17203, high CPU usage loading HTML5 spec.  This patch significantly improves the performance
2008         of CSS3 selectors.
2009
2010         (1) Split the notion of being affected by positional rules into "forward" and "backward."  The "forward"
2011         selectors do not need to re-resolve during parsing, since children are appended on the end.  Only the
2012         "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
2013
2014         (2) Extend childrenChanged to specify whether the children were changed by the parser or not.  This allows
2015         Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
2016         possible.
2017
2018         (3) Make sure all Elements now know whether or not their children are currently parsing.  Backwards selectors
2019         like last-child will always return false when children are still being parsed.  When an Element finishes
2020         parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
2021
2022         (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
2023
2024         (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
2025
2026         (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
2027         base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
2028
2029         Reviewed by Eric
2030
2031         * css/CSSStyleSelector.cpp:
2032         (WebCore::CSSStyleSelector::checkSelector):
2033         (WebCore::CSSStyleSelector::checkOneSelector):
2034         * dom/Attr.cpp:
2035         (WebCore::Attr::childrenChanged):
2036         * dom/Attr.h:
2037         * dom/ContainerNode.cpp:
2038         (WebCore::ContainerNode::addChild):
2039         * dom/Document.cpp:
2040         (WebCore::Document::childrenChanged):
2041         * dom/Document.h:
2042         * dom/Element.cpp:
2043         (WebCore::Element::Element):
2044         (WebCore::Element::recalcStyle):
2045         (WebCore::checkFirstChildRules):
2046         (WebCore::checkLastChildRules):
2047         (WebCore::checkEmptyRules):
2048         (WebCore::checkStyleRules):
2049         (WebCore::Element::childrenChanged):
2050         (WebCore::Element::finishParsingChildren):
2051         * dom/Element.h:
2052         (WebCore::Element::finishedParsingChildren):
2053         (WebCore::Element::beginParsingChildren):
2054         * dom/Node.cpp:
2055         * dom/Node.h:
2056         (WebCore::Node::finishParsingChildren):
2057         (WebCore::Node::beginParsingChildren):
2058         (WebCore::Node::childrenChanged):
2059         * dom/StyledElement.cpp:
2060         (WebCore::StyledElement::StyledElement):
2061         * dom/StyledElement.h:
2062         * dom/XMLTokenizer.cpp:
2063         (WebCore::XMLTokenizer::startElementNs):
2064         (WebCore::XMLTokenizer::endElementNs):
2065         (WebCore::):
2066         * html/HTMLAppletElement.cpp:
2067         (WebCore::HTMLAppletElement::HTMLAppletElement):
2068         (WebCore::HTMLAppletElement::finishParsingChildren):
2069         * html/HTMLAppletElement.h:
2070         * html/HTMLElementFactory.cpp:
2071         (WebCore::objectConstructor):
2072         * html/HTMLGenericFormElement.cpp:
2073         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2074         * html/HTMLGenericFormElement.h:
2075         * html/HTMLObjectElement.cpp:
2076         (WebCore::HTMLObjectElement::HTMLObjectElement):
2077         (WebCore::HTMLObjectElement::finishParsingChildren):
2078         (WebCore::HTMLObjectElement::childrenChanged):
2079         * html/HTMLObjectElement.h:
2080         * html/HTMLOptGroupElement.cpp:
2081         (WebCore::HTMLOptGroupElement::childrenChanged):
2082         * html/HTMLOptGroupElement.h:
2083         * html/HTMLOptionElement.cpp:
2084         (WebCore::HTMLOptionElement::childrenChanged):
2085         * html/HTMLOptionElement.h:
2086         * html/HTMLParser.cpp:
2087         (WebCore::HTMLParser::insertNode):
2088         (WebCore::HTMLParser::pushBlock):
2089         (WebCore::HTMLParser::popOneBlockCommon):
2090         * html/HTMLScriptElement.cpp:
2091         (WebCore::HTMLScriptElement::childrenChanged):
2092         (WebCore::HTMLScriptElement::finishParsingChildren):
2093         * html/HTMLScriptElement.h:
2094         * html/HTMLSelectElement.cpp:
2095         (WebCore::HTMLSelectElement::childrenChanged):
2096         * html/HTMLSelectElement.h:
2097         * html/HTMLStyleElement.cpp:
2098         (WebCore::HTMLStyleElement::finishParsingChildren):
2099         (WebCore::HTMLStyleElement::childrenChanged):
2100         * html/HTMLStyleElement.h:
2101         * html/HTMLTextAreaElement.cpp:
2102         (WebCore::HTMLTextAreaElement::childrenChanged):
2103         * html/HTMLTextAreaElement.h:
2104         * html/HTMLTitleElement.cpp:
2105         (WebCore::HTMLTitleElement::childrenChanged):
2106         * html/HTMLTitleElement.h:
2107          * rendering/RenderApplet.cpp:
2108         (WebCore::RenderApplet::createWidgetIfNecessary):
2109         * rendering/RenderPartObject.cpp:
2110         (WebCore::RenderPartObject::updateWidget):
2111         * rendering/RenderStyle.cpp:
2112         (WebCore::RenderStyle::RenderStyle):
2113         * rendering/RenderStyle.h:
2114         (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
2115         (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
2116         (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
2117         (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
2118         * svg/SVGAnimationElement.cpp:
2119         (WebCore::SVGAnimationElement::finishParsingChildren):
2120         * svg/SVGAnimationElement.h:
2121         * svg/SVGClipPathElement.cpp:
2122         (WebCore::SVGClipPathElement::childrenChanged):
2123         * svg/SVGClipPathElement.h:
2124         * svg/SVGDefinitionSrcElement.cpp:
2125         (WebCore::SVGDefinitionSrcElement::childrenChanged):
2126         * svg/SVGDefinitionSrcElement.h:
2127         * svg/SVGElement.cpp:
2128         (WebCore::SVGElement::finishParsingChildren):
2129         * svg/SVGElement.h:
2130         * svg/SVGFontFaceElement.cpp:
2131         (WebCore::SVGFontFaceElement::childrenChanged):
2132         * svg/SVGFontFaceElement.h:
2133         * svg/SVGFontFaceFormatElement.cpp:
2134         (WebCore::SVGFontFaceFormatElement::childrenChanged):
2135         * svg/SVGFontFaceFormatElement.h:
2136         * svg/SVGFontFaceSrcElement.cpp:
2137         (WebCore::SVGFontFaceSrcElement::childrenChanged):
2138         * svg/SVGFontFaceSrcElement.h:
2139         * svg/SVGFontFaceUriElement.cpp:
2140         (WebCore::SVGFontFaceUriElement::childrenChanged):
2141         * svg/SVGFontFaceUriElement.h:
2142         * svg/SVGGElement.cpp:
2143         (WebCore::SVGGElement::childrenChanged):
2144         * svg/SVGGElement.h:
2145         * svg/SVGGradientElement.cpp:
2146         (WebCore::SVGGradientElement::childrenChanged):
2147         * svg/SVGGradientElement.h:
2148         * svg/SVGMarkerElement.cpp:
2149         (WebCore::SVGMarkerElement::childrenChanged):
2150         * svg/SVGMarkerElement.h:
2151         * svg/SVGMaskElement.cpp:
2152         (WebCore::SVGMaskElement::childrenChanged):
2153         * svg/SVGMaskElement.h:
2154         * svg/SVGPatternElement.cpp:
2155         (WebCore::SVGPatternElement::childrenChanged):
2156         * svg/SVGPatternElement.h:
2157         * svg/SVGStyleElement.cpp:
2158         (WebCore::SVGStyleElement::finishParsingChildren):
2159         (WebCore::SVGStyleElement::childrenChanged):
2160         * svg/SVGStyleElement.h:
2161         * svg/SVGStyledElement.cpp:
2162         (WebCore::SVGStyledElement::childrenChanged):
2163         * svg/SVGStyledElement.h:
2164         * svg/SVGTitleElement.cpp:
2165         (WebCore::SVGTitleElement::childrenChanged):
2166         * svg/SVGTitleElement.h:
2167         * svg/SVGUseElement.cpp:
2168         (WebCore::SVGUseElement::childrenChanged):
2169         * svg/SVGUseElement.h:
2170         
2171 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2172
2173         Unreviewed build fix
2174
2175         Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
2176         into the patch.
2177
2178         * platform/qt/RenderThemeQt.h:
2179
2180 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2181
2182         Reviewed by Adele.
2183
2184         paintResizeControl is dead, remove the code. This painting
2185         is done by the RenderLayer.
2186
2187         * platform/qt/RenderThemeQt.cpp:
2188         * platform/qt/RenderThemeQt.h:
2189         * rendering/RenderThemeMac.h:
2190         * rendering/RenderThemeMac.mm:
2191
2192 2008-02-07  Kevin Ollivier <kevino@theolliviers.com>
2193
2194         Reviewed by Eric Seidel, Adam Roben.
2195
2196         MSVC7 fixes.
2197         http://bugs.webkit.org/show_bug.cgi?id=17211
2198
2199         * platform/Threading.h:
2200         - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
2201           (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
2202         * platform/win/SharedTimerWin.cpp:
2203         - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
2204           so define them if they are not already defined.
2205
2206 2008-02-08  Brent Fulgham  <bfulgham@gmail.com>
2207
2208         Reviewed by Adam Roben.
2209
2210         Bug 17226: Fix Windows (Cairo) build of image-decoders
2211         http://bugs.webkit.org/show_bug.cgi?id=17226
2212
2213         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2214         * platform/image-decoders/png/PNGImageDecoder.cpp:
2215
2216 2008-02-08  Timothy Hatcher  <timothy@apple.com>
2217
2218         Reviewed by Brady Eidson.
2219
2220         <rdar://problem/5640896> Removing database then trying
2221         to recreate it causes trouble
2222
2223         Added open Database support to DatabaseTracker. So any Database that 
2224         is deleted will be marked as deleted and will fail to open any transaction
2225         or execute any new SQL queries.
2226
2227         * storage/Database.cpp:
2228         (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
2229         (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
2230         (WebCore::Database::markAsDeleted): Set the m_deleted flag.
2231         (WebCore::Database::version): Return a null String if m_deleted is true.
2232         * storage/Database.h:
2233         (WebCore::Database::deleted): Return m_deleted.
2234         * storage/DatabaseTracker.cpp:
2235         (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
2236         (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
2237         (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
2238           matching the origin/name.
2239         * storage/DatabaseTracker.h:
2240         * storage/SQLStatement.cpp:
2241         (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
2242         * storage/SQLStatement.h:
2243         * storage/SQLTransaction.cpp:
2244         (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
2245         (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
2246           if the Database was marked as deleted.
2247
2248 2008-02-08  Darin Adler  <darin@apple.com>
2249
2250         Reviewed by Eric.
2251
2252         - fix http://bugs.webkit.org/show_bug.cgi?id=15003
2253           Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
2254
2255         Test: fast/js/constructor-attributes.html
2256
2257         * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
2258
2259 2008-02-08  Anders Carlsson  <andersca@apple.com>
2260
2261         Reviewed by Mitz.
2262
2263         <rdar://problem/5650446>
2264         http://bugs.webkit.org/show_bug.cgi?id=16102
2265         Crash in FrameLoader::stopLoadingSubframes() on IMDB page
2266
2267         Store the child frame in a RefPtr to prevent it from being deleted when the
2268         frame tree changes while calling stopAllLoaders().
2269         
2270         * loader/FrameLoader.cpp:
2271         (WebCore::FrameLoader::stopLoadingSubframes):
2272
2273 2008-02-08  Kevin Ollivier  <kevino@theolliviers.com>
2274
2275         wx port build fix. Add time.h to define time_t.
2276
2277         * platform/FileSystem.h:
2278
2279 2008-02-08  Alp Toker  <alp@atoker.com>
2280
2281         Reviewed by Adam Roben.
2282
2283         Avoid null-dereference crasher noticed in the GTK+ port and also
2284         affecting the Win debug build.
2285
2286         Covered by existing tests.
2287
2288         * dom/Document.cpp:
2289         (WebCore::Document::userStyleSheet):
2290
2291 2008-02-08  Anders Carlsson  <andersca@apple.com>
2292
2293         Reviewed by Adam.
2294
2295         <rdar://problem/5724188> 
2296         REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
2297         
2298         Revert r29926 which caused the regression.
2299         
2300         * dom/Text.cpp:
2301         (WebCore::Text::createWithLengthLimit):
2302         * dom/Text.h:
2303         * html/HTMLParser.cpp:
2304         (WebCore::HTMLParser::parseToken):
2305         * loader/TextDocument.cpp:
2306         (WebCore::TextTokenizer::write):
2307
2308 2008-02-08  Sam Weinig  <sam@webkit.org>
2309
2310         Reviewed by Hyatt.
2311
2312         Fix for <rdar://problem/5732491>
2313         http://bugs.webkit.org/show_bug.cgi?id=17213
2314         The querySelectorAll method on an element node does not search only the element's descendants
2315
2316         Test: fast/dom/SelectorAPI/elementRoot.html
2317
2318         * dom/Node.cpp:
2319         (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
2320         * dom/SelectorNodeList.cpp:
2321         (WebCore::SelectorNodeList::SelectorNodeList): ditto.
2322
2323
2324
2325 2008-02-08  David Hyatt  <hyatt@apple.com>
2326
2327         Fix for bug 16798, button should default to type=submit.
2328
2329         Reviewed by darin
2330
2331         * html/HTMLButtonElement.cpp:
2332         (WebCore::HTMLButtonElement::type):
2333         (WebCore::HTMLButtonElement::parseMappedAttribute):
2334
2335 2008-02-08  Rodney Dawes  <dobey@wayofthemonkey.com>
2336
2337         Reviewed by Jon Honeycutt.
2338
2339         Redefine some platform-specific types as cross-platform types
2340         Add pathGetFileName method to get the filename from a path string
2341         Add unloadModule method to unload a loadable module from the process
2342         Implement new methods for GTK+ and Windows
2343         Implement missing homeDirectoryPath method for GTK+
2344         Add stub methods for new and missing methods for Wx and Qt
2345
2346         * platform/FileSystem.h:
2347         * platform/gtk/FileSystemGtk.cpp:
2348         * platform/qt/FileSystemQt.cpp:
2349         * platform/win/FileSystemWin.cpp:
2350         * platform/wx/FileSystemWx.cpp:
2351
2352 2008-02-08  Adam Roben  <aroben@apple.com>
2353
2354         Windows build fix after r30088
2355
2356         * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
2357         bindings to rebuild.
2358
2359 2008-02-08  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2360
2361         Reviewed by Alp Toker.
2362
2363         http://bugs.webkit.org/show_bug.cgi?id=17009
2364         [Gtk] Webkit strips accents from some dead-key combinations
2365
2366         KeyEvents have to go through the gtk input method.
2367
2368         Also implement the isKeypad check and make disambiguateKeyDownEvent
2369         behave more like other ports.
2370
2371         * platform/PlatformKeyboardEvent.h:
2372         * platform/gtk/KeyEventGtk.cpp:
2373         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2374         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2375         (WebCore::PlatformKeyboardEvent::gdkEventKey):
2376
2377 2008-02-08  Darin Adler  <darin@apple.com>
2378
2379         Reviewed by Eric.
2380
2381         - fix http://bugs.webkit.org/show_bug.cgi?id=3492
2382           TreeWalker implementation needs to be fixed (affects Acid3)
2383         - fix http://bugs.webkit.org/show_bug.cgi?id=4714
2384           NodeIterator does not handle exceptions from the filter function (affects Acid3)
2385         - fix http://bugs.webkit.org/show_bug.cgi?id=4716
2386           NodeIterator will crash if the filter function removes the current node from the document
2387
2388         Test: traversal/exception-forwarding.html
2389
2390         This turned into a near-rewrite of NodeIterator and TreeWalker.
2391
2392         * bindings/js/JSNodeFilterCondition.h:
2393         * bindings/js/JSNodeFilterCondition.cpp:
2394         (WebCore::takeException): Added.
2395         (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
2396         a JavaScript exception.
2397
2398         * bindings/js/JSNodeFilterCustom.cpp:
2399         (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
2400         a JavaScript exception if the out parameter is set.
2401
2402         * bindings/js/JSNodeIteratorCustom.cpp:
2403         (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
2404         a JavaScript exception if the out parameter is set.
2405         (WebCore::JSNodeIterator::previousNode): Ditto.
2406
2407         * bindings/js/JSTreeWalkerCustom.cpp:
2408         (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
2409         a JavaScript exception if the out parameter is set.
2410         (WebCore::JSTreeWalker::firstChild): Ditto.
2411         (WebCore::JSTreeWalker::lastChild): Ditto.
2412         (WebCore::JSTreeWalker::nextSibling): Ditto.
2413         (WebCore::JSTreeWalker::previousSibling): Ditto.
2414         (WebCore::JSTreeWalker::previousNode): Ditto.
2415         (WebCore::JSTreeWalker::nextNode): Ditto.
2416
2417         * bindings/objc/DOM.mm:
2418         (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
2419         out parameter.
2420         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
2421         Use RefPtr to make object lifetimes clearer.
2422         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
2423         Ditto.
2424
2425         * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
2426         JSDocument.cpp.
2427
2428         * dom/Document.h:
2429         * dom/Document.cpp:
2430         (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
2431         (WebCore::Document::createTreeWalker): Ditto.
2432
2433         * dom/NodeFilter.h:
2434         * dom/NodeFilter.cpp:
2435         (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
2436         (WebCore::NodeFilter::acceptNode): Added an out parameter to return
2437         a JavaScript exception.
2438         * dom/NodeFilter.idl: Custom binding for acceptNode.
2439
2440         * dom/NodeFilterCondition.h:
2441         * dom/NodeFilterCondition.cpp:
2442         (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
2443         a JavaScript exception.
2444
2445         * dom/NodeIterator.cpp:
2446         (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
2447         Eliminated m_doc, using the root node instead, and unnecessary check for
2448         null -- rootNode must be non-null and all nodes have a non-null document.
2449         (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
2450         (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
2451         acceptNode function could do anything, including removing the last
2452         reference to the current node. Also folded findNextNode into this function
2453         since it's the only one that needs to call it.
2454         (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
2455         (WebCore::NodeIterator::detach): Changed to use the root node as the indication
2456         that we're detached rather than a separate boolean.
2457         (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
2458         checks. Removed incorrect use of findNextNode/findPreviousNode -- those
2459         functions call acceptNode and the DOM standard is quite clear that these
2460         functions do not take that into account, allowing the current node to become
2461         one that's not accepted.
2462
2463         * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
2464         nextNode and previousNode to have an out parameter with a JavaScript exception.
2465         Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
2466         detached, setDetached, document, findNextNode, and findPreviousNode. All were
2467         unnecessary. Removed data member m_doc which was just rootNode()->document().
2468
2469         * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
2470
2471         * dom/Traversal.cpp:
2472         (WebCore::Traversal::Traversal): Use PassRefPtr more.
2473         (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
2474         Also rearranged the function a little bit for clarity.
2475
2476         * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
2477         exception and made it protected, since it's only for use by the derived classes.
2478
2479         * dom/TreeWalker.cpp:
2480         (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
2481         (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
2482         the overloaded version since it's not needed.
2483         (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
2484         to implement rules about when to check things like whether we're in the tree.
2485         The previous fix where we called isDescendantOf was not entirely correct, because
2486         the specification allows you to walk outside the tree if you get there somehow.
2487         What it doesn't allow is walking outside the tree from inside. The new
2488         implementation handles this correctly.
2489         (WebCore::TreeWalker::firstChild): Ditto.
2490         (WebCore::TreeWalker::lastChild): Ditto.
2491         (WebCore::TreeWalker::previousSibling): Ditto.
2492         (WebCore::TreeWalker::nextSibling): Ditto.
2493         (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
2494         acceptNode function on parents, this can't use traversePreviousNode (more's the
2495         pity, because it's a bit complicated).
2496         (WebCore::TreeWalker::nextNode): Ditto.
2497
2498         * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
2499         more. Changed the navigation functions to have an out parameter with a JavaScript
2500         exception. Removed helper functions setCurrentNode and ancestorRejected.
2501
2502         * dom/TreeWalker.idl: Custom binding for navigation functions.
2503
2504 2008-02-08  Eric Seidel  <eric@webkit.org>
2505
2506         Reviewed by darin.
2507
2508         Add support for Text.wholeText and Text.replaceWholeText
2509         http://bugs.webkit.org/show_bug.cgi?id=17125
2510
2511         Test EntityReferences to make sure they're always treated as read-only
2512         In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
2513
2514         * dom/Document.cpp:
2515         (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
2516         * dom/Node.cpp:
2517         * dom/Node.cpp:
2518         (WebCore::Node::textContent):
2519         * dom/Text.cpp:
2520         (WebCore::earliestLogicallyAdjacentTextNode):
2521         (WebCore::latestLogicallyAdjacentTextNode):
2522         (WebCore::Text::wholeText):
2523         (WebCore::Text::replaceWholeText):
2524         * dom/Text.h:
2525         * dom/Text.idl:
2526
2527 2008-02-06  Kimmo Kinnunen  <kimmok@iki.fi>
2528
2529         Reviewed by Tim Hatcher.
2530
2531         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
2532         HTML5: Client-side database queries should return values of type number
2533         Test: storage/sql-data-types.html
2534
2535         Make the DB queries return a value as a number if it was inserted
2536         as a number to the database.
2537         * platform/sql/SQLiteStatement.cpp:
2538         (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
2539         * platform/sql/SQLiteStatement.h:
2540         * storage/SQLStatement.cpp:
2541         (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
2542
2543 2008-02-07  Ada Chan  <adachan@apple.com>
2544
2545         <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
2546         Added mechanism to communicate client certificate info back to CFNetwork.
2547
2548         Reviewed by Adam.
2549
2550         * platform/network/ResourceHandle.h:
2551         * platform/network/cf/ResourceHandleCFNet.cpp:
2552         (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
2553         (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
2554         to CFNetwork by setting it in the SSL properties.
2555         (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
2556
2557 2008-02-07  Adam Roben  <aroben@apple.com>
2558
2559         Qt build fix
2560
2561         * platform/SharedBuffer.cpp: Removed a stub implementation of
2562         createWithContentsOfFile, now that each platform has its own stub.
2563
2564 2008-02-07  Adam Roben  <aroben@apple.com>
2565
2566         Fix Bug 17138: REGRESSION: Node highlight not updated properly
2567
2568         <http://bugs.webkit.org/show_bug.cgi?id=17138>
2569         <rdar://problem/5719869>
2570
2571         Reviewed by Darin.
2572
2573         No test possible.
2574
2575         * page/InspectorController.cpp:
2576         (WebCore::InspectorController::drawNodeHighlight): Update the
2577         overlayRect after scrolling to make sure that we translate the context
2578         by the correct amount.
2579
2580 2008-02-07  Adam Roben  <aroben@apple.com>
2581
2582         Qt and GTK+ build fixes
2583
2584         * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
2585         * platform/qt/FileSystemQt.cpp: Ditto.
2586
2587 2008-02-07  Adam Roben  <aroben@apple.com>
2588
2589         Some cleanup of Mac-only user stylesheet code
2590
2591         I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
2592         moved some Mac-only Frame methods to FrameMac.mm.
2593
2594         Reviewed by Darin.
2595
2596         * WebCore.xcodeproj/project.pbxproj: Added new files to project.
2597         * loader/mac/UserStyleSheetLoader.cpp: Added.
2598         (UserStyleSheetLoader::UserStyleSheetLoader):
2599         (UserStyleSheetLoader::~UserStyleSheetLoader):
2600         * loader/mac/UserStyleSheetLoader.h: Added.
2601         * page/Frame.cpp: Removed setUserStyleSheet[Location]
2602         * page/mac/FrameMac.mm:
2603         (WebCore::Frame::setUserStyleSheetLocation): Moved here from
2604         Frame.cpp.
2605         (WebCore::Frame::setUserStyleSheet): Ditto.
2606
2607 2008-02-07  Adam Roben  <aroben@apple.com>
2608
2609         Fix <rdar://5555260> GMail never loads when a user stylesheet is
2610         specified
2611
2612         The fix in r29841 did not guarantee that the user stylesheet would not
2613         still be loading by the time GMail called document.write, and so was
2614         not a complete fix.
2615
2616         This change reworks the user stylesheet loading mechanism on non-Mac
2617         platforms to load the stylesheet synchronously from disk, and then
2618         keeps it in memory. This obsoletes the issue of what our behavior
2619         should be before the user stylesheet has loaded and what should happen
2620         when it finishes loading, as the user stylesheet will always be
2621         available when the Document first asks for it. Note, however, that
2622         this removes the ability to specify a non-file: URL for the user
2623         stylesheet. This change was not made for the Mac platform because it's
2624         possible that WebKit clients are relying on non-file: URLs for user
2625         stylesheets. It would also be nice to move back to an asynchronous
2626         loading model someday, but that is not currently possible since we
2627         don't have an asynchronous loading mechanism that is not tied to a
2628         particular Frame.
2629
2630         The responsibility of loading and storing the user stylesheet has
2631         moved from Frame to Page, since the user stylesheet URL is set on the
2632         Page-level Settings object.
2633
2634         Reviewed by Darin.
2635
2636         * dom/Document.cpp:
2637         (WebCore::Document::Document): Changed to call userStyleSheet().
2638         (WebCore::Document::setUserStyleSheet): Made Mac-only.
2639         (WebCore::Document::userStyleSheet): Changed to call up to Page on
2640         non-Mac platforms.
2641         (WebCore::Document::recalcStyleSelector): Changed to call
2642         userStyleSheet().
2643         * dom/Document.h:
2644             - Made setUserStyleSheet and the m_usersheet member Mac-only
2645             - Changed userStyleSheet to return a String instance instead of a
2646               String reference, since we now might return a new null String.
2647         * loader/FrameLoader.cpp:
2648         (WebCore::FrameLoader::begin): Made the call to
2649         Frame::setUserStyleSheetLocation Mac-only.
2650         * page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
2651         (WebCore::Frame::~Frame): Ditto.
2652         (WebCore::Frame::reapplyStyles): Made the call to
2653         setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
2654         Document will pick up the new stylesheet in Document::reapplyStyles.
2655         (WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
2656         Mac-only.
2657         * page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
2658         * page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
2659         * page/Page.cpp:
2660         (WebCore::Page::Page): Initialize new members.
2661         (WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
2662         Mac. On non-Mac, resets all members relating to the user stylesheet so
2663         we'll know to load it again the next time it's asked for.
2664         (WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
2665         the user stylesheet location has changed since the last time we loaded
2666         it, or if the file has been modified since we last loaded it, then
2667         returns the contents of the user stylesheet as a String.
2668         * page/Page.h: Added new methods/members.
2669         * page/Settings.cpp:
2670         (WebCore::Settings::setUserStyleSheetLocation): Changed to call
2671         Page::userStyleSheetLocationChanged.
2672         * page/Settings.h: Changed userStyleSheetLocation to return the KURL
2673         by reference instead of making a copy.
2674         * platform/FileSystem.h: Added declaration for getFileModificationTime.
2675         * platform/KURL.h: Added declaration for fileSystemPath method.
2676         * platform/cf/KURLCFNet.cpp:
2677         (WebCore::KURL::fileSystemPath): Added.
2678         * platform/posix/FileSystemPOSIX.cpp:
2679         (WebCore::getFileModificationTime): Added.
2680         * platform/qt/KURLQt.cpp:
2681         (WebCore::KURL::fileSystemPath): Stubbed out.
2682         * platform/win/FileSystemWin.cpp:
2683         (WebCore::getFileModificationTime): Added.
2684         * platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
2685         * platform/gtk/FileSystemGtk.cpp: Ditto.
2686         * platform/wx/FileSystemWx.cpp: Ditto.
2687         * platform/qt/TemporaryLinkStubs.cpp: Stubbed out
2688         SharedBuffer::createWithContentsOfFile.
2689         * platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
2690         KURL::fileSystemPath.
2691         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
2692
2693 2008-02-07  Adam Roben  <aroben@apple.com>
2694
2695         Clean up FileSystemWin.cpp
2696
2697         This cleanup also makes us call _wstat64 instead of _wstat32i64. The
2698         only difference between these two functions is that _wstat64 gives
2699         64-bit time values, while _wstat32i64 only gives 32-bit time values.
2700
2701         Reviewed by Darin.
2702
2703         All tests pass.
2704
2705         * platform/win/FileSystemWin.cpp:
2706         (WebCore::statFile): New static helper that wraps _wstat64.
2707         (WebCore::getFileSize): Changed to call statFile.
2708         (WebCore::fileExists): Ditto.
2709
2710 2008-02-07  Adam Roben  <aroben@apple.com>
2711
2712         Rename fileSize to getFileSize
2713
2714         Rubberstamped by Darin.
2715
2716         * platform/FileSystem.h:
2717         * platform/gtk/FileSystemGtk.cpp:
2718         * platform/network/cf/FormDataStreamCFNet.cpp:
2719         (WebCore::setHTTPBody):
2720         * platform/network/curl/ResourceHandleManager.cpp:
2721         (WebCore::ResourceHandleManager::setupPOST):
2722         * platform/posix/FileSystemPOSIX.cpp:
2723         * platform/qt/FileSystemQt.cpp:
2724         * platform/win/FileSystemWin.cpp:
2725         * platform/wx/FileSystemWx.cpp:
2726         * storage/Database.cpp:
2727         (WebCore::Database::databaseSize):
2728         * storage/DatabaseTracker.cpp:
2729         (WebCore::DatabaseTracker::usageForDatabase):
2730         * storage/OriginUsageRecord.cpp:
2731         (WebCore::OriginUsageRecord::diskUsage):
2732
2733 2008-02-06  Adam Roben  <aroben@apple.com>
2734
2735         Make KURL::isLocalFile treat the URL's protocol case-insensitively
2736
2737         Reviewed by Darin.
2738
2739         * platform/KURL.cpp:
2740         (WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
2741
2742 2008-02-07  David Hyatt  <hyatt@apple.com>
2743
2744         Fix for bug 6248, implement the nth-* CSS3 selectors.  Patch based on original KHTML work from Allan Jensen
2745         and improved upon by Nick Shanks.
2746
2747         Reviewed by Eric
2748
2749         * css/CSSGrammar.y:
2750         * css/CSSParser.cpp:
2751         (WebCore::CSSParser::lex):
2752         * css/CSSSelector.cpp:
2753         (WebCore::CSSSelector::extractPseudoType):
2754         * css/CSSSelector.h:
2755         (WebCore::CSSSelector::):
2756         * css/CSSStyleSelector.cpp:
2757         (WebCore::parseNth):
2758         (WebCore::matchNth):
2759         (WebCore::CSSStyleSelector::checkOneSelector):
2760         * css/tokenizer.flex:
2761         * rendering/RenderStyle.cpp:
2762         (WebCore::RenderStyle::RenderStyle):
2763         * rendering/RenderStyle.h:
2764         (WebCore::RenderStyle::childIndex):
2765         (WebCore::RenderStyle::setChildIndex):
2766
2767 2008-02-07  Dan Bernstein  <mitz@apple.com>
2768
2769         Reviewed by Dave Hyatt.
2770
2771         - fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
2772
2773         Test: fast/block/float/relative-painted-twice.html
2774
2775         * rendering/RenderBlock.cpp:
2776         (WebCore::RenderBlock::addOverhangingFloats): Added another case where
2777         the child should not take over painting the float: when they do not have
2778         the same enclosing layer. In that case, the float is already being
2779         painted by one of its closer ancestors.
2780
2781 2008-02-07  Dan Bernstein  <mitz@apple.com>
2782
2783         Reviewed by Darin Adler.
2784
2785         - fix http://bugs.webkit.org/show_bug.cgi?id=17194
2786           Changing text to bold changes font family
2787
2788         Test: platform/mac/fast/text/family-for-font-matched-by-name.html
2789
2790         * platform/mac/WebFontCache.mm:
2791         (+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
2792         the family of the font whose name matches the desired family if there
2793         is no exact family match.
2794
2795 2008-02-07  Beth Dakin  <bdakin@apple.com>
2796
2797         Reviewed by Geoff.
2798
2799         Fix for <rdar://problem/5697882> Traffic or Street View button on 
2800         Google Maps is sometimes not positioned correctly (17000)
2801
2802         On the Mac, timers fire in the order that they are registered. 
2803         Geoff and I discovered that this is not necessarily true on 
2804         Windows, and that turned out to be the cause of this intermittent 
2805         layout problem at Google Maps. This patch adds a new member 
2806         variable to Timer to remember the timer's insertion point into the 
2807         heap. Now when comparing timers, if two timers were registered at 
2808         the same time, their insertion orders are compared to determine 
2809         which should fire first. This code actually never runs on Debug 
2810         builds on the Mac; the system clock on the Mac is accurate enough 
2811         that it knows that the two timers were not registered at *exactly* 
2812         the same time. This is not the case on Windows. In theory, if we 
2813         sped up Javascript enough on the Mac, this code would run and would 
2814         prevent misrenderings such as the one found on Google Maps.
2815
2816         * platform/Timer.cpp:
2817         (WebCore::operator<):
2818         (WebCore::TimerBase::setNextFireTime):
2819         * platform/Timer.h:
2820
2821 2008-02-06  Justin Garcia  <justin.garcia@apple.com>
2822
2823         Reviewed by Darin Adler.
2824
2825         <rdar://problem/5195056> Huge plain text pastes are slow
2826         
2827         This was fixed in r27369 and then r29367 and r29667 caused performance to
2828         regress.
2829
2830         * editing/EditCommand.cpp:
2831         (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
2832         (WebCore::EditCommand::unapply): Ditto.
2833         (WebCore::EditCommand::reapply): Ditto.
2834         * editing/Editor.cpp:
2835         (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls 
2836         that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
2837         (WebCore::Editor::unappliedEditing): Ditto.
2838         (WebCore::Editor::reappliedEditing): Ditto.
2839         * editing/SelectionController.cpp:
2840         (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
2841         base and extent with the expensive isCandidate operation if the node that will
2842         be removed is in a fragment, since such a removal is guaranteed to have no effect
2843         on a selection.  This is to speed up the paste operation, which does many removes from
2844         a fragment.
2845
2846 2008-02-06  Kevin Ollivier  <kevino@theolliviers.com>
2847
2848         Reviewed by Darin Adler.
2849
2850         Rather than directly handing scroll wheel events, use
2851         PlatformWheelEvent to send them to WebCore first, so that
2852         mouse wheel scrolling info can be retrieved via JavaScript.
2853
2854         http://bugs.webkit.org/show_bug.cgi?id=17179
2855
2856         * platform/ScrollView.h:
2857         * platform/wx/MouseWheelEventWx.cpp:
2858         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2859         * platform/wx/ScrollViewWx.cpp:
2860         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
2861         (WebCore::ScrollView::wheelEvent):
2862         (WebCore::ScrollView::maximumScroll):
2863
2864 2008-02-06  Mark Rowe  <mrowe@apple.com>
2865
2866         Fix Windows builds.
2867
2868         * WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
2869
2870 2008-02-06  Mark Rowe  <mrowe@apple.com>
2871
2872         Mac build fix.  Track rename that happened in r30056.
2873
2874         * platform/graphics/mac/GraphicsContextMac.mm:
2875
2876 2008-02-06  Brent Fulgham  <bfulgham@gmail.com>
2877
2878         Reviewed by Adam Roben.
2879
2880         http://bugs.webkit.org/show_bug.cgi?id=16979
2881         Conditionalize CoreGraphics vs Cairo support in Windows port.
2882
2883         * WebCore.vcproj/WebCore.vcproj:
2884         * bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
2885         (WebCore::imageFromSelection):
2886         * bridge/win/FrameCairoWin.cpp: Added.
2887         (WebCore::imageFromSelection):
2888         * bridge/win/FrameWin.cpp:
2889         (WebCore::computePageRectsForFrame):
2890         * platform/graphics/SimpleFontData.h:
2891         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2892         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
2893         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2894         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2895         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
2896         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
2897         * platform/graphics/cg/GraphicsContextCG.cpp:
2898         (WebCore::GraphicsContext::savePlatformState):
2899         (WebCore::GraphicsContext::restorePlatformState):
2900         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed.
2901         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Copied from WebCore/platform/graphics/cg/GraphicsContextPlatformPrivate.h.
2902         * platform/graphics/win/FontCGWin.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp.
2903         (WebCore::Font::drawGlyphs):
2904         * platform/graphics/win/FontCairoWin.cpp: Added.
2905         (WebCore::Font::drawGlyphs):
2906         * platform/graphics/win/FontWin.cpp:
2907         * platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
2908         (WebCore::CGContextWithHDC):
2909         (WebCore::GraphicsContext::inTransparencyLayer):
2910         (WebCore::GraphicsContext::getWindowsContext):
2911         (WebCore::GraphicsContext::releaseWindowsContext):
2912         (WebCore::GraphicsContextPlatformPrivate::scale):
2913         (WebCore::GraphicsContextPlatformPrivate::rotate):
2914         (WebCore::GraphicsContextPlatformPrivate::translate):
2915         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
2916         (WebCore::setCGStrokeColor):
2917         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
2918         * platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
2919         (WebCore::GraphicsContext::GraphicsContext):
2920         (WebCore::GraphicsContext::getWindowsContext):
2921         (WebCore::GraphicsContext::inTransparencyLayer):
2922         (WebCore::GraphicsContext::releaseWindowsContext):
2923         (WebCore::GraphicsContext::concatCTM):
2924         * platform/graphics/win/GraphicsContextWin.cpp:
2925         * platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
2926         (WebCore::BitmapImage::getHBITMAPOfSize):
2927         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2928         * platform/graphics/win/ImageCairoWin.cpp: Added.
2929         (WebCore::BitmapImage::getHBITMAPOfSize):
2930         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2931         * platform/graphics/win/ImageWin.cpp:
2932         * platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
2933         (WebCore::scaleEmToUnits):
2934         (WebCore::SimpleFontData::platformInit):
2935         (WebCore::SimpleFontData::platformWidthForGlyph):
2936         * platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
2937         (WebCore::SimpleFontData::platformInit):
2938         (WebCore::SimpleFontData::platformDestroy):
2939         (WebCore::SimpleFontData::platformWidthForGlyph):
2940         * platform/graphics/win/SimpleFontDataWin.cpp:
2941         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
2942         (WebCore::SimpleFontData::shouldApplyMacAscentHack):
2943         * platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
2944         (WebCore::scaleDragImage):
2945         (WebCore::createDragImageFromImage):
2946         * platform/win/DragImageCairoWin.cpp: Added.
2947         (WebCore::scaleDragImage):
2948         (WebCore::createDragImageFromImage):
2949         * platform/win/DragImageWin.cpp:
2950
2951 2008-02-06  Anders Carlsson  <andersca@apple.com>
2952
2953         Reviewed by Darin.
2954
2955         Change httpBodyFromStream to take the request instead of the stream.
2956         
2957         * platform/network/cf/FormDataStreamCFNet.cpp:
2958         (WebCore::httpBodyFromRequest):
2959         * platform/network/cf/FormDataStreamCFNet.h:
2960         * platform/network/cf/ResourceRequestCFNet.cpp:
2961         (WebCore::ResourceRequest::doUpdateResourceRequest):
2962
2963 2008-02-06  Kevin McCullough  <kmccullough@apple.com>
2964
2965         Reviewed by Darin.
2966
2967         - Added manual tests for <rdar://problem/5556374> REGRESSION: cross-domain error when
2968         one URL uses an explicit port number and another doesn't
2969
2970         * manual-tests/Default-port-frame.html: Added.
2971         * manual-tests/resources/Default-port-frame-contents.html: Added.
2972
2973 2008-02-06  Oliver Hunt  <oliver@apple.com>
2974
2975         Reviewed by NOBODY (Build fix).
2976
2977         Fix windows build
2978
2979         * WebCore.vcproj/build-generated-files.sh:
2980
2981 2008-02-06  Kevin McCullough  <kmccullough@apple.com>
2982
2983         Rubberstamped by Darin.
2984
2985         <rdar://problem/5727708> REGRESSION (r29952): Can't send message from Yahoo Mail beta
2986         - Reverted the change that caused the regression.
2987
2988         * dom/Document.cpp:
2989         (WebCore::Document::createElement):
2990         (WebCore::Document::createElementNS):
2991         (WebCore::Document::getElementById):
2992         (WebCore::Document::parseQualifiedName):
2993         (WebCore::Document::createAttributeNS):
2994         * dom/Document.idl:
2995
2996 2008-02-06  Geoffrey Garen  <ggaren@apple.com>
2997
2998         Reviewed by Oliver Hunt.
2999         
3000         Fixed <rdar://problem/5728081> REGRESSION: Many leaks on buildbot
3001
3002         The problem was refCount underflow in NamedAttrMap.
3003         
3004         Neither our regression tests nor the stress test have yet discovered
3005         another instance of this problem.
3006
3007         * dom/NamedAttrMap.cpp:
3008         (WebCore::NamedAttrMap::addAttribute): Changed to use PassRefPtr,
3009         for fast and correct refCount management. Also, change a rediculously
3010         slow malloc to a slightly less rediculously slow realloc.
3011
3012         * dom/NamedAttrMap.h:
3013         (WebCore::NamedAttrMap::insertAttribute): Changed to use PassRefPtr,
3014         for fast and correct refCount management.
3015
3016         * html/HTMLTokenizer.cpp:
3017         (WebCore::Token::addAttribute): Use a RefPtr, to guarantee that the
3018         object starts with a refCount of 1.
3019
3020 2008-02-06  Darin Adler  <darin@apple.com>
3021
3022         Reviewed by Tim Hatcher.
3023
3024         - fix <rdar://problem/5723293> NULL-deref crash in PropertyMap::put opening web inspector
3025           with View Source window as target
3026
3027         * page/InspectorController.cpp:
3028         (WebCore::canPassNodeToJavaScript): Added. Returns false if the node is in a document with
3029         JavaScript disabled.
3030         (WebCore::InspectorController::inspect): Check canPassNodeToJavaScript and do nothing if
3031         it returns false.
3032
3033 2008-02-06  David Hyatt  <hyatt@apple.com>
3034
3035         Fix for bug 16799, object elements should return absolute URLs from .data.
3036
3037         Reviewed by Mark Rowe
3038
3039         * dom/Document.cpp:
3040         (WebCore::Document::completeURL):
3041         * html/HTMLAnchorElement.cpp:
3042         (WebCore::HTMLAnchorElement::href):
3043         * html/HTMLObjectElement.cpp:
3044         (WebCore::HTMLObjectElement::data):
3045
3046 2008-02-05  Antti Koivisto  <antti@apple.com>
3047
3048         Reviewed by Darin.
3049
3050         <rdar://problem/5726340>
3051         <video autoplay controls> left in unplayable state if navigated away, then back to, before video finished loading
3052         
3053         When moving document in and out from the page cache:
3054         - Cancel incomplete load by deleting the media player. This guarantees everything is in consistent state.
3055         - Restart the load if it was aborted in the middle.
3056
3057         * html/HTMLMediaElement.cpp:
3058         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3059         (WebCore::HTMLMediaElement::load):
3060         (WebCore::HTMLMediaElement::willSaveToCache):
3061         (WebCore::HTMLMediaElement::didRestoreFromCache):
3062         * html/HTMLMediaElement.h:
3063         (WebCore::HTMLMediaElement::player):
3064
3065 2008-02-06  Darin Adler  <darin@apple.com>
3066
3067         Reviewed by Sam.
3068
3069         - replace calls to put to set up properties with calls to putDirect, to
3070           prepare for a future change where put won't take attributes any more,
3071           and for a slight performance boost
3072
3073         * bindings/js/JSAudioConstructor.cpp:
3074         (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
3075         * bindings/js/JSEventTargetBase.h:
3076         (WebCore::JSEventTargetPrototype::self): Ditto.
3077         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3078         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
3079         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3080         (WebCore::JSSQLResultSetRowList::item): Ditto.
3081
3082 2008-02-06  Dan Bernstein  <mitz@apple.com>
3083
3084         Reviewed by Darin Adler.
3085
3086         - fix http://bugs.webkit.org/show_bug.cgi?17093
3087         'border-color' does not animate to the value of 'color' when unspecified
3088
3089         Test: fast/css/transition-color-unspecified.html
3090
3091         * page/AnimationController.cpp:
3092         (WebCore::ImplicitAnimation::animate): Changed to use the value of the
3093         'color' property in the source or destination style as the source or
3094         destination value of properties whose inital value is defined to be the
3095         computed value of 'color'.
3096
3097 2008-02-06  Dan Bernstein  <mitz@apple.com>
3098
3099         Build fix.
3100
3101         * svg/svgtags.in:
3102
3103 2008-02-05  Oliver Hunt  <oliver@apple.com>
3104
3105         Build fix -- touch generate-bindings to trigger regeneration of bindings
3106
3107         * bindings/scripts/generate-bindings.pl:
3108
3109 2008-02-05  Oliver Hunt  <oliver@apple.com>
3110
3111         RS=Eric.
3112
3113         Re-enable foreignObject by default as it is needed for a number of 
3114         non-fO related SVG tests and none of the old known crashes occur
3115         anymore.
3116
3117         * Configurations/WebCore.xcconfig:
3118         * WebCore.vcproj/WebCore.vcproj:
3119
3120 2008-02-05  Sam Weinig  <sam@webkit.org>
3121
3122         Reviewed by Anders Carlsson.
3123
3124         Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
3125         NodeList (and other DOM lists) items are not enumeratable using for..in
3126
3127         - Match Firefox when enumerating DOM interfaces with indexGetters (support for 
3128           the array bracket, nodeList[0], notation) by including all the items in the
3129           list before the attributes and methods of the interface.
3130
3131         Test: fast/dom/domListEnumeration.html
3132
3133         * ForwardingHeaders/kjs/PropertyNameArray.h: Added.
3134         * bindings/js/JSDOMWindowCustom.cpp:
3135         (WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model. 
3136         * bindings/js/JSHistoryCustom.cpp:
3137         (WebCore::JSHistory::customGetPropertyNames): ditto.
3138         * bindings/scripts/CodeGeneratorJS.pm: Instead of just adding a declaration of
3139         getProperyNames and implementing the method in the Custom.cpp, move to a the 
3140         model used by generated getOwnPropertySlot() and put() where the custom code
3141         is written in a separate customGetPropertyNames which returns a bool indicating
3142         whether to call up to the base class.  This enables adding the list indexes
3143         to the PropertyNameArray for interfaces with indexGetters automatically.
3144
3145 2008-02-05  Samuel Weinig  <sam@webkit.org>
3146
3147         Reviewed by Darin Adler.
3148
3149         Fix for <rdar://problem/5726604> 
3150         dom-checker: deleting properties of the window object cross-domain should not be allowed
3151
3152         Fix flaw found while testing with dom-checker testing tool (http://code.google.com/p/dom-checker/).
3153
3154         Test: http/tests/security/cross-frame-access-delete.html
3155
3156         * bindings/js/JSDOMWindowCustom.cpp:
3157         (WebCore::JSDOMWindow::deleteProperty): Override deleteProperty to not delete cross-domain.
3158         * bindings/js/JSHistoryCustom.cpp:
3159         (WebCore::JSHistory::deleteProperty): ditto.
3160         * bindings/js/JSLocation.cpp:
3161         (WebCore::JSLocation::deleteProperty): ditto.
3162         * bindings/js/JSLocation.h:
3163
3164         * bindings/scripts/CodeGeneratorJS.pm: Add deleteProperty declaration when CustomDeleteProperty is used.
3165         * page/DOMWindow.idl: Add CustomDeleteProperty extended attribute.
3166         * page/History.idl: ditto.
3167
3168 2008-02-05  Alp Toker  <alp@atoker.com>
3169
3170         Rubber-stamped by Mark Rowe.
3171
3172         Fix a "missing sentinel in function call" warning by using NULL
3173         instead of 0.
3174
3175         * platform/gtk/RenderThemeGtk.cpp:
3176         (WebCore::RenderThemeGtk::caretBlinkFrequency):
3177
3178 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
3179
3180         Reviewed by Oliver.
3181
3182         Fix dynamic updates of <circle> element's properties.
3183
3184         Added tests: svg/dynamic-updates/SVGCircleElement*
3185
3186         * svg/SVGCircleElement.cpp:
3187         (WebCore::SVGCircleElement::svgAttributeChanged): Mixed up cxAttr/xAttr etc.
3188         * svg/SVGCircleElement.h:
3189
3190 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
3191
3192         Wx build fix.  Add WebCore/plugins to the include path.
3193
3194         * webcore-base.bkl:
3195
3196 2008-02-05  Mark Rowe  <mrowe@apple.com>
3197
3198         Mac build fix.  Update the Xcode project to follow a moved file,
3199         and track a rename in two files that were missed earlier.
3200
3201         * WebCore.xcodeproj/project.pbxproj:
3202         * page/mac/WebCoreFrameBridge.mm:
3203         (-[WebCoreFrameBridge canProvideDocumentSource]):
3204         * platform/mac/PlugInInfoStoreMac.mm:
3205         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3206
3207 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
3208
3209         Reviewed by Holger.
3210
3211         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17185
3212         Fix dynamic SVG DOM updates of <a> element's href property.
3213
3214         This commit also introduces a new SVG Tests framework: LayoutTests/svg/dynamic-updates
3215         Its purpose is to provide dynamic updating tests for each SVG class & property, aka.
3216         one test per property per class. As a first pass it's sufficient to add testcases for all
3217         SVG*Element classes, and their properties - and only common-used base-class properties.
3218
3219         For SVGAElement - for example - it makes most sense to test scripting its parent
3220         SVGURIReference object ('href' property) and its own property 'target'.
3221
3222         Adding tests to see - for example - if SVGAElement reacts on changes on ie. its parent
3223         SVGExternalResourcesRequired interface, should really be done in a second pass.
3224
3225         All tests within the new framework are supposed to be created using make-js-tests-wrappers.
3226
3227         Added test: svg/dynamic-updates/SVGAElement-dom-href-attr.js
3228         Added test: svg/dynamic-updates/SVGAElement-dom-target-attr.js
3229         Added test: svg/dynamic-updates/SVGAElement-svgdom-href-prop.js
3230         Added test: svg/dynamic-updates/SVGAElement-svgdom-target-prop.js
3231
3232         * svg/SVGAElement.cpp:
3233         (WebCore::SVGAElement::parseMappedAttribute): Move any setChanged() handling in svgAttributeChanged.
3234         (WebCore::SVGAElement::svgAttributeChanged):
3235         (WebCore::SVGAElement::defaultEventHandler): Use href() not getAttribute(hrefAttr) - otherwhise SVG DOM updates fail!
3236         * svg/SVGAElement.h:
3237
3238 2008-02-05  Justin Garcia  <justin.garcia@apple.com>
3239
3240         Reviewed by Alexey Proskuryakov.
3241
3242         <rdar://problem/5685601> webkit-block-placeholder class on placeholders seems unnecessary (12317)
3243
3244         * editing/CompositeEditCommand.cpp:
3245         (WebCore::createBlockPlaceholderElement): The khtml-block-placeholder class was needed
3246         when the editing code actively looked for <br>s of that type in order to handle them
3247         specially.  That is no longer the case.
3248         * editing/InsertParagraphSeparatorCommand.cpp:
3249         (WebCore::InsertParagraphSeparatorCommand::doApply): Fixed a bug where an extra block
3250         would be inserted when hitting return inside an editable root held open by a placeholder
3251         <br> or '\n'.  Added test cases for the bug and for the special case code that was incorrectly
3252         triggered to cause the bug. 
3253
3254 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
3255
3256         Reviewed by Anders Carlsson.
3257
3258         Part one of http://bugs.webkit.org/show_bug.cgi?id=16924.
3259         Shared PluginDatabase, PluginInfoStore and PluginPackage implementations.
3260
3261         Remove the Win suffix on several plugin-related classes that will
3262         soon be refactored to be more portable.
3263
3264         * WebCore.vcproj/WebCore.vcproj:
3265         * bindings/js/kjs_navigator.cpp:
3266         (KJS::PluginBase::cachePluginDataIfNecessary):
3267         * bindings/js/kjs_window.cpp:
3268         * bridge/win/FrameWin.cpp:
3269         (WebCore::Frame::createScriptInstanceForWidget):
3270         * dom/Clipboard.cpp:
3271         * dom/DOMImplementation.cpp:
3272         (WebCore::DOMImplementation::createDocument):
3273         * loader/FrameLoader.cpp:
3274         (WebCore::FrameLoader::shouldUsePlugin):
3275         * page/DragController.cpp:
3276         * platform/PlugInInfoStore.h: Removed.
3277         * platform/gtk/TemporaryLinkStubs.cpp:
3278         (PluginInfoStore::createPluginInfoForPluginAtIndex):
3279         (PluginInfoStore::pluginCount):
3280         (PluginInfoStore::pluginNameForMIMEType):
3281         (WebCore::PluginInfoStore::supportsMIMEType):
3282         * platform/qt/PlugInInfoStoreQt.cpp:
3283         (WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
3284         (WebCore::PluginInfoStore::pluginCount):
3285         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3286         (WebCore::PluginInfoStore::supportsMIMEType):
3287         * platform/qt/TemporaryLinkStubs.cpp:
3288         * platform/win/SharedTimerWin.cpp:
3289         (WebCore::TimerWindowWndProc):
3290         * platform/wx/TemporaryLinkStubs.cpp:
3291         (PluginInfoStore::createPluginInfoForPluginAtIndex):
3292         (PluginInfoStore::pluginCount):
3293         (WebCore::PluginInfoStore::supportsMIMEType):
3294         (PluginInfoStore::pluginNameForMIMEType):
3295         * plugins/PluginDatabase.h: Copied from WebCore/plugins/win/PluginDatabaseWin.h.
3296         * plugins/PluginInfoStore.cpp: Copied from WebCore/plugins/win/PlugInInfoStoreWin.cpp.
3297         (WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
3298         (WebCore::PluginInfoStore::pluginCount):
3299         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3300         (WebCore::PluginInfoStore::supportsMIMEType):
3301         (WebCore::refreshPlugins):
3302         * plugins/PluginInfoStore.h: Copied from WebCore/platform/PlugInInfoStore.h.
3303         * plugins/PluginPackage.h: Copied from WebCore/plugins/win/PluginPackageWin.h.
3304         (WebCore::PluginPackageHash::hash):
3305         (WebCore::PluginPackageHash::equal):
3306         (WTF::):
3307         * plugins/PluginView.h: Copied from WebCore/plugins/win/PluginViewWin.h.
3308         (WebCore::PluginView::plugin):
3309         * plugins/npapi.cpp: Copied from WebCore/plugins/win/npapi.cpp.
3310         (pluginViewForInstance):
3311         (NPN_UserAgent):
3312         * plugins/win/PlugInInfoStoreWin.cpp: Removed.
3313         * plugins/win/PluginDatabaseWin.cpp:
3314         (WebCore::PluginDatabase::installedPlugins):
3315         (WebCore::PluginDatabase::addExtraPluginPath):
3316         (WebCore::PluginDatabase::refresh):
3317         (WebCore::PluginDatabase::plugins):
3318         (WebCore::addPluginsFromRegistry):
3319         (WebCore::PluginDatabase::getPluginsInPaths):
3320         (WebCore::PluginDatabase::defaultPluginPaths):
3321         (WebCore::PluginDatabase::isMIMETypeRegistered):
3322         (WebCore::PluginDatabase::pluginForMIMEType):
3323         (WebCore::PluginDatabase::MIMETypeForExtension):
3324         (WebCore::PluginDatabase::findPlugin):
3325         (WebCore::PluginDatabase::createPluginView):
3326         * plugins/win/PluginDatabaseWin.h: Removed.
3327         * plugins/win/PluginPackageWin.cpp:
3328         (WebCore::PluginPackage::~PluginPackage):
3329         (WebCore::PluginPackage::freeLibrarySoon):
3330         (WebCore::PluginPackage::freeLibraryTimerFired):
3331         (WebCore::PluginPackage::PluginPackage):
3332         (WebCore::PluginPackage::compareFileVersion):
3333         (WebCore::PluginPackage::storeFileVersion):
3334         (WebCore::PluginPackage::isPluginBlacklisted):
3335         (WebCore::PluginPackage::fetchInfo):
3336         (WebCore::PluginPackage::load):
3337         (WebCore::PluginPackage::unload):
3338         (WebCore::PluginPackage::unloadWithoutShutdown):
3339         (WebCore::PluginPackage::createPackage):
3340         (WebCore::PluginPackage::hash):
3341         (WebCore::PluginPackage::equal):
3342         * plugins/win/PluginPackageWin.h: Removed.
3343         * plugins/win/PluginViewWin.cpp:
3344         (WebCore::PluginRequest::PluginRequest):
3345         (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
3346         (WebCore::registerPluginView):
3347         (WebCore::PluginViewWndProc):
3348         (WebCore::PluginView::popPopupsStateTimerFired):
3349         (WebCore::PluginView::wndProc):
3350         (WebCore::PluginView::updateWindow):
3351         (WebCore::PluginView::windowClipRect):
3352         (WebCore::PluginView::setFrameGeometry):
3353         (WebCore::PluginView::geometryChanged):
3354         (WebCore::PluginView::setFocus):
3355         (WebCore::PluginView::show):
3356         (WebCore::PluginView::hide):
3357         (WebCore::PluginView::paintMissingPluginIcon):
3358         (WebCore::PluginView::dispatchNPEvent):
3359         (WebCore::PluginView::paint):
3360         (WebCore::PluginView::handleKeyboardEvent):
3361         (WebCore::PluginView::handleMouseEvent):
3362         (WebCore::PluginView::handleEvent):
3363         (WebCore::PluginView::setParent):
3364         (WebCore::PluginView::attachToWindow):
3365         (WebCore::PluginView::detachFromWindow):
3366         (WebCore::PluginView::setNPWindowRect):
3367         (WebCore::PluginView::start):
3368         (WebCore::PluginView::stop):
3369         (WebCore::PluginView::setCurrentPluginView):
3370         (WebCore::PluginView::currentPluginView):
3371         (WebCore::PluginView::performRequest):
3372         (WebCore::PluginView::requestTimerFired):
3373         (WebCore::PluginView::scheduleRequest):
3374         (WebCore::PluginView::load):
3375         (WebCore::PluginView::getURLNotify):
3376         (WebCore::PluginView::getURL):
3377         (WebCore::PluginView::handlePost):
3378         (WebCore::PluginView::postURLNotify):
3379         (WebCore::PluginView::postURL):
3380         (WebCore::PluginView::newStream):
3381         (WebCore::PluginView::write):
3382         (WebCore::PluginView::destroyStream):
3383         (WebCore::PluginView::userAgent):
3384         (WebCore::PluginView::status):
3385         (WebCore::PluginView::getValue):
3386         (WebCore::PluginView::setValue):
3387         (WebCore::PluginView::invalidateTimerFired):
3388         (WebCore::PluginView::invalidateRect):
3389         (WebCore::PluginView::invalidateRegion):
3390         (WebCore::PluginView::forceRedraw):
3391         (WebCore::PluginView::pushPopupsEnabledState):
3392         (WebCore::PluginView::popPopupsEnabledState):
3393         (WebCore::PluginView::arePopupsAllowed):
3394         (WebCore::PluginView::bindingInstance):
3395         (WebCore::PluginView::~PluginView):
3396         (WebCore::PluginView::disconnectStream):
3397         (WebCore::PluginView::determineQuirks):
3398         (WebCore::PluginView::setParameters):
3399         (WebCore::PluginView::PluginView):
3400         (WebCore::PluginView::init):
3401         (WebCore::PluginView::didReceiveResponse):
3402         (WebCore::PluginView::didReceiveData):
3403         (WebCore::PluginView::didFinishLoading):
3404         (WebCore::PluginView::didFail):
3405         (WebCore::PluginView::setCallingPlugin):
3406         (WebCore::PluginView::isCallingPlugin):
3407         * plugins/win/PluginViewWin.h: Removed.
3408         * plugins/win/npapi.cpp: Removed.
3409
3410 2008-02-05  Alexey Proskuryakov  <ap@webkit.org>
3411
3412         Reviewed by Darin.
3413
3414         http://bugs.webkit.org/show_bug.cgi?id=17158
3415         Setting innerHTML in a detached XHTML element doesn't use the right namespace
3416
3417         Test: fast/dom/innerHTML-detached-element.xhtml
3418
3419         * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::XMLTokenizer): Take parent element namespace
3420         into account.
3421
3422 2008-02-05  Antti Koivisto  <antti@apple.com>
3423
3424         Reviewed by Geoff.
3425         
3426         Fix <rdar://problem/5698200>
3427         eBay photo uploading hangs and causes slow script warning to pop up
3428         
3429         In a case like this
3430         
3431             var f = window.parent.parentFunction;
3432             document.domain = document.domain; // this makes window.parent inaccessible
3433             f();
3434         
3435         Firefox allows parentFunction to access parents properties. Match this behavior.
3436         
3437         In a domain security check against the dynamic global object fails for the specific reason that one of 
3438         the frames has written to the document.domain property and another has not (but they match otherwise), 
3439         then recheck against the lexical global object.
3440
3441         Test: http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html
3442               http/tests/security/cross-frame-access-callback-explicit-domain-DENY.html
3443
3444         * bindings/js/kjs_window.cpp:
3445         (KJS::Window::allowsAccessFrom):
3446         (KJS::Window::printErrorMessage):
3447         * bindings/js/kjs_window.h:
3448         * loader/FrameLoader.cpp:
3449         (WebCore::FrameLoader::shouldAllowNavigation):
3450         * platform/SecurityOrigin.cpp:
3451         (WebCore::SecurityOrigin::canAccess):
3452         * platform/SecurityOrigin.h:
3453         (WebCore::SecurityOrigin::):
3454
3455 2008-02-05  Adam Roben  <aroben@apple.com>
3456
3457         Remove an unused member from Document
3458
3459         Reviewed by Mitz.
3460
3461         * dom/Document.cpp:
3462         (WebCore::Document::recalcStyleSelector): There's no need to take
3463         m_printSheet into account anymore as it's never anything but the null
3464         string.
3465         * dom/Document.h: Removed m_printSheet and methods relating to it.
3466
3467 2008-02-05  Dan Bernstein  <mitz@apple.com>
3468
3469         Reviewed by Darin Adler.
3470
3471         - WebCore part of <rdar://problem/5724303> Should implement writing direction shortcuts
3472
3473         * WebCore.base.exp: Added Editor::setBaseWritingDirection() and
3474         Frame::baseWritingDirectionForSelectionStart().
3475         * page/mac/WebCoreFrameBridge.h: Removed
3476         -baseWritingDirectionForSelectionStart.
3477         * page/mac/WebCoreFrameBridge.mm: Ditto.
3478
3479 2008-02-05  Mark Rowe  <mrowe@apple.com>
3480
3481         Reviewed by Oliver Hunt.
3482
3483         Update versioning to support the mysterious future.
3484
3485         * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
3486
3487 2008-02-05  Mark Rowe  <mrowe@apple.com>
3488
3489         Fix the wxWidget Mac build by avoiding using ICU functions that were added after ICU 3.2.
3490
3491         * editing/SmartReplaceICU.cpp:
3492         (WebCore::addAllCodePoints): Implement a replacement for uset_addAllCodePoints.
3493         (WebCore::getSmartSet): Use addAllCodePoints instead of uset_addAllCodePoints.
3494
3495 2008-02-05  Mark Rowe  <mrowe@apple.com>
3496
3497         Rubber-stamped by Oliver Hunt.
3498
3499         30,000!
3500
3501         * ChangeLog: Point out revision 30,000.
3502
3503 2008-02-04  Mark Rowe  <mrowe@apple.com>
3504
3505         Unreviewed Gtk build fix.
3506
3507         wchar_t is only convertible to UChar on Windows.  Use WebCore's String class
3508         to get the UChars out of a C string in a portable fashion.
3509
3510         * editing/SmartReplaceICU.cpp:
3511         (WebCore::getSmartSet):
3512
3513 2008-02-04  Tony Chang  <idealisms@gmail.com>
3514
3515         Reviewed by Darin Adler.
3516
3517         Port the CoreFoundation version of WebCore::isCharacterSmartReplaceExempt
3518         for other platforms by using ICU directly.
3519
3520         * GNUmakefile.am: Add SmartReplaceICU.cpp.
3521         * WebCore.pro: Ditto.
3522         * WebCoreSources.bkl: Ditto.
3523         * editing/SmartReplace.cpp: Don't use this empty implementation when ICU is available.
3524         * editing/SmartReplaceICU.cpp:
3525         (getSmartSet):
3526         (WebCore::isCharacterSmartReplaceExempt):
3527
3528 2008-02-04  Robert Sesek  <rsesek@bluestatic.org>
3529
3530         Reviewed by Darin Adler.
3531
3532         Fix http://bugs.webkit.org/show_bug.cgi?id=17042
3533         forms without action attributes submit to the <base> href instead of the originating page
3534
3535         Test: fast/forms/missing-action.html
3536
3537         * html/HTMLFormElement.cpp:
3538         (WebCore::HTMLFormElement::submit): Submit to origin if there is no action
3539
3540 2008-02-04  Mark Rowe  <mrowe@apple.com>
3541
3542         Reviewed by Tim Hatcher.
3543
3544         Gtk build fix.  Use std::numeric_limits in place of ULLONG_MAX as
3545         some Linux machines do not have ULLONG_MAX.
3546
3547         OriginUsageRecord::unknownDiskUsage becomes a static function to avoid
3548         the global initialiser which would otherwise be generated.
3549
3550         * storage/OriginUsageRecord.cpp:
3551         (WebCore::OriginUsageRecord::unknownDiskUsage):
3552         (WebCore::OriginUsageRecord::addDatabase):
3553         (WebCore::OriginUsageRecord::removeDatabase):
3554         (WebCore::OriginUsageRecord::markDatabase):
3555         (WebCore::OriginUsageRecord::diskUsage):
3556         * storage/OriginUsageRecord.h:
3557
3558 2008-02-04  Mark Rowe  <mrowe@apple.com>
3559
3560         Speculative Gtk build fix.
3561
3562         * storage/OriginUsageRecord.cpp:
3563
3564 2008-02-04  Brady Eidson  <beidson@apple.com>
3565
3566         Attempt to fix build of all non-Mac platforms
3567
3568         * GNUmakefile.am:
3569         * WebCore.pro:
3570         * WebCore.vcproj/WebCore.vcproj:
3571         * WebCoreSources.bkl:
3572
3573 2008-02-04  Brady Eidson  <beidson@apple.com>
3574
3575         Reviewed by Darin
3576
3577         Fix for <rdar://problem/5628468> - Quotas need to be implemented per-origin, and not per-database
3578
3579         To accomplish this, we need to track the sizes of all databases in an origin to constantly keep an up to date
3580         count of the origin's total disk usage.  I've introduced the OriginQuotaManager and OriginUsageRecord classes
3581         to accomplish this.
3582
3583         Whenever a transaction is known to mutate the size of a database (tracked by the DatabaseAuthorizer), it marks
3584         that database as unknown in the OriginQuotaManager.  When a transaction later comes along to ask the 
3585         OriginQuotaManager the usage for that origin, it stat's all of the unknown databases in the origin and returns
3586         the result.
3587
3588         Since the OriginQuotaManager is interesting from both the main thread and a DatabaseThread, all accessors it 
3589         provides require it to be locked first.  ASSERTs help guarantee this is always the case.
3590
3591         Layout test will involve adding functionality to DRT on multiple platforms and will be coming up shortly
3592
3593         * WebCore.xcodeproj/project.pbxproj:
3594
3595         * platform/SecurityOrigin.h: Changed to be ThreadSafeShared instead of RefCounted
3596
3597         * storage/Database.cpp:
3598         (WebCore::Database::databaseSize): Return the current filesize of this database on disk
3599         (WebCore::Database::maximumSize): Added - calculates maximum size of this database based on quota and usage
3600         * storage/Database.h: Add databaseSize() accessor, and get rid of unused declared methods that *were* going 
3601           to be the solution for this bug.
3602
3603         * storage/DatabaseTracker.cpp:
3604         (WebCore::DatabaseTracker::originQuotaManager): Accessor to the OriginQuotaManager which is lazily created
3605         (WebCore::DatabaseTracker::canEstablishDatabase): Fetch the usage for this database slightly earlier, which
3606           will ensure that the OriginQuotaManager is primed to track this origin
3607         (WebCore::DatabaseTracker::fullPathForDatabase): Ditto
3608         (WebCore::DatabaseTracker::populateOrigins): Create the OriginQuotaManager here.
3609         (WebCore::DatabaseTracker::usageForOrigin): Use the OriginQuotaManager instead of looping through each database
3610           in the origin
3611         (WebCore::DatabaseTracker::deleteOrigin): Remove this origin from the OriginQuotaManager as it is no longer 
3612           interesting
3613         (WebCore::DatabaseTracker::deleteDatabase): Remove this database from the OriginQuotaManager as it is no longer
3614           interesting
3615         * storage/DatabaseTracker.h:
3616
3617         * storage/OriginQuotaManager.cpp: Added.
3618         (WebCore::OriginQuotaManager::OriginQuotaManager):
3619         (WebCore::OriginQuotaManager::lock):
3620         (WebCore::OriginQuotaManager::unlock):
3621         (WebCore::OriginQuotaManager::trackOrigin): Add an origin to be tracked.  Useful for when the very first database 
3622           in a new origin is still in the process of being created
3623         (WebCore::OriginQuotaManager::tracksOrigin):
3624         (WebCore::OriginQuotaManager::addDatabase):
3625         (WebCore::OriginQuotaManager::removeDatabase):
3626         (WebCore::OriginQuotaManager::removeOrigin): Removes all records in a certain origin from being tracked
3627         (WebCore::OriginQuotaManager::markDatabase): Mark a specific database as having an unknown size - called when the
3628           DatabaseAuthorizer in a SQLTransaction knows the file size might change.
3629         (WebCore::OriginQuotaManager::diskUsage): Returns the disk usage for the given origin
3630         * storage/OriginQuotaManager.h: Added.
3631
3632         * storage/OriginUsageRecord.cpp: Added.
3633         (WebCore::OriginUsageRecord::OriginUsageRecord):
3634         (WebCore::OriginUsageRecord::addDatabase): Adds an entry for the database in this origin's record
3635         (WebCore::OriginUsageRecord::removeDatabase): Removes that entry
3636         (WebCore::OriginUsageRecord::markDatabase): Marks the database as of unknown size
3637         (WebCore::OriginUsageRecord::diskUsage): Returns the cached disk usage value, or recalculates it if any databases
3638           are marked
3639         * storage/OriginUsageRecord.h: Added.
3640
3641         * storage/SQLTransaction.cpp:
3642         (WebCore::SQLTransaction::openTransactionAndPreflight): Use Database::maximumSize() instead of attributing the
3643           entire quota to each database.
3644         (WebCore::SQLTransaction::runStatements): Use Database::maximumSize() instead of attributing the entire quota
3645           to each database.
3646         (WebCore::SQLTransaction::runCurrentStatement): Mark this databases's size as unknown in the 
3647           OriginQuotaManager if this statement will change the size of the database
3648         * storage/SQLTransaction.h:
3649
3650 2008-02-04   David Harrison  <harrison@apple.com>
3651
3652         Reviewed by Darin Adler.
3653
3654         <rdar://problem/5607381> CrashTracer: [REGRESSION] 1748 crashes in Safari at com.apple.WebCore: WebCore::Image::width const + 24
3655
3656         Use an empty image when the local image file could not be loaded.
3657
3658         No test case because it would require forcing tiff load failure.
3659         
3660         * editing/DeleteButtonController.cpp:
3661         (WebCore::DeleteButtonController::createDeletionUI):
3662         Do not present the deletion UI in the (odd) event that the delete button could not be loaded.
3663         
3664         * platform/graphics/mac/ImageMac.mm:
3665         (WebCore::Image::loadPlatformResource):
3666         Return an empty image instead of 0 if the load fails.
3667
3668 2008-02-04  Darin Adler  <darin@apple.com>
3669
3670         * dom/Document.cpp:
3671         (WebCore::Document::completeURL): Fixed misleading comment.
3672
3673 2008-02-04  Jon Honeycutt  <jhoneycutt@apple.com>
3674
3675         Reviewed by Darin.
3676
3677         Blacklist Silverlight versions older than min required, not newer. 
3678
3679         * plugins/win/PluginPackageWin.cpp:
3680         (WebCore::PluginPackageWin::isPluginBlacklisted):
3681
3682 2008-02-04  David Hyatt  <hyatt@apple.com>
3683
3684         Fix for bug 16751, misparsing of html*.test in CSS.
3685
3686         Reviewed by darin
3687
3688         Added fast/css/simple-selector-chain-parsing.html
3689
3690         * css/CSSGrammar.y:
3691
3692 2008-02-04  Darin Adler  <darin@apple.com>
3693
3694         Suggested by Geoff and Maciej.
3695
3696         * bindings/js/JSCustomSQLTransactionCallback.cpp: Reworded a misleading
3697         comment to be correct.
3698
3699 2008-02-04  Jon Honeycutt  <jhoneycutt@apple.com>
3700
3701         Reviewed by Steve, Anders.
3702
3703         <rdar://problem/5211187> QuickTime and Flash plug-ins draw outside of
3704         content area when inside an iframe or div with overflow when playing a
3705         movie and scrolling the iframe/div area
3706
3707         Clip the update region to the zero rect when scrolling. Don't do this
3708         for Java, because it results in repaint problems. 
3709
3710         * plugins/PluginQuirkSet.h: Added the DontClipToZeroRectWhenScrolling
3711         quirk
3712         (WebCore::):
3713         * plugins/win/PluginViewWin.cpp:
3714         (WebCore::PluginViewWin::updateWindow): Readded the old behavior of
3715         clipping to the zero rect when updating the window during a scroll.
3716         Added plug-in quirk to ignore this behavior for Java. Swapped order of
3717         the SetWindowRgn() and MoveWindow() calls to prevent Java from painting
3718         outside of its container during a scroll.
3719         (WebCore::PluginViewWin::determineQuirks): If this is Java, add the
3720         DontClipToZeroRectWhenScrolling quirk.
3721
3722 2008-02-04  Timothy Hatcher  <timothy@apple.com>
3723
3724         Reviewed by Mark Rowe.
3725
3726         <rdar://problem/5722972> Leopard needs to statically link SQLite
3727
3728         * Configurations/Base.xcconfig: Always have a header search path for WebCoreSQLite3.
3729         * Configurations/DebugRelease.xcconfig: Ditto.
3730         * Configurations/WebCore.xcconfig: Always link against WebCoreSQLite3.
3731
3732 2008-02-04  Adam Roben  <aroben@apple.com>
3733
3734         Windows build fix
3735
3736         * bindings/scripts/CodeGeneratorCOM.pm: Touched to force a rebuild of
3737         the COM bindings.
3738
3739 2008-02-04   David Harrison  <harrison@apple.com>
3740
3741         Reviewed by Tim Hatcher.
3742
3743         - fix <rdar://problem/5715481> REGRESSION (r26499): JavaScript document.lastModified is not supported
3744
3745         Re-add attribute inadvertantly lost by r26499.
3746
3747         Test: fast/js/lastModified.html: Added.
3748
3749         * dom/Document.idl:
3750         Add lastModified.
3751
3752 2008-02-04  Darin Adler  <darin@apple.com>
3753
3754         Reviewed by Geoff.
3755
3756         - fix <rdar://problem/5713621> Threading issue when destroying database transaction callback
3757
3758         Do main-thread-only stuff on the main thread.
3759
3760         Not clear how to make a regression test for this.
3761
3762         * bindings/js/JSCustomSQLTransactionCallback.cpp:
3763         (WebCore::JSCustomSQLTransactionCallback::Data::Data): Added.
3764         (WebCore::JSCustomSQLTransactionCallback::Data::callback): Added.
3765         (WebCore::JSCustomSQLTransactionCallback::Data::frame): Added.
3766         (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback): Put data into a
3767         separate Data object; we'll destroy it on the main thread.
3768         (WebCore::JSCustomSQLTransactionCallback::deleteData): Added.
3769         (WebCore::JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback): Call the
3770         deleteData function on the main thread.
3771         (WebCore::JSCustomSQLTransactionCallback::handleEvent): Updated to get at fields through the
3772         m_data object.
3773         * bindings/js/JSCustomSQLTransactionCallback.h: Declare deleteData, Data, and m_data rather
3774         than m_callback and m_frame.
3775
3776 2008-02-04  Adam Roben  <aroben@apple.com>
3777
3778         Fix the search field if the inpsected Document has overridden
3779         Document.evaluate or Document.querySelectorAll
3780
3781         Reviewed by Darin.
3782
3783         * manual-tests/inspector-document-methods-override.html: Added.
3784         * page/InspectorController.cpp:
3785         (WebCore::InspectorController::didCommitLoad): Reworded a comment to
3786         force WebCore.vcproj to build.
3787         * page/inspector/inspector.js: Call
3788         Document.prototype.{evaluate,querySelectorAll}.call instead of calling
3789         the functions directly on the inspected Document. This ensures we are
3790         calling the version of these functions we intended to.
3791
3792 2008-02-04  Darin Adler  <darin@apple.com>
3793
3794         Reviewed by Tim Hatcher.
3795
3796         - possible fix for <rdar://problem/5714030> Crash in Database::deliverAllPendingCallbacks()
3797           reloading a page quickly
3798
3799         I don't fully understand the cause of the crash, but I think this might
3800         be a helpful change.
3801
3802         * platform/sql/SQLiteTransaction.cpp:
3803         (WebCore::SQLiteTransaction::commit): If the commit fails, don't leave this
3804         transaction and database both marked as "still in progress". As far as I can
3805         tell this does no good, and also seems to do harm.
3806         (WebCore::SQLiteTransaction::rollback): Ditto.
3807
3808         * storage/Database.cpp:
3809         (WebCore::Database::performTransactionStep): Add some assertions to
3810         detect databases stuck in the "transaction in progress" state.
3811         * storage/SQLTransaction.cpp:
3812         (WebCore::SQLTransaction::openTransactionAndPreflight): Ditto.
3813         (WebCore::SQLTransaction::postflightAndCommit): Ditto.
3814         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Ditto.
3815
3816 2008-02-04  Darin Adler  <darin@apple.com>
3817
3818         Reviewed by Geoff.
3819
3820         - fix <rdar://problem/5715692> REGRESSION (r28570): JavaScript window.scrollTo()
3821           calls no longer accept 'undefined' values
3822
3823         By default, we should accept non-numeric parameters and non-integral numbers for
3824         parameters that expect integers, without throwing exceptions.
3825
3826         While creating the test for this, I ran into a couple minor bugs with the
3827         functions involved, and this patch fixes those too.
3828
3829         Test: fast/dom/non-numeric-values-numeric-parameters.html
3830
3831         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3832         (WebCore::JSHTMLOptionsCollection::add): Added. This function has unusual behavior
3833         when passed non-integral values for its second parameter, so it needs to be written
3834         by hand. I think that [Custom] is better here than inventing a new keyword.
3835
3836         * bindings/scripts/CodeGeneratorJS.pm: Changed default for "long" and "unsigned long"
3837         to ignore errors rather than failing due to type differences. Also changed a couple
3838         functions to use hashes.
3839
3840         * css/CSSStyleSheet.h:
3841         (WebCore::CSSStyleSheet::removeRule): Remove overload of removeRule without a second
3842         parameters. While we do allow this from JavaScript, it's not a true optional parameter,
3843         but rather just a case of "you can omit parameters and they are treated as undefined"
3844         combined with "undefined turns into 0 when passed to a function that takes an integer".
3845         * css/CSSStyleSheet.idl: Removed [Optional] on the index parameter for removeRule.
3846         This is not truly an optional parameter.
3847
3848         * dom/ProgressEvent.cpp:
3849         (WebCore::ProgressEvent::initProgressEvent): Updated this function to match other
3850         DOM event init functions -- important to do nothing if this is called on the an
3851         already-dispatched event and we need to respect the bubble and cancelable arguments.
3852         Also removed initProgressEventNS. We don't support namespaced events, and if we add
3853         support, it should be across all event classes, not just ProgressEvent.
3854         * dom/ProgressEvent.h: Removed initProgressEventNS.
3855         * dom/ProgressEvent.idl: Ditto.
3856
3857         * dom/Range.cpp:
3858         (WebCore::Range::createContextualFragment): Added a check for 0. This can happen
3859         if the passed-in start container is a node that's not an HTML element and also
3860         does not have a parent.
3861
3862         * html/HTMLOptionsCollection.idl: Added the [Custom] attribute to add, since the
3863         rules for processing its parameters are unusual.
3864
3865         * page/DOMSelection.cpp: Removed the version of setPosition that has only
3866         one parameter. The offset is not really optional.
3867         * page/DOMSelection.h: Ditto.
3868         * page/DOMSelection.idl: Removed the [Optional] keyword for the second parameter of
3869         setPosition. It's not a true optional parameter (see discussion of removeRule above).
3870
3871         * page/DOMWindow.cpp:
3872         (WebCore::DOMWindow::adjustWindowRect): Simplified logic for constraining the X
3873         and Y coordinates, in a way that makes them work even when the window coordinates
3874         are infinite. Also strengthened the assertion.
3875
3876 2008-02-04  Alp Toker  <alp@atoker.com>
3877
3878         Rubber-stamped by Mark Rowe.
3879
3880         Remove all trailing whitespace in the GTK+ port and related
3881         components.
3882
3883         * GNUmakefile.am:
3884         * page/gtk/DragControllerGtk.cpp:
3885         (WebCore::DragController::dragOperation):
3886         (WebCore::DragController::maxDragImageSize):
3887         * page/gtk/EventHandlerGtk.cpp:
3888         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3889         (WebCore::EventHandler::createDraggingClipboard):
3890         * page/gtk/FrameGtk.cpp:
3891         (WebCore::Frame::dragImageForSelection):
3892         * platform/graphics/cairo/AffineTransformCairo.cpp:
3893         (WebCore::AffineTransform::mapRect):
3894         (WebCore::AffineTransform::isIdentity):
3895         (WebCore::AffineTransform::operator== ):
3896         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3897         (WebCore::GraphicsContext::drawLine):
3898         * platform/graphics/cairo/ImageBufferCairo.cpp:
3899         * platform/graphics/cairo/ImageCairo.cpp:
3900         * platform/graphics/cairo/ImageSourceCairo.cpp:
3901         (WebCore::createDecoder):
3902         * platform/graphics/gtk/FontCacheGtk.cpp:
3903         * platform/graphics/gtk/FontGtk.cpp:
3904         * platform/graphics/gtk/FontPlatformData.h:
3905         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3906         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
3907         * platform/graphics/gtk/IconGtk.cpp:
3908         * platform/graphics/gtk/ImageGtk.cpp:
3909         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
3910         * platform/gtk/ClipboardGtk.h:
3911         * platform/gtk/ContextMenuItemGtk.cpp:
3912         (WebCore::ContextMenuItem::createNativeMenuItem):
3913         * platform/gtk/CursorGtk.cpp:
3914         * platform/gtk/DragDataGtk.cpp:
3915         * platform/gtk/DragImageGtk.cpp:
3916         (WebCore::createDragImageIconForCachedImage):
3917         * platform/gtk/FileChooserGtk.cpp:
3918         (WebCore::stringByAdoptingFileSystemRepresentation):
3919         * platform/gtk/FileSystemGtk.cpp:
3920         (WebCore::fileExists):
3921         (WebCore::deleteFile):
3922         (WebCore::deleteEmptyDirectory):
3923         * platform/gtk/KeyEventGtk.cpp:
3924         * platform/gtk/KeyboardCodes.h:
3925         * platform/gtk/LocalizedStringsGtk.cpp:
3926         (WebCore::inputElementAltText):
3927         (WebCore::resetButtonDefaultLabel):
3928         (WebCore::fileButtonChooseFileLabel):
3929         (WebCore::fileButtonNoFileSelectedLabel):
3930         (WebCore::contextMenuItemTagOpenImageInNewWindow):
3931         * platform/gtk/MIMETypeRegistryGtk.cpp:
3932         (WebCore::):
3933         * platform/gtk/MouseEventGtk.cpp:
3934         * platform/gtk/PasteboardGtk.cpp:
3935         (WebCore::PasteboardSelectionData::markup):
3936         (WebCore::Pasteboard::writeSelection):
3937         * platform/gtk/PasteboardHelper.h:
3938         * platform/gtk/PlatformScreenGtk.cpp:
3939         (WebCore::screenDepth):
3940         (WebCore::screenIsMonochrome):
3941         (WebCore::screenRect):
3942         (WebCore::screenAvailableRect):
3943         * platform/gtk/PlatformScrollBar.h:
3944         * platform/gtk/PlatformScrollBarGtk.cpp:
3945         (PlatformScrollbar::PlatformScrollbar):
3946         (PlatformScrollbar::updateThumbPosition):
3947         * platform/gtk/PopupMenuGtk.cpp:
3948         (WebCore::PopupMenu::updateFromElement):
3949         * platform/gtk/RenderThemeGtk.h:
3950         * platform/gtk/ScrollViewGtk.cpp:
3951         (WebCore::ScrollView::scrollBy):
3952         (WebCore::ScrollView::addChild):
3953         (WebCore::ScrollView::updateScrollbars):
3954         (WebCore::ScrollView::windowToContents):
3955         (WebCore::ScrollView::contentsToWindow):
3956         (WebCore::ScrollView::scrollbarUnderMouse):
3957         * platform/gtk/SearchPopupMenuGtk.cpp:
3958         * platform/gtk/SharedTimerGtk.cpp:
3959         * platform/gtk/SystemTimeLinux.cpp:
3960         (WebCore::currentTime):
3961         * platform/gtk/TemporaryLinkStubs.cpp:
3962         (PlugInInfoStore::pluginNameForMIMEType):
3963         * platform/gtk/ThreadingGtk.cpp:
3964         (WebCore::establishIdentifierForThread):
3965         (WebCore::threadForIdentifier):
3966         (WebCore::clearThreadForIdentifier):
3967         (WebCore::ThreadCondition::ThreadCondition):
3968         * platform/gtk/WheelEventGtk.cpp:
3969         * platform/gtk/WidgetGtk.cpp:
3970         * platform/network/curl/ResourceHandleCurl.cpp:
3971         * platform/network/curl/ResourceHandleManager.cpp:
3972         (WebCore::ResourceHandleManager::setupPOST):
3973         * platform/network/curl/ResourceHandleManager.h:
3974         * platform/network/curl/ResourceRequest.h:
3975         (WebCore::ResourceRequest::ResourceRequest):
3976         * platform/network/curl/ResourceResponse.h:
3977
3978 2008-02-03  Christian Dywan  <christian@imendio.com>
3979
3980         Reviewed by Alp Toker.
3981
3982         http://bugs.webkit.org/show_bug.cgi?id=17046
3983         [GTK] Context menu fixes and customisation suport
3984
3985         Provide standard GTK+ context menu items where appropriate.
3986
3987         Note that this change makes direct use of WebKit from WebCore which is
3988         against WebKit/GTK+ guidelines. The ContextMenu abstraction should be
3989         fixed at some point.
3990
3991         * page/ContextMenuController.cpp:
3992         (WebCore::ContextMenuController::contextMenuItemSelected):
3993         * platform/ContextMenu.cpp:
3994         (WebCore::createAndAppendInputMethodsSubMenu):
3995         (WebCore::):
3996         (WebCore::insertControlCharacter):
3997         (WebCore::createAndAppendUnicodeSubMenu):
3998         (WebCore::ContextMenu::populate):
3999         (ContextMenu::checkOrEnableIfNeeded):
4000         * platform/ContextMenuItem.h:
4001         (WebCore::):
4002         * platform/LocalizedStrings.h:
4003         * platform/gtk/ContextMenuItemGtk.cpp:
4004         (WebCore::gtkStockIDFromContextMenuAction):
4005         * platform/gtk/LocalizedStringsGtk.cpp:
4006         (WebCore::gtkStockLabel):
4007         (WebCore::contextMenuItemTagCopy):
4008         (WebCore::contextMenuItemTagDelete):
4009         (WebCore::contextMenuItemTagSelectAll):
4010         (WebCore::contextMenuItemTagUnicode):
4011         (WebCore::contextMenuItemTagInputMethods):
4012         (WebCore::contextMenuItemTagGoBack):
4013         (WebCore::contextMenuItemTagGoForward):
4014         (WebCore::contextMenuItemTagStop):
4015         (WebCore::contextMenuItemTagCut):
4016         (WebCore::contextMenuItemTagPaste):
4017         (WebCore::contextMenuItemTagBold):
4018         (WebCore::contextMenuItemTagItalic):
4019         (WebCore::contextMenuItemTagUnderline):
4020
4021 2008-02-03  Oliver Hunt  <oliver@apple.com>
4022
4023         Reviewed by Maciej.
4024
4025         Bug 17169: Support transform on Canvas
4026
4027         Nice and simple patch as the cross-platform code to apply
4028         a transform was already there.
4029
4030         Tests: fast/canvas/canvas-transform-identity.html
4031                fast/canvas/canvas-transform-infinity.html
4032                fast/canvas/canvas-transform-multiply.html
4033                fast/canvas/canvas-transform-nan.html
4034                fast/canvas/canvas-transform-skewed.html
4035
4036         * html/CanvasRenderingContext2D.cpp:
4037         (WebCore::CanvasRenderingContext2D::transform):
4038         * html/CanvasRenderingContext2D.h:
4039         * html/CanvasRenderingContext2D.idl:
4040
4041 2008-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
4042
4043         Reviewed by Oliver.
4044
4045         Fix mistake in SVGImageElement, breaking "Dock" example of carto.net
4046         It was comparing against the wrong attribute names in svgAttributeChanged().
4047
4048         Added testcase: svg/custom/js-update-image.svg
4049
4050         * svg/SVGImageElement.cpp:
4051         (WebCore::SVGImageElement::svgAttributeChanged):
4052
4053 2008-02-03  Eric Seidel  <eric@webkit.org>
4054
4055         Reviewed by darin.
4056
4057         Acid3 expects textNode.localName === null
4058         http://bugs.webkit.org/show_bug.cgi?id=17060
4059
4060         Test: fast/dom/Node/initial-values.html
4061
4062         * dom/Comment.cpp: remove localName implementation
4063         * dom/Comment.h:
4064         * dom/Node.cpp: return nullAtom instead of emptyAtom
4065         * dom/Text.cpp: remove localName implementation
4066         * dom/Text.h:
4067
4068 2008-02-03  Eric Seidel  <eric@webkit.org>
4069
4070         Reviewed by darin.
4071
4072         Make createElementNS and createAttributeNS follow the (vague) DOM Core 2 spec
4073         by throwing exceptions for more types of invalid qualified names.
4074         http://bugs.webkit.org/show_bug.cgi?id=16833
4075
4076         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
4077                fast/dom/Document/createElementNS-namespace-err.html
4078
4079         * dom/Document.cpp:
4080         (WebCore::Document::createElement):
4081         (WebCore::hasNamespaceError):
4082         (WebCore::Document::createElementNS):
4083         (WebCore::Document::createAttributeNS):
4084         * dom/Document.idl:
4085
4086 2008-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
4087
4088         Reviewed by Eric.
4089
4090         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15394
4091
4092         Dramatically improve dynamic update performance in DOM / SVG DOM.
4093
4094         The notifyAttributeChange() sledgehammer is gone now. It was implemented on quite a lot of
4095         SVG*Element classes and blindly reacted on any property change caused by DOM / SVG DOM
4096         by rebuilding style/renderer etc. without actually checking what changed. SVG used a hack
4097         for years that attributeChanged() called notifyAttributeChange() - which results in poor
4098         scripting performance and/or dynamic creation/modification of elements using SVG DOM.
4099
4100         Properly implement childrenChanged / attributeChanged in SVG with some derivation from the HTML code.
4101         Our SVG* element classes implement "svgAttributeChanged(const QualifiedName&)" instead of
4102         "attributeChanged(Attribute*...)" to be able to unify DOM / SVG DOM updates. SVG DOM classes
4103         are aware of the attribute name they belong to. So when using "rectElement.transform.baseVal.getItem(0).setRotate(45)"
4104         SVG DOM updates the <rect> element by calling svgAttributeChanged(SVGNames::transformAttr) on the corresponding
4105         SVGRectElement. So we're now able to handle fast dynamic updates in a unified way - leading to less bugs.
4106
4107         HTML dynamic updates vs. SVG dynamic updates:
4108
4109         HTML:
4110             1) setAttribute("foo", "bar") -> attributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
4111             2) someObject.foo = "bar" -> HTML code maps to setAttribute calls, ends up taking the same route as 1)
4112             3) someObject.style.foo = "bar" -> setChanged -> recalcStyle (possible relayout)
4113
4114         SVG:
4115             1) setAttribute("foo", "bar") -> attributeChanged -> svgAttributeChanged -> parseMappedAttribute -> setChanged/setNeedsLayout
4116             2) same, currently most functions are not yet converted to this new system! (most noticeable in SVGMarkerElement::setOrientToAngle)    
4117             3) same
4118             4) someRectElement.x.baseVal.value = 100 -> svgAttributeChanged -> setChanged/setNeedsLayout (special SVG DOM updating)
4119         
4120         The new SVG DOM updating concept 4) uses the same updating logic as 1) and 2), so we're actually modelling the HTML way.
4121         SVG handles calling setChanged/setNeedsLayout in svgAttributeChanged, unlike HTML which uses parseMappedAttribute for that.
4122
4123         Only updated all elements necessary to let us pass layout tests w/o regressions. Need to crawl through
4124         all SVG*Element classes and implement svgAttributeChanged / childrenChanged anywhere needed in a follow-up patch.
4125
4126         * bindings/js/JSSVGPODTypeWrapper.h:
4127         (WebCore::JSSVGPODTypeWrapperCreatorReadWrite::commitChange):
4128         (WebCore::JSSVGPODTypeWrapperCreatorReadOnly::commitChange):
4129         (WebCore::JSSVGPODTypeWrapperCreatorForList::JSSVGPODTypeWrapperCreatorForList):
4130         (WebCore::JSSVGPODTypeWrapperCreatorForList::operator PODType):
4131         (WebCore::JSSVGPODTypeWrapperCreatorForList::commitChange):
4132         * bindings/js/JSSVGPathSegListCustom.cpp:
4133         (WebCore::JSSVGPathSegList::clear):
4134         (WebCore::JSSVGPathSegList::initialize):
4135         (WebCore::JSSVGPathSegList::insertItemBefore):
4136         (WebCore::JSSVGPathSegList::replaceItem):
4137         (WebCore::JSSVGPathSegList::removeItem):
4138         (WebCore::JSSVGPathSegList::appendItem):
4139         * bindings/js/JSSVGPointListCustom.cpp:
4140         (WebCore::JSSVGPointList::clear):
4141         (WebCore::JSSVGPointList::initialize):
4142         (WebCore::JSSVGPointList::getItem):
4143         (WebCore::JSSVGPointList::insertItemBefore):
4144         (WebCore::JSSVGPointList::replaceItem):
4145         (WebCore::JSSVGPointList::removeItem):
4146         (WebCore::JSSVGPointList::appendItem):
4147         * bindings/js/JSSVGTransformListCustom.cpp:
4148         (WebCore::JSSVGTransformList::clear):
4149         (WebCore::JSSVGTransformList::initialize):
4150         (WebCore::JSSVGTransformList::getItem):
4151         (WebCore::JSSVGTransformList::insertItemBefore):
4152         (WebCore::JSSVGTransformList::replaceItem):
4153         (WebCore::JSSVGTransformList::removeItem):
4154         (WebCore::JSSVGTransformList::appendItem):
4155         * bindings/scripts/CodeGeneratorJS.pm:
4156         * rendering/RenderSVGGradientStop.cpp:
4157         (WebCore::RenderSVGGradientStop::setStyle):
4158         * rendering/RenderSVGGradientStop.h:
4159         * svg/SVGAElement.cpp:
4160         (WebCore::SVGAElement::defaultEventHandler):
4161         * svg/SVGAElement.h:
4162         * svg/SVGAngle.cpp:
4163         *&