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