Turn on cross-document messaging support by default
[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         Turn on cross-document messaging support by default
739
740         Reviewed by Darin.
741
742         * Configurations/WebCore.xcconfig:
743         * WebCore.pro:
744         * WebCore.vcproj/WebCore.vcproj:
745
746 2008-02-14  Adam Roben  <aroben@apple.com>
747
748         Conditionalize cross-document messaging support
749
750         The cross-document messaging parts of HTML 5 are in flux and we want
751         ports to be able to turn off the support as needed.
752
753         Note that the support is turned off by default right now. A subsequent
754         commit will turn it on by default.
755
756         Reviewed by Darin.
757
758         * GNUmakefile.am:
759         * WebCore.vcproj/build-generated-files.sh:
760         * bindings/js/JSDOMWindowCustom.cpp:
761         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
762         * bindings/js/JSEventCustom.cpp:
763         (WebCore::toJS):
764         * dom/Event.cpp:
765         (WebCore::Event::isMessageEvent):
766         * dom/Event.h:
767         * dom/MessageEvent.cpp:
768         * dom/MessageEvent.h:
769         * dom/MessageEvent.idl:
770         * page/DOMWindow.cpp:
771         (WebCore::DOMWindow::postMessage):
772         * page/DOMWindow.h:
773         * page/DOMWindow.idl:
774
775 2008-02-14  Adam Roben  <aroben@apple.com>
776
777         Improve the efficiency of SecurityOriginHash
778
779         Reviewed by Alexey.
780
781         * platform/SecurityOriginHash.h:
782         (WebCore::SecurityOriginHash::hash): Now takes a const
783         RefPtr<SecurityOrigin>& to reduce ref-count churn.
784         (WebCore::SecurityOriginHash::equal): Ditto.
785
786 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
787
788         Reviewed by Oliver Hunt.
789
790         Fixes the editing/deleting/5729680.html failure.  It succeeds when run by itself
791         but fails when run with other tests because FramePrivate's m_selectionGranularity
792         isn't reset when a Frame receives a new document.  It was also uninitialized in
793         the constructor.
794
795         * loader/FrameLoader.cpp:
796         (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
797         * page/Frame.cpp:
798         (WebCore::FramePrivate::FramePrivate): Ditto.
799
800 2008-02-13  Jon Honeycutt  <jhoneycutt@apple.com>
801
802         Reviewed by Anders.
803
804         <rdar://problem/5739282> Hangs after closing video trailer popup with
805         VLC plugin
806
807         VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
808         handle.
809
810         * plugins/PluginQuirkSet.h: Added new quirk
811         PluginQuirkDontSetNullWindowHandleOnDestroy.
812         (WebCore::):
813         * plugins/win/PluginViewWin.cpp:
814         (WebCore::PluginView::stop): Selectively call NPP_SetWindow.
815         (WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
816
817 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
818
819         Reviewed by Alp Toker.
820
821         Fix non-SVG builds.
822
823         * css/CSSCursorImageValue.cpp:
824
825 2008-02-13  Justin Garcia  <justin.garcia@apple.com>
826
827         Reviewed by Adam Roben.
828
829         <rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
830         
831         * editing/Editor.cpp:
832         (WebCore::Editor::deleteWithDirection): Fixed a typo.
833
834 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
835
836         Reviewed by Oliver.
837
838         Actually fix the manual-tests/svg-cursor-changes.svg testcase.
839         I only reran layout tests when fixing the last issues with the patch,
840         instead of trying the manual-test :( Fixed.
841
842         * css/CSSCursorImageValue.cpp:
843         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
844         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
845         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
846         * css/CSSCursorImageValue.h:
847
848 2008-02-13  Adam Roben  <aroben@apple.com>
849
850         Windows build fix
851
852         * css/CSSCursorImageValue.cpp: #include MathExtras.h to get roundf.
853
854 2008-02-13  Nikolas Zimmermann  <zimmermann@kde.org>
855
856         Reviewed by Darin & Eric.
857
858         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation)
859
860         SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
861         SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
862         CachedResourceClient itself, handling remote-image acquisation on its own.
863
864         RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image"
865         and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id).
866
867         SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
868         instead of storing the CachedImage in the CursorData class, as it's supposed to be.
869         Because of that several places in WebCore contain special SVG cursor handling - which
870         is unneeded.
871
872         Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId'
873         from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute
874         changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). Now you
875         can script the mouse cursor location using SVG - the feature anyone has waited for.
876
877         Added manual test case: manual-tests/svg-cursor-changes.svg (no support for cursors in DRT)
878
879         * css/CSSCursorImageValue.cpp:
880         (WebCore::isSVGCursorIdentifier):
881         (WebCore::resourceReferencedByCursorElement):
882         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
883         (WebCore::CSSCursorImageValue::updateIfNeeded):
884         (WebCore::CSSCursorImageValue::image):
885         * css/CSSCursorImageValue.h:
886         * css/CSSImageValue.cpp:
887         (WebCore::CSSImageValue::image):
888         * css/CSSImageValue.h:
889         * css/CSSParser.cpp:
890         (WebCore::CSSParser::parseValue):
891         * css/CSSStyleSelector.cpp:
892         (WebCore::CSSStyleSelector::applyProperty):
893         * manual-tests/svg-cursor-changes.svg: Added.
894         * page/EventHandler.cpp:
895         (WebCore::EventHandler::selectCursor):
896         * rendering/RenderStyle.cpp:
897         * rendering/RenderStyle.h:
898         (WebCore::CursorData::operator==):
899         * svg/SVGCursorElement.cpp:
900         (WebCore::SVGCursorElement::SVGCursorElement):
901         (WebCore::SVGCursorElement::~SVGCursorElement):
902         (WebCore::SVGCursorElement::parseMappedAttribute):
903         (WebCore::SVGCursorElement::addClient):
904         (WebCore::SVGCursorElement::removeClient):
905         (WebCore::SVGCursorElement::svgAttributeChanged):
906         * svg/SVGCursorElement.h:
907         (WebCore::SVGCursorElement::isValid):
908
909 2008-02-13  Alp Toker  <alp@atoker.com>
910
911         Reviewed by Adam Roben.
912
913         Split out pure-cairo Font code to FontCairo.cpp.
914
915         Part of the ongoing work to share code with the Win port.
916
917         * GNUmakefile.am:
918         * WebCore.pro:
919         * platform/graphics/cairo/FontCairo.cpp: Added.
920         (WebCore::Font::drawGlyphs):
921         * platform/graphics/gtk/FontGtk.cpp:
922
923 2008-02-13  Kevin Ollivier <kevino@theolliviers.com>
924
925         Reviewed by Darin Adler.
926
927         Import wx/defs.h to keep windows.h from using ANSI functions
928         (see note in file for more info) and use the 8-bit string friendly
929         version of StringImpl::computeHash since we're passing it un UTF8
930         string. Also, don't cache the hash result.
931         
932         http://bugs.webkit.org/show_bug.cgi?id=17321
933
934         * config.h:
935         * platform/graphics/wx/FontPlatformData.h:
936         (WebCore::FontPlatformData::hash):
937         (WebCore::FontPlatformData::computeHash):
938
939 2008-02-13  Rodney Dawes  <dobey@wayofthemonkey.com>
940
941         Fix Bug 17220: Illogical dependency between PluginView and
942         PluginDatabase
943         
944         <http://bugs.webkit.org/show_bug.cgi?id=17220>
945
946         Reviewed by Adam and Darin.
947
948         Rename PluginDatabase::createPluginView to PluginView::create, to make
949         the illogical dependency between the two, logical
950         Make PluginDatabase::findPlugin a public method
951         Update the includes in PluginView and PluginDatabase for the change
952
953         * plugins/PluginDatabase.h:
954         * plugins/PluginView.h:
955         * plugins/win/PluginDatabaseWin.cpp:
956         * plugins/win/PluginViewWin.cpp:
957
958 2008-02-13  Adam Roben  <aroben@apple.com>
959
960         Build fix
961
962         * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
963
964 2008-02-13  Matt Lilek  <webkit@mattlilek.com>
965
966         Not reviewed, build fix.
967
968         * platform/graphics/cg/GraphicsContextCG.cpp:
969         (WebCore::GraphicsContext::paintBuffer):
970
971 2008-02-13  Darin Adler  <darin@apple.com>
972
973         - try to fix Wx build
974
975         * platform/graphics/wx/GraphicsContextWx.cpp:
976         (WebCore::GraphicsContext::paintBuffer): Added.
977
978         * platform/graphics/cairo/GraphicsContextCairo.cpp:
979         (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
980         * platform/graphics/cg/GraphicsContextCG.cpp:
981         (WebCore::GraphicsContext::paintBuffer): Ditto.
982         * platform/graphics/qt/GraphicsContextQt.cpp:
983         (WebCore::GraphicsContext::paintBuffer): Ditto.
984
985 2008-02-13  Darin Adler  <darin@apple.com>
986
987         - try to fix Wx build
988
989         * platform/wx/LocalizedStringsWx.cpp: Add missing include.
990
991 2008-02-11  Darin Adler  <darin@apple.com>
992
993         - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
994           incorrectly due to visibility fix
995
996         Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
997
998         * WebCore.base.exp: Rolled out change.
999         * css/CSSMutableStyleDeclaration.cpp:
1000         (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
1001         * page/Settings.cpp:
1002         (WebCore::Settings::Settings): Ditto. But keep the initialization of
1003         m_fontRenderingMode.
1004         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
1005         * page/Settings.h:
1006         (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
1007
1008 2008-02-13  Alexey Proskuryakov  <ap@webkit.org>
1009
1010         Reviewed by Darin.
1011
1012         <rdar://problem/5740042> Database termination issues
1013
1014         Test: storage/close-during-stress-test.html
1015
1016         * dom/Document.cpp:
1017         (WebCore::Document::databaseThread):
1018         * dom/Document.h:
1019         Don't re-create the database thread if it has been already terminated.
1020
1021         * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
1022         having a hanging reference.
1023
1024         * storage/DatabaseThread.cpp:
1025         (WebCore::DatabaseThread::requestTermination):
1026
1027         * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
1028         Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
1029
1030 2008-02-12  Bernhard Rosenkraenzer  <bero@arklinux.org>
1031
1032         Reviewed by Darin.
1033
1034         - fix http://bugs.webkit.org/show_bug.cgi?id=17340
1035           WebCore/platform/Timer.cpp fails to build with gcc 4.3
1036
1037         * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
1038
1039 2008-02-12  Timothy Hatcher  <timothy@apple.com>
1040
1041         Reviewed by Brady Eidson.
1042
1043         <rdar://problem/5652560> Can't delete database if the website that
1044         uses it has been opened in this session
1045
1046         Close the Database on the database thread before deleting the file.
1047         Tested and works on Windows and Mac.
1048
1049         * platform/sql/SQLiteDatabase.cpp:
1050         (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
1051         * storage/Database.cpp:
1052         (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
1053         Database tasks, and start and imediate DatabaseCloseTask.
1054         (WebCore::Database::close): Close the SQLDatabase.
1055         * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
1056         * storage/DatabaseTask.cpp:
1057         (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
1058         (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
1059         (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
1060         * storage/DatabaseTask.h: Add DatabaseCloseTask.
1061         * storage/DatabaseTracker.cpp:
1062         (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
1063           markAsDeletedAndClose.
1064
1065 2008-02-12  Oliver Hunt  <oliver@apple.com>
1066
1067         Reviewed by NOBODY (Build fix).
1068
1069         Endeavour to fix qt and gtk builds
1070
1071         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1072         * platform/graphics/qt/GraphicsContextQt.cpp:
1073
1074 2008-02-12  Oliver Hunt  <oliver@apple.com>
1075
1076         Reviewed by Eric S.
1077
1078         Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
1079         Remove ifdef's from canvas paint code
1080
1081         By making GraphicsContext aware of the crossplatform ImageBuffer
1082         type we can migrate the ifdef-ified paint code in HTMLCanvasElement
1083         into platform implementations of GraphicsContext.
1084
1085         * html/HTMLCanvasElement.cpp:
1086         (WebCore::HTMLCanvasElement::paint):
1087         * platform/graphics/GraphicsContext.h:
1088         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1089         (WebCore::GraphicsContext::paintBuffer):
1090         * platform/graphics/cg/GraphicsContextCG.cpp:
1091         (WebCore::GraphicsContext::paintBuffer):
1092         * platform/graphics/qt/GraphicsContextQt.cpp:
1093         (WebCore::GraphicsContext::paintBuffer):
1094
1095 2008-02-12  Brady Eidson  <beidson@apple.com>
1096
1097         Reviewed by Darin Adler
1098
1099         Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
1100
1101         Layout tests will come shortly with a mess of DRT changes
1102
1103         * platform/SecurityOrigin.cpp:
1104         (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
1105           as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
1106           SecurityOrigin
1107
1108         * storage/Database.cpp:
1109         (WebCore::Database::changeVersion): Pass in the successCallback
1110         (WebCore::Database::transaction): Ditto
1111
1112         * storage/SQLTransaction.cpp:
1113         (WebCore::SQLTransaction::SQLTransaction):
1114         (WebCore::SQLTransaction::debugStepName):
1115         (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
1116         (WebCore::SQLTransaction::performPendingCallback): Ditto
1117         (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
1118           skip straight to cleanupAfterSuccessCallback()
1119         (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
1120           schedule cleanupAfterSuccessCallback()
1121         (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
1122         (WebCore::SQLTransaction::handleTransactionError):
1123         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
1124         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1125         * storage/SQLTransaction.h:
1126
1127 2008-02-12  Steve Falkenburg  <sfalken@apple.com>
1128
1129         Changes to support merged MIDL output.
1130         
1131         All COM interfaces are now generated to WebKit.h.
1132         
1133         Reviewed by Sam, Ada.
1134
1135         * bindings/scripts/CodeGeneratorCOM.pm:
1136
1137 2008-02-12  Dan Bernstein  <mitz@apple.com>
1138
1139         Reviewed by Adam Roben.
1140
1141         - fix http://bugs.webkit.org/show_bug.cgi?id=17041
1142           <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
1143
1144         Revised the system fallback font lookup logic to use MLang font linking
1145         again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
1146         for CJK characters, try linking based on a single code page at a time,
1147         starting with the user's default code page (if it is one of the CJK
1148         code pages) followed by the other CJK code pages in a prescribed order
1149         that matches what Firefox does.
1150
1151         * platform/graphics/win/FontCacheWin.cpp:
1152         (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
1153         code pages, with the user's default code page first.
1154         (WebCore::currentFontContainsCharacter): Factored out of
1155         getFontDataForCharacters().
1156         (WebCore::createMLangFont): Ditto.
1157         (WebCore::FontCache::getFontDataForCharacters):
1158
1159 2008-02-12  Rodney Dawes  <dobey@wayofthemonkey.com>
1160
1161         Reviewed by Alp Toker.
1162
1163         Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
1164         Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
1165
1166         * WebCore.pro:
1167
1168 2008-02-12  Dan Bernstein  <mitz@apple.com>
1169
1170         Reviewed by Timothy Hatcher.
1171
1172         - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
1173
1174         * platform/graphics/cg/GraphicsContextCG.cpp:
1175         (WebCore::GraphicsContext::setShadow):
1176
1177 2008-02-12  Brady Eidson  <beidson@apple.com>
1178
1179         Release build fix
1180
1181         * storage/DatabaseTask.cpp:
1182
1183 2008-02-12  Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
1184
1185         Reviewed by Brady.
1186
1187         http://bugs.webkit.org/show_bug.cgi?id=17177
1188         <rdar://problem/5729619> Storage tasks are getting lost
1189
1190         <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
1191
1192         <rdar://problem/5729446> Major thread safety issue in Database code
1193
1194         * platform/MessageQueue.h: Added a thread-safe queue abstraction.
1195
1196         * WebCore.vcproj/WebCore.vcproj:
1197         * WebCore.xcodeproj/project.pbxproj:
1198         Added MessageQueue.h.
1199
1200         * dom/Document.cpp:
1201         (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
1202
1203         * storage/Database.idl: Fixed parameter declarations to actually match implementation
1204         (which is custom, so it got out of sync).
1205
1206         * storage/DatabaseTask.h:
1207         (WebCore::DatabaseTask::database):
1208         (WebCore::DatabaseTransactionTask::transaction):
1209         Changed tasks to hold more information internally. Added helpers for better debug logging.
1210
1211         * storage/DatabaseTask.cpp:
1212         (WebCore::DatabaseTask::DatabaseTask):
1213         (WebCore::DatabaseTask::performTask):
1214         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1215         (WebCore::DatabaseOpenTask::doPerformTask):
1216         (WebCore::DatabaseOpenTask::debugTaskName):
1217         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1218         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
1219         (WebCore::DatabaseTransactionTask::doPerformTask):
1220         (WebCore::DatabaseTransactionTask::debugTaskName):
1221         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1222         (WebCore::DatabaseTableNamesTask::doPerformTask):
1223         (WebCore::DatabaseTableNamesTask::debugTaskName):
1224         Implementation for the above.
1225
1226         (WebCore::DatabaseTask::lockForSynchronousScheduling):
1227         (WebCore::DatabaseTask::waitForSynchronousCompletion):
1228         Fixed a potential race condition: if the task completed before we entered a wait, we'd never
1229         wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
1230
1231         * storage/DatabaseThread.cpp:
1232         (WebCore::DatabaseThread::DatabaseThread):
1233         (WebCore::DatabaseThread::requestTermination):
1234         (WebCore::DatabaseThread::databaseThread):
1235         (WebCore::DatabaseThread::scheduleTask):
1236         (WebCore::DatabaseThread::scheduleImmediateTask):
1237         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
1238         * storage/DatabaseThread.h:
1239         Changed to use MessageQueue.
1240
1241         * storage/Database.cpp:
1242         (WebCore::guidMutex):
1243         (WebCore::guidToVersionMap):
1244         (WebCore::guidToDatabaseMap):
1245         (WebCore::Database::openDatabase):
1246         (WebCore::Database::Database):
1247         (WebCore::Database::~Database):
1248         (WebCore::Database::openAndVerifyVersion):
1249         (WebCore::guidForOriginAndName):
1250         (WebCore::Database::changeVersion):
1251         (WebCore::Database::transaction):
1252         (WebCore::Database::scheduleTransaction):
1253         (WebCore::Database::scheduleTransactionStep):
1254         (WebCore::Database::scheduleTransactionCallback):
1255         (WebCore::Database::version):
1256         (WebCore::Database::deliverPendingCallback):
1257         (WebCore::Database::tableNames):
1258         * storage/Database.h:
1259         Changed m_transactionQueue to a MessageQueue.
1260         Got rid of callback tracking - these can take care of themselves.
1261         Got rid of a DatabaseThread member, as the Document can be asked for it.
1262         Moved private static members and helpers out of the header.
1263         Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
1264
1265         * storage/SQLTransaction.h:
1266         * storage/SQLTransaction.cpp: Added a lot of debug logging.
1267         (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
1268         as it created a race condition. Everything seems to work better without it, although a real fix
1269         would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
1270
1271         * manual-tests/database-threading-stress-test-2.html: Added.
1272         * manual-tests/database-threading-stress-test.html: Added.
1273
1274 2008-02-12  Adam Roben  <aroben@apple.com>
1275
1276         Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
1277
1278         <http://bugs.webkit.org/show_bug.cgi?id=17328>
1279         <rdar://5737946>
1280
1281         Reviewed by Mitz.
1282
1283         Test: fast/loader/local-css-allowed-in-strict-mode.html
1284
1285         * platform/network/cf/ResourceResponseCFNet.cpp:
1286         (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
1287         .css files.
1288
1289 2008-02-12  Anders Carlsson  <andersca@apple.com>
1290
1291         Build fix.
1292         
1293         * loader/ImageDocument.cpp:
1294
1295 2008-02-12  Anders Carlsson  <andersca@apple.com>
1296
1297         Reviewed by Mitz.
1298
1299         Make the code that sets the image title cross platform.
1300
1301         * WebCore.xcodeproj/project.pbxproj:
1302         Remove ImageDocumentMac.
1303         
1304         * loader/ImageDocument.cpp:
1305         (WebCore::ImageTokenizer::finish):
1306
1307         * loader/mac/ImageDocumentMac.h: Removed.
1308         * loader/mac/ImageDocumentMac.mm: Removed.
1309         
1310         * page/mac/WebCoreFrameBridge.h:
1311         * page/mac/WebCoreViewFactory.h:
1312         Move imageTitleForFilename:size from the bridge to
1313         the view factory.
1314         
1315         * platform/LocalizedStrings.h:
1316         Add imageTitle.
1317         
1318         * platform/mac/LocalizedStringsMac.mm:
1319         (WebCore::imageTitle):
1320         Have imageTitle call the view factory.
1321         
1322         * platform/qt/Localizations.cpp:
1323         (WebCore::imageTitle):
1324         * platform/wx/LocalizedStringsWx.cpp:
1325         (WebCore::imageTitle):
1326         * platform/gtk/LocalizedStringsGtk.cpp:
1327         (WebCore::imageTitle):
1328         Add stubs.
1329         
1330 2008-02-12  Oliver Hunt  <oliver@apple.com>
1331
1332         Reviewed by NOBODY (Build fix).
1333
1334         more Qt fixes
1335
1336         * html/HTMLCanvasElement.cpp:
1337         (WebCore::HTMLCanvasElement::paint):
1338
1339 2008-02-12  Oliver Hunt  <oliver@apple.com>
1340
1341         Reviewed by NOBODY (Build fix).
1342
1343         And another attempt to fixerate Qt
1344
1345         * html/HTMLCanvasElement.cpp:
1346         (WebCore::HTMLCanvasElement::paint):
1347
1348 2008-02-12  Oliver Hunt  <oliver@apple.com>
1349
1350         Reviewed by NOBODY (Build fix).
1351
1352         Attempt to fix Qt build
1353
1354         * html/HTMLCanvasElement.h:
1355
1356 2008-02-11  Oliver Hunt  <oliver@apple.com>
1357
1358         Reviewed by Alp Toker.
1359
1360         Make canvas use an ImageBuffer for its backing store
1361
1362         In order to make the canvas implementation less platform dependent
1363         (and thus reduce the current quagmire of ifdefs) we now use an 
1364         ImageBuffer to provide the backing buffer, an immediate consequence
1365         of this is to remove multiple ifdefs in the construction of the
1366         buffer.  This patch allows us to further reduce the platform
1367         dependencies in later patches.
1368
1369
1370         * html/CanvasRenderingContext2D.cpp:
1371         (WebCore::CanvasRenderingContext2D::drawImage):
1372         * html/HTMLCanvasElement.cpp:
1373         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1374         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1375         (WebCore::HTMLCanvasElement::reset):
1376         (WebCore::HTMLCanvasElement::paint):
1377         (WebCore::HTMLCanvasElement::createDrawingContext):
1378         (WebCore::HTMLCanvasElement::drawingContext):
1379         (WebCore::HTMLCanvasElement::createPlatformImage):
1380         * html/HTMLCanvasElement.h:
1381
1382 2008-02-11  Dan Bernstein  <mitz@apple.com>
1383
1384         Reviewed by Dave Hyatt.
1385
1386         - fix http://bugs.webkit.org/show_bug.cgi?id=17320
1387           <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
1388
1389         Test: fast/css/last-child-style-sharing.html
1390
1391         * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
1392         CSS3 selectors that require it.
1393
1394 2008-02-11  Sam Weinig  <sam@webkit.org>
1395
1396         Reviewed by Darin Adler.
1397
1398         Make the cross-domain security model more closely match Firefox by always returning the
1399         native built-in functions when accessing functions cross-domain.
1400
1401         Fixes for:
1402         <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
1403         <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
1404
1405         Tests: fast/dom/Window/window-custom-prototype-crash.html
1406                fast/dom/Window/window-function-frame-getter-precedence.html
1407                http/tests/security/cross-frame-access-get-override.html
1408                http/tests/security/cross-frame-access-location-get-override.html
1409                http/tests/security/cross-frame-access-location-get.html
1410                http/tests/security/cross-frame-access-location-put.html
1411
1412         * bindings/js/JSDOMWindowCustom.cpp:
1413         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1414         - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
1415           not it has been overridden, instead of undefined.
1416         - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable) 
1417           instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
1418         - Allow access to the native toString function cross-domain.  It always returns "[object Window]".
1419         - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
1420           the function an overridden function is not inadvertantly returned from the PropertyMap.\
1421
1422         * bindings/js/JSHistoryCustom.cpp:
1423         (WebCore::JSHistory::customGetOwnPropertySlot):
1424         - Implement the same model as described above for the History object, always returning the
1425           native built-in function cross-domain.
1426         - Allow access to the native toString 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
1430         * bindings/js/JSLocation.cpp:
1431         (WebCore::JSLocation::getOwnPropertySlot):
1432         - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
1433           function.  This will help moving to a generated class in the future.
1434         (WebCore::JSLocation::customGetOwnPropertySlot):
1435         - Implement the same model as described above for the Location object, always returning the
1436           native built-in function cross-domain.
1437         - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1438           access.
1439         (WebCore::JSLocation::put):
1440         (WebCore::JSLocation::deleteProperty):
1441         (WebCore::JSLocation::getPropertyNames):
1442         * bindings/js/JSLocation.h:
1443         - Clean up to match the rest of the file a little better.
1444
1445         * bindings/js/kjs_binding.cpp:
1446         (WebCore::allowsAccessFromFrame):
1447         (WebCore::printErrorMessageForFrame):
1448         (WebCore::nonCachingStaticFunctionGetter):
1449         (WebCore::objectToStringFunctionGetter):
1450         * bindings/js/kjs_binding.h:
1451         - Put common functionality related to cross-domain access here to serve as a central shared point.
1452           This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
1453           and JSLocation.cpp.
1454
1455         * bindings/js/kjs_dom.cpp:
1456         (WebCore::checkNodeSecurity):
1457         - Use the new allowsAccessFromFrame method.
1458
1459         * bindings/js/kjs_window.cpp:
1460         (KJS::Window::childFrameGetter): Cleanup.
1461         (KJS::Window::namedItemGetter): Cleanup.
1462         (KJS::Window::getOwnPropertySlot):
1463         - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
1464           than the index or shortcut name getters.
1465         - Cleanup function to make it more understandable and slightly more efficient.
1466         (KJS::Window::allowsAccessFrom):
1467         - Add a new variant of this method that takes a reference to a String, which, on failure, will
1468           contain the error message to print out.  The caller can then pass this to printErrorMessage.
1469           This allows for code to check allowsAccessFrom and act on the result without printing out the
1470           error message. For convenience, a version with out the String parameter has been left which 
1471           prints out the message automatically.
1472         (KJS::Window::printErrorMessage):
1473         * bindings/js/kjs_window.h:
1474
1475 2008-02-11  Darin Adler  <darin@apple.com>
1476
1477         Reviewed by Mitz.
1478
1479         - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
1480           incorrectly due to visibility fix
1481
1482         Added an Xcode-specific quirk.
1483
1484         * WebCore.base.exp: Added export for new Settings function.
1485         * css/CSSMutableStyleDeclaration.cpp:
1486         (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
1487         If you try to change the visibilty on a node with the class name tab_content,
1488         instead it will use display:none.
1489         * page/Settings.cpp:
1490         (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
1491         initialize m_fontRenderingMode! This seems like it was a bug before, but we
1492         probably were getting lucky and always getting 0 on Windows, which is the
1493         only place the setting matters.
1494         (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
1495         * page/Settings.h:
1496         (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
1497
1498 2008-02-11  Timothy Hatcher  <timothy@apple.com>
1499
1500         Reviewed by Brady Eidson.
1501
1502         <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
1503
1504         * storage/DatabaseTracker.cpp:
1505         (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1506         (WebCore::DatabaseTracker::origins): Ditto.
1507         (WebCore::DatabaseTracker::setQuota): Ditto.
1508         (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
1509         origins to call deleteOrigin().
1510         (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1511
1512 2008-02-11  David Hyatt  <hyatt@apple.com>
1513
1514         Fix for bug 17286, crash accessing a null RenderStyle.  Add a simple null check.
1515
1516         Reviewed by aroben
1517
1518         Added fast/css/empty-generated-content.html
1519
1520         * css/CSSStyleSelector.cpp:
1521         (WebCore::CSSStyleSelector::checkOneSelector):
1522
1523 2008-02-11  Rob Buis  <buis@kde.org>
1524
1525         Reviewed by David Kilzer.
1526
1527         http://bugs.webkit.org/show_bug.cgi?id=17201
1528         Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
1529
1530         Gets rid of goto usage in parseFont.
1531
1532         * css/CSSParser.cpp:
1533         (WebCore::CSSParser::parseFont):
1534
1535 2008-02-11  David Hyatt  <hyatt@apple.com>
1536
1537         Fix for bug 17298, Acid3 text should be black and not red.  Make sure stylesheets with the wrong MIME type
1538         are not accepted in strict mode.
1539
1540         Reviewed by darin
1541
1542         Added http/tests/misc/css-reject-in-strict-mode.html
1543
1544         * css/CSSImportRule.cpp:
1545         (WebCore::CSSImportRule::setCSSStyleSheet):
1546         * css/CSSImportRule.h:
1547         * dom/Document.cpp:
1548         (WebCore::Document::setCSSStyleSheet):
1549         * dom/Document.h:
1550         * dom/ProcessingInstruction.cpp:
1551         (WebCore::ProcessingInstruction::setCSSStyleSheet):
1552         * dom/ProcessingInstruction.h:
1553         * html/HTMLLinkElement.cpp:
1554         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1555         * html/HTMLLinkElement.h:
1556         * html/HTMLMediaElement.cpp:
1557         (WebCore::HTMLMediaElement::pickMedia):
1558         * loader/CachedCSSStyleSheet.cpp:
1559         (WebCore::CachedCSSStyleSheet::ref):
1560         (WebCore::CachedCSSStyleSheet::checkNotify):
1561         (WebCore::CachedCSSStyleSheet::canUseSheet):
1562         * loader/CachedCSSStyleSheet.h:
1563         (WebCore::CachedCSSStyleSheet::sheetText):
1564         * loader/CachedResourceClient.h:
1565         (WebCore::CachedResourceClient::setCSSStyleSheet):
1566         * loader/mac/UserStyleSheetLoader.cpp:
1567         (UserStyleSheetLoader::setCSSStyleSheet):
1568         * loader/mac/UserStyleSheetLoader.h:
1569
1570 2008-02-11  Adam Roben  <aroben@apple.com>
1571
1572         Fix Bug 14316: Inspector's Console truncates long strings
1573
1574         <http://bugs.webkit.org/show_bug.cgi?id=14316>
1575         <rdar://5357695>
1576
1577         We no longer call Object.describe to format all the output of commands
1578         enetered into the Console. The ConsolePanel object now has a set of
1579         formatting functions that append a formatted representation of the
1580         passed-in object to the passed-in container node.
1581
1582         Reviewed by Sam.
1583
1584         * page/inspector/ConsolePanel.js:
1585         (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
1586         _outputToNode to _format.
1587         (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
1588         Object.type to get the type of the object, then call the appropriate
1589         formatting function.
1590         (WebInspector.ConsolePanel._formatvalue): Added.
1591         (WebInspector.ConsolePanel._formatstring): Added. This function
1592         contains the actual fix for the bug, since it doesn't truncate the
1593         string no matter how long it is.
1594         (WebInspector.ConsolePanel._formatregexp): Added.
1595         (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
1596         functional than Object.describe for arrays, since it recursively
1597         formats each item in the array. One advantage of this is that Nodes in
1598         arrays will be linkified instead of just turning into "[Object
1599         HTMLBodyElement]" or similar.
1600         (WebInspector.ConsolePanel._formatnode): Added.
1601         (WebInspector.ConsolePanel._formatobject): Added.
1602         (WebInspector.ConsolePanel.
1603         * page/inspector/utilities.js:
1604         (Object.type): Added. Code was pulled out of Object.describe and
1605         reorganized slightly.
1606         (Object.describe): Call Object.type. There should be no change in
1607         behavior of this function.
1608
1609 2008-02-11  Alp Toker  <alp@atoker.com>
1610
1611         Wx build fix for breakage introduced in r30142. Spotted by Darin.
1612
1613         * platform/network/curl/ResourceHandleManager.cpp:
1614         (WebCore::parseDataUrl):
1615
1616 2008-02-11  Brent Fulgham  <bfulgham@gmail.com>
1617
1618         Reviewed and tweaked by Darin
1619
1620         - http://bugs.webkit.org/show_bug.cgi?id=17299
1621           a couple compilation fixes for Cairo/Win32 configuration
1622
1623         * platform/graphics/cairo/ImageSourceCairo.cpp:
1624         (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
1625         * rendering/RenderThemeWin.cpp:
1626         (WebCore::prepareForDrawing): Added IntRect parameter.
1627         (WebCore::doneDrawing): Ditto.
1628         (WebCore::RenderThemeWin::paintButton): Ditto.
1629         (WebCore::RenderThemeWin::paintTextField): Ditto.
1630         (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
1631         (WebCore::RenderThemeWin::systemFont): Added.
1632
1633 2008-02-11  Alp Toker  <alp@atoker.com>
1634
1635         Reviewed by Alexey.
1636
1637         Acid3 data URL parsing fix for the GTK+ port.
1638
1639         Avoid WebCore's base64Decode() when possible since it's not a
1640         general-purpose Base64 decoder and fails on newlines.
1641
1642         * platform/network/curl/ResourceHandleManager.cpp:
1643         (WebCore::parseDataUrl):
1644
1645 2008-02-11  Darin Adler  <darin@apple.com>
1646
1647         - another Qt build fix
1648
1649         * platform/qt/PopupMenuQt.cpp:
1650         (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
1651
1652 2008-02-10  Darin Adler  <darin@apple.com>
1653
1654         - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
1655
1656         * platform/qt/FileChooserQt.cpp:
1657         (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
1658
1659 2008-02-10  Darin Adler  <darin@apple.com>
1660
1661         - another Qt build fix
1662
1663         * platform/graphics/qt/IconQt.cpp:
1664         (WebCore::Icon::Icon): Added explicit RefCounted constructor.
1665
1666 2008-02-10  Alp Toker  <alp@atoker.com>
1667
1668         Another Win build fix for r30133 breakage.
1669
1670         * plugins/win/PluginPackageWin.cpp:
1671         (WebCore::PluginPackage::PluginPackage):
1672
1673 2008-02-10  Alp Toker  <alp@atoker.com>
1674
1675         Build fix GTK+ and prospective build fix for Win breakage introduced
1676         in r30133.
1677
1678         * platform/Cursor.h:
1679         (WebCore::SharedCursor::SharedCursor):
1680         * platform/graphics/gtk/IconGtk.cpp:
1681         (WebCore::Icon::Icon):
1682         * platform/gtk/FileChooserGtk.cpp:
1683         (WebCore::FileChooser::FileChooser):
1684         * platform/gtk/PopupMenuGtk.cpp:
1685         (WebCore::PopupMenu::PopupMenu):
1686
1687 2008-02-10  Darin Adler  <darin@apple.com>
1688
1689         - try to fix Win, Qt, GTK, and WX builds
1690
1691         * platform/Cursor.h:
1692         (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
1693         * platform/graphics/win/IconWin.cpp:
1694         (WebCore::Icon::Icon): Ditto.
1695         * platform/win/FileChooserWin.cpp:
1696         (WebCore::FileChooser::FileChooser): Ditto.
1697         * platform/win/PopupMenuWin.cpp:
1698         (WebCore::PopupMenu::PopupMenu): Ditto.
1699         * platform/wx/TemporaryLinkStubs.cpp:
1700         (FileChooser::FileChooser): Ditto.
1701         (PopupMenu::PopupMenu): Ditto.
1702         (Icon::Icon): Ditto.
1703         * plugins/PluginStream.cpp:
1704         (WebCore::PluginStream::PluginStream): Ditto.
1705
1706 2008-02-10  David Hyatt  <hyatt@apple.com>
1707
1708         Fix for bug 17082, cssRules should be live.
1709
1710         Reviewed by olliej
1711
1712         Added fast/css/live-cssrules.html
1713
1714         * css/CSSRuleList.cpp:
1715         (WebCore::CSSRuleList::CSSRuleList):
1716         (WebCore::CSSRuleList::length):
1717         (WebCore::CSSRuleList::item):
1718         (WebCore::CSSRuleList::deleteRule):
1719         (WebCore::CSSRuleList::insertRule):
1720         * css/CSSRuleList.h:
1721
1722 2008-02-10  David Hyatt  <hyatt@apple.com>
1723
1724         Fix for bug 17253.  <iframe> contents need to be reflected into the DOM as a single text node.
1725
1726         Reviewed by olliej
1727
1728         fast/frames/iframe-text-contents.html
1729
1730         * html/HTMLParser.cpp:
1731         (WebCore::HTMLParser::getNode):
1732         * html/HTMLTokenizer.cpp:
1733         (WebCore::HTMLTokenizer::parseSpecial):
1734         (WebCore::HTMLTokenizer::parseComment):
1735         (WebCore::HTMLTokenizer::parseTag):
1736         * html/HTMLTokenizer.h:
1737         (WebCore::HTMLTokenizer::State::inIFrame):
1738         (WebCore::HTMLTokenizer::State::setInIFrame):
1739         (WebCore::HTMLTokenizer::State::inAnySpecial):
1740         (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
1741         (WebCore::HTMLTokenizer::State::):
1742
1743 2008-02-10  Andrew Wellington  <proton@wiretapped.net>
1744
1745         Reviewed and tweaked by Darin.
1746         
1747         DOMRange.surroundContents throws wrong exception (Acid3 bug)
1748         http://bugs.webkit.org/show_bug.cgi?id=16749
1749         
1750         Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
1751         has offsets in characters.
1752
1753         * dom/Range.cpp:
1754         (WebCore::Range::surroundContents):
1755
1756 2008-02-10  Darin Adler  <darin@apple.com>
1757
1758         Reviewed by Eric.
1759
1760         - http://bugs.webkit.org/show_bug.cgi?id=17256
1761           Make clients of RefCounted explicitly set the count to 0.
1762
1763         * bindings/js/JSSVGPODTypeWrapper.h:
1764         (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
1765         * css/CSSFontFace.h:
1766         (WebCore::CSSFontFace::CSSFontFace):
1767         * css/CSSRuleList.cpp:
1768         (WebCore::CSSRuleList::CSSRuleList):
1769         * css/CSSSegmentedFontFace.cpp:
1770         (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
1771         * css/Counter.h:
1772         (WebCore::Counter::Counter):
1773         * css/Pair.h:
1774         (WebCore::Pair::Pair):
1775         * css/Rect.h:
1776         (WebCore::Rect::Rect):
1777         * css/StyleBase.h:
1778         (WebCore::StyleBase::StyleBase):
1779         * css/StyleSheetList.cpp:
1780         (WebCore::StyleSheetList::StyleSheetList):
1781         * dom/Attr.cpp:
1782         (WebCore::Attr::Attr):
1783         * dom/Attr.h:
1784         * dom/Attribute.h:
1785         (WebCore::Attribute::Attribute):
1786         * dom/Clipboard.cpp:
1787         (WebCore::Clipboard::Clipboard):
1788         * dom/DOMImplementation.h:
1789         (WebCore::DOMImplementation::DOMImplementation):
1790         * dom/Event.cpp:
1791         (WebCore::Event::Event):
1792         * dom/EventListener.h:
1793         (WebCore::EventListener::EventListener):
1794         * dom/ExceptionBase.cpp:
1795         (WebCore::ExceptionBase::ExceptionBase):
1796         * dom/NamedAttrMap.h:
1797         (WebCore::NamedAttrMap::insertAttribute):
1798         * dom/NamedNodeMap.h:
1799         (WebCore::NamedNodeMap::NamedNodeMap):
1800         * dom/NodeFilter.h:
1801         (WebCore::NodeFilter::NodeFilter):
1802         * dom/NodeFilterCondition.h:
1803         (WebCore::NodeFilterCondition::NodeFilterCondition):
1804         * dom/NodeList.h:
1805         (WebCore::NodeList::NodeList):
1806         * dom/QualifiedName.h:
1807         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
1808         (WebCore::QualifiedName::ref):
1809         * dom/Range.cpp:
1810         (WebCore::Range::Range):
1811         * dom/RegisteredEventListener.cpp:
1812         (WebCore::RegisteredEventListener::RegisteredEventListener):
1813         * dom/StyledElement.h:
1814         * dom/Traversal.cpp:
1815         (WebCore::Traversal::Traversal):
1816         * editing/EditCommand.cpp:
1817         (WebCore::EditCommand::EditCommand):
1818         * history/BackForwardList.cpp:
1819         (WebCore::BackForwardList::BackForwardList):
1820         * history/CachedPage.cpp:
1821         (WebCore::CachedPage::CachedPage):
1822         * history/HistoryItem.cpp:
1823         (WebCore::HistoryItem::HistoryItem):
1824         * html/CanvasGradient.cpp:
1825         (WebCore::CanvasGradient::CanvasGradient):
1826         * html/CanvasPattern.cpp:
1827         (WebCore::CanvasPattern::CanvasPattern):
1828         * html/CanvasRenderingContext2D.cpp:
1829         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
1830         * html/CanvasStyle.cpp:
1831         (WebCore::CanvasStyle::CanvasStyle):
1832         * html/HTMLCollection.cpp:
1833         (WebCore::HTMLCollection::HTMLCollection):
1834         * html/MediaError.h:
1835         (WebCore::MediaError::MediaError):
1836         * html/TimeRanges.cpp:
1837         (TimeRanges::TimeRanges):
1838         * html/TimeRanges.h:
1839         (WebCore::TimeRanges::TimeRanges):
1840         * html/VoidCallback.h:
1841         (WebCore::VoidCallback::VoidCallback):
1842         * loader/DocumentLoader.cpp:
1843         (WebCore::DocumentLoader::DocumentLoader):
1844         * loader/FormState.cpp:
1845         (WebCore::FormState::FormState):
1846         * loader/ResourceLoader.cpp:
1847         (WebCore::ResourceLoader::ResourceLoader):
1848         * loader/TextResourceDecoder.cpp:
1849         (WebCore::TextResourceDecoder::TextResourceDecoder):
1850         * loader/icon/IconRecord.cpp:
1851         (WebCore::IconRecord::IconRecord):
1852         * page/BarInfo.cpp:
1853         (WebCore::BarInfo::BarInfo):
1854         * page/Console.cpp:
1855         (WebCore::Console::Console):
1856         * page/DOMSelection.cpp:
1857         (WebCore::DOMSelection::DOMSelection):
1858         * page/DOMWindow.cpp:
1859         (WebCore::DOMWindow::DOMWindow):
1860         * page/Frame.cpp:
1861         (WebCore::Frame::Frame):
1862         * page/History.cpp:
1863         (WebCore::History::History):
1864         * page/InspectorController.cpp:
1865         (WebCore::InspectorResource::InspectorResource):
1866         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
1867         * page/Plugin.h:
1868         (WebCore::Plugin::Plugin):
1869         * page/Screen.cpp:
1870         (WebCore::Screen::Screen):
1871         * platform/ArrayImpl.cpp:
1872         (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
1873         * platform/DeprecatedValueListImpl.cpp:
1874         (WebCore::DeprecatedValueListImpl::Private::Private):
1875         * platform/ScrollBar.cpp:
1876         (WebCore::Scrollbar::Scrollbar):
1877         * platform/SharedBuffer.cpp:
1878         (WebCore::SharedBuffer::SharedBuffer):
1879         * platform/graphics/FontFallbackList.cpp:
1880         (WebCore::FontFallbackList::FontFallbackList):
1881         * platform/graphics/FontFamily.cpp:
1882         (WebCore::FontFamily::FontFamily):
1883         * platform/graphics/FontFamily.h:
1884         (WebCore::FontFamily::FontFamily):
1885         * platform/graphics/FontSelector.h:
1886         (WebCore::FontSelector::FontSelector):
1887         (WebCore::FontSelector::~FontSelector):
1888         * platform/graphics/GlyphPageTreeNode.h:
1889         (WebCore::GlyphPage::GlyphPage):
1890         * platform/graphics/mac/IconMac.mm:
1891         (WebCore::Icon::Icon):
1892         * platform/mac/FileChooserMac.mm:
1893         (WebCore::FileChooser::FileChooser):
1894         * platform/mac/PopupMenuMac.mm:
1895         (WebCore::PopupMenu::PopupMenu):
1896         * platform/mac/SharedBufferMac.mm:
1897         (WebCore::SharedBuffer::SharedBuffer):
1898         * platform/network/FormData.cpp:
1899         (WebCore::FormData::FormData):
1900         * platform/network/FormData.h:
1901         (WebCore::FormData::FormData):
1902         * platform/network/ResourceHandle.cpp:
1903         (WebCore::ResourceHandle::ResourceHandle):
1904         * platform/text/CString.h:
1905         (WebCore::CStringBuffer::CStringBuffer):
1906         * platform/text/RegularExpression.cpp:
1907         (WebCore::RegularExpression::Private::Private):
1908         * rendering/RenderStyle.cpp:
1909         (WebCore::StyleSurroundData::StyleSurroundData):
1910         (WebCore::StyleBoxData::StyleBoxData):
1911         (WebCore::StyleVisualData::StyleVisualData):
1912         (WebCore::StyleBackgroundData::StyleBackgroundData):
1913         (WebCore::StyleMarqueeData::StyleMarqueeData):
1914         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1915         (WebCore::StyleMultiColData::StyleMultiColData):
1916         (WebCore::StyleTransformData::StyleTransformData):
1917         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1918         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1919         (WebCore::StyleInheritedData::StyleInheritedData):
1920         * rendering/RenderStyle.h:
1921         (WebCore::TransformOperation::TransformOperation):
1922         (WebCore::CursorList::CursorList):
1923         * rendering/SVGCharacterLayoutInfo.h:
1924         (WebCore::SVGCharOnPath::SVGCharOnPath):
1925         * rendering/SVGRenderStyle.cpp:
1926         (WebCore::SVGRenderStyle::SVGRenderStyle):
1927         * rendering/SVGRenderStyle.h:
1928         (WebCore::SVGRenderStyle::SVGRenderStyle):
1929         * rendering/SVGRenderStyleDefs.cpp:
1930         (StyleFillData::StyleFillData):
1931         (StyleStrokeData::StyleStrokeData):
1932         (StyleStopData::StyleStopData):
1933         (StyleTextData::StyleTextData):
1934         (StyleClipData::StyleClipData):
1935         (StyleMaskData::StyleMaskData):
1936         (StyleMarkerData::StyleMarkerData):
1937         (StyleMiscData::StyleMiscData):
1938         * storage/SQLResultSetRowList.h:
1939         (WebCore::SQLResultSetRowList::SQLResultSetRowList):
1940         * svg/SVGAngle.cpp:
1941         (WebCore::SVGAngle::SVGAngle):
1942         * svg/SVGAnimatedTemplate.h:
1943         (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
1944         * svg/SVGElementInstanceList.cpp:
1945         (WebCore::SVGElementInstanceList::SVGElementInstanceList):
1946         * svg/SVGList.h:
1947         (WebCore::SVGList::SVGList):
1948         (WebCore::SVGPODListItem::SVGPODListItem):
1949         * svg/SVGPathSeg.h:
1950         (WebCore::SVGPathSeg::SVGPathSeg):
1951         * svg/SVGPreserveAspectRatio.cpp:
1952         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
1953         * svg/SVGRenderingIntent.h:
1954         (WebCore::SVGRenderingIntent::SVGRenderingIntent):
1955         * svg/SVGUnitTypes.h:
1956         (WebCore::SVGUnitTypes::SVGUnitTypes):
1957         * svg/graphics/SVGPaintServerGradient.h:
1958         (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
1959         * svg/graphics/SVGResource.cpp:
1960         (WebCore::SVGResource::SVGResource):
1961         * xml/DOMParser.h:
1962         (WebCore::DOMParser::DOMParser):
1963         * xml/XMLHttpRequest.cpp:
1964         (WebCore::XMLHttpRequest::XMLHttpRequest):
1965         * xml/XMLSerializer.h:
1966         (WebCore::XMLSerializer::XMLSerializer):
1967         * xml/XPathEvaluator.h:
1968         (WebCore::XPathEvaluator::XPathEvaluator):
1969         * xml/XPathExpression.h:
1970         (WebCore::XPathExpression::XPathExpression):
1971         * xml/XPathNSResolver.h:
1972         (WebCore::XPathNSResolver::XPathNSResolver):
1973         * xml/XPathResult.cpp:
1974         (WebCore::XPathResult::XPathResult):
1975         * xml/XPathValue.h:
1976         (WebCore::XPath::ValueData::ValueData):
1977         * xml/XSLTProcessor.h:
1978         (WebCore::XSLTProcessor::XSLTProcessor):
1979
1980 2008-02-09  Kevin Ollivier  <kevino@theolliviers.com>
1981
1982         Reviewed by Eric Seidel.
1983
1984         Calling select() when all the file descriptors are NULL
1985         stops the file download on Windows. As a result, do not
1986         call select() when there are no valid descriptors.
1987
1988         http://bugs.webkit.org/show_bug.cgi?id=17178
1989
1990         * platform/network/curl/ResourceHandleManager.cpp:
1991         (WebCore::ResourceHandleManager::downloadTimerCallback):
1992
1993 2008-02-09  Dan Bernstein  <mitz@apple.com>
1994
1995         Reviewed by Sam Weinig.
1996
1997         - fix http://bugs.webkit.org/show_bug.cgi?id=17259
1998           Element::recalcStyle() needlessly null-checks the result of styleForElement()
1999
2000         * dom/Element.cpp:
2001         (WebCore::Element::recalcStyle): Removed unneeded null checks.
2002         styleForElement() can never return null.
2003
2004 2008-02-09  David Hyatt  <hyatt@apple.com>
2005
2006         Fix for bug 17254, nth-* selectors do not work with negative coefficients.
2007
2008         Reviewed by Mitz.
2009
2010         fast/css/negative-nth-child.html
2011
2012         * css/CSSStyleSelector.cpp:
2013         (WebCore::parseNth):
2014
2015 2008-02-09  David Hyatt  <hyatt@apple.com>
2016
2017         Fix for bug 17203, high CPU usage loading HTML5 spec.  This patch significantly improves the performance
2018         of CSS3 selectors.
2019
2020         (1) Split the notion of being affected by positional rules into "forward" and "backward."  The "forward"
2021         selectors do not need to re-resolve during parsing, since children are appended on the end.  Only the
2022         "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
2023
2024         (2) Extend childrenChanged to specify whether the children were changed by the parser or not.  This allows
2025         Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
2026         possible.
2027
2028         (3) Make sure all Elements now know whether or not their children are currently parsing.  Backwards selectors
2029         like last-child will always return false when children are still being parsed.  When an Element finishes
2030         parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
2031
2032         (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
2033
2034         (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
2035
2036         (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
2037         base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
2038
2039         Reviewed by Eric
2040
2041         * css/CSSStyleSelector.cpp:
2042         (WebCore::CSSStyleSelector::checkSelector):
2043         (WebCore::CSSStyleSelector::checkOneSelector):
2044         * dom/Attr.cpp:
2045         (WebCore::Attr::childrenChanged):
2046         * dom/Attr.h:
2047         * dom/ContainerNode.cpp:
2048         (WebCore::ContainerNode::addChild):
2049         * dom/Document.cpp:
2050         (WebCore::Document::childrenChanged):
2051         * dom/Document.h:
2052         * dom/Element.cpp:
2053         (WebCore::Element::Element):
2054         (WebCore::Element::recalcStyle):
2055         (WebCore::checkFirstChildRules):
2056         (WebCore::checkLastChildRules):
2057         (WebCore::checkEmptyRules):
2058         (WebCore::checkStyleRules):
2059         (WebCore::Element::childrenChanged):
2060         (WebCore::Element::finishParsingChildren):
2061         * dom/Element.h:
2062         (WebCore::Element::finishedParsingChildren):
2063         (WebCore::Element::beginParsingChildren):
2064         * dom/Node.cpp:
2065         * dom/Node.h:
2066         (WebCore::Node::finishParsingChildren):
2067         (WebCore::Node::beginParsingChildren):
2068         (WebCore::Node::childrenChanged):
2069         * dom/StyledElement.cpp:
2070         (WebCore::StyledElement::StyledElement):
2071         * dom/StyledElement.h:
2072         * dom/XMLTokenizer.cpp:
2073         (WebCore::XMLTokenizer::startElementNs):
2074         (WebCore::XMLTokenizer::endElementNs):
2075         (WebCore::):
2076         * html/HTMLAppletElement.cpp:
2077         (WebCore::HTMLAppletElement::HTMLAppletElement):
2078         (WebCore::HTMLAppletElement::finishParsingChildren):
2079         * html/HTMLAppletElement.h:
2080         * html/HTMLElementFactory.cpp:
2081         (WebCore::objectConstructor):
2082         * html/HTMLGenericFormElement.cpp:
2083         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2084         * html/HTMLGenericFormElement.h:
2085         * html/HTMLObjectElement.cpp:
2086         (WebCore::HTMLObjectElement::HTMLObjectElement):
2087         (WebCore::HTMLObjectElement::finishParsingChildren):
2088         (WebCore::HTMLObjectElement::childrenChanged):
2089         * html/HTMLObjectElement.h:
2090         * html/HTMLOptGroupElement.cpp:
2091         (WebCore::HTMLOptGroupElement::childrenChanged):
2092         * html/HTMLOptGroupElement.h:
2093         * html/HTMLOptionElement.cpp:
2094         (WebCore::HTMLOptionElement::childrenChanged):
2095         * html/HTMLOptionElement.h:
2096         * html/HTMLParser.cpp:
2097         (WebCore::HTMLParser::insertNode):
2098         (WebCore::HTMLParser::pushBlock):
2099         (WebCore::HTMLParser::popOneBlockCommon):
2100         * html/HTMLScriptElement.cpp:
2101         (WebCore::HTMLScriptElement::childrenChanged):
2102         (WebCore::HTMLScriptElement::finishParsingChildren):
2103         * html/HTMLScriptElement.h:
2104         * html/HTMLSelectElement.cpp:
2105         (WebCore::HTMLSelectElement::childrenChanged):
2106         * html/HTMLSelectElement.h:
2107         * html/HTMLStyleElement.cpp:
2108         (WebCore::HTMLStyleElement::finishParsingChildren):
2109         (WebCore::HTMLStyleElement::childrenChanged):
2110         * html/HTMLStyleElement.h:
2111         * html/HTMLTextAreaElement.cpp:
2112         (WebCore::HTMLTextAreaElement::childrenChanged):
2113         * html/HTMLTextAreaElement.h:
2114         * html/HTMLTitleElement.cpp:
2115         (WebCore::HTMLTitleElement::childrenChanged):
2116         * html/HTMLTitleElement.h:
2117          * rendering/RenderApplet.cpp:
2118         (WebCore::RenderApplet::createWidgetIfNecessary):
2119         * rendering/RenderPartObject.cpp:
2120         (WebCore::RenderPartObject::updateWidget):
2121         * rendering/RenderStyle.cpp:
2122         (WebCore::RenderStyle::RenderStyle):
2123         * rendering/RenderStyle.h:
2124         (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
2125         (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
2126         (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
2127         (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
2128         * svg/SVGAnimationElement.cpp:
2129         (WebCore::SVGAnimationElement::finishParsingChildren):
2130         * svg/SVGAnimationElement.h:
2131         * svg/SVGClipPathElement.cpp:
2132         (WebCore::SVGClipPathElement::childrenChanged):
2133         * svg/SVGClipPathElement.h:
2134         * svg/SVGDefinitionSrcElement.cpp:
2135         (WebCore::SVGDefinitionSrcElement::childrenChanged):
2136         * svg/SVGDefinitionSrcElement.h:
2137         * svg/SVGElement.cpp:
2138         (WebCore::SVGElement::finishParsingChildren):
2139         * svg/SVGElement.h:
2140         * svg/SVGFontFaceElement.cpp:
2141         (WebCore::SVGFontFaceElement::childrenChanged):
2142         * svg/SVGFontFaceElement.h:
2143         * svg/SVGFontFaceFormatElement.cpp:
2144         (WebCore::SVGFontFaceFormatElement::childrenChanged):
2145         * svg/SVGFontFaceFormatElement.h:
2146         * svg/SVGFontFaceSrcElement.cpp:
2147         (WebCore::SVGFontFaceSrcElement::childrenChanged):
2148         * svg/SVGFontFaceSrcElement.h:
2149         * svg/SVGFontFaceUriElement.cpp:
2150         (WebCore::SVGFontFaceUriElement::childrenChanged):
2151         * svg/SVGFontFaceUriElement.h:
2152         * svg/SVGGElement.cpp:
2153         (WebCore::SVGGElement::childrenChanged):
2154         * svg/SVGGElement.h:
2155         * svg/SVGGradientElement.cpp:
2156         (WebCore::SVGGradientElement::childrenChanged):
2157         * svg/SVGGradientElement.h:
2158         * svg/SVGMarkerElement.cpp:
2159         (WebCore::SVGMarkerElement::childrenChanged):
2160         * svg/SVGMarkerElement.h:
2161         * svg/SVGMaskElement.cpp:
2162         (WebCore::SVGMaskElement::childrenChanged):
2163         * svg/SVGMaskElement.h:
2164         * svg/SVGPatternElement.cpp:
2165         (WebCore::SVGPatternElement::childrenChanged):
2166         * svg/SVGPatternElement.h:
2167         * svg/SVGStyleElement.cpp:
2168         (WebCore::SVGStyleElement::finishParsingChildren):
2169         (WebCore::SVGStyleElement::childrenChanged):
2170         * svg/SVGStyleElement.h:
2171         * svg/SVGStyledElement.cpp:
2172         (WebCore::SVGStyledElement::childrenChanged):
2173         * svg/SVGStyledElement.h:
2174         * svg/SVGTitleElement.cpp:
2175         (WebCore::SVGTitleElement::childrenChanged):
2176         * svg/SVGTitleElement.h:
2177         * svg/SVGUseElement.cpp:
2178         (WebCore::SVGUseElement::childrenChanged):
2179         * svg/SVGUseElement.h:
2180         
2181 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2182
2183         Unreviewed build fix
2184
2185         Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
2186         into the patch.
2187
2188         * platform/qt/RenderThemeQt.h:
2189
2190 2008-02-09  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
2191
2192         Reviewed by Adele.
2193
2194         paintResizeControl is dead, remove the code. This painting
2195         is done by the RenderLayer.
2196
2197         * platform/qt/RenderThemeQt.cpp:
2198         * platform/qt/RenderThemeQt.h:
2199         * rendering/RenderThemeMac.h:
2200         * rendering/RenderThemeMac.mm:
2201
2202 2008-02-07  Kevin Ollivier <kevino@theolliviers.com>
2203
2204         Reviewed by Eric Seidel, Adam Roben.
2205
2206         MSVC7 fixes.
2207         http://bugs.webkit.org/show_bug.cgi?id=17211
2208
2209         * platform/Threading.h:
2210         - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
2211           (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
2212         * platform/win/SharedTimerWin.cpp:
2213         - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
2214           so define them if they are not already defined.
2215
2216 2008-02-08  Brent Fulgham  <bfulgham@gmail.com>
2217
2218         Reviewed by Adam Roben.
2219
2220         Bug 17226: Fix Windows (Cairo) build of image-decoders
2221         http://bugs.webkit.org/show_bug.cgi?id=17226
2222
2223         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2224         * platform/image-decoders/png/PNGImageDecoder.cpp:
2225
2226 2008-02-08  Timothy Hatcher  <timothy@apple.com>
2227
2228         Reviewed by Brady Eidson.
2229
2230         <rdar://problem/5640896> Removing database then trying
2231         to recreate it causes trouble
2232
2233         Added open Database support to DatabaseTracker. So any Database that 
2234         is deleted will be marked as deleted and will fail to open any transaction
2235         or execute any new SQL queries.
2236
2237         * storage/Database.cpp:
2238         (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
2239         (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
2240         (WebCore::Database::markAsDeleted): Set the m_deleted flag.
2241         (WebCore::Database::version): Return a null String if m_deleted is true.
2242         * storage/Database.h:
2243         (WebCore::Database::deleted): Return m_deleted.
2244         * storage/DatabaseTracker.cpp:
2245         (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
2246         (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
2247         (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
2248           matching the origin/name.
2249         * storage/DatabaseTracker.h:
2250         * storage/SQLStatement.cpp:
2251         (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
2252         * storage/SQLStatement.h:
2253         * storage/SQLTransaction.cpp:
2254         (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
2255         (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
2256           if the Database was marked as deleted.
2257
2258 2008-02-08  Darin Adler  <darin@apple.com>
2259
2260         Reviewed by Eric.
2261
2262         - fix http://bugs.webkit.org/show_bug.cgi?id=15003
2263           Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
2264
2265         Test: fast/js/constructor-attributes.html
2266
2267         * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
2268
2269 2008-02-08  Anders Carlsson  <andersca@apple.com>
2270
2271         Reviewed by Mitz.
2272
2273         <rdar://problem/5650446>
2274         http://bugs.webkit.org/show_bug.cgi?id=16102
2275         Crash in FrameLoader::stopLoadingSubframes() on IMDB page
2276
2277         Store the child frame in a RefPtr to prevent it from being deleted when the
2278         frame tree changes while calling stopAllLoaders().
2279         
2280         * loader/FrameLoader.cpp:
2281         (WebCore::FrameLoader::stopLoadingSubframes):
2282
2283 2008-02-08  Kevin Ollivier  <kevino@theolliviers.com>
2284
2285         wx port build fix. Add time.h to define time_t.
2286
2287         * platform/FileSystem.h:
2288
2289 2008-02-08  Alp Toker  <alp@atoker.com>
2290
2291         Reviewed by Adam Roben.
2292
2293         Avoid null-dereference crasher noticed in the GTK+ port and also
2294         affecting the Win debug build.
2295
2296         Covered by existing tests.
2297
2298         * dom/Document.cpp:
2299         (WebCore::Document::userStyleSheet):
2300
2301 2008-02-08  Anders Carlsson  <andersca@apple.com>
2302
2303         Reviewed by Adam.
2304
2305         <rdar://problem/5724188> 
2306         REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
2307         
2308         Revert r29926 which caused the regression.
2309         
2310         * dom/Text.cpp:
2311         (WebCore::Text::createWithLengthLimit):
2312         * dom/Text.h:
2313         * html/HTMLParser.cpp:
2314         (WebCore::HTMLParser::parseToken):
2315         * loader/TextDocument.cpp:
2316         (WebCore::TextTokenizer::write):
2317
2318 2008-02-08  Sam Weinig  <sam@webkit.org>
2319
2320         Reviewed by Hyatt.
2321
2322         Fix for <rdar://problem/5732491>
2323         http://bugs.webkit.org/show_bug.cgi?id=17213
2324         The querySelectorAll method on an element node does not search only the element's descendants
2325
2326         Test: fast/dom/SelectorAPI/elementRoot.html
2327
2328         * dom/Node.cpp:
2329         (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
2330         * dom/SelectorNodeList.cpp:
2331         (WebCore::SelectorNodeList::SelectorNodeList): ditto.
2332
2333
2334
2335 2008-02-08  David Hyatt  <hyatt@apple.com>
2336
2337         Fix for bug 16798, button should default to type=submit.
2338
2339         Reviewed by darin
2340
2341         * html/HTMLButtonElement.cpp:
2342         (WebCore::HTMLButtonElement::type):
2343         (WebCore::HTMLButtonElement::parseMappedAttribute):
2344
2345 2008-02-08  Rodney Dawes  <dobey@wayofthemonkey.com>
2346
2347         Reviewed by Jon Honeycutt.
2348
2349         Redefine some platform-specific types as cross-platform types
2350         Add pathGetFileName method to get the filename from a path string
2351         Add unloadModule method to unload a loadable module from the process
2352         Implement new methods for GTK+ and Windows
2353         Implement missing homeDirectoryPath method for GTK+
2354         Add stub methods for new and missing methods for Wx and Qt
2355
2356         * platform/FileSystem.h:
2357         * platform/gtk/FileSystemGtk.cpp:
2358         * platform/qt/FileSystemQt.cpp:
2359         * platform/win/FileSystemWin.cpp:
2360         * platform/wx/FileSystemWx.cpp:
2361
2362 2008-02-08  Adam Roben  <aroben@apple.com>
2363
2364         Windows build fix after r30088
2365
2366         * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
2367         bindings to rebuild.
2368
2369 2008-02-08  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2370
2371         Reviewed by Alp Toker.
2372
2373         http://bugs.webkit.org/show_bug.cgi?id=17009
2374         [Gtk] Webkit strips accents from some dead-key combinations
2375
2376         KeyEvents have to go through the gtk input method.
2377
2378         Also implement the isKeypad check and make disambiguateKeyDownEvent
2379         behave more like other ports.
2380
2381         * platform/PlatformKeyboardEvent.h:
2382         * platform/gtk/KeyEventGtk.cpp:
2383         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2384         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2385         (WebCore::PlatformKeyboardEvent::gdkEventKey):
2386
2387 2008-02-08  Darin Adler  <darin@apple.com>
2388
2389         Reviewed by Eric.
2390
2391         - fix http://bugs.webkit.org/show_bug.cgi?id=3492
2392           TreeWalker implementation needs to be fixed (affects Acid3)
2393         - fix http://bugs.webkit.org/show_bug.cgi?id=4714
2394           NodeIterator does not handle exceptions from the filter function (affects Acid3)
2395         - fix http://bugs.webkit.org/show_bug.cgi?id=4716
2396           NodeIterator will crash if the filter function removes the current node from the document
2397
2398         Test: traversal/exception-forwarding.html
2399
2400         This turned into a near-rewrite of NodeIterator and TreeWalker.
2401
2402         * bindings/js/JSNodeFilterCondition.h:
2403         * bindings/js/JSNodeFilterCondition.cpp:
2404         (WebCore::takeException): Added.
2405         (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
2406         a JavaScript exception.
2407
2408         * bindings/js/JSNodeFilterCustom.cpp:
2409         (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
2410         a JavaScript exception if the out parameter is set.
2411
2412         * bindings/js/JSNodeIteratorCustom.cpp:
2413         (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
2414         a JavaScript exception if the out parameter is set.
2415         (WebCore::JSNodeIterator::previousNode): Ditto.
2416
2417         * bindings/js/JSTreeWalkerCustom.cpp:
2418         (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
2419         a JavaScript exception if the out parameter is set.
2420         (WebCore::JSTreeWalker::firstChild): Ditto.
2421         (WebCore::JSTreeWalker::lastChild): Ditto.
2422         (WebCore::JSTreeWalker::nextSibling): Ditto.
2423         (WebCore::JSTreeWalker::previousSibling): Ditto.
2424         (WebCore::JSTreeWalker::previousNode): Ditto.
2425         (WebCore::JSTreeWalker::nextNode): Ditto.
2426
2427         * bindings/objc/DOM.mm:
2428         (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
2429         out parameter.
2430         (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
2431         Use RefPtr to make object lifetimes clearer.
2432         (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
2433         Ditto.
2434
2435         * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
2436         JSDocument.cpp.
2437
2438         * dom/Document.h:
2439         * dom/Document.cpp:
2440         (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
2441         (WebCore::Document::createTreeWalker): Ditto.
2442
2443         * dom/NodeFilter.h:
2444         * dom/NodeFilter.cpp:
2445         (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
2446         (WebCore::NodeFilter::acceptNode): Added an out parameter to return
2447         a JavaScript exception.
2448         * dom/NodeFilter.idl: Custom binding for acceptNode.
2449
2450         * dom/NodeFilterCondition.h:
2451         * dom/NodeFilterCondition.cpp:
2452         (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
2453         a JavaScript exception.
2454
2455         * dom/NodeIterator.cpp:
2456         (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
2457         Eliminated m_doc, using the root node instead, and unnecessary check for
2458         null -- rootNode must be non-null and all nodes have a non-null document.
2459         (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
2460         (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
2461         acceptNode function could do anything, including removing the last
2462         reference to the current node. Also folded findNextNode into this function
2463         since it's the only one that needs to call it.
2464         (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
2465         (WebCore::NodeIterator::detach): Changed to use the root node as the indication
2466         that we're detached rather than a separate boolean.
2467         (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
2468         checks. Removed incorrect use of findNextNode/findPreviousNode -- those
2469         functions call acceptNode and the DOM standard is quite clear that these
2470         functions do not take that into account, allowing the current node to become
2471         one that's not accepted.
2472
2473         * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
2474         nextNode and previousNode to have an out parameter with a JavaScript exception.
2475         Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
2476         detached, setDetached, document, findNextNode, and findPreviousNode. All were
2477         unnecessary. Removed data member m_doc which was just rootNode()->document().
2478
2479         * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
2480
2481         * dom/Traversal.cpp:
2482         (WebCore::Traversal::Traversal): Use PassRefPtr more.
2483         (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
2484         Also rearranged the function a little bit for clarity.
2485
2486         * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
2487         exception and made it protected, since it's only for use by the derived classes.
2488
2489         * dom/TreeWalker.cpp:
2490         (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
2491         (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
2492         the overloaded version since it's not needed.
2493         (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
2494         to implement rules about when to check things like whether we're in the tree.
2495         The previous fix where we called isDescendantOf was not entirely correct, because
2496         the specification allows you to walk outside the tree if you get there somehow.
2497         What it doesn't allow is walking outside the tree from inside. The new
2498         implementation handles this correctly.
2499         (WebCore::TreeWalker::firstChild): Ditto.
2500         (WebCore::TreeWalker::lastChild): Ditto.
2501         (WebCore::TreeWalker::previousSibling): Ditto.
2502         (WebCore::TreeWalker::nextSibling): Ditto.
2503         (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
2504         acceptNode function on parents, this can't use traversePreviousNode (more's the
2505         pity, because it's a bit complicated).
2506         (WebCore::TreeWalker::nextNode): Ditto.
2507
2508         * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
2509         more. Changed the navigation functions to have an out parameter with a JavaScript
2510         exception. Removed helper functions setCurrentNode and ancestorRejected.
2511
2512         * dom/TreeWalker.idl: Custom binding for navigation functions.
2513
2514 2008-02-08  Eric Seidel  <eric@webkit.org>
2515
2516         Reviewed by darin.
2517
2518         Add support for Text.wholeText and Text.replaceWholeText
2519         http://bugs.webkit.org/show_bug.cgi?id=17125
2520
2521         Test EntityReferences to make sure they're always treated as read-only
2522         In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
2523
2524         * dom/Document.cpp:
2525         (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
2526         * dom/Node.cpp:
2527         * dom/Node.cpp:
2528         (WebCore::Node::textContent):
2529         * dom/Text.cpp:
2530         (WebCore::earliestLogicallyAdjacentTextNode):
2531         (WebCore::latestLogicallyAdjacentTextNode):
2532         (WebCore::Text::wholeText):
2533         (WebCore::Text::replaceWholeText):
2534         * dom/Text.h:
2535         * dom/Text.idl:
2536
2537 2008-02-06  Kimmo Kinnunen  <kimmok@iki.fi>
2538
2539         Reviewed by Tim Hatcher.
2540
2541         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
2542         HTML5: Client-side database queries should return values of type number
2543         Test: storage/sql-data-types.html
2544
2545         Make the DB queries return a value as a number if it was inserted
2546         as a number to the database.
2547         * platform/sql/SQLiteStatement.cpp:
2548         (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
2549         * platform/sql/SQLiteStatement.h:
2550         * storage/SQLStatement.cpp:
2551         (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
2552
2553 2008-02-07  Ada Chan  <adachan@apple.com>
2554
2555         <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
2556         Added mechanism to communicate client certificate info back to CFNetwork.
2557
2558         Reviewed by Adam.
2559
2560         * platform/network/ResourceHandle.h:
2561         * platform/network/cf/ResourceHandleCFNet.cpp:
2562         (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
2563         (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
2564         to CFNetwork by setting it in the SSL properties.
2565         (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
2566
2567 2008-02-07  Adam Roben  <aroben@apple.com>
2568
2569         Qt build fix
2570
2571         * platform/SharedBuffer.cpp: Removed a stub implementation of
2572         createWithContentsOfFile, now that each platform has its own stub.
2573
2574 2008-02-07  Adam Roben  <aroben@apple.com>
2575
2576         Fix Bug 17138: REGRESSION: Node highlight not updated properly
2577
2578         <http://bugs.webkit.org/show_bug.cgi?id=17138>
2579         <rdar://problem/5719869>
2580
2581         Reviewed by Darin.
2582
2583         No test possible.
2584
2585         * page/InspectorController.cpp:
2586         (WebCore::InspectorController::drawNodeHighlight): Update the
2587         overlayRect after scrolling to make sure that we translate the context
2588         by the correct amount.
2589
2590 2008-02-07  Adam Roben  <aroben@apple.com>
2591
2592         Qt and GTK+ build fixes
2593
2594         * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
2595         * platform/qt/FileSystemQt.cpp: Ditto.
2596
2597 2008-02-07  Adam Roben  <aroben@apple.com>
2598
2599         Some cleanup of Mac-only user stylesheet code
2600
2601         I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
2602         moved some Mac-only Frame methods to FrameMac.mm.
2603
2604         Reviewed by Darin.
2605
2606         * WebCore.xcodeproj/project.pbxproj: Added new files to project.
2607         * loader/mac/UserStyleSheetLoader.cpp: Added.
2608         (UserStyleSheetLoader::UserStyleSheetLoader):
2609         (UserStyleSheetLoader::~UserStyleSheetLoader):
2610         * loader/mac/UserStyleSheetLoader.h: Added.
2611         * page/Frame.cpp: Removed setUserStyleSheet[Location]
2612         * page/mac/FrameMac.mm:
2613         (WebCore::Frame::setUserStyleSheetLocation): Moved here from
2614         Frame.cpp.
2615         (WebCore::Frame::setUserStyleSheet): Ditto.
2616
2617 2008-02-07  Adam Roben  <aroben@apple.com>
2618
2619         Fix <rdar://5555260> GMail never loads when a user stylesheet is
2620         specified
2621
2622         The fix in r29841 did not guarantee that the user stylesheet would not
2623         still be loading by the time GMail called document.write, and so was
2624         not a complete fix.
2625
2626         This change reworks the user stylesheet loading mechanism on non-Mac
2627         platforms to load the stylesheet synchronously from disk, and then
2628         keeps it in memory. This obsoletes the issue of what our behavior
2629         should be before the user stylesheet has loaded and what should happen
2630         when it finishes loading, as the user stylesheet will always be
2631         available when the Document first asks for it. Note, however, that
2632         this removes the ability to specify a non-file: URL for the user
2633         stylesheet. This change was not made for the Mac platform because it's
2634         possible that WebKit clients are relying on non-file: URLs for user
2635         stylesheets. It would also be nice to move back to an asynchronous
2636         loading model someday, but that is not currently possible since we
2637         don't have an asynchronous loading mechanism that is not tied to a
2638         particular Frame.
2639
2640         The responsibility of loading and storing the user stylesheet has
2641         moved from Frame to Page, since the user stylesheet URL is set on the
2642         Page-level Settings object.
2643
2644         Reviewed by Darin.
2645
2646         * dom/Document.cpp:
2647         (WebCore::Document::Document): Changed to call userStyleSheet().
2648         (WebCore::Document::setUserStyleSheet): Made Mac-only.
2649         (WebCore::Document::userStyleSheet): Changed to call up to Page on
2650         non-Mac platforms.
2651         (WebCore::Document::recalcStyleSelector): Changed to call
2652         userStyleSheet().
2653         * dom/Document.h:
2654             - Made setUserStyleSheet and the m_usersheet member Mac-only
2655             - Changed userStyleSheet to return a String instance instead of a
2656               String reference, since we now might return a new null String.
2657         * loader/FrameLoader.cpp:
2658         (WebCore::FrameLoader::begin): Made the call to
2659         Frame::setUserStyleSheetLocation Mac-only.
2660         * page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
2661         (WebCore::Frame::~Frame): Ditto.
2662         (WebCore::Frame::reapplyStyles): Made the call to
2663         setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
2664         Document will pick up the new stylesheet in Document::reapplyStyles.
2665         (WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
2666         Mac-only.
2667         * page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
2668         * page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
2669         * page/Page.cpp:
2670         (WebCore::Page::Page): Initialize new members.
2671         (WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
2672         Mac. On non-Mac, resets all members relating to the user stylesheet so
2673         we'll know to load it again the next time it's asked for.
2674         (WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
2675         the user stylesheet location has changed since the last time we loaded
2676         it, or if the file has been modified since we last loaded it, then
2677         returns the contents of the user stylesheet as a String.
2678         * page/Page.h: Added new methods/members.
2679         * page/Settings.cpp:
2680         (WebCore::Settings::setUserStyleSheetLocation): Changed to call
2681         Page::userStyleSheetLocationChanged.
2682         * page/Settings.h: Changed userStyleSheetLocation to return the KURL
2683         by reference instead of making a copy.
2684         * platform/FileSystem.h: Added declaration for getFileModificationTime.
2685         * platform/KURL.h: Added declaration for fileSystemPath method.
2686         * platform/cf/KURLCFNet.cpp:
2687         (WebCore::KURL::fileSystemPath): Added.
2688         * platform/posix/FileSystemPOSIX.cpp:
2689         (WebCore::getFileModificationTime): Added.
2690         * platform/qt/KURLQt.cpp:
2691         (WebCore::KURL::fileSystemPath): Stubbed out.
2692         * platform/win/FileSystemWin.cpp:
2693         (WebCore::getFileModificationTime): Added.
2694         * platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
2695         * platform/gtk/FileSystemGtk.cpp: Ditto.
2696         * platform/wx/FileSystemWx.cpp: Ditto.
2697         * platform/qt/TemporaryLinkStubs.cpp: Stubbed out
2698         SharedBuffer::createWithContentsOfFile.
2699         * platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
2700         KURL::fileSystemPath.
2701         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
2702
2703 2008-02-07  Adam Roben  <aroben@apple.com>
2704
2705         Clean up FileSystemWin.cpp
2706
2707         This cleanup also makes us call _wstat64 instead of _wstat32i64. The
2708         only difference between these two functions is that _wstat64 gives
2709         64-bit time values, while _wstat32i64 only gives 32-bit time values.
2710
2711         Reviewed by Darin.
2712
2713         All tests pass.
2714
2715         * platform/win/FileSystemWin.cpp:
2716         (WebCore::statFile): New static helper that wraps _wstat64.
2717         (WebCore::getFileSize): Changed to call statFile.
2718         (WebCore::fileExists): Ditto.
2719
2720 2008-02-07  Adam Roben  <aroben@apple.com>
2721
2722         Rename fileSize to getFileSize
2723
2724         Rubberstamped by Darin.
2725
2726         * platform/FileSystem.h:
2727         * platform/gtk/FileSystemGtk.cpp:
2728         * platform/network/cf/FormDataStreamCFNet.cpp:
2729         (WebCore::setHTTPBody):
2730         * platform/network/curl/ResourceHandleManager.cpp:
2731         (WebCore::ResourceHandleManager::setupPOST):
2732         * platform/posix/FileSystemPOSIX.cpp:
2733         * platform/qt/FileSystemQt.cpp:
2734         * platform/win/FileSystemWin.cpp:
2735         * platform/wx/FileSystemWx.cpp:
2736         * storage/Database.cpp:
2737         (WebCore::Database::databaseSize):
2738         * storage/DatabaseTracker.cpp:
2739         (WebCore::DatabaseTracker::usageForDatabase):
2740         * storage/OriginUsageRecord.cpp:
2741         (WebCore::OriginUsageRecord::diskUsage):
2742
2743 2008-02-06  Adam Roben  <aroben@apple.com>
2744
2745         Make KURL::isLocalFile treat the URL's protocol case-insensitively
2746
2747         Reviewed by Darin.
2748
2749         * platform/KURL.cpp:
2750         (WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
2751
2752 2008-02-07  David Hyatt  <hyatt@apple.com>
2753
2754         Fix for bug 6248, implement the nth-* CSS3 selectors.  Patch based on original KHTML work from Allan Jensen
2755         and improved upon by Nick Shanks.
2756
2757         Reviewed by Eric
2758
2759         * css/CSSGrammar.y:
2760         * css/CSSParser.cpp:
2761         (WebCore::CSSParser::lex):
2762         * css/CSSSelector.cpp:
2763         (WebCore::CSSSelector::extractPseudoType):
2764         * css/CSSSelector.h:
2765         (WebCore::CSSSelector::):
2766         * css/CSSStyleSelector.cpp:
2767         (WebCore::parseNth):
2768         (WebCore::matchNth):
2769         (WebCore::CSSStyleSelector::checkOneSelector):
2770         * css/tokenizer.flex:
2771         * rendering/RenderStyle.cpp:
2772         (WebCore::RenderStyle::RenderStyle):
2773         * rendering/RenderStyle.h:
2774         (WebCore::RenderStyle::childIndex):
2775         (WebCore::RenderStyle::setChildIndex):
2776
2777 2008-02-07  Dan Bernstein  <mitz@apple.com>
2778
2779         Reviewed by Dave Hyatt.
2780
2781         - fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
2782
2783         Test: fast/block/float/relative-painted-twice.html
2784
2785         * rendering/RenderBlock.cpp:
2786         (WebCore::RenderBlock::addOverhangingFloats): Added another case where
2787         the child should not take over painting the float: when they do not have
2788         the same enclosing layer. In that case, the float is already being
2789         painted by one of its closer ancestors.
2790
2791 2008-02-07  Dan Bernstein  <mitz@apple.com>
2792
2793         Reviewed by Darin Adler.
2794
2795         - fix http://bugs.webkit.org/show_bug.cgi?id=17194
2796           Changing text to bold changes font family
2797
2798         Test: platform/mac/fast/text/family-for-font-matched-by-name.html
2799
2800         * platform/mac/WebFontCache.mm:
2801         (+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
2802         the family of the font whose name matches the desired family if there
2803         is no exact family match.
2804
2805 2008-02-07  Beth Dakin  <bdakin@apple.com>
2806
2807         Reviewed by Geoff.
2808
2809         Fix for <rdar://problem/5697882> Traffic or Street View button on 
2810         Google Maps is sometimes not positioned correctly (17000)
2811
2812         On the Mac, timers fire in the order that they are registered. 
2813         Geoff and I discovered that this is not necessarily true on 
2814         Windows, and that turned out to be the cause of this intermittent 
2815         layout problem at Google Maps. This patch adds a new member 
2816         variable to Timer to remember the timer's insertion point into the 
2817         heap. Now when comparing timers, if two timers were registered at 
2818         the same time, their insertion orders are compared to determine 
2819         which should fire first. This code actually never runs on Debug 
2820         builds on the Mac; the system clock on the Mac is accurate enough 
2821         that it knows that the two timers were not registered at *exactly* 
2822         the same time. This is not the case on Windows. In theory, if we 
2823         sped up Javascript enough on the Mac, this code would run and would 
2824         prevent misrenderings such as the one found on Google Maps.
2825
2826         * platform/Timer.cpp:
2827         (WebCore::operator<):
2828         (WebCore::TimerBase::setNextFireTime):
2829         * platform/Timer.h:
2830
2831 2008-02-06  Justin Garcia  <justin.garcia@apple.com>
2832
2833         Reviewed by Darin Adler.
2834
2835         <rdar://problem/5195056> Huge plain text pastes are slow
2836         
2837         This was fixed in r27369 and then r29367 and r29667 caused performance to
2838         regress.
2839
2840         * editing/EditCommand.cpp:
2841         (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
2842         (WebCore::EditCommand::unapply): Ditto.
2843         (WebCore::EditCommand::reapply): Ditto.
2844         * editing/Editor.cpp:
2845         (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls 
2846         that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
2847         (WebCore::Editor::unappliedEditing): Ditto.
2848         (WebCore::Editor::reappliedEditing): Ditto.
2849         * editing/SelectionController.cpp:
2850         (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
2851         base and extent with the expensive isCandidate operation if the node that will
2852         be removed is in a fragment, since such a removal is guaranteed to have no effect
2853         on a selection.  This is to speed up the paste operation, which does many removes from
2854         a fragment.
2855
2856 2008-02-06  Kevin Ollivier  <kevino@theolliviers.com>
2857
2858         Reviewed by Darin Adler.
2859
2860         Rather than directly handing scroll wheel events, use
2861         PlatformWheelEvent to send them to WebCore first, so that
2862         mouse wheel scrolling info can be retrieved via JavaScript.
2863
2864         http://bugs.webkit.org/show_bug.cgi?id=17179
2865
2866         * platform/ScrollView.h:
2867         * platform/wx/MouseWheelEventWx.cpp:
2868         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2869         * platform/wx/ScrollViewWx.cpp:
2870         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
2871         (WebCore::ScrollView::wheelEvent):
2872         (WebCore::ScrollView::maximumScroll):
2873
2874 2008-02-06  Mark Rowe  <mrowe@apple.com>
2875
2876         Fix Windows builds.
2877
2878         * WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
2879
2880 2008-02-06  Mark Rowe  <mrowe@apple.com>
2881
2882         Mac build fix.  Track rename that happened in r30056.
2883
2884         * platform/graphics/mac/GraphicsContextMac.mm:
2885
2886 2008-02-06  Brent Fulgham  <bfulgham@gmail.com>
2887
2888         Reviewed by Adam Roben.
2889
2890         http://bugs.webkit.org/show_bug.cgi?id=16979
2891         Conditionalize CoreGraphics vs Cairo support in Windows port.
2892
2893         * WebCore.vcproj/WebCore.vcproj:
2894         * bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
2895         (WebCore::imageFromSelection):
2896         * bridge/win/FrameCairoWin.cpp: Added.
2897         (WebCore::imageFromSelection):
2898         * bridge/win/FrameWin.cpp:
2899         (WebCore::computePageRectsForFrame):
2900         * platform/graphics/SimpleFontData.h:
2901         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2902         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
2903         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2904         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
2905         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
2906         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
2907         * platform/graphics/cg/GraphicsContextCG.cpp:
2908         (WebCore::GraphicsContext::savePlatformState):
2909         (WebCore::GraphicsContext::restorePlatformState):
2910         * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed.
2911         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Copied from WebCore/platform/graphics/cg/GraphicsContextPlatformPrivate.h.
2912         * platform/graphics/win/FontCGWin.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp.
2913         (WebCore::Font::drawGlyphs):
2914         * platform/graphics/win/FontCairoWin.cpp: Added.
2915         (WebCore::Font::drawGlyphs):
2916         * platform/graphics/win/FontWin.cpp:
2917         * platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
2918         (WebCore::CGContextWithHDC):
2919         (WebCore::GraphicsContext::inTransparencyLayer):
2920         (WebCore::GraphicsContext::getWindowsContext):
2921         (WebCore::GraphicsContext::releaseWindowsContext):
2922         (WebCore::GraphicsContextPlatformPrivate::scale):
2923         (WebCore::GraphicsContextPlatformPrivate::rotate):
2924         (WebCore::GraphicsContextPlatformPrivate::translate):
2925         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
2926         (WebCore::setCGStrokeColor):
2927         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
2928         * platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
2929         (WebCore::GraphicsContext::GraphicsContext):
2930         (WebCore::GraphicsContext::getWindowsContext):
2931         (WebCore::GraphicsContext::inTransparencyLayer):
2932         (WebCore::GraphicsContext::releaseWindowsContext):
2933         (WebCore::GraphicsContext::concatCTM):
2934         * platform/graphics/win/GraphicsContextWin.cpp:
2935         * platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
2936         (WebCore::BitmapImage::getHBITMAPOfSize):
2937         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2938         * platform/graphics/win/ImageCairoWin.cpp: Added.
2939         (WebCore::BitmapImage::getHBITMAPOfSize):
2940         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2941         * platform/graphics/win/ImageWin.cpp:
2942         * platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
2943         (WebCore::scaleEmToUnits):
2944         (WebCore::SimpleFontData::platformInit):
2945         (WebCore::SimpleFontData::platformWidthForGlyph):
2946         * platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
2947         (WebCore::SimpleFontData::platformInit):
2948         (WebCore::SimpleFontData::platformDestroy):
2949         (WebCore::SimpleFontData::platformWidthForGlyph):
2950         * platform/graphics/win/SimpleFontDataWin.cpp:
2951         (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
2952         (WebCore::SimpleFontData::shouldApplyMacAscentHack):
2953         * platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
2954         (WebCore::scaleDragImage):
2955         (WebCore::createDragImageFromImage):
2956         * platform/win/DragImageCairoWin.cpp: Added.
2957         (WebCore::scaleDragImage):
2958         (WebCore::createDragImageFromImage):
2959         * platform/win/DragImageWin.cpp:
2960
2961 2008-02-06  Anders Carlsson  <andersca@apple.com>
2962
2963         Reviewed by Darin.
2964
2965         Change httpBodyFromStream to take the request instead of the stream.
2966         
2967         * platform/network/cf/FormDataStreamCFNet.cpp:
2968         (WebCore::httpBodyFromRequest):
2969         * platform/network/cf/FormDataStreamCFNet.h:
2970         * platform/network/cf/ResourceRequestCFNet.cpp:
2971         (WebCore::ResourceRequest::doUpdateResourceRequest):
2972
2973 2008-02-06  Kevin McCullough  <kmccullough@apple.com>
2974
2975         Reviewed by Darin.
2976
2977         - Added manual tests for <rdar://problem/5556374> REGRESSION: cross-domain error when
2978         one URL uses an explicit port number and another doesn't
2979
2980         * manual-tests/Default-port-frame.html: Added.
2981         * manual-tests/resources/Default-port-frame-contents.html: Added.
2982
2983 2008-02-06  Oliver Hunt  <oliver@apple.com>
2984
2985         Reviewed by NOBODY (Build fix).
2986
2987         Fix windows build
2988
2989         * WebCore.vcproj/build-generated-files.sh:
2990
2991 2008-02-06  Kevin McCullough  <kmccullough@apple.com>
2992
2993         Rubberstamped by Darin.
2994
2995         <rdar://problem/5727708> REGRESSION (r29952): Can't send message from Yahoo Mail beta
2996         - Reverted the change that caused the regression.
2997
2998         * dom/Document.cpp:
2999         (WebCore::Document::createElement):
3000         (WebCore::Document::createElementNS):
3001         (WebCore::Document::getElementById):
3002         (WebCore::Document::parseQualifiedName):
3003         (WebCore::Document::createAttributeNS):
3004         * dom/Document.idl:
3005
3006 2008-02-06  Geoffrey Garen  <ggaren@apple.com>
3007
3008         Reviewed by Oliver Hunt.
3009         
3010         Fixed <rdar://problem/5728081> REGRESSION: Many leaks on buildbot
3011
3012         The problem was refCount underflow in NamedAttrMap.
3013         
3014         Neither our regression tests nor the stress test have yet discovered
3015         another instance of this problem.
3016
3017         * dom/NamedAttrMap.cpp:
3018         (WebCore::NamedAttrMap::addAttribute): Changed to use PassRefPtr,
3019         for fast and correct refCount management. Also, change a rediculously
3020         slow malloc to a slightly less rediculously slow realloc.
3021
3022         * dom/NamedAttrMap.h:
3023         (WebCore::NamedAttrMap::insertAttribute): Changed to use PassRefPtr,
3024         for fast and correct refCount management.
3025
3026         * html/HTMLTokenizer.cpp:
3027         (WebCore::Token::addAttribute): Use a RefPtr, to guarantee that the
3028         object starts with a refCount of 1.
3029
3030 2008-02-06  Darin Adler  <darin@apple.com>
3031
3032         Reviewed by Tim Hatcher.
3033
3034         - fix <rdar://problem/5723293> NULL-deref crash in PropertyMap::put opening web inspector
3035           with View Source window as target
3036
3037         * page/InspectorController.cpp:
3038         (WebCore::canPassNodeToJavaScript): Added. Returns false if the node is in a document with
3039         JavaScript disabled.
3040         (WebCore::InspectorController::inspect): Check canPassNodeToJavaScript and do nothing if
3041         it returns false.
3042
3043 2008-02-06  David Hyatt  <hyatt@apple.com>
3044
3045         Fix for bug 16799, object elements should return absolute URLs from .data.
3046
3047         Reviewed by Mark Rowe
3048
3049         * dom/Document.cpp:
3050         (WebCore::Document::completeURL):
3051         * html/HTMLAnchorElement.cpp:
3052         (WebCore::HTMLAnchorElement::href):
3053         * html/HTMLObjectElement.cpp:
3054         (WebCore::HTMLObjectElement::data):
3055
3056 2008-02-05  Antti Koivisto  <antti@apple.com>
3057
3058         Reviewed by Darin.
3059
3060         <rdar://problem/5726340>
3061         <video autoplay controls> left in unplayable state if navigated away, then back to, before video finished loading
3062         
3063         When moving document in and out from the page cache:
3064         - Cancel incomplete load by deleting the media player. This guarantees everything is in consistent state.
3065         - Restart the load if it was aborted in the middle.
3066
3067         * html/HTMLMediaElement.cpp:
3068         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3069         (WebCore::HTMLMediaElement::load):
3070         (WebCore::HTMLMediaElement::willSaveToCache):
3071         (WebCore::HTMLMediaElement::didRestoreFromCache):
3072         * html/HTMLMediaElement.h:
3073         (WebCore::HTMLMediaElement::player):
3074
3075 2008-02-06  Darin Adler  <darin@apple.com>
3076
3077         Reviewed by Sam.
3078
3079         - replace calls to put to set up properties with calls to putDirect, to
3080           prepare for a future change where put won't take attributes any more,
3081           and for a slight performance boost
3082
3083         * bindings/js/JSAudioConstructor.cpp:
3084         (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
3085         * bindings/js/JSEventTargetBase.h:
3086         (WebCore::JSEventTargetPrototype::self): Ditto.
3087         * bindings/js/JSHTMLOptionElementConstructor.cpp:
3088         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
3089         * bindings/js/JSSQLResultSetRowListCustom.cpp:
3090         (WebCore::JSSQLResultSetRowList::item): Ditto.
3091
3092 2008-02-06  Dan Bernstein  <mitz@apple.com>
3093
3094         Reviewed by Darin Adler.
3095
3096         - fix http://bugs.webkit.org/show_bug.cgi?17093
3097         'border-color' does not animate to the value of 'color' when unspecified
3098
3099         Test: fast/css/transition-color-unspecified.html
3100
3101         * page/AnimationController.cpp:
3102         (WebCore::ImplicitAnimation::animate): Changed to use the value of the
3103         'color' property in the source or destination style as the source or
3104         destination value of properties whose inital value is defined to be the
3105         computed value of 'color'.
3106
3107 2008-02-06  Dan Bernstein  <mitz@apple.com>
3108
3109         Build fix.
3110
3111         * svg/svgtags.in:
3112
3113 2008-02-05  Oliver Hunt  <oliver@apple.com>
3114
3115         Build fix -- touch generate-bindings to trigger regeneration of bindings
3116
3117         * bindings/scripts/generate-bindings.pl:
3118
3119 2008-02-05  Oliver Hunt  <oliver@apple.com>
3120
3121         RS=Eric.
3122
3123         Re-enable foreignObject by default as it is needed for a number of 
3124         non-fO related SVG tests and none of the old known crashes occur
3125         anymore.
3126
3127         * Configurations/WebCore.xcconfig:
3128         * WebCore.vcproj/WebCore.vcproj:
3129
3130 2008-02-05  Sam Weinig  <sam@webkit.org>
3131
3132         Reviewed by Anders Carlsson.
3133
3134         Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
3135         NodeList (and other DOM lists) items are not enumeratable using for..in
3136
3137         - Match Firefox when enumerating DOM interfaces with indexGetters (support for 
3138           the array bracket, nodeList[0], notation) by including all the items in the
3139           list before the attributes and methods of the interface.
3140
3141         Test: fast/dom/domListEnumeration.html
3142
3143         * ForwardingHeaders/kjs/PropertyNameArray.h: Added.
3144         * bindings/js/JSDOMWindowCustom.cpp:
3145         (WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model. 
3146         * bindings/js/JSHistoryCustom.cpp:
3147         (WebCore::JSHistory::customGetPropertyNames): ditto.
3148         * bindings/scripts/CodeGeneratorJS.pm: Instead of just adding a declaration of
3149         getProperyNames and implementing the method in the Custom.cpp, move to a the 
3150         model used by generated getOwnPropertySlot() and put() where the custom code
3151         is written in a separate customGetPropertyNames which returns a bool indicating
3152         whether to call up to the base class.  This enables adding the list indexes
3153         to the PropertyNameArray for interfaces with indexGetters automatically.
3154
3155 2008-02-05  Samuel Weinig  <sam@webkit.org>
3156
3157         Reviewed by Darin Adler.
3158
3159         Fix for <rdar://problem/5726604> 
3160         dom-checker: deleting properties of the window object cross-domain should not be allowed
3161
3162         Fix flaw found while testing with dom-checker testing tool (http://code.google.com/p/dom-checker/).
3163
3164         Test: http/tests/security/cross-frame-access-delete.html
3165
3166         * bindings/js/JSDOMWindowCustom.cpp:
3167         (WebCore::JSDOMWindow::deleteProperty): Override deleteProperty to not delete cross-domain.
3168         * bindings/js/JSHistoryCustom.cpp:
3169         (WebCore::JSHistory::deleteProperty): ditto.
3170         * bindings/js/JSLocation.cpp:
3171         (WebCore::JSLocation::deleteProperty): ditto.
3172         * bindings/js/JSLocation.h:
3173
3174         * bindings/scripts/CodeGeneratorJS.pm: Add deleteProperty declaration when CustomDeleteProperty is used.
3175         * page/DOMWindow.idl: Add CustomDeleteProperty extended attribute.
3176         * page/History.idl: ditto.
3177
3178 2008-02-05  Alp Toker  <alp@atoker.com>
3179
3180         Rubber-stamped by Mark Rowe.
3181
3182         Fix a "missing sentinel in function call" warning by using NULL
3183         instead of 0.
3184
3185         * platform/gtk/RenderThemeGtk.cpp:
3186         (WebCore::RenderThemeGtk::caretBlinkFrequency):
3187
3188 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
3189
3190         Reviewed by Oliver.
3191
3192         Fix dynamic updates of <circle> element's properties.
3193
3194         Added tests: svg/dynamic-updates/SVGCircleElement*
3195
3196         * svg/SVGCircleElement.cpp:
3197         (WebCore::SVGCircleElement::svgAttributeChanged): Mixed up cxAttr/xAttr etc.
3198         * svg/SVGCircleElement.h:
3199
3200 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
3201
3202         Wx build fix.  Add WebCore/plugins to the include path.
3203
3204         * webcore-base.bkl:
3205
3206 2008-02-05  Mark Rowe  <mrowe@apple.com>
3207
3208         Mac build fix.  Update the Xcode project to follow a moved file,
3209         and track a rename in two files that were missed earlier.
3210
3211         * WebCore.xcodeproj/project.pbxproj:
3212         * page/mac/WebCoreFrameBridge.mm:
3213         (-[WebCoreFrameBridge canProvideDocumentSource]):
3214         * platform/mac/PlugInInfoStoreMac.mm:
3215         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3216
3217 2008-02-05  Nikolas Zimmermann  <zimmermann@kde.org>
3218
3219         Reviewed by Holger.
3220
3221         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17185
3222         Fix dynamic SVG DOM updates of <a> element's href property.
3223
3224         This commit also introduces a new SVG Tests framework: LayoutTests/svg/dynamic-updates
3225         Its purpose is to provide dynamic updating tests for each SVG class & property, aka.
3226         one test per property per class. As a first pass it's sufficient to add testcases for all
3227         SVG*Element classes, and their properties - and only common-used base-class properties.
3228
3229         For SVGAElement - for example - it makes most sense to test scripting its parent
3230         SVGURIReference object ('href' property) and its own property 'target'.
3231
3232         Adding tests to see - for example - if SVGAElement reacts on changes on ie. its parent
3233         SVGExternalResourcesRequired interface, should really be done in a second pass.
3234
3235         All tests within the new framework are supposed to be created using make-js-tests-wrappers.
3236
3237         Added test: svg/dynamic-updates/SVGAElement-dom-href-attr.js
3238         Added test: svg/dynamic-updates/SVGAElement-dom-target-attr.js
3239         Added test: svg/dynamic-updates/SVGAElement-svgdom-href-prop.js
3240         Added test: svg/dynamic-updates/SVGAElement-svgdom-target-prop.js
3241
3242         * svg/SVGAElement.cpp:
3243         (WebCore::SVGAElement::parseMappedAttribute): Move any setChanged() handling in svgAttributeChanged.
3244         (WebCore::SVGAElement::svgAttributeChanged):
3245         (WebCore::SVGAElement::defaultEventHandler): Use href() not getAttribute(hrefAttr) - otherwhise SVG DOM updates fail!
3246         * svg/SVGAElement.h:
3247
3248 2008-02-05  Justin Garcia  <justin.garcia@apple.com>
3249
3250         Reviewed by Alexey Proskuryakov.
3251
3252         <rdar://problem/5685601> webkit-block-placeholder class on placeholders seems unnecessary (12317)
3253
3254         * editing/CompositeEditCommand.cpp:
3255         (WebCore::createBlockPlaceholderElement): The khtml-block-placeholder class was needed
3256         when the editing code actively looked for <br>s of that type in order to handle them
3257         specially.  That is no longer the case.
3258         * editing/InsertParagraphSeparatorCommand.cpp:
3259         (WebCore::InsertParagraphSeparatorCommand::doApply): Fixed a bug where an extra block
3260         would be inserted when hitting return inside an editable root held open by a placeholder
3261         <br> or '\n'.  Added test cases for the bug and for the special case code that was incorrectly
3262         triggered to cause the bug. 
3263
3264 2008-02-05  Rodney Dawes  <dobey@wayofthemonkey.com>
3265
3266         Reviewed by Anders Carlsson.
3267
3268         Part one of http://bugs.webkit.org/show_bug.cgi?id=16924.
3269         Shared PluginDatabase, PluginInfoStore and PluginPackage implementations.
3270
3271         Remove the Win suffix on several plugin-related classes that will
3272         soon be refactored to be more portable.
3273
3274         * WebCore.vcproj/WebCore.vcproj:
3275         * bindings/js/kjs_navigator.cpp:
3276         (KJS::PluginBase::cachePluginDataIfNecessary):
3277         * bindings/js/kjs_window.cpp:
3278         * bridge/win/FrameWin.cpp:
3279         (WebCore::Frame::createScriptInstanceForWidget):
3280         * dom/Clipboard.cpp:
3281         * dom/DOMImplementation.cpp:
3282         (WebCore::DOMImplementation::createDocument):
3283         * loader/FrameLoader.cpp:
3284         (WebCore::FrameLoader::shouldUsePlugin):
3285         * page/DragController.cpp:
3286         * platform/PlugInInfoStore.h: Removed.
3287         * platform/gtk/TemporaryLinkStubs.cpp:
3288         (PluginInfoStore::createPluginInfoForPluginAtIndex):
3289         (PluginInfoStore::pluginCount):
3290         (PluginInfoStore::pluginNameForMIMEType):
3291         (WebCore::PluginInfoStore::supportsMIMEType):
3292         * platform/qt/PlugInInfoStoreQt.cpp:
3293         (WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
3294         (WebCore::PluginInfoStore::pluginCount):
3295         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3296         (WebCore::PluginInfoStore::supportsMIMEType):
3297         * platform/qt/TemporaryLinkStubs.cpp:
3298         * platform/win/SharedTimerWin.cpp:
3299         (WebCore::TimerWindowWndProc):
3300         * platform/wx/TemporaryLinkStubs.cpp:
3301         (PluginInfoStore::createPluginInfoForPluginAtIndex):
3302         (PluginInfoStore::pluginCount):
3303         (WebCore::PluginInfoStore::supportsMIMEType):
3304         (PluginInfoStore::pluginNameForMIMEType):
3305         * plugins/PluginDatabase.h: Copied from WebCore/plugins/win/PluginDatabaseWin.h.
3306         * plugins/PluginInfoStore.cpp: Copied from WebCore/plugins/win/PlugInInfoStoreWin.cpp.
3307         (WebCore::PluginInfoStore::createPluginInfoForPluginAtIndex):
3308         (WebCore::PluginInfoStore::pluginCount):
3309         (WebCore::PluginInfoStore::pluginNameForMIMEType):
3310         (WebCore::PluginInfoStore::supportsMIMEType):
3311         (WebCore::refreshPlugins):
3312         * plugins/PluginInfoStore.h: Copied from WebCore/platform/PlugInInfoStore.h.
3313         * plugins/PluginPackage.h: Copied from WebCore/plugins/win/PluginPackageWin.h.
3314         (WebCore::PluginPackageHash::hash):
3315         (WebCore::PluginPackageHash::equal):
3316         (WTF::):
3317         * plugins/PluginView.h: Copied from WebCore/plugins/win/PluginViewWin.h.
3318         (WebCore::PluginView::plugin):
3319         * plugins/npapi.cpp: Copied from WebCore/plugins/win/npapi.cpp.
3320         (pluginViewForInstance):
3321         (NPN_UserAgent):
3322         * plugins/win/PlugInInfoStoreWin.cpp: Removed.
3323         * plugins/win/PluginDatabaseWin.cpp:
3324         (WebCore::PluginDatabase::installedPlugins):
3325         (WebCore::PluginDatabase::addExtraPluginPath):
3326         (WebCore::PluginDatabase::refresh):
3327         (WebCore::PluginDatabase::plugins):
3328         (WebCore::addPluginsFromRegistry):
3329         (WebCore::PluginDatabase::getPluginsInPaths):
3330         (WebCore::PluginDatabase::defaultPluginPaths):
3331         (WebCore::PluginDatabase::isMIMETypeRegistered):
3332         (WebCore::PluginDatabase::pluginForMIMEType):
3333         (WebCore::PluginDatabase::MIMETypeForExtension):
3334         (WebCore::PluginDatabase::findPlugin):
3335         (WebCore::PluginDatabase::createPluginView):
3336         * plugins/win/PluginDatabaseWin.h: Removed.
3337         * plugins/win/PluginPackageWin.cpp:
3338         (WebCore::PluginPackage::~PluginPackage):
3339         (WebCore::PluginPackage::freeLibrarySoon):
3340         (WebCore::PluginPackage::freeLibraryTimerFired):
3341         (WebCore::PluginPackage::PluginPackage):
3342         (WebCore::PluginPackage::compareFileVersion):
3343         (WebCore::PluginPackage::storeFileVersion):
3344         (WebCore::PluginPackage::isPluginBlacklisted):
3345         (WebCore::PluginPackage::fetchInfo):
3346         (WebCore::PluginPackage::load):
3347         (WebCore::PluginPackage::unload):
3348         (WebCore::PluginPackage::unloadWithoutShutdown):
3349         (WebCore::PluginPackage::createPackage):
3350         (WebCore::PluginPackage::hash):
3351         (WebCore::PluginPackage::equal):
3352         * plugins/win/PluginPackageWin.h: Removed.
3353         * plugins/win/PluginViewWin.cpp:
3354         (WebCore::PluginRequest::PluginRequest):
3355         (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
3356         (WebCore::registerPluginView):
3357         (WebCore::PluginViewWndProc):
3358         (WebCore::PluginView::popPopupsStateTimerFired):
3359         (WebCore::PluginView::wndProc):
3360         (WebCore::PluginView::updateWindow):
3361         (WebCore::PluginView::windowClipRect):
3362         (WebCore::PluginView::setFrameGeometry):
3363         (WebCore::PluginView::geometryChanged):
3364         (WebCore::PluginView::setFocus):
3365         (WebCore::PluginView::show):
3366         (WebCore::PluginView::hide):
3367         (WebCore::PluginView::paintMissingPluginIcon):
3368         (WebCore::PluginView::dispatchNPEvent):
3369         (WebCore::PluginView::paint):
3370         (WebCore::PluginView::handleKeyboardEvent):
3371         (WebCore::PluginView::handleMouseEvent):
3372         (WebCore::PluginView::handleEvent):
3373         (WebCore::PluginView::setParent):
3374         (WebCore::PluginView::attachToWindow):
3375         (WebCore::PluginView::detachFromWindow):
3376         (WebCore::PluginView::setNPWindowRect):
3377         (WebCore::PluginView::start):
3378         (WebCore::PluginView::stop):
3379         (WebCore::PluginView::setCurrentPluginView):
3380         (WebCore::PluginView::currentPluginView):
3381         (WebCore::PluginView::performRequest):
3382         (WebCore::PluginView::requestTimerFired):
3383         (WebCore::PluginView::scheduleRequest):
3384         (WebCore::PluginView::load):
3385         (WebCore::PluginView::getURLNotify):
3386         (WebCore::PluginView::getURL):
3387         (WebCore::PluginView::handlePost):
3388         (WebCore::PluginView::postURLNotify):
3389         (WebCore::PluginView::postURL):
3390         (WebCore::PluginView::newStream):
3391         (WebCore::PluginView::write):
3392         (WebCore::PluginView::destroyStream):
3393         (WebCore::PluginView::userAgent):
3394         (WebCore::PluginView::status):
3395         (WebCore::PluginView::getValue):
3396         (WebCore::PluginView::setValue):
3397         (WebCore::PluginView::invalidateTimerFired):
3398         (WebCore::PluginView::invalidateRect):
3399         (WebCore::PluginView::invalidateRegion):
3400         (WebCore::PluginView::forceRedraw):
3401         (WebCore::PluginView::pushPopupsEnabledState):
3402         (WebCore::PluginView::popPopupsEnabledState):
3403         (WebCore::PluginView::arePopupsAllowed):
3404         (WebCore::PluginView::bindingInstance):
3405         (WebCore::PluginView::~PluginView):
3406         (WebCore::PluginView::disconnectStream):
3407         (WebCore::PluginView::determineQuirks):
3408         (WebCore::PluginView::setParameters):
3409         (WebCore::PluginView::PluginView):
3410         (WebCore::PluginView::init):
3411         (WebCore::PluginView::didReceiveResponse):
3412         (WebCore::PluginView::didReceiveData):
3413         (WebCore::PluginView::didFinishLoading):
3414         (WebCore::PluginView::didFail):
3415         (WebCore::PluginView::setCallingPlugin):
3416         (WebCore::PluginView::isCallingPlugin):
3417         * plugins/win/PluginViewWin.h: Removed.
3418         * plugins/win/npapi.cpp: Removed.
3419
3420 2008-02-05  Alexey Proskuryakov  <ap@webkit.org>
3421
3422         Reviewed by Darin.
3423
3424         http://bugs.webkit.org/show_bug.cgi?id=17158
3425         Setting innerHTML in a detached XHTML element doesn't use the right namespace
3426
3427         Test: fast/dom/innerHTML-detached-element.xhtml
3428
3429         * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::XMLTokenizer): Take parent element namespace
3430         into account.
3431
3432 2008-02-05  Antti Koivisto  <antti@apple.com>
3433
3434         Reviewed by Geoff.
3435         
3436         Fix <rdar://problem/5698200>
3437         eBay photo uploading hangs and causes slow script warning to pop up
3438         
3439         In a case like this
3440         
3441             var f = window.parent.parentFunction;
3442             document.domain = document.domain; // this makes window.parent inaccessible
3443             f();
3444         
3445         Firefox allows parentFunction to access parents properties. Match this behavior.
3446         
3447         In a domain security check against the dynamic global object fails for the specific reason that one of 
3448         the frames has written to the document.domain property and another has not (but they match otherwise), 
3449         then recheck against the lexical global object.
3450
3451         Test: http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html
3452               http/tests/security/cross-frame-access-callback-explicit-domain-DENY.html
3453
3454         * bindings/js/kjs_window.cpp:
3455         (KJS::Window::allowsAccessFrom):
3456         (KJS::Window::printErrorMessage):
3457         * bindings/js/kjs_window.h:
3458         * loader/FrameLoader.cpp:
3459         (WebCore::FrameLoader::shouldAllowNavigation):
3460         * platform/SecurityOrigin.cpp:
3461         (WebCore::SecurityOrigin::canAccess):
3462         * platform/SecurityOrigin.h:
3463         (WebCore::SecurityOrigin::):
3464
3465 2008-02-05  Adam Roben  <aroben@apple.com>
3466
3467         Remove an unused member from Document
3468
3469         Reviewed by Mitz.
3470
3471         * dom/Document.cpp:
3472         (WebCore::Document::recalcStyleSelector): There's no need to take
3473         m_printSheet into account anymore as it's never anything but the null
3474         string.
3475         * dom/Document.h: Removed m_printSheet and methods relating to it.
3476
3477 2008-02-05  Dan Bernstein  <mitz@apple.com>
3478
3479         Reviewed by Darin Adler.
3480
3481         - WebCore part of <rdar://problem/5724303> Should implement writing direction shortcuts
3482
3483         * WebCore.base.exp: Added Editor::setBaseWritingDirection() and
3484         Frame::baseWritingDirectionForSelectionStart().
3485         * page/mac/WebCoreFrameBridge.h: Removed
3486         -baseWritingDirectionForSelectionStart.
3487         * page/mac/WebCoreFrameBridge.mm: Ditto.
3488
3489 2008-02-05  Mark Rowe  <mrowe@apple.com>
3490
3491         Reviewed by Oliver Hunt.
3492
3493         Update versioning to support the mysterious future.
3494
3495         * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
3496
3497 2008-02-05  Mark Rowe  <mrowe@apple.com>
3498
3499         Fix the wxWidget Mac build by avoiding using ICU functions that were added after ICU 3.2.
3500
3501         * editing/SmartReplaceICU.cpp:
3502         (WebCore::addAllCodePoints): Implement a replacement for uset_addAllCodePoints.
3503         (WebCore::getSmartSet): Use addAllCodePoints instead of uset_addAllCodePoints.
3504
3505 2008-02-05  Mark Rowe  <mrowe@apple.com>
3506
3507         Rubber-stamped by Oliver Hunt.
3508
3509         30,000!
3510
3511         * ChangeLog: Point out revision 30,000.
3512
3513 2008-02-04  Mark Rowe  <mrowe@apple.com>
3514
3515         Unreviewed Gtk build fix.
3516
3517         wchar_t is only convertible to UChar on Windows.  Use WebCore's String class
3518         to get the UChars out of a C string in a portable fashion.
3519
3520         * editing/SmartReplaceICU.cpp:
3521         (WebCore::getSmartSet):
3522
3523 2008-02-04  Tony Chang  <idealisms@gmail.com>
3524
3525         Reviewed by Darin Adler.
3526
3527         Port the CoreFoundation version of WebCore::isCharacterSmartReplaceExempt
3528         for other platforms by using ICU directly.
3529
3530         * GNUmakefile.am: Add SmartReplaceICU.cpp.
3531         * WebCore.pro: Ditto.
3532         * WebCoreSources.bkl: Ditto.
3533         * editing/SmartReplace.cpp: Don't use this empty implementation when ICU is available.
3534         * editing/SmartReplaceICU.cpp:
3535         (getSmartSet):
3536         (WebCore::isCharacterSmartReplaceExempt):
3537
3538 2008-02-04  Robert Sesek  <rsesek@bluestatic.org>
3539
3540         Reviewed by Darin Adler.
3541
3542         Fix http://bugs.webkit.org/show_bug.cgi?id=17042
3543         forms without action attributes submit to the <base> href instead of the originating page
3544
3545         Test: fast/forms/missing-action.html
3546
3547         * html/HTMLFormElement.cpp:
3548         (WebCore::HTMLFormElement::submit): Submit to origin if there is no action
3549
3550 2008-02-04  Mark Rowe  <mrowe@apple.com>
3551
3552         Reviewed by Tim Hatcher.
3553