3d4d4c8e7fe98b370d00c2dbfe672f8f64be7b38
[WebKit-https.git] / WebCore / ChangeLog
1 2008-03-06  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Jon.
4
5         Templatize the JNI call code to reduce the amount of code that has
6         to be duplicated.
7
8         * bridge/jni/jni_class.cpp:
9         (JavaClass::JavaClass):
10         * bridge/jni/jni_instance.cpp:
11         (JavaInstance::stringValue):
12         (JavaInstance::numberValue):
13         (JavaInstance::booleanValue):
14         (JavaInstance::invokeMethod):
15         * bridge/jni/jni_jsobject.cpp:
16         (JavaJSObject::convertJObjectToValue):
17         * bridge/jni/jni_runtime.cpp:
18         (JavaField::JavaField):
19         (JavaMethod::JavaMethod):
20         * bridge/jni/jni_utility.cpp:
21         * bridge/jni/jni_utility.h:
22         (KJS::Bindings::):
23         (KJS::Bindings::callJNIMethodIDA):
24         (KJS::Bindings::callJNIMethodV):
25         (KJS::Bindings::callJNIMethod):
26         (KJS::Bindings::callJNIStaticMethod):
27
28 2008-03-06  Darin Adler  <darin@apple.com>
29
30         Reviewed by Mitz.
31
32         - fix regression test failures from the visited-link change
33
34         * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
35         * page/PageGroup.cpp:
36         (WebCore::PageGroup::addVisitedLink): Do nothing and return early
37         if shouldTrackVisitedLinks is false.
38         (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
39         so the next time a link is queried this will be populated from history.
40         (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
41         * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
42         for now, but it would be better if it was per-page-group instead.
43
44 2008-03-06  Adele Peterson  <adele@apple.com>
45
46         Reviewed by Darin.
47
48         Fixes for for <rdar://problem/5785892> Implement activeElement attribute for HTMLDocument (HTML5)
49         and <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
50
51         Tests: fast/dom/HTMLDocument/activeElement.html
52                fast/dom/HTMLDocument/hasFocus.html
53
54         * html/HTMLDocument.cpp:
55         (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
56         (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).
57         * html/HTMLDocument.h: Added methods for activeElement and hasFocus.
58         * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus.
59
60 2008-03-06  Dan Bernstein  <mitz@apple.com>
61
62         Reviewed by Darin Adler.
63
64         - fix <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)
65
66         Test: fast/text/soft-hyphen-3.html
67
68         * rendering/bidi.cpp:
69         (WebCore::checkMidpoints):
70         (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
71         midpoint after a hyphen always be a valid iterator, not allowing an
72         offset past the end of a text node. Changed the check for consecutive
73         soft hyphens to account for that.
74
75 2008-03-06  Darin Adler  <darin@apple.com>
76
77         - try to fix Wx build
78
79         * WebCoreSources.bkl: Added PageGroup.cpp.
80
81 2008-03-06  Darin Adler  <darin@apple.com>
82
83         - fix some builds
84
85         * GNUmakefile.am: Added PageGroup.cpp.
86         * WebCore.base.exp: Removed WebCoreHistory.
87         * WebCore.pro: Added PageGroup.cpp.
88
89 2008-03-06  Alexey Proskuryakov  <ap@webkit.org>
90
91         Reviewed by Darin.
92
93         <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore
94         
95         * ForwardingHeaders/wtf/unicode/Collator.h: Added.
96         * xml/XSLTUnicodeSort.cpp:
97         (WebCore::xsltUnicodeSortFunction):
98         * xml/XSLTUnicodeSort.h:
99
100 2008-03-06  Darin Adler  <darin@apple.com>
101
102         Reviewed by Mitz.
103
104         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
105           REGRESSION: iframes are added to Safari's History menu
106           by separating the visited link machinery from global history
107
108         This should also make page loading faster due to more efficient visited link coloring.
109
110         * WebCore.base.exp: Updated.
111         * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp.
112         * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m.
113
114         * css/CSSStyleSelector.cpp: Updated includes.
115         (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
116         currentEncodedURL.
117         (WebCore::checkPseudoState): Moved most of the code inside a new
118         PageGroup::isLinkVisited function.
119         (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
120         references and only getting colors when needed.
121         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
122         * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL.
123
124         * dom/Document.cpp:
125         (WebCore::Document::attach): Removed call to setEncodedURL.
126         (WebCore::Document::setURL): Ditto.
127         (WebCore::Document::recalcStyleSelector): Ditto.
128
129         * loader/FrameLoader.cpp:
130         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
131         early exit idiom to be a little more readable.
132         (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
133         better efficiency.
134         (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
135         readable.
136         (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
137         in here and got rid of the helper function updateGlobalHistory, restoring the
138         logic before r30549. Also added a call to the new addVisitedLink function.
139         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
140         addVisitedLink here.
141         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
142         (WebCore::FrameLoader::updateHistoryForReload): Removed call to
143         updateGlobalHistory; we can just go without updating global history or
144         visited links here, at least for now, since it's not clear that a reload
145         is a "history event".
146         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
147         history code back where it was, and added the call to addVisitedLink, just
148         as in updateHistoryForStandardLoad above.
149         * loader/FrameLoader.h: Removed updateGlobalHistory function.
150
151         * page/Chrome.cpp:
152         (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
153         don't have to implement this for every port all at once.
154         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
155         new PageGroup class.
156         * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
157         visited links set from the global history at application startup time.
158
159         * page/FrameTree.cpp:
160         (WebCore::FrameTree::find): Updated to use the new PageGroup class.
161
162         * page/GlobalHistory.h: Removed.
163         * page/win/GlobalHistoryWin.cpp: Removed.
164         * page/mac/GlobalHistoryMac.mm: Removed.
165         * platform/mac/WebCoreHistory.h: Removed.
166         * platform/mac/WebCoreHistory.m: Removed.
167         * platform/win/WebCoreHistory.cpp: Removed.
168         * platform/win/WebCoreHistory.h: Removed.
169
170         * page/Page.cpp:
171         (WebCore::Page::Page): Set m_group to 0.
172         (WebCore::Page::setGroupName): Set up m_group. If the page is not in any
173         group, set it to 0 for now to postpone the cost of creating a group.
174         (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
175         group; used when getting a group.
176         (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
177         on all page groups.
178         * page/Page.h: Moved enums inside the WebCore namespace. Removed the
179         frameNamespace function and instead added the group and groupPtr functions.
180
181         * page/PageGroup.cpp: Added. Contains all the visited code from the
182         CSSStyleSelector in the isVisitedLink function, but more efficient because
183         we don't allocate memory for the buffer.
184         * page/PageGroup.h: Added.
185
186         * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains.
187         * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include.
188         * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains.
189
190 2008-03-06  Mark Rowe  <mrowe@apple.com>
191
192         Fix 64-bit Mac build.
193
194         * WebCore.xcodeproj/project.pbxproj:  Exclude _NPN symbols from the exports list as they
195         are compiled out of 64-bit builds.
196
197 2008-03-06  Mark Rowe  <mrowe@apple.com>
198
199         Leopard build fix.
200
201         * WebCore.base.exp:
202
203 2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>
204
205         Fix the wx build after the bindings move.
206
207         * WebCoreSources.bkl:
208         * webcore-base.bkl:
209         * webcore-wx.bkl:
210
211 2008-03-05  Dan Bernstein  <mitz@apple.com>
212
213         Reviewed by Adele Peterson.
214
215         - fix "background-position: inherit"
216
217         * css/CSSStyleSelector.cpp:
218         Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
219         a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
220         macro.
221
222 2008-03-05  Alp Toker  <alp@atoker.com>
223
224         Add a missing make dependency for derived sources to improve
225         autotools build dependency tracking.
226
227         Issue spotted by Ori Bernstein.
228
229         * GNUmakefile.am:
230
231 2008-03-05  Alp Toker  <alp@atoker.com>
232
233         GTK+ build fix for breakage introduced in r30800.
234
235         Track moved bridge sources from JavaScriptCore to WebCore.
236
237         * GNUmakefile.am:
238
239 2008-03-05  Justin Garcia  <justin.garcia@apple.com>
240
241         Reviewed by Darin.
242
243         One part of fix for:
244         <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
245
246         * editing/markup.cpp:
247         (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
248         inline style declarations, not the other way around. 
249
250 2008-03-05  Anders Carlsson  <andersca@apple.com>
251
252         Reviewed by Darin.
253
254         Move JNI specific code from runtime_root over to jni_jsobject, where it is used.
255
256         * bridge/jni/jni_jsobject.cpp:
257         (completedJavaScriptAccess):
258         (initializeJavaScriptAccessLock):
259         (lockJavaScriptAccess):
260         (unlockJavaScriptAccess):
261         (dispatchToJavaScriptThread):
262         (performJavaScriptAccess):
263         (JavaJSObject::initializeJNIThreading):
264         (isJavaScriptThread):
265         (JavaJSObject::invoke):
266         * bridge/jni/jni_jsobject.h:
267         * bridge/runtime_root.cpp:
268         * bridge/runtime_root.h:
269         * page/mac/WebCoreFrameBridge.mm:
270         (-[WebCoreFrameBridge init]):
271
272 2008-03-05  Darin Adler  <darin@apple.com>
273
274         Reviewed by Sam.
275
276         - add functions giving offsets within a KURL, slated to replace the
277           EncodedURL object in CSSStyleSelector (in a future "visited link" change)
278         - changed all KURL data members names to use the traditional m_ prefix
279         - initialize all members to 0 in invalid KURLs rather than having all
280           functions check m_isValid
281
282         * platform/KURL.cpp:
283         (WebCore::KURL::invalidate): Added. Initializes all the fields except for
284         m_string to the "invalid" values. For use in the empty constructor and
285         in the init and parse functions.
286         (WebCore::KURL::init): Tweaked comments. Changed all code paths that return
287         early to use the invalidate() function. Updated for member variable name
288         changes.
289         (WebCore::KURL::hasPath): Updated for member variable name changes.
290         Remove now-unneeded check of m_isValid.
291         (WebCore::KURL::lastPathComponent): Ditto.
292         (WebCore::KURL::protocol): Ditto.
293         (WebCore::KURL::host): Ditto.
294         (WebCore::KURL::port): Ditto.
295         (WebCore::KURL::pass): Ditto.
296         (WebCore::KURL::user): Ditto.
297         (WebCore::KURL::ref): Ditto.
298         (WebCore::KURL::hasRef): Ditto.
299         (WebCore::KURL::protocolIs): Ditto.
300         (WebCore::KURL::query): Ditto.
301         (WebCore::KURL::path): Ditto.
302         (WebCore::KURL::setProtocol): Ditto.
303         (WebCore::KURL::setHost): Ditto.
304         (WebCore::KURL::setPort): Ditto.
305         (WebCore::KURL::setHostAndPort): Ditto.
306         (WebCore::KURL::setUser): Ditto.
307         (WebCore::KURL::setPass): Ditto.
308         (WebCore::KURL::setRef): Ditto.
309         (WebCore::KURL::setQuery): Ditto.
310         (WebCore::KURL::setPath): Ditto.
311         (WebCore::KURL::prettyURL): Ditto.
312         (WebCore::copyPathRemovingDots): Removed braces to match our code style.
313         (WebCore::KURL::parse): Changed all code paths that return early to use
314         the invalidate function. Moved code to set m_isValid to true to the very
315         end of the function. Removed braces to match our code style. Removed an
316         extra copy of the path/query/fragment code (there were two identical copies
317         in the two sides of an if statement). Removed some commented-out code.
318         Reversed an if statment. Added code to set the new m_pathAfterLastSlash
319         field. Updated for member variable name changes.
320         (WebCore::equalIgnoringRef): Updated for member variable name changes.
321         (WebCore::KURL::isHierarchical): Ditto.
322
323         * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty
324         constructor inline and called the new invalidate function. Added new
325         pathStart, pathEnd, and pathAfterLastSlash functions, for use in the
326         new visited link code. Added an invalidate function. Renamed all the
327         data members to use the m_ prefix.
328
329         * WebCore.base.exp: Updated.
330
331 2008-03-05  Anders Carlsson  <andersca@apple.com>
332
333         Reviewed by Sam.
334
335         * WebCore.xcodeproj/project.pbxproj:
336         Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge 
337         this with jni_objc.mm and create jni_jsobject.mm.
338         
339         * bridge/jni/jni_jsobject.cpp:
340         (createRootObject):
341         Move createRootObject here from WebCoreFrameBridge.
342         
343         (JavaJSObject::createNative):
344         Call the newly added createRootObject function.
345         
346         * bridge/runtime_root.cpp:
347         (KJS::Bindings::RootObject::initializeJNIThreading):
348         * bridge/runtime_root.h:
349         setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading.
350
351         * page/mac/FrameMac.mm:
352         (WebCore::Frame::createScriptInstanceForWidget):
353         Just call Frame::createRootObject here.
354         
355         * page/mac/WebCoreFrameBridge.mm:
356         (-[WebCoreFrameBridge init]):
357         Call initializeJNIThreading.
358
359 2008-03-05  Anders Carlsson  <andersca@apple.com>
360
361         Reviewed by Sam.
362
363         Change some static class variables to be regular static variables,
364         making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h]
365
366         * bridge/runtime_root.cpp:
367         (KJS::Bindings::completedJavaScriptAccess):
368         (KJS::Bindings::RootObject::dispatchToJavaScriptThread):
369         (KJS::Bindings::performJavaScriptAccess):
370         (KJS::Bindings::RootObject::createRootObject):
371         (KJS::Bindings::RootObject::runLoop):
372         (KJS::Bindings::RootObject::setCreateRootObject):
373         * bridge/runtime_root.h:
374
375 2008-03-05  Brent Fulgham <bfulgham@gmail.com>
376
377         Reviewed by Adam Roben.
378
379         Modify source files to use the USE(SAFARI_THEME) macro, rather than
380         USE_SAFARI_THEME.  (http://bugs.webkit.org/show_bug.cgi?id=17683)
381
382         * WebCore/platform/win/PlatformScrollBarSafari.cpp
383         * WebCore/rendering/RenderThemeSafari.cpp
384         * WebCore/rendering/RenderThemeSafari.h
385         * config.h: Move definition of WTF_USE_SAFARI_THEME here 
386
387 2008-03-05  Brady Eidson  <beidson@apple.com>
388
389         Reviewed by Alexey and Mark Rowe
390
391         Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
392
393         DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
394         removing particular items for Databases that were shutting down.
395
396         This filtering operation is not atomic, and therefore causes a race condition with the
397         database thread waking up and reading from the message queue.  
398
399         The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
400         seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
401         assertion with a crash in a release build is what revealed this bug.
402
403         The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
404         place, another crash popped up in the layout tests that was related to dereferencing a 
405         deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
406         when it needed to be a ref pointer.
407
408         * storage/SQLTransaction.cpp:
409         (WebCore::SQLTransaction::runCurrentStatement):
410         * storage/SQLTransaction.h: Change m_database to be a RefPtr
411         (WebCore::SQLTransaction::database):
412
413 2008-03-05  Mark Rowe  <mrowe@apple.com>
414
415         Build fix.
416
417         * WebCore.base.exp:  Remove symbol that no longer exists from the exports file.
418
419 2008-03-05  Adam Roben  <aroben@apple.com>
420
421         Export a header/symbol for WebKit
422
423         Reviewed by Kevin M.
424
425         * WebCore.base.exp:
426         * WebCore.xcodeproj/project.pbxproj:
427
428 2008-03-05  Adam Roben  <aroben@apple.com>
429
430         Move WebCoreScriptDebugger up to WebKit
431
432         Reviewed by Darin.
433
434         * WebCore.base.exp: Exported some functions used by
435         WebCoreScriptDebugger, and sorted the list.
436         * WebCore.xcodeproj/project.pbxproj: Removed
437         WebCoreScriptDebugger.{h,mm} from the project and marked
438         a few headers private so that WebKit can use them.
439         * page/mac/WebCoreScriptDebugger.h: Removed.
440         * page/mac/WebCoreScriptDebugger.mm: Removed.
441
442 2008-03-05  Anders Carlsson  <andersca@apple.com>
443
444         Build bridge/. Copy some headers over to WebKit as part of the post-build step.
445         
446         * WebCore.vcproj/WebCore.vcproj:
447
448 2008-03-05  Anders Carlsson  <andersca@apple.com>
449
450         Reviewed by Geoff.
451
452         * WebCore.base.exp:
453         Add the NPN and KJS methods.
454         
455         * WebCore.xcodeproj/project.pbxproj:
456         Bring in bridge/
457
458         * config.h:
459         Add HAVE_JNI define.
460         
461         * bindings/js/kjs_html.cpp:
462         * bindings/objc/DOMInternal.mm:
463         * bindings/objc/DOMUtility.mm:
464         * bindings/objc/WebScriptObject.mm:
465         * html/HTMLAppletElement.cpp:
466         * html/HTMLEmbedElement.cpp:
467         * html/HTMLObjectElement.cpp:
468         * html/HTMLPlugInElement.cpp:
469         * page/Frame.cpp:
470         * page/mac/FrameMac.mm:
471         * page/mac/WebCoreFrameBridge.mm:
472         * page/mac/WebCoreScriptDebugger.mm:
473         * plugins/win/PluginViewWin.cpp:
474         Include file changes.
475
476 2008-03-04  Anders Carlsson  <andersca@apple.com>
477
478         Reviewed by Sam.
479
480         Rewrite NPRuntime string conversion routines to use WebCore::String
481         
482         * bridge/NP_jsobject.cpp:
483         (_NPN_Evaluate):
484         * bridge/c/c_utility.cpp:
485         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
486         (KJS::Bindings::convertNPVariantToValue):
487         (KJS::Bindings::convertNPStringToUTF16):
488         (KJS::Bindings::identifierFromNPIdentifier):
489         * bridge/c/c_utility.h:
490
491 2008-03-05  Oliver Hunt  <oliver@apple.com>
492
493         Reviewed by Alexey P.
494
495         Small performance improvement to putImageData (3-5% on assignment in my tests)
496
497         * html/CanvasPixelArray.h:
498         (WebCore::CanvasPixelArray::set):
499
500 2008-03-04  Sam Weinig  <sam@webkit.org>
501
502         Reviewed by Adele.
503
504         * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
505
506 2008-03-04  Maciej Stachowiak  <mjs@apple.com>
507
508         Reviewed by Sam and Oliver.
509
510         - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
511         - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
512
513         * bindings/js/JSNodeCustom.cpp:
514         (WebCore::JSNode::mark): When marking a node that's in-document,
515         mark the owner document if it hasn't been already. This means holding on
516         to a single node from an unreferenced document now keeps the whole document alive.
517         
518         We are now at 90/100 on Acid3.
519
520 2008-03-04  Sam Weinig  <sam@webkit.org>
521
522         Qt build fix.
523
524         * page/qt/FrameQt.cpp:
525
526 2008-03-04  Sam Weinig  <sam@webkit.org>
527
528         Reviewed by Mark Rowe.
529
530         Rename kjs_window to JSDOMWindowBase.
531
532         - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
533           JSDOMWindow.h
534
535         * ChangeLog:
536         * DerivedSources.make:
537         * GNUmakefile.am:
538         * WebCore.pro:
539         * WebCore.vcproj/WebCore.vcproj:
540         * WebCore.xcodeproj/project.pbxproj:
541         * WebCoreSources.bkl:
542         * bindings/js/JSCustomVoidCallback.cpp:
543         * bindings/js/JSCustomXPathNSResolver.cpp:
544         * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
545         * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
546         * bindings/js/JSDOMWindowCustom.cpp:
547         * bindings/js/JSDatabaseCustom.cpp:
548         * bindings/js/JSEventTargetBase.cpp:
549         * bindings/js/JSEventTargetBase.h:
550         * bindings/js/JSEventTargetNode.cpp:
551         * bindings/js/JSHTMLDocumentCustom.cpp:
552         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
553         * bindings/js/JSHistoryCustom.cpp:
554         * bindings/js/JSLocation.cpp:
555         * bindings/js/JSSQLTransactionCustom.cpp:
556         * bindings/js/JSXMLHttpRequest.cpp:
557         * bindings/js/ScheduledAction.cpp:
558         * bindings/js/kjs_binding.cpp:
559         * bindings/js/kjs_events.cpp:
560         * bindings/js/kjs_navigator.cpp:
561         * bindings/js/kjs_proxy.cpp:
562         * bindings/js/kjs_window.cpp: Removed.
563         * bindings/js/kjs_window.h: Removed.
564         * bindings/scripts/CodeGeneratorJS.pm:
565         * history/CachedPage.cpp:
566         * loader/FrameLoader.cpp:
567         * page/Chrome.cpp:
568         * page/InspectorController.cpp:
569         * page/mac/FrameMac.mm:
570         * page/mac/WebCoreFrameBridge.mm:
571         * page/qt/FrameQt.cpp:
572         * page/win/FrameWin.cpp:
573         * plugins/win/PluginViewWin.cpp:
574
575 2008-03-04  Mark Rowe  <mrowe@apple.com>
576
577         Speculative Qt build fix.
578
579         * platform/qt/PasteboardQt.cpp:
580
581 2008-03-04  Anders Carlsson  <andersca@apple.com>
582
583         Reviewed by Sam.
584
585         Update include paths. This code is not used yet.
586
587         * bridge/NP_jsobject.cpp:
588         * bridge/c/c_class.cpp:
589         * bridge/c/c_instance.cpp:
590         * bridge/c/c_utility.cpp:
591         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
592         #if 0 this out for now. 
593         
594         * bridge/jni/jni_class.cpp:
595         * bridge/jni/jni_jsobject.cpp:
596         * bridge/jni/jni_objc.mm:
597         * bridge/jni/jni_runtime.cpp:
598         * bridge/jni/jni_utility.cpp:
599         * bridge/jni/jni_utility.h:
600         * bridge/npruntime.cpp:
601         * bridge/objc/WebScriptObject.h:
602         * bridge/objc/objc_class.h:
603         * bridge/objc/objc_instance.h:
604         * bridge/objc/objc_runtime.h:
605         * bridge/objc/objc_utility.h:
606         * bridge/objc/objc_utility.mm:
607         * bridge/runtime.cpp:
608         * bridge/runtime.h:
609         * bridge/runtime_array.cpp:
610         * bridge/runtime_array.h:
611         * bridge/runtime_method.cpp:
612         * bridge/runtime_method.h:
613         * bridge/runtime_object.cpp:
614         * bridge/runtime_object.h:
615         * bridge/runtime_root.cpp:
616         * bridge/runtime_root.h:
617
618 2008-03-04  Dan Bernstein  <mitz@apple.com>
619
620         Reviewed by Darin Adler.
621
622         - fix http://bugs.webkit.org/show_bug.cgi?id=17676
623           <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
624
625         Test: fast/encoding/url-host-name-non-ascii.html
626
627         * platform/KURL.cpp:
628         (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
629         case to avoid copying the host name twice and corrected the error
630         checking after calling uidna_IDNToASCII().
631
632 2008-03-04  Sam Weinig  <sam@webkit.org>
633
634         Reviewed by Dan Bernstein.
635
636         Use JSDOMWindow exclusively instead of JSDOMWindowBase.
637
638         * bindings/js/ScheduledAction.cpp:
639         (WebCore::ScheduledAction::execute):
640         * bindings/js/ScheduledAction.h:
641         * bindings/js/kjs_window.cpp:
642         (WebCore::JSDOMWindowBase::timerFired):
643
644 2008-03-04  Timothy Hatcher  <timothy@apple.com>
645
646         Reviewed by Darin Adler.
647
648         <rdar://problem/5720160> Browser windows "do nothing" while modal
649         dialog or menu is up due to run loop modes (or while scrolling)
650
651         Adds a new SchedulePair object that holds a runloop and the mode to use.
652         A HashSet of SchedulePairs is tracked by Page so it can be used for resource
653         loading and, in the future, maybe SharedTimerMac.
654
655         * WebCore.base.exp: Add new exports for WebKit.
656         * WebCore.xcodeproj/project.pbxproj: Add new files.
657         * loader/mac/DocumentLoaderMac.cpp: Added.
658         (WebCore::scheduleAll): Call schedule all the ResourceLoader handles.
659         (WebCore::unscheduleAll): Call unschedule all the ResourceLoader handles.
660         (WebCore::DocumentLoader::schedule): Schedule all the ResourceLoaders owned by the DocumentLoader.
661         (WebCore::DocumentLoader::unschedule): Unschedule all the ResourceLoaders owned by the DocumentLoader.
662         * loader/DocumentLoader.h:
663         * page/Page.h:
664         (WebCore::Page::scheduledRunLoopPairs): Return m_scheduledRunLoopPairs.
665         * page/mac/PageMac.cpp:
666         (WebCore::Page::addSchedulePair): Add a SchedulePair to m_scheduledRunLoopPairs.
667         (WebCore::Page::removeSchedulePair): Removes a SchedulePair from m_scheduledRunLoopPairs.
668         * platform/cf/SchedulePair.cpp: Added.
669         * platform/cf/SchedulePair.h: Added.
670         * platform/mac/SchedulePairMac.mm: Added.
671         * platform/network/ResourceHandle.h:
672         * platform/network/mac/FormDataStreamMac.mm:
673         (WebCore::advanceCurrentStream): Use the new SchedulePair.
674         (WebCore::formCreate): Ditto.
675         (WebCore::formFinalize): Ditto.
676         (WebCore::formSchedule): Ditto.
677         (WebCore::formUnschedule): Ditto.
678         * platform/network/mac/ResourceHandleMac.mm:
679         (WebCore::ResourceHandle::start): Schedule the connection with all the SchedulePairs
680         that Page holds. If Page has no SchedulePairs, schedule with the current runloop, and
681         pick the mode based on ResourceHandle::loadsDuringCommonRunLoopModes.
682         (WebCore::ResourceHandle::schedule):
683         (WebCore::ResourceHandle::unschedule):
684
685 2008-03-04  Sam Weinig  <sam@webkit.org>
686
687         Reviewed by Darin Adler.
688
689         Rename kjs_css to JSRGBColor.
690
691         * DerivedSources.make:
692         * GNUmakefile.am:
693         * WebCore.pro:
694         * WebCore.vcproj/WebCore.vcproj:
695         * WebCore.xcodeproj/project.pbxproj:
696         * WebCoreSources.bkl:
697         * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp.
698         * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h.
699         * bindings/js/kjs_css.cpp: Removed.
700         * bindings/js/kjs_css.h: Removed.
701         * bindings/js/kjs_window.cpp:
702         * bindings/objc/DOMUtility.mm:
703         * bindings/scripts/CodeGeneratorJS.pm:
704
705 2008-03-04  Anders Carlsson  <andersca@apple.com>
706
707         Fix 64-bit build.
708         
709         * html/HTMLPlugInElement.cpp:
710
711 2008-03-04  Nikolas Zimmermann  <zimmermann@kde.org>
712
713         Reviewed by Eric & David.
714
715         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078
716
717         Fix getSubStringLength() handling, verified by Acid3 test 77.
718         Brings up Acid3 score to 88/100.
719
720         Added test: svg/custom/acid3-test-77.html
721                     svg/custom/getSubStringLength.html
722
723         * svg/SVGTextContentElement.cpp:
724         (WebCore::cummulatedCharacterRangeLength): Simplify some code.
725         (WebCore::SVGTextContentElement::getSubStringLength):
726
727 2008-03-04  Anders Carlsson  <andersca@apple.com>
728
729         Mac build fix. Neither me, Sam nor Adam know why we need to do this though :(
730
731         * bindings/js/kjs_proxy.cpp:
732         (WebCore::KJSProxy::attachDebugger):
733         * page/Page.cpp:
734         (WebCore::Page::setDebuggerForAllPages):
735         (WebCore::Page::setDebugger):
736
737 2008-03-04  Adam Roben  <aroben@apple.com>
738
739         Add ExecState.h to ForwardingHeaders
740
741         Reviewed by Anders.
742
743         * ForwardingHeaders/kjs/ExecState.h: Added.
744         * page/Page.cpp: Touch this to force WebCore to build and the headers
745         to be copied.
746
747 2008-03-04  Adam Roben  <aroben@apple.com>
748
749         Make it possible to set a KJS::Debugger on all Frames in a Page and
750         all Pages in the process
751
752         Reviewed by Kevin M.
753
754         * ForwardingHeaders/kjs/debugger.h: Added.
755         * bindings/js/kjs_proxy.cpp:
756         (WebCore::KJSProxy::initScript): Attach the Page's debugger if there
757         is one.
758         (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or
759         detach any existing debugger if none was passed in.
760         * bindings/js/kjs_proxy.h:
761         * page/Page.cpp:
762         (WebCore::Page::Page): Initialize new member.
763         (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page
764         in the process.
765         (WebCore::Page::setDebugger): Store the debugger and pass it off to
766         all our Frames.
767         * page/Page.h:
768
769 2008-03-04  Sam Weinig  <sam@webkit.org>
770
771         Reviewed by Darin Adler.
772
773         Add ClassInfo to custom constructors so that they toString properly
774
775         - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
776           and XSLTProcessorConstructorImp and prefix all the classes with JS. 
777
778         * bindings/js/JSAudioConstructor.cpp:
779         (WebCore::): Added ClassInfo definition.
780         (WebCore::JSAudioConstructor::JSAudioConstructor):
781         (WebCore::JSAudioConstructor::construct): Cleanup.
782         * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
783         (WebCore::JSAudioConstructor::classInfo): Added.
784
785         * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
786         to JSHTMLInputElementBasePrototype as seen if toString'ed.
787         (WebCore::):
788
789         * bindings/js/JSHTMLOptionElementConstructor.cpp:
790         (WebCore::): Added ClassInfo definition.
791         * bindings/js/JSHTMLOptionElementConstructor.h:
792         (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
793
794         * bindings/js/JSImageConstructor.cpp:
795         (WebCore::): Added ClassInfo definition.
796         (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
797         * bindings/js/JSImageConstructor.h:
798         (WebCore::JSImageConstructor::classInfo): Added.
799
800         * bindings/js/JSXMLHttpRequest.cpp:
801         (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
802         as seen if toString'ed.
803         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
804         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
805         (WebCore::JSXMLHttpRequestConstructor::construct):
806         * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
807         JSXMLHttpRequestConstructor and doc to m_document and 
808         (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
809
810         * bindings/js/JSXSLTProcessor.cpp:
811         (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
812         XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
813         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
814         (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
815         (WebCore::JSXSLTProcessorConstructor::construct):
816         * bindings/js/JSXSLTProcessor.h:
817         (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
818
819         * bindings/js/kjs_window.cpp:
820         (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
821
822 2008-03-04  Dan Bernstein  <mitz@apple.com>
823
824         Reviewed by Oliver Hunt and Geoffrey Garen.
825
826         - fix http://bugs.webkit.org/show_bug.cgi?id=17667
827           <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
828
829         * loader/loader.cpp:
830         (WebCore::Loader::didFinishLoading): Changed to call
831         setLoadInProgress(false) even for 4xx errors, because that triggers
832         load completion check.
833
834 2008-03-04  Adele Peterson  <adele@apple.com>
835
836         Reviewed by Beth.
837
838         Fix for <rdar://problem/5779718> focus() does not work for anchor elements with no content
839
840         If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it
841         from being keyboard focusable (using the tab key).
842
843         * html/HTMLAnchorElement.cpp:
844         (WebCore::HTMLAnchorElement::isFocusable):
845         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
846
847 2008-03-04  Chris Fleizach  <cfleizach@apple.com>
848
849         Reviewed by Darin Adler.
850
851         - fix <rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
852
853         * page/mac/WebCoreAXObject.mm:
854         (headingLevel):
855         (-[WebCoreAXObject accessibilityIsIgnored]):
856
857 2008-03-04  Sam Weinig  <sam@webkit.org>
858
859         GTK+ build fix.
860
861         * GNUmakefile.am:
862
863 2008-03-04  Sam Weinig  <sam@webkit.org>
864
865         Reviewed by Darin Adler.
866
867         Remame ImageConstructorImp to JSImageConstructor and move it into its
868         own file.
869
870         * GNUmakefile.am:
871         * WebCore.pro:
872         * WebCore.vcproj/WebCore.vcproj:
873         * WebCore.xcodeproj/project.pbxproj:
874         * WebCoreSources.bkl:
875         * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp.
876         (WebCore::JSImageConstructor::JSImageConstructor):
877         (WebCore::JSImageConstructor::construct):
878         * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h.
879         * bindings/js/kjs_html.cpp:
880         (WebCore::getRuntimeObject): Make this function static since it is only used
881         in this file.
882         * bindings/js/kjs_html.h:
883         * bindings/js/kjs_window.cpp:
884         (WebCore::JSDOMWindowBase::getValueProperty):
885
886 2008-03-04  Adam Roben  <aroben@apple.com>
887
888         Fix an uninitialized value warning in CodeGeneratorJS.pm
889
890         * bindings/scripts/CodeGeneratorJS.pm: Remove reference to
891         non-existent $maybeOkParam (this was removed in r30753).
892
893 2008-03-04  Sam Weinig  <sam@webkit.org>
894
895         Reviewed by Darin Adler.
896
897         Remove kjs_dom.{h,cpp}.
898
899         - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
900           to us a null return value as an indication of failure. (This new logic is used
901           for toVoidCallback as well.)
902         - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
903           functions currently live.
904         - Move checkNodeSecurity to kjs_binding, where other frame security functions 
905           currently live.
906         - Remove getNodeConstructor.  It had no implementation.
907
908         * GNUmakefile.am:
909         * WebCore.pro:
910         * WebCore.vcproj/WebCore.vcproj:
911         * WebCore.xcodeproj/project.pbxproj:
912         * WebCoreSources.bkl:
913         * bindings/js/JSAttrCustom.cpp:
914         * bindings/js/JSCustomVoidCallback.cpp:
915         (WebCore::toVoidCallback):
916         * bindings/js/JSCustomVoidCallback.h:
917         * bindings/js/JSDatabaseCustom.cpp:
918         (WebCore::JSDatabase::changeVersion):
919         (WebCore::JSDatabase::transaction):
920         * bindings/js/JSElementCustom.cpp:
921         (WebCore::JSElement::setAttributeNode):
922         (WebCore::JSElement::setAttributeNodeNS):
923         * bindings/js/JSEventTargetBase.cpp:
924         (WebCore::toJS):
925         * bindings/js/JSEventTargetBase.h:
926         * bindings/js/JSHTMLAppletElementCustom.cpp:
927         * bindings/js/JSHTMLElementCustom.cpp:
928         * bindings/js/JSHTMLEmbedElementCustom.cpp:
929         * bindings/js/JSHTMLFormElementCustom.cpp:
930         * bindings/js/JSHTMLFrameElementCustom.cpp:
931         * bindings/js/JSHTMLIFrameElementCustom.cpp:
932         * bindings/js/JSHTMLObjectElementCustom.cpp:
933         * bindings/js/JSNamedNodeMapCustom.cpp:
934         * bindings/js/JSNamedNodesCollection.cpp:
935         * bindings/js/JSNodeFilterCustom.cpp:
936         * bindings/js/JSXSLTProcessor.cpp:
937         * bindings/js/kjs_binding.cpp:
938         (WebCore::checkNodeSecurity):
939         * bindings/js/kjs_binding.h:
940         * bindings/js/kjs_css.cpp:
941         * bindings/js/kjs_dom.cpp: Removed.
942         * bindings/js/kjs_dom.h: Removed.
943         * bindings/js/kjs_events.cpp:
944         * bindings/js/kjs_html.cpp:
945         (WebCore::getRuntimeObject):
946         * bindings/js/kjs_html.h:
947         * bindings/js/kjs_window.cpp:
948         * bindings/scripts/CodeGeneratorJS.pm:
949         * dom/Attr.idl:
950         * html/HTMLPlugInElement.cpp:
951         * page/InspectorController.cpp:
952
953 2008-03-04  Adam Roben  <aroben@apple.com>
954
955         Win/Qt/GTK+/wx build fix after r30740
956
957         * editing/Editor.cpp: Added missing #include.
958         * page/qt/FrameQt.cpp: Removed Frame::dashboardRegionsChanged.
959         * page/win/FrameWin.cpp: Ditto.
960         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
961
962 2008-03-04  Alp Toker  <alp@atoker.com>
963
964         GTK+ build fix for breakage introduced in r30740.
965
966         Remove Frame::dashboardRegionsChanged(). There's now a default
967         implementation at ChromeClient::dashboardRegionsChanged().
968
969         * page/gtk/FrameGtk.cpp:
970
971 2008-03-04  Alp Toker  <alp@atoker.com>
972
973         GTK+ build fix suggested by aroben. Remove an unused Mac-specific
974         included introduced in r30740.
975
976         * page/ChromeClient.h:
977
978 2008-03-04  Dan Bernstein  <mitz@apple.com>
979
980         Reviewed by Sam Weinig.
981
982         - fix <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
983
984         Test: platform/win/fast/text/uniscribe-missing-glyph.html
985
986         Note that default installations of Windows do not have Myanmar fonts.
987         What this patch does is ensure that the Myanmar and other complex
988         scripts are rendered as missing glyphs rather than not rendered at all.
989         The particular page in the bug measures the relative widths of two
990         rendered strings and, if they are rendered as missing glyphs, detects
991         that a Myanmar fonts is not available and substitutes the text with
992         images. By not rendering (and measuring) missing glyphs, WebKit was
993         throwing the page's detection code off.
994
995         * platform/graphics/win/UniscribeController.cpp:
996         (WebCore::UniscribeController::shape): Removed an early return in case
997         shaping resulted in missing glyphs. This is now expected if font
998         fallback failed to produce a font containing glyphs for the character.
999         Also changed two resize()s to shrink()s.
1000
1001 2008-03-04  Darin Adler  <darin@apple.com>
1002
1003         Reviewed by Adam.
1004
1005         - remove WebCoreFrameBridge reapplyStyles method
1006
1007         * WebCore.base.exp: Added exports.
1008         * page/mac/WebCoreFrameBridge.h: Removed WebCoreDeviceType and
1009         reapplyStylesForDeviceType: method.
1010         * page/mac/WebCoreFrameBridge.mm: Ditto.
1011
1012 2008-03-04  Darin Adler  <darin@apple.com>
1013
1014         Reviewed by Adam.
1015
1016         - eliminate WebCoreFrameBridge createFrameViewWithNSView
1017
1018         * WebCore.base.exp: Added some more exports.
1019         * page/mac/WebCoreFrameBridge.h: Deleted createFrameViewWithNSView.
1020         * page/mac/WebCoreFrameBridge.mm: Ditto.
1021
1022 2008-03-04  Darin Adler  <darin@apple.com>
1023
1024         Reviewed by Adam.
1025
1026         - removed WebCoreFrameBridge scrollOverflowInDirection
1027
1028         * WebCore.base.exp: Export function needed by WebKit.
1029         * page/mac/WebCoreFrameBridge.h: Removed WebScrollDirection, WebScrollGranularity,
1030         and scrollOverflowInDirection.
1031         * page/mac/WebCoreFrameBridge.mm: Removed method.
1032
1033 2008-03-04  Darin Adler  <darin@apple.com>
1034
1035         Reviewed by Adam.
1036
1037         - remove WebCoreFrameBridge installInFrame: method
1038
1039         * WebCore.base.exp: Export a few symbols.
1040         * WebCore.xcodeproj/project.pbxproj: Export a few files.
1041         * page/mac/WebCoreFrameBridge.h: Remove installInFrame:.
1042         * page/mac/WebCoreFrameBridge.mm: Ditto.
1043
1044 2008-03-04  Darin Adler  <darin@apple.com>
1045
1046         Reviewed by Adam.
1047
1048         - remove WebCoreFrameBridge window method
1049
1050         * page/mac/EventHandlerMac.mm:
1051         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking): Get the window by calling
1052         window on the NSView instead of using the bridge. The WebKit side wasn't doing anything
1053         special, so a call to -[NSView window] is fine.
1054
1055         * page/mac/WebCoreFrameBridge.h: Removed the window method.
1056
1057 2008-03-04  Darin Adler  <darin@apple.com>
1058
1059         Reviewed by Adam.
1060
1061         - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
1062
1063         * WebCore.base.exp: Updated.
1064         * page/Chrome.cpp:
1065         (WebCore::ChromeClient::dashboardRegionsChanged): Added.
1066         * page/ChromeClient.h: Added virtual function for dashboardRegionsChanged.
1067         * page/Frame.h: Removed dashboardRegionsChanged function.
1068         * page/FrameView.cpp:
1069         (WebCore::FrameView::updateDashboardRegions): Changed to call dashboardRegionsChanged
1070         on ChromeClient and to only call it when the regions actually changed.
1071         * page/mac/FrameMac.mm: Removed dashboardRegionsChanged function.
1072         * page/mac/WebCoreFrameBridge.h: Removed dashboardRegionsChanged: method.
1073
1074 2008-03-04  Darin Adler  <darin@apple.com>
1075
1076         Reviewed by Adam.
1077
1078         - remove WebCoreFrameBridge issuePasteComand method
1079
1080         * editing/Editor.cpp:
1081         (WebCore::Editor::paste): Moved the Mac-specific part of this to EditorMac.
1082         * editing/mac/EditorMac.mm:
1083         (WebCore::Editor::paste): Added. Calls paste: on the document view (normally a
1084         WebHTMLView). We should get rid of this eventually.
1085         * page/Frame.h: Removed issuePasteCommand.
1086         * page/mac/FrameMac.mm: Ditto.
1087         * page/mac/WebCoreFrameBridge.h: Ditto.
1088
1089 2008-03-04  Alexey Proskuryakov  <ap@webkit.org>
1090
1091         Suggested by Darin, rubber-stamped by Mark.
1092
1093         http://bugs.webkit.org/show_bug.cgi?id=17569
1094         REGRESSION (r30571): Buzzword.com doesn't load
1095
1096         Rolling out r30571, as determining what is wrong with it proved tricky.
1097
1098         * loader/FrameLoader.cpp:
1099         (WebCore::FrameLoader::load):
1100         (WebCore::FrameLoader::tokenizerProcessedData):
1101         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1102
1103 2008-03-04  Sam Weinig  <sam@webkit.org>
1104
1105         Build fix.
1106
1107         * bindings/js/kjs_events.cpp:
1108
1109 2008-03-03  Sam Weinig  <sam@webkit.org>
1110
1111         Reviewed by Mark Rowe.
1112
1113         Move JSClipboard into its own file.
1114
1115         * DerivedSources.make:
1116         * GNUmakefile.am:
1117         * WebCore.pro:
1118         * WebCore.vcproj/WebCore.vcproj:
1119         * WebCore.xcodeproj/project.pbxproj:
1120         * WebCoreSources.bkl:
1121         * bindings/js/JSAttrCustom.cpp:
1122         * bindings/js/JSClipboardCustom.cpp: Added.
1123         (WebCore::JSClipboard::types):
1124         (WebCore::JSClipboard::clearData):
1125         (WebCore::JSClipboard::getData):
1126         (WebCore::JSClipboard::setData):
1127         (WebCore::JSClipboard::setDragImage):
1128         * bindings/js/JSElementCustom.cpp:
1129         * bindings/js/JSEventCustom.cpp:
1130         * bindings/js/JSHTMLFrameElementCustom.cpp:
1131         * bindings/js/JSHTMLIFrameElementCustom.cpp:
1132         * bindings/js/kjs_events.cpp:
1133         * bindings/js/kjs_events.h:
1134         * bindings/js/kjs_window.cpp:
1135         * bindings/scripts/CodeGeneratorJS.pm:
1136         * dom/Clipboard.cpp:
1137         (WebCore::Clipboard::setDropEffect):
1138         (WebCore::Clipboard::setEffectAllowed):
1139         * dom/Clipboard.idl: Added.
1140
1141 2008-03-03  Sam Weinig  <sam@webkit.org>
1142
1143         Windows build-fix.
1144
1145         * page/Chrome.cpp:
1146         * plugins/win/PluginViewWin.cpp:
1147
1148 2008-03-03  Sam Weinig  <sam@webkit.org>
1149
1150         Reviewed by Darin Adler.
1151
1152         Cleanup and plumbing in preparation for the great Window split.
1153
1154         - Rename KJS::Window to WebCore::JSDOMWindowBase.
1155         - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace
1156           with the new toJSDOMWindow().
1157         - Remove KJS::Window::retrieveActive() and replace with explicit call to 
1158           exec->dynamicGlobalObject() and toJSDOMWindow().
1159
1160         * bindings/js/JSCustomVoidCallback.cpp:
1161         (WebCore::toVoidCallback):.
1162         * bindings/js/JSCustomXPathNSResolver.cpp:
1163         (WebCore::JSCustomXPathNSResolver::create):
1164         * bindings/js/JSDatabaseCustom.cpp:
1165         (WebCore::JSDatabase::changeVersion):
1166         (WebCore::JSDatabase::transaction):
1167         * bindings/js/JSDocumentCustom.cpp:
1168         (WebCore::JSDocument::location):
1169         (WebCore::toJS):
1170         * bindings/js/JSEventTargetBase.cpp:
1171         (WebCore::jsEventTargetAddEventListener):
1172         (WebCore::jsEventTargetRemoveEventListener):
1173         * bindings/js/JSEventTargetNode.cpp:
1174         (WebCore::JSEventTargetNode::setListener):
1175         * bindings/js/JSHTMLDocumentCustom.cpp:
1176         (WebCore::JSHTMLDocument::nameGetter):
1177         (WebCore::JSHTMLDocument::open):
1178         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1179         (WebCore::JSHTMLFrameSetElement::nameGetter):
1180         * bindings/js/JSLocation.cpp:
1181         (WebCore::JSLocation::put):
1182         (WebCore::jsLocationProtoFuncReplace):
1183         (WebCore::jsLocationProtoFuncReload):
1184         (WebCore::jsLocationProtoFuncAssign):
1185         * bindings/js/JSLocation.h:
1186         * bindings/js/JSSQLTransactionCustom.cpp:
1187         (WebCore::JSSQLTransaction::executeSql):
1188         * bindings/js/JSSVGLazyEventListener.cpp:
1189         (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
1190         (WebCore::JSSVGLazyEventListener::eventParameterName):
1191         * bindings/js/JSSVGLazyEventListener.h:
1192         * bindings/js/JSXMLHttpRequest.cpp:
1193         (WebCore::JSXMLHttpRequest::putValueProperty):
1194         (WebCore::jsXMLHttpRequestPrototypeFunctionOpen):
1195         (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener):
1196         (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
1197         * bindings/js/ScheduledAction.cpp:
1198         (WebCore::ScheduledAction::execute):
1199         * bindings/js/ScheduledAction.h:
1200         * bindings/js/kjs_binding.cpp:
1201         (WebCore::allowsAccessFromFrame):
1202         (WebCore::printErrorMessageForFrame):
1203         * bindings/js/kjs_events.cpp:
1204         (WebCore::JSAbstractEventListener::handleEvent):
1205         (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
1206         (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
1207         (WebCore::JSUnprotectedEventListener::windowObj):
1208         (WebCore::JSEventListener::JSEventListener):
1209         (WebCore::JSEventListener::~JSEventListener):
1210         (WebCore::JSEventListener::windowObj):
1211         (WebCore::JSLazyEventListener::JSLazyEventListener):
1212         (WebCore::JSLazyEventListener::parseCode):
1213         * bindings/js/kjs_events.h:
1214         * bindings/js/kjs_navigator.cpp:
1215         (WebCore::MimeType::getValueProperty):
1216         * bindings/js/kjs_proxy.cpp:
1217         (WebCore::KJSProxy::evaluate):
1218         (WebCore::KJSProxy::createHTMLEventHandler):
1219         (WebCore::KJSProxy::createSVGEventHandler):
1220         * bindings/js/kjs_window.cpp:
1221         (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
1222         (WebCore::DOMWindowTimer::DOMWindowTimer):
1223         (WebCore::DOMWindowTimer::action):
1224         (WebCore::DOMWindowTimer::takeAction):
1225         (WebCore::):
1226         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1227         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
1228         (WebCore::JSDOMWindowBase::location):
1229         (WebCore::JSDOMWindowBase::mark):
1230         (WebCore::allowPopUp):
1231         (WebCore::createWindow):
1232         (WebCore::showModalDialog):
1233         (WebCore::JSDOMWindowBase::getValueProperty):
1234         (WebCore::JSDOMWindowBase::childFrameGetter):
1235         (WebCore::JSDOMWindowBase::indexGetter):
1236         (WebCore::JSDOMWindowBase::namedItemGetter):
1237         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
1238         (WebCore::JSDOMWindowBase::put):
1239         (WebCore::JSDOMWindowBase::allowsAccessFrom):
1240         (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
1241         (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
1242         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
1243         (WebCore::JSDOMWindowBase::printErrorMessage):
1244         (WebCore::JSDOMWindowBase::globalExec):
1245         (WebCore::JSDOMWindowBase::shouldInterruptScript):
1246         (WebCore::JSDOMWindowBase::setListener):
1247         (WebCore::JSDOMWindowBase::getListener):
1248         (WebCore::JSDOMWindowBase::findJSEventListener):
1249         (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
1250         (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
1251         (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
1252         (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
1253         (WebCore::JSDOMWindowBase::clear):
1254         (WebCore::JSDOMWindowBase::setCurrentEvent):
1255         (WebCore::JSDOMWindowBase::currentEvent):
1256         (WebCore::windowProtoFuncAToB):
1257         (WebCore::windowProtoFuncBToA):
1258         (WebCore::windowProtoFuncOpen):
1259         (WebCore::windowProtoFuncSetTimeout):
1260         (WebCore::windowProtoFuncClearTimeout):
1261         (WebCore::windowProtoFuncSetInterval):
1262         (WebCore::windowProtoFuncAddEventListener):
1263         (WebCore::windowProtoFuncRemoveEventListener):
1264         (WebCore::windowProtoFuncShowModalDialog):
1265         (WebCore::windowProtoFuncNotImplemented):
1266         (WebCore::JSDOMWindowBase::setReturnValueSlot):
1267         (WebCore::JSDOMWindowBase::clearAllTimeouts):
1268         (WebCore::JSDOMWindowBase::installTimeout):
1269         (WebCore::JSDOMWindowBase::pauseTimeouts):
1270         (WebCore::JSDOMWindowBase::resumeTimeouts):
1271         (WebCore::JSDOMWindowBase::clearTimeout):
1272         (WebCore::JSDOMWindowBase::timerFired):
1273         (WebCore::JSDOMWindowBase::disconnectFrame):
1274         (WebCore::JSDOMWindowBase::jsEventListeners):
1275         (WebCore::JSDOMWindowBase::jsHTMLEventListeners):
1276         (WebCore::JSDOMWindowBase::jsUnprotectedEventListeners):
1277         (WebCore::JSDOMWindowBase::jsUnprotectedHTMLEventListeners):
1278         (WebCore::toJS):
1279         (WebCore::toJSDOMWindow):
1280         (WebCore::toJSDOMWindow):
1281         * bindings/js/kjs_window.h:
1282         (WebCore::JSDOMWindowBase::impl):
1283         (WebCore::JSDOMWindowBase::classInfo):
1284         (WebCore::JSDOMWindowBase::):
1285         * bindings/objc/DOMUtility.mm:
1286         (KJS::createDOMWrapper):
1287         * bindings/scripts/CodeGeneratorJS.pm:
1288         * history/CachedPage.cpp:
1289         (WebCore::CachedPage::CachedPage):
1290         (WebCore::CachedPage::restore):
1291         * page/Chrome.cpp:
1292         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
1293         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
1294         * page/DOMWindow.idl:
1295         * page/Frame.cpp:
1296         (WebCore::Frame::~Frame):
1297         (WebCore::Frame::windowScriptNPObject):
1298         (WebCore::Frame::pageDestroyed):
1299         * page/InspectorController.cpp:
1300         (WebCore::inspectedWindow):
1301         * page/mac/FrameMac.mm:
1302         (WebCore::Frame::windowScriptObject):
1303         * page/mac/WebCoreFrameBridge.mm:
1304         (updateRenderingForBindings):
1305         * platform/SecurityOrigin.cpp:
1306         (WebCore::SecurityOrigin::canAccess):
1307
1308 2008-03-03  Kevin Ollivier  <kevino@theolliviers.com>
1309
1310         wx build fixes after recent Frame-related changes.
1311
1312         * platform/wx/PasteboardWx.cpp:
1313         * platform/wx/TemporaryLinkStubs.cpp:
1314
1315 2008-03-03  Dan Bernstein  <mitz@apple.com>
1316
1317         Reviewed by Darin Adler.
1318
1319         - make :first-letter apply to the first letter in normal flow, skipping
1320           floats and positioned objects
1321
1322         Test: fast/css/first-letter-skip-out-of-flow.html
1323
1324         * rendering/RenderBlock.cpp:
1325         (WebCore::RenderBlock::updateFirstLetter):
1326
1327 2008-03-03  Ada Chan  <adachan@apple.com>
1328
1329         Fix build.
1330
1331         * plugins/win/PluginViewWin.cpp:
1332
1333 2008-03-03  Mark Rowe  <mrowe@apple.com>
1334
1335         Reviewed by Dan Bernstein.
1336
1337         Fix http://bugs.webkit.org/show_bug.cgi?id=17313
1338         Bug 17313: querySelectorAll() causing crashes when called via dojo.query() wrapper
1339
1340         Node::querySelector and SelectorNodeList were not sufficiently initializing the CSSStyleSelector
1341         before using it to resolve styles, which lead to it having a stale m_style member in some situations.
1342         This stale m_style member resulted in a wild store that would write over whatever object now resided
1343         at the location m_style pointed to.
1344
1345         Test: fast/dom/SelectorAPI/bug-17313.html
1346
1347         * dom/Node.cpp:
1348         (WebCore::Node::querySelector): Call initForStyleResolve to further initialize the CSSStyleSelector.
1349         * dom/SelectorNodeList.cpp:
1350         (WebCore::SelectorNodeList::SelectorNodeList): Ditto.
1351
1352 2008-03-03  Anders Carlsson  <andersca@apple.com>
1353
1354         Reviewed by Darin and Sam.
1355
1356         Include fixes, in preparation of using the headers in WebCore/bridge.
1357         
1358         * bindings/js/kjs_binding.h:
1359         * bindings/js/kjs_dom.cpp:
1360         * bindings/objc/DOMInternal.mm:
1361         * bindings/objc/DOMUtility.mm:
1362         * bindings/objc/WebScriptObject.mm:
1363         * bindings/objc/WebScriptObjectPrivate.h:
1364         * bridge/objc/objc_class.h:
1365         * bridge/objc/objc_instance.h:
1366         * bridge/objc/objc_runtime.h:
1367         * bridge/objc/objc_utility.h:
1368         * bridge/runtime.h:
1369         * bridge/runtime_object.h:
1370         * bridge/runtime_root.h:
1371         * html/HTMLAppletElement.cpp:
1372         * html/HTMLAppletElement.h:
1373         * html/HTMLEmbedElement.cpp:
1374         * html/HTMLEmbedElement.h:
1375         * html/HTMLObjectElement.cpp:
1376         * html/HTMLPlugInElement.cpp:
1377         * html/HTMLPlugInElement.h:
1378         * page/mac/FrameMac.mm:
1379         * page/mac/WebCoreFrameBridge.h:
1380         * page/mac/WebCoreFrameBridge.mm:
1381         * page/mac/WebCoreScriptDebugger.mm:
1382
1383 2008-03-03  David Hyatt  <hyatt@apple.com>
1384
1385         Full page zoom plumbing.  Add a notion of whether or not a zoom is text only or a full zoom to the
1386         Frame.  setTextSizeMultiplier does a text only zoom.
1387
1388         Reviewed by Tim H.
1389
1390         * page/Frame.cpp:
1391         (WebCore::Frame::zoomFactor):
1392         (WebCore::Frame::isZoomFactorTextOnly):
1393         (WebCore::Frame::setZoomFactor):
1394         (WebCore::FramePrivate::FramePrivate):
1395         * page/Frame.h:
1396         * page/FramePrivate.h:
1397         * page/mac/WebCoreFrameBridge.mm:
1398         (-[WebCoreFrameBridge setTextSizeMultiplier:]):
1399         * svg/SVGSVGElement.cpp:
1400         (WebCore::SVGSVGElement::setCurrentScale):
1401
1402 2008-03-03  David Hyatt  <hyatt@apple.com>
1403
1404         Fix for <rdar://problem/5776161> REGRESSION: Google Docs Spreadsheet crash
1405
1406         This is also http://bugs.webkit.org/show_bug.cgi?id=17543, fixed table layout corrupts heap.
1407
1408         Make sure not to access position -1 of the size 0 vectors.
1409
1410         Reviewed by ggaren
1411
1412         * rendering/FixedTableLayout.cpp:
1413         (WebCore::FixedTableLayout::layout):
1414
1415 2008-03-03  David D. Kilzer  <ddkilzer@webkit.org>
1416
1417         Dynamically inserting CSS rule with @media query fails with DOM Exception 12
1418         <http://bugs.webkit.org/show_bug.cgi?id=15986>
1419
1420         Reviewed by Darin.
1421
1422         Allow any valid rule (@font-face, @import, @media, @page or style) to be
1423         parsed when using CSSStyleSheet.insertRule().  Previously only import and
1424         style rules were allowed.  Note that @page rules always throw an exception
1425         because they're not implemented yet, so no test case was added for them.
1426
1427         Tests: fast/css/insertRule-font-face.html
1428                fast/css/insertRule-media.html
1429
1430         * css/CSSGrammar.y: Extracted 'valid_rule' out of 'rule'.  Renamed
1431         'ruleset_or_import' to 'valid_rule_or_import' and changed its definition.
1432
1433 2008-03-03  Anders Carlsson  <andersca@apple.com>
1434
1435         Reviewed by Sam.
1436
1437         Copy JSC bindings directory over to WebCore/bridge.
1438
1439         * bridge: Copied from ../JavaScriptCore/bindings.
1440
1441 2008-03-03  Dan Bernstein  <mitz@apple.com>
1442
1443         Reviewed by Darin Adler.
1444
1445         - remove CSSMutableStyleDeclaration::setChanged()'s change type
1446           parameter
1447
1448         * css/CSSMutableStyleDeclaration.cpp:
1449         (WebCore::CSSMutableStyleDeclaration::setChanged): Removed the change
1450         type parameter and made this function determine the correct change type
1451         based on whether this is an inline style declaration.
1452         (WebCore::CSSMutableStyleDeclaration::setProperty):
1453         * css/CSSMutableStyleDeclaration.h:
1454         (WebCore::CSSMutableStyleDeclaration::clear): Removed this unused
1455         method.
1456         (WebCore::CSSMutableStyleDeclaration::setChanged): Made private.
1457
1458 2008-03-03  Darin Adler  <darin@apple.com>
1459
1460         Reviewed by Adam.
1461
1462         - some "cleanup" on the path to removing WebCoreFrameBridge
1463
1464         * WebCore.base.exp: Exported some stuff we either already use or
1465         I am about to use in an upcoming patch.
1466
1467         * WebCore.xcodeproj/project.pbxproj: Made FileChooser.h private rather
1468         than project, for future use in WebKit.
1469
1470         * bindings/objc/WebScriptObject.mm: Removed some dead code.
1471
1472         * dom/ContainerNode.cpp: Added a now-needed or soon-to-be-needed include.
1473         * editing/Editor.cpp: Ditto.
1474
1475         * editing/Editor.h: Removed many unneeded declarations and includes.
1476         Removed the unused userVisibleString function.
1477
1478         * editing/EditorCommand.cpp:
1479         (WebCore::executeYank): Added parameter for triggeringEvent, which no
1480         longer has a default value.
1481         (WebCore::executeYankAndSelect): Ditto.
1482
1483         * editing/mac/EditorMac.mm: Removed userVisibleString.
1484
1485         * page/mac/EventHandlerMac.mm:
1486         (WebCore::isKeyboardOptionTab): Tweaked formattin.
1487
1488         * page/mac/WebCoreFrameBridge.mm:
1489         (-[WebCoreFrameBridge dragSourceMovedTo:]): Get window from -[NSView window]
1490         rather than from the bridge. There's no special value in the bridge's window
1491         method and we can use NSView directly.
1492         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): Ditto.
1493
1494         * platform/graphics/mac/ImageMac.mm:
1495         (WebCore::Image::loadPlatformResource): Use a new WebCoreBundleFinder class to
1496         find the bundle rather than using WebCoreFrameBridge.
1497
1498         * platform/mac/ClipboardMac.mm: Added a now-needed or soon-to-be-needed include.
1499         * platform/mac/PasteboardMac.mm: Ditto.
1500
1501         * rendering/RenderObject.h:
1502         (WebCore::DashboardRegionValue::operator==): Fixed mistake where this wasn't
1503         comparing the clip rectangle.
1504         (WebCore::DashboardRegionValue::operator!=): Added. Needed by my future work.
1505
1506 2008-03-03  Oliver Hunt  <oliver@apple.com>
1507
1508         Reviewed by Mark Rowe.
1509
1510         Bug 17620: getImageData lies
1511         http://bugs.webkit.org/show_bug.cgi?id=17620
1512
1513         Correct logic to actually iterate over the source row
1514
1515         * platform/graphics/cg/ImageBufferCG.cpp:
1516         (WebCore::ImageBuffer::getImageData):
1517
1518 2008-03-03  Oliver Hunt  <oliver@apple.com>
1519
1520         Reviewed by Mark Rowe.
1521
1522         Correct incorrect assertion
1523
1524         * platform/graphics/cg/ImageBufferCG.cpp:
1525         (WebCore::ImageBuffer::putImageData):
1526
1527 2008-03-02  Alp Toker  <alp@atoker.com>
1528
1529         Another fix for non-database builds after changes in r30331.
1530
1531         Conditionalize a stopDatabases() call.
1532
1533         * loader/FrameLoader.cpp:
1534         (WebCore::FrameLoader::stopLoading):
1535
1536 2008-03-02  Kevin Ollivier  <kevino@theolliviers.com>
1537
1538         Reviewed by Alp Toker.
1539
1540         Scrolling fixes. Implement page scrolling, initialize mouse wheel
1541         event variables, and remove duplicate event binding for TOP
1542         scrolling event.
1543
1544         http://bugs.webkit.org/show_bug.cgi?id=17643
1545
1546         * platform/wx/MouseWheelEventWx.cpp:
1547         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1548         * platform/wx/ScrollViewWx.cpp:
1549         (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
1550         (WebCore::ScrollView::ScrollViewPrivate::OnScrollWinEvents):
1551
1552 2008-03-02  Alp Toker  <alp@atoker.com>
1553
1554         Fix building without database support after changes in r30331.
1555
1556         * dom/Document.cpp:
1557
1558 2008-03-02  Kevin Ollivier  <kevino@theolliviers.com>
1559
1560         wx build fix for Windows after PageWin.cpp move.
1561
1562         * webcore-wx.bkl:
1563
1564 2008-03-02  Kevin Ollivier  <kevino@theolliviers.com>
1565
1566         Reviewed by Dave Hyatt.
1567
1568         Gracefully handle a CSS rule containing an invalid value.
1569         (Fixes http://bugs.webkit.org/show_bug.cgi?id=16898)
1570
1571         * css/CSSGrammar.y:
1572
1573 2008-03-02  Alp Toker  <alp@atoker.com>
1574
1575         Reviewed by Mark Rowe.
1576
1577         Improve the Cairo Path::isEmpty() function
1578
1579         Use cairo_has_current_point() where available.
1580
1581         * platform/graphics/cairo/PathCairo.cpp:
1582         (WebCore::Path::isEmpty):
1583
1584 2008-03-01  Mark Rowe  <mrowe@apple.com>
1585
1586         Reviewed by Tim Hatcher.
1587
1588         Update Xcode configuration to support building debug and release from the mysterious future.
1589
1590         * Configurations/DebugRelease.xcconfig:
1591
1592 2008-03-01  Oliver Hunt  <oliver@apple.com>
1593
1594         Reviewed by Sam Weinig.
1595
1596         Bug 16954: Support putImageData
1597         
1598         Implement support for HTML5's putImageData for the CG port.  All other ports
1599         are currently just using stubs for the final blit.
1600
1601         Test: fast/canvas/canvas-putImageData.html
1602
1603         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1604         (WebCore::JSCanvasRenderingContext2D::putImageData):
1605         * html/CanvasRenderingContext2D.cpp:
1606         (WebCore::CanvasRenderingContext2D::putImageData):
1607         * html/CanvasRenderingContext2D.h:
1608         * platform/graphics/ImageBuffer.h:
1609         * platform/graphics/cairo/ImageBufferCairo.cpp:
1610         * platform/graphics/cg/ImageBufferCG.cpp:
1611         (WebCore::ImageBuffer::putImageData):
1612         * platform/graphics/qt/ImageBufferQt.cpp:
1613         * platform/graphics/wx/ImageBufferWx.cpp:
1614
1615 2008-03-01  Jon Honeycutt  <jhoneycutt@apple.com>
1616
1617         Reviewed by Darin.
1618
1619         <rdar://problem/5772987> Crashing viewing page with two VLC plug-in
1620         instances
1621
1622         The VLC Netscape plug-in crashes if more than one instance is created.
1623
1624         Added a quirk that disallows a plug-in from having more than one
1625         instance and set this for the VLC plug-in.
1626
1627         In addition, we now sort plug-ins that handle the same MIME
1628         type to choose the most appropriate one. This sorting first sorts by
1629         whether a plug-in has an issue that should put it at the end of the
1630         list, then whether it appears in a "preferred" plug-in directory.
1631
1632         * plugins/PluginQuirkSet.h: Added PluginQuirkDontAllowMultipleInstances.
1633         * plugins/PluginDatabase.cpp:
1634         (WebCore::PluginDatabase::preferredPluginCompare): Comparator for
1635         sorting plug-ins; calls PluginPackage::compare().
1636         (WebCore::PluginDatabase::pluginForMIMEType): Add all of the plug-ins
1637         that handle this MIME type to a list, sort the list, and return the
1638         first item.
1639         (WebCore::PluginDatabase::MIMETypeForExtension): Add all of the plug-ins
1640         that handle this extension to a list, sort the list, and return the MIME
1641         type used by the plug-in at the beginning of the list.
1642         * plugins/PluginDatabase.h:
1643         * plugins/PluginPackage.h:
1644         (WebCore::PluginPackage::version): Added; returns the module version.
1645         * plugins/win/PluginDatabaseWin.cpp:
1646         (WebCore::PluginDatabase::isPreferredPluginPath): Made static; removed
1647         const.
1648         * plugins/win/PluginPackageWin.cpp:
1649         (WebCore::PluginPackage::compare): Sorts plug-ins with known issues to
1650         the end, then plug-ins in preferred directories to the beginning, then
1651         alphabetically by file name, numerically by version, and alphabetically
1652         by parent directory.
1653         (WebCore::PluginPackage::determineQuirks): Set the "don't allow multiple
1654         instances" quirk for VLC.
1655         (WebCore::PluginPackage::load): Return false if the plug-in library has
1656         already been loaded and the "don't allow multiple instances" quirk is
1657         set.
1658         * platform/gtk/TemporaryLinkStubs.cpp:
1659         (PluginPackage::compare): Added stub.
1660         (PluginDatabase::IsPreferredPluginPath): Update the GTK stub.
1661         * platform/qt/TemporaryLinkStubs.cpp:
1662         (PluginPackage::compare): Added stub.
1663         (PluginDatabase::IsPreferredPluginPath): Update the Qt stub.
1664         * platform/wx/TemporaryLinkStubs.cpp:
1665         (PluginPackage::compare): Added stub.
1666         (PluginDatabase::IsPreferredPluginPath): Update the wx stub.
1667
1668 2008-03-01  Sam Weinig  <sam@webkit.org>
1669
1670         Rubber-stamped by Mark Rowe.
1671
1672         Remove reference to the now non-existent bridge directory.
1673
1674         * WebCore.xcodeproj/project.pbxproj:
1675
1676 2008-03-01  Sam Weinig  <sam@webkit.org>
1677
1678         Reviewed by Darin Adler.
1679
1680         Search the entire prototype chain when doing early prototype lookup in
1681         the Window's getOwnPropertySlot method.
1682
1683         Makes fast/dom/Window/window-function-name-getter-precedence.html pass all tests.
1684
1685         * bindings/js/kjs_window.cpp:
1686         (KJS::Window::getOwnPropertySlot):
1687
1688 2008-03-01  Nikolas Zimmermann  <zimmermann@kde.org>
1689
1690         Reviewed by Oliver.
1691
1692         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17568 (SVGForeignObjectElement can't react to width/height SVG DOM changes)
1693
1694         As the bug title says, fix all dynamic update problems that occour with SVGForeignObjectElement.
1695
1696         Tests: svg/dynamic-updates/SVGForeignObjectElement-dom-height-attr.html
1697                svg/dynamic-updates/SVGForeignObjectElement-dom-width-attr.html
1698                svg/dynamic-updates/SVGForeignObjectElement-dom-x-attr.html
1699                svg/dynamic-updates/SVGForeignObjectElement-dom-y-attr.html
1700                svg/dynamic-updates/SVGForeignObjectElement-svgdom-height-prop.html
1701                svg/dynamic-updates/SVGForeignObjectElement-svgdom-width-prop.html
1702                svg/dynamic-updates/SVGForeignObjectElement-svgdom-x-prop.html
1703                svg/dynamic-updates/SVGForeignObjectElement-svgdom-y-prop.html
1704
1705         * svg/SVGForeignObjectElement.cpp:
1706         (WebCore::SVGForeignObjectElement::parseMappedAttribute):
1707         (WebCore::addCSSPropertyAndNotifyAttributeMap):
1708         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
1709         * svg/SVGForeignObjectElement.h:
1710
1711 2008-02-29  Brady Eidson  <beidson@apple.com>
1712
1713         Reviewed by build-fix karma
1714
1715         Bonehead mistake.  Revert function to previous version for all non-Windows+CFNetwork platforms
1716
1717         * platform/network/ProtectionSpace.cpp:
1718         (WebCore::ProtectionSpace::receivesCredentialSecurely): Make my previous change conditionally
1719
1720 2008-02-29  Brady Eidson  <beidson@apple.com>
1721
1722         Reviewed by Darin
1723         
1724         <rdar://problem/5771227> - Incorrect password handling text in credential sheet
1725
1726         * platform/network/ProtectionSpace.cpp:
1727         (WebCore::ProtectionSpace::receivesCredentialSecurely): Call functional CFNetwork method to
1728           get "secureness" of the auth challenge instead of figuring it out ourselves
1729
1730 2008-02-29  Brent Fulgham  <bfulgham@gmail.com>
1731
1732         http://bugs.webkit.org/show_bug.cgi?id=17483
1733         Implement scrollbars on Windows (Cairo)
1734
1735         Reviewed by Adam Roben.
1736
1737         * platform/win/PlatfromScrollBarWin.cpp: Duplicate implementation
1738           from PlatformScrollBarWinSafari.cpp, then modify to use the
1739           native Windows theme engine.  Use SOFT_LINK.  Use platform
1740           'GetSystemMetrics' call to decide size of scrollbars and buttons.
1741
1742 2008-02-29  Adam Roben  <aroben@apple.com>
1743
1744         Windows build fix
1745
1746         * WebCore.vcproj/WebCore.vcproj: Remove bridge/* from the include path
1747         and the post-build event, and add page/win to each. Also let VS have
1748         its way with the order of the files.
1749         * page/win/PageWin.cpp: Copied from bridge/win/PageWin.cpp in r30673
1750         * page/win/GlobalHistoryWin.cpp: Copied from
1751         bridge/win/GlobalHistoryWin.cpp in r30673
1752
1753 2008-02-29  Anders Carlsson  <andersca@apple.com>
1754
1755         Build fix.
1756
1757         * WebCore.xcodeproj/project.pbxproj:
1758
1759 2008-02-29  Mark Rowe  <mrowe@apple.com>
1760
1761         Reviewed by Tim Hatcher.
1762
1763         64-bit build fix.
1764
1765         * platform/graphics/mac/SimpleFontDataMac.mm:
1766         (WebCore::pathFromFont): Provide stub implementation of pathFromFont for 64-bit as
1767         FMGetATSFontRefFromFont is not available.
1768
1769 2008-02-29  Mark Rowe  <mrowe@apple.com>
1770
1771         Build fix.  Only declare pathFromFont in debug builds as it is unused in release builds.
1772
1773         * platform/graphics/mac/SimpleFontDataMac.mm:
1774
1775 2008-02-29  Anders Carlsson  <andersca@apple.com>
1776
1777         Reviewed by Adam.
1778         
1779         Copy the remaining files in bridge/ over to page/
1780
1781         * WebCore.vcproj/WebCore.vcproj:
1782         * WebCore.xcodeproj/project.pbxproj:
1783         * bridge: Removed.
1784         * bridge/AXObjectCache.h: Removed.
1785         * bridge/EditorClient.h: Removed.
1786         * bridge/GlobalHistory.h: Removed.
1787         * bridge/win: Removed.
1788         * bridge/win/FrameCGWin.cpp: Removed.
1789         * bridge/win/FrameCairoWin.cpp: Removed.
1790         * bridge/win/FrameWin.cpp: Removed.
1791         * bridge/win/FrameWin.h: Removed.
1792         * bridge/win/GlobalHistoryWin.cpp: Removed.
1793         * bridge/win/PageWin.cpp: Removed.
1794         * page/AXObjectCache.h: Copied from bridge/AXObjectCache.h.
1795         * page/EditorClient.h: Copied from bridge/EditorClient.h.
1796         * page/GlobalHistory.h: Copied from bridge/GlobalHistory.h.
1797         * page/win/FrameCGWin.cpp: Copied from bridge/win/FrameCGWin.cpp.
1798         * page/win/FrameCairoWin.cpp: Copied from bridge/win/FrameCairoWin.cpp.
1799         * page/win/FrameWin.cpp: Copied from bridge/win/FrameWin.cpp.
1800         * page/win/FrameWin.h: Copied from bridge/win/FrameWin.h.
1801
1802 2008-02-29  Robert Blaut  <webkit@blaut.biz>
1803
1804         Reviewed by Darin Adler.
1805
1806         - fix http://bugs.webkit.org/show_bug.cgi?id=17532
1807           Webkit imports styles from <link> element which doesn't have rel=stylesheet defined
1808
1809         Test: fast/html/link-rel-stylesheet.html
1810
1811         * html/HTMLLinkElement.cpp:
1812         (WebCore::HTMLLinkElement::process):
1813
1814 2008-02-29  Mark Rowe  <mrowe@apple.com>
1815
1816         Reviewed by Anders Carlsson.
1817
1818         Replace use of WKPathFromFont with implementation in terms of public API.
1819
1820         * WebCore.base.exp: Remove unused symbol.
1821         * platform/graphics/mac/SimpleFontDataMac.mm:
1822         (WebCore::initFontData):
1823         (WebCore::pathFromFont): Implement pathFromFont in terms of public API.
1824         (WebCore::SimpleFontData::platformInit):
1825         * platform/mac/WebCoreSystemInterface.h: Remove unused symbol.
1826         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1827
1828 2008-02-29  Anders Carlsson  <andersca@apple.com>
1829
1830         Reviewed by Adam.
1831
1832         Move a bunch of files from bridge/mac to page/mac.
1833         
1834         * WebCore.xcodeproj/project.pbxproj:
1835         * bridge/mac: Removed.
1836         * bridge/mac/AXObjectCacheMac.mm: Removed.
1837         * bridge/mac/GlobalHistoryMac.mm: Removed.
1838         * bridge/mac/WebCoreAXObject.h: Removed.
1839         * bridge/mac/WebCoreAXObject.mm: Removed.
1840         * bridge/mac/WebCoreScriptDebugger.h: Removed.
1841         * bridge/mac/WebCoreScriptDebugger.mm: Removed.
1842         * page/mac/AXObjectCacheMac.mm: Copied from bridge/mac/AXObjectCacheMac.mm.
1843         * page/mac/GlobalHistoryMac.mm: Copied from bridge/mac/GlobalHistoryMac.mm.
1844         * page/mac/WebCoreAXObject.h: Copied from bridge/mac/WebCoreAXObject.h.
1845         * page/mac/WebCoreAXObject.mm: Copied from bridge/mac/WebCoreAXObject.mm.
1846         * page/mac/WebCoreScriptDebugger.h: Copied from bridge/mac/WebCoreScriptDebugger.h.
1847         * page/mac/WebCoreScriptDebugger.mm: Copied from bridge/mac/WebCoreScriptDebugger.mm.
1848
1849 2008-02-29  David Hyatt  <hyatt@apple.com>
1850
1851         Fix for http://bugs.webkit.org/show_bug.cgi?id=17559, media query tests crashing under
1852         guard malloc.  Pass along the style selector so it can be accessed, since it has not yet
1853         been assigned into the document's member variable.
1854
1855         Reviewed by aroben
1856
1857         * css/CSSStyleSelector.cpp:
1858         (WebCore::CSSRuleSet::addRulesFromSheet):
1859         * css/MediaQueryEvaluator.cpp:
1860         (WebCore::MediaQueryEvaluator::eval):
1861         * css/MediaQueryEvaluator.h:
1862
1863 2008-02-29  David Hyatt  <hyatt@apple.com>
1864
1865         <rdar://problem/5755916> REGRESSION: Loading HTML5 spec is 5x slower on TOT than in 3.0.4
1866
1867         Improve the performance of dynamic sibling and CSS3 selectors so that there is no slowdown any more.
1868         Be more precise in terms of what nodes we mark dirty.
1869
1870         Reviewed by Beth
1871
1872         * css/CSSStyleSelector.cpp:
1873         (WebCore::CSSStyleSelector::checkSelector):
1874         * dom/Element.cpp:
1875         (WebCore::Element::recalcStyle):
1876         (WebCore::checkForSiblingStyleChanges):
1877         (WebCore::Element::childrenChanged):
1878         (WebCore::Element::finishParsingChildren):
1879         * rendering/RenderStyle.cpp:
1880         (WebCore::RenderStyle::RenderStyle):
1881         * rendering/RenderStyle.h:
1882         (WebCore::RenderStyle::childrenAffectedByPositionalRules):
1883         (WebCore::RenderStyle::childrenAffectedByDirectAdjacentRules):
1884         (WebCore::RenderStyle::setChildrenAffectedByDirectAdjacentRules):
1885
1886 2008-02-29  Alexey Proskuryakov  <ap@webkit.org>
1887
1888         Reviewed by Darin.
1889
1890         <rdar://problem/5766352> REGRESSION (r27151): XMLHttpRequest.abort() resets response status
1891
1892         Test: http/tests/xmlhttprequest/status-after-abort.html
1893
1894         * xml/XMLHttpRequest.cpp:
1895         (WebCore::XMLHttpRequest::getStatus):
1896         (WebCore::XMLHttpRequest::getStatusText):
1897         Changed to match Firefox more closely (IE just raises an exception in most of those cases).
1898
1899 2008-02-29  Dan Bernstein  <mitz@apple.com>
1900
1901         Reviewed by Darin Adler.
1902
1903         - fix a bug where explicit embedding past the end of a line could
1904           affect text that line
1905
1906         Test: fast/text/embed-at-end-of-pre-wrap-line.html
1907
1908         * rendering/bidi.cpp:
1909         (WebCore::RenderBlock::skipWhitespace): Removed calls to
1910         setAdjustEmbedding().
1911         (WebCore::RenderBlock::findNextLineBreak): Added calls to
1912         setAdjustEmbedding() around skipWhitespace() only where needed.
1913
1914 2008-02-29  Mark Rowe  <mrowe@apple.com>
1915
1916         Reviewed by Oliver Hunt.
1917
1918         Don't use WKSupportsMultipartXMixedReplace on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest.
1919
1920         * platform/mac/WebCoreSystemInterface.h: Don't declare WKSupportsMultipartXMixedReplace on Leopard.
1921         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1922         * platform/network/mac/ResourceRequestMac.mm:
1923         (WebCore::ResourceRequest::doUpdatePlatformRequest): Don't call WKSupportsMultipartXMixedReplace on Leopard.
1924         * WebCore.Tiger.exp: Move Tiger-only symbol here.
1925         * WebCore.base.exp:
1926
1927 2008-02-29  Mark Rowe  <mrowe@apple.com>
1928
1929         Rubber-stamped by Eric Seidel.
1930
1931         Remove unneeded includes of WebCoreSystemInterface.h.
1932
1933         * loader/mac/LoaderNSURLExtras.m:
1934         * page/mac/FrameMac.mm:
1935         * page/mac/WebCoreFrameBridge.mm:
1936         * platform/MIMETypeRegistry.cpp:
1937         * platform/graphics/mac/ImageMac.mm:
1938         * platform/mac/PasteboardMac.mm:
1939
1940 2008-02-29  Mark Rowe  <mrowe@apple.com>
1941
1942         Reviewed by Oliver Hunt and Oliver Hunt.
1943
1944         <rdar://problem/4753845> WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI.
1945
1946         * platform/mac/SystemTimeMac.cpp:  Replace use of WKSecondsSinceLastInputEvent with CGEventSourceSecondsSinceLastEventType.
1947         * platform/mac/WebCoreSystemInterface.h:  Remove unused symbol.
1948         * platform/mac/WebCoreSystemInterface.mm:  Ditto.
1949         * WebCore.base.exp:  Ditto.
1950
1951 2008-02-28  Mark Rowe  <mrowe@apple.com>
1952
1953         Reviewed by Dave Hyatt.
1954
1955         Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
1956
1957         * DerivedSources.make:  Add Tiger-only symbols to the export file when running on Tiger.
1958         * WebCore.Tiger.exp:  Added.  Move Tiger-only symbol here from WebCore.base.exp.
1959         * WebCore.base.exp:
1960         * platform/graphics/mac/SimpleFontDataMac.mm:
1961         (WebCore::SimpleFontData::platformInit):  Use Leopard APIs when building on Leopard.
1962         * platform/mac/WebCoreSystemInterface.h:  Don't declare wkGetFontMetrics on Leopard as it is unused.
1963         * platform/mac/WebCoreSystemInterface.mm:  Ditto.
1964
1965 2008-02-28  Matt Lilek  <webkit@mattlilek.com>
1966
1967         Reviewed by Tim Hatcher.
1968
1969         Bug 16535: Stylesheets loaded with @import are not editable
1970         http://bugs.webkit.org/show_bug.cgi?id=16535
1971         <rdar://problem/5712899>
1972
1973         Sheets loaded using @import were incorrectly being flagged as non-editable
1974         user agent sheets because their parent sheet doesn't have an ownerNode. We now
1975         check to make sure sheets also don't have a href before restricting their editability.
1976
1977         * page/inspector/StylesSidebarPane.js:
1978
1979 2008-02-28  Rodney Dawes  <dobey@wayofthemonkey.com>
1980
1981         Reviewed by Adam Roben.
1982
1983         Copy PluginPackageWin.cpp to shared PluginPackage.cpp.
1984         Add PluginPackage.cpp to build configurations.
1985         Remove PluginPackage destructor from TemporaryLinkStubs.cpp.
1986         Use cross-platform pathGetFilename method.
1987         Remove platform-specific code from shared PluginPackage implementation.
1988         Remove shared code from PluginPackageWin.cpp.
1989
1990         * GNUmakefile.am:
1991         * WebCore.pro:
1992         * WebCoreSources.bkl:
1993         * WebCore.vcproj/WebCore.vcproj:
1994         * platform/gtk/TemporaryLinkStubs.cpp:
1995         * platform/qt/TemporaryLinkStubs.cpp:
1996         * platform/wx/TemporaryLinkStubs.cpp:
1997         * plugins/PluginPackage.cpp:
1998         * plugins/win/PluginPackageWin.cpp:
1999
2000 2008-02-28  Justin Garcia  <justin.garcia@apple.com>
2001
2002         Reviewed by Darin Adler.
2003
2004         <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
2005         
2006         Add a second style span at copy time to hold document default styles.  This helps us
2007         differentiate between those and user applied styles at paste time, where we'll want
2008         to let Mail's Paste As Quotation blockquote override document default styles, but
2009         not others.
2010
2011         * css/CSSComputedStyleDeclaration.cpp:
2012         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used 
2013         for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that 
2014         are thick | medium | thin | <length>.  Before, there was a mismatch between the unit 
2015         type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for 
2016         an element and that element's inlineStyleDecl(), causing identical values to always appear 
2017         different to diff().
2018         * editing/ReplaceSelectionCommand.cpp:
2019         (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed.  Don't just change
2020         the class to an empty string, completely remove it, it's no longer needed.
2021         (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
2022         (WebCore::ReplaceSelectionCommand::handleStyleSpans): 
2023         Added, replaces removeRedundantStyles.
2024         We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
2025         unused code and renamed the function.
2026         There won't be more than two style spans that we need to consider, the one with the 
2027         source document's default styles and styles on the commonAncestor of the copied Range, 
2028         so don't look for more than two.
2029         Let elements that wrap the incoming fragment override the source document's styles.
2030         (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
2031         and call the renamed handleStyleSpans.
2032         * editing/ReplaceSelectionCommand.h:
2033         * editing/markup.cpp:
2034         (WebCore::removeDefaultStyles): Added.  Don't add document defaults to the style span
2035         that holds user applied styles, since they'll be added to their own style span.
2036         (WebCore::createMarkup):
2037         Add a second style span that holds just the document defaults. This lets us differentiate
2038         between those and user applied styles at paste time.
2039         Mail blockquotes are just another type of special element, moved their handling there. This
2040         also lets paste code make assumptions about the position of the two style spans (they are 
2041         *always* parent-child).
2042
2043 2008-02-28  Brent Fulgham <bfulgham@gmail.com>
2044
2045         http://bugs.webkit.org/show_bug.cgi?id=17576
2046         Modify RenderThemeWin to use SOFT_LINK
2047
2048         Reviewed by Adam Roben.
2049
2050         * rendering/RenderThemeWin.h: Remove unneeded library handle
2051         * rendering/RenderThemeWin.cpp: Change to use SOFT_LINK
2052           rather than hand-coded load library calls.
2053
2054 2008-02-28  Dan Bernstein  <mitz@apple.com>
2055
2056         Reviewed by Darin Adler.
2057
2058         - fix http://bugs.webkit.org/show_bug.cgi?id=17590
2059           ASSERTION FAILED: subject in jsRegExpExecute()
2060
2061         * page/mac/FrameMac.mm:
2062         (WebCore::Frame::matchLabelsAgainstElement): Added an early return in
2063         case the element name is empty.
2064
2065 2008-02-28  Justin Garcia  <justin.garcia@apple.com>
2066
2067         Reviewed by Dan Bernstein
2068         
2069         Small editing speed up.
2070         
2071         * dom/Position.cpp:
2072         (WebCore::Position::upstream): Don't check for a change in editability
2073         if the current node hasn't changed.
2074         (WebCore::Position::downstream): Ditto.
2075
2076 2008-02-27  Dan Bernstein  <mitz@apple.com>
2077
2078         Reviewed by John Sullivan.
2079
2080         - fix <rdar://problem/5607547> Single letter surrounded by soft hyphens can disappear
2081
2082         Test: fast/text/soft-hyphen-2.html
2083
2084         * rendering/bidi.cpp:
2085         (WebCore::chopMidpointsAt): Changed to iterate midpoints backwards, so
2086         that if there are two midpoints at the given position, only the last one
2087         will be chopped off.
2088
2089 2008-02-27  Dan Bernstein  <mitz@apple.com>
2090
2091         Reviewed by Darin Adler.
2092
2093         - make centered text in right-to-left blocks spill over to the left
2094
2095         Test: fast/text/align-center-rtl-spill.html
2096
2097         * rendering/bidi.cpp:
2098         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
2099
2100 2008-02-27  Dan Bernstein  <mitz@apple.com>
2101
2102         Reviewed by Darin Adler.
2103
2104         - more bidi.cpp cleanup
2105
2106         * platform/text/BidiResolver.h:
2107         (WebCore::BidiCharacterRun::destroy): Added. Overridden by BidiRun .
2108         (WebCore::BidiResolver<Iterator, Run>::addRun): Moved BidiState::addRun()
2109         here.
2110         (WebCore::BidiResolver<Iterator, Run>::appendRun): Changed to use
2111         addRun().
2112         (WebCore::BidiResolver<Iterator, Run>::deleteRuns): Changed to use
2113         destroy(), avoiding the need to specialize this method in BidiState.
2114         * rendering/bidi.cpp:
2115         (WebCore::BidiRun::destroy): Removed the RenderArena parameter.
2116         (WebCore::BidiState::deleteRuns): Removed now-unnecessary specialization.
2117         (WebCore::BidiState::addRun): Removed now-unnecessary specialization.
2118         (WebCore::RenderBlock::createLineBoxes): 
2119         (WebCore::RenderBlock::constructLine):
2120         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added a FIXME.
2121         (WebCore::RenderBlock::computeVerticalPositionsForLine):
2122         (WebCore::buildCompactRuns):
2123         (WebCore::RenderBlock::layoutInlineChildren):
2124         (WebCore::RenderBlock::determineStartPosition):
2125         (WebCore::RenderBlock::determineEndPosition):
2126         (WebCore::RenderBlock::matchedEndLine):
2127         (WebCore::skipNonBreakingSpace):
2128         (WebCore::RenderBlock::skipWhitespace):
2129         (WebCore::shouldSkipWhitespaceAfterStartObject):
2130         * rendering/bidi.h:
2131         (WebCore::BidiRun): Added m_ prefixes to several member variables. 
2132
2133 2008-02-27  Sam Weinig  <sam@webkit.org>
2134
2135         Reviewed by Darin.
2136
2137         Fix for <rdar://problem/5768769>
2138
2139         - Don't allow cross-origin calls using window.functionName.call(otherFrame)
2140           syntax.
2141
2142         * bindings/js/JSLocation.cpp:
2143         (WebCore::jsLocationProtoFuncToString): Do same-origin check.
2144         * bindings/js/kjs_window.cpp:
2145         (KJS::windowProtoFuncAToB): Ditto.
2146         (KJS::windowProtoFuncBToA): Ditto.
2147         (KJS::windowProtoFuncOpen): Ditto.
2148         (KJS::windowProtoFuncClearTimeout): Ditto.
2149         * bindings/scripts/CodeGeneratorJS.pm: Ditto.
2150
2151 2008-02-27  David Hyatt  <hyatt@apple.com>
2152
2153         More cleanup in preparation for fixing the HTML5 spec performance regression.
2154
2155         Reviewed by Sam Weinig
2156
2157         * dom/Attr.cpp:
2158         (WebCore::Attr::childrenChanged):
2159         * dom/Attr.h:
2160         * dom/ContainerNode.cpp:
2161         (WebCore::ContainerNode::insertBefore):
2162         (WebCore::ContainerNode::replaceChild):
2163         (WebCore::ContainerNode::removeChild):
2164         (WebCore::ContainerNode::removeChildren):
2165         (WebCore::ContainerNode::appendChild):
2166         (WebCore::ContainerNode::addChild):
2167         (WebCore::ContainerNode::childrenChanged):
2168         * dom/ContainerNode.h:
2169         * dom/Document.cpp:
2170         (WebCore::Document::childrenChanged):
2171         * dom/Document.h:
2172         * dom/Element.cpp:
2173         (WebCore::Element::childrenChanged):
2174         * dom/Element.h:
2175         * dom/Node.h:
2176         (WebCore::Node::childrenChanged):
2177         * html/HTMLObjectElement.cpp:
2178         (WebCore::HTMLObjectElement::childrenChanged):
2179         * html/HTMLObjectElement.h:
2180         * html/HTMLOptGroupElement.cpp:
2181         (WebCore::HTMLOptGroupElement::childrenChanged):
2182         * html/HTMLOptGroupElement.h:
2183         * html/HTMLOptionElement.cpp:
2184         (WebCore::HTMLOptionElement::childrenChanged):
2185         * html/HTMLOptionElement.h:
2186         * html/HTMLScriptElement.cpp:
2187         (WebCore::HTMLScriptElement::childrenChanged):
2188         * html/HTMLScriptElement.h:
2189         * html/HTMLSelectElement.cpp:
2190         (WebCore::HTMLSelectElement::childrenChanged):
2191         * html/HTMLSelectElement.h:
2192         * html/HTMLStyleElement.cpp:
2193         (WebCore::HTMLStyleElement::childrenChanged):
2194         * html/HTMLStyleElement.h:
2195         * html/HTMLTextAreaElement.cpp:
2196         (WebCore::HTMLTextAreaElement::childrenChanged):
2197         * html/HTMLTextAreaElement.h:
2198         * html/HTMLTitleElement.cpp:
2199         (WebCore::HTMLTitleElement::childrenChanged):
2200         * html/HTMLTitleElement.h:
2201         * svg/SVGClipPathElement.cpp:
2202         (WebCore::SVGClipPathElement::childrenChanged):
2203         * svg/SVGClipPathElement.h:
2204         * svg/SVGDefinitionSrcElement.cpp:
2205         (WebCore::SVGDefinitionSrcElement::childrenChanged):
2206         * svg/SVGDefinitionSrcElement.h:
2207         * svg/SVGFontFaceElement.cpp:
2208         (WebCore::SVGFontFaceElement::childrenChanged):
2209         * svg/SVGFontFaceElement.h:
2210         * svg/SVGFontFaceFormatElement.cpp:
2211         (WebCore::SVGFontFaceFormatElement::childrenChanged):
2212         * svg/SVGFontFaceFormatElement.h:
2213         * svg/SVGFontFaceSrcElement.cpp:
2214         (WebCore::SVGFontFaceSrcElement::childrenChanged):
2215         * svg/SVGFontFaceSrcElement.h:
2216         * svg/SVGFontFaceUriElement.cpp:
2217         (WebCore::SVGFontFaceUriElement::childrenChanged):
2218         * svg/SVGFontFaceUriElement.h:
2219         * svg/SVGGElement.cpp:
2220         (WebCore::SVGGElement::childrenChanged):
2221         * svg/SVGGElement.h:
2222         * svg/SVGGradientElement.cpp:
2223         (WebCore::SVGGradientElement::childrenChanged):
2224         * svg/SVGGradientElement.h:
2225         * svg/SVGMarkerElement.cpp:
2226         (WebCore::SVGMarkerElement::childrenChanged):
2227         * svg/SVGMarkerElement.h:
2228         * svg/SVGMaskElement.cpp:
2229         (WebCore::SVGMaskElement::childrenChanged):
2230         * svg/SVGMaskElement.h:
2231         * svg/SVGPatternElement.cpp:
2232         (WebCore::SVGPatternElement::childrenChanged):
2233         * svg/SVGPatternElement.h:
2234         * svg/SVGStyleElement.cpp:
2235         (WebCore::SVGStyleElement::childrenChanged):
2236         * svg/SVGStyleElement.h:
2237         * svg/SVGStyledElement.cpp:
2238         (WebCore::SVGStyledElement::childrenChanged):
2239         * svg/SVGStyledElement.h:
2240         * svg/SVGTitleElement.cpp:
2241         (WebCore::SVGTitleElement::childrenChanged):
2242         * svg/SVGTitleElement.h:
2243         * svg/SVGUseElement.cpp:
2244         (WebCore::SVGUseElement::childrenChanged):
2245         * svg/SVGUseElement.h:
2246
2247 2008-02-27  Julien Chaffraix <julien.chaffraix@gmail.com>
2248
2249         Reviewed by Alexey.
2250
2251         http://bugs.webkit.org/show_bug.cgi?id=17481
2252         Several consecutive calls to XMLHttpRequest::open should dispatch only one readyState event
2253
2254         Test: http/tests/xmlhttprequest/xmlhttprequest-multiple-open.html
2255
2256         * xml/XMLHttpRequest.cpp:
2257         (WebCore::XMLHttpRequest::open):
2258
2259 2008-02-27  Sriram Neelakandan  <sriram.neelakandan@gmail.com>
2260
2261         Reviewed, tweaked and landed by ap.
2262
2263         http://bugs.webkit.org/show_bug.cgi?id=17487
2264         HTMLInput mysteriously fails to work if ICU dat file is missing
2265
2266         * platform/text/TextBreakIteratorICU.cpp: (WebCore::setUpIterator): Assert that the iterator
2267         has been opened.
2268
2269 2008-02-27  Adam Roben  <aroben@apple.com>
2270
2271         Windows build fix after r30616
2272
2273         * platform/win/ClipboardWin.cpp:
2274
2275 2008-02-27  Nikolas Zimmermann  <zimmermann@kde.org>
2276
2277         Reviewed by Simon.
2278
2279         Small style cleanup, and obvious fix: SVGGElement reacted on
2280         'clipPathUnits' changes, which is a funny copy&paste error.
2281
2282         * svg/SVGGElement.cpp:
2283         (WebCore::SVGGElement::parseMappedAttribute):
2284         (WebCore::SVGGElement::svgAttributeChanged):
2285         (WebCore::SVGGElement::createRenderer):
2286
2287 2008-02-27  Nikolas Zimmermann  <zimmermann@kde.org>
2288
2289         Reviewed by Simon.
2290
2291         Cleanup coding style. Still on my way to fix dynamic updates of all SVG elements.
2292         Currently at SVGF*. SVGDefs/DescElement don't need any dyn update fixes but cleanups.
2293
2294         * svg/SVGDefsElement.cpp:
2295         (WebCore::SVGDefsElement::createRenderer):
2296         * svg/SVGDefsElement.h:
2297         * svg/SVGDescElement.h:
2298
2299 2008-02-26  Antti Koivisto  <antti@apple.com>
2300
2301         Reviewed by Darin.
2302
2303         Fix <rdar://problem/5761326>
2304         REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
2305         
2306         Generate better code with VS:
2307         - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
2308         - Refactor error reporting so that there is no need to construct/destruct Strings in common cases
2309         - Add a separate version of the function for cases where error messages are not wanted
2310
2311         * bindings/js/JSDOMWindowCustom.cpp:
2312         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2313         * bindings/js/kjs_window.cpp:
2314         (KJS::Window::allowsAccessFrom):
2315         (KJS::Window::allowsAccessFromNoErrorMessage):
2316         (KJS::Window::allowsAccessFromPrivate):
2317         (KJS::Window::crossDomainAccessErrorMessage):
2318         * bindings/js/kjs_window.h:
2319
2320 2008-02-26  Sam Weinig  <sam@webkit.org>
2321
2322         Reviewed by Dave Hyatt.
2323
2324         - remove DeprecatedCString, DeprecatedArray, and ArrayImpl.
2325
2326         * GNUmakefile.am:
2327         * WebCore.pro:
2328         * WebCore.vcproj/WebCore.vcproj:
2329         * WebCore.xcodeproj/project.pbxproj:
2330         * WebCoreSources.bkl:
2331         * platform/ArrayImpl.cpp: Removed.
2332         * platform/ArrayImpl.h: Removed.
2333         * platform/DeprecatedArray.h: Removed.
2334         * platform/DeprecatedCString.cpp: Removed.
2335         * platform/DeprecatedCString.h: Removed.
2336         * platform/text/CString.cpp:
2337         (WebCore::CString::length):
2338         * platform/text/CString.h:
2339
2340 2008-02-26  David Hyatt  <hyatt@apple.com>
2341
2342         Cleanup of childrenChanged in preparation for fixing the HTML5 spec slowdown.
2343
2344         Reviewed by Sam Weinig
2345
2346         * dom/Attr.cpp:
2347         (WebCore::Attr::childrenChanged):
2348         * dom/ContainerNode.cpp:
2349         (WebCore::ContainerNode::insertBefore):
2350         (WebCore::ContainerNode::replaceChild):
2351         (WebCore::ContainerNode::removeChild):
2352         (WebCore::ContainerNode::removeChildren):
2353         (WebCore::ContainerNode::appendChild):
2354         (WebCore::ContainerNode::addChild):
2355         (WebCore::ContainerNode::childrenChanged):
2356         * dom/ContainerNode.h:
2357         * dom/EventTargetNode.cpp:
2358         (WebCore::EventTargetNode::dispatchSubtreeModifiedEvent):
2359         * dom/EventTargetNode.h:
2360         * dom/NamedAttrMap.cpp:
2361         (WebCore::NamedAttrMap::addAttribute):
2362         (WebCore::NamedAttrMap::removeAttribute):
2363
2364 2008-02-26  Darin Adler  <darin@apple.com>
2365
2366         Reviewed by Sam.
2367
2368         - remove use of DeprecatedCString from Windows pasteboard code
2369
2370         * platform/win/ClipboardUtilitiesWin.cpp:
2371         (WebCore::createGlobalData): Added an overload for Vector<char>.
2372         Streamlined the logic a bit.
2373         (WebCore::append): Added. Helper functions for appending to a
2374         Vector<char>.
2375         (WebCore::markupToCF_HTML): Rewrote to use Vector<char> instead
2376         of DeprecatedCString. Also simplified the logic a bit and used
2377         macros to handle the integer width.
2378         (WebCore::urlToMarkup): Use Vector<UChar> instead of String.
2379         (WebCore::replaceNewlinesWithWindowsStyleNewlines): Tweaked.
2380         * platform/win/ClipboardUtilitiesWin.h: Update type of return
2381         value from markupToCF_HTML. Did a bit of streamlining too.
2382         * platform/win/ClipboardWin.cpp:
2383         (WebCore::writeURL): Update for above changes.
2384         (WebCore::ClipboardWin::declareAndWriteDragImage): Ditto.
2385         (WebCore::ClipboardWin::writeRange): Ditto.
2386         * platform/win/PasteboardWin.cpp:
2387         (WebCore::Pasteboard::writeSelection): Ditto.
2388         (WebCore::Pasteboard::writeURL): Ditto.
2389
2390 2008-02-26  Timothy Hatcher  <timothy@apple.com>
2391
2392         Reviewed by Adam Roben.
2393
2394         <rdar://problem/5712777> REGRESSION: Arrow up/down in inspector
2395         source list does not scroll when item at edge is reached (16572)
2396
2397         Use scrollIntoViewIfNeeded() instead of the hand-rolled scrollToElement
2398         we were using in utilities.js.
2399
2400         * page/inspector/DocumentPanel.js: Use scrollIntoViewIfNeeded instead of scrollToElement.
2401         * page/inspector/Resource.js: Ditto.
2402         * page/inspector/inspector.js: Ditto.
2403         * page/inspector/SourcePanel.js: Use scrollIntoViewIfNeeded instead
2404         of scrollIntoView, so the source line is centered in the view if needed.
2405         * page/inspector/utilities.js: Removed scrollToElement().
2406
2407 2008-02-26  David Hyatt  <hyatt@apple.com>
2408
2409         Reviewed by Dan
2410
2411         http://bugs.webkit.org/show_bug.cgi?id=17485
2412
2413         Refine our behavior for empty inlines so that they work more correctly with margins/borders/padding.
2414         Fixes a regression on huffingtonpost.com.
2415
2416         New tests added to fast/inline
2417
2418         * rendering/InlineFlowBox.cpp:
2419         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
2420         (WebCore::InlineFlowBox::placeBoxesVertically):
2421         (WebCore::InlineFlowBox::shrinkBoxesWithNoTextChildren):
2422         * rendering/RenderFlow.cpp:
2423         (WebCore::RenderFlow::calcMargins):
2424         * rendering/RenderFlow.h:
2425         * rendering/RenderObject.h:
2426         (WebCore::RenderObject::hasHorizontalBordersPaddingOrMargin):
2427         (WebCore::RenderObject::hasHorizontalBordersOrPadding):
2428         * rendering/bidi.cpp:
2429         (WebCore::getBorderPaddingMargin):
2430         (WebCore::RenderBlock::layoutInlineChildren):
2431         (WebCore::inlineFlowRequiresLineBox):
2432
2433 2008-02-26  Sam Weinig  <sam@webkit.org>
2434
2435         Fix Windows build.
2436
2437         * platform/text/PlatformString.h:
2438         (WebCore::reverseFind):
2439
2440 2008-02-26  Dan Bernstein  <mitz@apple.com>
2441
2442         Reviewed by Darin Adler.
2443
2444         - fix http://bugs.webkit.org/show_bug.cgi?id=17555
2445           <rdar://problem/5766016> REGRESSION (r27351): Thumbnails positioned wrong on Getty Images results page
2446
2447         Test: fast/dynamic/subtree-table-cell-height.html
2448
2449         * rendering/RenderObject.cpp:
2450         (WebCore::objectIsRelayoutBoundary): Exclude table cells, since their
2451         height depends on their contents even if the CSS height property is
2452         fixed.
2453
2454 2008-02-25  Sam Weinig  <sam@webkit.org>
2455
2456         Reviewed by Dan Bernstein.
2457
2458         Make the cleanPath function in CSSStyleSelector more efficient by using
2459         a Vector<UChar>.
2460
2461         * css/CSSStyleSelector.cpp:
2462         (WebCore::cleanPath): Make this function work on a Vector<UChar> instead
2463         of a String.  Also remove unnecessary reverseFind call that could be acomplished
2464         with two compares.
2465         (WebCore::checkPseudoState): Remove reserveCapacity calls now that we are using
2466         a stack buffer.
2467         * platform/text/PlatformString.h:
2468         (WebCore::find): Make this find generic enough that it can be used for
2469         String::find.
2470         (WebCore::reverseFind): Implement reverseFind so that it can be used
2471         for with a UChar* and length.
2472         * platform/text/StringImpl.cpp:
2473         (WebCore::StringImpl::find): Use implementation in PlatformString.cpp
2474         (WebCore::StringImpl::reverseFind): Ditto,
2475
2476 2008-02-26  Satoshi Nakagawa  <artension@gmail.com>
2477
2478         Reviewed by Darin. Tweaked and landed by Alexey.
2479
2480         http://bugs.webkit.org/show_bug.cgi?id=17411
2481         Ideographic comma and full stop should be treated as line-breakable characters
2482
2483         Test: fast/text/line-breaks-after-ideographic-comma-or-full-stop.html
2484
2485         * platform/text/CharacterNames.h: Added ideographicComma and ideographicFullStop.
2486         * rendering/break_lines.cpp: (WebCore::shouldBreakAfter): Added a workaround for an issue in
2487         Unicode 5.0 that is causing this.
2488
2489 2008-02-26  MorganL  <morganl.webkit@yahoo.com>
2490
2491         Reviewed by eseidel.  Landed by eseidel
2492
2493         Fix improperly initialized m_isUpToDate member variable.
2494         Fixs 50+ layout tests when run on Tiger.
2495         http://bugs.webkit.org/show_bug.cgi?id=17549
2496
2497         * platform/network/cf/ResourceResponse.h:
2498         (WebCore::ResourceResponse::ResourceResponse):
2499         * platform/network/mac/ResourceResponse.h:
2500         (WebCore::ResourceResponse::ResourceResponse):
2501
2502 2008-02-25  Dan Bernstein  <mitz@apple.com>
2503
2504         Reviewed by Sam Weinig.
2505
2506         - fix http://bugs.webkit.org/show_bug.cgi?id=17152
2507           Paragraphs indented with :first-letter and text-align CSS render incorrectly
2508
2509         Test: fast/text/apply-start-width-after-skipped-text.html
2510
2511         * rendering/bidi.cpp:
2512         (WebCore::RenderBlock::findNextLineBreak): Improved the logic for when
2513         to figure in the padding, border and margin before a text node when the
2514         line begins inside a text node.
2515
2516 2008-02-25  Kevin Ollivier  <kevino@theolliviers.com>
2517
2518         Windows build fix for wx port.
2519
2520         * loader/FTPDirectoryDocument.cpp:
2521
2522 2008-02-25  Mark Rowe  <mrowe@apple.com>
2523
2524         Windows build fix.
2525
2526         * platform/network/cf/ResourceResponseCFNet.cpp:
2527         (WebCore::ResourceResponse::platformCompare):  Implement platformCompare for ResourceResponseCFNet.cpp.
2528
2529 2008-02-25  Beth Dakin  <bdakin@apple.com>
2530
2531         Reviewed by Geoff.
2532
2533         Fixed for <rdar://problem/5760530> REGRESSION: Assertion failure in 
2534         Document::removePendingSheet() from r30438
2535
2536         r30438 added a call to CachedResource::error() from inside 
2537         Loader::didReceiveData() if a CSS file 4xxs. There was an 
2538         assumption in the loader, though, that either error() would be 
2539         called, or didFinishLoading() would be called, so some work is 
2540         duplicated in each. Now that we are calling an error() on files 
2541         that will also make it to didFinishLoading() (since they succeeded 
2542         in the network layer), we need to make sure we do not duplicate the 
2543         work. CachedCSSStyleSheet::error() calls checkNotify, which ends up 
2544         decrementing the document's pending style sheet counter. 
2545         checkNotify() was still getting called, though, through the normal  
2546         didFinishLoading code path, and the counter was being decremented 
2547         twice. Bad!
2548
2549         * loader/loader.cpp:
2550         (WebCore::Loader::didFinishLoading):
2551         (WebCore::Loader::didReceiveData):
2552
2553 2008-02-25  Mark Rowe  <mrowe@apple.com>
2554
2555         Fix the Gtk, wx and Qt builds.
2556
2557         * GNUmakefile.am: Add new files.
2558         * WebCore.pro: Ditto.
2559         * WebCoreSources.bkl: Ditto.
2560         * platform/network/AuthenticationChallengeBase.h: Fix up argument types.
2561
2562 2008-02-25  MorganL  <morganl.webkit@yahoo.com>
2563
2564         Reviewed by Darin Adler.
2565
2566         Eliminate some #ifdefs from headers in platform/network.
2567         http://bugs.webkit.org/show_bug.cgi?id=17210
2568
2569         * WebCore.base.exp:
2570         * WebCore.order:
2571         * WebCore.vcproj/WebCore.vcproj:
2572         * WebCore.xcodeproj/project.pbxproj:
2573         * dom/XMLTokenizer.cpp:
2574         * loader/ResourceLoader.h:
2575         * platform/network/AuthenticationChallenge.cpp: Removed.
2576         * platform/network/AuthenticationChallenge.h: Removed.
2577         * platform/network/AuthenticationChallengeBase.cpp: Copied from platform/network/AuthenticationChallenge.cpp.
2578         (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
2579         (WebCore::AuthenticationChallengeBase::previousFailureCount):
2580         (WebCore::AuthenticationChallengeBase::proposedCredential):
2581         (WebCore::AuthenticationChallengeBase::protectionSpace):
2582         (WebCore::AuthenticationChallengeBase::failureResponse):
2583         (WebCore::AuthenticationChallengeBase::error):
2584         (WebCore::AuthenticationChallengeBase::isNull):
2585         (WebCore::AuthenticationChallengeBase::nullify):
2586         (WebCore::AuthenticationChallengeBase::compare):
2587         * platform/network/AuthenticationChallengeBase.h: Copied from platform/network/AuthenticationChallenge.h.
2588         (WebCore::AuthenticationChallengeBase::platformCompare):
2589         (WebCore::operator==):
2590         (WebCore::operator!=):
2591         * platform/network/ResourceError.cpp: Removed.
2592         * platform/network/ResourceError.h: Removed.
2593         * platform/network/ResourceErrorBase.cpp: Copied from platform/network/ResourceError.cpp.
2594         (WebCore::ResourceErrorBase::lazyInit):
2595         (WebCore::ResourceErrorBase::compare):
2596         * platform/network/ResourceErrorBase.h: Copied from platform/network/ResourceError.h.
2597         (WebCore::ResourceErrorBase::isNull):
2598         (WebCore::ResourceErrorBase::domain):
2599         (WebCore::ResourceErrorBase::errorCode):
2600         (WebCore::ResourceErrorBase::failingURL):
2601         (WebCore::ResourceErrorBase::localizedDescription):
2602         (WebCore::ResourceErrorBase::ResourceErrorBase):
2603         (WebCore::ResourceErrorBase::platformLazyInit):
2604         (WebCore::ResourceErrorBase::platformCompare):
2605         (WebCore::operator==):
2606         * platform/network/ResourceResponseBase.cpp:
2607         (WebCore::ResourceResponseBase::isHTTP):
2608         (WebCore::ResourceResponseBase::url):
2609         (WebCore::ResourceResponseBase::setUrl):
2610         (WebCore::ResourceResponseBase::mimeType):
2611         (WebCore::ResourceResponseBase::setMimeType):
2612         (WebCore::ResourceResponseBase::expectedContentLength):
2613         (WebCore::ResourceResponseBase::setExpectedContentLength):
2614         (WebCore::ResourceResponseBase::textEncodingName):
2615         (WebCore::ResourceResponseBase::setTextEncodingName):
2616         (WebCore::ResourceResponseBase::suggestedFilename):
2617         (WebCore::ResourceResponseBase::setSuggestedFilename):
2618         (WebCore::ResourceResponseBase::httpStatusCode):
2619         (WebCore::ResourceResponseBase::setHTTPStatusCode):
2620         (WebCore::ResourceResponseBase::httpStatusText):
2621         (WebCore::ResourceResponseBase::setHTTPStatusText):
2622         (WebCore::ResourceResponseBase::httpHeaderField):
2623         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2624         (WebCore::ResourceResponseBase::httpHeaderFields):
2625         (WebCore::ResourceResponseBase::isAttachment):
2626         (WebCore::ResourceResponseBase::setExpirationDate):
2627         (WebCore::ResourceResponseBase::expirationDate):
2628         (WebCore::ResourceResponseBase::setLastModifiedDate):
2629         (WebCore::ResourceResponseBase::lastModifiedDate):
2630         (WebCore::ResourceResponseBase::lazyInit):
2631         (WebCore::ResourceResponseBase::compare):
2632         * platform/network/ResourceResponseBase.h:
2633         (WebCore::ResourceResponseBase::ResourceResponseBase):
2634         (WebCore::ResourceResponseBase::platformLazyInit):
2635         (WebCore::ResourceResponseBase::platformCompare):
2636         (WebCore::operator==):
2637         * platform/network/cf/AuthenticationCF.cpp:
2638         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2639         (WebCore::AuthenticationChallenge::platformCompare):
2640         * platform/network/cf/AuthenticationChallenge.h: Added.
2641         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2642         (WebCore::AuthenticationChallenge::sourceHandle):
2643         (WebCore::AuthenticationChallenge::cfURLAuthChallengeRef):
2644         * platform/network/cf/ResourceError.h: Added.
2645         (WebCore::ResourceError::ResourceError):
2646         * platform/network/cf/ResourceErrorCF.cpp:
2647         (WebCore::ResourceError::ResourceError):
2648         (WebCore::ResourceError::platformLazyInit):
2649         (WebCore::ResourceError::platformCompare):
2650         (WebCore::ResourceError::operator CFStreamError):
2651         * platform/network/cf/ResourceResponse.h:
2652         (WebCore::ResourceResponse::ResourceResponse):
2653         * platform/network/cf/ResourceResponseCFNet.cpp:
2654         (WebCore::ResourceResponse::platformLazyInit):
2655         * platform/network/curl/AuthenticationChallenge.h: Added.
2656         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2657         * platform/network/curl/ResourceError.h: Added.
2658         (WebCore::ResourceError::ResourceError):
2659         * platform/network/curl/ResourceResponse.h:
2660         (WebCore::ResourceResponse::ResourceResponse):
2661         * platform/network/mac/AuthenticationChallenge.h: Added.
2662         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2663         (WebCore::AuthenticationChallenge::sender):
2664         (WebCore::AuthenticationChallenge::nsURLAuthenticationChallenge):
2665         * platform/network/mac/AuthenticationMac.mm:
2666         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2667         (WebCore::AuthenticationChallenge::platformCompare):
2668         * platform/network/mac/ResourceError.h: Added.
2669         (WebCore::ResourceError::ResourceError):
2670         * platform/network/mac/ResourceErrorMac.mm:
2671         (WebCore::ResourceError::platformLazyInit):
2672         (WebCore::ResourceError::platformCompare):
2673         * platform/network/mac/ResourceResponse.h:
2674         (WebCore::ResourceResponse::ResourceResponse):
2675         * platform/network/mac/ResourceResponseMac.mm:
2676         (WebCore::ResourceResponse::platformLazyInit):
2677         (WebCore::ResourceResponse::platformCompare):
2678         * platform/network/qt/AuthenticationChallenge.h: Added.
2679         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2680         * platform/network/qt/ResourceError.h: Added.
2681         (WebCore::ResourceError::ResourceError):
2682         * platform/network/qt/ResourceResponse.h:
2683         (WebCore::ResourceResponse::ResourceResponse):
2684         * xml/XSLTProcessor.cpp:
2685
2686 2008-02-25  Anders Carlsson  <andersca@apple.com>
2687
2688         Reviewed by Darin.
2689
2690         Move remaining render style objects over to start with a refcount of 1 and get
2691         rid of DeprecatedDataRef.
2692         
2693         * rendering/DataRef.h:
2694         (WebCore::DataRef::operator*):
2695         (WebCore::DataRef::operator->):
2696         * rendering/RenderStyle.h:
2697         * rendering/SVGRenderStyle.cpp:
2698         (WebCore::SVGRenderStyle::SVGRenderStyle):
2699         * rendering/SVGRenderStyle.h:
2700         (WebCore::SVGRenderStyle::create):
2701         (WebCore::SVGRenderStyle::copy):
2702         * rendering/SVGRenderStyleDefs.cpp:
2703         (StyleFillData::StyleFillData):
2704         (StyleStrokeData::StyleStrokeData):
2705         (StyleStopData::StyleStopData):
2706         (StyleTextData::StyleTextData):
2707         (StyleClipData::StyleClipData):
2708         (StyleMaskData::StyleMaskData):
2709         (StyleMarkerData::StyleMarkerData):
2710         (StyleMiscData::StyleMiscData):
2711         * rendering/SVGRenderStyleDefs.h:
2712         (WebCore::StyleFillData::create):
2713         (WebCore::StyleFillData::copy):
2714         (WebCore::StyleStrokeData::create):
2715         (WebCore::StyleStrokeData::copy):
2716         (WebCore::StyleStopData::create):
2717         (WebCore::StyleStopData::copy):
2718         (WebCore::StyleTextData::create):
2719         (WebCore::StyleTextData::copy):
2720         (WebCore::StyleClipData::create):
2721         (WebCore::StyleClipData::copy):
2722         (WebCore::StyleMaskData::create):
2723         (WebCore::StyleMaskData::copy):
2724         (WebCore::StyleMarkerData::create):
2725         (WebCore::StyleMarkerData::copy):
2726         (WebCore::StyleMiscData::create):
2727         (WebCore::StyleMiscData::copy):
2728
2729 2008-02-25  Dan Bernstein  <mitz@apple.com>
2730
2731         Reviewed by Dave Hyatt.
2732
2733         - remove file-static BidiRun variables from bidi.cpp
2734
2735         * platform/text/BidiResolver.h:
2736         (WebCore::BidiResolver::): Initialize m_logicallyLastRun.
2737         (WebCore::BidiResolver::logicallyLastRun): Added.
2738         (WebCore::BidiResolver::runCount): Made unsigned.
2739         (WebCore::::reverseRuns): Changed ints to unsigned.
2740         (WebCore::::createBidiRunsForLine): Made this function set
2741         m_logicallyLastRun.
2742         * rendering/RenderBlock.h:
2743         * rendering/bidi.cpp:
2744         (WebCore::BidiState::addRun): Removed setting of sLogicallyLastBidiRun.
2745         (WebCore::RenderBlock::constructLine): Removed unused start parameter
2746         and added run count and first and last run parameters. Replaced end
2747         parameter with lastLine boolean and endObject pointer.
2748         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added first
2749         and logically last run parameters.
2750         (WebCore::RenderBlock::computeVerticalPositionsForLine): Added firstRun
2751         parameter.
2752         (WebCore::RenderBlock::bidiReorderLine): Removed setting of static
2753         variables.
2754         (WebCore::RenderBlock::layoutInlineChildren): Changed to use BidiState
2755         accessors instead of file statics.
2756
2757 2008-02-25  Rodney Dawes  <dobey@wayofthemonkey.com>
2758
2759         Reviewed by Jon Honeycutt.
2760
2761         http://bugs.webkit.org/show_bug.cgi?id=16924
2762         Bug 16924: Shared PluginDatabase, PluginPackage, and PlugInInfoStore implementations
2763
2764         Add PluginInfoStore.cpp and new PluginDatabase.cpp to GTK+ and Qt ports.
2765         Remove old PlugInInfoStoreQt.cpp as it is obsoleted by shared code.
2766         Add PluginInfoStore, PluginDatabase, and PluginStream files to Wx build.
2767         Add new PluginDatabase.cpp to Windows build.
2768         Add temporary stubs for new PluginDatabase and PluginPackage.
2769         shared classes to GTK+, Qt, and Wx ports.
2770         Copy PluginDatabaseWin.cpp to PluginDatabase.cpp to preserve history.
2771         Remove shared code from PluginDatabaseWin.cpp.
2772         Remove Windows-specific code from PluginDatabase.cpp.
2773         Use PlatformModule and PlatformFileTime instead of HMODULE and FILETIME.
2774         Remove extraneous PluginPackage:: from hash() class method prototype.
2775         Subsume storeFileVersion into PluginPackage::fetchInfo.
2776         Add cross-platform PlatformModuleVersion type definition.
2777         Use PlatformModuleVersion to store the module version.
2778         Rename m_fileVersion[ML]S to m_moduleVersion.
2779         Change compareFileVersion to use PlatformModuleVersion as the argument.
2780         Move PluginView::determineQuirks and m_quirks to PluginPackage.
2781         Updated determineQuirks for the PlatformModuleVersion.
2782
2783         * GNUmakefile.am:
2784         * WebCore.pro:
2785         * WebCoreSources.bkl:
2786         * webcore-base.bkl:
2787         * WebCore.vcproj/WebCore.vcproj:
2788         * Platform/FileSystem.h:
2789         * platform/qt/PlugInInfoStoreQt.cpp:
2790         * platform/gtk/TemporaryLinkStubs.cpp:
2791         * platform/qt/TemporaryLinkStubs.cpp:
2792         * platform/wx/TemporaryLinkStubs.cpp:
2793         * plugins/PluginDatabase.cpp:
2794         * plugins/PluginDatabase.h:
2795         * plugins/win/PluginDatabaseWin.cpp:
2796         * plugins/PluginPackage.h:
2797         * plugins/win/PluginPackageWin.cpp:
2798         * plugins/PluginView.h:
2799         * plugins/win/PluginViewWin.cpp:
2800
2801 2008-02-25  Anders Carlsson  <andersca@apple.com>
2802
2803         Reviewed by Darin.
2804
2805         Make more style objects start out with a refcount of 1.
2806         
2807         * rendering/RenderStyle.cpp:
2808         (WebCore::StyleSurroundData::StyleSurroundData):
2809         (WebCore::StyleBoxData::StyleBoxData):
2810         (WebCore::StyleVisualData::StyleVisualData):
2811         (WebCore::StyleBackgroundData::StyleBackgroundData):
2812         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2813         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2814         (WebCore::StyleInheritedData::StyleInheritedData):
2815         * rendering/RenderStyle.h:
2816         (WebCore::StyleSurroundData::create):
2817         (WebCore::StyleSurroundData::copy):
2818         (WebCore::StyleBoxData::create):
2819         (WebCore::StyleBoxData::copy):
2820         (WebCore::StyleVisualData::create):
2821         (WebCore::StyleVisualData::copy):
2822         (WebCore::StyleBackgroundData::create):
2823         (WebCore::StyleBackgroundData::copy):
2824         (WebCore::StyleBackgroundData::~StyleBackgroundData):
2825         (WebCore::StyleRareNonInheritedData::create):
2826         (WebCore::StyleRareNonInheritedData::copy):
2827         (WebCore::StyleRareInheritedData::create):
2828         (WebCore::StyleRareInheritedData::copy):
2829         (WebCore::StyleInheritedData::create):
2830         (WebCore::StyleInheritedData::copy):
2831
2832 2008-02-25  Anders Carlsson  <andersca@apple.com>
2833
2834         Reviewed by Darin.
2835
2836         Make some of the refcounted style objects start out with a refcount of 1.
2837
2838         * rendering/DataRef.h:
2839         Make a DeprecatedDataRef class which is just a copy of the old DataRef class.
2840         Change DataRef to use ::create() and ::copy() instead of the constructors.
2841         Change DataRef's pointer to be a RefPtr instead.
2842
2843         * rendering/RenderStyle.cpp:
2844         (WebCore::StyleMarqueeData::StyleMarqueeData):
2845         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2846         (WebCore::StyleMultiColData::StyleMultiColData):
2847         (WebCore::StyleTransformData::StyleTransformData):
2848         Start with a RefCount of 1.
2849         
2850         * rendering/RenderStyle.h:
2851         * rendering/SVGRenderStyle.h:
2852         Add ::create() and ::copy() methods. Make not yet converted classes use DeprecatedDataRef.
2853
2854 2008-02-25  Darin Adler  <darin@apple.com>
2855
2856         Reviewed by Anders.
2857         Based on a patch by Tim Steele <timsteele41@gmail.com>.
2858
2859         - fix http://bugs.webkit.org/show_bug.cgi?id=17186
2860           Fragment navigation within a page permanently cancels meta refresh
2861
2862         Test: fast/loader/meta-refresh-anchor-click.html
2863
2864         * loader/FrameLoader.cpp:
2865         (WebCore::FrameLoader::load): When load type is FrameLoadTypeRedirectWithLockedHistory,
2866         always do a real load. This makes sure that meta refresh loads are treated as real loads
2867         rather than anchor scrolls. Also tweaked formatting a bit.
2868         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): This function is
2869         an alternate way to complete a load, so it needs to start the redirection timer if
2870         redirection has already been scheduled.
2871
2872 2008-02-25  Dan Bernstein  <mitz@apple.com>
2873
2874         Reviewed by Darin Adler.
2875
2876         - avoid counting spaces in non-justified text
2877
2878         * rendering/bidi.cpp:
2879         Removed file-static numSpaces.
2880         (WebCore::BidiState::addRun): Removed space counting.
2881         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Added space
2882         counting, conditional on the block having the text-align: justify
2883         property value.
2884         (WebCore::RenderBlock::bidiReorderLine): Removed initialization of
2885         numSpaces.
2886
2887 2008-02-25  Darin Adler  <darin@apple.com>
2888
2889         Requested by Steve.
2890
2891         * platform/graphics/cg/ImageSourceCG.cpp:
2892         (WebCore::ImageSource::createFrameAtIndex): Put the string into a global
2893         variable (because CFSTR is inefficient on Windows).
2894
2895 2008-02-25  Darin Adler  <darin@apple.com>
2896
2897         Reviewed by Adam.
2898
2899         * WebCore.base.exp: Export blankURL, and sort the file.
2900
2901 2008-02-25  Simon Hausmann  <hausmann@webkit.org>
2902
2903         Reviewed by Mark Rowe.
2904
2905         Fix compilation with gcc 4.3, added stdio.h and unistd.h inclusions.
2906
2907         * dom/Position.cpp:
2908         * dom/Range.cpp:
2909         * editing/Selection.cpp:
2910         * editing/SelectionController.cpp:
2911         * editing/VisiblePosition.cpp:
2912         * history/HistoryItem.cpp:
2913         * loader/Cache.cpp:
2914         * loader/FTPDirectoryParser.cpp:
2915         * platform/KURL.cpp:
2916         * platform/gtk/FileSystemGtk.cpp:
2917         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2918         * platform/text/TextCodecLatin1.cpp:
2919         * platform/text/TextCodecUserDefined.cpp:
2920         * rendering/CounterNode.cpp:
2921         * rendering/RenderObject.cpp:
2922
2923 2008-02-25  Johnny Ding  <johnnyding.webkit@gmail.com>
2924
2925         Reviewed by Darin Adler.
2926
2927         - fix http://bugs.webkit.org/show_bug.cgi?id=17444
2928
2929         In HTMLTokenizer::write, the code checks 'pendingScripts.isEmpty()' to decide
2930         whether to save prependingSrc or not. However, in HTMLTokenizer::scriptHandler
2931         and HTMLTokenizer::scriptExecution, the code checks testBit:LoadingExtScript
2932         to decide whether to save prependingSrc or not. The later behavior is not right
2933         because, in scriptHandler and scriptExecution, even the pendingScripts queue is
2934         empty, the testBit:LoadingExtScript might be TRUE.
2935
2936         Test: fast/tokenizer/nested-multiple-scripts.html
2937
2938         * html/HTMLTokenizer.cpp:
2939         (WebCore::HTMLTokenizer::scriptHandler): check pendingScripts.isEmpty() instead of
2940         checking state.loadingExtScript().
2941         (WebCore::HTMLTokenizer::scriptExecution): check pendingScripts.isEmpty() instead of
2942         checking state.loadingExtScript().
2943
2944 2008-02-24  Darin Adler  <darin@apple.com>
2945
2946         * dom/Document.h: Removed stray duplicate declaration of
2947         RegisteredEventListenerList.
2948
2949 2008-02-24  Darin Adler  <darin@apple.com>
2950
2951         * dom/Range.cpp:
2952         (WebCore::Range::surroundContents): Removed incorrect comment.
2953         I added it a while ago, and I was just mixed up.
2954
2955 2008-02-24  Darin Adler  <darin@apple.com>
2956
2957         - quick follow-up to that last check-in
2958
2959         * platform/graphics/cg/ImageSourceCG.cpp:
2960         (WebCore::ImageSource::createFrameAtIndex): Use CFEqual instead of
2961         WebCore::String's == for speed.
2962
2963 2008-02-24  Michael Knaup  <michael.knaup@mac.com>
2964
2965         Reviewed by Darin.
2966
2967         Bug 8749: XBM rendered incorrectly as black on white
2968
2969         xbm images are now created and rendered using black on a
2970         transparent background (same behavior as in Firefox)
2971
2972         Test: platform/mac/fast/canvas/canvas-draw-xbm-image.html
2973
2974         * platform/graphics/cg/ImageSourceCG.cpp:
2975         (WebCore::ImageSource::createFrameAtIndex):
2976
2977 2008-02-24  Dan Bernstein  <mitz@apple.com>
2978
2979         Reviewed by Darin Adler.
2980
2981         - fix http://bugs.webkit.org/show_bug.cgi?id=17471
2982           REGRESSION (r30438): Crash in deleteLineBoxes in cursor-adjusting code browsing Acid3
2983
2984         Test: http/tests/misc/object-image-error.html
2985
2986         * html/HTMLObjectElement.cpp:
2987         (WebCore::HTMLObjectElement::attach): Added an early return in case
2988         updateFromElement() has changed the object to use fallback content.
2989
2990 2008-02-24  Dan Bernstein  <mitz@apple.com>
2991
2992         Reviewed by Darin Adler.
2993
2994         - fix float positioning when a float that does not fit on the line is
2995           followed by a float that does
2996
2997         Test: fast/block/float/narrow-after-wide.html
2998
2999         * rendering/bidi.cpp:
3000         (WebCore::RenderBlock::findNextLineBreak): Changed to not position any
3001         more floats on the line once a float that does not fit is encountered.
3002         That float should be pushed to the next line, and so should all floats
3003         that follow, regardless of whether they can fit on the current line.
3004
3005 2008-02-24  Darin Adler  <darin@apple.com>
3006
3007         Reviewed by Sam.
3008
3009         - fix http://bugs.webkit.org/show_bug.cgi?id=16770
3010           Acid3 expects :visited styled links to restyle on iframe load
3011
3012         Disentangle global history updating from the back/forward history.
3013         There are many cases where we don't want to create a new back/forward
3014         item, but we do still want to add to the global history (used for visited
3015         link coloring) in those cases.
3016
3017         Test: fast/history/subframe-is-visited.html
3018
3019         * loader/FrameLoader.cpp:
3020         (WebCore::FrameLoader::updateGlobalHistory): Renamed from
3021         addHistoryForCurrentLocation and removed the back/forward handling.
3022         (WebCore::FrameLoader::updateHistoryForStandardLoad): Streamlined logic a
3023         bit. Replaced call to addHistoryForCurrentLocation with a call to
3024         addBackForwardItemClippedAtTarget. Added an unconditional call to
3025         updateGlobalHistory.
3026         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added a FIXME;
3027         why doesn't this function update global history?
3028         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Ditto.
3029         (WebCore::FrameLoader::updateHistoryForReload): Replaced the direct call
3030         the client with a call to the new updateGlobalHistory function.
3031         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Did
3032         the same changes as for updateHistoryForStandardLoad.
3033         * loader/FrameLoader.h: More of the same.
3034
3035         * loader/FrameLoaderClient.h: Removed updateGlobalHistoryForReload and
3036         renamed updateGlobalHistoryForStandardLoad to updateGlobalHistory.
3037
3038         * svg/graphics/SVGImageEmptyClients.h:
3039         (WebCore::SVGEmptyFrameLoaderClient::updateGlobalHistory): Updated to
3040         match the above.
3041
3042 2008-02-23  Darin Adler  <darin@apple.com>
3043
3044         Reviewed by Sam.
3045
3046         - fix http://bugs.webkit.org/show_bug.cgi?id=17508
3047           REGRESSION (r30535): mailto regression tests failing
3048
3049         * html/HTMLFormElement.cpp:
3050         (WebCore::HTMLFormElement::submit): Restore the old logic, with its unpleasant
3051         trip through String do to the replace operation. It's inefficient, but there's
3052         no real reason to worry about the efficiency of mailto forms, since that feature
3053         is nearly obsolete.
3054
3055 2008-02-23  Darin Adler  <darin@apple.com>
3056
3057         Reviewed by Sam.
3058
3059         - replace SegmentedString's use of DeprecatedValueList with Deque
3060
3061         Testing indicates this is a slight speed-up for page loading.
3062
3063         * platform/text/SegmentedString.cpp:
3064         (WebCore::SegmentedString::length): Update to use Deque.
3065         (WebCore::SegmentedString::setExcludeLineNumbers): Ditto.
3066         (WebCore::SegmentedString::append): Ditto.
3067         (WebCore::SegmentedString::prepend): Ditto.
3068         (WebCore::SegmentedString::advanceSubstring): Ditto.
3069         (WebCore::SegmentedString::toString): Ditto.
3070         * platform/text/SegmentedString.h: Tweak formatting. Don't bother making an entire
3071         class private with a single friend. Change m_sbstrings from a DeprecatedValueList
3072         to a Deque.
3073
3074 2008-02-23  Darin Adler  <darin@apple.com>
3075
3076         Reviewed by Anders.
3077
3078         - fix http://bugs.webkit.org/show_bug.cgi?id=17506
3079           REGRESSION (r30535): ASSERTION FAILED: i < size()
3080
3081         * loader/TextResourceDecoder.cpp:
3082         (WebCore::findTextEncoding): Fix off-by-one in code that null-terminates
3083         the C string here.
3084
3085 2008-02-23  Matt Lilek  <webkit@mattlilek.com>
3086
3087         Not reviewed, build fix.
3088
3089         * platform/network/cf/FormDataStreamCFNet.cpp:
3090         (WebCore::httpBodyFromRequest):
3091         * plugins/win/PluginViewWin.cpp:
3092         (WebCore::PluginView::handlePost):
3093
3094 2008-02-23  Dan Bernstein  <mitz@apple.com>
3095
3096         - fix a typo
3097
3098         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
3099         (WebCore::GlyphPage::fill):
3100         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
3101         (WebCore::GlyphPage::fill):
3102
3103 2008-02-23  Dan Bernstein  <mitz@apple.com>
3104
3105         Reviewed by Anders Carlsson.
3106
3107         - fix GlyphPage::fill() logic for partial page fills
3108
3109         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
3110         (WebCore::GlyphPage::fill): Changed the test for non-BMP characters to
3111         work correctly when the length parameter is less than a full page size.
3112         Also updated the comment.
3113         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
3114         (WebCore::GlyphPage::fill): Ditto.
3115
3116 2008-02-23  Kevin Ollivier  <kevino@theolliviers.com>
3117
3118         Reviewed by Darin Adler.
3119
3120         Move text drawing into wxcode, as we need platform-dependent
3121         APIs for drawing non-kerned text, which wx doesn't yet have.
3122         (But hopefully will, once these APIs are fleshed out on all
3123         platforms!)
3124
3125         http://bugs.webkit.org/show_bug.cgi?id=17396
3126
3127         * platform/graphics/wx/FontWx.cpp:
3128         (WebCore::Font::drawGlyphs):
3129         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Added.
3130         * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp: Added.
3131         * platform/wx/wxcode/non-kerned-drawing.h: Added.
3132         * platform/wx/wxcode/win/non-kerned-drawing.cpp: Added.
3133         * webcore-wx.bkl:
3134
3135 2008-02-23  Darin Adler  <darin@apple.com>
3136
3137         Pointed out by Mitz.
3138
3139         * loader/TextResourceDecoder.cpp:
3140         (WebCore::find): Fix a "==" that was supposed to be ">".
3141         (WebCore::findIgnoringCase): Ditto.
3142
3143 2008-02-23  Darin Adler  <darin@apple.com>
3144
3145         Reviewed by Sam.
3146
3147         * html/HTMLFormElement.cpp:
3148         (WebCore::appendEncodedString): Fix buffer overrun in the code I just landed.
3149
3150 2008-02-23  Darin Adler  <darin@apple.com>
3151
3152         Reviewed by Sam.
3153
3154         - remove all but 1 remaining use of DeprecatedCString
3155         - change FormData to start refcount at 1
3156
3157         * html/HTMLFormElement.cpp:
3158         (WebCore::appendString): Added. Helpers for Vector<char>.
3159         (WebCore::appendEncodedString): Renamed from encodeCString and changed to
3160         append to an existing Vector<char> to cut down a bit on memory allocation.
3161         (WebCore::HTMLFormElement::formData): Replace the DeprecatedCString called
3162         enc_string with a Vector<char> called encodedData. Change to use the new
3163         FormData::create function.
3164         (WebCore::HTMLFormElement::submit): Same thing, for the mailto form code.
3165
3166         * loader/TextResourceDecoder.cpp:
3167         (WebCore::find): Added. Helper for searching in char* with length.
3168         (WebCore::findIgnoringCase): Ditto.
3169         (WebCore::findTextEncoding): Added. Helper for looking up a text encoding
3170         when we have a char* with length rather than a null-terminated char*.
3171         (WebCore::findXMLEncoding): Changed to use char* and length rather than
3172         DeprecatedCString. Also fixed some things that would be one-character
3173         buffer overruns in a string that's not null-terminated.
3174         (WebCore::TextResourceDecoder::checkForCSSCharset): Change to use
3175         findTextEncoding rather than constructing a CString to pass to the
3176         TextEncodingconstructor.
3177         (WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
3178
3179         * platform/network/FormData.cpp:
3180         (WebCore::FormData::FormData): Changed to start refcount at 1.
3181         (WebCore::FormData::create): Added.
3182         (WebCore::FormData::copy): Call adoptRef since refcount starts at 1.
3183         * platform/network/FormData.h: Made constructor private. Added create functions.
3184
3185         * platform/network/mac/ResourceRequestMac.mm:
3186         (WebCore::ResourceRequest::doUpdateResourceRequest): Call FormData::create.
3187         * xml/XMLHttpRequest.cpp:
3188         (WebCore::XMLHttpRequest::send): Ditto.
3189
3190 2008-02-23  Darin Adler  <darin@apple.com>
3191
3192         Reviewed by Anders.
3193
3194         - http://bugs.webkit.org/show_bug.cgi?id=17067
3195           eliminate attributes parameter from JSObject::put for speed/clarity
3196
3197         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3198         (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
3199
3200         * bindings/js/JSCanvasPixelArrayCustom.cpp:
3201         (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
3202         (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
3203         CanvasPixelArray object, for consistency with the getter. Removed attributes
3204         argument.
3205
3206         * bindings/js/JSDOMWindowCustom.cpp:
3207         (WebCore::JSDOMWindow::customPut): Removed special case for variable
3208         initialization, which is not needed since that does use put any more.
3209         Removed attributes argument.
3210
3211         * bindings/js/JSEventTargetBase.h:
3212         (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
3213         (WebCore::JSEventTargetBase::put): Ditto.
3214         (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
3215         * bindings/js/JSEventTargetNode.cpp:
3216         (WebCore::JSEventTargetNode::put): Removed attributes argument.
3217         (WebCore::JSEventTargetNode::putValueProperty): Ditto.
3218         * bindings/js/JSEventTargetNode.h: Ditto.
3219         * bindings/js/JSHTMLAppletElementCustom.cpp:
3220         (WebCore::JSHTMLAppletElement::customPut): Ditto.
3221         * bindings/js/JSHTMLEmbedElementCustom.cpp:
3222         (WebCore::JSHTMLEmbedElement::customPut): Ditto.
3223         * bindings/js/JSHTMLInputElementBase.cpp:
3224         (WebCore::JSHTMLInputElementBase::put): Ditto.
3225         (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
3226         * bindings/js/JSHTMLInputElementBase.h: Ditto.
3227         * bindings/js/JSHTMLObjectElementCustom.cpp:
3228         (WebCore::JSHTMLObjectElement::customPut): Ditto.
3229         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3230         (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
3231         * bindings/js/JSHTMLSelectElementCustom.cpp:
3232         (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
3233         * bindings/js/JSHistoryCustom.cpp:
3234         (WebCore::JSHistory::customPut): Ditto.
3235         * bindings/js/JSLocation.cpp:
3236         (WebCore::JSLocation::put): Ditto.
3237         * bindings/js/JSLocation.h: Ditto.
3238         * bindings/js/JSXMLHttpRequest.cpp:
3239         (WebCore::JSXMLHttpRequest::put): Ditto.
3240         (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
3241         * bindings/js/JSXMLHttpRequest.h: Ditto.
3242
3243         * bindings/js/kjs_dom.cpp:
3244         (WebCore::getRuntimeObject): Changed return type to JSObject*.
3245         * bindings/js/kjs_dom.h: Ditto.
3246
3247         * bindings/js/kjs_events.cpp:
3248         (WebCore::JSClipboard::put): Removed attributes argument.
3249         (WebCore::JSClipboard::putValueProperty): Ditto.
3250         * bindings/js/kjs_events.h: Ditto.
3251
3252         * bindings/js/kjs_html.cpp:
3253         (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
3254         return a JSObject. Used early exit idiom.
3255         (WebCore::runtimeObjectPropertyGetter): Ditto.
3256         (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
3257         (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
3258         that we should put with the property syntax instead of canPut.
3259         (WebCore::runtimeObjectImplementsCall): Ditto.
3260         (WebCore::runtimeObjectCallAsFunction): Ditto.
3261         * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
3262
3263         * bindings/js/kjs_window.cpp:
3264         (KJS::Window::put): Removed attributes argument.
3265         * bindings/js/kjs_window.h: Ditto.
3266
3267         * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
3268         putValueProperty, customPut, and indexSetter.
3269
3270         * html/CanvasPixelArray.h:
3271         (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
3272         function. Before, the checking was done in the JavaScript bindings for set.
3273
3274 2008-02-23  Brent Fulgham  <bfulgham@gmail.com>
3275
3276         Reviewed by Adam and Darin.
3277
3278         http://bugs.webkit.org/show_bug.cgi?id=17442
3279         Correct the Windows Cairo implementation of GraphicsContext so
3280         that Windows 'WorldTransform' is kept in sync with the Cairo
3281         transormations.
3282
3283         Also corrects an uninitialized variable in the Cairo Windows
3284         image drag handler.
3285
3286         WARNING: NO TEST CASES ADDED OR CHANGED
3287
3288         * platform/graphics/cairo/GraphicsContextCairo.cpp:  Modify
3289           methods to call GraphicsContextPlatformPrivate calls, just
3290           as is done for the CoreGraphics version.  These calls are
3291           nop's for everything but Windows.
3292         (WebCore::GraphicsContext::savePlatformState):
3293         (WebCore::GraphicsContext::restorePlatformState):
3294         (WebCore::GraphicsContext::clip):
3295         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3296         (WebCore::GraphicsContext::translate):
3297         (WebCore::GraphicsContext::concatCTM): Re-enable for Windows
3298         (WebCore::GraphicsContext::beginTransparencyLayer):
3299         (WebCore::GraphicsContext::endTransparencyLayer):
3300         (WebCore::GraphicsContext::rotate):
3301         (WebCore::GraphicsContext::scale):
3302         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3303         * platform/graphics/win/GraphicsContextCGWin.cpp:  Move common
3304           code for handling WorldTransform calls to parent class.
3305         * platform/graphics/win/GraphicsContextCairoWin.cpp:  Add common
3306           code for handling WorldTransform calls.
3307           (WebCore::GraphicsContextPlatformPrivate::concatCTM):  Change
3308           implementation so that it only handles WorldTransform.  The
3309           Cairo update is done in GraphicsContextCairo.cpp
3310         * platform/graphics/win/GraphicsContextWin.cpp:  Call platform-private
3311           methods to keep WorldTransform in sync.
3312         (WebCore::GraphicsContextPlatformPrivate::save):
3313         (WebCore::GraphicsContextPlatformPrivate::restore):
3314         (WebCore::GraphicsContextPlatformPrivate::clip):
3315         (WebCore::GraphicsContextPlatformPrivate::scale):
3316         (WebCore::GraphicsContextPlatformPrivate::rotate):
3317         (WebCore::GraphicsContextPlatformPrivate::translate):
3318         * platform/win/DragImageCairoWin.cpp:
3319         (WebCore::createDragImageFromImage):  Correct uninitialized value
3320
3321 2008-02-23  Dan Bernstein  <mitz@apple.com>
3322
3323         Reviewed by Dave Hyatt.
3324
3325         - make non-autowrapping text clear floats
3326
3327         Test: fast/text/whitespace/nowrap-clear-float.html
3328
3329         * rendering/RenderBlock.cpp:
3330         (WebCore::RenderBlock::nextFloatBottomBelow): Renamed nearestFloat() to
3331         this and changed to avoid comparing bottom to 0 in each iteration.
3332         (WebCore::RenderBlock::getClearDelta): Updated comment for the rename.
3333         * rendering/RenderBlock.h:
3334         * rendering/bidi.cpp:
3335         (WebCore::RenderBlock::fitBelowFloats): Added. Factored out of
3336         findNextLineBreak() and simplified.
3337         (WebCore::RenderBlock::findNextLineBreak): Changed to call
3338         fitBelowFloats(). Fixed the bug by trying to fit below floats in the
3339         case of non-wrapping text. Removed some redundancy.
3340
3341 2008-02-23  Sam Weinig  <sam@webkit.org>
3342
3343         Reviewed by Oliver Hunt.
3344
3345         Fix for http://bugs.webkit.org/show_bug.cgi?id=17504
3346         Speed up DOM lists array subscription syntax by using the fast 
3347         getOwnPropertySlot and set paths
3348
3349         - 6x speed improvement on Oliver's ImageData put test.
3350
3351         * bindings/scripts/CodeGeneratorJS.pm: Add fast path for getOwnPropertySlot
3352         and put when an indexGetter or indexSetter is used.  We can not use the fast
3353         path if an overridingNameGetter is used as there would be no way to override.
3354
3355 2008-02-23  Kevin Ollivier  <kevino@theolliviers.com>
3356
3357         wx build fix after JSImageData.cpp was added.
3358
3359         * WebCoreSources.bkl:
3360
3361 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
3362
3363         Windows build fix - move ThreadCondition implementation from WebCore to WTF.
3364
3365         * WebCore.vcproj/WebCore.vcproj:
3366         * platform/win/ThreadConditionWin.cpp: Removed.
3367
3368 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
3369
3370         Reviewed by Darin.
3371
3372         Move basic threading support from WebCore to WTF.
3373
3374         One call that remains in WebCore is callOnMainThread(), and it has its own header now.
3375
3376         * ForwardingHeaders/wtf/Locker.h: Added.
3377         * ForwardingHeaders/wtf/MessageQueue.h: Added.
3378         * ForwardingHeaders/wtf/Threading.h: Added.
3379         * GNUmakefile.am:
3380         * WebCore.pro:
3381         * WebCore.vcproj/WebCore.vcproj:
3382         * WebCore.xcodeproj/project.pbxproj:
3383         * WebCoreSources.bkl:
3384         * bindings/js/JSCustomSQLTransactionCallback.cpp:
3385         * dom/XMLTokenizer.cpp:
3386         * loader/icon/IconDatabase.cpp:
3387         (WebCore::iconDatabase):
3388         * loader/icon/IconDatabase.h:
3389         * platform/Locker.h: Removed.
3390         * platform/MainThread.h: Copied from WebCore/platform/Threading.h.
3391         (WebCore::initializeThreadingAndMainThread):
3392         * platform/MessageQueue.h: Removed.
3393         * platform/SecurityOrigin.h:
3394         * platform/Threading.h: Removed.
3395         * platform/ThreadingNone.cpp: Removed.
3396         * platform/gtk/MainThreadGtk.cpp: Copied from WebCore/platform/gtk/ThreadingGtk.cpp.
3397         * platform/gtk/ThreadingGtk.cpp: Removed.
3398         * platform/mac/MainThreadMac.mm: Copied from WebCore/platform/mac/Threading.mm.
3399         * platform/mac/Threading.mm: Removed.
3400         * platform/pthreads: Removed.
3401         * platform/pthreads/ThreadingPthreads.cpp: Removed.
3402         * platform/qt/MainThreadQt.cpp: Copied from WebCore/platform/qt/ThreadingQt.cpp.
3403         * platform/qt/ThreadingQt.cpp: Removed.
3404         * platform/sql/SQLValue.h:
3405         * platform/sql/SQLiteAuthorizer.h:
3406         * platform/sql/SQLiteDatabase.h:
3407         * platform/win/MainThreadWin.cpp: Copied from WebCore/platform/win/ThreadingWin.cpp.
3408         (WebCore::initializeThreadingAndMainThread):
3409         * platform/win/MutexWin.cpp: Removed.
3410         * platform/win/ThreadingWin.cpp: Removed.
3411         * platform/wx/MainThreadWx.cpp: Copied from WebCore/platform/wx/ThreadingWx.cpp.
3412         * platform/wx/ThreadingWx.cpp: Removed.
3413         * storage/Database.cpp:
3414         (WebCore::Database::Database):
3415         * storage/Database.h:
3416         * storage/DatabaseTask.h:
3417         * storage/DatabaseThread.h:
3418         * storage/DatabaseTracker.cpp:
3419         * storage/OriginQuotaManager.h:
3420         * storage/SQLError.h:
3421         * storage/SQLResultSet.h:
3422         * storage/SQLStatement.h:
3423         * storage/SQLStatementCallback.h:
3424         * storage/SQLStatementErrorCallback.h:
3425         * storage/SQLTransaction.h:
3426         * storage/SQLTransactionCallback.h:
3427         * storage/SQLTransactionErrorCallback.h:
3428         * webcore-wx.bkl:
3429
3430 2008-02-23  David Kilzer  <ddkilzer@apple.com>
3431
3432         Please clarify licensing for some files
3433         <http://bugs.webkit.org/show_bug.cgi?id=14970>
3434
3435         Reviewed by Darin.
3436
3437         * bindings/objc/WebScriptObject.h: Added Apple BSD-style license.
3438         * bindings/objc/WebScriptObjectPrivate.h: Ditto.
3439         * platform/text/mac/ShapeArabic.c: Added ICU license from WebCore/icu/LICENSE.
3440
3441 2008-02-22  Justin Garcia  <justin.garcia@apple.com>
3442
3443         Reviewed by Anders Carlsson.
3444
3445         <rdar://problem/5714333> Add document.getSelection()
3446         
3447         Add a synonym for window.getSelection() that FF supports.  There were requests in
3448         this bugs dupes to also support the IE only document.selection, but IE's Selection
3449         object is too different than ours currently for that to be safe (specifically, we
3450         don't support enough of IE's TextRange methods on our DOM Range object yet). I
3451         filed <rdar://problem/5761233> to cover that.
3452
3453         * dom/Document.cpp:
3454         (WebCore::Document::getSelection): Added.
3455         * dom/Document.h:
3456         * dom/Document.idl: Ditto.  JS only since this is about web compatibility.
3457
3458 2008-02-22  Oliver Hunt  <oliver@apple.com>
3459
3460         WX build fixes
3461
3462         * WebCoreSources.bkl:
3463
3464 2008-02-22  Oliver Hunt  <oliver@apple.com>
3465
3466         Once more with the cairo/qt/wx build fixing
3467
3468         * platform/graphics/cairo/ImageBufferCairo.cpp:
3469         * platform/graphics/qt/ImageBufferQt.cpp:
3470         * platform/graphics/wx/ImageBufferWx.cpp:
3471
3472 2008-02-22  Mark Rowe  <mrowe@apple.com>
3473
3474         Windows build fix.  Add missing include of DeprecatedCString.h and sort existing includes.
3475
3476         * platform/win/PasteboardWin.cpp:
3477
3478 2008-02-22  Mark Rowe  <mrowe@apple.com>
3479
3480         Speculative Windows build fix.
3481
3482         * platform/win/ClipboardUtilitiesWin.cpp:  Add missing include of DeprecatedCString.h and sort existing includes.
3483         * platform/win/ClipboardWin.cpp:  Ditto.
3484
3485 2008-02-22  Oliver Hunt  <oliver@apple.com>
3486
3487         Build fix for windows, wx and qt
3488
3489         * html/CanvasPixelArray.h:
3490         (WebCore::CanvasPixelArray::set):
3491
3492 2008-02-22  Oliver Hunt  <oliver@apple.com>
3493
3494         Unbreak windows vcproj
3495
3496         * WebCore.vcproj/WebCore.vcproj:
3497
3498 2008-02-22  Oliver Hunt  <oliver@apple.com>
3499
3500         Reviewed by Sam W.
3501
3502         Support Canvas.getImageData and Canvas.createImageData
3503         
3504         This patch adds support for all the pixel reading portions
3505         of the HTML5 Canvas spec.  There are two new types ImageData
3506         and CanvasPixelArray which are used to provide the HTML5
3507         ImageData object, and the required semantics for assignment
3508         to the ImageData data array.
3509         
3510         We only implement the CG version of ImageBuffer::getImageData,
3511         but the logic is null safe, so this will not introduce any
3512         crashes into other platforms, unfortunately it will result in
3513         JS Object detection "lying" on non-CG platforms.
3514
3515         Tests: fast/canvas/canvas-ImageData-behaviour.html
3516                fast/canvas/canvas-getImageData.html
3517
3518         * DerivedSources.make:
3519         * GNUmakefile.am:
3520         * WebCore.pro:
3521         * WebCore.vcproj/WebCore.vcproj:
3522         * WebCore.xcodeproj/project.pbxproj:
3523         * bindings/js/JSCanvasPixelArrayCustom.cpp: Added.
3524         (WebCore::JSCanvasPixelArray::indexGetter):
3525         (WebCore::JSCanvasPixelArray::indexSetter):
3526         (WebCore::toJS):
3527         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3528         * bindings/scripts/CodeGeneratorJS.pm:
3529         * html/CanvasPixelArray.cpp: Added.
3530         (WebCore::CanvasPixelArray::create):
3531         * html/CanvasPixelArray.h: Added.
3532         (WebCore::CanvasPixelArray::data):
3533         (WebCore::CanvasPixelArray::length):
3534         (WebCore::CanvasPixelArray::set):
3535         (WebCore::CanvasPixelArray::get):
3536         * html/CanvasPixelArray.idl: Added.
3537         * html/CanvasRenderingContext2D.cpp:
3538         (WebCore::createEmptyImageData):
3539         (WebCore::CanvasRenderingContext2D::createImageData):
3540         (WebCore::CanvasRenderingContext2D::getImageData):
3541         * html/CanvasRenderingContext2D.h:
3542         * html/CanvasRenderingContext2D.idl:
3543         * html/HTMLCanvasElement.cpp:
3544         (WebCore::HTMLCanvasElement::convertLogicalToDevice):
3545         (WebCore::HTMLCanvasElement::createImageBuffer):
3546         * html/HTMLCanvasElement.h:
3547         * html/ImageData.cpp: Added.
3548         (WebCore::ImageData::create):
3549         (WebCore::ImageData::ImageData):
3550         * html/ImageData.h: Added.
3551         (WebCore::ImageData::width):
3552         (WebCore::ImageData::height):
3553         (WebCore::ImageData::data):
3554         * html/ImageData.idl: Added.
3555         * platform/graphics/ImageBuffer.h:
3556         * platform/graphics/cairo/ImageBufferCairo.cpp:
3557         (WebCore::ImageBuffer::getImageData):
3558         * platform/graphics/cg/ImageBufferCG.cpp:
3559         (WebCore::ImageBuffer::getImageData):
3560         * platform/graphics/qt/ImageBufferQt.cpp:
3561         (WebCore::ImageBuffer::getImageData):
3562         * platform/graphics/wx/ImageBufferWx.cpp:
3563         (WebCore::ImageBuffer::getImageData):
3564
3565 2008-02-22  Sam Weinig  <sam@webkit.org>
3566
3567         Rubber-stamped by Adam Roben.
3568
3569         Rid the project of the Devil known as DeprecatedString!
3570
3571         * GNUmakefile.am:
3572         * WebCore.base.exp:
3573         * WebCore.pro:
3574         * WebCore.vcproj/WebCore.vcproj:
3575         * WebCore.xcodeproj/project.pbxproj:
3576         * WebCoreSources.bkl:
3577         * dom/Node.h:
3578         * html/HTMLFormElement.cpp:
3579         * platform/DeprecatedString.cpp: Removed.
3580         * platform/DeprecatedString.h: Removed.
3581         * platform/graphics/qt/IconQt.cpp:
3582         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3583         * platform/gtk/CookieJarGtk.cpp:
3584         * platform/gtk/CursorGtk.cpp:
3585         * platform/gtk/KeyEventGtk.cpp:
3586         * platform/mac/DeprecatedStringMac.mm: Removed.
3587         * platform/network/qt/ResourceHandleQt.cpp:
3588         * platform/network/win/CookieJarWin.cpp:
3589         (WebCore::cookies):
3590         * platform/qt/ClipboardQt.cpp:
3591         * platform/qt/CookieJarQt.cpp:
3592         * platform/qt/CursorQt.cpp:
3593         * platform/symbian/DeprecatedStringSymbian.cpp: Removed.
3594         * platform/text/AtomicString.cpp:
3595         * platform/text/AtomicString.h:
3596         * platform/text/PlatformString.h:
3597         * platform/text/String.cpp:
3598         * platform/text/StringImpl.cpp:
3599         * platform/text/qt/StringQt.cpp:
3600         (WebCore::String::String):
3601         * platform/text/wx/StringWx.cpp:
3602         * platform/win/BString.cpp:
3603         * platform/win/BString.h:
3604         * platform/win/PasteboardWin.cpp:
3605
3606 2008-02-22  Sam Weinig  <sam@webkit.org>
3607
3608         Reviewed by Geoff Garen.
3609
3610         - Remove use of DeprecatedString in CSSStyleSelector.
3611
3612         * css/CSSStyleSelector.cpp:
3613         (WebCore::findHash): Removed.  Use find instead.
3614         (WebCore::findSlashDotDotSlash): Changed to take a UChar* and a length.
3615         (WebCore::findSlashSlash): Ditto.
3616         (WebCore::findSlashDotSlash): Ditto.
3617         (WebCore::containsColonSlashSlash): Ditto.
3618         (WebCore::cleanPath): Change to operate on a String.
3619         (WebCore::checkPseudoState): Changed to use a Vector as a buffer.
3620
3621 2008-02-22  Geoffrey Garen  <ggaren@apple.com>
3622
3623         Reviewed by Sam Weinig.
3624         
3625         Fixed <rdar://problem/5057509> Repro leak of JSXMLHttpRequest and
3626         associated objects @ www.viamichelin.it, which was probably an underlying
3627         cause of <rdar://problem/5744037> Gmail out of memory (17455)
3628         
3629         If SubresourceLoader::create returned NULL, we would ref() / gcProtect()
3630         the XMLHttpRequest but think we hadn't, therefore never
3631         calling deref() / gcUnprotect().
3632         
3633         This could happen at gmail.com, since gmail.com attempts to send
3634         XMLHttpRequests from unload handlers in order to gather usage statistics.
3635         (According to comments in the code, SubresourceLoader::create returns
3636         NULL when called from an unload handler.)
3637
3638         The solution is to ref() / gcProtect() only if SubresourceLoader::create
3639         doesn't return NULL. This make sense, since we only need to protect the
3640         request as long as it has an outstanding network transaction.
3641         
3642         * xml/XMLHttpRequest.cpp:
3643         (WebCore::XMLHttpRequest::XMLHttpRequest):
3644         (WebCore::XMLHttpRequest::send):
3645
3646 2008-02-22  Darin Adler  <darin@apple.com>
3647
3648         Reviewed, tweaked and landed by Sam.
3649
3650         - Make RegularExpression operate on Strings instead of DeprecatedStrings.
3651
3652         * dom/DOMImplementation.cpp:
3653         (WebCore::DOMImplementation::isXMLMIMEType): Use string instead of DeprecatedString
3654         to build up the RegularExpression.
3655         * page/Frame.cpp:
3656         (WebCore::createRegExpForLabels): Use String instead of DeprecatedString.
3657         (WebCore::Frame::searchForLabelsAboveCell): Ditto.
3658         (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
3659         (WebCore::Frame::matchLabelsAgainstElement): Ditto.
3660         * page/Frame.h:
3661         * page/mac/FrameMac.mm:
3662         (WebCore::regExpForLabels): Ditto.
3663         (WebCore::Frame::searchForNSLabelsAboveCell): Ditto.
3664         (WebCore::Frame::searchForLabelsBeforeElement): Ditto.
3665         (WebCore::Frame::matchLabelsAgainstElement): Ditto.
3666
3667         * platform/text/RegularExpression.cpp:
3668         (WebCore::RegularExpression::Private::Private):
3669         (WebCore::RegularExpression::Private::compile):
3670         (WebCore::RegularExpression::RegularExpression):
3671         (WebCore::RegularExpression::operator=):
3672         (WebCore::RegularExpression::pattern):
3673         (WebCore::RegularExpression::match):
3674         (WebCore::RegularExpression::search):
3675         (WebCore::RegularExpression::searchRev):
3676         (WebCore::replace): Added.
3677         * platform/text/RegularExpression.h:
3678         Change functions to take Strings as input instead of DeprecatedStrings and
3679         reduce the complexity of the class by removing unneeded globbing support.
3680
3681 2008-02-22  Jon Honeycutt  <jhoneycutt@apple.com>
3682
3683         Reviewed by Anders.
3684
3685         <rdar://problem/5760360> REGRESSION(r30376): Crash loading plugin page
3686         during stress test (after only 5 min) - null dereference
3687
3688         Full-frame plug-ins create PluginStream objects without loaders, as the
3689         PluginView receives the loading callbacks. We were trying to call
3690         setDefersLoading on these null pointers.
3691
3692         * plugins/PluginStream.cpp:
3693         (WebCore::PluginStream::startStream): Add null check.
3694         (WebCore::PluginStream::destroyStream): Same.
3695         (WebCore::PluginStream::deliverData): Same.
3696
3697 2008-02-22  Darin Adler  <darin@apple.com>
3698
3699         Reviewed and tweaked by Jon Honeycutt. Reviewed and landed by Sam.
3700
3701         - Remove uses of DeprecatedString in Windows plugin code.
3702
3703         * plugins/win/PluginPackageWin.cpp:
3704         (WebCore::getVersionInfo): Cleanup formatting.
3705         (WebCore::PluginPackage::freeLibraryTimerFired): Remove un-needed variable name.
3706         (WebCore::PluginPackage::storeFileVersion): Move casts.
3707         (WebCore::PluginPackage::fetchInfo): Use OwnArrayPtr and switch to more efficient
3708         use of Vectors.
3709         (WebCore::PluginPackage::load): Fix whitespace.
3710         (WebCore::PluginPackage::hash): Make the hashCodes const
3711         * plugins/win/PluginViewWin.cpp:
3712         (WebCore::makeURL): Use String instead of DeprecatedString.
3713         (WebCore::parseRFC822HeaderFields): Ditto.
3714         (WebCore::PluginView::handlePost): Ditto.
3715         (WebCore::PluginView::status): Ditto.
3716
3717 2008-02-22  Darin Adler  <darin@apple.com>
3718
3719         Reviewed, tweaked and landed by Sam.
3720
3721         - Don't use DeprecatedString in HTMLTokenizer.
3722
3723         * html/HTMLTokenizer.cpp:
3724         (WebCore::HTMLTokenizer::finish):
3725         * platform/text/PlatformString.h:
3726         (WebCore::find):
3727
3728 2008-02-21  Sam Weinig  <sam@webkit.org>
3729
3730         Reviewed by Anders Carlsson.
3731
3732         Fix for <rdar://problem/5757946>
3733
3734         - Parse URLs before checking whether they are javascript: urls
3735           (which require security checks).
3736
3737         * bindings/js/JSAttrCustom.cpp:
3738         (WebCore::JSAttr::setValue):
3739         * bindings/js/JSElementCustom.cpp:
3740         (WebCore::allowSettingSrcToJavascriptURL):
3741         * bindings/js/JSHTMLFrameElementCustom.cpp:
3742         (WebCore::allowSettingJavascriptURL):
3743         * bindings/js/JSHTMLIFrameElementCustom.cpp:
3744         (WebCore::JSHTMLIFrameElement::setSrc):
3745
3746 2008-02-21  Ada Chan  <adachan@apple.com>
3747
3748         <rdar://problem/5757873> Buffer overrun in DeprecatedCString::find() in WebCore
3749         We could get a buffer overrun in DeprecatedCString::find() if the end of the
3750         string matches a beginning portion of the substring, for example, if string is
3751         "a" but the substring is "ab".
3752         The code as is also will not match things correctly under certain situations
3753         since the inner while loop increments the index. For example, we wouldn't find
3754         a match if the string is "aab..." and the substring is "ab".  Changed the 
3755         inner while loop to increment a temporary index into str.
3756         
3757         Test: fast/loader/charset-parse.html
3758
3759         Reviewed by Dan Berstein.
3760
3761         * platform/DeprecatedCString.cpp:
3762         (WebCore::DeprecatedCString::find):
3763
3764 2008-02-21  David Hyatt  <hyatt@apple.com>
3765
3766         Fix for bug 17301.  CSS media queries need to use the correct viewport
3767         when contained in documents inside iframes (rather than always using the
3768         top-level document's viewport).  CSS media queries based on the viewport
3769         also needed to be dynamic and update as you resize the window (this is
3770         a HOT feature). :)
3771
3772         This patch gets Acid3 up to 86/100 with 3 colored boxes filled in.
3773
3774         Reviewed by olliej
3775
3776         Added fast/media/viewport-media-query.html
3777
3778         * css/CSSStyleSelector.cpp:
3779         (WebCore::CSSStyleSelector::CSSStyleSelector):
3780         (WebCore::CSSStyleSelector::addViewportDependentMediaQueryResult):
3781         (WebCore::CSSStyleSelector::affectedByViewportChange):
3782         * css/CSSStyleSelector.h:
3783         (WebCore::MediaQueryResult::MediaQueryResult):
3784         * css/MediaQueryEvaluator.cpp:
3785         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
3786         (WebCore::MediaQueryEvaluator):
3787         (WebCore::MediaQueryEvaluator::eval):
3788         (WebCore::colorMediaFeatureEval):
3789         (WebCore::monochromeMediaFeatureEval):
3790         (WebCore::device_aspect_ratioMediaFeatureEval):
3791         (WebCore::device_pixel_ratioMediaFeatureEval):
3792         (WebCore::gridMediaFeatureEval):
3793         (WebCore::device_heightMediaFeatureEval):
3794         (WebCore::device_widthMediaFeatureEval):
3795         (WebCore::heightMediaFeatureEval):
3796         (WebCore::widthMediaFeatureEval):
3797         (WebCore::min_colorMediaFeatureEval):
3798         (WebCore::max_colorMediaFeatureEval):
3799         (WebCore::min_monochromeMediaFeatureEval):
3800         (WebCore::max_monochromeMediaFeatureEval):
3801         (WebCore::min_device_aspect_ratioMediaFeatureEval):
3802         (WebCore::max_device_aspect_ratioMediaFeatureEval):
3803         (WebCore::min_device_pixel_ratioMediaFeatureEval):
3804         (WebCore::max_device_pixel_ratioMediaFeatureEval):
3805         (WebCore::min_heightMediaFeatureEval):
3806         (WebCore::max_heightMediaFeatureEval):
3807         (WebCore::min_widthMediaFeatureEval):
3808         (WebCore::max_widthMediaFeatureEval):
3809         (WebCore::min_device_heightMediaFeatureEval):
3810         (WebCore::max_device_heightMediaFeatureEval):
3811         (WebCore::min_device_widthMediaFeatureEval):
3812         (WebCore::max_device_widthMediaFeatureEval):
3813         * css/MediaQueryEvaluator.h:
3814         * css/MediaQueryExp.cpp:
3815         (WebCore::MediaQueryExp::~MediaQueryExp):
3816         * css/MediaQueryExp.h:
3817         (WebCore::MediaQueryExp::value):
3818         (WebCore::MediaQueryExp::isViewportDependent):
3819         * html/HTMLMediaElement.cpp:
3820         (WebCore::HTMLMediaElement::pickMedia):
3821         * page/FrameView.cpp:
3822         (WebCore::FrameView::layout):
3823
3824 2008-02-21  Anders Carlsson  <andersca@apple.com>
3825
3826         Reviewed by Sam.
3827
3828         Make more classes start out with a refcount of 1.
3829
3830         * dom/QualifiedName.cpp:
3831         (WebCore::QNameComponentsTranslator::translate):
3832         (WebCore::QualifiedName::QualifiedName):
3833         * dom/QualifiedName.h:
3834         (WebCore::QualifiedName::QualifiedNameImpl::create):
3835         (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
3836         * history/BackForwardList.cpp:
3837         (WebCore::BackForwardList::BackForwardList):
3838         * history/BackForwardList.h:
3839         (WebCore::BackForwardList::create):
3840         * page/Page.cpp:
3841         (WebCore::Page::Page):
3842         * platform/text/CString.cpp:
3843         (WebCore::CString::init):
3844         (WebCore::CString::newUninitialized):
3845         (WebCore::CString::copyBufferIfNeeded):
3846         * platform/text/CString.h:
3847         (WebCore::CStringBuffer::create):
3848         (WebCore::CStringBuffer::CStringBuffer):
3849
3850 2008-02-21  Kevin Ollivier  <kevino@theolliviers.com>
3851
3852         wx build fix for the domString() -> string() rename in r30443.
3853
3854         * platform/graphics/wx/FontPlatformDataWx.cpp:
3855         (WebCore::FontPlatformData::FontPlatformData):
3856
3857 2008-02-21  Antti Koivisto  <antti@apple.com>
3858
3859         Reviewed by Sam Weinig.
3860
3861         <rdar://problem/5753789>
3862         REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
3863         
3864         Ensure all versions of allowsAccessFrom are inlined to single functions. 
3865         This is a 2% win in browser hosted Sunspider. 
3866
3867         * bindings/js/kjs_window.cpp:
3868         (KJS::Window::allowsAccessFrom):
3869         (KJS::Window::allowsAccessFromPrivate):
3870         * bindings/js/kjs_window.h:
3871
3872 2008-02-21  Dan Bernstein  <mitz@apple.com>
3873
3874         Reviewed by Sam Weinig.
3875
3876         - minor cleanup
3877
3878         * rendering/bidi.cpp:
3879         (WebCore::bidiNext): Removed redundant isBR() check -- isText() returns
3880         true for RenderLineBreak.
3881         (WebCore::bidiFirst): Ditto.
3882         (WebCore::shouldSkipWhitespaceAfterStartObject):
3883         (WebCore::RenderBlock::findNextLineBreak):
3884
3885 2008-02-21  Geoffrey Garen  <ggaren@apple.com>
3886
3887         Reviewed by David Harrison.
3888         
3889         Fixed <rdar://problem/5756125> REGRESSION: A crash occurs at 
3890         WebCore::Frame::scriptProxy() when completing a search with Package Tracker widget
3891
3892         Test: fast/dom/script-element-without-frame-crash.html
3893
3894         * html/HTMLTokenizer.cpp:
3895         (WebCore::HTMLTokenizer::parseTag): Added back a NULL check that was
3896         accidentally removed in r30325.
3897
3898 2008-02-21  Rodney Dawes  <dobey@wayofthemonkey.com>
3899
3900         GTK+ build fix. s/domString()/string()/
3901
3902         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3903         (FontPlatformData::FontPlatformData):
3904
3905 2008-02-20  Dan Bernstein  <mitz@apple.com>
3906
3907         Reviewed by Dave Hyatt.
3908
3909         - fix http://bugs.webkit.org/show_bug.cgi?id=17465
3910           REGRESSION: <DIV> tokenized into Div if still searching for DOCTYPE
3911
3912         Test: fast/tokenizer/doctype-search-reset.html
3913
3914         * html/HTMLTokenizer.cpp:
3915         (WebCore::HTMLTokenizer::parseTag):
3916
3917 2008-02-20  Dan Bernstein  <mitz@apple.com>
3918
3919         Reviewed by Dave Hyatt.
3920
3921         - fix http://bugs.webkit.org/show_bug.cgi?id=17464
3922           REGRESSION: Crash in RenderBlock::findNextLineBreak reading r30444 commit email in GMail
3923
3924         Test: fast/text/wbr-in-pre-crash.html
3925
3926         * rendering/bidi.cpp:
3927         (WebCore::RenderBlock::findNextLineBreak):
3928
3929 2008-02-20  Oliver Hunt  <oliver@apple.com>
3930
3931         Reviewed by Hyatt.
3932
3933         Bug 17303: Canvas crash in ImageBuffer
3934
3935         We handle a null GraphicsContext everywhere, but we weren't checking for 
3936         a null ImageBuffer, which is what will result in a null GraphicsContext in
3937         the first place.
3938
3939         Test: fast/canvas/access-zero-sized-canvas.html
3940
3941         * html/HTMLCanvasElement.cpp:
3942
3943 2008-02-20  David Hyatt  <hyatt@apple.com>
3944
3945         Fix the layout test failure that never should have passed in the first
3946         place by making changes to media lists actually result in the recomputation
3947         of the style selector.  Now it passes for the right reasons and not because
3948         of dumb luck.
3949
3950         Reviewed by Sam Weinig
3951
3952         * css/MediaList.cpp:
3953         (WebCore::MediaList::deleteMedium):
3954         (WebCore::MediaList::setMediaText):
3955         (WebCore::MediaList::appendMedium):
3956         (WebCore::MediaList::notifyChanged):
3957         * css/MediaList.h:
3958         * dom/Document.cpp:
3959         (WebCore::Document::attach):
3960
3961 2008-02-20  Darin Adler  <darin@apple.com>
3962
3963         Reviewed, tweaked and landed by Sam.
3964
3965         - make markup functions not use DeprecatedString.
3966
3967         * editing/markup.cpp:
3968         (WebCore::append): Added.
3969         (WebCore::escapeContentText): Build up string using a Vector.
3970         (WebCore::appendStartMarkup): Use String instead of DeprecatedString.
3971
3972 2008-02-20  Darin Adler  <darin@apple.com>
3973
3974         Reviewed, tweaked and landed by Sam.
3975
3976         - make TextIterator use a Vector instead of a DeprecatedString.
3977
3978         * editing/TextIterator.cpp:
3979         (WebCore::CharacterIterator::string): Build up the String using a
3980         Vector.
3981         (WebCore::WordAwareIterator::advance): Switch to using Vector functions.
3982         (WebCore::WordAwareIterator::length): Ditto.
3983         (WebCore::WordAwareIterator::characters): Ditto.
3984         * editing/TextIterator.h: Use a Vector<UChar> for the buffer instead
3985         of DeprecatedString.
3986
3987 2008-02-20  Darin Adler  <darin@apple.com>
3988
3989         Reviewed, tweaked and landed by Sam.
3990
3991         - make HTMLInterchange return a String instead of a DeprecatedString
3992
3993         * editing/HTMLInterchange.cpp:
3994         (WebCore::): Return a String from convertedSpaceString.
3995         (WebCore::convertHTMLTextToInterchangeFormat): Use a Vector instead of
3996         a DeprecatedString to build up the return String.
3997         * editing/HTMLInterchange.h:
3998
3999 2008-02-20  Eric Seidel  <eric@webkit.org>
4000
4001         Reviewed by Oliver.
4002
4003         Remove m_drawingContext and change m_data to m_imageBuffer
4004
4005         * html/HTMLCanvasElement.cpp:
4006         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
4007         (WebCore::HTMLCanvasElement::reset):
4008         (WebCore::HTMLCanvasElement::paint):
4009         (WebCore::HTMLCanvasElement::createImageBuffer):
4010         (WebCore::HTMLCanvasElement::buffer):
4011         (WebCore::HTMLCanvasElement::createPlatformImage):
4012         * html/HTMLCanvasElement.h:
4013
4014 2008-02-20  Anders Carlsson  <andersca@apple.com>
4015
4016         Reviewed by Sam.
4017
4018         Rename AtomicString::domString() to AtomicString::string().
4019         
4020         * css/CSSComputedStyleDeclaration.cpp:
4021         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
4022         * css/CSSFontSelector.cpp:
4023         (WebCore::CSSFontSelector::getFontData):
4024         * dom/Attr.cpp:
4025         (WebCore::Attr::createTextChild):
4026         * dom/Comment.cpp:
4027         (WebCore::Comment::nodeName):
4028         * dom/Document.cpp:
4029         (WebCore::Document::recalcStyleSelector):
4030         (WebCore::Document::setHTMLWindowEventListener):
4031         (WebCore::Document::formElementsState):
4032         * dom/StyledElement.cpp:
4033         (WebCore::StyledElement::parseMappedAttribute):
4034         * dom/Text.cpp:
4035         (WebCore::Text::nodeName):
4036         * editing/SelectionController.cpp:
4037         (WebCore::SelectionController::debugRenderer):
4038         * html/HTMLCollection.cpp:
4039         (WebCore::HTMLCollection::checkForNameMatch):
4040         * html/HTMLElement.cpp:
4041         (WebCore::HTMLElement::nodeName):
4042         (WebCore::HTMLElement::setHTMLEventListener):
4043         * html/HTMLFormCollection.cpp:
4044         (WebCore::HTMLFormCollection::getNamedFormItem):
4045         * html/HTMLImageElement.cpp:
4046         (WebCore::HTMLImageElement::parseMappedAttribute):
4047         (WebCore::HTMLImageElement::isURLAttribute):
4048         * html/HTMLLinkElement.cpp:
4049         (WebCore::HTMLLinkElement::parseMappedAttribute):
4050         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
4051         * html/HTMLObjectElement.cpp:
4052         (WebCore::HTMLObjectElement::isURLAttribute):
4053         (WebCore::HTMLObjectElement::containsJavaApplet):
4054         * html/HTMLParamElement.cpp:
4055         (WebCore::HTMLParamElement::isURLAttribute):
4056         * html/HTMLParser.cpp:
4057         (WebCore::HTMLParser::handleIsindex):
4058         * html/HTMLScriptElement.cpp:
4059         (WebCore::HTMLScriptElement::insertedIntoDocument):
4060         (WebCore::HTMLScriptElement::shouldExecuteAsJavaScript):
4061         * html/HTMLStyleElement.cpp:
4062         (WebCore::HTMLStyleElement::parseMappedAttribute):
4063         * html/HTMLTokenizer.cpp:
4064         (WebCore::HTMLTokenizer::parseTag):
4065         * html/HTMLViewSourceDocument.cpp:
4066         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
4067         * loader/FrameLoader.cpp:
4068         (WebCore::FrameLoader::saveDocumentState):
4069         * page/FrameTree.cpp:
4070         (WebCore::FrameTree::uniqueChildName):
4071         * platform/text/AtomicString.h:
4072         (WebCore::AtomicString::string):
4073         (WebCore::AtomicString::contains):
4074         (WebCore::AtomicString::find):
4075         (WebCore::AtomicString::startsWith):
4076         (WebCore::AtomicString::endsWith):
4077         * rendering/RenderPartObject.cpp:
4078         (WebCore::RenderPartObject::updateWidget):
4079         * svg/SVGElement.cpp:
4080         (WebCore::SVGElement::addSVGEventListener):
4081         * svg/SVGSVGElement.cpp:
4082         (WebCore::SVGSVGElement::addSVGWindowEventListener):
4083         * xml/XPathFunctions.cpp:
4084         (WebCore::XPath::FunLocalName::evaluate):
4085         (WebCore::XPath::FunNamespaceURI::evaluate):
4086         (WebCore::XPath::FunName::evaluate):
4087
4088 2008-02-20  Brent Fulgham  <bfulgham@gmail.com>
4089
4090         Reviewed by Dan.
4091
4092         http://bugs.webkit.org/show_bug.cgi?id=17336
4093         Provide implementations for Windows (Cairo) build of WebKit that
4094         handles font formatting.
4095         - Split font implementation files to allow maximal code sharing
4096           between CG and Cairo back-ends. 
4097
4098         * WebCore.vcproj/WebCore.vcproj:
4099         * platform/graphics/SimpleFontData.h:   Add signatures for private win
4100           initialization functions.
4101         * platform/graphics/win/FontCacheWin.cpp:
4102         (WebCore::FontCache::platformInit):
4103         (WebCore::FontCache::createFontPlatformData):
4104         * platform/graphics/win/FontCairoWin.cpp: Removed.  Universal version
4105           is now part of platform/graphics/cairo.
4106         * platform/graphics/win/FontCustomPlatformDataCairo.cpp: Added.
4107         (WebCore::FontCustomPlatformDataCairo::~FontCustomPlatformDataCairo):
4108         (WebCore::FontCustomPlatformDataCairo::fontPlatformData):
4109         (WebCore::releaseData):
4110         (WebCore::createFontCustomPlatformData):
4111         * platform/graphics/win/FontCustomPlatformDataCairo.h: Added.
4112         (WebCore::FontCustomPlatformDataCairo::FontCustomPlatformDataCairo):
4113         * platform/graphics/win/FontPlatformData.h:
4114         (WebCore::FontPlatformData::FontPlatformData):
4115         (WebCore::FontPlatformData::fontFace):
4116         (WebCore::FontPlatformData::scaledFont):
4117         (WebCore::FontPlatformData::operator==):
4118         * platform/graphics/win/FontPlatformDataCGWin.cpp: Copied from WebCore/platform/graphics/win/FontPlatformDataWin.cpp.
4119         (WebCore::FontPlatformData::platformDataInit):
4120         * platform/graphics/win/FontPlatformDataCairoWin.cpp: Added.
4121         (WebCore::FontPlatformData::platformDataInit):
4122         (WebCore::FontPlatformData::FontPlatformData):
4123         (WebCore::FontPlatformData::setFont):
4124         * platform/graphics/win/FontPlatformDataWin.cpp:  Moved CG-specific
4125           code to FontPlatformDataCG.cpp.
4126         (WebCore::FontPlatformData::FontPlatformData):
4127         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
4128         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Copied from WebCore/platform/graphics/win/GlyphPageTreeNodeWin.cpp.
4129         (WebCore::GlyphPage::fill):
4130         * platform/graphics/win/GlyphPageTreeNodeWin.cpp: Removed.  Replaced
4131           with CG- and Cairo-specific versions.
4132         * platform/graphics/win/SimpleFontDataCGWin.cpp:
4133         (WebCore::SimpleFontData::platformInit):
4134         (WebCore::SimpleFontData::platformDestroy):
4135         (WebCore::SimpleFontData::platformWidthForGlyph):
4136         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
4137         (WebCore::SimpleFontData::platformInit):
4138         (WebCore::SimpleFontData::platformDestroy):
4139         (WebCore::SimpleFontData::platformWidthForGlyph):
4140         (WebCore::SimpleFontData::setFont):
4141         * platform/graphics/win/SimpleFontDataWin.cpp:
4142         (WebCore::SimpleFontData::initGDIFont):
4143         (WebCore::SimpleFontData::platformCommonDestroy):
4144         (WebCore::SimpleFontData::widthForGDIGlyph):
4145
4146 2008-02-20  Darin Adler  <darin@apple.com>
4147
4148         Reviewed by Sam.
4149
4150         * dom/Node.h: Took out unneeded forward declaration of TextStream.
4151
4152 2008-02-20  Darin Adler  <darin@apple.com>
4153
4154         Reviewed by Sam.
4155
4156         * rendering/RenderObject.h: Took out unneeded forward declaration of TextStream.
4157
4158 2008-02-20  David Hyatt  <hyatt@apple.com>
4159
4160         Fix for bug 16760, incorrect <object> MIME type handling and fallback
4161         handling.
4162
4163         Reviewed by darin
4164
4165         * html/HTMLImageLoader.cpp:
4166         (WebCore::HTMLImageLoader::notifyFinished):
4167         If the image had an error, make sure to do <object> fallback.
4168
4169         * html/HTMLObjectElement.cpp:
4170         (WebCore::HTMLObjectElement::renderFallbackContent):
4171         Before doing fallback check if there is a MIME type mismatch between
4172         an image type and a non-image type.  If so, detach and re-attach after
4173         storing the correct MIME type.
4174
4175         * loader/loader.cpp:
4176         (WebCore::Loader::didReceiveData):
4177         Consider it an error when a 404 is encountered on a CachedResource load.
4178
4179 2008-02-20  Anders Carlsson  <andersca@apple.com>
4180
4181         Reviewed by Sam.
4182
4183         StringImpl constructors used by AtomicString should start with a refcount of 1.
4184         
4185         * platform/text/AtomicString.cpp:
4186         (WebCore::AtomicString::add):
4187         * platform/text/AtomicString.h:
4188         * platform/text/StringImpl.cpp:
4189         (WebCore::StringImpl::StringImpl):
4190
4191 2008-02-20  Darin Adler  <darin@apple.com>
4192
4193         * bindings/js/kjs_navigator.cpp:
4194         (WebCore::needsYouTubeQuirk): Tweak comments.
4195
4196 2008-02-20  Anders Carlsson  <andersca@apple.com>
4197
4198         Reviewed by Darin.
4199
4200         Change all refcounted classes in page/ to start with a refcount of 1.
4201
4202         * page/BarInfo.cpp:
4203         (WebCore::BarInfo::BarInfo):
4204         * page/BarInfo.h:
4205         (WebCore::BarInfo::create):
4206         * page/Console.cpp:
4207         (WebCore::Console::Console):
4208         * page/Console.h:
4209         (WebCore::Console::create):
4210         * page/DOMSelection.cpp:
4211         (WebCore::DOMSelection::DOMSelection):
4212         * page/DOMSelection.h:
4213         (WebCore::DOMSelection::create):
4214         * page/DOMWindow.cpp:
4215         (WebCore::DOMWindow::DOMWindow):
4216         (WebCore::DOMWindow::screen):
4217         (WebCore::DOMWindow::history):
4218         (WebCore::DOMWindow::locationbar):
4219         (WebCore::DOMWindow::menubar):
4220         (WebCore::DOMWindow::personalbar):
4221         (WebCore::DOMWindow::scrollbars):
4222         (WebCore::DOMWindow::statusbar):
4223         (WebCore::DOMWindow::toolbar):
4224         (WebCore::DOMWindow::console):
4225         (WebCore::DOMWindow::getSelection):
4226         * page/DOMWindow.h:
4227         (WebCore::DOMWindow::create):
4228         * page/Frame.cpp:
4229         (WebCore::Frame::domWindow):
4230         * page/History.cpp:
4231         (WebCore::History::History):
4232         * page/History.h:
4233         (WebCore::History::create):
4234         * page/InspectorController.cpp:
4235         (WebCore::InspectorResource::create):
4236         (WebCore::InspectorResource::InspectorResource):
4237         (WebCore::InspectorDatabaseResource::create):
4238         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
4239         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
4240         (WebCore::InspectorController::identifierForInitialRequest):
4241         (WebCore::InspectorController::didOpenDatabase):
4242         * page/Plugin.h:
4243         (WebCore::Plugin::create):