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