f796807dc561dcea4047f52639c983da14296ad4
[WebKit-https.git] / WebCore / ChangeLog
1 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
2
3         Rubber-stamped by Darin Adler.
4
5         Don't keep platform objects for authentication challenge in ResourceHandleInternal.
6         We already have a copy in AuthenticationChallenge object.
7
8         * platform/network/ResourceHandle.cpp:
9         (WebCore::ResourceHandle::clearAuthentication):
10         * platform/network/ResourceHandleInternal.h:
11         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
12         * platform/network/cf/ResourceHandleCFNet.cpp:
13         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
14         (WebCore::ResourceHandle::receivedCredential):
15         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
16         (WebCore::ResourceHandle::receivedCancellation):
17         * platform/network/mac/ResourceHandleMac.mm:
18         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
19         (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
20         (WebCore::ResourceHandle::receivedCredential):
21         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
22         (WebCore::ResourceHandle::receivedCancellation):
23
24 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
25
26         Reviewed by Sam Weinig.
27
28         Nixed some now-defunct autogeneration code.
29
30         * bindings/scripts/CodeGeneratorJS.pm:
31
32 2009-04-14  Eric Carlson  <eric.carlson@apple.com>
33
34         Reviewed by Alexey Proskuryakov.
35         
36         Fix <rdar://problem/6755724> <audio> and <video> elements can reference local 
37         file:/// URLs from remote in Safari
38
39         Tests: http/tests/security/local-video-poster-from-remote.html
40                http/tests/security/local-video-source-from-remote.html
41                http/tests/security/local-video-src-from-remote.html
42
43         * html/HTMLMediaElement.cpp:
44         (WebCore::HTMLMediaElement::loadResource): Don't pass url to media engine unless loader->canLoad()
45         says it is OK.
46
47 2009-04-14  Sam Weinig  <sam@webkit.org>
48
49         Reviewed by Darin Adler.
50
51         Part of <rdar://problem/6150868>
52         Fix incorrect handling of content that needs to go into the head element
53         once the head element has been removed.
54
55         Test: fast/parser/head-content-after-head-removal.html
56
57         * html/HTMLParser.cpp:
58         (WebCore::HTMLParser::HTMLParser): Remove unneeded initializer of m_head.
59         (WebCore::HTMLParser::handleError): Update since m_head is now a RefPtr.
60         (WebCore::HTMLParser::createHead): Ditto.
61         * html/HTMLParser.h: Make m_head a RefPtr.
62
63 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
64
65         Used svn merge -r42529:42528 to roll out my last patch because it broke
66         the build.
67
68         * bindings/js/JSDOMGlobalObject.cpp:
69         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
70         (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
71         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
72         (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
73         (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
74         * bindings/js/JSDOMGlobalObject.h:
75
76 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
77
78         Reviewed by Sam Weinig.
79
80         Nixed some now-dead code related to protected event listeners.
81
82         * bindings/js/JSDOMGlobalObject.cpp:
83         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
84         * bindings/js/JSDOMGlobalObject.h:
85
86 2009-04-14  Geoffrey Garen  <ggaren@apple.com>
87
88         Reviewed by Sam Weinig.
89
90         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
91         Unbounded memory growth when churning elements with anonymous event handler functions
92
93         Stop using protected event listeners on SVGElementInstance.
94
95         * bindings/js/JSSVGElementInstanceCustom.cpp:
96         (WebCore::JSSVGElementInstance::mark): Mark our event listeners, since
97         they're not protected anymore.
98
99         (WebCore::JSSVGElementInstance::addEventListener):
100         (WebCore::JSSVGElementInstance::removeEventListener): Make unprotected
101         event listeners, since we mark them now.
102
103         * bindings/scripts/CodeGeneratorJS.pm: Autogenerate event listener
104         invalidation for SVGElementInstance.
105
106         * svg/SVGElementInstance.h:
107         (WebCore::SVGElementInstance::eventListeners): Added an accessor, for
108         the sake of autogenerated code.
109
110         * svg/SVGElementInstance.idl: Removed the ProtectedEventListener attribute
111         from event listener properties. Added a CustomMarkFunction attribute,
112         since we need to mark our event listeners.
113
114 2009-04-14  Steve Falkenburg  <sfalken@apple.com>
115
116         Windows build fix.
117
118         * WebCore.vcproj/WebCore.vcproj:
119
120 2009-04-14  Steve Falkenburg  <sfalken@apple.com>
121
122         Add header guards to WebCore forwarding headers.
123         
124         Speeds up WebCore debug build on Windows by 12% on my system,
125         since Visual Studio appears to not optimize for standard header
126         guards in included files.
127         
128         Rubber stamped by Ada Chan.
129
130         * ForwardingHeaders/debugger/Debugger.h:
131         * ForwardingHeaders/debugger/DebuggerActivation.h:
132         * ForwardingHeaders/debugger/DebuggerCallFrame.h:
133         * ForwardingHeaders/interpreter/CallFrame.h:
134         * ForwardingHeaders/interpreter/Interpreter.h:
135         * ForwardingHeaders/masm/X86Assembler.h:
136         * ForwardingHeaders/parser/Parser.h:
137         * ForwardingHeaders/parser/SourceCode.h:
138         * ForwardingHeaders/parser/SourceProvider.h:
139         * ForwardingHeaders/pcre/pcre.h:
140         * ForwardingHeaders/profiler/Profile.h:
141         * ForwardingHeaders/profiler/ProfileNode.h:
142         * ForwardingHeaders/profiler/Profiler.h:
143         * ForwardingHeaders/runtime/ArgList.h:
144         * ForwardingHeaders/runtime/ArrayPrototype.h:
145         * ForwardingHeaders/runtime/BooleanObject.h:
146         * ForwardingHeaders/runtime/CallData.h:
147         * ForwardingHeaders/runtime/Collector.h:
148         * ForwardingHeaders/runtime/CollectorHeapIterator.h:
149         * ForwardingHeaders/runtime/Completion.h:
150         * ForwardingHeaders/runtime/ConstructData.h:
151         * ForwardingHeaders/runtime/DateInstance.h:
152         * ForwardingHeaders/runtime/Error.h:
153         * ForwardingHeaders/runtime/FunctionConstructor.h:
154         * ForwardingHeaders/runtime/FunctionPrototype.h:
155         * ForwardingHeaders/runtime/Identifier.h:
156         * ForwardingHeaders/runtime/InitializeThreading.h:
157         * ForwardingHeaders/runtime/InternalFunction.h:
158         * ForwardingHeaders/runtime/JSArray.h:
159         * ForwardingHeaders/runtime/JSByteArray.h:
160         * ForwardingHeaders/runtime/JSFunction.h:
161         * ForwardingHeaders/runtime/JSGlobalData.h:
162         * ForwardingHeaders/runtime/JSGlobalObject.h:
163         * ForwardingHeaders/runtime/JSLock.h:
164         * ForwardingHeaders/runtime/JSNumberCell.h:
165         * ForwardingHeaders/runtime/JSObject.h:
166         * ForwardingHeaders/runtime/JSString.h:
167         * ForwardingHeaders/runtime/JSValue.h:
168         * ForwardingHeaders/runtime/Lookup.h:
169         * ForwardingHeaders/runtime/ObjectPrototype.h:
170         * ForwardingHeaders/runtime/Operations.h:
171         * ForwardingHeaders/runtime/PropertyMap.h:
172         * ForwardingHeaders/runtime/PropertyNameArray.h:
173         * ForwardingHeaders/runtime/Protect.h:
174         * ForwardingHeaders/runtime/PrototypeFunction.h:
175         * ForwardingHeaders/runtime/StringObject.h:
176         * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h:
177         * ForwardingHeaders/runtime/StringPrototype.h:
178         * ForwardingHeaders/runtime/Structure.h:
179         * ForwardingHeaders/runtime/SymbolTable.h:
180         * ForwardingHeaders/runtime/UString.h:
181         * ForwardingHeaders/wrec/WREC.h:
182         * ForwardingHeaders/wtf/ASCIICType.h:
183         * ForwardingHeaders/wtf/AlwaysInline.h:
184         * ForwardingHeaders/wtf/Assertions.h:
185         * ForwardingHeaders/wtf/ByteArray.h:
186         * ForwardingHeaders/wtf/CurrentTime.h:
187         * ForwardingHeaders/wtf/Deque.h:
188         * ForwardingHeaders/wtf/DisallowCType.h:
189         * ForwardingHeaders/wtf/FastMalloc.h:
190         * ForwardingHeaders/wtf/Forward.h:
191         * ForwardingHeaders/wtf/GetPtr.h:
192         * ForwardingHeaders/wtf/HashCountedSet.h:
193         * ForwardingHeaders/wtf/HashFunctions.h:
194         * ForwardingHeaders/wtf/HashMap.h:
195         * ForwardingHeaders/wtf/HashSet.h:
196         * ForwardingHeaders/wtf/HashTable.h:
197         * ForwardingHeaders/wtf/HashTraits.h:
198         * ForwardingHeaders/wtf/ListHashSet.h:
199         * ForwardingHeaders/wtf/ListRefPtr.h:
200         * ForwardingHeaders/wtf/Locker.h:
201         * ForwardingHeaders/wtf/MainThread.h:
202         * ForwardingHeaders/wtf/MathExtras.h:
203         * ForwardingHeaders/wtf/MessageQueue.h:
204         * ForwardingHeaders/wtf/Noncopyable.h:
205         * ForwardingHeaders/wtf/NotFound.h:
206         * ForwardingHeaders/wtf/OwnArrayPtr.h:
207         * ForwardingHeaders/wtf/OwnPtr.h:
208         * ForwardingHeaders/wtf/PassRefPtr.h:
209         * ForwardingHeaders/wtf/Platform.h:
210         * ForwardingHeaders/wtf/PtrAndFlags.h:
211         * ForwardingHeaders/wtf/RandomNumber.h:
212         * ForwardingHeaders/wtf/RefCounted.h:
213         * ForwardingHeaders/wtf/RefCountedLeakCounter.h:
214         * ForwardingHeaders/wtf/RefPtr.h:
215         * ForwardingHeaders/wtf/RetainPtr.h:
216         * ForwardingHeaders/wtf/StdLibExtras.h:
217         * ForwardingHeaders/wtf/StringExtras.h:
218         * ForwardingHeaders/wtf/ThreadSpecific.h:
219         * ForwardingHeaders/wtf/Threading.h:
220         * ForwardingHeaders/wtf/TypeTraits.h:
221         * ForwardingHeaders/wtf/UnusedParam.h:
222         * ForwardingHeaders/wtf/Vector.h:
223         * ForwardingHeaders/wtf/VectorTraits.h:
224         * ForwardingHeaders/wtf/dtoa.h:
225         * ForwardingHeaders/wtf/unicode/Collator.h:
226         * ForwardingHeaders/wtf/unicode/UTF8.h:
227         * ForwardingHeaders/wtf/unicode/Unicode.h:
228         * ForwardingHeaders/wtf/unicode/icu/UnicodeIcu.h:
229
230 2009-04-14  Sam Weinig  <sam@webkit.org>
231
232         Reviewed by Adele Peterson.
233
234         Use a template function to generalize the way we create non-caching
235         JS function getters.
236
237         * bindings/js/JSDOMWindowCustom.cpp:
238         * bindings/js/JSDOMWindowCustom.h:
239         (WebCore::nonCachingStaticFunctionGetter):
240         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
241
242 2009-04-14  Benjamin C Meyer  <benjamin.meyer@torchmobile.com>
243
244         Reviewed by George Staikos.
245
246         https://bugs.webkit.org/show_bug.cgi?id=25099
247
248         When creating a QNetworkRequest make sure to populate the
249         CacheLoadControlAttribute with the value set by the ResourceRequest::cachePolicy() so that the cache will be used as WebKit expects.
250
251         * WebKit/qt/tests/qwebpage/tst_qwebpage.cpp:
252         (tst_QWebPage::requestCache):
253
254         * platform/network/qt/ResourceRequestQt.cpp:
255         (WebCore::ResourceRequest::toNetworkRequest):
256
257 2009-04-14  Timothy Hatcher  <timothy@apple.com>
258
259         Fix a world leak caused by opening the Web Inspector. This was
260         a regression caused by the InspectorController becoming refcounted.
261
262         <rdar://problem/6782944>
263
264         Reviewed by Darin Adler.
265
266         * bindings/js/ScriptObject.cpp:
267         (WebCore::ScriptGlobalObject::get): Renamed to better match the
268         other functions.
269         (WebCore::ScriptGlobalObject::remove): Added. Deletes the property.
270         * bindings/js/ScriptObject.h:
271         * inspector/InspectorController.cpp:
272         (WebCore::InspectorController::~InspectorController): Do less work
273         at destruction time since the object lifetime is tied to JS GC.
274         Assert that inspectedPageDestroyed cleared everything needed.
275         (WebCore::InspectorController::inspectedPageDestroyed): Do most
276         of the work that ~InspectorController was doing.
277         (WebCore::InspectorController::scriptObjectReady): Renamed getObject.
278
279 2009-04-14  Antony Sargent  <asargent@chromium.org>
280
281         Reviewed by Dimitri Glazkov.
282
283         This is some cleanup motivated by the crash in http://crbug.com/9775 , which 
284         happens because of calling window.open inside a window.onload handler. 
285
286         These changes are just part of the fix, along with some asserts to help prevent
287         breakage on future changes. 
288
289         https://bugs.webkit.org/show_bug.cgi?id=25132
290
291         * bindings/v8/V8EventListenerList.cpp:
292         (WebCore::V8EventListenerList::add):
293         (WebCore::V8EventListenerList::remove):
294         (WebCore::V8EventListenerList::clear):
295         * bindings/v8/V8EventListenerList.h:
296         (WebCore::V8EventListenerList::size):
297
298 2009-04-14  Evan Martin  <evan@chromium.org>
299
300         Reviewed by Darin Adler.
301
302         https://bugs.webkit.org/show_bug.cgi?id=25142
303         Fix a race that can occur between flex and the perl script that parses
304         its output.
305
306         * css/maketokenizer: Consume all input.
307
308 2009-04-14  Rohit Rao  <rohitrao@google.com>
309
310         Reviewed by Dan Bernstein.
311
312         https://bugs.webkit.org/show_bug.cgi?id=25184
313         Do not change the text color for selected text in Mac Chromium.
314
315         * rendering/RenderThemeChromiumMac.h:
316         (WebCore::RenderThemeChromiumMac::supportsSelectionForegroundColors):
317         Now returns false, matching the behavior of Safari on Mac.
318
319 2009-04-14  Justin Garcia  <justin.garcia@apple.com>
320
321         Reviewed by Eric Seidel.
322
323         https://bugs.webkit.org/show_bug.cgi?id=25172
324         Extra partial layout during the first keypress in an empty block
325         
326         Determining if a placeholder needs to be removed requires the creation of a VisiblePosition 
327         which was triggering layout before we were finished modifying the DOM for the insert operation.
328         
329         Find out if we need to remove a placeholder near the start of the operation, and if we do remember 
330         where it's located.  Then, later, remove it along with all of the other DOM operations we perform.
331         
332         Renamed lineBreakExistsAtPosition to lineBreakExistsAtVisiblePosition and added a lineBreakExistsAtPosition
333         that takes in a Position.  In InsertTextCommand, we can use the latter, since we normalize manually.
334         
335         removePlaceholderAt now takes in a Position that it assumes has already been checked for a placeholder.
336         
337         No test added as this only effects performance.
338
339         * editing/BreakBlockquoteCommand.cpp:
340         (WebCore::BreakBlockquoteCommand::doApply):
341         * editing/CompositeEditCommand.cpp:
342         (WebCore::CompositeEditCommand::removePlaceholderAt):
343         (WebCore::CompositeEditCommand::moveParagraphs):
344         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
345         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
346         * editing/CompositeEditCommand.h:
347         * editing/DeleteSelectionCommand.cpp:
348         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
349         (WebCore::DeleteSelectionCommand::doApply):
350         * editing/FormatBlockCommand.cpp:
351         (WebCore::FormatBlockCommand::doApply):
352         * editing/InsertLineBreakCommand.cpp:
353         (WebCore::InsertLineBreakCommand::doApply):
354         * editing/InsertParagraphSeparatorCommand.cpp:
355         (WebCore::InsertParagraphSeparatorCommand::doApply):
356         * editing/InsertTextCommand.cpp:
357         (WebCore::InsertTextCommand::input):
358         * editing/htmlediting.cpp:
359         (WebCore::lineBreakExistsAtVisiblePosition):
360         (WebCore::lineBreakExistsAtPosition):
361         * editing/htmlediting.h:
362
363 2009-04-14  Adam Roben  <aroben@apple.com>
364
365         Remove support for profile-guided optimization on Windows
366
367         Rubber-stamped by Steve Falkenburg.
368
369         * WebCore.vcproj/WebCore.vcproj: Removed the Release_PGO
370         configuration.
371
372 2009-04-14  Dmitry Titov  <dimich@chromium.org>
373
374         Reviewed by Dimitri Glazkov.
375
376         https://bugs.webkit.org/show_bug.cgi?id=25163
377         Upstream fix for releasing v8 objects on worker thread termination in Chromium.
378
379         * bindings/v8/V8DOMMap.cpp:
380         (WebCore::domDataList): Now uses Vector instead of HashMap.
381         (WebCore::domDataListMutex):
382         (WebCore::ThreadSpecificDOMData::ThreadSpecificDOMData):  remove usage of currentThread();
383         (WebCore::ThreadSpecificDOMData::~ThreadSpecificDOMData): ditto.
384         (WebCore::NonMainThreadSpecificDOMData::~NonMainThreadSpecificDOMData): moved call to removeAllDOMObjectsInCurrentThread() to ~WorkerScriptController.
385         (WebCore::handleWeakObjectInOwningThread):
386         (WebCore::derefDelayedObjects):
387         (WebCore::removeAllDOMObjectsInCurrentThread): not static anymore.
388         * bindings/v8/V8DOMMap.h:
389         * bindings/v8/WorkerContextExecutionProxy.cpp:
390         (WebCore::WorkerContextExecutionProxy::dispose): removed code that avoided dual-dereference of WorkerContext.
391         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): this ref() is countered in removeAllDOMObjectsInCurrentThread(), when the WorkerContext is removed from the v8 map.
392         * bindings/v8/WorkerScriptController.cpp:
393         (WebCore::WorkerScriptController::~WorkerScriptController):
394
395 2009-04-14  Adam Roben  <aroben@apple.com>
396
397         Fix Bug 25183: Split up WebCore.vcproj's settings into vsprops files
398
399         <https://bugs.webkit.org/show_bug.cgi?id=25183>
400
401         WebCore.vcproj now uses a set of .vsprops files to store most of its
402         settings.
403
404         Reviewed by Darin Adler.
405
406         * WebCore.vcproj/WebCore.vcproj: Moved settings from here into the new
407         .vsprops files.
408
409         * WebCore.vcproj/WebCoreCFNetwork.vsprops: Added. Contains settings
410         for ports that build against CFNetwork.
411         * WebCore.vcproj/WebCoreCG.vsprops: Added. Contains settings for ports
412         that build against CoreGraphics.
413         * WebCore.vcproj/WebCoreCURL.vsprops: Added. Contains settings for
414         ports that build against libcurl.
415         * WebCore.vcproj/WebCoreCairo.vsprops: Added. Contains settings for
416         ports that build against Cairo.
417         * WebCore.vcproj/WebCoreCommon.vsprops: Added. Contains settings
418         shared by all ports.
419         * WebCore.vcproj/WebCoreMediaQT.vsprops: Added. Contains settings for
420         ports that use QTMovieWin to implement the MediaPlayerPrivate
421         interface.
422         * WebCore.vcproj/WebCorePthreads.vsprops: Added. Contains settings for
423         ports that build against pthreads.
424
425 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
426
427         Reviewed by Darin Adler.
428
429         http/tests/xmlhttprequest/basic-auth.html fails on Tiger.
430
431         Turns out that NSURLCredentialPersistenceNone doesn't work on Tiger, so we have to use
432         session persistence.
433
434         * platform/network/mac/ResourceHandleMac.mm:
435         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Route the credential through
436         receivedCredential(), ensuring that the Tiger-specific need to use session credentials
437         is honored.
438         (WebCore::ResourceHandle::receivedCredential): On Tiger, change PersistenceNone to
439         PersistenceForSession, because the former doesn't work.
440
441 2009-04-14  Adele Peterson  <adele@apple.com>
442
443         Reviewed by Darin Adler.
444
445         Fix for <rdar://problem/6703873> Triple-click quoted line and type Return creates an extra quoted blank line
446
447         Test: editing/inserting/6703873.html
448
449         * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply):
450         If the startNode's original parent is now empty, we can remove it.  Its already been cloned and copied with the startNode,
451         so we only need to keep it around if it actually holds some original content, otherwise it will look like an extra empty 
452         container in the document.
453
454 2009-04-14  Xan Lopez  <xlopez@igalia.com>
455
456         Reviewed by Holger Freyther.
457
458         https://bugs.webkit.org/show_bug.cgi?id=21546
459         [GTK] ATK accessibility enhancements
460
461         Add a proper implementation of AtkText::get_text and
462         AtkText::get_character_count, which takes into account non
463         TextControl text. With this the 'Text' field in Accerciser's
464         Interface Viewer is filled correctly.
465
466         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
467
468 2009-04-14  Xan Lopez  <xlopez@igalia.com>
469
470         Reviewed by Holger Freyther.
471
472         https://bugs.webkit.org/show_bug.cgi?id=21546
473         [GTK] ATK accessibility enhancements
474
475         Remove some dead code and g_return_if_fail from static functions.
476
477         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
478
479 2009-04-14  Xan Lopez  <xlopez@igalia.com>
480
481         Reviewed by Holger Freyther.
482
483         https://bugs.webkit.org/show_bug.cgi?id=21546
484         [GTK] ATK accessibility enhancements
485
486         Also implement text interface for StaticTextRole, which covers
487         most of the text in web pages.
488
489         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
490
491 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
492
493         Another Windows build fix.
494
495         * platform/network/cf/ResourceHandleCFNet.cpp:
496         (WebCore::WebCoreSynchronousLoader::load):
497
498 2009-04-14  Alexey Proskuryakov  <ap@webkit.org>
499
500         Windows build fix.
501
502         * platform/network/cf/ResourceHandleCFNet.cpp:
503         (WebCore::WebCoreSynchronousLoader::willSendRequest):
504         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
505
506 2009-04-13  Alexey Proskuryakov  <ap@webkit.org>
507
508         Reviewed by Sam Weinig.
509
510         <rdar://problem/6698851> Implement XMLHttpRequest withCredentials attribute
511
512         * WebCore.xcodeproj/project.pbxproj: Made ThreadableLoader.h private, as enum definitions
513         from it are now used in otehr private headers.
514
515         * xml/XMLHttpRequest.h:
516         * xml/XMLHttpRequest.idl:
517         Added withCredentials attribute. When it is false (default), neither credentials nor cookies
518         are sent with cross origin requests, When it is true, those are sent, but the server needs
519         to allow handling results via Access-Control-Allow-Credentials header. It was always possible
520         to send a cross-site request with credentials via IFRAME or IMG, so this just adds a way to
521         read results, as long as the server reports that it's allowed.
522         Having the default set to false ensures that requests won't fail unexpectedly because of
523         stored credentials and cookies for other resources in the target protection space.
524
525         * xml/XMLHttpRequest.cpp:
526         (WebCore::XMLHttpRequest::loadRequestSynchronously): Allow stored credentials for same origin
527         requests, and for cross origin ones that have withCredentials attribute set. Such code already
528         existed for cookies (but it's simpler, because we could just set a ResourceRequest flag).
529         (WebCore::XMLHttpRequest::loadRequestAsynchronously): Ditto.
530
531         * platform/network/ResourceHandle.h: Added willSendRequest() - just like for other callbacks,
532         is is easier to have code in the class. Also, loadResourceSynchronously() now takes a
533         StoredCredentials option, matching async case.
534
535         * platform/network/ResourceHandleClient.h:
536         (WebCore::ResourceHandleClient::receivedCredential): Removed. This method could never be
537         called, and no client used it.
538         (WebCore::ResourceHandleClient::receivedRequestToContinueWithoutCredential): Ditto.
539
540         * platform/network/ResourceHandleInternal.h:
541         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Split username and password out
542         of request URL. We want to always get a callback for credentials to manage them in WebCore,
543         so network back-end shouldn't see them too early.
544
545         * platform/network/ResourceRequestBase.cpp:
546         (WebCore::ResourceRequestBase::removeCredentials):
547         * platform/network/ResourceRequestBase.h:
548         Added a removeCredentials() method that removes login and password parts from request URL.
549
550         * platform/network/mac/ResourceHandleMac.mm:
551         (WebCoreCredentialStorage): Added a simple storage class for per-session credentials.
552         (WebCore::ResourceHandle::loadResourceSynchronously): Pass allowStoredCredentials through.
553         (WebCore::ResourceHandle::willSendRequest): On a redirect, credentials should be replaced.
554         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try credentials from the URL
555         and per-session credentials. Code was partially moved from Obj-C callback.
556         (WebCore::ResourceHandle::receivedCredential): Intercept per-session credentials and store
557         them in WebCore storage.
558         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Don't
559         store the redirected URL - we only needed credentials, which are now stored separately.
560         (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]): Removed
561         code that was setting credentials from URL. First, the code is now in ResourceHandle, and
562         also, it wasn't actually needed in Leopard release before this patch, see <rdar://problem/5298142>.
563         (-[WebCoreSynchronousLoader dealloc]): Release credentials. Note that unlike ResourceHandle,
564         this class still needs to track URL for checking whether a redirect is allowed. This is
565         not a great solution, and we should unify client code to use the same checks in sync and
566         async cases.
567         (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): Just like in
568         async case, put credentials aside to ensure that network back-end asks for them.
569         (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Use credentials
570         from URL, or from WebCore storage.
571         (-[WebCoreSynchronousLoader connectionShouldUseCredentialStorage:]): Don't use stored
572         credentials when not allowed to.
573         (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
574         Put credentials aside to ensure that network back-end asks for them.
575
576         * platform/network/cf/ResourceHandleCFNet.cpp:
577         (WebCore::WebCoreCredentialStorage::set):
578         (WebCore::WebCoreCredentialStorage::get):
579         (WebCore::willSendRequest):
580         (WebCore::ResourceHandle::start):
581         (WebCore::ResourceHandle::willSendRequest):
582         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
583         (WebCore::ResourceHandle::receivedCredential):
584         (WebCore::ResourceHandle::loadResourceSynchronously):
585         (WebCore::WebCoreSynchronousLoader::willSendRequest):
586         (WebCore::WebCoreSynchronousLoader::didReceiveChallenge):
587         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
588         (WebCore::WebCoreSynchronousLoader::load):
589         Same changes as in Mac case.
590
591         * platform/network/curl/ResourceHandleCurl.cpp:
592         (WebCore::ResourceHandle::loadResourceSynchronously):
593         * platform/network/qt/ResourceHandleQt.cpp:
594         (WebCore::ResourceHandle::loadResourceSynchronously):
595         * platform/network/soup/ResourceHandleSoup.cpp:
596         (WebCore::ResourceHandle::loadResourceSynchronously):
597         Trying not to break the build.
598
599         * dom/XMLTokenizerLibxml2.cpp: (WebCore::openFunc):
600         * xml/XSLTProcessor.cpp: (WebCore::docLoaderFunc):
601         Unconditionally allow stored credentials for these, as they only support same origin loads.
602
603         * workers/WorkerContext.cpp: (WebCore::WorkerContext::importScripts):
604         WorkerContext.importScripts() can be cross-origin, but sending credentials with it is no worse
605         than sending them with <script src=...>, so this is also unconditionally allowed.
606
607         * loader/DocumentThreadableLoader.cpp:
608         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Pass through storedCredentials.
609         (WebCore::DocumentThreadableLoader::create): Ditto.
610         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Save storedCredentials and
611         sameOrigin flags foruse in callbacks.
612         (WebCore::DocumentThreadableLoader::willSendRequest): Assert that loaders aren't all confused.
613         (WebCore::DocumentThreadableLoader::didSendData): Ditto.
614         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
615         (WebCore::DocumentThreadableLoader::didReceiveData): Ditto.
616         (WebCore::DocumentThreadableLoader::didFinishLoading): Ditto.
617         (WebCore::DocumentThreadableLoader::didFail): Ditto.
618         (WebCore::DocumentThreadableLoader::getShouldUseCredentialStorage): Don't use credential
619         storage if that's not allowed by the code that invoked DocumentThreadableLoader.
620         (WebCore::DocumentThreadableLoader::didReceiveAuthenticationChallenge): Simulate a failure
621         and cancel the request if we are about to ask the user for credentials for a cross-origin
622         request, which is forbidden by CORS (and would have been very confusing if allowed).
623         (WebCore::DocumentThreadableLoader::receivedCancellation): Assert that loaders aren't all confused.
624
625         * loader/DocumentThreadableLoader.h: Updated for the new flags (storedCredentials and
626         sameOrigin) that affect the loader. Eventually, we need to move all CORS logic from XHR here.
627
628         * loader/ThreadableLoader.h: (StoredCredentials): Added another flag that affects loader
629         behavior. We should combine all of these into a structure, and use it for sync requests, too.
630
631         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously):
632         * loader/FrameLoader.h:
633         * loader/ThreadableLoader.cpp:
634         (WebCore::ThreadableLoader::create):
635         (WebCore::ThreadableLoader::loadResourceSynchronously):
636         * loader/WorkerThreadableLoader.cpp:
637         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
638         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
639         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
640         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
641         * loader/WorkerThreadableLoader.h:
642         (WebCore::WorkerThreadableLoader::create):
643         Pass through storedCredentials.
644
645 2009-04-13  David Hyatt  <hyatt@apple.com>
646
647         Reviewed by Cameron Zwarich.
648
649         Remove an outdated comment in ScrollView.h
650
651         * platform/ScrollView.h:
652
653 2009-04-13  Eric Carlson  <eric.carlson@apple.com>
654
655         Reviewed by Mark Rowe.
656
657         https://bugs.webkit.org/show_bug.cgi?id=25177
658
659         QTTrack's -media method always return NULL in 64-bit QTKit, so
660         MediaPlayerPrivate::disableUnsupportedTracks should use 
661         QTTrackMediaTypeAttribute to get a track's type.
662
663         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
664         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
665
666 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
667
668         Reviewed by Cameron Zwarich.
669
670         More fix for https://bugs.webkit.org/show_bug.cgi?id=21260
671         Unbounded memory growth when churning elements with anonymous event handler functions
672
673         Stop using protected event listeners on the window object.
674
675         * bindings/js/JSDOMWindowCustom.cpp:
676         (WebCore::JSDOMWindow::mark): Mark our event listeners, since they're
677         no longer protected.
678
679         (WebCore::JSDOMWindow::addEventListener):
680         (WebCore::JSDOMWindow::removeEventListener): Create unprotected event
681         listeners, since we mark them now.
682
683         * bindings/js/JSEventListener.h: Made some functions public so
684         DOMWindow could call them.
685
686         * bindings/js/JSNodeCustom.cpp: Moved markEventListeners to a header,
687         so it could be shared.
688
689         * bindings/scripts/CodeGeneratorJS.pm: Generate event listener marking
690         and invalidating code for the DOMWindow.
691
692         * dom/RegisteredEventListener.h:
693         (WebCore::markEventListeners):
694         (WebCore::invalidateEventListeners): Added helper functions.
695
696         * page/DOMWindow.idl: Make the window's event listener attributes not
697         protected.
698
699 2009-04-13  Eric Carlson  <eric.carlson@apple.com>
700
701         Reviewed by Mark Rowe.
702         
703         https://bugs.webkit.org/show_bug.cgi?id=25155
704
705         OS X standalone media documents should not switch from <video> to <embed> when 
706         QTKit load state is QTMovieLoadStateLoading as that happens frequently when a loading
707         with a slow network connection or when a movie is not saved fast-start.
708
709         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
710         (WebCore::MediaPlayerPrivate::updateStates): Don't open movie with plug-in when QTKit's
711         loadstate is QTMovieLoadStateLoading, wait until it drops below QTMovieLoadStateError.
712
713 2009-04-13  Dmitry Titov  <dimich@chromium.org>
714
715         Reviewed by Darin Adler.
716
717         https://bugs.webkit.org/show_bug.cgi?id=24453
718         REGRESSION: If setTimeout is called on a iframe's window, the DOM changes to
719         the main document that timer callback makes are not flushed.
720
721         * bindings/js/ScheduledAction.cpp:
722         (WebCore::ScheduledAction::execute):
723         Use Document::updateStyleForAllDocuments() instead of document->updateStyleIfNeeded()
724         since timers may affect documents other then their own.
725
726 2009-04-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
727
728         Reviewed by David Hyatt.
729
730         Check document for nullity to avoid crashing on GTK+, when
731         creating the WebView.
732
733         * page/FrameView.cpp:
734         (WebCore::FrameView::needsLayout):
735
736 2009-04-13  Ada Chan  <adachan@apple.com>
737
738         Forgot to capitalize the "US".
739
740         * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
741         (WebCore::currentTextBreakLocaleID):
742
743 2009-04-13  Ada Chan  <adachan@apple.com>
744
745         <rdar://problem/6564956> URL field double-click selects entire domain, rather than single word or entire URL
746         Revert back to the old word breaking behavior by using en_US_POSIX locale.        
747
748         Reviewed by Steve Falkenburg.
749
750         * platform/text/win/TextBreakIteratorInternalICUWin.cpp:
751         (WebCore::currentTextBreakLocaleID):
752
753 2009-04-13  Darin Adler  <darin@apple.com>
754
755         Reviewed by Dan Bernstein.
756
757         * platform/cf/BinaryPropertyList.cpp: Added comment.
758         * platform/cf/BinaryPropertyList.h: Fixed mistakes in comments.
759
760 2009-04-13  Darin Adler  <darin@apple.com>
761
762         Reviewed by Dan Bernstein.
763
764         Bug 25158: hit testing doesn't work right in some cases involving anonymous blocks
765         https://bugs.webkit.org/show_bug.cgi?id=25158
766         rdar://problem/6769693
767
768         Test: editing/selection/click-after-nested-block.html
769
770         * rendering/RenderBlock.cpp:
771         (WebCore::isChildHitTestCandidate): Added. Helper so the two loops in positionForPoint
772         can share code.
773         (WebCore::RenderBlock::positionForPoint): Removed unneeded special case for first
774         child box. Changed special case for last child box to propertly handle the various
775         types of child box that are not hit test candidates (the same ones already handled
776         by the hit test loop below), adding in a loop so we find the last candidate.
777
778 2009-04-13  David Hyatt  <hyatt@apple.com>
779
780         Reviewed by Sam Weinig.
781
782         Fix for https://bugs.webkit.org/show_bug.cgi?id=25125.  Rework scrolling so that a layout happens first when
783         it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
784
785         * WebCore.base.exp:
786         * page/FrameView.h:
787         (WebCore::FrameView::visibleContentsResized):
788         * platform/ScrollView.cpp:
789         (WebCore::ScrollView::ScrollView):
790         (WebCore::ScrollView::updateScrollbars):
791         * platform/ScrollView.h:
792
793 2009-04-13  Adam Roben  <aroben@apple.com>
794
795         Add SharedBuffer::wrapCFData
796
797         This is the CF-equivalent of wrapNSData.
798
799         Reviewed by Brady Eidson.
800
801         * platform/SharedBuffer.h:
802         * platform/cf/SharedBufferCF.cpp:
803         (WebCore::SharedBuffer::wrapCFData):
804
805 2009-04-13  Dan Bernstein  <mitz@apple.com>
806
807         - build fix
808
809         * page/EventHandler.cpp:
810         (WebCore::documentPointForWindowPoint):
811
812 2009-04-13  Antti Koivisto  <antti@apple.com>
813
814         Reviewed by Darin Adler.
815
816         <rdar://problem/6740294> Increase the connection count per host
817         
818         Try to use six connections per host if possible.
819
820         * WebCore.base.exp:
821         * loader/loader.cpp:
822         (WebCore::Loader::Loader):
823         * platform/mac/WebCoreSystemInterface.h:
824         * platform/mac/WebCoreSystemInterface.mm:
825         * platform/network/ResourceRequestBase.cpp:
826         (WebCore::initMaximumHTTPConnectionCountPerHost):
827         * platform/network/ResourceRequestBase.h:
828         * platform/network/mac/ResourceRequestMac.mm:
829         (WebCore::initMaximumHTTPConnectionCountPerHost):
830
831 2009-04-13  Justin Garcia  <justin.garcia@apple.com>
832
833         Reviewed by Adele Peterson.
834
835         https://bugs.webkit.org/show_bug.cgi?id=25153
836         Can't place the caret into text field that scrolls the window on focus
837         
838         We refetch the target node in the shadow node case, and when we do so the window coordinate for the mouse event may
839         be invalid because of scrolling that the focus handler did.  Cache the document point (that we derived from the window
840         coordinate) and use that any time we refetch.
841
842         * page/EventHandler.cpp:
843         (WebCore::documentPointForWindowPoint):
844         (WebCore::EventHandler::handleMousePressEvent):
845         (WebCore::EventHandler::prepareMouseEvent):
846
847 2009-04-13  Sam Weinig  <sam@webkit.org>
848
849         Reviewed by Geoffrey Garen.
850
851         Rename JavaScriptCanOpenWindowsAutomatically to javaScriptCanOpenWindowsAutomatically
852         to conform to our style guidelines.
853
854         * page/DOMWindow.cpp:
855         (WebCore::DOMWindow::allowPopUp):
856         * page/Settings.h:
857         (WebCore::Settings::javaScriptCanOpenWindowsAutomatically):
858
859 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
860
861         Mac build fix: Made another header private.
862
863         * WebCore.xcodeproj/project.pbxproj:
864
865 2009-04-13  Jian Li  <jianli@chromium.org>
866
867         Reviewed by Darin Fisher.
868
869         https://bugs.webkit.org/show_bug.cgi?id=25121
870         Upstream changes to handle error messages from V8 when running worker script.
871
872         * bindings/v8/WorkerContextExecutionProxy.cpp:
873         (WebCore::reportFatalErrorInV8):
874         (WebCore::handleConsoleMessage):
875         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
876         (WebCore::WorkerContextExecutionProxy::dispose):
877         (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
878         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
879         (WebCore::WorkerContextExecutionProxy::evaluate):
880         * bindings/v8/WorkerContextExecutionProxy.h:
881
882 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
883
884         Build fix: Made setInlineEventListenerForType not inline, since Document
885         calls it now. Made RegisteredEventListener.h a private header on Mac,
886         so WebKit can use it.
887
888         * page/DOMWindow.cpp:
889         (WebCore::DOMWindow::setInlineEventListenerForType):
890
891 2009-04-13  Dan Bernstein  <mitz@apple.com>
892
893         Reviewed by Sam Weinig.
894
895         - fix <rdar://problem/6404439> REGRESSION: Overlapping text and other
896           layout issues in View Sample feature of MYOB FIrstEdge v3
897
898         * page/Navigator.cpp:
899         (WebCore::shouldHideFourDot): Added "tdqm_loader.js" to the list of
900         JavaScript files this quirk applies to.
901
902 2009-04-13  Sam Weinig  <sam@webkit.org>
903
904         Reviewed by Oliver Hunt.
905
906         Move open and showModalDialog functions out of JSDOMWindowBase
907         and into JSDOMWindow by partially generating them.
908
909         This slightly changes the behavior of getting window.showModalDialog
910         when the embedding app does not support it to return undefined regardless
911         of shadowing.  This should not be an issue in a practice, but will be addressed
912         when we add a generic way to handle runtime specialization of property
913         access.
914
915         * DerivedSources.make: Remove JSDOMWindowBase.lut.h
916         * WebCore.xcodeproj/project.pbxproj: Ditto.
917         * bindings/js/JSDOMWindowBase.cpp:
918         (WebCore::):
919         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Move canShowModalDialog check from
920         here to JSDOMWindow::customGetOwnPropertySlot.
921         (WebCore::JSDOMWindowBase::put): Remove dead code.
922         * bindings/js/JSDOMWindowCustom.cpp:
923         (WebCore::createWindow):
924         (WebCore::JSDOMWindow::open):
925         (WebCore::JSDOMWindow::showModalDialog):
926         * bindings/js/JSDOMWindowCustom.h:
927         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
928         * page/DOMWindow.cpp:
929         (WebCore::DOMWindow::parseModalDialogFeatures): Move from JSDOMWindowBase.
930         (WebCore::DOMWindow::allowPopUp): Ditto.
931         (WebCore::DOMWindow::canShowModalDialog): Ditto.
932         (WebCore::DOMWindow::canShowModalDialogNow): Ditto.
933         * page/DOMWindow.h:
934         * page/DOMWindow.idl:
935
936 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
937
938         Reviewed by Sam Weinig.
939
940         Moved storage for window event listeners into the window object.
941
942         * bindings/js/JSDOMWindowCustom.cpp:
943         (WebCore::JSDOMWindow::addEventListener):
944         (WebCore::JSDOMWindow::removeEventListener): Add / remove window event
945         listeners to / from the window object.
946
947         * dom/Document.cpp:
948         (WebCore::Document::removeAllEventListeners):
949         (WebCore::Document::clear):
950         (WebCore::Document::setWindowInlineEventListenerForTypeAndAttribute): Moved
951         a bunch of code to the DOMWindow class, and left behind a few calls through
952         to DOMWindow, to support legacy clients. (Eventually, these will go away, too.)
953
954         * dom/Document.h: ditto.
955
956         * dom/Node.cpp:
957         (WebCore::Node::dispatchGenericEvent):
958         (WebCore::Node::dispatchWindowEvent): Dipatch window events on the window
959         object, not the document.
960
961         * dom/Node.h:
962         * dom/RegisteredEventListener.h: Moved RegisteredEventListenerVector
963         declaration, since it's required in more places now.
964
965         * history/CachedFrame.cpp:
966         (WebCore::CachedFrame::clear): Updated for rename. Also, remove event
967         listeners before detaching and clearing the document's window pointer,
968         since the the document needs its window pointer in order to tell the window
969         to clear its event listeners.
970
971         * loader/FrameLoader.cpp:
972         (WebCore::FrameLoader::stopLoading):
973         (WebCore::FrameLoader::canCachePageContainingThisFrame):
974         (WebCore::FrameLoader::logCanCacheFrameDecision): Updated for rename, and
975         movement of window event listeners into the window.
976
977         * loader/ImageDocument.cpp:
978         (WebCore::ImageDocument::createDocumentStructure): Updated for movement
979         of window event listeners into the window.
980
981         * page/DOMWindow.cpp:
982         (WebCore::DOMWindow::handleEvent):
983         (WebCore::DOMWindow::addEventListener):
984         (WebCore::DOMWindow::removeEventListener):
985         (WebCore::DOMWindow::removeAllEventListeners):
986         (WebCore::DOMWindow::hasEventListener):
987         (WebCore::DOMWindow::setInlineEventListenerForType):
988         (WebCore::DOMWindow::removeInlineEventListenerForType):
989         (WebCore::DOMWindow::inlineEventListenerForType):
990         (WebCore::DOMWindow::addPendingFrameUnloadEventCount):
991         (WebCore::DOMWindow::removePendingFrameUnloadEventCount):
992         (WebCore::DOMWindow::addPendingFrameBeforeUnloadEventCount):
993         (WebCore::DOMWindow::removePendingFrameBeforeUnloadEventCount):
994         * page/DOMWindow.h: Moved a bunch of code to the DOMWindow class, from the Document.
995
996         * page/Frame.cpp:
997         (WebCore::Frame::shouldClose): Updated for movement of window event listeners into the window.
998
999 2009-04-13  Greg Bolsinga  <bolsinga@apple.com>
1000
1001         Reviewed by Sam Weinig.
1002
1003         https://bugs.webkit.org/show_bug.cgi?id=25149
1004
1005         The Geolocation timer needs to start after the UA has granted permission.
1006
1007         * bindings/js/JSGeolocationCustom.cpp: Use PassRefPtr<PositionOptions>
1008         (WebCore::JSGeolocation::getCurrentPosition):
1009         (WebCore::JSGeolocation::watchPosition):
1010         * page/Geolocation.cpp: Add a RefPtr<PositionOptions> so it can be used
1011         later when the timer is started. Change PositionOptions* to PassRefPtr<PositionOptions>
1012         where needed.
1013         (WebCore::Geolocation::GeoNotifier::GeoNotifier):
1014         (WebCore::Geolocation::GeoNotifier::startTimer):
1015         (WebCore::Geolocation::getCurrentPosition):
1016         (WebCore::Geolocation::watchPosition):
1017         (WebCore::Geolocation::setIsAllowed): Start the timer is the UA allows
1018         (WebCore::Geolocation::startTimer):
1019         (WebCore::Geolocation::startTimersForOneShots):
1020         (WebCore::Geolocation::startTimersForWatchers):
1021         (WebCore::Geolocation::startTimers):
1022         * page/Geolocation.h:
1023         (WebCore::Geolocation::GeoNotifier::create):
1024
1025 2009-04-13  Pamela Greene  <pam@chromium.org>
1026
1027         Reviewed by Darin Fisher.
1028
1029         Fix Chromium (V8) build by renaming methods to match changes
1030         in http://trac.webkit.org/changeset/42377.
1031
1032         https://bugs.webkit.org/show_bug.cgi?id=25141
1033
1034         * bindings/v8/ScheduledAction.cpp:
1035      (WebCore::ScheduledAction::execute): updateRendering() -> updateStyleIfNeeded()
1036         * bindings/v8/V8AbstractEventListener.cpp:
1037         (WebCore::V8AbstractEventListener::handleEvent): updateDocumentsRendering() -> updateStyleForAllDocuments()
1038
1039 2009-04-13  Darin Fisher  <darin@chromium.org>
1040
1041         Reviewed by Darin Adler.
1042
1043         https://bugs.webkit.org/show_bug.cgi?id=25136
1044         CRASH in DocumentLoader::removeSubresourceLoader due to null m_frame
1045
1046         Test: fast/frames/frame-unload-crash.html
1047
1048         * loader/DocumentLoader.cpp:
1049         (WebCore::DocumentLoader::updateLoading): Added null check of m_frame.
1050
1051 2009-04-13  Sam Weinig  <sam@webkit.org>
1052
1053         Reviewed by Tim Hatcher.
1054
1055         Put the MessagePort constructor back in ENABLE_CHANNEL_MESSAGING.
1056
1057         * page/DOMWindow.idl:
1058
1059 2009-04-13  Greg Bolsinga  <bolsinga@apple.com>
1060
1061         Fix GTK build break.
1062
1063         * platform/gtk/GeolocationServiceGtk.cpp:
1064         (WebCore::GeolocationServiceGtk::updatePosition):
1065
1066 2009-04-13  David Hyatt  <hyatt@apple.com>
1067
1068         Reviewed by Darin Adler and Dan Bernstein.
1069
1070         Assertion in updateStyleForAllDocuments.  Make sure to unscheduleStyleRecalc when an object goes into
1071         the page cache.  Disallow scheduling of style recalcs on a document that is already in the page cache.
1072         Schedule a style recalc if needed when an object comes out of the page cache.
1073
1074         * dom/Document.cpp:
1075         (WebCore::Document::scheduleStyleRecalc):
1076         (WebCore::Document::setInPageCache):
1077
1078 2009-04-13  Timothy Hatcher  <timothy@apple.com>
1079
1080         Correctly sort (program) scripts in the Scripts panel popup menu.
1081
1082         Reviewed by Ada Chan.
1083
1084         * inspector/front-end/ScriptsPanel.js:
1085         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu): Refactor the code
1086         and sort "(program)" options by the sourceID to maintain some order.
1087         * inspector/front-end/utilities.js:
1088         (indexOfObjectInListSortedByFunction): Fix a bug where identical objects would cause
1089         an incorrect return value that confuses insertionIndexForObjectInListSortedByFunction.
1090         Just set 'first' and break so the correct result will be returned.
1091
1092 2009-04-13  Greg Bolsinga  <bolsinga@apple.com>
1093
1094         Reviewed by Darin Adler.
1095
1096         https://bugs.webkit.org/show_bug.cgi?id=24770
1097         
1098         Add custom code for Coordinates that returns null when required by the
1099         Geolocation spec.
1100         
1101         http://dev.w3.org/geo/api/spec-source.html#coordinates
1102
1103         * WebCore.xcodeproj/project.pbxproj:
1104         * bindings/js/JSCoordinatesCustom.cpp: Added.
1105         (WebCore::JSCoordinates::altitude): returns null if the value cannot be provided.
1106         (WebCore::JSCoordinates::altitudeAccuracy): Ditto
1107         (WebCore::JSCoordinates::heading): Ditto
1108         (WebCore::JSCoordinates::speed): Ditto
1109         * page/Coordinates.h:
1110         (WebCore::Coordinates::create): Add 'canProvide' parameters and values
1111         (WebCore::Coordinates::canProvideAltitude):
1112         (WebCore::Coordinates::canProvideAltitudeAccuracy):
1113         (WebCore::Coordinates::canProvideHeading):
1114         (WebCore::Coordinates::canProvideSpeed):
1115         (WebCore::Coordinates::Coordinates):
1116         * page/Coordinates.idl: specify custom getters
1117         * platform/mac/GeolocationServiceMac.mm: Set the values correctly if they cannot be provided.
1118         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
1119
1120 2009-04-13  Adele Peterson  <adele@apple.com>
1121
1122         Reviewed by Darin Adler.
1123
1124         Fix for <rdar://problem/5510537> Typing return at start of block quote yields empty quoted line
1125
1126         Test: editing/inserting/5510537.html
1127
1128         * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): If the break insertion position
1129         is at the beginning of the topmost quote, then just insert the <br> before the blockquote.  Otherwise, if the break
1130         insertion position is at the beginning of any quote, adjust the position so the break comes before the current quote level
1131         so we don't end up with an empty line in that quote in addition to the new line we're adding with the <br>.
1132
1133 2009-04-11  Darin Adler  <darin@apple.com>
1134
1135         Reviewed by Dan Bernstein.
1136
1137         Fix problem when encoding history files with duplicate integer arrays near the end of the file.
1138         This results in an assertion failure, and if assertions are turned off, corrupted output.
1139
1140         When writing an integer array it's important not to add an object reference to the
1141         aggregate buffer. The writing of the array does not depend on the aggregate buffer. But,
1142         more importantly, it's possible this instance integer array is a duplicate and won't be
1143         written out. If so, there's no guarantee there's enough space in the aggregate buffer to
1144         store the object references (the references will be ignored). In some cases the aggregate
1145         buffer can then overrun the data being written; normally this is prevented by the fact that
1146         the data being written will include a copy of the aggregate buffer.
1147
1148         Also removed a bit of unneeded dead code to handle the integer -1.
1149
1150         * platform/cf/BinaryPropertyList.cpp:
1151         (WebCore::BinaryPropertyListPlan::BinaryPropertyListPlan): Removed unneeded
1152         m_integerNegativeOneObjectReference, since property lists support only non-negative integers.
1153         (WebCore::BinaryPropertyListPlan::writeInteger): Removed support for
1154         m_integerNegativeOneObjectReference.
1155         (WebCore::BinaryPropertyListPlan::integerObjectReference): Ditto.
1156         (WebCore::BinaryPropertyListSerializer::writeIntegerWithoutAddingAggregateObjectReference):
1157         Added. Factored out most of writeInteger, for use in writeIntegerArray, without calling
1158         addAggregateObjectReference.
1159         (WebCore::BinaryPropertyListSerializer::writeInteger): Changed to call the new
1160         writeIntegerWithoutAddingAggregateObjectReference function.
1161         (WebCore::BinaryPropertyListSerializer::writeIntegerArray): Call the new
1162         writeIntegerWithoutAddingAggregateObjectReference function and therefore remove the
1163         code to save and restore m_currentAggregateBufferByte, which is no longer needed.
1164
1165 2009-04-13  Holger Hans Peter Freyther  <zecke@selfish.org>
1166
1167         Unreviewed Qt build fix.
1168
1169         * platform/graphics/qt/FontQt.cpp:
1170         (WebCore::Font::floatWidthForComplexText):
1171
1172 2009-04-12  Sam Weinig  <sam@webkit.org>
1173
1174         Reviewed by Mark Rowe.
1175
1176         Move the event and crypto attributes and the captureEvents and releaseEvents
1177         functions out of JSDOMWindowBase by partially generating them.
1178
1179         * bindings/js/JSDOMGlobalObject.cpp:
1180         (WebCore::JSDOMGlobalObject::currentEvent): Make const.
1181         * bindings/js/JSDOMGlobalObject.h:
1182         * bindings/js/JSDOMWindowBase.cpp:
1183         * bindings/js/JSDOMWindowCustom.cpp:
1184         (WebCore::JSDOMWindow::crypto): Not implemented.
1185         (WebCore::JSDOMWindow::event):
1186         (WebCore::JSDOMWindow::captureEvents): Not implemented.
1187         (WebCore::JSDOMWindow::releaseEvents): Ditto.
1188         * page/DOMWindow.idl:
1189
1190 2009-04-12  Sam Weinig  <sam@webkit.org>
1191
1192         Reviewed by Mark Rowe.
1193
1194         Move more attributes out of JSDOMWindowBase by
1195         partially generating them.
1196
1197         - Expose the MessagePort constructor.
1198
1199         * bindings/js/JSDOMGlobalObject.h:
1200         (WebCore::getDOMConstructor):
1201         * bindings/js/JSDOMWindowBase.cpp:
1202         (setJSDOMWindowBaseEvent):
1203         * bindings/js/JSDOMWindowCustom.cpp:
1204         (WebCore::JSDOMWindow::image):
1205         (WebCore::JSDOMWindow::option):
1206         (WebCore::JSDOMWindow::audio):
1207         (WebCore::JSDOMWindow::webKitPoint):
1208         (WebCore::JSDOMWindow::webKitCSSMatrix):
1209         (WebCore::JSDOMWindow::xMLHttpRequest):
1210         (WebCore::JSDOMWindow::xSLTProcessor):
1211         (WebCore::JSDOMWindow::messageChannel):
1212         (WebCore::JSDOMWindow::worker):
1213         * page/DOMWindow.idl:
1214
1215 2009-04-12  Timothy Hatcher  <timothy@apple.com>
1216
1217         A resource's filename is not correct after a redirect in the Inspector.
1218
1219         Reviewed by Dan Bernstein.
1220
1221         * inspector/InspectorResource.cpp:
1222         (WebCore::InspectorResource::updateScriptObject): Fix a typo in the
1223         lastPathComponent property name.
1224
1225 2009-04-12  Adele Peterson  <adele@apple.com>
1226
1227         Reviewed by Darin Adler.
1228
1229         Test: editing/inserting/6609479-1.html
1230
1231         Follow-up to <rdar://problem/6609479>.
1232
1233         Before my last change, a Mail blockquote would've been broken up earlier, and you would've been guaranteed that the inserted content
1234         was at the start of a paragraph.  Now we need to check for that explicitly, and only merge the start of the inserted content if it is 
1235         at the start of a paragraph.
1236
1237         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::shouldMergeStart):
1238
1239 2009-04-11  Adele Peterson  <adele@apple.com>
1240
1241         Reviewed by Dan Bernstein.
1242
1243         Fix for <rdar://problem/6609479> Pressing return inside a table cell that's inside quoted content will split the table
1244
1245         Test: editing/inserting/6609479.html
1246
1247         Don't break a blockquote if pasting or inserting into a table.
1248
1249         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply):
1250         * editing/TypingCommand.cpp: (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
1251
1252 2009-04-11  Dan Bernstein  <mitz@apple.com>
1253
1254         Reviewed by Darin Adler.
1255
1256         - fix <rdar://problem/6643103> Unscaled values from body.scrollHeight
1257
1258         Test: fast/css/zoom-body-scroll.html
1259
1260         Adjust scroll{Left,Top,Width,Height} values for zoom in getters and
1261         setters.
1262
1263         * html/HTMLBodyElement.cpp:
1264         (WebCore::adjustForZoom):
1265         (WebCore::HTMLBodyElement::scrollLeft):
1266         (WebCore::HTMLBodyElement::setScrollLeft):
1267         (WebCore::HTMLBodyElement::scrollTop):
1268         (WebCore::HTMLBodyElement::setScrollTop):
1269         (WebCore::HTMLBodyElement::scrollHeight):
1270         (WebCore::HTMLBodyElement::scrollWidth):
1271
1272 2009-04-10  Timothy Hatcher  <timothy@apple.com>
1273
1274         Allow page navigation and reload while stopped at a breakpoint.
1275
1276         <rdar://problem/6781108> Having a breakpoint active prevents page reload
1277
1278         Reviewed by Darin Adler.
1279
1280         * inspector/InspectorController.cpp:
1281         (WebCore::InspectorController::didContinue): Call the resumedScript function.
1282         * inspector/InspectorController.h: Added didContinue.
1283         * inspector/JavaScriptDebugListener.h: Ditto.
1284         * inspector/JavaScriptDebugServer.cpp:
1285         (WebCore::JavaScriptDebugServer::pauseIfNeeded): Call didContinue on the listeners.
1286         * inspector/front-end/ScriptsPanel.js:
1287         (WebInspector.ScriptsPanel.prototype.debuggerResumed): Update the interface and state.
1288         * inspector/front-end/inspector.js:
1289         (WebInspector.resumedScript): Call ScriptsPanel.debuggerResumed.
1290         * loader/FrameLoader.cpp:
1291         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Call resumeDebugger.
1292
1293 2009-04-10  Sam Weinig  <sam@webkit.org>
1294
1295         Reviewed by Adele Peterson.
1296
1297         Remove unused include for JSLock.
1298
1299         * page/mac/FrameMac.mm:
1300
1301 2009-04-10  Sam Weinig  <sam@webkit.org>
1302
1303         Reviewed by Darin Adler.
1304
1305         Add back the keepAlive timer for after the script execution to
1306         protect the callers of evaluate, as was part of the original intent
1307         of timer.
1308
1309         * bindings/js/ScriptController.cpp:
1310         (WebCore::ScriptController::evaluate):
1311         * page/mac/FrameMac.mm:
1312
1313 2009-04-10  Chris Marrin  <cmarrin@apple.com>
1314
1315         Reviewed by Simon Fraser.
1316
1317         Fixed https://bugs.webkit.org/show_bug.cgi?id=25137
1318
1319         If we reload, the animation controller sticks around and has
1320         a stale animation time. So the needed delay is computed wrong.
1321         I added a reset of the animation timer on load.
1322
1323         I did not do a test case because this only happens on reload so I
1324         couldn't make an automated test. I tried using an iframe and using
1325         reload() but that doesn't tickle the bug.
1326
1327         * dom/Document.cpp:
1328         (WebCore::Document::implicitOpen):
1329
1330 2009-04-10  Grace Kloba  <klobag@gmail.com>
1331
1332         Reviewed by Darin Adler.
1333
1334         Move WORKERS header files inside ENABLE(WORKERS).
1335         So if WORKERS is not enabled and the generated files are not generated, the build is still working.
1336
1337         * bindings/js/JSDOMGlobalObject.cpp:
1338         * bindings/js/JSMessageChannelConstructor.cpp:
1339         * bindings/js/ScheduledAction.cpp:
1340
1341 2009-04-10  Darin Adler  <darin@apple.com>
1342
1343         Reviewed by Brady Eidson.
1344
1345         <rdar://problem/6773515> crash in push_heap inside WebCore when printing
1346
1347         The crash was due to manipulating a timer on a different thread than the one it was created on.
1348         This adds some diagnostics so we'll catch that kind of mistake immediately.
1349
1350         * platform/Timer.cpp:
1351         (WebCore::TimerBase::TimerBase): Store the thread identifier in debug versions.
1352         (WebCore::TimerBase::start): Assert it's the same thread the timer was created on.
1353         (WebCore::TimerBase::stop): Ditto.
1354         (WebCore::TimerBase::isActive): Ditto.
1355         (WebCore::TimerBase::setNextFireTime): Ditto.
1356
1357         * platform/Timer.h: Added the thread identifier data member.
1358
1359 2009-04-10  Chris Marrin  <cmarrin@apple.com>
1360
1361         Reviewed by Dan Bernstein
1362
1363         https://bugs.webkit.org/show_bug.cgi?id=25108
1364
1365         If you remove a class with a transition while that transition is running
1366         the animation timer will continue to fire after the transition is finished.
1367         This has no visual indication, but it does drain the processor. And in some
1368         cases it might even cause a glitch in future animations. Unfortunately there
1369         is no way to test this without putting in printfs.
1370
1371         This happens because the animation logic is never traversed after a transition
1372         is removed, so we never get a chance to cleanup. So I added cleanup in the logic
1373         that fires the dispatch of the last style change when the animation finishes.
1374
1375         Test: transitions/remove-transition-style.html
1376
1377         * page/animation/AnimationController.cpp:
1378         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
1379         * page/animation/CompositeAnimation.cpp:
1380         (WebCore::CompositeAnimation::updateTransitions):
1381         (WebCore::CompositeAnimation::animate):
1382         (WebCore::CompositeAnimation::cleanupFinishedAnimations):
1383         * page/animation/CompositeAnimation.h:
1384
1385 2009-04-10  Sam Weinig  <sam@webkit.org>
1386
1387         Reviewed by Geoffrey Garen.
1388
1389         Fix for <rdar://problem/6648858>
1390         CrashTracer: [REGRESSION(Safari 4)] 60 crashes in Safari at com.apple.WebCore • WebCore::ScriptController::evaluate + 241
1391
1392         The Frame (and therefore ScriptController) were being destroyed
1393         during JavaScript execution causing the JSDOMWindowShell to become
1394         null.
1395
1396         * bindings/js/ScriptController.cpp:
1397         (WebCore::ScriptController::evaluate): Use a RefPtr to protect the Frame
1398         instead of the keep-alive timer, since a nested event loop used from with-in 
1399         JavaScript execution could cause the timer to fire before returning.
1400
1401 2009-04-10  Dimitri Glazkov  <dglazkov@chromium.org>
1402
1403         Reviewed by Timothy Hatcher.
1404
1405         https://bugs.webkit.org/show_bug.cgi?id=25133
1406         Fix an error in InspectorController's bindings, clean up a few header
1407         includes, make empty object construction in ScriptObject less ambiguous.
1408
1409         * bindings/js/JSInspectorControllerCustom.cpp:
1410         (WebCore::JSInspectorController::setSetting): Send correct argument from
1411             the bindings.
1412         * bindings/js/ScriptObject.cpp:
1413         (WebCore::ScriptObject::createNew): Added.
1414         * bindings/js/ScriptObject.h: Removed constructor, added decl for createNew.
1415         * inspector/ConsoleMessage.cpp: Remove unused header.
1416         * inspector/ConsoleMessage.h: Ditto.
1417         * inspector/InspectorResource.cpp:
1418         (WebCore::createHeadersObject): Changed to use ScriptObject::createNew.
1419
1420 2009-04-10  Chris Marrin  <cmarrin@apple.com>
1421
1422         Reviewed by Simon Fraser.
1423
1424         Fixed https://bugs.webkit.org/show_bug.cgi?id=25134
1425
1426         This both fixes a bug where I was not sending in the right time
1427         to continue the animation and was not recomputing current time
1428         when coming out of suspend.
1429
1430         * page/animation/AnimationBase.cpp:
1431         (WebCore::AnimationBase::updateStateMachine):
1432         * page/animation/AnimationController.cpp:
1433         (WebCore::AnimationControllerPrivate::suspendAnimations):
1434         (WebCore::AnimationControllerPrivate::resumeAnimations):
1435
1436 2009-04-10  Adam Roben  <aroben@apple.com>
1437
1438         Give Windows's <select> popup menus drop shadows
1439
1440         Rubber-stamped by Steve Falkenburg.
1441
1442         No test possible.
1443
1444         * platform/win/PopupMenuWin.cpp:
1445         (WebCore::registerPopup): Use the CS_DROPSHADOW window class style.
1446
1447 2009-04-10  Timothy Hatcher  <timothy@apple.com>
1448
1449         Fix a bug in the Web Inspector where it would show scripts
1450         from previous pages when toggling the debugger off and back on.
1451
1452         https://bugs.webkit.org/show_bug.cgi?id=25095
1453         rdar://problem/6769970
1454
1455         Reviewed by John Sullivan.
1456
1457         * bindings/js/ScriptCachedFrameData.cpp:
1458         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData): Null out the
1459         debugger for the scriptController. This balances the attachDebugger
1460         that was already in ScriptCachedFrameData::restore.
1461         (WebCore::ScriptCachedFrameData::restore): Clean up an if statement.
1462         * bindings/js/ScriptController.cpp:
1463         (WebCore::ScriptController::clearWindowShell): Clear the debugger from
1464         the current window before setting the new window.
1465         * inspector/JavaScriptDebugServer.cpp:
1466         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions): Only accumulate
1467         source providers for code associated this as the debugger.
1468
1469 2009-04-10  Pierre d'Herbemont  <pdherbemont@apple.com>
1470
1471         Reviewed by Adele Peterson.
1472
1473         <rdar://problem/6646998> Avoid starting QTKitServer if possible
1474         When possible avoid asking QTKit for the MIME types that require QTKitServer
1475         when running 64-bit.
1476
1477         * WebCore.base.exp: Added new entry point.
1478
1479         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1480         (WebCore::addFileTypesToCache): Add an NSArray of types to the cache.
1481         (WebCore::mimeCommonTypesCache): Add all "common" QTKit types to the cache.
1482         (WebCore::mimeModernTypesCache): Add only "modern" QTKit types to the cache (this list does 
1483         not start QTKitServer if it is not already running).
1484         (WebCore::MediaPlayerPrivate::getSupportedTypes): Refactored.
1485         (WebCore::MediaPlayerPrivate::supportsType): Look in list of "modern" types first to avoid
1486         starting QTKitServer if possible.
1487
1488         * platform/mac/WebCoreSystemInterface.h: Add wkQTIncludeOnlyModernMediaFileTypes.
1489         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1490
1491 2009-04-10  Adam Roben  <aroben@apple.com>
1492
1493         Turn on window animations for <select> popup menus
1494
1495         We turned these off back when <select> popup menus were partially
1496         transparent. Now that they're opaque, there's no reason not to
1497         animate them.
1498
1499         Reviewed by Steve Falkenburg.
1500
1501         No test possible.
1502
1503         * platform/win/PopupMenuWin.cpp:
1504         (WebCore::PopupMenu::show): Remove the #ifdef that was disabling the
1505         window animation.
1506
1507 2009-04-10  Dan Bernstein  <mitz@apple.com>
1508
1509         Reviewed by Sam Weinig.
1510
1511         - fix a regression from r42379 which made zero-width characters affect
1512           line height
1513
1514         Test: fixes fast/text/wide-zero-width-space.html
1515
1516         * platform/graphics/mac/FontMacATSUI.mm:
1517         (WebCore::overrideLayoutOperation): Add to the fallback font list set
1518         here, and only if the glyph is not zero-width...
1519         (WebCore::ATSULayoutParameters::initialize): ...instead of doing it
1520         here. This matches WidthIterator's behavior.
1521
1522 2009-04-10  Darin Fisher  <darin@chromium.org>
1523
1524         Fixing build bustage caused by warnings being treated as errors.
1525         1- A local variable was only be used inside a debug assertion, which
1526            caused grief for the release build.
1527         2- Missing initializer for member 'DocumentMarker::activeMatch'
1528
1529         * dom/Document.cpp:
1530         (WebCore::Document::addMarker):
1531         (WebCore::Document::setMarkersActive):
1532
1533 2009-04-10  Finnur Thorarinsson  <finnur.webkit@gmail.com>
1534
1535         Reviewed by John Sullivan.
1536
1537         Fixing: https://bugs.webkit.org/show_bug.cgi?id=25117
1538         (TextMatches don't have a concept of active match)
1539
1540         For the ports that use the DocumentMarker as highlighting for FindInPage it is
1541         useful to have a flag that specifies which marker is active, so it can be drawn
1542         in a different color.
1543
1544         This allows me to remove the hack to use the SelectionController to highlight
1545         the active match (in the ChromiumWin port).
1546
1547         * dom/Document.cpp:
1548         (WebCore::Document::setMarkersActive):
1549         * dom/Document.h:
1550         * dom/DocumentMarker.h:
1551         * rendering/InlineTextBox.cpp:
1552         (WebCore::InlineTextBox::paintTextMatchMarker):
1553         * rendering/RenderTheme.cpp:
1554         (WebCore::RenderTheme::platformActiveTextSearchHighlightColor):
1555         (WebCore::RenderTheme::platformInactiveTextSearchHighlightColor):
1556         * rendering/RenderTheme.h:
1557         * rendering/RenderThemeChromiumWin.cpp:
1558         (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor):
1559         (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor):
1560         (WebCore::RenderThemeChromiumWin::platformActiveTextSearchHighlightColor):
1561         (WebCore::RenderThemeChromiumWin::platformInactiveTextSearchHighlightColor):
1562         * rendering/RenderThemeChromiumWin.h:
1563
1564 2009-04-10  Pamela Greene  <pam@chromium.org>
1565
1566         Reviewed by Dimitri Glazkov.
1567
1568         Build fix for Chromium.
1569         https://bugs.webkit.org/show_bug.cgi?id=12440
1570
1571         * page/chromium/FrameChromium.cpp:
1572         (WebCore::computePageRectsForFrame): change docWidth() to overflowWidth()
1573
1574 2009-04-09  David Hyatt  <hyatt@apple.com>
1575
1576         Reviewed by Oliver Hunt
1577
1578         Add a timer for style recalc (similar to the one used for scheduling layouts).  For now in order
1579         to reduce the risk of regressions, I have left in all the synchronous machinery for updating style
1580         following DOM events and JavaScript timeouts.  Eventually these calls will be removed.
1581
1582         Where the timer will really kick in and be useful is for clients that do style changes from
1583         Objective-C DOM bindings or that execute JavaScript to manipulate style from the JavaScriptCore C API.
1584
1585         * dom/ContainerNode.cpp:
1586         (WebCore::ContainerNode::insertBefore):
1587         (WebCore::ContainerNode::replaceChild):
1588         (WebCore::ContainerNode::removeChild):
1589         (WebCore::ContainerNode::appendChild):
1590         * dom/Document.cpp:
1591         (WebCore::Document::Document):
1592         (WebCore::Document::~Document):
1593         (WebCore::Document::scheduleStyleRecalc):
1594         (WebCore::Document::unscheduleStyleRecalc):
1595         (WebCore::Document::styleRecalcTimerFired):
1596         (WebCore::Document::updateStyleForAllDocuments):
1597         (WebCore::Document::detach):
1598         * dom/Document.h:
1599         * dom/Node.cpp:
1600         (WebCore::Node::setNeedsStyleRecalc):
1601         (WebCore::Node::lazyAttach):
1602
1603 2009-04-09  Oliver Hunt  <oliver@apple.com>
1604
1605         Reviewed by Gavin Barraclough.
1606
1607         <rdar://problem/6586787> JS debugger does not work in 64-bit
1608
1609         Don't truncate the source id in JSCallFrame
1610
1611         * inspector/JavaScriptCallFrame.h:
1612
1613 2009-04-09  Adam Roben  <aroben@apple.com>
1614
1615         Start compiling HistoryPropertyList on Windows
1616
1617         Reviewed by Darin Adler.
1618
1619         * WebCore.vcproj/WebCore.vcproj: Added HistoryPropertyList and its
1620         dependencies to the project. Copy headers from history/cf to
1621         $WebKitOutputDir.
1622         * history/cf/HistoryPropertyList.cpp: Added StringExtras.h so that
1623         this file will compile on Windows.
1624
1625 2009-04-09  Dan Bernstein  <mitz@apple.com>
1626
1627         Reviewed by Dave Hyatt.
1628
1629         - fix <rdar://problem/6166612> Text boxes' metrics should be based on
1630           the actual fonts used in them, not just the primary font
1631
1632         Covered by many existing layout tests
1633
1634         * platform/graphics/Font.cpp:
1635         (WebCore::Font::floatWidth): Added a fallbackFonts parameter. If the
1636         platform supports collecting fallback fonts in its complex font path
1637         and fallbackFonts is not null, all fallback fonts used for the text run
1638         will be added to it.
1639
1640         * platform/graphics/Font.h:
1641         (WebCore::Font::width): Ditto.
1642
1643         * platform/graphics/FontFastPath.cpp:
1644         (WebCore::Font::glyphDataForCharacter): Removed an unnecessary namespace
1645         qualifier.
1646         (WebCore::Font::floatWidthForSimpleText): Added a fallbackFonts
1647         parameter, which is passed down to WidthIterator.
1648
1649         * platform/graphics/WidthIterator.cpp:
1650         (WebCore::WidthIterator::WidthIterator): Added a fallbackFonts parameter
1651         and used it to initialize the m_fallbackFonts member.
1652         (WebCore::WidthIterator::advance): Track the fonts being used and add
1653         any fallback fonts to the m_fallbackFonts set. Make sure to only add
1654         non-small-caps fonts.
1655
1656         * platform/graphics/WidthIterator.h:
1657
1658         * platform/graphics/chromium/FontChromiumWin.cpp:
1659         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
1660         implementation that returns false, meaning this platform's
1661         implementation of floatWidthForComplexText() does not populate the
1662         fallbackFonts set.
1663         (WebCore::Font::floatWidthForComplexText): Updated for the new
1664         prototype.
1665
1666         * platform/graphics/chromium/FontLinux.cpp: Ditto.
1667
1668         * platform/graphics/gtk/FontGtk.cpp: Ditto.
1669
1670         * platform/graphics/mac/CoreTextController.cpp:
1671         (WebCore::CoreTextController::CoreTextController): Added a fallbackFonts
1672         parameter and used it to initialize the m_fallbackFonts member.
1673         (WebCore::CoreTextController::collectCoreTextRunsForCharacters): Add
1674         fallback fonts to m_fallbackFonts.
1675
1676         * platform/graphics/mac/CoreTextController.h:
1677
1678         * platform/graphics/mac/FontMac.mm:
1679         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
1680         implementation that returns true, indicating that the Mac
1681         implementations of floatWidthForComplexText() populate the fallbackFonts
1682         set.
1683         * platform/graphics/mac/FontMacATSUI.mm:
1684         (WebCore::ATSULayoutParameters::ATSULayoutParameters): Added a
1685         fallbackFonts parameter and used it to initialize the m_fallbackFonts
1686         member.
1687         (WebCore::ATSULayoutParameters::initialize): Add fallback fonts to
1688         m_fallbackFonts.
1689         (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
1690         parameter, which is passed down to ATSULayoutParameters.
1691
1692         * platform/graphics/mac/FontMacCoreText.cpp:
1693         (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
1694         parameter, which is passed down to CoreTextController.
1695
1696         * platform/graphics/win/FontWin.cpp:
1697         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
1698         implementation that returns true, indicating that the
1699         UniscribeController-based implementations of floatWidthForComplexText()
1700         populate the fallbackFonts set.
1701         (WebCore::Font::floatWidthForComplexText): Added a fallbackFonts
1702         parameter, which is passed down to UniscribeController.
1703
1704         * platform/graphics/win/UniscribeController.cpp:
1705         (WebCore::UniscribeController::UniscribeController): Added a
1706         fallbackfonts parameter and used it to initialize m_fallbackFonts.
1707         (WebCore::UniscribeController::advance): Add fallback fonts to
1708         m_fallbackFonts.
1709
1710         * platform/graphics/win/UniscribeController.h:
1711         
1712         * platform/graphics/wx/FontWx.cpp:
1713         (WebCore::Font::canReturnFallbackFontsForComplexText): Added an
1714         implementation that returns false, meaning this platform's
1715         implementation of floatWidthForComplexText() does not populate the
1716         fallbackFonts set.
1717         (WebCore::Font::floatWidthForComplexText): Updated for the new
1718         prototype.
1719
1720         * rendering/InlineFlowBox.cpp:
1721         (WebCore::InlineFlowBox::computeLogicalBoxHeights): For an InlineTextBox
1722         with multiple fonts, compute a common baseline and line height by
1723         considering all fonts' ascents and descents (and line spacing, if
1724         applicable).
1725
1726         * rendering/InlineTextBox.cpp:
1727         (WebCore::InlineTextBox::setFallbackFonts): Added. Temporarily stores
1728         the set of fallback fonts in a vector.
1729         (WebCore::InlineTextBox::takeFallbackFonts): Added. Returns the fallback
1730         fonts previously stored and removes them from storage.
1731
1732         * rendering/InlineTextBox.h:
1733
1734         * rendering/RenderText.cpp:
1735         (WebCore::RenderText::RenderText): Initialized the
1736         m_knownNotToUseFallbackFonts to false.
1737         (WebCore::RenderText::styleDidChange): Reset
1738         m_knownNotToUseFallbackFonts to false if the style difference is such that
1739         affects layout.
1740         (WebCore::RenderText::widthFromCache): Added a fallbackFonts parameter,
1741         which is passed down to Font::width().
1742         (WebCore::RenderText::trimmedPrefWidths): Updated for the change to
1743         widthFromCache().
1744         (WebCore::RenderText::calcPrefWidths): Made this call a private version
1745         of calcPrefWidths() that takes a fallbackFonts parameter and set the
1746         m_knownNotToUseFallbackFonts to true if the set comes back empty.
1747         The private version passes the fallbackFonts set to widthFromCache().
1748         (WebCore::RenderText::setText): Reset m_knownNotToUseFallbackFonts to
1749         false.
1750         (WebCore::RenderText::createFallbackFontMetricsBox): Added.
1751         (WebCore::RenderText::width): Added a fallbackFonts parameter, which is
1752         passed down to calcPrefWidths(), widthFromCache() and Font::width().
1753         Set m_knownNotToUseFallbackFonts to true when appropriate.
1754
1755         * rendering/RenderText.h:
1756
1757         * rendering/bidi.cpp:
1758         (WebCore::RenderBlock::constructLine): Added an assertion and a continue
1759         statement to remove one level of indentation.
1760         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Temporarily
1761         store the set of fallback fonts in the InlineTextBox.
1762         (WebCore::RenderBlock::computeVerticalPositionsForLine): Added an
1763         assertion.
1764
1765 2009-04-09  David Hyatt  <hyatt@apple.com>
1766
1767         Reviewed by Adam Roben
1768
1769         Rename all of the changed()/setChanged()/setDocumentChanged() methods to mention style recalc
1770         explicitly instead.
1771
1772         * bindings/js/JSCustomPositionCallback.cpp:
1773         (WebCore::JSCustomPositionCallback::handleEvent):
1774         * bindings/js/JSCustomPositionErrorCallback.cpp:
1775         (WebCore::JSCustomPositionErrorCallback::handleEvent):
1776         * bindings/js/JSCustomSQLStatementCallback.cpp:
1777         (WebCore::JSCustomSQLStatementCallback::handleEvent):
1778         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1779         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
1780         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1781         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
1782         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1783         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
1784         * bindings/js/JSCustomVoidCallback.cpp:
1785         (WebCore::JSCustomVoidCallback::handleEvent):
1786         * bindings/js/JSCustomXPathNSResolver.cpp:
1787         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1788         * bindings/js/JSEventListener.cpp:
1789         (WebCore::JSAbstractEventListener::handleEvent):
1790         * bindings/js/ScheduledAction.cpp:
1791         (WebCore::ScheduledAction::execute):
1792         * bindings/js/ScriptControllerMac.mm:
1793         (WebCore::updateStyleIfNeededForBindings):
1794         (WebCore::ScriptController::initJavaJSBindings):
1795         * css/CSSMutableStyleDeclaration.cpp:
1796         (WebCore::CSSMutableStyleDeclaration::removeProperty):
1797         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
1798         (WebCore::CSSMutableStyleDeclaration::setProperty):
1799         (WebCore::CSSMutableStyleDeclaration::setStringProperty):
1800         (WebCore::CSSMutableStyleDeclaration::setImageProperty):
1801         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
1802         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
1803         (WebCore::CSSMutableStyleDeclaration::setCssText):
1804         (WebCore::CSSMutableStyleDeclaration::merge):
1805         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
1806         * css/CSSMutableStyleDeclaration.h:
1807         * css/CSSStyleSelector.cpp:
1808         (WebCore::CSSStyleSelector::SelectorChecker::allVisitedStateChanged):
1809         (WebCore::CSSStyleSelector::SelectorChecker::visitedStateChanged):
1810         * css/CSSVariablesDeclaration.cpp:
1811         (WebCore::CSSVariablesDeclaration::removeVariable):
1812         (WebCore::CSSVariablesDeclaration::setVariable):
1813         (WebCore::CSSVariablesDeclaration::setNeedsStyleRecalc):
1814         * css/CSSVariablesDeclaration.h:
1815         * dom/ContainerNode.cpp:
1816         (WebCore::ContainerNode::insertBefore):
1817         (WebCore::ContainerNode::replaceChild):
1818         (WebCore::ContainerNode::removeChild):
1819         (WebCore::ContainerNode::appendChild):
1820         (WebCore::ContainerNode::detach):
1821         (WebCore::ContainerNode::setFocus):
1822         (WebCore::ContainerNode::setActive):
1823         (WebCore::ContainerNode::setHovered):
1824         * dom/Document.cpp:
1825         (WebCore::Document::Document):
1826         (WebCore::Document::~Document):
1827         (WebCore::Document::scheduleStyleRecalc):
1828         (WebCore::Document::unscheduleStyleRecalc):
1829         (WebCore::Document::recalcStyle):
1830         (WebCore::Document::updateStyleIfNeeded):
1831         (WebCore::Document::updateStyleForAllDocuments):
1832         (WebCore::Document::updateLayout):
1833         (WebCore::Document::implicitClose):
1834         (WebCore::Document::prepareMouseEvent):
1835         (WebCore::Document::setFocusedNode):
1836         (WebCore::Document::setCSSTarget):
1837         * dom/Document.h:
1838         * dom/Element.cpp:
1839         (WebCore::Element::recalcStyle):
1840         (WebCore::checkForSiblingStyleChanges):
1841         * dom/InputElement.cpp:
1842         (WebCore::InputElement::parseMaxLengthAttribute):
1843         * dom/MouseRelatedEvent.cpp:
1844         (WebCore::MouseRelatedEvent::receivedTarget):
1845         * dom/Node.cpp:
1846         (WebCore::Node::Node):
1847         (WebCore::Node::setNeedsStyleRecalc):
1848         (WebCore::Node::lazyAttach):
1849         (WebCore::Node::dispatchGenericEvent):
1850         * dom/Node.h:
1851         (WebCore::Node::needsStyleRecalc):
1852         (WebCore::Node::childNeedsStyleRecalc):
1853         (WebCore::Node::setChildNeedsStyleRecalc):
1854         * dom/OptionElement.cpp:
1855         (WebCore::OptionElement::setSelectedState):
1856         * dom/ScriptElement.cpp:
1857         (WebCore::ScriptElementData::evaluateScript):
1858         * dom/StyledElement.cpp:
1859         (WebCore::StyledElement::attributeChanged):
1860         (WebCore::StyledElement::classAttributeChanged):
1861         (WebCore::StyledElement::parseMappedAttribute):
1862         * dom/Text.cpp:
1863         (WebCore::Text::recalcStyle):
1864         * dom/XMLTokenizer.cpp:
1865         (WebCore::XMLTokenizer::insertErrorMessageBlock):
1866         * editing/DeleteButtonController.cpp:
1867         (WebCore::DeleteButtonController::enable):
1868         * editing/Editor.cpp:
1869         (WebCore::Editor::setBaseWritingDirection):
1870         * editing/SelectionController.cpp:
1871         (WebCore::SelectionController::nodeWillBeRemoved):
1872         (WebCore::SelectionController::layout):
1873         (WebCore::SelectionController::focusedOrActiveStateChanged):
1874         * html/HTMLAnchorElement.cpp:
1875         (WebCore::HTMLAnchorElement::parseMappedAttribute):
1876         * html/HTMLElement.cpp:
1877         (WebCore::HTMLElement::setInnerText):
1878         (WebCore::HTMLElement::isContentEditable):
1879         (WebCore::HTMLElement::isContentRichlyEditable):
1880         (WebCore::HTMLElement::contentEditable):
1881         * html/HTMLEmbedElement.cpp:
1882         (WebCore::HTMLEmbedElement::updateWidget):
1883         * html/HTMLFormControlElement.cpp:
1884         (WebCore::HTMLFormControlElement::parseMappedAttribute):
1885         * html/HTMLFrameSetElement.cpp:
1886         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
1887         (WebCore::HTMLFrameSetElement::recalcStyle):
1888         * html/HTMLInputElement.cpp:
1889         (WebCore::HTMLInputElement::parseMappedAttribute):
1890         (WebCore::HTMLInputElement::setChecked):
1891         (WebCore::HTMLInputElement::setIndeterminate):
1892         (WebCore::HTMLInputElement::setValue):
1893         (WebCore::HTMLInputElement::setAutofilled):
1894         * html/HTMLMediaElement.cpp:
1895         (WebCore::HTMLMediaElement::finishParsingChildren):
1896         * html/HTMLObjectElement.cpp:
1897         (WebCore::HTMLObjectElement::updateWidget):
1898         (WebCore::HTMLObjectElement::finishParsingChildren):
1899         (WebCore::HTMLObjectElement::childrenChanged):
1900         * html/HTMLSelectElement.cpp:
1901         (WebCore::HTMLSelectElement::recalcStyle):
1902         (WebCore::HTMLSelectElement::restoreState):
1903         (WebCore::HTMLSelectElement::setRecalcListItems):
1904         (WebCore::HTMLSelectElement::reset):
1905         (WebCore::HTMLSelectElement::typeAheadFind):
1906         * html/HTMLTableElement.cpp:
1907         (WebCore::setTableCellsChanged):
1908         (WebCore::HTMLTableElement::parseMappedAttribute):
1909         * html/HTMLTextAreaElement.cpp:
1910         (WebCore::HTMLTextAreaElement::setValue):
1911         * loader/FrameLoader.cpp:
1912         (WebCore::FrameLoader::stopLoading):
1913         (WebCore::FrameLoader::executeScript):
1914         (WebCore::FrameLoader::gotoAnchor):
1915         * page/DOMWindow.cpp:
1916         (WebCore::DOMWindow::alert):
1917         (WebCore::DOMWindow::confirm):
1918         (WebCore::DOMWindow::prompt):
1919         * page/EventHandler.cpp:
1920         (WebCore::EventHandler::hoverTimerFired):
1921         * page/FrameView.cpp:
1922         (WebCore::FrameView::layout):
1923         (WebCore::FrameView::needsLayout):
1924         * page/animation/AnimationBase.cpp:
1925         (WebCore::AnimationBase::setNeedsStyleRecalc):
1926         (WebCore::AnimationBase::updateStateMachine):
1927         * page/animation/AnimationBase.h:
1928         * page/animation/AnimationController.cpp:
1929         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
1930         (WebCore::AnimationControllerPrivate::clear):
1931         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
1932         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
1933         (WebCore::AnimationControllerPrivate::startupdateStyleIfNeededDispatcher):
1934         (WebCore::AnimationControllerPrivate::addEventToDispatch):
1935         (WebCore::AnimationControllerPrivate::addNodeChangeToDispatch):
1936         (WebCore::AnimationControllerPrivate::animationTimerFired):
1937         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1938         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1939         (WebCore::AnimationControllerPrivate::addToStartTimeResponseWaitList):
1940         (WebCore::AnimationController::cancelAnimations):
1941         * page/animation/AnimationControllerPrivate.h:
1942         * page/animation/ImplicitAnimation.cpp:
1943         (WebCore::ImplicitAnimation::sendTransitionEvent):
1944         * page/animation/KeyframeAnimation.cpp:
1945         (WebCore::KeyframeAnimation::endAnimation):
1946         (WebCore::KeyframeAnimation::sendAnimationEvent):
1947         * rendering/RenderObject.cpp:
1948         (WebCore::RenderObject::updateDragState):
1949         * rendering/RenderView.cpp:
1950         (WebCore::RenderView::selectionBounds):
1951         * svg/SVGAElement.cpp:
1952         (WebCore::SVGAElement::svgAttributeChanged):
1953         * svg/SVGAnimationElement.cpp:
1954         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
1955         * svg/SVGCursorElement.cpp:
1956         (WebCore::SVGCursorElement::svgAttributeChanged):
1957         * svg/SVGElementInstance.cpp:
1958         (WebCore::SVGElementInstance::setNeedsUpdate):
1959         * svg/SVGForeignObjectElement.cpp:
1960         (WebCore::addCSSPropertyAndNotifyAttributeMap):
1961         * svg/SVGStopElement.cpp:
1962         (WebCore::SVGStopElement::parseMappedAttribute):
1963         * svg/SVGStyledElement.cpp:
1964         (WebCore::SVGStyledElement::parseMappedAttribute):
1965         * svg/SVGUseElement.cpp:
1966         (WebCore::SVGUseElement::svgAttributeChanged):
1967         (WebCore::SVGUseElement::childrenChanged):
1968         (WebCore::SVGUseElement::recalcStyle):
1969         * svg/animation/SMILTimeContainer.cpp:
1970         (WebCore::SMILTimeContainer::updateAnimations):
1971         * wml/WMLAElement.cpp:
1972         (WebCore::WMLAElement::parseMappedAttribute):
1973         * wml/WMLInputElement.cpp:
1974         (WebCore::WMLInputElement::setValue):
1975         (WebCore::WMLInputElement::parseMappedAttribute):
1976         * wml/WMLNoopElement.cpp:
1977         (WebCore::WMLNoopElement::insertedIntoDocument):
1978
1979 2009-04-09  Brett Wilson  <brettw@chromium.org>
1980
1981         Reviewed by Darin Fisher.
1982
1983         When there is a shadow set but it specifies "no shadow", clear the
1984         shadow shader. This will prevent Chromium from thinking there's a
1985         shadow and using the Skia codepath rather than Windows.
1986
1987         * platform/graphics/skia/GraphicsContextSkia.cpp:
1988         (WebCore::GraphicsContext::setPlatformShadow):
1989
1990 2009-04-09  Eric Seidel  <eric@webkit.org>
1991
1992         Reviewed by Simon Fraser.
1993
1994         Crash when accessing svg.viewport on a detached SVGSVGElement
1995         https://bugs.webkit.org/show_bug.cgi?id=25105
1996
1997         * svg/SVGSVGElement.cpp:
1998         (WebCore::SVGSVGElement::isOutermostSVG): return "true" that we are the "outermost" SVG element if we have no parent.  (The spec is unclear as to what behavior we should have in this case, and I doubt anyone cares for now).
1999
2000 2009-04-09  Jian Li  <jianli@chromium.org>
2001
2002         Reviewed by Dimitri Glazkov.
2003
2004         https://bugs.webkit.org/show_bug.cgi?id=25084
2005         Upstream changes to V8 bindings for XHR so that it can work under either DOMWindow or WorkerContext.
2006
2007         * bindings/v8/WorkerContextExecutionProxy.cpp:
2008         (WebCore::WorkerContextExecutionProxy::dispose):
2009         (WebCore::WorkerContextExecutionProxy::retrieve):
2010         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
2011         (WebCore::WorkerContextExecutionProxy::findOrCreateEventListenerHelper):
2012         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
2013         (WebCore::WorkerContextExecutionProxy::findOrCreateObjectEventListener):
2014         * bindings/v8/WorkerContextExecutionProxy.h:
2015         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
2016         (WebCore::CALLBACK_FUNC_DECL):
2017         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2018         (WebCore::getEventListener):
2019         (WebCore::ACCESSOR_SETTER):
2020         (WebCore::CALLBACK_FUNC_DECL):
2021
2022 2009-04-09  Darin Adler  <darin@apple.com>
2023
2024         Reviewed by Anders Carlsson and Sam Weinig.
2025
2026         Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing
2027
2028         Longer term solution is to change the design so Safari doesn't read and write all of history.
2029         This patch is step one: Do the serializing, which is done on the main thread, much faster.
2030
2031         * WebCore.base.exp: Added new entry points.
2032         * WebCore.xcodeproj/project.pbxproj: Added new source files.
2033
2034         * history/cf: Added.
2035
2036         * history/cf/HistoryPropertyList.cpp: Added.
2037         * history/cf/HistoryPropertyList.h: Added. Code to write history files. In the future we'll also
2038         have code for reading here too.
2039
2040         * platform/cf/BinaryPropertyList.cpp: Added.
2041         * platform/cf/BinaryPropertyList.h: Added. Code to write binary property list files.
2042
2043 2009-04-09  Simon Fraser  <simon.fraser@apple.com>
2044
2045         Reviewed by Antti Koivisto
2046
2047         https://bugs.webkit.org/show_bug.cgi?id=25122
2048
2049         If deferred repainting is active, we need to ensure that there are no repaints
2050         pending at the end of layoutIfNeededRecursive, which is called just before
2051         painting via -viewWillDraw.
2052
2053         * page/FrameView.cpp:
2054         (WebCore::FrameView::layoutIfNeededRecursive):
2055
2056 2009-04-09  John Grabowski  <jrg@chromium.org>
2057
2058         Reviewed by Darin Fisher.
2059
2060         https://bugs.webkit.org/show_bug.cgi?id=25117
2061         Fix Mac Chromium form controls.
2062
2063         * rendering/RenderThemeChromiumMac.mm:
2064         When rendering native controls in Mac Chromium, use a clean NSGraphicsContext.
2065         Properly save and restore native graphics context.
2066         (WebCore::RenderThemeChromiumMac::paintCheckbox):
2067         (WebCore::RenderThemeChromiumMac::paintRadio):
2068         (WebCore::RenderThemeChromiumMac::paintMenuList):
2069         (WebCore::RenderThemeChromiumMac::paintSearchFieldCancelButton):
2070         (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsDecoration):
2071         (WebCore::RenderThemeChromiumMac::paintSearchFieldResultsButton):
2072
2073 2009-04-09  Drew Wilson  <atwilson@google.com>
2074
2075         Reviewed by Alexey Proskuryakov.
2076
2077         https://bugs.webkit.org/show_bug.cgi?id=25030
2078         Refactor MessagePort code to enable Chrome to use a MessagePortProxy object
2079         instead of a real MessagePort for the entangledPort, since it could
2080         theoretically live in a separate process.
2081
2082         The goal of this refactoring is to remove all assumptions that the object
2083         representing the entangled port is actually of type MessagePort. All
2084         operations that were previously directly modifying private MessagePort member
2085         variables in the entangled port (i.e. entangle(), postMessage()) have been changed
2086         to invoke functions in the  MessagePortProxy interface instead which will allow
2087         the Chrome bindings to proxy these calls to another process.
2088
2089         No new layout tests, as this is just a refactoring with no bug fixes
2090         or new functionality.
2091
2092         * GNUmakefile.am:
2093         * WebCore.vcproj/WebCore.vcproj:
2094         * WebCore.xcodeproj/project.pbxproj:
2095         * bindings/js/JSMessagePortCustom.cpp:
2096         (WebCore::JSMessagePort::mark):
2097         * dom/MessagePort.cpp:
2098         (WebCore::MessagePort::clone):
2099         (WebCore::MessagePort::postMessage):
2100         (WebCore::MessagePort::deliverMessage):
2101         (WebCore::MessagePort::startConversation):
2102         (WebCore::MessagePort::close):
2103         (WebCore::MessagePort::entangle):
2104         (WebCore::MessagePort::unentangle):
2105         * dom/MessagePort.h:
2106         (WebCore::MessagePort::entangledPort):
2107         * dom/MessagePortProxy.h: Added.
2108         (WebCore::MessagePortProxy::~MessagePortProxy):
2109
2110 2009-04-08  Sam Weinig  <sam@webkit.org>
2111
2112         Reviewed by Geoffrey "Big Boy" Garen.
2113
2114         Fix for <rdar://problem/5745677> Possible to stop load during an unload event
2115         Also fixes https://bugs.webkit.org/show_bug.cgi?id=20605
2116
2117         Tests: fast/events/stop-load-in-unload-handler-using-document-write.html
2118                fast/events/stop-load-in-unload-handler-using-window-stop.html
2119
2120         Don't allow calling methods that would stop the new load inside the unload
2121         event.
2122
2123         * loader/FrameLoader.cpp:
2124         (WebCore::FrameLoader::FrameLoader):
2125         (WebCore::FrameLoader::stopLoading):
2126         (WebCore::FrameLoader::stopAllLoaders):
2127         * loader/FrameLoader.h:
2128
2129 2009-04-09  David Kilzer  <ddkilzer@apple.com>
2130
2131         Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
2132
2133         Rolled r42345 back in.  The build failure was caused by an
2134         internal script which had not been updated the same way that
2135         build-webkit was updated.
2136
2137         * Configurations/WebCore.xcconfig:
2138         * DerivedSources.make:
2139         * bindings/objc/DOM.mm:
2140         (WebCore::createElementClassMap):
2141         (+[DOMNode _wrapNode:WebCore::]):
2142         * bindings/objc/DOMCSS.mm:
2143         (+[DOMCSSValue _wrapCSSValue:WebCore::]):
2144         * bindings/objc/DOMEvents.mm:
2145         (+[DOMEvent _wrapEvent:WebCore::]):
2146         * bindings/objc/DOMInternal.h:
2147         * bindings/objc/ExceptionHandlers.mm:
2148         (WebCore::raiseDOMException):
2149         * html/HTMLEmbedElement.idl:
2150         * html/HTMLFrameElement.idl:
2151         * html/HTMLIFrameElement.idl:
2152         * html/HTMLObjectElement.idl:
2153
2154 2009-04-09  Simon Fraser  <simon.fraser@apple.com>
2155
2156         Reviewed by Darin Adler
2157
2158         https://bugs.webkit.org/show_bug.cgi?id=25109
2159
2160         Eliminate CompositeAnimationPrivate, which was a needless level
2161         of abstraction. Remove the methods like addToStyleAvailableWaitList()
2162         that simply turn around and call the animation controller.
2163         
2164         Rename animationControllerPriv() to animationController().
2165         Rename willNeedService() to timeToNextService().
2166
2167         * page/animation/AnimationBase.cpp:
2168         (WebCore::AnimationBase::~AnimationBase):
2169         (WebCore::AnimationBase::updateStateMachine):
2170         (WebCore::AnimationBase::timeToNextService):
2171         (WebCore::AnimationBase::beginAnimationUpdateTime):
2172         * page/animation/AnimationBase.h:
2173         * page/animation/AnimationController.cpp:
2174         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
2175         * page/animation/CompositeAnimation.cpp:
2176         (WebCore::CompositeAnimation::~CompositeAnimation):
2177         (WebCore::CompositeAnimation::clearRenderer):
2178         (WebCore::CompositeAnimation::updateTransitions):
2179         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2180         (WebCore::CompositeAnimation::animate):
2181         (WebCore::CompositeAnimation::getAnimatedStyle):
2182         (WebCore::CompositeAnimation::setAnimating):
2183         (WebCore::CompositeAnimation::timeToNextService):
2184         (WebCore::CompositeAnimation::getAnimationForProperty):
2185         (WebCore::CompositeAnimation::cleanupFinishedAnimations):
2186         (WebCore::CompositeAnimation::suspendAnimations):
2187         (WebCore::CompositeAnimation::resumeAnimations):
2188         (WebCore::CompositeAnimation::overrideImplicitAnimations):
2189         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
2190         (WebCore::CompositeAnimation::isAnimatingProperty):
2191         (WebCore::CompositeAnimation::pauseAnimationAtTime):
2192         (WebCore::CompositeAnimation::pauseTransitionAtTime):
2193         (WebCore::CompositeAnimation::numberOfActiveAnimations):
2194         * page/animation/CompositeAnimation.h:
2195         (WebCore::CompositeAnimation::animationController):
2196         (WebCore::CompositeAnimation::isSuspended):
2197         (WebCore::CompositeAnimation::hasAnimations):
2198         (WebCore::CompositeAnimation::CompositeAnimation):
2199         * page/animation/ImplicitAnimation.cpp:
2200         (WebCore::ImplicitAnimation::sendTransitionEvent):
2201         (WebCore::ImplicitAnimation::timeToNextService):
2202         * page/animation/ImplicitAnimation.h:
2203         * page/animation/KeyframeAnimation.cpp:
2204         (WebCore::KeyframeAnimation::sendAnimationEvent):
2205         (WebCore::KeyframeAnimation::timeToNextService):
2206         * page/animation/KeyframeAnimation.h:
2207
2208 2009-04-09  Alexey Proskuryakov  <ap@webkit.org>
2209
2210         Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
2211         It broke Mac build, and I don't know how to fix it.
2212
2213         * Configurations/WebCore.xcconfig:
2214         * DerivedSources.make:
2215         * bindings/objc/DOM.mm:
2216         (WebCore::createElementClassMap):
2217         (+[DOMNode _wrapNode:WebCore::]):
2218         * bindings/objc/DOMCSS.mm:
2219         (+[DOMCSSValue _wrapCSSValue:WebCore::]):
2220         * bindings/objc/DOMEvents.mm:
2221         (+[DOMEvent _wrapEvent:WebCore::]):
2222         * bindings/objc/DOMInternal.h:
2223         * bindings/objc/ExceptionHandlers.mm:
2224         (WebCore::raiseDOMException):
2225         * html/HTMLEmbedElement.idl:
2226         * html/HTMLFrameElement.idl:
2227         * html/HTMLIFrameElement.idl:
2228         * html/HTMLObjectElement.idl:
2229
2230 2009-04-09  Xan Lopez  <xlopez@igalia.com>
2231
2232         Unreviewed build fix.
2233
2234         RenderView::docWidth() was made private by r42334. That commit
2235         changes its usage for overflowWidth(), so do that here too.
2236
2237         * page/PrintContext.cpp:
2238         (WebCore::PrintContext::computePageRects):
2239
2240 2009-04-09  Xan Lopez  <xlopez@igalia.com>
2241
2242         Reviewed by Holger Freyther.
2243
2244         https://bugs.webkit.org/show_bug.cgi?id=21546
2245         [GTK] ATK accessibility enhancements
2246
2247         Based on a patch by Alp Toker.
2248
2249         Implement AtkObject::ref_state_set. Still quite a few states not
2250         implemented.
2251
2252         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2253
2254 2009-04-09  Xan Lopez  <xlopez@igalia.com>
2255
2256         Reviewed by Holger Freyther.
2257
2258         https://bugs.webkit.org/show_bug.cgi?id=21546
2259         [GTK] ATK accessibility enhancements
2260
2261         Based on a patch by Alp Toker.
2262
2263         Move fallback object creation to its own function, as it will be
2264         used in several places.
2265
2266         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2267         (fallbackObject):
2268
2269 2009-04-09  Xan Lopez  <xlopez@igalia.com>
2270
2271         Reviewed by Holger Freyther.
2272
2273         https://bugs.webkit.org/show_bug.cgi?id=21546
2274         [GTK] ATK accessibility enhancements
2275
2276         Based on a patch by Alp Toker.
2277
2278         Move AccessibilityObject methods to their file.
2279
2280         * page/gtk/AccessibilityObjectAtk.cpp:
2281         (WebCore::AccessibilityObject::wrapper):
2282         (WebCore::AccessibilityObject::setWrapper):
2283         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2284
2285 2009-04-09  Xan Lopez  <xlopez@igalia.com>
2286
2287         Reviewed by Holger Freyther.
2288
2289         https://bugs.webkit.org/show_bug.cgi?id=21546
2290         [GTK] ATK accessibility enhancements
2291
2292         Rework accessibility type generation code, based on Mozilla a11y
2293         implementation.
2294
2295         Have one base a11y type, and generate derived types that implement
2296         only the necessary interfaces at runtime, based on the specific
2297         object we are wrapping. This allows to save a lot of code while
2298         covering all possible cases.
2299
2300         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
2301
2302 2009-04-09  Eric Seidel  <eric@webkit.org>
2303
2304         Reviewed by Oliver Hunt.
2305
2306         Fix document.implementation.createDocument(null, "a:b") not to crash!
2307         https://bugs.webkit.org/show_bug.cgi?id=25096
2308
2309         Test: fast/dom/DOMImplementation/createDocument-namespace-err.html
2310
2311         * dom/ContainerNode.cpp:
2312         (WebCore::ContainerNode::addChild): add ASSERT() to give a better crash next time
2313         * dom/DOMImplementation.cpp:
2314         (WebCore::DOMImplementation::createDocument): check the exception code before using the result
2315
2316 2009-04-08  Adam Roben  <aroben@apple.com>
2317
2318         Make <select>s in application chrome documents match the Vista system
2319         dialog look
2320
2321         Reviewed by Dave Hyatt.
2322
2323         * rendering/RenderThemeWin.cpp:
2324         (WebCore::documentIsInApplicationChromeMode): Added this simple helper
2325         function.
2326         (WebCore::RenderThemeWin::getThemeData): In application chrome mode,
2327         the drop down button never uses any look but the "normal" look.
2328         (WebCore::RenderThemeWin::paintMenuList): In application chrome mode,
2329         use the "readonly" style to match system dialogs.
2330
2331 2009-04-08  Adam Roben  <aroben@apple.com>
2332
2333         Fix <rdar://6592515> Crash closing tab with Top Sites or Cover Flow
2334         showing after clicking "Go Back" in phishing alert
2335
2336         RenderButton's m_timer is not stopped when its Document enters the
2337         page cache. When the WebView was torn down, the timer would fire after
2338         the Frame's Page had been destroyed, leading to a crash. This patch
2339         just makes the timer do nothing when it fires. Making the timer not
2340         fire when in the page cache is covered by bug 25110.
2341
2342         Reviewed by Dave Hyatt.
2343
2344         No test possible.
2345
2346         * rendering/RenderButton.cpp:
2347         (WebCore::RenderButton::timerFired): Do nothing when we're in the page
2348         cache.
2349
2350 2009-04-09  David Hyatt  <hyatt@apple.com>
2351
2352         Reviewed by Adam Roben
2353
2354         Fix bugs where we would mistakenly turn off blitting for iframes if an external paint
2355         caused the checks to be triggered too early in the loading process of the frame.
2356
2357         * rendering/RenderBoxModelObject.cpp:
2358         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2359
2360 2009-04-08  Simon Fraser  <simon.fraser@apple.com>
2361
2362         Reviewed by Cameron Zwarich
2363
2364         https://bugs.webkit.org/show_bug.cgi?id=25106
2365         
2366         Fix signature of virtual function on AnimationBase so that it matches
2367         those in the derived classes, by removing unused parameter.
2368         
2369         * page/animation/AnimationBase.h:
2370         (WebCore::AnimationBase::endAnimation):
2371
2372 2009-04-08  David Kilzer  <ddkilzer@apple.com>
2373
2374         <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
2375
2376         Reviewed by Darin Adler and Maciej Stachowiak.
2377
2378         Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
2379         that SVG DOM Objective-C bindings may be optionally disabled.
2380
2381         * Configurations/WebCore.xcconfig: Added
2382         ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
2383         FEATURE_DEFINES and EXCLUDED_SOURCE_FILE_NAMES.  When SVG DOM
2384         Objective-C bindings are disabled, two generated header files no
2385         longer exist and none of the generated DOMSVG*.mm files should
2386         be compiled.
2387         * DerivedSources.make: All of the WebCore.SVG*.exp files contain
2388         SVG DOM Objective-C bindings classes, so exclude them unless
2389         ENABLE_SVG_DOM_OBJC_BINDINGS is set.
2390         * bindings/objc/DOM.mm: Switched from using ENABLE(SVG) to using
2391         ENABLE(SVG_DOM_OBJC_BINDINGS).
2392         (WebCore::createElementClassMap):
2393         (+[DOMNode _wrapNode:WebCore::]):
2394         * bindings/objc/DOMCSS.mm: Ditto.
2395         (+[DOMCSSValue _wrapCSSValue:WebCore::]):
2396         * bindings/objc/DOMEvents.mm: Ditto.
2397         (+[DOMEvent _wrapEvent:WebCore::]):
2398         * bindings/objc/DOMInternal.h: Ditto.
2399         * bindings/objc/ExceptionHandlers.mm: Added use of
2400         ENABLE(SVG_DOM_OBJC_BINDINGS).
2401         (WebCore::raiseDOMException):
2402         * html/HTMLEmbedElement.idl: Excluded -getSVGDocument method
2403         in generated Objective-C DOM classes if SVG DOM Objective-C
2404         bindings are disabled.
2405         * html/HTMLFrameElement.idl: Ditto.
2406         * html/HTMLIFrameElement.idl: Ditto.
2407         * html/HTMLObjectElement.idl: Ditto.
2408
2409 2009-04-08  Dan Bernstein  <mitz@apple.com>
2410
2411         Reviewed by Sam Weinig.
2412
2413         - limit the workaround for <rdar://problem/5781372> to Mac OS X versions
2414           that need it
2415
2416         * platform/mac/WebFontCache.mm:
2417         (fixUpWeight): Changed this function to be a no-op post-Leopard.
2418
2419 2009-04-08  Dan Bernstein  <mitz@apple.com>
2420
2421         Reviewed by Dave Hyatt.
2422
2423         - fix <rdar://problem/6771547> Appending to a RenderText causes all its
2424           lines to be dirtied
2425
2426         Test: fast/repaint/text-append-dirty-lines.html
2427
2428         * rendering/RenderText.cpp:
2429         (WebCore::RenderText::setTextWithOffset): If no text boxes intersected
2430         with or came after the new text, dirty the last root box, since the new
2431         text may begin there. Having at least one dirty line prevents the
2432         incorrect dirtying of all lines later during layoutInlineChildren().
2433
2434 2009-04-08  Darin Fisher  <darin@chromium.org>
2435
2436         Reviewed by Eric Seidel.
2437
2438         https://bugs.webkit.org/show_bug.cgi?id=25100
2439
2440         Fixes a Chromium-specific crash in WebCore::ImageBuffer::context that
2441         occurs when rendering semi-transparent RTL text.
2442
2443         Test: fast/text/complex-text-opacity.html
2444
2445         * platform/graphics/chromium/FontChromiumWin.cpp: Handle RTL when computing text bounds.
2446         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
2447
2448 2009-04-08  David Hyatt  <hyatt@apple.com>
2449
2450         Reviewed by Beth Dakin
2451
2452         Fix a porting error in my previous patch.  A != was supposed to be an ==.
2453
2454         * platform/ScrollView.cpp:
2455         (WebCore::ScrollView::updateScrollbars):
2456
2457 2009-04-08  David Hyatt  <hyatt@apple.com>
2458
2459         Reviewed by Adam Roben and Darin Adler
2460
2461         Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, repaints inconsistent for
2462         fixed positioned elements.
2463
2464         Rewrite the updateScrollers method to be more correct in its results.
2465
2466         Test: fast/block/positioning/fixed-positioning-scrollbar-bug.html
2467
2468         * dom/Document.cpp:
2469         (WebCore::Document::recalcStyle):
2470         (WebCore::Document::implicitClose):
2471         * page/FrameView.cpp:
2472         (WebCore::FrameView::createScrollbar):
2473         (WebCore::FrameView::layout):
2474         (WebCore::FrameView::adjustPageHeight):
2475         * page/FrameView.h:
2476         * page/win/FrameWin.cpp:
2477         (WebCore::computePageRectsForFrame):
2478         * platform/ScrollView.cpp:
2479         (WebCore::ScrollView::ScrollView):
2480         (WebCore::ScrollView::updateScrollbars):
2481         * platform/ScrollView.h:
2482         * rendering/RenderView.cpp:
2483         (WebCore::RenderView::layout):
2484         (WebCore::RenderView::docHeight):
2485         (WebCore::RenderView::docWidth):
2486         * rendering/RenderView.h:
2487
2488 2009-04-08  Sam Weinig  <sam@webkit.org>
2489
2490         Reviewed by Anders Carlsson.
2491
2492         Fix for <rdar://problem/6226200> Implement Microsoft's X-FRAME-OPTIONS anti-framing defense
2493
2494         Tests: http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
2495                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
2496                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-deny.html
2497                http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
2498                http/tests/security/XFrameOptions/x-frame-options-deny.html
2499                http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
2500                http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
2501
2502         * dom/Document.cpp:
2503         (WebCore::Document::processHttpEquiv): Stop the current load and redirect to about:blank
2504         if an X-FRAME-OPTIONS <meta> tag http-equiq dictates we should.
2505         * loader/FrameLoader.cpp:
2506         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions): Add logic to parse
2507         the X-FRAME-OPTIONS parameter.
2508         * loader/FrameLoader.h:
2509         * loader/MainResourceLoader.cpp:
2510         (WebCore::MainResourceLoader::didReceiveResponse): Stop the current load if framed and
2511         a X-FRAME-OPTIONS header and its parameter dictate that we should.
2512
2513 2009-04-08  Adam Roben  <aroben@apple.com>
2514
2515         Fix http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html on Windows
2516
2517         Reviewed by Sam Weinig.
2518
2519         * platform/network/cf/ResourceHandleCFNet.cpp:
2520         (WebCore::ResourceHandle::loadResourceSynchronously): Mimic the
2521         ResourceHandleMac code by propagating the CFError's error code for
2522         kCFErrorDomainCFNetwork errors to the ResourceResponse.
2523
2524 2009-04-08  Anders Carlsson  <andersca@apple.com>
2525
2526         Try to fix the PPC build.
2527         
2528         * plugins/npfunctions.h:
2529
2530 2009-04-08  Darin Adler  <darin@apple.com>
2531
2532         Reviewed by Sam Weinig.
2533
2534         <rdar://problem/5908616> tokenizer resizer should handle edge cases consistently
2535
2536         * html/HTMLTokenizer.cpp:
2537         (WebCore::HTMLTokenizer::enlargeBuffer): Handle edge cases the same way as a failed fastMalloc.
2538         (WebCore::HTMLTokenizer::enlargeScriptBuffer): Ditto.
2539
2540 2009-04-08  David Hyatt  <hyatt@apple.com>
2541
2542         Reviewed by Darin Adler
2543
2544         Make sure that cloneNode works with SVG attributes that require synchronization.  This fixes
2545         issues with <use> element shadow tree cloning where the clones can end up not obtaining the
2546         correct attribute values.
2547
2548         A subsequent patch of mine will expose this problem and cause it to be covered by existing
2549         layout tests, so no test is required at this time for this problem.
2550
2551         * dom/Element.cpp:
2552         (WebCore::Element::cloneElementWithoutChildren):
2553
2554 2009-04-08  Dimitri Glazkov  <dglazkov@chromium.org>
2555
2556         Reviewed by Timothy Hatcher.
2557
2558         https://bugs.webkit.org/show_bug.cgi?id=25093
2559         REGRESSION: some scripts are showing in the Inspector with only "true"
2560         as the source.
2561
2562         * inspector/InspectorController.cpp:
2563         (WebCore::InspectorController::didParseSource): Fixed conversion issue.
2564         (WebCore::InspectorController::failedToParseSource): Ditto.
2565
2566 2009-04-08  Adam Barth  <abarth@webkit.org>
2567
2568         Reviewed by Alexey Proskuryakov.
2569
2570         https://bugs.webkit.org/show_bug.cgi?id=24904
2571
2572         Verify the MIME type of stylesheets (in standards mode) by looking
2573         at the Content-Type header directly.  This bypasses any content
2574         sniffing that might be confusing the issue.
2575
2576         Test: http/tests/mime/standard-mode-loads-stylesheet-without-content-type-header.html
2577
2578         * loader/CachedCSSStyleSheet.cpp:
2579         (WebCore::CachedCSSStyleSheet::canUseSheet):
2580
2581 2009-04-08  Eric Carlson  <eric.carlson@apple.com>
2582
2583         Reviewed by Simon Fraser.
2584
2585         https://bugs.webkit.org/show_bug.cgi?id=25041
2586         <rdar://problem/6697754>
2587         Bug 25041: HTMLMediaElement: OSX autoplay broken by r41907
2588         
2589         OSX media player should set readyState to HAVE_ENOUGH_DATA when the movie's load state
2590         reaches QTMovieLoadStatePlaythroughOK, not when the entire file has been downloaded,
2591         so autoplay can begin when it should.
2592
2593         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2594         (WebCore::MediaPlayerPrivate::updateStates): Set readState to 
2595         HAVE_ENOUGH_DATA when QTMovie load state reaches QTMovieLoadStatePlaythroughOK.
2596         (WebCore::MediaPlayerPrivate::paint): Add braces missed in r42203.
2597
2598 2009-04-08  Alexey Proskuryakov  <ap@webkit.org>
2599
2600         Reviewed by David Kilzer. Based on a patch by Grace Kloba.
2601
2602         https://bugs.webkit.org/show_bug.cgi?id=24656
2603         cacheControlContainsNoCache() in ResourceResponseBase.h is wrong
2604
2605         * platform/network/ResourceResponseBase.cpp:
2606         (WebCore::ResourceResponseBase::parseCacheControlDirectives): Removed misused code for
2607         parsing directive values, fixing parsing of directives that we care about.
2608
2609         * platform/network/ResourceResponseBase.h:
2610         (WebCore::ResourceResponseBase::cacheControlContainsNoCache): Fixed a copy/paste mistake,
2611         m_cacheControlContainsMustRevalidate was returned instead of m_cacheControlContainsNoCache.
2612
2613 2009-04-08  Adam Roben  <aroben@apple.com>
2614
2615         Make text fields match the system look on Vista
2616
2617         Reviewed by Dave Hyatt.
2618
2619         * rendering/RenderThemeWin.cpp:
2620         (WebCore::RenderThemeWin::getThemeData): Use the new-to-Vista
2621         EP_EDITBORDER_NOSCROLL part for text fields.
2622
2623 2009-04-07  Alexey Proskuryakov  <ap@webkit.org>
2624
2625         Reviewed by Maciej Stachowiak.
2626
2627         https://bugs.webkit.org/show_bug.cgi?id=24957
2628         REGRESSION: Google calendar widget no longer shows upcoming events
2629
2630         Test: http/tests/xmlhttprequest/authorization-header.html
2631
2632         * xml/XMLHttpRequest.cpp:
2633         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Removed Authorization from
2634         the list of forbidden headers.
2635
2636 2009-04-07  miggilin  <mr.diggilin@gmail.com>
2637
2638         Reviewed by Kevin Ollivier.
2639
2640         Remove no longer needed debug warning and Windows-specific codepaths
2641         (as we now use the Safari/Win port's timer there)
2642
2643         https://bugs.webkit.org/show_bug.cgi?id=25070
2644
2645         * platform/wx/SharedTimerWx.cpp:
2646         (WebCore::setSharedTimerFireTime):
2647
2648
2649 2009-04-07  Adam Roben  <aroben@apple.com>
2650
2651         Fix many <video> regression tests on Windows
2652
2653         Reviewed by Dave Hyatt.
2654
2655         * platform/graphics/win/QTMovieWin.cpp:
2656         (QTMovieWin::getNaturalSize): Call GetMovieNaturalBoundsRect, which
2657         returns the movie's natural bounds (duh), rather than GetMovieBox,
2658         which returns the movie's current displayed size/position.
2659
2660 2009-04-07  Brady Eidson  <beidson@apple.com>
2661
2662         Reviewed by Darin Adler and Sam Weinig
2663
2664         <rdar://problem/5968249> "Private Browsing" doesn't affect HTML 5 LocalStorage
2665
2666         The expected behavior for persistent storage when private browsing mode is undefined by the spec.
2667         For now we're going with a "read-only when in private browsing" policy until we can get feedback
2668         and/or get the behavior specified in the spec.
2669
2670         Note that I purposefully made the change to restrict SessionStorage to read-only, also, with the
2671         understanding that the spec allows for SessionStorage to persist across relaunches, even though
2672         our implementation currently doesn't do this.
2673
2674         * dom/DOMCoreException.idl: Add some new ExceptionCodes defined in HTML5, one of which is needed
2675           for LocalStorage changes (QUOTA_EXCEEDED_ERR)
2676         * dom/ExceptionCode.cpp: 
2677         * dom/ExceptionCode.h:
2678
2679         * storage/StorageArea.cpp:
2680         (WebCore::StorageArea::internalSetItem): If private browsing is enabled, throw the QUOTA_EXCEEDED_ERR
2681           exception as the spec allows.
2682         (WebCore::StorageArea::internalRemoveItem): If private browsing is enabled, silently fail to remove
2683           the item.
2684         (WebCore::StorageArea::internalClear): If private browsing is enabled, silently fail to clear the area.
2685
2686 2009-04-07  Dean Jackson  <dino@apple.com>
2687
2688         Reviewed by Simon Fraser.
2689
2690         <rdar://problem/6148255>
2691
2692         Standalone media documents can not always handle everything
2693         using a <video> element. In these cases switch to an <embed>
2694         element that uses the QuickTime plugin, in the hope that it
2695         will have more luck. Typical media types that trigger this
2696         are streamed media and QTVR.
2697
2698         Equivalent Windows fix to come once reviewed. Note also that
2699         this area of code needs a cleanup:
2700         https://bugs.webkit.org/show_bug.cgi?id=25085
2701
2702         * html/HTMLMediaElement.cpp:
2703         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
2704         * html/HTMLMediaElement.h:
2705         * loader/MediaDocument.cpp:
2706         (WebCore::MediaDocument::mediaElementSawUnsupportedTracks):
2707         (WebCore::MediaDocument::replaceVideoWithEmbed):
2708         * loader/MediaDocument.h:
2709             - removes the <video> element and puts in an <embed>
2710         * platform/graphics/MediaPlayer.h:
2711         (WebCore::MediaPlayerClient::mediaPlayerSawUnsupportedTracks):
2712             - new internal method for flagging a problem
2713         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2714         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2715         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2716         (WebCore::MediaPlayerPrivate::updateStates):
2717             - looks for the types of content we don't handle
2718         (WebCore::MediaPlayerPrivate::rateChanged):
2719         (WebCore::MediaPlayerPrivate::sizeChanged):
2720         (WebCore::MediaPlayerPrivate::timeChanged):
2721         (WebCore::MediaPlayerPrivate::didEnd):
2722         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks):
2723         (WebCore::MediaPlayerPrivate::sawUnsupportedTracks):
2724             - inform the MediaClient that we have a potential problem
2725
2726 2009-04-07  Dan Bernstein  <mitz@apple.com>
2727
2728         Reviewed by Darin Adler.
2729
2730         - fix <rdar://problem/6767428> Resurrect
2731           +[WebFontCache fontWithFamily:traits:size:] for clients that call it
2732           directly
2733
2734         WebFontCache is a class in the WebCore framework and is not WebKit API,
2735         but apparently (perhaps mistakenly) some clients call this private
2736         interface.
2737
2738         This change resurrects the interface and gives it reasonable behavior
2739         (however, note that WebCore will not call the old interface, so hacks that
2740         override it will have no effect on WebKit clients).
2741
2742         * platform/mac/WebFontCache.h:
2743         * platform/mac/WebFontCache.mm:
2744         (+[WebFontCache fontWithFamily:traits:size:]): Added. Call through to
2745         +fontWithFamily:traits:weight:size:.
2746
2747 2009-04-07  David Hyatt  <hyatt@apple.com>
2748
2749         Reviewed by Adam Roben
2750
2751         Fix ScrollView's algorithm that determines whether or not to show scrollbars.  There was a bug
2752         with the method mainly because RenderView will size itself to the viewport's size, making it
2753         impossible to really know the document's "true" size.
2754
2755         In order to solve this problem ScrollView now has a minimumContentsSize method.  This method
2756         returns the document size excluding the RenderView from the calculation.  This width/height
2757         is now cached on RenderView in m_docWidth/m_docHeight member variables.
2758
2759         * WebCore.base.exp:
2760         * page/FrameView.cpp:
2761         (WebCore::FrameView::adjustPageHeight):
2762         (WebCore::FrameView::minimumContentsSize):
2763         * page/FrameView.h:
2764         * platform/ScrollView.cpp:
2765         (WebCore::ScrollView::updateScrollbars):
2766         * platform/ScrollView.h:
2767         (WebCore::ScrollView::minimumContentsSize):
2768         * rendering/RenderView.cpp:
2769         (WebCore::RenderView::layout):
2770         (WebCore::RenderView::calcDocHeight):
2771         (WebCore::RenderView::calcDocWidth):
2772         * rendering/RenderView.h:
2773         (WebCore::RenderView::docWidth):
2774         (WebCore::RenderView::docHeight):
2775
2776 2009-04-07  Dimitri Glazkov  <dglazkov@chromium.org>
2777
2778         Build fix, not reviewed.
2779
2780         * WebCore.xcodeproj/project.pbxproj: Made ScriptObject.h private.
2781
2782 2009-04-07  Dimitri Glazkov  <dglazkov@chromium.org>
2783
2784         Reviewed by Timothy Hatcher.
2785
2786         https://bugs.webkit.org/show_bug.cgi?id=25063
2787         Refactor InspectorController to use ScriptObject/State.
2788
2789         * GNUmakefile.am: Added ScriptState.cpp.
2790         * WebCore.pro: Ditto.
2791         * WebCore.vcproj/WebCore.vcproj: Ditto.
2792         * WebCore.xcodeproj/project.pbxproj: Ditto.
2793         * WebCoreSources.bkl: Ditto.
2794         * bindings/js/JSInspectorControllerCustom.cpp:
2795         (WebCore::JSInspectorController::addSourceToFrame): Fixed argument index typo.
2796         * bindings/js/ScriptFunctionCall.cpp:
2797         (WebCore::ScriptFunctionCall::call): Added reportExceptions parameter.
2798         (WebCore::ScriptFunctionCall::construct): Ditto.
2799         * bindings/js/ScriptFunctionCall.h: Ditto.
2800         * bindings/js/ScriptObject.cpp:
2801         (WebCore::handleException): Added exception-reporting heloper.
2802         (WebCore::ScriptObject::set): Changed to use handleException.
2803         (WebCore::ScriptGlobalObject::set): Ditto,
2804         * bindings/js/ScriptObject.cpp: Added ScriptGlobalObject.
2805         (WebCore::ScriptGlobalObject::set): Added.
2806         (WebCore::ScriptGlobalObject::getObject): Added.
2807         * bindings/js/ScriptObject.h: Added ScriptGlobalObject decls.
2808         (WebCore::ScriptGlobalObject::ScriptGlobalObject): Added.
2809         * bindings/js/ScriptState.cpp: Added.
2810         * bindings/js/ScriptState.h: Added scriptStateFromPage decl.
2811         * inspector/ConsoleMessage.cpp:
2812         (WebCore::ConsoleMessage::addToConsole): Changed to not report exceptions
2813             to avoid re-entrancy.
2814         * inspector/InspectorController.cpp: Refactored to use ScriptState/Object.
2815         * inspector/InspectorController.h: Ditto.
2816
2817 2009-04-07  Adam Langley  <agl@google.com>
2818
2819         Reviewed by Darin Fisher.
2820
2821         https://bugs.webkit.org/show_bug.cgi?id=25083
2822
2823         Skia was previously calculating the leading value incorrectly, leading
2824         us to add fHeight to get the height of a line of text. Now that Skia
2825         is calculating fLeading correctly, we can remove fHeight.
2826
2827         This doesn't affect any layout tests.
2828
2829         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
2830         (WebCore::SimpleFontData::platformInit):
2831
2832 2009-04-07  Brian Weinstein  <bweinstein@gmail.com>
2833
2834         Reviewed by Darin Adler.
2835
2836         https://bugs.webkit.org/show_bug.cgi?id=24851
2837
2838         This fix removes the status code from the status message in a ResourceResponse, which allows a few more tests in http to pass.
2839
2840         * platform/network/cf/ResourceResponseCFNet.cpp:
2841         (WebCore::ResourceResponse::platformLazyInit):
2842
2843 2009-04-07  Adam Langley  <agl@google.com>
2844
2845         Reviewed by Darin Fisher.
2846
2847         https://bugs.webkit.org/show_bug.cgi?id=25081
2848
2849         Skia is changing from reporting the XRange to reporting the XMin and
2850         XMax.  Obviously these are equivalent, but other users of the metrics
2851         need the two numbers to be separate.
2852
2853         This doesn't affect any layout tests.
2854
2855         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
2856         (WebCore::SimpleFontData::platformInit):
2857
2858 2009-04-07  Adam Roben  <aroben@apple.com>
2859
2860         Make the look of <select>s match the system look on Vista
2861
2862         Reviewed by Dave Hyatt.
2863
2864         * rendering/RenderThemeWin.cpp: Added new constants.
2865         (WebCore::RenderThemeWin::getThemeData): On Vista, use the
2866         CP_DROPDOWNBUTTONRIGHT part for drop down buttons.
2867         (WebCore::RenderThemeWin::paintMenuList): On Vista, use the CP_BORDER
2868         part to draw the border of <select>s.
2869         (WebCore::RenderThemeWin::paintMenuListButton): On Vista, outset the
2870         drop down button to make its border coincide with the <select>'s
2871         border.
2872
2873 2009-04-07  Adam Roben  <aroben@apple.com>
2874
2875         Move isRunningOnVistaOrLater to a shared location
2876
2877         Rubber-stamped in advance by Dave Hyatt.
2878
2879         * WebCore.vcproj/WebCore.vcproj: Added SystemInfo.{cpp,h}, and let VS
2880         have its way with the rest of the file.
2881         * platform/win/ScrollbarThemeWin.cpp: Moved isRunningOnVistaOrLater
2882         from here...
2883         * platform/win/SystemInfo.cpp: Added.
2884         (WebCore::isRunningOnVistaOrLater): ...to here.
2885         * platform/win/SystemInfo.h: Added.
2886
2887 2009-04-07  Paul Godavari  <paul@chromium.org>
2888
2889         Reviewed by Darin Fisher.
2890
2891         https://bugs.webkit.org/show_bug.cgi?id=24692
2892         Enable PopupMenuChromium to handle HTML select popups using native
2893         cocoa controls on the Mac, all other platforms are unchanged.
2894
2895         We also split out the storage container for the popup menu items
2896         so that ChromeClientChromium can access them for forwarding to
2897         the embedding host (Chromium.app or test_shell).
2898
2899         * page/chromium/ChromeClientChromium.h:
2900         * platform/chromium/PopupMenuChromium.cpp:
2901         (WebCore::PopupListBox::items):
2902         (WebCore::PopupContainer::PopupContainer):
2903         (WebCore::PopupContainer::~PopupContainer):
2904         (WebCore::PopupContainer::showPopup):
2905         (WebCore::PopupContainer::showExternal):
2906         (WebCore::PopupContainer::menuItemHeight):
2907         (WebCore::popupData):
2908         (WebCore::PopupListBox::pointToRowIndex):
2909         (WebCore::PopupListBox::getRowBounds):
2910         (WebCore::PopupListBox::isSelectableItem):
2911         (WebCore::PopupListBox::updateFromElement):
2912         (WebCore::PopupListBox::layout):
2913         (WebCore::PopupListBox::clear):
2914         (WebCore::PopupMenu::show):
2915         * platform/chromium/PopupMenuChromium.h:
2916         (WebCore::PopupItem::):
2917         (WebCore::PopupItem::PopupItem):
2918
2919 2009-04-07  Geoffrey Garen  <ggaren@apple.com>
2920
2921         Reviewed by Oliver Hunt.
2922         
2923         Added some double-checking to event handler marking. Now, when the
2924         wrapper that's responsible for marking an event handler's JavaScript
2925         function gets collected, it clears the event handler's JavaScript function
2926         so we won't dereference it after it's collected.
2927         
2928         In theory, we would never dereference a JavaScript event handler after
2929         its node's wrapper was collected anyway, but it's nice to be safe.
2930
2931         * bindings/js/JSDOMApplicationCacheCustom.cpp:
2932         (WebCore::JSDOMApplicationCache::mark):
2933         * bindings/js/JSEventListener.cpp:
2934         (WebCore::JSEventListener::JSEventListener):
2935         (WebCore::JSEventListener::jsFunction):
2936         (WebCore::JSEventListener::invalidateJSFunction):
2937         (WebCore::JSEventListener::markJSFunction):
2938         * bindings/js/JSEventListener.h:
2939         * bindings/js/JSMessagePortCustom.cpp:
2940         (WebCore::JSMessagePort::mark):
2941         * bindings/js/JSNodeCustom.cpp:
2942         (WebCore::markEventListeners):
2943         * bindings/js/JSWorkerContextCustom.cpp:
2944         (WebCore::JSWorkerContext::mark):
2945         * bindings/js/JSWorkerCustom.cpp:
2946         (WebCore::JSWorker::mark):
2947         * bindings/js/JSXMLHttpRequestCustom.cpp:
2948         (WebCore::JSXMLHttpRequest::mark):
2949         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
2950         (WebCore::JSXMLHttpRequestUpload::mark):
2951         * bindings/scripts/CodeGeneratorJS.pm:
2952         * dom/EventListener.h:
2953         (WebCore::EventListener::invalidateJSFunction):
2954         (WebCore::EventListener::markJSFunction):
2955         (WebCore::markIfNotNull):
2956
2957 2009-04-07  David Levin  <levin@chromium.org>
2958
2959         Build fix.
2960
2961         r44280 undid the change in r42268 that made CookieJar.h private.
2962         This redoes the change.
2963
2964         * WebCore.xcodeproj/project.pbxproj:
2965
2966 2009-04-07  Jian Li  <jianli@chromium.org>
2967
2968         Reviewed by Darin Fisher.
2969
2970         Upstream changes to WorkerContextExecutionProxy for enabling V8 preemption.
2971         https://bugs.webkit.org/show_bug.cgi?id=25034
2972
2973         * bindings/v8/WorkerContextExecutionProxy.cpp:
2974         (WebCore::WorkerContextExecutionProxy::evaluate):
2975
2976 2009-04-07  Dan Bernstein  <mitz@apple.com>
2977
2978         Reviewed by Darin Adler.
2979
2980         - fix <rdar://problem/6764359> Thai word selection misbehaves for the
2981           last sentence in the document
2982
2983         Test: editing/selection/thai-word-at-document-end.html
2984
2985         * editing/visible_units.cpp:
2986             - Added a BoundarySearchContextAvailability enum used to indicate
2987             whether the caller to a boundary search function may be able to provide
2988             additional text in the search direction and call again.
2989             - Added a named type for the boundary search function signature. Changed
2990             the signature to take a context availability parameter and a boolean
2991             out parameter indicating whether more context is needed to perform
2992             the search.
2993         (WebCore::previousBoundary): If the beginning of the range was reached
2994             but the last search wanted more context, perform the search again, this
2995             time indicating that there is no earlier text.
2996         (WebCore::nextBoundary): Similarly, in the other direction.
2997         (WebCore::startWordBoundary): Check whether more context may be available
2998             and ask for more context if needed.
2999         (WebCore::endWordBoundary): Ditto.
3000         (WebCore::previousWordPositionBoundary): Ditto.
3001         (WebCore::nextWordPositionBoundary): Ditto.
3002         (WebCore::startSentenceBoundary):  Updated signature.
3003         (WebCore::endSentenceBoundary): Ditto.
3004         (WebCore::previousSentencePositionBoundary): Ditto.
3005         (WebCore::nextSentencePositionBoundary): Ditto.
3006
3007 2009-04-07  Geoffrey Garen  <ggaren@apple.com>
3008
3009         Rubber stamped by Sam Weinig.
3010         
3011         A little renaming:
3012         
3013         function => jsFunction
3014         listener => jsFunction
3015
3016         * bindings/js/JSEventListener.cpp:
3017         (WebCore::JSAbstractEventListener::handleEvent):
3018         (WebCore::JSEventListener::JSEventListener):
3019         (WebCore::JSEventListener::~JSEventListener):
3020         (WebCore::JSEventListener::jsFunction):
3021         (WebCore::JSEventListener::mark):
3022         (WebCore::JSProtectedEventListener::JSProtectedEventListener):
3023         (WebCore::JSProtectedEventListener::~JSProtectedEventListener):
3024         (WebCore::JSProtectedEventListener::jsFunction):
3025         * bindings/js/JSEventListener.h:
3026         (WebCore::JSProtectedEventListener::create):
3027         * bindings/js/JSLazyEventListener.cpp:
3028         (WebCore::JSLazyEventListener::jsFunction):
3029         (WebCore::JSLazyEventListener::parseCode):
3030         * dom/EventListener.h:
3031         (WebCore::EventListener::jsFunction):
3032
3033 2009-04-07  Brady Eidson  <beidson@apple.com>
3034
3035         Reviewed by Darin Adler
3036
3037         While working on <rdar://problem/5968249>, noticed some glaring problems with LocalStorage.
3038
3039         * page/DOMWindow.cpp:
3040         (WebCore::DOMWindow::localStorage): Return the cached m_localStorage object if it exists to 
3041           avoid creating multiple representations for the same underlying StorageArea.
3042         * page/DOMWindow.h:
3043         (WebCore::DOMWindow::optionalLocalStorage): Return m_localStorage, not m_sessionStorage.
3044
3045 2009-04-07  Darin Adler  <darin@apple.com>
3046
3047         Roll out incorrect build fix.
3048
3049         * WebCore.NPAPI.exp: Reverted.
3050
3051 2009-04-07  Darin Adler  <darin@apple.com>
3052
3053         Another build fix.
3054
3055         * WebCore.NPAPI.exp: Added new functions.
3056
3057 2009-04-07  Anders Carlsson  <andersca@apple.com>
3058
3059         Another build fix.
3060         
3061         * plugins/npfunctions.h:
3062
3063 2009-04-07  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3064
3065         Unreviewed build fix. Fix non-Mac builds.
3066
3067         * bridge/npapi.h:
3068
3069 2009-04-07  Simon Fraser  <simon.fraser@apple.com>
3070
3071         Reviewed by Dan Bernstein
3072
3073         https://bugs.webkit.org/show_bug.cgi?id=25082
3074         
3075         Clean up repaint logic when RenderLayers become and stop being composited.
3076
3077         * rendering/RenderLayer.h:
3078         * rendering/RenderLayer.cpp:
3079         (WebCore::RenderLayer::rendererContentChanged):
3080         (WebCore::RenderLayer::repaintIncludingNonCompositingDescendants):
3081         New compositing-only method that repaints a layer and all its non-composited descendants.
3082         Takes a repaintContainer for performance; all the repaints necessarily share the same
3083         repaintContainer.
3084
3085         * rendering/RenderLayerCompositor.h:
3086         * rendering/RenderLayerCompositor.cpp:
3087         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
3088         Rather than use calculateCompositedBounds() to compute the repaint rect (which gave
3089         the wrong answer when the composited layer tree was in flux), use the new
3090         repaintOnCompositingChange() method.
3091         
3092         (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
3093         Call repaintIncludingNonCompositingDescendants(), and if necessary make sure
3094         that the view/layer drawing synchronization happens.
3095         
3096         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3097         Do a repaintOnCompositingChange() when a layer is going to be composited. This is
3098         a good place because we haven't started to change the compositing tree.
3099         
3100         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3101         After we've finished updating all the descendant layers, we can do a repaint for
3102         layers that ceased compositing.
3103
3104 2009-04-07  Simon Fraser  <simon.fraser@apple.com>
3105
3106         Reviewed by Dave Hyatt
3107         
3108         https://bugs.webkit.org/show_bug.cgi?id=25069
3109         
3110         Clean up the accelerated compositing code that determines the format of
3111         the GraphicsLayer hierarchy, being more explicit about which parts have
3112         to happen before and after descendant layers have been updated. Also remove
3113         some unhelpful caching of state.
3114
3115         * dom/Document.cpp:
3116         (WebCore::Document::recalcStyle):
3117         Only call updateCompositingLayers() if we know we're not going to be
3118         doing a layout soon.
3119         
3120         * platform/graphics/mac/GraphicsLayerCA.mm:
3121         (WebCore::GraphicsLayerCA::setDrawsContent):
3122         Toggling drawsContent from false to true should do a setNeedsDisplay().
3123         
3124         * rendering/RenderLayer.cpp:
3125         (WebCore::RenderLayer::styleChanged):
3126         updateLayerCompositingState() no longer updates the layer geometry, so
3127         do that here if we're not going to rebuild layers anyway.
3128         Also, updateLayerCompositingState() no longer does a setContentsNeedDisplay,
3129         so do that if the style change indicates that a repaint is required.
3130         
3131         * rendering/RenderLayerBacking.h:
3132         * rendering/RenderLayerBacking.cpp:
3133         (WebCore::RenderLayerBacking::RenderLayerBacking):
3134         (WebCore::RenderLayerBacking::updateAfterLayout):
3135         The 'drawing optimizations' logic has been rolled into updateGraphicsLayerConfiguration()
3136         and updateGraphicsLayerGeometry().
3137         
3138         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
3139         Group that code that decides what GraphicsLayers are needed into this method,
3140         which deals with clipping layers and 'direct compositing': images that can be
3141         rendered via the compositor.
3142         
3143         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3144         Call setDrawsContent() if updateGraphicsLayerConfiguration() didn't already
3145         figure it out for image layers.
3146         
3147         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3148         Remove the m_simpleCompositingLayerStatusDirty cache indicator, since we just
3149         computed it every time anyway.
3150         
3151         * rendering/RenderLayerCompositor.h:
3152         * rendering/RenderLayerCompositor.cpp:
3153         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
3154         updateGraphicsLayers() was renamed to updateGraphicsLayerConfiguration(),
3155         which calls clippedByAncestor() etc. itself rather than having everything passed in.
3156         Repaints are taken care of by styleChanged() and setDrawsContent().
3157         
3158         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
3159         !layer->isComposited() && layer->transform() is a synonym for paintsWithTransform().
3160         
3161         (WebCore::RenderLayerCompositor::setCompositingParent):
3162         No need to call updateGraphicsLayerGeometry() here, because we're going to
3163         rebuild layers anyway.
3164         
3165         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3166         Add comments, and test layerBacking instead of layer->isComposited().
3167
3168 2009-04-07  Anders Carlsson  <andersca@apple.com>
3169
3170         Fix build.
3171         
3172         * WebCore.base.exp:
3173
3174 2009-04-07  Anders Carlsson  <andersca@apple.com>
3175
3176         Reviewed by Sam Weinig.
3177
3178         <rdar://problem/6667001> NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
3179         
3180         * WebCore.base.exp:
3181         Add symbols needed by WebKit.
3182         
3183         * WebCore.xcodeproj/project.pbxproj:
3184         Make CookieJar a private header.
3185         
3186         * bridge/npapi.h:
3187         Add function definitions.
3188         
3189         * plugins/npfunctions.h:
3190         Fix the NPN_SetValueForURLProcPtr signature.
3191
3192 2009-04-07  Adam Roben  <aroben@apple.com>
3193
3194         Fix <rdar://6520933> REGRESSION (3.2.1-ToT): Scroll bar disappears in
3195         WebView and Bookmarks view after switching theme or turning on High
3196         Contrast mode
3197
3198         Reviewed by Dave Hyatt.
3199
3200         * platform/win/ScrollbarThemeWin.cpp:
3201         (WebCore::ScrollbarThemeWin::themeChanged): Null out scrollbarTheme
3202         after closing it so that we'll re-open the theme next time we paint.
3203
3204 2009-04-07  Adam Roben  <aroben@apple.com>
3205
3206         Small cleanup/correctness fix in ScrollbarThemeWin
3207
3208         Reviewed by Dave Hyatt.
3209
3210         * platform/win/ScrollbarThemeWin.cpp: Removed the now-unused
3211         haveTheme boolean.
3212         (WebCore::checkAndInitScrollbarTheme): Check IsThemeActive() before
3213         calling OpenThemeData. This seems to be what MSDN recommends.
3214         (WebCore::ScrollbarThemeWin::themeChanged): Null-check scrollbarTheme
3215         before closing it, rather than indirectly null-checking it via
3216         checking haveTheme.
3217
3218 2009-04-07  Dan Bernstein  <mitz@apple.com>
3219
3220         Reviewed by John Sullivan.
3221
3222         - when -webkit-line-break: after-white-space is specified but the text
3223           does not auto-wrap, do not shrink the trailing space to fit in the
3224           available width
3225
3226         Test: fast/text/whitespace/nowrap-line-break-after-white-space.html
3227
3228         - when shrinking such trailing space, do not shrink below zero
3229
3230         Covered by existing tests
3231
3232         * rendering/bidi.cpp:
3233         (WebCore::RenderBlock::computeHorizontalPositionsForLine):
3234         (WebCore::RenderBlock::layoutInlineChildren):
3235
3236 2009-04-07  Eric Seidel  <eric@webkit.org>
3237
3238         Reviewed by Darin Adler.
3239
3240         Move RangeBoundaryPoint off of Position, per Darin's suggestion
3241         https://bugs.webkit.org/show_bug.cgi?id=24966
3242
3243         Rename setToChild to setToBeforeChild (since that's what the method does)
3244
3245         * dom/Position.h:
3246         (WebCore::Position::offsetInContainerNode):
3247         * dom/Range.cpp:
3248         (WebCore::Range::insertNode):
3249         (WebCore::Range::selectNodeContents):
3250         (WebCore::boundaryNodeWillBeRemoved):
3251         * dom/Range.h:
3252         (WebCore::Range::startPosition):
3253         (WebCore::Range::endPosition):
3254         * dom/RangeBoundaryPoint.h:
3255         (WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
3256         (WebCore::RangeBoundaryPoint::container):
3257         (WebCore::RangeBoundaryPoint::childBefore):
3258         (WebCore::RangeBoundaryPoint::position):
3259         (WebCore::RangeBoundaryPoint::offset):
3260         (WebCore::RangeBoundaryPoint::clear):
3261         (WebCore::RangeBoundaryPoint::set):
3262         (WebCore::RangeBoundaryPoint::setOffset):
3263         (WebCore::RangeBoundaryPoint::setToBeforeChild):
3264         (WebCore::RangeBoundaryPoint::setToStartOfNode):
3265         (WebCore::RangeBoundaryPoint::setToEndOfNode):
3266         (WebCore::RangeBoundaryPoint::childBeforeWillBeRemoved):
3267         (WebCore::RangeBoundaryPoint::invalidateOffset):
3268
3269 2009-04-07  Eric Seidel  <eric@webkit.org>
3270
3271         Reviewed by Darin Adler.
3272
3273         Add containerNode(), computeOffsetInContainerNode(),
3274         computeNodeBeforePosition() and computeNodeAfterPosition().
3275         https://bugs.webkit.org/show_bug.cgi?id=24763
3276
3277         These functions will replace uses of rangeCompliantPosition()
3278         in future patches.
3279
3280         No changes in behavior, thus no tests.
3281
3282         * dom/Position.cpp:
3283         (WebCore::Position::containerNode):
3284         (WebCore::Position::computeOffsetInContainerNode):
3285         (WebCore::Position::computeNodeBeforePosition):
3286         (WebCore::Position::computeNodeAfterPosition):
3287         (WebCore::Position::anchorType):
3288         * dom/Position.h:
3289         (WebCore::Position::):
3290
3291 2009-04-06  Sam Weinig  <sam@webkit.org>
3292
3293         Reviewed by Mark Rowe.
3294
3295         Bottleneck dispatching mutation events in a new dispatchMutationEvent
3296         function.
3297
3298         * dom/CharacterData.cpp:
3299         (WebCore::CharacterData::dispatchModifiedEvent):
3300         * dom/ContainerNode.cpp:
3301         (WebCore::dispatchChildInsertionEvents):
3302         (WebCore::dispatchChildRemovalEvents):
3303         * dom/Node.cpp:
3304         (WebCore::Node::dispatchSubtreeModifiedEvent):
3305         (WebCore::Node::dispatchMutationEvent):
3306         * dom/Node.h:
3307
3308 2009-04-06  Dimitri Glazkov  <dglazkov@chromium.org>
3309
3310         Reviewed by Darin Fisher.
3311
3312         https://bugs.webkit.org/show_bug.cgi?id=25059
3313         Remove references to dominantScript, getGenericFontForScript.
3314
3315         * platform/graphics/chromium/FontCacheChromiumWin.cpp: Removed references
3316             to getGenericFontForScript.
3317         (WebCore::FontCache::getLastResortFallbackFont): Removed calls to dominantScript.
3318         * platform/graphics/chromium/FontCacheLinux.cpp: Ditto.
3319         * rendering/RenderThemeChromiumLinux.cpp:
3320         (WebCore::defaultGUIFont): Removed Document* arg.
3321         (WebCore::RenderThemeChromiumLinux::systemFont): Ditto.
3322         * rendering/RenderThemeChromiumLinux.h: Ditto.
3323         * rendering/RenderThemeChromiumMac.h: Ditto.
3324         * rendering/RenderThemeChromiumMac.mm: Ditto.
3325         (WebCore::RenderThemeChromiumMac::systemFont): Ditto.
3326         * rendering/RenderThemeChromiumWin.cpp:
3327         (WebCore::defaultGUIFont): Ditto.
3328         (WebCore::RenderThemeChromiumWin::systemFont): Ditto.
3329         * rendering/RenderThemeChromiumWin.h: Ditto.
3330
3331 2009-04-06  Geoffrey Garen  <ggaren@apple.com>
3332
3333         Reviewed by Darin Adler.
3334         
3335         Fixed https://bugs.webkit.org/show_bug.cgi?id=21260
3336         Unbounded memory growth when churning elements with anonymous event handler functions
3337
3338         The problem was that a protected event listener's scope chain would end
3339         up with a reference to the Node protecting it, causing a cycle. The
3340         solution is to stop protecting event listeners and rely on marking instead.
3341
3342         This patch converts most Node event listeners to use marking instead of
3343         GC protection.
3344
3345         * bindings/js/JSDOMBinding.cpp:
3346         (WebCore::isObservableThroughDOM):
3347         (WebCore::markDOMNodesForDocument): Refactored the test for whether a Node
3348         needs marking, and added a case for marking the node in order to mark its
3349         event listeners.
3350
3351         * bindings/js/JSNodeCustom.cpp:
3352         (WebCore::markEventListeners):
3353         (WebCore::JSNode::addEventListener):
3354         (WebCore::JSNode::removeEventListener):
3355         (WebCore::JSNode::mark): Added code to mark a Node's event listeners when
3356         marking the Node. Changed code using protected event listeners to use event
3357         listeners.
3358
3359         * dom/Node.idl: Changed code using protected event listeners to use event
3360         listeners.
3361
3362 2009-04-06  Sam Weinig  <sam@webkit.org>
3363
3364         Reviewed by Darin Adler.
3365
3366         Remove unchecked bool return values for some dispatch event functions.
3367
3368         * dom/Node.cpp:
3369         (WebCore::Node::dispatchSubtreeModifiedEvent):
3370         (WebCore::Node::dispatchUIEvent):
3371         (WebCore::Node::dispatchWebKitAnimationEvent):
3372         (WebCore::Node::dispatchWebKitTransitionEvent):
3373         (WebCore::Node::dispatchProgressEvent):
3374         * dom/Node.h:
3375
3376 2009-04-06  Darin Fisher  <darin@chromium.org>
3377
3378         Reviewed by Dimitri Glazkov.
3379
3380         https://bugs.webkit.org/show_bug.cgi?id=25058
3381         Fix chromium build bustage caused by r42216
3382
3383         * bindings/scripts/CodeGeneratorJS.pm:
3384         * page/DOMWindow.idl:
3385
3386 2009-04-06  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3387
3388         Rubber-stamped by Sam Weinig.
3389
3390         https://bugs.webkit.org/show_bug.cgi?id=20575
3391         No localization in WebKitGtk
3392
3393         * platform/gtk/FileChooserGtk.cpp: Remove usage of glib/gi18n.h,
3394         since there are not translatable strings.
3395         * platform/gtk/LocalizedStringsGtk.cpp: Use the glib i18n header
3396         that is specific for libraries.
3397
3398 2009-04-06  Mike Belshe  <mike@belshe.com>
3399
3400         Reviewed by Dimitri Glazkov.
3401
3402         https://bugs.webkit.org/show_bug.cgi?id=24978
3403         Use custom implementations of a few Node methods so that
3404         we don't over-aggressively create JS wrappers here.
3405
3406         * bindings/v8/custom/V8NodeCustom.cpp: Added custom implementations.
3407         * dom/Node.idl: Removed JSC-specifier, making impl custom for V8 as well.
3408
3409 2009-04-06  Dave Moore  <davemoore@google.com>
3410
3411         Reviewed by Dimitri Glazkov.
3412
3413         https://bugs.webkit.org/show_bug.cgi?id=25031
3414         Make the V8 element collections check for named properties *before*
3415         checking if there are any elements with the same name. Otherwise
3416         it is both incorrect and slow.
3417
3418         Test: fast/dom/HTMLSelectElement/length-not-overridden.html
3419
3420         Both of these interceptors were attempting to find an element in the
3421         collection that had a name or id of the property name before checking
3422         for a JS property with that name.
3423         * bindings/v8/V8Collection.h:
3424         (WebCore::collectionNamedPropertyGetter):
3425         (WebCore::nodeCollectionNamedPropertyGetter):
3426
3427 2009-04-06  Simon Fraser  <simon.fraser@apple.com>
3428
3429         Reviewed by Darin Adler
3430
3431         https://bugs.webkit.org/show_bug.cgi?id=25052
3432         
3433         Pull the call to updateGraphicsLayerGeometry() out of updateGraphicsLayers(),
3434         because we need to call it at the end of rebuildCompositingLayerTree() once
3435         we've determined which descendant layers are composited, otherwise
3436         calculateCompositedBounds() can give the wrong answer.
3437         
3438         Now that updateLayerCompositingState() doesn't end up calling updateGraphicsLayerGeometry(),
3439         call that explicitly from styleChanged(), if we know a layer update is not pending,
3440         and similarly from updateAfterLayout().
3441
3442         Test: compositing/overflow/overflow-positioning.html
3443
3444         * rendering/RenderLayer.cpp:
3445         (WebCore::RenderLayer::styleChanged):
3446         * rendering/RenderLayerBacking.cpp:
3447         (WebCore::RenderLayerBacking::updateAfterLayout):
3448         (WebCore::RenderLayerBacking::updateGraphicsLayers):
3449         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3450         * rendering/RenderLayerCompositor.cpp:
3451         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3452
3453 2009-04-06  Mike Belshe  <mike@belshe.com>
3454
3455         Reviewed by Alexey Proskuryakov.
3456
3457         Add accessors to AtomicString which take String/const char* arguments
3458         so that we don't accidentally thrash the AtomicString table.
3459
3460         https://bugs.webkit.org/show_bug.cgi?id=24979
3461
3462         * platform/text/AtomicString.h:
3463
3464 2009-04-03  Holger Hans Peter Freyther  <zecke@selfish.org>
3465
3466         Reviewed by Simon Hausmann.
3467
3468         Make col and row work in WebCore/manual-tests/cursor.html. The issue
3469         was spotted in the WebKit inspector.
3470
3471         * platform/gtk/CursorGtk.cpp:
3472         (WebCore::columnResizeCursor):
3473         (WebCore::rowResizeCursor):
3474
3475 2009-04-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3476
3477         Reviewed by Simon Hausmann.
3478
3479         [Qt] Don't show and hide the platformPluginWidget, as it's our QWebView
3480
3481         * plugins/mac/PluginViewMac.cpp:
3482         (WebCore::PluginView::show):
3483         (WebCore::PluginView::hide):
3484         (WebCore::PluginView::setParentVisible):
3485
3486 2009-04-06  Simon Hausmann  <simon.hausmann@nokia.com>
3487
3488         Reviewed by Tor Arne Vestbø.
3489
3490         Add new files to the Qt build.
3491         Export helper function from the Qt JSC binding, needed in WebKit/qt.
3492
3493         * WebCore.pro: Add new files.
3494         * bridge/qt/qt_runtime.h: Declare convertQVariantToValue.
3495
3496 2009-04-06  Simon Hausmann  <simon.hausmann@nokia.com>
3497
3498         Reviewed by Tor Arne Vestbø.
3499
3500         Changed ScriptFunctionCall's last argument from a const char* as the function name to a String.
3501
3502         Internally the function name is stored as a WebCore::String and the Qt port wants to use this
3503         constructor programmatically where the function name is also a WebCore::String.
3504
3505         * bindings/js/ScriptFunctionCall.cpp:
3506         (WebCore::ScriptFunctionCall::ScriptFunctionCall):
3507         * bindings/js/ScriptFunctionCall.h:
3508
3509 2009-04-06  Mike Belshe <mike@belshe.com>
3510
3511         Reviewed by Eric Seidel.
3512
3513         HTMLCanvasElement crash when ImageBuffer creation fails.
3514         https://bugs.webkit.org/show_bug.cgi?id=23212
3515
3516         Check for NULL before using the ImageBuffer as we might
3517         be low on memory and creation may have failed.
3518
3519         Test case creation blocked by:
3520         https://bugs.webkit.org/show_bug.cgi?id=25055
3521
3522         * html/HTMLCanvasElement.cpp:
3523         (WebCore::HTMLCanvasElement::createImageBuffer):
3524
3525 2009-04-05  Geoffrey Garen  <ggaren@apple.com>
3526
3527         [Originally] Reviewed by Sam Weinig.
3528
3529         Rolled back in r42214 with crashes fixed.
3530
3531         [Removed irrelevant ExecState* parameter from event handler registration code.]
3532         
3533         [No change in behavior.]
3534
3535         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3536         (WebCore::JSDOMApplicationCache::addEventListener):
3537         (WebCore::JSDOMApplicationCache::removeEventListener):
3538         * bindings/js/JSDOMGlobalObject.cpp:
3539         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
3540         (WebCore::JSDOMGlobalObject::findJSEventListener):
3541         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
3542         * bindings/js/JSDOMGlobalObject.h:
3543         * bindings/js/JSDOMWindowCustom.cpp:
3544         (WebCore::JSDOMWindow::addEventListener):
3545         * bindings/js/JSMessagePortCustom.cpp:
3546         (WebCore::JSMessagePort::addEventListener):
3547         (WebCore::JSMessagePort::removeEventListener):
3548         * bindings/js/JSNodeCustom.cpp:
3549         (WebCore::JSNode::addEventListener):
3550         * bindings/js/JSSVGElementInstanceCustom.cpp:
3551         (WebCore::JSSVGElementInstance::addEventListener):
3552         * bindings/js/JSWorkerContextCustom.cpp:
3553         (WebCore::JSWorkerContext::addEventListener):
3554         (WebCore::JSWorkerContext::removeEventListener):
3555         * bindings/js/JSWorkerCustom.cpp:
3556         (WebCore::JSWorker::addEventListener):
3557         (WebCore::JSWorker::removeEventListener):
3558         * bindings/js/JSXMLHttpRequestCustom.cpp:
3559         (WebCore::JSXMLHttpRequest::addEventListener):
3560         (WebCore::JSXMLHttpRequest::removeEventListener):
3561         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3562         (WebCore::JSXMLHttpRequestUpload::addEventListener):
3563         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
3564         * bindings/scripts/CodeGeneratorJS.pm:
3565
3566 2009-04-05  Erik L. Bunce  <elbunce@xendom.com>
3567
3568         Reviewed by Simon Hausmann.
3569
3570         https://bugs.webkit.org/show_bug.cgi?id=25050
3571
3572         Fix an assert failure when dropping an 'empty' text/uri-list on a QWebView. 
3573
3574         * platform/qt/DragDataQt.cpp:
3575         (WebCore::DragData::asURL):
3576
3577 2009-04-05  Simon Hausmann  <hausmann@webkit.org>
3578
3579         Fix the Qt build.
3580
3581         * bridge/qt/qt_runtime.h:
3582         (JSC::Bindings::QtRuntimeMethod::createPrototype): Take the JSGlobalObject
3583         as second argument.
3584
3585 2009-04-04  Kevin Ollivier  <kevino@theolliviers.com>
3586
3587         Build fixes for wxMac/Tiger.
3588
3589         * platform/wx/wxcode/mac/carbon/fontprops.cpp:
3590         (wxFontProperties::wxFontProperties):
3591         * rendering/break_lines.cpp:
3592         (WebCore::nextBreakablePosition):
3593         * webcore-wx.bkl:
3594
3595 2009-04-04  Simon Fraser  <simon.fraser@apple.com>
3596
3597         Reviewed by Cameron Zwarich
3598
3599         https://bugs.webkit.org/show_bug.cgi?id=24648
3600         
3601         Ensure that mapPoint(const IntPoint&) calls the FloatPoint
3602         version to avoid infinite recursion.
3603         
3604         No test because mapPoint(const IntPoint&) isn't ever called
3605         on Mac, so I can't reproduce.
3606         
3607         * platform/graphics/transforms/TransformationMatrix.h:
3608         (WebCore::TransformationMatrix::mapPoint):
3609
3610 2009-04-04  Dan Bernstein  <mitz@apple.com>
3611
3612         Reviewed by Mark Rowe.
3613
3614         - fix <rdar://problem/6757862> REGRESSION: Cannot use the mouse to place
3615           the insertion point inside a Thai character
3616
3617         Test: fast/text/international/thai-offsetForPosition-inside-character.html
3618
3619         * platform/graphics/mac/CoreTextController.cpp:
3620         (WebCore::CoreTextController::offsetForPosition): Changed to use
3621         cursorMovementIterator instead of characterBreakIterator, allowing this
3622         function to return a valid cursor position even if it is not at
3623         a character boundary.
3624
3625 2009-04-04  Dan Bernstein  <mitz@apple.com>
3626
3627         Reviewed by Mark Rowe.
3628
3629         - fix an assertion failure when clicking at the beginning of a
3630           glyph cluster at the beginning of a text run
3631
3632         Test: fast/text/offsetForPosition-cluster-at-zero.html
3633
3634         * platform/graphics/mac/CoreTextController.cpp:
3635         (WebCore::CoreTextController::offsetForPosition): Corrected the bound
3636         check on firstGlyphBeforeCluster, letting it be 0 or -1, but not less
3637         than -1.
3638
3639 2009-04-03  Brian Weinstein  <bweinstein@gmail.com>
3640
3641         Allows 16 HTML/CSS standard colors to be shown as swatch backgrounds
3642         when the names are given.
3643
3644         https://bugs.webkit.org/show_bug.cgi?id=25044
3645
3646         Reviewed by Timothy Hatcher.
3647
3648         * inspector/front-end/StylesSidebarPane.js:
3649         (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
3650
3651 2009-04-03  Sam Weinig  <sam@webkit.org>
3652
3653         Reviewed by Darin Adler.
3654
3655         <rdar://problem/6330929>
3656         https://bugs.webkit.org/show_bug.cgi?id=21456
3657
3658         Don't update the document pointer for all inactive windows on navigations.
3659         This change causes us to differ slightly from Firefox when accessing the
3660         document from within a closure tied to a navigated context, but as all
3661         browsers differ on this edge case, I don't foresee compatibility issues.
3662
3663         Test: http/tests/security/cross-frame-access-document-direct.html
3664
3665         * bindings/js/JSDOMWindowBase.cpp:
3666         (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
3667         * bindings/js/ScriptController.cpp:
3668         (WebCore::ScriptController::clearWindowShell):
3669         (WebCore::ScriptController::initScript):
3670         (WebCore::ScriptController::updateDocument):
3671         * bindings/js/ScriptController.h:
3672
3673 2009-04-03  Chris Marrin  <cmarrin@apple.com>
3674
3675         Reviewed by Simon Fraser.
3676
3677         Test: transitions/bad-transition-shorthand-crash.html
3678
3679         Fixed https://bugs.webkit.org/show_bug.cgi?id=24787.
3680
3681         We were starting transitions with 0 duration and delay, which is 
3682         useless. With accelerated compositing on, this went through a code
3683         path that tried to use m_toStyle, which never got set because the 
3684         transitions was short circuited before it had a chance to. So I
3685         both protect against using that null pointer and avoid starting
3686         the transition in the first place.
3687
3688         * page/animation/CompositeAnimation.cpp:
3689         (WebCore::CompositeAnimationPrivate::updateTransitions):
3690         * page/animation/ImplicitAnimation.cpp:
3691         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
3692
3693 2009-04-03  Timothy Hatcher  <timothy@apple.com>
3694
3695         Fixes a bug where you could not type any more in the Web Inspector's
3696         search field after the first match is selected in the Resources panel.
3697
3698         https://bugs.webkit.org/show_bug.cgi?id=23982
3699         rdar://problem/6592367
3700
3701         Reviewed by Darin Adler.
3702
3703         * inspector/front-end/SourceView.js:
3704         (WebInspector.SourceView.prototype._jumpToSearchResult): Use the
3705         window object of the frame to set the selection, not the main window.
3706
3707 2009-04-03  Sam Weinig  <sam@webkit.org>
3708
3709         Reviewed by Anders Carlsson.
3710
3711         Fix for https://bugs.webkit.org/show_bug.cgi?id=22081
3712         <rdar://problem/6346030>
3713         Don't allow overriding the return value of window.location.
3714
3715         Tests: fast/dom/Window/Location/location-override-toString-on-proto-using-defineGetter.html
3716                fast/dom/Window/Location/location-override-toString-on-proto-using-with.html
3717                fast/dom/Window/Location/location-override-toString-on-proto.html
3718                fast/dom/Window/Location/location-override-toString-using-defineGetter.html
3719                fast/dom/Window/Location/location-override-toString-using-with.html
3720                fast/dom/Window/Location/location-override-toString.html
3721                fast/dom/Window/Location/location-override-valueOf-on-proto-using-defineGetter.html
3722                fast/dom/Window/Location/location-override-valueOf-on-proto-using-with.html
3723                fast/dom/Window/Location/location-override-valueOf-on-proto.html
3724                fast/dom/Window/Location/location-override-valueOf-using-defineGetter.html
3725                fast/dom/Window/Location/location-override-valueOf-using-with.html
3726                fast/dom/Window/Location/location-override-valueOf.html
3727                fast/dom/Window/Location/window-override-location-using-defineGetter.html
3728                fast/dom/Window/Location/window-override-window-using-defineGetter.html
3729                fast/dom/Window/Location/window-shadow-location-using-js-object-with-toString.html
3730                fast/dom/Window/Location/window-shadow-location-using-string.html
3731                fast/dom/Window/Location/window-shadow-window-using-js-object-with-location-field.html
3732
3733         * bindings/js/JSDOMWindowCustom.cpp:
3734         (WebCore::JSDOMWindow::defineGetter):
3735         * bindings/js/JSLocationCustom.cpp:
3736         (WebCore::JSLocation::customPut):
3737         (WebCore::JSLocation::defineGetter):
3738         (WebCore::JSLocationPrototype::customPut):
3739         (WebCore::JSLocationPrototype::defineGetter):
3740         * bindings/scripts/CodeGeneratorJS.pm:
3741         * page/Location.idl:
3742
3743 2009-04-03  Geoffrey Garen  <ggaren@apple.com>
3744
3745         Rolled out r42214 since it seems to have caused crashes on the buildbot.
3746
3747         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3748         (WebCore::JSDOMApplicationCache::addEventListener):
3749         (WebCore::JSDOMApplicationCache::removeEventListener):
3750         * bindings/js/JSDOMGlobalObject.cpp:
3751         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
3752         (WebCore::JSDOMGlobalObject::findJSEventListener):
3753         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
3754         * bindings/js/JSDOMGlobalObject.h:
3755         * bindings/js/JSDOMWindowCustom.cpp:
3756         (WebCore::JSDOMWindow::addEventListener):
3757         * bindings/js/JSMessagePortCustom.cpp:
3758         (WebCore::JSMessagePort::addEventListener):
3759         (WebCore::JSMessagePort::removeEventListener):
3760         * bindings/js/JSNodeCustom.cpp:
3761         (WebCore::JSNode::addEventListener):
3762         (WebCore::JSNode::removeEventListener):
3763         * bindings/js/JSSVGElementInstanceCustom.cpp:
3764         (WebCore::JSSVGElementInstance::addEventListener):
3765         * bindings/js/JSWorkerContextCustom.cpp:
3766         (WebCore::JSWorkerContext::addEventListener):
3767         (WebCore::JSWorkerContext::removeEventListener):
3768         * bindings/js/JSWorkerCustom.cpp:
3769         (WebCore::JSWorker::addEventListener):
3770         (WebCore::JSWorker::removeEventListener):
3771         * bindings/js/JSXMLHttpRequestCustom.cpp:
3772         (WebCore::JSXMLHttpRequest::addEventListener):
3773         (WebCore::JSXMLHttpRequest::removeEventListener):
3774         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3775         (WebCore::JSXMLHttpRequestUpload::addEventListener):
3776         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
3777         * bindings/scripts/CodeGeneratorJS.pm:
3778
3779 2009-04-03  Sam Weinig  <sam@webkit.org>
3780
3781         Reviewed by Oliver Hunt.
3782
3783         Fix for <rdar://problem/6476356>
3784         https://bugs.webkit.org/show_bug.cgi?id=23148
3785
3786         - Use the window object the Location and History objects are directly associated with
3787           instead of the lexical global object to pick the object prototype to serve as the
3788           base of the their respective prototype chains.
3789         - Re-factor as necessary to allow passing the correct global object to the createPrototype
3790           functions.
3791
3792         Tests: http/tests/security/cross-frame-access-history-prototype.html
3793                http/tests/security/cross-frame-access-location-prototype.html
3794
3795         * bindings/js/JSAudioConstructor.cpp:
3796         (WebCore::JSAudioConstructor::JSAudioConstructor):
3797         * bindings/js/JSDOMBinding.cpp:
3798         (WebCore::getCachedDOMStructure):
3799         (WebCore::cacheDOMStructure):
3800         * bindings/js/JSDOMBinding.h:
3801         (WebCore::getDOMStructure):
3802         (WebCore::getDOMPrototype):
3803         * bindings/js/JSDOMWindowCustom.cpp:
3804         (WebCore::JSDOMWindow::history):
3805         (WebCore::JSDOMWindow::location):
3806         * bindings/js/JSDocumentCustom.cpp:
3807         (WebCore::JSDocument::location):
3808         * bindings/js/JSImageConstructor.cpp:
3809         (WebCore::JSImageConstructor::JSImageConstructor):
3810         * bindings/js/JSMessageChannelConstructor.cpp:
3811         (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
3812         * bindings/js/JSNamedNodesCollection.h:
3813         (WebCore::JSNamedNodesCollection::createPrototype):
3814         * bindings/js/JSOptionConstructor.cpp:
3815         (WebCore::JSOptionConstructor::JSOptionConstructor):
3816         * bindings/js/JSRGBColor.h:
3817         (WebCore::JSRGBColor::createPrototype):
3818         * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
3819         (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
3820         * bindings/js/JSWebKitPointConstructor.cpp:
3821         (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
3822         * bindings/js/JSWorkerConstructor.cpp:
3823         (WebCore::JSWorkerConstructor::JSWorkerConstructor):
3824         * bindings/js/JSXMLHttpRequestConstructor.cpp:
3825         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3826         * bindings/js/JSXSLTProcessorConstructor.cpp:
3827         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
3828         * bindings/scripts/CodeGeneratorJS.pm:
3829         * bridge/objc/objc_runtime.h:
3830         (JSC::Bindings::ObjcFallbackObjectImp::createPrototype):
3831         * bridge/runtime_array.h:
3832         (JSC::RuntimeArray::createPrototype):
3833         * bridge/runtime_method.h:
3834         (JSC::RuntimeMethod::createPrototype):
3835         * bridge/runtime_object.h:
3836         (JSC::RuntimeObjectImp::createPrototype):
3837         * page/DOMWindow.idl:
3838
3839 2009-04-03  Jian Li  <jianli@chromium.org>
3840
3841         Reviewed by Darin Fisher.
3842
3843         https://bugs.webkit.org/show_bug.cgi?id=25009
3844         Upstream changes to WorkerContextExecutionProxy for V8 bindings in order to use V8EventListenerList as container.
3845
3846         * bindings/v8/WorkerContextExecutionProxy.cpp:
3847         (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy):
3848         (WebCore::WorkerContextExecutionProxy::dispose):
3849         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
3850         (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
3851         * bindings/v8/WorkerContextExecutionProxy.h:
3852
3853 2009-04-03  Geoffrey Garen  <ggaren@apple.com>
3854
3855         Reviewed by Sam Weinig.
3856
3857         Removed irrelevant ExecState* parameter from event handler registration code.
3858         
3859         No change in behavior.
3860
3861         * bindings/js/JSDOMApplicationCacheCustom.cpp:
3862         (WebCore::JSDOMApplicationCache::addEventListener):
3863         (WebCore::JSDOMApplicationCache::removeEventListener):
3864         * bindings/js/JSDOMGlobalObject.cpp:
3865         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
3866         (WebCore::JSDOMGlobalObject::findJSEventListener):
3867         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
3868         * bindings/js/JSDOMGlobalObject.h:
3869         * bindings/js/JSDOMWindowCustom.cpp:
3870         (WebCore::JSDOMWindow::addEventListener):
3871         * bindings/js/JSMessagePortCustom.cpp:
3872         (WebCore::JSMessagePort::addEventListener):
3873         (WebCore::JSMessagePort::removeEventListener):
3874         * bindings/js/JSNodeCustom.cpp:
3875         (WebCore::JSNode::addEventListener):
3876         (WebCore::JSNode::removeEventListener):
3877         * bindings/js/JSSVGElementInstanceCustom.cpp:
3878         (WebCore::JSSVGElementInstance::addEventListener):
3879         * bindings/js/JSWorkerContextCustom.cpp:
3880         (WebCore::JSWorkerContext::addEventListener):
3881         (WebCore::JSWorkerContext::removeEventListener):
3882         * bindings/js/JSWorkerCustom.cpp:
3883         (WebCore::JSWorker::addEventListener):
3884         (WebCore::JSWorker::removeEventListener):
3885         * bindings/js/JSXMLHttpRequestCustom.cpp:
3886         (WebCore::JSXMLHttpRequest::addEventListener):
3887         (WebCore::JSXMLHttpRequest::removeEventListener):
3888         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
3889         (WebCore::JSXMLHttpRequestUpload::addEventListener):
3890         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
3891         * bindings/scripts/CodeGeneratorJS.pm:
3892
3893 2009-04-03  Dan Bernstein  <mitz@apple.com>
3894
3895         Reviewed by Simon Fraser.
3896
3897         - fix <rdar://problem/6634771> Under full-page zoom, cannot scroll
3898           MobileMe contact list
3899
3900         Test: fast/css/zoom-in-length-round-trip.html
3901
3902         * dom/Element.cpp:
3903         (WebCore::adjustForLocalZoom): For zoom factors greater than 1, ensure
3904         that the returned value is equal to the original unscaled value.
3905         (WebCore::adjustForAbsoluteZoom): Ditto.
3906
3907 2009-04-03  Chris Marrin  <cmarrin@apple.com>
3908
3909         Reviewed by David Hyatt.
3910
3911         Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
3912
3913         This fix essentially does a -viewWillDraw call for layout. It adds 
3914         a CFRunLoopObserver which performs layout just before drawing on the 
3915         Mac platform. This makes sure layout is complete before rendering and 
3916         avoids a flash.
3917
3918         * page/ChromeClient.h:
3919         (WebCore::ChromeClient::scheduleViewUpdate):
3920         * rendering/RenderLayerCompositor.cpp:
3921         (WebCore::RenderLayerCompositor::setCompositingLayersNeedUpdate):
3922         (WebCore::RenderLayerCompositor::scheduleViewUpdate):
3923         * rendering/RenderLayerCompositor.h:
3924
3925 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
3926
3927         Reviewed by Dan Bernstein
3928
3929         https://bugs.webkit.org/show_bug.cgi?id=24648
3930
3931         Optimize mapPoint(), mapRect() and mapQuad() for identity matrix and translations.
3932         
3933         * platform/graphics/transforms/TransformationMatrix.cpp:
3934         (WebCore::TransformationMatrix::mapPoint):
3935         (WebCore::TransformationMatrix::mapRect):
3936         (WebCore::TransformationMatrix::mapQuad):
3937         * platform/graphics/transforms/TransformationMatrix.h:
3938         (WebCore::TransformationMatrix::mapPoint):
3939
3940 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
3941
3942         Reviewed by Dan Bernstein
3943
3944         https://bugs.webkit.org/show_bug.cgi?id=25018
3945         
3946         Add containsPoint() and containsQuad() methods to FloatQuad.
3947
3948         * platform/graphics/FloatQuad.cpp:
3949         (WebCore::dot):
3950         (WebCore::isPointInTriangle):
3951         (WebCore::FloatQuad::containsPoint):
3952         (WebCore::FloatQuad::containsQuad):
3953         * platform/graphics/FloatQuad.h:
3954
3955 2009-04-03  Kevin Decker  <kdecker@apple.com>
3956
3957         Reviewed by Darin.
3958
3959         *  loader/ProgressTracker.cpp: Included DocumentLoader.h
3960         (WebCore::ProgressTracker::incrementProgress): Limit the 50%-clamp rule to 
3961         documents that use WebCore's layout system.
3962
3963 2009-04-03  Eric Carlson  <eric.carlson@apple.com>
3964
3965         Reviewed by Simon Fraser.
3966
3967         https://bugs.webkit.org/show_bug.cgi?id=25029
3968         <rdar://problem/6336092> REGRESSION: movie does not resize correctly
3969
3970         Test: media/video-size-intrinsic-scale.html
3971
3972         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3973         (WebCore::MediaPlayerPrivate::naturalSize): Use QTMovieCurrentSizeAttribute instead 
3974         of QTMovieNaturalSizeAttribute so we return the correct size for movies saved
3975         with a non-default matrix.
3976         (WebCore::MediaPlayerPrivate::setSize): Don't resize the QTMovieView
3977         because [QTMovieView setFrame] also resizes the movie itself, and as
3978         the renderer calls setSize immediately when a movie reports a size change
3979         (QTMovieSizeDidChangeNotification) we can get into a feedback loop
3980         observing the size change and resetting the size, and this can cause
3981         QuickTime to miss correctly setting a movie's size when the media size
3982         changes after opening (as happens with an rtsp movie once the server sends
3983         the track sizes). Instead, remember the size passed to paint() and 
3984         resize the view when it changes.
3985         (WebCore::MediaPlayerPrivate::paint): Resize the view when passed a new size.
3986
3987         * platform/graphics/win/QTMovieWin.cpp:
3988         (QTMovieWin::getNaturalSize): Use GetMovieBox instead of GetMovieNaturalBoundsRect
3989         so we return the correct size for movies saved with non-default matrix.
3990
3991 2009-04-03  Darin Fisher  <darin@chromium.org>
3992
3993         Reviewed by Darin Adler.
3994
3995         Restore FrameLoader::policyDocumentLoader to fix the Chromium build.
3996         https://bugs.webkit.org/show_bug.cgi?id=25028
3997
3998         * loader/FrameLoader.h:
3999         (WebCore::FrameLoader::policyDocumentLoader):
4000
4001 2009-04-02  Michael Nordman  <michaeln@google.com>
4002
4003         Reviewed by Alexey Proskuryakov.
4004
4005         Use long long, not int64, when working in webcore (sorry).
4006         https://bugs.webkit.org/show_bug.cgi?id=25011
4007
4008         No change in functionality, so no tests.
4009
4010         * platform/network/chromium/ResourceResponse.h:
4011         (WebCore::ResourceResponse::getAppCacheID):
4012         (WebCore::ResourceResponse::setAppCacheID):
4013
4014 2009-04-03  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4015
4016         Reviewed by Holger Freyther.
4017
4018         Remove pre-processor checks for GTK+ >= 2.10, since we now require
4019         at least that version.
4020
4021         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
4022         (WebCore::FontPlatformData::FontPlatformData):
4023         * platform/gtk/ContextMenuItemGtk.cpp:
4024         (WebCore::gtkStockIDFromContextMenuAction):
4025         * platform/gtk/KeyEventGtk.cpp:
4026         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
4027         * platform/gtk/LocalizedStringsGtk.cpp:
4028         (WebCore::contextMenuItemTagSelectAll):
4029         * platform/gtk/MouseEventGtk.cpp:
4030         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
4031         * platform/gtk/PasteboardGtk.cpp:
4032         (WebCore::Pasteboard::writeSelection):
4033         (WebCore::Pasteboard::documentFragment):
4034         * platform/gtk/WheelEventGtk.cpp:
4035         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
4036
4037 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
4038
4039         Reviewed by Dan Bernstein
4040         
4041         https://bugs.webkit.org/show_bug.cgi?id=25021
4042         
4043         Fix repainting an element with a reflection and transform after layout.
4044         Telling the reflection to repaint directly is wrong, because, with
4045         LayoutState enabled, it only takes the reflection's transform into account,
4046         not that of the element. We can fix this, and keep the benefits of LayoutState,
4047         by computing the reflected repaint rect, and repainting that using the original
4048         renderer.
4049
4050         Test: fast/repaint/reflection-repaint-test.html
4051
4052         * rendering/RenderBlock.cpp:
4053         (WebCore::RenderBlock::layoutBlock):
4054
4055 2009-04-02  Simon Fraser  <simon.fraser@apple.com>
4056
4057         Reviewed by Dan Bernstein
4058         
4059         https://bugs.webkit.org/show_bug.cgi?id=23307
4060         
4061         When repainting during layout (when LayoutState is enabled), we need
4062         to apply the transform to the dirty rect, before applying x(), y() and
4063         the offset storted in the LayoutState.
4064         
4065         Also bypass LayoutState in mapLocalToContainer() if we have a repaintContainer,
4066         since LayoutState is always root-relative.
4067
4068         Test: fast/repaint/transform-layout-repaint.html
4069
4070         * rendering/RenderBox.cpp:
4071         (WebCore::RenderBox::mapLocalToContainer):
4072         (WebCore::RenderBox::computeRectForRepaint):
4073
4074 2009-04-02  Mark Rowe  <mrowe@apple.com>
4075
4076         Fix the Mac build after r42191.
4077
4078         * WebCore.base.exp:
4079
4080 2009-04-02  Mark Rowe  <mrowe@apple.com>
4081
4082         Fix Windows build after r42190.
4083
4084         * page/EventHandler.cpp:
4085         (WebCore::EventHandler::keyEvent):  Update to use the new name of the constant.
4086
4087 2009-04-02  Darin Adler  <darin@apple.com>
4088
4089         Reviewed by Brady Eidson.
4090
4091         <rdar://problem/6625840> Previous Page isn't loaded after hitting back button at http://www.breakingnews.ie/
4092
4093         Test: http/tests/navigation/onload-navigation-iframe-2.html
4094
4095         * html/HTMLFrameElement.cpp:
4096         (WebCore::HTMLFrameElement::HTMLFrameElement): Removed unneeded createdByParser flag.
4097         * html/HTMLFrameElement.h: Ditto.
4098         * html/HTMLFrameElementBase.cpp:
4099         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase): Ditto.
4100         * html/HTMLFrameElementBase.h: Ditto.
4101         * html/HTMLFrameOwnerElement.cpp:
4102         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement): Ditto.
4103         * html/HTMLFrameOwnerElement.h: Ditto.
4104         * html/HTMLIFrameElement.cpp:
4105         (WebCore::HTMLIFrameElement::HTMLIFrameElement): Ditto.
4106         * html/HTMLIFrameElement.h: Ditto.
4107         * html/HTMLPlugInElement.cpp:
4108         (WebCore::HTMLPlugInElement::HTMLPlugInElement): Ditto.
4109
4110         * loader/FrameLoader.cpp:
4111         (WebCore::FrameLoader::submitForm): Removed unneeded check of the createdByParser flag.
4112         The original change that introduced this, http://trac.webkit.org/changeset/25410, does
4113         not make it clear why this check was needed. And it seems it is not needed.
4114
4115 2009-04-02  Adele Peterson  <adele@apple.com>
4116
4117         Reviewed by Darin Adler.
4118
4119         Add a way to get a list of focusable nodes.
4120
4121         * dom/Document.cpp:
4122         (WebCore::Document::setFocusedNode):
4123         (WebCore::Document::getFocusableNodes):
4124         * dom/Document.h:
4125
4126 2009-04-02  Darin Adler  <darin@apple.com>
4127
4128         Reviewed by Sam Weinig.
4129
4130         <rdar://problem/6654255> crash due to null FrameView in EventHandler
4131
4132         Lots of code was added to EventHandler that used view() and page() without
4133         null checking, but both of those can become null due to the frame lifetime.
4134
4135         * page/EventHandler.cpp:
4136         (WebCore::EventHandler::handleMousePressEventSingleClick):
4137         (WebCore::EventHandler::eventMayStartDrag):
4138         (WebCore::EventHandler::handleAutoscroll):
4139         (WebCore::EventHandler::autoscrollTimerFired):
4140         (WebCore::EventHandler::setPanScrollCursor):
4141         (WebCore::EventHandler::allowDHTMLDrag):
4142         (WebCore::EventHandler::hitTestResultAtPoint):
4143         (WebCore::EventHandler::stopAutoscrollTimer):
4144         (WebCore::EventHandler::selectCursor):
4145         (WebCore::EventHandler::handleMousePressEvent):
4146         (WebCore::EventHandler::handleMouseMoveEvent):
4147         (WebCore::EventHandler::dispatchDragEvent):
4148         (WebCore::EventHandler::prepareMouseEvent):
4149         (WebCore::EventHandler::dispatchMouseEvent):
4150         (WebCore::EventHandler::handleWheelEvent):
4151         (WebCore::EventHandler::hoverTimerFired):
4152         (WebCore::EventHandler::keyEvent):
4153         (WebCore::EventHandler::dragHysteresisExceeded):
4154         (WebCore::EventHandler::shouldDragAutoNode):
4155         (WebCore::EventHandler::handleDrag):
4156         (WebCore::EventHandler::handleTextInputEvent):
4157         (WebCore::EventHandler::addPendingFrameUnloadEventCount):
4158         (WebCore::EventHandler::removePendingFrameUnloadEventCount):
4159         (WebCore::EventHandler::clearPendingFrameUnloadEventCount):
4160         (WebCore::EventHandler::addPendingFrameBeforeUnloadEventCount):
4161         (WebCore::EventHandler::removePendingFrameBeforeUnloadEventCount):
4162         (WebCore::EventHandler::clearPendingFrameBeforeUnloadEventCount):
4163         Added null checks for view() and page(). Made minor code cleanups.
4164
4165 2009-04-02  David Hyatt  <hyatt@apple.com>
4166
4167         Reviewed by Oliver Hunt.
4168
4169         Fix regression in <object> layout test.  Make sure that even though a 404 image loads, that <object>
4170         still considers it an error for the purposes of firing onerror.
4171
4172         * html/HTMLImageLoader.cpp:
4173         (WebCore::HTMLImageLoader::dispatchLoadEvent):
4174
4175 2009-04-02  Dimitri Glazkov  <dglazkov@chromium.org>
4176
4177         Reviewed by Timothy Hatcher.
4178
4179         https://bugs.webkit.org/show_bug.cgi?id=25010
4180         Refactor InspectorController to replace all JS function invocations with
4181         ScriptFunctionCall.
4182
4183         * bindings/js/ScriptFunctionCall.cpp:
4184         (WebCore::ScriptFunctionCall::appendArgument): Added int, UString,
4185             and JSValuePtr methods.
4186         (WebCore::ScriptFunctionCall::call): Added simplified, exception-eating
4187             method.
4188         * bindings/js/ScriptFunctionCall.h: Decls for above.
4189         * bindings/js/ScriptObjectQuarantine.cpp: Added helper for Node and DOMWindow.
4190         (WebCore::getQuarantinedScriptObject):
4191         * bindings/js/ScriptObjectQuarantine.h: Decls for above.
4192         * inspector/InspectorController.cpp:
4193         (WebCore::callSimpleFunction): Made into a static.
4194         (WebCore::InspectorController::focusNode): Refactored to use ScriptFunctionCall.
4195         (WebCore::InspectorController::toggleRecordButton): Ditto.
4196         (WebCore::InspectorController::startGroup): Ditto.
4197         (WebCore::InspectorController::setAttachedWindow): Ditto.
4198         (WebCore::InspectorController::inspectedWindowScriptObjectCleared): Ditto.
4199         (WebCore::InspectorController::addScriptProfile): Ditto.
4200         (WebCore::InspectorController::didParseSource): Ditto.
4201         (WebCore::InspectorController::failedToParseSource): Ditto.
4202         (WebCore::InspectorController::didPause): Ditto.
4203         * inspector/InspectorController.h: Removed callFunction and callSimpleFunction
4204             decls.
4205
4206 2009-04-02  Jian Li  <jianli@chromium.org>
4207