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