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