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