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