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