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