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