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