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